MNE-CPP  beta 1.0
ISensor.h
Go to the documentation of this file.
1 //=============================================================================================================
36 #ifndef ISENSOR_H
37 #define ISENSOR_H
38 
39 
40 //*************************************************************************************************************
41 //=============================================================================================================
42 // INCLUDES
43 //=============================================================================================================
44 
45 #include "IPlugin.h"
46 
47 
48 //*************************************************************************************************************
49 //=============================================================================================================
50 // DEFINE NAMESPACE MNEX
51 //=============================================================================================================
52 
53 namespace MNEX
54 {
55 
56 
57 //=============================================================================================================
63 class ISensor : public IPlugin
64 {
65 //ToDo virtual methods of IMeasurementSource
66 public:
67 
68  //=========================================================================================================
72  virtual ~ISensor() {};
73 
74  //=========================================================================================================
78  virtual QSharedPointer<IPlugin> clone() const = 0;
79 
80  //=========================================================================================================
84  virtual void init() = 0;
85 
86  //=========================================================================================================
90  virtual void unload() = 0;
91 
92  //=========================================================================================================
99  virtual bool start() = 0;
100 
101  //=========================================================================================================
108  virtual bool stop() = 0;
109 
110  //=========================================================================================================
117  virtual PluginType getType() const = 0;
118 
119  //=========================================================================================================
126  virtual QString getName() const = 0;
127 
128  //=========================================================================================================
134  virtual inline bool multiInstanceAllowed() const;
135 
136  //=========================================================================================================
143  virtual QWidget* setupWidget() = 0;
144 
145 protected:
146 
147  //=========================================================================================================
153  virtual void run() = 0;
154 };
155 
156 //*************************************************************************************************************
157 //=============================================================================================================
158 // INLINE DEFINITIONS
159 //=============================================================================================================
160 
161 inline bool ISensor::multiInstanceAllowed() const
162 {
163  return false;
164 }
165 
166 } //NAMESPACE
167 
168 Q_DECLARE_INTERFACE(MNEX::ISensor, "mne_x/1.0")
169 
170 #endif // ISENSOR_H
virtual bool stop()=0
Contains declaration of IPlugin interface class.
virtual void run()=0
The IPlugin class is the base interface class of all plugins.
Definition: IPlugin.h:92
virtual PluginType getType() const =0
virtual QWidget * setupWidget()=0
The ISensor class provides an interface for a sensor plugin.
Definition: ISensor.h:63
virtual ~ISensor()
Definition: ISensor.h:72
virtual void unload()=0
virtual bool multiInstanceAllowed() const
Definition: ISensor.h:161
virtual bool start()=0
Definition: arrow.h:75
virtual QString getName() const =0
virtual QSharedPointer< IPlugin > clone() const =0
virtual void init()=0