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

ChainingIterator Class Reference

#include <ChainingIterators.h>

Inheritance diagram for ChainingIterator:

ViewEdgeIterator ChainPredicateIterator ChainSilhouetteIterator List of all members.

Detailed Description

Base class for chaining iterators. This class is designed to be overloaded in order to describe chaining rules. It makes the works of chaining rules description easier. The two main methods that need to overloaded are traverse() and init(). traverse() tells which ViewEdge to follow, among the adjacent ones. If you specify restriction rules (such as "Chain only ViewEdges of the selection"), they will be included in the adjacency iterator. (i.e, the adjacent iterator will only stop on "valid" edges).


Public Member Functions

 ChainingIterator (bool iRestrictToSelection=true, bool iRestrictToUnvisited=true, ViewEdge *begin=0, bool orientation=true)
 ChainingIterator (const ChainingIterator &brother)
virtual string getExactTypeName () const
virtual void init ()
virtual ViewEdgetraverse (const AdjacencyIterator &it)
ViewVertexgetVertex ()
bool isIncrementing () const
virtual void increment ()
virtual void decrement ()

Constructor & Destructor Documentation

ChainingIterator bool  iRestrictToSelection = true,
bool  iRestrictToUnvisited = true,
ViewEdge begin = 0,
bool  orientation = true
[inline]
 

Builds a Chaining Iterator from the first ViewEdge used for iteration 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 which to start the chain.
orientation The direction to follow to explore the graph. If true, the direction indicated by the first ViewEdge is used.

ChainingIterator const ChainingIterator brother  )  [inline]
 

Copy constructor


Member Function Documentation

virtual void decrement  )  [virtual]
 

decrements.

Reimplemented from ViewEdgeIterator.

virtual string getExactTypeName  )  const [inline, virtual]
 

Returns the string "ChainingIterator"

Reimplemented from ViewEdgeIterator.

Reimplemented in ChainSilhouetteIterator, and ChainPredicateIterator.

ViewVertex* getVertex  )  [inline]
 

Returns the vertex which is the next crossing

virtual void increment  )  [virtual]
 

increments.

Reimplemented from ViewEdgeIterator.

virtual void init  )  [inline, virtual]
 

Inits the iterator context. This method is called each time a new chain is started. It can be used to reset some history information that you might want to keep.

bool isIncrementing  )  const [inline]
 

Returns true if the current iteration is an incrementation

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

This method iterates over the potential next ViewEdges and returns the one that will be followed next. returns the next ViewEdge to follow or 0 when the end of the chain is reached.

Parameters:
it The iterator over the ViewEdges adjacent to the end vertex of the current ViewEdge. The Adjacency iterator reflects the restriction rules by only iterating over the valid ViewEdges.

Reimplemented in ChainSilhouetteIterator, and ChainPredicateIterator.


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