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

Class RowIterator

include/tabulate/table.hpp:123–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121 std::pair<size_t, size_t> shape() { return table_->shape(); }
122
123 class RowIterator {
124 public:
125 explicit RowIterator(std::vector<std::shared_ptr<Row>>::iterator ptr) : ptr(ptr) {}
126
127 RowIterator operator++() {
128 ++ptr;
129 return *this;
130 }
131 bool operator!=(const RowIterator &other) const { return ptr != other.ptr; }
132 Row &operator*() { return **ptr; }
133
134 private:
135 std::vector<std::shared_ptr<Row>>::iterator ptr;
136 };
137
138 auto begin() -> RowIterator { return RowIterator(table_->rows_.begin()); }
139 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