Orfeo Toolbox  4.2
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 
33 class ITK_ABI_EXPORT ParameterGroup
34  : public Parameter
35 {
36 public:
41 
42  itkNewMacro(Self);
43 
44  itkTypeMacro(ParameterList, Parameter);
45 
46  void AddParameter(Parameter::Pointer p);
47 
49  void AddChoice(std::string paramKey, std::string paramName);
50 
52  void ClearChoices(std::string paramKey);
53 
55  std::vector<int> GetSelectedItems(std::string paramKey);
56 
60  void AddParameter(ParameterType type, std::string paramKey, std::string paramName);
61 
62  Parameter::Pointer GetParameterByIndex(unsigned int i);
63 
64  Parameter::Pointer GetParameterByKey(std::string name);
65 
67  void AddInXMLParameter();
68 
69  void AddOutXMLParameter();
70 
71  void Clear()
72  {
73  m_ParameterList.clear();
74  }
75 
79  std::string GetParameterTypeAsString(ParameterType paramType);
80 
81  /* Get the parameter type from its string version of ParameterType enum */
82  ParameterType GetParameterTypeFromString(std::string paramType);
83 
84  unsigned int GetNumberOfParameters();
85 
86  std::vector<std::string> GetParametersKeys(bool recursive = true);
87 
88  // Always has value
89  bool HasValue() const
90  {
91  return true;
92  }
93 
94 protected:
96  virtual ~ParameterGroup();
97 
98  typedef std::vector<Parameter::Pointer> ParameterListType;
100 
101 private:
102  ParameterGroup(const ParameterGroup &); //purposely not implemented
103  void operator =(const ParameterGroup&); //purposely not implemented
104 
105 };
106 
107 }
108 }
109 
110 #endif

Generated at Sat Aug 30 2014 16:36:33 for Orfeo Toolbox with doxygen 1.8.3.1