2026-08-02 01:36:11 +00:00
<!-- HTML header for doxygen 1.9.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" lang = "en-US" >
< head >
< meta http-equiv = "Content-Type" content = "text/xhtml;charset=UTF-8" />
< meta http-equiv = "X-UA-Compatible" content = "IE=11" />
< meta name = "generator" content = "Doxygen 1.9.8" />
< meta name = "viewport" content = "width=device-width, initial-scale=1" />
< title > RTAB-Map: UEventsHandler Class Reference</ title >
< link href = "tabs.css" rel = "stylesheet" type = "text/css" />
< script type = "text/javascript" src = "jquery.js" ></ script >
< script type = "text/javascript" src = "dynsections.js" ></ script >
2026-08-02 07:56:38 +00:00
< link href = "navtree.css" rel = "stylesheet" type = "text/css" />
< script type = "text/javascript" src = "resize.js" ></ script >
< script type = "text/javascript" src = "navtreedata.js" ></ script >
< script type = "text/javascript" src = "navtree.js" ></ script >
2026-08-02 01:36:11 +00:00
< link href = "search/search.css" rel = "stylesheet" type = "text/css" />
< script type = "text/javascript" src = "search/searchdata.js" ></ script >
< script type = "text/javascript" src = "search/search.js" ></ script >
< link href = "doxygen.css" rel = "stylesheet" type = "text/css" />
2026-08-02 17:35:14 +00:00
< link href = "doxygen-awesome.css" rel = "stylesheet" type = "text/css" />
< link href = "custom.css" rel = "stylesheet" type = "text/css" />
2026-08-02 01:36:11 +00:00
< script type = "text/javascript" > window . RTABMAP_DOC_ROOT = "" ;</ script >
< script type = "text/javascript" src = "../versions.js" ></ script >
< script type = "text/javascript" src = "version-switcher.js" ></ script >
2026-08-02 17:35:14 +00:00
< script type = "text/javascript" src = "doxygen-awesome-darkmode-toggle.js" ></ script >
< script type = "text/javascript" > DoxygenAwesomeDarkModeToggle . init ();</ script >
2026-08-02 01:36:11 +00:00
</ head >
< body >
< div id = "top" > <!-- do not remove this div, it is closed by doxygen! -->
< div id = "titlearea" >
< table cellspacing = "0" cellpadding = "0" >
< tbody >
< tr id = "projectrow" >
< td id = "projectalign" >
< div id = "projectname" > RTAB-Map< span id = "projectnumber" >   0.23.10</ span >
</ div >
2026-08-02 07:56:38 +00:00
< div id = "projectbrief" > Real-Time Appearance-Based Mapping</ div >
2026-08-02 01:36:11 +00:00
</ td >
</ tr >
</ tbody >
</ table >
</ div >
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
var searchBox = new SearchBox ( "searchBox" , "search/" , '.html' );
/* @license-end */
</ script >
< script type = "text/javascript" src = "menudata.js" ></ script >
< script type = "text/javascript" src = "menu.js" ></ script >
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$ ( function () {
initMenu ( '' , true , false , 'search.php' , 'Search' );
$ ( document ). ready ( function () { init_search (); });
});
/* @license-end */
</ script >
< div id = "main-nav" ></ div >
2026-08-02 07:56:38 +00:00
</ div > <!-- top -->
< div id = "side-nav" class = "ui-resizable side-nav-resizable" >
< div id = "nav-tree" >
< div id = "nav-tree-contents" >
< div id = "nav-sync" class = "sync" ></ div >
</ div >
</ div >
< div id = "splitbar" style = "-moz-user-select:none;"
class = "ui-resizable-handle" >
</ div >
</ div >
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$ ( document ). ready ( function (){ initNavTree ( 'classUEventsHandler.html' , '' ); initResizable (); });
/* @license-end */
</ script >
< div id = "doc-content" >
2026-08-02 01:36:11 +00:00
<!-- window showing the filter options -->
< div id = "MSearchSelectWindow"
onmouseover = "return searchBox.OnSearchSelectShow()"
onmouseout = "return searchBox.OnSearchSelectHide()"
onkeydown = "return searchBox.OnSearchSelectKey(event)" >
</ div >
<!-- iframe showing the search results (closed by default) -->
< div id = "MSearchResultsWindow" >
< div id = "MSearchResults" >
< div class = "SRPage" >
< div id = "SRIndex" >
< div id = "SRResults" ></ div >
< div class = "SRStatus" id = "Loading" > Loading...</ div >
< div class = "SRStatus" id = "Searching" > Searching...</ div >
< div class = "SRStatus" id = "NoMatches" > No Matches</ div >
</ div >
</ div >
</ div >
</ div >
< div class = "header" >
< div class = "summary" >
< a href = "#pub-methods" > Public Member Functions</ a > |
< a href = "#pro-methods" > Protected Member Functions</ a > |
< a href = "#friends" > Friends</ a > |
< a href = "classUEventsHandler-members.html" > List of all members</ a > </ div >
< div class = "headertitle" >< div class = "title" > UEventsHandler Class Reference< span class = "mlabels" >< span class = "mlabel" > abstract</ span ></ span ></ div ></ div >
</ div > <!--header-->
< div class = "contents" >
< p >< code > #include < < a class = "el" href = "UEventsHandler_8h_source.html" > UEventsHandler.h</ a > > </ code ></ p >
< div class = "dynheader" >
Inheritance diagram for UEventsHandler:</ div >
< div class = "dyncontent" >
< div class = "center" >< img src = "classUEventsHandler__inherit__graph.png" border = "0" usemap = "#aUEventsHandler_inherit__map" alt = "Inheritance graph" /></ div >
< map name = "aUEventsHandler_inherit__map" id = "aUEventsHandler_inherit__map" >
< area shape = "rect" title = " " alt = "" coords = "147,79,274,104" />
2026-08-02 07:56:38 +00:00
< area shape = "rect" href = "classrtabmap_1_1OdometryThread.html" title = "Runs an Odometry front-end in its own thread, driven by events." alt = "" coords = "5,152,200,177" />
2026-08-02 01:36:11 +00:00
< area shape = "poly" title = " " alt = "" coords = "183,114,122,154,119,150,181,109" />
2026-08-02 07:56:38 +00:00
< area shape = "rect" href = "classrtabmap_1_1RtabmapThread.html" title = "Runs a Rtabmap instance in its own thread, driven by events." alt = "" coords = "224,152,413,177" />
2026-08-02 01:36:11 +00:00
< area shape = "poly" title = " " alt = "" coords = "241,109,302,150,300,154,238,114" />
< area shape = "rect" href = "classUEventsSender.html" title = " " alt = "" coords = "150,5,271,31" />
< area shape = "poly" title = " " alt = "" coords = "213,44,213,79,208,79,208,44" />
</ map >
2026-08-02 07:56:38 +00:00
< center >< span class = "legend" > [< a target = "top" href = "graph_legend.html" > legend</ a > ]</ span ></ center ></ div >
2026-08-02 01:36:11 +00:00
< div class = "dynheader" >
Collaboration diagram for UEventsHandler:</ div >
< div class = "dyncontent" >
< div class = "center" >< img src = "classUEventsHandler__coll__graph.png" border = "0" usemap = "#aUEventsHandler_coll__map" alt = "Collaboration graph" /></ div >
< map name = "aUEventsHandler_coll__map" id = "aUEventsHandler_coll__map" >
< area shape = "rect" title = " " alt = "" coords = "5,79,132,104" />
< area shape = "rect" href = "classUEventsSender.html" title = " " alt = "" coords = "8,5,129,31" />
< area shape = "poly" title = " " alt = "" coords = "71,44,71,79,66,79,66,44" />
</ map >
2026-08-02 07:56:38 +00:00
< center >< span class = "legend" > [< a target = "top" href = "graph_legend.html" > legend</ a > ]</ span ></ center ></ div >
2026-08-02 01:36:11 +00:00
< table class = "memberdecls" >
< tr class = "heading" >< td colspan = "2" >< h2 class = "groupheader" >< a id = "pub-methods" name = "pub-methods" ></ a >
Public Member Functions</ h2 ></ td ></ tr >
< tr class = "memitem:a425f7af2882c980044a310e68ab13877" id = "r_a425f7af2882c980044a310e68ab13877" >< td class = "memItemLeft" align = "right" valign = "top" >< a id = "a425f7af2882c980044a310e68ab13877" name = "a425f7af2882c980044a310e68ab13877" ></ a >
void  </ td >< td class = "memItemRight" valign = "bottom" >< b > registerToEventsManager</ b > ()</ td ></ tr >
< tr class = "separator:a425f7af2882c980044a310e68ab13877" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:aa83926b16066f18dcae9d55997fa11ba" id = "r_aa83926b16066f18dcae9d55997fa11ba" >< td class = "memItemLeft" align = "right" valign = "top" >< a id = "aa83926b16066f18dcae9d55997fa11ba" name = "aa83926b16066f18dcae9d55997fa11ba" ></ a >
void  </ td >< td class = "memItemRight" valign = "bottom" >< b > unregisterFromEventsManager</ b > ()</ td ></ tr >
< tr class = "separator:aa83926b16066f18dcae9d55997fa11ba" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
</ table >< table class = "memberdecls" >
< tr class = "heading" >< td colspan = "2" >< h2 class = "groupheader" >< a id = "pro-methods" name = "pro-methods" ></ a >
Protected Member Functions</ h2 ></ td ></ tr >
< tr class = "memitem:a0d43b582c19f01196a513f66d3618d8d" id = "r_a0d43b582c19f01196a513f66d3618d8d" >< td class = "memItemLeft" align = "right" valign = "top" > virtual bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUEventsHandler.html#a0d43b582c19f01196a513f66d3618d8d" > handleEvent</ a > (< a class = "el" href = "classUEvent.html" > UEvent</ a > *event)=0</ td ></ tr >
< tr class = "separator:a0d43b582c19f01196a513f66d3618d8d" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:abfe2ba3d1fb92e59aff1978cbc21d134" id = "r_abfe2ba3d1fb92e59aff1978cbc21d134" >< td class = "memItemLeft" align = "right" valign = "top" >   </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUEventsHandler.html#abfe2ba3d1fb92e59aff1978cbc21d134" > UEventsHandler</ a > ()</ td ></ tr >
< tr class = "separator:abfe2ba3d1fb92e59aff1978cbc21d134" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a15ac2bf243e938c411fac0dff7db2f51" id = "r_a15ac2bf243e938c411fac0dff7db2f51" >< td class = "memItemLeft" align = "right" valign = "top" > virtual  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUEventsHandler.html#a15ac2bf243e938c411fac0dff7db2f51" > ~UEventsHandler</ a > ()</ td ></ tr >
< tr class = "separator:a15ac2bf243e938c411fac0dff7db2f51" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "inherit_header pro_methods_classUEventsSender" >< td colspan = "2" onclick = "javascript:toggleInherit('pro_methods_classUEventsSender')" >< img src = "closed.png" alt = "-" />   Protected Member Functions inherited from < a class = "el" href = "classUEventsSender.html" > UEventsSender</ a ></ td ></ tr >
< tr class = "memitem:ab03886c42164f2f9bf89fd3da641526f inherit pro_methods_classUEventsSender" id = "r_ab03886c42164f2f9bf89fd3da641526f" >< td class = "memItemLeft" align = "right" valign = "top" > void  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUEventsSender.html#ab03886c42164f2f9bf89fd3da641526f" > post</ a > (< a class = "el" href = "classUEvent.html" > UEvent</ a > *event, bool async=true) const</ td ></ tr >
< tr class = "separator:ab03886c42164f2f9bf89fd3da641526f inherit pro_methods_classUEventsSender" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
</ table >< table class = "memberdecls" >
< tr class = "heading" >< td colspan = "2" >< h2 class = "groupheader" >< a id = "friends" name = "friends" ></ a >
Friends</ h2 ></ td ></ tr >
< tr class = "memitem:a977152b27d4c918d79a2db23ed85bfa6" id = "r_a977152b27d4c918d79a2db23ed85bfa6" >< td class = "memItemLeft" align = "right" valign = "top" > class  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUEventsHandler.html#a977152b27d4c918d79a2db23ed85bfa6" > UEventsManager</ a ></ td ></ tr >
< tr class = "separator:a977152b27d4c918d79a2db23ed85bfa6" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
</ table >
< a name = "details" id = "details" ></ a >< h2 class = "groupheader" > Detailed Description</ h2 >
< div class = "textblock" >< p > The class < a class = "el" href = "classUEventsHandler.html" > UEventsHandler</ a > is an abstract class for handling events.</ p >
< p > Inherited classes must implement < a class = "el" href = "classUEventsHandler.html#a0d43b582c19f01196a513f66d3618d8d" > handleEvent()</ a > function, which is called by the < a class = "el" href = "classUEventsManager.html" > UEventsManager</ a > when an event is dispatched. Once the handler is created, it must be added to events manager with < a class = "el" href = "classUEventsManager.html#a3bb033062e4a0eb59efdf5f84d170388" > UEventsManager::addHandler()</ a > function. Note that it is not safe to automatically add the handler to < a class = "el" href = "classUEventsManager.html" > UEventsManager</ a > in the handler's constructor.</ p >
< p > Note for multi-threading: the < a class = "el" href = "classUEventsHandler.html#a0d43b582c19f01196a513f66d3618d8d" > handleEvent()</ a > method is called inside the < a class = "el" href = "classUEventsManager.html" > UEventsManager</ a > thread. If the inherited class also inherits from UThreadNode, < a class = "el" href = "classUEventsHandler.html#a0d43b582c19f01196a513f66d3618d8d" > handleEvent()</ a > is done as well outside the thread's main loop, so be careful to protect private data of the thread used in its main loop.</ p >
2026-08-02 07:56:38 +00:00
< p > Example for a useful combination of an < a class = "el" href = "classUEventsHandler.html" > UEventsHandler</ a > and a UThreadNode, with safe data modification while not blocking the < a class = "el" href = "classUEventsHandler.html#a0d43b582c19f01196a513f66d3618d8d" > handleEvent()</ a > call on a mutex: </ p >< div class = "fragment" >< div class = "line" >< span class = "preprocessor" > #include " < a class = "code" href = "UThreadNode_8h.html" > utilite/UThreadNode.h</ a > " </ span ></ div >
2026-08-02 01:36:11 +00:00
< div class = "line" >< span class = "preprocessor" > #include " utilite/UEventsHandler.h" </ span ></ div >
< div class = "line" >< span class = "preprocessor" > #include " utilite/UEventsManager.h" </ span ></ div >
< div class = "line" >< span class = "preprocessor" > #include " utilite/UEvent.h" </ span ></ div >
< div class = "line" > </ div >
< div class = "line" >< span class = "comment" > // Implement a simple event</ span ></ div >
< div class = "line" >< span class = "keyword" > class </ span > ResetEvent : < span class = "keyword" > public</ span > < a class = "code hl_class" href = "classUEvent.html" > UEvent</ a > {</ div >
< div class = "line" >< span class = "keyword" > public</ span > :</ div >
< div class = "line" > ResetEvent() {}</ div >
< div class = "line" > < span class = "keyword" > virtual</ span > ~ResetEvent() {}</ div >
< div class = "line" > < span class = "keyword" > virtual</ span > std::string getClassName()< span class = "keyword" > const </ span > {< span class = "keywordflow" > return</ span > < span class = "stringliteral" > " ResetEvent" </ span > ;} < span class = "comment" > // Must be implemented</ span ></ div >
< div class = "line" > };</ div >
< div class = "line" > </ div >
< div class = "line" >< span class = "comment" > // There is the thread counting indefinitely, the count can be reseted by sending a ResetEvent.</ span ></ div >
< div class = "line" >< span class = "keyword" > class </ span > CounterThread : < span class = "keyword" > public</ span > < a class = "code hl_class" href = "classUThread.html" > UThreadNode</ a > , < span class = "keyword" > public</ span > < a class = "code hl_class" href = "classUEventsHandler.html" > UEventsHandler</ a > {</ div >
< div class = "line" >< span class = "keyword" > public</ span > :</ div >
< div class = "line" > CounterThread() : state_(0), count_(0) {}</ div >
< div class = "line" > < span class = "keyword" > virtual</ span > ~CounterThread() {this-> join(< span class = "keyword" > true</ span > );}</ div >
< div class = "line" > </ div >
< div class = "line" >< span class = "keyword" > protected</ span > :</ div >
< div class = "line" > < span class = "keyword" > virtual</ span > < span class = "keywordtype" > void</ span > mainLoop() {</ div >
< div class = "line" > < span class = "keywordflow" > if</ span > (state_ == 1) {</ div >
< div class = "line" > state_ = 0;</ div >
< div class = "line" > < span class = "comment" > // Do a long initialization, reset memory or other special long works... here</ span ></ div >
< div class = "line" > < span class = "comment" > // we reset the count. This could be done in the handleEvent() but</ span ></ div >
< div class = "line" > < span class = "comment" > // with many objects, it is more safe to do it here (in the thread' s loop). A safe</ span ></ div >
< div class = "line" > < span class = "comment" > // way could be also to use a UMutex to protect this initialization in</ span ></ div >
< div class = "line" > < span class = "comment" > // the handleEvent(), but it is not recommended to do long works in handleEvent()</ span ></ div >
< div class = "line" > < span class = "comment" > // because this will add latency in the UEventsManager dispatching events loop.</ span ></ div >
< div class = "line" > count_ = 0; < span class = "comment" > // Reset the count</ span ></ div >
< div class = "line" > printf(< span class = "stringliteral" > " Reset!\n" </ span > );</ div >
< div class = "line" > }</ div >
< div class = "line" > </ div >
< div class = "line" > < span class = "comment" > // Do some works...</ span ></ div >
< div class = "line" > printf(< span class = "stringliteral" > " count=%d\n" </ span > , count_++);</ div >
< div class = "line" > uSleep(100); < span class = "comment" > // wait 100 ms</ span ></ div >
< div class = "line" > }</ div >
< div class = "line" > < span class = "keyword" > virtual</ span > < span class = "keywordtype" > void</ span > handleEvent(< a class = "code hl_class" href = "classUEvent.html" > UEvent</ a > * event) {</ div >
< div class = "line" > < span class = "keywordflow" > if</ span > (event-> < a class = "code hl_function" href = "classUEvent.html#a2c7d278240ad4b7d88a2c534cc5f47b4" > getClassName</ a > ().compare(< span class = "stringliteral" > " ResetEvent" </ span > ) == 0) {</ div >
< div class = "line" > state_ = 1;</ div >
< div class = "line" > }</ div >
< div class = "line" > }</ div >
< div class = "line" >< span class = "keyword" > private</ span > :</ div >
< div class = "line" > < span class = "keywordtype" > int</ span > state_;</ div >
< div class = "line" > < span class = "keywordtype" > int</ span > count_;</ div >
< div class = "line" > };</ div >
< div class = "line" > </ div >
< div class = "line" >< span class = "keywordtype" > int</ span > main(< span class = "keywordtype" > int</ span > argc, < span class = "keywordtype" > char</ span > * argv[])</ div >
< div class = "line" > {</ div >
< div class = "line" > CounterThread counter;</ div >
< div class = "line" > counter.start();</ div >
< div class = "line" > < a class = "code hl_function" href = "classUEventsManager.html#a3bb033062e4a0eb59efdf5f84d170388" > UEventsManager::addHandler</ a > (& counter);</ div >
< div class = "line" > </ div >
< div class = "line" > uSleep(500); < span class = "comment" > // wait 500 ms before sending a reset event</ span ></ div >
< div class = "line" > < a class = "code hl_function" href = "classUEventsManager.html#a956353a8006abe2edb0be2e1fc1846cb" > UEventsManager::post</ a > (< span class = "keyword" > new</ span > ResetEvent());</ div >
< div class = "line" > uSleep(500); < span class = "comment" > // wait 500 ms before termination</ span ></ div >
< div class = "line" > </ div >
< div class = "line" > < a class = "code hl_function" href = "classUEventsManager.html#a10d4b359f630aa9387e77f8baefcc07c" > UEventsManager::removeHandler</ a > (& counter);</ div >
< div class = "line" > counter.join(< span class = "keyword" > true</ span > ); < span class = "comment" > // Kill and wait to finish</ span ></ div >
< div class = "line" > < span class = "keywordflow" > return</ span > 0;</ div >
< div class = "line" > }</ div >
2026-08-02 07:56:38 +00:00
< div class = "ttc" id = "aUThreadNode_8h_html" >< div class = "ttname" >< a href = "UThreadNode_8h.html" > UThreadNode.h</ a ></ div >< div class = "ttdoc" > Backward-compatible alias header for UThread.</ div ></ div >
2026-08-02 01:36:11 +00:00
< div class = "ttc" id = "aclassUEvent_html" >< div class = "ttname" >< a href = "classUEvent.html" > UEvent</ a ></ div >< div class = "ttdef" >< b > Definition</ b > < a href = "UEvent_8h_source.html#l00057" > UEvent.h:57</ a ></ div ></ div >
< div class = "ttc" id = "aclassUEvent_html_a2c7d278240ad4b7d88a2c534cc5f47b4" >< div class = "ttname" >< a href = "classUEvent.html#a2c7d278240ad4b7d88a2c534cc5f47b4" > UEvent::getClassName</ a ></ div >< div class = "ttdeci" > virtual std::string getClassName() const =0</ div ></ div >
< div class = "ttc" id = "aclassUEventsHandler_html" >< div class = "ttname" >< a href = "classUEventsHandler.html" > UEventsHandler</ a ></ div >< div class = "ttdef" >< b > Definition</ b > < a href = "UEventsHandler_8h_source.html#l00128" > UEventsHandler.h:128</ a ></ div ></ div >
< div class = "ttc" id = "aclassUEventsManager_html_a10d4b359f630aa9387e77f8baefcc07c" >< div class = "ttname" >< a href = "classUEventsManager.html#a10d4b359f630aa9387e77f8baefcc07c" > UEventsManager::removeHandler</ a ></ div >< div class = "ttdeci" > static void removeHandler(UEventsHandler *handler)</ div ></ div >
< div class = "ttc" id = "aclassUEventsManager_html_a3bb033062e4a0eb59efdf5f84d170388" >< div class = "ttname" >< a href = "classUEventsManager.html#a3bb033062e4a0eb59efdf5f84d170388" > UEventsManager::addHandler</ a ></ div >< div class = "ttdeci" > static void addHandler(UEventsHandler *handler)</ div ></ div >
< div class = "ttc" id = "aclassUEventsManager_html_a956353a8006abe2edb0be2e1fc1846cb" >< div class = "ttname" >< a href = "classUEventsManager.html#a956353a8006abe2edb0be2e1fc1846cb" > UEventsManager::post</ a ></ div >< div class = "ttdeci" > static void post(UEvent *event, bool async=true, const UEventsSender *sender=0)</ div ></ div >
< div class = "ttc" id = "aclassUThread_html" >< div class = "ttname" >< a href = "classUThread.html" > UThread</ a ></ div >< div class = "ttdef" >< b > Definition</ b > < a href = "UThread_8h_source.html#l00086" > UThread.h:87</ a ></ div ></ div >
</ div > <!-- fragment --> < p > The output is: </ p >< div class = "fragment" >< div class = "line" > count=0</ div >
< div class = "line" > count=1</ div >
< div class = "line" > count=2</ div >
< div class = "line" > count=3</ div >
< div class = "line" > count=4</ div >
< div class = "line" > Reset!</ div >
< div class = "line" > count=0</ div >
< div class = "line" > count=1</ div >
< div class = "line" > count=2</ div >
< div class = "line" > count=3</ div >
< div class = "line" > count=4</ div >
</ div > <!-- fragment --> < dl class = "section see" >< dt > See also</ dt >< dd >< a class = "el" href = "classUEventsManager.html" > UEventsManager</ a > </ dd >
< dd >
< a class = "el" href = "classUEvent.html" > UEvent</ a > </ dd >
< dd >
2026-08-02 07:56:38 +00:00
< a class = "el" href = "UThreadNode_8h.html#a82fc8ffe23f95d50f934eb27afd351d6" title = "Alias for UThread, kept for backward compatibility." > UThreadNode</ a > </ dd ></ dl >
2026-08-02 01:36:11 +00:00
< p class = "definition" > Definition at line < a class = "el" href = "UEventsHandler_8h_source.html#l00128" > 128</ a > of file < a class = "el" href = "UEventsHandler_8h_source.html" > UEventsHandler.h</ a > .</ p >
</ div >< h2 class = "groupheader" > Constructor & Destructor Documentation</ h2 >
< a id = "abfe2ba3d1fb92e59aff1978cbc21d134" name = "abfe2ba3d1fb92e59aff1978cbc21d134" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#abfe2ba3d1fb92e59aff1978cbc21d134" > ◆  </ a ></ span > UEventsHandler()</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > UEventsHandler::UEventsHandler </ td >
< td > (</ td >
< td class = "paramname" ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ td >
< td class = "mlabels-right" >
< span class = "mlabels" >< span class = "mlabel" > inline</ span >< span class = "mlabel" > protected</ span ></ span > </ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p >< a class = "el" href = "classUEventsHandler.html" > UEventsHandler</ a > constructor.</ p >
< p > Note : You can call EventsManager::addHandler(this) at the end of the constructor of the inherited class where the virtual method handleEvent(...) is defined. If so, the < a class = "el" href = "classUEventsHandler.html" > UEventsHandler</ a > doesn't need to be manually added to the EventsManager where the handler is instantiated. We decided to not include UEventsManager::addHandler(this) in this abstract class constructor because an event can be handled (calling the pure virtual method) while the concrete class is constructed. </ p >
< p class = "definition" > Definition at line < a class = "el" href = "UEventsHandler_8h_source.html#l00172" > 172</ a > of file < a class = "el" href = "UEventsHandler_8h_source.html" > UEventsHandler.h</ a > .</ p >
</ div >
</ div >
< a id = "a15ac2bf243e938c411fac0dff7db2f51" name = "a15ac2bf243e938c411fac0dff7db2f51" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a15ac2bf243e938c411fac0dff7db2f51" > ◆  </ a ></ span > ~UEventsHandler()</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > virtual UEventsHandler::~UEventsHandler </ td >
< td > (</ td >
< td class = "paramname" ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ td >
< td class = "mlabels-right" >
< span class = "mlabels" >< span class = "mlabel" > protected</ span >< span class = "mlabel" > virtual</ span ></ span > </ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p >< a class = "el" href = "classUEventsHandler.html" > UEventsHandler</ a > destructor.</ p >
< p > By default, it removes the handler reference from the < a class = "el" href = "classUEventsManager.html" > UEventsManager</ a > . To be thread-safe, the inherited class must remove itself from the < a class = "el" href = "classUEventsManager.html" > UEventsManager</ a > before it is deleted because an event can be handled (calling the pure virtual method < a class = "el" href = "classUEventsHandler.html#a0d43b582c19f01196a513f66d3618d8d" > handleEvent()</ a > ) after the concrete class is deleted. </ p >
</ div >
</ div >
< h2 class = "groupheader" > Member Function Documentation</ h2 >
< a id = "a0d43b582c19f01196a513f66d3618d8d" name = "a0d43b582c19f01196a513f66d3618d8d" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a0d43b582c19f01196a513f66d3618d8d" > ◆  </ a ></ span > handleEvent()</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > virtual bool UEventsHandler::handleEvent </ td >
< td > (</ td >
< td class = "paramtype" >< a class = "el" href = "classUEvent.html" > UEvent</ a > *  </ td >
< td class = "paramname" >< em > event</ em ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ td >
< td class = "mlabels-right" >
< span class = "mlabels" >< span class = "mlabel" > protected</ span >< span class = "mlabel" > pure virtual</ span ></ span > </ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Method called by the < a class = "el" href = "classUEventsManager.html" > UEventsManager</ a > to handle an event. Important : this method must do a minimum of work because the faster the dispatching loop is done; the faster the events are received. If a handling function takes too much time, the events list can grow faster than it is emptied. The event can be modified. </ p >< dl class = "section return" >< dt > Returns</ dt >< dd > "true" to notify < a class = "el" href = "classUEventsManager.html" > UEventsManager</ a > that this handler took ownership of the event (meaning it must delete it). The event will not be dispatched to next handlers. </ dd >
< dd >
"false" to let event be dispatched to next handlers (default behavior). < a class = "el" href = "classUEventsManager.html" > UEventsManager</ a > will take care of deleting the event. </ dd ></ dl >
< p > Implemented in < a class = "el" href = "classrtabmap_1_1RtabmapThread.html#ab2556f7773329963038d876c86e97d09" > rtabmap::RtabmapThread</ a > , and < a class = "el" href = "classrtabmap_1_1OdometryThread.html#a65808dd7148c1e2c49dcf90ef718b5a8" > rtabmap::OdometryThread</ a > .</ p >
</ div >
</ div >
< h2 class = "groupheader" > Friends And Related Symbol Documentation</ h2 >
< a id = "a977152b27d4c918d79a2db23ed85bfa6" name = "a977152b27d4c918d79a2db23ed85bfa6" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a977152b27d4c918d79a2db23ed85bfa6" > ◆  </ a ></ span > UEventsManager</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > friend class < a class = "el" href = "classUEventsManager.html" > UEventsManager</ a ></ td >
</ tr >
</ table >
</ td >
< td class = "mlabels-right" >
< span class = "mlabels" >< span class = "mlabel" > friend</ span ></ span > </ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Only the < a class = "el" href = "classUEventsManager.html" > UEventsManager</ a > has access to the < a class = "el" href = "classUEventsHandler.html#a0d43b582c19f01196a513f66d3618d8d" > handleEvent()</ a > method. </ p >
< p class = "definition" > Definition at line < a class = "el" href = "UEventsHandler_8h_source.html#l00140" > 140</ a > of file < a class = "el" href = "UEventsHandler_8h_source.html" > UEventsHandler.h</ a > .</ p >
</ div >
</ div >
< hr /> The documentation for this class was generated from the following file:< ul >
< li > utilite/include/rtabmap/utilite/< a class = "el" href = "UEventsHandler_8h_source.html" > UEventsHandler.h</ a ></ li >
</ ul >
</ div > <!-- contents -->
2026-08-02 07:56:38 +00:00
</ div > <!-- doc-content -->
2026-08-02 01:36:11 +00:00
<!-- start footer part -->
2026-08-02 07:56:38 +00:00
< div id = "nav-path" class = "navpath" > <!-- id is needed for treeview function! -->
< ul >
< li class = "navelem" >< a class = "el" href = "classUEventsHandler.html" > UEventsHandler</ a ></ li >
< li class = "footer" > Generated by < a href = "https://www.doxygen.org/index.html" >< img class = "footer" src = "doxygen.svg" width = "104" height = "31" alt = "doxygen" /></ a > 1.9.8 </ li >
</ ul >
</ div >
2026-08-02 01:36:11 +00:00
</ body >
</ html >