PCL
|
A wrapper class that applies a binary predicate to pointers to objects. More...
#include <Indirect.h>
Public Member Functions | |
IndirectBinaryPredicate (BP p) | |
IndirectBinaryPredicate (const IndirectBinaryPredicate< T1Ptr, T2Ptr, BP > &)=default | |
bool | operator() (T1Ptr ptr1, T2Ptr ptr2) const |
The BP template argument represents a binary predicate type of the form:
bool (*BP)( T1, T2 )
The T1Ptr and T2Ptr template arguments represent pointers to BP's first and second argument types, respectively. T1Ptr and T2Ptr are also the argument types of IndirectBinaryPredicate::operator ()().
IndirectBinaryPredicate can be used as BP, but acting on pointers to objects of the types T1 and T2.
Definition at line 235 of file Indirect.h.
|
inline |
Constructs an IndirectBinaryPredicate to wrap a binary predicate p.
Definition at line 242 of file Indirect.h.
|
default |
Copy constructor.
|
inline |
Function call operator. Applies the wrapped binary predicate to *ptr1 and *ptr2, and returns its resulting value.
If either of ptr1 or ptr2 is nullptr, the predicate is not invoked and false is returned.
Definition at line 259 of file Indirect.h.