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