libsigc++  2.99.1
Public Types | Public Member Functions | Protected Attributes | List of all members
sigc::pointer_functor< T_return, T_args > Class Template Reference

pointer_functor wraps existing non-member functions with, or without, arguments. More...

#include <sigc++/functors/ptr_fun.h>

Inheritance diagram for sigc::pointer_functor< T_return, T_args >:
Inheritance graph
[legend]

Public Types

using result_type = T_return
 

Public Member Functions

 pointer_functor ()
 Constructs an invalid functor. More...
 
 pointer_functor (function_type _A_func)
 Constructs a pointer_functor2 object that wraps an existing function. More...
 
T_return operator() (type_trait_take_t< T_args >..._A_a) const
 Execute the wrapped function. More...
 

Protected Attributes

function_type func_ptr_
 

Detailed Description

template<class T_return, class... T_args>
class sigc::pointer_functor< T_return, T_args >

pointer_functor wraps existing non-member functions with, or without, arguments.

Use the convenience function ptr_fun() to create an instance of pointer_functor.

The following template arguments are used:

Member Typedef Documentation

template <class T_return , class... T_args>
using sigc::pointer_functor< T_return, T_args >::result_type = T_return

Constructor & Destructor Documentation

template <class T_return , class... T_args>
sigc::pointer_functor< T_return, T_args >::pointer_functor ( )
inline

Constructs an invalid functor.

template <class T_return , class... T_args>
sigc::pointer_functor< T_return, T_args >::pointer_functor ( function_type  _A_func)
inlineexplicit

Constructs a pointer_functor2 object that wraps an existing function.

Parameters
_A_funcPointer to function that will be invoked from operator()().

Member Function Documentation

template <class T_return , class... T_args>
T_return sigc::pointer_functor< T_return, T_args >::operator() ( type_trait_take_t< T_args >...  _A_a) const
inline

Execute the wrapped function.

Parameters
_A_a1Argument to be passed on to the function.
_A_a2Argument to be passed on to the function.
Returns
The return value of the function invocation.

Member Data Documentation

template <class T_return , class... T_args>
function_type sigc::pointer_functor< T_return, T_args >::func_ptr_
protected