Ditto 4.5.3
Loading...
Searching...
No Matches
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
43 bool is_stopped();
44};
45
46} // namespace ditto
47
48#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
bool is_stopped()
Returns true is the Observer was stopped.
Definition Observer.cpp:17
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