# ConfigFile Class Reference

`#include <ConfigFile.h>`

List of all members.

## Classes
struct | file_not_found
struct | key_not_found
## Public Member Functions
| ConfigFile (string filename, string delimiter="=", string comment="#", string sentry="EndConfigFile")
| ConfigFile ()
template<class T >
T | read (const string &key) const
template<class T >
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)
void | remove (const string &key)
bool | keyExists (const string &key) const
string | getDelimiter () const
string | getComment () const
string | getSentry () const
string | setDelimiter (const string &s)
string | setComment (const string &s)
## Protected Types
typedef std::map< string, string >::iterator | mapi
typedef std::map< string, string >::const_iterator | mapci
## Static Protected Member Functions
template<class T >
static string | T_as_string (const T &t)
template<class T >
static T | string_as_T (const string &s)
static void | trim (string &s)
## Protected Attributes
string | myDelimiter
string | myComment
string | mySentry
std::map< string, string > | myContents
## 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>::const_iterator ConfigFile::mapci`[protected]`

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

## Constructor & Destructor Documentation

ConfigFile::ConfigFile | ( | string | filename,
|  | string | delimiter = `"="`,
|  | string | comment = `"#"`,
|  | string | sentry = `"EndConfigFile"` |
| ) |  |  |

ConfigFile::ConfigFile | ( |  | ) |

## Member Function Documentation

template<class T >

void ConfigFile::add | ( | string | key,
|  | const T & | value |
| ) |  |  | `[inline]`

string ConfigFile::getComment | ( |  | ) | const`[inline]`

string ConfigFile::getDelimiter | ( |  | ) | const`[inline]`

string ConfigFile::getSentry | ( |  | ) | const`[inline]`

bool ConfigFile::keyExists | ( | const string & | key | ) | const

template<class T >

T ConfigFile::read | ( | const string & | key,
|  | const T & | value |
| ) |  |  | const`[inline]`

template<class T >

T ConfigFile::read | ( | const string & | key | ) | const`[inline]`

template<class T >

bool ConfigFile::readInto | ( | T & | var,
|  | const string & | key,
|  | const T & | value |
| ) |  |  | const`[inline]`

template<class T >

bool ConfigFile::readInto | ( | T & | var,
|  | const string & | key |
| ) |  |  | const`[inline]`

void ConfigFile::remove | ( | const string & | key | ) |

string ConfigFile::setComment | ( | const string & | s | ) | `[inline]`

string ConfigFile::setDelimiter | ( | const string & | s | ) | `[inline]`

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

template<class T >

string ConfigFile::T_as_string | ( | const T & | t | ) | `[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::myComment`[protected]`

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

string ConfigFile::myDelimiter`[protected]`

string ConfigFile::mySentry`[protected]`

The documentation for this class was generated from the following files:

- ConfigFile.h
- ConfigFile.cpp