The class implements an adapter for enums to define the string literals of the enum entries.
More...
#include <EnumStrings.hxx>
|
| static const char * | GetEntry (T key) |
| | Returns the string of the specified enum entry. More...
|
| |
| static bool | TryGetEntryValue (const char *name, T &value) |
| | Tries to return the enum entry of the specified string. More...
|
| |
|
|
class | Enum< T > |
| |
| const char * | GetEnumString (T key) |
| | This helper function returns the string of the specified enum entry. More...
|
| |
| bool | TryGetEnumValue (const char *name, T &value) |
| | This helper function tries to return the enum entry of the specified string. More...
|
| |
template<class T>
class Arp::EnumStrings< 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;.
◆ GetEntry()
Returns the string of the specified enum entry.
- Parameters
-
| key | The enum entry of enmum T to get the associated string from. |
- Returns
- The string literal of the as argument passed enum entry.
◆ TryGetEntryValue()
Tries to return the enum entry of the specified string.
- Parameters
-
| name | The string to get the associated enum entry of enum T from. |
| value | The enum entry of enum T associated to the argument passed name . |
- Returns
true on success, otherwise false.
◆ GetEnumString
template<class T >
| const char* GetEnumString |
( |
T |
key | ) |
|
|
friend |
This helper function returns the string of the specified enum entry.
- Template Parameters
-
- Parameters
-
| key | The enum entry of enmum T to get the associated string from. |
- Returns
- The string literal of the as argument passed enum entry.
◆ TryGetEnumValue
template<class T >
| bool TryGetEnumValue |
( |
const char * |
name, |
|
|
T & |
value |
|
) |
| |
|
friend |
This helper function tries to return the enum entry of the specified string.
- Template Parameters
-
- Parameters
-
| name | The string to get the associated enum entry of enum T from. |
| value | The enum entry of enum T associated to the argument passed name . |
- Returns
true on success, otherwise false.
The documentation for this class was generated from the following file: