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
25845a4a
Commit
25845a4a
authored
14 years ago
by
Julien Michel
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Adding the Parameter class
parent
10f4645f
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/Core/otbWrapperParameter.h
+142
-0
142 additions, 0 deletions
Code/Core/otbWrapperParameter.h
with
142 additions
and
0 deletions
Code/Core/otbWrapperParameter.h
0 → 100644
+
142
−
0
View file @
25845a4a
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __otbWrapperParameter_h
#define __otbWrapperParameter_h
#include
"otbMacro.h"
#include
"itkLightObject.h"
namespace
otb
{
namespace
Wrapper
{
enum
DefaultValueMode
{
/**
* This parameter has no default behaviour and should be set by
* the user.
*/
UNKNOWN
,
/**
* The default value of this parameter can be estimated from
* other parameters.
*/
RELATIVE
,
/**
* Tge default value of this parameter is not depending of any
* other parameter.
*/
ABSOLUTE
};
}
/** \class Parameter
* \brief This class represent a parameter for the wrapper framework
* This class is a high level class representing a parameter for the
* wrapper framework. It should be subclassed to represent different
* kinds of parameters
*/
class
Parameter
:
public
itk
::
LightObject
{
public:
/** Standard class typedef */
typedef
Parameter
Self
;
typedef
itk
::
LightObject
Superclass
;
typedef
itk
::
SmartPointer
<
Self
>
Pointer
;
typedef
itk
::
SmartPointer
<
const
Self
>
ConstPointer
;
/** Defining ::New() static method */
itkNewMacro
(
Self
);
/** RTTI support */
itkTypeMacro
(
Paramter
,
itk
::
LightObject
);
/** Set the parameter name */
itkSetStringMacro
(
Name
);
/** Get the parameter name */
itkGetStringMacro
(
Name
);
/** Set the parameter description */
itkSetStringMacro
(
Description
);
/** Get the parameter description */
itkGetStringMacro
(
Description
);
/** Set the parameter key */
itkSetStringMacro
(
Key
);
/** Get the parameter key */
itkGetStringMacro
(
Key
);
/** Set the parameter mandatory flag */
itkSetMacro
(
Mandatory
,
bool
);
/** Get the parameter mandatory flag */
itkGetMacro
(
Mandatory
,
bool
);
/** Toogle the parameter mandatory flag */
itkBooleanMacro
(
Mandatory
);
/** Set the default value mode */
itkSetEnumMacro
(
DefaultValueMode
,
DefaultValueMode
);
/** Get the default value mode */
itkGetEnumMacro
(
DefaultValueMode
,
DefaultValueMode
);
protected:
/** Constructor */
Parameter
()
:
m_Name
(
""
),
m_Description
(
""
),
m_Key
(
""
),
m_Mandatory
(
true
),
m_DefaultValueMode
(
UNKNOWN
)
{}
/** Destructor */
~
Parameter
()
{}
private
:
Parameter
(
const
Parameter
&
);
//purposely not implemented
void
operator
=
(
const
Parameter
&
);
//purposely not implemented
/** Name of the parameter */
std
::
string
m_Name
;
/** Description of the parameter */
std
::
string
m_Description
;
/** Key of the parameter */
std
::
string
m_Key
;
/** True if the parameter is mandatory */
bool
m_Mandatory
;
/** Default value behaviour */
DefaultValueMode
m_DefaultValueMode
;
};
// End class Parameter
}
// End namespace Wrapper
}
// End namespace otb
#endif
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