diff --git a/InSituLib/VtkMeshNodalCoordinatesTemplate-impl.h b/InSituLib/VtkMeshNodalCoordinatesTemplate-impl.h index e68e9279761aa059b61a5a76aba1c21de67a537b..1e2b67ff44b3a6c8cd1cdd1b679c18a743fe739e 100644 --- a/InSituLib/VtkMeshNodalCoordinatesTemplate-impl.h +++ b/InSituLib/VtkMeshNodalCoordinatesTemplate-impl.h @@ -21,6 +21,8 @@ #include <vtkVariant.h> #include <vtkVariantCast.h> +namespace InSituLib { + // Can't use vtkStandardNewMacro with a template. template <class Scalar> VtkMeshNodalCoordinatesTemplate<Scalar> * VtkMeshNodalCoordinatesTemplate<Scalar>::New() @@ -428,3 +430,5 @@ template <class Scalar> vtkIdType VtkMeshNodalCoordinatesTemplate<Scalar> } return -1; } + +} // end namespace diff --git a/InSituLib/VtkMeshNodalCoordinatesTemplate.h b/InSituLib/VtkMeshNodalCoordinatesTemplate.h index b562a6078441c64912e6f405971cd280b1b0305b..1ff9f1b69b5c14e2700142b15fa5ec850c013e0d 100644 --- a/InSituLib/VtkMeshNodalCoordinatesTemplate.h +++ b/InSituLib/VtkMeshNodalCoordinatesTemplate.h @@ -19,6 +19,9 @@ #include <vtkTypeTemplate.h> // For templated vtkObject API #include <vtkObjectFactory.h> // for vtkStandardNewMacro +namespace InSituLib +{ + template <class Scalar> class VtkMeshNodalCoordinatesTemplate: public vtkTypeTemplate<VtkMeshNodalCoordinatesTemplate<Scalar>, @@ -100,6 +103,8 @@ private: double *TempDoubleArray; }; +} // end namespace + #include "VtkMeshNodalCoordinatesTemplate-impl.h" #endif // VTKMESHNODALCOORDINATES_H_ diff --git a/Tests/InSituLib/TestVtkMeshNodalCoordinatesTemplate.cpp b/Tests/InSituLib/TestVtkMeshNodalCoordinatesTemplate.cpp index e6841d5a3961bab5ac545840cfb4a49bc1efcdf2..611aeac333c8080ec4ab1a2faa244dd3f2b1b48e 100644 --- a/Tests/InSituLib/TestVtkMeshNodalCoordinatesTemplate.cpp +++ b/Tests/InSituLib/TestVtkMeshNodalCoordinatesTemplate.cpp @@ -28,7 +28,7 @@ TEST(InSituLibNodalCoordinates, Init) MeshLib::Mesh* mesh = MeshLib::MeshGenerator::generateRegularQuadMesh(length, subdivisions); - vtkNew<VtkMeshNodalCoordinatesTemplate<double> > nodeCoords; + vtkNew<InSituLib::VtkMeshNodalCoordinatesTemplate<double> > nodeCoords; nodeCoords->SetNodes(mesh->getNodes()); //nodeCoords->PrintSelf(std::cout, vtkIndent());