------------------------------------------------------------------------------
| 451 | |
| 452 | //------------------------------------------------------------------------------ |
| 453 | void vtkDataObjectTree::CompositeShallowCopy(vtkCompositeDataSet* src) |
| 454 | { |
| 455 | if (src == this) |
| 456 | { |
| 457 | return; |
| 458 | } |
| 459 | |
| 460 | this->Internals->Children.clear(); |
| 461 | this->Superclass::CompositeShallowCopy(src); |
| 462 | |
| 463 | if (auto from = vtkDataObjectTree::SafeDownCast(src)) |
| 464 | { |
| 465 | unsigned int numChildren = from->GetNumberOfChildren(); |
| 466 | this->SetNumberOfChildren(numChildren); |
| 467 | for (unsigned int cc = 0; cc < numChildren; cc++) |
| 468 | { |
| 469 | if (auto child = from->GetChild(cc)) |
| 470 | { |
| 471 | if (auto childTree = vtkDataObjectTree::SafeDownCast(child)) |
| 472 | { |
| 473 | vtkDataObjectTree* clone = childTree->NewInstance(); |
| 474 | clone->CompositeShallowCopy(childTree); |
| 475 | this->SetChild(cc, clone); |
| 476 | clone->FastDelete(); |
| 477 | } |
| 478 | else |
| 479 | { |
| 480 | this->SetChild(cc, child); |
| 481 | } |
| 482 | } |
| 483 | if (from->HasChildMetaData(cc)) |
| 484 | { |
| 485 | vtkInformation* toInfo = this->GetChildMetaData(cc); |
| 486 | toInfo->Copy(from->GetChildMetaData(cc), 0); |
| 487 | } |
| 488 | } |
| 489 | } |
| 490 | this->Modified(); |
| 491 | } |
| 492 | |
| 493 | //------------------------------------------------------------------------------ |
| 494 | void vtkDataObjectTree::DeepCopy(vtkDataObject* src) |
nothing calls this directly
no test coverage detected