#include <PluginSettings.hpp>
Public Member Functions | |
| bool | load () |
| Load settings. | |
| bool | save () const |
| Save settings. | |
| void | setAudioPlugin (const std::string &file) |
| Set the name of the audio plugin. | |
| const std::string & | getAudioPlugin () const |
| Get the name of the audio plugin. | |
| void | setInputPlugin (const std::string &file) |
| Set the name of the input plugin. | |
| const std::string & | getInputPlugin () const |
| Get the name of the input plugin. | |
| void | setNetworkPlugin (const std::string &file) |
| Set the name of the network plugin. | |
| const std::string & | getNetworkPlugin () const |
| Get the name of the network plugin. | |
Static Public Member Functions | |
| static bool | initializeSingleton (Core::Logger *pLogger) |
| Initialize singleton. | |
| static PluginSettings * | getSingleton (Core::Logger *pLogger) |
| Retrieve singleton instance. | |
| static void | terminateSingleton (Core::Logger *pLogger) |
| Terminate singleton. | |
Private Member Functions | |
| PluginSettings (Core::Logger *pLogger) | |
| Constructor. | |
| ~PluginSettings () | |
| Destructor. | |
| void | create () |
| Create the XML settings. | |
Private Attributes | |
| Core::Logger * | m_pLogger |
| Pointer to the logger to be used. | |
| XMLFile * | m_pSettingsFile |
| XML settings file. | |
| std::string | m_audioSystemPlugin |
| Audio system plugin name. | |
| std::string | m_inputSystemPlugin |
| Input system plugin name. | |
| std::string | m_networkSystemPlugin |
| Network system plugin name. | |
Static Private Attributes | |
| static PluginSettings * | sm_pSingleton = NULL |
| Instance of the PluginSettings singleton. | |
In order to run a game, the engine needs to run a set of plugins (audio, input and network). This class allows to manage the plugins settings.
| syBR::Game::PluginSettings::PluginSettings | ( | Core::Logger * | pLogger | ) | [private] |
Constructor.
| pLogger | Pointer to the instance of the logger to use |
| syBR::Game::PluginSettings::~PluginSettings | ( | ) | [private] |
Destructor.
| bool syBR::Game::PluginSettings::initializeSingleton | ( | Core::Logger * | pLogger | ) | [static] |
Initialize singleton.
Create a new instance of the plugin settings manager only if none already exists.
| pLogger | Pointer to the instance of the logger to use |
| PluginSettings * syBR::Game::PluginSettings::getSingleton | ( | Core::Logger * | pLogger | ) | [static] |
Retrieve singleton instance.
| pLogger | Pointer to the instance of the logger to use |
| void syBR::Game::PluginSettings::terminateSingleton | ( | Core::Logger * | pLogger | ) | [static] |
Terminate singleton.
| pLogger | Pointer to the instance of the logger to use |
| bool syBR::Game::PluginSettings::load | ( | ) |
Load settings.
The followings settings are loaded from this file:
| bool syBR::Game::PluginSettings::save | ( | ) | const |
Save settings.
The followings settings are saved to this file:
| void syBR::Game::PluginSettings::setAudioPlugin | ( | const std::string & | file | ) |
Set the name of the audio plugin.
| file | Filename of the plugin to be used as audio plugin |
| const std::string & syBR::Game::PluginSettings::getAudioPlugin | ( | ) | const |
Get the name of the audio plugin.
| void syBR::Game::PluginSettings::setInputPlugin | ( | const std::string & | file | ) |
Set the name of the input plugin.
| file | Filename of the plugin to be used as input plugin |
| const std::string & syBR::Game::PluginSettings::getInputPlugin | ( | ) | const |
Get the name of the input plugin.
| void syBR::Game::PluginSettings::setNetworkPlugin | ( | const std::string & | file | ) |
Set the name of the network plugin.
| file | Filename of the plugin to be used as network plugin |
| const std::string & syBR::Game::PluginSettings::getNetworkPlugin | ( | ) | const |
Get the name of the network plugin.
| void syBR::Game::PluginSettings::create | ( | ) | [private] |
Create the XML settings.
PluginSettings * syBR::Game::PluginSettings::sm_pSingleton = NULL [static, private] |
Instance of the PluginSettings singleton.
Pointer to the logger to be used.
XMLFile* syBR::Game::PluginSettings::m_pSettingsFile [private] |
XML settings file.
std::string syBR::Game::PluginSettings::m_audioSystemPlugin [private] |
Audio system plugin name.
std::string syBR::Game::PluginSettings::m_inputSystemPlugin [private] |
Input system plugin name.
std::string syBR::Game::PluginSettings::m_networkSystemPlugin [private] |
Network system plugin name.
Copyright © 2008 by Sebastien Frippiat

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.
Last modified Tue Dec 30 17:57:34 2008