25#include <tulip/WithParameter.h>
26#include <tulip/WithDependency.h>
27#include <tulip/PluginContext.h>
28#include <tulip/TulipRelease.h>
48TLP_SCOPE std::string
getMajor(
const std::string &release);
59TLP_SCOPE std::string
getMinor(
const std::string &release);
85class TLP_SCOPE
Plugin :
public tlp::WithParameter,
public tlp::WithDependency {
93 virtual std::string
icon()
const;
107 virtual std::string
name()
const = 0;
115 virtual std::string
group()
const = 0;
128 virtual std::string
date()
const = 0;
137 virtual std::string
info()
const = 0;
186 virtual int id()
const;
204 return !oldName.empty() ? oldName : std::string();
233#define PLUGININFORMATION(NAME, AUTHOR, DATE, INFO, RELEASE, GROUP) \
234 std::string name() const override { \
237 std::string author() const override { \
240 std::string date() const override { \
243 std::string info() const override { \
246 std::string release() const override { \
249 std::string tulipRelease() const override { \
250 return TULIP_VERSION; \
252 std::string group() const override { \
265class TLP_SCOPE PluginFactory {
268 static void registerFactory(PluginFactory *);
297 class C##Factory : public tlp::PluginFactory { \
300 registerFactory(this); \
303 tlp::Plugin *createPluginObject(tlp::PluginContext *context) { \
304 C *tmp = new C(context); \
310 C##Factory C##FactoryInitializer; \
Contains runtime parameters for a plugin.
Top-level interface for plug-ins.
virtual std::string major() const
Only the major of the plug-in version. A version should be X.Y, X being the major.
virtual std::string name() const =0
Returns the name of the plug-in, as registered in the Tulip plug-in system. This name must be unique,...
virtual std::string tulipRelease() const =0
The version of Tulip this plug-in was built with. Tulip versions are X.Y.Z, X being the major,...
virtual std::string tulipMajor() const
virtual int id() const
Returns the ID of the glyph this factory builds. @TODO this member should be removed once there is a ...
virtual std::string group() const =0
Returns the name of the group this plug-in belongs to. Groups and sub-groups are separated by two col...
virtual std::string release() const =0
The release version of the plug-in, including major and minor. The version should be X....
virtual std::string info() const =0
Information about the plug-in, from the plug-in author. This information can contains anything,...
virtual std::string icon() const
The icon (preferably a thumbnail) of the plugin.
void declareDeprecatedName(const std::string &oldName)
Allow to declare the previous name of a plugin as deprecated in order to keep an ascending compatibil...
virtual std::string date() const =0
The creation date of the plug-in. This date is in a free format, but most Tulip plug-ins use a DD/MM/...
virtual std::string minor() const
Only the minor of the plug-in version. A version should be X.Y, Y being the major.
virtual std::string programmingLanguage() const
virtual std::string tulipMinor() const
virtual std::string category() const =0
A string identifier for a plugin used for categorization purposes.
std::string deprecatedName()
virtual std::string author() const =0
The name of the author of this plug-in.
std::string getMajor(const std::string &release)
Splits the string and returns everything before the first dot ('.'). This is used to return major ver...
std::string getMinor(const std::string &release)
Splits the string and return the minor version. If the string does not contain any dot,...