My Project
SallyAPI::System::COption Class Reference

Option class to read and write property files (z.B. xyz.ini) More...

#include <Option.h>

List of all members.

Public Member Functions

 COption (const std::string &iniFile="")
 Constructor.
 ~COption ()
 Destructor.
int GetPropertyInt (const std::string &component, const std::string &id, int defaultValue=-1)
 Gets a property int.
std::string GetPropertyString (const std::string &component, const std::string &id, const std::string &defaultValue="")
 Gets a property string.
bool GetPropertyBool (const std::string &component, const std::string &id, bool defaultValue=false)
 Gets a property bool.
void SetPropertyInt (const std::string &component, const std::string &id, int value)
 Sets a property int.
void SetPropertyString (const std::string &component, const std::string &id, const std::string &value)
 Sets a property string.
void SetPropertyBool (const std::string &component, const std::string &id, bool value)
 Sets a property bool.

Static Public Member Functions

static int GetPropertyIntStatic (const std::string &component, const std::string &id, int defaultValue=-1, const std::string &iniFile="")
 Gets a property int static.
static std::string GetPropertyStringStatic (const std::string &component, const std::string &id, const std::string &defaultValue="", const std::string &iniFile="")
 Gets a property string static.
static bool GetPropertyBoolStatic (const std::string &component, const std::string &id, bool defaultValue=false, const std::string &iniFile="")
 Gets a property bool static.
static void SetPropertyIntStatic (const std::string &component, const std::string &id, int value, const std::string &iniFile)
static void SetPropertyStringStatic (const std::string &component, const std::string &id, const std::string &value, const std::string &iniFile)
static void SetPropertyBoolStatic (const std::string &component, const std::string &id, bool value, const std::string &iniFile)
static void SetDefaultFile (const std::string &defaultFile)
 Sets a default file.

Detailed Description

Option class to read and write property files (z.B. xyz.ini)

Author:
Christian Knobloch
Date:
19.04.2010

Constructor & Destructor Documentation

COption::COption ( const std::string &  iniFile = "")

Constructor.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
iniFileThe initialise file.

Destructor.

Author:
Christian Knobloch
Date:
19.04.2010

Member Function Documentation

bool COption::GetPropertyBool ( const std::string &  component,
const std::string &  id,
bool  defaultValue = false 
)

Gets a property bool.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
componentThe component.
idThe identifier.
defaultValueDefault value.
Returns:
true if it succeeds, false if it fails.
bool COption::GetPropertyBoolStatic ( const std::string &  component,
const std::string &  id,
bool  defaultValue = false,
const std::string &  iniFile = "" 
) [static]

Gets a property bool static.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
componentThe component.
idThe identifier.
defaultValueDefault value.
iniFileThe initialise file.
Returns:
true if it succeeds, false if it fails.
int COption::GetPropertyInt ( const std::string &  component,
const std::string &  id,
int  defaultValue = -1 
)

Gets a property int.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
componentThe component.
idThe identifier.
defaultValueDefault value.
Returns:
The property int.
int COption::GetPropertyIntStatic ( const std::string &  component,
const std::string &  id,
int  defaultValue = -1,
const std::string &  iniFile = "" 
) [static]

Gets a property int static.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
componentThe component.
idThe identifier.
defaultValueDefault value.
iniFileThe initialise file.
Returns:
The property int static.
std::string COption::GetPropertyString ( const std::string &  component,
const std::string &  id,
const std::string &  defaultValue = "" 
)

Gets a property string.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
componentThe component.
idThe identifier.
defaultValueDefault value.
Returns:
The property string.
std::string COption::GetPropertyStringStatic ( const std::string &  component,
const std::string &  id,
const std::string &  defaultValue = "",
const std::string &  iniFile = "" 
) [static]

Gets a property string static.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
componentThe component.
idThe identifier.
defaultValueDefault value.
iniFileThe initialise file.
Returns:
The property string static.
void COption::SetDefaultFile ( const std::string &  defaultFile) [static]

Sets a default file.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
defaultFileDefault file.
void COption::SetPropertyBool ( const std::string &  component,
const std::string &  id,
bool  value 
)

Sets a property bool.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
componentThe component.
idThe identifier.
valuetrue to value.
void SallyAPI::System::COption::SetPropertyBoolStatic ( const std::string &  component,
const std::string &  id,
bool  value,
const std::string &  iniFile 
) [static]
void COption::SetPropertyInt ( const std::string &  component,
const std::string &  id,
int  value 
)

Sets a property int.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
componentThe component.
idThe identifier.
valueThe value.
void SallyAPI::System::COption::SetPropertyIntStatic ( const std::string &  component,
const std::string &  id,
int  value,
const std::string &  iniFile 
) [static]
void COption::SetPropertyString ( const std::string &  component,
const std::string &  id,
const std::string &  value 
)

Sets a property string.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
componentThe component.
idThe identifier.
valueThe value.
void SallyAPI::System::COption::SetPropertyStringStatic ( const std::string &  component,
const std::string &  id,
const std::string &  value,
const std::string &  iniFile 
) [static]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines