Tulip  5.6.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 } // namespace tlp
156 
157 #endif // PROPERTYALGORITHM_H
tlp::StringAlgorithm
The string algorithm takes a graph as input and output its results as a tlp::StringProperty.
Definition: PropertyAlgorithm.h:145
tlp::IntegerAlgorithm
The integer algorithm takes a graph as input and output its results as a tlp::IntegerProperty.
Definition: PropertyAlgorithm.h:91
tlp::SizeAlgorithm
The size algorithm takes a graph as input and output its results as a tlp::SizeProperty.
Definition: PropertyAlgorithm.h:127
tlp::PluginContext
Contains runtime parameters for a plugin.
Definition: PluginContext.h:42
tlp::DoubleAlgorithm
The double algorithm takes a graph as input and output its results as a tlp::DoubleProperty.
Definition: PropertyAlgorithm.h:72
tlp::LayoutAlgorithm::category
std::string category() const override
A string identifier for a plugin used for categorization purposes.
Definition: PropertyAlgorithm.h:115
tlp::IntegerAlgorithm::category
std::string category() const override
A string identifier for a plugin used for categorization purposes.
Definition: PropertyAlgorithm.h:96
tlp::SizeAlgorithm::category
std::string category() const override
A string identifier for a plugin used for categorization purposes.
Definition: PropertyAlgorithm.h:132
tlp::ColorAlgorithm::category
std::string category() const override
A string identifier for a plugin used for categorization purposes.
Definition: PropertyAlgorithm.h:59
tlp::BooleanAlgorithm
The boolean algorithm takes a graph as input and output its results as a tlp::BooleanProperty.
Definition: PropertyAlgorithm.h:37
tlp::DoubleAlgorithm::category
std::string category() const override
A string identifier for a plugin used for categorization purposes.
Definition: PropertyAlgorithm.h:78
tlp::TemplateAlgorithm
The TemplateAlgorithm class describes a plugin that can operate on a single graph's property.
Definition: TemplateAlgorithm.h:68
tlp::LayoutAlgorithm
The layout algorithm takes a graph as input and output its results as a tlp::LayoutProperty.
Definition: PropertyAlgorithm.h:109
tlp
Definition: AbstractProperty.h:34
tlp::BooleanAlgorithm::category
std::string category() const override
A string identifier for a plugin used for categorization purposes.
Definition: PropertyAlgorithm.h:42
tlp::ColorAlgorithm
The color algorithm takes a graph as input and output its results as a tlp::ColorProperty.
Definition: PropertyAlgorithm.h:54
tlp::StringAlgorithm::category
std::string category() const override
A string identifier for a plugin used for categorization purposes.
Definition: PropertyAlgorithm.h:151