SourceMod::IPluginManager Class Reference

Manages the runtime loading and unloading of plugins. More...

#include <public/IPluginSys.h>

Inherits SourceMod::SMInterface.

Inheritance diagram for SourceMod::IPluginManager:

[legend]
Collaboration diagram for SourceMod::IPluginManager:
[legend]
List of all members.

Public Member Functions

virtual const char * GetInterfaceName ()
 Must return a string defining the interface's unique name.
virtual unsigned int GetInterfaceVersion ()
 Must return an integer defining the interface's version.
virtual IPluginLoadPlugin (const char *path, bool debug, PluginType type, char error[], size_t maxlength, bool *wasloaded)=0
 Attempts to load a plugin.
virtual bool UnloadPlugin (IPlugin *plugin)=0
 Attempts to unload a plugin.
virtual IPluginFindPluginByContext (const sp_context_t *ctx)=0
 Finds a plugin by its context. Note: This function should be considered O(1).
virtual unsigned int GetPluginCount ()=0
 Returns the number of plugins (both failed and loaded).
virtual IPluginIteratorGetPluginIterator ()=0
 Returns a pointer that can be used to iterate through plugins. Note: This pointer must be freed using EITHER delete OR IPluginIterator::Release().
virtual void AddPluginsListener (IPluginsListener *listener)=0
 Adds a plugin manager listener.
virtual void RemovePluginsListener (IPluginsListener *listener)=0
 Removes a plugin listener.

Detailed Description

Manages the runtime loading and unloading of plugins.

Definition at line 282 of file IPluginSys.h.


Member Function Documentation

virtual IPlugin* SourceMod::IPluginManager::LoadPlugin ( const char *  path,
bool  debug,
PluginType  type,
char  error[],
size_t  maxlength,
bool *  wasloaded 
) [pure virtual]

Attempts to load a plugin.

Parameters:
path Path and filename of plugin, relative to plugins folder.
debug Deprecated, must be false.
type Lifetime of the plugin.
error Buffer to hold any error message.
maxlength Maximum length of error message buffer.
wasloaded Stores if the plugin is already loaded.
Returns:
A new plugin pointer on success, false otherwise.

virtual bool SourceMod::IPluginManager::UnloadPlugin ( IPlugin plugin  )  [pure virtual]

Attempts to unload a plugin.

Parameters:
plugin Pointer to the plugin handle.
Returns:
True on success, false otherwise.

virtual IPlugin* SourceMod::IPluginManager::FindPluginByContext ( const sp_context_t ctx  )  [pure virtual]

Finds a plugin by its context. Note: This function should be considered O(1).

Parameters:
ctx Pointer to an sp_context_t.
Returns:
Pointer to a matching IPlugin, or NULL if none found.

virtual unsigned int SourceMod::IPluginManager::GetPluginCount (  )  [pure virtual]

Returns the number of plugins (both failed and loaded).

Returns:
The number of internally cached plugins.

virtual void SourceMod::IPluginManager::AddPluginsListener ( IPluginsListener listener  )  [pure virtual]

Adds a plugin manager listener.

Parameters:
listener Pointer to a listener.

virtual void SourceMod::IPluginManager::RemovePluginsListener ( IPluginsListener listener  )  [pure virtual]

Removes a plugin listener.

Parameters:
listener Pointer to a listener.


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