| 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()); } |