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

Class Iterator

libs/coding/csv_reader.hpp:101–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99 explicit CSVRunner(CSVReader && reader);
100
101 class Iterator
102 {
103 public:
104 using iterator_category = std::input_iterator_tag;
105 using value_type = CSVReader::Row;
106
107 explicit Iterator(CSVReader & reader, bool isEnd = false);
108 Iterator(Iterator const & other);
109 Iterator & operator++();
110 Iterator operator++(int);
111 // Checks whether both this and other are equal. Two CSVReader iterators are equal if both of
112 // them are end-of-file iterators or not and both of them refer to the same CSVReader.
113 bool operator==(Iterator const & other) const;
114 bool operator!=(Iterator const & other) const;
115 CSVReader::Row & operator*();
116
117 private:
118 CSVReader & m_reader;
119 std::optional<CSVReader::Row> m_current;
120 };
121
122 // Warning: It reads first line.
123 Iterator begin();

Callers 2

beginMethod · 0.70
endMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected