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::PointFunctorPredicate< TPointFunctor, TPredicate > Struct Template Reference

#include <BasicPointPredicates.h>

Public Types

typedef TPointFunctor PointFunctor
typedef TPredicate Predicate
typedef PointFunctor::Point Point

Public Member Functions

 BOOST_CONCEPT_ASSERT ((CPointFunctor< TPointFunctor >))
 BOOST_CONCEPT_ASSERT ((CUnaryFunctor< TPredicate, typename TPointFunctor::Value, bool >))
 PointFunctorPredicate (const PointFunctor &aFun, const Predicate &aPred)
 PointFunctorPredicate (const PointFunctorPredicate &other)
PointFunctorPredicateoperator= (const PointFunctorPredicate &other)
 ~PointFunctorPredicate ()
bool operator() (const Point &p) const

Data Fields

const PointFunctormyFun
const PredicatemyPred

Detailed Description

template<typename TPointFunctor, typename TPredicate>
struct DGtal::PointFunctorPredicate< TPointFunctor, TPredicate >

Aim: The predicate returns true when the predicate returns true for the value assigned to a given point in the point functor.

Description of template class 'PointFunctorPredicate'

Template Parameters:
TPointFunctora model of CPointFunctor.
TPredicatea type of predicate on values

Definition at line 335 of file BasicPointPredicates.h.


Member Typedef Documentation

template<typename TPointFunctor, typename TPredicate>
typedef PointFunctor::Point DGtal::PointFunctorPredicate< TPointFunctor, TPredicate >::Point

Definition at line 342 of file BasicPointPredicates.h.

template<typename TPointFunctor, typename TPredicate>
typedef TPointFunctor DGtal::PointFunctorPredicate< TPointFunctor, TPredicate >::PointFunctor

Definition at line 340 of file BasicPointPredicates.h.

template<typename TPointFunctor, typename TPredicate>
typedef TPredicate DGtal::PointFunctorPredicate< TPointFunctor, TPredicate >::Predicate

Definition at line 341 of file BasicPointPredicates.h.


Constructor & Destructor Documentation

template<typename TPointFunctor , typename TPredicate >
DGtal::PointFunctorPredicate< TPointFunctor, TPredicate >::PointFunctorPredicate ( const PointFunctor aFun,
const Predicate aPred 
)
inline

Constructor from an PointFunctor and a predicate

Parameters:
aFunan point functor.
aPreda predicate.

Definition at line 187 of file BasicPointPredicates.ih.

: myFun( &aFun ), myPred( &aPred )
{
}
template<typename TPointFunctor , typename TPredicate >
DGtal::PointFunctorPredicate< TPointFunctor, TPredicate >::PointFunctorPredicate ( const PointFunctorPredicate< TPointFunctor, TPredicate > &  other)
inline

Copy constructor.

Parameters:
otherthe object to copy

Definition at line 196 of file BasicPointPredicates.ih.

: myFun( other.myFun), myPred( other.myPred )
{
}
template<typename TPointFunctor , typename TPredicate >
DGtal::PointFunctorPredicate< TPointFunctor, TPredicate >::~PointFunctorPredicate ( )
inline

Destructor

Definition at line 218 of file BasicPointPredicates.ih.

{
}

Member Function Documentation

template<typename TPointFunctor, typename TPredicate>
DGtal::PointFunctorPredicate< TPointFunctor, TPredicate >::BOOST_CONCEPT_ASSERT ( (CPointFunctor< TPointFunctor >)  )
template<typename TPointFunctor, typename TPredicate>
DGtal::PointFunctorPredicate< TPointFunctor, TPredicate >::BOOST_CONCEPT_ASSERT ( (CUnaryFunctor< TPredicate, typename TPointFunctor::Value, bool >)  )
template<typename TPointFunctor , typename TPredicate >
bool DGtal::PointFunctorPredicate< TPointFunctor, TPredicate >::operator() ( const Point p) const
inline
Parameters:
pany point.
Returns:
the value of the predicate at this point.

Definition at line 226 of file BasicPointPredicates.ih.

{
return myPred->operator()( myFun->operator()( p ) );
}
template<typename TPointFunctor , typename TPredicate >
DGtal::PointFunctorPredicate< TPointFunctor, TPredicate > & DGtal::PointFunctorPredicate< TPointFunctor, TPredicate >::operator= ( const PointFunctorPredicate< TPointFunctor, TPredicate > &  other)
inline

Assignement

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

Definition at line 205 of file BasicPointPredicates.ih.

References DGtal::PointFunctorPredicate< TPointFunctor, TPredicate >::myFun, and DGtal::PointFunctorPredicate< TPointFunctor, TPredicate >::myPred.

{
if (this != &other)
{
myFun = other.myFun;
myPred = other.myPred;
}
return *this;
}

Field Documentation

template<typename TPointFunctor, typename TPredicate>
const PointFunctor* DGtal::PointFunctorPredicate< TPointFunctor, TPredicate >::myFun

aliasing pointer to the PointFunctor.

Definition at line 377 of file BasicPointPredicates.h.

Referenced by DGtal::PointFunctorPredicate< TPointFunctor, TPredicate >::operator=().

template<typename TPointFunctor, typename TPredicate>
const Predicate* DGtal::PointFunctorPredicate< TPointFunctor, TPredicate >::myPred

aliasing pointer to the predicate.

Definition at line 379 of file BasicPointPredicates.h.

Referenced by DGtal::PointFunctorPredicate< TPointFunctor, TPredicate >::operator=().


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