#include <sp_vm_api.h>
Definition at line 438 of file sp_vm_api.h.
Public Member Functions | |
virtual sp_plugin_t * | LoadFromFilePointer (FILE *fp, int *err)=0 |
Loads a named file from a file pointer. Note: Using this means the memory will be allocated by the VM. | |
virtual sp_plugin_t * | LoadFromMemory (void *base, sp_plugin_t *plugin, int *err)=0 |
Loads a file from a base memory address. | |
virtual int | FreeFromMemory (sp_plugin_t *plugin)=0 |
virtual void * | BaseAlloc (size_t size)=0 |
Allocates large blocks of temporary memory. | |
virtual void | BaseFree (void *memory)=0 |
Frees memory allocated with BaseAlloc. | |
virtual void * | ExecAlloc (size_t size)=0 |
Allocates executable memory. | |
virtual void | ExecFree (void *address)=0 |
Frees executable memory. | |
virtual IDebugListener * | SetDebugListener (IDebugListener *listener)=0 |
Sets the debug listener. This should only be called once. If called successively (using manual chaining), only the last function should attempt to call back into the same plugin. Otherwise, globally cached states can be accidentally overwritten. | |
virtual unsigned int | GetContextCallCount ()=0 |
Returns the number of plugins on the call stack. |
virtual sp_plugin_t* SourcePawn::ISourcePawnEngine::LoadFromFilePointer | ( | FILE * | fp, | |
int * | err | |||
) | [pure virtual] |
Loads a named file from a file pointer. Note: Using this means the memory will be allocated by the VM.
fp | File pointer. May be at any offset. Not closed on return. | |
err | Optional error code pointer. |
virtual sp_plugin_t* SourcePawn::ISourcePawnEngine::LoadFromMemory | ( | void * | base, | |
sp_plugin_t * | plugin, | |||
int * | err | |||
) | [pure virtual] |
Loads a file from a base memory address.
base | Base address of the plugin's memory region. | |
plugin | If NULL, a new plugin pointer is returned. Otherwise, the passed pointer is used. | |
err | Optional error code pointer. |
virtual int SourcePawn::ISourcePawnEngine::FreeFromMemory | ( | sp_plugin_t * | plugin | ) | [pure virtual] |
Frees all of the memory associated with a plugin file. If allocated using SP_LoadFromMemory, the base and plugin pointer itself are not freed (so this may end up doing nothing).
virtual void* SourcePawn::ISourcePawnEngine::BaseAlloc | ( | size_t | size | ) | [pure virtual] |
Allocates large blocks of temporary memory.
size | Size of memory to allocate. |
virtual void SourcePawn::ISourcePawnEngine::BaseFree | ( | void * | memory | ) | [pure virtual] |
Frees memory allocated with BaseAlloc.
memory | Memory address to free. |
virtual void* SourcePawn::ISourcePawnEngine::ExecAlloc | ( | size_t | size | ) | [pure virtual] |
Allocates executable memory.
size | Size of memory to allocate. |
virtual void SourcePawn::ISourcePawnEngine::ExecFree | ( | void * | address | ) | [pure virtual] |
Frees executable memory.
address | Address to free. |
virtual IDebugListener* SourcePawn::ISourcePawnEngine::SetDebugListener | ( | IDebugListener * | listener | ) | [pure virtual] |
Sets the debug listener. This should only be called once. If called successively (using manual chaining), only the last function should attempt to call back into the same plugin. Otherwise, globally cached states can be accidentally overwritten.
listener | Pointer to an IDebugListener. |
virtual unsigned int SourcePawn::ISourcePawnEngine::GetContextCallCount | ( | ) | [pure virtual] |
Returns the number of plugins on the call stack.