#include <FUPluginManager.h>
Public Types | |
typedef uint32(* | GetPluginCount )(void) |
Callback to retrieve the number of plug-ins contained within a library. | |
typedef const FUObjectType *(* | GetPluginType )(uint32 index) |
Callback to retrieve the type of a given library plug-in. | |
typedef FUPlugin *(* | CreatePlugin )(uint32 index) |
Callback to create a given library plug-in. | |
Public Member Functions | |
FUPluginManager (const fchar *pluginLibraryFilter) | |
Constructor. | |
virtual | ~FUPluginManager () |
Destructor. | |
void | AddPluginLibrary (FUPluginManager::GetPluginCount fnGetPluginCount, FUPluginManager::GetPluginType fnGetPluginType, FUPluginManager::CreatePlugin fnCreatePlugin) |
Add one custom plug-in library. | |
void | LoadPlugins (const FUObjectType &pluginType) |
Loads the plug-ins from the loaded plug-in libraries. | |
void | UnloadPlugins () |
Unloads all the loaded plug-ins. | |
size_t | GetLoadedPluginCount () |
Retrieves the number of loaded plug-ins. | |
FUPlugin ** | GetLoadedPlugins () |
Retrieves all the loaded plug-ins. | |
const FUPlugin ** | GetLoadedPlugins () const |
See above. | |
FUPlugin * | GetLoadedPlugin (size_t index) |
Retrieves a loaded plug-in. | |
const FUPlugin * | GetLoadedPlugin (size_t index) const |
See above. | |
Classes | |
struct | PluginLibrary |
Use this structure to attach and detach plug-in libraries as well as load and unload plug-ins. For a plug-in library to be valid, it must expose three functions:
|
Callback to create a given library plug-in. Necessary plugin function definition. Under Win32, this function MUST be a DLL export and called "CreatePlugin". |
|
Callback to retrieve the number of plug-ins contained within a library. Necessary plugin function definition. Under Win32, this function MUST be a DLL export and called "GetPluginCount". |
|
Callback to retrieve the type of a given library plug-in. Necessary plugin function definition. Under Win32, this function MUST be a DLL export and called "GetPluginType". |
|
Constructor. Look for the "plugins" folder within the given application filepath and attaches itself to the plug-in libraries it finds within the given file filter.
|
|
Destructor. Releases all the loaded plug-ins and detaches all the plug-in libraries. |
|
Add one custom plug-in library. This function is useful when dealing with static plug-in libraries.
|
|
Retrieves a loaded plug-in.
|
|
Retrieves the number of loaded plug-ins.
|
|
Retrieves all the loaded plug-ins.
|
|
Loads the plug-ins from the loaded plug-in libraries.
|
|
Unloads all the loaded plug-ins. This function releases all the loaded plug-ins, but does not detach all the plug-in libraries. |