X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/593d4b0dffa77c74444dca03eb1e01c7b5f8a220..bd1e9c12b18a09228ddfb94c386677f686ce08b4:/src/common/wfstream.cpp diff --git a/src/common/wfstream.cpp b/src/common/wfstream.cpp index 4d798f3c79..e4da5d94df 100644 --- a/src/common/wfstream.cpp +++ b/src/common/wfstream.cpp @@ -15,14 +15,21 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include -#include -#include #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif +#ifndef WX_PRECOMP + #include "wx/defs.h" +#endif + +#if wxUSE_STREAMS && wxUSE_FILE + +#include +#include +#include + // ---------------------------------------------------------------------------- // 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