]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/datostrm.tex
Tweaks to distrib scripts
[wxWidgets.git] / docs / latex / wx / datostrm.tex
CommitLineData
f3845e88
VZ
1\section{\class{wxDataOutputStream}}\label{wxdataoutputstream}
2
3This class provides functions that write binary data types in a
2edb0bde 4portable way. Data can be written in either big-endian or little-endian
f3845e88
VZ
5format, little-endian being the default on all architectures.
6
7If you want to write data to text files (or streams) use
8\helpref{wxTextOutputStream}{wxtextoutputstream} instead.
9
10The << operator is overloaded and you can use this class like a standard
11C++ iostream. See \helpref{wxDataInputStream}{wxdatainputstream} for its
12usage and caveats.
13
14See also \helpref{wxDataInputStream}{wxdatainputstream}.
15
16\wxheading{Derived from}
17
18None
19
20\latexignore{\rtfignore{\wxheading{Members}}}
21
22\membersection{wxDataOutputStream::wxDataOutputStream}\label{wxdataoutputstreamconstr}
23
24\func{}{wxDataOutputStream}{\param{wxOutputStream\&}{ stream}}
25
a99acbb0
VS
26\func{}{wxDataOutputStream}{\param{wxOutputStream\&}{ stream}, \param{wxMBConv\&}{ conv = wxMBConvUTF8}}
27
f3845e88 28Constructs a datastream object from an output stream. Only write methods will
a99acbb0 29be available. The second form is only available in Unicode build of wxWindows.
f3845e88
VZ
30
31\wxheading{Parameters}
32
33\docparam{stream}{The output stream.}
34
a99acbb0
VS
35\docparam{conv}{Charset conversion object object used to encoding Unicode
36strings before writing them to the stream
37in Unicode mode (see \helpref{wxDataOutputStream::WriteString}{wxdataoutputstreamwritestring}
38documentation for detailed description). Note that you must not destroy
39{\it conv} before you destroy this wxDataOutputStream instance! It is
40recommended to use default value (UTF-8).}
41
f3845e88
VZ
42\membersection{wxDataOutputStream::\destruct{wxDataOutputStream}}
43
44\func{}{\destruct{wxDataOutputStream}}{\void}
45
46Destroys the wxDataOutputStream object.
47
48\membersection{wxDataOutputStream::BigEndianOrdered}
49
50\func{void}{BigEndianOrdered}{\param{bool}{ be\_order}}
51
52If {\it be\_order} is TRUE, all data will be written in big-endian
53order, e.g. for reading on a Sparc or from Java-Streams (which
54always use big-endian order), otherwise data will be written in
55little-endian order.
56
57\membersection{wxDataOutputStream::Write8}
58
59\func{void}{Write8}{{\param wxUint8 }{i8}}
60
61Writes the single byte {\it i8} to the stream.
62
63\membersection{wxDataOutputStream::Write16}
64
65\func{void}{Write16}{{\param wxUint16 }{i16}}
66
67Writes the 16 bit integer {\it i16} to the stream.
68
69\membersection{wxDataOutputStream::Write32}
70
71\func{void}{Write32}{{\param wxUint32 }{i32}}
72
73Writes the 32 bit integer {\it i32} to the stream.
74
75\membersection{wxDataOutputStream::WriteDouble}
76
77\func{void}{WriteDouble}{{\param double }{f}}
78
79Writes the double {\it f} to the stream using the IEEE format.
80
a99acbb0
VS
81\membersection{wxDataOutputStream::WriteString}\label{wxdataoutputstreamwritestring}
82
83\func{void}{WriteString}{{\param const wxString\&}{string}}
f3845e88 84
f3845e88
VZ
85
86Writes {\it string} to the stream. Actually, this method writes the size of
87the string before writing {\it string} itself.
88
a99acbb0
VS
89In ANSI build of wxWindows, the string is written to the stream in exactly
90same way it is represented in memory. In Unicode build, however, the string
91is first converted to multibyte representation with {\it conv} object passed
92to stream's constructor (consequently, ANSI application can read data
93written by Unicode application, as long as they agree on encoding) and this
94representation is written to the stream. UTF-8 is used by default.