------------------------------------------------------------------------------
| 936 | |
| 937 | //------------------------------------------------------------------------------ |
| 938 | int vtkDataAssembly::GetChildIndex(int parent, int child) const |
| 939 | { |
| 940 | const auto& internals = (*this->Internals); |
| 941 | const auto node = internals.FindNode(parent); |
| 942 | int index = 0; |
| 943 | for (const auto& cnode : node.children()) |
| 944 | { |
| 945 | if (::IsAssemblyNode(cnode)) |
| 946 | { |
| 947 | if (cnode.attribute("id").as_int(-1) == child) |
| 948 | { |
| 949 | return index; |
| 950 | } |
| 951 | ++index; |
| 952 | } |
| 953 | } |
| 954 | return -1; |
| 955 | } |
| 956 | |
| 957 | //------------------------------------------------------------------------------ |
| 958 | int vtkDataAssembly::GetParent(int id) const |
no test coverage detected