#include <Configuration.h>
Classes | |
struct | VarMap |
Public Member Functions | |
CConfiguration () | |
Construct a new Configuration object. More... | |
CConfiguration (const char *szFileName) | |
Construct a new Configuration object. More... | |
bool | GetBool (char *szName, bool &bReturnBool) |
Get bool from configutation file. More... | |
bool | GetDouble (char *szName, double &dReturnDouble) |
Get double from configutation file. More... | |
bool | GetFloat (char *szName, float &fReturnFloat) |
Get float from configutation file. More... | |
bool | GetInt (char *szName, int &nReturnInt) |
Get integer from configutation file. More... | |
bool | GetString (char *szName, char *&szReturnString) |
Get string from configutation file. More... | |
bool | Read (const char *szFileName) |
bool | Read () |
void | SetFileName (const char *szFileName) |
virtual | ~CConfiguration () |
Destructor. More... | |
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. More... | |
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.
|
private |
CConfiguration::CConfiguration | ( | ) |
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.
|
virtual |
Destructor.
Definition at line 80 of file Configuration.cpp.
|
private |
Definition at line 382 of file Configuration.cpp.
|
private |
Definition at line 282 of file Configuration.cpp.
|
private |
Definition at line 319 of file Configuration.cpp.
|
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.
|
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.
|
private |
Determine if variable with Name exists.
Definition at line 437 of file Configuration.cpp.
|
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.
|
private |
Definition at line 304 of file Configuration.cpp.
void CConfiguration::SetFileName | ( | const char * | szFileName | ) |
Definition at line 155 of file Configuration.cpp.
|
private |
Definition at line 111 of file Configuration.h.
|
private |
Definition at line 109 of file Configuration.h.
|
private |
Definition at line 112 of file Configuration.h.
|
private |
Definition at line 108 of file Configuration.h.