Runtime control variable.
More...
#include <Variables.h>
Runtime control variable.
Definition at line 26 of file Variables.h.
◆ Variable()
Constructs a variable with the given name and value.
- Parameters
-
name | String name of the variable. |
value | String value of the variable. |
Definition at line 37 of file Variables.h.
◆ getBool()
bool Cogs::Core::Variable::getBool |
( |
bool |
defaultValue = false | ) |
const |
|
inline |
◆ getCString()
const char * Cogs::Core::Variable::getCString |
( |
| ) |
const |
|
inline |
◆ getDouble()
double Cogs::Core::Variable::getDouble |
( |
double |
defaultValue = 0.0 | ) |
const |
|
inline |
◆ getFloat()
float Cogs::Core::Variable::getFloat |
( |
float |
defaultValue = 0.0f | ) |
const |
|
inline |
◆ getInt()
int Cogs::Core::Variable::getInt |
( |
int |
defaultValue = 0 | ) |
const |
|
inline |
◆ getName()
const StringView Cogs::Core::Variable::getName |
( |
| ) |
const |
|
inline |
Get the name of the variable.
Definition at line 67 of file Variables.h.
◆ getType()
ParsedDataType Cogs::Core::Variable::getType |
( |
| ) |
const |
|
inline |
◆ getValue()
◆ getVec2()
glm::vec2 Cogs::Core::Variable::getVec2 |
( |
glm::vec2 |
defaultValue = {} | ) |
const |
|
inline |
◆ getVec3()
glm::vec3 Cogs::Core::Variable::getVec3 |
( |
glm::vec3 |
defaultValue = {} | ) |
const |
|
inline |
◆ getVec4()
glm::vec4 Cogs::Core::Variable::getVec4 |
( |
glm::vec4 |
defaultValue = {} | ) |
const |
|
inline |
◆ isEmpty()
bool Cogs::Core::Variable::isEmpty |
( |
| ) |
const |
|
inline |
◆ isStatic()
bool Cogs::Core::Variable::isStatic |
( |
| ) |
const |
|
inline |
◆ operator bool()
Cogs::Core::Variable::operator bool |
( |
| ) |
const |
|
inlineexplicit |
◆ operator=()
void Cogs::Core::Variable::operator= |
( |
const StringView & |
value | ) |
|
|
inline |
Overloaded assignment operator to allow assigning a variable directly from a string.
- Parameters
-
value | String value of the variable. |
- See also
- setValue()
Definition at line 49 of file Variables.h.
◆ setBool()
Variable & Cogs::Core::Variable::setBool |
( |
bool |
value | ) |
|
|
inline |
◆ setDouble()
Variable & Cogs::Core::Variable::setDouble |
( |
double |
value | ) |
|
|
inline |
◆ setFloat()
Variable & Cogs::Core::Variable::setFloat |
( |
float |
value | ) |
|
|
inline |
◆ setInt()
Variable & Cogs::Core::Variable::setInt |
( |
int |
value | ) |
|
|
inline |
◆ setName()
void Cogs::Core::Variable::setName |
( |
const StringView & |
str | ) |
|
|
inline |
◆ setStatic()
void Cogs::Core::Variable::setStatic |
( |
| ) |
|
|
inline |
◆ setValid()
void Cogs::Core::Variable::setValid |
( |
| ) |
|
|
inlineprivate |
◆ setValue()
◆ setVec2()
Variable & Cogs::Core::Variable::setVec2 |
( |
glm::vec2 |
value | ) |
|
|
inline |
◆ setVec3()
Variable & Cogs::Core::Variable::setVec3 |
( |
glm::vec3 |
value | ) |
|
|
inline |
◆ setVec4()
Variable & Cogs::Core::Variable::setVec4 |
( |
glm::vec4 |
value | ) |
|
|
inline |
◆ name
std::string Cogs::Core::Variable::name |
|
private |
◆ stringValue
std::string Cogs::Core::Variable::stringValue |
|
private |
◆ value
◆ variableFlags
VariableFlags Cogs::Core::Variable::variableFlags = VariableFlags::Empty |
|
private |
The documentation for this struct was generated from the following files: