C++ Actor Framework 1.0.0
Loading...
Searching...
No Matches
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 state_ptr_type = mcast_sub_state_ptr<T>
 
using src_ptr = intrusive_ptr<base<T>>
 

Public Member Functions

 publish (coordinator *parent, src_ptr src, size_t max_buf_size=defaults::flow::buffer_size)
 
coordinatorparent () const noexcept override
 Returns the coordinator this object lives on.
 
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
 
void on_consumed_some (state_type *, size_t, size_t) 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 >.

◆ parent()

template<class T >
coordinator * caf::flow::op::publish< T >::parent ( ) const
overridevirtualnoexcept

Returns the coordinator this object lives on.

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: