OTB  9.0.0
Orfeo Toolbox
otbWrapperInputVectorDataParameter.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 otbWrapperInputVectorDataParameter_h
22 #define otbWrapperInputVectorDataParameter_h
23 
25 #include "otbWrapperParameter.h"
26 #include <string>
27 
28 namespace otb
29 {
30 namespace Wrapper
31 {
38 class OTBApplicationEngine_EXPORT InputVectorDataParameter : public Parameter
39 {
40 public:
44  typedef itk::SmartPointer<Self> Pointer;
45  typedef itk::SmartPointer<const Self> ConstPointer;
46 
48  itkNewMacro(Self);
49 
52 
53  typedef double CoordinatePrecisionType;
54  typedef double ValuePrecisionType;
56 
58  bool SetFromFileName(const std::string& filename);
59  itkGetConstReferenceMacro(FileName, std::string);
61 
62  const VectorDataType* GetVectorData() const;
63  VectorDataType* GetVectorData();
64 
65  void SetVectorData(VectorDataType* vectorData);
66 
67  bool HasValue() const override;
68 
69  void ClearValue() override;
70 
71  ParameterType GetType() const override
72  {
74  }
75 
76  std::string ToString() const override
77  {
78  return GetFileName();
79  }
80 
81  void FromString(const std::string& value) override
82  {
83  SetFromFileName(value);
84  }
85 
86 protected:
89 
91  ~InputVectorDataParameter() override;
92 
96 
97  std::string m_FileName;
98 
99  std::string m_PreviousFileName;
100 
101 private:
102  InputVectorDataParameter(const Parameter&) = delete;
103  void operator=(const Parameter&) = delete;
104 };
105 
106 } // End namespace Wrapper
107 } // End namespace otb
108 
109 #endif
otb::Wrapper::InputVectorDataParameter::m_Reader
VectorDataFileReaderType::Pointer m_Reader
Definition: otbWrapperInputVectorDataParameter.h:95
otb::Wrapper::InputVectorDataParameter::m_PreviousFileName
std::string m_PreviousFileName
Definition: otbWrapperInputVectorDataParameter.h:99
otb::VectorDataFileReader
Data source that reads vector data from a single file.
Definition: otbVectorDataFileReader.h:87
otb::Wrapper::Parameter
This class represent a parameter for the wrapper framework This class is a high level class represent...
Definition: otbWrapperParameter.h:49
otb::Wrapper::InputVectorDataParameter
This class represents a InputVectorData parameter.
Definition: otbWrapperInputVectorDataParameter.h:38
otb::VectorData::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbVectorData.h:64
otb::VectorData
This class represents a hierarchy of vector data.
Definition: otbVectorData.h:58
otb::Wrapper::InputVectorDataParameter::m_VectorData
VectorDataType::Pointer m_VectorData
Definition: otbWrapperInputVectorDataParameter.h:94
otb::Wrapper::InputVectorDataParameter::CoordinatePrecisionType
double CoordinatePrecisionType
Definition: otbWrapperInputVectorDataParameter.h:51
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::Wrapper::InputVectorDataParameter::GetType
ParameterType GetType() const override
Definition: otbWrapperInputVectorDataParameter.h:71
otb::Wrapper::InputVectorDataParameter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbWrapperInputVectorDataParameter.h:45
otb::Wrapper::InputVectorDataParameter::Superclass
Parameter Superclass
Definition: otbWrapperInputVectorDataParameter.h:43
otb::Wrapper::InputVectorDataParameter::Self
InputVectorDataParameter Self
Definition: otbWrapperInputVectorDataParameter.h:42
otb::Wrapper::InputVectorDataParameter::ValuePrecisionType
double ValuePrecisionType
Definition: otbWrapperInputVectorDataParameter.h:54
otb::Wrapper::InputVectorDataParameter::VectorDataType
otb::VectorData< CoordinatePrecisionType, 2, ValuePrecisionType > VectorDataType
Definition: otbWrapperInputVectorDataParameter.h:55
otb::Wrapper::InputVectorDataParameter::VectorDataFileReaderType
otb::VectorDataFileReader< VectorDataType > VectorDataFileReaderType
Definition: otbWrapperInputVectorDataParameter.h:93
otb::Wrapper::InputVectorDataParameter::m_FileName
std::string m_FileName
Definition: otbWrapperInputVectorDataParameter.h:97
otb::Wrapper::InputVectorDataParameter::ToString
std::string ToString() const override
Definition: otbWrapperInputVectorDataParameter.h:76
otb::VectorDataFileReader::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbVectorDataFileReader.h:93
otb::Wrapper::InputVectorDataParameter::FromString
void FromString(const std::string &value) override
Definition: otbWrapperInputVectorDataParameter.h:81
otb::Wrapper::InputVectorDataParameter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbWrapperInputVectorDataParameter.h:44
otbVectorDataFileReader.h
otbWrapperParameter.h
otb::Wrapper::ParameterType
ParameterType
Definition: otbWrapperTypes.h:37
otb::Wrapper::ParameterType_InputVectorData
@ ParameterType_InputVectorData
Definition: otbWrapperTypes.h:50