PSCF v1.1
Public Member Functions | List of all members
Util::MethodFunctor< Object, T > Class Template Reference

Functor that wraps a one-argument class member function. More...

#include <MethodFunctor.h>

Inheritance diagram for Util::MethodFunctor< Object, T >:
Util::IFunctor< T >

Public Member Functions

 MethodFunctor (Object &object, Method1Ptr methodPtr)
 Constructor. More...
 
virtual ~MethodFunctor ()
 Destructor. More...
 
virtual void operator() (const T &t)
 Operator (). More...
 
- Public Member Functions inherited from Util::IFunctor< T >
virtual ~IFunctor ()
 Destructor (virtual) More...
 
virtual void operator() (const T &t)=0
 Call the associated function. More...
 

Detailed Description

template<class Object, typename T = void>
class Util::MethodFunctor< Object, T >

Functor that wraps a one-argument class member function.

The constructor to MethodFunctor<T> takes pointers to an invoking instance of class Object and a member function that takes one T argument. The operator () (const T&) invokes that method on that object.

Definition at line 26 of file MethodFunctor.h.

Constructor & Destructor Documentation

◆ MethodFunctor()

template<class Object , typename T = void>
Util::MethodFunctor< Object, T >::MethodFunctor ( Object &  object,
Method1Ptr  methodPtr 
)
inline

Constructor.

Parameters
objectinvoking object
methodPtrpointer to member function

Definition at line 38 of file MethodFunctor.h.

◆ ~MethodFunctor()

template<class Object , typename T = void>
virtual Util::MethodFunctor< Object, T >::~MethodFunctor ( )
inlinevirtual

Destructor.

Definition at line 46 of file MethodFunctor.h.

Member Function Documentation

◆ operator()()

template<class Object , typename T = void>
virtual void Util::MethodFunctor< Object, T >::operator() ( const T &  t)
inlinevirtual

Operator ().

Parameters
tParameter passed to method of associated T object.

Implements Util::IFunctor< T >.

Definition at line 53 of file MethodFunctor.h.


The documentation for this class was generated from the following file: