Class to load/save all Hydrax options from/to a config file.
More...
#include <CfgFileManager.h>
|
static Ogre::String | _getCfgString (const Ogre::String &Name, const int &Value) |
|
static Ogre::String | _getCfgString (const Ogre::String &Name, const Ogre::Real &Value) |
|
static Ogre::String | _getCfgString (const Ogre::String &Name, const bool &Value) |
|
static Ogre::String | _getCfgString (const Ogre::String &Name, const Ogre::Vector2 &Value) |
|
static Ogre::String | _getCfgString (const Ogre::String &Name, const Ogre::Vector3 &Value) |
|
static Ogre::String | _getCfgString (const Ogre::String &Name, const Size &Value) |
|
static int | _getIntValue (Ogre::ConfigFile &CfgFile, const Ogre::String Name) |
| Get int value. More...
|
|
static Ogre::Real | _getFloatValue (Ogre::ConfigFile &CfgFile, const Ogre::String Name) |
| Get float value. More...
|
|
static bool | _getBoolValue (Ogre::ConfigFile &CfgFile, const Ogre::String Name) |
| Get bool value. More...
|
|
static Ogre::Vector2 | _getVector2Value (Ogre::ConfigFile &CfgFile, const Ogre::String Name) |
| Get vector2 value. More...
|
|
static Ogre::Vector3 | _getVector3Value (Ogre::ConfigFile &CfgFile, const Ogre::String Name) |
| Get vector3 value. More...
|
|
static Size | _getSizeValue (Ogre::ConfigFile &CfgFile, const Ogre::String Name) |
| Get size value. More...
|
|
static bool | _isStringInList (const Ogre::StringVector &List, const Ogre::String &Find) |
| Check is a std::vector<Ogre::String> contains a specified Ogre::String. More...
|
|
Class to load/save all Hydrax options from/to a config file.
Definition at line 44 of file CfgFileManager.h.
◆ CfgFileManager()
Hydrax::CfgFileManager::CfgFileManager |
( |
Hydrax * |
h | ) |
|
◆ ~CfgFileManager()
Hydrax::CfgFileManager::~CfgFileManager |
( |
| ) |
|
◆ _checkVersion()
const bool Hydrax::CfgFileManager::_checkVersion |
( |
Ogre::ConfigFile & |
CfgFile | ) |
const |
|
private |
Check hydrax version cfg file.
- Returns
- true if it's the same version, false if not.
Definition at line 412 of file CfgFileManager.cpp.
◆ _getBoolValue()
bool Hydrax::CfgFileManager::_getBoolValue |
( |
Ogre::ConfigFile & |
CfgFile, |
|
|
const Ogre::String |
Name |
|
) |
| |
|
static |
◆ _getCfgString() [1/6]
Ogre::String Hydrax::CfgFileManager::_getCfgString |
( |
const Ogre::String & |
Name, |
|
|
const bool & |
Value |
|
) |
| |
|
static |
◆ _getCfgString() [2/6]
Ogre::String Hydrax::CfgFileManager::_getCfgString |
( |
const Ogre::String & |
Name, |
|
|
const int & |
Value |
|
) |
| |
|
static |
◆ _getCfgString() [3/6]
Ogre::String Hydrax::CfgFileManager::_getCfgString |
( |
const Ogre::String & |
Name, |
|
|
const Ogre::Real & |
Value |
|
) |
| |
|
static |
◆ _getCfgString() [4/6]
Ogre::String Hydrax::CfgFileManager::_getCfgString |
( |
const Ogre::String & |
Name, |
|
|
const Ogre::Vector2 & |
Value |
|
) |
| |
|
static |
◆ _getCfgString() [5/6]
Ogre::String Hydrax::CfgFileManager::_getCfgString |
( |
const Ogre::String & |
Name, |
|
|
const Ogre::Vector3 & |
Value |
|
) |
| |
|
static |
◆ _getCfgString() [6/6]
Ogre::String Hydrax::CfgFileManager::_getCfgString |
( |
const Ogre::String & |
Name, |
|
|
const Size & |
Value |
|
) |
| |
|
static |
◆ _getComponentsCfgString()
const Ogre::String Hydrax::CfgFileManager::_getComponentsCfgString |
( |
| ) |
const |
|
private |
Get components config string.
- Returns
- Components cfg string
Definition at line 185 of file CfgFileManager.cpp.
◆ _getFloatValue()
Ogre::Real Hydrax::CfgFileManager::_getFloatValue |
( |
Ogre::ConfigFile & |
CfgFile, |
|
|
const Ogre::String |
Name |
|
) |
| |
|
static |
◆ _getIntValue()
int Hydrax::CfgFileManager::_getIntValue |
( |
Ogre::ConfigFile & |
CfgFile, |
|
|
const Ogre::String |
Name |
|
) |
| |
|
static |
◆ _getRttCfgString()
const Ogre::String Hydrax::CfgFileManager::_getRttCfgString |
( |
| ) |
const |
|
private |
Get rtt quality config string.
- Returns
- Rtt quality cfg string
Definition at line 382 of file CfgFileManager.cpp.
◆ _getSizeValue()
Size Hydrax::CfgFileManager::_getSizeValue |
( |
Ogre::ConfigFile & |
CfgFile, |
|
|
const Ogre::String |
Name |
|
) |
| |
|
static |
◆ _getVector2Value()
Ogre::Vector2 Hydrax::CfgFileManager::_getVector2Value |
( |
Ogre::ConfigFile & |
CfgFile, |
|
|
const Ogre::String |
Name |
|
) |
| |
|
static |
◆ _getVector3Value()
Ogre::Vector3 Hydrax::CfgFileManager::_getVector3Value |
( |
Ogre::ConfigFile & |
CfgFile, |
|
|
const Ogre::String |
Name |
|
) |
| |
|
static |
◆ _getVersionCfgString()
const Ogre::String Hydrax::CfgFileManager::_getVersionCfgString |
( |
| ) |
const |
|
private |
◆ _isStringInList()
bool Hydrax::CfgFileManager::_isStringInList |
( |
const Ogre::StringVector & |
List, |
|
|
const Ogre::String & |
Find |
|
) |
| |
|
static |
Check is a std::vector<Ogre::String> contains a specified Ogre::String.
- Returns
- true if it's contained, false if not
Definition at line 279 of file CfgFileManager.cpp.
◆ _loadCfgFile()
const void Hydrax::CfgFileManager::_loadCfgFile |
( |
const Ogre::String & |
File, |
|
|
std::pair< bool, Ogre::ConfigFile > & |
Result |
|
) |
| const |
|
private |
Load a cfg file in an Ogre::ConfigFile.
- Parameters
-
Result,First | False if the file isn't in the Hydrax resource group, Second: Ogre::ConfigFile |
Definition at line 139 of file CfgFileManager.cpp.
◆ _loadComponentsSettings()
const void Hydrax::CfgFileManager::_loadComponentsSettings |
( |
Ogre::ConfigFile & |
CfgFile | ) |
const |
|
private |
◆ _loadRttSettings()
const void Hydrax::CfgFileManager::_loadRttSettings |
( |
Ogre::ConfigFile & |
CfgFile | ) |
const |
|
private |
◆ _saveToFile()
const bool Hydrax::CfgFileManager::_saveToFile |
( |
const Ogre::String & |
Data, |
|
|
const Ogre::String & |
File, |
|
|
const Ogre::String & |
Path |
|
) |
| const |
|
private |
Save a string in file.
- Returns
- false if an error has ocurred
Definition at line 122 of file CfgFileManager.cpp.
◆ load()
const bool Hydrax::CfgFileManager::load |
( |
const Ogre::String & |
File | ) |
const |
Load hydrax cfg file.
- Returns
- false if an error has been ocurred(Check the log file in this case).
Definition at line 39 of file CfgFileManager.cpp.
◆ save()
const bool Hydrax::CfgFileManager::save |
( |
const Ogre::String & |
File, |
|
|
const Ogre::String & |
Path = "" |
|
) |
| const |
Save current hydrax config to a file.
- Returns
- false if an error has been ocurred(Check the log file in this case).
Definition at line 85 of file CfgFileManager.cpp.
◆ mHydrax
Hydrax* Hydrax::CfgFileManager::mHydrax |
|
private |
The documentation for this class was generated from the following files: