DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Private Attributes
DGtal::CPredicate< T, TElement > Struct Template Reference

#include <CPredicate.h>

Inheritance diagram for DGtal::CPredicate< T, TElement >:
Inheritance graph
[legend]
Collaboration diagram for DGtal::CPredicate< T, TElement >:
Collaboration graph
[legend]

Public Types

typedef TElement Element

Public Member Functions

 BOOST_CONCEPT_USAGE (CPredicate)
void checkConstConstraints () const

Private Attributes

myPred
Element myElement
bool myBool

Detailed Description

template<typename T, typename TElement>
struct DGtal::CPredicate< T, TElement >

Aim: Defines a predicate function, ie. a functor mapping a domain into the set of booleans.

Description of concept 'CPredicate'

Template Parameters:
Tthe type that should be a model of this predicate
TELementthe type of an element of the predicate domain.

Refinement of boost::Assignable<T>

Associated types :

Notation

Definitions

Valid expressions and semantics

Name Expression Type requirements Return type Precondition Semantics Postcondition Complexity
Apply predicate x( p ) bool the value of the predicate x at element p

Invariants

Models

 - specializations: CPointPredicate, CVertexPredicate

Notes

 CPredicate allows to factor codes when writing concepts for new
 kinds of predicates.

Definition at line 107 of file CPredicate.h.


Member Typedef Documentation

template<typename T, typename TElement>
typedef TElement DGtal::CPredicate< T, TElement >::Element

Definition at line 111 of file CPredicate.h.


Member Function Documentation

template<typename T, typename TElement>
DGtal::CPredicate< T, TElement >::BOOST_CONCEPT_USAGE ( CPredicate< T, TElement >  )
inline

Definition at line 113 of file CPredicate.h.

template<typename T, typename TElement>
void DGtal::CPredicate< T, TElement >::checkConstConstraints ( ) const
inline

Definition at line 118 of file CPredicate.h.

Referenced by DGtal::CPredicate< T, T::Vertex >::BOOST_CONCEPT_USAGE().

{
// x( p ) returns bool.
}

Field Documentation

template<typename T, typename TElement>
bool DGtal::CPredicate< T, TElement >::myBool
private
template<typename T, typename TElement>
Element DGtal::CPredicate< T, TElement >::myElement
private
template<typename T, typename TElement>
T DGtal::CPredicate< T, TElement >::myPred
private

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