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);
58 TLP_SCOPE std::string
getMinor(
const std::string &release);
87 virtual std::string icon()
const;
93 virtual std::string category()
const=0;
101 virtual std::string name()
const=0;
109 virtual std::string group()
const=0;
115 virtual std::string author()
const=0;
122 virtual std::string date()
const=0;
130 virtual std::string info()
const=0;
137 virtual std::string release()
const=0;
145 virtual std::string tulipRelease()
const=0;
153 virtual std::string major()
const;
161 virtual std::string minor()
const;
166 virtual std::string tulipMajor()
const;
171 virtual std::string tulipMinor()
const;
179 virtual int id()
const;
181 virtual std::string programmingLanguage()
const;
203 #define PLUGININFORMATION(NAME, AUTHOR, DATE, INFO, RELEASE, GROUP)\
204 std::string name() const { return NAME; } \
205 std::string author() const { return AUTHOR; }\
206 std::string date() const { return DATE; } \
207 std::string info() const { return INFO; } \
208 std::string release() const { return RELEASE; }\
209 std::string tulipRelease() const { return TULIP_MM_VERSION; }\
210 std::string group() const { return GROUP; }
212 #define PLUGININFORMATIONS(NAME, AUTHOR, DATE, INFO, RELEASE, GROUP)\
213 PLUGININFORMATION(NAME, AUTHOR, DATE, INFO, RELEASE, GROUP)
217 #include <tulip/PluginLister.h>
242 class C##Factory : public tlp::FactoryInterface { \
245 tlp::PluginLister::registerPlugin(this); \
248 tlp::Plugin* createPluginObject(tlp::PluginContext* context) { \
249 C* tmp = new C(context); \
255 C##Factory C##FactoryInitializer; \
261 #endif //TULIP_PLUGIN_H
Describes the dependencies of a plug-in on other plug-ins, identified by their name and their version...
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...
This class describes parameters on a plug-in.