Observable Reference
Generic observable objects for C++
|
Unsubscribe the associated observer when destroyed.
Public Member Functions | |
unique_subscription ()=default | |
Create an empty subscription. More... | |
unique_subscription (infinite_subscription &&sub) | |
Create an unique subscription from an infinite_subscription. More... | |
~unique_subscription () | |
Destructor. More... | |
unique_subscription (unique_subscription const &)=delete | |
This class is not copy-constructible. More... | |
auto | operator= (unique_subscription const &) -> unique_subscription &=delete |
This class is not copy-assignable. More... | |
unique_subscription (unique_subscription &&)=default | |
This class is move-constructible. More... | |
auto | operator= (unique_subscription &&) -> unique_subscription &=default |
This class is move-assignable. More... | |
Public Member Functions inherited from observable::infinite_subscription | |
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... | |
|
default |
Create an empty subscription.
|
inline |
Create an unique subscription from an infinite_subscription.
[in] | sub | An infinite subscription that will be converted to an unique_subscription. |
|
inline |
|
delete |
This class is not copy-constructible.
|
default |
This class is move-constructible.
|
delete |
This class is not copy-assignable.
|
default |
This class is move-assignable.