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

ConfigFile Class Reference

#include <ConfigFile.h>

List of all members.

Public Member Functions

 ConfigFile (string filename, bool isList=false, string delimiter="=", string comment="##", string sentry="EndConfigFile")
 ConfigFile ()
template<class T>
read (const string &key) const
template<class T>
read (const string &key, const T &value) const
template<class T>
bool readInto (T &var, const string &key) const
template<class T>
bool readInto (T &var, const string &key, const T &value) const
template<class T>
void add (string key, const T &value, bool store=false)
template<class T>
void add (const T &key, bool store=false)
void remove (const string &key)
template<class T>
void remove (const T &key)
bool keyExists (const string &key) const
template<class T>
bool keyExists (const T &key) const
string getDelimiter () const
string getComment () const
string getSentry () const
string setDelimiter (const string &s)
string setComment (const string &s)
void load (string filename, bool isList=false)
void save ()

Protected Types

typedef std::map< string,
string >::iterator 
mapi
typedef std::map< string,
string >::const_iterator 
mapci

Static Protected Member Functions

template<class T>
string T_as_string (const T &t)
template<class T>
string_as_T (const string &s)
void trim (string &s)

Protected Attributes

string myDelimiter
string myComment
string mySentry
std::map< string, string > myContents
std::string file
bool listmode

Friends

std::ostream & operator<< (std::ostream &os, const ConfigFile &cf)
std::istream & operator>> (std::istream &is, ConfigFile &cf)


Member Typedef Documentation

typedef std::map<string,string>::iterator ConfigFile::mapi [protected]
 

typedef std::map<string,string>::const_iterator ConfigFile::mapci [protected]
 


Constructor & Destructor Documentation

ConfigFile::ConfigFile string  filename,
bool  isList = false,
string  delimiter = "=",
string  comment = "##",
string  sentry = "EndConfigFile"
 

ConfigFile::ConfigFile  ) 
 


Member Function Documentation

template<class T>
T ConfigFile::read const string &  key  )  const
 

template<class T>
T ConfigFile::read const string &  key,
const T &  value
const
 

template<class T>
bool ConfigFile::readInto T &  var,
const string &  key
const
 

template<class T>
bool ConfigFile::readInto T &  var,
const string &  key,
const T &  value
const
 

template<class T>
void ConfigFile::add string  key,
const T &  value,
bool  store = false
 

template<class T>
void ConfigFile::add const T &  key,
bool  store = false
 

void ConfigFile::remove const string &  key  ) 
 

template<class T>
void ConfigFile::remove const T &  key  ) 
 

bool ConfigFile::keyExists const string &  key  )  const
 

template<class T>
bool ConfigFile::keyExists const T &  key  )  const
 

string ConfigFile::getDelimiter  )  const [inline]
 

string ConfigFile::getComment  )  const [inline]
 

string ConfigFile::getSentry  )  const [inline]
 

string ConfigFile::setDelimiter const string &  s  )  [inline]
 

string ConfigFile::setComment const string &  s  )  [inline]
 

void ConfigFile::load string  filename,
bool  isList = false
 

void ConfigFile::save  ) 
 

template<class T>
string ConfigFile::T_as_string const T &  t  )  [static, protected]
 

bool ConfigFile::string_as_T< bool > const string &  s  )  [inline, static, protected]
 

void ConfigFile::trim string &  s  )  [static, protected]
 


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  os,
const ConfigFile cf
[friend]
 

std::istream& operator>> std::istream &  is,
ConfigFile cf
[friend]
 


Member Data Documentation

string ConfigFile::myDelimiter [protected]
 

string ConfigFile::myComment [protected]
 

string ConfigFile::mySentry [protected]
 

std::map<string,string> ConfigFile::myContents [protected]
 

std::string ConfigFile::file [protected]
 

bool ConfigFile::listmode [protected]
 


The documentation for this class was generated from the following files:
Generated on Wed Apr 12 18:51:56 2006 for wsdlpull by  doxygen 1.3.9.1