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

Function AddCellMetadata

Common/DataModel/vtkCellGrid.h:174–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172 */
173 template <typename CellType>
174 CellType* AddCellMetadata()
175 {
176 CellType* result = this->GetCellsOfType<CellType>();
177 if (result)
178 {
179 return result;
180 }
181 auto metadata = vtkSmartPointer<CellType>::New();
182 if (metadata->SetCellGrid(this))
183 {
184 auto ok = this->Cells.insert(
185 std::make_pair(vtkStringToken(vtk::TypeName<CellType>()).GetId(), metadata));
186 if (ok.second)
187 {
188 result = dynamic_cast<CellType*>(ok.first->second.GetPointer());
189 }
190 }
191 return result;
192 }
193
194 vtkCellMetadata* AddCellMetadata(vtkCellMetadata* cellType);
195

Callers

nothing calls this directly

Calls 6

SetCellGridMethod · 0.80
NewFunction · 0.50
vtkStringTokenFunction · 0.50
insertMethod · 0.45
GetIdMethod · 0.45
GetPointerMethod · 0.45

Tested by

no test coverage detected