# linkgraph_type.h

Go to the documentation of this file.

    00001 /* $Id: linkgraph_type.h 26331 2014-02-10 20:13:07Z fonsinchen $ */
    00002
    00003 /*
    00004  * This file is part of OpenTTD.
    00005  * 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.
    00006  * 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.
    00007  * 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/>.
    00008  */
    00009
    00012 #ifndef LINKGRAPH_TYPE_H
    00013 #define LINKGRAPH_TYPE_H
    00014
    00015 typedef uint16 LinkGraphID;
    00016 static const LinkGraphID INVALID_LINK_GRAPH = UINT16_MAX;
    00017
    00018 typedef uint16 LinkGraphJobID;
    00019 static const LinkGraphID INVALID_LINK_GRAPH_JOB = UINT16_MAX;
    00020
    00021 typedef uint16 NodeID;
    00022 static const NodeID INVALID_NODE = UINT16_MAX;
    00023
    00024 enum DistributionType {
    00025   DT_BEGIN = 0,
    00026   DT_MIN = 0,
    00027   DT_MANUAL = 0,
    00028   DT_ASYMMETRIC = 1,
    00029   DT_MAX_NONSYMMETRIC = 1,
    00030   DT_SYMMETRIC = 2,
    00031   DT_MAX = 2,
    00032   DT_NUM = 3,
    00033   DT_END = 3
    00034 };
    00035
    00036 /* It needs to be 8bits, because we save and load it as such
    00037  * Define basic enum properties
    00038  */
    00039 template <> struct EnumPropsT<DistributionType> : MakeEnumPropsT<DistributionType, byte, DT_BEGIN, DT_END, DT_NUM> {};
    00040 typedef TinyEnumT<DistributionType> DistributionTypeByte; // typedefing-enumification of DistributionType
    00041
    00042 #endif /* LINKGRAPH_TYPE_H */