sigx++ 2.0.1
Public Types | Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions
sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 > Class Template Reference

A threadsafe wrapper for any sigc signal with 6 argument(s). More...

#include <signal_wrapper.h>

Inheritance diagram for sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >:
sigx::signal_wrapper_base sigx::nonheapallocatable

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 slot_type::arg4_type_ arg4_type_
typedef slot_type::arg5_type_ arg5_type_
typedef slot_type::arg6_type_ arg6_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, arg4_type_ _A_a4, arg5_type_ _A_a5, arg6_type_ _A_a6) 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, arg4_type_ _A_a4, arg5_type_ _A_a5, arg6_type_ _A_a6) const
 emits the signal asynchronously.
result_type emit_sync (arg1_type_ _A_a1, arg2_type_ _A_a2, arg3_type_ _A_a3, arg4_type_ _A_a4, arg5_type_ _A_a5, arg6_type_ _A_a6) const
 emits the signal synchronously.
result_type operator() (arg1_type_ _A_a1, arg2_type_ _A_a2, arg3_type_ _A_a3, arg4_type_ _A_a4, arg5_type_ _A_a5, arg6_type_ _A_a6) 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 = 6
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_functor6
< result_type, signal_type,
arg1_type_, arg2_type_,
arg3_type_, arg4_type_,
arg5_type_, arg6_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

Detailed Description

template<typename T_signal>
class sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >

A threadsafe wrapper for any sigc signal with 6 argument(s).


Member Typedef Documentation

template<typename T_signal >
typedef slot_type::arg1_type_ sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::arg1_type_
template<typename T_signal >
typedef slot_type::arg2_type_ sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::arg2_type_
template<typename T_signal >
typedef slot_type::arg3_type_ sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::arg3_type_
template<typename T_signal >
typedef slot_type::arg4_type_ sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::arg4_type_
template<typename T_signal >
typedef slot_type::arg5_type_ sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::arg5_type_
template<typename T_signal >
typedef slot_type::arg6_type_ sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::arg6_type_
template<typename T_signal >
typedef signal_type(* sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::fp_sig_getter_type)(signal_source_ptr)
template<typename T_signal >
typedef sigc::compose1_functor<make_slot_f2, make_slot_f4> sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::make_slot_composed1_functor_type [protected]
template<typename T_signal >
typedef sigc::compose1_functor<make_slot_emit_functor_type, make_slot_composed1_functor_type> sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::make_slot_composed2_functor_type [protected]
template<typename T_signal >
typedef sigc::const_mem_functor6<result_type, signal_type, arg1_type_, arg2_type_, arg3_type_, arg4_type_, arg5_type_, arg6_type_> sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::make_slot_emit_functor_type [protected]
template<typename T_signal >
typedef sigc::bound_const_mem_functor0<signal_source_base::hook, signal_source_base> sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::make_slot_f1 [protected]
template<typename T_signal >
typedef sigc::retype_return_functor<fp_sig_getter_type, make_slot_f1> sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::make_slot_f2 [protected]
template<typename T_signal >
typedef sigc::const_mem_functor0<signal_source_ptr, std::tr1::shared_ptr<signal_source_base> > sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::make_slot_f3 [protected]
template<typename T_signal >
typedef sigc::bind_functor<-1, make_slot_f3, std::tr1::shared_ptr<signal_source_base> > sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::make_slot_f4 [protected]
template<typename T_signal >
typedef signal_type::result_type sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::result_type
template<typename T_signal >
typedef T_signal sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::signal_type
template<typename T_signal >
typedef signal_type::slot_type sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::slot_type
template<typename T_signal >
typedef signal_wrapper<signal_type, signal_group, argument_count> sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::this_type

Constructor & Destructor Documentation

template<typename T_signal >
sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::signal_wrapper ( ) [inline]

Constructs an empty signal_wrapper.

Exceptions:
Mightthrow a std::bad_alloc exception (from dispatchable's ctor)
template<typename T_signal >
sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::signal_wrapper ( const shared_dispatchable _A_disp,
const std::tr1::shared_ptr< signal_source_base > &  _A_sigsource 
) throw () [inline]

Creates a signal_wrapper from a signal source.

Parameters:
_A_dispThe dispatchable to operate on
_A_sigsourceA shared pointer to the server thread's signal source.

Member Function Documentation

template<typename T_signal >
template<typename T_functor >
connection_wrapper sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::connect ( const T_functor &  _A_func) const [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.

Note:
At the moment it is only possible to pass in a non-tunneled functor or a toplevel tunneled functor due to the fact that the visit_each mechanism is turned off for the tunnel functor (otherwise there would be the problem of not threadsafe access to the sigc::trackable base of the of a dispatchable object..
passed in functor must not be a slot or adapt a slot; we have to apply this restriction because slots might have bound trackables that can cause non-threadsafe access to the passed in slot which will live in the context of the server thread.
Attention:
All sigc::trackableS and the original dispatchable contained in the passed functor must belong to the context of the calling thread.
Returns:
sigx::connection_wrapper A threadsafe connection wrapper
Note:
asynchronous

References sigx::signal_wrapper_base::connect().

template<typename T_signal >
result_type sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::emit ( arg1_type_  _A_a1,
arg2_type_  _A_a2,
arg3_type_  _A_a3,
arg4_type_  _A_a4,
arg5_type_  _A_a5,
arg6_type_  _A_a6 
) const [inline]

emits the signal asynchronously.

template<typename T_signal >
template<sync_type I_sync>
result_type sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::emit ( arg1_type_  _A_a1,
arg2_type_  _A_a2,
arg3_type_  _A_a3,
arg4_type_  _A_a4,
arg5_type_  _A_a5,
arg6_type_  _A_a6 
) const [inline]

emits the signal on the other side of the tunnel.

References sigx::signal_source_base::getter().

template<typename T_signal >
result_type sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::emit_sync ( arg1_type_  _A_a1,
arg2_type_  _A_a2,
arg3_type_  _A_a3,
arg4_type_  _A_a4,
arg5_type_  _A_a5,
arg6_type_  _A_a6 
) const [inline]

emits the signal synchronously.

template<typename T_signal >
tunnel_functor<ASYNC, make_slot_functor_type> sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::make_slot ( ) const [inline]

creates an asynchronous tunnel_functor that emits the signal when invoked

template<typename T_signal >
template<sync_type I_sync>
tunnel_functor<I_sync, make_slot_functor_type> sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::make_slot ( ) const [inline]

creates a tunnel_functor that emits the signal when invoked

References sigx::dispatch_with(), and sigx::signal_source_base::getter().

template<typename T_signal >
tunnel_functor<SYNC, make_slot_functor_type> sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::make_slot_sync ( ) const [inline]

creates a synchronous tunnel_functor that emits the signal when invoked

template<typename T_signal >
result_type sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::operator() ( arg1_type_  _A_a1,
arg2_type_  _A_a2,
arg3_type_  _A_a3,
arg4_type_  _A_a4,
arg5_type_  _A_a5,
arg6_type_  _A_a6 
) const [inline]

see emit(arg1_type_, arg2_type_, arg3_type_, arg4_type_, arg5_type_, arg6_type_)

template<typename T_signal >
typedef sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::SIGX_DISPATCH_WITH_FUNCTOR ( make_slot_composed2_functor_type  ) [protected]

Field Documentation

template<typename T_signal >
const int sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::argument_count = 6 [static]
template<typename T_signal >
const internal::signal_group sigx::signal_wrapper< T_signal, internal::SIGGROUP_SIGC, 6 >::signal_group = internal::SIGGROUP_SIGC [static]

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