Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
CConfiguration Class Reference

#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
 

Detailed Description

Definition at line 51 of file Configuration.h.

Member Typedef Documentation

Constructor & Destructor Documentation

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.

CConfiguration::~CConfiguration ( )
virtual

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.

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.

Member Data Documentation

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.


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 Mon Dec 2 2019 03:47:28