]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/txtstrm.cpp
define wxNO_RTTI/EXCEPTIONS/THREADS if corresponding USE_XXX is set to 0
[wxWidgets.git] / src / common / txtstrm.cpp
index 5c53b1f162c76576f5ab1d769cd7ac8b11c0630c..93bc7ad912bffa5f6f9a810c06db73f89698dd23 100644 (file)
@@ -252,6 +252,17 @@ wxTextInputStream& wxTextInputStream::operator>>(char& c)
     return *this;
 }
 
+#if wxUSE_UNICODE && wxWCHAR_T_IS_REAL_TYPE
+
+wxTextInputStream& wxTextInputStream::operator>>(wchar_t& wc)
+{
+    wc = GetChar();
+
+    return *this;
+}
+
+#endif // wxUSE_UNICODE
+
 wxTextInputStream& wxTextInputStream::operator>>(wxInt16& i)
 {
     i = (wxInt16)Read16();
@@ -406,6 +417,16 @@ void wxTextOutputStream::WriteString(const wxString& string)
 #endif
 }
 
+wxTextOutputStream& wxTextOutputStream::PutChar(wxChar c)
+{
+#if wxUSE_UNICODE
+    WriteString( wxString(&c, m_conv, 1) );
+#else
+    WriteString( wxString(&c, wxConvLocal, 1) );
+#endif
+    return *this;
+}
+
 wxTextOutputStream& wxTextOutputStream::operator<<(const wxChar *string)
 {
     WriteString( wxString(string) );
@@ -486,7 +507,7 @@ wxTextOutputStream& wxTextOutputStream::operator<<(float f)
 
 wxTextOutputStream &endl( wxTextOutputStream &stream )
 {
-    return stream << wxT('\n');
+    return stream.PutChar(wxT('\n'));
 }
 
 #endif