Overrride in file streams to test foe base class and
for correctly opened files.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42114
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
\membersection{wxStreamBase::IsOk}\label{wxstreambaseisok}
\membersection{wxStreamBase::IsOk}\label{wxstreambaseisok}
-\constfunc{bool}{IsOk}{\void}
+\constfunc{virtual bool}{IsOk}{\void}
Returns true if no error occurred on the stream.
Returns true if no error occurred on the stream.
// error testing
wxStreamError GetLastError() const { return m_lasterror; }
// error testing
wxStreamError GetLastError() const { return m_lasterror; }
- bool IsOk() const { return GetLastError() == wxSTREAM_NO_ERROR; }
+ virtual bool IsOk() const { return GetLastError() == wxSTREAM_NO_ERROR; }
bool operator!() const { return !IsOk(); }
// reset the stream state
bool operator!() const { return !IsOk(); }
// reset the stream state
wxFileOffset GetLength() const;
bool Ok() const { return IsOk(); }
wxFileOffset GetLength() const;
bool Ok() const { return IsOk(); }
- bool IsOk() const { return m_file->IsOpened(); }
+ virtual bool IsOk() const { return (wxStreamBase::IsOk() && m_file->IsOpened()); }
bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; }
protected:
bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; }
protected:
wxFileOffset GetLength() const;
bool Ok() const { return IsOk(); }
wxFileOffset GetLength() const;
bool Ok() const { return IsOk(); }
- bool IsOk() const { return m_file->IsOpened(); }
+ virtual bool IsOk() const { return (wxStreamBase::IsOk() && m_file->IsOpened()); }
bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; }
protected:
bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; }
protected:
wxFileOffset GetLength() const;
bool Ok() const { return IsOk(); }
wxFileOffset GetLength() const;
bool Ok() const { return IsOk(); }
- bool IsOk() const { return m_file->IsOpened(); }
+ virtual bool IsOk() const { return (wxStreamBase::IsOk() && m_file->IsOpened()); }
bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; }
protected:
bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; }
protected:
wxFileOffset GetLength() const;
bool Ok() const { return IsOk(); }
wxFileOffset GetLength() const;
bool Ok() const { return IsOk(); }
- bool IsOk() const { return m_file->IsOpened(); }
+ virtual bool IsOk() const { return (wxStreamBase::IsOk() && m_file->IsOpened()); }
bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; }
protected:
bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; }
protected: