te::graph::AbstractGraphLoaderStrategy Class Referenceabstract

This class define the main functions necessary to save and load the graph data and metadata information using the Graph Cache conception. More...

#include <AbstractGraphLoaderStrategy.h>

Inheritance diagram for te::graph::AbstractGraphLoaderStrategy:
te::graph::BottomUpLoaderStrategy te::graph::BoxLoaderStrategy te::graph::SequenceLoaderStrategy te::graph::TopDownLoaderStrategy

Public Member Functions

 AbstractGraphLoaderStrategy (te::graph::GraphMetadata *metadata)
 Default constructor. More...
 
virtual ~AbstractGraphLoaderStrategy ()
 Default destructor. More...
 

Protected Attributes

te::graph::GraphMetadatam_graphMetadata
 Graph metadata attribute. More...
 

Abstract Graph Loader Strategy Methods

Method used to manager a graph data

virtual void loadDataByVertexId (int vertexId, te::graph::AbstractGraph *g, te::graph::GraphCache *gc=0)=0
 Functio used to load a group of vertex elements given a base element. More...
 
virtual void loadDataByEdgeId (int edgeId, te::graph::AbstractGraph *g, te::graph::GraphCache *gc=0)=0
 Functio used to load a group of edges elements given a base element. More...
 
virtual void saveData (GraphData *data)
 Save the graph data structure in Data Source. More...
 
virtual void removeEdge (int id)
 Function used to remove a edge saved in a data source. More...
 
virtual void removeVertex (int id)
 Function used to remove a vertex saved in a data source. More...
 
te::graph::GraphMetadatagetMetadata ()
 It returns a pointer to a class that describes the graph metadata. More...
 
void saveGraphEdgeList (GraphData *data)
 Used to save the edge elements from a graph data. More...
 
void saveVertexAttributes (GraphData *data)
 Used to save the vertex elements attributes from a graph data. More...
 
void saveGraphVertexList (GraphData *data)
 Used to save the vertex elements from a graph data. More...
 
void saveEdgeAttributes (GraphData *data)
 Used to save the edges elements attributes from a graph data. More...
 
VertexloadVertex (int id)
 Function used to load one vertex given a ID. More...
 
VertexloadVertexAttrs (int id)
 Function used to load one vertex given a ID. More...
 
EdgeloadEdge (int id)
 Function used to load one edge given a ID. More...
 
EdgeloadEdgeAttrs (int id)
 Function used to load one edge given a ID. More...
 

Detailed Description

This class define the main functions necessary to save and load the graph data and metadata information using the Graph Cache conception.

See also
AbstractGraph, GraphMetadata, GraphCache

Definition at line 55 of file AbstractGraphLoaderStrategy.h.

Constructor & Destructor Documentation

te::graph::AbstractGraphLoaderStrategy::AbstractGraphLoaderStrategy ( te::graph::GraphMetadata metadata)

Default constructor.

virtual te::graph::AbstractGraphLoaderStrategy::~AbstractGraphLoaderStrategy ( )
virtual

Default destructor.

Member Function Documentation

te::graph::GraphMetadata* te::graph::AbstractGraphLoaderStrategy::getMetadata ( )

It returns a pointer to a class that describes the graph metadata.

Returns
A valid pointer if exists and null pointer in other case
virtual void te::graph::AbstractGraphLoaderStrategy::loadDataByEdgeId ( int  edgeId,
te::graph::AbstractGraph g,
te::graph::GraphCache gc = 0 
)
pure virtual

Functio used to load a group of edges elements given a base element.

Parameters
edgeIdAttribute used to identify the base element
gPointer to a graph, parent of this element
gcThis is a optional attribute, if present the cache will be check if the already been loaded

Implemented in te::graph::BoxLoaderStrategy, te::graph::SequenceLoaderStrategy, te::graph::BottomUpLoaderStrategy, and te::graph::TopDownLoaderStrategy.

virtual void te::graph::AbstractGraphLoaderStrategy::loadDataByVertexId ( int  vertexId,
te::graph::AbstractGraph g,
te::graph::GraphCache gc = 0 
)
pure virtual

Functio used to load a group of vertex elements given a base element.

Parameters
vertexIdAttribute used to identify the base element
gPointer to a graph, parent of this element
gcThis is a optional attribute, if present the cache will be check if the already been loaded

Implemented in te::graph::BoxLoaderStrategy, te::graph::SequenceLoaderStrategy, te::graph::BottomUpLoaderStrategy, and te::graph::TopDownLoaderStrategy.

Edge* te::graph::AbstractGraphLoaderStrategy::loadEdge ( int  id)
protected

Function used to load one edge given a ID.

Parameters
idThe edge identifier
Note
This function is used in case the graph was saved using the edge list
Returns
A valid edge pointer if the element was found and a null pointer in other case
Edge* te::graph::AbstractGraphLoaderStrategy::loadEdgeAttrs ( int  id)
protected

Function used to load one edge given a ID.

Parameters
idThe edge identifier
Note
This function is used in case the graph was saved using the vertex list
Returns
A valid vertex pointer if the element was found and a null pointer in other case
Vertex* te::graph::AbstractGraphLoaderStrategy::loadVertex ( int  id)
protected

Function used to load one vertex given a ID.

Parameters
idThe vertex identifier
Note
This function is used in case the graph was saved using the vertex list
Returns
A valid vertex pointer if the element was found and a null pointer in other case
Vertex* te::graph::AbstractGraphLoaderStrategy::loadVertexAttrs ( int  id)
protected

Function used to load one vertex given a ID.

Parameters
idThe vertex identifier
Note
This function is used in case the graph was saved using the edge list
Returns
A valid vertex pointer if the element was found and a null pointer in other case
virtual void te::graph::AbstractGraphLoaderStrategy::removeEdge ( int  id)
virtual

Function used to remove a edge saved in a data source.

Parameters
idThe edge identifier

Reimplemented in te::graph::BottomUpLoaderStrategy, and te::graph::TopDownLoaderStrategy.

virtual void te::graph::AbstractGraphLoaderStrategy::removeVertex ( int  id)
virtual

Function used to remove a vertex saved in a data source.

Parameters
idThe vertex identifier

Reimplemented in te::graph::BottomUpLoaderStrategy, and te::graph::TopDownLoaderStrategy.

virtual void te::graph::AbstractGraphLoaderStrategy::saveData ( GraphData data)
virtual

Save the graph data structure in Data Source.

Parameters
dataPointer to a valid graph data

Reimplemented in te::graph::BottomUpLoaderStrategy, and te::graph::TopDownLoaderStrategy.

void te::graph::AbstractGraphLoaderStrategy::saveEdgeAttributes ( GraphData data)
protected

Used to save the edges elements attributes from a graph data.

Parameters
dataPointer to a valid graph data
void te::graph::AbstractGraphLoaderStrategy::saveGraphEdgeList ( GraphData data)
protected

Used to save the edge elements from a graph data.

Parameters
dataPointer to a valid graph data
void te::graph::AbstractGraphLoaderStrategy::saveGraphVertexList ( GraphData data)
protected

Used to save the vertex elements from a graph data.

Parameters
dataPointer to a valid graph data
void te::graph::AbstractGraphLoaderStrategy::saveVertexAttributes ( GraphData data)
protected

Used to save the vertex elements attributes from a graph data.

Parameters
dataPointer to a valid graph data

Member Data Documentation

te::graph::GraphMetadata* te::graph::AbstractGraphLoaderStrategy::m_graphMetadata
protected

Graph metadata attribute.

Definition at line 203 of file AbstractGraphLoaderStrategy.h.


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