OTB  6.7.0
Orfeo Toolbox
otbWrapperOutputFilenameParameter.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 otbWrapperOutputFilenameParameter_h
22 #define otbWrapperOutputFilenameParameter_h
23 
24 #include <string>
26 
27 namespace otb
28 {
29 namespace Wrapper
30 {
31 
37 class OTBApplicationEngine_EXPORT OutputFilenameParameter
38  : public Parameter
39 {
40 public:
46 
48  itkNewMacro(Self);
49 
51  itkTypeMacro(OutputFilenameParameter, Parameter);
52 
53 
54  bool HasValue() const override
55  {
56  return m_StringParam->HasValue();
57  }
58 
59  // Get Value
60  otbGetObjectMemberConstMacro(StringParam, Value, std::string);
61 
62  // Set Value
63  virtual void SetValue(const std::string value)
64  {
65  itkDebugMacro("setting member m_StringParam to " << value);
66  this->m_StringParam->SetValue(value);
67  SetActive(true);
68  this->Modified();
69  }
70 
71  // Clear Value
72  void ClearValue() override
73  {
74  m_StringParam->ClearValue();
75  }
76 
77  ParameterType GetType() const override
78  {
80  }
81 
82  std::string ToString() const override
83  {
84  return GetValue();
85  }
86 
87  void FromString(const std::string& value) override
88  {
89  SetValue(value);
90  }
91 
92 protected:
95  {
96  // Initialize the String Parameter
97  m_StringParam= StringParameter::New();
98 
99 
100  }
101 
104  {}
105 
106 private:
108  void operator =(const OutputFilenameParameter&); //purposely not
109  //implemented
110 
112 
113 }; // End class Parameter
114 
115 } // End namespace Wrapper
116 } // End namespace otb
117 
118 #endif
This class represent a string parameter for the wrapper framework.
This class represent a parameter for the wrapper framework This class is a high level class represent...
#define otbGetObjectMemberConstMacro(object, name, type)
Definition: otbMacro.h:101
virtual void SetValue(const std::string value)
This class represent a string parameter for the wrapper framework.
void FromString(const std::string &value) override