MCPcopy Create free account
hub / github.com/Notgnoshi/generative / write

Method write

generative/include/generative/io/graph-writer.h:20–37  ·  view source on GitHub ↗

@brief Write the given graph to the provided ostream.

Source from the content-addressed store, hash-verified

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
39protected:
40 virtual void start_nodes() {}

Callers 5

wkt.cppFile · 0.45
_serialize_wktFunction · 0.45
_serialize_wkbFunction · 0.45
serialize_flatFunction · 0.45
wktMethod · 0.45

Calls 7

start_nodesMethod · 0.95
end_nodesMethod · 0.95
start_edgesMethod · 0.95
end_edgesMethod · 0.95
handle_nodeMethod · 0.80
get_edge_pairsMethod · 0.80
handle_edgeMethod · 0.80

Tested by

no test coverage detected