Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
339c3040
"git@developer.sourcefind.cn:OpenDAS/deepspeed.git" did not exist on "c76769c4ff47f82140958e1b5991fda653c49a07"
Commit
339c3040
authored
Dec 27, 2013
by
Davis King
Browse files
Made directory and file printable with operator <<
parent
24fda7cc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
0 deletions
+46
-0
dlib/dir_nav/dir_nav_kernel_1.h
dlib/dir_nav/dir_nav_kernel_1.h
+12
-0
dlib/dir_nav/dir_nav_kernel_2.h
dlib/dir_nav/dir_nav_kernel_2.h
+12
-0
dlib/dir_nav/dir_nav_kernel_abstract.h
dlib/dir_nav/dir_nav_kernel_abstract.h
+22
-0
No files found.
dlib/dir_nav/dir_nav_kernel_1.h
View file @
339c3040
...
@@ -290,6 +290,18 @@ namespace dlib
...
@@ -290,6 +290,18 @@ namespace dlib
};
};
// ----------------------------------------------------------------------------------------
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
directory
&
item
)
{
out
<<
(
std
::
string
)
item
;
return
out
;
}
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
file
&
item
)
{
out
<<
(
std
::
string
)
item
;
return
out
;
}
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
template
<
template
<
...
...
dlib/dir_nav/dir_nav_kernel_2.h
View file @
339c3040
...
@@ -282,6 +282,18 @@ namespace dlib
...
@@ -282,6 +282,18 @@ namespace dlib
};
};
// ----------------------------------------------------------------------------------------
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
directory
&
item
)
{
out
<<
(
std
::
string
)
item
;
return
out
;
}
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
file
&
item
)
{
out
<<
(
std
::
string
)
item
;
return
out
;
}
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
inline
void
swap
(
inline
void
swap
(
...
...
dlib/dir_nav/dir_nav_kernel_abstract.h
View file @
339c3040
...
@@ -457,6 +457,28 @@ namespace dlib
...
@@ -457,6 +457,28 @@ namespace dlib
};
};
// ----------------------------------------------------------------------------------------
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
directory
&
item
);
/*!
ensures
- performs: out << item.full_name()
- returns out
!*/
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
file
&
item
);
/*!
ensures
- performs: out << item.full_name()
- returns out
!*/
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
inline
void
swap
(
inline
void
swap
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment