21#ifndef _EXPORTMODULE_H
22#define _EXPORTMODULE_H
25#include <tulip/Plugin.h>
26#include <tulip/Algorithm.h>
30static const std::string EXPORT_CATEGORY =
"Export";
40class ExportModule :
public tlp::Plugin {
45 std::list<std::string> extensions;
48 ExportModule(
const tlp::PluginContext *context, std::list<std::string> exts = {})
50 if (context !=
nullptr) {
51 const tlp::AlgorithmContext *algoritmContext =
52 static_cast<const tlp::AlgorithmContext *
>(context);
53 graph = algoritmContext->
graph;
55 dataSet = algoritmContext->
dataSet;
59 ~ExportModule()
override {}
61 std::string category()
const override {
62 return EXPORT_CATEGORY;
65 std::string icon()
const override {
66 return ":/tulip/gui/icons/64/document-export.png";
75 std::list<std::string> fileExtensions()
const {
89 PluginProgress *pluginProgress;
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.
A container that can store data from any type.
PluginProcess subclasses are meant to notify about the progress state of some process (typically a pl...
bool exportGraph(Graph *graph, std::ostream &outputStream, const std::string &format, DataSet &dataSet, PluginProgress *progress=nullptr)
Exports a graph using the specified export plugin with parameters stored in the DataSet.