OpenViBE Documentation 3.6.0
OpenViBE::Kernel::IPluginModule Class Referenceabstract

Plugin module. More...

#include <ovIPluginModule.h>

+ Inheritance diagram for OpenViBE::Kernel::IPluginModule:

Public Member Functions

virtual bool load (const CString &name, CString *error=nullptr)=0
 Tries to load a file as an OpenViBE module. More...
 
virtual bool unload (CString *error=nullptr)=0
 Tries to unload the loaded OpenViBE module. More...
 
virtual bool getFileName (CString &fileName) const =0
 Gets the current filename associated with this plugin module. More...
 
virtual bool initialize ()=0
 Initializes this plugin module. More...
 
virtual bool getPluginObjectDescription (size_t index, Plugins::IPluginObjectDesc *&desc)=0
 Gets a specific plugin object descriptor. More...
 
virtual bool uninitialize ()=0
 Uninitializes this plugin module. More...
 
- Public Member Functions inherited from OpenViBE::IObject
virtual CIdentifier getClassIdentifier () const =0
 Returns the final class identifier of the concrete class. More...
 
virtual bool isDerivedFromClass (const CIdentifier &classId) const
 Checks if this object is compatible with a class identifier. More...
 
virtual bool acceptVisitor (IObjectVisitor &visitor)
 Requests this object to accept a visitor. More...
 

Additional Inherited Members

- Protected Member Functions inherited from OpenViBE::IObject
virtual ~IObject ()
 

Detailed Description

Plugin module.

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

Each plugin module is exactly responsible for one module (ie DLL/so file) containing OpenViBE plugins. It is able to load/unload this file and to enumerate each of its plugin object descriptor.

Member Function Documentation

◆ load()

virtual bool OpenViBE::Kernel::IPluginModule::load ( const CString name,
CString error = nullptr 
)
pure virtual

Tries to load a file as an OpenViBE module.

Parameters
name[in] : the name of the file to try to load
error[out] : an optional output string containing the error on load failure
Returns
true in case of success.
false in case of error.

Implemented in OpenViBE::Kernel::CPluginModule, and OpenViBE::Kernel::CPluginModuleDummy.

◆ unload()

virtual bool OpenViBE::Kernel::IPluginModule::unload ( CString error = nullptr)
pure virtual

Tries to unload the loaded OpenViBE module.

Parameters
error[out] : an optional output string containing the error on unload failure
Returns
true in case of success.
false in case of error.

Implemented in OpenViBE::Kernel::CPluginModule, and OpenViBE::Kernel::CPluginModuleDummy.

◆ getFileName()

virtual bool OpenViBE::Kernel::IPluginModule::getFileName ( CString fileName) const
pure virtual

Gets the current filename associated with this plugin module.

Parameters
fileName[out] : the filename of this plugin module
Returns
true in case of success.
false in case of error.

Implemented in OpenViBE::Kernel::CPluginModuleBase, and OpenViBE::Kernel::CPluginModule.

◆ initialize()

virtual bool OpenViBE::Kernel::IPluginModule::initialize ( )
pure virtual

Initializes this plugin module.

Returns
true in case of success.
false in case of error.

This function calls the onInitialize main function of the plugin module.

Implemented in OpenViBE::Kernel::CPluginModuleBase, and OpenViBE::Kernel::CPluginModule.

◆ getPluginObjectDescription()

virtual bool OpenViBE::Kernel::IPluginModule::getPluginObjectDescription ( size_t  index,
Plugins::IPluginObjectDesc *&  desc 
)
pure virtual

Gets a specific plugin object descriptor.

Parameters
index[in] : the index of the plugin object descriptor to get
desc[out] : a pointer on the associated plugin object descriptor
Returns
true in case of success.
false in case of error.

This function should be called with index ranging from 0 to the number of plugin object descriptor - 1. The number of plugin object descriptor is known as soon as this function returns false meaning there are no more descriptors to return.

This function calls the onGetPluginObjectDescription main function of the plugin module.

Note
desc can be NULL even if the function returned true
desc IS NULL if the function returned false
It is ok to call this function several times for a same index.

Implemented in OpenViBE::Kernel::CPluginModule, and OpenViBE::Kernel::CPluginModuleBase.

◆ uninitialize()

virtual bool OpenViBE::Kernel::IPluginModule::uninitialize ( )
pure virtual

Uninitializes this plugin module.

Returns
true in case of success.
false in case of error.

This function calls the onUninitialize main function of the plugin module.

Implemented in OpenViBE::Kernel::CPluginModuleBase, and OpenViBE::Kernel::CPluginModule.