Loading...
Searching...
No Matches
BoxLoaderStrategy.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 BoxLoaderStrategy.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 a bounding box to create a region
26 that defines a group of elements.
27*/
28
29#ifndef __TERRALIB_GRAPH_INTERNAL_BOXLOADERSTRATEGY_H
30#define __TERRALIB_GRAPH_INTERNAL_BOXLOADERSTRATEGY_H
31
32// Terralib Includes
33#include "../Config.h"
34#include "../Enums.h"
36
37// STL Includes
38#include <string>
39
40namespace te
41{
42 // Forward declarations
43 namespace da
44 {
45 class DataSet;
46 }
47
48 namespace gm
49 {
50 class Envelope;
51 class GeometryProperty;
52 class Point;
53 }
54
55 namespace graph
56 {
57 //forward declarations
58 class AbstractGraph;
59 class GraphCache;
60 class GraphData;
61 class GraphMetadata;
62
63 /*!
64 \class BoxLoaderStrategy
65
66 \brief This class implements the main functions necessary to
67 save and load the graph data and metadata information
68 using as strategy a bounding box to create a region
69 that defines a group of elements.
70
71 \sa AbstractGraphLoaderStrategy
72 */
73
75 {
76 public:
77
78 /*! \brief Default constructor. */
80
81 /*! \brief Default destructor. */
83
84 /** @name Database Box Graph Loader Strategy Methods
85 * Method used to manager a graph data
86 */
87 //@{
88
89 /*!
90 \brief Functio used to load a group of vertex elements given a base element
91
92 \param vertexId Attribute used to identify the base element
93
94 \param g Pointer to a graph, parent of this element
95
96 \param gc This is a optional attribute, if present the cache will be check if the already been loaded
97
98 */
99 virtual void loadDataByVertexId(int vertexId, te::graph::AbstractGraph* g, te::graph::GraphCache* gc = 0);
100
101 /*!
102 \brief Functio used to load a group of edges elements given a base element
103
104 \param edgeId Attribute used to identify the base element
105
106 \param g Pointer to a graph, parent of this element
107
108 \param gc This is a optional attribute, if present the cache will be check if the already been loaded
109
110 */
112
113 //@}
114
115 protected:
116
117 /*!
118 \brief Generate a box with p as center. The new box will have n% of the total graph height and n% of total graph width
119
120 \param p Terralib object that defines a geometric point.
121
122 \param tableName Attribute used to define the table name that contains the graph elements
123
124 \return Terralib object that defines geometric region.
125 */
126 te::gm::Envelope* calculateBox(te::gm::Point* p, std::string tableName);
127 };
128 } // end namespace graph
129} // end namespace te
130
131#endif // __TERRALIB_GRAPH_INTERNAL_BOXLOADERSTRATEGY_H
This class define the main functions necessary to save and load the graph data and metadata informati...
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:52
A point with x and y coordinate values.
Definition: Point.h:51
This class define the main functions necessary to save and load the graph data and metadata informati...
Abstract class used to define the main functions of graph struct. All graph implementations must used...
Definition: AbstractGraph.h:56
This class implements the main functions necessary to save and load the graph data and metadata infor...
BoxLoaderStrategy(te::graph::GraphMetadata *metadata)
Default constructor.
virtual void loadDataByVertexId(int vertexId, te::graph::AbstractGraph *g, te::graph::GraphCache *gc=0)
Functio used to load a group of vertex elements given a base element.
virtual ~BoxLoaderStrategy()
Default destructor.
virtual void loadDataByEdgeId(int edgeId, te::graph::AbstractGraph *g, te::graph::GraphCache *gc=0)
Functio used to load a group of edges elements given a base element.
te::gm::Envelope * calculateBox(te::gm::Point *p, std::string tableName)
Generate a box with p as center. The new box will have n% of the total graph height and n% of total g...
Class used to manager the graph data elements. This class uses a cache policy to control the elements...
Definition: GraphCache.h:61
Class used to define the graph metadata informations.
Definition: GraphMetadata.h:57
TerraLib.
#define TEGRAPHEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:178