Configuration Class Reference
#include <Configuration.h>
Collaboration diagram for Configuration:

Classes | |
| struct | ConfigurationEntry |
| class | ConverterToV1_0a4 |
Static Public Member Functions | |
| static bool | loadConfig (std::string cfg) |
| static void | printConfig () |
| static bool | containsPath (std::string name) |
| static std::string | getPath (std::string name) |
| static bool | contains (std::string key) |
| static bool | getBool (std::string key) |
| static int | getInt (std::string key) |
| static float | getFloat (std::string key) |
| static std::string | getString (std::string key) |
Static Private Member Functions | |
| static void | printGeneralConfig (ConfigurationEntry *currentEntry) |
| static ConfigurationEntry * | getConfigEntry (std::string key, std::string &attributeName, bool dumpError=true) |
| static bool | parseGeneralConfig (const std::auto_ptr< const XmlDocument > &document) |
| static bool | parseGeneralConfigRecursive (const XmlElement *element, ConfigurationEntry ¤tEntry) |
| static bool | parsePathConfig (const std::auto_ptr< const XmlDocument > &document) |
Static Private Attributes | |
| static std::string | rootPath = "" |
| static std::map< std::string, std::string > | pathMap |
| static ConfigurationEntry | rootEntry |
| static XmlConfigurationLoader | xmlConfigLoader |
Member Function Documentation
| bool Configuration::contains | ( | std::string | key | ) | [static] |
Returns if the passed key occurs in the config-file. Keys have the format "Element.Subelement".
- Parameters:
-
key searched configuration file entry
- Returns:
- true if the configuration file entry exists, false otherwise
| bool Configuration::containsPath | ( | std::string | name | ) | [static] |
Returns whether the passed path is set.
- Parameters:
-
path-name to search for
| bool Configuration::getBool | ( | std::string | key | ) | [static] |
Query a boolean value from the configuration.
- Parameters:
-
key a configuration file entry.
- Returns:
- the value, or false, if it doesn't exist.
| Configuration::ConfigurationEntry * Configuration::getConfigEntry | ( | std::string | key, | |
| std::string & | attributeName, | |||
| bool | dumpError = true | |||
| ) | [static, private] |
| float Configuration::getFloat | ( | std::string | key | ) | [static] |
Query a float value from the configuration.
- Parameters:
-
key a configuration file entry.
- Returns:
- the value, or 0.0f, if it doesn't exist.
| int Configuration::getInt | ( | std::string | key | ) | [static] |
Query an integer value from the configuration.
- Parameters:
-
key a configuration file entry.
- Returns:
- the value, or 0, if it doesn't exist.
| std::string Configuration::getPath | ( | std::string | name | ) | [static] |
Get the directory, where name is stored.
- Parameters:
-
The named label of the desired path (e.g. "Models", "Tiles", "WorldConfiguration").
- Returns:
- the base-directory for the given name.
| std::string Configuration::getString | ( | std::string | key | ) | [static] |
Query a string value from the configuration.
- Parameters:
-
key a configuration file entry.
- Returns:
- the value, or an empty string, if it doesn't exist.
| bool Configuration::loadConfig | ( | std::string | cfg | ) | [static] |
Load a configuration file.
- Parameters:
-
cfg the path of the configuration file.
- Returns:
- true on success, false otherwise.
| bool Configuration::parseGeneralConfig | ( | const std::auto_ptr< const XmlDocument > & | document | ) | [static, private] |
| bool Configuration::parseGeneralConfigRecursive | ( | const XmlElement * | element, | |
| ConfigurationEntry & | currentEntry | |||
| ) | [static, private] |
| bool Configuration::parsePathConfig | ( | const std::auto_ptr< const XmlDocument > & | document | ) | [static, private] |
| void Configuration::printConfig | ( | ) | [static] |
Dump the configuration to stdout.
| void Configuration::printGeneralConfig | ( | ConfigurationEntry * | currentEntry | ) | [static, private] |
Member Data Documentation
std::map< std::string, std::string > Configuration::pathMap [static, private] |
Configuration::ConfigurationEntry Configuration::rootEntry [static, private] |
std::string Configuration::rootPath = "" [static, private] |
XmlConfigurationLoader Configuration::xmlConfigLoader [static, private] |
The documentation for this class was generated from the following files:
- src/inVRs/SystemCore/Configuration.h
- src/inVRs/SystemCore/Configuration.cpp
Generated on Wed Oct 20 16:11:55 2010 for inVRs by
1.5.8