Go to the source code of this file.
◆ ETL_DECLARE_ENUM_TYPE
#define ETL_DECLARE_ENUM_TYPE |
( |
|
TypeName, |
|
|
|
ValueType |
|
) |
| |
Value: typedef ValueType value_type; \
ETL_CONSTEXPR TypeName() : value(static_cast<enum_type>(value_type())) {} \
ETL_CONSTEXPR TypeName(enum_type value_) : value(value_) {} \
ETL_CONSTEXPR explicit TypeName(value_type value_) : value(static_cast<enum_type>(value_)) {} \
ETL_CONSTEXPR operator value_type() const {return static_cast<value_type>(value);} \
ETL_CONSTEXPR value_type get_value() const {return static_cast<value_type>(value);} \
ETL_CONSTEXPR enum_type get_enum() const {return value;} \
ETL_CONSTEXPR14 const char* c_str() const \
{ \
switch (value) \
{
◆ ETL_END_ENUM_TYPE
#define ETL_END_ENUM_TYPE |
Value: default: \
return "?"; \
} \
} \
private: \
enum_type value;
◆ ETL_ENUM_TYPE
#define ETL_ENUM_TYPE |
( |
|
value, |
|
|
|
name |
|
) |
| |
Value: case value: \
return name; \