| 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 |
nothing calls this directly
no test coverage detected