syBR::Settings::SettingsManager Class Reference

Settings management class. More...

#include <SettingsManager.hpp>

List of all members.

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 &current, 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.
RenderSystemm_pRenderSystem
 Render system.
Ogre::Root * m_pOgre
 Ogre main object used to manage rendering settings.
syBR::Game::PluginSettingsm_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.


Detailed Description

Settings management class.

Constructor & Destructor Documentation

syBR::Settings::SettingsManager::SettingsManager (  ) 

Constructor.

syBR::Settings::SettingsManager::~SettingsManager (  ) 

Destructor.


Member Function Documentation

void syBR::Settings::SettingsManager::save (  ) 

Save settings.

bool syBR::Settings::SettingsManager::getLanguages ( std::deque< std::string > &  vLanguages  )  const

Retrieve list of availables languages.

Parameters:
vLanguages Deque where the list of available languages will be put
Returns:
Always true

bool syBR::Settings::SettingsManager::getSelectedLanguage ( unsigned int &  selected,
std::string &  name 
) const

Retrieve currently selected language.

Parameters:
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
Returns:
One of these:
  • true if the selected language is supported
  • false otherwise (in that case, name is set to the unsupported language and selected is set to 0)

bool syBR::Settings::SettingsManager::getRendererPlugins ( std::deque< std::string > &  vPlugins  )  const

Retrieve list of available rendering plugins.

Parameters:
vPlugins Deque where the list of available plugins will be put
Returns:
Always true

bool syBR::Settings::SettingsManager::getSelectedRendererPlugin ( unsigned int &  selected,
std::string &  name 
) const

Retrieve currently selected rendering plugin.

Parameters:
selected Will be set to the zero-based index of the currently selected plugin
name Name of the selected plugin if it is invalid
Returns:
One of these:
  • true if the selected plugin is valid
  • false otherwise (in that case, name is set to the invalid plugin and selected is set to 0)

void syBR::Settings::SettingsManager::setSelectedRendererPlugin ( unsigned int  index  ) 

Set newly selected rendering plugin.

Parameters:
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.

Parameters:
vPlugins Deque where the list of available plugins will be put
Returns:
Always true

bool syBR::Settings::SettingsManager::getSelectedAudioPlugin ( unsigned int &  selected,
std::string &  name 
) const

Retrieve currently selected audio plugin.

Parameters:
selected Will be set to the zero-based index of the currently selected plugin
name Name of the selected plugin if it is invalid
Returns:
One of these:
  • true if the selected plugin is valid
  • false otherwise (in that case, name is set to the invalid plugin and selected is set to 0)

bool syBR::Settings::SettingsManager::getInputPlugins ( std::deque< std::string > &  vPlugins  )  const

Retrieve list of available input plugins.

Parameters:
vPlugins Deque where the list of available plugins will be put
Returns:
Always true

bool syBR::Settings::SettingsManager::getSelectedInputPlugin ( unsigned int &  selected,
std::string &  name 
) const

Retrieve currently selected input plugin.

Parameters:
selected Will be set to the zero-based index of the currently selected plugin
name Name of the selected plugin if it is invalid
Returns:
One of these:
  • true if the selected plugin is valid
  • false otherwise (in that case, name is set to the invalid plugin and selected is set to 0)

void syBR::Settings::SettingsManager::setSelectedInputPlugin ( unsigned int  index  ) 

Set newly selected input plugin.

Parameters:
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.

Parameters:
vPlugins Deque where the list of available plugins will be put
Returns:
Always true

bool syBR::Settings::SettingsManager::getSelectedNetworkPlugin ( unsigned int &  selected,
std::string &  name 
) const

Retrieve currently selected network plugin.

Parameters:
selected Will be set to the zero-based index of the currently selected plugin
name Name of the selected plugin if it is invalid
Returns:
One of these:
  • true if the selected plugin is valid
  • false otherwise (in that case, name is set to the invalid plugin and selected is set to 0)

bool syBR::Settings::SettingsManager::getRendererParameters ( std::deque< std::string > &  vParameters  )  const

Retrieve list of parameters for currently selected rendering plugin.

Parameters:
vParameters Deque where the list of available parameters will be put
Returns:
Always true

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.

Parameters:
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 :
  • true if the parameter is read-only

bool syBR::Settings::SettingsManager::setRendererParameterValue ( unsigned int  parameter,
unsigned int  value 
)

Set the value for a parameter for currently selected rendering plugin.

Parameters:
parameter Zero-based index of the parameter
value Zero-based index of the value to set
Returns:
One of these :
  • true in case of success
  • false if the parameter/value index is out of bounds


Member Data Documentation

Logger syBR::Settings::SettingsManager::m_logger [private]

Logger.

RenderSystem* syBR::Settings::SettingsManager::m_pRenderSystem [private]

Render system.

Ogre::Root* syBR::Settings::SettingsManager::m_pOgre [private]

Ogre main object used to manage rendering settings.

syBR::Game::PluginSettings* syBR::Settings::SettingsManager::m_pPluginSettings [private]

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.


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

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