configuration_list Class Reference

Manages a collection of configlet objects. More...

#include <configuration_list.h>

Inheritance diagram for configuration_list:

Inheritance graph
[legend]
Collaboration diagram for configuration_list:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 configuration_list ()
 ~configuration_list ()
 IMPLEMENT_CLASS_NAME ("configuration_list")
void reset ()
 removes all items from the list.
void add (const configlet &new_item)
 adds another configuration atom into the list.
const configletfind (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.
bool load (configurator &config)
 reads the values of all the configlets stored in "config" into this.
bool store (configurator &config) const
 writes the current values of all the configlets in "this" into "config".

Detailed Description

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.


Constructor & Destructor Documentation

configuration_list::configuration_list (  ) 

Definition at line 32 of file configuration_list.cpp.

configuration_list::~configuration_list (  ) 

Definition at line 37 of file configuration_list.cpp.

References WHACK().


Member Function Documentation

configuration_list::IMPLEMENT_CLASS_NAME ( "configuration_list"   ) 

void configuration_list::reset (  ) 

removes all items from the list.

Definition at line 42 of file configuration_list.cpp.

void configuration_list::add ( const configlet new_item  ) 

adds another configuration atom into the list.

Definition at line 44 of file configuration_list.cpp.

References configlet::duplicate(), and zap().

const configlet * configuration_list::find ( const configlet to_find  )  const

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 NIL. 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, NIL will be returned.

Definition at line 50 of file configuration_list.cpp.

References configlet::entry(), NIL, and configlet::section().

bool 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 65 of file configuration_list.cpp.

References configlet::entry(), and configlet::section().

Referenced by add().

bool configuration_list::load ( configurator config  ) 

reads the values of all the configlets stored in "config" into this.

Definition at line 78 of file configuration_list.cpp.

bool configuration_list::store ( configurator config  )  const

writes the current values of all the configlets in "this" into "config".

Definition at line 88 of file configuration_list.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Aug 19 05:12:15 2008 for HOOPLE Libraries by  doxygen 1.5.1