Tulip
4.6.0
Better Visualization Through Research
|
#include <PluginLister.h>
Public Member Functions | |
template<typename PluginType > | |
std::list< std::string > | availablePlugins () |
template<typename PluginType > | |
PluginType * | getPluginObject (const std::string &name, tlp::PluginContext *context) |
template<typename PluginType > | |
bool | pluginExists (const std::string &pluginName) |
Static Public Member Functions | |
static std::list< std::string > | availablePlugins () |
static void | checkLoadedPluginsDependencies (tlp::PluginLoader *loader) |
static const std::list < tlp::Dependency > & | getPluginDependencies (const std::string &name) |
static std::string | getPluginLibrary (const std::string &name) |
static tlp::Plugin * | getPluginObject (const std::string &name, tlp::PluginContext *context) |
static const ParameterDescriptionList & | getPluginParameters (const std::string &name) |
static tlp::PluginLister * | instance () |
static bool | pluginExists (const std::string &pluginName) |
static const Plugin & | pluginInformation (const std::string &name) |
static const Plugin & | pluginInformations (const std::string &name) |
static void | registerPlugin (FactoryInterface *objectFactory) |
static void | removePlugin (const std::string &name) |
Static Public Attributes | |
static PluginLoader * | currentLoader |
Protected Member Functions | |
void | sendPluginAddedEvent (const std::string &pluginName) |
void | sendPluginRemovedEvent (const std::string &pluginName) |
Static Protected Member Functions | |
static std::string | getPluginRelease (const std::string &name) |
Protected Attributes | |
std::map< std::string, PluginDescription > | _plugins |
Static Protected Attributes | |
static PluginLister * | _instance |
The PluginLister class is a singleton used to list plugins currently loaded into Tulip and retrieve information about them.
This class holds various methods to check information about plugins currently loaded into Tulip. You can use it to list plugins, get dependencies information or create an instance of a plugin.
Definition at line 60 of file PluginLister.h.
static std::list<std::string> tlp::PluginLister::availablePlugins | ( | ) | [static] |
Gets the list of plugins of a given type (template parameter). *.
static void tlp::PluginLister::checkLoadedPluginsDependencies | ( | tlp::PluginLoader * | loader | ) | [static] |
Checks if all registered plug-ins have their dependencies met.
loader | If there are errors, the loader is informed about them so they can be displayed. |
static const std::list<tlp::Dependency>& tlp::PluginLister::getPluginDependencies | ( | const std::string & | name | ) | [static] |
Gets the dependencies of a plug-in.
name | The name of the plug-in to retrieve the dependencies of. |
static std::string tlp::PluginLister::getPluginLibrary | ( | const std::string & | name | ) | [static] |
Gets the library from which a plug-in has been loaded.
name | The name of the plug-in to retrieve the library of. |
static tlp::Plugin* tlp::PluginLister::getPluginObject | ( | const std::string & | name, |
tlp::PluginContext * | context | ||
) | [static] |
Constructs a plug-in.
name | The name of the plug-in to instantiate. |
p | The context to give to the plug-in. |
PluginType* tlp::PluginLister::getPluginObject | ( | const std::string & | name, |
tlp::PluginContext * | context | ||
) | [inline] |
Similar to tlp::PluginLister::getPluginObject() but returns a typed instance.
This method instantiate a plugin from its name and returns it casted into the given type.
name | The plugin's name |
context | The context to give to the plugin |
Definition at line 126 of file PluginLister.h.
static const ParameterDescriptionList& tlp::PluginLister::getPluginParameters | ( | const std::string & | name | ) | [static] |
Gets the list of parameters for the given plug-in.
name | The name of the plug-in to retrieve the parameters of. |
static std::string tlp::PluginLister::getPluginRelease | ( | const std::string & | name | ) | [static, protected] |
Gets the release number of the given plug-in.
name | The name of the plug-in to retrieve the version number of. |
static tlp::PluginLister* tlp::PluginLister::instance | ( | ) | [static] |
Gets the static instance of this class. If not already done, creates it beforehand.
bool tlp::PluginLister::pluginExists | ( | const std::string & | pluginName | ) | [inline] |
Checks if a plugin of a given type is loaded This method checks the plugin "pluginName" is currently loaded into Tulip and if it's of type PluginType.
PluginType | the class type of the plugin |
pluginName | the name of the plugin |
Definition at line 108 of file PluginLister.h.
static bool tlp::PluginLister::pluginExists | ( | const std::string & | pluginName | ) | [static] |
Checks if a given name is registered in this factory.
pluginName | The name of the plug-in to look for. |
static const Plugin& tlp::PluginLister::pluginInformation | ( | const std::string & | name | ) | [static] |
Gets more detailed information about one specific plug-in.
name | The name of the plugin to retrieve information for. |
static const Plugin& tlp::PluginLister::pluginInformations | ( | const std::string & | name | ) | [static] |
Gets more detailed information about one specific plug-in.
name | The name of the plugin to retrieve information for. |
static void tlp::PluginLister::registerPlugin | ( | FactoryInterface * | objectFactory | ) | [static] |
Registers a plugin into Tulip.
static void tlp::PluginLister::removePlugin | ( | const std::string & | name | ) | [static] |
Removes a plug-in from this factory. This is usefull when a plug-in has unmet dependencies, or appears more than once.
name | The name of the plug-in to remove. |
std::map<std::string , PluginDescription> tlp::PluginLister::_plugins [protected] |
Stores the factory, dependencies, and parameters of all the plugins that register into this factory.
Definition at line 236 of file PluginLister.h.