X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/216a72f3b9ab2bf72f489aceac0093138a6e7707..f453d7eadaf93af1d84981a1d1ead8e04be9522f:/include/wx/datstrm.h diff --git a/include/wx/datstrm.h b/include/wx/datstrm.h index f49620a6ae..f379d8a5c6 100644 --- a/include/wx/datstrm.h +++ b/include/wx/datstrm.h @@ -14,7 +14,7 @@ #include "wx/stream.h" #include "wx/longlong.h" -#include "wx/strconv.h" +#include "wx/convauto.h" #if wxUSE_STREAMS @@ -22,11 +22,11 @@ class WXDLLIMPEXP_BASE wxDataInputStream { public: #if wxUSE_UNICODE - wxDataInputStream(wxInputStream& s, wxMBConv& conv = wxConvUTF8); + wxDataInputStream(wxInputStream& s, const wxMBConv& conv = wxConvUTF8 ); #else wxDataInputStream(wxInputStream& s); #endif - ~wxDataInputStream(){} + ~wxDataInputStream(); bool IsOk() { return m_input->IsOk(); } @@ -78,26 +78,31 @@ public: 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 - wxMBConv& m_conv; + wxMBConv *m_conv; #endif - DECLARE_NO_COPY_CLASS(wxDataInputStream) + wxDECLARE_NO_COPY_CLASS(wxDataInputStream); }; class WXDLLIMPEXP_BASE wxDataOutputStream { public: #if wxUSE_UNICODE - wxDataOutputStream(wxOutputStream& s, wxMBConv& conv = wxConvUTF8); + wxDataOutputStream(wxOutputStream& s, const wxMBConv& conv = wxConvUTF8 ); #else wxDataOutputStream(wxOutputStream& s); #endif - ~wxDataOutputStream(){} + ~wxDataOutputStream(); 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); - wxDataOutputStream& operator<<(const wxChar *string); wxDataOutputStream& operator<<(const wxString& string); wxDataOutputStream& operator<<(wxInt8 c); wxDataOutputStream& operator<<(wxInt16 i); @@ -153,14 +157,19 @@ public: 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 - wxMBConv& m_conv; + wxMBConv *m_conv; #endif - DECLARE_NO_COPY_CLASS(wxDataOutputStream) + wxDECLARE_NO_COPY_CLASS(wxDataOutputStream); }; #endif