Go to the source code of this file.
Classes | |
| struct | dw::framework::EnumDescription< EnumT > |
Namespaces | |
| namespace | dw |
| namespace | dw::framework |
Macros | |
| #define | DW_DESCRIBE_C_ENUMERATOR(NAME) describeEnumerator(DW_ENUMERATOR_NAME_STRING_VIEW(#NAME), (NAME)) |
| Syntactic sugar calling describeEnumerator(). More... | |
| #define | DW_DESCRIBE_ENUMERATOR(NAME) describeEnumerator(DW_ENUMERATOR_NAME_STRING_VIEW(#NAME), EnumT::NAME) |
| Syntactic sugar calling describeEnumerator(). More... | |
| #define | DW_ENUMERATOR_NAME_STRING_VIEW(NAME_STR) dw::core::StringView { NAME_STR } |
Functions | |
| template<typename EnumT > | |
| constexpr auto | dw::framework::describeEnumerator (dw::core::StringView &&name, EnumT value) -> std::pair< dw::core::StringView, EnumT > |
| Describe an enumerator. More... | |
| template<typename EnumT , typename... Args> | |
| constexpr auto | dw::framework::describeEnumeratorCollection (Args const &&... args) -> std::array< std::pair< dw::core::StringView, EnumT >, sizeof...(Args)> |
| Describe the enumerators. More... | |
| template<typename EnumT > | |
| auto | dw::framework::mapEnumNameToValue (dw::core::StringView const &name) -> EnumT |
| Get the enumerator value based on the name. More... | |
| template<typename EnumT > | |
| dw::core::StringView | dw::framework::mapEnumValueToName (EnumT value) |
| Get the enumerator name based on the value. More... | |
| #define DW_DESCRIBE_C_ENUMERATOR | ( | NAME | ) | describeEnumerator(DW_ENUMERATOR_NAME_STRING_VIEW(#NAME), (NAME)) |
Syntactic sugar calling describeEnumerator().
It avoid having to pass both the enumerator name and value explicitly. The block scope must contain the user-defined string literal from dw::core::operator""_sv
Definition at line 62 of file EnumDescriptor.hpp.
| #define DW_DESCRIBE_ENUMERATOR | ( | NAME | ) | describeEnumerator(DW_ENUMERATOR_NAME_STRING_VIEW(#NAME), EnumT::NAME) |
Syntactic sugar calling describeEnumerator().
It avoid having to pass both the enumerator name and value explicitly. This macro should only be used within dw::framework::EnumDescription::get() where EnumT is defined. The block scope must contain the user-defined string literal from dw::core::operator""_sv
Definition at line 54 of file EnumDescriptor.hpp.
| #define DW_ENUMERATOR_NAME_STRING_VIEW | ( | NAME_STR | ) | dw::core::StringView { NAME_STR } |
Definition at line 43 of file EnumDescriptor.hpp.