X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..5410f5728d75f905375c2b05944b11fc92a74aa4:/include/wx/wfstream.h diff --git a/include/wx/wfstream.h b/include/wx/wfstream.h index 42b75669cd..63c90a0961 100644 --- a/include/wx/wfstream.h +++ b/include/wx/wfstream.h @@ -34,11 +34,12 @@ public: wxFileInputStream(const wxString& ifileName); wxFileInputStream(wxFile& file); wxFileInputStream(int fd); - ~wxFileInputStream(); + virtual ~wxFileInputStream(); wxFileOffset GetLength() const; - bool Ok() const { return m_file->IsOpened(); } + bool Ok() const { return IsOk(); } + virtual bool IsOk() const { return (wxStreamBase::IsOk() && m_file->IsOpened()); } bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } protected: @@ -67,7 +68,8 @@ public: bool Close() { return m_file_destroy ? m_file->Close() : true; } wxFileOffset GetLength() const; - bool Ok() const { return m_file->IsOpened(); } + bool Ok() const { return IsOk(); } + virtual bool IsOk() const { return (wxStreamBase::IsOk() && m_file->IsOpened()); } bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } protected: @@ -133,11 +135,12 @@ public: wxFFileInputStream(const wxString& fileName, const wxChar *mode = _T("rb")); wxFFileInputStream(wxFFile& file); wxFFileInputStream(FILE *file); - ~wxFFileInputStream(); + virtual ~wxFFileInputStream(); wxFileOffset GetLength() const; - bool Ok() const { return m_file->IsOpened(); } + bool Ok() const { return IsOk(); } + virtual bool IsOk() const { return (wxStreamBase::IsOk() && m_file->IsOpened()); } bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } protected: @@ -166,7 +169,8 @@ public: bool Close() { return m_file_destroy ? m_file->Close() : true; } wxFileOffset GetLength() const; - bool Ok() const { return m_file->IsOpened(); } + bool Ok() const { return IsOk(); } + virtual bool IsOk() const { return (wxStreamBase::IsOk() && m_file->IsOpened()); } bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } protected: