Add GetFile() accessor to wxFileStream classes.
Allow to retrieve the underlying file used by the stream. Closes #15093. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -566,6 +566,7 @@ All:
|
|||||||
- Add wxFile::ReadAll() for consistency with wxFFile.
|
- Add wxFile::ReadAll() for consistency with wxFFile.
|
||||||
- Add wxDateTime::DiffAsDateSpan() and wxDateSpan::GetTotalMonths() (jonasr).
|
- Add wxDateTime::DiffAsDateSpan() and wxDateSpan::GetTotalMonths() (jonasr).
|
||||||
- Add wxVector::assign() (Jonas Rydberg).
|
- Add wxVector::assign() (Jonas Rydberg).
|
||||||
|
- Add wx[F]File{Input,Output}Stream::GetFile() (troelsk).
|
||||||
- Added Nepali translation (Him Prasad Gautam).
|
- Added Nepali translation (Him Prasad Gautam).
|
||||||
|
|
||||||
All (GUI):
|
All (GUI):
|
||||||
|
@@ -42,6 +42,8 @@ public:
|
|||||||
virtual bool IsOk() const;
|
virtual bool IsOk() const;
|
||||||
bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; }
|
bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; }
|
||||||
|
|
||||||
|
wxFile* GetFile() const { return m_file; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxFileInputStream();
|
wxFileInputStream();
|
||||||
|
|
||||||
@@ -72,6 +74,8 @@ public:
|
|||||||
virtual bool IsOk() const;
|
virtual bool IsOk() const;
|
||||||
bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; }
|
bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; }
|
||||||
|
|
||||||
|
wxFile* GetFile() const { return m_file; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxFileOutputStream();
|
wxFileOutputStream();
|
||||||
|
|
||||||
@@ -169,6 +173,8 @@ public:
|
|||||||
virtual bool IsOk() const;
|
virtual bool IsOk() const;
|
||||||
bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; }
|
bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; }
|
||||||
|
|
||||||
|
wxFFile* GetFile() const { return m_file; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxFFileInputStream();
|
wxFFileInputStream();
|
||||||
|
|
||||||
@@ -199,6 +205,8 @@ public:
|
|||||||
virtual bool IsOk() const;
|
virtual bool IsOk() const;
|
||||||
bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; }
|
bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; }
|
||||||
|
|
||||||
|
wxFFile* GetFile() const { return m_file; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxFFileOutputStream();
|
wxFFileOutputStream();
|
||||||
|
|
||||||
|
@@ -98,6 +98,12 @@ public:
|
|||||||
Returns @true if the stream is initialized and ready.
|
Returns @true if the stream is initialized and ready.
|
||||||
*/
|
*/
|
||||||
bool IsOk() const;
|
bool IsOk() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Returns the underlying file object.
|
||||||
|
@since 2.9.5
|
||||||
|
*/
|
||||||
|
wxFFile* GetFile() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -147,6 +153,12 @@ public:
|
|||||||
Returns @true if the stream is initialized and ready.
|
Returns @true if the stream is initialized and ready.
|
||||||
*/
|
*/
|
||||||
bool IsOk() const;
|
bool IsOk() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Returns the underlying file object.
|
||||||
|
@since 2.9.5
|
||||||
|
*/
|
||||||
|
wxFile* GetFile() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -196,6 +208,12 @@ public:
|
|||||||
Returns @true if the stream is initialized and ready.
|
Returns @true if the stream is initialized and ready.
|
||||||
*/
|
*/
|
||||||
bool IsOk() const;
|
bool IsOk() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Returns the underlying file object.
|
||||||
|
@since 2.9.5
|
||||||
|
*/
|
||||||
|
wxFile* GetFile() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -246,6 +264,12 @@ public:
|
|||||||
Returns @true if the stream is initialized and ready.
|
Returns @true if the stream is initialized and ready.
|
||||||
*/
|
*/
|
||||||
bool IsOk() const;
|
bool IsOk() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Returns the underlying file object.
|
||||||
|
@since 2.9.5
|
||||||
|
*/
|
||||||
|
wxFFile* GetFile() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user