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