|
OpenTTD Source 20261112-master-gbcbec5e63f
|
Iterator to iterate over all tiles belonging to an airport. More...
#include <tilearea_airport.h>
Public Types | |
| using | value_type = TileIndex |
| value_type iterator trait | |
| using | difference_type = std::ptrdiff_t |
| difference_type iterator trait | |
| using | iterator_category = std::forward_iterator_tag |
| iterator_category iterator trait | |
| using | pointer = void |
| pointer iterator trait | |
| using | reference = void |
| reference iterator trait | |
Public Member Functions | |
| AirportTileIterator (const Station *st) | |
| Construct the iterator. | |
| bool | operator== (const AirportTileIterator &other) const |
| Compare with other iterator. | |
| bool | operator== (const std::default_sentinel_t &) const |
| Compare with end sentinel. | |
| TileIndex | operator* () const |
| Get the current tile. | |
| AirportTileIterator & | operator++ () |
| Increment the iterator and set it to the next position. | |
Private Attributes | |
| const Station * | st = nullptr |
| The station the airport is a part of. | |
| OrthogonalTileArea::iterator | iter |
| The underlying tile area iterator. | |
Iterator to iterate over all tiles belonging to an airport.
Definition at line 17 of file tilearea_airport.h.
| using AirportTileIterator::difference_type = std::ptrdiff_t |
difference_type iterator trait
Definition at line 24 of file tilearea_airport.h.
| using AirportTileIterator::iterator_category = std::forward_iterator_tag |
iterator_category iterator trait
Definition at line 25 of file tilearea_airport.h.
| using AirportTileIterator::pointer = void |
pointer iterator trait
Definition at line 26 of file tilearea_airport.h.
| using AirportTileIterator::reference = void |
reference iterator trait
Definition at line 27 of file tilearea_airport.h.
value_type iterator trait
Definition at line 23 of file tilearea_airport.h.
|
inline |
Construct the iterator.
| st | Station the airport is part of. |
Definition at line 33 of file tilearea_airport.h.
References INVALID_TILE, iter, and st.
Referenced by operator++(), and operator==().
|
inline |
Get the current tile.
Definition at line 61 of file tilearea_airport.h.
|
inline |
Increment the iterator and set it to the next position.
Definition at line 70 of file tilearea_airport.h.
References AirportTileIterator(), INVALID_TILE, and st.
|
inline |
Compare with other iterator.
| other | The other iterator to compare with. |
true iff the other iterator matches this value. Definition at line 43 of file tilearea_airport.h.
References AirportTileIterator(), iter, and st.
|
inline |
Compare with end sentinel.
true iff this iterator is at the end. Definition at line 52 of file tilearea_airport.h.
References INVALID_TILE.
|
private |
The underlying tile area iterator.
Definition at line 20 of file tilearea_airport.h.
Referenced by AirportTileIterator(), and operator==().
|
private |
The station the airport is a part of.
Definition at line 19 of file tilearea_airport.h.
Referenced by AirportTileIterator(), operator++(), and operator==().