Observable Reference
Generic observable objects for C++
|
Infinite subscription that will not unsubscribe the associated observer when destroyed.
Public Member Functions | |
infinite_subscription (std::function< void()> const &unsubscribe) | |
Create a subscription with the specified unsubscribe functor. More... | |
void | unsubscribe () |
Unsubscribe the associated observer from receiving notifications. More... | |
auto | release () |
Disassociate the subscription from the subscribed observer. More... | |
infinite_subscription ()=default | |
This class is default-constructible. More... | |
infinite_subscription (infinite_subscription const &)=delete | |
This class is not copy-constructible. More... | |
auto | operator= (infinite_subscription const &) -> infinite_subscription &=delete |
This class is not copy-assignable. More... | |
infinite_subscription (infinite_subscription &&)=default | |
This class is move-constructible. More... | |
auto | operator= (infinite_subscription &&) -> infinite_subscription &=default |
This class is move-assignable. More... | |
|
inlineexplicit |
Create a subscription with the specified unsubscribe functor.
[in] | unsubscribe | Calling this functor will unsubscribe the associated observer. |
|
default |
This class is default-constructible.
|
delete |
This class is not copy-constructible.
|
default |
This class is move-constructible.
|
inline |
Unsubscribe the associated observer from receiving notifications.
Only the first call of this method will have an effect.
|
inline |
Disassociate the subscription from the subscribed observer.
After calling this method, calling unsubscribe() or destroying the subscription instance will have no effect.
subscription.release()()
is equivalent to subscription.unsubscribe()
.
|
delete |
This class is not copy-assignable.
|
default |
This class is move-assignable.