IPluginManager Class Reference

Log manager. More...

Inheritance diagram for IPluginManager:
IKernelObject IObject

List of all members.

Public Member Functions

Plugin modules/descriptors management
virtual OpenViBE::boolean addPluginsFromFiles (const OpenViBE::CString &rFileNameWildCard)=0
 Loads new DLL/so plugin module file(s)
virtual OpenViBE::CIdentifier getNextPluginObjectDescIdentifier (const OpenViBE::CIdentifier &rPreviousIdentifier) const =0
 Gets next plugin object descriptor identifier.
virtual OpenViBE::CIdentifier getNextPluginObjectDescIdentifier (const OpenViBE::CIdentifier &rPreviousIdentifier, const OpenViBE::CIdentifier &rBaseClassIdentifier) const =0
 Gets next plugin object descriptor identifier given a base class identifier.
virtual OpenViBE::boolean canCreatePluginObject (const OpenViBE::CIdentifier &rClassIdentifier)=0
 Checks if a plugin object can be created or not.
virtual const
OpenViBE::Plugins::IPluginObjectDesc
getPluginObjectDesc (const OpenViBE::CIdentifier &rIdentifier) const =0
 Gets details on a specific plugin object descriptor.
virtual const
OpenViBE::Plugins::IPluginObjectDesc
getPluginObjectDescCreating (const OpenViBE::CIdentifier &rClassIdentifier) const =0
 Gets details on a specific plugin object descriptor given the class identifier it should create.
Plugin lifetime management
virtual OpenViBE::CIdentifier getPluginObjectHashValue (const OpenViBE::CIdentifier &rClassIdentifier) const =0
 Gets a hash value for a given plugin.
virtual OpenViBE::boolean isPluginObjectFlaggedAsDeprecated (const OpenViBE::CIdentifier &rClassIdentifier) const =0
 Gets a hint whether a plugin is deprecated or not.
virtual OpenViBE::boolean isPluginObjectFlaggedAsUnstable (const OpenViBE::CIdentifier &rClassIdentifier) const =0
 Gets a hint whether a plugin is fully functionnal or not.
Plugin creation and destruction
virtual
OpenViBE::Plugins::IPluginObject
createPluginObject (const OpenViBE::CIdentifier &rClassIdentifier)=0
 Creates a new plugin object given its class identifier.
virtual OpenViBE::boolean releasePluginObject (OpenViBE::Plugins::IPluginObject *pPluginObject)=0
 Tells the plugin manager a plugin object won't be ever used.
Helpers
virtual
OpenViBE::Plugins::IAlgorithm
createAlgorithm (const OpenViBE::CIdentifier &rClassIdentifier, const OpenViBE::Plugins::IAlgorithmDesc **ppAlgorithmDesc)=0
 Creates a new algorithm given its class identifier and eventually returns the associated descriptor.
virtual
OpenViBE::Plugins::IBoxAlgorithm
createBoxAlgorithm (const OpenViBE::CIdentifier &rClassIdentifier, const OpenViBE::Plugins::IBoxAlgorithmDesc **ppBoxAlgorithmDesc)=0
 Creates a new box algorithm given its class identifier and eventually returns the associated descriptor.

Detailed Description

Log manager.

Author:
Yann Renard (INRIA/IRISA)
Date:
2006-09-26

The plugin manager is in charge of loading/unloading plugin modules (ie DLL/so files) containing OpenViBE plugins. It also provides functions in order to list plugin descriptors, create or release plugin objects...


Member Function Documentation

virtual OpenViBE::boolean addPluginsFromFiles ( const OpenViBE::CString rFileNameWildCard) [pure virtual]

Loads new DLL/so plugin module file(s)

Parameters:
rFileNameWildCard[in] : a wild card with the file(s) to search plugins in
Returns:
true in case of success.
false in case of error.
virtual OpenViBE::CIdentifier getNextPluginObjectDescIdentifier ( const OpenViBE::CIdentifier rPreviousIdentifier) const [pure virtual]

Gets next plugin object descriptor identifier.

Parameters:
rPreviousIdentifier[in] : The identifier for the preceeding plugin object descriptor
Returns:
The identifier of the next plugin object descriptor in case of success.
OV_UndefinedIdentifier on error.
Note:
Giving OV_UndefinedIdentifier as rPreviousIdentifier will cause this function to return the first plugin object descriptor identifier.
virtual OpenViBE::CIdentifier getNextPluginObjectDescIdentifier ( const OpenViBE::CIdentifier rPreviousIdentifier,
const OpenViBE::CIdentifier rBaseClassIdentifier 
) const [pure virtual]

Gets next plugin object descriptor identifier given a base class identifier.

Parameters:
rPreviousIdentifier[in] : The identifier for the preceeding plugin object descriptor
rBaseClassIdentifier[in] : the class the plugin object descriptor should derive from
Returns:
The identifier of the next plugin object descriptor in case of success.
OV_UndefinedIdentifier on error.
Note:
Giving OV_UndefinedIdentifier as rPreviousIdentifier will cause this function to return the first plugin object descriptor identifier.
virtual OpenViBE::boolean canCreatePluginObject ( const OpenViBE::CIdentifier rClassIdentifier) [pure virtual]

Checks if a plugin object can be created or not.

Parameters:
rClassIdentifier[in] : the class identifier a descriptor should be able to create
Returns:
true in case this manager is able to create a plugin object with the provided class identifier.
false in other case.
virtual const OpenViBE::Plugins::IPluginObjectDesc* getPluginObjectDesc ( const OpenViBE::CIdentifier rIdentifier) const [pure virtual]

Gets details on a specific plugin object descriptor.

Parameters:
rIdentifier[in] : the plugin object descriptor identifier which details should be returned
Returns:
the corresponding plugin object descriptor pointer.
See also:
getNextPluginObjectDescIdentifier
virtual const OpenViBE::Plugins::IPluginObjectDesc* getPluginObjectDescCreating ( const OpenViBE::CIdentifier rClassIdentifier) const [pure virtual]

Gets details on a specific plugin object descriptor given the class identifier it should create.

Parameters:
rClassIdentifier[in] : the plugin object class identifier of the descriptor which details should be returned
Returns:
the corresponding plugin object descriptor pointer.
See also:
canCreatePluginObject
virtual OpenViBE::CIdentifier getPluginObjectHashValue ( const OpenViBE::CIdentifier rClassIdentifier) const [pure virtual]

Gets a hash value for a given plugin.

Parameters:
rClassIdentifier[in] : the class identifier of the plugin which hash value has to be returned
Returns:
a hash code for the corresponding plugin object

This function can be used to compute a has code of the described plugin object If this hash code differs from session to session, it means that the plugin descriptor changed in some way.

Note:
The method used to compute the hash code is specific to the class of plugin that is considered (for example, for box algorithms, the hash code is based on what OpenViBE::Kernel::IBoxProto receives at description stage)
virtual OpenViBE::boolean isPluginObjectFlaggedAsDeprecated ( const OpenViBE::CIdentifier rClassIdentifier) const [pure virtual]

Gets a hint whether a plugin is deprecated or not.

Parameters:
rClassIdentifier[in] : the class identifier of the plugin which deprecation should be returned
Returns:
true in case the plugin is deprecated
false in case the plugin is not deprecated

If this function returns true, this means that the considered plugin is still valid and functionnal but that it will be removed soon or later. Code relying on this plugin should consider any alternative available to avoid future problems.

virtual OpenViBE::boolean isPluginObjectFlaggedAsUnstable ( const OpenViBE::CIdentifier rClassIdentifier) const [pure virtual]

Gets a hint whether a plugin is fully functionnal or not.

Parameters:
rClassIdentifier[in] : the class identifier of the plugin which stability should be returned
Returns:
true in case the plugin is considered as unstable
false in case the plugin is considered as stable

Getting true from this function for a given plugin reflects the fact that this plugin is known not to be fully usable. This could either be because of work in progress for this plugin or either because there are known limitations that could not be bypassed. This plugin probably is functionnal enough for well known cases, and may produce unexpected results in other cases. Use it at your own risks (expect crashes for example)

virtual OpenViBE::Plugins::IPluginObject* createPluginObject ( const OpenViBE::CIdentifier rClassIdentifier) [pure virtual]

Creates a new plugin object given its class identifier.

Parameters:
rClassIdentifier[in] : the class identifier of the plugin object to create
Returns:
a pointer on the newly created plugin object.
NULL in case of error.
See also:
releasePluginObject
virtual OpenViBE::boolean releasePluginObject ( OpenViBE::Plugins::IPluginObject pPluginObject) [pure virtual]

Tells the plugin manager a plugin object won't be ever used.

Parameters:
pPluginObject[in] : the plugin object to release
Returns:
true in case of success.
false in case of error.

The client code should not call any function of the plugin object after this call has been made. However, the plugin manager is free to release allocated memory and resources for this plugin object.

virtual OpenViBE::Plugins::IAlgorithm* createAlgorithm ( const OpenViBE::CIdentifier rClassIdentifier,
const OpenViBE::Plugins::IAlgorithmDesc **  ppAlgorithmDesc 
) [pure virtual]

Creates a new algorithm given its class identifier and eventually returns the associated descriptor.

Parameters:
rClassIdentifier[in] : the class identifier of the algorithm to create
ppAlgorithmDesc[out] : a pointer where to store the descriptor information
Returns:
The newly created algorithm in case of success.
NULL in case of error.

This function is a helper for the use of createPluginObject and co.

virtual OpenViBE::Plugins::IBoxAlgorithm* createBoxAlgorithm ( const OpenViBE::CIdentifier rClassIdentifier,
const OpenViBE::Plugins::IBoxAlgorithmDesc **  ppBoxAlgorithmDesc 
) [pure virtual]

Creates a new box algorithm given its class identifier and eventually returns the associated descriptor.

Parameters:
rClassIdentifier[in] : the class identifier of the box algorithm to create
ppBoxAlgorithmDesc[out] : a pointer where to store the descriptor information
Returns:
The newly created box algorithm in case of success.
NULL in case of error.

This function is a helper for the use of createPluginObject and co.