CrystalSpace

Public API Reference

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>

Inheritance diagram for iScriptValue:

List of all members.

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< iScriptObjectGetObject () const =0
 Returns this value as a reference to a script object.
virtual iScriptGetScript ()=0
 Returns a reference to the iScript to which this value belongs.
virtual const csRef< iStringGetString () 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

anonymous enum

Datatype constants, used to make a bitmask.

Definition at line 59 of file script.h.


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.

virtual const csRef<iString> iScriptValue::GetString (  )  const [pure virtual]

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:

Generated for Crystal Space 1.4.1 by doxygen 1.7.1