A class to hold a list of named parameters.
More...
#include <mia/core/optparam.hh>
A class to hold a list of named parameters.
It takes care of setting the parameters based on its names, and can check whether required parameters are really set.
Definition at line 42 of file optparam.hh.
◆ PParameter
a shared pointer to a parameter to make handling easier
Definition at line 47 of file optparam.hh.
◆ add_dependend_handlers()
void CParamList::add_dependend_handlers |
( |
HandlerHelpMap & |
handler_map | ) |
const |
Add all plug-in handlers that may be called by processing this parameter list
- Parameters
-
[in,out] | handler_map | the map to add the handlers to |
◆ check_required()
void CParamList::check_required |
( |
| ) |
const |
checks whether all required parameters have been set and throws an invalid_argument exception if not.
◆ get_help_xml()
void CParamList::get_help_xml |
( |
CXMLElement & |
root | ) |
const |
Append the help for this parameter list to the given root node
- Parameters
-
[in,out] | root | the root node of the XML tree |
◆ has_key()
bool CParamList::has_key |
( |
const std::string & |
key | ) |
const |
- Parameters
-
- Returns
- true if the parameter list already has a parameter named key
◆ operator[]()
PParameter& CParamList::operator[] |
( |
const std::string & |
key | ) |
|
The operator to access the parameters in the list
- Parameters
-
key | the name of the parameter |
- Returns
- (shared) pointer to the associated parameter (or creates a new empty one)
◆ print_help()
void CParamList::print_help |
( |
std::ostream & |
os | ) |
const |
prints out help strings for all parameters in the list
- Parameters
-
os | the output stream to write the help to. |
◆ set()
Set all the parameters that are given in the option list. If a parameter is unknown to the list, it throws an invalid_argument exception
- Parameters
-
options | a map of <key, value> string pairs |
The documentation for this class was generated from the following file: