roviz  0.7
Code Documentation of roviz
Public Slots | Public Member Functions | Protected Member Functions | List of all members
PluginManager Class Reference

The PluginManager class. More...

#include <plugin_manager.h>

Inheritance diagram for PluginManager:
Inheritance graph
Collaboration diagram for PluginManager:
Collaboration graph

Public Slots

void serializePluginMetaData (PluginMetaData *metaData)
 serializePluginState serializes the submitted meta data More...
 

Public Member Functions

QStringList const & pluginPath ()
 pluginPath More...
 
void setPluginPath (const QStringList &directory)
 setPluginPath adds a new directory path to the plugin path More...
 
QString const & lastError ()
 lastError returns the last error message of the plugin manager More...
 
QList< PluginMetaData * > pluginMetaDataList ()
 pluginMetaDataList returns the list of plugins found in the specified directories More...
 
template<class Derived , class Base >
void addPluginComponent ()
 addPluginComponent adds a plugin component to internal list from where it can be instantiated later More...
 
template<class T >
QVector< T * > createInstances ()
 createInstances creates all instances of a plugin and returns them in a vector More...
 
template<class T >
T * createInstance (QString const &className)
 createInstance creates a single instance of a class from a given className More...
 

Protected Member Functions

bool postInit ()
 postInit will be called after all components and singletons have been constructed/initialized More...
 
bool preDestroy ()
 preDestroy will be called before any of the components and singletons will be destructed/deinitailized More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Singleton< PluginManager >
static PluginManagerinstance ()
 Returns the current instance of the singleton. More...
 

Detailed Description

The PluginManager class.

Member Function Documentation

◆ addPluginComponent()

template<class Derived , class Base >
void PluginManager::addPluginComponent ( )
inline

addPluginComponent adds a plugin component to internal list from where it can be instantiated later

Parameters
classDerived the class of the component
classBase the class from wich the component inherits
Here is the caller graph for this function:

◆ createInstance()

template<class T >
T* PluginManager::createInstance ( QString const &  className)
inline

createInstance creates a single instance of a class from a given className

Parameters
classNamethe name of the class to be instantiated
Returns
T* the instance of a class or a nullptr
Here is the caller graph for this function:

◆ createInstances()

template<class T >
QVector<T*> PluginManager::createInstances ( )
inline

createInstances creates all instances of a plugin and returns them in a vector

Parameters
Tthe plugin type
Returns
QVector<T*> a vector with plugin component instances

◆ lastError()

QString const & PluginManager::lastError ( )

lastError returns the last error message of the plugin manager

Returns
a QString error message

◆ pluginMetaDataList()

QList< PluginMetaData * > PluginManager::pluginMetaDataList ( )

pluginMetaDataList returns the list of plugins found in the specified directories

Returns
a QList of PluginMetaData*

◆ pluginPath()

QStringList const & PluginManager::pluginPath ( )

pluginPath

Returns
a QStringList containing all plugin directories

◆ postInit()

bool PluginManager::postInit ( )
protectedvirtual

postInit will be called after all components and singletons have been constructed/initialized

Returns
true if post initialization was successfull

Implements AbstractSingleton.

◆ preDestroy()

bool PluginManager::preDestroy ( )
protectedvirtual

preDestroy will be called before any of the components and singletons will be destructed/deinitailized

Returns
true if pre destruction was successfull

Implements AbstractSingleton.

◆ serializePluginMetaData

void PluginManager::serializePluginMetaData ( PluginMetaData metaData)
slot

serializePluginState serializes the submitted meta data

Parameters
metaDatathe plugin meta data

◆ setPluginPath()

void PluginManager::setPluginPath ( const QStringList &  directory)

setPluginPath adds a new directory path to the plugin path

Parameters
directory,thepath to be added

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