#include "view.h"
#if wxUSE_STD_IOSTREAM
-#include <iostream.h>
+#include <ioswrap.h>
#endif
IMPLEMENT_DYNAMIC_CLASS(DiagramDocument, wxDocument)
}
#if wxUSE_STD_IOSTREAM
-ostream& DiagramDocument::SaveObject(ostream& stream)
+wxSTD ostream& DiagramDocument::SaveObject(wxSTD ostream& stream)
{
wxDocument::SaveObject(stream);
return stream;
}
-istream& DiagramDocument::LoadObject(istream& stream)
+wxSTD istream& DiagramDocument::LoadObject(wxSTD istream& stream)
{
wxDocument::LoadObject(stream);
#include <wx/ogl/ogl.h>
#if wxUSE_STD_IOSTREAM
-class ostream;
-class istream;
+ #include <iosfwd>
#endif
/*
~DiagramDocument(void);
#if wxUSE_STD_IOSTREAM
- virtual ostream& SaveObject(ostream& stream);
- virtual istream& LoadObject(istream& stream);
+ virtual wxSTD ostream& SaveObject(wxSTD ostream& stream);
+ virtual wxSTD istream& LoadObject(wxSTD istream& stream);
#else
virtual wxOutputStream& SaveObject(wxOutputStream& stream);
virtual wxInputStream& LoadObject(wxInputStream& stream);
#include <iostream>
#include <fstream>
#ifdef _MSC_VER
-using namespace std;
+//using namespace std;
#endif
#endif
#endif
#else
#include <strstream>
-using namespace std;
+//using namespace std;
#endif
#include "scorefil.h"
#include "scoredg.h"
wxDate &operator--(int) { return *this -= 1; }
#if wxUSE_STD_IOSTREAM
- friend ostream WXDLLEXPORT & operator <<(ostream &os, const wxDate &dt)
+ friend wxSTD ostream WXDLLEXPORT & operator <<(wxSTD ostream &os, const wxDate &dt)
{ return os << dt.FormatDate().mb_str(); }
#endif
#include "wx/setup.h"
+// old C++ headers (like <iostream.h>) declare classes in the global namespace
+// while the new, standard ones (like <iostream>) do it in std:: namespace
+//
+// using this macro allows constuctions like "wxSTD iostream" to work in
+// either case
+#if !wxUSE_IOSTREAMH
+ #define wxSTD std::
+#else
+ #define wxSTD
+#endif
+
// just in case they were defined in setup.h
#ifdef PACKAGE
#undef PACKAGE
virtual bool Revert();
#if wxUSE_STD_IOSTREAM
- virtual ostream& SaveObject(ostream& stream);
- virtual istream& LoadObject(istream& stream);
+ virtual wxSTD ostream& SaveObject(wxSTD ostream& stream);
+ virtual wxSTD istream& LoadObject(wxSTD istream& stream);
#else
virtual wxOutputStream& SaveObject(wxOutputStream& stream);
virtual wxInputStream& LoadObject(wxInputStream& stream);
#if wxUSE_STD_IOSTREAM
// For compatibility with existing file formats:
// converts from/to a stream to/from a temporary file.
-bool WXDLLEXPORT wxTransferFileToStream(const wxString& filename, ostream& stream);
-bool WXDLLEXPORT wxTransferStreamToFile(istream& stream, const wxString& filename);
+bool WXDLLEXPORT wxTransferFileToStream(const wxString& filename, wxSTD ostream& stream);
+bool WXDLLEXPORT wxTransferStreamToFile(wxSTD istream& stream, const wxString& filename);
#else
// For compatibility with existing file formats:
// converts from/to a stream to/from a temporary file.
# include <iostream.h>
#else
# 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
{
public:
// redirect log output to an ostream
- wxLogStream(ostream *ostr = (ostream *) NULL);
+ wxLogStream(wxSTD ostream *ostr = (wxSTD ostream *) NULL);
protected:
// implement sink function
virtual void DoLogString(const wxChar *szString, time_t t);
// using ptr here to avoid including <iostream.h> from this file
- ostream *m_ostr;
+ wxSTD ostream *m_ostr;
};
#endif
#if wxUSE_STD_IOSTREAM
// input/output
- friend ostream& operator<<(ostream&, const wxLongLongNative&);
+ friend wxSTD ostream& operator<<(wxSTD ostream&, const wxLongLongNative&);
#endif
private:
// input/output
#if wxUSE_STD_IOSTREAM
- friend ostream& operator<<(ostream&, const wxLongLongWx&);
+ friend wxSTD ostream& operator<<(wxSTD ostream&, const wxLongLongWx&);
#endif // wxUSE_STD_IOSTREAM
void *asArray() const;
#else
# include <iostream>
# if defined(__VISUALC__) || defined(__MWERKS__)
- using namespace std;
+// using namespace std;
# endif
#endif
// Traverse the list.
static void TraverseList (PmSFV, wxMemStruct *from = NULL);
- static streambuf *m_streamBuf;
- static ostream *m_debugStream;
+ static wxSTD streambuf *m_streamBuf;
+ static wxSTD ostream *m_debugStream;
static int debugLevel;
static bool debugOn;
~wxDebugContext(void);
static bool HasStream(void) { return (m_debugStream != NULL); };
- static ostream& GetStream(void) { return *m_debugStream; }
- static streambuf *GetStreamBuf(void) { return m_streamBuf; }
- static void SetStream(ostream *stream, streambuf *buf = NULL);
+ static wxSTD ostream& GetStream(void) { return *m_debugStream; }
+ static wxSTD streambuf *GetStreamBuf(void) { return m_streamBuf; }
+ static void SetStream(wxSTD ostream *stream, streambuf *buf = NULL);
static bool SetFile(const wxString& file);
static bool SetStandardError(void);
#endif // Debug & memory tracing
#if wxUSE_STD_IOSTREAM && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT)
- virtual void Dump(ostream& str);
+ virtual void Dump(wxSTD ostream& str);
#endif
#if wxUSE_SERIAL
#include "wx/ioswrap.h"
-WXDLLEXPORT istream& operator>>(istream&, wxString&);
-WXDLLEXPORT ostream& operator<<(ostream&, const wxString&);
+WXDLLEXPORT wxSTD istream& operator>>(wxSTD istream&, wxString&);
+WXDLLEXPORT wxSTD ostream& operator<<(wxSTD ostream&, const wxString&);
#endif // wxSTD_STRING_COMPATIBILITY
#define NO_TEXT_WINDOW_STREAM
#endif
+// the streambuf which is used in the declaration of wxTextCtrlBase below is not compatible
+// with the standard-conforming implementation found in newer egcs versions
+// (that is, the libstdc++ v3 that is shipped with it)
+#if defined(__GNUC__)&&( (__GNUC__>2) ||( (__GNUC__==2)&&(__GNUC_MINOR__>97) ) )
+ #define NO_TEXT_WINDOW_STREAM
+#endif
+
#ifndef NO_TEXT_WINDOW_STREAM
#if wxUSE_STD_IOSTREAM
#include "wx/ioswrap.h" // for iostream classes if we need them
virtual void Copy(wxVariantData& data) = 0;
virtual bool Eq(wxVariantData& data) const = 0;
#if wxUSE_STD_IOSTREAM
- virtual bool Write(ostream& str) const = 0;
+ virtual bool Write(wxSTD ostream& str) const = 0;
#endif
virtual bool Write(wxString& str) const = 0;
#if wxUSE_STD_IOSTREAM
- virtual bool Read(istream& str) = 0;
+ virtual bool Read(wxSTD istream& str) = 0;
#endif
virtual bool Read(wxString& str) = 0;
// What type is it? Return a string name.
}
#if wxUSE_STD_IOSTREAM
-ostream& DrawingDocument::SaveObject(ostream& stream)
+wxSTD ostream& DrawingDocument::SaveObject(wxSTD ostream& stream)
{
wxDocument::SaveObject(stream);
#endif
#if wxUSE_STD_IOSTREAM
-istream& DrawingDocument::LoadObject(istream& stream)
+wxSTD istream& DrawingDocument::LoadObject(wxSTD istream& stream)
{
wxDocument::LoadObject(stream);
}
#if wxUSE_STD_IOSTREAM
-ostream& DoodleSegment::SaveObject(ostream& stream)
+wxSTD ostream& DoodleSegment::SaveObject(wxSTD ostream& stream)
{
wxInt32 n = lines.Number();
stream << n << '\n';
#endif
#if wxUSE_STD_IOSTREAM
-istream& DoodleSegment::LoadObject(istream& stream)
+wxSTD istream& DoodleSegment::LoadObject(wxSTD istream& stream)
{
wxInt32 n = 0;
stream >> n;
void Draw(wxDC *dc);
#if wxUSE_STD_IOSTREAM
- ostream& SaveObject(ostream& text_stream);
- istream& LoadObject(istream& text_stream);
+ wxSTD ostream& SaveObject(wxSTD ostream& text_stream);
+ wxSTD istream& LoadObject(wxSTD istream& text_stream);
#else
wxOutputStream& SaveObject(wxOutputStream& stream);
wxInputStream& LoadObject(wxInputStream& stream);
~DrawingDocument(void);
#if wxUSE_STD_IOSTREAM
- ostream& SaveObject(ostream& text_stream);
- istream& LoadObject(istream& text_stream);
+ wxSTD ostream& SaveObject(wxSTD ostream& text_stream);
+ wxSTD istream& LoadObject(wxSTD istream& text_stream);
#else
wxOutputStream& SaveObject(wxOutputStream& stream);
wxInputStream& LoadObject(wxInputStream& stream);
private:
public:
/*
-ostream& SaveObject(ostream& stream);
-istream& LoadObject(istream& stream);
+wxSTD ostream& SaveObject(wxSTD ostream& stream);
+wxSTD istream& LoadObject(wxSTD istream& stream);
*/
virtual bool OnSaveDocument(const wxString& filename);
virtual bool OnOpenDocument(const wxString& filename);
}
#if wxUSE_STD_IOSTREAM
-ostream& DrawingDocument::SaveObject(ostream& stream)
+wxSTD ostream& DrawingDocument::SaveObject(wxSTD ostream& stream)
{
wxDocument::SaveObject(stream);
#endif
#if wxUSE_STD_IOSTREAM
-istream& DrawingDocument::LoadObject(istream& stream)
+wxSTD istream& DrawingDocument::LoadObject(wxSTD istream& stream)
{
wxDocument::LoadObject(stream);
}
#if wxUSE_STD_IOSTREAM
-ostream& DoodleSegment::SaveObject(ostream& stream)
+wxSTD ostream& DoodleSegment::SaveObject(wxSTD ostream& stream)
{
wxInt32 n = lines.Number();
stream << n << '\n';
#endif
#if wxUSE_STD_IOSTREAM
-istream& DoodleSegment::LoadObject(istream& stream)
+wxSTD istream& DoodleSegment::LoadObject(wxSTD istream& stream)
{
wxInt32 n = 0;
stream >> n;
void Draw(wxDC *dc);
#if wxUSE_STD_IOSTREAM
- ostream& SaveObject(ostream& text_stream);
- istream& LoadObject(istream& text_stream);
+ wxSTD ostream& SaveObject(wxSTD ostream& text_stream);
+ wxSTD istream& LoadObject(wxSTD istream& text_stream);
#else
wxOutputStream& SaveObject(wxOutputStream& stream);
wxInputStream& LoadObject(wxInputStream& stream);
~DrawingDocument(void);
#if wxUSE_STD_IOSTREAM
- ostream& SaveObject(ostream& text_stream);
- istream& LoadObject(istream& text_stream);
+ wxSTD ostream& SaveObject(wxSTD ostream& text_stream);
+ wxSTD istream& LoadObject(wxSTD istream& text_stream);
#else
wxOutputStream& SaveObject(wxOutputStream& stream);
wxInputStream& LoadObject(wxInputStream& stream);
private:
public:
/*
- ostream& SaveObject(ostream& stream);
- istream& LoadObject(istream& stream);
+ wxSTD ostream& SaveObject(wxSTD ostream& stream);
+ wxSTD istream& LoadObject(wxSTD istream& stream);
*/
virtual bool OnSaveDocument(const wxString& filename);
virtual bool OnOpenDocument(const wxString& filename);
textCtrl.WriteText( "Writing to ofstream and wxFileOutputStream:\n" );
- ofstream std_file_output( "test_std.dat" );
+ wxSTD ofstream std_file_output( "test_std.dat" );
wxFileOutputStream file_output( wxString("test_wx.dat") );
wxBufferedOutputStream buf_output( file_output );
wxTextOutputStream text_output( buf_output );
textCtrl.WriteText( "\nReading from ifstream:\n" );
- ifstream std_file_input( "test_std.dat" );
+ wxSTD ifstream std_file_input( "test_std.dat" );
std_file_input >> si;
tmp.Printf( _T("Signed int: %d\n"), si );
msgTitle = wxString(_("File error"));
#if wxUSE_STD_IOSTREAM
- ofstream store(wxString(file.fn_str()).mb_str());
+ wxSTD ofstream store(wxString(file.fn_str()).mb_str());
if (store.fail() || store.bad())
#else
wxFileOutputStream store(wxString(file.fn_str()));
msgTitle = wxString(_("File error"));
#if wxUSE_STD_IOSTREAM
- ifstream store(wxString(file.fn_str()).mb_str());
+ wxSTD ifstream store(wxString(file.fn_str()).mb_str());
if (store.fail() || store.bad())
#else
wxFileInputStream store(wxString(file.fn_str()));
}
#if wxUSE_STD_IOSTREAM
-istream& wxDocument::LoadObject(istream& stream)
+wxSTD istream& wxDocument::LoadObject(wxSTD istream& stream)
#else
wxInputStream& wxDocument::LoadObject(wxInputStream& stream)
#endif
}
#if wxUSE_STD_IOSTREAM
-ostream& wxDocument::SaveObject(ostream& stream)
+wxSTD ostream& wxDocument::SaveObject(wxSTD ostream& stream)
#else
wxOutputStream& wxDocument::SaveObject(wxOutputStream& stream)
#endif
// ----------------------------------------------------------------------------
#if wxUSE_STD_IOSTREAM
-bool wxTransferFileToStream(const wxString& filename, ostream& stream)
+bool wxTransferFileToStream(const wxString& filename, wxSTD ostream& stream)
{
FILE *fd1;
int ch;
return TRUE;
}
-bool wxTransferStreamToFile(istream& stream, const wxString& filename)
+bool wxTransferStreamToFile(wxSTD istream& stream, const wxString& filename)
{
FILE *fd1;
int ch;
// ----------------------------------------------------------------------------
#if wxUSE_STD_IOSTREAM
-wxLogStream::wxLogStream(ostream *ostr)
+wxLogStream::wxLogStream(wxSTD ostream *ostr)
{
if ( ostr == NULL )
- m_ostr = &cerr;
+ m_ostr = &wxSTD cerr;
else
m_ostr = ostr;
}
{
wxString str;
TimeStamp(&str);
- (*m_ostr) << str << wxConvertWX2MB(szString) << endl;
+ (*m_ostr) << str << wxConvertWX2MB(szString) << wxSTD endl;
}
#endif // wxUSE_STD_IOSTREAM
#if wxUSE_STD_IOSTREAM
// input/output
-ostream& operator<< (ostream& o, const wxLongLongNative& ll)
+wxSTD ostream& operator<< (wxSTD ostream& o, const wxLongLongNative& ll)
{
char result[65];
- memset(result, 'A', 64);
+ wxSTD memset(result, 'A', 64);
result[64] = '\0';
#if wxUSE_STD_IOSTREAM
// input/output
-ostream& operator<< (ostream& o, const wxLongLongWx& ll)
+wxSTD ostream& operator<< (wxSTD ostream& o, const wxLongLongWx& ll)
{
char result[65];
wxMemStruct *wxDebugContext::m_head = NULL;
wxMemStruct *wxDebugContext::m_tail = NULL;
-// ostream *wxDebugContext::m_debugStream = NULL;
-// streambuf *wxDebugContext::m_streamBuf = NULL;
+// wxSTD ostream *wxDebugContext::m_debugStream = NULL;
+// wxSTD streambuf *wxDebugContext::m_streamBuf = NULL;
// Must initialise these in wxEntry, and then delete them just before wxEntry exits
-streambuf *wxDebugContext::m_streamBuf = NULL;
-ostream *wxDebugContext::m_debugStream = NULL;
+wxSTD streambuf *wxDebugContext::m_streamBuf = NULL;
+wxSTD ostream *wxDebugContext::m_debugStream = NULL;
bool wxDebugContext::m_checkPrevious = FALSE;
int wxDebugContext::debugLevel = 1;
wxDebugContext::wxDebugContext(void)
{
// m_streamBuf = new wxDebugStreamBuf;
-// m_debugStream = new ostream(m_streamBuf);
+// m_debugStream = new wxSTD ostream(m_streamBuf);
}
wxDebugContext::~wxDebugContext(void)
* between SetFile and SetStream.
*/
-void wxDebugContext::SetStream(ostream *str, streambuf *buf)
+void wxDebugContext::SetStream(wxSTD ostream *str, streambuf *buf)
{
if (m_debugStream)
{
bool wxDebugContext::SetFile(const wxString& file)
{
- ofstream *str = new ofstream(file.mb_str());
+ wxSTD ofstream *str = new wxSTD ofstream(file.mb_str());
if (str->bad())
{
#if 0
#if !defined(_WINDLL)
wxDebugStreamBuf *buf = new wxDebugStreamBuf;
- ostream *stream = new ostream(m_streamBuf);
+ wxSTD ostream *stream = new wxSTD ostream(m_streamBuf);
SetStream(stream, buf);
return TRUE;
#else
}
#if wxUSE_STD_IOSTREAM && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT)
-void wxObject::Dump(ostream& str)
+void wxObject::Dump(wxSTD ostream& str)
{
if (GetClassInfo() && GetClassInfo()->GetClassName())
str << GetClassInfo()->GetClassName();
//
// ATTN: you can _not_ use both of these in the same program!
-istream& operator>>(istream& is, wxString& WXUNUSED(str))
+wxSTD istream& operator>>(wxSTD istream& is, wxString& WXUNUSED(str))
{
#if 0
int w = is.width(0);
return is;
}
-ostream& operator<<(ostream& os, const wxString& str)
+wxSTD ostream& operator<<(wxSTD ostream& os, const wxString& str)
{
os << str.c_str();
return os;
virtual void Copy(wxVariantData& data);
virtual bool Eq(wxVariantData& data) const;
#if wxUSE_STD_IOSTREAM
- virtual bool Write(ostream& str) const;
+ virtual bool Write(wxSTD ostream& str) const;
#endif
virtual bool Write(wxString& str) const;
#if wxUSE_STD_IOSTREAM
- virtual bool Read(istream& str);
+ virtual bool Read(wxSTD istream& str);
#endif
virtual bool Read(wxString& str);
virtual wxString GetType() const { return wxT("list"); };
}
#if wxUSE_STD_IOSTREAM
-bool wxVariantDataList::Write(ostream& str) const
+bool wxVariantDataList::Write(wxSTD ostream& str) const
{
wxString s;
Write(s);
}
#if wxUSE_STD_IOSTREAM
-bool wxVariantDataList::Read(istream& WXUNUSED(str))
+bool wxVariantDataList::Read(wxSTD istream& WXUNUSED(str))
{
wxFAIL_MSG(wxT("Unimplemented"));
// TODO
virtual void Copy(wxVariantData& data);
virtual bool Eq(wxVariantData& data) const;
#if wxUSE_STD_IOSTREAM
- virtual bool Write(ostream& str) const;
+ virtual bool Write(wxSTD ostream& str) const;
#endif
virtual bool Write(wxString& str) const;
#if wxUSE_STD_IOSTREAM
- virtual bool Read(istream& str);
+ virtual bool Read(wxSTD istream& str);
#endif
virtual bool Read(wxString& str);
virtual wxString GetType() const { return wxT("stringlist"); };
}
#if wxUSE_STD_IOSTREAM
-bool wxVariantDataStringList::Write(ostream& str) const
+bool wxVariantDataStringList::Write(wxSTD ostream& str) const
{
wxString s;
Write(s);
}
#if wxUSE_STD_IOSTREAM
-bool wxVariantDataStringList::Read(istream& WXUNUSED(str))
+bool wxVariantDataStringList::Read(wxSTD istream& WXUNUSED(str))
{
wxFAIL_MSG(wxT("Unimplemented"));
// TODO
virtual bool Read(wxString& str);
virtual bool Write(wxString& str) const;
#if wxUSE_STD_IOSTREAM
- virtual bool Read(istream& str);
- virtual bool Write(ostream& str) const;
+ virtual bool Read(wxSTD istream& str);
+ virtual bool Write(wxSTD ostream& str) const;
#endif
#if wxUSE_STREAMS
virtual bool Read(wxInputStream& str);
}
#if wxUSE_STD_IOSTREAM
-bool wxVariantDataLong::Write(ostream& str) const
+bool wxVariantDataLong::Write(wxSTD ostream& str) const
{
wxString s;
Write(s);
}
#if wxUSE_STD_IOSTREAM
-bool wxVariantDataLong::Read(istream& str)
+bool wxVariantDataLong::Read(wxSTD istream& str)
{
str >> m_value;
return TRUE;
virtual bool Eq(wxVariantData& data) const;
virtual bool Read(wxString& str);
#if wxUSE_STD_IOSTREAM
- virtual bool Write(ostream& str) const;
+ virtual bool Write(wxSTD ostream& str) const;
#endif
virtual bool Write(wxString& str) const;
#if wxUSE_STD_IOSTREAM
- virtual bool Read(istream& str);
+ virtual bool Read(wxSTD istream& str);
#endif
#if wxUSE_STREAMS
virtual bool Read(wxInputStream& str);
}
#if wxUSE_STD_IOSTREAM
-bool wxVariantDataReal::Write(ostream& str) const
+bool wxVariantDataReal::Write(wxSTD ostream& str) const
{
wxString s;
Write(s);
}
#if wxUSE_STD_IOSTREAM
-bool wxVariantDataReal::Read(istream& str)
+bool wxVariantDataReal::Read(wxSTD istream& str)
{
str >> m_value;
return TRUE;
virtual void Copy(wxVariantData& data);
virtual bool Eq(wxVariantData& data) const;
#if wxUSE_STD_IOSTREAM
- virtual bool Write(ostream& str) const;
+ virtual bool Write(wxSTD ostream& str) const;
#endif
virtual bool Write(wxString& str) const;
virtual bool Read(wxString& str);
#if wxUSE_STD_IOSTREAM
- virtual bool Read(istream& str);
+ virtual bool Read(wxSTD istream& str);
#endif
#if wxUSE_STREAMS
virtual bool Read(wxInputStream& str);
}
#if wxUSE_STD_IOSTREAM
-bool wxVariantDataBool::Write(ostream& str) const
+bool wxVariantDataBool::Write(wxSTD ostream& str) const
{
wxString s;
Write(s);
}
#if wxUSE_STD_IOSTREAM
-bool wxVariantDataBool::Read(istream& WXUNUSED(str))
+bool wxVariantDataBool::Read(wxSTD istream& WXUNUSED(str))
{
wxFAIL_MSG(wxT("Unimplemented"));
// str >> (long) m_value;
virtual void Copy(wxVariantData& data);
virtual bool Eq(wxVariantData& data) const;
#if wxUSE_STD_IOSTREAM
- virtual bool Read(istream& str);
- virtual bool Write(ostream& str) const;
+ virtual bool Read(wxSTD istream& str);
+ virtual bool Write(wxSTD ostream& str) const;
#endif
virtual bool Read(wxString& str);
virtual bool Write(wxString& str) const;
}
#if wxUSE_STD_IOSTREAM
-bool wxVariantDataChar::Write(ostream& str) const
+bool wxVariantDataChar::Write(wxSTD ostream& str) const
{
wxString s;
Write(s);
}
#if wxUSE_STD_IOSTREAM
-bool wxVariantDataChar::Read(istream& WXUNUSED(str))
+bool wxVariantDataChar::Read(wxSTD istream& WXUNUSED(str))
{
wxFAIL_MSG(wxT("Unimplemented"));
// str >> m_value;
virtual void Copy(wxVariantData& data);
virtual bool Eq(wxVariantData& data) const;
#if wxUSE_STD_IOSTREAM
- virtual bool Write(ostream& str) const;
+ virtual bool Write(wxSTD ostream& str) const;
#endif
virtual bool Read(wxString& str);
virtual bool Write(wxString& str) const;
#if wxUSE_STD_IOSTREAM
- virtual bool Read(istream& str);
+ virtual bool Read(wxSTD istream& str);
#endif
#if wxUSE_STREAMS
virtual bool Read(wxInputStream& str);
}
#if wxUSE_STD_IOSTREAM
-bool wxVariantDataString::Write(ostream& str) const
+bool wxVariantDataString::Write(wxSTD ostream& str) const
{
str << (const char*) m_value.mb_str();
return TRUE;
}
#if wxUSE_STD_IOSTREAM
-bool wxVariantDataString::Read(istream& str)
+bool wxVariantDataString::Read(wxSTD istream& str)
{
str >> m_value;
return TRUE;
virtual void Copy(wxVariantData& data);
virtual bool Eq(wxVariantData& data) const;
#if wxUSE_STD_IOSTREAM
- virtual bool Write(ostream& str) const;
+ virtual bool Write(wxSTD ostream& str) const;
#endif
virtual bool Write(wxString& str) const;
#if wxUSE_STD_IOSTREAM
- virtual bool Read(istream& str);
+ virtual bool Read(wxSTD istream& str);
#endif
virtual bool Read(wxString& str);
virtual wxString GetType() const { return wxT("time"); };
}
#if wxUSE_STD_IOSTREAM
-bool wxVariantDataTime::Write(ostream& str) const
+bool wxVariantDataTime::Write(wxSTD ostream& str) const
{
wxString s;
Write(s);
}
#if wxUSE_STD_IOSTREAM
-bool wxVariantDataTime::Read(istream& WXUNUSED(str))
+bool wxVariantDataTime::Read(wxSTD istream& WXUNUSED(str))
{
// Not implemented
return FALSE;
virtual void Copy(wxVariantData& data);
virtual bool Eq(wxVariantData& data) const;
#if wxUSE_STD_IOSTREAM
- virtual bool Write(ostream& str) const;
+ virtual bool Write(wxSTD ostream& str) const;
#endif
virtual bool Write(wxString& str) const;
#if wxUSE_STD_IOSTREAM
- virtual bool Read(istream& str);
+ virtual bool Read(wxSTD istream& str);
#endif
virtual bool Read(wxString& str);
virtual wxString GetType() const { return wxT("date"); };
}
#if wxUSE_STD_IOSTREAM
-bool wxVariantDataDate::Write(ostream& str) const
+bool wxVariantDataDate::Write(wxSTD ostream& str) const
{
wxString s;
Write(s);
}
#if wxUSE_STD_IOSTREAM
-bool wxVariantDataDate::Read(istream& WXUNUSED(str))
+bool wxVariantDataDate::Read(wxSTD istream& WXUNUSED(str))
{
// Not implemented
return FALSE;
virtual void Copy(wxVariantData& data);
virtual bool Eq(wxVariantData& data) const;
#if wxUSE_STD_IOSTREAM
- virtual bool Write(ostream& str) const;
+ virtual bool Write(wxSTD ostream& str) const;
#endif
virtual bool Write(wxString& str) const;
#if wxUSE_STD_IOSTREAM
- virtual bool Read(istream& str);
+ virtual bool Read(wxSTD istream& str);
#endif
virtual bool Read(wxString& str);
virtual wxString GetType() const { return wxT("void*"); };
}
#if wxUSE_STD_IOSTREAM
-bool wxVariantDataVoidPtr::Write(ostream& str) const
+bool wxVariantDataVoidPtr::Write(wxSTD ostream& str) const
{
wxString s;
Write(s);
}
#if wxUSE_STD_IOSTREAM
-bool wxVariantDataVoidPtr::Read(istream& WXUNUSED(str))
+bool wxVariantDataVoidPtr::Read(wxSTD istream& WXUNUSED(str))
{
// Not implemented
return FALSE;
#include "srcparser.h"
-#include <iostream.h>
+#include <ioswrap.h>
#include <memory.h>
#include <stdlib.h>
#include <stdio.h>
void AddEnumNode( char*& cur );
void AddTypeDefNode( char*& cur );
- void DumpOperationInfo( spOperation& info, const string& tab, ostream& os );
- void DumpClassHeader( spClass& info, ostream& os );
- void DumpClassBody( spClass& info, ostream& os );
+ void DumpOperationInfo( spOperation& info, const string& tab, wxSTD ostream& os );
+ void DumpClassHeader( spClass& info, wxSTD ostream& os );
+ void DumpClassBody( spClass& info, wxSTD ostream& os );
public:
#ifndef NO_GUI
#ifndef __WXGTK__
-//void wxObject::Dump(ostream& str)
+//void wxObject::Dump(wxSTD ostream& str)
//{
// if (GetClassInfo() && GetClassInfo()->GetClassName())
// str << GetClassInfo()->GetClassName();
void WriteTexReferences(char *filename)
{
- ofstream ostr(filename);
+ wxSTD ofstream ostr(filename);
if (ostr.bad()) return;
char buf[200];
if (!wxFileExists(filename))
return;
- ifstream istr(filename, ios::in);
+ wxSTD ifstream istr(filename, ios::in);
if (istr.bad()) return;
*
*/
-void BibEatWhiteSpace(istream& str)
+void BibEatWhiteSpace(wxSTD istream& str)
{
char ch = str.peek();
}
// Read word up to { or , or space
-void BibReadWord(istream& istr, char *buffer)
+void BibReadWord(wxSTD istream& istr, char *buffer)
{
int i = 0;
buffer[i] = 0;
}
// Read string (double-quoted or not) to end quote or EOL
-void BibReadToEOL(istream& istr, char *buffer)
+void BibReadToEOL(wxSTD istream& istr, char *buffer)
{
int i = 0;
buffer[i] = 0;
}
// Read }-terminated value, taking nested braces into account.
-void BibReadValue(istream& istr, char *buffer, bool ignoreBraces = TRUE,
+void BibReadValue(wxSTD istream& istr, char *buffer, bool ignoreBraces = TRUE,
bool quotesMayTerminate = TRUE)
{
int braceCount = 1;
return FALSE;
char buf[300];
- ifstream istr(filename, ios::in);
+ wxSTD ifstream istr(filename, ios::in);
if (istr.bad()) return FALSE;
BibLine = 1;
if (!wxFileExists(filename))
return FALSE;
- ifstream istr(filename, ios::in);
+ wxSTD ifstream istr(filename, ios::in);
if (istr.bad()) return FALSE;