|
OpenTTD Source 20261112-master-gbcbec5e63f
|
Iterator to iterate over all tiles belonging to an airport spec. More...
#include <tilearea_airportlayout.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 | |
| AirportTileTableIterator (std::span< const AirportTileTable > att, TileIndex base_tile, bool include_special) | |
| Construct the iterator. | |
| bool | operator== (const AirportTileTableIterator &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. | |
| AirportTileTableIterator & | operator++ () |
| Increment the iterator and set it to the next position. | |
| AirportGfx | GetAirportGfx () const |
| Get the AirportGfx for the current tile. | |
Private Attributes | |
| std::span< const AirportTileTable > | att |
| The offsets. | |
| std::span< constAirportTileTable >::iterator | iter |
| Underlying tile area. | |
| TileIndex | base_tile |
| The tile we base the offsets off. | |
| TileIndex | tile |
| The current file. | |
| bool | include_special |
| Include special tiles. | |
Iterator to iterate over all tiles belonging to an airport spec.
Definition at line 16 of file tilearea_airportlayout.h.
| using AirportTileTableIterator::difference_type = std::ptrdiff_t |
difference_type iterator trait
Definition at line 26 of file tilearea_airportlayout.h.
| using AirportTileTableIterator::iterator_category = std::forward_iterator_tag |
iterator_category iterator trait
Definition at line 27 of file tilearea_airportlayout.h.
| using AirportTileTableIterator::pointer = void |
pointer iterator trait
Definition at line 28 of file tilearea_airportlayout.h.
| using AirportTileTableIterator::reference = void |
reference iterator trait
Definition at line 29 of file tilearea_airportlayout.h.
value_type iterator trait
Definition at line 25 of file tilearea_airportlayout.h.
|
inline |
Construct the iterator.
| att | The TileTable we want to iterate over. |
| base_tile | The basetile for all offsets. |
| include_special | Include special clearance check tiles when iterating the layout. |
Definition at line 37 of file tilearea_airportlayout.h.
References att, base_tile, include_special, iter, tile, and ToTileIndexDiff().
Referenced by operator++(), and operator==().
|
inline |
Get the AirportGfx for the current tile.
Definition at line 88 of file tilearea_airportlayout.h.
Referenced by CheckFlatLandAirport(), and operator++().
|
inline |
Get the current tile.
Definition at line 62 of file tilearea_airportlayout.h.
|
inline |
Increment the iterator and set it to the next position.
Definition at line 71 of file tilearea_airportlayout.h.
References AIRPORTGFX_CLEARTILE_SPECIALCHECK, AirportTileTableIterator(), att, GetAirportGfx(), INVALID_TILE, and ToTileIndexDiff().
|
inline |
Compare with other iterator.
| other | The other iterator to compare with. |
true iff the other iterator matches this value. Definition at line 44 of file tilearea_airportlayout.h.
References AirportTileTableIterator(), base_tile, and tile.
|
inline |
Compare with end sentinel.
true iff this iterator is at the end. Definition at line 53 of file tilearea_airportlayout.h.
References INVALID_TILE.
|
private |
The offsets.
Definition at line 18 of file tilearea_airportlayout.h.
Referenced by AirportTileTableIterator(), and operator++().
|
private |
The tile we base the offsets off.
Definition at line 20 of file tilearea_airportlayout.h.
Referenced by AirportTileTableIterator(), and operator==().
|
private |
Include special tiles.
Definition at line 22 of file tilearea_airportlayout.h.
Referenced by AirportTileTableIterator().
|
private |
Underlying tile area.
Definition at line 19 of file tilearea_airportlayout.h.
Referenced by AirportTileTableIterator().
|
private |
The current file.
Definition at line 21 of file tilearea_airportlayout.h.
Referenced by AirportTileTableIterator(), and operator==().