An object containing all parameters and their values passed into a function.
More...
#include <parameter.hpp>
|
| ParameterMap (ValueMap values) |
| Initializes a new ParameterMap object.
|
void | checkParameterOrder (const std::vector< std::string > &names) |
| Checks the presence of all the arguments, in the order which they should be specified. Prints an error message and exits the program if one of the parameter names is not specified according to the order, or the size of the name vector is not the same as the number of parameters passed into the function.
|
void | checkParameterNameUnordered (const std::vector< std::string > &names) |
| Checks the presence of all the arguments, no matter which order they are specified. Prints an error message and exits the program if one of the parameter names specified is not found, or the size of the name vector is not the same as the number of parameters passed into the function.
|
template<typename ValueT> |
ValueT | getItem (const std::string &name) |
| Gets an item from the current parameter map.
|
template<typename ValueT> |
ValueT | getItem (const std::string &name, const ValueT &fallback) |
| Gets an item from the current parameter map. Returns the fallback the matching parameter if not found.
|
An object containing all parameters and their values passed into a function.
◆ ParameterMap()
steppable::__internals::parameter::ParameterMap::ParameterMap |
( |
ValueMap | values | ) |
|
|
inline |
◆ checkParameterNameUnordered()
void steppable::__internals::parameter::ParameterMap::checkParameterNameUnordered |
( |
const std::vector< std::string > & | names | ) |
|
Checks the presence of all the arguments, no matter which order they are specified. Prints an error message and exits the program if one of the parameter names specified is not found, or the size of the name vector is not the same as the number of parameters passed into the function.
- Parameters
-
◆ checkParameterOrder()
void steppable::__internals::parameter::ParameterMap::checkParameterOrder |
( |
const std::vector< std::string > & | names | ) |
|
Checks the presence of all the arguments, in the order which they should be specified. Prints an error message and exits the program if one of the parameter names is not specified according to the order, or the size of the name vector is not the same as the number of parameters passed into the function.
- Parameters
-
◆ getItem() [1/2]
template<typename ValueT>
ValueT steppable::__internals::parameter::ParameterMap::getItem |
( |
const std::string & | name | ) |
|
|
inline |
Gets an item from the current parameter map.
- Parameters
-
name | The name of the parameter. |
- Returns
- A value from the parameter list.
◆ getItem() [2/2]
template<typename ValueT>
ValueT steppable::__internals::parameter::ParameterMap::getItem |
( |
const std::string & | name, |
|
|
const ValueT & | fallback ) |
|
inline |
Gets an item from the current parameter map. Returns the fallback the matching parameter if not found.
- Parameters
-
name | The name of the parameter. |
fallback | If no matching parameter is specified, returns the fallback. |
- Returns
- A value from the parameter list or the fallback.
◆ values
ValueMap steppable::__internals::parameter::ParameterMap::values |
The documentation for this struct was generated from the following files: