OpenIndy-Core  0.2.0.43
plugin.h
Go to the documentation of this file.
1 #ifndef PLUGIN_H
2 #define PLUGIN_H
3 
4 #include <QPointer>
5 #include <QList>
6 
7 #include "function.h"
8 #include "sensor.h"
9 #include "simulationmodel.h"
10 #include "networkadjustment.h"
11 #include "tool.h"
12 #include "exchangesimpleascii.h"
13 #include "exchangedefinedformat.h"
14 
15 namespace oi{
16 
20 class Plugin
21 {
22 
23 public:
24  virtual ~Plugin(){}
25 
26  //##########################################################
27  //create instances of all available plugin types in a plugin
28  //##########################################################
29 
30  virtual QList<QPointer<Sensor> > createSensors() = 0;
31  virtual QList<QPointer<Function> > createFunctions() = 0;
32  virtual QList<QPointer<NetworkAdjustment> > createNetworkAdjustments() = 0;
33  virtual QList<QPointer<SimulationModel> > createSimulations() = 0;
34  virtual QList<QPointer<Tool> > createTools() = 0;
35  virtual QList<QPointer<ExchangeSimpleAscii> > createSimpleAsciiExchanges() = 0;
36  virtual QList<QPointer<ExchangeDefinedFormat> > createDefinedFormatExchanges() = 0;
37 
38  //###################################################
39  //create instances of a plugin type with a given name
40  //###################################################
41 
42  virtual QPointer<Sensor> createSensor(const QString &name) = 0;
43  virtual QPointer<Function> createFunction(const QString &name) = 0;
44  virtual QPointer<NetworkAdjustment> createNetworkAdjustment(const QString &name) = 0;
45  virtual QPointer<SimulationModel> createSimulation(const QString &name) = 0;
46  virtual QPointer<Tool> createTool(const QString &name) = 0;
47  virtual QPointer<ExchangeSimpleAscii> createSimpleAsciiExchange(const QString &name) = 0;
48  virtual QPointer<ExchangeDefinedFormat> createDefinedFormatExchange(const QString &name) = 0;
49 
50 };
51 
52 }
53 
54 #ifndef STR
55 #define STR(x) #x
56 #endif
57 #ifndef STR2
58 #define STR2(x) STR(x)
59 #endif
60 
61 #ifndef CONCAT
62 #define CONCAT(a, b) a ## b
63 #endif
64 #ifndef CONCAT2
65 #define CONCAT2(a, b) CONCAT(a, b)
66 #endif
67 
68 #define PLUGIN_PREFIX de.openIndy.plugin.v
69 #define Plugin_iidd STR2(CONCAT2(PLUGIN_PREFIX, PLUGIN_INTERFACE_VERSION))
70 
71 using namespace oi;
72 Q_DECLARE_INTERFACE(Plugin, Plugin_iidd)
73 
74 #endif // PLUGIN_H
virtual QPointer< Tool > createTool(const QString &name)=0
virtual QList< QPointer< Sensor > > createSensors()=0
Definition: coordinatesystem.h:15
virtual ~Plugin()
Definition: plugin.h:24
virtual QList< QPointer< NetworkAdjustment > > createNetworkAdjustments()=0
virtual QList< QPointer< SimulationModel > > createSimulations()=0
virtual QPointer< ExchangeDefinedFormat > createDefinedFormatExchange(const QString &name)=0
virtual QPointer< SimulationModel > createSimulation(const QString &name)=0
virtual QPointer< Sensor > createSensor(const QString &name)=0
#define Plugin_iidd
Definition: plugin.h:69
virtual QPointer< ExchangeSimpleAscii > createSimpleAsciiExchange(const QString &name)=0
virtual QList< QPointer< Function > > createFunctions()=0
virtual QPointer< NetworkAdjustment > createNetworkAdjustment(const QString &name)=0
virtual QPointer< Function > createFunction(const QString &name)=0
virtual QList< QPointer< ExchangeDefinedFormat > > createDefinedFormatExchanges()=0
virtual QList< QPointer< Tool > > createTools()=0
virtual QList< QPointer< ExchangeSimpleAscii > > createSimpleAsciiExchanges()=0
The Plugin class.
Definition: plugin.h:20