TopDownLoaderStrategy.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file TopDownLoaderStrategy.h
22 
23  \brief This class implements the main functions necessary to
24  save and load the graph data and metadata information
25  using as strategy the graph path.
26 
27  \note TODO
28 */
29 
30 #ifndef __TERRALIB_GRAPH_INTERNAL_TOPDOWNLOADERSTRATEGY_H
31 #define __TERRALIB_GRAPH_INTERNAL_TOPDOWNLOADERSTRATEGY_H
32 
33 // Terralib Includes
34 #include "../Config.h"
35 #include "../Enums.h"
36 
38 
39 namespace te
40 {
41  namespace graph
42  {
43  //forward declarations
44  class AbstractGraph;
45  class Edge;
46  class GraphCache;
47  class GraphData;
48  class GraphMetadata;
49  class Vertex;
50 
51  /*!
52  \class TopDownLoaderStrategy
53 
54  \brief This class implements the main functions necessary to
55  save and load the graph data and metadata information
56  using as strategy the graph path.
57 
58  \note TODO
59 
60  \sa AbstractGraphLoaderStrategy
61  */
62 
64  {
65  public:
66 
67  /*! \brief Default constructor. */
69 
70  /*! \brief Default destructor. */
71  virtual ~TopDownLoaderStrategy() {};
72 
73  /** @name Top Down Graph Loader Strategy Methods
74  * Method used to manager a graph data
75  */
76  //@{
77 
78  /*!
79  \brief Functio used to load a group of vertex elements given a base element
80 
81  \param vertexId Attribute used to identify the base element
82 
83  \param g Pointer to a graph, parent of this element
84 
85  \param gc This is a optional attribute, if present the cache will be check if the already been loaded
86 
87  */
88  virtual void loadDataByVertexId(int vertexId, te::graph::AbstractGraph* g, te::graph::GraphCache* gc = 0) = 0;
89 
90  /*!
91  \brief Functio used to load a group of edges elements given a base element
92 
93  \param edgeId Attribute used to identify the base element
94 
95  \param g Pointer to a graph, parent of this element
96 
97  \param gc This is a optional attribute, if present the cache will be check if the already been loaded
98 
99  */
100  virtual void loadDataByEdgeId(int edgeId, te::graph::AbstractGraph* g, te::graph::GraphCache* gc = 0) = 0;
101 
102  /*!
103  \brief Save the graph data structure in Data Source
104 
105  \param data Pointer to a valid graph data
106 
107  */
108  virtual void saveData(GraphData* data) = 0;
109 
110  /*!
111  \brief Function used to remove a edge saved in a data source
112 
113  \param id The edge identifier
114 
115  */
116  virtual void removeEdge(int id) = 0;
117 
118  /*!
119  \brief Function used to remove a vertex saved in a data source
120 
121  \param id The vertex identifier
122 
123  */
124  virtual void removeVertex(int id) = 0;
125 
126  //@}
127  };
128  } // end namespace graph
129 } // end namespace te
130 
131 #endif // __TERRALIB_GRAPH_INTERNAL_TOPDOWNLOADERSTRATEGY_H
#define TEGRAPHEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:178
virtual ~TopDownLoaderStrategy()
Default destructor.
Abstract class used to define the main functions of graph struct. All graph implementations must used...
Definition: AbstractGraph.h:55
URI C++ Library.
This class define the main functions necessary to save and load the graph data and metadata informati...
TopDownLoaderStrategy(te::graph::GraphMetadata *metadata)
Default constructor.
Class used to manager the graph data elements. This class uses a cache policy to control the elements...
Definition: GraphCache.h:60
This class define a important struct used to group a map of vertex and edges. A flag is used to indic...
Definition: GraphData.h:55
This class implements the main functions necessary to save and load the graph data and metadata infor...
This class define the main functions necessary to save and load the graph data and metadata informati...
Class used to define the graph metadata informations.
Definition: GraphMetadata.h:56