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

Class CSVRunner

libs/coding/csv_reader.hpp:96–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94};
95
96class CSVRunner
97{
98public:
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();
124 Iterator end();
125
126private:
127 CSVReader m_reader;
128};
129} // namespace coding

Callers 6

FillTableFunction · 0.85
MappingFromCsvFunction · 0.85
LoadHierachyFunction · 0.85
LoadPopularPlacesFunction · 0.85
UNIT_TESTFunction · 0.85
SubtypesMethod · 0.85

Calls

no outgoing calls

Tested by 1

UNIT_TESTFunction · 0.68