Updraft
1.0
Open source glider flight visualisation tool.
|
Top level object that handles plugin loading and operations. More...
#include <pluginmanager.h>
Classes | |
struct | LoadedPlugin |
Data belonging to a single loaded plugin. More... | |
Public Member Functions | |
PluginManager () | |
Load all the plugins but don't create core interface for them and initialize them. | |
~PluginManager () | |
PluginBase * | getPlugin (const QString &name) |
Return pointer to plugin object. | |
QDir | getPluginDir (const QString &name) |
Return directory with plugin data. | |
QVector< PluginBase * > | getAllPlugins () |
Return list of all loaded plugins. | |
Private Member Functions | |
PluginBase * | load (const QString &fileName) |
Load the plugin, initialize it and put it to the list of loaded plugins. | |
PluginBase * | finishLoading (QObject *obj, const QDir &dir) |
Create core interface, initialize plugin and place it in the list of loaded plugins. | |
Private Attributes | |
QMap< QString, LoadedPlugin * > | plugins |
Associative map of plugin names to plugin pointers for fast lookup. |
Top level object that handles plugin loading and operations.
Load all the plugins but don't create core interface for them and initialize them.
PluginBase* Updraft::Core::PluginManager::finishLoading | ( | QObject * | obj, |
const QDir & | dir | ||
) | [private] |
Create core interface, initialize plugin and place it in the list of loaded plugins.
Logs a debug message about the reason of failure.
obj | Loaded plugin before casting to PluginBase. Can be NULL if loading failed (this will be logged). |
dir | see the documentation of metho getPluginDir() |
QVector< PluginBase * > Updraft::Core::PluginManager::getAllPlugins | ( | ) |
Return list of all loaded plugins.
PluginBase * Updraft::Core::PluginManager::getPlugin | ( | const QString & | name | ) |
Return pointer to plugin object.
name | The name of the plugin |
QDir Updraft::Core::PluginManager::getPluginDir | ( | const QString & | name | ) |
Return directory with plugin data.
name | The name of the plugin. |
PluginBase * Updraft::Core::PluginManager::load | ( | const QString & | fileName | ) | [private] |
Load the plugin, initialize it and put it to the list of loaded plugins.
fileName | The file name of the plugin that we want to load |
QMap<QString, LoadedPlugin*> Updraft::Core::PluginManager::plugins [private] |
Associative map of plugin names to plugin pointers for fast lookup.