std::check_fun_t< _Tp, _Arg > Class Template Reference

binary function adaptor for check functions used by map2 More...

#include <map2.h>

Inheritance diagram for std::check_fun_t< _Tp, _Arg >:

Inheritance graph
{binary_function\<_Tp,const _Arg&,bool\>\n||}
[legend]
Collaboration diagram for std::check_fun_t< _Tp, _Arg >:

Collaboration graph
{binary_function\<_Tp,const _Arg&,bool\>\n||}
[legend]

List of all members.

Public Member Functions

 check_fun_t (_fun_type __pf)
bool operator() (const _Tp &__r, const _Arg &__x) const


Detailed Description

template<class _Tp, class _Arg>
class std::check_fun_t< _Tp, _Arg >

binary function adaptor for check functions used by map2

binary function adaptor that takes a const class reference as caller class and a const class reference as argument. This is used with map2.values(check_fun_t). For that purpose a const_mem_fun1_ref_t would be slower since it needs each checked element to be copied before the check call can be done.

Parameters:
_Tp type of instances to execute the function
_Arg type of function arguments

Definition at line 72 of file map2.h.


Constructor & Destructor Documentation

template<class _Tp, class _Arg>
std::check_fun_t< _Tp, _Arg >::check_fun_t ( _fun_type  __pf  )  [inline, explicit]

explicit constructor

Definition at line 79 of file map2.h.

00079 : _M_f(__pf) {}


Member Function Documentation

template<class _Tp, class _Arg>
bool std::check_fun_t< _Tp, _Arg >::operator() ( const _Tp &  __r,
const _Arg &  __x 
) const [inline]

execute binary function on instances of type _Tp with arguments of type _Arg.

Parameters:
__r instance to execute the function
__x argument to function
Returns:
result of binary function

Definition at line 88 of file map2.h.

00089     { 
00090         return (__r.*_M_f)(__x); 
00091     }


The documentation for this class was generated from the following file:
  Hosted on code.google.com  
© Marcus Börger
Generated on Fri Jan 18 21:21:15 2008 for MBO-lib by doxygen 1.5.4