MapLibre Native Core
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
mbgl::AspiringActor< Object > Class Template Reference

#include <aspiring_actor.hpp>

Public Member Functions

 AspiringActor ()
 
 AspiringActor (const AspiringActor &)=delete
 
ActorRef< std::decay_t< Object > > self ()
 

Friends

class EstablishedActor< Object >
 
class Actor< Object >
 

Detailed Description

template<class Object>
class mbgl::AspiringActor< Object >

An AspiringActor<O> is one half of the pair of types that comprise an actor (see Actor<O>), the other half being EstablishedActor<O>. It is responsible for:

  • ownership of the actor's Mailbox
  • allocating the memory for (but not constructing) the target object O

Using these two pieces–the mailbox and a stable address for O–an AspiringActor<O> can accept messages for the target object, or provide ActorRef<O>s that do so, before the object has actually been constructed by the corresponding EstablishedActor<O>. (Such messages are queued in the mailbox until after the object is constructed.)

This allows for an AspiringActor<O> to be created and safely used by a thread other than the one on which the target object will (eventually) live.

Definition at line 35 of file aspiring_actor.hpp.

Constructor & Destructor Documentation

◆ AspiringActor() [1/2]

template<class Object >
mbgl::AspiringActor< Object >::AspiringActor ( )
inline

Definition at line 37 of file aspiring_actor.hpp.

◆ AspiringActor() [2/2]

template<class Object >
mbgl::AspiringActor< Object >::AspiringActor ( const AspiringActor< Object > &  )
delete

Member Function Documentation

◆ self()

template<class Object >
ActorRef<std::decay_t<Object> > mbgl::AspiringActor< Object >::self ( )
inline

Definition at line 44 of file aspiring_actor.hpp.

Friends And Related Function Documentation

◆ Actor< Object >

template<class Object >
friend class Actor< Object >
friend

Definition at line 52 of file aspiring_actor.hpp.

◆ EstablishedActor< Object >

template<class Object >
friend class EstablishedActor< Object >
friend

Definition at line 52 of file aspiring_actor.hpp.


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