libcaf  0.13.2
Public Member Functions | Static Public Attributes | Protected Member Functions | Friends | List of all members
caf::abstract_channel Class Referenceabstract

Interface for all message receivers. More...

#include <abstract_channel.hpp>

Inheritance diagram for caf::abstract_channel:
caf::ref_counted caf::memory_managed caf::abstract_actor caf::abstract_group caf::actor_pool caf::actor_proxy caf::local_actor caf::forwarding_actor_proxy caf::actor_companion caf::blocking_actor caf::event_based_actor caf::io::broker caf::typed_event_based_actor< Sigs > caf::io::basp_broker

Public Member Functions

virtual void enqueue (const actor_addr &sender, message_id mid, message content, execution_unit *host)=0
 Enqueues a new message to the channel.
 
virtual void enqueue (mailbox_element_ptr what, execution_unit *host)
 Enqueues a new message wrapped in a mailbox_element to the channel. More...
 
node_id node () const
 Returns the ID of the node this actor is running on.
 
bool is_remote () const
 Returns true if node_ptr returns.
 
bool is_abstract_actor () const
 
bool is_abstract_group () const
 
- Public Member Functions inherited from caf::ref_counted
 ref_counted (const ref_counted &)
 
ref_countedoperator= (const ref_counted &)
 
void ref () noexcept
 Increases reference count by one.
 
void deref () noexcept
 Decreases reference count by one and calls request_deletion when it drops to zero. More...
 
bool unique () const noexcept
 Queries whether there is exactly one reference.
 
size_t get_reference_count () const noexcept
 
- Public Member Functions inherited from caf::memory_managed
virtual void request_deletion (bool decremented_rc) noexcept
 Default implementations calls `delete this, but can be overriden in case deletion depends on some condition or the class doesn't use default new/delete. More...
 

Static Public Attributes

static constexpr int is_abstract_actor_flag = 0x100000
 
static constexpr int is_abstract_group_flag = 0x200000
 

Protected Member Functions

int flags () const
 
void flags (int new_value)
 

Friends

class abstract_actor
 
class abstract_group
 

Additional Inherited Members

- Protected Attributes inherited from caf::ref_counted
std::atomic< size_t > rc_
 

Detailed Description

Interface for all message receivers.

Member Function Documentation

virtual void caf::abstract_channel::enqueue ( mailbox_element_ptr  what,
execution_unit host 
)
virtual

Enqueues a new message wrapped in a mailbox_element to the channel.

This variant is used by actors whenever it is possible to allocate mailbox element and message on the same memory block and is thus more efficient. Non-actors use the default implementation which simply calls the pure virtual version.

Reimplemented in caf::actor_pool, and caf::actor_companion.


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