PCL
pcl::IndirectUnaryPredicate< TPtr, UP > Class Template Reference

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

#include <Indirect.h>

Public Member Functions

 IndirectUnaryPredicate (const IndirectUnaryPredicate< TPtr, UP > &)=default
 
 IndirectUnaryPredicate (UP p)
 
bool operator() (TPtr ptr) const
 

Detailed Description

template<class TPtr, class UP>
class pcl::IndirectUnaryPredicate< TPtr, UP >

The UP template argument represents a unary predicate type of the form:

bool (*UP)( T )

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

IndirectUnaryPredicate can be used as UP, but acting on pointers to objects of type T.

Definition at line 184 of file Indirect.h.

Constructor & Destructor Documentation

◆ IndirectUnaryPredicate() [1/2]

template<class TPtr , class UP >
pcl::IndirectUnaryPredicate< TPtr, UP >::IndirectUnaryPredicate ( UP  p)
inline

Constructs an IndirectUnaryFunction to wrap a unary predicate p.

Definition at line 191 of file Indirect.h.

◆ IndirectUnaryPredicate() [2/2]

template<class TPtr , class UP >
pcl::IndirectUnaryPredicate< TPtr, UP >::IndirectUnaryPredicate ( const IndirectUnaryPredicate< TPtr, UP > &  )
default

Copy constructor.

Member Function Documentation

◆ operator()()

template<class TPtr , class UP >
bool pcl::IndirectUnaryPredicate< TPtr, UP >::operator() ( TPtr  ptr) const
inline

Function call operator. Applies the wrapped unary predicate to *ptr and returns its resulting value.

If ptr is nullptr, the predicate is not invoked and false is returned.

Definition at line 207 of file Indirect.h.


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