Tulip  5.2.0
Large graphs analysis and drawing
PropertyAlgorithm.h
1 /*
2  *
3  * This file is part of Tulip (http://tulip.labri.fr)
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
35  * tlp::BooleanProperty
36  */
37 class TLP_SCOPE BooleanAlgorithm : public TemplateAlgorithm<tlp::BooleanProperty> {
38 protected:
40 
41 public:
42  std::string category() const override {
43  return BOOLEAN_ALGORITHM_CATEGORY;
44  }
45 };
46 
47 class ColorProperty;
48 static const std::string COLOR_ALGORITHM_CATEGORY = "Coloring";
49 
50 /**
51  * @ingroup Plugins
52  * @brief The color algorithm takes a graph as input and output its results as a tlp::ColorProperty
53  */
54 class TLP_SCOPE ColorAlgorithm : public TemplateAlgorithm<tlp::ColorProperty> {
55 protected:
57 
58 public:
59  std::string category() const override {
60  return COLOR_ALGORITHM_CATEGORY;
61  }
62 };
63 
64 class DoubleProperty;
65 static const std::string DOUBLE_ALGORITHM_CATEGORY = "Measure";
66 
67 /**
68  * @ingroup Plugins
69  * @brief The double algorithm takes a graph as input and output its results as a
70  * tlp::DoubleProperty
71  */
72 class TLP_SCOPE DoubleAlgorithm : public TemplateAlgorithm<tlp::DoubleProperty> {
73 protected:
74  ///
76 
77 public:
78  std::string category() const override {
79  return DOUBLE_ALGORITHM_CATEGORY;
80  }
81 };
82 
83 class IntegerProperty;
84 static const std::string INTEGER_ALGORITHM_CATEGORY = "Measure";
85 
86 /**
87  * @ingroup Plugins
88  * @brief The integer algorithm takes a graph as input and output its results as a
89  * tlp::IntegerProperty
90  */
91 class TLP_SCOPE IntegerAlgorithm : public TemplateAlgorithm<tlp::IntegerProperty> {
92 protected:
94 
95 public:
96  std::string category() const override {
97  return INTEGER_ALGORITHM_CATEGORY;
98  }
99 };
100 
101 class LayoutProperty;
102 static const std::string LAYOUT_ALGORITHM_CATEGORY = "Layout";
103 
104 /**
105  * @ingroup Plugins
106  * @brief The layout algorithm takes a graph as input and output its results as a
107  * tlp::LayoutProperty
108  */
109 class TLP_SCOPE LayoutAlgorithm : public TemplateAlgorithm<tlp::LayoutProperty> {
110 protected:
111  ///
113 
114 public:
115  std::string category() const override {
116  return LAYOUT_ALGORITHM_CATEGORY;
117  }
118 };
119 
120 class SizeProperty;
121 static const std::string SIZE_ALGORITHM_CATEGORY = "Resizing";
122 
123 /**
124  * @ingroup Plugins
125  * @brief The size algorithm takes a graph as input and output its results as a tlp::SizeProperty
126  */
127 class TLP_SCOPE SizeAlgorithm : public TemplateAlgorithm<tlp::SizeProperty> {
128 protected:
130 
131 public:
132  std::string category() const override {
133  return SIZE_ALGORITHM_CATEGORY;
134  }
135 };
136 
137 class StringProperty;
138 static const std::string STRING_ALGORITHM_CATEGORY = "Labeling";
139 
140 /**
141  * @ingroup Plugins
142  * @brief The string algorithm takes a graph as input and output its results as a
143  * tlp::StringProperty
144  */
145 class TLP_SCOPE StringAlgorithm : public TemplateAlgorithm<tlp::StringProperty> {
146 protected:
147  ///
149 
150 public:
151  std::string category() const override {
152  return STRING_ALGORITHM_CATEGORY;
153  }
154 };
155 }
156 
157 #endif // PROPERTYALGORITHM_H
The TemplateAlgorithm class describes a plugin that can operate on a single graph&#39;s property...
std::string category() const override
A string identifier for a plugin used for categorization purposes.
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.
std::string category() const override
A string identifier for a plugin used for categorization purposes.
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.
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
std::string category() const override
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:42
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.
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.
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.