mirror of https://github.com/davisking/dlib.git
Made dlib::file implicitly convertible to std::string.
This commit is contained in:
parent
454c2ea121
commit
520b7c30db
|
@ -101,6 +101,9 @@ namespace dlib
|
||||||
inline const std::string& full_name (
|
inline const std::string& full_name (
|
||||||
) const { return state.full_name; }
|
) const { return state.full_name; }
|
||||||
|
|
||||||
|
operator std::string (
|
||||||
|
) const { return full_name(); }
|
||||||
|
|
||||||
inline uint64 size (
|
inline uint64 size (
|
||||||
) const { return state.file_size; }
|
) const { return state.file_size; }
|
||||||
|
|
||||||
|
|
|
@ -109,6 +109,9 @@ namespace dlib
|
||||||
inline uint64 size (
|
inline uint64 size (
|
||||||
) const { return state.file_size; }
|
) const { return state.file_size; }
|
||||||
|
|
||||||
|
operator std::string (
|
||||||
|
) const { return full_name(); }
|
||||||
|
|
||||||
bool operator == (
|
bool operator == (
|
||||||
const file& rhs
|
const file& rhs
|
||||||
) const;
|
) const;
|
||||||
|
|
|
@ -139,6 +139,14 @@ namespace dlib
|
||||||
- returns the size of this file in bytes.
|
- returns the size of this file in bytes.
|
||||||
!*/
|
!*/
|
||||||
|
|
||||||
|
operator std::string (
|
||||||
|
) const;
|
||||||
|
/*!
|
||||||
|
ensures
|
||||||
|
- returns full_name()
|
||||||
|
(i.e. provides an implicit conversion to string from dlib::file)
|
||||||
|
!*/
|
||||||
|
|
||||||
file& operator= (
|
file& operator= (
|
||||||
const file& rhs
|
const file& rhs
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue