qb  2.0.0.0
C++17 Actor Framework
qb Issue Watch Star Fork Follow @isndev
Loading...
Searching...
No Matches

Defines actors, their identification, and lifecycle management. More...

Collaboration diagram for Actor Components:

Files

file  actor.h
 Convenience header for the core QB Actor components.
file  actorid.h
 Convenience header for QB ActorId and related identifiers.

Classes

class  qb::Actor
 Base class for all actors in the qb framework. More...
class  qb::Service
 Internal base class for services. More...
class  qb::ServiceActor< Tag >
 SingletonActor base class, ensuring one instance per VirtualCore per Tag. More...
interface  qb::IActorFactory
 Interface for actor factory classes. More...
class  qb::ActorProxy
 Internal helper class for actor type and name management. More...
struct  qb::actor_factory_param< T >
 Utility struct for processing actor factory constructor arguments. More...
class  qb::TActorFactory< _Actor, _Args >
 Templated actor factory implementation. More...
class  qb::ActorId
 Unique identifier for actors. More...
class  qb::BroadcastId
 Specialized ActorId for broadcasting messages to all actors on a core. More...

Typedefs

using qb::actor = Actor
 Alias for the Actor class.
template<typename Tag>
using qb::service_actor = ServiceActor<Tag>
 Alias for the ServiceActor template class.

Functions

template<typename T>
auto qb::actor_factory_forward (T &&val)
 Utility function for forwarding and transforming arguments to actor factory.
std::ostream & qb::operator<< (std::ostream &os, qb::Actor const &actor)
 Stream output operator for Actor objects.
 qb::CoreIdBitSet::CoreIdBitSet ()=default
 Default constructor - creates an empty set.
 qb::CoreIdBitSet::CoreIdBitSet (const qb::unordered_set< CoreId > &coreIds)
 Constructor from a set of core IDs.
 qb::CoreIdBitSet::CoreIdBitSet (std::initializer_list< CoreId > ids)
 Constructor from an initializer list.
 qb::BroadcastId::BroadcastId (uint32_t const core_id) noexcept
 Constructor for BroadcastId.

Detailed Description

Defines actors, their identification, and lifecycle management.

Includes `qb::Actor`, `qb::ActorId`, `qb::ServiceActor`, and related concepts for creating and managing concurrent entities.

Typedef Documentation

◆ actor

using qb::actor = Actor

Alias for the Actor class.

Provided for naming consistency with other lowercase aliases in the framework

◆ service_actor

template<typename Tag>
using qb::service_actor = ServiceActor<Tag>

Alias for the ServiceActor template class.

Provided for naming consistency with other lowercase aliases in the framework

Template Parameters
TagA unique struct Tag to identify the service type

Function Documentation

◆ actor_factory_forward()

template<typename T>
auto qb::actor_factory_forward ( T && val)
inline

Utility function for forwarding and transforming arguments to actor factory.

This function properly forwards arguments to the actor factory, handling special cases:

  • String literals are converted to std::string
  • Reference wrappers are preserved as-is
  • Other types are forwarded with their original value categories
Template Parameters
TThe type of the argument to forward
Parameters
valThe value to forward
Returns
The transformed and properly forwarded value

◆ operator<<()

std::ostream & qb::operator<< ( std::ostream & os,
qb::Actor const & actor )

Stream output operator for Actor objects.

Formats and outputs actor information to a stream

Parameters
osOutput stream to write to
actorThe Actor object to format and output
Returns
Reference to the output stream

◆ CoreIdBitSet() [1/2]

qb::CoreIdBitSet::CoreIdBitSet ( const qb::unordered_set< CoreId > & coreIds)
inlineexplicit

Constructor from a set of core IDs.

Parameters
coreIdsSet of core IDs to include

◆ CoreIdBitSet() [2/2]

qb::CoreIdBitSet::CoreIdBitSet ( std::initializer_list< CoreId > ids)
inline

Constructor from an initializer list.

Parameters
idsList of core IDs to include

◆ BroadcastId()

qb::BroadcastId::BroadcastId ( uint32_t const core_id)
inlineexplicitnoexcept

Constructor for BroadcastId.

Parameters
core_idThe core ID to broadcast to.