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)
- Implemented wxMemoryInputStream::CanRead()
- Added wxEXEC_BLOCK flag (Hank Schultz)
- Add support for wxStream-derived classes to wxRTTI (Stas Sergeev)
All (GUI):

View 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)
};

View 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)
};

View 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);

View 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)