iPluginManager Struct Reference
[Shared Class Facility (SCF)]
This is the plugin manager.
More...
#include <iutil/plugin.h>

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, bool report=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:
Main ways to get pointers to this interface:
Definition at line 62 of file plugin.h.
Member Function Documentation
virtual void iPluginManager::Clear | ( | ) | [pure virtual] |
Unload all plugins from this plugin manager.
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.
virtual iBase* iPluginManager::LoadPlugin | ( | const char * | classID, | |
bool | init = true , |
|||
bool | report = 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.
- Parameters:
-
classID Class ID of the plugin to load. init Whether the plugin should be initialized, that is, the iComponent's Initialize() method should be called. report Whether to report loading failures using the reporter.
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().
virtual iBase* iPluginManager::QueryPlugin | ( | const char * | classID, | |
const char * | iInterface, | |||
int | iVersion | |||
) | [pure virtual] |
Find a plugin given his class ID.
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.
virtual bool iPluginManager::RegisterPlugin | ( | const char * | classID, | |
iComponent * | obj | |||
) | [pure virtual] |
Register a object that implements the iComponent interface as a plugin.
virtual bool iPluginManager::UnloadPlugin | ( | iComponent * | obj | ) | [pure virtual] |
Remove a plugin from system driver's plugin list.
The documentation for this struct was generated from the following file:
- iutil/plugin.h
Generated for Crystal Space 1.4.0 by doxygen 1.5.8