current revision
This commit is contained in:
@@ -33,11 +33,19 @@ public:
|
||||
/** stop this sensor */
|
||||
virtual void stop() = 0;
|
||||
|
||||
/** whether the sensor is currently start()ed */
|
||||
virtual bool isRunning() const = 0;
|
||||
|
||||
/** add the given listener to the sensor */
|
||||
void addListener(SensorListener<T>* l) {
|
||||
listeners.push_back(l);
|
||||
}
|
||||
|
||||
/** remove the given listener from the sensor */
|
||||
void removeListener(SensorListener<T>* l) {
|
||||
listeners.erase(std::remove(listeners.begin(), listeners.end(), l), listeners.end());
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
/** inform all attached listeners */
|
||||
|
||||
Reference in New Issue
Block a user