25 #include <tulip/Plugin.h> 
   26 #include <tulip/PluginContext.h> 
   30 static const std::string ALGORITHM_CATEGORY = 
"Algorithm";
 
   57     if (context != 
nullptr) {
 
   66   std::string 
icon()
 const override {
 
   67     return ":/tulip/gui/icons/32/plugin_algorithm.png";
 
   78   virtual bool run() = 0;
 
   81     return ALGORITHM_CATEGORY;
 
   91   virtual bool check(std::string &) {
 
Parameters structure for a tlp::Algorithm.
 
PluginProgress * pluginProgress
A progress handler to notify the user about the progress state of the algorithm when run.
 
DataSet * dataSet
Input parameters set by the user when running the plugin.
 
Graph * graph
The pointer to the tlp::Graph on which the algorithm will be run.
 
This abstract class describes a basic algorithm plugin.
 
Graph * graph
The graph this algorithm will be run on. Retrieved from the context at construction.
 
virtual bool check(std::string &)
Checks whether the algorithm can be applied on this graph or not. If not, the reason why should be re...
 
DataSet * dataSet
A DataSet containing parameters for this algorithm, if any. Retrieved from the context at constructio...
 
std::string category() const override
A string identifier for a plugin used for categorization purposes.
 
std::string icon() const override
The icon (preferably a thumbnail) of the plugin.
 
PluginProgress * pluginProgress
A PluginProgress to give feedback to the user, retrieved from the context. It can be a nullptr pointe...
 
Algorithm(const PluginContext *context)
Constructs an algorithm and initializes members from the AlgorithmContext.
 
virtual bool run()=0
Runs the algorithm. It is a good practice to report progress through the PluginProgress,...
 
A container that can store data from any type.
 
Contains runtime parameters for a plugin.
 
Top-level interface for plug-ins.
 
PluginProcess subclasses are meant to notify about the progress state of some process (typically a pl...