sigx++
2.0.1
|
A threadsafe wrapper for any sigc signal with 3 argument(s). More...
#include <signal_wrapper.h>
Public Types | |
typedef T_signal | signal_type |
typedef signal_wrapper < signal_type, signal_group, argument_count > | this_type |
typedef signal_type::slot_type | slot_type |
typedef signal_type::result_type | result_type |
typedef slot_type::arg1_type_ | arg1_type_ |
typedef slot_type::arg2_type_ | arg2_type_ |
typedef slot_type::arg3_type_ | arg3_type_ |
typedef signal_type(* | fp_sig_getter_type )(signal_source_ptr) |
Public Member Functions | |
signal_wrapper () | |
Constructs an empty signal_wrapper. | |
signal_wrapper (const shared_dispatchable &_A_disp, const std::tr1::shared_ptr< signal_source_base > &_A_sigsource) throw () | |
Creates a signal_wrapper from a signal source. | |
template<typename T_functor > | |
connection_wrapper | connect (const T_functor &_A_func) const |
Connects a functor, tunnels it automatically if not yet tunneled and activates validity tracking for sigc::trackableS. | |
template<sync_type I_sync> | |
result_type | emit (arg1_type_ _A_a1, arg2_type_ _A_a2, arg3_type_ _A_a3) const |
emits the signal on the other side of the tunnel. | |
result_type | emit (arg1_type_ _A_a1, arg2_type_ _A_a2, arg3_type_ _A_a3) const |
emits the signal asynchronously. | |
result_type | emit_sync (arg1_type_ _A_a1, arg2_type_ _A_a2, arg3_type_ _A_a3) const |
emits the signal synchronously. | |
result_type | operator() (arg1_type_ _A_a1, arg2_type_ _A_a2, arg3_type_ _A_a3) const |
template<sync_type I_sync> | |
tunnel_functor< I_sync, make_slot_functor_type > | make_slot () const |
creates a tunnel_functor that emits the signal when invoked | |
tunnel_functor< ASYNC, make_slot_functor_type > | make_slot () const |
creates an asynchronous tunnel_functor that emits the signal when invoked | |
tunnel_functor< SYNC, make_slot_functor_type > | make_slot_sync () const |
creates a synchronous tunnel_functor that emits the signal when invoked |
Static Public Attributes | |
static const int | argument_count = 3 |
static const internal::signal_group | signal_group = internal::SIGGROUP_SIGC |
Protected Types | |
typedef sigc::bound_const_mem_functor0 < signal_source_base::hook, signal_source_base > | make_slot_f1 |
typedef sigc::retype_return_functor < fp_sig_getter_type, make_slot_f1 > | make_slot_f2 |
typedef sigc::const_mem_functor0 < signal_source_ptr, std::tr1::shared_ptr < signal_source_base > > | make_slot_f3 |
typedef sigc::bind_functor <-1, make_slot_f3, std::tr1::shared_ptr < signal_source_base > > | make_slot_f4 |
typedef sigc::compose1_functor < make_slot_f2, make_slot_f4 > | make_slot_composed1_functor_type |
typedef sigc::const_mem_functor3 < result_type, signal_type, arg1_type_, arg2_type_, arg3_type_ > | make_slot_emit_functor_type |
typedef sigc::compose1_functor < make_slot_emit_functor_type, make_slot_composed1_functor_type > | make_slot_composed2_functor_type |
Protected Member Functions | |
typedef | SIGX_DISPATCH_WITH_FUNCTOR (make_slot_composed2_functor_type) make_slot_functor_type |
![]() | |
signal_wrapper_base () | |
~signal_wrapper_base () throw () | |
signal_wrapper_base (const shared_dispatchable &_A_disp, const std::tr1::shared_ptr< signal_source_base > &_A_sigsource) throw () | |
std::pair< connection_wrapper, std::tr1::shared_ptr < sigc_connection_ptr > > | prepare_connection (const tunnel_base &_A_tunnel) const |
Prepare a shared sigc::connection pointer and a connection_wrapper. | |
template<typename T_functor , typename T_functor_conn_handler > | |
connection_wrapper | connect (const T_functor &_A_func, const T_functor_conn_handler &_A_func_conn_handler) const |
Call _A_func_conn_handler in the context of the server thread, _A_func_conn_handler resolves to typed_connection_handler<>::connect[_notify] connecting _A_func to the server thread's signal. |
Additional Inherited Members | |
![]() | |
shared_dispatchable | m_disp |
std::tr1::shared_ptr < signal_source_base > | m_sigsource |
The source for the server thread's signal. |
A threadsafe wrapper for any sigc signal with 3 argument(s).
typedef slot_type::arg1_type_ sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 3 >::arg1_type_ |
typedef slot_type::arg2_type_ sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 3 >::arg2_type_ |
typedef slot_type::arg3_type_ sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 3 >::arg3_type_ |
typedef signal_type(* sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 3 >::fp_sig_getter_type)(signal_source_ptr) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
typedef signal_type::result_type sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 3 >::result_type |
typedef T_signal sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 3 >::signal_type |
typedef signal_type::slot_type sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 3 >::slot_type |
typedef signal_wrapper<signal_type, signal_group, argument_count> sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 3 >::this_type |
|
inline |
Constructs an empty signal_wrapper.
Might | throw a std::bad_alloc exception (from dispatchable's ctor) |
|
inline |
Creates a signal_wrapper from a signal source.
_A_disp | The dispatchable to operate on |
_A_sigsource | A shared pointer to the server thread's signal source. |
|
inline |
Connects a functor, tunnels it automatically if not yet tunneled and activates validity tracking for sigc::trackableS.
auto tunneling is successful only if the passed in functor is a "dispatchable" functor, i.e. a functor on a dispatchable's method or one explicitly created with "dispatch_with". You will get compiler errors if the dispatchable can't be deduced from the passed in functor.
References sigx::signal_wrapper_base::connect().
|
inline |
emits the signal on the other side of the tunnel.
References sigx::signal_source_base::getter().
|
inline |
emits the signal asynchronously.
|
inline |
emits the signal synchronously.
|
inline |
creates a tunnel_functor that emits the signal when invoked
References sigx::dispatch_with(), and sigx::signal_source_base::getter().
|
inline |
creates an asynchronous tunnel_functor that emits the signal when invoked
|
inline |
creates a synchronous tunnel_functor that emits the signal when invoked
|
inline |
see emit(arg1_type_, arg2_type_, arg3_type_)
|
protected |
|
static |
|
static |