Provides enum <-> string conversion facilities.
More...
#include <EnumStrings.hpp>
|
using | enum_type = ENUM |
| Alias for the enumeration type.
|
|
using | base_type = std::underlying_type_t< ENUM > |
| Alias for enum's underlying fundamental type.
|
|
template<typename ENUM>
struct geosx::EnumStrings< ENUM >
Provides enum <-> string conversion facilities.
- Template Parameters
-
Definition at line 97 of file EnumStrings.hpp.
◆ concat()
Get a list of valid options as a delimited string.
- Parameters
-
delim | delimiter (defaults to single space) |
- Returns
- the string containing all valid strings for this type
Definition at line 118 of file EnumStrings.hpp.
◆ fromString()
Convert string to enum.
- Parameters
-
- Returns
- the corresponding enum value
Definition at line 146 of file EnumStrings.hpp.
◆ get()
- Returns
- An array of strings associated with enumeration.
Definition at line 108 of file EnumStrings.hpp.
◆ toString()
Convert enum to string.
- Parameters
-
e | the enum value to convert |
- Returns
- the corresponding string
An error is raised if enum's numerical value is greater of equal than the number of strings.
Definition at line 131 of file EnumStrings.hpp.
The documentation for this struct was generated from the following file: