#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
// 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
// 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;
// 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);
size_t m_wbackcur;
friend class wxStreamBuffer;
+
+ DECLARE_NO_COPY_CLASS(wxInputStream)
};
// ----------------------------------------------------------------------------
virtual size_t OnSysWrite(const void *buffer, size_t bufsize);
friend class wxStreamBuffer;
+
+ DECLARE_NO_COPY_CLASS(wxOutputStream)
};
// ============================================================================
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);
virtual off_t OnSysTell() const;
size_t m_currentPos;
+
+ DECLARE_NO_COPY_CLASS(wxCountingOutputStream)
};
// ---------------------------------------------------------------------------
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; }