#endif
#include <stdio.h>
-#include <wx/object.h>
-#include <wx/string.h>
+#include "wx/object.h"
+#include "wx/string.h"
+#include "wx/filefn.h" // for off_t and wxSeekMode
/*
* wxStream: base classes
*/
-
-typedef enum {
- wxFromStart, wxFromCurrent, wxFromEnd
-} wxSeekMode;
-
class wxOutputStream;
class wxInputStream: virtual public wxObject {
DECLARE_ABSTRACT_CLASS(wxInputStream)
virtual bool Eof() const = 0;
virtual size_t LastRead() const = 0;
+
+ wxInputStream& operator>>(wxOutputStream& out) { return Read(out); }
};
class wxOutputStream: virtual public wxObject {
virtual void Sync() {}
};
-class wxStream: virtual public wxInputStream, virtual public wxOutputStream {
- public:
- wxStream() {}
- virtual ~wxStream() { }
-};
-
/*
* "Filter" streams
*/
{ return m_parent_i_stream->Read(buffer, size); }
virtual off_t SeekI(off_t pos, wxSeekMode mode = wxFromStart)
{ return m_parent_i_stream->SeekI(pos, mode); }
+ virtual off_t TellI() const
+ { return m_parent_i_stream->TellI(); }
virtual bool Eof() const { return m_parent_i_stream->Eof(); }
virtual size_t LastRead() const { return m_parent_i_stream->LastRead(); }
{ return m_parent_o_stream->Write(buffer, size); }
virtual off_t SeekO(off_t pos, wxSeekMode mode = wxFromStart)
{ return m_parent_o_stream->SeekO(pos, mode); }
+ virtual off_t TellO() const
+ { return m_parent_o_stream->TellO(); }
virtual bool Bad() const { return m_parent_o_stream->Bad(); }
virtual size_t LastWrite() const { return m_parent_o_stream->LastWrite(); }