OTB  9.0.0
Orfeo Toolbox
otbWrapperOutputVectorDataParameter.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 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 
53  itkTypeMacro(OutputVectorDataParameter, Parameter);
54 
55 
57  itkSetObjectMacro(VectorData, VectorDataType);
58 
60  itkGetObjectMacro(VectorData, VectorDataType);
61 
63  bool HasValue() const override;
64 
66  void SetValue(VectorDataType* vd);
67 
69  VectorDataType* GetValue(void);
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();
78  void InitializeWriters();
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:
111  OutputVectorDataParameter(const Parameter&) = delete;
112  void operator=(const Parameter&) = delete;
113 };
114 
115 } // End namespace Wrapper
116 } // End namespace otb
117 
118 #endif
otb::Wrapper::OutputVectorDataParameter::ToString
std::string ToString() const override
Definition: otbWrapperOutputVectorDataParameter.h:85
otb::Wrapper::OutputVectorDataParameter::m_Writer
otb::VectorDataFileWriter< VectorDataType >::Pointer m_Writer
Definition: otbWrapperOutputVectorDataParameter.h:108
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::VectorDataFileWriter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbVectorDataFileWriter.h:72
otb::Wrapper::OutputVectorDataParameter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbWrapperOutputVectorDataParameter.h:47
otbVectorDataFileWriter.h
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::OutputVectorDataParameter::GetType
ParameterType GetType() const override
Definition: otbWrapperOutputVectorDataParameter.h:80
otb::Wrapper::XML::Write
OTBApplicationEngine_EXPORT void Write(const std::string &filename, Application::Pointer application)
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::Wrapper::OutputVectorDataParameter::Superclass
Parameter Superclass
Definition: otbWrapperOutputVectorDataParameter.h:45
otb::Wrapper::OutputVectorDataParameter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbWrapperOutputVectorDataParameter.h:46
otb::Wrapper::OutputVectorDataParameter::Self
OutputVectorDataParameter Self
Definition: otbWrapperOutputVectorDataParameter.h:44
otb::Wrapper::OutputVectorDataParameter::m_VectorData
VectorDataType::Pointer m_VectorData
Definition: otbWrapperOutputVectorDataParameter.h:105
otb::Wrapper::ParameterType_OutputVectorData
@ ParameterType_OutputVectorData
Definition: otbWrapperTypes.h:53
otb::Wrapper::OutputVectorDataParameter::m_FileName
std::string m_FileName
Definition: otbWrapperOutputVectorDataParameter.h:106
otbVectorData.h
otb::Wrapper::OutputVectorDataParameter::~OutputVectorDataParameter
~OutputVectorDataParameter() override
Definition: otbWrapperOutputVectorDataParameter.h:100
otbWrapperParameter.h
otb::Wrapper::OutputVectorDataParameter::FromString
void FromString(const std::string &value) override
Definition: otbWrapperOutputVectorDataParameter.h:90
otb::Wrapper::OutputVectorDataParameter
This class represents a OutputVectorData parameter.
Definition: otbWrapperOutputVectorDataParameter.h:40
otb::Wrapper::ParameterType
ParameterType
Definition: otbWrapperTypes.h:37