Main Page | Namespace List | Class List | File List | Namespace Members | Class Members | File Members

SysConfig Class Reference

Reading and Writing Configuration files. More...

#include <SysConfig.h>

List of all members.

Public Member Functions

 SysConfig (const char *path)
 ~SysConfig ()
std::string readEntry (const std::string &key, const std::string &defaultValue=std::string())


Detailed Description

Reading and Writing Configuration files.

This class provides access to the configuration files under /etc/sysconfig.

A sysconfig file consists of lines of key/value pairs. It can also contain empty lines and comments (lines starting with '#").

Keys are case-sensitive. Values can be quoted like 'value' or "value". Whitesspace at the beginning or end of keys and values (outside of quotes) is removed.


Constructor & Destructor Documentation

SysConfig::SysConfig const char *  path  ) 
 

Construct a sysconfig object. Reads the given file.

Path to sysconfig file. This can either be an absolute path or a path relative to /etc/sysconfig.

SysConfig::~SysConfig  ) 
 


Member Function Documentation

std::string SysConfig::readEntry const std::string &  key,
const std::string &  defaultValue = std::string()
 

Returns:
string entry
Parameters:
key Key of entry.
defaultValue Default return value, if key doesn't exit.


The documentation for this class was generated from the following file:
Generated on Tue Jan 25 19:27:30 2005 for limal-utils by doxygen 1.3.8