Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Youssefi
otb
Commits
8ad27472
Commit
8ad27472
authored
13 years ago
by
Otmane Lahlou
Browse files
Options
Downloads
Patches
Plain Diff
ENH: add methods to handle parameters parent and paramter children
parent
686b98fa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/ApplicationEngine/otbWrapperParameter.h
+66
-9
66 additions, 9 deletions
Code/ApplicationEngine/otbWrapperParameter.h
with
66 additions
and
9 deletions
Code/ApplicationEngine/otbWrapperParameter.h
+
66
−
9
View file @
8ad27472
...
...
@@ -143,6 +143,53 @@ public:
{
itkExceptionMacro
(
<<
"ClearValue() method must be re-implemented by sub-classes."
);
}
/** Set/Get the root of the current parameter (direct parent) */
virtual
void
SetRoot
(
const
Parameter
::
Pointer
root
)
{
m_Root
=
root
;
}
virtual
const
Parameter
::
Pointer
GetRoot
()
{
return
m_Root
;
}
/** Is the paramter a root or a child of another param */
virtual
bool
IsRoot
()
{
return
m_Root
.
IsNull
();
}
/** Add a child of this parameter when the param is a Group or a
* choice
*/
virtual
void
AddChild
(
Parameter
::
Pointer
child
)
{
m_ChildrenList
.
push_back
(
child
);
}
/** Get the children pointer list : not const cause we need to
* alterate the m_Active status and the m_IsCheckbox
*/
virtual
std
::
vector
<
Parameter
::
Pointer
>
GetChildrenList
()
{
return
m_ChildrenList
;
}
/** Store the state of the check box relative to this parameter (TO
* BE MOVED to QtWrapper Model )
*/
virtual
bool
IsChecked
()
{
return
m_IsChecked
;
}
/** Modify the state of the checkbox relative to this paramter */
virtual
void
SetChecked
(
const
bool
value
)
{
m_IsChecked
=
value
;
}
protected
:
/** Constructor */
...
...
@@ -153,7 +200,8 @@ protected:
m_Active
(
false
),
m_UserValue
(
false
),
m_DefaultValueMode
(
DefaultValueMode_UNKNOWN
),
m_UserLevel
(
UserLevel_Basic
)
m_UserLevel
(
UserLevel_Basic
),
m_IsChecked
(
false
)
{}
/** Destructor */
...
...
@@ -161,27 +209,36 @@ protected:
{}
/** Name of the parameter */
std
::
string
m_Name
;
std
::
string
m_Name
;
/** Description of the parameter */
std
::
string
m_Description
;
std
::
string
m_Description
;
/** Key of the parameter */
std
::
string
m_Key
;
std
::
string
m_Key
;
/** True if the parameter is mandatory */
bool
m_Mandatory
;
bool
m_Mandatory
;
/** True if activated (a mandatory parameter is always active) */
bool
m_Active
;
bool
m_Active
;
/** True if the value is set in user mode */
bool
m_UserValue
;
bool
m_UserValue
;
/** Default value behaviour */
DefaultValueMode
m_DefaultValueMode
;
DefaultValueMode
m_DefaultValueMode
;
UserLevel
m_UserLevel
;
/** List of parents Parameters */
Parameter
::
Pointer
m_Root
;
/** List of children parameters */
std
::
vector
<
Parameter
::
Pointer
>
m_ChildrenList
;
UserLevel
m_UserLevel
;
/** Store the status of the checkbox */
bool
m_IsChecked
;
private
:
Parameter
(
const
Parameter
&
);
//purposely not implemented
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment