]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wfstream.cpp
just to resolve a dummy conflict
[wxWidgets.git] / src / common / wfstream.cpp
index 4d798f3c7913893d4a0fe36ef3f03ab0279a8abb..e4da5d94dfdd4d7c21ae3f2d281fecf264e037f3 100644 (file)
 
 // 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
 // ----------------------------------------------------------------------------
@@ -42,6 +49,20 @@ wxFileInputStream::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)
@@ -99,6 +120,13 @@ wxFileOutputStream::wxFileOutputStream()
   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) {
@@ -142,3 +170,6 @@ wxFileStream::wxFileStream(const wxString& fileName)
  : wxFileInputStream(fileName), wxFileOutputStream(*wxFileInputStream::m_file)
 {
 }
+
+#endif
+  // wxUSE_STREAMS && wxUSE_FILE