DGtal  1.0.beta
Public Types | Public Member Functions | Protected Attributes
DGtal::Parameters Struct Reference

#include <DGtal/helpers/Parameters.h>

Collaboration diagram for DGtal::Parameters:
[legend]

Public Types

typedef Parameters Self
 

Public Member Functions

 Parameters ()=default
 
 ~Parameters ()=default
 
 Parameters (const Self &other)=default
 
 Parameters (Self &&other)=default
 
Selfoperator= (const Self &other)=default
 
 Parameters (std::string name, ParameterValue pv=ParameterValue())
 
Selfoperator() (std::string name, ParameterValue pv=ParameterValue())
 
Selfoperator() (const Self &params)
 
ParameterValue operator[] (std::string name) const
 
bool count (std::string name) const
 
Self operator| (const Self &other) const
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 

Protected Attributes

std::map< std::string, ParameterValuemyParameters
 

Detailed Description

This class represents a set of (input) simple parameters, i.e. mapping names to values.

Definition at line 127 of file Parameters.h.

Member Typedef Documentation

The type of *this.

Definition at line 129 of file Parameters.h.

Constructor & Destructor Documentation

DGtal::Parameters::Parameters ( )
default

Default constructor.

DGtal::Parameters::~Parameters ( )
default

Default destructor.

DGtal::Parameters::Parameters ( const Self other)
default

Default copy constructor.

DGtal::Parameters::Parameters ( Self &&  other)
default

Default move.

DGtal::Parameters::Parameters ( std::string  name,
ParameterValue  pv = ParameterValue() 
)

Constructor. Add parameter (name) or (name,pv)

Parameters
[in]namethe name of the parameter.
[in]pvthe value of the parameter (string,int,float,double).

Member Function Documentation

bool DGtal::Parameters::count ( std::string  name) const
Parameters
[in]nameany parameter name
Returns
'true' if and only if the parameter has been set or assigned.
bool DGtal::Parameters::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.
Self& DGtal::Parameters::operator() ( std::string  name,
ParameterValue  pv = ParameterValue() 
)

Add parameter (name) or (name,pv).

Parameters
[in]namethe name of the parameter.
[in]pvthe value of the parameter (string,int,float,double).
Self& DGtal::Parameters::operator() ( const Self params)

Add parameters params to this object.

Parameters
[in]paramsa set of parameters
Self& DGtal::Parameters::operator= ( const Self other)
default

Default assignment operator.

ParameterValue DGtal::Parameters::operator[] ( std::string  name) const
Parameters
[in]nameany parameter name
Returns
the associated value (if it does not exist, return "UNSET PARAMETER").
Self DGtal::Parameters::operator| ( const Self other) const

Merge the two parameter sets and returns a new one.

Parameters
[in]othera set of parameters
void DGtal::Parameters::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

Field Documentation

std::map< std::string, ParameterValue > DGtal::Parameters::myParameters
protected

Definition at line 179 of file Parameters.h.


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