CrystalSpace

Public API Reference

csScriptCommon Class Reference

This intermediate class can be subclassed by implementors of iScript. More...

#include <csplugincommon/script/scriptcommon.h>

Inheritance diagram for csScriptCommon:

List of all members.

Public Member Functions

virtual csPtr< iScriptValueCall (const char *, const csRefArray< iScriptValue > &=csRefArray< iScriptValue >())=0
 Calls a subroutine in the script.
virtual csPtr< iScriptValueRetrieve (const char *)=0
 Gets the value of a variable in the script interpreter.
virtual bool Store (const char *name, iScriptValue *)=0
 Sets a variable in the script interpreter.

Detailed Description

This intermediate class can be subclassed by implementors of iScript.

It implements the deprecated methods in iScript by forwarding calls to the new methods which have replaced them.

When the deprecated methods are removed, this will no longer be neccessary.

Definition at line 90 of file scriptcommon.h.


Member Function Documentation

virtual csPtr<iScriptValue> csScriptCommon::Call ( const char *  name,
const csRefArray< iScriptValue > &  args = csRefArrayiScriptValue >() 
) [pure virtual]

Calls a subroutine in the script.

Parameters:
name The name of the subroutine.
args An optional array of arguments to pass to the subroutine.
Returns:
The return value of the subroutine. If the subroutine does not exist or encounters a runtime error then it returns 0. If it returns no value then it returns an iScriptValue with a bitmask of 0.
Remarks:
Scripting languages that support pass-by-reference may change the values of the arguments.

Implements iScript.

virtual csPtr<iScriptValue> csScriptCommon::Retrieve ( const char *  name  )  [pure virtual]

Gets the value of a variable in the script interpreter.

Parameters:
name The name of the variable to retrieve.
Returns:
The value of the variable, or 0 if it does not exist.
Remarks:
The name is given without any special characters (e.g. the dollar prefix in Perl).

Implements iScript.

virtual bool csScriptCommon::Store ( const char *  name,
iScriptValue value 
) [pure virtual]

Sets a variable in the script interpreter.

Parameters:
name The name of the variable to set.
value The value to set the variable to.
Returns:
False if the variable could not be stored (e.g. illegal name, or variable already exists and is immutable).
Remarks:
The name is given without any special characters (e.g. the dollar prefix in Perl).

Implements iScript.


The documentation for this class was generated from the following file:

Generated for Crystal Space 2.0 by doxygen 1.6.1