CANCapture Scripting
List of all members
asIScriptObject Class Referenceabstract

The interface for an instance of a script object.

Public Member Functions

Memory management
virtual int AddRef ()=0
 Increase reference counter. More...
 
virtual int Release ()=0
 Decrease reference counter. More...
 
Type info
virtual int GetTypeId () const =0
 Returns the type id of the object. More...
 
virtual asIObjectTypeGetObjectType () const =0
 Returns the object type interface for the object. More...
 
Properties
virtual int GetPropertyCount () const =0
 Returns the number of properties that the object contains. More...
 
virtual int GetPropertyTypeId (asUINT prop) const =0
 Returns the type id of the property referenced by prop. More...
 
virtual const char * GetPropertyName (asUINT prop) const =0
 Returns the name of the property referenced by prop. More...
 
virtual void * GetPropertyPointer (asUINT prop)=0
 Returns a pointer to the property referenced by prop. More...
 
Miscellaneous
virtual asIScriptEngineGetEngine () const =0
 Return the script engine. More...
 
virtual int CopyFrom (asIScriptObject *other)=0
 Copies the content from another object of the same type. More...
 
Deprecated
virtual int GetStructTypeId () const =0
 

Member Function Documentation

virtual int asIScriptObject::AddRef ( )
pure virtual
Returns
The number of references to this object.

Call this method when storing an additional reference to the object.

virtual int asIScriptObject::CopyFrom ( asIScriptObject other)
pure virtual
Parameters
[in]otherA pointer to the source object.
Returns
A negative value on error.
Return values
asINVALID_ARGThe argument is null.
asINVALID_TYPEThe other object is of different type.

This method copies the contents of the other object to this one.

virtual asIScriptEngine* asIScriptObject::GetEngine ( ) const
pure virtual
Returns
The script engine.
virtual asIObjectType* asIScriptObject::GetObjectType ( ) const
pure virtual
Returns
The object type interface of the script object.
virtual int asIScriptObject::GetPropertyCount ( ) const
pure virtual
Returns
The number of member properties of the script object.
virtual const char* asIScriptObject::GetPropertyName ( asUINT  prop) const
pure virtual
Parameters
[in]propThe property index.
Returns
A null terminated string with the property name.
virtual void* asIScriptObject::GetPropertyPointer ( asUINT  prop)
pure virtual
Parameters
[in]propThe property index.
Returns
A pointer to the property value.

The method returns a pointer to the memory location for the property. Use the type id for the property to determine the content of the pointer, and how to handle it.

virtual int asIScriptObject::GetPropertyTypeId ( asUINT  prop) const
pure virtual
Parameters
[in]propThe property index.
Returns
The type id of the member property, or a negative value on error.
Return values
asINVALID_ARGprop is too large
virtual int asIScriptObject::GetStructTypeId ( ) const
pure virtual
Deprecated:
Since 2.16.0. Use asIScriptObject::GetTypeId instead.
virtual int asIScriptObject::GetTypeId ( ) const
pure virtual
Returns
The type id of the script object.
virtual int asIScriptObject::Release ( )
pure virtual
Returns
The number of references to this object.

Call this method when you will no longer use the references that you own.