added iosfwrap.h (wrapper for <iosfwd>)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18932 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-01-26 00:12:12 +00:00
parent 5d76f46282
commit 65f19af139
11 changed files with 36 additions and 30 deletions

View File

@@ -869,6 +869,7 @@ imagtiff.h WXH
imagjpeg.h WXH imagjpeg.h WXH
imaglist.h WXH imaglist.h WXH
intl.h WXH Base intl.h WXH Base
iosfwrap.h WXH Base
ioswrap.h WXH Base ioswrap.h WXH Base
ipc.h WXH Base ipc.h WXH Base
ipcbase.h WXH Base ipcbase.h WXH Base

View File

@@ -40,7 +40,7 @@ class WXDLLEXPORT wxFileHistory;
class WXDLLEXPORT wxConfigBase; class WXDLLEXPORT wxConfigBase;
#if wxUSE_STD_IOSTREAM #if wxUSE_STD_IOSTREAM
#include "wx/ioswrap.h" #include "wx/iosfwrap.h"
#else #else
#include "wx/stream.h" #include "wx/stream.h"
#endif #endif

23
include/wx/iosfwrap.h Normal file
View File

@@ -0,0 +1,23 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/iosfwrap.h
// Purpose: includes the correct stream-related forward declarations
// Author: Jan van Dijk
// Modified by:
// Created: 18.12.2002
// RCS-ID: $Id$
// Copyright: (c) 2002 Jan van Dijk <jan@etpmod.phys.tue.nl>
// Licence: wxWindows license
///////////////////////////////////////////////////////////////////////////////
#if wxUSE_STD_IOSTREAM
#if wxUSE_IOSTREAMH
// There is no pre-ANSI iosfwd header (?). We include the full decarations.
# include <iostream.h>
#else
# include <iosfwd>
#endif
#endif
// wxUSE_STD_IOSTREAM

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: ioswrap.h // Name: wx/ioswrap.h
// Purpose: includes the correct iostream headers for current compiler // Purpose: includes the correct iostream headers for current compiler
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
@@ -12,15 +12,9 @@
#if wxUSE_STD_IOSTREAM #if wxUSE_STD_IOSTREAM
#if wxUSE_IOSTREAMH #if wxUSE_IOSTREAMH
// N.B. BC++ doesn't have istream.h, ostream.h
# include <iostream.h> # include <iostream.h>
#else #else
# include <iostream> # include <iostream>
# if 0 // this is not needed any longer now that we have wxSTD
# if defined(__VISUALC__) || defined(__MWERKS__)
using namespace std;
# endif
#endif // 0
#endif #endif
#endif #endif

View File

@@ -101,7 +101,7 @@ enum
#define wxTraceOleCalls 0x0100 // OLE interface calls #define wxTraceOleCalls 0x0100 // OLE interface calls
#endif #endif
#include "wx/ioswrap.h" #include "wx/iosfwrap.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// derive from this class to redirect (or suppress, or ...) log messages // derive from this class to redirect (or suppress, or ...) log messages

View File

@@ -144,7 +144,7 @@
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// we use iostream for wxLongLong output // we use iostream for wxLongLong output
#include "wx/ioswrap.h" #include "wx/iosfwrap.h"
#if wxUSE_LONGLONG_NATIVE #if wxUSE_LONGLONG_NATIVE

View File

@@ -45,11 +45,6 @@ class WXDLLEXPORT wxClassInfo;
class WXDLLEXPORT wxHashTable; class WXDLLEXPORT wxHashTable;
class WXDLLEXPORT wxObjectRefData; class WXDLLEXPORT wxObjectRefData;
#if wxUSE_STD_IOSTREAM && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT)
#include "wx/ioswrap.h"
#endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxClassInfo // wxClassInfo
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -326,18 +321,6 @@ inline void wxCheckCast(void *ptr)
#endif // __WXDEBUG__ #endif // __WXDEBUG__
// for some reason Borland seems to need this include.
#if wxUSE_STD_IOSTREAM \
&& (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT) \
&& defined(__BORLANDC__)
#if wxUSE_IOSTREAMH
#include <iostream.h>
#else
#include <iostream>
#endif
#endif // wxUSE_IOSTREAMH
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// set up memory debugging macros // set up memory debugging macros
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -396,6 +379,10 @@ inline void wxCheckCast(void *ptr)
#endif // WXDEBUG && wxUSE_MEMORY_TRACING #endif // WXDEBUG && wxUSE_MEMORY_TRACING
#if wxUSE_STD_IOSTREAM && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT)
// needed by wxObject::Dump
#include "wx/iosfwrap.h"
#endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxObject: the root class of wxWindows object hierarchy // wxObject: the root class of wxWindows object hierarchy

View File

@@ -1261,7 +1261,7 @@ inline wxString operator+(const wxCharBuffer& buf, const wxString& string)
#if defined(wxSTD_STRING_COMPATIBILITY) && wxUSE_STD_IOSTREAM #if defined(wxSTD_STRING_COMPATIBILITY) && wxUSE_STD_IOSTREAM
#include "wx/ioswrap.h" #include "wx/iosfwrap.h"
WXDLLEXPORT wxSTD istream& operator>>(wxSTD istream&, wxString&); WXDLLEXPORT wxSTD istream& operator>>(wxSTD istream&, wxString&);
WXDLLEXPORT wxSTD ostream& operator<<(wxSTD ostream&, const wxString&); WXDLLEXPORT wxSTD ostream& operator<<(wxSTD ostream&, const wxString&);

View File

@@ -37,7 +37,7 @@
#ifndef NO_TEXT_WINDOW_STREAM #ifndef NO_TEXT_WINDOW_STREAM
#if wxUSE_STD_IOSTREAM #if wxUSE_STD_IOSTREAM
#include "wx/ioswrap.h" // for iostream classes if we need them #include "wx/ioswrap.h" // derivation: we need the full decls.
#else // !wxUSE_STD_IOSTREAM #else // !wxUSE_STD_IOSTREAM
// can't compile this feature in if we don't use streams at all // can't compile this feature in if we don't use streams at all
#define NO_TEXT_WINDOW_STREAM #define NO_TEXT_WINDOW_STREAM

View File

@@ -32,7 +32,7 @@
#include "wx/db.h" // will #include sqltypes.h #include "wx/db.h" // will #include sqltypes.h
#endif //ODBC #endif //ODBC
#include "wx/ioswrap.h" #include "wx/iosfwrap.h"
/* /*
* wxVariantData stores the actual data in a wxVariant object, * wxVariantData stores the actual data in a wxVariant object,

View File

@@ -748,6 +748,7 @@ void wxLogStderr::DoLogString(const wxChar *szString, time_t WXUNUSED(t))
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if wxUSE_STD_IOSTREAM #if wxUSE_STD_IOSTREAM
#include "wx/ioswrap.h"
wxLogStream::wxLogStream(wxSTD ostream *ostr) wxLogStream::wxLogStream(wxSTD ostream *ostr)
{ {
if ( ostr == NULL ) if ( ostr == NULL )