23 using namespace basis;
28 class cl_figlet_list :
public amorph<configlet> {};
32 configuration_list::configuration_list()
33 : _figs(new cl_figlet_list)
52 for (
int i = 0; i < _figs->elements(); i++) {
56 && (
typeid(curr) ==
typeid(to_find)) ) {
65 for (
int i = 0; i < _figs->elements(); i++) {
78 bool to_return =
true;
79 for (
int i = 0; i < _figs->elements(); i++) {
81 if (!curr.
load(config)) to_return =
false;
88 bool to_return =
true;
89 for (
int i = 0; i < _figs->elements(); i++) {
91 if (!curr.
store(config)) to_return =
false;
Represents an atom of configuration info.
const basis::astring & section() const
observes the section of this configlet.
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".
bool store(configurator &config) const
writes the current values of all the configlets in "this" into "config".
const configlet * find(const configlet &to_find) const
locates the actual configlet with the section and entry of "to_find".
bool zap(const configlet &dead_item)
removes a previously added configuration item.
void add(const configlet &new_item)
adds another configuration atom into the list.
bool load(configurator &config)
reads the values of all the configlets stored in "config" into this.
virtual ~configuration_list()
void reset()
removes all items from the list.
Provides a base class for configuration repositories.
#define NULL_POINTER
The value representing a pointer to nothing.
The guards collection helps in testing preconditions and reporting errors.
void WHACK(contents *&ptr)
deletion with clearing of the pointer.
A dynamic container class that holds any kind of object via pointers.