feisty meow concerns codebase
2.140
|
Stores an integer in a configuration repository with range checking. More...
#include <configlet.h>
Public Member Functions | |
bounded_int_configlet (const basis::astring §ion, const basis::astring &entry, int current_value, int default_value, int minimum, int maximum) | |
virtual | ~bounded_int_configlet () |
virtual void | current_value (int new_current) |
the modifier function is virtual so derived classes can extend. More... | |
int | minimum () const |
int | maximum () const |
void | minimum (int new_min) |
void | maximum (int new_max) |
configlet * | duplicate () const |
a virtual copy constructor for configlets. More... | |
Public Member Functions inherited from configuration::int_configlet | |
int_configlet (const basis::astring §ion, const basis::astring &entry, int current_value=0, int default_value=0) | |
virtual | ~int_configlet () |
int | current_value () const |
int | default_value () const |
void | default_value (int new_default) |
virtual bool | load (configurator &config) |
retrieves the configlet's information from the "config". More... | |
virtual bool | store (configurator &config) const |
writes the configlet's information out to the "config". More... | |
Public Member Functions inherited from configuration::configlet | |
configlet (const basis::astring §ion, const basis::astring &entry) | |
creates a configlet that lives in the "section" at the "entry". More... | |
configlet (const configlet &to_copy) | |
virtual | ~configlet () |
DEFINE_CLASS_NAME ("configlet") | |
configlet & | operator= (const configlet &to_copy) |
const basis::astring & | section () const |
observes the section of this configlet. More... | |
const basis::astring & | entry () const |
observes the entry name of this configlet. More... | |
void | section (const basis::astring &new_section) const |
modifies the configlet section location. More... | |
void | entry (const basis::astring &new_entry) const |
modifies the configlet entry name. More... | |
Stores an integer in a configuration repository with range checking.
a bounded_int_configlet has current and default values but also specifies a valid range for the current value. if the current value falls outside of that range (even via a "set" operation), then the default value is used for the current.
Definition at line 150 of file configlet.h.
configuration::bounded_int_configlet::bounded_int_configlet | ( | const basis::astring & | section, |
const basis::astring & | entry, | ||
int | current_value, | ||
int | default_value, | ||
int | minimum, | ||
int | maximum | ||
) |
Definition at line 153 of file configlet.cpp.
Referenced by duplicate().
|
virtual |
Definition at line 162 of file configlet.cpp.
|
virtual |
the modifier function is virtual so derived classes can extend.
Reimplemented from configuration::int_configlet.
Definition at line 164 of file configlet.cpp.
References configuration::int_configlet::current_value(), and configuration::int_configlet::default_value().
|
virtual |
a virtual copy constructor for configlets.
the returned object will be a new copy of this configlet.
Reimplemented from configuration::int_configlet.
Definition at line 173 of file configlet.cpp.
References bounded_int_configlet().
|
inline |
Definition at line 160 of file configlet.h.
|
inline |
Definition at line 163 of file configlet.h.
|
inline |
Definition at line 159 of file configlet.h.
|
inline |
Definition at line 162 of file configlet.h.