// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include <stdio.h>
-#include <wx/stream.h>
-#include <wx/wfstream.h>
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
+#ifndef WX_PRECOMP
+ #include "wx/defs.h"
+#endif
+
+#if wxUSE_STREAMS && wxUSE_FILE
+
+#include <stdio.h>
+#include <wx/stream.h>
+#include <wx/wfstream.h>
+
// ----------------------------------------------------------------------------
// wxFileInputStream
// ----------------------------------------------------------------------------
m_file = NULL;
}
+wxFileInputStream::wxFileInputStream(wxFile& file)
+{
+ m_file = &file;
+ m_file_destroy = FALSE;
+ m_i_streambuf->SetBufferIO(1024);
+}
+
+wxFileInputStream::wxFileInputStream(int fd)
+{
+ m_file = new wxFile(fd);
+ m_file_destroy = TRUE;
+ m_i_streambuf->SetBufferIO(1024);
+}
+
wxFileInputStream::~wxFileInputStream()
{
if (m_file_destroy)
m_file = NULL;
}
+wxFileOutputStream::wxFileOutputStream(int fd)
+{
+ m_file = new wxFile(fd);
+ m_file_destroy = TRUE;
+ m_o_streambuf->SetBufferIO(1024);
+}
+
wxFileOutputStream::~wxFileOutputStream()
{
if (m_file_destroy) {
: wxFileInputStream(fileName), wxFileOutputStream(*wxFileInputStream::m_file)
{
}
+
+#endif
+ // wxUSE_STREAMS && wxUSE_FILE