## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# iPluginManager Struct Reference
[Shared Class Facility (SCF)]

This is the plugin manager. More...

`#include <iutil/plugin.h>`

Inheritance diagram for iPluginManager:

[legend]
List of all members.

## Public Member Functions

virtual void | Clear ()=0
| Unload all plugins from this plugin manager.
virtual csPtr< iPluginIterator > | GetPlugins ()=0
| Get an iterator to iterate over all loaded plugins in the plugin manager.
virtual iBase * | LoadPlugin (const char *classID, bool init=true)=0
| Load a plugin and (optionally) initialize it.
virtual void | QueryOptions (iComponent *object)=0
| Query all options supported by given plugin and place into OptionList.
virtual iBase * | QueryPlugin (const char *classID, const char *iInterface, int iVersion)=0
| Find a plugin given his class ID.
virtual iBase * | QueryPlugin (const char *iInterface, int iVersion)=0
| Get first of the loaded plugins that supports given interface ID.
virtual bool | RegisterPlugin (const char *classID, iComponent *obj)=0
| Register a object that implements the iComponent interface as a plugin.
virtual bool | UnloadPlugin (iComponent *obj)=0
| Remove a plugin from system driver's plugin list.

## Detailed Description

This is the plugin manager.

The plugin manager is guaranteed thread-safe.

Main creators of instances implementing this interface:

- csInitializer::CreateEnvironment()
- csInitializer::CreatePluginManager()

Main ways to get pointers to this interface:

- csQueryRegistry()

Definition at line 111 of file plugin.h.

## Member Function Documentation

virtual void iPluginManager::Clear | ( |  | ) | `[pure virtual]`

| Unload all plugins from this plugin manager. Implemented in csPluginManager.

virtual csPtr<iPluginIterator> iPluginManager::GetPlugins | ( |  | ) | `[pure virtual]`

| Get an iterator to iterate over all loaded plugins in the plugin manager. This iterator will contain a copy of the plugins so it will not lock the plugin manager while looping over the plugins. Implemented in csPluginManager.

virtual iBase* iPluginManager::LoadPlugin | ( | const char * | classID,
|  | bool | init = `true`
| ) | `[pure virtual]`

| Load a plugin and (optionally) initialize it. If 'init' is true then the plugin will be initialized and QueryOptions() will be called. Implemented in csPluginManager. Referenced by csLoadPlugin(), and csLoadPluginAlways().

virtual void iPluginManager::QueryOptions | ( | iComponent * | object | ) | `[pure virtual]`

| Query all options supported by given plugin and place into OptionList. Normally this is done automatically by LoadPlugin() if 'init' is true. If 'init' is not true then you can call this function AFTER calling object->Initialize(). Implemented in csPluginManager.

virtual iBase* iPluginManager::QueryPlugin | ( | const char * | classID,
|  | const char * | iInterface,
|  | int | iVersion
| ) | `[pure virtual]`

| Find a plugin given his class ID. Implemented in csPluginManager.

virtual iBase* iPluginManager::QueryPlugin | ( | const char * | iInterface,
|  | int | iVersion
| ) | `[pure virtual]`

| Get first of the loaded plugins that supports given interface ID. Warning! Usage of this function is usually not safe since multiple plugins can implement the same interface and there is no way to know which one is the correct one. It is better to use the object registry to find about single loaded components. Implemented in csPluginManager. Referenced by csQueryPluginClass().

virtual bool iPluginManager::RegisterPlugin | ( | const char * | classID,
|  | iComponent * | obj
| ) | `[pure virtual]`

| Register a object that implements the iComponent interface as a plugin. Implemented in csPluginManager.

virtual bool iPluginManager::UnloadPlugin | ( | iComponent * | obj | ) | `[pure virtual]`

| Remove a plugin from system driver's plugin list. Implemented in csPluginManager.

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

- iutil/plugin.h