40 enum MemoryReferenceType
52 std::size_t mStringID;
82 StoredValue(
void* memoryLocation,
const MemoryReferenceType type) : mType(StoredValueType::MemoryReference), mStorage(), mMemoryReferenceType(type), mMemoryLocation(memoryLocation), mConsoleObject(
nullptr)
87 StoredValue(
const int value) : mType(StoredValueType::Integer), mStorage(value), mMemoryReferenceType(MemoryReferenceType::NullReferenceType), mMemoryLocation(
nullptr), mConsoleObject(
nullptr)
92 StoredValue(
const float value) : mType(StoredValueType::Float), mStorage(value), mMemoryReferenceType(MemoryReferenceType::NullReferenceType), mMemoryLocation(
nullptr), mConsoleObject(
nullptr)
97 StoredValue(
const std::size_t value,
const StoredValueType type) : mType(type), mStorage(value), mMemoryReferenceType(MemoryReferenceType::NullReferenceType), mMemoryLocation(
nullptr), mConsoleObject(
nullptr)
102 StoredValue(std::shared_ptr<ConsoleObject>
object,
const std::size_t field) : mType(StoredValueType::SubfieldReference), mStorage(field), mMemoryReferenceType(MemoryReferenceType::NullReferenceType), mMemoryLocation(
nullptr), mConsoleObject(
object)
113 int toInteger(std::shared_ptr<ExecutionState> state);
120 float toFloat(std::shared_ptr<ExecutionState> state);
127 std::string
toString(std::shared_ptr<ExecutionState> state);
129 bool toBoolean(std::shared_ptr<ExecutionState> state);
131 std::shared_ptr<ConsoleObject> toConsoleObject(std::shared_ptr<ExecutionState> state);
135 StoredValue getReferencedValueCopy(std::shared_ptr<ExecutionState> state);
137 bool isInteger(std::shared_ptr<ExecutionState> state);
148 std::string getRepresentation();
151 StoredValueType mType;
153 MemoryReferenceType mMemoryReferenceType;
155 void* mMemoryLocation;
156 std::shared_ptr<ConsoleObject> mConsoleObject;
Storage class used to keep variable values in-memory of arbitrary data types. The data types supporte...
Definition: storedvalue.hpp:80
float toFloat(std::shared_ptr< ExecutionState > state)
Converts the value in question to a native floating point type.
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 ...
std::string toString(std::shared_ptr< ExecutionState > state)
Converts the value in question to a native sting type.
Definition: storedvalue.hpp:49