|
|
using | variant_t = std::variant< double, float, bool, std::string, unsigned int, int, ParameterList > |
| |
|
|
| ParameterList (const ParameterList &)=default |
| |
| template<typename T > |
| void | add (const std::string &key, const T &value) |
| |
| template<typename T > |
| T | get (const std::string &key) const |
| |
| template<typename T > |
| T | get (const std::string &key, const T &defval) const |
| |
| void | merge (const ParameterList &p) noexcept |
| |
| void | update (const ParameterList &p) noexcept |
| |
| template<typename T > |
| void | update (const std::string &key, const T &value) |
| |
|
ParameterList & | operator= (const ParameterList &other) |
| |
|
|
std::map< std::string, variant_t > | params_m |
| |
◆ add()
template<typename T >
| void ippl::ParameterList::add |
( |
const std::string & |
key, |
|
|
const T & |
value |
|
) |
| |
|
inline |
Add a single parameter to this list.
- Parameters
-
| key | is the name of the parameter |
| value | is the parameter value |
◆ get() [1/2]
template<typename T >
| T ippl::ParameterList::get |
( |
const std::string & |
key | ) |
const |
|
inline |
Obtain the value of a parameter. This function throws an error if the key is not contained.
- Parameters
-
| key | the name of the parameter |
- Returns
- the value of a parameter
◆ get() [2/2]
template<typename T >
| T ippl::ParameterList::get |
( |
const std::string & |
key, |
|
|
const T & |
defval |
|
) |
| const |
|
inline |
Obtain the value of a parameter. If the key is not contained, the default value is returned.
- Parameters
-
| key | the name of the parameter |
| defval | the default value of the parameter |
- Returns
- the value of a parameter
◆ merge()
Merge a parameter list into this parameter list.
- Parameters
-
| p | the parameter list to merge into this |
◆ update() [1/2]
Update the parameter values of this list with the values provided in the input parameter list.
- Parameters
-
| p | the input parameter list with update parameter values |
◆ update() [2/2]
template<typename T >
| void ippl::ParameterList::update |
( |
const std::string & |
key, |
|
|
const T & |
value |
|
) |
| |
|
inline |
Update the single parameter value of this list.
- Parameters
-
| key | is the name of the parameter |
| value | is the parameter value |
◆ operator<<
| std::ostream & operator<< |
( |
std::ostream & |
os, |
|
|
const ParameterList & |
sp |
|
) |
| |
|
friend |
Print this parameter list.
The documentation for this class was generated from the following file: