Simias::Configuration Class Reference

Configuration class for simias components. More...

List of all members.

Public Member Functions

 Configuration (string storePath, bool isServer)
 Constructor.
XmlElement GetElement (string key)
 Returns the XmlElement for the specified key. Creates the key if does not exist.
XmlElement GetElement (string section, string key)
 Returns the XmlElement for the specified key.
string Get (string key)
 Returns the value for the specified key.
string Get (string section, string key)
 Returns the value for the specified key.
bool Exists (string key)
 Checks for existence of a specified key.
bool Exists (string section, string key)
 Checks for existence of a specified section and key.
string ToXml ()
 Returns the XML representation of the config file.


Detailed Description

Configuration class for simias components.


Constructor & Destructor Documentation

Simias::Configuration::Configuration ( string  storePath,
bool  isServer 
) [inline]

Constructor.

Parameters:
storePath The directory path to the store.
isServer True if running in a server configuration.


Member Function Documentation

XmlElement Simias::Configuration::GetElement ( string  key  )  [inline]

Returns the XmlElement for the specified key. Creates the key if does not exist.

Parameters:
key The key to return.
Returns:
The key as an XmlElement.

XmlElement Simias::Configuration::GetElement ( string  section,
string  key 
) [inline]

Returns the XmlElement for the specified key.

Parameters:
section The section where the key is stored.
key The key to return.
Returns:
The key as an XmlElement if successful. Otherwise a null is returned.

string Simias::Configuration::Get ( string  key  )  [inline]

Returns the value for the specified key.

Parameters:
key The key to get the value for.
Returns:
The value as a string if successful. Otherwise a null is returned.

string Simias::Configuration::Get ( string  section,
string  key 
) [inline]

Returns the value for the specified key.

Parameters:
section The section where the key exists.
key The key to get the value for.
Returns:
The value as a string if successful. Otherwise a null is returned.

bool Simias::Configuration::Exists ( string  key  )  [inline]

Checks for existence of a specified key.

Parameters:
key The key to check for existence.
Returns:
True if the key exists, otherwise false is returned.

bool Simias::Configuration::Exists ( string  section,
string  key 
) [inline]

Checks for existence of a specified section and key.

Parameters:
section The section for the tuple
key The key to set. If this parameter is null, then only the section is checked for existence.
Returns:
True if the section and key exists, otherwise false is returned.

string Simias::Configuration::ToXml (  )  [inline]

Returns the XML representation of the config file.

Returns:


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

Generated on Wed Apr 8 14:45:42 2009 for simias by  doxygen 1.5.6