]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/string.cpp
Add wxDataViewTreeStore with sample
[wxWidgets.git] / src / common / string.cpp
index fbfe6cb6b5dfe16e641c434bcf5aa3855cabf9f1..9b05497c373daeb489defb129657e14f64556626 100644 (file)
@@ -72,11 +72,10 @@ const size_t wxString::npos = (size_t) -1;
 
 wxSTD ostream& operator<<(wxSTD ostream& os, const wxCStrData& str)
 {
 
 wxSTD ostream& operator<<(wxSTD ostream& os, const wxCStrData& str)
 {
-// FIXME-UTF8: always, not only if wxUSE_UNICODE
-#if wxUSE_UNICODE && !defined(__BORLANDC__)
-    return os << (const wchar_t*)str.AsWCharBuf();
+#if wxUSE_UNICODE && !wxUSE_UNICODE_UTF8
+    return os << (const char *)str.AsCharBuf();
 #else
 #else
-    return os << (const char*)str.AsCharBuf();
+    return os << str.AsInternal();
 #endif
 }
 
 #endif
 }
 
@@ -97,6 +96,25 @@ wxSTD ostream& operator<<(wxSTD ostream& os, const wxWCharBuffer& str)
 }
 #endif
 
 }
 #endif
 
+#if wxUSE_UNICODE && defined(HAVE_WOSTREAM)
+
+wxSTD wostream& operator<<(wxSTD wostream& wos, const wxString& str)
+{
+    return wos << str.wc_str();
+}
+
+wxSTD wostream& operator<<(wxSTD wostream& wos, const wxCStrData& str)
+{
+    return wos << str.AsWChar();
+}
+
+wxSTD wostream& operator<<(wxSTD wostream& wos, const wxWCharBuffer& str)
+{
+    return wos << str.data();
+}
+
+#endif  // wxUSE_UNICODE && defined(HAVE_WOSTREAM)
+
 #endif // wxUSE_STD_IOSTREAM
 
 // ===========================================================================
 #endif // wxUSE_STD_IOSTREAM
 
 // ===========================================================================