]>
Commit | Line | Data |
---|---|---|
1 | \section{\class{wxDataInputStream}}\label{wxdatainputstream} | |
2 | ||
3 | This class provides functions that read data types in a | |
4 | portable way. So, a file written by an Intel processor can be read by a | |
5 | Sparc or anything else. | |
6 | ||
7 | \wxheading{Derived from} | |
8 | ||
9 | \helpref{wxFilterInputStream}{wxfilterinputstream}\\ | |
10 | \helpref{wxInputStream}{wxinputstream}\\ | |
11 | \helpref{wxStreamBase}{wxstreambase} | |
12 | ||
13 | \wxheading{Include files} | |
14 | ||
15 | <wx/datstrm.h> | |
16 | ||
17 | \latexignore{\rtfignore{\wxheading{Members}}} | |
18 | ||
19 | \membersection{wxDataInputStream::wxDataInputStream}\label{wxdatainputstreamconstr} | |
20 | ||
21 | \func{}{wxDataInputStream}{\param{wxInputStream\&}{ stream}} | |
22 | ||
23 | Constructs a datastream object from an input stream. Only read methods will | |
24 | be available. | |
25 | ||
26 | \wxheading{Parameters} | |
27 | ||
28 | \docparam{stream}{The input stream.} | |
29 | ||
30 | \membersection{wxDataInputStream::\destruct{wxDataInputStream}} | |
31 | ||
32 | \func{}{\destruct{wxDataInputStream}}{\void} | |
33 | ||
34 | Destroys the wxDataInputStream object. | |
35 | ||
36 | \membersection{wxDataInputStream::Read8} | |
37 | ||
38 | \func{unsigned char}{Read8}{\void} | |
39 | ||
40 | Reads a single byte from the stream. | |
41 | ||
42 | \membersection{wxDataInputStream::Read16} | |
43 | ||
44 | \func{unsigned short}{Read16}{\void} | |
45 | ||
46 | Reads a 16 bit integer from the stream. | |
47 | ||
48 | \membersection{wxDataInputStream::Read32} | |
49 | ||
50 | \func{unsigned long}{Read32}{\void} | |
51 | ||
52 | Reads a 32 bit integer from the stream. | |
53 | ||
54 | \membersection{wxDataInputStream::ReadDouble} | |
55 | ||
56 | \func{double}{ReadDouble}{\void} | |
57 | ||
58 | Reads a double (IEEE encoded) from the stream. | |
59 | ||
60 | \membersection{wxDataInputStream::ReadLine} | |
61 | ||
62 | \func{wxString}{wxDataInputStream::ReadLine}{\void} | |
63 | ||
64 | Reads a line from the stream. A line is a string which ends with \\n or \\r\\n. | |
65 | ||
66 | \membersection{wxDataInputStream::ReadString} | |
67 | ||
68 | \func{wxString}{wxDataInputStream::ReadString}{\void} | |
69 | ||
70 | Reads a string from a stream. Actually, this function first reads a long integer | |
71 | specifying the length of the string (without the last null character) and then | |
72 | reads the string. | |
73 | ||
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} | |
100 | ||
101 | \func{void}{wxDataOutputStream::Write8}{{\param unsigned char }{i8}} | |
102 | ||
103 | Writes the single byte {\it i8} to the stream. | |
104 | ||
105 | \membersection{wxDataOutputStream::Write16} | |
106 | ||
107 | \func{void}{wxDataOutputStream::Write16}{{\param unsigned short }{i16}} | |
108 | ||
109 | Writes the 16 bit integer {\it i16} to the stream. | |
110 | ||
111 | \membersection{wxDataOutputStream::Write32} | |
112 | ||
113 | \func{void}{wxDataOutputStream::Write32}{{\param unsigned long }{i32}} | |
114 | ||
115 | Writes the 32 bit integer {\it i32} to the stream. | |
116 | ||
117 | \membersection{wxDataOutputStream::WriteDouble} | |
118 | ||
119 | \func{void}{wxDataOutputStream::WriteDouble}{{\param double }{f}} | |
120 | ||
121 | Writes the double {\it f} to the stream using the IEEE format. | |
122 | ||
123 | \membersection{wxDataOutputStream::WriteLine} | |
124 | ||
125 | \func{void}{wxDataOutputStream::WriteLine}{{\param const wxString\& }{string}} | |
126 | ||
127 | Writes {\it string} as a line. Depending on the operating system, it adds | |
128 | $\backslash$n or $\backslash$r$\backslash$n. | |
129 | ||
130 | \membersection{wxDataOutputStream::WriteString} | |
131 | ||
132 | \func{void}{wxDataOutputStream::WriteString}{{\param const wxString\& }{string}} | |
133 | ||
134 | Writes {\it string} to the stream. Actually, this method writes the size of | |
135 | the string before writing {\it string} itself. | |
136 |