Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::ParameterList Class Reference

Parameter list. More...

#include </__w/arcaneframework.github.io/arcaneframework.github.io/framework/arccore/src/common/arccore/common/ParameterList.h>

Collaboration diagram for Arcane::ParameterList:

Classes

class  Impl

Public Member Functions

 ParameterList ()
 Implementation.
 ParameterList (const ParameterList &rhs)
 Constructs a dictionary.
 ~ParameterList ()
 Frees resources.
String getParameterOrNull (const String &param_name) const
 Retrieves the parameter with name param_name.
bool addParameterLine (const String &line)
 Parses the line line.
void fillParameters (StringList &param_names, StringList &values) const
 Retrieves the list of parameters and their values.

Private Attributes

Implm_p = nullptr
 Implementation.

Friends

class ParameterListWithCaseOption

Detailed Description

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.

Constructor & Destructor Documentation

◆ ParameterList() [1/2]

Arcane::ParameterList::ParameterList ( )

Implementation.

Constructs a dictionary

Definition at line 134 of file ParameterList.cc.

References m_p.

Referenced by ParameterList().

Here is the caller graph for this function:

◆ ParameterList() [2/2]

Arcane::ParameterList::ParameterList ( const ParameterList & rhs)

Constructs a dictionary.

Definition at line 143 of file ParameterList.cc.

References m_p, and ParameterList().

Here is the call graph for this function:

◆ ~ParameterList()

Arcane::ParameterList::~ParameterList ( )

Frees resources.

Definition at line 152 of file ParameterList.cc.

References m_p.

Member Function Documentation

◆ addParameterLine()

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:

  1. A=B,
  2. A:=B
  3. A+=B,
  4. A-=B

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.

Return values
falseif a parameter could be parsed
trueotherwise.

Definition at line 170 of file ParameterList.cc.

References Arcane::String::bytes(), m_p, and Arcane::String::substring().

Here is the call graph for this function:

◆ fillParameters()

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.

References m_p.

Referenced by Arcane::ParameterListWithCaseOption::addParameters().

Here is the caller graph for this function:

◆ getParameterOrNull()

String Arcane::ParameterList::getParameterOrNull ( const String & param_name) const

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.

References m_p.

◆ ParameterListWithCaseOption

friend class ParameterListWithCaseOption
friend

Member Data Documentation

◆ m_p

Impl* Arcane::ParameterList::m_p = nullptr
private

The documentation for this class was generated from the following files: