GPMBuilder.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 GPMBuilder.h
22 
23  \brief This class defines the GPM Builder class.
24 */
25 
26 #ifndef __TERRALIB_SA_INTERNAL_GPMBUILDER_H
27 #define __TERRALIB_SA_INTERNAL_GPMBUILDER_H
28 
29 // Terralib Includes
30 #include "../Config.h"
32 
33 // STL Includes
34 #include <map>
35 
36 namespace te
37 {
38  // Forward declarations
39  namespace da { class DataSource; }
40 
41  namespace sa
42  {
43  // Forward declarations
44  class GPMConstructorAbstractStrategy;
45  class GPMWeightsAbstractStrategy;
46 
47  /*!
48  \class GPMBuilder
49 
50  \brief This class defines the GPM Builder class.
51 
52  */
53 
55  {
56  public:
57 
58  /*! \brief Default constructor. */
60 
61  /*! \brief Virtual destructor. */
62  virtual ~GPMBuilder();
63 
64 
65  /** @name Methods
66  * Methods used by the GPM builder
67  */
68  //@{
69 
70  /*!
71  \brief Function used to create a empty gpm (using a MEMORY DIRECT graph)
72 
73  \param ds Data source pointer
74  \param dataSetName Container with data source information
75  \param attributeName Attribute used to define the output graph type
76 
77  \return True if the gmp was correctly generated and false in other case.
78 
79  */
80  bool setGPMInfo(te::da::DataSourcePtr ds, const std::string& dataSetName, const std::string& attributeName);
81 
82  std::auto_ptr<GeneralizedProximityMatrix> build();
83 
84  //@}
85 
86  private:
87 
88  GPMConstructorAbstractStrategy* m_constructor; //!< Strategy used to construct the gpm.
89 
90  GPMWeightsAbstractStrategy* m_weights; //!< Strategy used to calculate the weight of a gpm.
91 
92  std::auto_ptr<GeneralizedProximityMatrix> m_gpm; //!< GPM reference pointer.
93 
94  te::da::DataSourcePtr m_ds; //!< Input Data Source.
95 
96  };
97 
98  } // end namespace sa
99 } // end namespace te
100 
101 #endif //__TERRALIB_SA_INTERNAL_GPMBUILDER_H
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1438
URI C++ Library.
GPMConstructorAbstractStrategy * m_constructor
Strategy used to construct the gpm.
Definition: GPMBuilder.h:88
GPMWeightsAbstractStrategy * m_weights
Strategy used to calculate the weight of a gpm.
Definition: GPMBuilder.h:90
This class defines a an Abstract class for a GPM constructor.
This class defines a an Abstract class to calculates a weight for a GPM.
#define TESAEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:133
std::auto_ptr< GeneralizedProximityMatrix > m_gpm
GPM reference pointer.
Definition: GPMBuilder.h:92
This class defines the GPM Builder class.
Definition: GPMBuilder.h:54
te::da::DataSourcePtr m_ds
Input Data Source.
Definition: GPMBuilder.h:94
This class defines the GPM class.