eLynx SDK v3.0.1
C++ image processing API reference

eLynx::PluginManager Class Reference

#include <PluginManager.h>

Inheritance diagram for eLynx::PluginManager:

eLynx::Image::ImageFilterManager

List of all members.


Public Member Functions

 PluginManager (const UUID &iFamilyType)
virtual ~PluginManager ()
Registration
bool IsEmpty () const
void Register (const char *iprPath, const char *iprExt)
bool RegisterFile (const char *iprFilename)
void Unregister ()
bool Unregister (const IPluginPackage *iprPackage)
bool Unregister (const IPlugin *iprPlugin)
bool UnregisterPackage (const char *iprFilename)
bool UnregisterPackage (const UUID &iUUID)
bool UnregisterPlugin (const char *iprName)
bool UnregisterPlugin (const UUID &iUUID)
Package retrieval
size_t GetPackageCount () const
const IPluginPackageGetPackage (size_t iIndex=0) const
const IPluginPackageGetPackage (const IPlugin &iPlugin) const
const IPluginPackageGetPackage (const UUID &iUUID, bool ibPlugin=false) const
const IPluginPackageGetPackage (const char *iprName, bool ibPlugin=true) const
const IPluginPackageGetPackageFromPackageID (const UUID &iUUID) const
const IPluginPackageGetPackageFromFilename (const char *iprFilename) const
const IPluginPackageGetPackageFromPluginName (const char *iprName) const
const IPluginPackageGetPackageFromPluginID (const UUID &iUUID) const
Plugin retrieval
size_t GetPluginCount () const
const IPluginGetPlugin (size_t iIndex=0) const
const IPluginGetPlugin (const UUID &iUUID) const
const IPluginGetPlugin (const char *iprName) const

Protected Types

typedef std::map< const
IPlugin *, const
IPluginPackage * > 
PluginMap
 List of available plugins with associated package.

Static Protected Member Functions

static bool FileEnumCallback (const char *iprFilename, void *iprUserData)

Protected Attributes

UUID _FamilyType
 Plugins family type.
std::vector< PluginFile * > _Files
 Package files are aggregated.
PluginMap _Plugins
 Plugins are referenced.

Detailed Description

Base tool class for plugin management.

This is the base class to manage plugin packages and plugins. A PluginManager can only manages plugin packages and plugins of same family type define by an UUID.

Definition at line 40 of file PluginManager.h.


Member Typedef Documentation

typedef std::map<const IPlugin *, const IPluginPackage *> eLynx::PluginManager::PluginMap [protected]

List of available plugins with associated package.

Definition at line 181 of file PluginManager.h.


Constructor & Destructor Documentation

eLynx::PluginManager::PluginManager ( const UUID iFamilyType  ) 

Default constructor.

Parameters:
iFamilyType The UUID that uniquely identity a package family type. While Register is not called the manager can't retrieve any plugin.

virtual eLynx::PluginManager::~PluginManager (  )  [virtual]

Destructor. Unregister all packages.


Member Function Documentation

bool eLynx::PluginManager::IsEmpty (  )  const

Retrieve if at least one plugin is registred.

Returns:
true if no plugins are registred, false if at least one plugin is registred.

void eLynx::PluginManager::Register ( const char *  iprPath,
const char *  iprExt 
)

Register all package adhering to the family type, in the given path, with the given file extension.

Parameters:
iprPath The base path where to seach packages.
iprExt The extension of the family type package.

bool eLynx::PluginManager::RegisterFile ( const char *  iprFilename  ) 

Register a plugin package in the managed list.

Parameters:
iprFilename The package file to register.
Returns:
true if succeeded, false otherwise.

void eLynx::PluginManager::Unregister (  ) 

Unregister all packages and all plugins.

bool eLynx::PluginManager::Unregister ( const IPluginPackage iprPackage  ) 

Unregister a package, and his associated registered plugins.

Parameters:
iprPackage The package to unregister.
Returns:
true if succeeded, false otherwise.

bool eLynx::PluginManager::Unregister ( const IPlugin iprPlugin  ) 

Unregister a plugin.

Parameters:
iprPlugin The plugin to unregister.
Returns:
true if succeeded, false otherwise.

bool eLynx::PluginManager::UnregisterPackage ( const char *  iprFilename  ) 

Unregister a package from his filename.

Parameters:
iprFilename The package filename.
Returns:
true if succeeded, false otherwise.

bool eLynx::PluginManager::UnregisterPackage ( const UUID iUUID  ) 

Unregister a package from his UUID.

Parameters:
iUUID The package UUID.
Returns:
true if succeeded, false otherwise.

bool eLynx::PluginManager::UnregisterPlugin ( const char *  iprName  ) 

Unregister a plugin from his name.

Parameters:
iprName The plugin name.
Returns:
true if succeeded, false otherwise.

bool eLynx::PluginManager::UnregisterPlugin ( const UUID iUUID  ) 

Unregister a plugin from his UUID.

Parameters:
iUUID The UUID that identifie the plugin to unregister.
Returns:
true if succeeded, false otherwise.

size_t eLynx::PluginManager::GetPackageCount (  )  const

Get the number of registred packages. This is the number of registred dll files.

Returns:
The number of registred plugin packages.

const IPluginPackage* eLynx::PluginManager::GetPackage ( size_t  iIndex = 0  )  const

Get the package corresponding to the file index.

Parameters:
iIndex The package file index in range [0..GetPackageCount()-1].
Returns:
A reference pointer on the ith IPluginPackage.

const IPluginPackage* eLynx::PluginManager::GetPackage ( const IPlugin iPlugin  )  const

Get the package containing a requested plugin.

Parameters:
iPlugin The requested plugin.
Returns:
A reference pointer on the IPluginPackage containing the desired plugin, NULL if the plugin is not registrered.

const IPluginPackage* eLynx::PluginManager::GetPackage ( const UUID iUUID,
bool  ibPlugin = false 
) const

Get a package from an UUID.

Parameters:
iUUID The UUID of the requested package.
ibPlugin false for PackageID, true for plugin ClassID.
Returns:
A reference pointer on the IPluginPackage containing the desired package, NULL if the package is not registred.

const IPluginPackage* eLynx::PluginManager::GetPackage ( const char *  iprName,
bool  ibPlugin = true 
) const

Get the package from a name.

Parameters:
iprName The filename of requested package or the name of the required plugin.
ibPlugin true if iprName is the plugin name, false if it's package filename.
Returns:
A reference pointer on the IPluginPackage containing the desired plugin, NULL if the plugin is not available from loaded packages.

const IPluginPackage* eLynx::PluginManager::GetPackageFromPackageID ( const UUID iUUID  )  const

const IPluginPackage* eLynx::PluginManager::GetPackageFromFilename ( const char *  iprFilename  )  const

const IPluginPackage* eLynx::PluginManager::GetPackageFromPluginName ( const char *  iprName  )  const

const IPluginPackage* eLynx::PluginManager::GetPackageFromPluginID ( const UUID iUUID  )  const

size_t eLynx::PluginManager::GetPluginCount (  )  const

Get the number of registred plugin. This is the total number of registred plugins.

Returns:
The number of registred plugin.

const IPlugin* eLynx::PluginManager::GetPlugin ( size_t  iIndex = 0  )  const

Get the plugin corresponding to index in registred list.

Parameters:
iIndex The plugin index in range [0..GetPluginCount()-1].
Returns:
A reference pointer on the ith IPlugin.

const IPlugin* eLynx::PluginManager::GetPlugin ( const UUID iUUID  )  const

Get the plugin by is classId.

Parameters:
iUUID The UUID of the required plugin.
Returns:
A reference pointer on the desired plugin, NULL if the plugin is not available from loaded packages.

const IPlugin* eLynx::PluginManager::GetPlugin ( const char *  iprName  )  const

Get the plugin by is description string.

Parameters:
iprName The name of the required plugin.
Returns:
A reference pointer on the desired plugin, NULL if the plugin is not available from loaded packages.

static bool eLynx::PluginManager::FileEnumCallback ( const char *  iprFilename,
void *  iprUserData 
) [static, protected]


Member Data Documentation

Plugins family type.

Definition at line 177 of file PluginManager.h.

std::vector<PluginFile*> eLynx::PluginManager::_Files [protected]

Package files are aggregated.

Definition at line 178 of file PluginManager.h.

Plugins are referenced.

Definition at line 182 of file PluginManager.h.


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

Generated on 14 Apr 2009 by doxygen 1.5.8