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>
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.
- See also
- AbstractGraph, GraphData, GraphCache
Definition at line 72 of file Graph.h.
◆ Graph() [1/3]
te::graph::Graph::Graph |
( |
| ) |
|
◆ Graph() [2/3]
Constructor.
- Parameters
-
metadata | A pointer to a graph metadata implementation |
◆ Graph() [3/3]
Constructor.
- Parameters
-
cp | A pointer to a cache policy implementation |
ls | A pointer to a loader strategy implementation |
◆ ~Graph()
te::graph::Graph::~Graph |
( |
| ) |
|
◆ add() [1/2]
virtual void te::graph::Graph::add |
( |
Edge * |
e | ) |
|
|
virtual |
◆ add() [2/2]
virtual void te::graph::Graph::add |
( |
Vertex * |
v | ) |
|
|
virtual |
Add a new vertex element to a graph.
- Parameters
-
- Note
- This function turns the dirty flag of current GraphData to true, the new flag of the vertex turns to true.
Implements te::graph::AbstractGraph.
◆ addEdgeProperty()
Add a new property associated to the edge element.
param p New property to be associated with edge elements.
- Note
- It's important before using this function call the flush() function, its necessary to force the memory clear and the elements will be loaded with the right size of properties.
Implements te::graph::AbstractGraph.
◆ addVertexProperty()
Add a new property associated to the vertex element.
param p New property to be associated with vertex elements.
- Note
- It's important before using this function call the flush() function, its necessary to force the memory clear and the elements will be loaded with the right size of properties.
Implements te::graph::AbstractGraph.
◆ flush()
virtual void te::graph::Graph::flush |
( |
| ) |
|
|
virtual |
Function used to clear the memory cache, all elements was released from memory, if any element was changes it will be saved.
- Returns
Implements te::graph::AbstractGraph.
◆ getEdge()
It returns the edge element if it's exist.
- Parameters
-
- Returns
- A valid vertex point if the element was found and a null pointer in other case.
Implements te::graph::AbstractGraph.
◆ getEdgeProperty()
Get a edge property given a index.
- Parameters
-
- Returns
- A property associated to the edge element if the index is right and a null pointer in other case.
Implements te::graph::AbstractGraph.
◆ getEdgePropertySize()
virtual int te::graph::Graph::getEdgePropertySize |
( |
| ) |
|
|
virtual |
Used to verify the number of properties associated to edge elements.
- Returns
- Integer value with the number of properties.
Implements te::graph::AbstractGraph.
◆ getMetadata()
Function used to access the graph metadata.
- Returns
- A pointer to a class that defines the graph metadata
Implements te::graph::AbstractGraph.
◆ getVertex()
It returns the vertex element if it's exist.
- Parameters
-
- Returns
- A valid vertex point if the element was found and a null pointer in other case.
Implements te::graph::AbstractGraph.
◆ getVertexProperty()
Get a vertex property given a index.
- Parameters
-
- Returns
- A property associated to the vertex element if the index is right and a null pointer in other case.
Implements te::graph::AbstractGraph.
◆ getVertexPropertySize()
virtual int te::graph::Graph::getVertexPropertySize |
( |
| ) |
|
|
virtual |
Used to verify the number of properties associated to vertex elements.
- Returns
- Integer value with the number of properties.
Implements te::graph::AbstractGraph.
◆ removeEdge()
virtual void te::graph::Graph::removeEdge |
( |
int |
id | ) |
|
|
virtual |
◆ removeEdgeProperty()
virtual void te::graph::Graph::removeEdgeProperty |
( |
int |
idx | ) |
|
|
virtual |
◆ removeVertex()
virtual void te::graph::Graph::removeVertex |
( |
int |
id | ) |
|
|
virtual |
◆ removeVertexProperty()
virtual void te::graph::Graph::removeVertexProperty |
( |
int |
idx | ) |
|
|
virtual |
◆ update() [1/2]
virtual void te::graph::Graph::update |
( |
Edge * |
e | ) |
|
|
virtual |
◆ update() [2/2]
virtual void te::graph::Graph::update |
( |
Vertex * |
v | ) |
|
|
virtual |
◆ m_dataManager
Used to load and save GraphData information from a DataSource.
Definition at line 290 of file Graph.h.
◆ m_graphCache
Class used to keep all graph data loaded.
Definition at line 292 of file Graph.h.
◆ m_graphData
This class has the graph data and properties.
Definition at line 298 of file Graph.h.
◆ m_metadata
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_release/src/terralib/graph/graphs/Graph.h