# road_type.h

Go to the documentation of this file.

    00001 /* $Id: road_type.h 15601 2009-03-02 22:57:47Z rubidium $ */
    00002
    00005 #ifndef ROAD_TYPE_H
    00006 #define ROAD_TYPE_H
    00007
    00008 #include "core/enum_type.hpp"
    00009
    00015 enum RoadType {
    00016   ROADTYPE_BEGIN = 0,
    00017   ROADTYPE_ROAD = 0,
    00018   ROADTYPE_TRAM = 1,
    00019   ROADTYPE_END,
    00020   INVALID_ROADTYPE = 0xFF
    00021 };
    00022 DECLARE_POSTFIX_INCREMENT(RoadType);
    00023
    00028 enum RoadTypes {
    00029   ROADTYPES_NONE     = 0,
    00030   ROADTYPES_ROAD     = 1 << ROADTYPE_ROAD,
    00031   ROADTYPES_TRAM     = 1 << ROADTYPE_TRAM,
    00032   ROADTYPES_ALL      = ROADTYPES_ROAD | ROADTYPES_TRAM,
    00033   ROADTYPES_END,
    00034   INVALID_ROADTYPES  = 0xFF
    00035 };
    00036 DECLARE_ENUM_AS_BIT_SET(RoadTypes);
    00037 template <> struct EnumPropsT<RoadTypes> : MakeEnumPropsT<RoadTypes, byte, ROADTYPES_NONE, ROADTYPES_END, INVALID_ROADTYPES> {};
    00038 typedef TinyEnumT<RoadTypes> RoadTypesByte;
    00039
    00040
    00047 enum RoadBits {
    00048   ROAD_NONE = 0U,
    00049   ROAD_NW   = 1U,
    00050   ROAD_SW   = 2U,
    00051   ROAD_SE   = 4U,
    00052   ROAD_NE   = 8U,
    00053   ROAD_X    = ROAD_SW | ROAD_NE,
    00054   ROAD_Y    = ROAD_NW | ROAD_SE,
    00055   ROAD_ALL  = ROAD_X  | ROAD_Y
    00056 };
    00057 DECLARE_ENUM_AS_BIT_SET(RoadBits);
    00058
    00059 #endif /* ROAD_TYPE_H */