AlgorithmParams.cpp
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.cpp
22  */
23 
24 #include "AlgorithmParams.h"
25 
27 
28 {
29 }
30 
31 te::vp::AlgorithmParams::AlgorithmParams( const std::vector<te::vp::InputParams>& inputParams,
32  te::da::DataSourcePtr outputDataSource,
33  const std::string& outputDataSetName,
34  const int& outputSRID,
35  const std::map<std::string, te::dt::AbstractData*>& specificParams)
36  : m_inputParams(inputParams),
37  m_outputDataSource(outputDataSource),
38  m_outputDataSetName(outputDataSetName),
39  m_outputSRID(outputSRID),
40  m_specificParams(specificParams)
41 {
42 }
43 
45 
46 std::vector<te::vp::InputParams> te::vp::AlgorithmParams::getInputParams()
47 {
48  return m_inputParams;
49 }
50 
51 void te::vp::AlgorithmParams::setInputParams(const std::vector<te::vp::InputParams>& inputParams)
52 {
53  m_inputParams = inputParams;
54 }
55 
56 
58 {
59  return m_outputDataSource;
60 }
61 
63 {
64  m_outputDataSource = outputDataSource;
65 }
66 
67 
69 {
70  return m_outputDataSetName;
71 }
72 
73 void te::vp::AlgorithmParams::setOutputDataSetName(const std::string& outputDataSetName)
74 {
75  m_outputDataSetName = outputDataSetName;
76 }
77 
78 
80 {
81  return m_outputSRID;
82 }
83 
84 void te::vp::AlgorithmParams::setOutputSRID(const int& outputSRID)
85 {
86  m_outputSRID = outputSRID;
87 }
88 
89 
90 const std::map<std::string, te::dt::AbstractData*>& te::vp::AlgorithmParams::getSpecificParams()
91 {
92  return m_specificParams;
93 }
94 
95 void te::vp::AlgorithmParams::setSpecificParams(const std::map<std::string, te::dt::AbstractData*>& specificParams)
96 {
97  m_specificParams = specificParams;
98 }
99 
100 
101 const std::vector<std::string>& te::vp::AlgorithmParams::getWarnings()
102 {
103  return m_warnings;
104 }
105 
106 void te::vp::AlgorithmParams::addWarning(const std::string& warning, const bool& appendIfExists)
107 {
108  if (!appendIfExists)
109  {
110  std::vector<std::string>::iterator it = std::find(m_warnings.begin(), m_warnings.end(), warning);
111  if (it == m_warnings.end())
112  m_warnings.push_back(warning);
113  }
114  else
115  {
116  m_warnings.push_back(warning);
117  }
118 
119 }
void setOutputSRID(const int &outputSRID)
std::map< std::string, te::dt::AbstractData * > m_specificParams
boost::shared_ptr< DataSource > DataSourcePtr
const std::vector< std::string > & getWarnings()
std::vector< te::vp::InputParams > getInputParams()
~AlgorithmParams()
Destructor.
void setOutputDataSetName(const std::string &outputDataSetName)
Algorithm Parameters.
void setOutputDataSource(te::da::DataSourcePtr outputDataSource)
const std::string & getOutputDataSetName()
std::vector< te::vp::InputParams > m_inputParams
te::da::DataSourcePtr getOutputDataSource()
const std::map< std::string, te::dt::AbstractData * > & getSpecificParams()
void addWarning(const std::string &warning, const bool &appendIfExist=false)
te::da::DataSourcePtr m_outputDataSource
void setInputParams(const std::vector< te::vp::InputParams > &setInputParams)
void setSpecificParams(const std::map< std::string, te::dt::AbstractData * > &specificParams)
std::vector< std::string > m_warnings