DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Data Fields
DGtal::BinaryPointPredicate< TPointPredicate1, TPointPredicate2, TBinaryFunctor > Struct Template Reference

#include <BasicPointPredicates.h>

Public Types

typedef TPointPredicate1 PointPredicate1
typedef TPointPredicate2 PointPredicate2
typedef PointPredicate1::Point Point
typedef PointPredicate2::Point Point2

Public Member Functions

 BOOST_STATIC_ASSERT ((boost::is_same< Point, typename PointPredicate2::Point >::value))
 BinaryPointPredicate (const PointPredicate1 &pred1, const PointPredicate2 &pred2, const TBinaryFunctor &boolFunctor)
 BinaryPointPredicate (const BinaryPointPredicate &other)
BinaryPointPredicateoperator= (const BinaryPointPredicate &other)
 ~BinaryPointPredicate ()
bool operator() (const Point &p) const

Data Fields

const PointPredicate1myPred1
const PointPredicate2myPred2
const TBinaryFunctor * myBoolFunctor

Detailed Description

template<typename TPointPredicate1, typename TPointPredicate2, typename TBinaryFunctor = BoolFunction2>
struct DGtal::BinaryPointPredicate< TPointPredicate1, TPointPredicate2, TBinaryFunctor >

Aim: The predicate returns true when the given binary functor returns true for the two PointPredicates given at construction.

Description of template class 'BinaryPointPredicate'

Template Parameters:
PointPredicate1the left predicate type.
PointPredicate2the right predicate type.
TBinaryFunctorbinary functor used for comparison

Definition at line 268 of file BasicPointPredicates.h.


Member Typedef Documentation

template<typename TPointPredicate1 , typename TPointPredicate2 , typename TBinaryFunctor = BoolFunction2>
typedef PointPredicate1::Point DGtal::BinaryPointPredicate< TPointPredicate1, TPointPredicate2, TBinaryFunctor >::Point

Definition at line 272 of file BasicPointPredicates.h.

template<typename TPointPredicate1 , typename TPointPredicate2 , typename TBinaryFunctor = BoolFunction2>
typedef PointPredicate2::Point DGtal::BinaryPointPredicate< TPointPredicate1, TPointPredicate2, TBinaryFunctor >::Point2

Definition at line 278 of file BasicPointPredicates.h.

template<typename TPointPredicate1 , typename TPointPredicate2 , typename TBinaryFunctor = BoolFunction2>
typedef TPointPredicate1 DGtal::BinaryPointPredicate< TPointPredicate1, TPointPredicate2, TBinaryFunctor >::PointPredicate1

Definition at line 270 of file BasicPointPredicates.h.

template<typename TPointPredicate1 , typename TPointPredicate2 , typename TBinaryFunctor = BoolFunction2>
typedef TPointPredicate2 DGtal::BinaryPointPredicate< TPointPredicate1, TPointPredicate2, TBinaryFunctor >::PointPredicate2

Definition at line 271 of file BasicPointPredicates.h.


Constructor & Destructor Documentation

template<typename TPointPredicate1 , typename TPointPredicate2 , typename TBinaryFunctor >
DGtal::BinaryPointPredicate< TPointPredicate1, TPointPredicate2, TBinaryFunctor >::BinaryPointPredicate ( const PointPredicate1 pred1,
const PointPredicate2 pred2,
const TBinaryFunctor &  boolFunctor 
)
inline

Constructor from predicates and bool Functor.

Parameters:
pred1the left predicate.
pred2the right predicate.
boolFunctorthe binary function used to combine pred1 and pred2.

Definition at line 136 of file BasicPointPredicates.ih.

: myPred1( &pred1 ), myPred2( &pred2 ), myBoolFunctor( &boolFunctor )
{
}
template<typename TPointPredicate1 , typename TPointPredicate2 , typename TBinaryFunctor >
DGtal::BinaryPointPredicate< TPointPredicate1, TPointPredicate2, TBinaryFunctor >::BinaryPointPredicate ( const BinaryPointPredicate< TPointPredicate1, TPointPredicate2, TBinaryFunctor > &  other)
inline

Copy constructor.

Parameters:
otherthe object to copy

Definition at line 146 of file BasicPointPredicates.ih.

: myPred1( other.pred1 ), myPred2( other.pred2 ), myBoolFunctor( other.boolFunctor )
{
}
template<typename TPointPredicate1 , typename TPointPredicate2 , typename TBinaryFunctor >
DGtal::BinaryPointPredicate< TPointPredicate1, TPointPredicate2, TBinaryFunctor >::~BinaryPointPredicate ( )
inline

Destructor

Definition at line 169 of file BasicPointPredicates.ih.

{
}

Member Function Documentation

template<typename TPointPredicate1 , typename TPointPredicate2 , typename TBinaryFunctor = BoolFunction2>
DGtal::BinaryPointPredicate< TPointPredicate1, TPointPredicate2, TBinaryFunctor >::BOOST_STATIC_ASSERT ( (boost::is_same< Point, typename PointPredicate2::Point >::value)  )
template<typename TPointPredicate1 , typename TPointPredicate2 , typename TBinaryFunctor >
bool DGtal::BinaryPointPredicate< TPointPredicate1, TPointPredicate2, TBinaryFunctor >::operator() ( const Point p) const
inline
Parameters:
pany point.
Returns:
the value of the predicate at this point.

Definition at line 177 of file BasicPointPredicates.ih.

{
return myBoolFunctor->operator()( myPred1->operator()( p ),
myPred2->operator()( p ) );
}
template<typename TPointPredicate1 , typename TPointPredicate2 , typename TBinaryFunctor >
DGtal::BinaryPointPredicate< TPointPredicate1, TPointPredicate2, TBinaryFunctor > & DGtal::BinaryPointPredicate< TPointPredicate1, TPointPredicate2, TBinaryFunctor >::operator= ( const BinaryPointPredicate< TPointPredicate1, TPointPredicate2, TBinaryFunctor > &  other)
inline

Assignement

Parameters:
otherthe object to copy
Returns:
reference to the current object

Definition at line 155 of file BasicPointPredicates.ih.

References DGtal::BinaryPointPredicate< TPointPredicate1, TPointPredicate2, TBinaryFunctor >::myBoolFunctor, DGtal::BinaryPointPredicate< TPointPredicate1, TPointPredicate2, TBinaryFunctor >::myPred1, and DGtal::BinaryPointPredicate< TPointPredicate1, TPointPredicate2, TBinaryFunctor >::myPred2.

{
if (this != &other)
{
myPred1 = other.myPred1;
myPred2 = other.myPred2;
myBoolFunctor = other.myBoolFunctor;
}
return *this;
}

Field Documentation

template<typename TPointPredicate1 , typename TPointPredicate2 , typename TBinaryFunctor = BoolFunction2>
const TBinaryFunctor* DGtal::BinaryPointPredicate< TPointPredicate1, TPointPredicate2, TBinaryFunctor >::myBoolFunctor

aliasing pointer to the binary functor.

Definition at line 320 of file BasicPointPredicates.h.

Referenced by DGtal::BinaryPointPredicate< TPointPredicate1, TPointPredicate2, TBinaryFunctor >::operator=().

template<typename TPointPredicate1 , typename TPointPredicate2 , typename TBinaryFunctor = BoolFunction2>
const PointPredicate1* DGtal::BinaryPointPredicate< TPointPredicate1, TPointPredicate2, TBinaryFunctor >::myPred1

aliasing pointer to the left predicate.

Definition at line 316 of file BasicPointPredicates.h.

Referenced by DGtal::BinaryPointPredicate< TPointPredicate1, TPointPredicate2, TBinaryFunctor >::operator=().

template<typename TPointPredicate1 , typename TPointPredicate2 , typename TBinaryFunctor = BoolFunction2>
const PointPredicate2* DGtal::BinaryPointPredicate< TPointPredicate1, TPointPredicate2, TBinaryFunctor >::myPred2

aliasing pointer to the right predicate.

Definition at line 318 of file BasicPointPredicates.h.

Referenced by DGtal::BinaryPointPredicate< TPointPredicate1, TPointPredicate2, TBinaryFunctor >::operator=().


The documentation for this struct was generated from the following files: