libcaf  0.15.0
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
caf Namespace Reference

Root namespace of libcaf. More...

Namespaces

 exit_reason
 Contains all predefined exit reasons.
 
 io
 Contains all IO-related classes and functions.
 
 mixin
 Contains mixin classes implementing several actor traits.
 
 policy
 Contains policies encapsulating characteristics or algorithms.
 

Classes

class  abstract_actor
 Base class for all actor implementations. More...
 
class  abstract_channel
 Interface for all message receivers. More...
 
class  abstract_composable_behavior
 Marker type that allows CAF to spawn actors from composable states. More...
 
class  abstract_composable_behavior_mixin
 Generates an interface class that provides operator(). More...
 
class  abstract_group
 A multicast group. More...
 
class  actor
 Identifies an untyped actor. More...
 
class  actor_addr
 Stores the address of typed as well as untyped actors. More...
 
class  actor_companion
 An co-existing forwarding all messages through a user-defined callback to another object, thus serving as gateway to allow any object to interact with other actors. More...
 
class  actor_control_block
 Actors are always allocated with a control block that stores its identity as well as strong and weak reference counts to it. More...
 
class  actor_exited
 Thrown if an actor finished execution. More...
 
class  actor_ostream
 Provides support for thread-safe output operations on character streams. More...
 
class  actor_pool
 An actor poool is a lightweight abstraction for a set of workers. More...
 
class  actor_proxy
 Represents an actor running on a remote machine, or different hardware, or in a separate process. More...
 
class  actor_registry
 A registry is used to associate actors to IDs or atoms (names). More...
 
class  actor_system_config
 Configures an actor_system on startup. More...
 
class  arraybuf
 A streambuffer abstraction over a fixed array of bytes. More...
 
struct  atom_constant
 Lifts an atom_value to a compile-time constant. More...
 
class  attachable
 Callback utility class. More...
 
class  behavior
 Describes the behavior of an actor, i.e., provides a message handler and an optional timeout. More...
 
class  bind_failure
 Thrown to indicate that an actor publishing failed because the requested port could not be used. More...
 
class  blocking_actor
 A thread-mapped or context-switching actor using a blocking receive rather than a behavior-stack based message processing. More...
 
class  caf_exception
 Base class for exceptions. More...
 
class  callback
 Describes a simple callback, usually implemented via lambda expression. More...
 
class  callback_impl
 Utility class for wrapping a function object of type Base. More...
 
class  composable_behavior
 Base type for composable actor states. More...
 
class  composable_behavior_based_actor
 Implementation class for spawning composable states directly as actors. More...
 
class  config_option
 Helper class to generate config readers for different input types. More...
 
class  containerbuf
 A streambuffer abstraction over a contiguous container. More...
 
class  continue_helper
 Helper class to enable users to add continuations when dealing with synchronous sends. More...
 
class  data_processor
 A data processor translates an object into a format that can be stored or vice versa. More...
 
class  delegated
 Helper class to indicate that a request has been forwarded. More...
 
class  deserializer
 Technology-independent deserialization interface. More...
 
class  down_msg
 Sent to all actors monitoring an actor when it is terminated. More...
 
class  duration
 Time duration consisting of a time_unit and a 64 bit unsigned integer. More...
 
class  error
 A serializable type for storing error codes with category and optional, human-readable context information. More...
 
class  event_based_actor
 A cooperatively scheduled, event-based actor implementation. More...
 
class  execution_unit
 Identifies an execution unit, e.g., a worker thread of the scheduler. More...
 
class  exit_msg
 Sent to all links when an actor is terminated. More...
 
struct  extend
 Allows convenient definition of types using mixins. More...
 
class  forwarding_actor_proxy
 Implements a simple proxy forwarding all operations to a manager. More...
 
class  function_view
 A function view for an actor hides any messaging from the caller. More...
 
struct  group_down_msg
 Sent to all members of a group when it goes offline. More...
 
class  handle
 Base class for IO handles such as accept_handle or connection_handle. More...
 
struct  illegal_message_element
 Marker class identifying classes in CAF that are not allowed to be used as message element. More...
 
struct  index_mapping
 Marker for representing placeholders at runtime. More...
 
struct  infer_handle_from_class
 Deduces actor for dynamically typed actors, otherwise typed_actor<...> is deduced. More...
 
struct  infer_handle_from_fun
 Deduces an actor handle type from a function or function object. More...
 
struct  infinite_t
 Represents an infinite amount of timeout for specifying "invalid" timeouts. More...
 
class  intrusive_ptr
 An intrusive, reference counting smart pointer implementation. More...
 
struct  invalid_node_id_t
 Objects of this type identify an invalid node_id. More...
 
struct  is_same_ish
 Compares T to U und evaluates to true_type if either `T == U or if T and U are both integral types of the same size and signedness. More...
 
struct  is_typed_actor
 Evaluates to true if T is a typed_actor<...>. More...
 
class  local_actor
 Base class for actors running on this node, either living in an own thread or cooperatively scheduled. More...
 
class  logger
 Centrally logs events from all actors in an actor system. More...
 
class  memory_managed
 This base enables derived classes to enforce a different allocation strategy than new/delete by providing a virtual protected request_deletion() function and non-public destructor. More...
 
class  message
 Describes a fixed-length, copy-on-write, type-erased tuple with elements of any type. More...
 
class  message_builder
 Provides a convenient interface for createing message objects from a series of values using the member function append. More...
 
class  message_handler
 A partial function implementation used to process a message. More...
 
class  message_id
 Denotes whether a message is asynchronous or synchronous. More...
 
class  monitorable_actor
 Base class for all actor implementations. More...
 
class  network_error
 Thrown to indicate that either an actor publishing failed or the middleman was unable to connect to a remote host. More...
 
class  node_id
 A node ID consists of a host ID and process ID. More...
 
struct  none_t
 Represents "nothing", e.g., for clearing an optional by assigning none. More...
 
class  optional
 A since C++17 compatible optional implementation. More...
 
class  optional< T & >
 Template specialization to allow optional to hold a reference rather than an actual value with minimal overhead. More...
 
class  param
 Represents a message handler parameter of type T and guarantees copy-on-write semantics. More...
 
struct  param_decay
 Convenience struct for remove_param<std::decay<T>>. More...
 
class  proxy_registry
 Groups a (distributed) set of actors and allows actors in the same namespace to exchange messages. More...
 
struct  ratio_to_time_unit_helper
 Converts the ratio Num/Denom to a time_unit if the ratio describes seconds, milliseconds, microseconds, or minutes. More...
 
class  ref_counted
 Base class for reference counted objects with an atomic reference count. More...
 
struct  remove_param
 Unpacks param<T> to T. More...
 
class  response_handle
 This helper class identifies an expected response message and enables request(...).then(...). More...
 
class  response_promise
 A response promise can be used to deliver a uniquely identifiable response message from the server (i.e. More...
 
class  resumable
 A cooperatively executed task managed by one or more instances of execution_unit. More...
 
class  scoped_actor
 A scoped handle to a blocking actor. More...
 
class  scoped_execution_unit
 Identifies an execution unit, e.g., a worker thread of the scheduler. More...
 
struct  select_callback
 Utility class for selecting a callback_impl. More...
 
class  serializer
 Technology-independent serialization interface. More...
 
class  skip_t
 
class  spawn_options
 Stores options passed to the spawn function family. More...
 
class  stateful_actor
 An event-based actor with managed state. More...
 
class  stream_deserializer
 Implements the deserializer interface with a binary serialization protocol. More...
 
class  stream_serializer
 Implements the serializer interface with a binary serialization protocol. More...
 
class  sync_timeout_msg
 Sent whenever a timeout occurs during a synchronous send. More...
 
struct  timeout_msg
 Signalizes a timeout event. More...
 
class  type_erased_tuple
 Represents a tuple of type-erased values. More...
 
class  type_erased_value
 Represents a single type-erased value. More...
 
class  type_erased_value_impl
 
struct  type_nr
 Computes the type number for T. More...
 
class  typed_actor
 Identifies a statically typed actor. More...
 
class  typed_event_based_actor
 A cooperatively scheduled, event-based actor implementation with static type-checking. More...
 
class  typed_response_promise
 A response promise can be used to deliver a uniquely identifiable response message from the server (i.e. More...
 
struct  unbox_message_element
 Unboxes atom constants, i.e., converts atom_constant<V> to V. More...
 
struct  unit_t
 Unit is analogous to void, but can be safely returned, stored, etc. More...
 
struct  unsafe_actor_handle_init_t
 Tag type to select the unsafe constructor of actor handles. More...
 
class  variant
 A variant represents always a valid value of one of the types Ts.... More...
 
class  weak_intrusive_ptr
 An intrusive, reference counting smart pointer implementation. More...
 

Typedefs

using actor_factory_result = std::pair< strong_actor_ptr, std::set< std::string >>
 
using actor_factory = std::function< actor_factory_result(actor_config &, message &)>
 
using selfptr_mode_token = spawn_mode_token< spawn_mode::function_with_selfptr >
 
using void_mode_token = spawn_mode_token< spawn_mode::function >
 
using rtti_pair = std::pair< uint16_t, const std::type_info * >
 
using rtti_pair_vec = std::vector< rtti_pair >
 
using rtti_pair_vec_triple = std::tuple< rtti_pair_vec, rtti_pair_vec, rtti_pair_vec >
 
using add_atom = atom_constant< atom("add")>
 Used for request operations.
 
using get_atom = atom_constant< atom("get")>
 Used for request operations.
 
using put_atom = atom_constant< atom("put")>
 Used for request operations.
 
using update_atom = atom_constant< atom("update")>
 Used for signalizing updates, e.g., in a key-value store.
 
using delete_atom = atom_constant< atom("delete")>
 Used for request operations.
 
using ok_atom = atom_constant< atom("ok")>
 Used for response messages.
 
using sys_atom = atom_constant< atom("sys")>
 Used for triggering system-level message handling.
 
using join_atom = atom_constant< atom("join")>
 Used for signaling group subscriptions.
 
using leave_atom = atom_constant< atom("leave")>
 Used for signaling group unsubscriptions.
 
using forward_atom = atom_constant< atom("forward")>
 Used for signaling forwarding paths.
 
using flush_atom = atom_constant< atom("flush")>
 Used for buffer management.
 
using redirect_atom = atom_constant< atom("redirect")>
 Used for I/O redirection.
 
using link_atom = atom_constant< atom("link")>
 Used for link requests over network.
 
using unlink_atom = atom_constant< atom("unlink")>
 Used for removing networked links.
 
using publish_atom = atom_constant< atom("publish")>
 Used for publishing actors at a given port.
 
using unpublish_atom = atom_constant< atom("unpublish")>
 Used for removing an actor/port mapping.
 
using subscribe_atom = atom_constant< atom("subscribe")>
 Used for signalizing group membership.
 
using unsubscribe_atom = atom_constant< atom("unsubscrib")>
 Used for withdrawing group membership.
 
using connect_atom = atom_constant< atom("connect")>
 Used for establishing network connections.
 
using open_atom = atom_constant< atom("open")>
 Used for opening ports or files.
 
using close_atom = atom_constant< atom("close")>
 Used for closing ports or files.
 
using spawn_atom = atom_constant< atom("spawn")>
 Used for spawning remote actors.
 
using migrate_atom = atom_constant< atom("migrate")>
 Used for migrating actors to other nodes.
 
using tick_atom = atom_constant< atom("tick")>
 Used for triggering periodic operations.
 
using binary_deserializer = stream_deserializer< charbuf >
 A stream serializer that writes into an unbounded contiguous character sequence. More...
 
using binary_serializer = stream_serializer< vectorbuf >
 A stream serializer that writes into an unbounded contiguous character sequence. More...
 
using config_value = variant< std::string, double, int64_t, bool, atom_value >
 A variant type for config parameters.
 
using actor_id = uint64_t uint64_t
 
using weak_actor_ptr = weak_intrusive_ptr< actor_control_block >
 
using strong_actor_ptr = intrusive_ptr< actor_control_block >
 
using type_erased_value_ptr = std::unique_ptr< type_erased_value >
 
using mailbox_element_ptr = std::unique_ptr< mailbox_element, detail::disposer >
 
template<spawn_mode X>
using spawn_mode_token = std::integral_constant< spawn_mode, X >
 
template<class Lockable >
using unique_lock = std::unique_lock< Lockable >
 
template<class SharedLockable >
using upgrade_lock = shared_lock< SharedLockable >
 
template<class T >
using param_t = typename std::conditional< std::is_arithmetic< T >::value||is_atom_constant< T >::value, T, param< T > >::type
 Convenience alias that wraps T into param<T> unless T is arithmetic or an atom constant. More...
 
using primitive_variant = variant< int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, uint32_t, uint64_t, float, double, long double, std::string, std::u16string, std::u32string, atom_value, bool >
 
template<class... Is>
using reacts_to = typed_mpi< detail::type_list< Is...>, detail::type_list< void >>
 
using charbuf = arraybuf< char >
 
using vectorbuf = containerbuf< std::vector< char >>
 
using generic_timeout_definition = timeout_definition< std::function< void()>>
 
using sorted_builtin_types = detail::type_list< actor, std::vector< actor >, actor_addr, std::vector< actor_addr >, atom_value, std::vector< char >, down_msg, duration, error, exit_msg, group, group_down_msg, int16_t, int32_t, int64_t, int8_t, long double, message, message_id, node_id, std::string, std::map< std::string, std::string >, strong_actor_ptr, std::set< std::string >, std::vector< std::string >, sync_timeout_msg, timeout_msg, uint16_t, std::u16string, uint32_t, std::u32string, uint64_t, uint8_t, unit_t, weak_actor_ptr, bool, double, float >
 Compile-time list of all built-in types. More...
 
using int_types_by_size = detail::type_list< void, detail::type_pair< int8_t, uint8_t >, detail::type_pair< int16_t, uint16_t >, void, detail::type_pair< int32_t, uint32_t >, void, void, void, detail::type_pair< int64_t, uint64_t > >
 Compile-time list of integer types types.
 

Enumerations

enum  atom_value : uint64_t
 The value type of atoms.
 
enum  time_unit : uint32_t
 SI time units to specify timeouts.
 
enum  exit_reason : uint8_t {
  exit_reason::normal = 0,
  exit_reason::unhandled_exception,
  exit_reason::unknown,
  exit_reason::out_of_workers,
  exit_reason::user_shutdown,
  exit_reason::kill,
  exit_reason::remote_link_unreachable,
  exit_reason::unreachable
}
 This error category represents fail conditions for actors. More...
 
enum  spawn_mode {
  function,
  function_with_selfptr,
  clazz
}
 
enum  invoke_message_result {
  im_success,
  im_skipped,
  im_dropped
}
 
enum  message_priority : uint32_t {
  normal,
  high
}
 
enum  result_runtime_type {
  rt_value,
  rt_error,
  rt_delegated,
  rt_skip
}
 
enum  sec : uint8_t {
  sec::unexpected_message = 1,
  sec::unexpected_response,
  sec::request_receiver_down,
  sec::request_timeout,
  sec::no_actor_published_at_port,
  sec::state_not_serializable,
  sec::unsupported_sys_key,
  sec::unsupported_sys_message,
  sec::disconnect_during_handshake,
  sec::cannot_forward_to_invalid_actor,
  sec::no_route_to_receiving_node,
  sec::failed_to_assign_scribe_from_handle,
  sec::cannot_close_invalid_port,
  sec::cannot_connect_to_node,
  sec::cannot_open_port,
  sec::cannot_spawn_actor_from_arguments,
  sec::no_such_riac_node
}
 SEC stands for "System Error Code". More...
 

Functions

std::string to_string (abstract_actor::linking_operation op)
 
actor operator* (actor f, actor g)
 Combine f and g so that (f*g)(x) = f(g(x)).
 
template<class T , class U >
actor_cast (U &&what)
 Converts actor handle what to a different actor handle or raw pointer of type T. More...
 
template<class F >
actor_factory make_actor_factory (F fun)
 
template<class T , class... Ts>
actor_factory_result dyn_spawn_class (actor_config &cfg, message &msg)
 
template<class T , class... Ts>
actor_factory make_actor_factory ()
 
actor_ostream aout (local_actor *self)
 Convenience factory function for creating an actor output stream.
 
actor_ostream aout (scoped_actor &self)
 Convenience factory function for creating an actor output stream.
 
template<class T >
std::string get_mpi_field (const uniform_type_info_map &types)
 
template<class T >
std::string get_rtti_from_mpi (const uniform_type_info_map &types)
 
template<class Rep , class Period >
constexpr timeout_definition_builder after (const std::chrono::duration< Rep, Period > &d)
 Returns a generator for timeouts.
 
std::string to_string (const atom_value &x)
 
template<size_t Size>
constexpr atom_value atom (char const (&str)[Size])
 Creates an atom from given string literal.
 
template<atom_value V>
std::string to_string (const atom_constant< V > &)
 
template<class T >
constexpr bool statically_typed ()
 
template<class T , class... Fs>
void init_behavior_impl (T *, detail::type_list<>, behavior &storage, Fs...fs)
 
template<class T , class... Xs, class... Ys, class... Ts, class... Fs>
void init_behavior_impl (T *thisptr, detail::type_list< typed_mpi< detail::type_list< Xs...>, detail::type_list< Ys...>>, Ts...>, behavior &storage, Fs...fs)
 
template<class T >
std::unique_ptr< config_optionmake_config_option (T &storage, const char *category, const char *name, const char *explanation)
 
template<class... Ts>
std::string deep_to_string_as_tuple (Ts &&...xs)
 Convenience function returning deep_to_string(std::forward_as_tuple(xs...)). More...
 
template<class... Ts>
bool operator== (const delegated< Ts...> &, const delegated< Ts...> &)
 
template<class T >
auto operator& (deserializer &source, T &x) -> decltype(source.apply(x))
 
std::string to_string (const time_unit &x)
 Relates time_unit.
 
std::string to_string (const duration &x)
 
template<class... Ts, class F = void (*)(actor_system&)>
int exec_main (F fun, int argc, char **argv, const char *config_file_name="caf-application.ini")
 
const char * to_string (exit_reason x)
 Returns a string representation of given exit reason.
 
bool operator== (const index_mapping &x, const index_mapping &y)
 
template<class Processor >
void serialize (Processor &proc, index_mapping &x, const unsigned int)
 
std::string to_string (const index_mapping &x)
 
constexpr const char * to_string (invoke_message_result x)
 
std::string to_string (const mailbox_element &)
 
template<class T , class R = infer_handle_from_class_t<T>, class... Ts>
make_actor (actor_id aid, node_id nid, actor_system *sys, Ts &&...xs)
 
bool operator< (const match_case_info &x, const match_case_info &y)
 
template<class F >
std::enable_if< !std::is_base_of< match_case, F >::value, std::tuple< trivial_match_case< F > >>::type to_match_case_tuple (F fun)
 
template<class MatchCase >
std::enable_if< std::is_base_of< match_case, MatchCase >::value, std::tuple< const MatchCase & >>::type to_match_case_tuple (const MatchCase &x)
 
template<class... Ts>
const std::tuple< Ts...> & to_match_case_tuple (const std::tuple< Ts...> &x)
 
template<class T , class U >
std::enable_if< std::is_base_of< match_case, T >::value||std::is_base_of< match_case, U >::value >::type operator, (T, U)
 
bool operator== (const node_id &lhs, const node_id &rhs)
 
bool operator== (const node_id &lhs, invalid_node_id_t)
 
bool operator!= (const node_id &lhs, const node_id &rhs)
 
bool operator!= (const node_id &lhs, invalid_node_id_t)
 
bool operator< (const node_id &lhs, const node_id &rhs)
 
template<class T >
std::enable_if< std::is_same< T *, resumable * >::value >::type intrusive_ptr_add_ref (T *ptr)
 
template<class T >
std::enable_if< std::is_same< T *, resumable * >::value >::type intrusive_ptr_release (T *ptr)
 
std::string to_string (const scoped_actor &x)
 
template<message_priority P = message_priority::normal, class Source = actor, class Dest = actor, class... Ts>
void send_as (const Source &src, const Dest &dest, Ts &&...xs)
 Sends to a message under the identity of from with priority prio.
 
template<message_priority P = message_priority::normal, class Dest = actor, class... Ts>
void anon_send (const Dest &dest, Ts &&...xs)
 Anonymously sends dest a message.
 
template<class Dest >
void anon_send_exit (const Dest &dest, exit_reason reason)
 Anonymously sends dest an exit message.
 
void anon_send_exit (const actor_addr &to, exit_reason reason)
 Anonymously sends to an exit message.
 
template<class T >
std::enable_if< std::is_same< void, decltype(std::declval< serializer & >).apply(std::declval< T & >))) >::value, serializer & >::type operator<< (serializer &sink, const T &x)
 
template<class T >
std::enable_if< std::is_same< void, decltype(std::declval< serializer & >).apply(std::declval< T & >))) >::value, serializer & >::type operator<< (serializer &sink, T &x)
 
template<class T >
auto operator& (serializer &sink, T &x) -> decltype(sink.apply(x))
 
std::string is_any_of (std::string arg)
 
template<class Container , class Delim >
void split (Container &result, const std::string &str, const Delim &delims, bool keep_all=true)
 
template<class Container >
std::string join (const Container &c, const std::string &glue)
 
void splice (std::string &, const std::string &)
 
template<class T , class... Ts>
void splice (std::string &str, const std::string &glue, T &&arg, Ts &&...xs)
 
template<ptrdiff_t WhatSize, ptrdiff_t WithSize>
void replace_all (std::string &str, const char(&what)[WhatSize], const char(&with)[WithSize])
 
template<size_t S>
bool starts_with (const std::string &str, const char(&prefix)[S])
 
template<class T >
std::enable_if< std::is_arithmetic< T >::value, std::string >::type convert_to_str (T value)
 
std::string convert_to_str (std::string value)
 
std::string to_string (const exit_msg &x)
 
template<class Processor >
void serialize (Processor &proc, exit_msg &x, const unsigned int)
 
std::string to_string (const down_msg &x)
 
template<class Processor >
void serialize (Processor &proc, down_msg &x, const unsigned int)
 
std::string to_string (const group_down_msg &x)
 
std::string to_string (const sync_timeout_msg &)
 
std::string to_string (const timeout_msg &x)
 
template<class... Ts>
type_erased_tuple_view< Ts...> make_type_erased_tuple_view (Ts &...xs)
 
template<class... Ts>
constexpr uint32_t make_type_token ()
 
constexpr uint32_t add_to_type_token (uint32_t token, uint16_t tnr)
 
template<class T >
constexpr uint32_t make_type_token_from_list ()
 
template<class... Xs, class... Ts>
detail::mpi_splice< typed_actor, detail::type_list< Xs...>, typename Ts::signatures...>::type splice (const typed_actor< Xs...> &x, const Ts &...xs)
 

Variables

constexpr actor_id invalid_actor_id = 0
 Denotes an ID that is never used by an actor.
 
constexpr deep_to_string_t deep_to_string = deep_to_string_t{}
 Unrolls collections such as vectors/maps, decomposes tuples/pairs/arrays, auto-escapes strings and calls to_string for user-defined types via argument-dependent loopkup (ADL). More...
 
static constexpr infinite_t infinite = infinite_t{}
 
constexpr invalid_message_id_t invalid_message_id = invalid_message_id_t{}
 
static constexpr none_t none = none_t{}
 
constexpr skip_t skip = skip_t{}
 Tells the runtime system to skip a message when used as message handler, i.e., causes the runtime to leave the message in the mailbox of an actor. More...
 
constexpr spawn_options no_spawn_options = spawn_options::no_flags
 Denotes default settings.
 
constexpr spawn_options monitored = spawn_options::monitor_flag
 Causes spawn to call `self->monitor(...) immediately after the new actor was spawned. More...
 
constexpr spawn_options linked = spawn_options::link_flag
 Causes spawn to call `self->link_to(...) immediately after the new actor was spawned. More...
 
constexpr spawn_options detached = spawn_options::detach_flag
 Causes the new actor to opt out of the cooperative scheduling.
 
constexpr spawn_options hidden = spawn_options::hide_flag
 Causes the runtime to ignore the new actor in await_all_actors_done().
 
constexpr spawn_options priority_aware = spawn_options::priority_aware_flag
 Causes the new actor to evaluate message priorities. More...
 
constexpr spawn_options lazy_init = spawn_options::lazy_init_flag
 Causes the new actor to delay its initialization until a message arrives. More...
 
constexpr bool token_compress_on = false
 
static constexpr size_t type_nrs
 The number of built-in types. More...
 
const char * numbered_type_names []
 List of all type names, indexed via type_nr.
 
static constexpr unit_t unit = unit_t{}
 
static constexpr unsafe_actor_handle_init_t unsafe_actor_handle_init = unsafe_actor_handle_init_t{}
 

Detailed Description

Root namespace of libcaf.

Typedef Documentation

A stream serializer that writes into an unbounded contiguous character sequence.

A stream serializer that writes into an unbounded contiguous character sequence.

template<class T >
using caf::param_t = typedef typename std::conditional< std::is_arithmetic<T>::value || is_atom_constant<T>::value, T, param<T> >::type

Convenience alias that wraps T into param<T> unless T is arithmetic or an atom constant.

using caf::sorted_builtin_types = typedef detail::type_list< actor, std::vector<actor>, actor_addr, std::vector<actor_addr>, atom_value, std::vector<char>, down_msg, duration, error, exit_msg, group, group_down_msg, int16_t, int32_t, int64_t, int8_t, long double, message, message_id, node_id, std::string, std::map<std::string, std::string>, strong_actor_ptr, std::set<std::string>, std::vector<std::string>, sync_timeout_msg, timeout_msg, uint16_t, std::u16string, uint32_t, std::u32string, uint64_t, uint8_t, unit_t, weak_actor_ptr, bool, double, float >

Compile-time list of all built-in types.

Warning
Types are sorted by uniform name.

Enumeration Type Documentation

enum caf::exit_reason : uint8_t
strong

This error category represents fail conditions for actors.

Enumerator
normal 

Indicates that an actor finished execution without error.

unhandled_exception 

Indicates that an actor died because of an unhandled exception.

unknown 

Indicates that the exit reason for this actor is unknown, i.e., the actor has been terminated and no longer exists.

out_of_workers 

Indicates that an actor pool unexpectedly ran out of workers.

user_shutdown 

Indicates that an actor was forced to shutdown by a user-generated event.

kill 

Indicates that an actor was killed unconditionally.

remote_link_unreachable 

Indicates that an actor finishied execution because a connection to a remote link was closed unexpectedly.

unreachable 

Indicates that an actor was killed because it became unreachable.

enum caf::sec : uint8_t
strong

SEC stands for "System Error Code".

This enum contains error codes used internally by CAF.

Enumerator
unexpected_message 

Indicates that an actor dropped an unexpected message.

unexpected_response 

Indicates that a response message did not match the provided handler.

request_receiver_down 

Indicates that the receiver of a request is no longer alive.

request_timeout 

Indicates that a request message timed out.

no_actor_published_at_port 

Unpublishing failed because the actor is not bound to given port.

state_not_serializable 

Migration failed because the state of an actor is not serializable.

unsupported_sys_key 

An actor received an unsupported key for `('sys', 'get', key)` messages.

unsupported_sys_message 

An actor received an unsupported system message.

disconnect_during_handshake 

A remote node disconnected during CAF handshake.

cannot_forward_to_invalid_actor 

Tried to forward a message via BASP to an invalid actor handle.

no_route_to_receiving_node 

Tried to forward a message via BASP to an unknown node ID.

failed_to_assign_scribe_from_handle 

Middleman could not assign a connected handle to a broker.

cannot_close_invalid_port 

User requested to close port 0 or to close a port not managed by CAF.

cannot_connect_to_node 

Middleman could not connect to a remote node.

cannot_open_port 

Middleman could not open requested port.

cannot_spawn_actor_from_arguments 

A remote spawn failed because the provided types did not match.

no_such_riac_node 

Requested RIAC information about a node that does not exist.

Function Documentation

template<class T , class U >
T caf::actor_cast ( U &&  what)

Converts actor handle what to a different actor handle or raw pointer of type T.

template<class... Ts>
std::string caf::deep_to_string_as_tuple ( Ts &&...  xs)

Convenience function returning deep_to_string(std::forward_as_tuple(xs...)).

Variable Documentation

constexpr deep_to_string_t caf::deep_to_string = deep_to_string_t{}

Unrolls collections such as vectors/maps, decomposes tuples/pairs/arrays, auto-escapes strings and calls to_string for user-defined types via argument-dependent loopkup (ADL).

Any user-defined type that does not provide a to_string is mapped to <unprintable>.

constexpr skip_t caf::skip = skip_t{}

Tells the runtime system to skip a message when used as message handler, i.e., causes the runtime to leave the message in the mailbox of an actor.

constexpr size_t caf::type_nrs
static
Initial value:
= detail::tl_size<sorted_builtin_types>::value
+ 1

The number of built-in types.