C++ Actor Framework  0.18
Public Types | Public Member Functions | Static Public Attributes | Friends | Related Functions | List of all members
caf::typed_actor< Sigs > Class Template Reference

Identifies a statically typed actor. More...

#include <typed_actor.hpp>

Inheritance diagram for caf::typed_actor< Sigs >:
Inheritance graph
Collaboration diagram for caf::typed_actor< Sigs >:
Collaboration graph

Public Types

using signatures = detail::type_list< Sigs... >
 Stores the template parameter pack.
 
template<class... Es>
using extend = typed_actor< Sigs..., Es... >
 Creates a new typed_actor type by extending this one with Es....
 
template<class... Ts>
using extend_with = typename detail::extend_with_helper< typed_actor, Ts... >::type
 Creates a new typed_actor type by extending this one with another typed_actor. More...
 
using behavior_type = typed_behavior< Sigs... >
 Identifies the behavior type actors of this kind use for their behavior stack. More...
 
using impl = typed_event_based_actor< Sigs... >
 The default, event-based type for implementing this messaging interface.
 
using pointer = impl *
 Identifies pointers to instances of this kind of actor.
 
using pointer_view = typed_actor_pointer< Sigs... >
 A view to an actor that implements this messaging interface without knowledge of the actual type. More...
 
using base = impl
 A class type suitable as base type class-based implementations.
 
template<class State >
using stateful_impl = stateful_actor< State, impl >
 The default, event-based type for implementing this messaging interface as a stateful actor. More...
 
using instead = stateful_actor< State, base >
 
template<class State >
using stateful_pointer = stateful_impl< State > *
 Convenience alias for stateful_impl<State>*.
 
using broker_pointer = io::typed_broker< Sigs... > *
 Identifies pointers to brokers implementing this interface.
 
using broker_base = io::typed_broker< Sigs... >
 Identifies the base class of brokers implementing this interface.
 
template<class State >
using stateful_broker_base = stateful_actor< State, broker_base >
 Identifies the broker_base class for this kind of actor with actor.
 
template<class State >
using stateful_broker_pointer = stateful_actor< State, broker_base > *
 Identifies the broker_base class for this kind of actor with actor.
 

Public Member Functions

 typed_actor (typed_actor &&)=default
 
 typed_actor (const typed_actor &)=default
 
typed_actoroperator= (typed_actor &&)=default
 
typed_actoroperator= (const typed_actor &)=default
 
template<class... Ts>
 typed_actor (const typed_actor< Ts... > &other)
 
template<class T , class = detail::enable_if_t<actor_traits<T>::is_statically_typed>>
 typed_actor (T *ptr)
 
template<class T , class = std::enable_if_t< std::is_base_of<typed_actor_view_base, T>::value>>
 typed_actor (T ptr)
 
template<class... Ts>
typed_actoroperator= (const typed_actor< Ts... > &other)
 
typed_actoroperator= (std::nullptr_t)
 
 operator bool () const
 Queries whether this actor handle is valid.
 
bool operator! () const
 Queries whether this actor handle is invalid.
 
actor_addr address () const noexcept
 Queries the address of the stored actor.
 
actor_id id () const noexcept
 Returns the ID of this actor.
 
node_id node () const noexcept
 Returns the origin node of this actor.
 
actor_systemhome_system () const noexcept
 Returns the hosting actor system.
 
void swap (typed_actor &other) noexcept
 Exchange content of *this and other.
 

Static Public Attributes

static constexpr bool has_weak_ptr_semantics = false
 

Friends

class local_actor
 
template<class >
class data_processor
 
template<class... >
class typed_actor
 
template<class , class , int >
class actor_cast_access
 

Related Functions

(Note that these are not member functions.)

template<class... Xs, class... Ys>
bool operator== (const typed_actor< Xs... > &x, const typed_actor< Ys... > &y) noexcept
 
template<class... Xs, class... Ys>
bool operator!= (const typed_actor< Xs... > &x, const typed_actor< Ys... > &y) noexcept
 
template<class... Xs>
bool operator== (const typed_actor< Xs... > &x, std::nullptr_t) noexcept
 
template<class... Xs>
bool operator== (std::nullptr_t, const typed_actor< Xs... > &x) noexcept
 
template<class... Xs>
bool operator!= (const typed_actor< Xs... > &x, std::nullptr_t) noexcept
 
template<class... Xs>
bool operator!= (std::nullptr_t, const typed_actor< Xs... > &x) noexcept
 
template<class... Xs, class... Ys>
composed_type_t< detail::type_list< Xs... >, detail::type_list< Ys... > > operator* (typed_actor< Xs... > f, typed_actor< Ys... > g)
 Returns a new actor that implements the composition f.g(x) = f(g(x)).
 

Detailed Description

template<class... Sigs>
class caf::typed_actor< Sigs >

Identifies a statically typed actor.

Template Parameters
SigsFunction signatures for all accepted messages.
Examples:
dining_philosophers.cpp.

Member Typedef Documentation

◆ behavior_type

template<class... Sigs>
using caf::typed_actor< Sigs >::behavior_type = typed_behavior<Sigs...>

Identifies the behavior type actors of this kind use for their behavior stack.

◆ extend_with

template<class... Sigs>
template<class... Ts>
using caf::typed_actor< Sigs >::extend_with = typename detail::extend_with_helper<typed_actor, Ts...>::type

Creates a new typed_actor type by extending this one with another typed_actor.

◆ pointer_view

template<class... Sigs>
using caf::typed_actor< Sigs >::pointer_view = typed_actor_pointer<Sigs...>

A view to an actor that implements this messaging interface without knowledge of the actual type.

◆ stateful_impl

template<class... Sigs>
template<class State >
using caf::typed_actor< Sigs >::stateful_impl = stateful_actor<State, impl>

The default, event-based type for implementing this messaging interface as a stateful actor.

Friends And Related Function Documentation

◆ operator!=() [1/3]

template<class... Xs, class... Ys>
bool operator!= ( const typed_actor< Xs... > &  x,
const typed_actor< Ys... > &  y 
)
related

◆ operator!=() [2/3]

template<class... Xs>
bool operator!= ( const typed_actor< Xs... > &  x,
std::nullptr_t   
)
related

◆ operator!=() [3/3]

template<class... Xs>
bool operator!= ( std::nullptr_t  ,
const typed_actor< Xs... > &  x 
)
related

◆ operator==() [1/3]

template<class... Xs, class... Ys>
bool operator== ( const typed_actor< Xs... > &  x,
const typed_actor< Ys... > &  y 
)
related

◆ operator==() [2/3]

template<class... Xs>
bool operator== ( const typed_actor< Xs... > &  x,
std::nullptr_t   
)
related

◆ operator==() [3/3]

template<class... Xs>
bool operator== ( std::nullptr_t  ,
const typed_actor< Xs... > &  x 
)
related

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