|
MOOS 0.2375
|
Base class for reading ascii files. More...
#include <MOOSFileReader.h>


Public Member Functions | |
| CMOOSFileReader () | |
| virtual | ~CMOOSFileReader () |
| 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 (bool bDoShellSubstitution=true) |
| bool | DoVariableExpansion (std::string &sVal) |
| bool | BuildLocalShellVars () |
| bool | MakeOverloadedCopy (const std::string &sCopyName, std::map< std::string, std::string > &OverLoads) |
| void | EnableVerbatimQuoting (bool bEnable=true) |
Static Public Member Functions | |
| static bool | GetTokenValPair (std::string sLine, std::string &sTok, std::string &sVal, bool bPreserveWhiteSpace=false) |
Protected Member Functions | |
| void | ClearFileMap () |
| std::ifstream * | GetFile () |
Static Protected Member Functions | |
| static bool | IsComment (std::string &sLine) |
Protected Attributes | |
| CMOOSLock * | m_pLock |
| std::string | m_sFileName |
| std::ifstream | m_File |
| std::map< std::string, std::string > | m_LocalShellVariables |
| THREAD2FILE_MAP | m_FileMap |
| bool | m_bEnableVerbatimQuoting |
Base class for reading ascii files.
Definition at line 62 of file MOOSFileReader.h.
| CMOOSFileReader::CMOOSFileReader | ( | ) |
Definition at line 59 of file MOOSFileReader.cpp.
| CMOOSFileReader::~CMOOSFileReader | ( | ) | [virtual] |
Definition at line 67 of file MOOSFileReader.cpp.
| bool CMOOSFileReader::BuildLocalShellVars | ( | ) |
Definition at line 441 of file MOOSFileReader.cpp.
| void CMOOSFileReader::ClearFileMap | ( | ) | [inline, protected] |
iterates through filemap freeing up resources then calls filemap's clear method
Definition at line 112 of file MOOSFileReader.h.
| bool CMOOSFileReader::DoVariableExpansion | ( | std::string & | sVal | ) |
Definition at line 478 of file MOOSFileReader.cpp.
Definition at line 107 of file MOOSFileReader.h.
| bool CMOOSFileReader::eof | ( | ) |
Definition at line 354 of file MOOSFileReader.cpp.
| std::ifstream * CMOOSFileReader::GetFile | ( | ) | [protected] |
Definition at line 387 of file MOOSFileReader.cpp.
returns a string of the next non comment line (and removs trailing comments)
Definition at line 114 of file MOOSFileReader.cpp.
| 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
Definition at line 195 of file MOOSFileReader.cpp.
| bool CMOOSFileReader::GetValue | ( | std::string | sName, |
| float & | fResult | ||
| ) |
looks for a line "sName = Val" in whole file, fills in result with Val
Definition at line 281 of file MOOSFileReader.cpp.
looks for a line "sName = Val" in whole file, fills in result with Val
Definition at line 292 of file MOOSFileReader.cpp.
| bool CMOOSFileReader::GetValue | ( | std::string | sName, |
| unsigned int & | nResult | ||
| ) |
looks for a line "sName = Val" in whole file, fills in result with Val
Definition at line 306 of file MOOSFileReader.cpp.
| bool CMOOSFileReader::GetValue | ( | std::string | sName, |
| std::string & | sResult | ||
| ) |
looks for a line "sName = Val" in whole file, fills in result with Val
Definition at line 250 of file MOOSFileReader.cpp.
| bool CMOOSFileReader::GetValue | ( | std::string | sName, |
| double & | dfResult | ||
| ) |
looks for a line "sName = Val" in whole file, fills in result with Val
Definition at line 216 of file MOOSFileReader.cpp.
| bool CMOOSFileReader::GetValue | ( | std::string | sName, |
| int & | nResult | ||
| ) |
looks for a line "sName = Val" in whole file, fills in result with Val
Definition at line 233 of file MOOSFileReader.cpp.
| bool CMOOSFileReader::GoTo | ( | std::string | sLine | ) |
Definition at line 359 of file MOOSFileReader.cpp.
| bool CMOOSFileReader::IsComment | ( | std::string & | sLine | ) | [static, protected] |
Definition at line 184 of file MOOSFileReader.cpp.
| bool CMOOSFileReader::IsOpen | ( | ) |
Definition at line 431 of file MOOSFileReader.cpp.
| bool CMOOSFileReader::MakeOverloadedCopy | ( | const std::string & | sCopyName, |
| std::map< std::string, std::string > & | OverLoads | ||
| ) |
Definition at line 534 of file MOOSFileReader.cpp.
| bool CMOOSFileReader::Reset | ( | ) |
Definition at line 322 of file MOOSFileReader.cpp.
| bool CMOOSFileReader::SetFile | ( | const std::string & | sFile | ) |
tell the class what file to read
Definition at line 80 of file MOOSFileReader.cpp.
bool CMOOSFileReader::m_bEnableVerbatimQuoting [protected] |
Definition at line 136 of file MOOSFileReader.h.
std::ifstream CMOOSFileReader::m_File [protected] |
Definition at line 128 of file MOOSFileReader.h.
THREAD2FILE_MAP CMOOSFileReader::m_FileMap [protected] |
every thread get its own pointer to a stream
Definition at line 132 of file MOOSFileReader.h.
std::map<std::string,std::string> CMOOSFileReader::m_LocalShellVariables [protected] |
Definition at line 130 of file MOOSFileReader.h.
CMOOSLock* CMOOSFileReader::m_pLock [protected] |
Definition at line 125 of file MOOSFileReader.h.
std::string CMOOSFileReader::m_sFileName [protected] |
Definition at line 127 of file MOOSFileReader.h.
1.7.4