libsigc++ 2.6.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Public Attributes | List of all members
sigc::adaptor_functor< T_functor > Struct Template Reference
Adaptors

Converts an arbitrary functor into an adaptor type. More...

`#include <sigc++/adaptors/adaptor_trait.h>`

Inheritance diagram for sigc::adaptor_functor< T_functor >:
[legend]

## Public Types
typedef functor_trait< T_functor >::result_type | result_type

## Public Member Functions
| adaptor_functor ()
| Constructs an invalid functor. More...
| adaptor_functor (const T_functor& _A_functor)
| Constructs an adaptor_functor object that wraps the passed functor. More...
template<class T_type >
| adaptor_functor (const T_type& _A_type)
| Constructs an adaptor_functor object that wraps the passed (member) function pointer. More...
result_type | operator() () const
| Invokes the wrapped functor passing on the arguments. More...
template<class T_arg1 >
deduce_result_type< T_arg1 >::type | operator() (T_arg1 _A_arg1) const
| Invokes the wrapped functor passing on the arguments. More...
template<class T_arg1 , class T_arg2 >
deduce_result_type< T_arg1, T_arg2 >::type | operator() (T_arg1 _A_arg1, T_arg2 _A_arg2) const
| Invokes the wrapped functor passing on the arguments. More...
template<class T_arg1 , class T_arg2 , class T_arg3 >
deduce_result_type< T_arg1, T_arg2, T_arg3 >::type | operator() (T_arg1 _A_arg1, T_arg2 _A_arg2, T_arg3 _A_arg3) const
| Invokes the wrapped functor passing on the arguments. More...
template<class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 >
deduce_result_type< T_arg1, T_arg2, T_arg3, T_arg4 >::type | operator() (T_arg1 _A_arg1, T_arg2 _A_arg2, T_arg3 _A_arg3, T_arg4 _A_arg4) const
| Invokes the wrapped functor passing on the arguments. More...
template<class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 , class T_arg5 >
deduce_result_type< T_arg1, T_arg2, T_arg3, T_arg4, T_arg5 >::type | operator() (T_arg1 _A_arg1, T_arg2 _A_arg2, T_arg3 _A_arg3, T_arg4 _A_arg4, T_arg5 _A_arg5) const
| Invokes the wrapped functor passing on the arguments. More...
template<class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 , class T_arg5 , class T_arg6 >
deduce_result_type< T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6 >::type | operator() (T_arg1 _A_arg1, T_arg2 _A_arg2, T_arg3 _A_arg3, T_arg4 _A_arg4, T_arg5 _A_arg5, T_arg6 _A_arg6) const
| Invokes the wrapped functor passing on the arguments. More...
template<class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 , class T_arg5 , class T_arg6 , class T_arg7 >
deduce_result_type< T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7 >::type | operator() (T_arg1 _A_arg1, T_arg2 _A_arg2, T_arg3 _A_arg3, T_arg4 _A_arg4, T_arg5 _A_arg5, T_arg6 _A_arg6, T_arg7 _A_arg7) const
| Invokes the wrapped functor passing on the arguments. More...

## Public Attributes
T_functor | functor_
| Functor that is invoked from operator()(). More...

## Detailed Description

### template<class T_functor>
struct sigc::adaptor_functor< T_functor >

Converts an arbitrary functor into an adaptor type.

All adaptor types in libsigc++ have a `template operator()` member of every argument count they support. These functions in turn invoke a stored adaptor's `template operator()`, processing the arguments and return value in a characteristic manner. Explicit function template instantiation is used to pass type hints thus saving copy costs.

adaptor_functor is a glue between adaptors and arbitrary functors that just passes on the arguments. You won't use this type directly.

The template argument T_functor determines the type of stored functor.

## Member Typedef Documentation

template <class T_functor >

typedef functor_trait<T_functor>::result_type sigc::adaptor_functor< T_functor >::result_type

## Constructor & Destructor Documentation

template <class T_functor >

sigc::adaptor_functor< T_functor >::adaptor_functor | ( |  | ) |
| inline

Constructs an invalid functor.

template <class T_functor >

sigc::adaptor_functor< T_functor >::adaptor_functor | ( | const T_functor & | _A_functor | ) |
| inline explicit

Constructs an adaptor_functor object that wraps the passed functor.

Parameters

  _A_functor | Functor to invoke from operator()().

template <class T_functor >
template <class T_type >

sigc::adaptor_functor< T_functor >::adaptor_functor | ( | const T_type & | _A_type | ) |
| inline explicit

Constructs an adaptor_functor object that wraps the passed (member) function pointer.

Parameters

  _A_type | Pointer to function or class method to invoke from operator()().

## Member Function Documentation

template <class T_functor >

adaptor_functor< T_functor >::result_type sigc::adaptor_functor< T_functor >::operator() | ( |  | ) | const

Invokes the wrapped functor passing on the arguments.

Returns
  The return value of the functor invocation.

template <class T_functor >
template <class T_arg1 >

deduce_result_type<T_arg1>::type sigc::adaptor_functor< T_functor >::operator() | ( | T_arg1 | _A_arg1 | ) | const
| inline

Invokes the wrapped functor passing on the arguments.

Parameters

  _A_arg1 | Argument to be passed on to the functor.

Returns
  The return value of the functor invocation.

template <class T_functor >
template <class T_arg1 , class T_arg2 >

deduce_result_type<T_arg1, T_arg2>::type sigc::adaptor_functor< T_functor >::operator() | ( | T_arg1 | _A_arg1,
|  | T_arg2 | _A_arg2
| ) |  | const
| inline

Invokes the wrapped functor passing on the arguments.

Parameters

  _A_arg1 | Argument to be passed on to the functor.
  _A_arg2 | Argument to be passed on to the functor.

Returns
  The return value of the functor invocation.

template <class T_functor >
template <class T_arg1 , class T_arg2 , class T_arg3 >

deduce_result_type<T_arg1, T_arg2, T_arg3>::type sigc::adaptor_functor< T_functor >::operator() | ( | T_arg1 | _A_arg1,
|  | T_arg2 | _A_arg2,
|  | T_arg3 | _A_arg3
| ) |  | const
| inline

Invokes the wrapped functor passing on the arguments.

Parameters

  _A_arg1 | Argument to be passed on to the functor.
  _A_arg2 | Argument to be passed on to the functor.
  _A_arg3 | Argument to be passed on to the functor.

Returns
  The return value of the functor invocation.

template <class T_functor >
template <class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 >

deduce_result_type<T_arg1, T_arg2, T_arg3, T_arg4>::type sigc::adaptor_functor< T_functor >::operator() | ( | T_arg1 | _A_arg1,
|  | T_arg2 | _A_arg2,
|  | T_arg3 | _A_arg3,
|  | T_arg4 | _A_arg4
| ) |  | const
| inline

Invokes the wrapped functor passing on the arguments.

Parameters

  _A_arg1 | Argument to be passed on to the functor.
  _A_arg2 | Argument to be passed on to the functor.
  _A_arg3 | Argument to be passed on to the functor.
  _A_arg4 | Argument to be passed on to the functor.

Returns
  The return value of the functor invocation.

template <class T_functor >
template <class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 , class T_arg5 >

deduce_result_type<T_arg1, T_arg2, T_arg3, T_arg4, T_arg5>::type sigc::adaptor_functor< T_functor >::operator() | ( | T_arg1 | _A_arg1,
|  | T_arg2 | _A_arg2,
|  | T_arg3 | _A_arg3,
|  | T_arg4 | _A_arg4,
|  | T_arg5 | _A_arg5
| ) |  | const
| inline

Invokes the wrapped functor passing on the arguments.

Parameters

  _A_arg1 | Argument to be passed on to the functor.
  _A_arg2 | Argument to be passed on to the functor.
  _A_arg3 | Argument to be passed on to the functor.
  _A_arg4 | Argument to be passed on to the functor.
  _A_arg5 | Argument to be passed on to the functor.

Returns
  The return value of the functor invocation.

template <class T_functor >
template <class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 , class T_arg5 , class T_arg6 >

deduce_result_type<T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6>::type sigc::adaptor_functor< T_functor >::operator() | ( | T_arg1 | _A_arg1,
|  | T_arg2 | _A_arg2,
|  | T_arg3 | _A_arg3,
|  | T_arg4 | _A_arg4,
|  | T_arg5 | _A_arg5,
|  | T_arg6 | _A_arg6
| ) |  | const
| inline

Invokes the wrapped functor passing on the arguments.

Parameters

  _A_arg1 | Argument to be passed on to the functor.
  _A_arg2 | Argument to be passed on to the functor.
  _A_arg3 | Argument to be passed on to the functor.
  _A_arg4 | Argument to be passed on to the functor.
  _A_arg5 | Argument to be passed on to the functor.
  _A_arg6 | Argument to be passed on to the functor.

Returns
  The return value of the functor invocation.

template <class T_functor >
template <class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 , class T_arg5 , class T_arg6 , class T_arg7 >

deduce_result_type<T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7>::type sigc::adaptor_functor< T_functor >::operator() | ( | T_arg1 | _A_arg1,
|  | T_arg2 | _A_arg2,
|  | T_arg3 | _A_arg3,
|  | T_arg4 | _A_arg4,
|  | T_arg5 | _A_arg5,
|  | T_arg6 | _A_arg6,
|  | T_arg7 | _A_arg7
| ) |  | const
| inline

Invokes the wrapped functor passing on the arguments.

Parameters

  _A_arg1 | Argument to be passed on to the functor.
  _A_arg2 | Argument to be passed on to the functor.
  _A_arg3 | Argument to be passed on to the functor.
  _A_arg4 | Argument to be passed on to the functor.
  _A_arg5 | Argument to be passed on to the functor.
  _A_arg6 | Argument to be passed on to the functor.
  _A_arg7 | Argument to be passed on to the functor.

Returns
  The return value of the functor invocation.

## Member Data Documentation

template <class T_functor >

T_functor sigc::adaptor_functor< T_functor >::functor_
| mutable

Functor that is invoked from operator()().