rpp::subscription_base with ability to add some dependent subscriptions as a part of this one: in case of initiation of unsubscribe of this subscription, then any dependent subscriptions will be unsubscribed too More...
#include <composite_subscription.hpp>
Public Member Functions | |
composite_subscription (const composite_subscription &)=default | |
composite_subscription (composite_subscription &&) noexcept=default | |
composite_subscription & | operator= (const composite_subscription &other)=default |
composite_subscription & | operator= (composite_subscription &&other) noexcept=default |
template<constraint::subscription TSub = subscription_base> | |
std::weak_ptr< details::subscription_state > | add (const TSub &sub=TSub{}) const |
Add any other subscription to this as dependent. | |
std::weak_ptr< details::subscription_state > | add (const callback_subscription &sub) const |
Add callback/function subscription to this as dependent. | |
composite_subscription | make_child () const |
void | remove (const subscription_base &sub) const |
void | remove (const std::weak_ptr< details::subscription_state > &sub) const |
bool | is_empty () const |
Public Member Functions inherited from rpp::subscription_base | |
subscription_base (const subscription_base &)=default | |
subscription_base (subscription_base &&) noexcept=default | |
subscription_base & | operator= (const subscription_base &other)=default |
subscription_base & | operator= (subscription_base &&other) noexcept=default |
bool | operator== (const subscription_base &rhs) const =default |
bool | is_subscribed () const |
indicates current status of subscription | |
void | unsubscribe () const |
initiates unsubscription process (if subscribed) | |
Static Public Member Functions | |
static composite_subscription | empty () |
Static Public Member Functions inherited from rpp::subscription_base | |
static subscription_base | empty () |
Additional Inherited Members | |
Protected Member Functions inherited from rpp::subscription_base | |
subscription_base (std::shared_ptr< details::subscription_state > state) | |
const std::shared_ptr< details::subscription_state > & | get_state () const |
rpp::subscription_base with ability to add some dependent subscriptions as a part of this one: in case of initiation of unsubscribe of this subscription, then any dependent subscriptions will be unsubscribed too