MCPcopy Create free account
hub / github.com/comaps/comaps / ProcessOsmElementsFromO5M

Function ProcessOsmElementsFromO5M

generator/osm_source.cpp:110–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110void ProcessOsmElementsFromO5M(SourceReader & stream, std::function<void(OsmElement &&)> const & processor)
111{
112 ProcessorOsmElementsFromO5M processorOsmElementsFromO5M(stream);
113 OsmElement element;
114 while (processorOsmElementsFromO5M.TryRead(element))
115 {
116 processor(std::move(element));
117 // It is safe to use `element` here as `Clear` will restore the state after the move.
118 element.Clear();
119 }
120}
121
122ProcessorOsmElementsFromO5M::ProcessorOsmElementsFromO5M(SourceReader & stream)
123 : m_stream(stream)

Callers 3

GenerateIntermediateDataFunction · 0.85
UNIT_TESTFunction · 0.85
GetRoadsFromOsmFunction · 0.85

Calls 2

TryReadMethod · 0.80
ClearMethod · 0.45

Tested by 1

UNIT_TESTFunction · 0.68