]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/txtstrm.h
1. use a manifest constant wxNO_LEN instead of -1 for lengths everywhere
[wxWidgets.git] / include / wx / txtstrm.h
index 12381fa37cc9b833fc053327677dd9f0fbd372c0..b5d94c749f551c88795d1c191a4dac1d50817660 100644 (file)
 #ifndef _WX_TXTSTREAM_H_
 #define _WX_TXTSTREAM_H_
 
 #ifndef _WX_TXTSTREAM_H_
 #define _WX_TXTSTREAM_H_
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface "txtstrm.h"
-#endif
-
 #include "wx/stream.h"
 #include "wx/stream.h"
+#include "wx/convauto.h"
 
 #if wxUSE_STREAMS
 
 
 #if wxUSE_STREAMS
 
@@ -40,9 +37,11 @@ class WXDLLIMPEXP_BASE wxTextInputStream
 {
 public:
 #if wxUSE_UNICODE
 {
 public:
 #if wxUSE_UNICODE
-    wxTextInputStream(wxInputStream& s, const wxString &sep=wxT(" \t"), wxMBConv& conv = wxConvUTF8 );
+    wxTextInputStream(wxInputStream& s,
+                      const wxString &sep=wxT(" \t"),
+                      const wxMBConv& conv = wxConvAuto());
 #else
 #else
-    wxTextInputStream(wxInputStream& s, const wxString &sep=wxT(" \t") );
+    wxTextInputStream(wxInputStream& s, const wxString &sep=wxT(" \t"));
 #endif
     ~wxTextInputStream();
 
 #endif
     ~wxTextInputStream();
 
@@ -64,6 +63,9 @@ public:
     // Operators
     wxTextInputStream& operator>>(wxString& word);
     wxTextInputStream& operator>>(char& c);
     // Operators
     wxTextInputStream& operator>>(wxString& word);
     wxTextInputStream& operator>>(char& c);
+#if wxUSE_UNICODE && wxWCHAR_T_IS_REAL_TYPE
+    wxTextInputStream& operator>>(wchar_t& wc);
+#endif // wxUSE_UNICODE
     wxTextInputStream& operator>>(wxInt16& i);
     wxTextInputStream& operator>>(wxInt32& i);
     wxTextInputStream& operator>>(wxUint16& i);
     wxTextInputStream& operator>>(wxInt16& i);
     wxTextInputStream& operator>>(wxInt32& i);
     wxTextInputStream& operator>>(wxUint16& i);
@@ -79,7 +81,7 @@ protected:
     char m_lastBytes[10]; // stores the bytes that were read for the last character
 
 #if wxUSE_UNICODE
     char m_lastBytes[10]; // stores the bytes that were read for the last character
 
 #if wxUSE_UNICODE
-    wxMBConv &m_conv;
+    wxMBConv *m_conv;
 #endif
 
     bool   EatEOL(const wxChar &c);
 #endif
 
     bool   EatEOL(const wxChar &c);
@@ -103,9 +105,11 @@ class WXDLLIMPEXP_BASE wxTextOutputStream
 {
 public:
 #if wxUSE_UNICODE
 {
 public:
 #if wxUSE_UNICODE
-    wxTextOutputStream( wxOutputStream& s, wxEOL mode = wxEOL_NATIVE, wxMBConv& conv = wxConvUTF8  );
+    wxTextOutputStream(wxOutputStream& s,
+                       wxEOL mode = wxEOL_NATIVE,
+                       const wxMBConv& conv = wxConvAuto());
 #else
 #else
-    wxTextOutputStream( wxOutputStream& s, wxEOL mode = wxEOL_NATIVE );
+    wxTextOutputStream(wxOutputStream& s, wxEOL mode = wxEOL_NATIVE);
 #endif
     virtual ~wxTextOutputStream();
 
 #endif
     virtual ~wxTextOutputStream();
 
@@ -118,6 +122,8 @@ public:
     virtual void WriteDouble(double d);
     virtual void WriteString(const wxString& string);
 
     virtual void WriteDouble(double d);
     virtual void WriteString(const wxString& string);
 
+    wxTextOutputStream& PutChar(wxChar c);
+
     wxTextOutputStream& operator<<(const wxChar *string);
     wxTextOutputStream& operator<<(const wxString& string);
     wxTextOutputStream& operator<<(char c);
     wxTextOutputStream& operator<<(const wxChar *string);
     wxTextOutputStream& operator<<(const wxString& string);
     wxTextOutputStream& operator<<(char c);
@@ -138,7 +144,7 @@ protected:
     wxEOL           m_mode;
 
 #if wxUSE_UNICODE
     wxEOL           m_mode;
 
 #if wxUSE_UNICODE
-    wxMBConv &m_conv;
+    wxMBConv *m_conv;
 #endif
 
     DECLARE_NO_COPY_CLASS(wxTextOutputStream)
 #endif
 
     DECLARE_NO_COPY_CLASS(wxTextOutputStream)