29 #include "../../common/STLUtils.h"
30 #include "../core/Edge.h"
31 #include "../core/Vertex.h"
57 m_vertexMap.insert(te::graph::GraphData::VertexMap::value_type(v->
getId(), v));
67 VertexMap::iterator it = m_vertexMap.find(
id);
69 if(it == m_vertexMap.end())
72 m_vertexMap.erase(it);
79 VertexMap::iterator it = m_vertexMap.find(
id);
81 if(it != m_vertexMap.end())
101 m_edgeMap.insert(te::graph::GraphData::EdgeMap::value_type(e->
getId(), e));
111 EdgeMap::iterator it = m_edgeMap.find(
id);
113 if(it == m_edgeMap.end())
123 EdgeMap::iterator it = m_edgeMap.find(
id);
125 if(it != m_edgeMap.end())
Vertex * getVertex(int id)
VertexMap & getVertexMap()
It returns the the vertex map.
bool isDirty()
Used to verify the vertex state.
int getId()
Get data identifier.
bool isNew()
Flag used to indicate that this element was a new one.
void setVertexMap(const VertexMap &map)
Used to set a map of vertex elements.
int getId()
It returns the edge identification.
std::map< int, Vertex * > VertexMap
typedef for vertex map
This class define a important struct used to group a map of vertex and edges. A flag is used to indic...
From the point of view of graph theory, vertices are treated as featureless and indivisible objects...
bool isDirty()
Used to verify the edge state.
Class used to define the edge struct of a graph. Its compose with a identifier, the vertex origin and...
void setDirty(bool status)
Flag used to define the graph data state.
bool removeVertex(int id)
void addVertex(Vertex *v)
void setEdgeMap(const EdgeMap &map)
Used to set a map of edge elements.
bool isNew()
Flag used to indicate that this element was a new one.
EdgeMap & getEdgeMap()
It returns the the edge map.
GraphData(int id)
Default constructor.
bool isDirty()
Used to check the graph data state.
int getId()
It returns the vertex id.
std::map< int, Edge * > EdgeMap
typedef for edge map
void FreeContents(boost::unordered_map< K, V * > &m)
This function can be applied to a map of pointers. It will delete each pointer in the map...
~GraphData()
Default destructor.