C++ Actor Framework 1.0.0
Loading...
Searching...
No Matches
caf::flow::subscription::fwd_impl Class Referencefinal

Default implementation for subscriptions that forward request and cancel to a listener. More...

#include <subscription.hpp>

Inheritance diagram for caf::flow::subscription::fwd_impl:
caf::flow::subscription::impl_base caf::detail::plain_ref_counted caf::flow::subscription::impl caf::flow::coordinated

Public Member Functions

 fwd_impl (coordinator *parent, listener *src, coordinated *snk)
 
bool disposed () const noexcept override
 
void request (size_t n) override
 Signals demand for n more items.
 
coordinatorparent () const noexcept override
 Returns the coordinator this object lives on.
 
- Public Member Functions inherited from caf::flow::subscription::impl_base
void ref_disposable () const noexcept override
 
void deref_disposable () const noexcept override
 
void ref_coordinated () const noexcept override
 Increases the reference count of the coordinated.
 
void deref_coordinated () const noexcept override
 Decreases the reference count of the coordinated and destroys the object if necessary.
 
void dispose () final
 
void cancel () final
 Signals that the observer is no longer interested in receiving items.
 
- Public Member Functions inherited from caf::detail::plain_ref_counted
 plain_ref_counted (const plain_ref_counted &)
 
plain_ref_countedoperator= (const plain_ref_counted &)
 
void ref () const noexcept
 Increases reference count by one.
 
void deref () const noexcept
 Decreases reference count by one and calls request_deletion when it drops to zero.
 
bool unique () const noexcept
 Queries whether there is exactly one reference.
 
size_t get_reference_count () const noexcept
 Queries the current reference count for this object.
 

Static Public Member Functions

template<class Observable , class Observer >
static subscription make (coordinator *parent, Observable *src, Observer *snk)
 Creates a new subscription object.
 
static subscription make_unsafe (coordinator *parent, listener *src, coordinated *snk)
 Like make but without any type checking.
 

Additional Inherited Members

- Public Types inherited from caf::flow::subscription::impl
using handle_type = subscription
 
- Protected Attributes inherited from caf::detail::plain_ref_counted
size_t rc_
 

Detailed Description

Default implementation for subscriptions that forward request and cancel to a listener.

Member Function Documentation

◆ make()

template<class Observable , class Observer >
static subscription caf::flow::subscription::fwd_impl::make ( coordinator * parent,
Observable * src,
Observer * snk )
static

Creates a new subscription object.

Parameters
parentThe owner of src and snk.
srcThe observable that emits items.
snkthe observer that consumes items.
Returns
an instance of fwd_impl in a subscription handle.

◆ parent()

coordinator * caf::flow::subscription::fwd_impl::parent ( ) const
overridevirtualnoexcept

Returns the coordinator this object lives on.

Implements caf::flow::coordinated.

◆ request()

void caf::flow::subscription::fwd_impl::request ( size_t n)
overridevirtual

Signals demand for n more items.

Implements caf::flow::subscription::impl.


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