Go to the documentation of this file.
26 while (!m_subscribers.empty()) (*m_subscribers.begin())->observeEnd(*
this);
31 m_subscribers.insert(o);
37 auto it = m_subscribers.find(o);
39 it != m_subscribers.end(),
40 "Ending subscription from an observer not subscribed to this object!");
41 m_subscribers.erase(it);
51 for (
auto&
s : m_subscribers)
52 if (
s)
s->internal_on_event(e);
The basic event type for the observer-observable pattern in MRPT.
void publishEvent(const mrptEvent &e) const
Called when you want this object to emit an event to all the observers currently subscribed to this o...
void internal_observer_begin(CObserver *)
An event sent by any CObservable object (automatically) just before being destroyed and telling its o...
void internal_observer_end(CObserver *)
#define ASSERTMSG_(f, __ERROR_MSG)
Defines an assertion mechanism.
Inherit from this class to get notified about events from any CObservable object after subscribing to...
This namespace provides a OS-independent interface to many useful functions: filenames manipulation,...
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |