20 #ifndef TULIP_PLUGIN_H 21 #define TULIP_PLUGIN_H 25 #include <tulip/WithParameter.h> 26 #include <tulip/WithDependency.h> 27 #include <tulip/PluginContext.h> 28 #include <tulip/TulipRelease.h> 48 TLP_SCOPE std::string
getMajor(
const std::string &release);
59 TLP_SCOPE std::string
getMinor(
const std::string &release);
85 class TLP_SCOPE
Plugin :
public tlp::WithParameter,
public tlp::WithDependency {
93 virtual std::string icon()
const;
99 virtual std::string category()
const = 0;
107 virtual std::string name()
const = 0;
115 virtual std::string group()
const = 0;
121 virtual std::string author()
const = 0;
128 virtual std::string date()
const = 0;
137 virtual std::string info()
const = 0;
144 virtual std::string release()
const = 0;
152 virtual std::string tulipRelease()
const = 0;
160 virtual std::string major()
const;
168 virtual std::string minor()
const;
173 virtual std::string tulipMajor()
const;
178 virtual std::string tulipMinor()
const;
186 virtual int id()
const;
192 virtual std::string programmingLanguage()
const;
198 void declareDeprecatedName(
const std::string &oldName);
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 { \ 259 #include <tulip/PluginLister.h> 286 class C##Factory : public tlp::FactoryInterface { \ 289 tlp::PluginLister::registerPlugin(this); \ 292 tlp::Plugin *createPluginObject(tlp::PluginContext *context) { \ 293 C *tmp = new C(context); \ 299 C##Factory C##FactoryInitializer; \ 303 #endif // TULIP_PLUGIN_H
std::string deprecatedName()
std::string getMinor(const std::string &release)
Splits the string and return the minor version. If the string does not contain any dot...
Top-level interface for plug-ins.
std::string getMajor(const std::string &release)
Splits the string and returns everything befor the first dot ('.'). This is used to return major vers...