C++ Actor Framework 1.0.0
Loading...
Searching...
No Matches
caf::flow::op::ucast_sub_state< T >::abstract_listener Class Referenceabstract

Interface for listeners that want to be notified when a ucast_sub_state is disposed, has consumed some items, or when its demand hast changed. More...

#include <ucast.hpp>

Public Member Functions

virtual void on_subscribed (ucast_sub_state *state)
 Called when an observer subscribes to the ucast_sub_state.
 
virtual void on_disposed (ucast_sub_state *state, bool from_external)=0
 Called when the ucast_sub_state is disposed.
 
virtual void on_demand_changed (ucast_sub_state *)
 Called when the ucast_sub_state receives new demand.
 
virtual void on_consumed_some (ucast_sub_state *state, size_t old_buffer_size, size_t new_buffer_size)
 Called when the ucast_sub_state has consumed some items.
 

Detailed Description

template<class T>
class caf::flow::op::ucast_sub_state< T >::abstract_listener

Interface for listeners that want to be notified when a ucast_sub_state is disposed, has consumed some items, or when its demand hast changed.

Member Function Documentation

◆ on_consumed_some()

template<class T >
virtual void caf::flow::op::ucast_sub_state< T >::abstract_listener::on_consumed_some ( ucast_sub_state * state,
size_t old_buffer_size,
size_t new_buffer_size )
virtual

Called when the ucast_sub_state has consumed some items.

Parameters
stateThe ucast_sub_state that has consumed items.
old_buffer_sizeThe number of items in the buffer before consuming items.
new_buffer_sizeThe number of items in the buffer after consuming items.

◆ on_subscribed()

template<class T >
virtual void caf::flow::op::ucast_sub_state< T >::abstract_listener::on_subscribed ( ucast_sub_state * state)
virtual

Called when an observer subscribes to the ucast_sub_state.

Parameters
stateThe ucast_sub_state object that was subscribed to.

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