Main Page
Modules
Namespaces
Classes
Files
File List
File Members
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"
35
#include "
AbstractGraphLoaderStrategy.h
"
36
37
// STL Includes
38
#include <string>
39
40
namespace
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
74
class
TEGRAPHEXPORT
BoxLoaderStrategy
:
public
AbstractGraphLoaderStrategy
75
{
76
public
:
77
78
/*! \brief Default constructor. */
79
BoxLoaderStrategy
(
te::graph::GraphMetadata
* metadata);
80
81
/*! \brief Default destructor. */
82
virtual
~
BoxLoaderStrategy
();
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
*/
111
virtual
void
loadDataByEdgeId(
int
edgeId,
te::graph::AbstractGraph
* g,
te::graph::GraphCache
*
gc
= 0);
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
te::graph::BoxLoaderStrategy
This class implements the main functions necessary to save and load the graph data and metadata infor...
Definition:
BoxLoaderStrategy.h:74
TEGRAPHEXPORT
#define TEGRAPHEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition:
src/terralib/graph/Config.h:178
gc
te::gm::GeometryCollection * gc
Definition:
examples/geometry/main.cpp:56
te::gm::Point
A point with x and y coordinate values.
Definition:
Point.h:50
te::gm::Envelope
An Envelope defines a 2D rectangular region.
Definition:
geometry/Envelope.h:51
te::graph::AbstractGraph
Abstract class used to define the main functions of graph struct. All graph implementations must used...
Definition:
AbstractGraph.h:55
te
URI C++ Library.
Definition:
Attributes.h:37
DataSet
void DataSet()
Definition:
ExemplifyDataacces.cpp:58
p
te::gm::Polygon * p
Definition:
examples/geometry/main.cpp:52
te::graph::AbstractGraphLoaderStrategy
This class define the main functions necessary to save and load the graph data and metadata informati...
Definition:
AbstractGraphLoaderStrategy.h:55
te::graph::GraphCache
Class used to manager the graph data elements. This class uses a cache policy to control the elements...
Definition:
GraphCache.h:60
AbstractGraphLoaderStrategy.h
This class define the main functions necessary to save and load the graph data and metadata informati...
te::graph::GraphMetadata
Class used to define the graph metadata informations.
Definition:
GraphMetadata.h:56
terralib5_src
src
terralib
graph
loader
BoxLoaderStrategy.h
Generated on Wed Jun 6 2018 12:16:06 for TerraLib by
1.8.11