AIStationList_Cargo Class Reference

Creates a list of stations associated with cargo at a station. More...

Inheritance diagram for AIStationList_Cargo:

AIList AIStationList_CargoPlanned AIStationList_CargoWaiting AIStationList_CargoPlannedByFrom AIStationList_CargoPlannedByVia AIStationList_CargoPlannedFromByVia AIStationList_CargoPlannedViaByFrom AIStationList_CargoWaitingByFrom AIStationList_CargoWaitingByVia AIStationList_CargoWaitingFromByVia AIStationList_CargoWaitingViaByFrom

Public Types

enum  CargoSelector {
  CS_BY_FROM,
  CS_VIA_BY_FROM,
  CS_BY_VIA,
  CS_FROM_BY_VIA
}
 Criteria of selecting and grouping cargo at a station. More...
enum  CargoMode {
  CM_WAITING,
  CM_PLANNED
}
 Ways of associating cargo to stations. More...

Public Member Functions

 AIStationList_Cargo (AIStationList_Cargo::CargoMode mode, AIStationList_Cargo::CargoSelector selector, StationID station_id, CargoID cargo, StationID other_station)
 Creates a list of stations associated with cargo in the specified way, selected and grouped by the chosen criteria.

Detailed Description

Creates a list of stations associated with cargo at a station.

This is very generic. Use the subclasses for all practical purposes.


Member Enumeration Documentation

Criteria of selecting and grouping cargo at a station.

Enumerator:
CS_BY_FROM  Group by origin station.
CS_VIA_BY_FROM  Select by next hop and group by origin station.
CS_BY_VIA  Group by next hop.
CS_FROM_BY_VIA  Select by origin station and group by next hop.

Ways of associating cargo to stations.

Enumerator:
CM_WAITING  Waiting cargo.
CM_PLANNED  Planned cargo.


Constructor & Destructor Documentation

AIStationList_Cargo::AIStationList_Cargo ( AIStationList_Cargo::CargoMode  mode,
AIStationList_Cargo::CargoSelector  selector,
StationID  station_id,
CargoID  cargo,
StationID  other_station 
)

Creates a list of stations associated with cargo in the specified way, selected and grouped by the chosen criteria.

Parameters:
mode Mode of association, either waiting cargo or planned cargo.
selector Mode of grouping and selecting to be applied.
station_id Station to be queried.
cargo Cargo type to query for.
other_station Other station to restrict the query with.


Generated on Thu Jun 30 21:53:52 2016 for OpenTTD NoAI API by  doxygen 1.5.6