C++ Actor Framework 0.19
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
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::disposable::impl

Public Member Functions

 fwd_impl (coordinator *ctx, listener *src, coordinated *snk)
 
bool disposed () const noexcept override
 
void request (size_t n) override
 Signals demand for n more items.
 
void dispose () override
 
auto * ctx () const noexcept
 
- Public Member Functions inherited from caf::flow::subscription::impl_base
void ref_disposable () const noexcept final
 
void deref_disposable () const noexcept final
 
- 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.
 
virtual void request (size_t n)=0
 Signals demand for n more items.
 
- Public Member Functions inherited from caf::disposable::impl
virtual void dispose ()=0
 
virtual bool disposed () const noexcept=0
 
disposable as_disposable () noexcept
 
virtual void ref_disposable () const noexcept=0
 
virtual void deref_disposable () const noexcept=0
 

Static Public Member Functions

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

Additional Inherited Members

- 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

◆ dispose()

void caf::flow::subscription::fwd_impl::dispose ( )
overridevirtual

Implements caf::disposable::impl.

◆ disposed()

bool caf::flow::subscription::fwd_impl::disposed ( ) const
overridevirtualnoexcept

Implements caf::disposable::impl.

◆ make()

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

Creates a new subscription object.

Parameters
ctxThe 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.

◆ 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: