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

Method ShallowCopy

Common/DataModel/vtkCellGrid.cxx:93–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93void vtkCellGrid::ShallowCopy(vtkDataObject* baseSrc)
94{
95 auto* src = vtkCellGrid::SafeDownCast(baseSrc);
96 if (!src)
97 {
98 vtkErrorMacro("Cannot shallow-copy a null object or object of a different type.");
99 return;
100 }
101
102 this->Initialize();
103 vtkNew<vtkCellGridCopyQuery> copier;
104 copier->SetSource(src);
105 copier->SetTarget(this);
106 copier->CopyOnlyShapeOff();
107 copier->AddAllSourceCellAttributeIds();
108 copier->CopyCellsOn();
109 copier->CopyArraysOn();
110 copier->CopyArrayValuesOn();
111 copier->DeepCopyArraysOff();
112 if (!src->Query(copier))
113 {
114 vtkErrorMacro("Failed to copy the source " << src);
115 }
116}
117
118void vtkCellGrid::DeepCopy(vtkDataObject* baseSrc)
119{

Callers

nothing calls this directly

Calls 5

InitializeMethod · 0.95
SetSourceMethod · 0.45
SetTargetMethod · 0.45
QueryMethod · 0.45

Tested by

no test coverage detected