# road_type.h

Go to the documentation of this file.

    00001 /* $Id: road_type.h 14170 2008-08-25 16:20:26Z peter1138 $ */
    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_HWAY = 2,
    00020   ROADTYPE_END,
    00021   INVALID_ROADTYPE = 0xFF
    00022 };
    00023 DECLARE_POSTFIX_INCREMENT(RoadType);
    00024
    00029 enum RoadTypes {
    00030   ROADTYPES_NONE     = 0,
    00031   ROADTYPES_ROAD     = 1 << ROADTYPE_ROAD,
    00032   ROADTYPES_TRAM     = 1 << ROADTYPE_TRAM,
    00033   ROADTYPES_HWAY     = 1 << ROADTYPE_HWAY,
    00034   ROADTYPES_ROADTRAM = ROADTYPES_ROAD | ROADTYPES_TRAM,
    00035   ROADTYPES_ROADHWAY = ROADTYPES_ROAD | ROADTYPES_HWAY,
    00036   ROADTYPES_TRAMHWAY = ROADTYPES_TRAM | ROADTYPES_HWAY,
    00037   ROADTYPES_ALL      = ROADTYPES_ROAD | ROADTYPES_TRAM | ROADTYPES_HWAY,
    00038   ROADTYPES_END,
    00039   INVALID_ROADTYPES  = 0xFF
    00040 };
    00041 DECLARE_ENUM_AS_BIT_SET(RoadTypes);
    00042 template <> struct EnumPropsT<RoadTypes> : MakeEnumPropsT<RoadTypes, byte, ROADTYPES_NONE, ROADTYPES_END, INVALID_ROADTYPES> {};
    00043 typedef TinyEnumT<RoadTypes> RoadTypesByte;
    00044
    00045
    00052 enum RoadBits {
    00053   ROAD_NONE = 0U,
    00054   ROAD_NW   = 1U,
    00055   ROAD_SW   = 2U,
    00056   ROAD_SE   = 4U,
    00057   ROAD_NE   = 8U,
    00058   ROAD_X    = ROAD_SW | ROAD_NE,
    00059   ROAD_Y    = ROAD_NW | ROAD_SE,
    00060   ROAD_ALL  = ROAD_X  | ROAD_Y
    00061 };
    00062 DECLARE_ENUM_AS_BIT_SET(RoadBits);
    00063
    00064 #endif /* ROAD_TYPE_H */