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
5618a4bc
Commit
5618a4bc
authored
13 years ago
by
Otmane Lahlou
Browse files
Options
Downloads
Patches
Plain Diff
ENH: use the StringParameter as a member of the class, and not as an inherited class
parent
8b5d85bd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/ApplicationEngine/otbWrapperDirectoryParameter.h
+37
-5
37 additions, 5 deletions
Code/ApplicationEngine/otbWrapperDirectoryParameter.h
with
37 additions
and
5 deletions
Code/ApplicationEngine/otbWrapperDirectoryParameter.h
+
37
−
5
View file @
5618a4bc
...
...
@@ -18,8 +18,10 @@
#ifndef __otbWrapperDirectoryParameter_h
#define __otbWrapperDirectoryParameter_h
#include
<string>
#include
"otbWrapperStringParameter.h"
#include
"otbMacro.h"
#include
<string>
namespace
otb
{
...
...
@@ -30,12 +32,12 @@ namespace Wrapper
* \brief This class represent a string parameter for the wrapper framework
*/
class
DirectoryParameter
:
public
String
Parameter
:
public
Parameter
{
public:
/** Standard class typedef */
typedef
DirectoryParameter
Self
;
typedef
String
Parameter
Superclass
;
typedef
Parameter
Superclass
;
typedef
itk
::
SmartPointer
<
Self
>
Pointer
;
typedef
itk
::
SmartPointer
<
const
Self
>
ConstPointer
;
...
...
@@ -45,10 +47,37 @@ public:
/** RTTI support */
itkTypeMacro
(
DirectoryParameter
,
Parameter
);
bool
HasValue
()
const
{
return
m_StringParam
->
HasValue
();
}
// Set/Get Value
otbSetObjectMemberMacro
(
StringParam
,
Value
,
std
::
string
);
otbGetObjectMemberMacro
(
StringParam
,
Value
,
std
::
string
);
// Clear Value
void
ClearValue
()
{
m_StringParam
->
ClearValue
();
}
// Reimplement the SetActive method
void
SetActive
(
const
bool
value
)
{
Superclass
::
SetActive
(
value
);
m_StringParam
->
SetActive
(
value
);
}
// GetActive method
otbGetObjectMemberConstMacro
(
StringParam
,
Active
,
bool
);
protected
:
/** Constructor */
DirectoryParameter
()
{}
{
m_StringParam
=
StringParameter
::
New
();
}
/** Destructor */
virtual
~
DirectoryParameter
()
...
...
@@ -56,7 +85,10 @@ protected:
private
:
DirectoryParameter
(
const
DirectoryParameter
&
);
//purposely not implemented
void
operator
=
(
const
DirectoryParameter
&
);
//purposely not implemented
void
operator
=
(
const
DirectoryParameter
&
);
//purposely not
//implemented
StringParameter
::
Pointer
m_StringParam
;
};
// End class Parameter
...
...
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