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_SYMMETRIC = 0, 
00024   DT_ASYMMETRIC,    
00025   DT_MANUAL,        
00026   DT_NUM = 3,
00027   DT_END = 3
00028 };
00029 
00030 /* It needs to be 8bits, because we save and load it as such
00031  * Define basic enum properties
00032  */
00033 template <> struct EnumPropsT<DistributionType> : MakeEnumPropsT<DistributionType, byte, DT_BEGIN, DT_END, DT_NUM> {};
00034 typedef TinyEnumT<DistributionType> DistributionTypeByte; // typedefing-enumification of DistributionType
00035 
00036 #endif /* LINKGRAPH_TYPE_H_ */

Generated on Fri May 27 04:19:42 2011 for OpenTTD by  doxygen 1.6.1