Orxonox: orxonox::CoreConfiguration Class Reference

# orxonox::CoreConfiguration Class Reference

Helper class for the Core singleton: we cannot derive Core from OrxonoxClass because we need to handle the Identifier destruction in the Core destructor. More...

Inheritance diagram for orxonox::CoreConfiguration:

List of all members.

## Public Member Functions

| CoreConfiguration ()
void | debugLevelChanged ()
| Callback function if the debug level has changed.
void | initialise ()
void | initializeRandomNumberGenerator ()
void | languageChanged ()
| Callback function if the language has changed.
void | mediaPathChanged ()
| Callback function if the media path has changed.
void | resetLanguage ()
| Sets the language in the config-file back to the default.
void | setConfigValues ()
| Function to collect the SetConfigValue-macro calls.
void | tsetMediaPath (const std::string &path)
| Temporary sets the media path.

## Public Attributes

bool | bInitializeRandomNumberGenerator_
| If true, srand(time(0)) is called.
boost::filesystem::path | configPath_
| Path to the config file folder.
boost::filesystem::path | executablePath_
| Path to the executable.
std::string | language_
| The language.
boost::filesystem::path | logPath_
| Path to the log file folder.
boost::filesystem::path | mediaPath_
| Path to the media file folder.
std::string | mediaPathString_
| Path to the data/media file folder as string.
boost::filesystem::path | rootPath_
| Path to the parent directory of the ones above if program was installed with relativ pahts.
int | softDebugLevel_
| The debug level.
int | softDebugLevelConsole_
| The debug level for the console.
int | softDebugLevelLogfile_
| The debug level for the logfile.
int | softDebugLevelShell_
| The debug level for the ingame shell.

## Detailed Description

Helper class for the Core singleton: we cannot derive Core from OrxonoxClass because we need to handle the Identifier destruction in the Core destructor.

## Constructor & Destructor Documentation

orxonox::CoreConfiguration::CoreConfiguration | ( |  | ) | `[inline]`

## Member Function Documentation

void orxonox::CoreConfiguration::debugLevelChanged | ( |  | ) | `[inline]`

Callback function if the debug level has changed.

References orxonox::OutputHandler::LD_All, orxonox::OutputHandler::LD_Console, orxonox::OutputHandler::LD_Logfile, orxonox::OutputHandler::LD_Shell, orxonox::OutputHandler::setSoftDebugLevel(), softDebugLevel_, softDebugLevelConsole_, softDebugLevelLogfile_, and softDebugLevelShell_.

Referenced by setConfigValues().

void orxonox::CoreConfiguration::initialise | ( |  | ) | `[inline]`

References orxonox::CommandLine::getArgument(), orxonox::CommandLine::getValue(), RegisterRootObject, setConfigValues(), and tsetMediaPath().

Referenced by orxonox::Core::Core().

void orxonox::CoreConfiguration::initializeRandomNumberGenerator | ( |  | ) | `[inline]`

References bInitializeRandomNumberGenerator_.

Referenced by setConfigValues().

void orxonox::CoreConfiguration::languageChanged | ( |  | ) | `[inline]`

Callback function if the language has changed.

References orxonox::Language::getLanguage(), and orxonox::Language::readTranslatedLanguageFile().

Referenced by setConfigValues().

void orxonox::CoreConfiguration::mediaPathChanged | ( |  | ) | `[inline]`

Callback function if the media path has changed.

References mediaPath_, and mediaPathString_.

Referenced by setConfigValues().

void orxonox::CoreConfiguration::resetLanguage | ( |  | ) | `[inline]`

Sets the language in the config-file back to the default.

References language_, and ResetConfigValue.

Referenced by orxonox::Core::resetLanguage().

void orxonox::CoreConfiguration::setConfigValues | ( |  | ) | `[inline]`

Function to collect the SetConfigValue-macro calls.

Reimplemented from orxonox::OrxonoxClass.

References bInitializeRandomNumberGenerator_, debugLevelChanged(), orxonox::Language::getLanguage(), initializeRandomNumberGenerator(), language_, languageChanged(), mediaPath_, mediaPathChanged(), mediaPathString_, SetConfigValue, softDebugLevelConsole_, softDebugLevelLogfile_, and softDebugLevelShell_.

Referenced by initialise().

void orxonox::CoreConfiguration::tsetMediaPath | ( | const std::string & | path | ) | `[inline]`

Temporary sets the media path.

Parameters:

  | path | The new media path

References mediaPathString_, and ModifyConfigValue.

Referenced by initialise(), and orxonox::Core::tsetMediaPath().

## Member Data Documentation

bool orxonox::CoreConfiguration::bInitializeRandomNumberGenerator_

If true, srand(time(0)) is called.

Referenced by initializeRandomNumberGenerator(), and setConfigValues().

boost::filesystem::path orxonox::CoreConfiguration::configPath_

Path to the config file folder.

Referenced by orxonox::Core::checkDevBuild(), orxonox::Core::createDirectories(), orxonox::Core::getConfigPath(), and orxonox::Core::getConfigPathString().

boost::filesystem::path orxonox::CoreConfiguration::executablePath_

Path to the executable.

Referenced by orxonox::Core::checkDevBuild(), orxonox::Core::Core(), and orxonox::Core::setExecutablePath().

std::string orxonox::CoreConfiguration::language_

The language.

Referenced by orxonox::Core::getLanguage(), resetLanguage(), and setConfigValues().

boost::filesystem::path orxonox::CoreConfiguration::logPath_

Path to the log file folder.

Referenced by orxonox::Core::checkDevBuild(), orxonox::Core::createDirectories(), orxonox::Core::getLogPath(), and orxonox::Core::getLogPathString().

boost::filesystem::path orxonox::CoreConfiguration::mediaPath_

Path to the media file folder.

Referenced by orxonox::Core::checkDevBuild(), orxonox::Core::getMediaPath(), orxonox::Core::getMediaPathString(), mediaPathChanged(), and setConfigValues().

std::string orxonox::CoreConfiguration::mediaPathString_

Path to the data/media file folder as string.

Referenced by mediaPathChanged(), setConfigValues(), and tsetMediaPath().

boost::filesystem::path orxonox::CoreConfiguration::rootPath_

Path to the parent directory of the ones above if program was installed with relativ pahts.

Referenced by orxonox::Core::checkDevBuild().

int orxonox::CoreConfiguration::softDebugLevel_

The debug level.

Referenced by debugLevelChanged(), orxonox::Core::getSoftDebugLevel(), and orxonox::Core::setSoftDebugLevel().

int orxonox::CoreConfiguration::softDebugLevelConsole_

The debug level for the console.

Referenced by debugLevelChanged(), orxonox::Core::getSoftDebugLevel(), setConfigValues(), and orxonox::Core::setSoftDebugLevel().

int orxonox::CoreConfiguration::softDebugLevelLogfile_

The debug level for the logfile.

Referenced by debugLevelChanged(), orxonox::Core::getSoftDebugLevel(), setConfigValues(), and orxonox::Core::setSoftDebugLevel().

int orxonox::CoreConfiguration::softDebugLevelShell_

The debug level for the ingame shell.

Referenced by debugLevelChanged(), orxonox::Core::getSoftDebugLevel(), setConfigValues(), and orxonox::Core::setSoftDebugLevel().

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

- src/core/Core.cc