The PluginManager class.
More...
#include <plugin_manager.h>
|
| 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...
|
| |
|
| 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...
|
| |
◆ 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
-
| class | Derived the class of the component |
| class | Base the class from wich the component inherits |
◆ createInstance()
template<class T >
| T* PluginManager::createInstance |
( |
QString const & |
className | ) |
|
|
inline |
createInstance creates a single instance of a class from a given className
- Parameters
-
| className | the name of the class to be instantiated |
- Returns
- T* the instance of a class or a nullptr
◆ createInstances()
template<class T >
| QVector<T*> PluginManager::createInstances |
( |
| ) |
|
|
inline |
createInstances creates all instances of a plugin and returns them in a vector
- Parameters
-
- 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()
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
-
| metaData | the plugin meta data |
◆ setPluginPath()
| void PluginManager::setPluginPath |
( |
const QStringList & |
directory | ) |
|
setPluginPath adds a new directory path to the plugin path
- Parameters
-
| directory,the | path to be added |
The documentation for this class was generated from the following files:
- itemframework/itemframework/include/plugin/plugin_manager.h
- itemframework/itemframework/src/plugin/plugin_manager.cpp