]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/datstrm.h
Fixed compilation error on OS/2 (strnlen declaration was not visible).
[wxWidgets.git] / include / wx / datstrm.h
index 80fa7e285e1e02e7de4f48f98d5942e715cc8b99..d83aa66993c19aacabf5cb1f819a54c808a2f461 100644 (file)
@@ -22,11 +22,11 @@ class WXDLLIMPEXP_BASE wxDataInputStream
 {
 public:
 #if wxUSE_UNICODE
 {
 public:
 #if wxUSE_UNICODE
-    wxDataInputStream(wxInputStream& s, const wxMBConv& conv = wxConvAuto());
+    wxDataInputStream(wxInputStream& s, const wxMBConv& conv = wxConvUTF8 );
 #else
     wxDataInputStream(wxInputStream& s);
 #endif
 #else
     wxDataInputStream(wxInputStream& s);
 #endif
-    ~wxDataInputStream(){}
+    ~wxDataInputStream();
 
     bool IsOk() { return m_input->IsOk(); }
 
 
     bool IsOk() { return m_input->IsOk(); }
 
@@ -78,12 +78,17 @@ public:
     wxDataInputStream& operator>>(float& f);
 
     void BigEndianOrdered(bool be_order) { m_be_order = be_order; }
     wxDataInputStream& operator>>(float& f);
 
     void BigEndianOrdered(bool be_order) { m_be_order = be_order; }
+    
+#if wxUSE_UNICODE
+    void SetConv( const wxMBConv &conv );
+    wxMBConv *GetConv() const { return m_conv; }
+#endif
 
 protected:
     wxInputStream *m_input;
     bool m_be_order;
 #if wxUSE_UNICODE
 
 protected:
     wxInputStream *m_input;
     bool m_be_order;
 #if wxUSE_UNICODE
-    wxMBConv m_conv;
+    wxMBConv *m_conv;
 #endif
 
     DECLARE_NO_COPY_CLASS(wxDataInputStream)
 #endif
 
     DECLARE_NO_COPY_CLASS(wxDataInputStream)
@@ -93,11 +98,11 @@ class WXDLLIMPEXP_BASE wxDataOutputStream
 {
 public:
 #if wxUSE_UNICODE
 {
 public:
 #if wxUSE_UNICODE
-    wxDataOutputStream(wxOutputStream& s, const wxMBConv& conv = wxConvAuto());
+    wxDataOutputStream(wxOutputStream& s, const wxMBConv& conv = wxConvUTF8 );
 #else
     wxDataOutputStream(wxOutputStream& s);
 #endif
 #else
     wxDataOutputStream(wxOutputStream& s);
 #endif
-    ~wxDataOutputStream(){}
+    ~wxDataOutputStream();
 
     bool IsOk() { return m_output->IsOk(); }
 
 
     bool IsOk() { return m_output->IsOk(); }
 
@@ -132,7 +137,6 @@ public:
     void Write8(const wxUint8 *buffer, size_t size);
     void WriteDouble(const double *buffer, size_t size);
 
     void Write8(const wxUint8 *buffer, size_t size);
     void WriteDouble(const double *buffer, size_t size);
 
-    wxDataOutputStream& operator<<(const wxChar *string);
     wxDataOutputStream& operator<<(const wxString& string);
     wxDataOutputStream& operator<<(wxInt8 c);
     wxDataOutputStream& operator<<(wxInt16 i);
     wxDataOutputStream& operator<<(const wxString& string);
     wxDataOutputStream& operator<<(wxInt8 c);
     wxDataOutputStream& operator<<(wxInt16 i);
@@ -153,11 +157,16 @@ public:
 
     void BigEndianOrdered(bool be_order) { m_be_order = be_order; }
 
 
     void BigEndianOrdered(bool be_order) { m_be_order = be_order; }
 
+#if wxUSE_UNICODE
+    void SetConv( const wxMBConv &conv );
+    wxMBConv *GetConv() const { return m_conv; }
+#endif
+
 protected:
     wxOutputStream *m_output;
     bool m_be_order;
 #if wxUSE_UNICODE
 protected:
     wxOutputStream *m_output;
     bool m_be_order;
 #if wxUSE_UNICODE
-    wxMBConv m_conv;
+    wxMBConv *m_conv;
 #endif
 
     DECLARE_NO_COPY_CLASS(wxDataOutputStream)
 #endif
 
     DECLARE_NO_COPY_CLASS(wxDataOutputStream)