The interface for the generic calling convention.
Public Member Functions | |
Miscellaneous | |
virtual asIScriptEngine * | GetEngine () const =0 |
Returns a pointer to the script engine. More... | |
virtual asIScriptFunction * | GetFunction () const =0 |
Returns the function that is being called. More... | |
virtual void * | GetAuxiliary () const =0 |
Return the auxiliary registered with the function. More... | |
Object | |
virtual void * | GetObject ()=0 |
Returns the object pointer if this is a class method, or null if it not. More... | |
virtual int | GetObjectTypeId () const =0 |
Returns the type id of the object if this is a class method. More... | |
Arguments | |
virtual int | GetArgCount () const =0 |
Returns the number of arguments. More... | |
virtual int | GetArgTypeId (asUINT arg, asDWORD *flags=0) const =0 |
Returns the type id of the argument. More... | |
virtual asBYTE | GetArgByte (asUINT arg)=0 |
Returns the value of an 8-bit argument. More... | |
virtual asWORD | GetArgWord (asUINT arg)=0 |
Returns the value of a 16-bit argument. More... | |
virtual asDWORD | GetArgDWord (asUINT arg)=0 |
Returns the value of a 32-bit integer argument. More... | |
virtual asQWORD | GetArgQWord (asUINT arg)=0 |
Returns the value of a 64-bit integer argument. More... | |
virtual float | GetArgFloat (asUINT arg)=0 |
Returns the value of a float argument. More... | |
virtual double | GetArgDouble (asUINT arg)=0 |
Returns the value of a double argument. More... | |
virtual void * | GetArgAddress (asUINT arg)=0 |
Returns the address held in a reference or handle argument. More... | |
virtual void * | GetArgObject (asUINT arg)=0 |
Returns a pointer to the object in a object argument. More... | |
virtual void * | GetAddressOfArg (asUINT arg)=0 |
Returns a pointer to the argument value. More... | |
Return value | |
virtual int | GetReturnTypeId (asDWORD *flags=0) const =0 |
Gets the type id of the return value. More... | |
virtual int | SetReturnByte (asBYTE val)=0 |
Sets the 8-bit return value. More... | |
virtual int | SetReturnWord (asWORD val)=0 |
Sets the 16-bit return value. More... | |
virtual int | SetReturnDWord (asDWORD val)=0 |
Sets the 32-bit integer return value. More... | |
virtual int | SetReturnQWord (asQWORD val)=0 |
Sets the 64-bit integer return value. More... | |
virtual int | SetReturnFloat (float val)=0 |
Sets the float return value. More... | |
virtual int | SetReturnDouble (double val)=0 |
Sets the double return value. More... | |
virtual int | SetReturnAddress (void *addr)=0 |
Sets the address return value when the return is a reference or handle. More... | |
virtual int | SetReturnObject (void *obj)=0 |
Sets the object return value. More... | |
virtual void * | GetAddressOfReturnLocation ()=0 |
Gets the address to the memory where the return value should be placed. More... | |
|
pure virtual |
[in] | arg | The argument index. |
|
pure virtual |
The memory is not initialized, so if you're going to return a complex type by value you shouldn't use the assignment operator to initialize it. Instead use the placement new operator to call the type's copy constructor to perform the initialization.
The placement new operator works for primitive types too, so this method is ideal for writing automatically generated functions that works the same way for all types.
|
pure virtual |
[in] | arg | The argument index. |
Don't release the pointer if this is an object or object handle, the asIScriptGeneric object will do that for you.
[in] | arg | The argument index. |
|
pure virtual |
|
pure virtual |
[in] | arg | The argument index. |
[in] | arg | The argument index. |
|
pure virtual |
[in] | arg | The argument index. |
|
pure virtual |
[in] | arg | The argument index. |
Don't release the pointer if this is an object handle, the asIScriptGeneric object will do that for you.
[in] | arg | The argument index. |
[in] | arg | The argument index. |
[out] | flags | A combination of asETypeModifiers. |
[in] | arg | The argument index. |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
[out] | flags | A combination of asETypeModifiers. |
|
pure virtual |
[in] | addr | The return value, which is an address. |
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.
|
pure virtual |
[in] | val | The return value. |
asINVALID_TYPE | The return type is not an 8-bit value. Sets the 1 byte return value. |
|
pure virtual |
[in] | val | The return value. |
asINVALID_TYPE | The return type is not a 64-bit value. Sets the double return value. |
|
pure virtual |
[in] | val | The return value. |
asINVALID_TYPE | The return type is not a 32-bit value. Sets the 4 byte return value. |
|
pure virtual |
[in] | val | The return value. |
asINVALID_TYPE | The return type is not a 32-bit value. Sets the float return value. |
|
pure virtual |
[in] | obj | A pointer to the object return value. |
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.
|
pure virtual |
[in] | val | The return value. |
asINVALID_TYPE | The return type is not a 64-bit value. Sets the 8 byte return value. |
|
pure virtual |
[in] | val | The return value. |
asINVALID_TYPE | The return type is not a 16-bit value. Sets the 2 byte return value. |