40 template <
class EVENTTYPE>
43 return dynamic_cast<const EVENTTYPE*
>(
this) !=
nullptr;
46 template <
class EVENTTYPE>
47 inline const EVENTTYPE*
getAs()
const 49 return dynamic_cast<const EVENTTYPE*
>(
this);
52 template <
class EVENTTYPE>
55 return const_cast<EVENTTYPE*
>(
dynamic_cast<const EVENTTYPE*
>(
this));
Clock that is compatible with MRPT TTimeStamp representation.
std::chrono::time_point< Clock > time_point
The basic event type for the observer-observable pattern in MRPT.
void do_nothing() override
Just to allow this class to be polymorphic.
mrpt::system::TTimeStamp now()
A shortcut for system::getCurrentTime.
EVENTTYPE * getAsNonConst() const
virtual void do_nothing()
Just to allow this class to be polymorphic.
mrpt::Clock::time_point timestamp
An event sent by any CObservable object (automatically) just before being destroyed and telling its o...
const EVENTTYPE * getAs() const
Inherit from this class for those objects capable of being observed by a CObserver class...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
const CObservable * source_object
mrptEventOnDestroy(const CObservable *obj)