OTB  5.0.0
Orfeo Toolbox
otbWrapperParameterGroup.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ORFEO Toolbox
4  Language: C++
5  Date: $Date$
6  Version: $Revision$
7 
8 
9  Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
10  See OTBCopyright.txt for details.
11 
12 
13  This software is distributed WITHOUT ANY WARRANTY; without even
14  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  PURPOSE. See the above copyright notices for more information.
16 
17 =========================================================================*/
18 #ifndef __otbWrapperParameterGroup_h
19 #define __otbWrapperParameterGroup_h
20 
21 #include "itkObject.h"
22 #include "otbWrapperParameter.h"
23 #include <vector>
24 
25 namespace otb
26 {
27 namespace Wrapper
28 {
29 
35 class ITK_ABI_EXPORT ParameterGroup
36  : public Parameter
37 {
38 public:
43 
44  itkNewMacro(Self);
45 
46  itkTypeMacro(ParameterList, Parameter);
47 
48  void AddParameter(Parameter::Pointer p);
49 
51  void AddChoice(std::string paramKey, std::string paramName);
52 
54  void ClearChoices(std::string paramKey);
55 
57  std::vector<int> GetSelectedItems(std::string paramKey);
58 
62  void AddParameter(ParameterType type, std::string paramKey, std::string paramName);
63 
64  Parameter::Pointer GetParameterByIndex(unsigned int i);
65 
66  Parameter::Pointer GetParameterByKey(std::string name);
67 
69  void AddInXMLParameter();
70 
71  void AddOutXMLParameter();
72 
73  void Clear()
74  {
75  m_ParameterList.clear();
76  }
77 
81  std::string GetParameterTypeAsString(ParameterType paramType);
82 
83  /* Get the parameter type from its string version of ParameterType enum */
84  ParameterType GetParameterTypeFromString(std::string paramType);
85 
86  unsigned int GetNumberOfParameters();
87 
88  std::vector<std::string> GetParametersKeys(bool recursive = true);
89 
90  // Always has value
91  bool HasValue() const
92  {
93  return true;
94  }
95 
96 protected:
98  virtual ~ParameterGroup();
99 
100  typedef std::vector<Parameter::Pointer> ParameterListType;
102 
103 private:
104  ParameterGroup(const ParameterGroup &); //purposely not implemented
105  void operator =(const ParameterGroup&); //purposely not implemented
106 
107 };
108 
109 }
110 }
111 
112 #endif
itk::SmartPointer< Self > Pointer
This class represent a parameter for the wrapper framework This class is a high level class represent...
std::vector< Parameter::Pointer > ParameterListType
itk::SmartPointer< const Self > ConstPointer