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

#include <established_actor.hpp>

Public Member Functions

template<typename U = Object, class... Args, typename std::enable_if_t< std::is_constructible_v< U, Args... >||std::is_constructible_v< U, ActorRef< U >, Args... > > * = nullptr>
 EstablishedActor (Scheduler &scheduler, AspiringActor< Object > &parent_, Args &&... args)
 
template<class ArgsTuple , std::size_t ArgCount = std::tuple_size<std::decay_t<ArgsTuple>>::value>
 EstablishedActor (Scheduler &scheduler, AspiringActor< Object > &parent_, ArgsTuple &&args)
 
 EstablishedActor (const EstablishedActor &)=delete
 
 ~EstablishedActor ()
 

Detailed Description

template<class Object>
class mbgl::EstablishedActor< Object >

An EstablishedActor<O> is one half of the pair of types that comprise an actor (see Actor<O>), the other half being AspiringActor<O>. It is responsible for managing the lifetime of the target object O and the open/closed state of the parent's mailbox.

The O object's lifetime is contained by that of its owning EstablishedActor<O>: the EstablishedActor constructor executes the O constructor via "placement new", constructing it at the address provided by the parent AspiringActor, and the ~EstablishedActor destructor similarly executes the ~O destructor (after closing the mailbox). EstablishedActor should therefore live entirely on the thread intended to own O.

Definition at line 27 of file established_actor.hpp.

Constructor & Destructor Documentation

◆ EstablishedActor() [1/3]

template<class Object >
template<typename U = Object, class... Args, typename std::enable_if_t< std::is_constructible_v< U, Args... >||std::is_constructible_v< U, ActorRef< U >, Args... > > * = nullptr>
mbgl::EstablishedActor< Object >::EstablishedActor ( Scheduler scheduler,
AspiringActor< Object > &  parent_,
Args &&...  args 
)
inline

Definition at line 34 of file established_actor.hpp.

◆ EstablishedActor() [2/3]

template<class Object >
template<class ArgsTuple , std::size_t ArgCount = std::tuple_size<std::decay_t<ArgsTuple>>::value>
mbgl::EstablishedActor< Object >::EstablishedActor ( Scheduler scheduler,
AspiringActor< Object > &  parent_,
ArgsTuple &&  args 
)
inline

Definition at line 43 of file established_actor.hpp.

◆ EstablishedActor() [3/3]

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

◆ ~EstablishedActor()

template<class Object >
mbgl::EstablishedActor< Object >::~EstablishedActor ( )
inline

Definition at line 51 of file established_actor.hpp.


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