cat3d main configuration options class
More...
#include <opts.hpp>
|
|
typedef std::unordered_map< opt, std::any > | opt_map |
| |
|
| | opts (opt_map opt) |
| | initialize the options object More...
|
| |
| template<typename T > |
| T | get (opt key) const |
| | Retrieve the value at the given key. More...
|
| |
| template<typename T > |
| T | get (opt key, T fallback) const |
| | Retrieve the value at the given key. More...
|
| |
cat3d main configuration options class
◆ opts()
| cat3d::opts::opts |
( |
opt_map |
opt | ) |
|
initialize the options object
- Parameters
-
| opt | the map of key-value pairs corresponding to the program |
◆ get() [1/2]
template<typename T >
| T cat3d::opts::get |
( |
opt |
key | ) |
const |
|
inline |
Retrieve the value at the given key.
- Template Parameters
-
| T | The type of value expected at this key |
- Parameters
-
- Returns
- const T& A const reference to that value
◆ get() [2/2]
template<typename T >
| T cat3d::opts::get |
( |
opt |
key, |
|
|
T |
fallback |
|
) |
| const |
|
inline |
Retrieve the value at the given key.
- Template Parameters
-
| T | The type of value expected at this key |
- Parameters
-
| key | The key |
| fallback | Fallback option if the key does not exist. |
- Returns
- const T& A const reference to that value
The documentation for this class was generated from the following file: