TorqueScript
0.2
|
Storage class used to keep variable values in-memory of arbitrary data types. The data types supported as integers, floats and strings (via string ID table references). More...
#include <storedvalue.hpp>
Public Member Functions | |
StoredValue (void *memoryLocation, const MemoryReferenceType type) | |
StoredValue (const int value) | |
StoredValue (const float value) | |
StoredValue (const std::size_t value, const StoredValueType type) | |
StoredValue (std::shared_ptr< ConsoleObject > object, const std::size_t field) | |
StoredValue | getReferencedValueCopy (std::shared_ptr< ExecutionState > state) |
bool | isInteger (std::shared_ptr< ExecutionState > state) |
bool | setValue (StoredValue newValue, std::shared_ptr< ExecutionState > state) |
Sets the value of this object. Only has an effect if this object is a reference to a local or global variable. More... | |
std::string | getRepresentation () |
Value Retrieval | |
These functions are used to retrieve the data stored in this object. | |
int | toInteger (std::shared_ptr< ExecutionState > state) |
float | toFloat (std::shared_ptr< ExecutionState > state) |
Converts the value in question to a native floating point type. More... | |
std::string | toString (std::shared_ptr< ExecutionState > state) |
Converts the value in question to a native sting type. More... | |
bool | toBoolean (std::shared_ptr< ExecutionState > state) |
std::shared_ptr< ConsoleObject > | toConsoleObject (std::shared_ptr< ExecutionState > state) |
Storage class used to keep variable values in-memory of arbitrary data types. The data types supported as integers, floats and strings (via string ID table references).
bool TorqueScript::StoredValue::setValue | ( | StoredValue | newValue, |
std::shared_ptr< ExecutionState > | state | ||
) |
Sets the value of this object. Only has an effect if this object is a reference to a local or global variable.
newValue | The new value to set. |
state | The execution state this assignment is taking place in. |
float TorqueScript::StoredValue::toFloat | ( | std::shared_ptr< ExecutionState > | state | ) |
Converts the value in question to a native floating point type.
scope | The execution scope within which this conversion is occurring. |
std::string TorqueScript::StoredValue::toString | ( | std::shared_ptr< ExecutionState > | state | ) |
Converts the value in question to a native sting type.
scope | The execution scope within which this conversion is occurring. |