PCL
pcl::IndirectBinaryPredicate< T1Ptr, T2Ptr, BP > Class Template Reference

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
 

Detailed Description

template<class T1Ptr, class T2Ptr, class BP>
class pcl::IndirectBinaryPredicate< T1Ptr, T2Ptr, BP >

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.

Constructor & Destructor Documentation

◆ IndirectBinaryPredicate() [1/2]

template<class T1Ptr , class T2Ptr , class BP >
pcl::IndirectBinaryPredicate< T1Ptr, T2Ptr, BP >::IndirectBinaryPredicate ( BP  p)
inline

Constructs an IndirectBinaryPredicate to wrap a binary predicate p.

Definition at line 242 of file Indirect.h.

◆ IndirectBinaryPredicate() [2/2]

template<class T1Ptr , class T2Ptr , class BP >
pcl::IndirectBinaryPredicate< T1Ptr, T2Ptr, BP >::IndirectBinaryPredicate ( const IndirectBinaryPredicate< T1Ptr, T2Ptr, BP > &  )
default

Copy constructor.

Member Function Documentation

◆ operator()()

template<class T1Ptr , class T2Ptr , class BP >
bool pcl::IndirectBinaryPredicate< T1Ptr, T2Ptr, BP >::operator() ( T1Ptr  ptr1,
T2Ptr  ptr2 
) const
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.


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