@brief Write the given graph to the provided ostream.
| 18 | |
| 19 | //! @brief Write the given graph to the provided ostream. |
| 20 | virtual void write(const generative::noding::GeometryGraph& graph) |
| 21 | { |
| 22 | const auto& nodes = graph.get_nodes(); |
| 23 | this->start_nodes(); |
| 24 | for (const auto& node : nodes) |
| 25 | { |
| 26 | this->handle_node(node); |
| 27 | } |
| 28 | this->end_nodes(); |
| 29 | |
| 30 | this->start_edges(); |
| 31 | const auto edges = graph.get_edge_pairs(); |
| 32 | for (const auto& edge : edges) |
| 33 | { |
| 34 | this->handle_edge(edge.first, edge.second); |
| 35 | } |
| 36 | this->end_edges(); |
| 37 | } |
| 38 | |
| 39 | protected: |
| 40 | virtual void start_nodes() {} |
no test coverage detected