Config Class Reference

#include <config.h>

List of all members.


Detailed Description

Handle configuration files.

Definition at line 97 of file config.h.

Public Member Functions

 Config (const bool bPrintErrorMessages=true)
 Constructor.
short read_conf (std::ifstream &inconffile)
void clear ()
 Clear the data buffer.
void print ()
 Print the configuration data.
bool section_exists (const std::string &section) const
bool parameter_exists (const std::string &section, const std::string &parameter) const
template<typename T>
bool select (const std::string &section, const std::string &parameter, T &value) const
 Get a parameter data, of a certain section, into the string value.
short write_conf (std::ofstream &outconffile, const std::string &file_title, const int space_between_column)
template<typename T>
bool add (const std::string &section, const std::string &parameter, const T &value)
 Added the value(string) of the parameter in the section in the configuration data. The functions will added the parameter and the section if it does not already exist.

Private Attributes

Conf_data conf
 Data store from/to configuration file.
bool bPrintErrorMessages
 Print error messages on stderr.


Member Function Documentation

template<typename T>
bool Config::select ( const std::string &  section,
const std::string &  parameter,
T &  value 
) const [inline]

Get a parameter data, of a certain section, into the string value.

Returns:
false if the data can not be found and true otherwise.

Definition at line 109 of file config.h.

References conf.


Generated on Thu Dec 14 08:52:18 2006 for ROBOOP, A Robotics Object Oriented Package in C++ by  doxygen 1.5.1