Envision
A visual programming IDE for object-oriented languages
|
Public Member Functions | |
PluginManager (QString path="plugins/") | |
Creates a new plug-in manager and reads the metadata files of all plug-ins in the specified plug-in folder. More... | |
~PluginManager () | |
Unloads all plug-ins. More... | |
QList< PluginInfo > | getAllLoadedPluginsInfo () |
Returns a list containing copies of the metadata for all plug-ins which are currently loaded in the system. More... | |
EnvisionPlugin * | getLoadedPluginInterface (QString pluginId) |
Returns the interface of a loaded plug-in. More... | |
bool | isPluginLoaded (QString pluginId) |
Returns true if the specified plugin is loaded. More... | |
void | loadAllPlugins (EnvisionManager &envisionManager) |
Loads and initializes all plug-ins found in the plug-ins folder. More... | |
void | unloadAllPlugins () |
Unloads all currently loaded plug-ins. More... | |
Private Member Functions | |
QString | getLibraryFileName (const QString pluginId) |
PluginInfo | readPluginMetaData (const QString fileName) |
void | scanAllPluginsMetaData () |
void | scanSharedLibraries () |
Private Attributes | |
QMap< QString, QString > | _allFoundSharedLibraryFiles |
lower to mixed case maps. More... | |
QMap< QString, PluginInfo * > | idToMetaDataMap |
QMap< QString, QPluginLoader * > | idToPluginLoaderMap |
QList< QPluginLoader * > | loadedPlugins |
QList< PluginInfo > | pluginMetaData |
QDir | pluginsDir |
Core::PluginManager::PluginManager | ( | QString | path = "plugins/" | ) |
Creates a new plug-in manager and reads the metadata files of all plug-ins in the specified plug-in folder.
Core::PluginManager::~PluginManager | ( | ) |
Unloads all plug-ins.
QList< PluginInfo > Core::PluginManager::getAllLoadedPluginsInfo | ( | ) |
Returns a list containing copies of the metadata for all plug-ins which are currently loaded in the system.
|
private |
EnvisionPlugin * Core::PluginManager::getLoadedPluginInterface | ( | QString | pluginId | ) |
Returns the interface of a loaded plug-in.
This can be used to make calls into the plugin.
bool Core::PluginManager::isPluginLoaded | ( | QString | pluginId | ) |
Returns true if the specified plugin is loaded.
void Core::PluginManager::loadAllPlugins | ( | EnvisionManager & | envisionManager | ) |
Loads and initializes all plug-ins found in the plug-ins folder.
Before a plug-in is loaded all its dependencies are loaded first. Each plug-in is given a reference to the EnvisionManager object to communicate to the core.
|
private |
|
private |
|
private |
void Core::PluginManager::unloadAllPlugins | ( | ) |
Unloads all currently loaded plug-ins.
Before a plug-in is unloaded it's unload() method will be called giving the plug-in a chance to clean up.
|
private |
lower to mixed case maps.
|
private |
|
private |
|
private |
|
private |
|
private |