27 #include "../../common/Translator.h"
28 #include "../../common/StringUtils.h"
29 #include "../core/AbstractGraph.h"
30 #include "../iterator/AbstractIterator.h"
31 #include "../Config.h"
32 #include "../Exception.h"
33 #include "../Globals.h"
39 m_listIsolatedVertex(true)
49 if(m_vertexQuery.get() == 0)
51 throw Exception(
TE_TR(
"Iterator not initialized."));
56 if(m_vertexQuery->moveNext())
65 return m_graph->getVertex(
id);
70 if(m_vertexQuery.get() == 0)
72 throw Exception(
TE_TR(
"Iterator not initialized."));
77 if(m_vertexQuery->movePrevious())
86 return m_graph->getVertex(
id);
91 if(m_vertexQuery.get() == 0)
93 throw Exception(
TE_TR(
"Iterator not initialized."));
96 return m_vertexQuery->isAfterEnd();
101 if(m_vertexQuery.get() == 0)
103 throw Exception(
TE_TR(
"Iterator not initialized."));
106 return m_vertexQuery->size();
111 m_listIsolatedVertex = flag;
116 if(m_edgeQuery.get() == 0)
118 throw Exception(
TE_TR(
"Iterator not initialized."));
123 if(m_edgeQuery->moveNext())
132 return m_graph->getEdge(
id);
137 if(m_edgeQuery.get() == 0)
139 throw Exception(
TE_TR(
"Iterator not initialized."));
144 if(m_edgeQuery->movePrevious())
153 return m_graph->getEdge(
id);
158 if(m_edgeQuery.get() == 0)
160 throw Exception(
TE_TR(
"Iterator not initialized."));
163 return m_edgeQuery->isAfterEnd();
168 if(m_edgeQuery.get() == 0)
170 throw Exception(
TE_TR(
"Iterator not initialized."));
173 return m_edgeQuery->size();
static const std::string sm_tableVertexModelAttrId
Attribute id.
virtual te::graph::Edge * getNextEdge()
It returns a pointer to the next edge element of a graph.
#define TE_TR(message)
It marks a string in order to get translated.
void listIsolatedVertex(bool flag)
Used to set that the isolated vertex must be listed.
virtual ~AbstractIterator()
Virtual destructor.
From the point of view of graph theory, vertices are treated as featureless and indivisible objects...
Class used to define the edge struct of a graph. Its compose with a identifier, the vertex origin and...
static const std::string sm_tableEdgeModelAttrId
Attribute Id.
virtual te::graph::Vertex * getPreviousVertex()
It returns a pointer to the previous vertex element of a graph.
Abstract class used to define the main functions of graph struct. All graph implementations must used...
virtual size_t getEdgeInteratorCount()
It returns the number of elements of this iterator.
virtual te::graph::Vertex * getNextVertex()
It returns a pointer to the next vertex element of a graph.
virtual size_t getVertexInteratorCount()
It returns the number of elements of this iterator.
AbstractIterator(te::graph::AbstractGraph *g)
Default constructor.
virtual te::graph::Edge * getPreviousEdge()
It returns a pointer to the previous edge element of a graph.
virtual bool isVertexIteratorAfterEnd()
Used to check the iterator position.
virtual bool isEdgeIteratorAfterEnd()
Used to check the iterator position.