Wolframe, 0.0.3

_Wolframe::config::Parser::EnumDomain Class Reference

Describes a value domain for an enumerable fixed set of values. More...

#include <valueParser.hpp>

Inheritance diagram for _Wolframe::config::Parser::EnumDomain:
_Wolframe::config::Parser::BaseTypeDomain _Wolframe::config::Parser::BoolDomain

Public Member Functions

 EnumDomain (unsigned int nofelems, const char **elems)
 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 parse (ValueType &value, const string &token, string &explanation) const
 Parses the token string and maps it to its value representation. 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

unsigned int m_size
 
const char ** m_ar
 

Detailed Description

Describes a value domain for an enumerable fixed set of values.

Constructor & Destructor Documentation

_Wolframe::config::Parser::EnumDomain::EnumDomain ( unsigned int  nofelems,
const char **  elems 
)
inline

Constructor.

Parameters
nofelemsnumber of elements in the enumeration
elemsstring representation of the elements in the enumeration

Member Function Documentation

string _Wolframe::config::Parser::EnumDomain::getDomainDescription ( ) const
inline

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

template<typename ValueType >
bool _Wolframe::config::Parser::EnumDomain::parse ( ValueType &  value,
const string token,
string explanation 
) const
inline

Parses the token string and maps it to its value representation.

Template Parameters
ValueTypetype of the value to get parsed
Parameters
[out]valueparsed value returned
[in]tokentoken string to parse
[out]explanationerror string that will be part of the log message

Member Data Documentation

const char** _Wolframe::config::Parser::EnumDomain::m_ar
private
unsigned int _Wolframe::config::Parser::EnumDomain::m_size
private

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