C++ Actor Framework 1.0.0
Loading...
Searching...
No Matches
caf::flow::buffer_writer_impl< Buffer > Class Template Reference

Writes observed values to a bounded buffer. More...

#include <observer.hpp>

Inheritance diagram for caf::flow::buffer_writer_impl< Buffer >:
caf::detail::atomic_ref_counted caf::async::producer

Public Types

using buffer_ptr = intrusive_ptr<Buffer>
 
using value_type = typename Buffer::value_type
 

Public Member Functions

 buffer_writer_impl (coordinator *parent)
 
void init (buffer_ptr buf)
 
void ref_coordinated () const noexcept final
 
void deref_coordinated () const noexcept final
 
void ref_producer () const noexcept final
 Increases the reference count of the producer.
 
void deref_producer () const noexcept final
 Decreases the reference count of the producer and destroys the object if necessary.
 
coordinatorparent () const noexcept override
 
void on_next (const value_type &item) override
 
void on_complete () override
 
void on_error (const error &what) override
 
void on_subscribe (subscription sub) override
 
void on_consumer_ready () override
 Called to signal that the consumer started handling events.
 
void on_consumer_cancel () override
 Called to signal that the consumer stopped handling events.
 
void on_consumer_demand (size_t demand) override
 Called to signal that the consumer requests more events.
 
- Public Member Functions inherited from caf::detail::atomic_ref_counted
 atomic_ref_counted (const atomic_ref_counted &)
 
atomic_ref_countedoperator= (const atomic_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.
 

Friends

void intrusive_ptr_add_ref (const buffer_writer_impl *ptr) noexcept
 
void intrusive_ptr_release (const buffer_writer_impl *ptr) noexcept
 

Additional Inherited Members

- Protected Attributes inherited from caf::detail::atomic_ref_counted
std::atomic< size_t > rc_
 

Detailed Description

template<class Buffer>
class caf::flow::buffer_writer_impl< Buffer >

Writes observed values to a bounded buffer.

Member Function Documentation

◆ deref_producer()

template<class Buffer >
void caf::flow::buffer_writer_impl< Buffer >::deref_producer ( ) const
finalvirtualnoexcept

Decreases the reference count of the producer and destroys the object if necessary.

Implements caf::async::producer.

◆ on_consumer_cancel()

template<class Buffer >
void caf::flow::buffer_writer_impl< Buffer >::on_consumer_cancel ( )
overridevirtual

Called to signal that the consumer stopped handling events.

Implements caf::async::producer.

◆ on_consumer_demand()

template<class Buffer >
void caf::flow::buffer_writer_impl< Buffer >::on_consumer_demand ( size_t demand)
overridevirtual

Called to signal that the consumer requests more events.

Implements caf::async::producer.

◆ on_consumer_ready()

template<class Buffer >
void caf::flow::buffer_writer_impl< Buffer >::on_consumer_ready ( )
overridevirtual

Called to signal that the consumer started handling events.

Implements caf::async::producer.

◆ ref_producer()

template<class Buffer >
void caf::flow::buffer_writer_impl< Buffer >::ref_producer ( ) const
finalvirtualnoexcept

Increases the reference count of the producer.

Implements caf::async::producer.


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