![]() |
Computer Assited Medical Intervention Tool Kit
|
This class is used to manage all plugins loaded by the application. More...
#include <ExtensionManager.h>
Static Public Member Functions | |
static void | autoload () |
Autoload component and action extensions. | |
Component extension list management | |
static void | autoloadComponentExtensions () |
static bool | loadComponentExtension (QString file) |
load a ComponentExtension plugin using a .dll/.so/.dylib filename | |
static bool | unloadComponentExtension (QString) |
unload a plugin corresponding to a given extension or name | |
static const ComponentExtension * | getComponentExtension (QString) |
get the plugin corresponding to a given extension or name (const, you can only use this method to get information, use open to open a file using a specific plugin) | |
static const QMap< QString, ComponentExtension * > & | getComponentExtensions () |
get all the registered component extensions that can manage file (default component extension) This is the public method (return a const, the extensions map is private and cannot be modified externally). | |
static const QMap< QString, ComponentExtension * > & | getDataDirectoryComponents () |
get all the registered component extensions that can manage entire directories This is the public method (return a const, the extensions map is private and cannot be modified externally). | |
static QStringList | getFileExtensions () |
get the list of all the suffixes managed by registered component extensions (all possible file suffix) | |
static QStringList | getDataDirectoryExtNames () |
get the list of all the name of the registered Component data directory | |
Action extension list management | |
static void | autoloadActionExtensions () |
autoload all the action extensions (use applicationDirPath/actions) | |
static void | unloadAllActionExtensions () |
unload all action extensions and delete instanciated actions | |
static bool | loadActionExtension (QString) |
load an action extension using a .dll/.so/.dylib filename | |
static bool | unloadActionExtension (QString) |
unload an action extension using its .dll/.so/.dylib filename | |
static const QMap< QString, ActionExtension * > & | getActionExtensions () |
get all the registered action extension. |
Static Private Member Functions | |
static QMap< QString, ActionExtension * > & | getActionExtensionMap () |
get the singleton map of loaded component plugins for files (the key is the file extension) This is the private (intern) method. | |
static QMap< QString, ComponentExtension * > & | getComponentExtensionMap () |
get the singleton map of loaded component plugins for files (the key is the file extension) This is the private (intern) method. | |
static QMap< QString, ComponentExtension * > & | getDataDirectoryComponentExtensionMap () |
get the singleton map of loaded component plugins for data directory (the key is the name) This is the private (intern) method. |
This class is used to manage all plugins loaded by the application.
The current version is able to load dynamic library for
This class is a contained for all the loaded extension. It contains only static members.
|
static |
Autoload component and action extensions.
References autoloadActionExtensions(), and autoloadComponentExtensions().
Referenced by camitk::Application::Application().
|
static |
autoload all the action extensions (use applicationDirPath/actions)
References camitk::Core::getActionDir(), camitk::Application::getSettings(), loadActionExtension(), and camitk::Core::soVersion.
Referenced by autoload().
|
static |
autoload all the ComponentExtension plugins (use applicationDirPath/components)
References camitk::Core::getComponentDir(), camitk::Core::getCoreLibDir(), camitk::Application::getSettings(), loadComponentExtension(), and camitk::Core::soVersion.
Referenced by autoload().
|
staticprivate |
get the singleton map of loaded component plugins for files (the key is the file extension) This is the private (intern) method.
The component extension map is updated by loadExtension, unloadExtension and autoloadExtensions. This method follows the "construct on first use" idiom/design-pattern. It therefore avoids the infamous "static initialization order fiasco", see http://www.parashift.com/c++-faq/ctors.html
Referenced by getActionExtensions(), loadActionExtension(), unloadActionExtension(), and unloadAllActionExtensions().
|
static |
get all the registered action extension.
This is the public method (return a const, the extensions map is private and cannot be modified externally).
References getActionExtensionMap().
Referenced by camitk::Core::getConfig(), camitk::SettingsDialog::on_removeActionExtensionButton_released(), and camitk::SettingsDialog::updateActionExtensionList().
|
static |
get the plugin corresponding to a given extension or name (const, you can only use this method to get information, use open to open a file using a specific plugin)
References getComponentExtensionMap(), and getDataDirectoryComponentExtensionMap().
Referenced by camitk::SettingsDialog::on_componentExtensionList_cellClicked().
|
staticprivate |
get the singleton map of loaded component plugins for files (the key is the file extension) This is the private (intern) method.
The component extension map is updated by loadExtension, unloadExtension and autoloadExtensions. This method follows the "construct on first use" idiom/design-pattern. It therefore avoids the infamous "static initialization order fiasco", see http://www.parashift.com/c++-faq/ctors.html
Referenced by getComponentExtension(), getComponentExtensions(), loadComponentExtension(), and unloadComponentExtension().
|
static |
get all the registered component extensions that can manage file (default component extension) This is the public method (return a const, the extensions map is private and cannot be modified externally).
References getComponentExtensionMap().
Referenced by camitk::Core::getConfig(), getFileExtensions(), camitk::Application::open(), camitk::Application::save(), and camitk::SettingsDialog::updateComponentExtensionList().
|
staticprivate |
get the singleton map of loaded component plugins for data directory (the key is the name) This is the private (intern) method.
The data directory component extension map is updated by loadExtension, unloadExtension and autoloadExtensions. This method follows the "construct on first use" idiom/design-pattern. It therefore avoids the infamous "static initialization order fiasco", see http://www.parashift.com/c++-faq/ctors.html
Referenced by getComponentExtension(), getDataDirectoryComponents(), loadComponentExtension(), and unloadComponentExtension().
|
static |
get all the registered component extensions that can manage entire directories This is the public method (return a const, the extensions map is private and cannot be modified externally).
References getDataDirectoryComponentExtensionMap().
Referenced by getDataDirectoryExtNames(), camitk::Application::openDirectory(), and camitk::SettingsDialog::updateComponentExtensionList().
|
static |
get the list of all the name of the registered Component data directory
References getDataDirectoryComponents().
|
static |
get the list of all the suffixes managed by registered component extensions (all possible file suffix)
References getComponentExtensions().
|
static |
load an action extension using a .dll/.so/.dylib filename
References getActionExtensionMap(), camitk::ActionExtension::init(), and camitk::Application::registerAllActions().
Referenced by autoloadActionExtensions(), and camitk::SettingsDialog::on_addActionExtensionButton_released().
|
static |
load a ComponentExtension plugin using a .dll/.so/.dylib filename
file | the plugin filenamae (.dll/.so/.dylib) |
References getComponentExtensionMap(), getDataDirectoryComponentExtensionMap(), camitk::ComponentExtension::getFileExtensions(), camitk::ComponentExtension::getName(), camitk::ComponentExtension::hasDataDirectory(), and camitk::ComponentExtension::setLocation().
Referenced by autoloadComponentExtensions(), and camitk::SettingsDialog::on_addComponentExtensionButton_released().
|
static |
unload an action extension using its .dll/.so/.dylib filename
References getActionExtensionMap(), camitk::ActionExtension::getActions(), and camitk::Action::getName().
Referenced by camitk::SettingsDialog::on_removeActionExtensionButton_released(), and unloadAllActionExtensions().
|
static |
unload all action extensions and delete instanciated actions
References getActionExtensionMap(), and unloadActionExtension().
Referenced by camitk::Application::quitting().
|
static |
unload a plugin corresponding to a given extension or name
References getComponentExtensionMap(), getDataDirectoryComponentExtensionMap(), and camitk::ComponentExtension::getLocation().
Referenced by camitk::SettingsDialog::on_removeComponentExtensionButton_released().