AngelScript
|
The interface for a script function description.
Public Member Functions | |
Miscellaneous | |
virtual asIScriptEngine * | GetEngine () const =0 |
Returns a pointer to the script engine. More... | |
virtual int | AddRef () const =0 |
Increases the reference counter. More... | |
virtual int | Release () const =0 |
Decrease reference counter. More... | |
virtual int | GetId () const =0 |
Returns the id of the function. More... | |
virtual asEFuncType | GetFuncType () const =0 |
Returns the type of the function. More... | |
virtual const char * | GetModuleName () const =0 |
Returns the name of the module where the function was implemented. More... | |
virtual asIScriptModule * | GetModule () const =0 |
Returns the module where the function is declared. More... | |
virtual const char * | GetScriptSectionName () const =0 |
Returns the name of the script section where the function was implemented. More... | |
virtual const char * | GetConfigGroup () const =0 |
Returns the name of the config group in which the function was registered. More... | |
virtual asDWORD | GetAccessMask () const =0 |
Returns the access mast of the function. More... | |
Function signature | |
virtual asIObjectType * | GetObjectType () const =0 |
Returns the object type for class or interface method. More... | |
virtual const char * | GetObjectName () const =0 |
Returns the name of the object for class or interface methods. More... | |
virtual const char * | GetName () const =0 |
Returns the name of the function or method. More... | |
virtual const char * | GetNamespace () const =0 |
Returns the namespace of the function. More... | |
virtual const char * | GetDeclaration (bool includeObjectName=true, bool includeNamespace=false) const =0 |
Returns the function declaration. More... | |
virtual bool | IsReadOnly () const =0 |
Returns true if the class method is read-only. More... | |
virtual bool | IsPrivate () const =0 |
Returns true if the class method is private. More... | |
virtual bool | IsFinal () const =0 |
Returns true if the method is final. More... | |
virtual bool | IsOverride () const =0 |
Returns true if the method is meant to override a method in the base class. More... | |
virtual bool | IsShared () const =0 |
Returns true if the function is shared. More... | |
virtual asUINT | GetParamCount () const =0 |
Returns the number of parameters for this function. More... | |
virtual int | GetParamTypeId (asUINT index, asDWORD *flags=0) const =0 |
Returns the type id of the specified parameter. More... | |
virtual int | GetReturnTypeId (asDWORD *flags=0) const =0 |
Returns the type id of the return type. More... | |
Type id for function pointers | |
virtual int | GetTypeId () const =0 |
Returns the type id representing a function pointer for this function. More... | |
virtual bool | IsCompatibleWithTypeId (int typeId) const =0 |
Checks if the given type id can represent this function. More... | |
Delegates | |
virtual void * | GetDelegateObject () const =0 |
Returns the object for the delegate. More... | |
virtual asIObjectType * | GetDelegateObjectType () const =0 |
Returns the type of the delegated object. More... | |
virtual asIScriptFunction * | GetDelegateFunction () const =0 |
Returns the function for the delegate. More... | |
Debug information | |
virtual asUINT | GetVarCount () const =0 |
Returns the number of local variables in the function. More... | |
virtual int | GetVar (asUINT index, const char **name, int *typeId=0) const =0 |
Returns information about a local variable. More... | |
virtual const char * | GetVarDecl (asUINT index, bool includeNamespace=false) const =0 |
Returns the declaration of a local variable. More... | |
virtual int | FindNextLineWithCode (int line) const =0 |
Returns the next line number with code. More... | |
JIT compilation | |
virtual asDWORD * | GetByteCode (asUINT *length=0)=0 |
Returns the byte code buffer and length. More... | |
User data | |
virtual void * | SetUserData (void *userData)=0 |
Register the memory address of some user data. More... | |
virtual void * | GetUserData () const =0 |
Returns the address of the previously registered user data. More... | |
|
pure virtual |
Call this method when storing an additional reference to the object.
|
pure virtual |
[in] | line | A line number |
|
pure virtual |
[out] | length | The length of the byte code buffer in DWORDs |
This function is used by the asIJITCompiler to obtain the byte code buffer for building the native machine code representation.
|
pure virtual |
|
pure virtual |
[in] | includeObjectName | Indicate whether the object name should be prepended to the function name |
[in] | includeNamespace | Indicates whether the namespace should be prepended to the function name |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
The returned value can be null if the module doesn't exist anymore.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
This does not increase the reference count of the returned object type.
|
pure virtual |
|
pure virtual |
[in] | index | The zero based parameter index. |
[out] | flags | A combination of asETypeModifiers. |
asINVALID_ARG | The index is out of bounds. |
|
pure virtual |
[out] | flags | A combination of asETypeModifiers. |
|
pure virtual |
The returned pointer is null when the function doesn't originate from a script file, i.e. a registered function or an auto-generated script function. It can also be null if the information has been removed, e.g. when saving bytecode without debug info.
|
pure virtual |
|
pure virtual |
|
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 |
asNOT_SUPPORTED | The function is not a script function |
|
pure virtual |
|
pure virtual |
[in] | index | The zero based index of the local variable |
[in] | includeNamespace | Set to true if the namespace should be included in the declaration. |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Call this method when you will no longer use the references that you own.
|
pure virtual |
[in] | userData | A pointer to the user data. |
This method allows the application to associate a value, e.g. a pointer, with the context instance.
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.