using namespace std::chrono_literals;
template< typename Signal_To_Send, typename Signal_To_Receive, bool Use_Individual_Trace >
{
public :
{}
{
if constexpr( Use_Individual_Trace )
else
} );
}
};
{
public :
a_example_t( context_t ctx )
{
}
{
make_ping_pong_pair(
}
private :
void on_finish( mhood_t<finish> )
{
}
{
} );
}
};
int main()
{
try
{
} );
},
params.message_delivery_tracer(
params.message_delivery_tracer_filter(
} );
}
catch( const std::exception & ex )
{
std::cerr << "Error: " << ex.what() << std::endl;
return 1;
}
return 0;
}
A helper header file for including all public SObjectizer stuff.
virtual void so_define_agent()
Hook on define agent for SObjectizer.
subscription_bind_t so_subscribe_self()
Initiate subscription to agent's direct mbox.
void so_deregister_agent_coop_normally()
A helper method for deregistering agent's coop in case of normal deregistration.
environment_t & so_environment() const noexcept
Access to the SObjectizer Environment which this agent is belong.
subscription_bind_t so_subscribe(const mbox_t &mbox_ref)
Initiate subscription.
virtual void so_evt_start()
Hook on agent start inside SObjectizer.
Agent * make_agent(Args &&... args)
Helper method for simplification of agents creation.
Parameters for the SObjectizer Environment initialization.
mbox_t create_mbox()
Create an anonymous MPMC mbox.
decltype(auto) introduce_coop(Args &&... args)
Helper method for simplification of cooperation creation and registration.
A base class for agent signals.
std::enable_if< details::is_agent_method_pointer< details::method_arity::unary, Method_Pointer >::value, subscription_bind_t & >::type event(Method_Pointer pfn, thread_safety_t thread_safety=not_thread_safe)
Make subscription to the message.
SO_5_FUNC dispatcher_handle_t make_dispatcher(environment_t &env, const std::string_view data_sources_name_base, disp_params_t params)
Create an instance of one_thread dispatcher.
SO_5_FUNC tracer_unique_ptr_t std_cout_tracer()
Factory for tracer which uses std::cout stream.
so_5::mbox_t individual_trace(Dest &&dest)
Indicator that tells that delivery of the message/signal should be traced.
@ mbox
The source is a mbox.
SO_5_FUNC filter_shptr_t make_individual_trace_filter()
Factory for special message tracing filter for individual tracing.
Private part of message limit implementation.
void launch(Init_Routine &&init_routine)
Launch a SObjectizer Environment with default parameters.
decltype(auto) introduce_child_coop(agent_t &owner, Args &&... args)
A simple way for creating and registering child cooperation.
std::shared_ptr< disp_binder_t > disp_binder_shptr_t
Typedef for the disp_binder smart pointer.
void send_delayed(Target &&target, std::chrono::steady_clock::duration pause, Args &&... args)
A utility function for creating and delivering a delayed message to the specified destination.