h o m e d o c u m e n t a t i o n c l a s s h i e r a r c h y

ChainPredicateIterator Class Reference

#include <ChainingIterators.h>

Inheritance diagram for ChainPredicateIterator:

ChainingIterator ViewEdgeIterator List of all members.

Detailed Description

A "generic" user-controlled ViewEdge iterator. This iterator is in particular built from a unary predicate and a binary predicate. First, the unary predicate is evaluated for all potential next ViewEdges in order to only keep the ones respecting a certain constraint. Then, the binary predicate is evaluated on the current ViewEdge together with each ViewEdge of the previous selection. The first ViewEdge respecting both the unary predicate and the binary predicate is kept as the next one. If none of the potential next ViewEdge respects these 2 predicates, 0 is returned.


Public Member Functions

 ChainPredicateIterator (bool iRestrictToSelection=true, bool iRestrictToUnvisited=true, ViewEdge *begin=NULL, bool orientation=true)
 ChainPredicateIterator (UnaryPredicate1D &upred, BinaryPredicate1D &bpred, bool iRestrictToSelection=true, bool iRestrictToUnvisited=true, ViewEdge *begin=NULL, bool orientation=true)
 ChainPredicateIterator (const ChainPredicateIterator &brother)
virtual ~ChainPredicateIterator ()
virtual string getExactTypeName () const
virtual ViewEdgetraverse (const AdjacencyIterator &it)

Constructor & Destructor Documentation

ChainPredicateIterator bool  iRestrictToSelection = true,
bool  iRestrictToUnvisited = true,
ViewEdge begin = NULL,
bool  orientation = true
[inline]
 

Builds a ChainPredicateIterator from a starting ViewEdge and its orientation.

Parameters:
iRestrictToSelection Indicates whether to force the chaining to stay within the set of selected ViewEdges or not.
iRestrictToUnvisited Indicates whether a ViewEdge that has already been chained must be ignored ot not.
begin The ViewEdge from where to start the iteration.
orientation If true, we'll look for the next ViewEdge among the ViewEdges that surround the ending ViewVertex of begin. If false, we'll search over the ViewEdges surrounding the ending ViewVertex of begin.

ChainPredicateIterator UnaryPredicate1D upred,
BinaryPredicate1D bpred,
bool  iRestrictToSelection = true,
bool  iRestrictToUnvisited = true,
ViewEdge begin = NULL,
bool  orientation = true
[inline]
 

Builds a ChainPredicateIterator from a unary predicate, a binary predicate, a starting ViewEdge and its orientation.

Parameters:
iRestrictToSelection Indicates whether to force the chaining to stay within the set of selected ViewEdges or not.
iRestrictToUnvisited Indicates whether a ViewEdge that has already been chained must be ignored ot not.
upred The unary predicate that the next ViewEdge must satisfy.
bpred The binary predicate that the next ViewEdge must satisfy together with the actual pointed ViewEdge.
begin The ViewEdge from where to start the iteration.
orientation If true, we'll look for the next ViewEdge among the ViewEdges that surround the ending ViewVertex of begin. If false, we'll search over the ViewEdges surrounding the ending ViewVertex of begin.

ChainPredicateIterator const ChainPredicateIterator brother  )  [inline]
 

Copy constructor

virtual ~ChainPredicateIterator  )  [inline, virtual]
 

Destructor.


Member Function Documentation

virtual string getExactTypeName  )  const [inline, virtual]
 

Returns the string "ChainPredicateIterator"

Reimplemented from ChainingIterator.

virtual ViewEdge* traverse const AdjacencyIterator &  it  )  [virtual]
 

This method iterates over the potential next ViewEdges and returns the one that will be followed next. When reaching the end of a chain, 0 is returned.

Reimplemented from ChainingIterator.


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