Public Member Functions

SourcePawn::IPluginRuntime Class Reference

Interface to managing a runtime plugin. More...

#include <public/sourcepawn/sp_vm_api.h>

List of all members.

Public Member Functions

virtual ~IPluginRuntime ()
 Virtual destructor (you may call delete).
virtual IPluginDebugInfoGetDebugInfo ()=0
 Returns debug info.
virtual int FindNativeByName (const char *name, uint32_t *index)=0
 Finds a native by name.
virtual int GetNativeByIndex (uint32_t index, sp_native_t **native)=0
 Gets native info by index.
virtual uint32_t GetNativesNum ()=0
 Gets the number of natives.
virtual int FindPublicByName (const char *name, uint32_t *index)=0
 Finds a public function by name.
virtual int GetPublicByIndex (uint32_t index, sp_public_t **publicptr)=0
 Gets public function info by index.
virtual uint32_t GetPublicsNum ()=0
 Gets the number of public functions.
virtual int GetPubvarByIndex (uint32_t index, sp_pubvar_t **pubvar)=0
 Gets public variable info by index.
virtual int FindPubvarByName (const char *name, uint32_t *index)=0
 Finds a public variable by name.
virtual int GetPubvarAddrs (uint32_t index, cell_t *local_addr, cell_t **phys_addr)=0
 Gets the addresses of a public variable.
virtual uint32_t GetPubVarsNum ()=0
 Returns the number of public variables.
virtual IPluginFunctionGetFunctionByName (const char *public_name)=0
 Returns a function by name.
virtual IPluginFunctionGetFunctionById (funcid_t func_id)=0
 Returns a function by its id.
virtual IPluginContextGetDefaultContext ()=0
 Returns the default context. The default context should not be destroyed.
virtual bool IsDebugging ()=0
 Returns true if the plugin is in debug mode.
virtual int ApplyCompilationOptions (ICompilation *co)=0
 Applies new compilation/runtime settings to the runtime code.
virtual void SetPauseState (bool paused)=0
 Sets whether or not the plugin is paused (cannot be run).
virtual bool IsPaused ()=0
 Returns whether or not the plugin is paused (runnable).
virtual size_t GetMemUsage ()=0
 Returns the estimated memory usage of this plugin.

Detailed Description

Interface to managing a runtime plugin.

Definition at line 327 of file sp_vm_api.h.


Member Function Documentation

virtual IPluginDebugInfo* SourcePawn::IPluginRuntime::GetDebugInfo (  )  [pure virtual]

Returns debug info.

Returns:
IPluginDebugInfo, or NULL if no debug info found.
virtual int SourcePawn::IPluginRuntime::FindNativeByName ( const char *  name,
uint32_t index 
) [pure virtual]

Finds a native by name.

Parameters:
name Name of native.
index Optionally filled with native index number.
virtual int SourcePawn::IPluginRuntime::GetNativeByIndex ( uint32_t  index,
sp_native_t **  native 
) [pure virtual]

Gets native info by index.

Parameters:
index Index number of native.
native Optionally filled with pointer to native structure.
virtual uint32_t SourcePawn::IPluginRuntime::GetNativesNum (  )  [pure virtual]

Gets the number of natives.

Returns:
Filled with the number of natives.
virtual int SourcePawn::IPluginRuntime::FindPublicByName ( const char *  name,
uint32_t index 
) [pure virtual]

Finds a public function by name.

Parameters:
name Name of public
index Optionally filled with public index number.
virtual int SourcePawn::IPluginRuntime::GetPublicByIndex ( uint32_t  index,
sp_public_t **  publicptr 
) [pure virtual]

Gets public function info by index.

Parameters:
index Public function index number.
publicptr Optionally filled with pointer to public structure.
virtual uint32_t SourcePawn::IPluginRuntime::GetPublicsNum (  )  [pure virtual]

Gets the number of public functions.

Returns:
Filled with the number of public functions.
virtual int SourcePawn::IPluginRuntime::GetPubvarByIndex ( uint32_t  index,
sp_pubvar_t **  pubvar 
) [pure virtual]

Gets public variable info by index.

Parameters:
index Public variable index number.
pubvar Optionally filled with pointer to pubvar structure.
virtual int SourcePawn::IPluginRuntime::FindPubvarByName ( const char *  name,
uint32_t index 
) [pure virtual]

Finds a public variable by name.

Parameters:
name Name of pubvar
index Optionally filled with pubvar index number.
virtual int SourcePawn::IPluginRuntime::GetPubvarAddrs ( uint32_t  index,
cell_t local_addr,
cell_t **  phys_addr 
) [pure virtual]

Gets the addresses of a public variable.

Parameters:
index Index of public variable.
local_addr Address to store local address in.
phys_addr Address to store physically relocated in.
virtual uint32_t SourcePawn::IPluginRuntime::GetPubVarsNum (  )  [pure virtual]

Returns the number of public variables.

Returns:
Number of public variables.
virtual IPluginFunction* SourcePawn::IPluginRuntime::GetFunctionByName ( const char *  public_name  )  [pure virtual]

Returns a function by name.

Parameters:
public_name Name of the function.
Returns:
A new IPluginFunction pointer, NULL if not found.
virtual IPluginFunction* SourcePawn::IPluginRuntime::GetFunctionById ( funcid_t  func_id  )  [pure virtual]

Returns a function by its id.

Parameters:
func_id Function ID.
Returns:
A new IPluginFunction pointer, NULL if not found.
virtual IPluginContext* SourcePawn::IPluginRuntime::GetDefaultContext (  )  [pure virtual]

Returns the default context. The default context should not be destroyed.

Returns:
Default context pointer.
virtual bool SourcePawn::IPluginRuntime::IsDebugging (  )  [pure virtual]

Returns true if the plugin is in debug mode.

Returns:
True if in debug mode, false otherwise.
virtual int SourcePawn::IPluginRuntime::ApplyCompilationOptions ( ICompilation co  )  [pure virtual]

Applies new compilation/runtime settings to the runtime code.

The compilation object is destroyed once this function completes.

Returns:
Error code (SP_ERROR_NONE on success).
virtual void SourcePawn::IPluginRuntime::SetPauseState ( bool  paused  )  [pure virtual]

Sets whether or not the plugin is paused (cannot be run).

Parameters:
pause Pause state.
virtual bool SourcePawn::IPluginRuntime::IsPaused (  )  [pure virtual]

Returns whether or not the plugin is paused (runnable).

Returns:
Pause state (true = paused, false = not).
virtual size_t SourcePawn::IPluginRuntime::GetMemUsage (  )  [pure virtual]

Returns the estimated memory usage of this plugin.

Returns:
Memory usage, in bytes.

The documentation for this class was generated from the following file: