AlgorithmParams.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 AlgorithmParams.h
22 
23  \brief Algorithm Parameters.
24 
25  \ingroup vp
26  */
27 
28 #ifndef __TERRALIB_VP_INTERNAL_ALGORITHM_PARAMS_H
29 #define __TERRALIB_VP_INTERNAL_ALGORITHM_PARAMS_H
30 
31 // Terralib
32 
33 #include "../dataaccess/dataset/DataSet.h"
34 #include "../dataaccess/datasource/DataSourceInfo.h"
35 #include "Config.h"
36 #include "InputParams.h"
37 
38 // STL
39 #include <string>
40 #include <vector>
41 
42 namespace te
43 {
44  namespace vp
45  {
46  /*!
47  \class Algorithm Parameters
48 
49  \brief Define input/output parameters for an operation.
50  */
52  {
53  public:
54 
56 
57  /*!
58  \brief Constructor.
59 
60  \param map with a DataSetName as a key and a DataSource as a value.
61 
62  \note The AlgorithmParams will take the ownership of DataSource.
63  */
64  AlgorithmParams(const std::vector<te::vp::InputParams>& inputParams,
65  te::da::DataSourcePtr outputDataSource,
66  const std::string& outputDataSetName,
67  const int& outputSRID,
68  const std::map<std::string, te::dt::AbstractData*>& specificParams);
69 
70  /*! \brief Destructor. */
71  ~AlgorithmParams();
72 
73 
74  std::vector<te::vp::InputParams> getInputParams();
75 
76  void setInputParams(const std::vector<te::vp::InputParams>& setInputParams);
77 
78 
79  te::da::DataSourcePtr getOutputDataSource();
80 
81  void setOutputDataSource(te::da::DataSourcePtr outputDataSource);
82 
83 
84  const std::string& getOutputDataSetName();
85 
86  void setOutputDataSetName(const std::string& outputDataSetName);
87 
88 
89  const int& getOutputSRID();
90 
91  void setOutputSRID(const int& outputSRID);
92 
93 
94  const std::map<std::string, te::dt::AbstractData*>& getSpecificParams();
95 
96  void setSpecificParams(const std::map<std::string, te::dt::AbstractData*>& specificParams);
97 
98 
99  const std::vector<std::string>& getWarnings();
100 
101  void addWarning(const std::string& warning, const bool& appendIfExist = false);
102 
103  protected:
104 
105  std::vector<te::vp::InputParams> m_inputParams;
106 
108  std::string m_outputDataSetName;
110 
111  std::map<std::string, te::dt::AbstractData*> m_specificParams;
112 
113  std::vector<std::string> m_warnings;
114  };
115  }
116 }
117 #endif // __TERRALIB_VP_INTERNAL_ALGORITHM_PARAMS_H
#define TEVPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:61
std::map< std::string, te::dt::AbstractData * > m_specificParams
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1438
A structure to hold the input parameters of vector processing.
URI C++ Library.
std::vector< te::vp::InputParams > m_inputParams
te::da::DataSourcePtr m_outputDataSource
Configuration flags for the Terrralib Vector Processing module.
std::vector< std::string > m_warnings