Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
KWSys
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
Martin Willers
KWSys
Commits
5c572850
Commit
5c572850
authored
19 years ago
by
Mathieu Malaterre
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Redo implementation of itkDirectory to use kwsys (avoid duplicating code).
parent
21638b1d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Directory.cxx
+8
-2
8 additions, 2 deletions
Directory.cxx
Directory.hxx.in
+8
-3
8 additions, 3 deletions
Directory.hxx.in
with
16 additions
and
5 deletions
Directory.cxx
+
8
−
2
View file @
5c572850
...
...
@@ -55,13 +55,13 @@ Directory::~Directory()
}
//----------------------------------------------------------------------------
unsigned
long
Directory
::
GetNumberOfFiles
()
unsigned
long
Directory
::
GetNumberOfFiles
()
const
{
return
static_cast
<
unsigned
long
>
(
this
->
Internal
->
Files
.
size
());
}
//----------------------------------------------------------------------------
const
char
*
Directory
::
GetFile
(
unsigned
long
dindex
)
const
char
*
Directory
::
GetFile
(
unsigned
long
dindex
)
const
{
if
(
dindex
>=
this
->
Internal
->
Files
.
size
()
)
{
...
...
@@ -70,6 +70,12 @@ const char* Directory::GetFile(unsigned long dindex)
return
this
->
Internal
->
Files
[
dindex
].
c_str
();
}
//----------------------------------------------------------------------------
const
char
*
Directory
::
GetPath
()
const
{
return
this
->
Internal
->
Path
.
c_str
();
}
}
// namespace KWSYS_NAMESPACE
// First microsoft compilers
...
...
This diff is collapsed.
Click to expand it.
Directory.hxx.in
+
8
−
3
View file @
5c572850
...
...
@@ -45,13 +45,18 @@ public:
/**
* Return the number of files in the current directory.
*/
unsigned long GetNumberOfFiles();
unsigned long GetNumberOfFiles()
const
;
/**
* Return the file at the given index, the indexing is 0 based
*/
const char* GetFile(unsigned long);
const char* GetFile(unsigned long) const;
/**
* Return the path to Open'ed directory
*/
const char* GetPath() const;
private:
// Private implementation details.
DirectoryInternals* Internal;
...
...
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