#include <directives.h>
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. |
Conversions are done with strtoul() instead of strtol() (therefore the range of possible values is 0..ULONG_MAX).
conf::ConfUint< T >::ConfUint | ( | std::string const & | name, | |
bool | reloadable, | |||
T | minvalue, | |||
T | 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.
[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. |
conf::ConfUint< T >::ConfUint | ( | std::string const & | name, | |
T const & | defval, | |||
bool | reloadable, | |||
T | minvalue, | |||
T | 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.
[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. |