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

Method ShallowCopy

Common/Core/vtkInformationObjectBaseVectorKey.cxx:267–283  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

265
266//------------------------------------------------------------------------------
267void vtkInformationObjectBaseVectorKey::ShallowCopy(vtkInformation* source, vtkInformation* dest)
268{
269 vtkInformationObjectBaseVectorValue* sourceBase =
270 static_cast<vtkInformationObjectBaseVectorValue*>(this->GetAsObjectBase(source));
271
272 if (sourceBase == nullptr)
273 {
274 this->SetAsObjectBase(dest, nullptr);
275 return;
276 }
277
278 int sourceSize = static_cast<int>(sourceBase->GetVector().size());
279 vtkInformationObjectBaseVectorValue* destBase = this->GetObjectBaseVector(dest);
280
281 destBase->GetVector().resize(sourceSize);
282 destBase->GetVector() = sourceBase->GetVector();
283}
284
285//------------------------------------------------------------------------------
286void vtkInformationObjectBaseVectorKey::Print(ostream& os, vtkInformation* info)

Callers

nothing calls this directly

Calls 5

GetObjectBaseVectorMethod · 0.95
GetAsObjectBaseMethod · 0.45
SetAsObjectBaseMethod · 0.45
sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected