![]() |
Inviwo 0.9.12-pre
Inviwo documentation
|
#include <inviwo/core/util/dispatcher.h>
Public Types | |
| using | Callback = std::function<C> |
| using | Function = C |
| using | Handle = std::shared_ptr<Callback> |
Public Member Functions | |
| template<typename T > | |
| Handle | add (T &&callback) |
| Dispatcher (const Dispatcher &) | |
| Dispatcher (Dispatcher &&rhs) noexcept | |
| template<typename... A> | |
| void | invoke (A &&... args) |
| Dispatcher & | operator= (const Dispatcher &that) |
| Dispatcher & | operator= (Dispatcher &&that) noexcept |
Dispatches functions to a number of callbacks and cleans up callbacks when they are dead. Thread-safe via copy-on-write semantics on the callback vector.