libcaf  0.15.5
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
caf::stream_edge_impl< Base > Class Template Reference

Provides a common scaffold for implementations of the stream_gatherer and stream_scatterer interfaces. More...

#include <stream_edge_impl.hpp>

Inherits Base.

Public Types

using super = Base
 
using path_type = typename super::path_type
 Either inbound_path or outbound_path.
 
using path_ptr = path_type *
 A raw pointer to a path.
 
using path_ptr_vec = std::vector< path_ptr >
 Vector of raw pointers (views) of paths.
 
using path_ptr_iter = typename path_ptr_vec::iterator
 Iterator to a vector of raw pointers.
 
using path_uptr = std::unique_ptr< path_type >
 A unique pointer to a path.
 
using path_uptr_vec = std::vector< path_uptr >
 Vector of owning pointers of paths.
 
using path_uptr_iter = typename path_uptr_vec::iterator
 Iterator to a vector of owning pointers.
 
using regular_shutdown = typename path_type::regular_shutdown
 Message type for sending graceful shutdowns along the path (either stream_msg::drop or stream_msg::close). More...
 
using irregular_shutdown = typename path_type::irregular_shutdown
 Message type for sending errors along the path (either stream_msg::forced_drop or stream_msg::forced_close). More...
 

Public Member Functions

 stream_edge_impl (local_actor *selfptr)
 
const path_uptr_vecpaths () const
 Returns all available paths.
 
local_actor * self () const
 Returns a pointer to the parent actor.
 
bool remove_path (path_uptr_iter i, error reason, bool silent)
 
bool remove_path (const stream_id &sid, const actor_addr &x, error reason, bool silent) override
 
void abort (error reason) override
 
long num_paths () const override
 
bool closed () const override
 
bool continuous () const override
 
void continuous (bool value) override
 
path_ptr path_at (size_t index) override
 
path_ptr find (const stream_id &sid, const actor_addr &x) override
 

Static Public Member Functions

template<class PathContainer >
static void sort_by_credit (PathContainer &xs)
 Sorts xs in descending order by available credit.
 
template<class T , class PathContainer , class F >
static T fold (PathContainer &xs, T init, F f)
 
template<class PathContainer , class Handle >
static path_ptr find (PathContainer &xs, const stream_id &sid, const Handle &x)
 Finds the path for ptr and returns a pointer to it.
 
template<class PathContainer , class Handle >
static PathContainer::iterator iter_find (PathContainer &xs, const stream_id &sid, const Handle &x)
 Finds the path for ptr and returns an iterator to it.
 

Static Public Attributes

static constexpr const auto aborter_type = path_type::aborter_type
 Stream aborter flag to monitor paths.
 

Protected Member Functions

path_ptr add_path_impl (const stream_id &sid, strong_actor_ptr x)
 Adds a path to the edge without emitting messages.
 
template<class F >
void close_impl (F f)
 

Protected Attributes

local_actor * self_
 
path_uptr_vec paths_
 
bool continuous_
 

Detailed Description

template<class Base>
class caf::stream_edge_impl< Base >

Provides a common scaffold for implementations of the stream_gatherer and stream_scatterer interfaces.

Member Typedef Documentation

template<class Base>
using caf::stream_edge_impl< Base >::irregular_shutdown = typename path_type::irregular_shutdown

Message type for sending errors along the path (either stream_msg::forced_drop or stream_msg::forced_close).

template<class Base>
using caf::stream_edge_impl< Base >::regular_shutdown = typename path_type::regular_shutdown

Message type for sending graceful shutdowns along the path (either stream_msg::drop or stream_msg::close).


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