libcaf  0.13.2
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
caf::abstract_group Class Referenceabstract

A multicast group. More...

#include <abstract_group.hpp>

Inheritance diagram for caf::abstract_group:
caf::abstract_channel caf::ref_counted caf::memory_managed

Classes

class  module
 Interface for user-defined multicast implementations. More...
 

Public Types

using module_ptr = module *
 
using unique_module_ptr = std::unique_ptr< module >
 

Public Member Functions

virtual void serialize (serializer *sink)=0
 
const std::string & identifier () const
 Returns a string representation of the group identifier, e.g., "224.0.0.1" for IPv4 multicast or a user-defined string for local groups. More...
 
module_ptr get_module () const
 
const std::string & module_name () const
 Returns the name of the module.
 
virtual attachable_ptr subscribe (const actor_addr &who)=0
 Subscribes who to this group and returns a subscription object.
 
virtual void stop ()=0
 Stops any background actors or threads and IO handles.
 
- Public Member Functions inherited from caf::abstract_channel
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...
 

Protected Member Functions

 abstract_group (module_ptr module, std::string group_id)
 
virtual void unsubscribe (const actor_addr &who)=0
 
- Protected Member Functions inherited from caf::abstract_channel
int flags () const
 
void flags (int new_value)
 

Protected Attributes

module_ptr module_
 
std::string identifier_
 
- Protected Attributes inherited from caf::ref_counted
std::atomic< size_t > rc_
 

Friends

class detail::group_manager
 
class detail::peer_connection
 
class local_actor
 
class subscription
 

Additional Inherited Members

- Static Public Attributes inherited from caf::abstract_channel
static constexpr int is_abstract_actor_flag = 0x100000
 
static constexpr int is_abstract_group_flag = 0x200000
 

Detailed Description

A multicast group.

Member Function Documentation

const std::string& caf::abstract_group::identifier ( ) const

Returns a string representation of the group identifier, e.g., "224.0.0.1" for IPv4 multicast or a user-defined string for local groups.


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