Parameter list. More...
#include <arccore/common/ParameterList.h>
Classes | |
| class | Impl |
Public Member Functions | |
| ParameterList () | |
| Implementation. | |
| ParameterList (const ParameterList &rhs) | |
| Constructs a dictionary. | |
| ~ParameterList () | |
| Frees resources. | |
| String | getParameterOrNull (const String ¶m_name) const |
| Retrieves the parameter with name param_name. | |
| bool | addParameterLine (const String &line) |
| Parses the line line. | |
| void | fillParameters (StringList ¶m_names, StringList &values) const |
| Retrieves the list of parameters and their values. | |
Friends | |
| class | ParameterListWithCaseOption |
Parameter list.
A parameter list is similar to a set (key,value) but a key may potentially be present multiple times (a bit like the std::multi_map class).
Definition at line 36 of file arccore/src/common/arccore/common/ParameterList.h.
| Arcane::ParameterList::ParameterList | ( | ) |
Implementation.
Constructs a dictionary
Definition at line 134 of file ParameterList.cc.
Referenced by ParameterList().
| Arcane::ParameterList::ParameterList | ( | const ParameterList & | rhs | ) |
Constructs a dictionary.
Definition at line 143 of file ParameterList.cc.
References ParameterList().
| Arcane::ParameterList::~ParameterList | ( | ) |
Frees resources.
Definition at line 152 of file ParameterList.cc.
| bool Arcane::ParameterList::addParameterLine | ( | const String & | line | ) |
Parses the line line.
The line must have one of the following forms, with A the parameter and B the value:
In case (1) or (3), the argument's value is added to the already present occurrences. In case (2), the argument's value replaces all already present occurrences. In case (4), the occurrence having the value B is deleted if it was present and nothing happens if it was absent.
| false | if a parameter could be parsed |
| true | otherwise. |
Definition at line 170 of file ParameterList.cc.
References Arcane::String::bytes(), Arcane::SpanImpl< T, SizeType, Extent >::length(), and Arcane::String::substring().
| void Arcane::ParameterList::fillParameters | ( | StringList & | param_names, |
| StringList & | values ) const |
Retrieves the list of parameters and their values.
Returns in param_names the list of parameter names and in values the associated value.
Definition at line 201 of file ParameterList.cc.
Retrieves the parameter with name param_name.
Returns a null string if there is no parameter with this name.
If the parameter is present multiple times, only the last value is returned.
Definition at line 161 of file ParameterList.cc.
|
friend |
Definition at line 40 of file arccore/src/common/arccore/common/ParameterList.h.