#include <SettingsManager.hpp>
Public Member Functions | |
SettingsManager () | |
Constructor. | |
~SettingsManager () | |
Destructor. | |
void | save () |
Save settings. | |
bool | getLanguages (std::deque< std::string > &vLanguages) const |
Retrieve list of availables languages. | |
bool | getSelectedLanguage (unsigned int &selected, std::string &name) const |
Retrieve currently selected language. | |
bool | getRendererPlugins (std::deque< std::string > &vPlugins) const |
Retrieve list of available rendering plugins. | |
bool | getSelectedRendererPlugin (unsigned int &selected, std::string &name) const |
Retrieve currently selected rendering plugin. | |
void | setSelectedRendererPlugin (unsigned int index) |
Set newly selected rendering plugin. | |
bool | getAudioPlugins (std::deque< std::string > &vPlugins) const |
Retrieve list of available audio plugins. | |
bool | getSelectedAudioPlugin (unsigned int &selected, std::string &name) const |
Retrieve currently selected audio plugin. | |
bool | getInputPlugins (std::deque< std::string > &vPlugins) const |
Retrieve list of available input plugins. | |
bool | getSelectedInputPlugin (unsigned int &selected, std::string &name) const |
Retrieve currently selected input plugin. | |
void | setSelectedInputPlugin (unsigned int index) |
Set newly selected input plugin. | |
bool | getNetworkPlugins (std::deque< std::string > &vPlugins) const |
Retrieve list of available network plugins. | |
bool | getSelectedNetworkPlugin (unsigned int &selected, std::string &name) const |
Retrieve currently selected network plugin. | |
bool | getRendererParameters (std::deque< std::string > &vParameters) const |
Retrieve list of parameters for currently selected rendering plugin. | |
bool | getRendererParameterValues (unsigned int index, std::deque< std::string > &vParameters, unsigned int ¤t, bool &readOnly) |
Retrieve list of values for a parameter for currently selected rendering plugin. | |
bool | setRendererParameterValue (unsigned int parameter, unsigned int value) |
Set the value for a parameter for currently selected rendering plugin. | |
Private Attributes | |
Logger | m_logger |
Logger. | |
RenderSystem * | m_pRenderSystem |
Render system. | |
Ogre::Root * | m_pOgre |
Ogre main object used to manage rendering settings. | |
syBR::Game::PluginSettings * | m_pPluginSettings |
Object used to manage plugins settings. | |
std::deque< std::string > | m_dPluginsAudioName |
List of available audio plugins (names). | |
std::deque< std::string > | m_dPluginsInputName |
List of available input plugins (names). | |
std::deque< std::string > | m_dPluginsNetworkName |
List of available network plugins (names). | |
std::deque< std::string > | m_dPluginsAudioFilename |
List of available audio plugins (filenames). | |
std::deque< std::string > | m_dPluginsInputFilename |
List of available input plugins (filenames). | |
std::deque< std::string > | m_dPluginsNetworkFilename |
List of available network plugins (filenames). | |
unsigned int | m_indexPluginRenderer |
Currently selected rendering plugins. | |
unsigned int | m_indexPluginAudio |
Currently selected audio plugins. | |
unsigned int | m_indexPluginInput |
Currently selected input plugins. | |
unsigned int | m_indexPluginNetwork |
Currently selected network plugins. |
syBR::Settings::SettingsManager::SettingsManager | ( | ) |
Constructor.
syBR::Settings::SettingsManager::~SettingsManager | ( | ) |
Destructor.
void syBR::Settings::SettingsManager::save | ( | ) |
Save settings.
bool syBR::Settings::SettingsManager::getLanguages | ( | std::deque< std::string > & | vLanguages | ) | const |
Retrieve list of availables languages.
vLanguages | Deque where the list of available languages will be put |
bool syBR::Settings::SettingsManager::getSelectedLanguage | ( | unsigned int & | selected, | |
std::string & | name | |||
) | const |
Retrieve currently selected language.
selected | Will be set to the zero-based index of the currently selected language | |
name | Name of the selected language if it isn't supported |
bool syBR::Settings::SettingsManager::getRendererPlugins | ( | std::deque< std::string > & | vPlugins | ) | const |
Retrieve list of available rendering plugins.
vPlugins | Deque where the list of available plugins will be put |
bool syBR::Settings::SettingsManager::getSelectedRendererPlugin | ( | unsigned int & | selected, | |
std::string & | name | |||
) | const |
Retrieve currently selected rendering plugin.
selected | Will be set to the zero-based index of the currently selected plugin | |
name | Name of the selected plugin if it is invalid |
void syBR::Settings::SettingsManager::setSelectedRendererPlugin | ( | unsigned int | index | ) |
Set newly selected rendering plugin.
index | Zero-based index of the newly selected rendering plugin |
bool syBR::Settings::SettingsManager::getAudioPlugins | ( | std::deque< std::string > & | vPlugins | ) | const |
Retrieve list of available audio plugins.
vPlugins | Deque where the list of available plugins will be put |
bool syBR::Settings::SettingsManager::getSelectedAudioPlugin | ( | unsigned int & | selected, | |
std::string & | name | |||
) | const |
Retrieve currently selected audio plugin.
selected | Will be set to the zero-based index of the currently selected plugin | |
name | Name of the selected plugin if it is invalid |
bool syBR::Settings::SettingsManager::getInputPlugins | ( | std::deque< std::string > & | vPlugins | ) | const |
Retrieve list of available input plugins.
vPlugins | Deque where the list of available plugins will be put |
bool syBR::Settings::SettingsManager::getSelectedInputPlugin | ( | unsigned int & | selected, | |
std::string & | name | |||
) | const |
Retrieve currently selected input plugin.
selected | Will be set to the zero-based index of the currently selected plugin | |
name | Name of the selected plugin if it is invalid |
void syBR::Settings::SettingsManager::setSelectedInputPlugin | ( | unsigned int | index | ) |
Set newly selected input plugin.
index | Zero-based index of the newly selected input plugin |
bool syBR::Settings::SettingsManager::getNetworkPlugins | ( | std::deque< std::string > & | vPlugins | ) | const |
Retrieve list of available network plugins.
vPlugins | Deque where the list of available plugins will be put |
bool syBR::Settings::SettingsManager::getSelectedNetworkPlugin | ( | unsigned int & | selected, | |
std::string & | name | |||
) | const |
Retrieve currently selected network plugin.
selected | Will be set to the zero-based index of the currently selected plugin | |
name | Name of the selected plugin if it is invalid |
bool syBR::Settings::SettingsManager::getRendererParameters | ( | std::deque< std::string > & | vParameters | ) | const |
Retrieve list of parameters for currently selected rendering plugin.
vParameters | Deque where the list of available parameters will be put |
bool syBR::Settings::SettingsManager::getRendererParameterValues | ( | unsigned int | index, | |
std::deque< std::string > & | vValues, | |||
unsigned int & | current, | |||
bool & | readOnly | |||
) |
Retrieve list of values for a parameter for currently selected rendering plugin.
If the index of the parameter is valid, it will retrieve the list of valid values for that parameter. It will also check for the current value of the parameter. In the case of the current value being invalid, it will revert to the first valid value of the parameter.
index | Zero-based index of the parameter | |
vValues | Deque where the list of available values will be put | |
current | Current value of the parameter will be stored here | |
readOnly | One of these :
|
bool syBR::Settings::SettingsManager::setRendererParameterValue | ( | unsigned int | parameter, | |
unsigned int | value | |||
) |
Set the value for a parameter for currently selected rendering plugin.
parameter | Zero-based index of the parameter | |
value | Zero-based index of the value to set |
Logger.
Render system.
Ogre::Root* syBR::Settings::SettingsManager::m_pOgre [private] |
Ogre main object used to manage rendering settings.
Object used to manage plugins settings.
std::deque<std::string> syBR::Settings::SettingsManager::m_dPluginsAudioName [private] |
List of available audio plugins (names).
std::deque<std::string> syBR::Settings::SettingsManager::m_dPluginsInputName [private] |
List of available input plugins (names).
std::deque<std::string> syBR::Settings::SettingsManager::m_dPluginsNetworkName [private] |
List of available network plugins (names).
std::deque<std::string> syBR::Settings::SettingsManager::m_dPluginsAudioFilename [private] |
List of available audio plugins (filenames).
std::deque<std::string> syBR::Settings::SettingsManager::m_dPluginsInputFilename [private] |
List of available input plugins (filenames).
std::deque<std::string> syBR::Settings::SettingsManager::m_dPluginsNetworkFilename [private] |
List of available network plugins (filenames).
unsigned int syBR::Settings::SettingsManager::m_indexPluginRenderer [private] |
Currently selected rendering plugins.
unsigned int syBR::Settings::SettingsManager::m_indexPluginAudio [private] |
Currently selected audio plugins.
unsigned int syBR::Settings::SettingsManager::m_indexPluginInput [private] |
Currently selected input plugins.
unsigned int syBR::Settings::SettingsManager::m_indexPluginNetwork [private] |
Currently selected network plugins.
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