RxCpp
The Reactive Extensions for Native (RxCpp) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators in both C and C++.
Classes | Public Types | Public Member Functions | Friends | List of all members
rxcpp::subscriber< T, Observer > Class Template Reference

binds an observer that consumes values with a composite_subscription that controls lifetime. More...

#include <rx-subscriber.hpp>

Inheritance diagram for rxcpp::subscriber< T, Observer >:
Inheritance graph
[legend]
Collaboration diagram for rxcpp::subscriber< T, Observer >:
Collaboration graph
[legend]

Public Types

typedef composite_subscription::weak_subscription weak_subscription
 
- Public Types inherited from rxcpp::subscriber_base< T >
typedef tag_subscriber subscriber_tag
 
- Public Types inherited from rxcpp::observer_base< T >
typedef T value_type
 
typedef tag_observer observer_tag
 
- Public Types inherited from rxcpp::subscription_base
typedef tag_subscription subscription_tag
 

Public Member Functions

 subscriber (const this_type &o)
 
 subscriber (this_type &&o)
 
template<class O >
 subscriber (const subscriber< T, O > &o, typename std::enable_if< !std::is_same< O, observer< T >>::value &&std::is_same< Observer, observer< T >>::value, void ** >::type=nullptr)
 
template<class U >
 subscriber (trace_id id, composite_subscription cs, U &&o)
 
this_typeoperator= (this_type o)
 
const observer_type & get_observer () const
 
observer_type & get_observer ()
 
const composite_subscriptionget_subscription () const
 
composite_subscriptionget_subscription ()
 
trace_id get_id () const
 
subscriber< T > as_dynamic () const
 
template<class V >
void on_next (V &&v) const
 
void on_error (std::exception_ptr e) const
 
void on_completed () const
 
bool is_subscribed () const
 
weak_subscription add (subscription s) const
 
template<class F >
auto add (F f) const -> typename std::enable_if< detail::is_unsubscribe_function< F >::value, weak_subscription >::type
 
void remove (weak_subscription w) const
 
void clear () const
 
void unsubscribe () const
 

Friends

template<class U , class O >
class subscriber
 

Detailed Description

template<class T, class Observer = observer<T>>
class rxcpp::subscriber< T, Observer >

binds an observer that consumes values with a composite_subscription that controls lifetime.

Member Typedef Documentation

template<class T, class Observer = observer<T>>
typedef composite_subscription::weak_subscription rxcpp::subscriber< T, Observer >::weak_subscription

Constructor & Destructor Documentation

template<class T, class Observer = observer<T>>
rxcpp::subscriber< T, Observer >::subscriber ( const this_type o)
inline
template<class T, class Observer = observer<T>>
rxcpp::subscriber< T, Observer >::subscriber ( this_type &&  o)
inline
template<class T, class Observer = observer<T>>
template<class O >
rxcpp::subscriber< T, Observer >::subscriber ( const subscriber< T, O > &  o,
typename std::enable_if< !std::is_same< O, observer< T >>::value &&std::is_same< Observer, observer< T >>::value, void ** >::type  = nullptr 
)
inline
template<class T, class Observer = observer<T>>
template<class U >
rxcpp::subscriber< T, Observer >::subscriber ( trace_id  id,
composite_subscription  cs,
U &&  o 
)
inline

Member Function Documentation

template<class T, class Observer = observer<T>>
weak_subscription rxcpp::subscriber< T, Observer >::add ( subscription  s) const
inline
template<class T, class Observer = observer<T>>
template<class F >
auto rxcpp::subscriber< T, Observer >::add ( f) const -> typename std::enable_if<detail::is_unsubscribe_function<F>::value, weak_subscription>::type
inline
template<class T, class Observer = observer<T>>
subscriber<T> rxcpp::subscriber< T, Observer >::as_dynamic ( ) const
inline
template<class T, class Observer = observer<T>>
void rxcpp::subscriber< T, Observer >::clear ( ) const
inline
template<class T, class Observer = observer<T>>
trace_id rxcpp::subscriber< T, Observer >::get_id ( ) const
inline
template<class T, class Observer = observer<T>>
const observer_type& rxcpp::subscriber< T, Observer >::get_observer ( ) const
inline
template<class T, class Observer = observer<T>>
observer_type& rxcpp::subscriber< T, Observer >::get_observer ( )
inline
template<class T, class Observer = observer<T>>
const composite_subscription& rxcpp::subscriber< T, Observer >::get_subscription ( ) const
inline
template<class T, class Observer = observer<T>>
composite_subscription& rxcpp::subscriber< T, Observer >::get_subscription ( )
inline
template<class T, class Observer = observer<T>>
bool rxcpp::subscriber< T, Observer >::is_subscribed ( ) const
inline
template<class T, class Observer = observer<T>>
void rxcpp::subscriber< T, Observer >::on_completed ( ) const
inline
template<class T, class Observer = observer<T>>
void rxcpp::subscriber< T, Observer >::on_error ( std::exception_ptr  e) const
inline
template<class T, class Observer = observer<T>>
template<class V >
void rxcpp::subscriber< T, Observer >::on_next ( V &&  v) const
inline
template<class T, class Observer = observer<T>>
this_type& rxcpp::subscriber< T, Observer >::operator= ( this_type  o)
inline
template<class T, class Observer = observer<T>>
void rxcpp::subscriber< T, Observer >::remove ( weak_subscription  w) const
inline
template<class T, class Observer = observer<T>>
void rxcpp::subscriber< T, Observer >::unsubscribe ( ) const
inline

Friends And Related Function Documentation

template<class T, class Observer = observer<T>>
template<class U , class O >
friend class subscriber
friend

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