]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/datstrm.tex
enable verbose messages by default in debug builds
[wxWidgets.git] / docs / latex / wx / datstrm.tex
1 \section{\class{wxDataInputStream}}\label{wxdatainputstream}
2
3 This class provides functions that read data types in a
4 portable way. So, a file written by an Intel processor can be read by a
5 Sparc or anything else.
6
7 \wxheading{Derived from}
8
9 \helpref{wxFilterInputStream}{wxfilterinputstream}\\
10 \helpref{wxInputStream}{wxinputstream}\\
11 \helpref{wxStreamBase}{wxstreambase}
12
13 \latexignore{\rtfignore{\wxheading{Members}}}
14
15 \membersection{wxDataInputStream::wxDataInputStream}\label{wxdatainputstreamconstr}
16
17 \func{}{wxDataInputStream}{\param{wxInputStream\&}{ stream}}
18
19 Constructs a datastream object from an input stream. Only read methods will
20 be available.
21
22 \wxheading{Parameters}
23
24 \docparam{stream}{The input stream.}
25
26 \membersection{wxDataInputStream::\destruct{wxDataInputStream}}
27
28 \func{}{\destruct{wxDataInputStream}}{\void}
29
30 Destroys the wxDataInputStream object.
31
32 \membersection{wxDataInputStream::Read8}
33
34 \func{unsigned char}{Read8}{\void}
35
36 Reads a single byte from the stream.
37
38 \membersection{wxDataInputStream::Read16}
39
40 \func{unsigned short}{Read16}{\void}
41
42 Reads a 16 bit integer from the stream.
43
44 \membersection{wxDataInputStream::Read32}
45
46 \func{unsigned long}{Read32}{\void}
47
48 Reads a 32 bit integer from the stream.
49
50 \membersection{wxDataInputStream::ReadDouble}
51
52 \func{double}{ReadDouble}{\void}
53
54 Reads a double (IEEE encoded) from the stream.
55
56 \membersection{wxDataInputStream::ReadString}
57
58 \func{wxString}{wxDataInputStream::ReadString}{\void}
59
60 Reads a string from a stream. Actually, this function first reads a long integer
61 specifying the length of the string (without the last null character) and then
62 reads the string.
63
64 \membersection{wxDataInputStream::ReadLine}
65
66 \func{wxString}{wxDataInputStream::ReadLine}{\void}
67
68 Reads a line from the stream. A line is a string which ends with \\n or \\r\\n.
69
70 \section{\class{wxDataOutputStream}}\label{wxdataoutputstream}
71
72 This class provides functions that write data types in a
73 portable way. So, a file written by an Intel processor can be read by a
74 Sparc or anything else.
75
76 \latexignore{\rtfignore{\wxheading{Members}}}
77
78 \membersection{wxDataOutputStream::wxDataOutputStream}\label{wxdataoutputstreamconstr}
79
80 \func{}{wxDataInputStream}{\param{wxOutputStream\&}{ stream}}
81
82 Constructs a datastream object from an output stream. Only read methods will
83 be available.
84
85 \wxheading{Parameters}
86
87 \docparam{stream}{The output stream.}
88
89 \membersection{wxDataOutputStream::\destruct{wxDataOutputStream}}
90
91 \func{}{\destruct{wxDataOutputStream}}{\void}
92
93 Destroys the wxDataOutputStream object.
94
95 \membersection{wxDataOutputStream::Write8}
96
97 \func{void}{wxDataOutputStream::Write8}{{\param unsigned char }{i8}}
98
99 Writes the single byte {\it i8} to the stream.
100
101 \membersection{wxDataOutputStream::Write16}
102
103 \func{void}{wxDataOutputStream::Write16}{{\param unsigned short }{i16}}
104
105 Writes the 16 bit integer {\it i16} to the stream.
106
107 \membersection{wxDataOutputStream::Write32}
108
109 \func{void}{wxDataOutputStream::Write32}{{\param unsigned long }{i32}}
110
111 Writes the 32 bit integer {\it i32} to the stream.
112
113 \membersection{wxDataOutputStream::WriteDouble}
114
115 \func{void}{wxDataOutputStream::WriteDouble}{{\param double }{f}}
116
117 Writes the double {\it f} to the stream using the IEEE format.
118
119 \membersection{wxDataOutputStream::WriteString}
120
121 \func{void}{wxDataOutputStream::WriteString}{{\param const wxString\& }{string}}
122
123 Writes {\it string} to the stream. Actually, this method writes the size of
124 the string before writing {\it string} itself.
125
126 \membersection{wxDataOutputStream::WriteLine}
127
128 \func{void}{wxDataOutputStream::WriteLine}{{\param const wxString\& }{string}}
129
130 Writes {\it string} as a line. Depending on the operating system, it adds
131 $\backslash$n or $\backslash$r$\backslash$n.
132