# road_type.h

Go to the documentation of this file.

    00001 /* $Id: road_type.h 11914 2008-01-18 03:48:29Z glx $ */
    00002
    00005 #ifndef ROAD_TYPE_H
    00006 #define ROAD_TYPE_H
    00007
    00008 #include "core/enum_type.hpp"
    00009
    00015 enum RoadType {
    00016   ROADTYPE_ROAD = 0,
    00017   ROADTYPE_TRAM = 1,
    00018   ROADTYPE_HWAY = 2,
    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_HWAY     = 1 << ROADTYPE_HWAY,
    00033   ROADTYPES_ROADTRAM = ROADTYPES_ROAD | ROADTYPES_TRAM,
    00034   ROADTYPES_ROADHWAY = ROADTYPES_ROAD | ROADTYPES_HWAY,
    00035   ROADTYPES_TRAMHWAY = ROADTYPES_TRAM | ROADTYPES_HWAY,
    00036   ROADTYPES_ALL      = ROADTYPES_ROAD | ROADTYPES_TRAM | ROADTYPES_HWAY,
    00037   ROADTYPES_END,
    00038   INVALID_ROADTYPES  = 0xFF
    00039 };
    00040 DECLARE_ENUM_AS_BIT_SET(RoadTypes);
    00041 template <> struct EnumPropsT<RoadTypes> : MakeEnumPropsT<RoadTypes, byte, ROADTYPES_NONE, ROADTYPES_END, INVALID_ROADTYPES> {};
    00042 typedef TinyEnumT<RoadTypes> RoadTypesByte;
    00043
    00044
    00051 enum RoadBits {
    00052   ROAD_NONE = 0U,
    00053   ROAD_NW   = 1U,
    00054   ROAD_SW   = 2U,
    00055   ROAD_SE   = 4U,
    00056   ROAD_NE   = 8U,
    00057   ROAD_X    = ROAD_SW | ROAD_NE,
    00058   ROAD_Y    = ROAD_NW | ROAD_SE,
    00059   ROAD_ALL  = ROAD_X  | ROAD_Y
    00060 };
    00061 DECLARE_ENUM_AS_BIT_SET(RoadBits);
    00062
    00063 #endif /* ROAD_TYPE_H */