Made wxGTK dataobj.cpp compile; removed flashing from wxGLCanvas samples;
[wxWidgets.git] / docs / latex / wx / stream2.tex
1 % -----------------------------------------------------------------------------
2 % wxStreamBase
3 % -----------------------------------------------------------------------------
4 \section{\class{wxStreamBase}}\label{wxstreambase}
5
6 \wxheading{Derived from}
7
8 None
9
10 \wxheading{See also}
11
12 \helpref{wxStreamBuffer}{wxstreambuffer}
13
14 % -----------------------------------------------------------------------------
15 % Members
16 % -----------------------------------------------------------------------------
17 \latexignore{\rtfignore{\wxheading{Members}}}
18
19 % -----------
20 % ctor & dtor
21 % -----------
22
23 \membersection{wxStreamBase::wxStreamBase}
24
25 \func{}{wxStreamBase}{\void}
26
27 Creates a dummy stream object.
28
29 \membersection{wxStreamBase::\destruct{wxStreamBase}}
30
31 \func{}{\destruct{wxStreamBase}}
32
33 Destructor.
34
35 \membersection{wxStreamBase::LastError}
36
37 \constfunc{wxStreamError}{LastError}{\void}
38
39 This function returns the last error.
40 % It is of the form:
41 % TODO
42
43 \membersection{wxStreamBase::StreamSize}
44 \constfunc{size_t}{StreamSize}{\void}
45
46 This function returns the size of the stream. For example, for a file it is the size of
47 the file). Warning! There are streams which do not have size by definition, such as a socket.
48
49 \membersection{wxStreamBase::OnSysRead}\label{wxstreambaseonsysread}
50
51 \func{size_t}{OnSysRead}{\param{void*}{ buffer}, \param{size_t}{ bufsize}}
52
53 Internal function. It is called when the stream buffer needs a buffer of the
54 specified size. It should return the size that was actually read.
55
56 \membersection{wxStreamBase::OnSysWrite}
57
58 \func{size_t}{OnSysWrite}{\param{void *}{buffer}, \param{size_t}{ bufsize}}
59
60 See \helpref{OnSysRead}{wxstreambaseonsysread}.
61
62 \membersection{wxStreamBase::OnSysSeek}
63
64 \func{off_t}{OnSysSeek}{\param{off_t}{ pos}, \param{wxSeekMode}{ mode}}
65
66 Internal function. It is called when the stream buffer needs to change the
67 current position in the stream. See \helpref{wxStreamBuffer::Seek}{wxstreambufferseek}
68
69 \membersection{wxStreamBase::OnSysTell}
70
71 \constfunc{off_t}{OnSysTell}{\void}
72
73 Internal function. Is is called when the stream buffer needs to know the
74 current position in the stream.
75
76 % -----------------------------------------------------------------------------
77 % wxInputStream
78 % -----------------------------------------------------------------------------
79 \section{\class{wxInputStream}}\label{wxinputstream}
80
81 \wxheading{Derived from}
82
83 \helpref{wxStreamBase}{wxstreambase}
84
85 \wxheading{See also}
86
87 \helpref{wxStreamBuffer}{wxstreambuffer}
88
89 % -----------
90 % ctor & dtor
91 % -----------
92 \membersection{wxInputStream::wxInputStream}
93
94 \func{}{wxInputStream}{\void}
95
96 Creates a dummy input stream.
97
98 \func{}{wxInputStream}{\param{wxStreamBuffer *}{sbuf}}
99
100 Creates an input stream using the specified stream buffer \it{sbuf}. This
101 stream buffer can point to another stream.
102
103 \membersection{wxInputStream::\destruct{wxInputStream}}
104
105 \func{}{\destruct{wxInputStream}}
106
107 Destructor.
108
109 % -----------
110 % IO function
111 % -----------
112 \membersection{wxInputStream::Peek}
113
114 \func{char}{Peek}{\void}
115
116 Returns the first character in the input queue without removing it.
117
118 \membersection{wxInputStream::GetC}
119
120 \func{char}{GetC}{\void}
121
122 Returns the first character in the input queue and removes it.
123
124 \membersection{wxInputStream::Read}
125
126 \func{wxInputStream\&}{Read}{\param{void *}{buffer}, \param{size_t}{ size}}
127
128 Reads the specified amount of bytes and stores the data in \it{buffer}.
129
130 \it{WARNING!} The buffer absolutely needs to have at least the specified size.
131
132 This function returns a reference on the current object, so the user can test
133 any states of the stream right away.
134
135 \func{wxInputStream\&}{Read}{\param{wxOutputStream\&}{ stream_out}}
136
137 Reads data from the input queue and stores it in the specified output stream.
138 The data is read until an error is raised by one of the two streams.
139
140 % ------------------
141 % Position functions
142 % ------------------
143 \membersection{wxInputStream::SeekI}
144
145 \func{off_t}{SeekI}{\param{off_t}{ pos}, \param{wxSeekMode}{ mode = wxFromStart}}
146
147 Changes the stream current position.
148
149 \membersection{wxInputStream::TellI}
150
151 \constfunc{off_t}{TellI}{\void}
152
153 Returns the current stream position.
154
155 % ---------------
156 % State functions
157 % ---------------
158 \membersection{wxInputStream::InputStreamBuffer}
159
160 \func{wxStreamBuffer*}{InputStreamBuffer}{\void}
161
162 Returns the stream buffer associated with the input stream.
163
164 \membersection{wxInputStream::LastRead}
165
166 \constfunc{size_t}{LastRead}{\void}
167
168 Returns the last amount of bytes read.
169
170 % -----------------------------------------------------------------------------
171 % wxOutputStream
172 % -----------------------------------------------------------------------------
173 \section{\class{wx0utputStream}}\label{wxoutputstream}
174
175 \wxheading{Derived from}
176
177 \helpref{wxStreamBase}{wxstreambase}
178
179 \wxheading{See also}
180
181 \helpref{wxStreamBuffer}{wxstreambuffer}
182
183 % -----------
184 % ctor & dtor
185 % -----------
186 \membersection{wxOutputStream::wxOutputStream}
187
188 \func{}{wxOutputStream}{\void}
189
190 Creates a dummy wxOutputStream object.
191
192 \func{}{wxOutputStream}{\param{wxStreamBuffer*}{ sbuf}}
193
194 Creates an input stream using the specified stream buffer \it{sbuf}. This
195 stream buffer can point to another stream.
196
197 \membersection{wxOutputStream::\destruct{wxOutputStream}}
198
199 \func{}{\destruct{wxOutputStream}}
200
201 Destructor.
202
203 % -----------
204 % IO function
205 % -----------
206 \membersection{wxOutputStream::PutC}
207
208 \func{void}{PutC}{\param{char}{ c}}
209
210 Puts the specified character in the output queue and increments the
211 stream position.
212
213 \membersection{wxOutputStream::Write}
214
215 \func{wxOutputStream\&}{Write}{\param{const void *}{buffer}, \param{size_t}{ size}}
216
217 Writes the specified amount of bytes using the data of \it{buffer}.
218 \it{WARNING!} The buffer absolutely needs to have at least the specified size.
219
220 This function returns a reference on the current object, so the user can test
221 any states of the stream right away.
222
223 \func{wxOutputStream\&}{Write}{\param{wxInputStream\&}{ stream_in}}
224
225 Reads data from the specified input stream and stores them
226 in the current stream. The data is read until an error is raised
227 by one of the two streams.
228
229 % ------------------
230 % Position functions
231 % ------------------
232 \membersection{wxOutputStream::SeekO}
233
234 \func{off_t}{SeekO}{\param{off_t}{ pos}, \param{wxSeekMode}}
235
236 Changes the stream current position.
237
238 \membersection{wxOutputStream::TellO}
239
240 \constfunc{off_t}{TellO}{\void}
241
242 Returns the current stream position.
243
244 % ---------------
245 % State functions
246 % ---------------
247 \membersection{wxOutputStream::OutputStreamBuffer}
248
249 \func{wxStreamBuffer *}{OutputStreamBuffer}{\void}
250
251 Returns the stream buffer associated with the output stream.
252
253 \membersection{wxOutputStream::LastWrite}
254
255 \constfunc{size_t}{LastWrite}{\void}
256
257 % -----------------------------------------------------------------------------
258 % wxFilterInputStream
259 % -----------------------------------------------------------------------------
260 \section{\class{wxFilterInputStream}}\label{wxfilterinputstream}
261
262 \wxheading{Derived from}
263
264 \helpref{wxInputStream}{wxinputstream}
265
266 \wxheading{Note}
267
268 The use of this class is exactly the same as of wxInputStream. Only a constructor
269 differs and it is documented below.
270
271 % -----------
272 % ctor & dtor
273 % -----------
274 \membersection{wxFilterInputStream::wxFilterInputStream}
275
276 \func{}{wxFilterInputStream}{\param{wxInputStream\&}{ stream}}
277
278 % -----------------------------------------------------------------------------
279 % wxFilterOutputStream
280 % -----------------------------------------------------------------------------
281 \section{\class{wxFilterOutputStream}}\label{wxfilteroutputstream}
282
283 \wxheading{Derived from}
284
285 \helpref{wxOutputStream}{wxoutputstream}
286
287 \wxheading{Note}
288
289 The use of this class is exactly the same as of wxOutputStream. Only a constructor
290 differs and it is documented below.
291
292 % -----------
293 % ctor & dtor
294 % -----------
295 \membersection{wxFilterOutputStream::wxFilterOutputStream}
296
297 \func{}{wxFilterOutputStream}{\param{wxOutputStream\&}{ stream}}