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

Method ShallowCopy

Common/DataModel/vtkFieldData.cxx:522–536  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Copy a field by reference counting the data arrays.

Source from the content-addressed store, hash-verified

520//------------------------------------------------------------------------------
521// Copy a field by reference counting the data arrays.
522void vtkFieldData::ShallowCopy(vtkFieldData* f)
523{
524 this->AllocateArrays(f->GetNumberOfArrays());
525 this->NumberOfActiveArrays = 0;
526
527 for (int i = 0; i < f->GetNumberOfArrays(); ++i)
528 {
529 this->NumberOfActiveArrays++;
530 this->SetArray(i, f->GetAbstractArray(i));
531 }
532
533 this->SetGhostsToSkip(f->GetGhostsToSkip());
534
535 this->CopyFlags(f);
536}
537
538//------------------------------------------------------------------------------
539// Squeezes each data array in the field (Squeeze() reclaims unused memory.)

Callers

nothing calls this directly

Calls 6

AllocateArraysMethod · 0.95
SetArrayMethod · 0.95
SetGhostsToSkipMethod · 0.95
CopyFlagsMethod · 0.95
GetAbstractArrayMethod · 0.80
GetNumberOfArraysMethod · 0.45

Tested by

no test coverage detected