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

Method ShallowCopy

Common/DataModel/vtkExplicitStructuredGrid.cxx:402–428  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

400
401//------------------------------------------------------------------------------
402void vtkExplicitStructuredGrid::ShallowCopy(vtkDataObject* dataObject)
403{
404 vtkExplicitStructuredGrid* grid = vtkExplicitStructuredGrid::SafeDownCast(dataObject);
405 if (this == grid)
406 {
407 return;
408 }
409
410 this->Superclass::ShallowCopy(dataObject);
411 if (grid)
412 {
413 this->InternalCopy(grid);
414
415 this->SetCells(grid->GetCells());
416
417 if (grid->Links)
418 {
419 this->Links = vtkSmartPointer<vtkAbstractCellLinks>::Take(grid->Links->NewInstance());
420 this->Links->SetDataSet(this);
421 this->Links->ShallowCopy(grid->Links);
422 }
423 else
424 {
425 this->Links = nullptr;
426 }
427 }
428}
429
430//------------------------------------------------------------------------------
431void vtkExplicitStructuredGrid::DeepCopy(vtkDataObject* dataObject)

Callers 1

CropMethod · 0.95

Calls 6

InternalCopyMethod · 0.95
TakeFunction · 0.85
SetCellsMethod · 0.45
GetCellsMethod · 0.45
NewInstanceMethod · 0.45
SetDataSetMethod · 0.45

Tested by

no test coverage detected