template <class... A>
CallbackList class
Reentrant callback list with configurable arguments.
Public functions
- auto add(const Callback& f) → size_t
- Add a callback, returns an id that can be used for deletion.
-
auto add_delcb(const Callback& f) → std::
function<void()> - Add a callback and return a deleter that removes the callback when invoked.
-
void call(const std::
function<void(const Callback&, const A&...)>& wrapper, const A&... args) - Call all callbacks in the order they were added via wrapper function.
- auto del(size_t id) → bool
- Delete a previously added callback via its id, returns if any was found.
- auto empty() const → bool
- Check if the callback list is empty, i.e. invocation will not call any callbacks.
- void operator()(const A&... args)
- Call all callbacks in the order they were added.