MCPcopy Create free account
hub / github.com/p-ranav/tabulate / RowIterator

Class RowIterator

include/tabulate/table.hpp:287–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285 }
286
287 class RowIterator {
288 public:
289 explicit RowIterator(std::vector<std::shared_ptr<Row>>::iterator ptr) : ptr(ptr) {}
290
291 RowIterator operator++() {
292 ++ptr;
293 return *this;
294 }
295 bool operator!=(const RowIterator &other) const { return ptr != other.ptr; }
296 Row &operator*() { return **ptr; }
297
298 private:
299 std::vector<std::shared_ptr<Row>>::iterator ptr;
300 };
301
302 auto begin() -> RowIterator { return RowIterator(table_->rows_.begin()); }
303 auto end() -> RowIterator { return RowIterator(table_->rows_.end()); }

Callers 2

beginMethod · 0.70
endMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected