feisty meow concerns codebase  2.140
configuration::configuration_list Class Reference

Manages a collection of configlet objects. More...

#include <configuration_list.h>

Inheritance diagram for configuration::configuration_list:
Collaboration diagram for configuration::configuration_list:

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 configletfind (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...
 

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::configuration_list::configuration_list ( )

Definition at line 32 of file configuration_list.cpp.

◆ ~configuration_list()

configuration::configuration_list::~configuration_list ( )
virtual

Definition at line 37 of file configuration_list.cpp.

References basis::WHACK().

Member Function Documentation

◆ add()

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().

◆ DEFINE_CLASS_NAME()

configuration::configuration_list::DEFINE_CLASS_NAME ( "configuration_list"  )

◆ find()

const configlet * configuration::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 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().

◆ load()

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().

◆ reset()

void configuration::configuration_list::reset ( )

removes all items from the list.

Definition at line 42 of file configuration_list.cpp.

◆ store()

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().

◆ zap()

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().


The documentation for this class was generated from the following files: