Overview     Modules     Class Hierarchy     Classes     Members  

This interface lists functions used to regroup plug-ins. More...

#include <TemplateFactory.h>

Inheritance diagram for tlp::TemplateFactoryInterface:
Collaboration diagram for tlp::TemplateFactoryInterface:

List of all members.

Public Member Functions

  • virtual ~TemplateFactoryInterface ()
  • virtual Iterator< std::string > * availablePlugins ()=0
    Gets the list of plug-ins that registered themselves in this factory.
  • virtual bool pluginExists (const std::string &pluginName)=0
    Checks if a given name is registered in this factory.
  • virtual const
    ParameterDescriptionList & getPluginParameters (std::string name)=0
    Gets the whole parameters for the given plug-in.
  • virtual const std::string & getPluginRelease (std::string name)=0
    Gets the release number of the given plug-in.
  • virtual const std::list
    < tlp::Dependency > & getPluginDependencies (std::string name)=0
    Gets the dependencies of a plug-in.
  • virtual std::string getPluginsClassName ()=0
    Gets the class name for the plug-in's registered class. If the class is in the tlp namespace, the 'tlp::' prefix is removed.
  • virtual void removePlugin (const std::string &name)=0
    Removes a plug-in from this factory. This is usefull when a plug-in has unmet dependencies, or appears more than once.

Static Public Member Functions

  • static std::string standardizeName (const char *name)
    standardize a factory name
  • static void addFactory (TemplateFactoryInterface *factory, const std::string &name)
    Adds a factory to a static map of factories. This map is then used to list all the factories, and all the plug-ins for each factory.
  • static bool pluginExists (const std::string &factoryName, const std::string &pluginName)
    Checks if a plug-in exists in a specific factory. In debug mode, an assert checks the factory is registered in the factory map before accessing it.

Static Public Attributes


Detailed Description

This interface lists functions used to regroup plug-ins.

It is used to list plug-ins that register themselves into it.

The TemplateFactory's role is to list plug-ins, and retrive their dependencies for Tulip to check if they are met. The only check performed should be the unicity of a plug-in in the system.

Each Tulip plug-in has a factory, which needs to be registered into a TemplateFactory. TemplateFactories register themselves in the Tulip plug-in system, and Tulip lists the plug-ins of each TemplateFactory.


Constructor & Destructor Documentation

virtual tlp::TemplateFactoryInterface::~TemplateFactoryInterface ( ) [inline, virtual]

Member Function Documentation

static void tlp::TemplateFactoryInterface::addFactory ( TemplateFactoryInterface factory,
const std::string &  name 
) [inline, static]

Adds a factory to a static map of factories. This map is then used to list all the factories, and all the plug-ins for each factory.

Parameters:
factoryThe factory to add.
nameThe name of the factory to add, used as key.
Returns:
void
virtual Iterator<std::string>* tlp::TemplateFactoryInterface::availablePlugins ( ) [pure virtual]

Gets the list of plug-ins that registered themselves in this factory.

Returns:
:Iterator< std::string >* An iterator over the names of the plug-ins registered in this factory.

Implemented in tlp::TemplateFactory< ObjectFactory, ObjectType, Context >, tlp::TemplateFactory< ExportModuleFactory, ExportModule, AlgorithmContext >, tlp::TemplateFactory< ImportModuleFactory, ImportModule, AlgorithmContext >, and tlp::TemplateFactory< AlgorithmPlugin, Algorithm, AlgorithmContext >.

virtual const std::list<tlp::Dependency>& tlp::TemplateFactoryInterface::getPluginDependencies ( std::string  name) [pure virtual]

Gets the dependencies of a plug-in.

Parameters:
nameThe name of the plug-in to retrieve the dependencies of.
Returns:
:list< tlp::Dependency, std::allocator< tlp::Dependency > > The list of dependencies of the plug-in.

Implemented in tlp::TemplateFactory< ObjectFactory, ObjectType, Context >, tlp::TemplateFactory< ExportModuleFactory, ExportModule, AlgorithmContext >, tlp::TemplateFactory< ImportModuleFactory, ImportModule, AlgorithmContext >, and tlp::TemplateFactory< AlgorithmPlugin, Algorithm, AlgorithmContext >.

virtual const ParameterDescriptionList& tlp::TemplateFactoryInterface::getPluginParameters ( std::string  name) [pure virtual]

Gets the whole parameters for the given plug-in.

Parameters:
nameThe name of the plug-in to retrieve the parameters of.
Returns:
:PluginParameters The whole parameters of the plug-in.

Implemented in tlp::TemplateFactory< ObjectFactory, ObjectType, Context >, tlp::TemplateFactory< ExportModuleFactory, ExportModule, AlgorithmContext >, tlp::TemplateFactory< ImportModuleFactory, ImportModule, AlgorithmContext >, and tlp::TemplateFactory< AlgorithmPlugin, Algorithm, AlgorithmContext >.

virtual const std::string& tlp::TemplateFactoryInterface::getPluginRelease ( std::string  name) [pure virtual]

Gets the release number of the given plug-in.

Parameters:
nameThe name of the plug-in to retrieve the version number of.
Returns:
:string The version number, ussually formatted as X[.Y], where X is the major, and Y the minor.

Implemented in tlp::TemplateFactory< ObjectFactory, ObjectType, Context >, tlp::TemplateFactory< ExportModuleFactory, ExportModule, AlgorithmContext >, tlp::TemplateFactory< ImportModuleFactory, ImportModule, AlgorithmContext >, and tlp::TemplateFactory< AlgorithmPlugin, Algorithm, AlgorithmContext >.

virtual std::string tlp::TemplateFactoryInterface::getPluginsClassName ( ) [pure virtual]

Gets the class name for the plug-in's registered class. If the class is in the tlp namespace, the 'tlp::' prefix is removed.

Returns:
:string The class name of the plug-in.

Implemented in tlp::TemplateFactory< ObjectFactory, ObjectType, Context >, tlp::TemplateFactory< ExportModuleFactory, ExportModule, AlgorithmContext >, tlp::TemplateFactory< ImportModuleFactory, ImportModule, AlgorithmContext >, and tlp::TemplateFactory< AlgorithmPlugin, Algorithm, AlgorithmContext >.

virtual bool tlp::TemplateFactoryInterface::pluginExists ( const std::string &  pluginName) [pure virtual]

Checks if a given name is registered in this factory.

Parameters:
pluginNameThe name of the plug-in to look for.
Returns:
bool Whether there is a plug-in with the given name registered in this factory.

Implemented in tlp::TemplateFactory< ObjectFactory, ObjectType, Context >, tlp::TemplateFactory< ExportModuleFactory, ExportModule, AlgorithmContext >, tlp::TemplateFactory< ImportModuleFactory, ImportModule, AlgorithmContext >, and tlp::TemplateFactory< AlgorithmPlugin, Algorithm, AlgorithmContext >.

static bool tlp::TemplateFactoryInterface::pluginExists ( const std::string &  factoryName,
const std::string &  pluginName 
) [inline, static]

Checks if a plug-in exists in a specific factory. In debug mode, an assert checks the factory is registered in the factory map before accessing it.

Parameters:
factoryNameThe name of the factory to look into.
pluginNameThe name of the plugin to look for.
Returns:
bool Whether the plug-in exists in the specified factory.
virtual void tlp::TemplateFactoryInterface::removePlugin ( const std::string &  name) [pure virtual]

Removes a plug-in from this factory. This is usefull when a plug-in has unmet dependencies, or appears more than once.

Parameters:
nameThe name of the plug-in to remove.
Returns:
void

Implemented in tlp::TemplateFactory< ObjectFactory, ObjectType, Context >, tlp::TemplateFactory< ExportModuleFactory, ExportModule, AlgorithmContext >, tlp::TemplateFactory< ImportModuleFactory, ImportModule, AlgorithmContext >, and tlp::TemplateFactory< AlgorithmPlugin, Algorithm, AlgorithmContext >.

static std::string tlp::TemplateFactoryInterface::standardizeName ( const char *  name) [inline, static]

standardize a factory name


Member Data Documentation

TLP_SCOPE std::map< std::string, TemplateFactoryInterface* >* tlp::TemplateFactoryInterface::allFactories [static]


Tulip Software by LaBRI Visualization Team    2001 - 2012