iScriptValue Struct Reference
This provides the interface to a value stored in the scripting language's native format, be it a numeric or string value or a reference to an object. More...
#include <ivaria/script.h>
Public Types | |
enum | |
Datatype constants, used to make a bitmask. More... | |
Public Member Functions | |
virtual bool | GetBool () const =0 |
Returns this value as a bool. | |
virtual double | GetDouble () const =0 |
Returns this value as a double. | |
virtual float | GetFloat () const =0 |
Returns this value as a float. | |
virtual int | GetInt () const =0 |
Returns this value as an int. | |
virtual csRef< iScriptObject > | GetObject () const =0 |
Returns this value as a reference to a script object. | |
virtual iScript * | GetScript ()=0 |
Returns a reference to the iScript to which this value belongs. | |
virtual const csRef< iString > | GetString () const =0 |
Returns this value as a string. | |
virtual unsigned | GetTypes () const =0 |
Returns a bitmask indicating which types the value can be coerced into. |
Detailed Description
This provides the interface to a value stored in the scripting language's native format, be it a numeric or string value or a reference to an object.
The script interpreter (iScript) returns one of these from method and subroutine calls, and property and variable gets, and accepts one in method and subroutine arguments, and property and variable sets.
This is a constant value such as 3 or "hello, world" and as such you generally cannot change the value stored in an iScriptValue object. To change the value of a variable in the script, construct a new iScriptValue with iScript::RValue() and pass it to iScript::Store() or iScriptObject::Set().
Main creators of instances implementing this interface:
Definition at line 54 of file script.h.
Member Enumeration Documentation
Member Function Documentation
virtual bool iScriptValue::GetBool | ( | ) | const [pure virtual] |
Returns this value as a bool.
virtual double iScriptValue::GetDouble | ( | ) | const [pure virtual] |
Returns this value as a double.
virtual float iScriptValue::GetFloat | ( | ) | const [pure virtual] |
Returns this value as a float.
virtual int iScriptValue::GetInt | ( | ) | const [pure virtual] |
Returns this value as an int.
virtual csRef<iScriptObject> iScriptValue::GetObject | ( | ) | const [pure virtual] |
Returns this value as a reference to a script object.
virtual iScript* iScriptValue::GetScript | ( | ) | [pure virtual] |
Returns a reference to the iScript to which this value belongs.
Returns this value as a string.
virtual unsigned iScriptValue::GetTypes | ( | ) | const [pure virtual] |
Returns a bitmask indicating which types the value can be coerced into.
The documentation for this struct was generated from the following file:
- ivaria/script.h
Generated for Crystal Space 2.0 by doxygen 1.6.1