MCPcopy Create free account
hub / github.com/Kitware/VTK / RegisterType

Function RegisterType

Common/DataModel/vtkCellMetadata.h:62–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60 */
61 template <typename Subclass>
62 static bool RegisterType()
63 {
64 vtkStringToken name = vtk::TypeName<Subclass>();
65 auto status = vtkCellMetadata::Constructors().insert(std::make_pair(name,
66 [](vtkCellGrid* grid)
67 {
68 auto result = vtkSmartPointer<Subclass>::New();
69 if (result)
70 {
71 result->SetCellGrid(grid);
72 }
73 return result;
74 }));
75 return status.second; // true if insertion occurred.
76 }
77
78 template <typename Subclass>
79 static vtkSmartPointer<Subclass> NewInstance(vtkCellGrid* grid = nullptr)

Callers

nothing calls this directly

Calls 3

SetCellGridMethod · 0.80
NewFunction · 0.50
insertMethod · 0.45

Tested by

no test coverage detected