Overview | Modules | Class Hierarchy | Classes | Members

# tlp::AlgorithmFactory Class Reference
[Plugins]

A base class for algorithm plug-ins factory. Each plug-in declares (through a macro) its own factory. The factory the registers itself in the Tulip plug-in system (through the static initFactory() method when the library is loaded.. The actual registration is delegated to a TemplateFactory for code factorization. More...

`#include <Algorithm.h>`

Inheritance diagram for tlp::AlgorithmFactory:
[legend]
Collaboration diagram for tlp::AlgorithmFactory:
[legend]

List of all members.

## Public Member Functions

- virtual ~AlgorithmFactory ()
- virtual Algorithm * createPluginObject (AlgorithmContext context)=0
    Creates a new Algorithm object.
- virtual std::string getMajor () const
    Only the major of the plug-in version. A version should be X.Y, X being the major.
- virtual std::string getMinor () const
    Only the minor of the plug-in version. A version should be X.Y, Y being the major.
- virtual std::string getTulipMajor () const
- virtual std::string getTulipMinor () const

## Static Public Member Functions

- static void initFactory ()
    This static initialization is called when the plug-in library is loaded, and registers the new plug-in in the Tulip plug-in system.

## Static Public Attributes

- static TLP_SCOPE
  TemplateFactory
  < AlgorithmFactory, Algorithm,
  AlgorithmContext > * factory
    A static factory that is initialized when the library is loaded.

## Detailed Description

A base class for algorithm plug-ins factory. Each plug-in declares (through a macro) its own factory. The factory the registers itself in the Tulip plug-in system (through the static initFactory() method when the library is loaded.. The actual registration is delegated to a TemplateFactory for code factorization.

## Constructor & Destructor Documentation

virtual tlp::AlgorithmFactory::~AlgorithmFactory | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

virtual Algorithm* tlp::AlgorithmFactory::createPluginObject | ( | AlgorithmContext | context | ) | `[pure virtual]`

Creates a new Algorithm object.

Returns:
  Algorithm A newly created algorithm plug-in.

virtual std::string tlp::AlgorithmFactory::getMajor | ( |  | ) | const`[inline, virtual]`

Only the major of the plug-in version. A version should be X.Y, X being the major.

Returns:
  The major part of the plug-in version.

Implements tlp::PluginInfoInterface.

virtual std::string tlp::AlgorithmFactory::getMinor | ( |  | ) | const`[inline, virtual]`

Only the minor of the plug-in version. A version should be X.Y, Y being the major.

Returns:
  The minor part of the plug-in version.

Implements tlp::PluginInfoInterface.

virtual std::string tlp::AlgorithmFactory::getTulipMajor | ( |  | ) | const`[inline, virtual]`

Returns:
  The major Tulip version the plug-in was built with.

Implements tlp::PluginInfoInterface.

virtual std::string tlp::AlgorithmFactory::getTulipMinor | ( |  | ) | const`[inline, virtual]`

Returns:
  Return the minor Tulip version this plug-in was built with.

Implements tlp::PluginInfoInterface.

static void tlp::AlgorithmFactory::initFactory | ( |  | ) | `[inline, static]`

This static initialization is called when the plug-in library is loaded, and registers the new plug-in in the Tulip plug-in system.

## Member Data Documentation

TLP_SCOPE TemplateFactory<AlgorithmFactory, Algorithm,AlgorithmContext >* tlp::AlgorithmFactory::factory `[static]`

A static factory that is initialized when the library is loaded.

Tulip Software by LaBRI Visualization Team 2001 - 2011