| 12 | |
| 13 | namespace generative::io { |
| 14 | WKTStreamReader::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 | |
| 34 | WKTStreamReader::GeometryIterator& WKTStreamReader::GeometryIterator::operator++() |
| 35 | { |
nothing calls this directly
no outgoing calls
no test coverage detected