Orfeo Toolbox
3.16
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
OTB
Code
ApplicationEngine
otbWrapperChoiceParameter.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 __otbWrapperChoiceParameter_h
19
#define __otbWrapperChoiceParameter_h
20
21
#include "
otbWrapperParameter.h
"
22
#include "
otbWrapperParameterGroup.h
"
23
24
namespace
otb
25
{
26
namespace
Wrapper
27
{
28
35
class
ChoiceParameter
36
:
public
Parameter
37
{
38
public
:
40
typedef
ChoiceParameter
Self
;
41
typedef
Parameter
Superclass
;
42
typedef
itk::SmartPointer<Self>
Pointer
;
43
typedef
itk::SmartPointer<const Self>
ConstPointer
;
44
46
itkNewMacro(
Self
);
47
49
itkTypeMacro(
ChoiceParameter
,
Parameter
);
50
52
void
AddChoice
( std::string choicekey, std::string choiceName );
53
55
std::string
GetChoiceKey
(
int
i );
56
58
std::vector<std::string>
GetChoiceKeys
();
59
61
std::string
GetChoiceName
(
int
i );
62
64
std::vector<std::string>
GetChoiceNames
();
65
67
ParameterGroup::Pointer
GetChoiceParameterGroupByIndex
(
int
i );
68
70
ParameterGroup::Pointer
GetChoiceParameterGroupByKey
( std::string choiceKey );
71
73
std::vector<std::string>
GetParametersKeys
();
74
76
unsigned
int
GetNbChoices
(
void
);
77
79
virtual
void
SetValue
(
unsigned
int
v);
80
82
virtual
void
SetValue
(std::string choiceKey);
83
85
virtual
unsigned
int
GetValue
();
86
87
bool
HasValue
()
const
88
{
89
// a choice parameter always has a value
90
return
true
;
91
}
92
93
void
ClearValue
()
94
{
95
// nothing to do : a choice parameter always has a value
96
}
97
98
protected
:
100
ChoiceParameter
();
101
103
virtual
~ChoiceParameter
();
104
105
struct
Choice
106
{
107
Choice
() {}
108
109
std::string
m_Key
;
110
std::string
m_Name
;
111
ParameterGroup::Pointer
m_AssociatedParameter
;
112
};
113
114
typedef
std::vector<Choice>
ChoiceList
;
115
ChoiceList
m_ChoiceList
;
116
117
unsigned
int
m_CurrentChoice
;
118
119
private
:
120
ChoiceParameter
(
const
ChoiceParameter
&);
//purposely not implemented
121
void
operator =
(
const
ChoiceParameter
&);
//purposely not implemented
122
123
};
// End class Parameter
124
125
}
// End namespace Wrapper
126
}
// End namespace otb
127
128
#endif
Generated at Sun Feb 3 2013 00:59:07 for
Orfeo Toolbox
with
doxygen 1.8.1.1