]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/mstream.cpp
Halfway reasonable implementation of wxFont for wxCocoa.
[wxWidgets.git] / src / common / mstream.cpp
index b9fef96e8c7d250075b920d51451fef72cafb407..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);
@@ -97,6 +99,11 @@ wxMemoryInputStream::InitFromStream(wxInputStream& stream, wxFileOffset lenFile)
     m_length = stream.LastRead();
 }
 
+bool wxMemoryInputStream::CanRead() const
+{
+    return m_i_streambuf->GetIntPosition() != m_length;
+}
+
 wxMemoryInputStream::~wxMemoryInputStream()
 {
     delete m_i_streambuf;
@@ -146,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);