struct ScriptAnyValue { ScriptAnyType type; union { bool b; float number; const char * str; IScriptTable * table; const void * ptr; HSCRIPTFUNCTION function; struct { float x, y, z; } vec3; struct { void * ptr; int nRef; } ud; }; };
IScriptSystem.h
ScriptAnyType type;
bool operator !=(const ScriptAnyValue& rhs) const;
~ScriptAnyValue();
Implemented at the end of header.
ScriptAnyValue& operator =(const ScriptAnyValue& rhs);
Compares 2 values.
bool operator ==(const ScriptAnyValue& rhs) const;
void Clear();
Implemented at the end of header.
bool CopyTo(Ang3 & value) const;
bool CopyTo(HSCRIPTFUNCTION & value) const;
bool CopyTo(IScriptTable *& value) const;
implemented at the end of header
bool CopyTo(ScriptHandle & value) const;
bool CopyTo(SmartScriptTable & value) const;
implemented at the end of header
bool CopyTo(Vec3 & value) const;
bool CopyTo(bool & value) const;
bool CopyTo(char *& value) const;
bool CopyTo(float & value) const;
bool CopyTo(int & value) const;
bool CopyTo(string & value) const;
bool CopyTo(unsigned int & value) const;
void GetMemoryUsage(ICrySizer * pSizer) const;
ScriptVarType GetVarType() const;
ScriptAnyValue();
ScriptAnyValue(const Ang3 & value);
ScriptAnyValue(Ang3&, int);
ScriptAnyValue(HSCRIPTFUNCTION value);
ScriptAnyValue(HSCRIPTFUNCTION, int);
ScriptAnyValue(IScriptTable * value);
Implemented at the end of header.
After SmartScriptTable defined, now implement ScriptAnyValue constructor for it.
ScriptAnyValue(IScriptTable* _table, int);
ScriptAnyValue( USER_DATA,int ) : type(ANY_TUSERDATA) {};
ScriptAnyValue(ScriptAnyType _type);
ScriptAnyValue(const ScriptAnyValue& value);
Implemented at the end of header.
ScriptAnyValue(ScriptHandle value);
ScriptAnyValue(ScriptHandle, int);
ScriptAnyValue(ScriptUserData, int);
ScriptAnyValue(const SmartScriptTable & value);
Implemented at the end of header.
ScriptAnyValue(const SmartScriptTable & value, int);
ScriptAnyValue(const Vec3 & value);
ScriptAnyValue(Vec3&, int);
ScriptAnyValue(bool value);
ScriptAnyValue(bool, int);
Only initialize type.
ScriptAnyValue(const char * value);
ScriptAnyValue(const char*, int);
ScriptAnyValue(float value);
ScriptAnyValue(float&, int);
ScriptAnyValue(int value);
ScriptAnyValue(int, int);
ScriptAnyValue(unsigned int value);
ScriptAnyValue(unsigned int, int);
void Swap(ScriptAnyValue& value);
Implemented at the end of header.