1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Data stream classes
4 // Author: Guilhem Lavaux
8 // Copyright: (c) Guilhem Lavaux
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_DATSTREAM_H_
13 #define _WX_DATSTREAM_H_
16 #pragma interface "datstrm.h"
19 #include "wx/stream.h"
23 class WXDLLEXPORT wxDataInputStream
{
25 wxDataInputStream(wxInputStream
& s
);
32 wxString
ReadString();
34 wxDataInputStream
& operator>>(wxString
& s
);
35 wxDataInputStream
& operator>>(wxInt8
& c
);
36 wxDataInputStream
& operator>>(wxInt16
& i
);
37 wxDataInputStream
& operator>>(wxInt32
& i
);
38 wxDataInputStream
& operator>>(wxUint8
& c
);
39 wxDataInputStream
& operator>>(wxUint16
& i
);
40 wxDataInputStream
& operator>>(wxUint32
& i
);
41 wxDataInputStream
& operator>>(double& i
);
42 wxDataInputStream
& operator>>(float& f
);
44 void BigEndianOrdered(bool be_order
) { m_be_order
= be_order
; }
46 wxInputStream
*m_input
;
50 class WXDLLEXPORT wxDataOutputStream
{
52 wxDataOutputStream(wxOutputStream
& s
);
53 ~wxDataOutputStream();
55 void Write32(wxUint32 i
);
56 void Write16(wxUint16 i
);
57 void Write8(wxUint8 i
);
58 void WriteDouble(double d
);
59 void WriteString(const wxString
& string
);
61 wxDataOutputStream
& operator<<(const wxChar
*string
);
62 wxDataOutputStream
& operator<<(wxString
& string
);
63 wxDataOutputStream
& operator<<(wxInt8 c
);
64 wxDataOutputStream
& operator<<(wxInt16 i
);
65 wxDataOutputStream
& operator<<(wxInt32 i
);
66 wxDataOutputStream
& operator<<(wxUint8 c
);
67 wxDataOutputStream
& operator<<(wxUint16 i
);
68 wxDataOutputStream
& operator<<(wxUint32 i
);
69 wxDataOutputStream
& operator<<(double f
);
70 wxDataOutputStream
& operator<<(float f
);
72 void BigEndianOrdered(bool be_order
) { m_be_order
= be_order
; }
74 wxOutputStream
*m_output
;