| 1105 | : position_(0), flights_(std::move(flights)) {} |
| 1106 | |
| 1107 | arrow::Result<std::unique_ptr<FlightInfo>> SimpleFlightListing::Next() { |
| 1108 | if (position_ >= static_cast<int>(flights_.size())) { |
| 1109 | return nullptr; |
| 1110 | } |
| 1111 | return std::make_unique<FlightInfo>(std::move(flights_[position_++])); |
| 1112 | } |
| 1113 | |
| 1114 | SimpleResultStream::SimpleResultStream(std::vector<Result>&& results) |
| 1115 | : results_(std::move(results)), position_(0) {} |