#include <UEvent.h>
Public Member Functions | |
virtual std::string | getClassName () const =0 |
int | getCode () const |
virtual | ~UEvent () |
Protected Member Functions | |
UEvent (int code=0) | |
Private Attributes | |
int | code_ |
This is the base class for all events used with the UEventsManager. Inherited classes must redefined the virtual method getClassName() to return their class name.
Example:
class MyEvent : public UEvent { public: MyEvent() {} virtual ~MyEvent() {} std::string getClassName() const {return "MyEvent";} }; int main(int argc, char * argv[]) { ... UEventsManager::post(new MyEvent()); // UEventsManager take ownership of the event (deleted by UEventsManager). ... }
virtual UEvent::~UEvent | ( | ) | [inline, virtual] |
UEvent::UEvent | ( | int | code = 0 | ) | [inline, protected] |
virtual std::string UEvent::getClassName | ( | ) | const [pure virtual] |
This method is used to get the class name of the event. For example, if a class MouseEvent inherits from UEvent, it must return the "MouseEvent" string.
Implemented in PostRenderEvent, rtabmap::RtabmapGoalStatusEvent, rtabmap::RtabmapLabelErrorEvent, rtabmap::RtabmapGlobalPathEvent, rtabmap::RtabmapEvent3DMap, rtabmap::RtabmapEventInit, ULogEvent, rtabmap::RtabmapEventCmd, rtabmap::OdometryResetEvent, rtabmap::OdometryEvent, rtabmap::CameraEvent, rtabmap::CameraTangoEvent, rtabmap::RtabmapEvent, rtabmap::ParamEvent, rtabmap::UserDataEvent, rtabmap::PoseEvent, and UObjDeletedEvent.
int UEvent::getCode | ( | ) | const [inline] |
int UEvent::code_ [private] |