The class implements an adapter for enums to define the string literals of the enum entries.
More...
#include <EnumDictionaryBase.hxx>
|
| EnumDictionaryBase (const InitializerList &fields) |
|
| EnumDictionaryBase (const char *invalidValueString, const InitializerList &fields) |
|
|
using | Fields = std::map< T, const char * > |
|
using | InitializerList = std::initializer_list< typename Fields::value_type > |
|
using | U = typename std::underlying_type< T >::type |
|
|
Fields | fields |
|
String | invalidValueString |
|
|
static const T | zeroValue = static_cast<T>(0) |
|
template<class T>
class Arp::EnumDictionaryBase< T >
The class implements an adapter for enums to define the string literals of the enum entries.
- Template Parameters
-
This is a helper class to make enums parsable and loggable/formattable. This helper class is specialied for any enum T defining its string literals using EnumStrings<Tgt;.
◆ TryGetEnumStringInternal()
Returns the string of the specified enum value or nullptr
if the value could not be found.
- Parameters
-
value | The enum value of enum T to get the associated string from. |
pResult | The string of the as argument passed enum value or nullptr if it could not be found.- Parameters
-
value | - Returns
true on success, otherwise false .
|
|
◆ TryGetEnumValueInternal()
Tries to get the enum value of the specified string.
- Parameters
-
fieldName | The string to get the associated enum value from. |
value | The resulting enum value. |
- Returns
true
on success, otherwise false
.
The documentation for this class was generated from the following file: