libsigc++ 2.12.0
Public Types | Public Member Functions | Protected Attributes | List of all members
sigc::mem_functor0< T_return, T_obj > Class Template Reference

mem_functor0 wraps methods with 0 argument(s). More...

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

Inheritance diagram for sigc::mem_functor0< T_return, T_obj >:
Inheritance graph
[legend]

Public Types

typedef T_return(T_obj::* function_type) ()
 
typedef T_return result_type
 

Public Member Functions

 mem_functor0 ()
 Constructs an invalid functor. More...
 
 mem_functor0 (function_type _A_func)
 Constructs a mem_functor0 object that wraps the passed method. More...
 
T_return operator() (T_obj & _A_obj) const
 Execute the wrapped method operating on the passed instance. More...
 
T_return operator() (T_obj * _A_obj) const
 Execute the wrapped method operating on the passed instance. More...
 

Protected Attributes

function_type func_ptr_
 

Detailed Description

template <class T_return, class T_obj>
class sigc::mem_functor0< T_return, T_obj >

mem_functor0 wraps methods with 0 argument(s).

Use the convenience function mem_fun() to create an instance of mem_functor0.

The following template arguments are used:

Member Typedef Documentation

◆ function_type

template <class T_return , class T_obj >
typedef T_return(T_obj::* sigc::mem_functor0< T_return, T_obj >::function_type) ()

◆ result_type

template <class T_return , class T_obj >
typedef T_return sigc::mem_functor0< T_return, T_obj >::result_type

Constructor & Destructor Documentation

◆ mem_functor0() [1/2]

template <class T_return , class T_obj >
sigc::mem_functor0< T_return, T_obj >::mem_functor0 ( )
inline

Constructs an invalid functor.

◆ mem_functor0() [2/2]

template <class T_return , class T_obj >
sigc::mem_functor0< T_return, T_obj >::mem_functor0 ( function_type  _A_func)
inlineexplicit

Constructs a mem_functor0 object that wraps the passed method.

Parameters
_A_funcPointer to method will be invoked from operator()().

Member Function Documentation

◆ operator()() [1/2]

template <class T_return , class T_obj >
T_return sigc::mem_functor0< T_return, T_obj >::operator() ( T_obj &  _A_obj) const
inline

Execute the wrapped method operating on the passed instance.

Parameters
_A_objReference to instance the method should operate on.
Returns
The return value of the method invocation.

◆ operator()() [2/2]

template <class T_return , class T_obj >
T_return sigc::mem_functor0< T_return, T_obj >::operator() ( T_obj *  _A_obj) const
inline

Execute the wrapped method operating on the passed instance.

Deprecated:
Please use the constructor that takes the object by reference instead.
Parameters
_A_objPointer to instance the method should operate on.
Returns
The return value of the method invocation.

Member Data Documentation

◆ func_ptr_

template <class T_return , class T_obj >
function_type sigc::mem_functor0< T_return, T_obj >::func_ptr_
protected