Tulip  4.10.0
Better Visualization Through Research
PropertyAlgorithm.h
1 /*
2  *
3  * This file is part of Tulip (www.tulip-software.org)
4  *
5  * Authors: David Auber and the Tulip development Team
6  * from LaBRI, University of Bordeaux
7  *
8  * Tulip is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation, either version 3
11  * of the License, or (at your option) any later version.
12  *
13  * Tulip is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  * See the GNU General Public License for more details.
17  *
18  */
19 
20 #ifndef PROPERTYALGORITHM_H
21 #define PROPERTYALGORITHM_H
22 
23 #include <tulip/Algorithm.h>
24 #include <tulip/TemplateAlgorithm.h>
25 
26 namespace tlp {
27 class PluginContext;
28 
29 class BooleanProperty;
30 static const std::string BOOLEAN_ALGORITHM_CATEGORY = "Selection";
31 
32 /**
33  * @ingroup Plugins
34  * @brief The boolean algorithm takes a graph as input and output its results as a tlp::BooleanProperty
35  */
36 class TLP_SCOPE BooleanAlgorithm : public TemplateAlgorithm<tlp::BooleanProperty> {
37 protected:
39 
40 public:
41  virtual std::string category() const {
42  return BOOLEAN_ALGORITHM_CATEGORY;
43  }
44 };
45 
46 class ColorProperty;
47 static const std::string COLOR_ALGORITHM_CATEGORY = "Coloring";
48 
49 /**
50  * @ingroup Plugins
51  * @brief The color algorithm takes a graph as input and output its results as a tlp::ColorProperty
52  */
53 class TLP_SCOPE ColorAlgorithm : public TemplateAlgorithm<tlp::ColorProperty> {
54 protected:
56 public:
57  virtual std::string category() const {
58  return COLOR_ALGORITHM_CATEGORY;
59  }
60 };
61 
62 class DoubleProperty;
63 static const std::string DOUBLE_ALGORITHM_CATEGORY = "Measure";
64 
65 /**
66  * @ingroup Plugins
67  * @brief The double algorithm takes a graph as input and output its results as a tlp::DoubleProperty
68  */
69 class TLP_SCOPE DoubleAlgorithm : public TemplateAlgorithm<tlp::DoubleProperty> {
70 protected:
71  ///
73 public:
74  virtual std::string category() const {
75  return DOUBLE_ALGORITHM_CATEGORY;
76  }
77 };
78 
79 class IntegerProperty;
80 static const std::string INTEGER_ALGORITHM_CATEGORY = "Measure";
81 
82 /**
83  * @ingroup Plugins
84  * @brief The integer algorithm takes a graph as input and output its results as a tlp::IntegerProperty
85  */
86 class TLP_SCOPE IntegerAlgorithm : public TemplateAlgorithm<tlp::IntegerProperty> {
87 protected:
89 public:
90  virtual std::string category() const {
91  return INTEGER_ALGORITHM_CATEGORY;
92  }
93 };
94 
95 class LayoutProperty;
96 static const std::string LAYOUT_ALGORITHM_CATEGORY = "Layout";
97 
98 /**
99  * @ingroup Plugins
100  * @brief The layout algorithm takes a graph as input and output its results as a tlp::LayoutProperty
101  */
102 class TLP_SCOPE LayoutAlgorithm : public TemplateAlgorithm<tlp::LayoutProperty> {
103 protected:
104  ///
106 public:
107  virtual std::string category() const {
108  return LAYOUT_ALGORITHM_CATEGORY;
109  }
110 };
111 
112 class SizeProperty;
113 static const std::string SIZE_ALGORITHM_CATEGORY = "Resizing";
114 
115 /**
116  * @ingroup Plugins
117  * @brief The size algorithm takes a graph as input and output its results as a tlp::SizeProperty
118  */
119 class TLP_SCOPE SizeAlgorithm : public TemplateAlgorithm<tlp::SizeProperty> {
120 protected:
122 public:
123  virtual std::string category() const {
124  return SIZE_ALGORITHM_CATEGORY;
125  }
126 };
127 
128 class StringProperty;
129 static const std::string STRING_ALGORITHM_CATEGORY = "Labeling";
130 
131 /**
132  * @ingroup Plugins
133  * @brief The string algorithm takes a graph as input and output its results as a tlp::StringProperty
134  */
135 class TLP_SCOPE StringAlgorithm : public TemplateAlgorithm<tlp::StringProperty> {
136 protected:
137  ///
139 public:
140  virtual std::string category() const {
141  return STRING_ALGORITHM_CATEGORY;
142  }
143 };
144 }
145 
146 #endif // PROPERTYALGORITHM_H
The TemplateAlgorithm class describes a plugin that can operate on a single graph&#39;s property...
virtual std::string category() const
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.
virtual std::string category() const
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.
A graph property that maps a std::string value to graph elements.
A graph property that maps a tlp::Size value to graph elements.
Definition: SizeProperty.h:38
virtual std::string category() const
A string identifier for a plugin used for categorization purposes.
A graph property that maps a double value to graph elements.
Contains runtime parameters for a plugin.
Definition: PluginContext.h:39
The string algorithm takes a graph as input and output its results as a tlp::StringProperty.
The double algorithm takes a graph as input and output its results as a tlp::DoubleProperty.
The layout algorithm takes a graph as input and output its results as a tlp::LayoutProperty.
virtual std::string category() const
A string identifier for a plugin used for categorization purposes.
virtual std::string category() const
A string identifier for a plugin used for categorization purposes.
virtual std::string category() const
A string identifier for a plugin used for categorization purposes.
virtual std::string category() const
A string identifier for a plugin used for categorization purposes.
A graph property that maps a tlp::Color value to graph elements.
Definition: ColorProperty.h:36
A graph property that maps an integer value to graph elements.
The size algorithm takes a graph as input and output its results as a tlp::SizeProperty.
A graph property that maps a tlp::Coord value to graph nodes and std::vector<tlp::Coord> for edges...
The boolean algorithm takes a graph as input and output its results as a tlp::BooleanProperty.