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. */
72 
73 
74  std::vector<te::vp::InputParams> getInputParams();
75 
76  void setInputParams(const std::vector<te::vp::InputParams>& setInputParams);
77 
78 
80 
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
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::vp::AlgorithmParams::m_outputDataSetName
std::string m_outputDataSetName
Definition: AlgorithmParams.h:108
te::vp::AlgorithmParams::setInputParams
void setInputParams(const std::vector< te::vp::InputParams > &setInputParams)
te::vp::AlgorithmParams::getSpecificParams
const std::map< std::string, te::dt::AbstractData * > & getSpecificParams()
te::vp::AlgorithmParams::getOutputDataSetName
const std::string & getOutputDataSetName()
InputParams.h
A structure to hold the input parameters of vector processing.
te::vp::AlgorithmParams::m_outputSRID
int m_outputSRID
Definition: AlgorithmParams.h:109
te::vp::AlgorithmParams
Definition: AlgorithmParams.h:52
te::vp::AlgorithmParams::setOutputSRID
void setOutputSRID(const int &outputSRID)
te::vp::AlgorithmParams::AlgorithmParams
AlgorithmParams()
te::vp::AlgorithmParams::m_specificParams
std::map< std::string, te::dt::AbstractData * > m_specificParams
Definition: AlgorithmParams.h:111
te::vp::AlgorithmParams::setOutputDataSetName
void setOutputDataSetName(const std::string &outputDataSetName)
te::vp::AlgorithmParams::getOutputDataSource
te::da::DataSourcePtr getOutputDataSource()
TEVPEXPORT
#define TEVPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:61
te::vp::AlgorithmParams::setSpecificParams
void setSpecificParams(const std::map< std::string, te::dt::AbstractData * > &specificParams)
te::vp::AlgorithmParams::addWarning
void addWarning(const std::string &warning, const bool &appendIfExist=false)
te::vp::AlgorithmParams::getOutputSRID
const int & getOutputSRID()
te::vp::AlgorithmParams::setOutputDataSource
void setOutputDataSource(te::da::DataSourcePtr outputDataSource)
te::vp::AlgorithmParams::getInputParams
std::vector< te::vp::InputParams > getInputParams()
te::vp::AlgorithmParams::m_warnings
std::vector< std::string > m_warnings
Definition: AlgorithmParams.h:113
te::vp::AlgorithmParams::~AlgorithmParams
~AlgorithmParams()
Destructor.
te::da::DataSourcePtr
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1449
te::vp::AlgorithmParams::AlgorithmParams
AlgorithmParams(const std::vector< te::vp::InputParams > &inputParams, te::da::DataSourcePtr outputDataSource, const std::string &outputDataSetName, const int &outputSRID, const std::map< std::string, te::dt::AbstractData * > &specificParams)
Constructor.
Config.h
Proxy configuration file for TerraView (see terraview_config.h).
te::vp::AlgorithmParams::m_inputParams
std::vector< te::vp::InputParams > m_inputParams
Definition: AlgorithmParams.h:105
te::vp::AlgorithmParams::getWarnings
const std::vector< std::string > & getWarnings()
te::vp::AlgorithmParams::m_outputDataSource
te::da::DataSourcePtr m_outputDataSource
Definition: AlgorithmParams.h:107