| 118 | } |
| 119 | |
| 120 | int Structure::getAlternative(NodeID nid) const |
| 121 | { |
| 122 | auto parent_nid = getParent(nid); |
| 123 | |
| 124 | if (parent_nid == NodeID::NoNode) |
| 125 | return -1; |
| 126 | |
| 127 | for (auto i = 0; i < childrenCount(parent_nid); ++i) |
| 128 | { |
| 129 | if (getChild(parent_nid, i) == nid) |
| 130 | { |
| 131 | return i; |
| 132 | } |
| 133 | } |
| 134 | throw; |
| 135 | return -1; |
| 136 | } |
| 137 | |
| 138 | int Structure::nodeCount() const |
| 139 | { |
no outgoing calls
no test coverage detected