class asIScriptGeneric { public: void *GetEngine(); void *GetObject(); asDWORD GetArgDWord(asUINT arg); asQWORD GetArgQWord(asUINT arg); float GetArgFloat(asUINT arg); double GetArgDouble(asUINT arg); void *GetArgObject(asUINT arg); int SetReturnDWord(asDWORD val); int SetReturnQWord(asQWORD val); int SetReturnFloat(float val); int SetReturnDouble(double val); int SetReturnObject(void *obj); };
int GetEngine();
This method returns the engine, for which this generic call is registered.
The engine pointer.
void *GetObject();
Retrieve the object pointer for the generic class method.
The object pointer.
asDWORD GetArgDWord(asUINT arg); asQWORD GetArgQWord(asUINT arg); float GetArgFloat(asUINT arg); double GetArgDouble(asUINT arg); void *GetArgObject(asUINT arg);
Gets the value of an argument, based on the index of the argument.
Arguments with the type of an object, shouldn't be released as the library will automatically do this when the function returns.
arg |
The index of the argument, beginning with 0. |
The value of the argument.
int SetReturnDWord(asDWORD val); int SetReturnQWord(asQWORD val); int SetReturnFloat(float val); int SetReturnDouble(double val); int SetReturnObject(void *obj);
Sets the value that should be returned to the calling function.
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.
val |
The return value. |
obj |
A pointer to an object. |
A negative value if the method fails.