OpenTTD Source: src/engine_base.h File Reference

OpenTTD Source 15.0-RC2

Data Structures | Typedefs | Enumerations | Functions | Variables
engine_base.h File Reference

Base class for engines. More...

`#include "engine_type.h"`
`#include "vehicle_type.h"`
`#include "core/enum_type.hpp"`
`#include "core/pool_type.hpp"`
`#include "newgrf_commons.h"`
`#include "timer/timer_game_calendar.h"`

Go to the source code of this file.

## Data Structures
struct | WagonOverride
class | Engine
struct | Engine::EngineTypeFilter
struct | EngineIDMapping
struct | EngineIDMappingKeyProjection
| Projection to get a unique key of an EngineIDMapping, used for sorting in EngineOverrideManager. More...
struct | EngineOverrideManager
| Stores the mapping of EngineID to the internal id of newgrfs. More...

## Typedefs
using | EngineDisplayFlags = EnumBitSet< EngineDisplayFlag, uint8_t >
typedef Pool< Engine, EngineID, 64 > | EnginePool

## Enumerations
enum class | EngineDisplayFlag : uint8_t { HasVariants , IsFolded , Shaded }
| Flags used client-side in the purchase/autorenew engine list. More...

## Functions
const EngineInfo * | EngInfo (EngineID e)
const RailVehicleInfo * | RailVehInfo (EngineID e)
const RoadVehicleInfo * | RoadVehInfo (EngineID e)
const ShipVehicleInfo * | ShipVehInfo (EngineID e)
const AircraftVehicleInfo * | AircraftVehInfo (EngineID e)

## Variables
EnginePool | _engine_pool
EngineOverrideManager | _engine_mngr

## Detailed Description

Base class for engines.

Definition in file engine_base.h.

## Typedef Documentation

## ◆ EngineDisplayFlags

using EngineDisplayFlags = EnumBitSet<EngineDisplayFlag, uint8_t>

Definition at line 33 of file engine_base.h.

## ◆ EnginePool

typedef Pool<Engine, EngineID, 64> EnginePool

Definition at line 35 of file engine_base.h.

## Enumeration Type Documentation

## ◆ EngineDisplayFlag

enum class EngineDisplayFlag : uint8_t
| strong

Flags used client-side in the purchase/autorenew engine list.

Enumerator
HasVariants | Set if engine has variants.
IsFolded | Set if display of variants should be folded (hidden).
Shaded | Set if engine should be masked.

Definition at line 27 of file engine_base.h.

## Function Documentation

## ◆ AircraftVehInfo()

const AircraftVehicleInfo * AircraftVehInfo | ( | EngineID | e | ) |
| inline

Definition at line 261 of file engine_base.h.

## ◆ EngInfo()

const EngineInfo * EngInfo | ( | EngineID | e | ) |
| inline

Definition at line 241 of file engine_base.h.

## ◆ RailVehInfo()

const RailVehicleInfo * RailVehInfo | ( | EngineID | e | ) |
| inline

Definition at line 246 of file engine_base.h.

## ◆ RoadVehInfo()

const RoadVehicleInfo * RoadVehInfo | ( | EngineID | e | ) |
| inline

Definition at line 251 of file engine_base.h.

## ◆ ShipVehInfo()

const ShipVehicleInfo * ShipVehInfo | ( | EngineID | e | ) |
| inline

Definition at line 256 of file engine_base.h.

## Variable Documentation

## ◆ _engine_mngr

EngineOverrideManager _engine_mngr
| extern

Definition at line 45 of file engine.cpp.