X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bddd7a8d8953cf4c09e56c13e1bfcc594ba0267e..1f30c17645c56f85178ee780fa330d954e45cea9:/include/wx/stream.h diff --git a/include/wx/stream.h b/include/wx/stream.h index 2c770c2b3e..0d5cc56279 100644 --- a/include/wx/stream.h +++ b/include/wx/stream.h @@ -12,7 +12,7 @@ #ifndef _WX_WXSTREAM_H__ #define _WX_WXSTREAM_H__ -#if defined(__GNUG__) && !defined(__APPLE__) +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "stream.h" #endif @@ -81,7 +81,7 @@ public: // reset the stream state void Reset() { m_lasterror = wxSTREAM_NO_ERROR; } - // deprecated (doesn't make sense!), don't use + // this doesn't make sense for all streams, always test its return value virtual size_t GetSize() const { return 0; } #if WXWIN_COMPATIBILITY_2_2 @@ -159,7 +159,7 @@ public: // all the requested data or not virtual size_t LastRead() const { return wxStreamBase::m_lastcount; } - // returns TRUE if some data is available in the stream right now, so that + // returns true if some data is available in the stream right now, so that // calling Read() wouldn't block virtual bool CanRead() const; @@ -181,7 +181,7 @@ public: // put back the specified character in the stream // - // returns TRUE if ok, FALSE on error + // returns true if ok, false on error bool Ungetch(char c); @@ -232,6 +232,8 @@ protected: size_t m_wbackcur; friend class wxStreamBuffer; + + DECLARE_NO_COPY_CLASS(wxInputStream) }; // ---------------------------------------------------------------------------- @@ -264,6 +266,8 @@ protected: virtual size_t OnSysWrite(const void *buffer, size_t bufsize); friend class wxStreamBuffer; + + DECLARE_NO_COPY_CLASS(wxOutputStream) }; // ============================================================================ @@ -280,7 +284,7 @@ public: wxCountingOutputStream(); size_t GetSize() const; - bool Ok() const { return TRUE; } + bool Ok() const { return true; } protected: virtual size_t OnSysWrite(const void *buffer, size_t size); @@ -288,6 +292,8 @@ protected: virtual off_t OnSysTell() const; size_t m_currentPos; + + DECLARE_NO_COPY_CLASS(wxCountingOutputStream) }; // --------------------------------------------------------------------------- @@ -369,9 +375,9 @@ public: void ResetBuffer(); // NB: the buffer must always be allocated with malloc() if takeOwn is - // TRUE as it will be deallocated by free() - void SetBufferIO(void *start, void *end, bool takeOwnership = FALSE); - void SetBufferIO(void *start, size_t len, bool takeOwnership = FALSE); + // true as it will be deallocated by free() + void SetBufferIO(void *start, void *end, bool takeOwnership = false); + void SetBufferIO(void *start, size_t len, bool takeOwnership = false); void SetBufferIO(size_t bufsize); void *GetBufferStart() const { return m_buffer_start; } void *GetBufferEnd() const { return m_buffer_end; }