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

Method GeometryIterator

generative/io/wkt-stream-reader.cpp:14–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12
13namespace generative::io {
14WKTStreamReader::GeometryIterator::GeometryIterator(std::istream& input_stream,
15 const geos::geom::GeometryFactory& factory,
16 bool is_done) :
17 m_is_at_end(is_done),
18 m_is_past_end(is_done),
19 m_input_stream(input_stream),
20 m_wkt_reader(factory)
21{
22 // Need to prime the pump, so to speak.
23 if (!m_is_past_end)
24 {
25 this->operator++();
26 }
27 // We consumed the entire istream, but failed to create a valid geometry.
28 if (m_is_at_end && !m_current_value)
29 {
30 m_is_past_end = true;
31 }
32}
33
34WKTStreamReader::GeometryIterator& WKTStreamReader::GeometryIterator::operator++()
35{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected