C++ Actor Framework 0.18
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
caf::mixin::subscriber< Base, Subtype > Class Template Reference

A subscriber is an actor that can subscribe to a group via self->join(...). More...

#include <subscriber.hpp>

Inheritance diagram for caf::mixin::subscriber< Base, Subtype >:
caf::mixin::subscriber_base

Public Types

using extended_base = subscriber
 Allows subtypes to refer mixed types with a simple name.
 
using subscriptions = std::unordered_set< group >
 A container for storing subscribed groups.
 

Public Member Functions

template<class... Ts>
 subscriber (actor_config &cfg, Ts &&... xs)
 
bool cleanup (error &&fail_state, execution_unit *ptr) override
 
void join (const group &what)
 Causes this actor to subscribe to the group what.
 
void leave (const group &what)
 Causes this actor to leave the group what.
 
const subscriptionsjoined_groups () const
 Returns all subscribed groups.
 

Detailed Description

template<class Base, class Subtype>
class caf::mixin::subscriber< Base, Subtype >

A subscriber is an actor that can subscribe to a group via self->join(...).

Member Function Documentation

◆ join()

template<class Base , class Subtype >
void caf::mixin::subscriber< Base, Subtype >::join ( const group &  what)

Causes this actor to subscribe to the group what.

The group will be unsubscribed if the actor finishes execution.


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