Public Member Functions | Protected Member Functions | Private Attributes | List of all members
UEvent Class Referenceabstract

#include <UEvent.h>

Inheritance diagram for UEvent:
Inheritance graph
[legend]

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_
 

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).
...
}
See also
UEventsManager
UEventsHandler
getClassName()

Definition at line 57 of file UEvent.h.

Constructor & Destructor Documentation

virtual UEvent::~UEvent ( )
inlinevirtual

Definition at line 59 of file UEvent.h.

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

virtual std::string UEvent::getClassName ( ) const
pure virtual
int UEvent::getCode ( ) const
inline

Get event's code.

Returns
the code

Definition at line 74 of file UEvent.h.

Member Data Documentation

int UEvent::code_
private

The event's code.

Definition at line 84 of file UEvent.h.


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


rtabmap
Author(s): Mathieu Labbe
autogenerated on Wed Jun 5 2019 22:43:42