Manages the runtime loading and unloading of plugins.
More...
#include <public/IPluginSys.h>
Manages the runtime loading and unloading of plugins.
| virtual void SourceMod::IPluginManager::AddPluginsListener |
( |
IPluginsListener * |
listener | ) |
|
|
pure virtual |
Adds a plugin manager listener.
- Parameters
-
| listener | Pointer to a listener. |
| 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 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 IPlugin* SourceMod::IPluginManager::PluginFromHandle |
( |
Handle_t |
handle, |
|
|
HandleError * |
err |
|
) |
| |
|
pure virtual |
Converts a Handle to an IPlugin if possible.
- Parameters
-
| handle | Handle. |
| err | Error, set on failure (otherwise undefined). |
- Returns
- IPlugin pointer, or NULL on failure.
| virtual void SourceMod::IPluginManager::RemovePluginsListener |
( |
IPluginsListener * |
listener | ) |
|
|
pure virtual |
Removes a plugin listener.
- Parameters
-
| listener | Pointer to a listener. |
| 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.
The documentation for this class was generated from the following file: