libcaf  0.15.3
Public Types | Public Member Functions | Static Public Attributes | Friends | Related Functions | List of all members
caf::actor Class Reference

Identifies an untyped actor. More...

#include <actor.hpp>

Inherits comparable< actor >, comparable< actor, actor_addr >, and comparable< actor, strong_actor_ptr >.

Public Types

using signatures = none_t
 

Public Member Functions

 actor (actor &&)=default
 
 actor (const actor &)=default
 
actoroperator= (actor &&)=default
 
actoroperator= (const actor &)=default
 
 actor (const scoped_actor &)
 
 actor (const unsafe_actor_handle_init_t &) CAF_DEPRECATED
 
template<class T , class = typename std::enable_if< std::is_base_of<dynamically_typed_actor_base, T>::value >::type>
 actor (T *ptr)
 
template<class T >
std::enable_if< is_convertible_to_actor< T >::value, actor & >::type operator= (intrusive_ptr< T > ptr)
 
template<class T >
std::enable_if< is_convertible_to_actor< T >::value, actor & >::type operator= (T *ptr)
 
actoroperator= (const scoped_actor &x)
 
 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
 Returns 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 (actor &other) noexcept
 Exchange content of *this and other.
 
bool unsafe () const CAF_DEPRECATED
 Queries whether this object was constructed using unsafe_actor_handle_init or is in moved-from state. More...
 

Static Public Attributes

static constexpr bool has_weak_ptr_semantics = false
 

Friends

class local_actor
 
template<class , class , int >
class actor_cast_access
 
std::string to_string (const actor &x)
 
void append_to_string (std::string &x, const actor &y)
 
template<class Inspector >
Inspector::result_type inspect (Inspector &f, actor &x)
 
void destroy (actor &x)
 Releases the reference held by handle x. More...
 

Related Functions

(Note that these are not member functions.)

template<class... Ts>
actor splice (const actor &x, const actor &y, const Ts &...zs)
 
bool operator== (const actor &lhs, abstract_actor *rhs)
 
bool operator== (abstract_actor *lhs, const actor &rhs)
 
bool operator!= (const actor &lhs, abstract_actor *rhs)
 
bool operator!= (abstract_actor *lhs, const actor &rhs)
 

Detailed Description

Identifies an untyped actor.

Can be used with derived types of event_based_actor, blocking_actor, and actor_proxy.

Examples:
hello_world.cpp.

Member Function Documentation

bool caf::actor::unsafe ( ) const

Queries whether this object was constructed using unsafe_actor_handle_init or is in moved-from state.

Friends And Related Function Documentation

void destroy ( actor x)
friend

Releases the reference held by handle x.

Using the handle after invalidating it is undefined behavior.

bool operator!= ( const actor lhs,
abstract_actor rhs 
)
related
bool operator!= ( abstract_actor lhs,
const actor rhs 
)
related
bool operator== ( const actor lhs,
abstract_actor rhs 
)
related
bool operator== ( abstract_actor lhs,
const actor rhs 
)
related
template<class... Ts>
actor splice ( const actor x,
const actor y,
const Ts &...  zs 
)
related

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