Go to the source code of this file.
◆ DEFINE_ENUM_CLASS_AND_OPERATOR
#define DEFINE_ENUM_CLASS_AND_OPERATOR |
( |
|
class_name | ) |
|
Value:constexpr bool operator&(const enum class_name self_value, const enum class_name in_value) { \
return static_cast<bool>(static_cast<uint32_t>(self_value) & static_cast<uint32_t>(in_value)); \
} \
This macro serves to simplify the definition of flags, it takes the name of an enum class as input and defines the operator& for that class.
Definition at line 28 of file macros.h.
◆ DEFINE_ENUM_CLASS_FLAGS
#define DEFINE_ENUM_CLASS_FLAGS |
( |
|
class_name, |
|
|
|
... |
|
) |
| |
Value:enum class class_name : uint32_t { \
__VA_ARGS__ \
}; \
DEFINE_ENUM_CLASS_OR_OPERATOR(class_name) \
DEFINE_ENUM_CLASS_AND_OPERATOR(class_name) \
Definition at line 33 of file macros.h.
◆ DEFINE_ENUM_CLASS_OR_OPERATOR
#define DEFINE_ENUM_CLASS_OR_OPERATOR |
( |
|
class_name | ) |
|
Value:constexpr enum class_name operator|(const enum class_name self_value, const enum class_name in_value) { \
return static_cast<enum class_name>(static_cast<uint32_t>(self_value) | static_cast<uint32_t>(in_value)); \
} \
This macro serves to simplify the definition of flags, it takes the name of an enum class as input and defines the operator| for that class.
Definition at line 20 of file macros.h.