qb  2.0.0.0
C++17 Actor Framework
qb Issue Watch Star Fork Follow @isndev
Loading...
Searching...
No Matches
qb::TActorFactory< _Actor, _Args > Class Template Reference

Templated actor factory implementation. More...

#include <Actor.h>

Inheritance diagram for qb::TActorFactory< _Actor, _Args >:
Collaboration diagram for qb::TActorFactory< _Actor, _Args >:

Public Member Functions

 TActorFactory (ActorId const id, _Args &&... args)
Actorcreate () final
 Creates an actor instance.
bool isService () const final
 Checks if the factory creates a service actor.

Additional Inherited Members

Static Public Member Functions inherited from qb::ActorProxy
template<typename _Type>
static auto getType ()
template<typename _Type>
static const char * getName ()
Static Protected Member Functions inherited from qb::ActorProxy
template<typename _Type>
static void setType (Actor &actor)
template<typename _Type>
static void setName (Actor &actor)

Detailed Description

template<typename _Actor, typename... _Args>
class qb::TActorFactory< _Actor, _Args >

Templated actor factory implementation.

Template Parameters
_ActorThe concrete Actor type this factory will create.
_ArgsThe argument types for the _Actor's constructor.

This class is used internally to create actor instances with their constructor arguments, managing type information via ActorProxy.

Member Function Documentation

◆ create()

template<typename _Actor, typename... _Args>
Actor * qb::TActorFactory< _Actor, _Args >::create ( )
inlinefinalvirtual

Creates an actor instance.

Returns
Pointer to the created Actor.

Implements qb::IActorFactory.

◆ isService()

template<typename _Actor, typename... _Args>
bool qb::TActorFactory< _Actor, _Args >::isService ( ) const
inlinenodiscardfinalvirtual

Checks if the factory creates a service actor.

Returns
True if it creates a service actor, false otherwise.

Implements qb::IActorFactory.