42 #ifndef _CONFIGURATION_H_
43 #define _CONFIGURATION_H_
58 bool Read(
const char* szFileName);
72 bool GetString(
char* szName,
char*& szReturnString );
74 bool GetInt(
char* szName,
int& nReturnInt );
76 bool GetDouble(
char* szName,
double& dReturnDouble );
78 bool GetFloat(
char* szName,
float& fReturnFloat );
80 bool GetBool(
char* szName,
bool& bReturnBool );
84 bool ParseBuffer(
char* pchBuffer);
86 bool SeekNextContent(
char* pchBuffer,
int& cnBufferPosition);
88 bool CheckControlCharacter(
char* pchBuffer,
int& cnBufferPosition);
90 bool ExtractName(
char* pchBuffer,
int& cnBufferPosition,
char*& pchResultName);
91 bool ExtractValue(
char* pchBuffer,
int& cnBufferPosition,
char*& pchResultValue);
93 void AddVariable(
char* pchCurrentName,
char* pchCurrentValue);
95 int GetLineNumber(
char* pchBuffer,
int cnBufferPosition);
99 bool GetVarByName(
char* szName,
char*& szReturnString);
102 typedef struct VarMap
108 TVariableMap** m_ppVariables;
109 int m_nVariableCount;
117 #endif // _CONFIGURATION_H_
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.
CConfiguration()
Construct a new Configuration object.
bool GetString(char *szName, char *&szReturnString)
Get string from configutation file.
virtual ~CConfiguration()
Destructor.
void SetFileName(const char *szFileName)
bool GetBool(char *szName, bool &bReturnBool)
Get bool from configutation file.