Public Types | |
enum | opt : uint32_t { wat = (1 << 0), oil = (1 << 1), gas = (1 << 2), polymer = (1 << 3), solvent = (1 << 4) } |
using | enum_size = std::underlying_type< opt >::type |
Public Member Functions | |
bool | has (opt) const |
Query if a value is set. | |
double | get (opt m) const |
Read the value indicated by m. More... | |
double | get (opt m, double default_value) const |
Read the value indicated by m. More... | |
Rates & | set (opt m, double value) |
Set the value specified by m. More... | |
bool | any () const noexcept |
true if any option is set; false otherwise | |
|
inline |
Read the value indicated by m.
Throws an exception if if the requested value is unset.
|
inline |
Read the value indicated by m.
Returns a default value if the requested value is unset.
|
inline |
Set the value specified by m.
Throws an exception if multiple values are requested. Returns a self-reference to support chaining.