20 #ifndef PROPERTYALGORITHM_H 
   21 #define PROPERTYALGORITHM_H 
   23 #include <tulip/Algorithm.h> 
   24 #include <tulip/Graph.h> 
   28 static const std::string PROPERTY_ALGORITHM_CATEGORY = 
"Property";
 
   39     return PROPERTY_ALGORITHM_CATEGORY;
 
   43 template <
class Property>
 
   44 class TLP_SCOPE TypedPropertyAlgorithm : 
public PropertyAlgorithm {
 
   48       : PropertyAlgorithm(context), result(nullptr) {
 
   49     if (dataSet != 
nullptr) {
 
   50       if (!dataSet->exists(
"result")) {
 
   51         std::string propname(
"result");
 
   54         while (graph->existProperty(propname)) {
 
   56           propname += 
"result" + std::to_string(number);
 
   60         result = graph->getProperty<Property>(propname);
 
   62         dataSet->get(
"result", result);
 
   67   std::string category()
 const override {
 
   68     return PROPERTY_ALGORITHM_CATEGORY;
 
   72 class BooleanProperty;
 
   73 static const std::string BOOLEAN_ALGORITHM_CATEGORY = 
"Selection";
 
   80 class TLP_SCOPE 
BooleanAlgorithm : 
public TypedPropertyAlgorithm<tlp::BooleanProperty> {
 
   86     return BOOLEAN_ALGORITHM_CATEGORY;
 
   91 static const std::string COLOR_ALGORITHM_CATEGORY = 
"Coloring";
 
   97 class TLP_SCOPE 
ColorAlgorithm : 
public TypedPropertyAlgorithm<tlp::ColorProperty> {
 
  103     return COLOR_ALGORITHM_CATEGORY;
 
  107 class DoubleProperty;
 
  108 static const std::string DOUBLE_ALGORITHM_CATEGORY = 
"Measure";
 
  115 class TLP_SCOPE 
DoubleAlgorithm : 
public TypedPropertyAlgorithm<tlp::DoubleProperty> {
 
  122     return DOUBLE_ALGORITHM_CATEGORY;
 
  126 class IntegerProperty;
 
  127 static const std::string INTEGER_ALGORITHM_CATEGORY = 
"Measure";
 
  140     return INTEGER_ALGORITHM_CATEGORY;
 
  144 class LayoutProperty;
 
  145 static const std::string LAYOUT_ALGORITHM_CATEGORY = 
"Layout";
 
  152 class TLP_SCOPE 
LayoutAlgorithm : 
public TypedPropertyAlgorithm<tlp::LayoutProperty> {
 
  159     return LAYOUT_ALGORITHM_CATEGORY;
 
  164 static const std::string SIZE_ALGORITHM_CATEGORY = 
"Resizing";
 
  170 class TLP_SCOPE 
SizeAlgorithm : 
public TypedPropertyAlgorithm<tlp::SizeProperty> {
 
  176     return SIZE_ALGORITHM_CATEGORY;
 
  180 class StringProperty;
 
  181 static const std::string STRING_ALGORITHM_CATEGORY = 
"Labeling";
 
  188 class TLP_SCOPE 
StringAlgorithm : 
public TypedPropertyAlgorithm<tlp::StringProperty> {
 
  195     return STRING_ALGORITHM_CATEGORY;
 
This abstract class describes a basic algorithm plugin.
 
The Boolean algorithm takes a graph as input and output its results as a tlp::BooleanProperty.
 
std::string category() const override
A string identifier for a plugin used for categorization purposes.
 
The color algorithm takes a graph as input and output its results as a tlp::ColorProperty.
 
std::string category() const override
A string identifier for a plugin used for categorization purposes.
 
The double algorithm takes a graph as input and output its results as a tlp::DoubleProperty.
 
std::string category() const override
A string identifier for a plugin used for categorization purposes.
 
The integer algorithm takes a graph as input and output its results as a tlp::IntegerProperty.
 
std::string category() const override
A string identifier for a plugin used for categorization purposes.
 
The layout algorithm takes a graph as input and output its results as a tlp::LayoutProperty.
 
std::string category() const override
A string identifier for a plugin used for categorization purposes.
 
Contains runtime parameters for a plugin.
 
A non-template interface for tlp::TypedPropertyAlgorithm.
 
std::string category() const override
A string identifier for a plugin used for categorization purposes.
 
The size algorithm takes a graph as input and output its results as a tlp::SizeProperty.
 
std::string category() const override
A string identifier for a plugin used for categorization purposes.
 
The string algorithm takes a graph as input and output its results as a tlp::StringProperty.
 
std::string category() const override
A string identifier for a plugin used for categorization purposes.