7 #include "caf/detail/core_export.hpp" 8 #include "caf/error.hpp" 9 #include "caf/exit_reason.hpp" 10 #include "caf/fwd.hpp" 11 #include "caf/message_priority.hpp" 30 static constexpr
size_t anonymous = 0;
33 static constexpr
size_t subscription = 1;
36 static constexpr
size_t observer = 2;
39 token(
const T& tk) : subtype(T::token_type), ptr(&tk) {
49 token(
size_t typenr,
const void* vptr);
65 virtual void actor_exited(
const error& fail_state,
scheduler* sched);
68 virtual bool matches(
const token& what);
73 return matches(
token{T::token_type, &what});
std::unique_ptr< attachable > attachable_ptr
Definition: attachable.hpp:20
A serializable type for storing error codes with category and optional, human-readable context inform...
Definition: error.hpp:50
A scheduler is responsible for managing the execution of resumables.
Definition: scheduler.hpp:18
Represents a pointer to a value with its subtype as type ID number.
Definition: attachable.hpp:28
bool matches(const T &what)
Returns true if what selects this instance, otherwise false.
Definition: attachable.hpp:72
Callback utility class.
Definition: attachable.hpp:23
size_t subtype
Denotes the type of ptr.
Definition: attachable.hpp:44
Root namespace of libcaf.
Definition: custom_types_4.cpp:139
const void * ptr
Any value, used to identify attachable instances.
Definition: attachable.hpp:47