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