]>
Commit | Line | Data |
---|---|---|
e2a6f233 | 1 | \section{\class{wxStreamBuffer}}\label{wxstreambuffer} |
7da42094 | 2 | |
b82827dd JS |
3 | \wxheading{Derived from} |
4 | ||
5 | None | |
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 | |
23 | Constructor, creates a new stream buffer using \it{stream} as a parent stream | |
24 | and \it{mode} as the IO mode. \it{mode} can be: wxStreamBuffer::read, | |
b82827dd | 25 | wxStreamBuffer::write, wxStreamBuffer::read\_write. |
7da42094 GL |
26 | |
27 | \membersection{wxStreamBuffer::wxStreamBuffer} | |
b82827dd | 28 | |
7da42094 GL |
29 | \func{}{wxStreamBuffer}{\param{BufMode}{ mode}} |
30 | ||
e2a6f233 | 31 | Constructor, creates a new empty stream buffer which won't flush any data |
b82827dd | 32 | to 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 | |
38 | Constructor, 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 | |
44 | Destructor, 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 | |
53 | Reads a block of the specified \it{size} and stores datas in \it{buffer}. | |
54 | ||
55 | \wxheading{Return value} | |
56 | ||
b82827dd JS |
57 | It 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 | |
65 | Reads a \it{buffer}. The function returns when \it{buffer} is full or | |
66 | when 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 | |
72 | Writes 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 | |
78 | See \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 | |
84 | This function is only useful in ``read'' mode. It puts the specified \it{buffer} | |
85 | in 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 | |
92 | As for the previous function, it puts the specified byte in the input queue of the | |
93 | stream buffer. | |
94 | ||
95 | \membersection{wxStreamBuffer::GetChar} | |
b82827dd | 96 | |
7da42094 GL |
97 | \func{char}{GetChar}{\void} |
98 | ||
99 | Gets a single char from the stream buffer. | |
100 | ||
101 | \membersection{wxStreamBuffer::PutChar} | |
b82827dd | 102 | |
7da42094 GL |
103 | \func{void}{PutChar}{\param{char }{c}} |
104 | ||
105 | Puts a single char to the stream buffer. | |
106 | ||
107 | \membersection{wxStreamBuffer::Tell} | |
b82827dd JS |
108 | |
109 | \constfunc{off\_t}{Tell}{\void} | |
7da42094 GL |
110 | |
111 | Gets 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 | |
117 | Changes 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 | ||
126 | Frees 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 | |
132 | Specifies which pointers to use for stream buffering. You need to pass a pointer on the | |
133 | start 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 | |
139 | Changes the size of the current IO buffer. | |
140 | ||
141 | \membersection{wxStreamBuffer::GetBufferStart} | |
b82827dd | 142 | |
7da42094 GL |
143 | \constfunc{char *}{GetBufferStart}{\void} |
144 | ||
145 | Returns a pointer on the start of the stream buffer. | |
146 | ||
147 | \membersection{wxStreamBuffer::GetBufferEnd} | |
b82827dd | 148 | |
7da42094 GL |
149 | \constfunc{char *}{GetBufferEnd}{\void} |
150 | ||
151 | Returns a pointer on the end of the stream buffer. | |
152 | ||
153 | \membersection{wxStreamBuffer::GetBufferPos} | |
b82827dd | 154 | |
7da42094 GL |
155 | \constfunc{char *}{GetBufferPos}{\void} |
156 | ||
157 | Returns 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 | |
163 | Returns the current position in the stream buffer. | |
164 | ||
165 | \membersection{wxStreamBuffer::SetIntPosition} | |
b82827dd | 166 | |
7da42094 GL |
167 | \func{void}{SetIntPosition}{\void} |
168 | ||
169 | Sets the current position in the stream buffer. | |
170 | ||
171 | \membersection{wxStreamBuffer::GetLastAccess} | |
b82827dd JS |
172 | |
173 | \constfunc{size\_t}{GetLastAccess}{\void} | |
7da42094 GL |
174 | |
175 | Returns 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 |
181 | Toggles 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 |
183 | the 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 | ||
189 | Toggles the flushable flag. If \it{flushable} is disabled, no datas are sent | |
190 | to the parent stream. | |
191 | ||
192 | \membersection{wxStreamBuffer::FlushBuffer} | |
b82827dd | 193 | |
7da42094 GL |
194 | \func{bool}{FlushBuffer}{\void} |
195 | ||
196 | Flushes the IO buffer. | |
197 | ||
198 | \membersection{wxStreamBuffer::FillBuffer} | |
b82827dd | 199 | |
7da42094 GL |
200 | \func{bool}{FillBuffer}{\void} |
201 | ||
202 | Fill the IO buffer. | |
203 | ||
204 | \membersection{wxStreamBuffer::GetDataLeft} | |
b82827dd JS |
205 | |
206 | \func{size\_t}{GetDataLeft}{\void} | |
7da42094 GL |
207 | |
208 | Returns 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 | |
217 | Returns the stream parent of the stream buffer. | |
b82827dd | 218 |