]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/stream.tex
added wxJPEGHandler
[wxWidgets.git] / docs / latex / wx / stream.tex
CommitLineData
e2a6f233 1\section{\class{wxStreamBuffer}}\label{wxstreambuffer}
7da42094 2
b82827dd
JS
3\wxheading{Derived from}
4
5None
6
7da42094 7\wxheading{See also}
b82827dd 8
7da42094
GL
9\helpref{wxStreamBase}{wxstreambase}
10
11% ---------------------------------------------------------------------------
12% Members
13% ---------------------------------------------------------------------------
7da42094
GL
14\latexignore{\rtfignore{\wxheading{Members}}}
15
16% -----------
17% ctor & dtor
18% -----------
7da42094 19\membersection{wxStreamBuffer::wxStreamBuffer}
b82827dd
JS
20
21\func{}{wxStreamBuffer}{\param{wxStreamBase\&}{ stream}, \param{BufMode}{ mode}}
7da42094
GL
22
23Constructor, creates a new stream buffer using \it{stream} as a parent stream
24and \it{mode} as the IO mode. \it{mode} can be: wxStreamBuffer::read,
b82827dd 25wxStreamBuffer::write, wxStreamBuffer::read\_write.
7da42094
GL
26
27\membersection{wxStreamBuffer::wxStreamBuffer}
b82827dd 28
7da42094
GL
29\func{}{wxStreamBuffer}{\param{BufMode}{ mode}}
30
e2a6f233 31Constructor, creates a new empty stream buffer which won't flush any data
b82827dd 32to a stream. \it{mode} specifies the type of the buffer (read, write, read\_write).
7da42094
GL
33
34\membersection{wxStreamBuffer::wxStreamBuffer}
b82827dd
JS
35
36\func{}{wxStreamBuffer}{\param{const wxStreamBase\&}{ buffer}}
7da42094
GL
37
38Constructor, creates a new stream buffer from the specified stream \it{buffer}.
39
b82827dd
JS
40\membersection{wxStreamBuffer::\destruct{wxStreamBuffer}}
41
e2a6f233 42\func{}{wxStreamBuffer}{\destruct{wxStreamBuffer}}
7da42094
GL
43
44Destructor, destroys the stream buffer.
45
46% -----------
47% Filtered IO
48% -----------
7da42094 49\membersection{wxStreamBuffer::Read}\label{wxstreambufread}
b82827dd
JS
50
51\func{size\_t}{Read}{\param{void *}{buffer}, \param{size\_t }{size}}
7da42094
GL
52
53Reads a block of the specified \it{size} and stores datas in \it{buffer}.
54
55\wxheading{Return value}
56
b82827dd
JS
57It returns the real read size. If returned size is different of the specified
58\it{size}, an error occured and should be tested using
e2a6f233 59\helpref{LastError}{wxstreambaselasterror}.
7da42094
GL
60
61\membersection{wxStreamBuffer::Read}\label{wxstreambufreadbuf}
b82827dd
JS
62
63\func{size\_t}{Read}{\param{wxStreamBuffer *}{buffer}}
7da42094
GL
64
65Reads a \it{buffer}. The function returns when \it{buffer} is full or
66when there aren't datas anymore in the current buffer.
67
68\membersection{wxStreamBuffer::Write}
b82827dd
JS
69
70\func{size\_t}{Write}{\param{const void *}{buffer}, \param{size\_t }{size}}
7da42094
GL
71
72Writes a block of the specified \it{size} using datas of \it{buffer}.
73
74\membersection{wxStreamBuffer::Write}
b82827dd
JS
75
76\func{size\_t}{Write}{\param{wxStreamBuffer *}{buffer}}
7da42094
GL
77
78See \helpref{Read}{wxstreambufreadbuf}
79
80\membersection{wxStreamBuffer::WriteBack}
b82827dd 81
06ad8636 82\func{size\_t}{WriteBack}{\param{const char*}{ buffer}, \param{size\_t}{ size}}
7da42094
GL
83
84This function is only useful in ``read'' mode. It puts the specified \it{buffer}
85in the input queue of the stream buf. By this way, the next
86\helpref{Read}{wxstreambufread} call will first use these datas.
87
88\membersection{wxStreamBuffer::WriteBack}
b82827dd
JS
89
90\func{size\_t}{WriteBack}{\param{char }{c}}
7da42094
GL
91
92As for the previous function, it puts the specified byte in the input queue of the
93stream buffer.
94
95\membersection{wxStreamBuffer::GetChar}
b82827dd 96
7da42094
GL
97\func{char}{GetChar}{\void}
98
99Gets a single char from the stream buffer.
100
101\membersection{wxStreamBuffer::PutChar}
b82827dd 102
7da42094
GL
103\func{void}{PutChar}{\param{char }{c}}
104
105Puts a single char to the stream buffer.
106
107\membersection{wxStreamBuffer::Tell}
b82827dd
JS
108
109\constfunc{off\_t}{Tell}{\void}
7da42094
GL
110
111Gets the current position in the \it{stream}.
112
e2a6f233 113\membersection{wxStreamBuffer::Seek}\label{wxstreambufferseek}
b82827dd
JS
114
115\func{off\_t}{Seek}{\param{off\_t }{pos}, \param{wxSeekMode }{mode}}
7da42094
GL
116
117Changes the current position. (TODO)
118
119% --------------
120% Buffer control
121% --------------
7da42094 122\membersection{wxStreamBuffer::ResetBuffer}
b82827dd 123
7da42094
GL
124\func{void}{ResetBuffer}{\void}
125
126Frees all internal buffers and resets to initial state all variables.
127
128\membersection{wxStreamBuffer::SetBufferIO}
b82827dd 129
06ad8636 130\func{void}{SetBufferIO}{\param{char*}{ buffer\_start}, \param{char*}{ buffer\_end}}
7da42094
GL
131
132Specifies which pointers to use for stream buffering. You need to pass a pointer on the
133start of the buffer end and another on the end.
134
135\membersection{wxStreamBuffer::SetBufferIO}
b82827dd
JS
136
137\func{void}{SetBufferIO}{\param{size\_t}{ bufsize}}
7da42094
GL
138
139Changes the size of the current IO buffer.
140
141\membersection{wxStreamBuffer::GetBufferStart}
b82827dd 142
7da42094
GL
143\constfunc{char *}{GetBufferStart}{\void}
144
145Returns a pointer on the start of the stream buffer.
146
147\membersection{wxStreamBuffer::GetBufferEnd}
b82827dd 148
7da42094
GL
149\constfunc{char *}{GetBufferEnd}{\void}
150
151Returns a pointer on the end of the stream buffer.
152
153\membersection{wxStreamBuffer::GetBufferPos}
b82827dd 154
7da42094
GL
155\constfunc{char *}{GetBufferPos}{\void}
156
157Returns a pointer on the current position of the stream buffer.
158
159\membersection{wxStreamBuffer::GetIntPosition}
b82827dd
JS
160
161\constfunc{off\_t}{GetIntPosition}{\void}
7da42094
GL
162
163Returns the current position in the stream buffer.
164
165\membersection{wxStreamBuffer::SetIntPosition}
b82827dd 166
7da42094
GL
167\func{void}{SetIntPosition}{\void}
168
169Sets the current position in the stream buffer.
170
171\membersection{wxStreamBuffer::GetLastAccess}
b82827dd
JS
172
173\constfunc{size\_t}{GetLastAccess}{\void}
7da42094
GL
174
175Returns the amount of bytes read during the last IO call to the parent stream.
176
177\membersection{wxStreamBuffer::Fixed}
b82827dd 178
7da42094
GL
179\func{void}{Fixed}{\param{bool}{ fixed}}
180
b82827dd
JS
181Toggles the fixed flag. Usually this flag is toggled at the same time as
182\it{flushable}. This flag allows (when it is FALSE) or forbids (when it is TRUE)
7da42094
GL
183the stream buffer to resize dynamically the IO buffer.
184
185\membersection{wxStreamBuffer::Flushable}
b82827dd 186
7da42094
GL
187\func{void}{Flushable}{\param{bool}{ flushable}}
188
189Toggles the flushable flag. If \it{flushable} is disabled, no datas are sent
190to the parent stream.
191
192\membersection{wxStreamBuffer::FlushBuffer}
b82827dd 193
7da42094
GL
194\func{bool}{FlushBuffer}{\void}
195
196Flushes the IO buffer.
197
198\membersection{wxStreamBuffer::FillBuffer}
b82827dd 199
7da42094
GL
200\func{bool}{FillBuffer}{\void}
201
202Fill the IO buffer.
203
204\membersection{wxStreamBuffer::GetDataLeft}
b82827dd
JS
205
206\func{size\_t}{GetDataLeft}{\void}
7da42094
GL
207
208Returns the amount of available datas in the buffer.
209
210% --------------
211% Administration
212% --------------
7da42094 213\membersection{wxStreamBuffer::Stream}
b82827dd 214
06ad8636 215\func{wxStreamBase*}{Stream}{\void}
7da42094
GL
216
217Returns the stream parent of the stream buffer.
b82827dd 218