ReactivePlusPlus
One more implementation of ReactiveX approach in C++ with care about performance and templates in mind
 
Loading...
Searching...
No Matches
rpp::composite_subscription Class Referencefinal

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>

Inheritance diagram for rpp::composite_subscription:
rpp::subscription_base

Public Member Functions

 composite_subscription (const composite_subscription &)=default
 
 composite_subscription (composite_subscription &&) noexcept=default
 
composite_subscriptionoperator= (const composite_subscription &other)=default
 
composite_subscriptionoperator= (composite_subscription &&other) noexcept=default
 
template<constraint::subscription TSub = subscription_base>
std::weak_ptr< details::subscription_stateadd (const TSub &sub=TSub{}) const
 Add any other subscription to this as dependent.
 
std::weak_ptr< details::subscription_stateadd (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_baseoperator= (const subscription_base &other)=default
 
subscription_baseoperator= (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
 

Detailed Description

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


The documentation for this class was generated from the following file: