------------------------------------------------------------------------------
| 627 | |
| 628 | //------------------------------------------------------------------------------ |
| 629 | bool vtkDataAssembly::RemoveNode(int id) |
| 630 | { |
| 631 | if (id == 0) |
| 632 | { |
| 633 | vtkErrorMacro("Cannot remove root node."); |
| 634 | return false; |
| 635 | } |
| 636 | |
| 637 | auto& internals = (*this->Internals); |
| 638 | auto node = internals.FindNode(id); |
| 639 | if (!node) |
| 640 | { |
| 641 | return false; |
| 642 | } |
| 643 | |
| 644 | // cleanup nodemap. |
| 645 | for (auto childid : this->GetChildNodes(id)) |
| 646 | { |
| 647 | internals.NodeMap.erase(childid); |
| 648 | } |
| 649 | internals.NodeMap.erase(id); |
| 650 | node.parent().remove_child(node); |
| 651 | this->Modified(); |
| 652 | return true; |
| 653 | } |
| 654 | |
| 655 | //------------------------------------------------------------------------------ |
| 656 | void vtkDataAssembly::SetNodeName(int id, const char* name) |
nothing calls this directly
no test coverage detected