Ditto 3.0.3-alpha2
Observer.hpp
1#ifndef _DITTO_OBSERVER_
2#define _DITTO_OBSERVER_
3
4namespace ditto {
5
11class Observer {
12private:
17 bool stopped;
21 virtual void on_stop() = 0;
22
23protected:
27 Observer();
32 ~Observer();
33
34public:
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