#include <Configuration.h>
Classes | |
struct | VarMap |
Public Member Functions | |
CConfiguration () | |
Construct a new Configuration object. | |
CConfiguration (const char *szFileName) | |
Construct a new Configuration object. | |
bool | GetBool (char *szName, bool &bReturnBool) |
Get bool from configutation file. | |
bool | GetDouble (char *szName, double &dReturnDouble) |
Get double from configutation file. | |
bool | GetFloat (char *szName, float &fReturnFloat) |
Get float from configutation file. | |
bool | GetInt (char *szName, int &nReturnInt) |
Get integer from configutation file. | |
bool | GetString (char *szName, char *&szReturnString) |
Get string from configutation file. | |
bool | Read (const char *szFileName) |
bool | Read () |
void | SetFileName (const char *szFileName) |
virtual | ~CConfiguration () |
Destructor. | |
Private Types | |
typedef struct CConfiguration::VarMap | TVariableMap |
Private Member Functions | |
void | AddVariable (char *pchCurrentName, char *pchCurrentValue) |
bool | CheckControlCharacter (char *pchBuffer, int &cnBufferPosition) |
bool | ExtractName (char *pchBuffer, int &cnBufferPosition, char *&pchResultName) |
bool | ExtractValue (char *pchBuffer, int &cnBufferPosition, char *&pchResultValue) |
int | GetLineNumber (char *pchBuffer, int cnBufferPosition) |
bool | GetVarByName (char *szName, char *&szReturnString) |
Determine if variable with Name exists. | |
bool | ParseBuffer (char *pchBuffer) |
bool | SeekNextContent (char *pchBuffer, int &cnBufferPosition) |
Private Attributes | |
int | m_nFileLength |
int | m_nVariableCount |
char * | m_pchFileName |
TVariableMap ** | m_ppVariables |
Definition at line 51 of file Configuration.h.
typedef struct CConfiguration::VarMap CConfiguration::TVariableMap [private] |
Construct a new Configuration object.
Definition at line 60 of file Configuration.cpp.
CConfiguration::CConfiguration | ( | const char * | szFileName | ) |
Construct a new Configuration object.
Definition at line 69 of file Configuration.cpp.
CConfiguration::~CConfiguration | ( | ) | [virtual] |
Destructor.
Definition at line 80 of file Configuration.cpp.
void CConfiguration::AddVariable | ( | char * | pchCurrentName, |
char * | pchCurrentValue | ||
) | [private] |
Definition at line 382 of file Configuration.cpp.
bool CConfiguration::CheckControlCharacter | ( | char * | pchBuffer, |
int & | cnBufferPosition | ||
) | [private] |
Definition at line 282 of file Configuration.cpp.
bool CConfiguration::ExtractName | ( | char * | pchBuffer, |
int & | cnBufferPosition, | ||
char *& | pchResultName | ||
) | [private] |
Definition at line 319 of file Configuration.cpp.
bool CConfiguration::ExtractValue | ( | char * | pchBuffer, |
int & | cnBufferPosition, | ||
char *& | pchResultValue | ||
) | [private] |
Definition at line 343 of file Configuration.cpp.
bool CConfiguration::GetBool | ( | char * | szName, |
bool & | bReturnBool | ||
) |
Get bool from configutation file.
Definition at line 212 of file Configuration.cpp.
bool CConfiguration::GetDouble | ( | char * | szName, |
double & | dReturnDouble | ||
) |
Get double from configutation file.
Definition at line 201 of file Configuration.cpp.
bool CConfiguration::GetFloat | ( | char * | szName, |
float & | fReturnFloat | ||
) |
Get float from configutation file.
Definition at line 190 of file Configuration.cpp.
bool CConfiguration::GetInt | ( | char * | szName, |
int & | nReturnInt | ||
) |
Get integer from configutation file.
Definition at line 178 of file Configuration.cpp.
int CConfiguration::GetLineNumber | ( | char * | pchBuffer, |
int | cnBufferPosition | ||
) | [private] |
Definition at line 417 of file Configuration.cpp.
bool CConfiguration::GetString | ( | char * | szName, |
char *& | szReturnString | ||
) |
Get string from configutation file.
Definition at line 165 of file Configuration.cpp.
bool CConfiguration::GetVarByName | ( | char * | szName, |
char *& | szReturnString | ||
) | [private] |
Determine if variable with Name exists.
Definition at line 437 of file Configuration.cpp.
bool CConfiguration::ParseBuffer | ( | char * | pchBuffer | ) | [private] |
Definition at line 237 of file Configuration.cpp.
bool CConfiguration::Read | ( | const char * | szFileName | ) |
read a configuration file
szFileName | full filename of .cfg file |
Definition at line 101 of file Configuration.cpp.
bool CConfiguration::Read | ( | ) |
Definition at line 108 of file Configuration.cpp.
bool CConfiguration::SeekNextContent | ( | char * | pchBuffer, |
int & | cnBufferPosition | ||
) | [private] |
Definition at line 304 of file Configuration.cpp.
void CConfiguration::SetFileName | ( | const char * | szFileName | ) |
Definition at line 155 of file Configuration.cpp.
int CConfiguration::m_nFileLength [private] |
Definition at line 111 of file Configuration.h.
int CConfiguration::m_nVariableCount [private] |
Definition at line 109 of file Configuration.h.
char* CConfiguration::m_pchFileName [private] |
Definition at line 112 of file Configuration.h.
TVariableMap** CConfiguration::m_ppVariables [private] |
Definition at line 108 of file Configuration.h.