sigx++  2.0.1
Public Types | Public Member Functions | Static Public Attributes
sigx::signal_wrapper< Glib::SignalIdle > Class Template Reference

A threadsafe wrapper for a Glib::SignalIdle. More...

#include <signal_wrapper.h>

Inheritance diagram for sigx::signal_wrapper< Glib::SignalIdle >:
sigx::signal_wrapper_base sigx::nonheapallocatable

Public Types

typedef Glib::SignalIdle signal_type
 
typedef signal_wrapper< signal_type, signal_group, argument_countthis_type
 
typedef bool result_type
 
typedef sigc::slot< bool > slot_type
 
typedef signal_type(* fp_sig_getter_type) (signal_source_ptr)
 

Public Member Functions

 signal_wrapper ()
 Constructs an empty signal_wrapper. More...
 
 signal_wrapper (const shared_dispatchable &_A_disp, const std::tr1::shared_ptr< signal_source_base > &_A_sigsource)
 Creates a signal_wrapper from a signal source. More...
 
template<typename T_functor >
connection_wrapper connect (const T_functor &_A_func, int priority=Glib::PRIORITY_DEFAULT_IDLE) const
 Connects a functor, tunnels it automatically if not yet tunneled and activates validity tracking for sigc::trackableS. More...
 

Static Public Attributes

static const int argument_count = internal::count_signal_arguments<Glib::SignalIdle>::value
 
static const internal::signal_group signal_group = internal::SIGGROUP_IRRELEVANT
 

Additional Inherited Members

- Protected Member Functions inherited from sigx::signal_wrapper_base
 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. More...
 
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. More...
 
- Protected Attributes inherited from sigx::signal_wrapper_base
shared_dispatchable m_disp
 
std::tr1::shared_ptr< signal_source_basem_sigsource
 The source for the server thread's signal. More...
 

Detailed Description

template<>
class sigx::signal_wrapper< Glib::SignalIdle >

A threadsafe wrapper for a Glib::SignalIdle.

Member Typedef Documentation

typedef signal_type(* sigx::signal_wrapper< Glib::SignalIdle >::fp_sig_getter_type) (signal_source_ptr)
typedef bool sigx::signal_wrapper< Glib::SignalIdle >::result_type
typedef Glib::SignalIdle sigx::signal_wrapper< Glib::SignalIdle >::signal_type
typedef sigc::slot<bool> sigx::signal_wrapper< Glib::SignalIdle >::slot_type

Constructor & Destructor Documentation

sigx::signal_wrapper< Glib::SignalIdle >::signal_wrapper ( )
inline

Constructs an empty signal_wrapper.

Exceptions
Mightthrow a std::bad_alloc exception (from dispatchable's ctor)
sigx::signal_wrapper< Glib::SignalIdle >::signal_wrapper ( const shared_dispatchable _A_disp,
const std::tr1::shared_ptr< signal_source_base > &  _A_sigsource 
)
inline

Creates a signal_wrapper from a signal source.

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

Member Function Documentation

template<typename T_functor >
connection_wrapper sigx::signal_wrapper< Glib::SignalIdle >::connect ( const T_functor &  _A_func,
int  priority = Glib::PRIORITY_DEFAULT_IDLE 
) 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().

Field Documentation

const int sigx::signal_wrapper< Glib::SignalIdle >::argument_count = internal::count_signal_arguments<Glib::SignalIdle>::value
static
const internal::signal_group sigx::signal_wrapper< Glib::SignalIdle >::signal_group = internal::SIGGROUP_IRRELEVANT
static

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