OTB  6.7.0
Orfeo Toolbox
otbWrapperInputVectorDataParameter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2019 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:
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 
107 } // End namespace Wrapper
108 } // End namespace otb
109 
110 #endif
This class represent a parameter for the wrapper framework This class is a high level class represent...
void FromString(const std::string &value) override
Data source that reads vector data from a single file.
otb::VectorDataFileReader< VectorDataType > VectorDataFileReaderType
This class represents a InputVectorData parameter.
This class represents a hierarchy of vector data.
Definition: otbVectorData.h:58
otb::VectorData< CoordinatePrecisionType, 2, ValuePrecisionType > VectorDataType