1 #ifndef CONFIGLET_CLASS
2 #define CONFIGLET_CLASS
162 void minimum(
int new_min) { _minimum = new_min; }
163 void maximum(
int new_max) { _maximum = new_max; }
Provides a dynamically resizable ASCII character string.
static const astring & empty_string()
useful wherever empty strings are needed, e.g., function defaults.
Stores an integer in a configuration repository with range checking.
bounded_int_configlet(const basis::astring §ion, const basis::astring &entry, int current_value, int default_value, int minimum, int maximum)
void maximum(int new_max)
configlet * duplicate() const
a virtual copy constructor for configlets.
void minimum(int new_min)
virtual ~bounded_int_configlet()
Represents an atom of configuration info.
DEFINE_CLASS_NAME("configlet")
configlet & operator=(const configlet &to_copy)
const basis::astring & section() const
observes the section of this configlet.
configlet(const basis::astring §ion, const basis::astring &entry)
creates a configlet that lives in the "section" at the "entry".
virtual configlet * duplicate() const =0
a virtual copy constructor for configlets.
virtual bool store(configurator &config) const =0
writes the configlet's information out to the "config".
const basis::astring & entry() const
observes the entry name of this configlet.
virtual bool load(configurator &config)=0
retrieves the configlet's information from the "config".
Provides a base class for configuration repositories.
Stores a simple integer in a configuration repository.
int_configlet(const basis::astring §ion, const basis::astring &entry, int current_value=0, int default_value=0)
void default_value(int new_default)
int default_value() const
virtual bool store(configurator &config) const
writes the configlet's information out to the "config".
configlet * duplicate() const
a virtual copy constructor for configlets.
virtual bool load(configurator &config)
retrieves the configlet's information from the "config".
int current_value() const
a string_configlet holds onto a character string value.
const basis::astring & current_value() const
virtual bool store(configurator &config) const
writes the configlet's information out to the "config".
virtual bool load(configurator &config)
retrieves the configlet's information from the "config".
configlet * duplicate() const
a virtual copy constructor for configlets.
string_configlet & operator=(const string_configlet &to_copy)
virtual ~string_configlet()
string_configlet(const basis::astring §ion, const basis::astring &entry, const basis::astring ¤t_value=basis::astring::empty_string(), const basis::astring &default_value=basis::astring::empty_string())
const basis::astring & default_value() const