The basic event type for the observer-observable pattern in MRPT.
You can sub-class this base class to create custom event types, then tell between them in runtime with isOfType<T>(), for example:
if (e.isOfType<mrptEventOnDestroy>()) { const mrptEventOnDestroy* ev = e.getAs<mrptEventOnDestroy>(); ev-> ... }
Definition at line 53 of file mrptEvent.h.
#include <mrpt/utils/mrptEvent.h>
Public Member Functions | |
mrptEvent () | |
Default ctor. | |
template<class EVENTTYPE > | |
bool | isOfType () const |
template<class EVENTTYPE > | |
const EVENTTYPE * | getAs () const |
Public Attributes | |
mrpt::system::TTimeStamp | timestamp |
Protected Member Functions | |
virtual void | do_nothing () |
Just to allow this class to be polymorphic. |
mrpt::utils::mrptEvent::mrptEvent | ( | ) | [inline] |
Default ctor.
Definition at line 59 of file mrptEvent.h.
virtual void mrpt::utils::mrptEvent::do_nothing | ( | ) | [inline, protected, virtual] |
Just to allow this class to be polymorphic.
Reimplemented in mrpt::utils::mrptEventOnDestroy, mrpt::gui::mrptEventWindowChar, mrpt::gui::mrptEventWindowResize, mrpt::gui::mrptEventMouseDown, mrpt::slam::mrptEventMetricMapClear, and mrpt::slam::mrptEventMetricMapInsert.
Definition at line 56 of file mrptEvent.h.
const EVENTTYPE* mrpt::utils::mrptEvent::getAs | ( | ) | const [inline] |
Definition at line 65 of file mrptEvent.h.
bool mrpt::utils::mrptEvent::isOfType | ( | ) | const [inline] |
Definition at line 62 of file mrptEvent.h.
Definition at line 67 of file mrptEvent.h.
Page generated by Doxygen 1.7.1 for MRPT 0.9.4 SVN: at Mon Jan 10 23:33:19 UTC 2011 |