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

◆ ~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.

Member Data Documentation

◆ code_

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:
main
int main()
Definition: dummy.cpp:188
UEvent
Definition: UEvent.h:57
UEvent::getClassName
virtual std::string getClassName() const =0
rtabmap_netvlad.argv
argv
Definition: rtabmap_netvlad.py:15
UEventsManager::post
static void post(UEvent *event, bool async=true, const UEventsSender *sender=0)
Definition: UEventsManager.cpp:54


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:26