Functor< R(A1, A2) > Class Template Reference

Template specialization of binary functions. More...

#include <Functor.h>

Classes

class  Base
 Pure virtual base class of binary functor implementations. More...
 
class  Function
 Implementation calls binary function F. More...
 
class  Method
 Implementation calls binary method M of class C. More...
 

Public Types

typedef A1 first_argument_type
 
typedef A2 second_argument_type
 
typedef R result_type
 

Public Member Functions

 Functor ()
 Default constructor.
 
operator() (const A1 &p1, const A2 &p2) const
 Binary function call.
 
template<class C , typename M >
 Functor (C *instance, M method)
 Construct from a class instance and binary method.
 
template<class C , typename M >
 Functor (const C &instance, M method)
 Construct from a class instance and binary method.
 
template<typename F >
 Functor (F function)
 Construct from a binary function.
 
template<class C , typename M >
void set (C *instance, M method)
 Set equal to a class instance and binary method.
 
template<typename F >
void set (F function)
 Set equal to a binary function.
 
bool operator! () const
 Return true if functor is not defined.
 
 operator bool () const
 Return true if functor is defined.
 
const FunctorBaseget_functor () const
 Get the pointer to the functor implementation.
 

Protected Attributes

Reference::To< Base > functor
 The implementation.
 

Detailed Description

template<typename R, typename A1, typename A2>
class Functor< R(A1, A2) >

Template specialization of binary functions.

This class satisfies the STL definition of an Adaptable Binary Function


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

Generated using doxygen 1.8.17