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>
  
 Public Member Functions | |
| AbstractGraphLoaderStrategy (te::graph::GraphMetadata *metadata) | |
| Default constructor.  More... | |
| virtual | ~AbstractGraphLoaderStrategy () | 
| Default destructor.  More... | |
Protected Attributes | |
| te::graph::GraphMetadata * | m_graphMetadata | 
| Graph metadata attribute.  More... | |
Abstract Graph Loader Strategy Methods | |
| 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::GraphMetadata * | getMetadata () | 
| 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... | |
| Vertex * | loadVertex (int id) | 
| Function used to load one vertex given a ID.  More... | |
| Vertex * | loadVertexAttrs (int id) | 
| Function used to load one vertex given a ID.  More... | |
| Edge * | loadEdge (int id) | 
| Function used to load one edge given a ID.  More... | |
| Edge * | loadEdgeAttrs (int id) | 
| Function used to load one edge given a ID.  More... | |
This class define the main functions necessary to save and load the graph data and metadata information using the Graph Cache conception.
Definition at line 55 of file AbstractGraphLoaderStrategy.h.
| te::graph::AbstractGraphLoaderStrategy::AbstractGraphLoaderStrategy | ( | te::graph::GraphMetadata * | metadata | ) | 
Default constructor.
Definition at line 53 of file AbstractGraphLoaderStrategy.cpp.
      
  | 
  virtual | 
Default destructor.
Definition at line 57 of file AbstractGraphLoaderStrategy.cpp.
| te::graph::GraphMetadata * te::graph::AbstractGraphLoaderStrategy::getMetadata | ( | ) | 
It returns a pointer to a class that describes the graph metadata.
Definition at line 62 of file AbstractGraphLoaderStrategy.cpp.
Referenced by te::graph::Graph::Graph(), and te::graph::GraphCache::GraphCache().
      
  | 
  pure virtual | 
Functio used to load a group of edges elements given a base element.
| edgeId | Attribute used to identify the base element | 
| g | Pointer to a graph, parent of this element | 
| gc | This 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.
      
  | 
  pure virtual | 
Functio used to load a group of vertex elements given a base element.
| vertexId | Attribute used to identify the base element | 
| g | Pointer to a graph, parent of this element | 
| gc | This 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.
      
  | 
  protected | 
Function used to load one edge given a ID.
| id | The edge identifier | 
Definition at line 365 of file AbstractGraphLoaderStrategy.cpp.
References te::graph::Edge::addAttribute(), te::common::Convert2String(), te::graph::Edge::setAttributeVecSize(), te::graph::Globals::sm_tableEdgeModelAttrId, te::graph::Globals::sm_tableEdgeModelAttrVFrom, and te::graph::Globals::sm_tableEdgeModelAttrVTo.
      
  | 
  protected | 
Function used to load one edge given a ID.
| id | The edge identifier | 
Definition at line 413 of file AbstractGraphLoaderStrategy.cpp.
References TR_GRAPH.
      
  | 
  protected | 
Function used to load one vertex given a ID.
| id | The vertex identifier | 
Definition at line 314 of file AbstractGraphLoaderStrategy.cpp.
References TR_GRAPH.
      
  | 
  protected | 
Function used to load one vertex given a ID.
| id | The vertex identifier | 
Definition at line 319 of file AbstractGraphLoaderStrategy.cpp.
References te::graph::Vertex::addAttribute(), te::common::Convert2String(), te::graph::Vertex::setAttributeVecSize(), and te::graph::Globals::sm_tableVertexModelAttrId.
      
  | 
  virtual | 
Function used to remove a edge saved in a data source.
| id | The edge identifier | 
Reimplemented in te::graph::BottomUpLoaderStrategy, and te::graph::TopDownLoaderStrategy.
Definition at line 82 of file AbstractGraphLoaderStrategy.cpp.
References TR_GRAPH.
      
  | 
  virtual | 
Function used to remove a vertex saved in a data source.
| id | The vertex identifier | 
Reimplemented in te::graph::BottomUpLoaderStrategy, and te::graph::TopDownLoaderStrategy.
Definition at line 91 of file AbstractGraphLoaderStrategy.cpp.
References TR_GRAPH.
      
  | 
  virtual | 
Save the graph data structure in Data Source.
| data | Pointer to a valid graph data | 
Reimplemented in te::graph::BottomUpLoaderStrategy, and te::graph::TopDownLoaderStrategy.
Definition at line 67 of file AbstractGraphLoaderStrategy.cpp.
References te::graph::Edge_List, and TR_GRAPH.
      
  | 
  protected | 
Used to save the edges elements attributes from a graph data.
| data | Pointer to a valid graph data | 
Definition at line 309 of file AbstractGraphLoaderStrategy.cpp.
References TR_GRAPH.
      
  | 
  protected | 
Used to save the edge elements from a graph data.
| data | Pointer to a valid graph data | 
Definition at line 100 of file AbstractGraphLoaderStrategy.cpp.
References te::graph::GraphData::getEdgeMap(), te::graph::GraphData::isDirty(), te::mem::DataSetItem::setInt32(), and te::mem::DataSetItem::setValue().
      
  | 
  protected | 
Used to save the vertex elements from a graph data.
| data | Pointer to a valid graph data | 
Definition at line 304 of file AbstractGraphLoaderStrategy.cpp.
References TR_GRAPH.
      
  | 
  protected | 
Used to save the vertex elements attributes from a graph data.
| data | Pointer to a valid graph data | 
Definition at line 207 of file AbstractGraphLoaderStrategy.cpp.
References te::graph::GraphData::getVertexMap(), te::graph::GraphData::isDirty(), te::mem::DataSetItem::setInt32(), and te::mem::DataSetItem::setValue().
      
  | 
  protected | 
Graph metadata attribute.
Definition at line 203 of file AbstractGraphLoaderStrategy.h.