# road_type.h File Reference

Enums and other types related to roads. More...

`#include "core/enum_type.hpp"`

Go to the source code of this file.

## Data Structures
struct | EnumPropsT< RoadTypes >
## Typedefs
typedef TinyEnumT< RoadTypes > | RoadTypesByte
## Enumerations
enum | RoadType { ROADTYPE_ROAD = 0, ROADTYPE_TRAM = 1, ROADTYPE_HWAY = 2, ROADTYPE_END, INVALID_ROADTYPE = 0xFF }
| The different roadtypes we support. More...
enum | RoadTypes { ROADTYPES_NONE = 0, ROADTYPES_ROAD = 1 << ROADTYPE_ROAD, ROADTYPES_TRAM = 1 << ROADTYPE_TRAM, ROADTYPES_HWAY = 1 << ROADTYPE_HWAY, ROADTYPES_ROADTRAM = ROADTYPES_ROAD | ROADTYPES_TRAM, ROADTYPES_ROADHWAY = ROADTYPES_ROAD | ROADTYPES_HWAY, ROADTYPES_TRAMHWAY = ROADTYPES_TRAM | ROADTYPES_HWAY, ROADTYPES_ALL = ROADTYPES_ROAD | ROADTYPES_TRAM | ROADTYPES_HWAY, ROADTYPES_END, INVALID_ROADTYPES = 0xFF }
| The different roadtypes we support, but then a bitmask of them. More...
enum | RoadBits { ROAD_NONE = 0U, ROAD_NW = 1U, ROAD_SW = 2U, ROAD_SE = 4U, ROAD_NE = 8U, ROAD_X = ROAD_SW | ROAD_NE, ROAD_Y = ROAD_NW | ROAD_SE, ROAD_ALL = ROAD_X | ROAD_Y }
| Enumeration for the road parts on a tile. More...
## Functions
| DECLARE_POSTFIX_INCREMENT (RoadType)
| DECLARE_ENUM_AS_BIT_SET (RoadTypes)
| DECLARE_ENUM_AS_BIT_SET (RoadBits)

## Detailed Description

Enums and other types related to roads.

Definition in file road_type.h.

## Enumeration Type Documentation

enum RoadBits

Enumeration for the road parts on a tile.

This enumeration defines the possible road parts which can be build on a tile.

Enumerator:

  ROAD_NONE | No road-part is build.
  ROAD_NW | North-west part.
  ROAD_SW | South-west part.
  ROAD_SE | South-east part.
  ROAD_NE | North-east part.
  ROAD_X | Full road along the x-axis (south-west + north-east).
  ROAD_Y | Full road along the y-axis (north-west + south-east).
  ROAD_ALL | Full 4-way crossing.

Definition at line 51 of file road_type.h.

enum RoadType

The different roadtypes we support.

Note:
  currently only ROADTYPE_ROAD and ROADTYPE_TRAM are supported.

Enumerator:

  ROADTYPE_ROAD | Basic road type.
  ROADTYPE_TRAM | Trams.
  ROADTYPE_HWAY | Only a placeholder. Not sure what we are going to do with this road type.
  ROADTYPE_END | Used for iterations.
  INVALID_ROADTYPE | flag for invalid roadtype

Definition at line 15 of file road_type.h.

enum RoadTypes

The different roadtypes we support, but then a bitmask of them.

Note:
  currently only roadtypes with ROADTYPE_ROAD and ROADTYPE_TRAM are supported.

Enumerator:

  ROADTYPES_NONE | No roadtypes.
  ROADTYPES_ROAD | Road.
  ROADTYPES_TRAM | Trams.
  ROADTYPES_HWAY | Highway (or whatever substitute).
  ROADTYPES_ROADTRAM | Road + trams.
  ROADTYPES_ROADHWAY | Road + highway (or whatever substitute).
  ROADTYPES_TRAMHWAY | Trams + highway (or whatever substitute).
  ROADTYPES_ALL | Road + trams + highway (or whatever substitute).
  ROADTYPES_END | Used for iterations?
  INVALID_ROADTYPES | Invalid roadtypes.

Definition at line 28 of file road_type.h.