C++ Actor Framework 1.0.0
Loading...
Searching...
No Matches
caf::typed_event_based_actor< TraitOrSignature > Class Template Reference

A cooperatively scheduled, event-based actor implementation with static type-checking. More...

#include <typed_event_based_actor.hpp>

Inheritance diagram for caf::typed_event_based_actor< TraitOrSignature >:
caf::statically_typed_actor_base

Public Types

using super
 
using trait = detail::to_statically_typed_trait_t<TraitOrSignature>
 
using signatures = typename trait::signatures
 
using behavior_type = typed_behavior<trait>
 
using actor_hdl = typed_actor<trait>
 

Public Member Functions

std::set< std::string > message_types () const override
 
void initialize () override
 
template<class... Args>
auto mail (Args &&... args)
 Starts a new message.
 
template<class T , class... Ts>
void become (T &&arg, Ts &&... args)
 Changes the behavior of this actor.
 
void unbecome ()
 Removes the last added behavior.
 

Protected Member Functions

virtual behavior_type make_behavior ()
 

Detailed Description

template<class TraitOrSignature>
class caf::typed_event_based_actor< TraitOrSignature >

A cooperatively scheduled, event-based actor implementation with static type-checking.

actor

Member Typedef Documentation

◆ super

template<class TraitOrSignature >
using caf::typed_event_based_actor< TraitOrSignature >::super
Initial value:
typename extend<scheduled_actor,
typed_event_based_actor<TraitOrSignature>>::
template with<mixin::sender, mixin::requester>

Member Function Documentation

◆ become()

template<class TraitOrSignature >
template<class T , class... Ts>
void caf::typed_event_based_actor< TraitOrSignature >::become ( T && arg,
Ts &&... args )

Changes the behavior of this actor.

◆ unbecome()

template<class TraitOrSignature >
void caf::typed_event_based_actor< TraitOrSignature >::unbecome ( )

Removes the last added behavior.

Terminates the actor if there are no behaviors left.


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