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
;
24 class WXDLLEXPORT wxTextOutputStream
;
26 typedef wxTextInputStream
& (*__wxTextInputManip
)(wxTextInputStream
&);
27 typedef wxTextOutputStream
& (*__wxTextOutputManip
)(wxTextOutputStream
&);
29 WXDLLEXPORT wxTextOutputStream
&endl( wxTextOutputStream
&stream
);
31 class WXDLLEXPORT wxTextInputStream
{
33 wxTextInputStream(wxInputStream
& s
);
40 wxString
ReadString();
43 wxTextInputStream
& operator>>(wxString
& line
);
44 wxTextInputStream
& operator>>(wxChar
& c
);
45 wxTextInputStream
& operator>>(wxInt16
& i
);
46 wxTextInputStream
& operator>>(wxInt32
& i
);
47 wxTextInputStream
& operator>>(wxUint16
& i
);
48 wxTextInputStream
& operator>>(wxUint32
& i
);
49 wxTextInputStream
& operator>>(double& i
);
50 wxTextInputStream
& operator>>(float& f
);
52 wxTextInputStream
& operator>>( __wxTextInputManip func
) { return func(*this); }
55 wxInputStream
*m_input
;
57 wxChar
NextNonWhiteSpace();
58 void SkipIfEndOfLine( wxChar c
);
61 class WXDLLEXPORT wxTextOutputStream
{
63 wxTextOutputStream(wxOutputStream
& s
);
64 ~wxTextOutputStream();
66 void Write32(wxUint32 i
);
67 void Write16(wxUint16 i
);
68 void Write8(wxUint8 i
);
69 void WriteDouble(double d
);
70 void WriteString(const wxString
& string
);
72 wxTextOutputStream
& operator<<(const wxChar
*string
);
73 wxTextOutputStream
& operator<<(const wxString
& string
);
74 wxTextOutputStream
& operator<<(wxChar c
);
75 wxTextOutputStream
& operator<<(wxInt16 c
);
76 wxTextOutputStream
& operator<<(wxInt32 c
);
77 wxTextOutputStream
& operator<<(wxUint16 c
);
78 wxTextOutputStream
& operator<<(wxUint32 c
);
79 wxTextOutputStream
& operator<<(double f
);
80 wxTextOutputStream
& operator<<(float f
);
82 wxTextOutputStream
& operator<<( __wxTextOutputManip func
) { return func(*this); }
85 wxOutputStream
*m_output
;