|
Molybden
|
Events allow you to be notified when something happens in Molybden. More...
#include <event.hpp>
Public Types | |
| using | Signature = void(const T &e) |
| The observer's signature. | |
Public Member Functions | |
| std::shared_ptr< Subscription > | operator+= (std::function< Signature > observer) |
| Subscribes to receiving a notification when the event occurs. | |
Friends | |
| class | ObservableOwner |
Events allow you to be notified when something happens in Molybden.
Unlike delegates, events are asynchronous and do not block the underlying Chromium engine.
| T | the event type. |
| std::shared_ptr< Subscription > molybden::Event< T >::operator+= | ( | std::function< Signature > | observer | ) |
Subscribes to receiving a notification when the event occurs.
Use the following approach to subscribe to receiving events:
Use the Subscription.cancel() method to unsubscribe from receiving events.