Completes the graph starting from @a _function and @returns the node ID.
| 78 | /// Completes the graph starting from @a _function and |
| 79 | /// @returns the node ID. |
| 80 | int visit(OverrideProxy const& _function) |
| 81 | { |
| 82 | auto it = nodes.find(_function); |
| 83 | if (it != nodes.end()) |
| 84 | return it->second; |
| 85 | int currentNode = static_cast<int>(numNodes++); |
| 86 | nodes[_function] = currentNode; |
| 87 | nodeInv[currentNode] = _function; |
| 88 | |
| 89 | if (!_function.baseFunctions().empty()) |
| 90 | for (auto const& baseFunction: _function.baseFunctions()) |
| 91 | addEdge(currentNode, visit(baseFunction)); |
| 92 | else |
| 93 | addEdge(currentNode, 1); |
| 94 | |
| 95 | return currentNode; |
| 96 | } |
| 97 | }; |
| 98 | |
| 99 | /** |
nothing calls this directly
no test coverage detected