OTB  10.0.0
Orfeo Toolbox
otbWrapperOutputVectorDataParameter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2024 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 otbWrapperOutputVectorDataParameter_h
22 #define otbWrapperOutputVectorDataParameter_h
23 
24 #include "otbWrapperParameter.h"
25 
26 #include "otbVectorData.h"
28 #include <string>
29 
30 namespace otb
31 {
32 namespace Wrapper
33 {
40 class OTBApplicationEngine_EXPORT OutputVectorDataParameter : public Parameter
41 {
42 public:
46  typedef itk::SmartPointer<Self> Pointer;
47  typedef itk::SmartPointer<const Self> ConstPointer;
48 
50  itkNewMacro(Self);
51 
54 
55 
57  itkSetObjectMacro(VectorData, VectorDataType);
58 
61 
63  bool HasValue() const override;
64 
67 
70 
71  void SetFileName(const char* filename);
72  void SetFileName(const std::string& filename);
73 
74  itkGetStringMacro(FileName);
75 
76  void Write();
77  itk::ProcessObject* GetWriter();
79 
80  ParameterType GetType() const override
81  {
83  }
84 
85  std::string ToString() const override
86  {
87  return GetFileName();
88  }
89 
90  void FromString(const std::string& value) override
91  {
92  SetFileName(value);
93  }
94 
95 protected:
98 
101  {
102  }
103 
104 
106  std::string m_FileName;
107 
109 
110 private:
112  void operator=(const Parameter&) = delete;
113 };
114 
115 } // End namespace Wrapper
116 } // End namespace otb
117 
118 #endif
itk::SmartPointer< Self > Pointer
This class represents a hierarchy of vector data.
Definition: otbVectorData.h:62
itk::SmartPointer< Self > Pointer
Definition: otbVectorData.h:67
This class represents a OutputVectorData parameter.
otb::VectorDataFileWriter< VectorDataType >::Pointer m_Writer
void SetFileName(const std::string &filename)
void FromString(const std::string &value) override
itkGetObjectMacro(VectorData, VectorDataType)
void SetFileName(const char *filename)
OutputVectorDataParameter(const Parameter &)=delete
void SetValue(VectorDataType *vd)
void operator=(const Parameter &)=delete
This class represent a parameter for the wrapper framework This class is a high level class represent...
@ ParameterType_OutputVectorData
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.