feisty meow concerns codebase
2.140
|
Manages a collection of configlet objects. More...
#include <configuration_list.h>
Public Member Functions | |
configuration_list () | |
virtual | ~configuration_list () |
DEFINE_CLASS_NAME ("configuration_list") | |
void | reset () |
removes all items from the list. More... | |
void | add (const configlet &new_item) |
adds another configuration atom into the list. More... | |
const configlet * | find (const configlet &to_find) const |
locates the actual configlet with the section and entry of "to_find". More... | |
bool | zap (const configlet &dead_item) |
removes a previously added configuration item. More... | |
bool | load (configurator &config) |
reads the values of all the configlets stored in "config" into this. More... | |
bool | store (configurator &config) const |
writes the current values of all the configlets in "this" into "config". More... | |
Manages a collection of configlet objects.
This class provides the ability to operate on the collection of configlets as a whole. They can be retrieved from or stored to a configurator object.
Definition at line 33 of file configuration_list.h.
configuration::configuration_list::configuration_list | ( | ) |
Definition at line 32 of file configuration_list.cpp.
|
virtual |
Definition at line 37 of file configuration_list.cpp.
References basis::WHACK().
void configuration::configuration_list::add | ( | const configlet & | new_item | ) |
adds another configuration atom into the list.
Definition at line 44 of file configuration_list.cpp.
References configuration::configlet::duplicate(), and zap().
configuration::configuration_list::DEFINE_CLASS_NAME | ( | "configuration_list" | ) |
locates the actual configlet with the section and entry of "to_find".
note that this might fail if no matching section and entry are found, thus returning NULL_POINTER. the returned object is still kept in the list, so do not try to destroy it. also note that the object passed in must be the same type as the object to be found; otherwise, NULL_POINTER will be returned.
Definition at line 50 of file configuration_list.cpp.
References configuration::configlet::entry(), NULL_POINTER, and configuration::configlet::section().
bool configuration::configuration_list::load | ( | configurator & | config | ) |
reads the values of all the configlets stored in "config" into this.
Definition at line 76 of file configuration_list.cpp.
References configuration::configlet::load().
void configuration::configuration_list::reset | ( | ) |
removes all items from the list.
Definition at line 42 of file configuration_list.cpp.
bool configuration::configuration_list::store | ( | configurator & | config | ) | const |
writes the current values of all the configlets in "this" into "config".
Definition at line 86 of file configuration_list.cpp.
References configuration::configlet::store().
bool configuration::configuration_list::zap | ( | const configlet & | dead_item | ) |
removes a previously added configuration item.
the "dead_item" need only provide the section and entry names.
Definition at line 63 of file configuration_list.cpp.
References configuration::configlet::entry(), and configuration::configlet::section().
Referenced by add().