Skip to content

Commit

Permalink
Remove 'My' from plugin naming
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjong1 committed Mar 11, 2021
1 parent b2e0e75 commit 722abf4
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 39 deletions.
4 changes: 2 additions & 2 deletions Plugin/CityJSONReader/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set(classes vtkMyCityJSONReader vtkMyCityJSONFeature)
set(classes vtkCityJSONReader vtkCityJSONFeature)

vtk_module_add_module(VTK::IOCityJSON CLASSES ${classes})

paraview_add_server_manager_xmls(XMLS MyCityJSONReader.xml)
paraview_add_server_manager_xmls(XMLS CityJSONReader.xml)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<ParaViewPlugin>
<ServerManagerConfiguration>
<ProxyGroup name="sources">
<SourceProxy name="MyCityJSONReader" class="vtkMyCityJSONReader" label="MyCityJSON">
<SourceProxy name="CityJSONReader" class="vtkCityJSONReader" label="CityJSON">

<Documentation long_help="This plugin allows ParaView to load CityJSON files." short_help="Loads CityJSON files">
Loads and parses CityJSON files into ParaView. Parses the CityJSON files into points, inserts these,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "vtkMyCityJSONFeature.h"
#include "vtkCityJSONFeature.h"

// VTK Includes
#include "vtkCellArray.h"
Expand All @@ -15,7 +15,7 @@
#include <sstream>
#include <string>

vtkStandardNewMacro(vtkMyCityJSONFeature);
vtkStandardNewMacro(vtkCityJSONFeature);

namespace {
vtkOStreamWrapper &operator<<(vtkOStreamWrapper &os, const Json::Value &root) {
Expand All @@ -29,13 +29,13 @@ namespace {
}
}

vtkMyCityJSONFeature::vtkMyCityJSONFeature() = default;
vtkCityJSONFeature::vtkCityJSONFeature() = default;

//----------------------------------------------------------------------------
vtkMyCityJSONFeature::~vtkMyCityJSONFeature() = default;
vtkCityJSONFeature::~vtkCityJSONFeature() = default;

// Get boundaries for each object and insert polygons that reference each inserted point
vtkPolyData *vtkMyCityJSONFeature::ConnectTheDots(const Json::Value &cityObject, vtkPolyData *outputData) {
vtkPolyData *vtkCityJSONFeature::ConnectTheDots(const Json::Value &cityObject, vtkPolyData *outputData) {

if (cityObject.isNull()){
vtkErrorMacro(<< "Geometry node is missing!");
Expand Down Expand Up @@ -78,7 +78,7 @@ vtkPolyData *vtkMyCityJSONFeature::ConnectTheDots(const Json::Value &cityObject,


// Extract all vertices and insert them into points. Optionally also as (visible) vertices
void vtkMyCityJSONFeature::ExtractVertices(const Json::Value &vertices, vtkPolyData *outputData) {
void vtkCityJSONFeature::ExtractVertices(const Json::Value &vertices, vtkPolyData *outputData) {

vtkPoints *points = outputData->GetPoints();
vtkCellArray* verts = outputData->GetVerts();
Expand All @@ -93,7 +93,7 @@ void vtkMyCityJSONFeature::ExtractVertices(const Json::Value &vertices, vtkPolyD
}

//----------------------------------------------------------------------------
void vtkMyCityJSONFeature::PrintSelf(ostream &os, vtkIndent indent) {
void vtkCityJSONFeature::PrintSelf(ostream &os, vtkIndent indent) {
Superclass::PrintSelf(os, indent);
os << indent << "vtkCityJSONFeature" << std::endl;
os << indent << "Root: ";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef vtkMyCityJSONFeature_h
#define vtkMyCityJSONFeature_h
#ifndef vtkCityJSONFeature_h
#define vtkCityJSONFeature_h

// VTK Includes
#include "vtkDataObject.h"
Expand All @@ -8,22 +8,22 @@

class vtkPolyData;

class VTKIOCITYJSON_EXPORT vtkMyCityJSONFeature : public vtkDataObject {
class VTKIOCITYJSON_EXPORT vtkCityJSONFeature : public vtkDataObject {
public:
static vtkMyCityJSONFeature *New();
static vtkCityJSONFeature *New();

void PrintSelf(ostream &os, vtkIndent indent) override;

vtkTypeMacro(vtkMyCityJSONFeature, vtkDataObject);
vtkTypeMacro(vtkCityJSONFeature, vtkDataObject);

static void ExtractVertices(const Json::Value &vertices, vtkPolyData *outputData);

vtkPolyData *ConnectTheDots(const Json::Value &cityObject, vtkPolyData *outputData);

protected:
vtkMyCityJSONFeature();
vtkCityJSONFeature();

~vtkMyCityJSONFeature() override;
~vtkCityJSONFeature() override;

/**
* Json::Value featureRoot corresponds to the root of the CityJSON feature
Expand All @@ -32,9 +32,9 @@ vtkTypeMacro(vtkMyCityJSONFeature, vtkDataObject);
Json::Value featureRoot;

private:
vtkMyCityJSONFeature(const vtkMyCityJSONFeature &) = delete;
vtkCityJSONFeature(const vtkCityJSONFeature &) = delete;

void operator=(const vtkMyCityJSONFeature &) = delete;
void operator=(const vtkCityJSONFeature &) = delete;
};

#endif // vtkCityJSONFeature_h
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
// Created by maarten on 11-08-20.
//

#include "vtkMyCityJSONReader.h"
#include "vtkCityJSONReader.h"

// VTK Includes
#include "vtkAbstractArray.h"
#include "vtkBitArray.h"
#include "vtkCellArray.h"
#include "vtkCellData.h"
#include "vtkDoubleArray.h"
#include "vtkMyCityJSONFeature.h"
#include "vtkCityJSONFeature.h"
#include "vtkInformation.h"
#include "vtkInformationVector.h"
#include "vtkIntArray.h"
Expand All @@ -26,10 +26,10 @@
#include <iostream>


vtkStandardNewMacro(vtkMyCityJSONReader);
vtkStandardNewMacro(vtkCityJSONReader);

//----------------------------------------------------------------------------
class vtkMyCityJSONReader::CityJSONReaderInternal {
class vtkCityJSONReader::CityJSONReaderInternal {
public:

// Parse the Json Value corresponding to the root of the CityJSON data from the file
Expand All @@ -42,7 +42,7 @@ class vtkMyCityJSONReader::CityJSONReaderInternal {
};

//----------------------------------------------------------------------------
void vtkMyCityJSONReader::CityJSONReaderInternal::ParseRoot(const Json::Value &root, vtkPolyData *output) {
void vtkCityJSONReader::CityJSONReaderInternal::ParseRoot(const Json::Value &root, vtkPolyData *output) {
// Initialize geometry containers
vtkNew<vtkPoints> points;
points->SetDataTypeToDouble();
Expand All @@ -63,7 +63,7 @@ void vtkMyCityJSONReader::CityJSONReaderInternal::ParseRoot(const Json::Value &r
vtkGenericWarningMacro(<< "ParseRoot: \"type\" is not \"CityJSON\"");
}

vtkNew<vtkMyCityJSONFeature> feature;
vtkNew<vtkCityJSONFeature> feature;

// Parse vertices
Json::Value rootVertices = root["vertices"];
Expand All @@ -87,7 +87,7 @@ void vtkMyCityJSONReader::CityJSONReaderInternal::ParseRoot(const Json::Value &r


//----------------------------------------------------------------------------
int vtkMyCityJSONReader::CityJSONReaderInternal::CanParseFile(const char *filename, Json::Value &root) {
int vtkCityJSONReader::CityJSONReaderInternal::CanParseFile(const char *filename, Json::Value &root) {
if (!filename) {
vtkGenericWarningMacro(<< "Input filename not specified");
return VTK_ERROR;
Expand Down Expand Up @@ -119,21 +119,21 @@ int vtkMyCityJSONReader::CityJSONReaderInternal::CanParseFile(const char *filena
}

//----------------------------------------------------------------------------
vtkMyCityJSONReader::vtkMyCityJSONReader() {
vtkCityJSONReader::vtkCityJSONReader() {
this->FileName = nullptr;
this->SetNumberOfInputPorts(0);
this->SetNumberOfOutputPorts(1);
this->Internal = new CityJSONReaderInternal;
}

//----------------------------------------------------------------------------
vtkMyCityJSONReader::~vtkMyCityJSONReader() {
vtkCityJSONReader::~vtkCityJSONReader() {
delete[] FileName;
delete Internal;
}

//----------------------------------------------------------------------------
int vtkMyCityJSONReader::RequestData(vtkInformation * vtkNotUsed(request), vtkInformationVector ** vtkNotUsed(request), vtkInformationVector *outputVector) {
int vtkCityJSONReader::RequestData(vtkInformation * vtkNotUsed(request), vtkInformationVector ** vtkNotUsed(request), vtkInformationVector *outputVector) {
// Get the info object
vtkInformation *outInfo = outputVector->GetInformationObject(0);

Expand All @@ -157,7 +157,7 @@ int vtkMyCityJSONReader::RequestData(vtkInformation * vtkNotUsed(request), vtkIn
}

//----------------------------------------------------------------------------
void vtkMyCityJSONReader::PrintSelf(ostream &os, vtkIndent indent) {
void vtkCityJSONReader::PrintSelf(ostream &os, vtkIndent indent) {
Superclass::PrintSelf(os, indent);
os << "vtkCityJSONReader" << std::endl;
os << "Filename: " << this->FileName << std::endl;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#ifndef vtkMyCityJSONReader_h
#define vtkMyCityJSONReader_h
#ifndef vtkCityJSONReader_h
#define vtkCityJSONReader_h

#include "vtkIOCityJSONModule.h" // for export macro
#include "vtkPolyDataAlgorithm.h"

class vtkPolyData;

class VTKIOCITYJSON_EXPORT vtkMyCityJSONReader : public vtkPolyDataAlgorithm
class VTKIOCITYJSON_EXPORT vtkCityJSONReader : public vtkPolyDataAlgorithm
{
public:
static vtkMyCityJSONReader* New();
vtkTypeMacro(vtkMyCityJSONReader, vtkPolyDataAlgorithm);
static vtkCityJSONReader* New();
vtkTypeMacro(vtkCityJSONReader, vtkPolyDataAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent) override;

//@{
Expand All @@ -22,8 +22,8 @@ class VTKIOCITYJSON_EXPORT vtkMyCityJSONReader : public vtkPolyDataAlgorithm
//@}

protected:
vtkMyCityJSONReader();
~vtkMyCityJSONReader() override;
vtkCityJSONReader();
~vtkCityJSONReader() override;

int RequestData(vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector) override;

Expand All @@ -33,8 +33,8 @@ class VTKIOCITYJSON_EXPORT vtkMyCityJSONReader : public vtkPolyDataAlgorithm
class CityJSONReaderInternal;
CityJSONReaderInternal* Internal;

vtkMyCityJSONReader(const vtkMyCityJSONReader&) = delete;
void operator=(const vtkMyCityJSONReader&) = delete;
vtkCityJSONReader(const vtkCityJSONReader&) = delete;
void operator=(const vtkCityJSONReader&) = delete;
};

#endif

0 comments on commit 722abf4

Please sign in to comment.