actor-framework
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Related Functions | List of all members
caf::attachable Class Reference

Callback utility class. More...

#include <attachable.hpp>

Inheritance diagram for caf::attachable:
Inheritance graph
[legend]

Classes

struct  token
 Represents a pointer to a value with its subtype as type ID number. More...
 

Public Member Functions

 attachable (const attachable &)=delete
 
attachableoperator= (const attachable &)=delete
 
virtual void actor_exited (const error &fail_state, scheduler *sched)
 Executed if the actor finished execution with given reason. More...
 
virtual bool matches (const token &what)
 Returns true if what selects this instance, otherwise false.
 
template<class T >
bool matches (const T &what)
 Returns true if what selects this instance, otherwise false.
 

Static Public Member Functions

static attachable_ptr make_monitor (actor_addr observed, actor_addr observer, message_priority prio=message_priority::normal)
 
static attachable_ptr make_link (actor_addr observed, actor_addr observer)
 
static attachable_ptr make_stream_aborter (actor_addr observed, actor_addr observer, uint64_t sink_flow_id)
 

Public Attributes

attachable_ptr next
 

Related Functions

(Note that these are not member functions.)

using attachable_ptr = std::unique_ptr< attachable >
 

Detailed Description

Callback utility class.

Member Function Documentation

◆ actor_exited()

void caf::attachable::actor_exited ( const error fail_state,
scheduler sched 
)
virtual

Executed if the actor finished execution with given reason.

The default implementation does nothing.

Warning
host can be nullptr

Reimplemented in caf::default_attachable.

Friends And Related Function Documentation

◆ attachable_ptr

using attachable_ptr = std::unique_ptr<attachable>
related

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