xoreos
0.0.5
|
#include <variable.h>
Public Types | |
typedef std::vector< boost::shared_ptr< Variable > > | Array |
Private Attributes | |
Type | _type |
union { | |
int32 _int | |
float _float | |
Common::UString * _string | |
ObjectReference * _object | |
float _vector [3] | |
ScriptState * _scriptState | |
EngineType * _engineType | |
Variable * _reference | |
} | _value |
boost::shared_ptr< Array > | _array |
Definition at line 56 of file variable.h.
typedef std::vector< boost::shared_ptr<Variable> > Aurora::NWScript::Variable::Array |
Definition at line 58 of file variable.h.
Definition at line 38 of file variable.cpp.
References setType().
Aurora::NWScript::Variable::Variable | ( | int32 | value | ) |
Definition at line 42 of file variable.cpp.
References Aurora::NWScript::kTypeInt, and setType().
Aurora::NWScript::Variable::Variable | ( | float | value | ) |
Definition at line 48 of file variable.cpp.
References Aurora::NWScript::kTypeFloat, and setType().
Aurora::NWScript::Variable::Variable | ( | const Common::UString & | value | ) |
Definition at line 54 of file variable.cpp.
References Aurora::NWScript::kTypeString, and setType().
Aurora::NWScript::Variable::Variable | ( | Object * | value | ) |
Definition at line 60 of file variable.cpp.
References Aurora::NWScript::kTypeObject, and setType().
Aurora::NWScript::Variable::Variable | ( | const ObjectReference & | value | ) |
Definition at line 66 of file variable.cpp.
References Aurora::NWScript::kTypeObject, and setType().
Aurora::NWScript::Variable::Variable | ( | const EngineType * | value | ) |
Definition at line 72 of file variable.cpp.
References Aurora::NWScript::kTypeEngineType, and setType().
Aurora::NWScript::Variable::Variable | ( | const EngineType & | value | ) |
Definition at line 78 of file variable.cpp.
References Aurora::NWScript::kTypeEngineType, and setType().
Aurora::NWScript::Variable::Variable | ( | float | x, |
float | y, | ||
float | z | ||
) |
Definition at line 84 of file variable.cpp.
References Aurora::NWScript::kTypeVector, setType(), and setVector().
Aurora::NWScript::Variable::Variable | ( | const Variable & | var | ) |
Definition at line 90 of file variable.cpp.
Aurora::NWScript::Variable::~Variable | ( | ) |
Definition at line 94 of file variable.cpp.
References Aurora::NWScript::kTypeVoid, and setType().
const Variable::Array & Aurora::NWScript::Variable::getArray | ( | ) | const |
Definition at line 353 of file variable.cpp.
References _array, _type, and Aurora::NWScript::kTypeArray.
Referenced by Aurora::NWScript::formatVariable(), Engines::DragonAge::Functions::getNearestObject(), Engines::DragonAge2::Functions::getNearestObject(), Engines::DragonAge::Functions::getNearestObjectByTag(), Engines::DragonAge2::Functions::getNearestObjectByTag(), Aurora::NWScript::NCSFile::o_getrefarray(), Aurora::NWScript::NCSFile::o_readarray(), and Aurora::NWScript::NCSFile::o_writearray().
Variable::Array & Aurora::NWScript::Variable::getArray | ( | ) |
Definition at line 362 of file variable.cpp.
References _array, _type, and Aurora::NWScript::kTypeArray.
size_t Aurora::NWScript::Variable::getArraySize | ( | ) | const |
Definition at line 371 of file variable.cpp.
References _array, _type, and Aurora::NWScript::kTypeArray.
EngineType * Aurora::NWScript::Variable::getEngineType | ( | ) | const |
Definition at line 328 of file variable.cpp.
References _type, _value, and Aurora::NWScript::kTypeEngineType.
Referenced by Engines::DragonAge2::Functions::getCurrentEventType(), Engines::DragonAge2::Functions::getEventCreatorRef(), Engines::DragonAge2::Functions::getEventTargetRef(), Engines::DragonAge2::Functions::getEventTypeRef(), Engines::DragonAge2::Functions::getLocalCommand(), Engines::DragonAge2::Functions::getLocalEffect(), Engines::DragonAge2::Functions::getLocalEvent(), Engines::DragonAge2::Functions::getLocalItemProperty(), Engines::DragonAge2::Functions::getLocalLocation(), Engines::DragonAge2::Functions::getLocalPlayer(), Engines::DragonAge2::Functions::handleEventRef(), Engines::DragonAge::Functions::setEventCreator(), Engines::DragonAge2::Functions::setEventCreator(), Engines::DragonAge2::Functions::setEventCreatorRef(), Engines::DragonAge::Functions::setEventType(), Engines::DragonAge2::Functions::setEventType(), and Engines::DragonAge2::Functions::setEventTypeRef().
float Aurora::NWScript::Variable::getFloat | ( | ) | const |
Definition at line 300 of file variable.cpp.
References _type, _value, and Aurora::NWScript::kTypeFloat.
Referenced by Aurora::NWScript::NCSFile::callEngine(), Aurora::NWScript::formatVariable(), Engines::DragonAge2::Functions::getLocalFloat(), Engines::Jade::Functions::getLocalFloat(), Aurora::NWScript::NCSFile::o_add(), Aurora::NWScript::NCSFile::o_div(), Aurora::NWScript::NCSFile::o_geq(), Aurora::NWScript::NCSFile::o_gt(), Aurora::NWScript::NCSFile::o_leq(), Aurora::NWScript::NCSFile::o_lt(), Aurora::NWScript::NCSFile::o_mul(), Aurora::NWScript::NCSFile::o_neg(), Aurora::NWScript::NCSFile::o_sub(), Engines::KotOR2::ScriptContainer::runScript(), Engines::KotOR::ScriptContainer::runScript(), Engines::NWN2::ScriptContainer::runScript(), Engines::NWN::ScriptContainer::runScript(), Engines::Witcher::ScriptContainer::runScript(), Engines::Jade::ScriptContainer::runScript(), Engines::DragonAge2::ScriptContainer::runScript(), Engines::DragonAge::ScriptContainer::runScript(), and Aurora::DLGFile::runScript().
int32 Aurora::NWScript::Variable::getInt | ( | ) | const |
Definition at line 293 of file variable.cpp.
References _type, _value, and Aurora::NWScript::kTypeInt.
Referenced by Aurora::NWScript::NCSFile::execute(), Aurora::NWScript::formatVariable(), Engines::Jade::Functions::getLocalBool(), Engines::KotOR2::Functions::getLocalBoolean(), Engines::KotOR::Functions::getLocalBoolean(), Engines::DragonAge2::Functions::getLocalInt(), Engines::Jade::Functions::getLocalInt(), Engines::KotOR2::Functions::getLocalNumber(), Engines::KotOR::Functions::getLocalNumber(), Aurora::NWScript::NCSFile::o_add(), Aurora::NWScript::NCSFile::o_booland(), Aurora::NWScript::NCSFile::o_comp(), Aurora::NWScript::NCSFile::o_decbp(), Aurora::NWScript::NCSFile::o_decsp(), Aurora::NWScript::NCSFile::o_div(), Aurora::NWScript::NCSFile::o_excor(), Aurora::NWScript::NCSFile::o_geq(), Aurora::NWScript::NCSFile::o_getrefarray(), Aurora::NWScript::NCSFile::o_gt(), Aurora::NWScript::NCSFile::o_incbp(), Aurora::NWScript::NCSFile::o_incor(), Aurora::NWScript::NCSFile::o_incsp(), Aurora::NWScript::NCSFile::o_jnz(), Aurora::NWScript::NCSFile::o_jz(), Aurora::NWScript::NCSFile::o_leq(), Aurora::NWScript::NCSFile::o_logand(), Aurora::NWScript::NCSFile::o_logor(), Aurora::NWScript::NCSFile::o_lt(), Aurora::NWScript::NCSFile::o_mod(), Aurora::NWScript::NCSFile::o_mul(), Aurora::NWScript::NCSFile::o_neg(), Aurora::NWScript::NCSFile::o_not(), Aurora::NWScript::NCSFile::o_readarray(), Aurora::NWScript::NCSFile::o_restorebp(), Aurora::NWScript::NCSFile::o_shleft(), Aurora::NWScript::NCSFile::o_shright(), Aurora::NWScript::NCSFile::o_sub(), Aurora::NWScript::NCSFile::o_ushright(), Aurora::NWScript::NCSFile::o_writearray(), Engines::NWN::ScriptContainer::runScript(), Engines::Jade::ScriptContainer::runScript(), Engines::NWN2::ScriptContainer::runScript(), Engines::Witcher::ScriptContainer::runScript(), Engines::KotOR2::ScriptContainer::runScript(), Engines::KotOR::ScriptContainer::runScript(), Engines::DragonAge2::ScriptContainer::runScript(), Engines::DragonAge::ScriptContainer::runScript(), and Aurora::DLGFile::runScript().
Object * Aurora::NWScript::Variable::getObject | ( | ) | const |
Definition at line 321 of file variable.cpp.
References _type, _value, and Aurora::NWScript::kTypeObject.
Referenced by Aurora::NWScript::formatVariable(), Engines::DragonAge2::Functions::getLocalObject(), and Engines::Jade::Functions::getLocalObject().
Variable * Aurora::NWScript::Variable::getReference | ( | ) | const |
Definition at line 408 of file variable.cpp.
References _type, _value, and Aurora::NWScript::kTypeReference.
Referenced by Aurora::NWScript::formatVariable().
ScriptState & Aurora::NWScript::Variable::getScriptState | ( | ) |
Definition at line 394 of file variable.cpp.
References _type, _value, and Aurora::NWScript::kTypeScriptState.
Referenced by Aurora::NWScript::NCSFile::callEngine(), and Aurora::NWScript::NCSFile::o_storestate().
const ScriptState & Aurora::NWScript::Variable::getScriptState | ( | ) | const |
Definition at line 401 of file variable.cpp.
References _type, _value, and Aurora::NWScript::kTypeScriptState.
Common::UString & Aurora::NWScript::Variable::getString | ( | ) |
Definition at line 314 of file variable.cpp.
References _type, _value, and Aurora::NWScript::kTypeString.
Referenced by Aurora::NWScript::formatVariable(), Engines::NWN::Functions::get2DAString(), Engines::NWN2::Functions::get2DAString(), Engines::Witcher::Functions::get2DAString(), Engines::DragonAge2::Functions::getLocalResource(), Engines::DragonAge2::Functions::getLocalString(), Engines::Jade::Functions::getLocalString(), Engines::Witcher::Functions::getName(), Engines::NWN::Functions::getName(), Engines::NWN2::Functions::getName(), Engines::DragonAge::Functions::getName(), Engines::DragonAge2::Functions::getName(), Engines::DragonAge::Functions::getResRef(), Engines::DragonAge2::Functions::getResRef(), Engines::KotOR2::Functions::getStringLeft(), Engines::NWN::Functions::getStringLeft(), Engines::NWN2::Functions::getStringLeft(), Engines::KotOR::Functions::getStringLeft(), Engines::Witcher::Functions::getStringLeft(), Engines::Jade::Functions::getStringLeft(), Engines::KotOR2::Functions::getStringRight(), Engines::NWN::Functions::getStringRight(), Engines::NWN2::Functions::getStringRight(), Engines::Witcher::Functions::getStringRight(), Engines::KotOR::Functions::getStringRight(), Engines::Jade::Functions::getStringRight(), Engines::KotOR2::Functions::getSubString(), Engines::NWN::Functions::getSubString(), Engines::NWN2::Functions::getSubString(), Engines::KotOR::Functions::getSubString(), Engines::Witcher::Functions::getSubString(), Engines::Jade::Functions::getSubString(), Engines::Witcher::Functions::getTag(), Engines::NWN::Functions::getTag(), Engines::Jade::Functions::getTag(), Engines::DragonAge::Functions::getTag(), Engines::NWN2::Functions::getTag(), Engines::DragonAge2::Functions::getTag(), Engines::KotOR2::Functions::insertString(), Engines::NWN::Functions::insertString(), Engines::NWN2::Functions::insertString(), Engines::KotOR::Functions::insertString(), Engines::Witcher::Functions::insertString(), Engines::Jade::Functions::insertString(), Engines::DragonAge::Functions::insertString(), Engines::DragonAge2::Functions::insertString(), Aurora::NWScript::NCSFile::o_add(), Engines::Witcher::Functions::printObject(), Engines::Witcher::Functions::printVector(), Engines::DragonAge::Functions::stringLeft(), Engines::DragonAge2::Functions::stringLeft(), Engines::DragonAge2::Functions::stringRight(), Engines::DragonAge::Functions::stringRight(), Engines::DragonAge::Functions::subString(), and Engines::DragonAge2::Functions::subString().
const Common::UString & Aurora::NWScript::Variable::getString | ( | ) | const |
Definition at line 307 of file variable.cpp.
References _type, _value, and Aurora::NWScript::kTypeString.
Type Aurora::NWScript::Variable::getType | ( | ) | const |
Definition at line 289 of file variable.cpp.
References _type.
Referenced by Aurora::NWScript::FunctionManager::call(), Aurora::NWScript::NCSFile::callEngine(), Aurora::NWScript::NCSFile::execute(), Aurora::NWScript::formatReturn(), Aurora::NWScript::formatVariable(), Engines::DragonAge2::Functions::getCurrentEventType(), Engines::DragonAge::Functions::getEventType(), Engines::DragonAge2::Functions::getEventType(), Engines::DragonAge2::Functions::getEventTypeRef(), Aurora::NWScript::NCSFile::o_writearray(), Aurora::NWScript::NCSStack::print(), Engines::NWN2::ScriptContainer::runScript(), Engines::Witcher::ScriptContainer::runScript(), Engines::Jade::ScriptContainer::runScript(), Engines::KotOR::ScriptContainer::runScript(), Engines::KotOR2::ScriptContainer::runScript(), Engines::NWN::ScriptContainer::runScript(), Engines::DragonAge::ScriptContainer::runScript(), Engines::DragonAge2::ScriptContainer::runScript(), Aurora::DLGFile::runScript(), Aurora::NWScript::FunctionContext::setDefaults(), Engines::DragonAge2::Functions::unimplementedFunction(), Engines::DragonAge::Functions::unimplementedFunction(), Engines::NWN2::Functions::unimplementedFunction(), Engines::NWN::Functions::unimplementedFunction(), Engines::KotOR2::Functions::unimplementedFunction(), Engines::Witcher::Functions::unimplementedFunction(), Engines::KotOR::Functions::unimplementedFunction(), and Engines::Jade::Functions::unimplementedFunction().
void Aurora::NWScript::Variable::getVector | ( | float & | x, |
float & | y, | ||
float & | z | ||
) | const |
Definition at line 344 of file variable.cpp.
References _type, _value, and Aurora::NWScript::kTypeVector.
Referenced by Aurora::NWScript::NCSFile::callEngine(), and Aurora::NWScript::formatVariable().
void Aurora::NWScript::Variable::growArray | ( | Type | type, |
size_t | size | ||
) |
Definition at line 380 of file variable.cpp.
References _array, _type, and Aurora::NWScript::kTypeArray.
Referenced by Aurora::NWScript::NCSFile::o_writearray().
bool Aurora::NWScript::Variable::operator!= | ( | const Variable & | var | ) | const |
Definition at line 285 of file variable.cpp.
Definition at line 161 of file variable.cpp.
References _array, _engineType, _object, _scriptState, _string, _type, _value, Aurora::NWScript::kTypeArray, Aurora::NWScript::kTypeEngineType, Aurora::NWScript::kTypeObject, Aurora::NWScript::kTypeScriptState, Aurora::NWScript::kTypeString, and setType().
Definition at line 183 of file variable.cpp.
References _type, _value, and Aurora::NWScript::kTypeInt.
Variable & Aurora::NWScript::Variable::operator= | ( | float | value | ) |
Definition at line 192 of file variable.cpp.
References _type, _value, and Aurora::NWScript::kTypeFloat.
Variable & Aurora::NWScript::Variable::operator= | ( | const Common::UString & | value | ) |
Definition at line 201 of file variable.cpp.
References _type, _value, and Aurora::NWScript::kTypeString.
Definition at line 210 of file variable.cpp.
References _type, _value, and Aurora::NWScript::kTypeObject.
Variable & Aurora::NWScript::Variable::operator= | ( | const ObjectReference & | value | ) |
Definition at line 219 of file variable.cpp.
References _type, _value, and Aurora::NWScript::kTypeObject.
Variable & Aurora::NWScript::Variable::operator= | ( | const EngineType * | value | ) |
Definition at line 228 of file variable.cpp.
References _type, _value, Aurora::NWScript::EngineType::clone(), and Aurora::NWScript::kTypeEngineType.
Variable & Aurora::NWScript::Variable::operator= | ( | const EngineType & | value | ) |
Definition at line 241 of file variable.cpp.
bool Aurora::NWScript::Variable::operator== | ( | const Variable & | var | ) | const |
Definition at line 247 of file variable.cpp.
References _array, _float, _int, _object, _string, _type, _value, _vector, Aurora::NWScript::kTypeArray, Aurora::NWScript::kTypeFloat, Aurora::NWScript::kTypeInt, Aurora::NWScript::kTypeObject, Aurora::NWScript::kTypeString, Aurora::NWScript::kTypeVector, and Aurora::NWScript::kTypeVoid.
void Aurora::NWScript::Variable::setReference | ( | Variable * | reference | ) |
Definition at line 415 of file variable.cpp.
References _type, _value, and Aurora::NWScript::kTypeReference.
Referenced by Aurora::NWScript::NCSFile::o_getref(), and Aurora::NWScript::NCSFile::o_getrefarray().
void Aurora::NWScript::Variable::setType | ( | Type | type | ) |
Definition at line 98 of file variable.cpp.
References _array, _type, _value, Aurora::NWScript::kTypeAny, Aurora::NWScript::kTypeArray, Aurora::NWScript::kTypeEngineType, Aurora::NWScript::kTypeFloat, Aurora::NWScript::kTypeInt, Aurora::NWScript::kTypeObject, Aurora::NWScript::kTypeReference, Aurora::NWScript::kTypeScriptState, Aurora::NWScript::kTypeString, Aurora::NWScript::kTypeVector, and Aurora::NWScript::kTypeVoid.
Referenced by Aurora::NWScript::NCSFile::callEngine(), Aurora::NWScript::NCSFile::o_storestate(), operator=(), Aurora::NWScript::NCSFile::reset(), Aurora::NWScript::FunctionContext::setSignature(), Variable(), and ~Variable().
void Aurora::NWScript::Variable::setVector | ( | float | x, |
float | y, | ||
float | z | ||
) |
Definition at line 335 of file variable.cpp.
References _type, _value, and Aurora::NWScript::kTypeVector.
Referenced by Aurora::NWScript::NCSFile::callEngine(), Engines::Witcher::Functions::getPosition(), Engines::NWN::Functions::getPosition(), Engines::Jade::Functions::getPosition(), Engines::DragonAge::Functions::getPosition(), Engines::NWN2::Functions::getPosition(), Engines::DragonAge2::Functions::getPosition(), Engines::NWN::Functions::getPositionFromLocation(), Engines::Witcher::Functions::getPositionFromLocation(), Engines::Jade::Functions::getPositionFromLocation(), Engines::NWN2::Functions::getPositionFromLocation(), Engines::DragonAge::Functions::getVectorNormalize(), Engines::DragonAge2::Functions::getVectorNormalize(), Engines::DragonAge::Functions::stringToVector(), Engines::DragonAge2::Functions::stringToVector(), Variable(), Engines::DragonAge2::Functions::vector(), Engines::DragonAge::Functions::vector(), Engines::KotOR2::Functions::vector(), Engines::NWN::Functions::vector(), Engines::NWN2::Functions::vector(), Engines::Witcher::Functions::vector(), Engines::KotOR::Functions::vector(), Engines::Jade::Functions::vector(), Engines::NWN2::Functions::vectorNormalize(), Engines::KotOR2::Functions::vectorNormalize(), Engines::NWN::Functions::vectorNormalize(), Engines::Witcher::Functions::vectorNormalize(), Engines::KotOR::Functions::vectorNormalize(), and Engines::Jade::Functions::vectorNormalize().
|
private |
Definition at line 126 of file variable.h.
Referenced by getArray(), getArraySize(), growArray(), operator=(), operator==(), and setType().
EngineType* Aurora::NWScript::Variable::_engineType |
Definition at line 122 of file variable.h.
Referenced by operator=().
float Aurora::NWScript::Variable::_float |
Definition at line 117 of file variable.h.
Referenced by operator==().
int32 Aurora::NWScript::Variable::_int |
Definition at line 116 of file variable.h.
Referenced by operator==().
ObjectReference* Aurora::NWScript::Variable::_object |
Definition at line 119 of file variable.h.
Referenced by operator=(), and operator==().
Variable* Aurora::NWScript::Variable::_reference |
Definition at line 123 of file variable.h.
ScriptState* Aurora::NWScript::Variable::_scriptState |
Definition at line 121 of file variable.h.
Referenced by operator=().
Common::UString* Aurora::NWScript::Variable::_string |
Definition at line 118 of file variable.h.
Referenced by operator=(), and operator==().
|
private |
Definition at line 113 of file variable.h.
Referenced by getArray(), getArraySize(), getEngineType(), getFloat(), getInt(), getObject(), getReference(), getScriptState(), getString(), getType(), getVector(), growArray(), operator=(), operator==(), setReference(), setType(), and setVector().
union { ... } Aurora::NWScript::Variable::_value |
Referenced by getEngineType(), getFloat(), getInt(), getObject(), getReference(), getScriptState(), getString(), getVector(), operator=(), operator==(), setReference(), setType(), and setVector().
float Aurora::NWScript::Variable::_vector[3] |
Definition at line 120 of file variable.h.
Referenced by operator==().