AnCH Framework 0.1
Another C++ Hack Framework
 
Loading...
Searching...
No Matches
anch::resource::Section Class Reference

#include <section.hpp>

+ Collaboration diagram for anch::resource::Section:

Public Member Functions

 Section ()
 
 Section (const Section &section)
 
 ~Section ()
 
const std::map< std::string, std::string > & getParameters () const
 
void setParameters (const std::map< std::string, std::string > &parameters)
 
void addParameter (const std::string &param, const std::string &value)
 
virtual const std::string & getParameter (const std::string &parameterName) const
 
virtual std::optional< std::string > parameter (const std::string &param) const
 

Static Public Attributes

static std::string DEFAULT_VALUE
 

Detailed Description

Parameters defined in a section

Author
Vincent Lachenal

Constructor & Destructor Documentation

◆ Section() [1/2]

anch::resource::Section::Section ( )

Section default constructor

◆ Section() [2/2]

anch::resource::Section::Section ( const Section & section)

Section copy constructor

+ Here is the call graph for this function:

◆ ~Section()

anch::resource::Section::~Section ( )

Section destructor

Member Function Documentation

◆ addParameter()

void anch::resource::Section::addParameter ( const std::string & param,
const std::string & value )

Add parameter to section

Parameters
paramThe parameter
valueThe associated value

◆ getParameter()

virtual const std::string & anch::resource::Section::getParameter ( const std::string & parameterName) const
virtual

Parameter getter.
Search a parameter value by parameter name. If not found, an empty string will be returned.

Parameters
parameterNameThe parameter's name
Returns
The parameter value or empty if not found

◆ getParameters()

const std::map< std::string, std::string > & anch::resource::Section::getParameters ( ) const

Parameters getter

Returns
The parameters

◆ parameter()

virtual std::optional< std::string > anch::resource::Section::parameter ( const std::string & param) const
virtual

Access parameter

Parameters
paramthe parameter name
Returns
the optional result

◆ setParameters()

void anch::resource::Section::setParameters ( const std::map< std::string, std::string > & parameters)

Parameters setter

Parameters
parametersThe parameters

Member Data Documentation

◆ DEFAULT_VALUE

std::string anch::resource::Section::DEFAULT_VALUE
static

Parameter default value when not found


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