1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Text stream classes
4 // Author: Guilhem Lavaux
8 // Copyright: (c) Guilhem Lavaux
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_TXTSTREAM_H_
13 #define _WX_TXTSTREAM_H_
16 #pragma interface "txtstrm.h"
19 #include <wx/stream.h>
23 class WXDLLEXPORT wxTextInputStream
{
25 wxTextInputStream(wxInputStream
& s
);
32 wxString
ReadString();
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
);
45 wxInputStream
*m_input
;
47 wxChar
NextNonWhiteSpace();
48 void SkipIfEndOfLine( wxChar c
);
51 class WXDLLEXPORT wxTextOutputStream
{
53 wxTextOutputStream(wxOutputStream
& s
);
54 ~wxTextOutputStream();
56 void Write32(wxUint32 i
);
57 void Write16(wxUint16 i
);
58 void Write8(wxUint8 i
);
59 void WriteDouble(double d
);
60 void WriteString(const wxString
& string
);
62 wxTextOutputStream
& operator<<(const wxChar
*string
);
63 wxTextOutputStream
& operator<<(const wxString
& string
);
64 wxTextOutputStream
& operator<<(wxChar c
);
65 wxTextOutputStream
& operator<<(wxInt16 c
);
66 wxTextOutputStream
& operator<<(wxInt32 c
);
67 wxTextOutputStream
& operator<<(wxUint16 c
);
68 wxTextOutputStream
& operator<<(wxUint32 c
);
69 wxTextOutputStream
& operator<<(double f
);
70 wxTextOutputStream
& operator<<(float f
);
73 wxOutputStream
*m_output
;