Detailed Description
Inherit from this class for those objects capable of being observed by a CObserver class.
The only thing to do in your child class is to call CObservable::publishEvent() whenever needed and all the observer classes will be notified.
- Note:
- The pairs CObservable / CObserver automatically notify each other the destruction of any of them, effectively ending the subscription of events.
- See also:
- CObserver, mrptEvent
Definition at line 49 of file CObservable.h.
#include <mrpt/utils/CObservable.h>
List of all members.
Constructor & Destructor Documentation
mrpt::utils::CObservable::CObservable |
( |
|
) |
|
virtual mrpt::utils::CObservable::~CObservable |
( |
|
) |
[virtual] |
Member Function Documentation
void mrpt::utils::CObservable::internal_observer_begin |
( |
CObserver * |
|
) |
[private] |
void mrpt::utils::CObservable::internal_observer_end |
( |
CObserver * |
|
) |
[private] |
void mrpt::utils::CObservable::publishEvent |
( |
const mrptEvent & |
e |
) |
const [protected] |
Called when you want this object to emit an event to all the observers currently subscribed to this object.
Friends And Related Function Documentation
Member Data Documentation