Overview     Modules     Class Hierarchy     Classes     Members  

tlp::TemplateFactoryInterface Class Reference
[Plugins]

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 StructDef getPluginParameters (std::string name)=0
    Gets the list of parameters for the given plug-in.
  • virtual std::string getPluginRelease (std::string name)=0
    Gets the release number of the given plug-in.
  • virtual 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 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:
factory The factory to add.
name The name of the factory to add, used as key.
Returns:
void
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:
factoryName The name of the factory to look into.
pluginName The name of the plugin to look for.
Returns:
bool Whether the plug-in exists in the specified factory.

Member Data Documentation

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


Tulip Software by LaBRI Visualization Team    2001 - 2011