C++ Actor Framework 1.0.0
|
Resembles a regular observable, except that it does not begin emitting items when it is subscribed to. More...
#include <observable.hpp>
Public Types | |
using | output_type = T |
The type of emitted items. | |
using | pimpl_type = intrusive_ptr<op::publish<T>> |
The pointer-to-implementation type. | |
Public Member Functions | |
connectable (pimpl_type pimpl) noexcept | |
connectable & | operator= (std::nullptr_t) noexcept |
connectable (connectable &&) noexcept=default | |
connectable (const connectable &) noexcept=default | |
connectable & | operator= (connectable &&) noexcept=default |
connectable & | operator= (const connectable &) noexcept=default |
observable< T > | auto_connect (size_t subscriber_threshold=1) & |
Returns an observable that automatically connects to this connectable when reaching subscriber_threshold subscriptions. | |
observable< T > | auto_connect (size_t subscriber_threshold=1) && |
Similar to the lvalue overload, but converts this connectable directly if possible, thus saving one hop on the pipeline. | |
observable< T > | ref_count (size_t subscriber_threshold=1) & |
Returns an observable that automatically connects to this connectable when reaching subscriber_threshold subscriptions and disconnects automatically after the last subscriber canceled its subscription. | |
observable< T > | ref_count (size_t subscriber_threshold=1) && |
Similar to the lvalue overload, but converts this connectable directly if possible, thus saving one hop on the pipeline. | |
disposable | connect () |
Connects to the source observable, thus starting to emit items. | |
template<class Fn > | |
auto | compose (Fn &&fn) && |
Transforms this observable by applying a function object to it. | |
template<class... Ts> | |
disposable | subscribe (Ts &&... xs) |
observable< T > | as_observable () const & |
observable< T > | as_observable () && |
const pimpl_type & | pimpl () const noexcept |
bool | valid () const noexcept |
operator bool () const noexcept | |
bool | operator! () const noexcept |
void | swap (connectable &other) |
coordinator * | parent () const |
Resembles a regular observable, except that it does not begin emitting items when it is subscribed to.
Only after calling connect
will the connectable
start to emit items.
Transforms this observable
by applying a function object to it.
coordinator * caf::flow::connectable< T >::parent | ( | ) | const |
valid()
observable< T > caf::flow::connectable< T >::ref_count | ( | size_t | subscriber_threshold = 1 | ) | & |
Returns an observable that automatically connects to this connectable
when reaching subscriber_threshold
subscriptions and disconnects automatically after the last subscriber canceled its subscription.