logo top
Main Page   Groups   Namespaces  

sigc::adapts< T_functor > Struct Template Reference
[Adaptors]

Base type for adaptors. More...

Inheritance diagram for sigc::adapts< T_functor >:

Inheritance graph
[legend]
List of all members.

Public Types

typedef adaptor_trait< T_functor
>::result_type 
result_type
typedef adaptor_trait< T_functor
>::adaptor_type 
adaptor_type

Public Member Functions

 adapts (const T_functor& _A_functor)
 Constructs an adaptor that wraps the passed functor.

Public Attributes

adaptor_type functor_
 Adaptor that is invoked from operator()().

Detailed Description

template <class T_functor>
struct sigc::adapts< T_functor >

Base type for adaptors.

adapts wraps adaptors, functors, function pointers and class methods. It contains a single member functor which is always a sigc::adaptor_base. The typedef adaptor_type defines the exact type that is used to store the adaptor, functor, function pointer or class method passed into the constructor. It differs from T_functor unless T_functor inherits from sigc::adaptor_base.

Example of a simple adaptor:
   template <T_functor>
   struct my_adpator : public sigc::adapts<T_functor>
   {
     template <class T_arg1=void, class T_arg2=void>
     struct deduce_result_type
     { typedef typename sigc::deduce_result_type<T_functor, T_arg1, T_arg2>::type type; };
     typedef typename sigc::functor_trait<T_functor>::result_type result_type;

     result_type
     operator()() const;

     template <class T_arg1>
     typename deduce_result_type<T_arg1>::type
     operator()(T_arg1 _A_arg1) const;

     template <class T_arg1, class T_arg2>
     typename deduce_result_type<T_arg1, T_arg2>::type
     operator()(T_arg1 _A_arg1, class T_arg2) const;

     explicit adaptor_functor(const T_functor& _A_functor) // Constructs a my_functor object that wraps the passed functor.
       : sigc::adapts<T_functor>(_A_functor) {}

     mutable T_functor functor_; // Functor that is invoked from operator()().
   };


Member Typedef Documentation

template <class T_functor>
typedef adaptor_trait<T_functor>::result_type sigc::adapts<T_functor>::result_type

Reimplemented in sigc::bind_functor<0, T_functor, T_bound, nil, nil, nil, nil, nil, nil >, sigc::bind_functor<1, T_functor, T_bound, nil, nil, nil, nil, nil, nil >, sigc::bind_functor<2, T_functor, T_bound, nil, nil, nil, nil, nil, nil >, sigc::bind_functor<3, T_functor, T_bound, nil, nil, nil, nil, nil, nil >, sigc::bind_functor<4, T_functor, T_bound, nil, nil, nil, nil, nil, nil >, sigc::bind_functor<5, T_functor, T_bound, nil, nil, nil, nil, nil, nil >, sigc::bind_functor<6, T_functor, T_bound, nil, nil, nil, nil, nil, nil >, sigc::bind_functor<-1, T_functor, T_type1, nil, nil, nil, nil, nil, nil >, sigc::bind_functor<-1, T_functor, T_type1, T_type2, nil, nil, nil, nil, nil>, sigc::bind_functor<-1, T_functor, T_type1, T_type2, T_type3, nil, nil, nil, nil>, sigc::bind_functor<-1, T_functor, T_type1, T_type2, T_type3, T_type4, nil, nil, nil>, sigc::bind_functor<-1, T_functor, T_type1, T_type2, T_type3, T_type4, T_type5, nil, nil>, sigc::bind_functor<-1, T_functor, T_type1, T_type2, T_type3, T_type4, T_type5, T_type6, nil>, sigc::bind_functor<-1, T_functor, T_type1, T_type2, T_type3, T_type4, T_type5, T_type6, T_type7>, sigc::bind_return_functor<T_return, T_functor>, sigc::compose1_functor<T_setter, T_getter>, sigc::compose2_functor<T_setter, T_getter1, T_getter2>, sigc::exception_catch_functor<T_functor, T_catcher, T_return>, sigc::exception_catch_functor<T_functor, T_catcher, void>, sigc::hide_functor<-1, T_functor>, sigc::hide_functor<0, T_functor>, sigc::hide_functor<1, T_functor>, sigc::hide_functor<2, T_functor>, sigc::hide_functor<3, T_functor>, sigc::hide_functor<4, T_functor>, sigc::hide_functor<5, T_functor>, sigc::hide_functor<6, T_functor>, sigc::retype_functor<T_functor, T_type1, T_type2, T_type3, T_type4, T_type5, T_type6, T_type7>, sigc::retype_return_functor<T_return, T_functor>, and sigc::retype_return_functor<void, T_functor>.

template <class T_functor>
typedef adaptor_trait<T_functor>::adaptor_type sigc::adapts<T_functor>::adaptor_type

Reimplemented in sigc::bind_functor<0, T_functor, T_bound, nil, nil, nil, nil, nil, nil >, sigc::bind_functor<1, T_functor, T_bound, nil, nil, nil, nil, nil, nil >, sigc::bind_functor<2, T_functor, T_bound, nil, nil, nil, nil, nil, nil >, sigc::bind_functor<3, T_functor, T_bound, nil, nil, nil, nil, nil, nil >, sigc::bind_functor<4, T_functor, T_bound, nil, nil, nil, nil, nil, nil >, sigc::bind_functor<5, T_functor, T_bound, nil, nil, nil, nil, nil, nil >, sigc::bind_functor<6, T_functor, T_bound, nil, nil, nil, nil, nil, nil >, sigc::bind_functor<-1, T_functor, T_type1, nil, nil, nil, nil, nil, nil >, sigc::bind_functor<-1, T_functor, T_type1, T_type2, nil, nil, nil, nil, nil>, sigc::bind_functor<-1, T_functor, T_type1, T_type2, T_type3, nil, nil, nil, nil>, sigc::bind_functor<-1, T_functor, T_type1, T_type2, T_type3, T_type4, nil, nil, nil>, sigc::bind_functor<-1, T_functor, T_type1, T_type2, T_type3, T_type4, T_type5, nil, nil>, sigc::bind_functor<-1, T_functor, T_type1, T_type2, T_type3, T_type4, T_type5, T_type6, nil>, sigc::bind_functor<-1, T_functor, T_type1, T_type2, T_type3, T_type4, T_type5, T_type6, T_type7>, sigc::compose1_functor<T_setter, T_getter>, sigc::compose2_functor<T_setter, T_getter1, T_getter2>, sigc::exception_catch_functor<T_functor, T_catcher, T_return>, sigc::exception_catch_functor<T_functor, T_catcher, void>, sigc::hide_functor<-1, T_functor>, sigc::hide_functor<0, T_functor>, sigc::hide_functor<1, T_functor>, sigc::hide_functor<2, T_functor>, sigc::hide_functor<3, T_functor>, sigc::hide_functor<4, T_functor>, sigc::hide_functor<5, T_functor>, sigc::hide_functor<6, T_functor>, and sigc::retype_functor<T_functor, T_type1, T_type2, T_type3, T_type4, T_type5, T_type6, T_type7>.


Constructor & Destructor Documentation

template <class T_functor>
sigc::adapts<T_functor>::adapts ( const T_functor &  _A_functor  )  [inline, explicit]

Constructs an adaptor that wraps the passed functor.

Parameters:
_A_functor Functor to invoke from operator()().


Member Data Documentation

template <class T_functor>
adaptor_type sigc::adapts<T_functor>::functor_ [mutable]

Adaptor that is invoked from operator()().


The documentation for this struct was generated from the following file:
Generated for libsigc++ 2.0 by Doxygen 1.5.1 © 1997-2001