Observable Reference
Generic observable objects for C++
|
Unsubscribe the associated observer when the last instance of the class is destroyed.
Public Member Functions | |
shared_subscription (infinite_subscription &&subscription) | |
Create a shared subscription from a temporary infinite subscription. More... | |
shared_subscription () noexcept=default | |
Create an empty shared subscription. More... | |
void | unsubscribe () |
Unsubscribe the associated observer from receiving notifications. More... | |
operator bool () const noexcept | |
Return true if the subscription is not empty. More... | |
shared_subscription (shared_subscription const &)=default | |
This class is not copy-constructible. More... | |
auto | operator= (shared_subscription const &) -> shared_subscription &=default |
This class is not copy-assignable. More... | |
shared_subscription (shared_subscription &&)=default | |
This class is move-constructible. More... | |
auto | operator= (shared_subscription &&) -> shared_subscription &=default |
This class is move-assignable. More... | |
|
inlineexplicit |
Create a shared subscription from a temporary infinite subscription.
subscription | An infinite subscription that will be converted to a shared subscription. |
|
defaultnoexcept |
Create an empty shared subscription.
Calling unsubscribe on an empty shared subscription will have no effect.
|
default |
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.
|
inlineexplicitnoexcept |
Return true if the subscription is not empty.
|
default |
This class is not copy-assignable.
|
default |
This class is move-assignable.