SourceMod::IPlugin Class Reference

Encapsulates a run-time plugin as maintained by SourceMod. More...

#include <public/IPluginSys.h>

List of all members.

Public Member Functions

virtual ~IPlugin ()
virtual PluginType GetType ()=0
 Returns the lifetime of a plugin.
virtual SourcePawn::IPluginContextGetBaseContext ()=0
 Returns the IPluginRuntime::GetDefaultContext() value.
virtual sp_context_tGetContext ()=0
 Deprecated, returns NULL.
virtual void * GetPluginStructure ()=0
 Deprecated, returns NULL.
virtual const sm_plugininfo_tGetPublicInfo ()=0
 Returns information about the plugin by reference.
virtual const char * GetFilename ()=0
 Returns the plugin filename (relative to plugins dir).
virtual bool IsDebugging ()=0
 Returns true if a plugin is in debug mode, false otherwise.
virtual PluginStatus GetStatus ()=0
 Returns the plugin status.
virtual bool SetPauseState (bool paused)=0
 Sets whether the plugin is paused or not.
virtual unsigned int GetSerial ()=0
 Returns the unique serial number of a plugin.
virtual IdentityToken_t * GetIdentity ()=0
 Returns a plugin's identity token.
virtual bool SetProperty (const char *prop, void *ptr)=0
 Sets a property on this plugin. This is used for per-plugin data from extensions or other parts of core. The property's value must be manually destructed when the plugin is destroyed.
virtual bool GetProperty (const char *prop, void **ptr, bool remove=false)=0
 Gets a property from a plugin.
virtual SourcePawn::IPluginRuntimeGetRuntime ()=0
 Returns the runtime representing this plugin.


Detailed Description

Encapsulates a run-time plugin as maintained by SourceMod.

Definition at line 98 of file IPluginSys.h.


Constructor & Destructor Documentation

virtual SourceMod::IPlugin::~IPlugin (  )  [inline, virtual]

Virtual destructor

Definition at line 102 of file IPluginSys.h.


Member Function Documentation

virtual SourcePawn::IPluginContext* SourceMod::IPlugin::GetBaseContext (  )  [pure virtual]

Returns the IPluginRuntime::GetDefaultContext() value.

Returns:
Pointer to an IPluginContext, or NULL if not loaded.

virtual sp_context_t* SourceMod::IPlugin::GetContext (  )  [pure virtual]

Deprecated, returns NULL.

Returns:
NULL.

virtual void* SourceMod::IPlugin::GetPluginStructure (  )  [pure virtual]

Deprecated, returns NULL.

Returns:
NULL.

virtual const sm_plugininfo_t* SourceMod::IPlugin::GetPublicInfo (  )  [pure virtual]

Returns information about the plugin by reference.

Returns:
Pointer to a sm_plugininfo_t object, NULL if plugin is not loaded.

virtual bool SourceMod::IPlugin::SetPauseState ( bool  paused  )  [pure virtual]

Sets whether the plugin is paused or not.

Returns:
True on successful state change, false otherwise.

virtual bool SourceMod::IPlugin::SetProperty ( const char *  prop,
void *  ptr 
) [pure virtual]

Sets a property on this plugin. This is used for per-plugin data from extensions or other parts of core. The property's value must be manually destructed when the plugin is destroyed.

Parameters:
prop String containing name of the property.
ptr Generic pointer to set.
Returns:
True on success, false if the property is already set.

virtual bool SourceMod::IPlugin::GetProperty ( const char *  prop,
void **  ptr,
bool  remove = false 
) [pure virtual]

Gets a property from a plugin.

Parameters:
prop String containing the property's name.
ptr Optional pointer to the generic pointer.
remove Optional boolean value; if true, property is removed (so it can be set again).
Returns:
True if the property existed, false otherwise.

virtual SourcePawn::IPluginRuntime* SourceMod::IPlugin::GetRuntime (  )  [pure virtual]

Returns the runtime representing this plugin.

Returns:
IPluginRuntime pointer, or NULL if not loaded.


The documentation for this class was generated from the following file:
Generated on Fri Nov 21 05:10:04 2008 for SourceMod SDK by  doxygen 1.5.1