Helpers for enum class IO.
|
| template<typename ENUM > |
| std::string | CASM::help () |
| | Print help message describing recognized strings for allowed enum values. More...
|
| |
| template<typename ENUM > |
| void | CASM::invalid_enum_string (std::string val, std::ostream &serr) |
| | Throw invalid_argument error for unrecognized strings. More...
|
| |
| template<typename ENUM > |
| std::string | CASM::to_string (ENUM val) |
| | Return string representation of enum class. More...
|
| |
| template<typename ENUM > |
| ENUM | CASM::from_string (const std::string &val) |
| | Return enum class object from string representation. More...
|
| |
template<typename ENUM >
| ENUM CASM::from_string |
( |
const std::string & |
val | ) |
|
Return enum class object from string representation.
Definition at line 92 of file EnumIO.hh.
template<typename ENUM >
| std::string CASM::help |
( |
| ) |
|
Print help message describing recognized strings for allowed enum values.
Of form:
Options are:
FRAC or frac or DIRECT or direct
INTEGRAL or integral
Definition at line 38 of file EnumIO.hh.
template<typename ENUM >
| void CASM::invalid_enum_string |
( |
std::string |
val, |
|
|
std::ostream & |
serr |
|
) |
| |
Throw invalid_argument error for unrecognized strings.
Prints to serr:
Invalid CoordType: mistakevalue
Options are:
FRAC or frac or DIRECT or direct
INTEGRAL or integral
Definition at line 70 of file EnumIO.hh.
template<typename ENUM >
| std::string CASM::to_string |
( |
ENUM |
val | ) |
|
Return string representation of enum class.
Definition at line 83 of file EnumIO.hh.