OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

linkgraph_type.h
Go to the documentation of this file.
1 /* $Id: linkgraph_type.h 26549 2014-05-01 14:50:52Z fonsinchen $ */
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 LINKGRAPH_TYPE_H
13 #define LINKGRAPH_TYPE_H
14
15 typedef uint16 LinkGraphID;
16 static const LinkGraphID INVALID_LINK_GRAPH = UINT16_MAX;
17
18 typedef uint16 LinkGraphJobID;
19 static const LinkGraphID INVALID_LINK_GRAPH_JOB = UINT16_MAX;
20
21 typedef uint16 NodeID;
22 static const NodeID INVALID_NODE = UINT16_MAX;
23
24 enum DistributionType {
25 DT_BEGIN = 0,
26 DT_MIN = 0,
27 DT_MANUAL = 0,
28 DT_ASYMMETRIC = 1,
29 DT_MAX_NONSYMMETRIC = 1,
30 DT_SYMMETRIC = 2,
31 DT_MAX = 2,
32 DT_NUM = 3,
33 DT_END = 3
34 };
35
36 /* It needs to be 8bits, because we save and load it as such
37 * Define basic enum properties
38 */
39 template <> struct EnumPropsT<DistributionType> : MakeEnumPropsT<DistributionType, byte, DT_BEGIN, DT_END, DT_NUM> {};
40 typedef TinyEnumT<DistributionType> DistributionTypeByte; // typedefing-enumification of DistributionType
41
55 enum EdgeUpdateMode {
56 EUM_INCREASE = 1,
57 EUM_REFRESH = 1 << 1,
58 EUM_RESTRICTED = 1 << 2,
59 EUM_UNRESTRICTED = 1 << 3,
60 };
61
62 DECLARE_ENUM_AS_BIT_SET(EdgeUpdateMode)
63
64 #endif /* LINKGRAPH_TYPE_H */