PCL
pcl::IndirectUnaryFunction< TPtr, UF > Class Template Reference

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

#include <Indirect.h>

Public Member Functions

 IndirectUnaryFunction (IndirectUnaryFunction< TPtr, UF > &)=default
 
 IndirectUnaryFunction (UF f)
 
void operator() (TPtr ptr) const
 

Detailed Description

template<class TPtr, class UF>
class pcl::IndirectUnaryFunction< TPtr, UF >

The UF template argument represents a unary function type of the form:

void (*UF)( T )

The TPtr template argument represents a pointer to UF's argument type. TPtr is also the argument type of IndirectUnaryFunction::operator ()().

IndirectUnaryFunction can be used as UF, but acting on pointers to objects of type T.

Definition at line 79 of file Indirect.h.

Constructor & Destructor Documentation

◆ IndirectUnaryFunction() [1/2]

template<class TPtr , class UF >
pcl::IndirectUnaryFunction< TPtr, UF >::IndirectUnaryFunction ( UF  f)
inline

Constructs an IndirectUnaryFunction to wrap a unary m_function f.

Definition at line 86 of file Indirect.h.

◆ IndirectUnaryFunction() [2/2]

template<class TPtr , class UF >
pcl::IndirectUnaryFunction< TPtr, UF >::IndirectUnaryFunction ( IndirectUnaryFunction< TPtr, UF > &  )
default

Copy constructor.

Member Function Documentation

◆ operator()()

template<class TPtr , class UF >
void pcl::IndirectUnaryFunction< TPtr, UF >::operator() ( TPtr  ptr) const
inline

Function call operator. Applies the wrapped unary function to *ptr.

If ptr is nullptr, the function is not invoked and calling this member function has no effect.

Definition at line 102 of file Indirect.h.


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