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

Handle to a consumer of items. More...

#include <observer.hpp>

Inheritance diagram for caf::flow::observer< T >:
caf::detail::comparable< observer< T > >

Classes

class  impl
 Internal interface of an observer. More...
 

Public Types

using input_type = T
 

Public Member Functions

 observer (intrusive_ptr< impl > pimpl) noexcept
 
 observer (observer &&) noexcept=default
 
 observer (const observer &) noexcept=default
 
observeroperator= (observer &&) noexcept=default
 
observeroperator= (const observer &) noexcept=default
 
void release_later ()
 Resets this handle but releases the reference count after the current coordinator cycle.
 
void on_complete ()
 
void on_error (const error &what)
 
void on_subscribe (subscription sub)
 
void on_batch (const async::batch &buf)
 
void on_next (const T &item)
 
bool valid () const noexcept
 
 operator bool () const noexcept
 
bool operator! () const noexcept
 
void swap (observer &other) noexcept
 
intptr_t compare (const observer &other) const noexcept
 
implptr () noexcept
 
const implptr () const noexcept
 

Related Symbols

(Note that these are not member symbols.)

template<class T >
using observer_impl = typename observer<T>::impl
 

Detailed Description

template<class T>
class caf::flow::observer< T >

Handle to a consumer of items.

Member Function Documentation

◆ on_batch()

template<class T >
void caf::flow::observer< T >::on_batch ( const async::batch & buf)
Precondition
valid()

◆ on_complete()

template<class T >
void caf::flow::observer< T >::on_complete ( )
Precondition
valid()
Postcondition
!valid()

◆ on_error()

template<class T >
void caf::flow::observer< T >::on_error ( const error & what)
Precondition
valid()
Postcondition
!valid()

◆ on_next()

template<class T >
void caf::flow::observer< T >::on_next ( const T & item)
Precondition
valid()

◆ on_subscribe()

template<class T >
void caf::flow::observer< T >::on_subscribe ( subscription sub)
Precondition
valid()

◆ release_later()

template<class T >
void caf::flow::observer< T >::release_later ( )

Resets this handle but releases the reference count after the current coordinator cycle.

Postcondition
!valid()

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