This is the main graph implementation, that uses a cache policy anda graph loader to get all elements inside a data source. More...
#include <Graph.h>
Public Member Functions | |
| Graph () | |
| constructor. More... | |
| Graph (AbstractCachePolicy *cp, AbstractGraphLoaderStrategy *ls) | |
| Constructor. More... | |
| Graph (GraphMetadata *metadata) | |
| Constructor. More... | |
| ~Graph () | |
| Virtual destructor. More... | |
Vertex Access Methods | |
Method used to access vertex elements from a graph. | |
| virtual void | add (Vertex *v) |
| Add a new vertex element to a graph. More... | |
| virtual void | update (Vertex *v) |
| Update the vertex element. More... | |
| virtual void | removeVertex (int id) |
| This function removes the vertex element from graph, also was removed in data source. More... | |
| virtual te::graph::Vertex * | getVertex (int id) |
| It returns the vertex element if it's exist. More... | |
| virtual void | addVertexProperty (te::dt::Property *p) |
| Add a new property associated to the vertex element. More... | |
| virtual void | removeVertexProperty (int idx) |
| Remove a property associated to the vertex element. More... | |
| virtual te::dt::Property * | getVertexProperty (int idx) |
| Get a vertex property given a index. More... | |
| virtual int | getVertexPropertySize () |
| Used to verify the number of properties associated to vertex elements. More... | |
Edge Access Methods | |
| GraphDataManager * | m_dataManager |
| Used to load and save GraphData information from a DataSource. More... | |
| GraphCache * | m_graphCache |
| Class used to keep all graph data loaded. More... | |
| GraphMetadata * | m_metadata |
| Graph Data loader strategy. More... | |
| GraphData * | m_graphData |
| This class has the graph data and properties. More... | |
| virtual void | add (Edge *e) |
| Add a new edge element to a graph. More... | |
| virtual void | update (Edge *e) |
| Update the edge element. More... | |
| virtual void | removeEdge (int id) |
| This function removes the edge element from graph, also was removed in data source. More... | |
| virtual te::graph::Edge * | getEdge (int id) |
| It returns the edge element if it's exist. More... | |
| virtual void | addEdgeProperty (te::dt::Property *p) |
| Add a new property associated to the edge element. More... | |
| virtual void | removeEdgeProperty (int idx) |
| Remove a property associated to the edge element. More... | |
| virtual te::dt::Property * | getEdgeProperty (int idx) |
| Get a edge property given a index. More... | |
| virtual int | getEdgePropertySize () |
| Used to verify the number of properties associated to edge elements. More... | |
| virtual te::graph::GraphMetadata * | getMetadata () |
| Function used to access the graph metadata. More... | |
| virtual void | flush () |
| Function used to clear the memory cache, all elements was released from memory, if any element was changes it will be saved. More... | |
This is the main graph implementation, that uses a cache policy anda graph loader to get all elements inside a data source.
All methods to access a graph element (vertex or edge) will use the GraphData instance, if not found the element, the class GraphCache will be consulted.
| te::graph::Graph::Graph | ( | ) |
constructor.
| te::graph::Graph::Graph | ( | GraphMetadata * | metadata | ) |
Constructor.
| metadata | A pointer to a graph metadata implementation |
| te::graph::Graph::Graph | ( | AbstractCachePolicy * | cp, |
| AbstractGraphLoaderStrategy * | ls | ||
| ) |
Constructor.
| cp | A pointer to a cache policy implementation |
| ls | A pointer to a loader strategy implementation |
| te::graph::Graph::~Graph | ( | ) |
Virtual destructor.
|
virtual |
Add a new edge element to a graph.
| e | Edge element |
Implements te::graph::AbstractGraph.
Reimplemented in te::graph::UndirectedGraph, te::graph::DirectedGraph, and te::graph::BidirectionalGraph.
|
virtual |
Add a new vertex element to a graph.
| v | Vertex element |
Implements te::graph::AbstractGraph.
|
virtual |
Add a new property associated to the edge element.
param p New property to be associated with edge elements.
Implements te::graph::AbstractGraph.
|
virtual |
Add a new property associated to the vertex element.
param p New property to be associated with vertex elements.
Implements te::graph::AbstractGraph.
|
virtual |
Function used to clear the memory cache, all elements was released from memory, if any element was changes it will be saved.
Implements te::graph::AbstractGraph.
|
virtual |
It returns the edge element if it's exist.
| id | Vertex identification |
Implements te::graph::AbstractGraph.
|
virtual |
Get a edge property given a index.
| idx | Index of the property |
Implements te::graph::AbstractGraph.
|
virtual |
Used to verify the number of properties associated to edge elements.
Implements te::graph::AbstractGraph.
|
virtual |
Function used to access the graph metadata.
Implements te::graph::AbstractGraph.
|
virtual |
It returns the vertex element if it's exist.
| id | Vertex identification |
Implements te::graph::AbstractGraph.
|
virtual |
Get a vertex property given a index.
| idx | Index of the property |
Implements te::graph::AbstractGraph.
|
virtual |
Used to verify the number of properties associated to vertex elements.
Implements te::graph::AbstractGraph.
|
virtual |
This function removes the edge element from graph, also was removed in data source.
| id | Edge identification |
Implements te::graph::AbstractGraph.
Reimplemented in te::graph::UndirectedGraph, te::graph::DirectedGraph, and te::graph::BidirectionalGraph.
|
virtual |
Remove a property associated to the edge element.
| idx | Index of the property |
Implements te::graph::AbstractGraph.
|
virtual |
This function removes the vertex element from graph, also was removed in data source.
| id | Vertex identification |
Implements te::graph::AbstractGraph.
|
virtual |
Remove a property associated to the vertex element.
| idx | Index of the property |
Implements te::graph::AbstractGraph.
|
virtual |
Update the edge element.
| e | Edge element |
Implements te::graph::AbstractGraph.
|
virtual |
Update the vertex element.
| v | Vertex element |
Implements te::graph::AbstractGraph.
|
protected |
|
protected |
| GraphData* te::graph::Graph::m_graphData |
|
protected |