ionflux.org | Impressum

Ionflux::Tools::Config Class Reference
[Configuration file I/O]

Configuration. More...

#include <Config.hpp>

Inheritance diagram for Ionflux::Tools::Config:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Config ()
 Constructor.
virtual ~Config ()
 Destructor.
virtual void clear ()=0
 Clear all configuration data.
virtual void readConfig (const std::string &configFile)=0
 Read configuration from a file.
virtual void writeConfig (const std::string &configFile)=0
 Write configuration to a file.
virtual void writeConfig ()=0
 Write configuration to a file.
virtual std::string get (const std::string &key)=0
 Get a configuration value.
virtual void set (const std::string &key, const std::string &value)=0
 Set a configuration value.

Detailed Description

Configuration.

Encapsulates configuration data as a set of key/value pairs.


Constructor & Destructor Documentation

Ionflux::Tools::Config::Config  )  [inline]
 

Constructor.

Construct new ConfigMap object.

virtual Ionflux::Tools::Config::~Config  )  [inline, virtual]
 

Destructor.

Destruct Config object.


Member Function Documentation

virtual void Ionflux::Tools::Config::clear  )  [pure virtual]
 

Clear all configuration data.

Effectively erases all configuration data from the Config object.

Implemented in Ionflux::Tools::ConfigMap, and Ionflux::Tools::ConfigTree.

virtual std::string Ionflux::Tools::Config::get const std::string &  key  )  [pure virtual]
 

Get a configuration value.

Fetches the value of a configuration option from the configuration table.

Parameters:
key The key identifying the configuration value.
Returns:
Value of the specified configuration option, or an empty string if the option is not set.

Implemented in Ionflux::Tools::ConfigMap, and Ionflux::Tools::ConfigTree.

virtual void Ionflux::Tools::Config::readConfig const std::string &  configFile  )  [pure virtual]
 

Read configuration from a file.

Reads data from a configuration file and stores it in the configuration table.

Parameters:
configFile Name of the configuration file

Implemented in Ionflux::Tools::ConfigMap, and Ionflux::Tools::ConfigTree.

virtual void Ionflux::Tools::Config::set const std::string &  key,
const std::string &  value
[pure virtual]
 

Set a configuration value.

Sets the configuration option denoted by key to value.

Parameters:
key The key of the configuration option to be set.
value The value the option should be set to.

Implemented in Ionflux::Tools::ConfigMap, and Ionflux::Tools::ConfigTree.

virtual void Ionflux::Tools::Config::writeConfig  )  [pure virtual]
 

Write configuration to a file.

Writes configuration data stored in the Config object to the same file it was read from.

Implemented in Ionflux::Tools::ConfigMap, and Ionflux::Tools::ConfigTree.

virtual void Ionflux::Tools::Config::writeConfig const std::string &  configFile  )  [pure virtual]
 

Write configuration to a file.

Writes configuration data stored in the Config object to a file.

Parameters:
configFile Name of the configuration file

Implemented in Ionflux::Tools::ConfigMap, and Ionflux::Tools::ConfigTree.


The documentation for this class was generated from the following file:
Generated on Tue Mar 14 21:07:43 2006 for Ionflux Tools Class Library (iftools) by  doxygen 1.4.6