Logo Search packages:      
Sourcecode: ardour version File versions

sigc::slot< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7 > Class Template Reference
[Slots]

#include <slot.h>

Inheritance diagram for sigc::slot< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7 >:

sigc::slot7< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7 > sigc::slot_base sigc::functor_base SigC::Slot7< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7 >

List of all members.


Detailed Description

template<class T_return, class T_arg1 = nil_, class T_arg2 = nil_, class T_arg3 = nil_, class T_arg4 = nil_, class T_arg5 = nil_, class T_arg6 = nil_, class T_arg7 = nil_>
class sigc::slot< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7 >

Convenience wrapper for the numbered sigc::slot# templates. Slots convert arbitrary functors to unified types which are opaque. sigc::slot itself is a functor or to be more precise a closure. It contains a single, arbitrary functor (or closure) that is executed in operator()().

The template arguments determine the function signature of operator()():

To use simply assign the slot to the desired functor. If the functor is not compatible with the parameter list defined with the template arguments compiler errors are triggered. When called the slot will invoke the functor with minimal copies. block() and unblock() can be used to block the functor's invocation from operator()() temporarily.

Example:
   void foo(int) {}
   sigc::slot<void, long> s = sigc::ptr_fun(&foo);
   s(19);

Definition at line 1065 of file slot.h.


Public Types

typedef type_trait< T_arg1 >::take arg1_type_
typedef type_trait< T_arg2 >::take arg2_type_
typedef type_trait< T_arg3 >::take arg3_type_
typedef type_trait< T_arg4 >::take arg4_type_
typedef type_trait< T_arg5 >::take arg5_type_
typedef type_trait< T_arg6 >::take arg6_type_
typedef type_trait< T_arg7 >::take arg7_type_
typedef T_return(* call_type )(rep_type *, arg1_type_, arg2_type_, arg3_type_, arg4_type_, arg5_type_, arg6_type_, arg7_type_)
typedef
trackable::func_destroy_notify 
func_destroy_notify
typedef slot7< T_return,
T_arg1, T_arg2, T_arg3, T_arg4,
T_arg5, T_arg6, T_arg7 > 
parent_type
typedef T_return result_type

Public Member Functions

void add_destroy_notify_callback (void *data, func_destroy_notify func) const
bool block (bool should_block=true)
bool blocked () const
void disconnect ()
bool empty () const
 operator bool () const
T_return 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, arg7_type_ _A_a7) const
void remove_destroy_notify_callback (void *data) const
void set_parent (void *parent, void *(*cleanup)(void *)) const
 slot (const slot &src)
template<class T_functor>
 slot (const T_functor &_A_func)
bool unblock ()

Public Attributes

bool blocked_
rep_type * rep_

Package Attributes

 __pad0__:slot_rep rep_type

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

Generated by  Doxygen 1.6.0   Back to index