![]() |
V-Gears 0
Free Final Fantasy VII engine.
|
A configuration variable. More...
#include <ConfigVar.h>
Public Member Functions | |
ConfigVar (const Ogre::String &name, const Ogre::String &description, const Ogre::String &default_value) | |
Constructor. More... | |
int | GetI () const |
Retrieves the value of the variable in integer form. More... | |
float | GetF () const |
Retrieves the value of the variable in float form. More... | |
bool | GetB () const |
Retrieves the value of the variable in boolean form. More... | |
Ogre::String | GetS () const |
Retrieves the value of the variable in string form. More... | |
void | SetI (int value) |
Sets the integer value of the variable. More... | |
void | SetF (float value) |
Sets the float value of the variable. More... | |
void | SetB (bool value) |
Sets the boolean value of the variable. More... | |
void | SetS (const Ogre::String &value) |
Sets the string value of the variable. More... | |
const Ogre::String & | GetName () const |
Retrieves the variable name. More... | |
const Ogre::String & | GetDescription () const |
Retrieves the variable description. More... | |
const Ogre::String & | GetDefaultValue () const |
Retrieves the variable default value. More... | |
void | UpdateVariables () |
Updates the integer and float values from the string value. More... | |
Private Member Functions | |
ConfigVar (const ConfigVar &)=delete | |
Forbidden copy constructor. More... | |
ConfigVar & | operator= (const ConfigVar &)=delete |
Forbidden copy constructor. More... | |
Private Attributes | |
Ogre::String | name_ |
The variable name. More... | |
Ogre::String | description_ |
The variable description. More... | |
Ogre::String | default_value_ |
The variable default value. More... | |
int | value_i_ |
Variable value, integer format. More... | |
float | value_f_ |
Variable value, float format. More... | |
bool | value_b_ |
Variable value, integer format. More... | |
Ogre::String | value_s_ |
Variable value, string format. More... | |
ConfigVar * | previous_ |
Static Private Attributes | |
static ConfigVar * | static_config_var_list_ = nullptr |
Friends | |
class | ConfigVarHandler |
A configuration variable.
ConfigVar::ConfigVar | ( | const Ogre::String & | name, |
const Ogre::String & | description, | ||
const Ogre::String & | default_value | ||
) |
Constructor.
[in] | name | The variable name. |
[in] | description | A human-friendly description for the variable. |
[in] | default_value | The default value for the variable. |
|
privatedelete |
Forbidden copy constructor.
bool ConfigVar::GetB | ( | ) | const |
Retrieves the value of the variable in boolean form.
const Ogre::String & ConfigVar::GetDefaultValue | ( | ) | const |
Retrieves the variable default value.
const Ogre::String & ConfigVar::GetDescription | ( | ) | const |
Retrieves the variable description.
float ConfigVar::GetF | ( | ) | const |
Retrieves the value of the variable in float form.
int ConfigVar::GetI | ( | ) | const |
Retrieves the value of the variable in integer form.
const Ogre::String & ConfigVar::GetName | ( | ) | const |
Retrieves the variable name.
Ogre::String ConfigVar::GetS | ( | ) | const |
Retrieves the value of the variable in string form.
void ConfigVar::SetB | ( | bool | value | ) |
Sets the boolean value of the variable.
[in] | value | The variable value. |
void ConfigVar::SetF | ( | float | value | ) |
Sets the float value of the variable.
[in] | value | The variable value. |
void ConfigVar::SetI | ( | int | value | ) |
Sets the integer value of the variable.
[in] | value | The variable value. |
void ConfigVar::SetS | ( | const Ogre::String & | value | ) |
Sets the string value of the variable.
[in] | value | The variable value. |
void ConfigVar::UpdateVariables | ( | ) |
Updates the integer and float values from the string value.
|
friend |
|
private |
The variable default value.
|
private |
The variable description.
|
private |
The variable name.
|
staticprivate |
|
private |
Variable value, integer format.
|
private |
Variable value, float format.
|
private |
Variable value, integer format.
|
private |
Variable value, string format.