Overview | Modules | Class Hierarchy | Classes | Members

# tlp::PropertyAlgorithm Class Reference
[Plugins]

This base class describes plug-ins who only modify one property, e.g. selection. More...

`#include <PropertyAlgorithm.h>`

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

List of all members.

## Public Member Functions

- PropertyAlgorithm (const tlp::PropertyContext &context)
    Builds a new plug-in that modifies a single property.
- virtual ~PropertyAlgorithm ()
- virtual bool run ()
    Runs the algorithm. It is a good practice to report progress through the PluginProgress, Even if your algorithm is very fast. Keep in mind that Tulip can handle very large graphs. The PluginProgress should also be used to report errors, if any.
- virtual bool check (std::string &errorMessage)
    Checks whether the algorithm can be applied on this graph or not. If not, the reason why should be reported through the PluginProgress.
- bool preservePropertyUpdates (PropertyInterface *prop)

## Public Attributes

- Graph * graph
- PluginProgress * pluginProgress
- DataSet * dataSet

## Detailed Description

This base class describes plug-ins who only modify one property, e.g. selection.

## Constructor & Destructor Documentation

tlp::PropertyAlgorithm::PropertyAlgorithm | ( | const tlp::PropertyContext & | context | ) | `[inline]`

Builds a new plug-in that modifies a single property.

Parameters:

  | context | The context containing the Graph and PropertyInterface this plug-in has access to,a s well as a PluginProgress.

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

## Member Function Documentation

virtual bool tlp::PropertyAlgorithm::check | ( | std::string & | errorMessage | ) | `[inline, virtual]`

Checks whether the algorithm can be applied on this graph or not. If not, the reason why should be reported through the PluginProgress.

Parameters:

  | errorMessage | A string whose value will be modified to an error message, if the check fails.

Returns:
  bool Whether the plug-in can run on this Graph.

bool tlp::PropertyAlgorithm::preservePropertyUpdates | ( | PropertyInterface * | prop | ) | `[inline]`

virtual bool tlp::PropertyAlgorithm::run | ( |  | ) | `[inline, virtual]`

Runs the algorithm. It is a good practice to report progress through the PluginProgress, Even if your algorithm is very fast. Keep in mind that Tulip can handle very large graphs. The PluginProgress should also be used to report errors, if any.

Returns:
  bool Whether the algorithm execution was successful or not.

## Member Data Documentation

DataSet* tlp::PropertyAlgorithm::dataSet

Graph* tlp::PropertyAlgorithm::graph

PluginProgress* tlp::PropertyAlgorithm::pluginProgress

Tulip Software by LaBRI Visualization Team 2001 - 2011