![]() |
Public API Reference |
![]() |
This provides the interface to a scripting language interpreter. More...
#include <ivaria/script.h>
Public Member Functions | |
virtual csPtr< iScriptValue > | Call (const char *name, const csRefArray< iScriptValue > &args=csRefArray< iScriptValue >())=0 |
Calls a subroutine in the script. | |
virtual bool | LoadModule (const char *name)=0 |
Loads a named module in the script interpreter. | |
virtual bool | LoadModule (const char *path, const char *filename)=0 |
Loads a module in the script intepreter, from a file in VFS. | |
virtual bool | LoadModuleNative (const char *path, const char *filename)=0 |
Loads a module from a file in the native filesystem. | |
virtual csPtr< iScriptObject > | New (const char *type, const csRefArray< iScriptValue > &args=csRefArray< iScriptValue >())=0 |
Creates an object in the script. | |
virtual bool | Remove (const char *name)=0 |
Removes a variable from the script interpreter. | |
virtual csPtr< iScriptValue > | Retrieve (const char *name)=0 |
Gets the value of a variable in the script interpreter. | |
virtual bool | RunText (const char *text)=0 |
Runs some script in the scripting language. | |
virtual csPtr< iScriptValue > | RValue (int value)=0 |
Creates a new script value container object and returns it. | |
virtual csPtr< iScriptValue > | RValue (float value)=0 |
Creates a new script value container object and returns it. | |
virtual csPtr< iScriptValue > | RValue (double value)=0 |
Creates a new script value container object and returns it. | |
virtual csPtr< iScriptValue > | RValue (const char *value)=0 |
Creates a new script value container object and returns it. | |
virtual csPtr< iScriptValue > | RValue (bool value)=0 |
Creates a new script value container object and returns it. | |
virtual csPtr< iScriptValue > | RValue (iScriptObject *value)=0 |
Creates a new script value container object and returns it. | |
virtual bool | Store (const char *name, iScriptValue *value)=0 |
Sets a variable in the script interpreter. |
This provides the interface to a scripting language interpreter.
virtual csPtr<iScriptValue> iScript::Call | ( | const char * | name, |
const csRefArray< iScriptValue > & | args = csRefArray< iScriptValue >() |
||
) | [pure virtual] |
Calls a subroutine in the script.
name | The name of the subroutine. |
args | An optional array of arguments to pass to the subroutine. |
Implemented in csScriptCommon.
virtual bool iScript::LoadModule | ( | const char * | name | ) | [pure virtual] |
Loads a named module in the script interpreter.
name | Language-dependent name of the module. |
virtual bool iScript::LoadModule | ( | const char * | path, |
const char * | filename | ||
) | [pure virtual] |
Loads a module in the script intepreter, from a file in VFS.
path | Virtual filesystem path to the script or module file. |
filename | Filename of the script or module file. |
virtual bool iScript::LoadModuleNative | ( | const char * | path, |
const char * | filename | ||
) | [pure virtual] |
Loads a module from a file in the native filesystem.
path | Native filesystem path to the script or module file. |
filename | Filename of the script or module file. |
virtual csPtr<iScriptObject> iScript::New | ( | const char * | type, |
const csRefArray< iScriptValue > & | args = csRefArray< iScriptValue >() |
||
) | [pure virtual] |
Creates an object in the script.
type | The name of the class to instantiate. |
args | An optional array of arguments to pass to the constructor. |
virtual bool iScript::Remove | ( | const char * | name | ) | [pure virtual] |
Removes a variable from the script interpreter.
name | The name of the variable to remove. |
virtual csPtr<iScriptValue> iScript::Retrieve | ( | const char * | name | ) | [pure virtual] |
Gets the value of a variable in the script interpreter.
name | The name of the variable to retrieve. |
Implemented in csScriptCommon.
virtual bool iScript::RunText | ( | const char * | text | ) | [pure virtual] |
Runs some script in the scripting language.
text | The text of the script to execute. |
virtual csPtr<iScriptValue> iScript::RValue | ( | int | value | ) | [pure virtual] |
Creates a new script value container object and returns it.
virtual csPtr<iScriptValue> iScript::RValue | ( | float | value | ) | [pure virtual] |
Creates a new script value container object and returns it.
virtual csPtr<iScriptValue> iScript::RValue | ( | double | value | ) | [pure virtual] |
Creates a new script value container object and returns it.
virtual csPtr<iScriptValue> iScript::RValue | ( | const char * | value | ) | [pure virtual] |
Creates a new script value container object and returns it.
virtual csPtr<iScriptValue> iScript::RValue | ( | bool | value | ) | [pure virtual] |
Creates a new script value container object and returns it.
virtual csPtr<iScriptValue> iScript::RValue | ( | iScriptObject * | value | ) | [pure virtual] |
Creates a new script value container object and returns it.
virtual bool iScript::Store | ( | const char * | name, |
iScriptValue * | value | ||
) | [pure virtual] |
Sets a variable in the script interpreter.
name | The name of the variable to set. |
value | The value to set the variable to. |
Implemented in csScriptCommon.