Public Member Functions | Private Member Functions | Private Attributes
P::ConfigFile Class Reference

#include <ConfigFile.hh>

List of all members.

Public Member Functions

 ConfigFile (const string &name)
bool GetLine (string &str)
int GetLineCnt ()
 ~ConfigFile ()

Private Member Functions

bool IsComment (string &str)
void RemoveEOL (string &str)

Private Attributes

fstream file
int line_cnt

Detailed Description

Definition at line 14 of file ConfigFile.hh.


Constructor & Destructor Documentation

P::ConfigFile::ConfigFile ( const string &  name)

Definition at line 11 of file ConfigFile.cc.

Definition at line 19 of file ConfigFile.cc.


Member Function Documentation

bool P::ConfigFile::GetLine ( string &  str)

Reads the next line of a file into the given string ignoring comment lines. Returns 'true' if the line was filled. 'false' otherwise (i.e. if EOF was reached). The newline character is NOT appended. If the file was not opened readable then an exception is thrown.

Definition at line 30 of file ConfigFile.cc.

int P::ConfigFile::GetLineCnt ( ) [inline]

Definition at line 27 of file ConfigFile.hh.

bool P::ConfigFile::IsComment ( string &  str) [private]

Returns true if the line is a comment line. Comment lines are empty lines or start with "#".

Definition at line 63 of file ConfigFile.cc.

void P::ConfigFile::RemoveEOL ( string &  str) [private]

Remove end of line Note that end of line may be `
` (newline, unix style) or '' (carriage return, dos style, wrong! very very wrong!!) We have to check for both.

Definition at line 52 of file ConfigFile.cc.


Member Data Documentation

fstream P::ConfigFile::file [private]

Definition at line 17 of file ConfigFile.hh.

int P::ConfigFile::line_cnt [private]

Definition at line 18 of file ConfigFile.hh.


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


blort
Author(s): Thomas Mörwald , Michael Zillich , Andreas Richtsfeld , Johann Prankl , Markus Vincze , Bence Magyar
autogenerated on Wed Aug 26 2015 15:24:12