Ditto  3.0.4
Observer.hpp
1 #ifndef _DITTO_OBSERVER_
2 #define _DITTO_OBSERVER_
3 
4 namespace ditto {
5 
11 class Observer {
12 private:
17  bool stopped;
21  virtual void on_stop() = 0;
22 
23 protected:
27  Observer();
32  ~Observer();
33 
34 public:
38  void stop();
39 };
40 
41 } // namespace ditto
42 
43 #endif
An observation token returned by any observation API in the Ditto SDK. Retain this object to continue...
Definition: Observer.hpp:11
void stop()
Stops the observation and cleans up all associated resources.
Definition: Observer.cpp:10
Observer()
Constructs a new Observer.
Definition: Observer.cpp:4
~Observer()
Destroy the Abstract Observer object canceling the observer if it hasn't been done in stop
Definition: Observer.cpp:8