Wolframe, 0.0.3

_Wolframe::config::Parser::RangeDomain< DomainValueType > Class Template Reference

Describes a value domain for a range of values. More...

#include <valueParser.hpp>

Inheritance diagram for _Wolframe::config::Parser::RangeDomain< DomainValueType >:
_Wolframe::config::Parser::BaseTypeDomain

Public Member Functions

 RangeDomain (const DomainValueType &min_, const DomainValueType &max_=std::numeric_limits< DomainValueType >::max())
 Constructor. More...
 
string getDomainDescription () const
 Get the description of the set of values allowed as string for the error log message. More...
 
template<typename ValueType >
bool check (const ValueType &val, string &explanation) const
 Checks if the configuration value is in the expected domain. More...
 
- Public Member Functions inherited from _Wolframe::config::Parser::BaseTypeDomain
 BaseTypeDomain ()
 Constructor. More...
 
template<typename ValueType >
bool check (const ValueType &, string &) const
 Checks if the configuration value is in the expected domain. More...
 
template<typename ValueType >
bool parse (ValueType &value, const string &token, string &explanation) const
 Parses the token string and maps it to its value representation. More...
 

Private Attributes

DomainValueType m_min
 
DomainValueType m_max
 

Detailed Description

template<typename DomainValueType>
class _Wolframe::config::Parser::RangeDomain< DomainValueType >

Describes a value domain for a range of values.

Describes a value domain for a value that must differ from its default (empty) initialization.

Template Parameters
DomainValueTypetype of the value the range is formed of

Constructor & Destructor Documentation

template<typename DomainValueType >
_Wolframe::config::Parser::RangeDomain< DomainValueType >::RangeDomain ( const DomainValueType &  min_,
const DomainValueType &  max_ = std::numeric_limits<DomainValueType>::max() 
)
inline

Constructor.

Parameters
[in]min_minimal allowed value of the range
[in]max_maximal allowed value of the range

Member Function Documentation

template<typename DomainValueType >
template<typename ValueType >
bool _Wolframe::config::Parser::RangeDomain< DomainValueType >::check ( const ValueType &  val,
string explanation 
) const
inline

Checks if the configuration value is in the expected domain.

Template Parameters
ValueTypetype of the value to check
Parameters
[in]valvalue to check, if its in this domain
[out]explanationpart of the error message in case of error explaining why it failed
template<typename DomainValueType >
string _Wolframe::config::Parser::RangeDomain< DomainValueType >::getDomainDescription ( ) const
inline

Get the description of the set of values allowed as string for the error log message.

Member Data Documentation

template<typename DomainValueType >
DomainValueType _Wolframe::config::Parser::RangeDomain< DomainValueType >::m_max
private
template<typename DomainValueType >
DomainValueType _Wolframe::config::Parser::RangeDomain< DomainValueType >::m_min
private

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