linkgraph_type.h

Go to the documentation of this file.
00001 /* $Id$ */
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 LinkGraphComponentID;
00016 static const LinkGraphComponentID INVALID_LINKGRAPH_COMPONENT = UINT16_MAX;
00017 
00018 typedef uint NodeID;
00019 static const NodeID INVALID_NODE = UINT_MAX;
00020 
00021 enum DistributionType {
00022   DT_BEGIN = 0,
00023   DT_MIN = 0,
00024   DT_MANUAL = 0,           
00025   DT_ASYMMETRIC = 1,       
00026   DT_MAX_NONSYMMETRIC = 1, 
00027   DT_SYMMETRIC = 2,        
00028   DT_MAX = 2,
00029   DT_NUM = 3,
00030   DT_END = 3
00031 };
00032 
00033 /* It needs to be 8bits, because we save and load it as such
00034  * Define basic enum properties
00035  */
00036 template <> struct EnumPropsT<DistributionType> : MakeEnumPropsT<DistributionType, byte, DT_BEGIN, DT_END, DT_NUM> {};
00037 typedef TinyEnumT<DistributionType> DistributionTypeByte; // typedefing-enumification of DistributionType
00038 
00039 #endif /* LINKGRAPH_TYPE_H */