# direction_type.h

Go to the documentation of this file.

    00001 /* $Id: direction_type.h 15718 2009-03-15 00:32:18Z rubidium $ */
    00002
    00005 #ifndef DIRECTION_TYPE_H
    00006 #define DIRECTION_TYPE_H
    00007
    00008 #include "core/enum_type.hpp"
    00009
    00019 enum Direction {
    00020   DIR_BEGIN = 0,
    00021   DIR_N   = 0,
    00022   DIR_NE  = 1,
    00023   DIR_E   = 2,
    00024   DIR_SE  = 3,
    00025   DIR_S   = 4,
    00026   DIR_SW  = 5,
    00027   DIR_W   = 6,
    00028   DIR_NW  = 7,
    00029   DIR_END,
    00030   INVALID_DIR = 0xFF,
    00031 };
    00032
    00034 DECLARE_POSTFIX_INCREMENT(Direction);
    00035
    00037 template <> struct EnumPropsT<Direction> : MakeEnumPropsT<Direction, byte, DIR_BEGIN, DIR_END, INVALID_DIR> {};
    00038 typedef TinyEnumT<Direction> DirectionByte; // typedefing-enumification of Direction
    00039
    00040
    00058 enum DirDiff {
    00059   DIRDIFF_SAME    = 0,
    00060   DIRDIFF_45RIGHT = 1,
    00061   DIRDIFF_90RIGHT = 2,
    00062   DIRDIFF_REVERSE = 4,
    00063   DIRDIFF_90LEFT  = 6,
    00064   DIRDIFF_45LEFT  = 7
    00065 };
    00066
    00067
    00073 enum DiagDirection {
    00074   DIAGDIR_BEGIN = 0,
    00075   DIAGDIR_NE  = 0,
    00076   DIAGDIR_SE  = 1,
    00077   DIAGDIR_SW  = 2,
    00078   DIAGDIR_NW  = 3,
    00079   DIAGDIR_END,
    00080   INVALID_DIAGDIR = 0xFF,
    00081 };
    00082
    00084 DECLARE_POSTFIX_INCREMENT(DiagDirection);
    00085
    00087 template <> struct EnumPropsT<DiagDirection> : MakeEnumPropsT<DiagDirection, byte, DIAGDIR_BEGIN, DIAGDIR_END, INVALID_DIAGDIR> {};
    00088 typedef TinyEnumT<DiagDirection> DiagDirectionByte; // typedefing-enumification of DiagDirection
    00089
    00090
    00101 enum DiagDirDiff {
    00102   DIAGDIRDIFF_SAME    = 0,
    00103   DIAGDIRDIFF_90RIGHT = 1,
    00104   DIAGDIRDIFF_REVERSE = 2,
    00105   DIAGDIRDIFF_90LEFT  = 3
    00106 };
    00107
    00109 DECLARE_POSTFIX_INCREMENT(DiagDirDiff);
    00110
    00111
    00120 enum Axis {
    00121   AXIS_X = 0,
    00122   AXIS_Y = 1,
    00123   AXIS_END
    00124 };
    00125
    00126 #endif /* DIRECTION_TYPE_H */