OTB  6.7.0
Orfeo Toolbox
otbWrapperOutputVectorDataParameter.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 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:
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 
105  std::string m_FileName;
106 
108 
109 private:
110  OutputVectorDataParameter(const Parameter &) = delete;
111  void operator =(const Parameter&) = delete;
112 
113 };
114 
115 } // End namespace Wrapper
116 } // End namespace otb
117 
118 #endif
This class represent a parameter for the wrapper framework This class is a high level class represent...
otb::VectorDataFileWriter< VectorDataType >::Pointer m_Writer
This class represents a OutputVectorData parameter.
OTBApplicationEngine_EXPORT void Write(const std::string &filename, Application::Pointer application)
This class represents a hierarchy of vector data.
Definition: otbVectorData.h:58
void FromString(const std::string &value) override