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

Method DeepCopy

Common/DataModel/vtkExplicitStructuredGrid.cxx:431–462  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

429
430//------------------------------------------------------------------------------
431void vtkExplicitStructuredGrid::DeepCopy(vtkDataObject* dataObject)
432{
433 auto mkhold = vtkMemkindRAII(this->GetIsInMemkind());
434
435 vtkExplicitStructuredGrid* grid = vtkExplicitStructuredGrid::SafeDownCast(dataObject);
436 this->Superclass::DeepCopy(dataObject);
437
438 if (grid)
439 {
440 this->InternalCopy(grid);
441
442 if (grid->Cells)
443 {
444 this->Cells = vtkSmartPointer<vtkCellArray>::New();
445 this->Cells->DeepCopy(grid->Cells);
446 }
447 else
448 {
449 this->Cells = nullptr;
450 }
451 if (grid->Links)
452 {
453 this->Links = vtkSmartPointer<vtkAbstractCellLinks>::Take(grid->Links->NewInstance());
454 this->Links->SetDataSet(this);
455 this->Links->DeepCopy(grid->Links);
456 }
457 else
458 {
459 this->Links = nullptr;
460 }
461 }
462}
463
464//------------------------------------------------------------------------------
465void vtkExplicitStructuredGrid::SetDimensions(int i, int j, int k)

Callers

nothing calls this directly

Calls 7

InternalCopyMethod · 0.95
vtkMemkindRAIIFunction · 0.85
TakeFunction · 0.85
GetIsInMemkindMethod · 0.80
NewFunction · 0.50
NewInstanceMethod · 0.45
SetDataSetMethod · 0.45

Tested by

no test coverage detected