Base classes/functions for stations. More...
#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 "moving_average.h"
#include <map>
#include <set>
Go to the source code of this file.
Data Structures | |
class | LinkStat |
Link statistics. More... | |
class | FlowStat |
Flow statistics telling how much flow should be and was sent along a link. More... | |
struct | FlowStat::Comparator |
Comparator for two flow stats for ordering them in a way that makes the next flow stat to sent cargo for show up as first element. More... | |
struct | GoodsEntry |
Stores station stats for a single cargo. More... | |
struct | Airport |
All airport-related information. More... | |
struct | Station |
Station data structure. More... | |
Defines | |
#define | FOR_ALL_STATIONS(var) FOR_ALL_BASE_STATIONS_OF_TYPE(Station, var) |
Typedefs | |
typedef Pool< BaseStation, StationID, 32, 64000 > | StationPool |
typedef std::set< FlowStat, FlowStat::Comparator > | FlowStatSet |
Percentage of flow to be sent via specified station (or consumed locally). | |
typedef std::map< StationID, LinkStat > | LinkStatMap |
typedef std::map< StationID, FlowStatSet > | FlowStatMap |
Flow descriptions by origin stations. | |
typedef SmallVector< Industry *, 2 > | IndustryVector |
Functions | |
uint | GetMovingAverageLength (const Station *from, const Station *to) |
Get the length of a moving average for a link between two stations. | |
Variables | |
StationPool | _station_pool |
The pool of stations. | |
static const byte | INITIAL_STATION_RATING = 175 |
Base classes/functions for stations.
Definition in file station_base.h.
Get the length of a moving average for a link between two stations.
from | Source station. | |
to | Destination station. |
Definition at line 3321 of file station_cmd.cpp.
References DistanceManhattan(), LinkStat::MIN_AVERAGE_LENGTH, and BaseStation::xy.
Referenced by Node::ExportNewFlows(), and IncreaseStats().
The pool of stations.