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