]> git.saurik.com Git - wxWidgets.git/blob - include/wx/datstrm.h
cosmetic, added some comment
[wxWidgets.git] / include / wx / datstrm.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: datstrm.h
3 // Purpose: Data stream classes
4 // Author: Guilhem Lavaux
5 // Modified by:
6 // Created: 28/06/1998
7 // RCS-ID: $Id$
8 // Copyright: (c) Guilhem Lavaux
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_DATSTREAM_H_
13 #define _WX_DATSTREAM_H_
14
15 #ifdef __GNUG__
16 #pragma interface "datstrm.h"
17 #endif
18
19 #include <wx/stream.h>
20
21 #if wxUSE_STREAMS
22
23 class WXDLLEXPORT wxDataInputStream {
24 public:
25 wxDataInputStream(wxInputStream& s);
26 ~wxDataInputStream();
27
28 wxUint32 Read32();
29 wxUint16 Read16();
30 wxUint8 Read8();
31 double ReadDouble();
32 wxString ReadString();
33
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);
43 protected:
44 wxInputStream *m_input;
45 };
46
47 class WXDLLEXPORT wxDataOutputStream {
48 public:
49 wxDataOutputStream(wxOutputStream& s);
50 ~wxDataOutputStream();
51
52 void Write32(wxUint32 i);
53 void Write16(wxUint16 i);
54 void Write8(wxUint8 i);
55 void WriteDouble(double d);
56 void WriteString(const wxString& string);
57
58 wxDataOutputStream& operator<<(const wxChar *string);
59 wxDataOutputStream& operator<<(wxString& string);
60 wxDataOutputStream& operator<<(wxInt8 c);
61 wxDataOutputStream& operator<<(wxInt16 i);
62 wxDataOutputStream& operator<<(wxInt32 i);
63 wxDataOutputStream& operator<<(wxUint8 c);
64 wxDataOutputStream& operator<<(wxUint16 i);
65 wxDataOutputStream& operator<<(wxUint32 i);
66 wxDataOutputStream& operator<<(double f);
67 wxDataOutputStream& operator<<(float f);
68
69 protected:
70 wxOutputStream *m_output;
71 };
72
73 #endif
74 // wxUSE_STREAMS
75
76 #endif
77 // _WX_DATSTREAM_H_