OpenTTD Source: src/station_base.h File Reference

OpenTTD Source 13.1

Data Structures | Typedefs | Functions | Variables
station_base.h File Reference
`#include "core/random_func.hpp"`
`#include "base_station_base.h"`
`#include "newgrf_airport.h"`
`#include "cargopacket.h"`
`#include "industry_type.h"`
`#include "linkgraph/linkgraph_type.h"`
`#include "newgrf_storage.h"`
`#include "bitmap_type.h"`
`#include <map>`
`#include <set>`

Go to the source code of this file.

## Data Structures
class | FlowStat
| Flow statistics telling how much flow should be sent along a link. More...
class | FlowStatMap
| Flow descriptions by origin stations. More...
struct | GoodsEntry
| Stores station stats for a single cargo. More...
struct | Airport
| All airport-related information. More...
struct | IndustryListEntry
struct | IndustryCompare
struct | Station
| Station data structure. More...
class | AirportTileIterator
| Iterator to iterate over all tiles belonging to an airport. More...

## Typedefs
typedef std::set< IndustryListEntry, IndustryCompare > | IndustryList

## Functions
void | RebuildStationKdtree ()
template<typename Func >
void | ForAllStationsAroundTiles (const TileArea &ta, Func func)
| Call a function on all stations that have any part of the requested area within their catchment. More...

## Variables
static const byte | INITIAL_STATION_RATING = 175

## Detailed Description

Base classes/functions for stations.

Definition in file station_base.h.

## Function Documentation

## ◆ ForAllStationsAroundTiles()

template<typename Func >

void ForAllStationsAroundTiles | ( | const TileArea & | ta,
|  | Func | func
| ) |  |

Call a function on all stations that have any part of the requested area within their catchment.

Template Parameters

  Func | The type of funcion to call

Parameters

  area | The TileArea to check
  func | The function to call, must take two parameters: Station* and TileIndex and return true if coverage of that tile is acceptable for a given station or false if search should continue

Definition at line 574 of file station_base.h.

References _settings_game, CA_UNMODIFIED, OrthogonalTileArea::Expand(), SpecializedStation< Station, false >::GetIfValid(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_station_pool >::GetNumItems(), GetStationIndex(), Station::industry, IsTileType(), MAX_CATCHMENT, StationSettings::modified_catchment, MP_STATION, StationSettings::serve_neutral_industries, and GameSettings::station.

Referenced by PopulateStationsNearby().