Go to the source code of this file.
◆ ETL_DECLARE_USER_TYPE
| #define ETL_DECLARE_USER_TYPE |
( |
| TypeName, |
|
|
| ValueType ) |
ETL_USER_TYPE(North, 0)
ETL_USER_TYPE(South, 180)
ETL_USER_TYPE(East, 90)
ETL_USER_TYPE(West, 270)
ETL_END_USER_TYPE(CompassDirection)
#define ETL_DECLARE_USER_TYPE(TypeName, ValueType)
Definition user_type.h:80
Using the enumeration.
CompassDirection direction;
direction = CompassDirection::North;
constant;
int value = int(direction);
int value = direction.get();
int& value = direction.get();
const int& value = direction.get();
direction = CompassDirection(value);
direction = CompassDirection(3);
++direction;
direction -= CompassDirection(20);
direction = value;
Compilation error ****
◆ ETL_END_USER_TYPE
| #define ETL_END_USER_TYPE |
( |
| TypeName | ) |
|
Value: } \
; \
TypeName(enum_type value_) \
: value(static_cast<value_type>(value_)) \
{ \
} \
} \
;
◆ ETL_USER_TYPE
| #define ETL_USER_TYPE |
( |
| enum_name, |
|
|
| value ) |