]> git.saurik.com Git - wxWidgets.git/commitdiff
added wxRTTI macros to stream classes (patch 1687073)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 14 Apr 2007 23:35:13 +0000 (23:35 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 14 Apr 2007 23:35:13 +0000 (23:35 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
include/wx/mstream.h
include/wx/stream.h
src/common/mstream.cpp
src/common/stream.cpp

index 398331b27dfd95cf33fbc3ac76d62d2ab85846c5..167463a8ee315753adeb365c48f7e0c135b1c1e3 100644 (file)
@@ -80,6 +80,7 @@ All:
 - Added wxMemoryInputStream(wxInputStream&) ctor (Stas Sergeev)
 - Implemented wxMemoryInputStream::CanRead()
 - Added wxEXEC_BLOCK flag (Hank Schultz)
+- Add support for wxStream-derived classes to wxRTTI (Stas Sergeev)
 
 All (GUI):
 
index 9ed77087f99d0231a177b77324f86609e92fe449..d3a1e0ab9bc4aafd528b8a7392c6f9b3ea586ab3 100644 (file)
@@ -63,6 +63,7 @@ private:
     size_t m_length;
 
     // copy ctor is implemented above: it copies the other stream in this one
+    DECLARE_ABSTRACT_CLASS(wxMemoryInputStream)
     DECLARE_NO_ASSIGN_CLASS(wxMemoryInputStream)
 };
 
@@ -92,6 +93,7 @@ protected:
     wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode);
     wxFileOffset OnSysTell() const;
 
+    DECLARE_DYNAMIC_CLASS(wxMemoryOutputStream)
     DECLARE_NO_COPY_CLASS(wxMemoryOutputStream)
 };
 
index 24522440603e95ef2438a0b721d49cb1ff6cd7c0..f0c1ce170cc51138b5f080978f6e07fd2a5914bc 100644 (file)
@@ -52,7 +52,7 @@ const int wxEOF = -1;
 // wxStreamBase: common (but non virtual!) base for all stream classes
 // ---------------------------------------------------------------------------
 
-class WXDLLIMPEXP_BASE wxStreamBase
+class WXDLLIMPEXP_BASE wxStreamBase : public wxObject
 {
 public:
     wxStreamBase();
@@ -82,6 +82,7 @@ protected:
 
     friend class wxStreamBuffer;
 
+    DECLARE_ABSTRACT_CLASS(wxStreamBase)
     DECLARE_NO_COPY_CLASS(wxStreamBase)
 };
 
@@ -216,6 +217,7 @@ protected:
 
     friend class wxStreamBuffer;
 
+    DECLARE_ABSTRACT_CLASS(wxInputStream)
     DECLARE_NO_COPY_CLASS(wxInputStream)
 };
 
@@ -251,6 +253,7 @@ protected:
 
     friend class wxStreamBuffer;
 
+    DECLARE_ABSTRACT_CLASS(wxOutputStream)
     DECLARE_NO_COPY_CLASS(wxOutputStream)
 };
 
@@ -278,6 +281,7 @@ protected:
 
     size_t m_currentPos;
 
+    DECLARE_DYNAMIC_CLASS(wxCountingOutputStream)
     DECLARE_NO_COPY_CLASS(wxCountingOutputStream)
 };
 
@@ -303,6 +307,7 @@ protected:
     wxInputStream *m_parent_i_stream;
     bool m_owns;
 
+    DECLARE_ABSTRACT_CLASS(wxFilterInputStream)
     DECLARE_NO_COPY_CLASS(wxFilterInputStream)
 };
 
@@ -324,6 +329,7 @@ protected:
     wxOutputStream *m_parent_o_stream;
     bool m_owns;
 
+    DECLARE_ABSTRACT_CLASS(wxFilterOutputStream)
     DECLARE_NO_COPY_CLASS(wxFilterOutputStream)
 };
 
index cd8ec4ecb85c1ce66fda157619e6e0f4e999c11f..24252d273c5e9871cf22cb19bb6d090c5d2663f2 100644 (file)
@@ -42,6 +42,8 @@
 // wxMemoryInputStream
 // ----------------------------------------------------------------------------
 
+IMPLEMENT_ABSTRACT_CLASS(wxMemoryInputStream, wxInputStream)
+
 wxMemoryInputStream::wxMemoryInputStream(const void *data, size_t len)
 {
     m_i_streambuf = new wxStreamBuffer(wxStreamBuffer::read);
@@ -151,6 +153,8 @@ wxFileOffset wxMemoryInputStream::OnSysTell() const
 // wxMemoryOutputStream
 // ----------------------------------------------------------------------------
 
+IMPLEMENT_DYNAMIC_CLASS(wxMemoryOutputStream, wxOutputStream)
+
 wxMemoryOutputStream::wxMemoryOutputStream(void *data, size_t len)
 {
     m_o_streambuf = new wxStreamBuffer(wxStreamBuffer::write);
index 4765ea03f60351289947ce3699e34eda8ec7fb5a..1f1c94c688b47d7365712ad0ba27788ba7e5604b 100644 (file)
@@ -657,6 +657,8 @@ wxFileOffset wxStreamBuffer::Tell() const
 // wxStreamBase
 // ----------------------------------------------------------------------------
 
+IMPLEMENT_ABSTRACT_CLASS(wxStreamBase, wxObject)
+
 wxStreamBase::wxStreamBase()
 {
     m_lasterror = wxSTREAM_NO_ERROR;
@@ -693,6 +695,8 @@ wxFileOffset wxStreamBase::OnSysTell() const
 // wxInputStream
 // ----------------------------------------------------------------------------
 
+IMPLEMENT_ABSTRACT_CLASS(wxInputStream, wxStreamBase)
+
 wxInputStream::wxInputStream()
 {
     m_wback = NULL;
@@ -938,6 +942,8 @@ wxFileOffset wxInputStream::TellI() const
 // wxOutputStream
 // ----------------------------------------------------------------------------
 
+IMPLEMENT_ABSTRACT_CLASS(wxOutputStream, wxStreamBase)
+
 wxOutputStream::wxOutputStream()
 {
 }
@@ -988,6 +994,8 @@ void wxOutputStream::Sync()
 // wxCountingOutputStream
 // ----------------------------------------------------------------------------
 
+IMPLEMENT_DYNAMIC_CLASS(wxCountingOutputStream, wxOutputStream)
+
 wxCountingOutputStream::wxCountingOutputStream ()
 {
      m_currentPos = 0;
@@ -1050,6 +1058,8 @@ wxFileOffset wxCountingOutputStream::OnSysTell() const
 // wxFilterInputStream
 // ----------------------------------------------------------------------------
 
+IMPLEMENT_ABSTRACT_CLASS(wxFilterInputStream, wxInputStream)
+
 wxFilterInputStream::wxFilterInputStream()
  :  m_parent_i_stream(NULL),
     m_owns(false)
@@ -1078,6 +1088,8 @@ wxFilterInputStream::~wxFilterInputStream()
 // wxFilterOutputStream
 // ----------------------------------------------------------------------------
 
+IMPLEMENT_ABSTRACT_CLASS(wxFilterOutputStream, wxOutputStream)
+
 wxFilterOutputStream::wxFilterOutputStream()
  :  m_parent_o_stream(NULL),
     m_owns(false)