$search

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 15 of file ConfigFile.hh.


Constructor & Destructor Documentation

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

Definition at line 11 of file ConfigFile.cc.

P::ConfigFile::~ConfigFile (  ) 

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 28 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 18 of file ConfigFile.hh.

int P::ConfigFile::line_cnt [private]

Definition at line 19 of file ConfigFile.hh.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


blort
Author(s): Michael Zillich, Thomas Mörwald, Johann Prankl, Andreas Richtsfeld, Bence Magyar (ROS version)
autogenerated on Fri Mar 1 16:57:58 2013