#include <public/sourcepawn/sp_vm_api.h>
Inherits SourcePawn::ICallable.
Inheritance diagram for SourcePawn::IPluginFunction:
Public Member Functions | |
| virtual int | Execute (cell_t *result)=0 |
| Executes the function, resets the pushed parameter list, and performs any copybacks. | |
| virtual int | CallFunction (const cell_t *params, unsigned int num_params, cell_t *result)=0 |
| Executes the function with the given parameter array. Parameters are read in forward order (i.e. index 0 is parameter #1) NOTE: You will get an error if you attempt to use CallFunction() with previously pushed parameters. | |
| virtual IPluginContext * | GetParentContext ()=0 |
| Deprecated, do not use. | |
| virtual bool | IsRunnable ()=0 |
| Returns whether the parent plugin is paused. | |
| virtual funcid_t | GetFunctionID ()=0 |
| Returns the function ID of this function. | |
| virtual int | Execute2 (IPluginContext *ctx, cell_t *result)=0 |
| Executes the forward, resets the pushed parameter list, and performs any copybacks. | |
| virtual int | CallFunction2 (IPluginContext *ctx, const cell_t *params, unsigned int num_params, cell_t *result)=0 |
| Executes the function with the given parameter array. Parameters are read in forward order (i.e. index 0 is parameter #1) NOTE: You will get an error if you attempt to use CallFunction() with previously pushed parameters. | |
NOTE: Function calls must be atomic to one execution context. NOTE: This object should not be deleted. It lives for the lifetime of the plugin.
Definition at line 185 of file sp_vm_api.h.
| virtual int SourcePawn::IPluginFunction::Execute | ( | cell_t * | result | ) | [pure virtual] |
Executes the function, resets the pushed parameter list, and performs any copybacks.
| result | Pointer to store return value in. |
| virtual int SourcePawn::IPluginFunction::CallFunction | ( | const cell_t * | params, | |
| unsigned int | num_params, | |||
| cell_t * | result | |||
| ) | [pure virtual] |
Executes the function with the given parameter array. Parameters are read in forward order (i.e. index 0 is parameter #1) NOTE: You will get an error if you attempt to use CallFunction() with previously pushed parameters.
| params | Array of cell parameters. | |
| num_params | Number of parameters to push. | |
| result | Pointer to store result of function on return. |
| virtual IPluginContext* SourcePawn::IPluginFunction::GetParentContext | ( | ) | [pure virtual] |
Deprecated, do not use.
| virtual bool SourcePawn::IPluginFunction::IsRunnable | ( | ) | [pure virtual] |
Returns whether the parent plugin is paused.
| virtual funcid_t SourcePawn::IPluginFunction::GetFunctionID | ( | ) | [pure virtual] |
Returns the function ID of this function.
Note: This was added in API version 4.
| virtual int SourcePawn::IPluginFunction::Execute2 | ( | IPluginContext * | ctx, | |
| cell_t * | result | |||
| ) | [pure virtual] |
Executes the forward, resets the pushed parameter list, and performs any copybacks.
Note: A function can only be executed given a runtime it was created in.
| ctx | Context to execute the function in. | |
| result | Pointer to store return value in. |
| virtual int SourcePawn::IPluginFunction::CallFunction2 | ( | IPluginContext * | ctx, | |
| const cell_t * | params, | |||
| unsigned int | num_params, | |||
| cell_t * | result | |||
| ) | [pure virtual] |
Executes the function with the given parameter array. Parameters are read in forward order (i.e. index 0 is parameter #1) NOTE: You will get an error if you attempt to use CallFunction() with previously pushed parameters.
Note: A function can only be executed given a runtime it was created in.
| ctx | Context to execute the function in. | |
| params | Array of cell parameters. | |
| num_params | Number of parameters to push. | |
| result | Pointer to store result of function on return. |
1.5.1