]> git.saurik.com Git - wxWidgets.git/blob - include/wx/txtstrm.h
Updated testconf
[wxWidgets.git] / include / wx / txtstrm.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: txtstrm.h
3 // Purpose: Text 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_TXTSTREAM_H_
13 #define _WX_TXTSTREAM_H_
14
15 #ifdef __GNUG__
16 #pragma interface "txtstrm.h"
17 #endif
18
19 #include <wx/stream.h>
20
21 #if wxUSE_STREAMS
22
23 class WXDLLEXPORT wxTextInputStream {
24 public:
25 wxTextInputStream(wxInputStream& s);
26 ~wxTextInputStream();
27
28 wxUint32 Read32();
29 wxUint16 Read16();
30 wxUint8 Read8();
31 double ReadDouble();
32 wxString ReadString();
33
34 // Operators
35 wxTextInputStream& operator>>(wxString& line);
36 wxTextInputStream& operator>>(wxChar& c);
37 wxTextInputStream& operator>>(wxInt16& i);
38 wxTextInputStream& operator>>(wxInt32& i);
39 wxTextInputStream& operator>>(wxUint16& i);
40 wxTextInputStream& operator>>(wxUint32& i);
41 wxTextInputStream& operator>>(double& i);
42 wxTextInputStream& operator>>(float& f);
43
44 protected:
45 wxInputStream *m_input;
46 };
47
48 class WXDLLEXPORT wxTextOutputStream {
49 public:
50 wxTextOutputStream(wxOutputStream& s);
51 ~wxTextOutputStream();
52
53 void Write32(wxUint32 i);
54 void Write16(wxUint16 i);
55 void Write8(wxUint8 i);
56 void WriteDouble(double d);
57 void WriteString(const wxString& string);
58
59 wxTextOutputStream& operator<<(const wxChar *string);
60 wxTextOutputStream& operator<<(const wxString& string);
61 wxTextOutputStream& operator<<(wxChar c);
62 wxTextOutputStream& operator<<(wxInt16 c);
63 wxTextOutputStream& operator<<(wxInt32 c);
64 wxTextOutputStream& operator<<(wxUint16 c);
65 wxTextOutputStream& operator<<(wxUint32 c);
66 wxTextOutputStream& operator<<(double f);
67 wxTextOutputStream& operator<<(float f);
68
69 protected:
70 wxOutputStream *m_output;
71 };
72
73 #endif
74 // wxUSE_STREAMS
75
76 #endif
77 // _WX_DATSTREAM_H_