C++ Actor Framework 0.19
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
caf::flow::op::publish< T > Class Template Reference

Publishes the items from a single operator to multiple subscribers. More...

#include <publish.hpp>

Inherits caf::flow::op::mcast< T >, and observer_impl< T >.

Public Types

using super = mcast< T >
 
using state_type = typename super::state_type
 
using src_ptr = intrusive_ptr< base< T > >
 

Public Member Functions

 publish (coordinator *ctx, src_ptr src, size_t max_buf_size=defaults::flow::buffer_size)
 
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.
 
disposable subscribe (observer< T > out) override
 Subscribes a new observer to the operator.
 
disposable connect ()
 
void auto_connect_threshold (size_t new_value)
 
void auto_disconnect (bool new_value)
 
bool connected () const noexcept
 
void on_next (const T &item) override
 
void on_complete () override
 
void on_error (const error &what) override
 
void on_subscribe (subscription in) override
 

Protected Member Functions

void try_request_more ()
 

Friends

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

Detailed Description

template<class T>
class caf::flow::op::publish< T >

Publishes the items from a single operator to multiple subscribers.

Member Function Documentation

◆ deref_coordinated()

template<class T >
void caf::flow::op::publish< T >::deref_coordinated ( ) const
overridevirtualnoexcept

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

Reimplemented from caf::flow::op::hot< T >.

◆ ref_coordinated()

template<class T >
void caf::flow::op::publish< T >::ref_coordinated ( ) const
overridevirtualnoexcept

Increases the reference count of the coordinated.

Reimplemented from caf::flow::op::hot< T >.

◆ subscribe()

template<class T >
disposable caf::flow::op::publish< T >::subscribe ( observer< T >  what)
overridevirtual

Subscribes a new observer to the operator.

Implements caf::flow::op::base< T >.


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