OTB  9.0.0
Orfeo Toolbox
otbWrapperFieldParameter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
3  *
4  * This file is part of Orfeo Toolbox
5  *
6  * https://www.orfeo-toolbox.org/
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef otbWrapperFieldParameter_h
22 #define otbWrapperFieldParameter_h
23 
24 #include <string>
26 
27 namespace otb
28 {
29 namespace Wrapper
30 {
31 
38 class OTBApplicationEngine_EXPORT FieldParameter : public ListViewParameter
39 {
40 public:
44  typedef itk::SmartPointer<Self> Pointer;
45  typedef itk::SmartPointer<const Self> ConstPointer;
46 
48  itkNewMacro(Self);
49 
52 
53  typedef std::vector<OGRFieldType> TypeFilterType;
54 
55  ParameterType GetType() const override
56  {
57  return ParameterType_Field;
58  }
59 
61  void SetVectorData(std::string vectorData)
62  {
63  m_VectorData = std::move(vectorData);
64  }
65 
67  const std::string& GetVectorData() const
68  {
69  return m_VectorData;
70  }
71 
73  void SetTypeFilter(TypeFilterType typeFilter)
74  {
75  m_TypeFilter = std::move(typeFilter);
76  }
77 
80  {
81  return m_TypeFilter;
82  }
83 
84 protected:
86  FieldParameter() = default;
87 
89  ~FieldParameter() override = default;
90 
91  std::string m_VectorData;
93 
94 private:
95  FieldParameter(const FieldParameter&) = delete;
96  void operator=(const FieldParameter&) = delete;
97 
98 }; // End class FieldParameter
99 
100 } // End namespace Wrapper
101 } // End namespace otb
102 
103 #endif
otb::Wrapper::FieldParameter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbWrapperFieldParameter.h:44
otb::Wrapper::FieldParameter::GetType
ParameterType GetType() const override
Definition: otbWrapperFieldParameter.h:55
otb::Wrapper::FieldParameter::m_VectorData
std::string m_VectorData
Definition: otbWrapperFieldParameter.h:91
otb::Wrapper::FieldParameter::TypeFilterType
std::vector< OGRFieldType > TypeFilterType
Definition: otbWrapperFieldParameter.h:51
otb::Wrapper::ListViewParameter
This class represent a ListWidget parameter for the wrapper framework.
Definition: otbWrapperListViewParameter.h:41
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::Wrapper::ParameterType_Field
@ ParameterType_Field
Definition: otbWrapperTypes.h:61
otb::Wrapper::FieldParameter::m_TypeFilter
TypeFilterType m_TypeFilter
Definition: otbWrapperFieldParameter.h:92
otb::Wrapper::FieldParameter::SetTypeFilter
void SetTypeFilter(TypeFilterType typeFilter)
Definition: otbWrapperFieldParameter.h:73
otb::Wrapper::FieldParameter::Superclass
ListViewParameter Superclass
Definition: otbWrapperFieldParameter.h:43
otbWrapperListViewParameter.h
otb::Wrapper::FieldParameter::GetVectorData
const std::string & GetVectorData() const
Definition: otbWrapperFieldParameter.h:67
otb::Wrapper::FieldParameter::SetVectorData
void SetVectorData(std::string vectorData)
Definition: otbWrapperFieldParameter.h:61
otb::Wrapper::FieldParameter::Self
FieldParameter Self
Definition: otbWrapperFieldParameter.h:42
otb::Wrapper::FieldParameter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbWrapperFieldParameter.h:45
otb::Wrapper::FieldParameter
This class represents a field parameter selected from a vector file for the wrapper framework.
Definition: otbWrapperFieldParameter.h:38
otb::Wrapper::FieldParameter::GetTypeFilter
const TypeFilterType & GetTypeFilter() const
Definition: otbWrapperFieldParameter.h:79
otb::Wrapper::ParameterType
ParameterType
Definition: otbWrapperTypes.h:37