|
ORE Studio 0.0.4
|
RAII handle for managing event subscriptions. More...
#include <event_bus.hpp>

Public Types | |
| using | unsubscribe_fn = std::function< void()> |
Public Member Functions | |
| subscription (unsubscribe_fn fn) | |
| subscription (const subscription &)=delete | |
| subscription & | operator= (const subscription &)=delete |
| subscription (subscription &&other) noexcept | |
| subscription & | operator= (subscription &&other) noexcept |
| bool | is_active () const |
| Check if the subscription is active. | |
| void | unsubscribe () |
| Manually unsubscribe before destruction. | |
RAII handle for managing event subscriptions.
When destroyed, automatically unsubscribes from the event bus. Can be moved but not copied.