C++ Actor Framework 0.19
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
caf::flow::subscription Class Reference

Controls the flow of items from publishers to subscribers. More...

#include <subscription.hpp>

Classes

class  fwd_impl
 Default implementation for subscriptions that forward request and cancel to a listener. More...
 
class  impl
 Internal interface of a subscription. More...
 
class  impl_base
 Simple base type for all subscription implementations that implements the reference counting member functions. More...
 
class  listener
 Describes a listener to the subscription that will receive an event whenever the observer calls request or cancel. More...
 

Public Member Functions

 subscription (intrusive_ptr< impl > pimpl) noexcept
 
subscriptionoperator= (std::nullptr_t) noexcept
 
 subscription (subscription &&) noexcept=default
 
 subscription (const subscription &) noexcept=default
 
subscriptionoperator= (subscription &&) noexcept=default
 
subscriptionoperator= (const subscription &) noexcept=default
 
void dispose ()
 Causes the publisher to stop producing items for the subscriber.
 
void request (size_t n)
 
bool valid () const noexcept
 
 operator bool () const noexcept
 
bool operator! () const noexcept
 
implptr () noexcept
 
const implptr () const noexcept
 
intrusive_ptr< implas_intrusive_ptr () const &noexcept
 
intrusive_ptr< impl > && as_intrusive_ptr () &&noexcept
 
disposable as_disposable () const &noexcept
 
disposable as_disposable () &&noexcept
 
bool disposed () const noexcept
 
void swap (subscription &other) noexcept
 

Detailed Description

Controls the flow of items from publishers to subscribers.

Member Function Documentation

◆ dispose()

void caf::flow::subscription::dispose ( )

Causes the publisher to stop producing items for the subscriber.

Any in-flight items may still get dispatched.

◆ request()

void caf::flow::subscription::request ( size_t  n)

Precondition
valid()

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