SObjectizer 5.8
Loading...
Searching...
No Matches
so_5::disp_binder_t Class Referenceabstract

Interface for dispatcher binders. More...

#include <disp_binder.hpp>

Inheritance diagram for so_5::disp_binder_t:
so_5::env_infrastructures::st_reusable_stuff::default_dispatcher_basis_t< Activity_Tracker > so_5::disp::active_group::impl::actual_binder_t so_5::disp::active_obj::impl::dispatcher_template_t< Work_Thread > so_5::disp::adv_thread_pool::impl::actual_binder_t so_5::disp::nef_one_thread::impl::dispatcher_template_t< Work_Thread > so_5::disp::nef_thread_pool::impl::actual_binder_t so_5::disp::one_thread::impl::actual_dispatcher_t< Work_Thread > so_5::disp::prio_dedicated_threads::one_per_prio::impl::dispatcher_template_t< Work_Thread > so_5::disp::prio_one_thread::quoted_round_robin::impl::dispatcher_template_t< Work_Thread > so_5::disp::prio_one_thread::strictly_ordered::impl::dispatcher_template_t< Work_Thread > so_5::disp::thread_pool::impl::actual_binder_t so_5::env_infrastructures::st_reusable_stuff::default_dispatcher_basis_t< Event_Queue_Type >

Public Member Functions

 disp_binder_t ()=default
 
virtual ~disp_binder_t () noexcept=default
 
virtual void preallocate_resources (agent_t &agent)=0
 Allocate resources in dispatcher for new agent.
 
virtual void undo_preallocation (agent_t &agent) noexcept=0
 Undo resources allocation.
 
virtual void bind (agent_t &agent) noexcept=0
 Bind agent to dispatcher.
 
virtual void unbind (agent_t &agent) noexcept=0
 Unbind agent from dispatcher.
 

Private Member Functions

 disp_binder_t (const disp_binder_t &)=delete
 
 disp_binder_t (disp_binder_t &&)=delete
 
disp_binder_toperator= (const disp_binder_t &)=delete
 
disp_binder_toperator= (disp_binder_t &&)=delete
 

Detailed Description

Interface for dispatcher binders.

Dispatcher binders are used in the agent registration process to binding of agents to desired dispatchers.

Attention
If an implementation of disp_binder_t interface stores smart pointers to agents in methods preallocate_resources() and bind() then it must drop (or reset) these stored smart references in undo_preallocation() and unbind() methods. Otherwise there will be circular references between disp_binder and agents and this will lead to memory leaks and other related problems (for example, destructors for agents/disp_binders won't be called).

Definition at line 39 of file disp_binder.hpp.

Constructor & Destructor Documentation

◆ disp_binder_t() [1/3]

so_5::disp_binder_t::disp_binder_t ( const disp_binder_t & )
privatedelete

◆ disp_binder_t() [2/3]

so_5::disp_binder_t::disp_binder_t ( disp_binder_t && )
privatedelete

◆ disp_binder_t() [3/3]

so_5::disp_binder_t::disp_binder_t ( )
default

◆ ~disp_binder_t()

virtual so_5::disp_binder_t::~disp_binder_t ( )
virtualdefaultnoexcept

Member Function Documentation

◆ bind()

◆ operator=() [1/2]

disp_binder_t & so_5::disp_binder_t::operator= ( const disp_binder_t & )
privatedelete

◆ operator=() [2/2]

disp_binder_t & so_5::disp_binder_t::operator= ( disp_binder_t && )
privatedelete

◆ preallocate_resources()

◆ unbind()

◆ undo_preallocation()


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