CrystalSpace

Public API Reference

csScriptObjectCommon Class Reference

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

#include <csplugincommon/script/scriptcommon.h>

Inheritance diagram for csScriptObjectCommon:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual csPtr
< iScriptValue
Call (const char *, const csRefArray< iScriptValue > &=csRefArray< iScriptValue >())=0
 Calls a method in the object.
virtual csPtr
< iScriptValue
Get (const char *)=0
 Gets the value of a property in the script object.
virtual bool IsType (const char *t) const
 Deprecated version of IsA().
virtual bool Set (const char *name, iScriptValue *)=0
 Sets the value of a property in the script object.
virtual bool SetPointer (void *)
 If the object is from the cspace module, this will allow you to change the reference to point to another object of the same class.
virtual ~csScriptObjectCommon ()

Protected Member Functions

 csScriptObjectCommon (iBase *parent)
 csScriptObjectCommon ()


Detailed Description

This intermediate class can be subclassed by implementors of iScriptObject.

It implements the deprecated methods in iScriptObject 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 38 of file scriptcommon.h.


Member Function Documentation

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

Calls a method in the object.

Parameters:
name The name of the method to call.
args An optional array of arguments to pass to the method.
Returns:
The return value of the method. If the named method does not exist or encounters a runtime error then it returns 0. If the method 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 iScriptObject.

virtual csPtr<iScriptValue> csScriptObjectCommon::Get ( const char *  name  )  [pure virtual]

Gets the value of a property in the script object.

Parameters:
name The name of the property.
Returns:
The value of the property, or 0 if it does not exist.
Remarks:
The minimum requirement for implementors of this method is that it work with objects from the cspace module. An implementation may support other classes, but if not then behaviour may be undefined when attempting to use such classes.

Implements iScriptObject.

virtual bool csScriptObjectCommon::IsType ( const char *   )  const [inline, virtual]

Deprecated version of IsA().

Implements iScriptObject.

Definition at line 51 of file scriptcommon.h.

virtual bool csScriptObjectCommon::Set ( const char *  name,
iScriptValue value 
) [pure virtual]

Sets the value of a property in the script object.

Parameters:
name The name of the property.
value The value that the property will be set to.
Returns:
False if the named property does not exist or cannot be set.
Remarks:
The minimum requirement for implementors of this method is that it work with objects from the cspace module. An implementation may support other classes, but if not then behaviour may be undefined when attempting to use such classes.

Implements iScriptObject.

virtual bool csScriptObjectCommon::SetPointer ( void *   )  [inline, virtual]

If the object is from the cspace module, this will allow you to change the reference to point to another object of the same class.

NOTE: This is not guaranteed to work, is deprecated, and will be removed!

Implements iScriptObject.

Definition at line 53 of file scriptcommon.h.


The documentation for this class was generated from the following file:
Generated for Crystal Space 1.2.1 by doxygen 1.5.3