igor::iParameters Class Reference

#include <iParameters.h>

Public Member Functions

 iParameters ()=default
 
 iParameters (const iParametersMap &parameters)
 
template<typename T >
getParameter (const iaString &name, const T &defaultValue=T()) const
 
bool hasParameter (const iaString &name) const
 
void setParameter (const iaString &name, const std::any value)
 
const iParametersMapgetParameters () const
 
template<typename T >
getParameter (const iaString &name, const T &defaultValue) const
 

Detailed Description

a key value list of parameters

Constructor & Destructor Documentation

◆ iParameters() [1/2]

igor::iParameters::iParameters ( )
default

does nothing

◆ iParameters() [2/2]

igor::iParameters::iParameters ( const iParametersMap parameters)
explicit

init members

Parameters
parametersthe parameters

Member Function Documentation

◆ getParameter() [1/2]

template<typename T >
T igor::iParameters::getParameter ( const iaString &  name,
const T &  defaultValue 
) const

◆ getParameter() [2/2]

template<typename T >
T igor::iParameters::getParameter ( const iaString name,
const T &  defaultValue = T() 
) const
Returns
value for given parameter name

if name does not exist it returns some default value

Parameters
namethe parameter name
defaultValuethe given default value

◆ getParameters()

const std::unordered_map< iaString, std::any > & igor::iParameters::getParameters ( ) const
Returns
all parameters

◆ hasParameter()

bool igor::iParameters::hasParameter ( const iaString name) const
Returns
true if given key exists
Parameters
namename of parameter

◆ setParameter()

void igor::iParameters::setParameter ( const iaString name,
const std::any  value 
)

sets value for given parameter

Parameters
namename of parameter
valuethe value to set

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