# rail_type.h

Go to the documentation of this file.

    00001 /* $Id: rail_type.h 15450 2009-02-11 18:37:13Z peter1138 $ */
    00002
    00005 #ifndef RAIL_TYPE_H
    00006 #define RAIL_TYPE_H
    00007
    00008 #include "core/enum_type.hpp"
    00009
    00010 typedef uint32 RailTypeLabel;
    00011
    00017 enum RailType {
    00018   RAILTYPE_BEGIN    = 0,
    00019   RAILTYPE_RAIL     = 0,
    00020   RAILTYPE_ELECTRIC = 1,
    00021   RAILTYPE_MONO     = 2,
    00022   RAILTYPE_MAGLEV   = 3,
    00023   RAILTYPE_END,
    00024   INVALID_RAILTYPE  = 0xFF
    00025 };
    00026
    00028 DECLARE_POSTFIX_INCREMENT(RailType);
    00030 template <> struct EnumPropsT<RailType> : MakeEnumPropsT<RailType, byte, RAILTYPE_BEGIN, RAILTYPE_END, INVALID_RAILTYPE> {};
    00031 typedef TinyEnumT<RailType> RailTypeByte;
    00032
    00036 enum RailTypes {
    00037   RAILTYPES_NONE     = 0,
    00038   RAILTYPES_RAIL     = 1 << RAILTYPE_RAIL,
    00039   RAILTYPES_ELECTRIC = 1 << RAILTYPE_ELECTRIC,
    00040   RAILTYPES_MONO     = 1 << RAILTYPE_MONO,
    00041   RAILTYPES_MAGLEV   = 1 << RAILTYPE_MAGLEV,
    00042   INVALID_RAILTYPES  = UINT_MAX
    00043 };
    00044 DECLARE_ENUM_AS_BIT_SET(RailTypes);
    00045
    00046 #endif /* RAIL_TYPE_H */