All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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.

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().

Member Function Documentation

void te::graph::GraphData::addEdge ( Edge e)
void te::graph::GraphData::addVertex ( Vertex v)
te::graph::Edge * te::graph::GraphData::getEdge ( int  id)

Definition at line 121 of file GraphData.cpp.

te::graph::Vertex * te::graph::GraphData::getVertex ( int  id)

Definition at line 77 of file GraphData.cpp.

bool te::graph::GraphData::isDirty ( )

Used to check the graph data state.

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

Parameters
statusBoolean 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.

Parameters
mapEdge 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.

Parameters
mapVertex map

Definition at line 94 of file GraphData.cpp.

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 files: