conf::ConfUint< T > Class Template Reference

Class implementing an unsigned integer directive type. More...

#include <directives.h>

Inheritance diagram for conf::ConfUint< T >:

conf::ConfInt< T > conf::ConfValue< T > conf::ConfDir List of all members.

Public Member Functions

 ConfUint (std::string const &name, bool reloadable, T minvalue, T maxvalue)
 Constructor without default value.
 ConfUint (std::string const &name, T const &defval, bool reloadable, T minvalue, T maxvalue)
 Constructor with default value.
 ConfUint (std::string const &name, bool reloadable)
 ConfArray-specific constructor.
virtual char const * label (size_t index) const
 Implements ConfDir::label().

Protected Member Functions

virtual bool check (Conf &conf, T const &value) const
 Checks if the value is in the m_minvalue..m_maxvalue range.
virtual bool convert (Conf &conf, std::string const &expr, T &result) const
 Ensures expr doesn't start with - then calls ConfInt<T>::convert().
virtual T my_strtol (char const *nptr, char **endptr, int base) const
 Calls the strtoul() function.

Detailed Description

template<class T>
class conf::ConfUint< T >

This class is used to store unsigned integer values (the exact integer type is specified by the template parameter). It inherits from ConfInt.

Conversions are done with strtoul() instead of strtol() (therefore the range of possible values is 0..ULONG_MAX).


Constructor & Destructor Documentation

template<class T>
conf::ConfUint< T >::ConfUint ( std::string const &  name,
bool  reloadable,
minvalue,
maxvalue 
) [inline, explicit]

This constructor sets the directive name and whether it can be reloaded, along with the minimum and maximum values that will be accepted when the directive is set.

Parameters:
[in] name The name of the directive.
[in] reloadable true if the directive can be reloaded, false otherwise.
[in] minvalue The minimum to accept as a value.
[in] maxvalue The maximum to accept as a value.

template<class T>
conf::ConfUint< T >::ConfUint ( std::string const &  name,
T const &  defval,
bool  reloadable,
minvalue,
maxvalue 
) [inline]

This constructor sets the directive name, default value and whether it can be reloaded, along with the minimum and maximum values that will be accepted when the directive is set.

Parameters:
[in] name The name of the directive.
[in] defval The default value.
[in] reloadable true if the directive can be reloaded, false otherwise.
[in] minvalue The minimum to accept as a value.
[in] maxvalue The maximum to accept as a value.


The documentation for this class was generated from the following file:
Generated on Wed Aug 15 00:37:22 2007 for Epona API by  doxygen 1.5.2