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