OpenTTD Source: TileIterator Class Reference

OpenTTD Source 1.11.0-RC1

Public Member Functions | Protected Member Functions | Protected Attributes
TileIterator Class Referenceabstract

Base class for tile iterators. More...

`#include <tilearea_type.h>`

Inheritance diagram for TileIterator:

## Public Member Functions
virtual | ~TileIterator ()
| Some compilers really like this.
| operator TileIndex () const
| Get the tile we are currently at. More...
virtual TileIterator & | operator++ ()=0
| Move ourselves to the next tile in the rectangle on the map.
virtual TileIterator * | Clone () const =0
| Allocate a new iterator that is a copy of this one.

## Protected Member Functions
| TileIterator (TileIndex tile=INVALID_TILE)
| Initialise the iterator starting at this tile. More...

## Protected Attributes
TileIndex | tile
| The current tile we are at.

## Detailed Description

Base class for tile iterators.

Definition at line 99 of file tilearea_type.h.

## Constructor & Destructor Documentation

## ◆ TileIterator()

TileIterator::TileIterator | ( | TileIndex | tile = `INVALID_TILE` | ) |
| inlineprotected

Initialise the iterator starting at this tile.

Parameters

  tile | The tile we start iterating from.

Definition at line 107 of file tilearea_type.h.

## Member Function Documentation

## ◆ operator TileIndex()

TileIterator::operator TileIndex | ( |  | ) | const
| inline

Get the tile we are currently at.

Returns
  The tile we are at, or INVALID_TILE when we're done.

Definition at line 121 of file tilearea_type.h.

References tile.

The documentation for this class was generated from the following file:

- src/tilearea_type.h