Tulip  4.0.0
Better Visualization Through Research
 All Classes Files Functions Variables Enumerations Enumerator Properties Groups Pages
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 1 and Inria Bordeaux - Sud Ouest
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 = QObject::trUtf8("Filtering").toStdString();
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  virtual std::string category() const {
40  return BOOLEAN_ALGORITHM_CATEGORY;
41  }
42 };
43 
44 class ColorProperty;
45 static const std::string COLOR_ALGORITHM_CATEGORY = QObject::trUtf8("Coloring").toStdString();
46 
47 /**
48  * @ingroup Plugins
49  * @brief The color algorithm takes a graph as input and output its results as a tlp::ColorProperty
50  */
51 class TLP_SCOPE ColorAlgorithm : public TemplateAlgorithm<tlp::ColorProperty> {
52 protected:
54  virtual std::string category() const {
55  return COLOR_ALGORITHM_CATEGORY;
56  }
57 };
58 
59 class DoubleProperty;
60 static const std::string DOUBLE_ALGORITHM_CATEGORY = QObject::trUtf8("Metric").toStdString();
61 
62 /**
63  * @ingroup Plugins
64  * @brief The double algorithm takes a graph as input and output its results as a tlp::DoubleProperty
65  */
66 class TLP_SCOPE DoubleAlgorithm : public TemplateAlgorithm<tlp::DoubleProperty> {
67 protected:
68  ///
70  virtual std::string category() const {
71  return DOUBLE_ALGORITHM_CATEGORY;
72  }
73 };
74 
75 class IntegerProperty;
76 static const std::string INTEGER_ALGORITHM_CATEGORY = QObject::trUtf8("Metric").toStdString();
77 
78 /**
79  * @ingroup Plugins
80  * @brief The integer algorithm takes a graph as input and output its results as a tlp::IntegerProperty
81  */
82 class TLP_SCOPE IntegerAlgorithm : public TemplateAlgorithm<tlp::IntegerProperty> {
83 protected:
85  virtual std::string category() const {
86  return INTEGER_ALGORITHM_CATEGORY;
87  }
88 };
89 
90 class LayoutProperty;
91 static const std::string LAYOUT_ALGORITHM_CATEGORY = QObject::trUtf8("Layout").toStdString();
92 
93 /**
94  * @ingroup Plugins
95  * @brief The layout algorithm takes a graph as input and output its results as a tlp::LayoutProperty
96  */
97 class TLP_SCOPE LayoutAlgorithm : public TemplateAlgorithm<tlp::LayoutProperty> {
98 protected:
99  ///
101  virtual std::string category() const {
102  return LAYOUT_ALGORITHM_CATEGORY;
103  }
104 };
105 
106 class SizeProperty;
107 static const std::string SIZE_ALGORITHM_CATEGORY = QObject::trUtf8("Resizing").toStdString();
108 
109 /**
110  * @ingroup Plugins
111  * @brief The size algorithm takes a graph as input and output its results as a tlp::SizeProperty
112  */
113 class TLP_SCOPE SizeAlgorithm : public TemplateAlgorithm<tlp::SizeProperty> {
114 protected:
116  virtual std::string category() const {
117  return SIZE_ALGORITHM_CATEGORY;
118  }
119 };
120 
121 class StringProperty;
122 static const std::string STRING_ALGORITHM_CATEGORY = QObject::trUtf8("Labeling").toStdString();
123 
124 /**
125  * @ingroup Plugins
126  * @brief The string algorithm takes a graph as input and output its results as a tlp::StringProperty
127  */
128 class TLP_SCOPE StringAlgorithm : public TemplateAlgorithm<tlp::StringProperty> {
129 protected:
130  ///
132  virtual std::string category() const {
133  return STRING_ALGORITHM_CATEGORY;
134  }
135 };
136 }
137 
138 #endif // PROPERTYALGORITHM_H