MakerLabs ACM
ActorModel::Process Class Reference

#include <process.h>

Classes

struct  ProcessDictionary
 
struct  ProcessFlagHashFunc
 

Public Types

using Reason = std::experimental::string_view
 
using LinkList = std::unordered_set< Pid, UUID::UUIDHashFunc, UUID::UUIDEqualFunc >
 
using MonitorList = std::unordered_set< Pid, UUID::UUIDHashFunc, UUID::UUIDEqualFunc >
 
using string_view = std::experimental::string_view
 
using ProcessFlags = std::unordered_map< ProcessFlag, bool, ProcessFlagHashFunc >
 

Public Member Functions

virtual ~Process ()
 
auto _execute () -> ResultUnion
 

Static Public Member Functions

static auto get_default_node () -> Node &
 
static auto get_default_execution_config () -> const ProcessExecutionConfig &
 

Protected Member Functions

 Process (const Pid &_pid, const Behaviour &&_behaviour, const ProcessExecutionConfig &execution_config=get_default_execution_config(), const MaybePid &initial_link_pid=std::experimental::nullopt, const ProcessDictionary::AncestorList &&_ancestors={}, Node *const _current_node=nullptr)
 
auto get_current_node () -> Node &
 
auto process_flag (const ProcessFlag flag, const bool flag_setting) -> bool
 
auto get_process_flag (const ProcessFlag flag) -> bool
 
auto exit (const Reason exit_reason) -> bool
 
auto link (const Pid &pid2) -> bool
 
auto unlink (const Pid &pid2) -> bool
 
auto send (const Message &message) -> bool
 
auto send (const string_view type, const string_view payload) -> bool
 

Protected Attributes

const Pid pid
 
Mailbox mailbox
 
Behaviour behaviour
 
LinkList links
 
ProcessDictionary dictionary
 
ProcessFlags process_flags
 
std::string exit_reason
 
SemaphoreHandle_t receive_semaphore = nullptr
 
Node *const current_node = nullptr
 

Friends

class Node
 

Member Typedef Documentation

◆ LinkList

◆ MonitorList

◆ ProcessFlags

◆ Reason

◆ string_view

using ActorModel::Process::string_view = std::experimental::string_view

Constructor & Destructor Documentation

◆ ~Process()

ActorModel::Process::~Process ( )
virtual
Here is the call graph for this function:

◆ Process()

ActorModel::Process::Process ( const Pid &  _pid,
const Behaviour &&  _behaviour,
const ProcessExecutionConfig &  execution_config = get_default_execution_config(),
const MaybePid &  initial_link_pid = std::experimental::nullopt,
const ProcessDictionary::AncestorList &&  _ancestors = {},
Node *const  _current_node = nullptr 
)
protected
Here is the call graph for this function:

Member Function Documentation

◆ _execute()

auto ActorModel::Process::_execute ( ) -> ResultUnion
Here is the call graph for this function:

◆ exit()

auto ActorModel::Process::exit ( const Reason  exit_reason) -> bool
protected

◆ get_current_node()

auto ActorModel::Process::get_current_node ( ) -> Node&
protected

◆ get_default_execution_config()

auto ActorModel::Process::get_default_execution_config ( ) -> const ProcessExecutionConfig&
static

◆ get_default_node()

auto ActorModel::Process::get_default_node ( ) -> Node&
static

◆ get_process_flag()

auto ActorModel::Process::get_process_flag ( const ProcessFlag  flag) -> bool
protected

◆ link()

auto ActorModel::Process::link ( const Pid &  pid2) -> bool
protected

◆ process_flag()

auto ActorModel::Process::process_flag ( const ProcessFlag  flag,
const bool  flag_setting 
) -> bool
protected

◆ send() [1/2]

auto ActorModel::Process::send ( const Message &  message) -> bool
protected
Here is the call graph for this function:

◆ send() [2/2]

auto ActorModel::Process::send ( const string_view  type,
const string_view  payload 
) -> bool
protected
Here is the call graph for this function:

◆ unlink()

auto ActorModel::Process::unlink ( const Pid &  pid2) -> bool
protected

Friends And Related Function Documentation

◆ Node

friend class Node
friend

Member Data Documentation

◆ behaviour

Behaviour ActorModel::Process::behaviour
protected

◆ current_node

Node* const ActorModel::Process::current_node = nullptr
protected

◆ dictionary

ProcessDictionary ActorModel::Process::dictionary
protected

◆ exit_reason

std::string ActorModel::Process::exit_reason
protected

◆ links

LinkList ActorModel::Process::links
protected

◆ mailbox

Mailbox ActorModel::Process::mailbox
protected

◆ pid

const Pid ActorModel::Process::pid
protected

◆ process_flags

ProcessFlags ActorModel::Process::process_flags
protected

◆ receive_semaphore

SemaphoreHandle_t ActorModel::Process::receive_semaphore = nullptr
protected

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