OpenTTD Source: src/rail_type.h File Reference

OpenTTD Source 15.0-RC2

Typedefs | Enumerations | Variables
rail_type.h File Reference

The different types of rail. More...

`#include "core/enum_type.hpp"`

Go to the source code of this file.

## Typedefs
typedef uint32_t | RailTypeLabel
using | RailTypes = EnumBitSet< RailType, uint64_t >
| Allow incrementing of Track variables.

## Enumerations
enum | RailType : uint8_t { RAILTYPE_BEGIN = 0 , RAILTYPE_RAIL = 0 , RAILTYPE_ELECTRIC = 1 , RAILTYPE_MONO = 2 , RAILTYPE_MAGLEV = 3 , RAILTYPE_END = 64 , INVALID_RAILTYPE = 0xFF }
| Enumeration for all possible railtypes. More...

## Variables
static const RailTypeLabel | RAILTYPE_LABEL_RAIL = 'RAIL'
static const RailTypeLabel | RAILTYPE_LABEL_ELECTRIC = 'ELRL'
static const RailTypeLabel | RAILTYPE_LABEL_MONO = 'MONO'
static const RailTypeLabel | RAILTYPE_LABEL_MAGLEV = 'MGLV'
static constexpr RailTypes | INVALID_RAILTYPES {UINT64_MAX}

## Detailed Description

The different types of rail.

Definition in file rail_type.h.

## Typedef Documentation

## ◆ RailTypeLabel

typedef uint32_t RailTypeLabel

Definition at line 15 of file rail_type.h.

## ◆ RailTypes

using RailTypes = EnumBitSet<RailType, uint64_t>

Allow incrementing of Track variables.

Definition at line 38 of file rail_type.h.

## Enumeration Type Documentation

## ◆ RailType

enum RailType : uint8_t

Enumeration for all possible railtypes.

Enumerator
RAILTYPE_BEGIN | Used for iterations.
RAILTYPE_RAIL | Standard non-electric rails.
RAILTYPE_ELECTRIC | Electric rails.
RAILTYPE_MONO | Monorail.
RAILTYPE_MAGLEV | Maglev.
RAILTYPE_END | Used for iterations.
INVALID_RAILTYPE | Flag for invalid railtype.

Definition at line 25 of file rail_type.h.

## Variable Documentation

## ◆ INVALID_RAILTYPES

constexpr RailTypes INVALID_RAILTYPES {UINT64_MAX}
| staticconstexpr

Definition at line 40 of file rail_type.h.

## ◆ RAILTYPE_LABEL_ELECTRIC

const RailTypeLabel RAILTYPE_LABEL_ELECTRIC = 'ELRL'
| static

Definition at line 18 of file rail_type.h.

## ◆ RAILTYPE_LABEL_MAGLEV

const RailTypeLabel RAILTYPE_LABEL_MAGLEV = 'MGLV'
| static

Definition at line 20 of file rail_type.h.

## ◆ RAILTYPE_LABEL_MONO

const RailTypeLabel RAILTYPE_LABEL_MONO = 'MONO'
| static

Definition at line 19 of file rail_type.h.

## ◆ RAILTYPE_LABEL_RAIL

const RailTypeLabel RAILTYPE_LABEL_RAIL = 'RAIL'
| static

Definition at line 17 of file rail_type.h.