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

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

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

Inheritance diagram for sigc::adaptor_functor< T_functor >:
Inheritance graph
[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

◆ result_type

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

Constructor & Destructor Documentation

◆ adaptor_functor() [1/3]

template <class T_functor >
sigc::adaptor_functor< T_functor >::adaptor_functor ( )
inline

Constructs an invalid functor.

◆ adaptor_functor() [2/3]

template <class T_functor >
sigc::adaptor_functor< T_functor >::adaptor_functor ( const T_functor &  _A_functor)
inlineexplicit

Constructs an adaptor_functor object that wraps the passed functor.

Parameters
_A_functorFunctor to invoke from operator()().

◆ adaptor_functor() [3/3]

template <class T_functor >
template <class T_type >
sigc::adaptor_functor< T_functor >::adaptor_functor ( const T_type &  _A_type)
inlineexplicit

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

Parameters
_A_typePointer to function or class method to invoke from operator()().

Member Function Documentation

◆ operator()() [1/8]

template <class T_functor >
adaptor_functor< T_functor >::result_type sigc::adaptor_functor< T_functor >::operator()

Invokes the wrapped functor passing on the arguments.

Returns
The return value of the functor invocation.

◆ operator()() [2/8]

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_arg1Argument to be passed on to the functor.
Returns
The return value of the functor invocation.

◆ operator()() [3/8]

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_arg1Argument to be passed on to the functor.
_A_arg2Argument to be passed on to the functor.
Returns
The return value of the functor invocation.

◆ operator()() [4/8]

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_arg1Argument to be passed on to the functor.
_A_arg2Argument to be passed on to the functor.
_A_arg3Argument to be passed on to the functor.
Returns
The return value of the functor invocation.

◆ operator()() [5/8]

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_arg1Argument to be passed on to the functor.
_A_arg2Argument to be passed on to the functor.
_A_arg3Argument to be passed on to the functor.
_A_arg4Argument to be passed on to the functor.
Returns
The return value of the functor invocation.

◆ operator()() [6/8]

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_arg1Argument to be passed on to the functor.
_A_arg2Argument to be passed on to the functor.
_A_arg3Argument to be passed on to the functor.
_A_arg4Argument to be passed on to the functor.
_A_arg5Argument to be passed on to the functor.
Returns
The return value of the functor invocation.

◆ operator()() [7/8]

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_arg1Argument to be passed on to the functor.
_A_arg2Argument to be passed on to the functor.
_A_arg3Argument to be passed on to the functor.
_A_arg4Argument to be passed on to the functor.
_A_arg5Argument to be passed on to the functor.
_A_arg6Argument to be passed on to the functor.
Returns
The return value of the functor invocation.

◆ operator()() [8/8]

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_arg1Argument to be passed on to the functor.
_A_arg2Argument to be passed on to the functor.
_A_arg3Argument to be passed on to the functor.
_A_arg4Argument to be passed on to the functor.
_A_arg5Argument to be passed on to the functor.
_A_arg6Argument to be passed on to the functor.
_A_arg7Argument to be passed on to the functor.
Returns
The return value of the functor invocation.

Member Data Documentation

◆ functor_

template <class T_functor >
T_functor sigc::adaptor_functor< T_functor >::functor_
mutable

Functor that is invoked from operator()().