te::graph::GraphData Class Reference

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)
 
VertexgetVertex (int id)
 
VertexMapgetVertexMap ()
 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)
 
EdgegetEdge (int id)
 
EdgeMapgetEdgeMap ()
 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...
 

Detailed Description

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.

See also
GraphCache

Definition at line 55 of file GraphData.h.

Member Typedef Documentation

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.

Constructor & Destructor Documentation

te::graph::GraphData::GraphData ( int  id)

Default constructor.

te::graph::GraphData::~GraphData ( )

Default destructor.

Member Function Documentation

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.

Returns
Map with all edges from this graph data
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.

Returns
Map with all vertex from this graph data
bool te::graph::GraphData::isDirty ( )

Used to check the graph data state.

Returns
Boolean value that defines 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.

Parameters
statusBoolean value to define the state
void te::graph::GraphData::setEdgeMap ( const EdgeMap map)

Used to set a map of edge elements.

Parameters
mapEdge map
void te::graph::GraphData::setVertexMap ( const VertexMap map)

Used to set a map of vertex elements.

Parameters
mapVertex map

Member Data Documentation

bool te::graph::GraphData::m_dirty
private

Flag used to indicate that a element was changed.

Definition at line 146 of file GraphData.h.

EdgeMap te::graph::GraphData::m_edgeMap
private

This map contains all edges from this graph.

Definition at line 149 of file GraphData.h.

int te::graph::GraphData::m_id
private

Data identifier.

Definition at line 145 of file GraphData.h.

VertexMap te::graph::GraphData::m_vertexMap
private

This map contains all vertexs from this graph.

Definition at line 148 of file GraphData.h.


The documentation for this class was generated from the following file: