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