From: Guilhem Lavaux Date: Sun, 12 Jul 1998 15:36:53 +0000 (+0000) Subject: Added IMPLEMENT_CLASS, ... about wxStream classes (I hope I didn't make mistakes). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/3cacae09fad9fee2c9cb222455e0f9aa4fa11d37?hp=32fc4afbb253f55d4b35b7ee7a2ca9a7eea49fd9 Added IMPLEMENT_CLASS, ... about wxStream classes (I hope I didn't make mistakes). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/datstrm.h b/include/wx/datstrm.h index debcaaf0c9..d329626d12 100644 --- a/include/wx/datstrm.h +++ b/include/wx/datstrm.h @@ -18,7 +18,8 @@ #include -class wxDataStream: public wxFilterInputStream { +class wxDataInputStream: public wxFilterInputStream { + DECLARE_CLASS(wxDataInputStream) public: wxDataInputStream(wxInputStream& s); virtual ~wxDataInputStream(); @@ -32,6 +33,7 @@ public: }; class wxDataOutputStream: public wxFilterOutputStream { + DECLARE_CLASS(wxDataOutputStream) public: wxDataOutputStream(wxOutputStream& s); virtual ~wxDataOutputStream(); diff --git a/include/wx/mstream.h b/include/wx/mstream.h index 68c82681d9..9cc7aab26a 100644 --- a/include/wx/mstream.h +++ b/include/wx/mstream.h @@ -14,6 +14,7 @@ #include class wxMemoryStreamBase: public wxStream { + DECLARE_CLASS(wxMemoryStreamBase) public: wxMemoryStreamBase(char *data, size_t length, int iolimit); virtual ~wxMemoryStreamBase(); @@ -49,6 +50,7 @@ class wxMemoryStreamBase: public wxStream { class wxMemoryInputStream: public wxMemoryStreamBase { + DECLARE_CLASS(wxMemoryInputStream) public: wxMemoryInputStream(char *data, size_t length) : wxMemoryStreamBase(data, length, 1) @@ -56,6 +58,7 @@ class wxMemoryInputStream: public wxMemoryStreamBase { }; class wxMemoryOutputStream: public wxMemoryStreamBase { + DECLARE_DYNAMIC_CLASS(wxMemoryOutputStream) public: wxMemoryOutputStream(char *data = NULL, size_t length = 0) : wxMemoryStreamBase(data, length, 2) @@ -63,6 +66,7 @@ class wxMemoryOutputStream: public wxMemoryStreamBase { }; class wxMemoryStream: public wxMemoryStreamBase { + DECLARE_DYNAMIC_CLASS(wxMemoryStream) public: wxMemoryStream(char *data = NULL, size_t length = 0) : wxMemoryStreamBase(data, length, 0) diff --git a/include/wx/stream.h b/include/wx/stream.h index 8f6643cde8..a0800e1368 100644 --- a/include/wx/stream.h +++ b/include/wx/stream.h @@ -30,7 +30,7 @@ typedef enum { class wxOutputStream; class wxInputStream: public wxObject { - DECLARE_ABSTRACT_CLASS(wxInputStream); + DECLARE_ABSTRACT_CLASS(wxInputStream) public: wxInputStream(); virtual ~wxInputStream(); @@ -46,7 +46,7 @@ class wxInputStream: public wxObject { }; class wxOutputStream: public wxObject { - DECLARE_ABSTRACT_CLASS(wxOutputStream); + DECLARE_ABSTRACT_CLASS(wxOutputStream) public: wxOutputStream(); virtual ~wxOutputStream(); diff --git a/src/common/datstrm.cpp b/src/common/datstrm.cpp index 489c0cea97..f4ccc714a4 100644 --- a/src/common/datstrm.cpp +++ b/src/common/datstrm.cpp @@ -26,6 +26,11 @@ #include "wx/datstrm.h" +#if !USE_SHARED_LIBRARY +IMPLEMENT_CLASS(wxDataInputStream, wxFilterInputStream) +IMPLEMENT_CLASS(wxDataOutputStream, wxFilterOutputStream) +#endif + wxDataInputStream::wxDataInputStream(wxInputStream& s) : wxFilterInputStream(s) { diff --git a/src/common/mstream.cpp b/src/common/mstream.cpp index 3a1264e3fb..7bed3cbf11 100644 --- a/src/common/mstream.cpp +++ b/src/common/mstream.cpp @@ -17,6 +17,13 @@ #include #include +#if !USE_SHARED_LIBRARY +IMPLEMENT_CLASS(wxMemoryStreamBase, wxStream) +IMPLEMENT_CLASS(wxMemoryInputStream, wxMemoryStreamBase) +IMPLEMENT_DYNAMIC_CLASS(wxMemoryOutputStream, wxMemoryStreamBase) +IMPLEMENT_DYNAMIC_CLASS(wxMemoryStream, wxMemoryStreamBase) +#endif + wxMemoryStreamBase::wxMemoryStreamBase(char *data, size_t length, int iolimit) { m_buffer = data; diff --git a/src/gtk/data.cpp b/src/gtk/data.cpp index 42facd4ae8..416bdd9474 100644 --- a/src/gtk/data.cpp +++ b/src/gtk/data.cpp @@ -345,6 +345,28 @@ IMPLEMENT_DYNAMIC_CLASS(wxPathList, wxList) #include "wx/process.h" IMPLEMENT_DYNAMIC_CLASS(wxProcess, wxEvtHandler) +#include "wx/stream.h" +#include "wx/fstream.h" +#include "wx/mstream.h" +#include "wx/datstrm.h" +IMPLEMENT_ABSTRACT_CLASS(wxInputStream, wxObject) +IMPLEMENT_ABSTRACT_CLASS(wxOutputStream, wxObject) +IMPLEMENT_ABSTRACT_CLASS2(wxStream, wxInputStream, wxOutputStream) +IMPLEMENT_CLASS(wxFilterInputStream, wxInputStream) +IMPLEMENT_CLASS(wxFilterOutputStream, wxOutputStream) + +IMPLEMENT_CLASS(wxFileStreamBase, wxStream) +IMPLEMENT_CLASS(wxFileInputStream, wxFileStreamBase) +IMPLEMENT_CLASS(wxFileOutputStream, wxFileStreamBase) + +IMPLEMENT_CLASS(wxMemoryStreamBase, wxStream) +IMPLEMENT_CLASS(wxMemoryInputStream, wxMemoryStreamBase) +IMPLEMENT_DYNAMIC_CLASS(wxMemoryOutputStream, wxMemoryStreamBase) +IMPLEMENT_DYNAMIC_CLASS(wxMemoryStream, wxMemoryStreamBase) + +IMPLEMENT_CLASS(wxDataInputStream, wxFilterInputStream) +IMPLEMENT_CLASS(wxDataOutputStream, wxFilterInputStream) + #if USE_TIMEDATE #include "wx/date.h" IMPLEMENT_DYNAMIC_CLASS(wxDate, wxObject) diff --git a/src/gtk1/data.cpp b/src/gtk1/data.cpp index 42facd4ae8..416bdd9474 100644 --- a/src/gtk1/data.cpp +++ b/src/gtk1/data.cpp @@ -345,6 +345,28 @@ IMPLEMENT_DYNAMIC_CLASS(wxPathList, wxList) #include "wx/process.h" IMPLEMENT_DYNAMIC_CLASS(wxProcess, wxEvtHandler) +#include "wx/stream.h" +#include "wx/fstream.h" +#include "wx/mstream.h" +#include "wx/datstrm.h" +IMPLEMENT_ABSTRACT_CLASS(wxInputStream, wxObject) +IMPLEMENT_ABSTRACT_CLASS(wxOutputStream, wxObject) +IMPLEMENT_ABSTRACT_CLASS2(wxStream, wxInputStream, wxOutputStream) +IMPLEMENT_CLASS(wxFilterInputStream, wxInputStream) +IMPLEMENT_CLASS(wxFilterOutputStream, wxOutputStream) + +IMPLEMENT_CLASS(wxFileStreamBase, wxStream) +IMPLEMENT_CLASS(wxFileInputStream, wxFileStreamBase) +IMPLEMENT_CLASS(wxFileOutputStream, wxFileStreamBase) + +IMPLEMENT_CLASS(wxMemoryStreamBase, wxStream) +IMPLEMENT_CLASS(wxMemoryInputStream, wxMemoryStreamBase) +IMPLEMENT_DYNAMIC_CLASS(wxMemoryOutputStream, wxMemoryStreamBase) +IMPLEMENT_DYNAMIC_CLASS(wxMemoryStream, wxMemoryStreamBase) + +IMPLEMENT_CLASS(wxDataInputStream, wxFilterInputStream) +IMPLEMENT_CLASS(wxDataOutputStream, wxFilterInputStream) + #if USE_TIMEDATE #include "wx/date.h" IMPLEMENT_DYNAMIC_CLASS(wxDate, wxObject) diff --git a/src/msw/data.cpp b/src/msw/data.cpp index a692201c45..7354a35f1a 100644 --- a/src/msw/data.cpp +++ b/src/msw/data.cpp @@ -359,6 +359,28 @@ IMPLEMENT_DYNAMIC_CLASS(wxPathList, wxList) #include "wx/process.h" IMPLEMENT_DYNAMIC_CLASS(wxProcess, wxEvtHandler) +#include "wx/stream.h" +#include "wx/fstream.h" +#include "wx/mstream.h" +#include "wx/datstrm.h" +IMPLEMENT_ABSTRACT_CLASS(wxInputStream, wxObject) +IMPLEMENT_ABSTRACT_CLASS(wxOutputStream, wxObject) +IMPLEMENT_ABSTRACT_CLASS2(wxStream, wxInputStream, wxOutputStream) +IMPLEMENT_CLASS(wxFilterInputStream, wxInputStream) +IMPLEMENT_CLASS(wxFilterOutputStream, wxOutputStream) + +IMPLEMENT_CLASS(wxFileStreamBase, wxStream) +IMPLEMENT_CLASS(wxFileInputStream, wxFileStreamBase) +IMPLEMENT_CLASS(wxFileOutputStream, wxFileStreamBase) + +IMPLEMENT_CLASS(wxMemoryStreamBase, wxStream) +IMPLEMENT_CLASS(wxMemoryInputStream, wxMemoryStreamBase) +IMPLEMENT_DYNAMIC_CLASS(wxMemoryOutputStream, wxMemoryStreamBase) +IMPLEMENT_DYNAMIC_CLASS(wxMemoryStream, wxMemoryStreamBase) + +IMPLEMENT_CLASS(wxDataInputStream, wxFilterInputStream) +IMPLEMENT_CLASS(wxDataOutputStream, wxFilterInputStream) + #if USE_TIMEDATE #include "wx/date.h" IMPLEMENT_DYNAMIC_CLASS(wxDate, wxObject)