# station_type.h File Reference

Types related to stations. More...

`#include "core/enum_type.hpp"`
`#include "core/smallvec_type.hpp"`
`#include "tilearea_type.h"`

Go to the source code of this file.

## Data Structures
class | StationFinder
| Structure contains cached list of stations nearby. More...
## Typedefs
typedef uint16 | StationID
typedef uint16 | RoadStopID
typedef SimpleTinyEnumT < StationFacility, byte > | StationFacilityByte
typedef SimpleTinyEnumT < StationHadVehicleOfType, byte > | StationHadVehicleOfTypeByte
typedef SmallVector< Station *, 2 > | StationList
| List of stations.
## Enumerations
enum | StationType { STATION_RAIL, STATION_AIRPORT, STATION_TRUCK, STATION_BUS, STATION_OILRIG, STATION_DOCK, STATION_BUOY, STATION_WAYPOINT }
| Station types.
enum | RoadStopType { ROADSTOP_BUS, ROADSTOP_TRUCK }
| Types of RoadStops. More...
enum | StationFacility { FACIL_NONE = 0, FACIL_TRAIN = 1 << 0, FACIL_TRUCK_STOP = 1 << 1, FACIL_BUS_STOP = 1 << 2, FACIL_AIRPORT = 1 << 3, FACIL_DOCK = 1 << 4, FACIL_WAYPOINT = 1 << 7 }
| The facilities a station might be having. More...
enum | StationHadVehicleOfType { HVOT_NONE = 0, HVOT_TRAIN = 1 << 1, HVOT_BUS = 1 << 2, HVOT_TRUCK = 1 << 3, HVOT_AIRCRAFT = 1 << 4, HVOT_SHIP = 1 << 5, HVOT_WAYPOINT = 1 << 6 }
| The vehicles that may have visited a station. More...
enum | CatchmentArea { CA_NONE = 0, CA_BUS = 3, CA_TRUCK = 3, CA_TRAIN = 4, CA_DOCK = 5, CA_UNMODIFIED = 4, MAX_CATCHMENT = 10 }
| The different catchment areas used. More...
enum | { MAX_LENGTH_STATION_NAME_BYTES = 31, MAX_LENGTH_STATION_NAME_PIXELS = 180 }
## Functions
| DECLARE_ENUM_AS_BIT_SET (StationFacility)
| DECLARE_ENUM_AS_BIT_SET (StationHadVehicleOfType)
## Variables
static const StationID | NEW_STATION = 0xFFFE
static const StationID | INVALID_STATION = 0xFFFF

## Detailed Description

Types related to stations.

Definition in file station_type.h.

## Enumeration Type Documentation

anonymous enum

Enumerator:

  MAX_LENGTH_STATION_NAME_BYTES | The maximum length of a station name in bytes including ''.
  MAX_LENGTH_STATION_NAME_PIXELS | The maximum length of a station name in pixels.

Definition at line 89 of file station_type.h.

enum CatchmentArea

The different catchment areas used.

Enumerator:

  CA_NONE | Catchment when the station has no facilities.
  CA_BUS | Catchment for bus stops with "modified catchment" enabled.
  CA_TRUCK | Catchment for truck stops with "modified catchment" enabled.
  CA_TRAIN | Catchment for train stations with "modified catchment" enabled.
  CA_DOCK | Catchment for docks with "modified catchment" enabled.
  CA_UNMODIFIED | Catchment for all stations with "modified catchment" disabled.
  MAX_CATCHMENT | Maximum catchment for airports with "modified catchment" enabled.

Definition at line 77 of file station_type.h.

enum RoadStopType

Types of RoadStops.

Enumerator:

  ROADSTOP_BUS | A standard stop for buses.
  ROADSTOP_TRUCK | A standard stop for trucks.

Definition at line 44 of file station_type.h.

enum StationFacility

The facilities a station might be having.

Enumerator:

  FACIL_NONE | The station has no facilities at all.
  FACIL_TRAIN | Station with train station.
  FACIL_TRUCK_STOP | Station with truck stops.
  FACIL_BUS_STOP | Station with bus stops.
  FACIL_AIRPORT | Station with an airport.
  FACIL_DOCK | Station with a dock.
  FACIL_WAYPOINT | Station is a waypoint.

Definition at line 50 of file station_type.h.

enum StationHadVehicleOfType

The vehicles that may have visited a station.

Enumerator:

  HVOT_NONE | Station has seen no vehicles.
  HVOT_TRAIN | Station has seen a train.
  HVOT_BUS | Station has seen a bus.
  HVOT_TRUCK | Station has seen a truck.
  HVOT_AIRCRAFT | Station has seen an aircraft.
  HVOT_SHIP | Station has seen a ship.
  HVOT_WAYPOINT | Station is a waypoint (NewGRF only!).

Definition at line 63 of file station_type.h.