configlet Class Reference

Represents an atom of configuration info. More...

#include <configlet.h>

Inheritance diagram for configlet:

Inheritance graph
[legend]
Collaboration diagram for configlet:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 configlet (const istring &section, const istring &entry)
 creates a configlet that lives in the "section" at the "entry".
 configlet (const configlet &to_copy)
virtual ~configlet ()
 IMPLEMENT_CLASS_NAME ("configlet")
configletoperator= (const configlet &to_copy)
const istringsection () const
 observes the section of this configlet.
const istringentry () const
 observes the entry name of this configlet.
void section (const istring &new_section) const
 modifies the configlet section location.
void entry (const istring &new_entry) const
 modifies the configlet entry name.
virtual bool load (configurator &config)=0
 retrieves the configlet's information from the "config".
virtual bool store (configurator &config) const =0
 writes the configlet's information out to the "config".
virtual configletduplicate () const=0
 a virtual copy constructor for configlets.

Detailed Description

Represents an atom of configuration info.

The configlet has a location in a configuration repository that is defined by its section and key name. Derived types can also have a value that is stored in that location.

Definition at line 33 of file configlet.h.


Constructor & Destructor Documentation

configlet::configlet ( const istring section,
const istring entry 
)

creates a configlet that lives in the "section" at the "entry".

Definition at line 28 of file configlet.cpp.

configlet::configlet ( const configlet to_copy  ) 

Definition at line 33 of file configlet.cpp.

configlet::~configlet (  )  [virtual]

Definition at line 39 of file configlet.cpp.

References WHACK().


Member Function Documentation

configlet::IMPLEMENT_CLASS_NAME ( "configlet"   ) 

configlet & configlet::operator= ( const configlet to_copy  ) 

Definition at line 45 of file configlet.cpp.

References _entry, and _section.

const istring & configlet::section (  )  const

observes the section of this configlet.

Definition at line 53 of file configlet.cpp.

Referenced by string_configlet::duplicate(), configuration_list::find(), int_configlet::load(), string_configlet::load(), int_configlet::store(), string_configlet::store(), and configuration_list::zap().

const istring & configlet::entry (  )  const

observes the entry name of this configlet.

Definition at line 55 of file configlet.cpp.

Referenced by string_configlet::duplicate(), configuration_list::find(), int_configlet::load(), string_configlet::load(), int_configlet::store(), string_configlet::store(), and configuration_list::zap().

void configlet::section ( const istring new_section  )  const

modifies the configlet section location.

Definition at line 57 of file configlet.cpp.

void configlet::entry ( const istring new_entry  )  const

modifies the configlet entry name.

Definition at line 60 of file configlet.cpp.

virtual bool configlet::load ( configurator config  )  [pure 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.

Implemented in string_configlet, and int_configlet.

virtual bool configlet::store ( configurator config  )  const [pure virtual]

writes the configlet's information out to the "config".

Implemented in string_configlet, and int_configlet.

virtual configlet* configlet::duplicate (  )  const [pure virtual]

a virtual copy constructor for configlets.

the returned object will be a new copy of this configlet.

Implemented in string_configlet, int_configlet, and bounded_int_configlet.

Referenced by configuration_list::add().


The documentation for this class was generated from the following files:
Generated on Sat Aug 30 04:33:12 2008 for HOOPLE Libraries by  doxygen 1.5.1