#include <configlet.h>
Inheritance diagram for configlet:


Public Member Functions | |
| configlet (const istring §ion, const istring &entry) | |
| creates a configlet that lives in the "section" at the "entry". | |
| configlet (const configlet &to_copy) | |
| virtual | ~configlet () |
| IMPLEMENT_CLASS_NAME ("configlet") | |
| configlet & | operator= (const configlet &to_copy) |
| const istring & | section () const |
| observes the section of this configlet. | |
| const istring & | entry () const |
| observes the entry name of this configlet. | |
| void | section (const istring &new_section) const |
| modifies the configlet section location. | |
| void | entry (const istring &new_entry) const |
| modifies the configlet entry name. | |
| virtual bool | load (configurator &config)=0 |
| retrieves the configlet's information from the "config". | |
| virtual bool | store (configurator &config) const =0 |
| writes the configlet's information out to the "config". | |
| virtual configlet * | duplicate () const=0 |
| a virtual copy constructor for configlets. | |
The configlet has a location in a configuration repository that is defined by its section and key name. Derived types can also have a value that is stored in that location.
Definition at line 33 of file configlet.h.
creates a configlet that lives in the "section" at the "entry".
Definition at line 28 of file configlet.cpp.
| configlet::configlet | ( | const configlet & | to_copy | ) |
Definition at line 33 of file configlet.cpp.
| configlet::~configlet | ( | ) | [virtual] |
| configlet::IMPLEMENT_CLASS_NAME | ( | "configlet" | ) |
| const istring & configlet::section | ( | ) | const |
observes the section of this configlet.
Definition at line 53 of file configlet.cpp.
Referenced by string_configlet::duplicate(), configuration_list::find(), int_configlet::load(), string_configlet::load(), int_configlet::store(), string_configlet::store(), and configuration_list::zap().
| const istring & configlet::entry | ( | ) | const |
observes the entry name of this configlet.
Definition at line 55 of file configlet.cpp.
Referenced by string_configlet::duplicate(), configuration_list::find(), int_configlet::load(), string_configlet::load(), int_configlet::store(), string_configlet::store(), and configuration_list::zap().
| void configlet::section | ( | const istring & | new_section | ) | const |
| void configlet::entry | ( | const istring & | new_entry | ) | const |
| virtual bool configlet::load | ( | configurator & | config | ) | [pure virtual] |
retrieves the configlet's information from the "config".
true is returned when this is successful. note that false is returned if the entry was not originally present; if the configurator has the AUTO_STORE behavior, then we will write out the default value on failure. the next load() would be a success in that case, but would return the default.
Implemented in string_configlet, and int_configlet.
| virtual bool configlet::store | ( | configurator & | config | ) | const [pure virtual] |
writes the configlet's information out to the "config".
Implemented in string_configlet, and int_configlet.
| virtual configlet* configlet::duplicate | ( | ) | const [pure virtual] |
a virtual copy constructor for configlets.
the returned object will be a new copy of this configlet.
Implemented in string_configlet, int_configlet, and bounded_int_configlet.
Referenced by configuration_list::add().
1.5.1