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.
te::graph::GraphData::~GraphData | ( | ) |
Default destructor.
void te::graph::GraphData::addEdge | ( | Edge * | e | ) |
void te::graph::GraphData::addVertex | ( | Vertex * | v | ) |
Edge* te::graph::GraphData::getEdge | ( | int | id | ) |
EdgeMap& te::graph::GraphData::getEdgeMap | ( | ) |
It returns the the edge map.
int te::graph::GraphData::getId | ( | ) |
Get data identifier.
Vertex* te::graph::GraphData::getVertex | ( | int | id | ) |
VertexMap& te::graph::GraphData::getVertexMap | ( | ) |
It returns the the vertex map.
bool te::graph::GraphData::isDirty | ( | ) |
Used to check the graph data state.
bool te::graph::GraphData::removeEdge | ( | int | id | ) |
bool te::graph::GraphData::removeVertex | ( | int | id | ) |
void te::graph::GraphData::setDirty | ( | bool | status | ) |
Flag used to define the graph data state.
status | Boolean value to define the state |
void te::graph::GraphData::setEdgeMap | ( | const EdgeMap & | map | ) |
Used to set a map of edge elements.
map | Edge map |
void te::graph::GraphData::setVertexMap | ( | const VertexMap & | map | ) |
Used to set a map of vertex elements.
map | Vertex map |
|
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.