78 if( exists( name ) ) {
86 return _parameters.find( name ) != _parameters.end() ;
92 auto iter = _parameters.find( name ) ;
93 if( iter == _parameters.end() ) {
96 return iter->second->isSet() ;
102 _parameters.clear() ;
108 std::for_each( begin(), end(), [](
auto &p ){ p.second->reset(); } ) ;
114 return _parameters.begin() ;
120 return _parameters.begin() ;
126 return _parameters.end() ;
132 return _parameters.end() ;
TypeFunction _typeFunction
The function converting the parameter type to string.
ParameterMap::const_iterator const_iterator
void checkParameter(const std::string &name) const
Check if the parameter has been registered.
bool hasDefault() const
Whether the default has been at construct time.
ParameterMap::iterator iterator
bool _isSet
Whether the parameter is set.
EParameterType
EParameterType enumerator Enumerates parameter types supported by Marlin.
std::string typeStr() const
Get the parameter type as string.
bool isSet() const
Whether the parameter has been set.
constexpr unsigned long long value(const Flag_t &flag)
std::string _name
The parameter name.
ValueType _defaultValue
The address to the parameter default value.
ResetFunction _resetFunction
The function resetting the parameter value.
#define MARLINMT_THROW(message)
std::type_index _typeIndex
The type index object of the underlying parameter type.
EParameterType _type
The parameter type.
void reset()
Reset the parameter value.
void unset()
Unset all registered parameters.
std::string str() const
Get the parameter value as string.
const std::string & name() const
Get the parameter name.
const std::type_index & typeIndex() const
Get a type index object of the underlying type.
const std::string & description() const
Get the parameter description.
bool isSet(const std::string &name) const
Returns true if the parameter exists and is set, false otherwise.
bool exists(const std::string &name) const
Return true if the parameter has been registered.
void clear()
Remove all parameters.
FromStrFunction _fromStrFunction
StrFunction _strFunction
The function converting the parameter value to string.
EParameterType type() const
Get the parameter name.
ValueType _value
The address to the parameter value.
std::string _description
The parameter description.
std::string defaultStr() const
Get the default value as string.