added wxRTTI macros to stream classes (patch 1687073)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-04-14 23:35:13 +00:00
parent 67cff9dc2f
commit 6285e36ba0
5 changed files with 26 additions and 1 deletions

View File

@@ -80,6 +80,7 @@ All:
- Added wxMemoryInputStream(wxInputStream&) ctor (Stas Sergeev) - Added wxMemoryInputStream(wxInputStream&) ctor (Stas Sergeev)
- Implemented wxMemoryInputStream::CanRead() - Implemented wxMemoryInputStream::CanRead()
- Added wxEXEC_BLOCK flag (Hank Schultz) - Added wxEXEC_BLOCK flag (Hank Schultz)
- Add support for wxStream-derived classes to wxRTTI (Stas Sergeev)
All (GUI): All (GUI):

View File

@@ -63,6 +63,7 @@ private:
size_t m_length; size_t m_length;
// copy ctor is implemented above: it copies the other stream in this one // copy ctor is implemented above: it copies the other stream in this one
DECLARE_ABSTRACT_CLASS(wxMemoryInputStream)
DECLARE_NO_ASSIGN_CLASS(wxMemoryInputStream) DECLARE_NO_ASSIGN_CLASS(wxMemoryInputStream)
}; };
@@ -92,6 +93,7 @@ protected:
wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode);
wxFileOffset OnSysTell() const; wxFileOffset OnSysTell() const;
DECLARE_DYNAMIC_CLASS(wxMemoryOutputStream)
DECLARE_NO_COPY_CLASS(wxMemoryOutputStream) DECLARE_NO_COPY_CLASS(wxMemoryOutputStream)
}; };

View File

@@ -52,7 +52,7 @@ const int wxEOF = -1;
// wxStreamBase: common (but non virtual!) base for all stream classes // wxStreamBase: common (but non virtual!) base for all stream classes
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
class WXDLLIMPEXP_BASE wxStreamBase class WXDLLIMPEXP_BASE wxStreamBase : public wxObject
{ {
public: public:
wxStreamBase(); wxStreamBase();
@@ -82,6 +82,7 @@ protected:
friend class wxStreamBuffer; friend class wxStreamBuffer;
DECLARE_ABSTRACT_CLASS(wxStreamBase)
DECLARE_NO_COPY_CLASS(wxStreamBase) DECLARE_NO_COPY_CLASS(wxStreamBase)
}; };
@@ -216,6 +217,7 @@ protected:
friend class wxStreamBuffer; friend class wxStreamBuffer;
DECLARE_ABSTRACT_CLASS(wxInputStream)
DECLARE_NO_COPY_CLASS(wxInputStream) DECLARE_NO_COPY_CLASS(wxInputStream)
}; };
@@ -251,6 +253,7 @@ protected:
friend class wxStreamBuffer; friend class wxStreamBuffer;
DECLARE_ABSTRACT_CLASS(wxOutputStream)
DECLARE_NO_COPY_CLASS(wxOutputStream) DECLARE_NO_COPY_CLASS(wxOutputStream)
}; };
@@ -278,6 +281,7 @@ protected:
size_t m_currentPos; size_t m_currentPos;
DECLARE_DYNAMIC_CLASS(wxCountingOutputStream)
DECLARE_NO_COPY_CLASS(wxCountingOutputStream) DECLARE_NO_COPY_CLASS(wxCountingOutputStream)
}; };
@@ -303,6 +307,7 @@ protected:
wxInputStream *m_parent_i_stream; wxInputStream *m_parent_i_stream;
bool m_owns; bool m_owns;
DECLARE_ABSTRACT_CLASS(wxFilterInputStream)
DECLARE_NO_COPY_CLASS(wxFilterInputStream) DECLARE_NO_COPY_CLASS(wxFilterInputStream)
}; };
@@ -324,6 +329,7 @@ protected:
wxOutputStream *m_parent_o_stream; wxOutputStream *m_parent_o_stream;
bool m_owns; bool m_owns;
DECLARE_ABSTRACT_CLASS(wxFilterOutputStream)
DECLARE_NO_COPY_CLASS(wxFilterOutputStream) DECLARE_NO_COPY_CLASS(wxFilterOutputStream)
}; };

View File

@@ -42,6 +42,8 @@
// wxMemoryInputStream // wxMemoryInputStream
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
IMPLEMENT_ABSTRACT_CLASS(wxMemoryInputStream, wxInputStream)
wxMemoryInputStream::wxMemoryInputStream(const void *data, size_t len) wxMemoryInputStream::wxMemoryInputStream(const void *data, size_t len)
{ {
m_i_streambuf = new wxStreamBuffer(wxStreamBuffer::read); m_i_streambuf = new wxStreamBuffer(wxStreamBuffer::read);
@@ -151,6 +153,8 @@ wxFileOffset wxMemoryInputStream::OnSysTell() const
// wxMemoryOutputStream // wxMemoryOutputStream
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxMemoryOutputStream, wxOutputStream)
wxMemoryOutputStream::wxMemoryOutputStream(void *data, size_t len) wxMemoryOutputStream::wxMemoryOutputStream(void *data, size_t len)
{ {
m_o_streambuf = new wxStreamBuffer(wxStreamBuffer::write); m_o_streambuf = new wxStreamBuffer(wxStreamBuffer::write);

View File

@@ -657,6 +657,8 @@ wxFileOffset wxStreamBuffer::Tell() const
// wxStreamBase // wxStreamBase
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
IMPLEMENT_ABSTRACT_CLASS(wxStreamBase, wxObject)
wxStreamBase::wxStreamBase() wxStreamBase::wxStreamBase()
{ {
m_lasterror = wxSTREAM_NO_ERROR; m_lasterror = wxSTREAM_NO_ERROR;
@@ -693,6 +695,8 @@ wxFileOffset wxStreamBase::OnSysTell() const
// wxInputStream // wxInputStream
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
IMPLEMENT_ABSTRACT_CLASS(wxInputStream, wxStreamBase)
wxInputStream::wxInputStream() wxInputStream::wxInputStream()
{ {
m_wback = NULL; m_wback = NULL;
@@ -938,6 +942,8 @@ wxFileOffset wxInputStream::TellI() const
// wxOutputStream // wxOutputStream
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
IMPLEMENT_ABSTRACT_CLASS(wxOutputStream, wxStreamBase)
wxOutputStream::wxOutputStream() wxOutputStream::wxOutputStream()
{ {
} }
@@ -988,6 +994,8 @@ void wxOutputStream::Sync()
// wxCountingOutputStream // wxCountingOutputStream
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxCountingOutputStream, wxOutputStream)
wxCountingOutputStream::wxCountingOutputStream () wxCountingOutputStream::wxCountingOutputStream ()
{ {
m_currentPos = 0; m_currentPos = 0;
@@ -1050,6 +1058,8 @@ wxFileOffset wxCountingOutputStream::OnSysTell() const
// wxFilterInputStream // wxFilterInputStream
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
IMPLEMENT_ABSTRACT_CLASS(wxFilterInputStream, wxInputStream)
wxFilterInputStream::wxFilterInputStream() wxFilterInputStream::wxFilterInputStream()
: m_parent_i_stream(NULL), : m_parent_i_stream(NULL),
m_owns(false) m_owns(false)
@@ -1078,6 +1088,8 @@ wxFilterInputStream::~wxFilterInputStream()
// wxFilterOutputStream // wxFilterOutputStream
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
IMPLEMENT_ABSTRACT_CLASS(wxFilterOutputStream, wxOutputStream)
wxFilterOutputStream::wxFilterOutputStream() wxFilterOutputStream::wxFilterOutputStream()
: m_parent_o_stream(NULL), : m_parent_o_stream(NULL),
m_owns(false) m_owns(false)