Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

DGtal::DomainPredicate< TDomain > Struct Template Reference

Aim: The predicate returning true iff the point is in the domain given at construction. It is just a wrapper class around the methods Domain::isInside( const Point & ), where Domain stands for any model of CDomain. More...

#include <DomainPredicate.h>

Inheritance diagram for DGtal::DomainPredicate< TDomain >:
Inheritance graph
[legend]

Public Types

typedef TDomain Domain
typedef Domain::Point Point

Public Member Functions

 DomainPredicate (const Domain &aDomain)
 DomainPredicate (const DomainPredicate &other)
bool operator() (const Point &p) const
const Domaindomain () const

Protected Member Functions

 DomainPredicate ()

Private Member Functions

DomainPredicateoperator= (const DomainPredicate &other)

Private Attributes

const Domain *const myDomain

Detailed Description

template<typename TDomain>
struct DGtal::DomainPredicate< TDomain >

Aim: The predicate returning true iff the point is in the domain given at construction. It is just a wrapper class around the methods Domain::isInside( const Point & ), where Domain stands for any model of CDomain.

Description of template class 'DomainPredicate'

It is used by domains to define the type by their method predicate().

Model of CPointPredicate

See also:
DomainAdjacency::predicate.

Member Typedef Documentation

template<typename TDomain>
typedef TDomain DGtal::DomainPredicate< TDomain >::Domain
template<typename TDomain>
typedef Domain::Point DGtal::DomainPredicate< TDomain >::Point

Constructor & Destructor Documentation

template<typename TDomain>
DGtal::DomainPredicate< TDomain >::DomainPredicate ( const Domain aDomain  ) 

Constructor from domain.

Parameters:
aDomain any domain.
template<typename TDomain>
DGtal::DomainPredicate< TDomain >::DomainPredicate ( const DomainPredicate< TDomain > &  other  ) 

Copy constructor.

Parameters:
other the object to clone.
template<typename TDomain>
DGtal::DomainPredicate< TDomain >::DomainPredicate (  )  [protected]

Constructor. Forbidden by default (protected to avoid g++ warnings).


Member Function Documentation

template<typename TDomain>
const Domain& DGtal::DomainPredicate< TDomain >::domain (  )  const
Returns:
a const reference to the associated domain.
template<typename TDomain>
bool DGtal::DomainPredicate< TDomain >::operator() ( const Point p  )  const
Parameters:
p any point.
Returns:
true iff p is in the domain.
template<typename TDomain>
DomainPredicate& DGtal::DomainPredicate< TDomain >::operator= ( const DomainPredicate< TDomain > &  other  )  [private]

Assignment.

Parameters:
other the object to copy.
Returns:
a reference on 'this'. Forbidden by default.

Field Documentation

template<typename TDomain>
const Domain* const DGtal::DomainPredicate< TDomain >::myDomain [private]

The domain corresponding to this predicate.


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