Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes
CConfiguration Class Reference

#include <Configuration.h>

List of all members.

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

Detailed Description

Definition at line 51 of file Configuration.h.


Member Typedef Documentation


Constructor & Destructor Documentation

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.

Destructor.

Definition at line 80 of file Configuration.cpp.


Member Function Documentation

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

Parameters:
szFileNamefull filename of .cfg file
Returns:
bValid returns true if error occured, false otherwise

Definition at line 101 of file Configuration.cpp.

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.


Member Data Documentation

Definition at line 111 of file Configuration.h.

Definition at line 109 of file Configuration.h.

Definition at line 112 of file Configuration.h.

Definition at line 108 of file Configuration.h.


The documentation for this class was generated from the following files:


asr_ivt
Author(s): Allgeyer Tobias, Hutmacher Robin, Kleinert Daniel, Meißner Pascal, Scholz Jonas, Stöckle Patrick
autogenerated on Thu Jun 6 2019 21:46:58