Cookie used to unregister event handlers. More...
#include <cvb/global.hpp>
Public Member Functions | |
EventCookie () noexcept=default | |
Creates an empty cookie for convenience. More... | |
operator bool () const noexcept | |
Checks if the cookie carries a registered event. More... | |
Cookie used to unregister event handlers.
A cookie object created and returned, each time an event handler is registered. An event handler can either be a classic callback or a c++ lamda. Either way there is no standard way to unregister such a handler, so the cookie is needed to do this manually. If the object, to which a specific event handler was registered to is destroyed the cookie will be useless and should be destroyed as well.
|
defaultnoexcept |
Creates an empty cookie for convenience.
Does | not throw any exception. |
|
inlineexplicitnoexcept |
Checks if the cookie carries a registered event.
Does | not throw any exception. |