#include <section.hpp>
Public Member Functions | |
Section () | |
Section (const Section §ion) | |
~Section () | |
const std::map< std::string, std::string > & | getParameters () const |
void | setParameters (const std::map< std::string, std::string > ¶meters) |
void | addParameter (const std::string ¶m, const std::string &value) |
virtual const std::string & | getParameter (const std::string ¶meterName) const |
virtual std::optional< std::string > | parameter (const std::string ¶m) const |
Static Public Attributes | |
static std::string | DEFAULT_VALUE |
Parameters defined in a section
anch::resource::Section::Section | ( | ) |
Section default constructor
anch::resource::Section::Section | ( | const Section & | section | ) |
anch::resource::Section::~Section | ( | ) |
Section destructor
void anch::resource::Section::addParameter | ( | const std::string & | param, |
const std::string & | value ) |
Add parameter to section
param | The parameter |
value | The associated value |
|
virtual |
Parameter getter.
Search a parameter value by parameter name. If not found, an empty string will be returned.
parameterName | The parameter's name |
const std::map< std::string, std::string > & anch::resource::Section::getParameters | ( | ) | const |
Parameters getter
|
virtual |
Access parameter
param | the parameter name |
void anch::resource::Section::setParameters | ( | const std::map< std::string, std::string > & | parameters | ) |
Parameters setter
parameters | The parameters |
|
static |
Parameter default value when not found