RTAB-Map 0.23.10
Real-Time Appearance-Based Mapping
Loading...
Searching...
No Matches
UEvent Class Referenceabstract

#include <UEvent.h>

Inheritance diagram for UEvent:

Public Member Functions

virtual std::string getClassName () const =0
 
int getCode () const
 

Protected Member Functions

 UEvent (int code=0)
 

Detailed Description

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).
...
}
static void post(UEvent *event, bool async=true, const UEventsSender *sender=0)
See also
UEventsManager
UEventsHandler
getClassName()

Definition at line 57 of file UEvent.h.

Constructor & Destructor Documentation

◆ ~UEvent()

virtual UEvent::~UEvent ( )
inlinevirtual

Definition at line 59 of file UEvent.h.

◆ UEvent()

UEvent::UEvent ( int  code = 0)
inlineprotected
Parameters
codethe event code. TODO : Remove the code, not required for most of all implemented events

Definition at line 81 of file UEvent.h.

Member Function Documentation

◆ getClassName()

virtual std::string UEvent::getClassName ( ) const
pure virtual

◆ getCode()

int UEvent::getCode ( ) const
inline

Get event's code.

Returns
the code

Definition at line 74 of file UEvent.h.


The documentation for this class was generated from the following file: