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
8268c2fe
Commit
8268c2fe
authored
Dec 24, 2011
by
Davis King
Browse files
Added an operator != to the file and directory objects.
parent
d53a37e7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
0 deletions
+38
-0
dlib/dir_nav/dir_nav_kernel_1.h
dlib/dir_nav/dir_nav_kernel_1.h
+8
-0
dlib/dir_nav/dir_nav_kernel_2.h
dlib/dir_nav/dir_nav_kernel_2.h
+8
-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 @
8268c2fe
...
@@ -148,6 +148,10 @@ namespace dlib
...
@@ -148,6 +148,10 @@ namespace dlib
const
file
&
rhs
const
file
&
rhs
)
const
;
)
const
;
bool
operator
!=
(
const
file
&
rhs
)
const
{
return
!
(
*
this
==
rhs
);
}
inline
bool
operator
<
(
inline
bool
operator
<
(
const
file
&
item
const
file
&
item
)
const
{
return
full_name
()
<
item
.
full_name
();
}
)
const
{
return
full_name
()
<
item
.
full_name
();
}
...
@@ -311,6 +315,10 @@ namespace dlib
...
@@ -311,6 +315,10 @@ namespace dlib
const
directory
&
rhs
const
directory
&
rhs
)
const
;
)
const
;
bool
operator
!=
(
const
directory
&
rhs
)
const
{
return
!
(
*
this
==
rhs
);
}
inline
bool
operator
<
(
inline
bool
operator
<
(
const
directory
&
item
const
directory
&
item
)
const
{
return
full_name
()
<
item
.
full_name
();
}
)
const
{
return
full_name
()
<
item
.
full_name
();
}
...
...
dlib/dir_nav/dir_nav_kernel_2.h
View file @
8268c2fe
...
@@ -153,6 +153,10 @@ namespace dlib
...
@@ -153,6 +153,10 @@ namespace dlib
const
file
&
rhs
const
file
&
rhs
)
const
;
)
const
;
bool
operator
!=
(
const
file
&
rhs
)
const
{
return
!
(
*
this
==
rhs
);
}
inline
bool
operator
<
(
inline
bool
operator
<
(
const
file
&
item
const
file
&
item
)
const
{
return
full_name
()
<
item
.
full_name
();
}
)
const
{
return
full_name
()
<
item
.
full_name
();
}
...
@@ -304,6 +308,10 @@ namespace dlib
...
@@ -304,6 +308,10 @@ namespace dlib
const
directory
&
rhs
const
directory
&
rhs
)
const
;
)
const
;
bool
operator
!=
(
const
directory
&
rhs
)
const
{
return
!
(
*
this
==
rhs
);
}
inline
bool
operator
<
(
inline
bool
operator
<
(
const
directory
&
item
const
directory
&
item
)
const
{
return
full_name
()
<
item
.
full_name
();
}
)
const
{
return
full_name
()
<
item
.
full_name
();
}
...
...
dlib/dir_nav/dir_nav_kernel_abstract.h
View file @
8268c2fe
...
@@ -162,6 +162,17 @@ namespace dlib
...
@@ -162,6 +162,17 @@ namespace dlib
- returns false
- returns false
!*/
!*/
bool
operator
!=
(
const
file
&
rhs
)
const
;
/*!
ensures
- if (*this and rhs represent the same file) then
- returns false
- else
- returns true
!*/
bool
operator
<
(
bool
operator
<
(
const
file
&
item
const
file
&
item
)
const
;
)
const
;
...
@@ -392,6 +403,17 @@ namespace dlib
...
@@ -392,6 +403,17 @@ namespace dlib
- returns false
- returns false
!*/
!*/
bool
operator
!=
(
const
directory
&
rhs
)
const
;
/*!
ensures
- if (*this and rhs represent the same directory) then
- returns false
- else
- returns true
!*/
bool
operator
<
(
bool
operator
<
(
const
directory
&
item
const
directory
&
item
)
const
;
)
const
;
...
...
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