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

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 <BoxIterator.h>

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

Public Member Functions

 BoxIterator (te::graph::AbstractGraph *g)
 Default constructor. More...
 
 BoxIterator (te::graph::AbstractGraph *g, te::gm::Envelope *e)
 Constructor. More...
 
virtual ~BoxIterator ()
 Virtual destructor. More...
 
Vertex Iterator Methods

Method used to access vertex elements from a graph.

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::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...
 

Vertex Access Methods

Method used to access vertex elements from a graph.

te::gm::Envelopem_extent
 
virtual te::graph::VertexgetFirstVertex ()
 It returns a pointer to the first vertex element of a graph. More...
 
virtual te::graph::EdgegetFirstEdge ()
 It returns a pointer to the first edge element of a graph. 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.

   The box strategy is used select a restrict area in a graph
   and a iterator will be create accessing all elements inside
   this area.
See Also
AbstractIterator

Definition at line 71 of file BoxIterator.h.

Constructor & Destructor Documentation

te::graph::BoxIterator::BoxIterator ( te::graph::AbstractGraph g)

Default constructor.

Parameters
gPointer to a valid graph implementation

Definition at line 41 of file BoxIterator.cpp.

te::graph::BoxIterator::BoxIterator ( te::graph::AbstractGraph g,
te::gm::Envelope e 
)

Constructor.

Parameters
gPointer to a valid graph implementation
eObject used to define a restrict area

Definition at line 47 of file BoxIterator.cpp.

te::graph::BoxIterator::~BoxIterator ( )
virtual

Virtual destructor.

Definition at line 54 of file BoxIterator.cpp.

Member Function Documentation

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

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().

te::graph::Edge * te::graph::BoxIterator::getFirstEdge ( )
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.

Implements te::graph::AbstractIterator.

Definition at line 139 of file BoxIterator.cpp.

References te::dt::GEOMETRY_TYPE, te::da::Field::getExpression(), te::graph::Globals::sm_tableEdgeModelAttrId, te::graph::Globals::sm_tableEdgeModelAttrVFrom, te::graph::Globals::sm_tableEdgeModelAttrVTo, te::graph::Globals::sm_tableVertexModelAttrId, and TR_GRAPH.

te::graph::Vertex * te::graph::BoxIterator::getFirstVertex ( )
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.

Implements te::graph::AbstractIterator.

Definition at line 59 of file BoxIterator.cpp.

References te::dt::GEOMETRY_TYPE, te::da::Field::getExpression(), te::graph::Globals::sm_tableVertexModelAttrId, and TR_GRAPH.

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

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 ( )
virtualinherited

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 ( )
virtualinherited

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 ( )
virtualinherited

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 ( )
virtualinherited

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 ( )
virtualinherited

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 ( )
virtualinherited

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)
inherited

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
protectedinherited

Attribute used to keep the edge iterator.

Definition at line 168 of file AbstractIterator.h.

te::gm::Envelope* te::graph::BoxIterator::m_extent
protected

Definition at line 118 of file BoxIterator.h.

te::graph::AbstractGraph* te::graph::AbstractIterator::m_graph
protectedinherited

Pointer to a abstract graph used to access the elements.

Definition at line 165 of file AbstractIterator.h.

bool te::graph::AbstractIterator::m_listIsolatedVertex
protectedinherited

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
protectedinherited

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: