Config file manager.
More...
#include <SCfgFileManager.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 Ogre::Vector4 &Value) |
|
static Ogre::String | _getCfgString (const Ogre::String &Name, const Ogre::Degree &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 Ogre::Vector4 | _getVector4Value (Ogre::ConfigFile &CfgFile, const Ogre::String Name) |
|
static Ogre::Degree | _getDegreeValue (Ogre::ConfigFile &CfgFile, const Ogre::String Name) |
|
static bool | _isStringInList (const Ogre::StringVector &List, const Ogre::String &Find) |
|
|
const bool | _saveToFile (const Ogre::String &Data, const Ogre::String &File, const Ogre::String &Path) const |
| Save a string in file. More...
|
|
const void | _loadCfgFile (const Ogre::String &File, std::pair< bool, Ogre::ConfigFile > &Result) const |
| Load a cfg file in an Ogre::ConfigFile. More...
|
|
const Ogre::String | _getVersionCfgString () const |
| Get hydrax version cfg string. More...
|
|
const bool | _checkVersion (Ogre::ConfigFile &CfgFile) const |
| Check hydrax version cfg file. More...
|
|
Config file manager.
Class to load/save all Hydrax options from/to a config file
Definition at line 40 of file SCfgFileManager.h.
◆ CfgFileManager()
◆ ~CfgFileManager()
SkyX::CfgFileManager::~CfgFileManager |
( |
| ) |
|
◆ _checkVersion()
const bool SkyX::CfgFileManager::_checkVersion |
( |
Ogre::ConfigFile & |
CfgFile | ) |
const |
|
private |
Check hydrax version cfg file.
- Parameters
-
- Returns
- true if it's the same version, false if not.
Definition at line 230 of file SCfgFileManager.cpp.
◆ _getBoolValue()
bool SkyX::CfgFileManager::_getBoolValue |
( |
Ogre::ConfigFile & |
CfgFile, |
|
|
const Ogre::String |
Name |
|
) |
| |
|
static |
◆ _getCfgString() [1/7]
Ogre::String SkyX::CfgFileManager::_getCfgString |
( |
const Ogre::String & |
Name, |
|
|
const bool & |
Value |
|
) |
| |
|
static |
◆ _getCfgString() [2/7]
Ogre::String SkyX::CfgFileManager::_getCfgString |
( |
const Ogre::String & |
Name, |
|
|
const int & |
Value |
|
) |
| |
|
static |
◆ _getCfgString() [3/7]
Ogre::String SkyX::CfgFileManager::_getCfgString |
( |
const Ogre::String & |
Name, |
|
|
const Ogre::Degree & |
Value |
|
) |
| |
|
static |
◆ _getCfgString() [4/7]
Ogre::String SkyX::CfgFileManager::_getCfgString |
( |
const Ogre::String & |
Name, |
|
|
const Ogre::Real & |
Value |
|
) |
| |
|
static |
◆ _getCfgString() [5/7]
Ogre::String SkyX::CfgFileManager::_getCfgString |
( |
const Ogre::String & |
Name, |
|
|
const Ogre::Vector2 & |
Value |
|
) |
| |
|
static |
◆ _getCfgString() [6/7]
Ogre::String SkyX::CfgFileManager::_getCfgString |
( |
const Ogre::String & |
Name, |
|
|
const Ogre::Vector3 & |
Value |
|
) |
| |
|
static |
◆ _getCfgString() [7/7]
Ogre::String SkyX::CfgFileManager::_getCfgString |
( |
const Ogre::String & |
Name, |
|
|
const Ogre::Vector4 & |
Value |
|
) |
| |
|
static |
◆ _getDegreeValue()
Ogre::Degree SkyX::CfgFileManager::_getDegreeValue |
( |
Ogre::ConfigFile & |
CfgFile, |
|
|
const Ogre::String |
Name |
|
) |
| |
|
static |
◆ _getFloatValue()
Ogre::Real SkyX::CfgFileManager::_getFloatValue |
( |
Ogre::ConfigFile & |
CfgFile, |
|
|
const Ogre::String |
Name |
|
) |
| |
|
static |
◆ _getIntValue()
int SkyX::CfgFileManager::_getIntValue |
( |
Ogre::ConfigFile & |
CfgFile, |
|
|
const Ogre::String |
Name |
|
) |
| |
|
static |
◆ _getVector2Value()
Ogre::Vector2 SkyX::CfgFileManager::_getVector2Value |
( |
Ogre::ConfigFile & |
CfgFile, |
|
|
const Ogre::String |
Name |
|
) |
| |
|
static |
◆ _getVector3Value()
Ogre::Vector3 SkyX::CfgFileManager::_getVector3Value |
( |
Ogre::ConfigFile & |
CfgFile, |
|
|
const Ogre::String |
Name |
|
) |
| |
|
static |
◆ _getVector4Value()
Ogre::Vector4 SkyX::CfgFileManager::_getVector4Value |
( |
Ogre::ConfigFile & |
CfgFile, |
|
|
const Ogre::String |
Name |
|
) |
| |
|
static |
◆ _getVersionCfgString()
const Ogre::String SkyX::CfgFileManager::_getVersionCfgString |
( |
| ) |
const |
|
private |
◆ _isStringInList()
bool SkyX::CfgFileManager::_isStringInList |
( |
const Ogre::StringVector & |
List, |
|
|
const Ogre::String & |
Find |
|
) |
| |
|
static |
◆ _loadCfgFile()
const void SkyX::CfgFileManager::_loadCfgFile |
( |
const Ogre::String & |
File, |
|
|
std::pair< bool, Ogre::ConfigFile > & |
Result |
|
) |
| const |
|
private |
Load a cfg file in an Ogre::ConfigFile.
- Parameters
-
File | File name |
Result,std::pair<bool,Ogre::ConfigFile&> | First: False if the file isn't in the Hydrax resource group, Second: Ogre::ConfigFile |
Definition at line 155 of file SCfgFileManager.cpp.
◆ _saveToFile()
const bool SkyX::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 138 of file SCfgFileManager.cpp.
◆ load()
const bool SkyX::CfgFileManager::load |
( |
const Ogre::String & |
File | ) |
const |
Load hydrax cfg file.
- Parameters
-
- Returns
- false if an error has been ocurred(Check the log file in this case).
Definition at line 39 of file SCfgFileManager.cpp.
◆ save()
const bool SkyX::CfgFileManager::save |
( |
const Ogre::String & |
File, |
|
|
const Ogre::String & |
Path = "" |
|
) |
| const |
Save current hydrax config to a file.
- Parameters
-
File | Destination file name |
Path | File path |
- Returns
- false if an error has been ocurred(Check the log file in this case).
Definition at line 127 of file SCfgFileManager.cpp.
◆ mCamera
Ogre::Camera* SkyX::CfgFileManager::mCamera |
|
private |
◆ mController
◆ mSkyX
SkyX* SkyX::CfgFileManager::mSkyX |
|
private |
The documentation for this class was generated from the following files: