|
libAlgAudio
v1.99-440-g08538e5-dirty
The development library for AlgAudio framework.
|
#include <Signal.hpp>
Public Member Functions | |
| bool | IsEmpty () const |
| Subscription & | operator= (Subscription &&other) |
| Subscription & | operator= (const Subscription &other)=delete |
| void | Release () |
| Subscription () | |
| Subscription (Subscription &&other) | |
| Subscription (const Subscription &other)=delete | |
| ~Subscription () | |
Friends | |
| template<typename... > | |
| class | Signal |
| class | SignalBase |
A valid Subscription is created by calling Sinnal::Subscribe. The main purpose of this class is to automatically unsibscribe the function when this Subscription is destructed. This way it's easy to make sure that a subscribed function won't be called after your class instance was destructed - simply keep the Subscription as a member of that class, or use a SubscriptionsManager.
A Subscription may be empty (when default-constructed or released), in such case it represents no subscription and can be assigned a new one.
|
inline |
Default constructor creates an empty Subscription which represents no event.
| AlgAudio::Subscription::Subscription | ( | Subscription && | other | ) |
Subscriptions are movable.
|
inline |
|
delete |
|
inline |
Returns true if this instance represents no subscription.
| Subscription& AlgAudio::Subscription::operator= | ( | Subscription && | other | ) |
Subscriptions are movable.
|
delete |
| void AlgAudio::Subscription::Release | ( | ) |
Use this function to remove a subscription from a signal. This way the subscribed function will no longer be called when the Signal happens.
|
friend |
|
friend |