This class define a important struct used to group a map of vertex and edges. A flag is used to indicate if any element of this group was changed. More...
#include <GraphData.h>
Public Types | |
typedef std::map< int, Edge * > | EdgeMap |
typedef for edge map More... | |
typedef std::map< int, Vertex * > | VertexMap |
typedef for vertex map More... | |
Public Member Functions | |
int | getId () |
Get data identifier. More... | |
GraphData (int id) | |
Default constructor. More... | |
bool | isDirty () |
Used to check the graph data state. More... | |
void | setDirty (bool status) |
Flag used to define the graph data state. More... | |
~GraphData () | |
Default destructor. More... | |
Graph Data Access Methods | |
Method used to access the graph data, vertex and edge, and properties | |
void | addVertex (Vertex *v) |
bool | removeVertex (int id) |
Vertex * | getVertex (int id) |
VertexMap & | getVertexMap () |
It returns the the vertex map. More... | |
void | setVertexMap (const VertexMap &map) |
Used to set a map of vertex elements. More... | |
void | addEdge (Edge *e) |
bool | removeEdge (int id) |
Edge * | getEdge (int id) |
EdgeMap & | getEdgeMap () |
It returns the the edge map. More... | |
void | setEdgeMap (const EdgeMap &map) |
Used to set a map of edge elements. More... | |
Private Attributes | |
bool | m_dirty |
Flag used to indicate that a element was changed. More... | |
EdgeMap | m_edgeMap |
This map contains all edges from this graph. More... | |
int | m_id |
Data identifier. More... | |
VertexMap | m_vertexMap |
This map contains all vertexs from this graph. More... | |
This class define a important struct used to group a map of vertex and edges. A flag is used to indicate if any element of this group was changed.
Definition at line 55 of file GraphData.h.
typedef std::map<int, Edge*> te::graph::GraphData::EdgeMap |
typedef for edge map
Definition at line 68 of file GraphData.h.
typedef std::map<int, Vertex*> te::graph::GraphData::VertexMap |
typedef for vertex map
Definition at line 66 of file GraphData.h.
te::graph::GraphData::GraphData | ( | int | id | ) |
Default constructor.
Definition at line 35 of file GraphData.cpp.
te::graph::GraphData::~GraphData | ( | ) |
Default destructor.
Definition at line 41 of file GraphData.cpp.
References te::common::FreeContents().
void te::graph::GraphData::addEdge | ( | Edge * | e | ) |
Definition at line 99 of file GraphData.cpp.
References te::graph::Edge::getId(), te::graph::Edge::isDirty(), and te::graph::Edge::isNew().
void te::graph::GraphData::addVertex | ( | Vertex * | v | ) |
Definition at line 55 of file GraphData.cpp.
References te::graph::Vertex::getId(), te::graph::Vertex::isDirty(), and te::graph::Vertex::isNew().
te::graph::Edge * te::graph::GraphData::getEdge | ( | int | id | ) |
Definition at line 121 of file GraphData.cpp.
te::graph::GraphData::EdgeMap & te::graph::GraphData::getEdgeMap | ( | ) |
It returns the the edge map.
Definition at line 133 of file GraphData.cpp.
Referenced by te::graph::GraphCache::checkCacheByEdgeId(), te::graph::GraphCache::getGraphData(), te::graph::GraphCache::getGraphDataByEdgeId(), te::graph::MemoryIterator::MemoryIterator(), and te::graph::AbstractGraphLoaderStrategy::saveGraphEdgeList().
int te::graph::GraphData::getId | ( | ) |
Get data identifier.
Definition at line 50 of file GraphData.cpp.
Referenced by te::graph::GraphCache::checkCacheByEdgeId(), te::graph::GraphCache::checkCacheByVertexId(), te::graph::GraphCache::createGraphData(), te::graph::GraphCache::getGraphData(), te::graph::GraphCache::getGraphDataByEdgeId(), and te::graph::GraphCache::getGraphDataByVertexId().
te::graph::Vertex * te::graph::GraphData::getVertex | ( | int | id | ) |
Definition at line 77 of file GraphData.cpp.
te::graph::GraphData::VertexMap & te::graph::GraphData::getVertexMap | ( | ) |
It returns the the vertex map.
Definition at line 89 of file GraphData.cpp.
Referenced by te::graph::GraphCache::checkCacheByVertexId(), te::graph::GraphCache::getGraphData(), te::graph::GraphCache::getGraphDataByVertexId(), te::graph::MemoryIterator::MemoryIterator(), and te::graph::AbstractGraphLoaderStrategy::saveVertexAttributes().
bool te::graph::GraphData::isDirty | ( | ) |
Used to check the graph data state.
Definition at line 148 of file GraphData.cpp.
Referenced by te::graph::GraphCache::clearCache(), te::graph::AbstractGraphLoaderStrategy::saveGraphEdgeList(), and te::graph::AbstractGraphLoaderStrategy::saveVertexAttributes().
bool te::graph::GraphData::removeEdge | ( | int | id | ) |
Definition at line 109 of file GraphData.cpp.
bool te::graph::GraphData::removeVertex | ( | int | id | ) |
Definition at line 65 of file GraphData.cpp.
void te::graph::GraphData::setDirty | ( | bool | status | ) |
Flag used to define the graph data state.
status | Boolean value to define the state |
Definition at line 143 of file GraphData.cpp.
void te::graph::GraphData::setEdgeMap | ( | const EdgeMap & | map | ) |
Used to set a map of edge elements.
map | Edge map |
Definition at line 138 of file GraphData.cpp.
void te::graph::GraphData::setVertexMap | ( | const VertexMap & | map | ) |
Used to set a map of vertex elements.
map | Vertex map |
Definition at line 94 of file GraphData.cpp.
|
private |
Flag used to indicate that a element was changed.
Definition at line 146 of file GraphData.h.
|
private |
This map contains all edges from this graph.
Definition at line 149 of file GraphData.h.
|
private |
Data identifier.
Definition at line 145 of file GraphData.h.
|
private |
This map contains all vertexs from this graph.
Definition at line 148 of file GraphData.h.