StationFinder Class Reference

Structure contains cached list of stations nearby. More...

#include <station_type.h>

Inheritance diagram for StationFinder:
TileArea

Public Member Functions

 StationFinder (const TileArea &area)
 Constructs StationFinder.
const StationListGetStations ()
 Run a tile loop to find stations around a tile, on demand.

Private Attributes

StationList stations
 List of stations nearby.

Detailed Description

Structure contains cached list of stations nearby.

The list is created upon first call to GetStations()

Definition at line 101 of file station_type.h.


Constructor & Destructor Documentation

StationFinder::StationFinder ( const TileArea area  )  [inline]

Constructs StationFinder.

Parameters:
area the area to search from

Definition at line 108 of file station_type.h.


Member Function Documentation

const StationList * StationFinder::GetStations (  ) 

Run a tile loop to find stations around a tile, on demand.

Cache the result for further requests

Returns:
pointer to a StationList containing all stations found

Definition at line 3047 of file station_cmd.cpp.

References FindStationsAroundTiles(), INVALID_TILE, and stations.

Referenced by TileLoop_Town().


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

Generated on Sat Jun 19 17:15:48 2010 for OpenTTD by  doxygen 1.6.1