Loading...
Searching...
No Matches
GPMConstructorAbstractStrategy.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 GPMConstructorAbstractStrategy.h
22
23 \brief This class defines a an Abstract class for a GPM constructor.
24*/
25
26#ifndef __TERRALIB_SA_INTERNAL_GPMCONSTRUCTORABSTRACTSTRATEGY_H
27#define __TERRALIB_SA_INTERNAL_GPMCONSTRUCTORABSTRACTSTRATEGY_H
28
29// Terralib Includes
30#include "../Config.h"
31#include "../Enums.h"
32
33// STL Includes
34#include <memory>
35#include <string>
36
37namespace te
38{
39 // Forward declarations
40 namespace da
41 {
42 class DataSource;
43 class DataSet;
44 }
45
46 namespace sa
47 {
48 // Forward declarations
49 class GeneralizedProximityMatrix;
50
51 /*!
52 \class GPMConstructorAbstractStrategy
53
54 \brief This class defines a an Abstract class for a GPM constructor.
55
56 \sa GPMBuilder
57 */
58
60 {
61 public:
62
63 /*! \brief Default constructor. */
65
66 /*! \brief Virtual destructor. */
68
69
70 /** @name Methods
71 * Methods used by the GPM constructor
72 */
73 //@{
74
75 public:
76
78
80
81 protected:
82
83 /*! \brief Function used to create all vertex object based on data set */
85
86 /*! \brief Added to the edge a new attribute for distance information */
88
89 /*! \brief Function used to generated the edge id */
90 int getEdgeId();
91
92 /*! \brief Build the edges using specific strategy. */
93 virtual void constructStrategy() = 0;
94
95 //@}
96
97 protected:
98
99 GPMConstructorStrategyType m_type; //!< Constructor Type.
100
101 int m_edgeId; //!< Attribute used as a index counter for edge objects
102
103 te::da::DataSource* m_ds; //!< Data Source pointer.
104
106 };
107
108 } // end namespace sa
109} // end namespace te
110
111#endif //__TERRALIB_SA_INTERNAL_GPMCONSTRUCTORABSTRACTSTRATEGY_H
An abstract class for data providers like a DBMS, Web Services or a regular file.
Definition: DataSource.h:120
This class defines a an Abstract class for a GPM constructor.
te::da::DataSource * m_ds
Data Source pointer.
int getEdgeId()
Function used to generated the edge id.
GPMConstructorAbstractStrategy()
Default constructor.
virtual void constructStrategy()=0
Build the edges using specific strategy.
GeneralizedProximityMatrix * m_gpm
GPM Pointer.
int m_edgeId
Attribute used as a index counter for edge objects.
void createVertexObjects()
Function used to create all vertex object based on data set.
GPMConstructorStrategyType m_type
Constructor Type.
GPMConstructorStrategyType getConstructorType()
virtual ~GPMConstructorAbstractStrategy()
Virtual destructor.
void createDistanceAttribute(GeneralizedProximityMatrix *gpm)
Added to the edge a new attribute for distance information.
void construct(te::da::DataSource *ds, GeneralizedProximityMatrix *gpm)
This class defines a Generalized Proximity Matrix.
GPMConstructorStrategyType
Strategies to construc a GPM.
Definition: Enums.h:40
TerraLib.
#define TESAEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:133