MOOS

CMOOSFileReader Class Reference

Base class for reading ascii files. More...

#include <MOOSFileReader.h>

Inheritance diagram for CMOOSFileReader:

CProcessConfigReader List of all members.

Public Member Functions

bool IsOpen ()
bool GoTo (std::string sLine)
bool eof ()
bool Reset ()
bool GetValue (std::string sName, std::string &sResult)
bool GetValue (std::string sName, double &dfResult)
bool GetValue (std::string sName, int &nResult)
bool GetValue (std::string sName, float &fResult)
bool GetValue (std::string sName, bool &bResult)
bool GetValue (std::string sName, unsigned int &nResult)
bool SetFile (const std::string &sFile)
std::string GetNextValidLine ()

Static Public Member Functions

static bool GetTokenValPair (std::string sLine, std::string &sTok, std::string &sVal, bool bPreserveWhiteSpace=false)

Protected Member Functions

std::ifstream * GetFile ()

Static Protected Member Functions

static bool IsComment (std::string &sLine)

Protected Attributes

CMOOSLockm_pLock
std::string m_sFileName
std::ifstream m_File
THREAD2FILE_MAP m_FileMap

Detailed Description

Base class for reading ascii files.


Member Function Documentation

std::string CMOOSFileReader::GetNextValidLine  ) 
 

returns a string of teh next non comment line (and removs trailing comments)

bool CMOOSFileReader::GetTokenValPair std::string  sLine,
std::string &  sTok,
std::string &  sVal,
bool  bPreserveWhiteSpace = false
[static]
 

static helper which splits a line into token = value and by deafult removes white space

bool CMOOSFileReader::GetValue std::string  sName,
unsigned int &  nResult
 

looks for a line "sName = Val" in whole file, fills in result with Val

bool CMOOSFileReader::GetValue std::string  sName,
bool &  bResult
 

looks for a line "sName = Val" in whole file, fills in result with Val

bool CMOOSFileReader::GetValue std::string  sName,
float &  fResult
 

looks for a line "sName = Val" in whole file, fills in result with Val

bool CMOOSFileReader::GetValue std::string  sName,
int &  nResult
 

looks for a line "sName = Val" in whole file, fills in result with Val

bool CMOOSFileReader::GetValue std::string  sName,
double &  dfResult
 

looks for a line "sName = Val" in whole file, fills in result with Val

bool CMOOSFileReader::GetValue std::string  sName,
std::string &  sResult
 

looks for a line "sName = Val" in whole file, fills in result with Val

bool CMOOSFileReader::SetFile const std::string &  sFile  ) 
 

tell the class what file to read


Member Data Documentation

THREAD2FILE_MAP CMOOSFileReader::m_FileMap [protected]
 

every thread get its own pointer to a stream


The documentation for this class was generated from the following files:
Generated on Fri Sep 28 20:14:21 2007 for MOOSGenLib by  doxygen 1.4.6