OTB  9.0.0
Orfeo Toolbox
otbWrapperProxyParameter.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 otbWrapperProxyParameter_h
22 #define otbWrapperProxyParameter_h
23 
24 #include "itkObject.h"
25 #include "otbWrapperParameter.h"
26 #include <utility>
27 
28 namespace otb
29 {
30 namespace Wrapper
31 {
43 class ProxyParameter : public Parameter
44 {
45 public:
48  typedef itk::SmartPointer<Self> Pointer;
49  typedef itk::SmartPointer<const Self> ConstPointer;
50 
51  itkNewMacro(Self);
52 
53  itkTypeMacro(ProxyParameter, Parameter);
54 
55  typedef std::pair<Parameter::Pointer, std::string> ProxyTargetType;
56 
60  void SetTarget(const ProxyTargetType& target)
61  {
62  m_Target = target;
63  }
64 
69  {
70  return m_Target;
71  }
72 
73  bool HasValue() const override
74  {
75  return m_Target.first.IsNotNull();
76  }
77 
78  ParameterType GetType() const override
79  {
80  return m_Target.first->GetType();
81  }
82 
83 
84 protected:
86  {
87  }
88  ~ProxyParameter() override
89  {
90  }
91 
92 private:
93  ProxyParameter(const Self&) = delete;
94  void operator=(const Self&) = delete;
95 
97 };
98 }
99 }
100 
101 //#ifndef OTB_MANUAL_INSTANTIATION
102 //#include "otbWrapperProxyParameter.hxx"
103 //#endif
104 
105 #endif
otb::Wrapper::ProxyParameter::ProxyParameter
ProxyParameter()
Definition: otbWrapperProxyParameter.h:85
otb::Wrapper::ProxyParameter::HasValue
bool HasValue() const override
Definition: otbWrapperProxyParameter.h:73
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::Wrapper::ProxyParameter::GetTarget
const ProxyTargetType & GetTarget(void)
Definition: otbWrapperProxyParameter.h:68
otb::Wrapper::ProxyParameter
Parameter class acting as a proxy to a different parameter.
Definition: otbWrapperProxyParameter.h:43
otb::Wrapper::ProxyParameter::Superclass
Parameter Superclass
Definition: otbWrapperProxyParameter.h:47
otb::Wrapper::ProxyParameter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbWrapperProxyParameter.h:49
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::Wrapper::ProxyParameter::SetTarget
void SetTarget(const ProxyTargetType &target)
Definition: otbWrapperProxyParameter.h:60
otb::Wrapper::ProxyParameter::ProxyTargetType
std::pair< Parameter::Pointer, std::string > ProxyTargetType
Definition: otbWrapperProxyParameter.h:53
otb::Wrapper::ProxyParameter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbWrapperProxyParameter.h:48
otb::Wrapper::ProxyParameter::GetType
ParameterType GetType() const override
Definition: otbWrapperProxyParameter.h:78
otb::Wrapper::ProxyParameter::m_Target
ProxyTargetType m_Target
Definition: otbWrapperProxyParameter.h:96
otbWrapperParameter.h
otb::Wrapper::ProxyParameter::operator=
void operator=(const Self &)=delete
otb::Wrapper::ProxyParameter::~ProxyParameter
~ProxyParameter() override
Definition: otbWrapperProxyParameter.h:88
otb::Wrapper::ParameterType
ParameterType
Definition: otbWrapperTypes.h:37
otb::Wrapper::ProxyParameter::Self
ProxyParameter Self
Definition: otbWrapperProxyParameter.h:46