]>
Commit | Line | Data |
---|---|---|
631f1bfe | 1 | \section{\class{wxDataInputStream}}\label{wxdatainputstream} |
4d1f281b | 2 | |
631f1bfe | 3 | This class provides functions that read data types in a |
4d1f281b GL |
4 | portable way. So, a file written by an Intel processor can be read by a |
5 | Sparc 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 | 23 | Constructs a datastream object from an input stream. Only read methods will |
4d1f281b GL |
24 | be 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 | 34 | Destroys the wxDataInputStream object. |
4d1f281b | 35 | |
631f1bfe | 36 | \membersection{wxDataInputStream::Read8} |
4d1f281b GL |
37 | |
38 | \func{unsigned char}{Read8}{\void} | |
39 | ||
40 | Reads a single byte from the stream. | |
41 | ||
631f1bfe | 42 | \membersection{wxDataInputStream::Read16} |
4d1f281b GL |
43 | |
44 | \func{unsigned short}{Read16}{\void} | |
45 | ||
46 | Reads a 16 bit integer from the stream. | |
47 | ||
631f1bfe | 48 | \membersection{wxDataInputStream::Read32} |
4d1f281b GL |
49 | |
50 | \func{unsigned long}{Read32}{\void} | |
51 | ||
52 | Reads a 32 bit integer from the stream. | |
53 | ||
631f1bfe | 54 | \membersection{wxDataInputStream::ReadDouble} |
4d1f281b GL |
55 | |
56 | \func{double}{ReadDouble}{\void} | |
57 | ||
58 | Reads 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 | 64 | Reads a string from a stream. Actually, this function first reads a long integer |
4d1f281b GL |
65 | specifying the length of the string (without the last null character) and then |
66 | reads the string. | |
67 | ||
631f1bfe | 68 | \membersection{wxDataInputStream::ReadLine} |
4d1f281b | 69 | |
631f1bfe | 70 | \func{wxString}{wxDataInputStream::ReadLine}{\void} |
4d1f281b GL |
71 | |
72 | Reads 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 | ||
76 | This class provides functions that write data types in a | |
77 | portable way. So, a file written by an Intel processor can be read by a | |
78 | Sparc or anything else. | |
79 | ||
80 | \latexignore{\rtfignore{\wxheading{Members}}} | |
81 | ||
82 | \membersection{wxDataOutputStream::wxDataOutputStream}\label{wxdataoutputstreamconstr} | |
83 | ||
84 | \func{}{wxDataInputStream}{\param{wxOutputStream\&}{ stream}} | |
85 | ||
86 | Constructs a datastream object from an output stream. Only read methods will | |
87 | be 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 | ||
97 | Destroys the wxDataOutputStream object. | |
98 | ||
99 | \membersection{wxDataOutputStream::Write8} | |
4d1f281b | 100 | |
631f1bfe | 101 | \func{void}{wxDataOutputStream::Write8}{{\param unsigned char }{i8}} |
4d1f281b GL |
102 | |
103 | Writes 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 | |
109 | Writes 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 | |
115 | Writes 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 | |
121 | Writes 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 | |
127 | Writes {\it string} to the stream. Actually, this method writes the size of | |
128 | the 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 | |
134 | Writes {\it string} as a line. Depending on the operating system, it adds | |
631f1bfe | 135 | $\backslash$n or $\backslash$r$\backslash$n. |
e14dccff | 136 |