OpenTTD
rail_type.h
Go to the documentation of this file.
1 /* $Id$ */
2 
3 /*
4  * This file is part of OpenTTD.
5  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8  */
9 
12 #ifndef RAIL_TYPE_H
13 #define RAIL_TYPE_H
14 
15 #include "core/enum_type.hpp"
16 
17 typedef uint32 RailTypeLabel;
18 
19 static const RailTypeLabel RAILTYPE_RAIL_LABEL = 'RAIL';
20 static const RailTypeLabel RAILTYPE_ELECTRIC_LABEL = 'ELRL';
21 static const RailTypeLabel RAILTYPE_MONO_LABEL = 'MONO';
22 static const RailTypeLabel RAILTYPE_MAGLEV_LABEL = 'MGLV';
23 
29 enum RailType {
35  RAILTYPE_END = 64,
37 
41 };
42 
48 
53 enum RailTypes : uint64 {
59  INVALID_RAILTYPES = UINT64_MAX,
60 };
62 
63 #endif /* RAIL_TYPE_H */
Used for iterations.
Definition: rail_type.h:35
Helper template class that makes basic properties of given enumeration type visible from outsize...
Definition: enum_type.hpp:68
DECLARE_ENUM_AS_BIT_SET(GenderEthnicity) enum CompanyManagerFaceVariable
Bitgroups of the CompanyManagerFace variable.
Monorail.
Definition: rail_type.h:33
RailType
Enumeration for all possible railtypes.
Definition: rail_type.h:29
Maglev.
Definition: rail_type.h:34
Electrified rails.
Definition: rail_type.h:56
Standard non-electric rails.
Definition: rail_type.h:31
Type (helpers) for enums.
Non-electrified rails.
Definition: rail_type.h:55
No rail types.
Definition: rail_type.h:54
Default railtype: most used.
Definition: rail_type.h:40
Invalid railtypes.
Definition: rail_type.h:59
Default railtype: first available.
Definition: rail_type.h:38
Informative template class exposing basic enumeration properties used by several other templates belo...
Definition: enum_type.hpp:54
RailTypes
The different railtypes we support, but then a bitmask of them.
Definition: rail_type.h:53
Monorail!
Definition: rail_type.h:57
Electric rails.
Definition: rail_type.h:32
Ever fast maglev.
Definition: rail_type.h:58
Default railtype: last available.
Definition: rail_type.h:39
Used for iterations.
Definition: rail_type.h:30
#define DECLARE_POSTFIX_INCREMENT(enum_type)
Some enums need to have allowed incrementing (i.e.
Definition: enum_type.hpp:18
Flag for invalid railtype.
Definition: rail_type.h:36