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

Method ShallowCopy

Testing/GenericBridge/vtkBridgeAttribute.cxx:388–399  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Description: Update `this' using fields of `other'. \pre other_exists: other!=0 \pre not_self: other!=this

Source from the content-addressed store, hash-verified

386// \pre other_exists: other!=0
387// \pre not_self: other!=this
388void vtkBridgeAttribute::ShallowCopy(vtkGenericAttribute* other)
389{
390 assert("pre: other_exists" && other != nullptr);
391 assert("pre: not_self" && other != this);
392 vtkBridgeAttribute* o = static_cast<vtkBridgeAttribute*>(other);
393
394 vtkSetObjectBodyMacro(Pd, vtkPointData, o->Pd);
395 vtkSetObjectBodyMacro(Cd, vtkCellData, o->Cd);
396 this->Data = o->Data;
397 this->AttributeNumber = o->AttributeNumber;
398 this->AllocateInternalTuple(this->GetNumberOfComponents());
399}
400
401//------------------------------------------------------------------------------
402// Description:

Callers 7

CopyShallowIfPossibleMethod · 0.45
RegressionTestMethod · 0.45
TestCoordsFunction · 0.45
TestDataSetFailuresFunction · 0.45

Calls 3

AllocateInternalTupleMethod · 0.95
GetNumberOfComponentsMethod · 0.95
assertFunction · 0.50

Tested by 6

RegressionTestMethod · 0.36
TestCoordsFunction · 0.36
TestDataSetFailuresFunction · 0.36