Public Member Functions | |
Miscellaneous | |
virtual asIScriptEngine * | GetEngine () const =0 |
Returns a pointer to the script engine. | |
virtual int | AddRef () const =0 |
Increases the reference counter. | |
virtual int | Release () const =0 |
Decrease reference counter. | |
virtual int | GetId () const =0 |
Returns the id of the function. | |
virtual asEFuncType | GetFuncType () const =0 |
Returns the type of the function. | |
virtual const char * | GetModuleName () const =0 |
Returns the name of the module where the function was implemented. | |
virtual const char * | GetScriptSectionName () const =0 |
Returns the name of the script section where the function was implemented. | |
virtual const char * | GetConfigGroup () const =0 |
Returns the name of the config group in which the function was registered. | |
Function info | |
virtual asIObjectType * | GetObjectType () const =0 |
Returns the object type for class or interface method. | |
virtual const char * | GetObjectName () const =0 |
Returns the name of the object for class or interface methods. | |
virtual const char * | GetName () const =0 |
Returns the name of the function or method. | |
virtual const char * | GetDeclaration (bool includeObjectName=true) const =0 |
Returns the function declaration. | |
virtual bool | IsReadOnly () const =0 |
Returns true if the class method is read-only. | |
virtual bool | IsPrivate () const =0 |
Returns true if the class method is private. | |
Parameter and return types | |
virtual int | GetParamCount () const =0 |
Returns the number of parameters for this function. | |
virtual int | GetParamTypeId (int index, asDWORD *flags=0) const =0 |
Returns the type id of the specified parameter. | |
virtual int | GetReturnTypeId () const =0 |
Returns the type id of the return type. | |
Debug information | |
virtual int | GetVarCount () const =0 |
Returns the number of local variables in the function. | |
virtual int | GetVar (asUINT index, const char **name, int *typeId=0) const =0 |
Returns information about a local variable. | |
virtual const char * | GetVarDecl (asUINT index) const =0 |
Returns the declaration of a local variable. | |
JIT compilation | |
virtual asDWORD * | GetByteCode (asUINT *length=0)=0 |
Returns the byte code buffer and length. | |
User data | |
virtual void * | SetUserData (void *userData)=0 |
Register the memory address of some user data. | |
virtual void * | GetUserData () const =0 |
Returns the address of the previously registered user data. | |
Deprecated | |
virtual bool | IsClassMethod () const =0 |
Returns true if it is a class method. | |
virtual bool | IsInterfaceMethod () const =0 |
Returns true if it is an interface method. |
virtual int asIScriptFunction::AddRef | ( | ) | const [pure virtual] |
[out] | length | The length of the byte code buffer in DWORDs |
virtual const char* asIScriptFunction::GetConfigGroup | ( | ) | const [pure virtual] |
virtual const char* asIScriptFunction::GetDeclaration | ( | bool | includeObjectName = true |
) | const [pure virtual] |
[in] | includeObjectName | Indicate whether the object name should be prepended to the function name |
virtual asIScriptEngine* asIScriptFunction::GetEngine | ( | ) | const [pure virtual] |
virtual asEFuncType asIScriptFunction::GetFuncType | ( | ) | const [pure virtual] |
virtual int asIScriptFunction::GetId | ( | ) | const [pure virtual] |
virtual const char* asIScriptFunction::GetModuleName | ( | ) | const [pure virtual] |
virtual const char* asIScriptFunction::GetName | ( | ) | const [pure virtual] |
virtual const char* asIScriptFunction::GetObjectName | ( | ) | const [pure virtual] |
virtual asIObjectType* asIScriptFunction::GetObjectType | ( | ) | const [pure virtual] |
virtual int asIScriptFunction::GetParamCount | ( | ) | const [pure virtual] |
virtual int asIScriptFunction::GetParamTypeId | ( | int | index, | |
asDWORD * | flags = 0 | |||
) | const [pure virtual] |
[in] | index | The zero based parameter index. |
[out] | flags | A combination of asETypeModifiers. |
asINVALID_ARG | The index is out of bounds. |
virtual int asIScriptFunction::GetReturnTypeId | ( | ) | const [pure virtual] |
virtual const char* asIScriptFunction::GetScriptSectionName | ( | ) | const [pure virtual] |
virtual void* asIScriptFunction::GetUserData | ( | ) | const [pure virtual] |
virtual int asIScriptFunction::GetVar | ( | asUINT | index, | |
const char ** | name, | |||
int * | typeId = 0 | |||
) | const [pure virtual] |
[in] | index | The zero based index of the local variable |
[out] | name | Receives the name of the variable |
[out] | typeId | Receives the typeId of the variable |
asINVALID_ARG | The index is out of range |
virtual int asIScriptFunction::GetVarCount | ( | ) | const [pure virtual] |
virtual const char* asIScriptFunction::GetVarDecl | ( | asUINT | index | ) | const [pure virtual] |
[in] | index | The zero based index of the local variable |
virtual bool asIScriptFunction::IsClassMethod | ( | ) | const [pure virtual] |
virtual bool asIScriptFunction::IsInterfaceMethod | ( | ) | const [pure virtual] |
virtual bool asIScriptFunction::IsPrivate | ( | ) | const [pure virtual] |
virtual bool asIScriptFunction::IsReadOnly | ( | ) | const [pure virtual] |
virtual int asIScriptFunction::Release | ( | ) | const [pure virtual] |
virtual void* asIScriptFunction::SetUserData | ( | void * | userData | ) | [pure virtual] |
[in] | userData | A pointer to the user data. |
Optionally, a callback function can be registered to clean up the user data when the function is destroyed. As the callback is registered with the engine, it is only necessary to do it once.