asIScriptGeneric Class Reference
[Interfaces]

The interface for the generic calling convention.

List of all members.

Public Member Functions

virtual asIScriptEngineGetEngine ()=0
 Returns a pointer to the script engine.
virtual int GetFunctionId ()=0
 Returns the function id of the called function.
virtual void * GetObject ()=0
 Returns the object pointer if this is a class method, or null if it not.
virtual int GetObjectTypeId ()=0
 Returns the type id of the object if this is a class method.
virtual int GetArgCount ()=0
 Returns the number of arguments.
virtual asBYTE GetArgByte (asUINT arg)=0
 Returns the value of an 8-bit argument.
virtual asWORD GetArgWord (asUINT arg)=0
 Returns the value of a 16-bit argument.
virtual asDWORD GetArgDWord (asUINT arg)=0
 Returns the value of a 32-bit integer argument.
virtual asQWORD GetArgQWord (asUINT arg)=0
 Returns the value of a 64-bit integer argument.
virtual float GetArgFloat (asUINT arg)=0
 Returns the value of a float argument.
virtual double GetArgDouble (asUINT arg)=0
 Returns the value of a double argument.
virtual void * GetArgAddress (asUINT arg)=0
 Returns the address held in a reference or handle argument.
virtual void * GetArgObject (asUINT arg)=0
 Returns a pointer to the object in a object argument.
virtual void * GetArgPointer (asUINT arg)=0
 Returns a pointer to the argument value.
virtual int GetArgTypeId (asUINT arg)=0
 Returns the type id of the argument.
virtual int SetReturnByte (asBYTE val)=0
 Sets the 8-bit return value.
virtual int SetReturnWord (asWORD val)=0
 Sets the 16-bit return value.
virtual int SetReturnDWord (asDWORD val)=0
 Sets the 32-bit integer return value.
virtual int SetReturnQWord (asQWORD val)=0
 Sets the 64-bit integer return value.
virtual int SetReturnFloat (float val)=0
 Sets the float return value.
virtual int SetReturnDouble (double val)=0
 Sets the double return value.
virtual int SetReturnAddress (void *addr)=0
 Sets the address return value when the return is a reference or handle.
virtual int SetReturnObject (void *obj)=0
 Sets the object return value.
virtual void * GetReturnPointer ()=0
 Gets the pointer to the return value so it can be assigned a value.
virtual int GetReturnTypeId ()=0
 Gets the type id of the return value.


Member Function Documentation

virtual asIScriptEngine* asIScriptGeneric::GetEngine (  )  [pure virtual]

Returns:
A pointer to the engine.

virtual int asIScriptGeneric::GetFunctionId (  )  [pure virtual]

Returns:
The function id of the function being called.

virtual void* asIScriptGeneric::GetObject (  )  [pure virtual]

Returns:
A pointer to the object, if this is a method.

virtual int asIScriptGeneric::GetObjectTypeId (  )  [pure virtual]

Returns:
The type id of the object if this is a method.

virtual int asIScriptGeneric::GetArgCount (  )  [pure virtual]

Returns:
The number of arguments to the function.

virtual asBYTE asIScriptGeneric::GetArgByte ( asUINT  arg  )  [pure virtual]

Parameters:
[in] arg The argument index.
Returns:
The 1 byte argument value.

virtual asWORD asIScriptGeneric::GetArgWord ( asUINT  arg  )  [pure virtual]

Parameters:
[in] arg The argument index.
Returns:
The 2 byte argument value.

virtual asDWORD asIScriptGeneric::GetArgDWord ( asUINT  arg  )  [pure virtual]

Parameters:
[in] arg The argument index.
Returns:
The 4 byte argument value.

virtual asQWORD asIScriptGeneric::GetArgQWord ( asUINT  arg  )  [pure virtual]

Parameters:
[in] arg The argument index.
Returns:
The 8 byte argument value.

virtual float asIScriptGeneric::GetArgFloat ( asUINT  arg  )  [pure virtual]

Parameters:
[in] arg The argument index.
Returns:
The float argument value.

virtual double asIScriptGeneric::GetArgDouble ( asUINT  arg  )  [pure virtual]

Parameters:
[in] arg The argument index.
Returns:
The double argument value.

virtual void* asIScriptGeneric::GetArgAddress ( asUINT  arg  )  [pure virtual]

Parameters:
[in] arg The argument index.
Returns:
The address argument value, which can be a reference or and object handle.
Don't release the pointer if this is an object or object handle, the asIScriptGeneric object will do that for you.

virtual void* asIScriptGeneric::GetArgObject ( asUINT  arg  )  [pure virtual]

Parameters:
[in] arg The argument index.
Returns:
A pointer to the object argument, which can be an object value or object handle.
Don't release the pointer if this is an object handle, the asIScriptGeneric object will do that for you.

virtual void* asIScriptGeneric::GetArgPointer ( asUINT  arg  )  [pure virtual]

Parameters:
[in] arg The argument index.
Returns:
A pointer to the argument value.
For primitives you get a pointer to the primitive itself. For references you get a pointer to the pointer to whatever is being referenced. For object handles you get a pointer to the object handle, which itself is a pointer to the object. For objects you get a pointer to the pointer to the object.

virtual int asIScriptGeneric::GetArgTypeId ( asUINT  arg  )  [pure virtual]

Parameters:
[in] arg The argument index.
Returns:
The type id of the argument.

virtual int asIScriptGeneric::SetReturnByte ( asBYTE  val  )  [pure virtual]

Parameters:
[in] val The return value.
Returns:
A negative value on error.
Return values:
asINVALID_TYPE The return type is not an 8-bit value. Sets the 1 byte return value.

virtual int asIScriptGeneric::SetReturnWord ( asWORD  val  )  [pure virtual]

Parameters:
[in] val The return value.
Returns:
A negative value on error.
Return values:
asINVALID_TYPE The return type is not a 16-bit value. Sets the 2 byte return value.

virtual int asIScriptGeneric::SetReturnDWord ( asDWORD  val  )  [pure virtual]

Parameters:
[in] val The return value.
Returns:
A negative value on error.
Return values:
asINVALID_TYPE The return type is not a 32-bit value. Sets the 4 byte return value.

virtual int asIScriptGeneric::SetReturnQWord ( asQWORD  val  )  [pure virtual]

Parameters:
[in] val The return value.
Returns:
A negative value on error.
Return values:
asINVALID_TYPE The return type is not a 64-bit value. Sets the 8 byte return value.

virtual int asIScriptGeneric::SetReturnFloat ( float  val  )  [pure virtual]

Parameters:
[in] val The return value.
Returns:
A negative value on error.
Return values:
asINVALID_TYPE The return type is not a 32-bit value. Sets the float return value.

virtual int asIScriptGeneric::SetReturnDouble ( double  val  )  [pure virtual]

Parameters:
[in] val The return value.
Returns:
A negative value on error.
Return values:
asINVALID_TYPE The return type is not a 64-bit value. Sets the double return value.

virtual int asIScriptGeneric::SetReturnAddress ( void *  addr  )  [pure virtual]

Parameters:
[in] addr The return value, which is an address.
Returns:
A negative value on error.
Return values:
asINVALID_TYPE The return type is not a reference or handle.
Sets the address return value. If an object handle the application must first increment the reference counter, unless it won't keep a reference itself.

virtual int asIScriptGeneric::SetReturnObject ( void *  obj  )  [pure virtual]

Parameters:
[in] obj A pointer to the object return value.
Returns:
A negative value on error.
Return values:
asINVALID_TYPE The return type is not an object value or handle.
If the function returns an object, the library will automatically do what is necessary based on how the object was declared, i.e. if the function was registered to return a handle then the library will call the addref behaviour. If it was registered to return an object by value, then the library will make a copy of the object.

virtual void* asIScriptGeneric::GetReturnPointer (  )  [pure virtual]

Returns:
A pointer to the return value.
Gets the address to the location where the return value is to be placed.

You should copy the value to the location pointed to by the address. For primitives simply dereference and assign. For object handles, you must first increase the reference counter. For objects, you must make a copy of the object, and then pass the pointer to the new object.

virtual int asIScriptGeneric::GetReturnTypeId (  )  [pure virtual]

Returns:
The type id of the return value.


Generated on Sun Aug 17 17:11:13 2008 for AngelScript by  doxygen 1.5.6