All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
te::graph::AbstractIterator Class Referenceabstract

This class defines a commun interface to represents a graph iterator class. The main diferency to anothers iterators is the possibility to iterate over the edges or vertexs from a graph. More...

#include <AbstractIterator.h>

Inheritance diagram for te::graph::AbstractIterator:
te::graph::BoxIterator te::graph::QueryIterator te::graph::SequenceIterator

Public Member Functions

 AbstractIterator (te::graph::AbstractGraph *g)
 Default constructor. More...
 
virtual ~AbstractIterator ()
 Virtual destructor. More...
 
Vertex Iterator Methods

Method used to access vertex elements from a graph.

virtual te::graph::VertexgetFirstVertex ()=0
 It returns a pointer to the first vertex element of a graph. More...
 
virtual te::graph::VertexgetNextVertex ()
 It returns a pointer to the next vertex element of a graph. More...
 
virtual te::graph::VertexgetPreviousVertex ()
 It returns a pointer to the previous vertex element of a graph. More...
 
virtual bool isVertexIteratorAfterEnd ()
 Used to check the iterator position. More...
 
virtual size_t getVertexInteratorCount ()
 It returns the number of elements of this iterator. More...
 
void listIsolatedVertex (bool flag)
 Used to set that the isolated vertex must be listed. More...
 
virtual te::graph::EdgegetFirstEdge ()=0
 It returns a pointer to the first edge element of a graph. More...
 
virtual te::graph::EdgegetNextEdge ()
 It returns a pointer to the next edge element of a graph. More...
 
virtual te::graph::EdgegetPreviousEdge ()
 It returns a pointer to the previous edge element of a graph. More...
 
virtual bool isEdgeIteratorAfterEnd ()
 Used to check the iterator position. More...
 
virtual size_t getEdgeInteratorCount ()
 It returns the number of elements of this iterator. More...
 

Protected Attributes

std::auto_ptr< te::da::DataSetm_edgeQuery
 Attribute used to keep the edge iterator. More...
 
te::graph::AbstractGraphm_graph
 Pointer to a abstract graph used to access the elements. More...
 
bool m_listIsolatedVertex
 Flag used to indicated that the isolated vertex will be listed. More...
 
std::auto_ptr< te::da::DataSetm_vertexQuery
 Attribute used to keep the vertex iterator. More...
 

Detailed Description

This class defines a commun interface to represents a graph iterator class. The main diferency to anothers iterators is the possibility to iterate over the edges or vertexs from a graph.

See Also

The sequency strategy is used to select a group of elements orderly.

See Also
AbstractIterator

Definition at line 61 of file AbstractIterator.h.

Constructor & Destructor Documentation

te::graph::AbstractIterator::AbstractIterator ( te::graph::AbstractGraph g)

Default constructor.

Definition at line 35 of file AbstractIterator.cpp.

te::graph::AbstractIterator::~AbstractIterator ( )
virtual

Virtual destructor.

Definition at line 43 of file AbstractIterator.cpp.

Member Function Documentation

size_t te::graph::AbstractIterator::getEdgeInteratorCount ( )
virtual

It returns the number of elements of this iterator.

Returns
Size t value.

Definition at line 166 of file AbstractIterator.cpp.

References TR_GRAPH.

Referenced by te::graph::QueryGraphBuilder::build().

virtual te::graph::Edge* te::graph::AbstractIterator::getFirstEdge ( )
pure virtual

It returns a pointer to the first edge element of a graph.

Returns
A valid edge point if the element was found and a null pointer in other case.

Implemented in te::graph::BoxIterator, te::graph::QueryIterator, and te::graph::SequenceIterator.

virtual te::graph::Vertex* te::graph::AbstractIterator::getFirstVertex ( )
pure virtual

It returns a pointer to the first vertex element of a graph.

Returns
A valid vertex point if the element was found and a null pointer in other case.

Implemented in te::graph::BoxIterator, te::graph::QueryIterator, and te::graph::SequenceIterator.

te::graph::Edge * te::graph::AbstractIterator::getNextEdge ( )
virtual

It returns a pointer to the next edge element of a graph.

Returns
A valid edge point if the element was found and a null pointer in other case.

Definition at line 114 of file AbstractIterator.cpp.

References te::graph::Globals::sm_tableEdgeModelAttrId, and TR_GRAPH.

te::graph::Vertex * te::graph::AbstractIterator::getNextVertex ( )
virtual

It returns a pointer to the next vertex element of a graph.

Returns
A valid vertex point if the element was found and a null pointer in other case.

Definition at line 47 of file AbstractIterator.cpp.

References te::graph::Globals::sm_tableVertexModelAttrId, and TR_GRAPH.

te::graph::Edge * te::graph::AbstractIterator::getPreviousEdge ( )
virtual

It returns a pointer to the previous edge element of a graph.

Returns
A valid edge point if the element was found and a null pointer in other case.

Definition at line 135 of file AbstractIterator.cpp.

References te::graph::Globals::sm_tableEdgeModelAttrId, and TR_GRAPH.

te::graph::Vertex * te::graph::AbstractIterator::getPreviousVertex ( )
virtual

It returns a pointer to the previous vertex element of a graph.

Returns
A valid vertex point if the element was found and a null pointer in other case.

Definition at line 68 of file AbstractIterator.cpp.

References te::graph::Globals::sm_tableVertexModelAttrId, and TR_GRAPH.

size_t te::graph::AbstractIterator::getVertexInteratorCount ( )
virtual

It returns the number of elements of this iterator.

Returns
Size t value.

Definition at line 99 of file AbstractIterator.cpp.

References TR_GRAPH.

Referenced by te::graph::AddDeepAttribute::AddDeepAttribute(), te::graph::AddRasterAttribute::AddRasterAttribute(), and te::graph::QueryGraphBuilder::build().

bool te::graph::AbstractIterator::isEdgeIteratorAfterEnd ( )
virtual

Used to check the iterator position.

Returns
True if the iterator is at after the end and false in other case

Definition at line 156 of file AbstractIterator.cpp.

References TR_GRAPH.

Referenced by te::graph::QueryGraphBuilder::build(), and te::graph::LayerRenderer::draw().

bool te::graph::AbstractIterator::isVertexIteratorAfterEnd ( )
virtual

Used to check the iterator position.

Returns
True if the iterator is at after the end and false in other case

Definition at line 89 of file AbstractIterator.cpp.

References TR_GRAPH.

Referenced by te::graph::AddDeepAttribute::AddDeepAttribute(), te::graph::AddRasterAttribute::AddRasterAttribute(), and te::graph::QueryGraphBuilder::build().

void te::graph::AbstractIterator::listIsolatedVertex ( bool  flag)

Used to set that the isolated vertex must be listed.

Parameters
flagFlag used to set.

Definition at line 109 of file AbstractIterator.cpp.

Member Data Documentation

std::auto_ptr<te::da::DataSet> te::graph::AbstractIterator::m_edgeQuery
protected

Attribute used to keep the edge iterator.

Definition at line 168 of file AbstractIterator.h.

te::graph::AbstractGraph* te::graph::AbstractIterator::m_graph
protected

Pointer to a abstract graph used to access the elements.

Definition at line 165 of file AbstractIterator.h.

bool te::graph::AbstractIterator::m_listIsolatedVertex
protected

Flag used to indicated that the isolated vertex will be listed.

Definition at line 170 of file AbstractIterator.h.

std::auto_ptr<te::da::DataSet> te::graph::AbstractIterator::m_vertexQuery
protected

Attribute used to keep the vertex iterator.

Definition at line 167 of file AbstractIterator.h.


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