PCL
pcl::IndirectBinaryFunction< T1Ptr, T2Ptr, BF > Class Template Reference

A wrapper class that applies a binary function to pointers to objects. More...

#include <Indirect.h>

Public Member Functions

 IndirectBinaryFunction (BF f)
 
 IndirectBinaryFunction (const IndirectBinaryFunction< T1Ptr, T2Ptr, BF > &)=default
 
void operator() (T1Ptr ptr1, T2Ptr ptr2) const
 

Detailed Description

template<class T1Ptr, class T2Ptr, class BF>
class pcl::IndirectBinaryFunction< T1Ptr, T2Ptr, BF >

The BF template argument represents a binary function type of the form:

void (*BF)( T1, T2 )

The T1Ptr and T2Ptr template arguments represent pointers to BF's first and second argument types, respectively. T1Ptr and T2Ptr are also the argument types of IndirectBinaryFunction::operator ()().

IndirectBinaryFunction can be used as BF, but acting on pointers to objects of the types T1 and T2.

Definition at line 131 of file Indirect.h.

Constructor & Destructor Documentation

◆ IndirectBinaryFunction() [1/2]

template<class T1Ptr , class T2Ptr , class BF >
pcl::IndirectBinaryFunction< T1Ptr, T2Ptr, BF >::IndirectBinaryFunction ( BF  f)
inline

Constructs an IndirectBinaryFunction to wrap a binary function f.

Definition at line 138 of file Indirect.h.

◆ IndirectBinaryFunction() [2/2]

template<class T1Ptr , class T2Ptr , class BF >
pcl::IndirectBinaryFunction< T1Ptr, T2Ptr, BF >::IndirectBinaryFunction ( const IndirectBinaryFunction< T1Ptr, T2Ptr, BF > &  )
default

Copy constructor.

Member Function Documentation

◆ operator()()

template<class T1Ptr , class T2Ptr , class BF >
void pcl::IndirectBinaryFunction< T1Ptr, T2Ptr, BF >::operator() ( T1Ptr  ptr1,
T2Ptr  ptr2 
) const
inline

Function call operator. Applies the wrapped binary function to *ptr1 and *ptr2.

If either ptr1 or ptr2 is nullptr, the function is not invoked and calling this member function has no effect.

Definition at line 155 of file Indirect.h.


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