------------------------------------------------------------------------------
| 526 | |
| 527 | //------------------------------------------------------------------------------ |
| 528 | void vtkDataObjectTree::ShallowCopy(vtkDataObject* src) |
| 529 | { |
| 530 | if (src == this) |
| 531 | { |
| 532 | return; |
| 533 | } |
| 534 | |
| 535 | this->Internals->Children.clear(); |
| 536 | this->Superclass::ShallowCopy(src); |
| 537 | |
| 538 | if (auto from = vtkDataObjectTree::SafeDownCast(src)) |
| 539 | { |
| 540 | unsigned int numChildren = from->GetNumberOfChildren(); |
| 541 | this->SetNumberOfChildren(numChildren); |
| 542 | for (unsigned int cc = 0; cc < numChildren; cc++) |
| 543 | { |
| 544 | if (auto child = from->GetChild(cc)) |
| 545 | { |
| 546 | auto clone = child->NewInstance(); |
| 547 | clone->ShallowCopy(child); |
| 548 | this->SetChild(cc, clone); |
| 549 | clone->FastDelete(); |
| 550 | } |
| 551 | if (from->HasChildMetaData(cc)) |
| 552 | { |
| 553 | vtkInformation* toInfo = this->GetChildMetaData(cc); |
| 554 | toInfo->Copy(from->GetChildMetaData(cc), /*deep=*/0); |
| 555 | } |
| 556 | } |
| 557 | } |
| 558 | this->Modified(); |
| 559 | } |
| 560 | |
| 561 | //------------------------------------------------------------------------------ |
| 562 | void vtkDataObjectTree::Initialize() |
nothing calls this directly
no test coverage detected