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


Public Member Functions | |
| string_configlet (const istring §ion, const istring &entry, const istring ¤t_value=istring::empty_string(), const istring &default_value=istring::empty_string()) | |
| string_configlet (const string_configlet &to_copy) | |
| virtual | ~string_configlet () |
| string_configlet & | operator= (const string_configlet &to_copy) |
| const istring & | current_value () const |
| const istring & | default_value () const |
| void | current_value (const istring &new_current) |
| void | default_value (const istring &new_default) |
| virtual bool | load (configurator &config) |
| retrieves the configlet's information from the "config". | |
| virtual bool | store (configurator &config) const |
| writes the configlet's information out to the "config". | |
| configlet * | duplicate () const |
| a virtual copy constructor for configlets. | |
it has a current value, which could change due to updates to the configuration, and a default value that probably won't change as often. if the "load" operation fails, the default value will be used.
Definition at line 85 of file configlet.h.
| string_configlet::string_configlet | ( | const string_configlet & | to_copy | ) |
Definition at line 72 of file configlet.cpp.
| string_configlet::~string_configlet | ( | ) | [virtual] |
| string_configlet & string_configlet::operator= | ( | const string_configlet & | to_copy | ) |
| const istring & string_configlet::current_value | ( | ) | const |
Definition at line 95 of file configlet.cpp.
| const istring & string_configlet::default_value | ( | ) | const |
Definition at line 97 of file configlet.cpp.
| void string_configlet::current_value | ( | const istring & | new_current | ) |
Definition at line 99 of file configlet.cpp.
| void string_configlet::default_value | ( | const istring & | new_default | ) |
Definition at line 102 of file configlet.cpp.
| bool string_configlet::load | ( | configurator & | config | ) | [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.
Implements configlet.
Definition at line 105 of file configlet.cpp.
References configurator::AUTO_STORE, configurator::behavior(), configlet::entry(), configurator::get(), configurator::put(), and configlet::section().
| bool string_configlet::store | ( | configurator & | config | ) | const [virtual] |
writes the configlet's information out to the "config".
Implements configlet.
Definition at line 115 of file configlet.cpp.
References configlet::entry(), configurator::put(), and configlet::section().
| configlet * string_configlet::duplicate | ( | ) | const [virtual] |
a virtual copy constructor for configlets.
the returned object will be a new copy of this configlet.
Implements configlet.
Definition at line 118 of file configlet.cpp.
References configlet::entry(), configlet::section(), and string_configlet().
1.5.1