|
ug4
|
The callback-id allows to deregister previously registered callbacks. More...
#include <message_hub.h>
Public Member Functions | |
| void | set_auto_free (bool autoFree) |
| ~CallbackId () | |
Private Member Functions | |
| CallbackId (MessageHub *hub, size_t msgTypeId, CallbackEntryIterator callbackEntryIter, bool autoFree) | |
Private Attributes | |
| bool | m_autoFree |
| CallbackEntryIterator | m_callbackEntryIter |
| MessageHub * | m_hub |
| size_t | m_msgTypeId |
| Make sure to only access the iterator while m_hub != NULL. | |
Friends | |
| class | MessageHub |
The callback-id allows to deregister previously registered callbacks.
Note that the class features an autoFree mechanism, which automatically frees the associated callback. Since this class is always wrapped in a smart-pointer, the the associated callback won't be freed, until the last copy of that smart-pointer is deleted. You can disable the auto-free mechanism through the set set_auto_free method or by setting the autoFree parameter of the MessageHub::register_callback methods to false.
| ug::MessageHub::CallbackId::~CallbackId | ( | ) |
|
private |
|
inline |
References m_autoFree.
|
friend |
|
private |
Referenced by set_auto_free().
|
private |
Referenced by ug::MessageHub::unregister_callback_impl().
|
private |
Referenced by ug::MessageHub::unregister_callback_impl().
|
private |
Make sure to only access the iterator while m_hub != NULL.
Referenced by ug::MessageHub::unregister_callback_impl().