Doxygen with github
|
Base class for multicasting events. More...
#include <ksEvent.h>
Public Member Functions | |
bool | isBound () const |
Returns whether any callback is bound to this event. | |
void | registerEvent (std::unique_ptr< ksf::evt::ksEventHandle > &outHandle, std::function< void(Params...)> &&function) |
Registers event (binds to callback list). | |
void | unbind (std::size_t callbackUID) override |
Unbinds event callback by specified unique ID. | |
void | broadcast (Params... params) |
Broadcasts event to all bound callbacks. | |
Base class for multicasting events.
Params... | Event parameters. |
|
inline |
|
inline |
Returns whether any callback is bound to this event.
References callbacks.
|
inline |
Registers event (binds to callback list).
outHandle | Reference to outHandle shared ptr (destruction of ksEventHandle object will unbind the event) |
function | R-value reference to callback function |
References callbacks, and lastCallbackUID.
Referenced by ksf::comps::ksDevStatMqttReporter::postInit().
|
inlineoverridevirtual |
Unbinds event callback by specified unique ID.
This ID is automatically assigned by registerEvent function and ksEventHandle uses it to unbind automatically upon destruction.
callbackUID | Unique id of the callback to unbind. |
Implements ksf::evt::ksEventInterface.
References callbacks.