Main Page | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

ARLib::Utility::ARConfiguration Class Reference

Class for managing configuration options. More...

#include <arconfiguration.h>

List of all members.

Public Member Functions

bool SetConfigFile (const char *configfile)
 Loads configuration values from the specified file.
const char * GetConfigFile ()
 Returns a pointer to the configuration file name.
bool GetValue (const char *section, const char *item, ARString &value, const char *defvalue=0)
 Retrieves the value associated with the section/item combination.
bool GetValues (const char *section, const char *item, std::vector< ARString > &values, const char *defvalue=0)
 Retrieves the values for a particular section/item combination.
bool SectionExists (const char *section)
 Determines whether the specified section exists in the configuration file.


Detailed Description

Class for managing configuration options.


Member Function Documentation

const char* ARLib::Utility::ARConfiguration::GetConfigFile  )  [inline]
 

Returns a pointer to the configuration file name.

Returns:
A pointer the the character buffer.

bool ARLib::Utility::ARConfiguration::GetValue const char *  section,
const char *  item,
ARString value,
const char *  defvalue = 0
 

Retrieves the value associated with the section/item combination.

Parameters:
section The section that the item belongs to.
item The item name to retrieve the value for.
value The ARString argument to receive the associated value;
defvalue The value to use if the section/item does not exist.
Returns:
True if the value has been loaded with a value (either from the config file or the default value).

bool ARLib::Utility::ARConfiguration::GetValues const char *  section,
const char *  item,
std::vector< ARString > &  values,
const char *  defvalue = 0
 

Retrieves the values for a particular section/item combination.

This method returns a vector of ARString objects. The values should be comma delimited in the relevant configuration file.

Parameters:
section The section that the item belongs to.
item The item name to retrieve the values for.
values The ARString vector to receive the values
defvalue The value to use if the section/item does not exist (this should be comma delimited for multiple values).
Returns:
True if the value has been loaded with a value (either from the config file or the default value).

bool ARLib::Utility::ARConfiguration::SectionExists const char *  section  ) 
 

Determines whether the specified section exists in the configuration file.

Parameters:
section The section to find.
Returns:
True if the section exists other false is returned.

bool ARLib::Utility::ARConfiguration::SetConfigFile const char *  configfile  ) 
 

Loads configuration values from the specified file.

Parameters:
configfile Path to the configuration file.
Returns:
True if config file exists otherwise false is returned.


The documentation for this class was generated from the following file:
Generated on Wed Aug 31 18:01:39 2005 for ARLib by  doxygen 1.3.9.1