]>
Commit | Line | Data |
---|---|---|
45516216 | 1 | // /usr/libexec/gcc/x86_64-pc-linux-gnu/4.1.1/cc1plus -quiet -I.pch/wxprec_advdll -Ilib/wx/include/gtk2-ansi-release-2.6 -I/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -MMD .pch/wxprec_advdll/wx/wxprec.h.d -MF .deps/_pch_wxprec_advdll_wx_wxprec_h_gch.d -MQ .pch/wxprec_advdll/wx/wxprec.h.gch -D_GNU_SOURCE -D_REENTRANT -D__WXGTK__ -DWXUSINGDLL -DWXMAKINGDLL_ADV -DPIC -DWX_PRECOMP -DNO_GCC_PRAGMA -DGTK_NO_CHECK_CASTS -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES /var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wxprec.h -quiet -dumpbase wxprec.h -march=nocona -auxbase wxprec -O2 -O2 -Wall -Wundef -Wno-ctor-dtor-privacy -fPIC -fno-strict-aliasing -fomit-frame-pointer -fno-strict-aliasing -o - --output-pch= .pch/wxprec_advdll/wx/wxprec.h.gch -frandom-seed=0 |
2 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wxprec.h" | |
3 | # 1 "<built-in>" | |
4 | # 1 "<command line>" | |
5 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wxprec.h" | |
6 | # 13 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wxprec.h" | |
7 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" 1 | |
8 | # 21 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" | |
9 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/platform.h" 1 | |
10 | # 190 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/platform.h" | |
11 | # 1 "lib/wx/include/gtk2-ansi-release-2.6/wx/setup.h" 1 | |
12 | ||
13 | ||
14 | ||
15 | ||
16 | ||
17 | ||
18 | ||
19 | #pragma interface | |
20 | # 1035 "lib/wx/include/gtk2-ansi-release-2.6/wx/setup.h" | |
21 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/chkconf.h" 1 | |
22 | # 1036 "lib/wx/include/gtk2-ansi-release-2.6/wx/setup.h" 2 | |
23 | # 191 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/platform.h" 2 | |
24 | # 271 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/platform.h" | |
25 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/chkconf.h" 1 | |
26 | # 272 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/platform.h" 2 | |
27 | # 22 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" 2 | |
28 | # 62 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" | |
29 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/features.h" 1 | |
30 | # 63 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" 2 | |
31 | # 113 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" | |
32 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/version.h" 1 | |
33 | # 114 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" 2 | |
34 | # 216 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" | |
35 | typedef short int WXTYPE; | |
36 | ||
37 | ||
38 | ||
39 | ||
40 | ||
41 | ||
42 | typedef int wxWindowID; | |
43 | # 472 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" | |
44 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dlimpexp.h" 1 | |
45 | # 473 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" 2 | |
46 | # 509 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" | |
47 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/debug.h" 1 | |
48 | # 18 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/debug.h" | |
49 | # 1 "/usr/include/assert.h" 1 3 4 | |
50 | ||
51 | ||
52 | ||
53 | ||
54 | ||
55 | ||
56 | ||
57 | # 1 "/usr/include/gentoo-multilib/amd64/assert.h" 1 3 4 | |
58 | # 36 "/usr/include/gentoo-multilib/amd64/assert.h" 3 4 | |
59 | # 1 "/usr/include/features.h" 1 3 4 | |
60 | ||
61 | ||
62 | ||
63 | ||
64 | ||
65 | ||
66 | ||
67 | # 1 "/usr/include/gentoo-multilib/amd64/features.h" 1 3 4 | |
68 | # 323 "/usr/include/gentoo-multilib/amd64/features.h" 3 4 | |
69 | # 1 "/usr/include/sys/cdefs.h" 1 3 4 | |
70 | ||
71 | ||
72 | ||
73 | ||
74 | ||
75 | ||
76 | ||
77 | # 1 "/usr/include/gentoo-multilib/amd64/sys/cdefs.h" 1 3 4 | |
78 | # 313 "/usr/include/gentoo-multilib/amd64/sys/cdefs.h" 3 4 | |
79 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
80 | ||
81 | ||
82 | ||
83 | ||
84 | ||
85 | ||
86 | ||
87 | # 1 "/usr/include/gentoo-multilib/amd64/bits/wordsize.h" 1 3 4 | |
88 | # 9 "/usr/include/bits/wordsize.h" 2 3 4 | |
89 | # 314 "/usr/include/gentoo-multilib/amd64/sys/cdefs.h" 2 3 4 | |
90 | # 9 "/usr/include/sys/cdefs.h" 2 3 4 | |
91 | # 324 "/usr/include/gentoo-multilib/amd64/features.h" 2 3 4 | |
92 | # 346 "/usr/include/gentoo-multilib/amd64/features.h" 3 4 | |
93 | # 1 "/usr/include/gnu/stubs.h" 1 3 4 | |
94 | ||
95 | ||
96 | ||
97 | ||
98 | ||
99 | ||
100 | ||
101 | # 1 "/usr/include/gentoo-multilib/amd64/gnu/stubs.h" 1 3 4 | |
102 | ||
103 | ||
104 | ||
105 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
106 | ||
107 | ||
108 | ||
109 | ||
110 | ||
111 | ||
112 | ||
113 | # 1 "/usr/include/gentoo-multilib/amd64/bits/wordsize.h" 1 3 4 | |
114 | # 9 "/usr/include/bits/wordsize.h" 2 3 4 | |
115 | # 5 "/usr/include/gentoo-multilib/amd64/gnu/stubs.h" 2 3 4 | |
116 | ||
117 | ||
118 | ||
119 | ||
120 | # 1 "/usr/include/gnu/stubs-64.h" 1 3 4 | |
121 | ||
122 | ||
123 | ||
124 | # 1 "/usr/include/gentoo-multilib/amd64/gnu/stubs-64.h" 1 3 4 | |
125 | # 5 "/usr/include/gnu/stubs-64.h" 2 3 4 | |
126 | # 10 "/usr/include/gentoo-multilib/amd64/gnu/stubs.h" 2 3 4 | |
127 | # 9 "/usr/include/gnu/stubs.h" 2 3 4 | |
128 | # 347 "/usr/include/gentoo-multilib/amd64/features.h" 2 3 4 | |
129 | # 9 "/usr/include/features.h" 2 3 4 | |
130 | # 37 "/usr/include/gentoo-multilib/amd64/assert.h" 2 3 4 | |
131 | # 65 "/usr/include/gentoo-multilib/amd64/assert.h" 3 4 | |
132 | extern "C" { | |
133 | ||
134 | ||
135 | extern void __assert_fail (__const char *__assertion, __const char *__file, | |
136 | unsigned int __line, __const char *__function) | |
137 | throw () __attribute__ ((__noreturn__)); | |
138 | ||
139 | ||
140 | extern void __assert_perror_fail (int __errnum, __const char *__file, | |
141 | unsigned int __line, | |
142 | __const char *__function) | |
143 | throw () __attribute__ ((__noreturn__)); | |
144 | ||
145 | ||
146 | ||
147 | ||
148 | extern void __assert (const char *__assertion, const char *__file, int __line) | |
149 | throw () __attribute__ ((__noreturn__)); | |
150 | ||
151 | ||
152 | } | |
153 | # 9 "/usr/include/assert.h" 2 3 4 | |
154 | # 19 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/debug.h" 2 | |
155 | ||
156 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/limits.h" 1 3 4 | |
157 | # 11 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/limits.h" 3 4 | |
158 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/syslimits.h" 1 3 4 | |
159 | ||
160 | ||
161 | ||
162 | ||
163 | ||
164 | ||
165 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/limits.h" 1 3 4 | |
166 | # 122 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/limits.h" 3 4 | |
167 | # 1 "/usr/include/limits.h" 1 3 4 | |
168 | ||
169 | ||
170 | ||
171 | ||
172 | ||
173 | ||
174 | ||
175 | # 1 "/usr/include/gentoo-multilib/amd64/limits.h" 1 3 4 | |
176 | # 27 "/usr/include/gentoo-multilib/amd64/limits.h" 3 4 | |
177 | # 1 "/usr/include/features.h" 1 3 4 | |
178 | # 28 "/usr/include/gentoo-multilib/amd64/limits.h" 2 3 4 | |
179 | # 145 "/usr/include/gentoo-multilib/amd64/limits.h" 3 4 | |
180 | # 1 "/usr/include/bits/posix1_lim.h" 1 3 4 | |
181 | ||
182 | ||
183 | ||
184 | ||
185 | ||
186 | ||
187 | ||
188 | # 1 "/usr/include/gentoo-multilib/amd64/bits/posix1_lim.h" 1 3 4 | |
189 | # 153 "/usr/include/gentoo-multilib/amd64/bits/posix1_lim.h" 3 4 | |
190 | # 1 "/usr/include/bits/local_lim.h" 1 3 4 | |
191 | ||
192 | ||
193 | ||
194 | ||
195 | ||
196 | ||
197 | ||
198 | # 1 "/usr/include/gentoo-multilib/amd64/bits/local_lim.h" 1 3 4 | |
199 | # 36 "/usr/include/gentoo-multilib/amd64/bits/local_lim.h" 3 4 | |
200 | # 1 "/usr/include/linux/limits.h" 1 3 4 | |
201 | # 37 "/usr/include/gentoo-multilib/amd64/bits/local_lim.h" 2 3 4 | |
202 | # 9 "/usr/include/bits/local_lim.h" 2 3 4 | |
203 | # 154 "/usr/include/gentoo-multilib/amd64/bits/posix1_lim.h" 2 3 4 | |
204 | # 9 "/usr/include/bits/posix1_lim.h" 2 3 4 | |
205 | # 146 "/usr/include/gentoo-multilib/amd64/limits.h" 2 3 4 | |
206 | ||
207 | ||
208 | ||
209 | # 1 "/usr/include/bits/posix2_lim.h" 1 3 4 | |
210 | ||
211 | ||
212 | ||
213 | ||
214 | ||
215 | ||
216 | ||
217 | # 1 "/usr/include/gentoo-multilib/amd64/bits/posix2_lim.h" 1 3 4 | |
218 | # 9 "/usr/include/bits/posix2_lim.h" 2 3 4 | |
219 | # 150 "/usr/include/gentoo-multilib/amd64/limits.h" 2 3 4 | |
220 | ||
221 | ||
222 | ||
223 | # 1 "/usr/include/bits/xopen_lim.h" 1 3 4 | |
224 | ||
225 | ||
226 | ||
227 | ||
228 | ||
229 | ||
230 | ||
231 | # 1 "/usr/include/gentoo-multilib/amd64/bits/xopen_lim.h" 1 3 4 | |
232 | # 34 "/usr/include/gentoo-multilib/amd64/bits/xopen_lim.h" 3 4 | |
233 | # 1 "/usr/include/bits/stdio_lim.h" 1 3 4 | |
234 | ||
235 | ||
236 | ||
237 | ||
238 | ||
239 | ||
240 | ||
241 | # 1 "/usr/include/gentoo-multilib/amd64/bits/stdio_lim.h" 1 3 4 | |
242 | # 9 "/usr/include/bits/stdio_lim.h" 2 3 4 | |
243 | # 35 "/usr/include/gentoo-multilib/amd64/bits/xopen_lim.h" 2 3 4 | |
244 | # 9 "/usr/include/bits/xopen_lim.h" 2 3 4 | |
245 | # 154 "/usr/include/gentoo-multilib/amd64/limits.h" 2 3 4 | |
246 | # 9 "/usr/include/limits.h" 2 3 4 | |
247 | # 123 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/limits.h" 2 3 4 | |
248 | # 8 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/syslimits.h" 2 3 4 | |
249 | # 12 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/limits.h" 2 3 4 | |
250 | # 21 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/debug.h" 2 | |
251 | ||
252 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wxchar.h" 1 | |
253 | # 62 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wxchar.h" | |
254 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/stdarg.h" 1 3 4 | |
255 | # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/stdarg.h" 3 4 | |
256 | typedef __builtin_va_list __gnuc_va_list; | |
257 | # 105 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/stdarg.h" 3 4 | |
258 | typedef __gnuc_va_list va_list; | |
259 | # 63 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wxchar.h" 2 | |
260 | # 103 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wxchar.h" | |
261 | # 1 "/usr/include/wchar.h" 1 3 4 | |
262 | ||
263 | ||
264 | ||
265 | ||
266 | ||
267 | ||
268 | ||
269 | # 1 "/usr/include/gentoo-multilib/amd64/wchar.h" 1 3 4 | |
270 | # 28 "/usr/include/gentoo-multilib/amd64/wchar.h" 3 4 | |
271 | # 1 "/usr/include/features.h" 1 3 4 | |
272 | # 29 "/usr/include/gentoo-multilib/amd64/wchar.h" 2 3 4 | |
273 | # 37 "/usr/include/gentoo-multilib/amd64/wchar.h" 3 4 | |
274 | # 1 "/usr/include/stdio.h" 1 3 4 | |
275 | ||
276 | ||
277 | ||
278 | ||
279 | ||
280 | ||
281 | ||
282 | # 1 "/usr/include/gentoo-multilib/amd64/stdio.h" 1 3 4 | |
283 | # 44 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4 | |
284 | ||
285 | ||
286 | typedef struct _IO_FILE FILE; | |
287 | ||
288 | ||
289 | ||
290 | ||
291 | ||
292 | # 62 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4 | |
293 | typedef struct _IO_FILE __FILE; | |
294 | # 9 "/usr/include/stdio.h" 2 3 4 | |
295 | # 38 "/usr/include/gentoo-multilib/amd64/wchar.h" 2 3 4 | |
296 | # 48 "/usr/include/gentoo-multilib/amd64/wchar.h" 3 4 | |
297 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 | |
298 | # 214 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/stddef.h" 3 4 | |
299 | typedef long unsigned int size_t; | |
300 | # 355 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/stddef.h" 3 4 | |
301 | typedef unsigned int wint_t; | |
302 | # 49 "/usr/include/gentoo-multilib/amd64/wchar.h" 2 3 4 | |
303 | ||
304 | # 1 "/usr/include/bits/wchar.h" 1 3 4 | |
305 | ||
306 | ||
307 | ||
308 | ||
309 | ||
310 | ||
311 | ||
312 | # 1 "/usr/include/gentoo-multilib/amd64/bits/wchar.h" 1 3 4 | |
313 | # 9 "/usr/include/bits/wchar.h" 2 3 4 | |
314 | # 51 "/usr/include/gentoo-multilib/amd64/wchar.h" 2 3 4 | |
315 | # 76 "/usr/include/gentoo-multilib/amd64/wchar.h" 3 4 | |
316 | typedef struct | |
317 | { | |
318 | int __count; | |
319 | union | |
320 | { | |
321 | wint_t __wch; | |
322 | char __wchb[4]; | |
323 | } __value; | |
324 | } __mbstate_t; | |
325 | # 93 "/usr/include/gentoo-multilib/amd64/wchar.h" 3 4 | |
326 | ||
327 | ||
328 | typedef __mbstate_t mbstate_t; | |
329 | ||
330 | ||
331 | ||
332 | # 118 "/usr/include/gentoo-multilib/amd64/wchar.h" 3 4 | |
333 | extern "C" { | |
334 | ||
335 | ||
336 | ||
337 | ||
338 | struct tm; | |
339 | ||
340 | ||
341 | ||
342 | ||
343 | ||
344 | ||
345 | ||
346 | ||
347 | ||
348 | extern wchar_t *wcscpy (wchar_t *__restrict __dest, | |
349 | __const wchar_t *__restrict __src) throw (); | |
350 | ||
351 | extern wchar_t *wcsncpy (wchar_t *__restrict __dest, | |
352 | __const wchar_t *__restrict __src, size_t __n) | |
353 | throw (); | |
354 | ||
355 | ||
356 | extern wchar_t *wcscat (wchar_t *__restrict __dest, | |
357 | __const wchar_t *__restrict __src) throw (); | |
358 | ||
359 | extern wchar_t *wcsncat (wchar_t *__restrict __dest, | |
360 | __const wchar_t *__restrict __src, size_t __n) | |
361 | throw (); | |
362 | ||
363 | ||
364 | extern int wcscmp (__const wchar_t *__s1, __const wchar_t *__s2) | |
365 | throw () __attribute__ ((__pure__)); | |
366 | ||
367 | extern int wcsncmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n) | |
368 | throw () __attribute__ ((__pure__)); | |
369 | ||
370 | ||
371 | ||
372 | ||
373 | extern int wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) throw (); | |
374 | ||
375 | ||
376 | extern int wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2, | |
377 | size_t __n) throw (); | |
378 | ||
379 | ||
380 | ||
381 | # 1 "/usr/include/xlocale.h" 1 3 4 | |
382 | ||
383 | ||
384 | ||
385 | ||
386 | ||
387 | ||
388 | ||
389 | # 1 "/usr/include/gentoo-multilib/amd64/xlocale.h" 1 3 4 | |
390 | # 28 "/usr/include/gentoo-multilib/amd64/xlocale.h" 3 4 | |
391 | typedef struct __locale_struct | |
392 | { | |
393 | ||
394 | struct locale_data *__locales[13]; | |
395 | ||
396 | ||
397 | const unsigned short int *__ctype_b; | |
398 | const int *__ctype_tolower; | |
399 | const int *__ctype_toupper; | |
400 | ||
401 | ||
402 | const char *__names[13]; | |
403 | } *__locale_t; | |
404 | # 9 "/usr/include/xlocale.h" 2 3 4 | |
405 | # 167 "/usr/include/gentoo-multilib/amd64/wchar.h" 2 3 4 | |
406 | ||
407 | extern int wcscasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, | |
408 | __locale_t __loc) throw (); | |
409 | ||
410 | extern int wcsncasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, | |
411 | size_t __n, __locale_t __loc) throw (); | |
412 | ||
413 | ||
414 | ||
415 | ||
416 | ||
417 | extern int wcscoll (__const wchar_t *__s1, __const wchar_t *__s2) throw (); | |
418 | ||
419 | ||
420 | ||
421 | extern size_t wcsxfrm (wchar_t *__restrict __s1, | |
422 | __const wchar_t *__restrict __s2, size_t __n) throw (); | |
423 | ||
424 | ||
425 | ||
426 | ||
427 | ||
428 | ||
429 | ||
430 | ||
431 | extern int wcscoll_l (__const wchar_t *__s1, __const wchar_t *__s2, | |
432 | __locale_t __loc) throw (); | |
433 | ||
434 | ||
435 | ||
436 | ||
437 | extern size_t wcsxfrm_l (wchar_t *__s1, __const wchar_t *__s2, | |
438 | size_t __n, __locale_t __loc) throw (); | |
439 | ||
440 | ||
441 | extern wchar_t *wcsdup (__const wchar_t *__s) throw () __attribute__ ((__malloc__)); | |
442 | ||
443 | ||
444 | ||
445 | ||
446 | extern wchar_t *wcschr (__const wchar_t *__wcs, wchar_t __wc) | |
447 | throw () __attribute__ ((__pure__)); | |
448 | ||
449 | extern wchar_t *wcsrchr (__const wchar_t *__wcs, wchar_t __wc) | |
450 | throw () __attribute__ ((__pure__)); | |
451 | ||
452 | ||
453 | ||
454 | ||
455 | ||
456 | extern wchar_t *wcschrnul (__const wchar_t *__s, wchar_t __wc) | |
457 | throw () __attribute__ ((__pure__)); | |
458 | ||
459 | ||
460 | ||
461 | ||
462 | ||
463 | extern size_t wcscspn (__const wchar_t *__wcs, __const wchar_t *__reject) | |
464 | throw () __attribute__ ((__pure__)); | |
465 | ||
466 | ||
467 | extern size_t wcsspn (__const wchar_t *__wcs, __const wchar_t *__accept) | |
468 | throw () __attribute__ ((__pure__)); | |
469 | ||
470 | extern wchar_t *wcspbrk (__const wchar_t *__wcs, __const wchar_t *__accept) | |
471 | throw () __attribute__ ((__pure__)); | |
472 | ||
473 | extern wchar_t *wcsstr (__const wchar_t *__haystack, __const wchar_t *__needle) | |
474 | throw () __attribute__ ((__pure__)); | |
475 | ||
476 | ||
477 | extern wchar_t *wcstok (wchar_t *__restrict __s, | |
478 | __const wchar_t *__restrict __delim, | |
479 | wchar_t **__restrict __ptr) throw (); | |
480 | ||
481 | ||
482 | extern size_t wcslen (__const wchar_t *__s) throw () __attribute__ ((__pure__)); | |
483 | ||
484 | ||
485 | ||
486 | ||
487 | extern wchar_t *wcswcs (__const wchar_t *__haystack, __const wchar_t *__needle) | |
488 | throw () __attribute__ ((__pure__)); | |
489 | ||
490 | ||
491 | ||
492 | ||
493 | extern size_t wcsnlen (__const wchar_t *__s, size_t __maxlen) | |
494 | throw () __attribute__ ((__pure__)); | |
495 | ||
496 | ||
497 | ||
498 | ||
499 | ||
500 | extern wchar_t *wmemchr (__const wchar_t *__s, wchar_t __c, size_t __n) | |
501 | throw () __attribute__ ((__pure__)); | |
502 | ||
503 | ||
504 | extern int wmemcmp (__const wchar_t *__restrict __s1, | |
505 | __const wchar_t *__restrict __s2, size_t __n) | |
506 | throw () __attribute__ ((__pure__)); | |
507 | ||
508 | ||
509 | extern wchar_t *wmemcpy (wchar_t *__restrict __s1, | |
510 | __const wchar_t *__restrict __s2, size_t __n) throw (); | |
511 | ||
512 | ||
513 | ||
514 | extern wchar_t *wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n) | |
515 | throw (); | |
516 | ||
517 | ||
518 | extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw (); | |
519 | ||
520 | ||
521 | ||
522 | ||
523 | ||
524 | extern wchar_t *wmempcpy (wchar_t *__restrict __s1, | |
525 | __const wchar_t *__restrict __s2, size_t __n) | |
526 | throw (); | |
527 | ||
528 | ||
529 | ||
530 | ||
531 | ||
532 | ||
533 | extern wint_t btowc (int __c) throw (); | |
534 | ||
535 | ||
536 | ||
537 | extern int wctob (wint_t __c) throw (); | |
538 | ||
539 | ||
540 | ||
541 | extern int mbsinit (__const mbstate_t *__ps) throw () __attribute__ ((__pure__)); | |
542 | ||
543 | ||
544 | ||
545 | extern size_t mbrtowc (wchar_t *__restrict __pwc, | |
546 | __const char *__restrict __s, size_t __n, | |
547 | mbstate_t *__p) throw (); | |
548 | ||
549 | ||
550 | extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, | |
551 | mbstate_t *__restrict __ps) throw (); | |
552 | ||
553 | ||
554 | extern size_t __mbrlen (__const char *__restrict __s, size_t __n, | |
555 | mbstate_t *__restrict __ps) throw (); | |
556 | extern size_t mbrlen (__const char *__restrict __s, size_t __n, | |
557 | mbstate_t *__restrict __ps) throw (); | |
558 | ||
559 | # 341 "/usr/include/gentoo-multilib/amd64/wchar.h" 3 4 | |
560 | extern __inline size_t | |
561 | mbrlen (__const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) throw () | |
562 | ||
563 | { return (__ps != __null | |
564 | ? mbrtowc (__null, __s, __n, __ps) : __mbrlen (__s, __n, __null)); } | |
565 | ||
566 | ||
567 | ||
568 | ||
569 | ||
570 | extern size_t mbsrtowcs (wchar_t *__restrict __dst, | |
571 | __const char **__restrict __src, size_t __len, | |
572 | mbstate_t *__restrict __ps) throw (); | |
573 | ||
574 | ||
575 | ||
576 | extern size_t wcsrtombs (char *__restrict __dst, | |
577 | __const wchar_t **__restrict __src, size_t __len, | |
578 | mbstate_t *__restrict __ps) throw (); | |
579 | ||
580 | ||
581 | ||
582 | ||
583 | ||
584 | ||
585 | extern size_t mbsnrtowcs (wchar_t *__restrict __dst, | |
586 | __const char **__restrict __src, size_t __nmc, | |
587 | size_t __len, mbstate_t *__restrict __ps) throw (); | |
588 | ||
589 | ||
590 | ||
591 | extern size_t wcsnrtombs (char *__restrict __dst, | |
592 | __const wchar_t **__restrict __src, | |
593 | size_t __nwc, size_t __len, | |
594 | mbstate_t *__restrict __ps) throw (); | |
595 | ||
596 | ||
597 | ||
598 | ||
599 | ||
600 | ||
601 | extern int wcwidth (wchar_t __c) throw (); | |
602 | ||
603 | ||
604 | ||
605 | extern int wcswidth (__const wchar_t *__s, size_t __n) throw (); | |
606 | ||
607 | ||
608 | ||
609 | ||
610 | ||
611 | ||
612 | extern double wcstod (__const wchar_t *__restrict __nptr, | |
613 | wchar_t **__restrict __endptr) throw (); | |
614 | ||
615 | ||
616 | ||
617 | extern float wcstof (__const wchar_t *__restrict __nptr, | |
618 | wchar_t **__restrict __endptr) throw (); | |
619 | extern long double wcstold (__const wchar_t *__restrict __nptr, | |
620 | wchar_t **__restrict __endptr) throw (); | |
621 | ||
622 | ||
623 | ||
624 | ||
625 | ||
626 | extern long int wcstol (__const wchar_t *__restrict __nptr, | |
627 | wchar_t **__restrict __endptr, int __base) throw (); | |
628 | ||
629 | ||
630 | ||
631 | extern unsigned long int wcstoul (__const wchar_t *__restrict __nptr, | |
632 | wchar_t **__restrict __endptr, int __base) | |
633 | throw (); | |
634 | ||
635 | ||
636 | ||
637 | ||
638 | __extension__ | |
639 | extern long long int wcstoll (__const wchar_t *__restrict __nptr, | |
640 | wchar_t **__restrict __endptr, int __base) | |
641 | throw (); | |
642 | ||
643 | ||
644 | ||
645 | __extension__ | |
646 | extern unsigned long long int wcstoull (__const wchar_t *__restrict __nptr, | |
647 | wchar_t **__restrict __endptr, | |
648 | int __base) throw (); | |
649 | ||
650 | ||
651 | ||
652 | ||
653 | ||
654 | ||
655 | __extension__ | |
656 | extern long long int wcstoq (__const wchar_t *__restrict __nptr, | |
657 | wchar_t **__restrict __endptr, int __base) | |
658 | throw (); | |
659 | ||
660 | ||
661 | ||
662 | __extension__ | |
663 | extern unsigned long long int wcstouq (__const wchar_t *__restrict __nptr, | |
664 | wchar_t **__restrict __endptr, | |
665 | int __base) throw (); | |
666 | # 463 "/usr/include/gentoo-multilib/amd64/wchar.h" 3 4 | |
667 | # 1 "/usr/include/xlocale.h" 1 3 4 | |
668 | # 464 "/usr/include/gentoo-multilib/amd64/wchar.h" 2 3 4 | |
669 | ||
670 | ||
671 | ||
672 | extern long int wcstol_l (__const wchar_t *__restrict __nptr, | |
673 | wchar_t **__restrict __endptr, int __base, | |
674 | __locale_t __loc) throw (); | |
675 | ||
676 | extern unsigned long int wcstoul_l (__const wchar_t *__restrict __nptr, | |
677 | wchar_t **__restrict __endptr, | |
678 | int __base, __locale_t __loc) throw (); | |
679 | ||
680 | __extension__ | |
681 | extern long long int wcstoll_l (__const wchar_t *__restrict __nptr, | |
682 | wchar_t **__restrict __endptr, | |
683 | int __base, __locale_t __loc) throw (); | |
684 | ||
685 | __extension__ | |
686 | extern unsigned long long int wcstoull_l (__const wchar_t *__restrict __nptr, | |
687 | wchar_t **__restrict __endptr, | |
688 | int __base, __locale_t __loc) | |
689 | throw (); | |
690 | ||
691 | extern double wcstod_l (__const wchar_t *__restrict __nptr, | |
692 | wchar_t **__restrict __endptr, __locale_t __loc) | |
693 | throw (); | |
694 | ||
695 | extern float wcstof_l (__const wchar_t *__restrict __nptr, | |
696 | wchar_t **__restrict __endptr, __locale_t __loc) | |
697 | throw (); | |
698 | ||
699 | extern long double wcstold_l (__const wchar_t *__restrict __nptr, | |
700 | wchar_t **__restrict __endptr, | |
701 | __locale_t __loc) throw (); | |
702 | ||
703 | ||
704 | ||
705 | ||
706 | ||
707 | extern double __wcstod_internal (__const wchar_t *__restrict __nptr, | |
708 | wchar_t **__restrict __endptr, int __group) | |
709 | throw (); | |
710 | extern float __wcstof_internal (__const wchar_t *__restrict __nptr, | |
711 | wchar_t **__restrict __endptr, int __group) | |
712 | throw (); | |
713 | extern long double __wcstold_internal (__const wchar_t *__restrict __nptr, | |
714 | wchar_t **__restrict __endptr, | |
715 | int __group) throw (); | |
716 | ||
717 | ||
718 | ||
719 | extern long int __wcstol_internal (__const wchar_t *__restrict __nptr, | |
720 | wchar_t **__restrict __endptr, | |
721 | int __base, int __group) throw (); | |
722 | ||
723 | ||
724 | ||
725 | ||
726 | extern unsigned long int __wcstoul_internal (__const wchar_t *__restrict __npt, | |
727 | wchar_t **__restrict __endptr, | |
728 | int __base, int __group) throw (); | |
729 | ||
730 | ||
731 | ||
732 | ||
733 | __extension__ | |
734 | extern long long int __wcstoll_internal (__const wchar_t *__restrict __nptr, | |
735 | wchar_t **__restrict __endptr, | |
736 | int __base, int __group) throw (); | |
737 | ||
738 | ||
739 | ||
740 | ||
741 | __extension__ | |
742 | extern unsigned long long int __wcstoull_internal (__const wchar_t * | |
743 | __restrict __nptr, | |
744 | wchar_t ** | |
745 | __restrict __endptr, | |
746 | int __base, | |
747 | int __group) throw (); | |
748 | ||
749 | ||
750 | ||
751 | ||
752 | ||
753 | ||
754 | ||
755 | ||
756 | extern __inline double | |
757 | wcstod (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw () | |
758 | ||
759 | { return __wcstod_internal (__nptr, __endptr, 0); } | |
760 | extern __inline long int | |
761 | wcstol (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw () | |
762 | ||
763 | { return __wcstol_internal (__nptr, __endptr, __base, 0); } | |
764 | extern __inline unsigned long int | |
765 | wcstoul (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw () | |
766 | ||
767 | { return __wcstoul_internal (__nptr, __endptr, __base, 0); } | |
768 | ||
769 | ||
770 | ||
771 | extern __inline float | |
772 | wcstof (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw () | |
773 | ||
774 | { return __wcstof_internal (__nptr, __endptr, 0); } | |
775 | ||
776 | extern __inline long double | |
777 | wcstold (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw () | |
778 | ||
779 | { return __wcstold_internal (__nptr, __endptr, 0); } | |
780 | ||
781 | __extension__ | |
782 | extern __inline long long int | |
783 | wcstoq (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw () | |
784 | ||
785 | { return __wcstoll_internal (__nptr, __endptr, __base, 0); } | |
786 | __extension__ | |
787 | extern __inline unsigned long long int | |
788 | wcstouq (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw () | |
789 | ||
790 | { return __wcstoull_internal (__nptr, __endptr, __base, 0); } | |
791 | ||
792 | ||
793 | ||
794 | ||
795 | ||
796 | ||
797 | ||
798 | extern wchar_t *wcpcpy (wchar_t *__dest, __const wchar_t *__src) throw (); | |
799 | ||
800 | ||
801 | ||
802 | extern wchar_t *wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n) | |
803 | throw (); | |
804 | # 607 "/usr/include/gentoo-multilib/amd64/wchar.h" 3 4 | |
805 | extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) throw (); | |
806 | ||
807 | ||
808 | ||
809 | ||
810 | ||
811 | ||
812 | extern int fwide (__FILE *__fp, int __mode) throw (); | |
813 | ||
814 | ||
815 | ||
816 | ||
817 | ||
818 | ||
819 | extern int fwprintf (__FILE *__restrict __stream, | |
820 | __const wchar_t *__restrict __format, ...) | |
821 | ; | |
822 | ||
823 | ||
824 | ||
825 | ||
826 | extern int wprintf (__const wchar_t *__restrict __format, ...) | |
827 | ; | |
828 | ||
829 | extern int swprintf (wchar_t *__restrict __s, size_t __n, | |
830 | __const wchar_t *__restrict __format, ...) | |
831 | throw () ; | |
832 | ||
833 | ||
834 | ||
835 | ||
836 | ||
837 | extern int vfwprintf (__FILE *__restrict __s, | |
838 | __const wchar_t *__restrict __format, | |
839 | __gnuc_va_list __arg) | |
840 | ; | |
841 | ||
842 | ||
843 | ||
844 | ||
845 | extern int vwprintf (__const wchar_t *__restrict __format, | |
846 | __gnuc_va_list __arg) | |
847 | ; | |
848 | ||
849 | ||
850 | extern int vswprintf (wchar_t *__restrict __s, size_t __n, | |
851 | __const wchar_t *__restrict __format, | |
852 | __gnuc_va_list __arg) | |
853 | throw () ; | |
854 | ||
855 | ||
856 | ||
857 | ||
858 | ||
859 | ||
860 | extern int fwscanf (__FILE *__restrict __stream, | |
861 | __const wchar_t *__restrict __format, ...) | |
862 | ; | |
863 | ||
864 | ||
865 | ||
866 | ||
867 | extern int wscanf (__const wchar_t *__restrict __format, ...) | |
868 | ; | |
869 | ||
870 | extern int swscanf (__const wchar_t *__restrict __s, | |
871 | __const wchar_t *__restrict __format, ...) | |
872 | throw () ; | |
873 | ||
874 | ||
875 | ||
876 | ||
877 | ||
878 | ||
879 | ||
880 | ||
881 | ||
882 | ||
883 | ||
884 | extern int vfwscanf (__FILE *__restrict __s, | |
885 | __const wchar_t *__restrict __format, | |
886 | __gnuc_va_list __arg) | |
887 | ; | |
888 | ||
889 | ||
890 | ||
891 | ||
892 | extern int vwscanf (__const wchar_t *__restrict __format, | |
893 | __gnuc_va_list __arg) | |
894 | ; | |
895 | ||
896 | extern int vswscanf (__const wchar_t *__restrict __s, | |
897 | __const wchar_t *__restrict __format, | |
898 | __gnuc_va_list __arg) | |
899 | throw () ; | |
900 | ||
901 | ||
902 | ||
903 | ||
904 | ||
905 | ||
906 | ||
907 | ||
908 | ||
909 | ||
910 | extern wint_t fgetwc (__FILE *__stream); | |
911 | extern wint_t getwc (__FILE *__stream); | |
912 | ||
913 | ||
914 | ||
915 | ||
916 | ||
917 | extern wint_t getwchar (void); | |
918 | ||
919 | ||
920 | ||
921 | ||
922 | ||
923 | ||
924 | extern wint_t fputwc (wchar_t __wc, __FILE *__stream); | |
925 | extern wint_t putwc (wchar_t __wc, __FILE *__stream); | |
926 | ||
927 | ||
928 | ||
929 | ||
930 | ||
931 | extern wint_t putwchar (wchar_t __wc); | |
932 | ||
933 | ||
934 | ||
935 | ||
936 | ||
937 | ||
938 | ||
939 | extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n, | |
940 | __FILE *__restrict __stream); | |
941 | ||
942 | ||
943 | ||
944 | ||
945 | ||
946 | extern int fputws (__const wchar_t *__restrict __ws, | |
947 | __FILE *__restrict __stream); | |
948 | ||
949 | ||
950 | ||
951 | ||
952 | ||
953 | ||
954 | extern wint_t ungetwc (wint_t __wc, __FILE *__stream); | |
955 | ||
956 | # 768 "/usr/include/gentoo-multilib/amd64/wchar.h" 3 4 | |
957 | extern wint_t getwc_unlocked (__FILE *__stream); | |
958 | extern wint_t getwchar_unlocked (void); | |
959 | ||
960 | ||
961 | ||
962 | ||
963 | ||
964 | ||
965 | ||
966 | extern wint_t fgetwc_unlocked (__FILE *__stream); | |
967 | ||
968 | ||
969 | ||
970 | ||
971 | ||
972 | ||
973 | ||
974 | extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream); | |
975 | # 794 "/usr/include/gentoo-multilib/amd64/wchar.h" 3 4 | |
976 | extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream); | |
977 | extern wint_t putwchar_unlocked (wchar_t __wc); | |
978 | # 804 "/usr/include/gentoo-multilib/amd64/wchar.h" 3 4 | |
979 | extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n, | |
980 | __FILE *__restrict __stream); | |
981 | ||
982 | ||
983 | ||
984 | ||
985 | ||
986 | ||
987 | ||
988 | extern int fputws_unlocked (__const wchar_t *__restrict __ws, | |
989 | __FILE *__restrict __stream); | |
990 | ||
991 | ||
992 | ||
993 | ||
994 | ||
995 | ||
996 | ||
997 | extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize, | |
998 | __const wchar_t *__restrict __format, | |
999 | __const struct tm *__restrict __tp) throw (); | |
1000 | ||
1001 | ||
1002 | ||
1003 | # 1 "/usr/include/xlocale.h" 1 3 4 | |
1004 | # 829 "/usr/include/gentoo-multilib/amd64/wchar.h" 2 3 4 | |
1005 | ||
1006 | ||
1007 | ||
1008 | extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, | |
1009 | __const wchar_t *__restrict __format, | |
1010 | __const struct tm *__restrict __tp, | |
1011 | __locale_t __loc) throw (); | |
1012 | # 858 "/usr/include/gentoo-multilib/amd64/wchar.h" 3 4 | |
1013 | } | |
1014 | # 9 "/usr/include/wchar.h" 2 3 4 | |
1015 | # 104 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wxchar.h" 2 | |
1016 | # 178 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wxchar.h" | |
1017 | typedef char wxChar; | |
1018 | typedef signed char wxSChar; | |
1019 | typedef unsigned char wxUChar; | |
1020 | # 654 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wxchar.h" | |
1021 | # 1 "/usr/include/ctype.h" 1 3 4 | |
1022 | ||
1023 | ||
1024 | ||
1025 | ||
1026 | ||
1027 | ||
1028 | ||
1029 | # 1 "/usr/include/gentoo-multilib/amd64/ctype.h" 1 3 4 | |
1030 | # 27 "/usr/include/gentoo-multilib/amd64/ctype.h" 3 4 | |
1031 | # 1 "/usr/include/features.h" 1 3 4 | |
1032 | # 28 "/usr/include/gentoo-multilib/amd64/ctype.h" 2 3 4 | |
1033 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
1034 | ||
1035 | ||
1036 | ||
1037 | ||
1038 | ||
1039 | ||
1040 | ||
1041 | # 1 "/usr/include/gentoo-multilib/amd64/bits/types.h" 1 3 4 | |
1042 | # 27 "/usr/include/gentoo-multilib/amd64/bits/types.h" 3 4 | |
1043 | # 1 "/usr/include/features.h" 1 3 4 | |
1044 | # 28 "/usr/include/gentoo-multilib/amd64/bits/types.h" 2 3 4 | |
1045 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
1046 | ||
1047 | ||
1048 | ||
1049 | ||
1050 | ||
1051 | ||
1052 | ||
1053 | # 1 "/usr/include/gentoo-multilib/amd64/bits/wordsize.h" 1 3 4 | |
1054 | # 9 "/usr/include/bits/wordsize.h" 2 3 4 | |
1055 | # 29 "/usr/include/gentoo-multilib/amd64/bits/types.h" 2 3 4 | |
1056 | ||
1057 | ||
1058 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 | |
1059 | # 32 "/usr/include/gentoo-multilib/amd64/bits/types.h" 2 3 4 | |
1060 | ||
1061 | ||
1062 | typedef unsigned char __u_char; | |
1063 | typedef unsigned short int __u_short; | |
1064 | typedef unsigned int __u_int; | |
1065 | typedef unsigned long int __u_long; | |
1066 | ||
1067 | ||
1068 | typedef signed char __int8_t; | |
1069 | typedef unsigned char __uint8_t; | |
1070 | typedef signed short int __int16_t; | |
1071 | typedef unsigned short int __uint16_t; | |
1072 | typedef signed int __int32_t; | |
1073 | typedef unsigned int __uint32_t; | |
1074 | ||
1075 | typedef signed long int __int64_t; | |
1076 | typedef unsigned long int __uint64_t; | |
1077 | ||
1078 | ||
1079 | ||
1080 | ||
1081 | ||
1082 | ||
1083 | ||
1084 | typedef long int __quad_t; | |
1085 | typedef unsigned long int __u_quad_t; | |
1086 | # 134 "/usr/include/gentoo-multilib/amd64/bits/types.h" 3 4 | |
1087 | # 1 "/usr/include/bits/typesizes.h" 1 3 4 | |
1088 | ||
1089 | ||
1090 | ||
1091 | ||
1092 | ||
1093 | ||
1094 | ||
1095 | # 1 "/usr/include/gentoo-multilib/amd64/bits/typesizes.h" 1 3 4 | |
1096 | # 9 "/usr/include/bits/typesizes.h" 2 3 4 | |
1097 | # 135 "/usr/include/gentoo-multilib/amd64/bits/types.h" 2 3 4 | |
1098 | ||
1099 | ||
1100 | typedef unsigned long int __dev_t; | |
1101 | typedef unsigned int __uid_t; | |
1102 | typedef unsigned int __gid_t; | |
1103 | typedef unsigned long int __ino_t; | |
1104 | typedef unsigned long int __ino64_t; | |
1105 | typedef unsigned int __mode_t; | |
1106 | typedef unsigned long int __nlink_t; | |
1107 | typedef long int __off_t; | |
1108 | typedef long int __off64_t; | |
1109 | typedef int __pid_t; | |
1110 | typedef struct { int __val[2]; } __fsid_t; | |
1111 | typedef long int __clock_t; | |
1112 | typedef unsigned long int __rlim_t; | |
1113 | typedef unsigned long int __rlim64_t; | |
1114 | typedef unsigned int __id_t; | |
1115 | typedef long int __time_t; | |
1116 | typedef unsigned int __useconds_t; | |
1117 | typedef long int __suseconds_t; | |
1118 | ||
1119 | typedef int __daddr_t; | |
1120 | typedef long int __swblk_t; | |
1121 | typedef int __key_t; | |
1122 | ||
1123 | ||
1124 | typedef int __clockid_t; | |
1125 | ||
1126 | ||
1127 | typedef void * __timer_t; | |
1128 | ||
1129 | ||
1130 | typedef long int __blksize_t; | |
1131 | ||
1132 | ||
1133 | ||
1134 | ||
1135 | typedef long int __blkcnt_t; | |
1136 | typedef long int __blkcnt64_t; | |
1137 | ||
1138 | ||
1139 | typedef unsigned long int __fsblkcnt_t; | |
1140 | typedef unsigned long int __fsblkcnt64_t; | |
1141 | ||
1142 | ||
1143 | typedef unsigned long int __fsfilcnt_t; | |
1144 | typedef unsigned long int __fsfilcnt64_t; | |
1145 | ||
1146 | typedef long int __ssize_t; | |
1147 | ||
1148 | ||
1149 | ||
1150 | typedef __off64_t __loff_t; | |
1151 | typedef __quad_t *__qaddr_t; | |
1152 | typedef char *__caddr_t; | |
1153 | ||
1154 | ||
1155 | typedef long int __intptr_t; | |
1156 | ||
1157 | ||
1158 | typedef unsigned int __socklen_t; | |
1159 | # 9 "/usr/include/bits/types.h" 2 3 4 | |
1160 | # 29 "/usr/include/gentoo-multilib/amd64/ctype.h" 2 3 4 | |
1161 | ||
1162 | extern "C" { | |
1163 | # 41 "/usr/include/gentoo-multilib/amd64/ctype.h" 3 4 | |
1164 | # 1 "/usr/include/endian.h" 1 3 4 | |
1165 | ||
1166 | ||
1167 | ||
1168 | ||
1169 | ||
1170 | ||
1171 | ||
1172 | # 1 "/usr/include/gentoo-multilib/amd64/endian.h" 1 3 4 | |
1173 | # 22 "/usr/include/gentoo-multilib/amd64/endian.h" 3 4 | |
1174 | # 1 "/usr/include/features.h" 1 3 4 | |
1175 | # 23 "/usr/include/gentoo-multilib/amd64/endian.h" 2 3 4 | |
1176 | # 37 "/usr/include/gentoo-multilib/amd64/endian.h" 3 4 | |
1177 | # 1 "/usr/include/bits/endian.h" 1 3 4 | |
1178 | ||
1179 | ||
1180 | ||
1181 | ||
1182 | ||
1183 | ||
1184 | ||
1185 | # 1 "/usr/include/gentoo-multilib/amd64/bits/endian.h" 1 3 4 | |
1186 | # 9 "/usr/include/bits/endian.h" 2 3 4 | |
1187 | # 38 "/usr/include/gentoo-multilib/amd64/endian.h" 2 3 4 | |
1188 | # 9 "/usr/include/endian.h" 2 3 4 | |
1189 | # 42 "/usr/include/gentoo-multilib/amd64/ctype.h" 2 3 4 | |
1190 | ||
1191 | ||
1192 | ||
1193 | ||
1194 | ||
1195 | ||
1196 | enum | |
1197 | { | |
1198 | _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), | |
1199 | _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), | |
1200 | _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), | |
1201 | _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), | |
1202 | _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), | |
1203 | _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), | |
1204 | _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), | |
1205 | _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), | |
1206 | _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), | |
1207 | _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), | |
1208 | _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), | |
1209 | _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) | |
1210 | }; | |
1211 | # 81 "/usr/include/gentoo-multilib/amd64/ctype.h" 3 4 | |
1212 | extern __const unsigned short int **__ctype_b_loc (void) | |
1213 | __attribute__ ((__const)); | |
1214 | extern __const __int32_t **__ctype_tolower_loc (void) | |
1215 | __attribute__ ((__const)); | |
1216 | extern __const __int32_t **__ctype_toupper_loc (void) | |
1217 | __attribute__ ((__const)); | |
1218 | # 96 "/usr/include/gentoo-multilib/amd64/ctype.h" 3 4 | |
1219 | ||
1220 | ||
1221 | ||
1222 | ||
1223 | ||
1224 | ||
1225 | extern int isalnum (int) throw (); | |
1226 | extern int isalpha (int) throw (); | |
1227 | extern int iscntrl (int) throw (); | |
1228 | extern int isdigit (int) throw (); | |
1229 | extern int islower (int) throw (); | |
1230 | extern int isgraph (int) throw (); | |
1231 | extern int isprint (int) throw (); | |
1232 | extern int ispunct (int) throw (); | |
1233 | extern int isspace (int) throw (); | |
1234 | extern int isupper (int) throw (); | |
1235 | extern int isxdigit (int) throw (); | |
1236 | ||
1237 | ||
1238 | ||
1239 | extern int tolower (int __c) throw (); | |
1240 | ||
1241 | ||
1242 | extern int toupper (int __c) throw (); | |
1243 | ||
1244 | ||
1245 | ||
1246 | ||
1247 | ||
1248 | ||
1249 | ||
1250 | ||
1251 | extern int isblank (int) throw (); | |
1252 | ||
1253 | ||
1254 | ||
1255 | ||
1256 | ||
1257 | ||
1258 | extern int isctype (int __c, int __mask) throw (); | |
1259 | ||
1260 | ||
1261 | ||
1262 | ||
1263 | ||
1264 | ||
1265 | extern int isascii (int __c) throw (); | |
1266 | ||
1267 | ||
1268 | ||
1269 | extern int toascii (int __c) throw (); | |
1270 | ||
1271 | ||
1272 | ||
1273 | extern int _toupper (int) throw (); | |
1274 | extern int _tolower (int) throw (); | |
1275 | # 233 "/usr/include/gentoo-multilib/amd64/ctype.h" 3 4 | |
1276 | # 1 "/usr/include/xlocale.h" 1 3 4 | |
1277 | # 234 "/usr/include/gentoo-multilib/amd64/ctype.h" 2 3 4 | |
1278 | # 247 "/usr/include/gentoo-multilib/amd64/ctype.h" 3 4 | |
1279 | extern int isalnum_l (int, __locale_t) throw (); | |
1280 | extern int isalpha_l (int, __locale_t) throw (); | |
1281 | extern int iscntrl_l (int, __locale_t) throw (); | |
1282 | extern int isdigit_l (int, __locale_t) throw (); | |
1283 | extern int islower_l (int, __locale_t) throw (); | |
1284 | extern int isgraph_l (int, __locale_t) throw (); | |
1285 | extern int isprint_l (int, __locale_t) throw (); | |
1286 | extern int ispunct_l (int, __locale_t) throw (); | |
1287 | extern int isspace_l (int, __locale_t) throw (); | |
1288 | extern int isupper_l (int, __locale_t) throw (); | |
1289 | extern int isxdigit_l (int, __locale_t) throw (); | |
1290 | ||
1291 | extern int isblank_l (int, __locale_t) throw (); | |
1292 | ||
1293 | ||
1294 | ||
1295 | extern int __tolower_l (int __c, __locale_t __l) throw (); | |
1296 | extern int tolower_l (int __c, __locale_t __l) throw (); | |
1297 | ||
1298 | ||
1299 | extern int __toupper_l (int __c, __locale_t __l) throw (); | |
1300 | extern int toupper_l (int __c, __locale_t __l) throw (); | |
1301 | # 323 "/usr/include/gentoo-multilib/amd64/ctype.h" 3 4 | |
1302 | } | |
1303 | # 9 "/usr/include/ctype.h" 2 3 4 | |
1304 | # 655 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wxchar.h" 2 | |
1305 | # 1 "/usr/include/string.h" 1 3 4 | |
1306 | ||
1307 | ||
1308 | ||
1309 | ||
1310 | ||
1311 | ||
1312 | ||
1313 | # 1 "/usr/include/gentoo-multilib/amd64/string.h" 1 3 4 | |
1314 | # 26 "/usr/include/gentoo-multilib/amd64/string.h" 3 4 | |
1315 | # 1 "/usr/include/features.h" 1 3 4 | |
1316 | # 27 "/usr/include/gentoo-multilib/amd64/string.h" 2 3 4 | |
1317 | ||
1318 | extern "C" { | |
1319 | ||
1320 | ||
1321 | ||
1322 | ||
1323 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 | |
1324 | # 34 "/usr/include/gentoo-multilib/amd64/string.h" 2 3 4 | |
1325 | ||
1326 | ||
1327 | ||
1328 | ||
1329 | extern void *memcpy (void *__restrict __dest, | |
1330 | __const void *__restrict __src, size_t __n) | |
1331 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
1332 | ||
1333 | ||
1334 | extern void *memmove (void *__dest, __const void *__src, size_t __n) | |
1335 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
1336 | ||
1337 | ||
1338 | ||
1339 | ||
1340 | ||
1341 | ||
1342 | extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, | |
1343 | int __c, size_t __n) | |
1344 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
1345 | ||
1346 | ||
1347 | ||
1348 | ||
1349 | ||
1350 | extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1))); | |
1351 | ||
1352 | ||
1353 | extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) | |
1354 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
1355 | ||
1356 | ||
1357 | extern void *memchr (__const void *__s, int __c, size_t __n) | |
1358 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
1359 | ||
1360 | ||
1361 | ||
1362 | ||
1363 | ||
1364 | extern void *rawmemchr (__const void *__s, int __c) | |
1365 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
1366 | ||
1367 | ||
1368 | extern void *memrchr (__const void *__s, int __c, size_t __n) | |
1369 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
1370 | ||
1371 | ||
1372 | ||
1373 | ||
1374 | ||
1375 | extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) | |
1376 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
1377 | ||
1378 | extern char *strncpy (char *__restrict __dest, | |
1379 | __const char *__restrict __src, size_t __n) | |
1380 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
1381 | ||
1382 | ||
1383 | extern char *strcat (char *__restrict __dest, __const char *__restrict __src) | |
1384 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
1385 | ||
1386 | extern char *strncat (char *__restrict __dest, __const char *__restrict __src, | |
1387 | size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); | |
1388 | ||
1389 | ||
1390 | extern int strcmp (__const char *__s1, __const char *__s2) | |
1391 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
1392 | ||
1393 | extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) | |
1394 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
1395 | ||
1396 | ||
1397 | extern int strcoll (__const char *__s1, __const char *__s2) | |
1398 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
1399 | ||
1400 | extern size_t strxfrm (char *__restrict __dest, | |
1401 | __const char *__restrict __src, size_t __n) | |
1402 | throw () __attribute__ ((__nonnull__ (2))); | |
1403 | ||
1404 | ||
1405 | ||
1406 | ||
1407 | ||
1408 | ||
1409 | # 1 "/usr/include/xlocale.h" 1 3 4 | |
1410 | # 119 "/usr/include/gentoo-multilib/amd64/string.h" 2 3 4 | |
1411 | ||
1412 | ||
1413 | extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) | |
1414 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); | |
1415 | ||
1416 | extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, | |
1417 | __locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4))); | |
1418 | ||
1419 | ||
1420 | ||
1421 | ||
1422 | extern char *strdup (__const char *__s) | |
1423 | throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); | |
1424 | ||
1425 | ||
1426 | ||
1427 | ||
1428 | ||
1429 | ||
1430 | extern char *strndup (__const char *__string, size_t __n) | |
1431 | throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); | |
1432 | # 165 "/usr/include/gentoo-multilib/amd64/string.h" 3 4 | |
1433 | ||
1434 | ||
1435 | extern char *strchr (__const char *__s, int __c) | |
1436 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
1437 | ||
1438 | extern char *strrchr (__const char *__s, int __c) | |
1439 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
1440 | ||
1441 | ||
1442 | ||
1443 | ||
1444 | ||
1445 | extern char *strchrnul (__const char *__s, int __c) | |
1446 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
1447 | ||
1448 | ||
1449 | ||
1450 | ||
1451 | ||
1452 | extern size_t strcspn (__const char *__s, __const char *__reject) | |
1453 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
1454 | ||
1455 | ||
1456 | extern size_t strspn (__const char *__s, __const char *__accept) | |
1457 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
1458 | ||
1459 | extern char *strpbrk (__const char *__s, __const char *__accept) | |
1460 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
1461 | ||
1462 | extern char *strstr (__const char *__haystack, __const char *__needle) | |
1463 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
1464 | ||
1465 | ||
1466 | ||
1467 | extern char *strtok (char *__restrict __s, __const char *__restrict __delim) | |
1468 | throw () __attribute__ ((__nonnull__ (2))); | |
1469 | ||
1470 | ||
1471 | ||
1472 | ||
1473 | extern char *__strtok_r (char *__restrict __s, | |
1474 | __const char *__restrict __delim, | |
1475 | char **__restrict __save_ptr) | |
1476 | throw () __attribute__ ((__nonnull__ (2, 3))); | |
1477 | ||
1478 | extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, | |
1479 | char **__restrict __save_ptr) | |
1480 | throw () __attribute__ ((__nonnull__ (2, 3))); | |
1481 | ||
1482 | ||
1483 | ||
1484 | ||
1485 | extern char *strcasestr (__const char *__haystack, __const char *__needle) | |
1486 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
1487 | ||
1488 | ||
1489 | ||
1490 | ||
1491 | ||
1492 | ||
1493 | extern void *memmem (__const void *__haystack, size_t __haystacklen, | |
1494 | __const void *__needle, size_t __needlelen) | |
1495 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); | |
1496 | ||
1497 | ||
1498 | ||
1499 | extern void *__mempcpy (void *__restrict __dest, | |
1500 | __const void *__restrict __src, size_t __n) | |
1501 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
1502 | extern void *mempcpy (void *__restrict __dest, | |
1503 | __const void *__restrict __src, size_t __n) | |
1504 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
1505 | ||
1506 | ||
1507 | ||
1508 | ||
1509 | ||
1510 | extern size_t strlen (__const char *__s) | |
1511 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
1512 | ||
1513 | ||
1514 | ||
1515 | ||
1516 | ||
1517 | extern size_t strnlen (__const char *__string, size_t __maxlen) | |
1518 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
1519 | ||
1520 | ||
1521 | ||
1522 | ||
1523 | ||
1524 | extern char *strerror (int __errnum) throw (); | |
1525 | ||
1526 | # 281 "/usr/include/gentoo-multilib/amd64/string.h" 3 4 | |
1527 | extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) | |
1528 | throw () __attribute__ ((__nonnull__ (2))); | |
1529 | ||
1530 | ||
1531 | ||
1532 | ||
1533 | ||
1534 | extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); | |
1535 | ||
1536 | ||
1537 | ||
1538 | extern void bcopy (__const void *__src, void *__dest, size_t __n) | |
1539 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
1540 | ||
1541 | ||
1542 | extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); | |
1543 | ||
1544 | ||
1545 | extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) | |
1546 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
1547 | ||
1548 | ||
1549 | extern char *index (__const char *__s, int __c) | |
1550 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
1551 | ||
1552 | ||
1553 | extern char *rindex (__const char *__s, int __c) | |
1554 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
1555 | ||
1556 | ||
1557 | ||
1558 | extern int ffs (int __i) throw () __attribute__ ((__const__)); | |
1559 | ||
1560 | ||
1561 | ||
1562 | ||
1563 | extern int ffsl (long int __l) throw () __attribute__ ((__const__)); | |
1564 | ||
1565 | __extension__ extern int ffsll (long long int __ll) | |
1566 | throw () __attribute__ ((__const__)); | |
1567 | ||
1568 | ||
1569 | ||
1570 | ||
1571 | extern int strcasecmp (__const char *__s1, __const char *__s2) | |
1572 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
1573 | ||
1574 | ||
1575 | extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) | |
1576 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
1577 | ||
1578 | ||
1579 | ||
1580 | ||
1581 | ||
1582 | extern int strcasecmp_l (__const char *__s1, __const char *__s2, | |
1583 | __locale_t __loc) | |
1584 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); | |
1585 | ||
1586 | extern int strncasecmp_l (__const char *__s1, __const char *__s2, | |
1587 | size_t __n, __locale_t __loc) | |
1588 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); | |
1589 | ||
1590 | ||
1591 | ||
1592 | ||
1593 | ||
1594 | extern char *strsep (char **__restrict __stringp, | |
1595 | __const char *__restrict __delim) | |
1596 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
1597 | ||
1598 | ||
1599 | ||
1600 | ||
1601 | extern int strverscmp (__const char *__s1, __const char *__s2) | |
1602 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
1603 | ||
1604 | ||
1605 | extern char *strsignal (int __sig) throw (); | |
1606 | ||
1607 | ||
1608 | extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) | |
1609 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
1610 | extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) | |
1611 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
1612 | ||
1613 | ||
1614 | ||
1615 | extern char *__stpncpy (char *__restrict __dest, | |
1616 | __const char *__restrict __src, size_t __n) | |
1617 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
1618 | extern char *stpncpy (char *__restrict __dest, | |
1619 | __const char *__restrict __src, size_t __n) | |
1620 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
1621 | ||
1622 | ||
1623 | extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1))); | |
1624 | ||
1625 | ||
1626 | extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); | |
1627 | ||
1628 | ||
1629 | ||
1630 | ||
1631 | ||
1632 | ||
1633 | extern char *basename (__const char *__filename) throw () __attribute__ ((__nonnull__ (1))); | |
1634 | # 426 "/usr/include/gentoo-multilib/amd64/string.h" 3 4 | |
1635 | } | |
1636 | # 9 "/usr/include/string.h" 2 3 4 | |
1637 | # 656 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wxchar.h" 2 | |
1638 | # 790 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wxchar.h" | |
1639 | inline bool wxIsEmpty(const wxChar *p) { return !p || !*p; } | |
1640 | ||
1641 | ||
1642 | inline size_t wxStrlen(const wxChar *psz) { return psz ? strlen(psz) : 0; } | |
1643 | # 810 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wxchar.h" | |
1644 | bool wxOKlibc(); | |
1645 | # 1086 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wxchar.h" | |
1646 | wchar_t *wxStrdupW(const wchar_t *pwz); | |
1647 | # 1161 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wxchar.h" | |
1648 | size_t wxMB2WC(wchar_t *buf, const char *psz, size_t n); | |
1649 | size_t wxWC2MB(char *buf, const wchar_t *psz, size_t n); | |
1650 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/debug.h" 2 | |
1651 | # 130 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/debug.h" | |
1652 | extern const bool wxFalse; | |
1653 | # 247 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/debug.h" | |
1654 | inline bool wxIsDebuggerRunning() { return false; } | |
1655 | # 510 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" 2 | |
1656 | ||
1657 | ||
1658 | ||
1659 | ||
1660 | ||
1661 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 | |
1662 | # 152 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/stddef.h" 3 4 | |
1663 | typedef long int ptrdiff_t; | |
1664 | # 516 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" 2 | |
1665 | # 605 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" | |
1666 | template <class T> | |
1667 | inline void wxUnusedVar(const T& ) { } | |
1668 | # 654 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" | |
1669 | enum | |
1670 | { | |
1671 | wxUNKNOWN_PLATFORM, | |
1672 | wxCURSES, | |
1673 | wxXVIEW_X, | |
1674 | wxMOTIF_X, | |
1675 | wxCOSE_X, | |
1676 | wxNEXTSTEP, | |
1677 | wxMAC, | |
1678 | wxMAC_DARWIN, | |
1679 | wxBEOS, | |
1680 | wxGTK, | |
1681 | wxGTK_WIN32, | |
1682 | wxGTK_OS2, | |
1683 | wxGTK_BEOS, | |
1684 | wxGEOS, | |
1685 | wxOS2_PM, | |
1686 | wxWINDOWS, | |
1687 | wxMICROWINDOWS, | |
1688 | wxPENWINDOWS, | |
1689 | wxWINDOWS_NT, | |
1690 | wxWIN32S, | |
1691 | wxWIN95, | |
1692 | wxWIN386, | |
1693 | wxWINDOWS_CE, | |
1694 | wxWINDOWS_POCKETPC, | |
1695 | wxWINDOWS_SMARTPHONE, | |
1696 | wxMGL_UNIX, | |
1697 | wxMGL_X, | |
1698 | wxMGL_WIN32, | |
1699 | wxMGL_OS2, | |
1700 | wxMGL_DOS, | |
1701 | wxWINDOWS_OS2, | |
1702 | wxUNIX, | |
1703 | wxX11, | |
1704 | wxPALMOS, | |
1705 | wxDOS | |
1706 | }; | |
1707 | ||
1708 | ||
1709 | ||
1710 | ||
1711 | ||
1712 | ||
1713 | typedef int wxCoord; | |
1714 | ||
1715 | enum { wxDefaultCoord = -1 }; | |
1716 | # 717 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" | |
1717 | typedef signed char wxInt8; | |
1718 | typedef unsigned char wxUint8; | |
1719 | typedef wxUint8 wxByte; | |
1720 | # 731 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" | |
1721 | typedef signed short wxInt16; | |
1722 | typedef unsigned short wxUint16; | |
1723 | ||
1724 | typedef wxUint16 wxWord; | |
1725 | # 828 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" | |
1726 | typedef int wxInt32; | |
1727 | typedef unsigned int wxUint32; | |
1728 | # 871 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" | |
1729 | typedef wxUint32 wxDword; | |
1730 | ||
1731 | ||
1732 | ||
1733 | ||
1734 | ||
1735 | ||
1736 | typedef unsigned long wxUIntPtr; | |
1737 | # 892 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" | |
1738 | inline wxUIntPtr wxPtrToUInt(const void *p) | |
1739 | { | |
1740 | # 903 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" | |
1741 | return reinterpret_cast<wxUIntPtr>(p); | |
1742 | ||
1743 | ||
1744 | ||
1745 | ||
1746 | } | |
1747 | ||
1748 | inline void *wxUIntToPtr(wxUIntPtr p) | |
1749 | { | |
1750 | ||
1751 | ||
1752 | ||
1753 | ||
1754 | return reinterpret_cast<void *>(p); | |
1755 | ||
1756 | ||
1757 | ||
1758 | ||
1759 | } | |
1760 | # 1001 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" | |
1761 | typedef long wxInt64; | |
1762 | typedef unsigned long wxUint64; | |
1763 | # 1037 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" | |
1764 | typedef float wxFloat32; | |
1765 | ||
1766 | ||
1767 | ||
1768 | typedef double wxFloat64; | |
1769 | ||
1770 | ||
1771 | ||
1772 | ||
1773 | ||
1774 | typedef double wxDouble; | |
1775 | # 1216 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" | |
1776 | enum wxGeometryCentre | |
1777 | { | |
1778 | wxCENTRE = 0x0001, | |
1779 | wxCENTER = wxCENTRE | |
1780 | }; | |
1781 | ||
1782 | ||
1783 | ||
1784 | ||
1785 | ||
1786 | ||
1787 | ||
1788 | enum wxOrientation | |
1789 | { | |
1790 | ||
1791 | wxHORIZONTAL = 0x0004, | |
1792 | wxVERTICAL = 0x0008, | |
1793 | ||
1794 | wxBOTH = wxVERTICAL | wxHORIZONTAL | |
1795 | }; | |
1796 | ||
1797 | enum wxDirection | |
1798 | { | |
1799 | wxLEFT = 0x0010, | |
1800 | wxRIGHT = 0x0020, | |
1801 | wxUP = 0x0040, | |
1802 | wxDOWN = 0x0080, | |
1803 | ||
1804 | wxTOP = wxUP, | |
1805 | wxBOTTOM = wxDOWN, | |
1806 | ||
1807 | wxNORTH = wxUP, | |
1808 | wxSOUTH = wxDOWN, | |
1809 | wxWEST = wxLEFT, | |
1810 | wxEAST = wxRIGHT, | |
1811 | ||
1812 | wxALL = (wxUP | wxDOWN | wxRIGHT | wxLEFT) | |
1813 | }; | |
1814 | ||
1815 | enum wxAlignment | |
1816 | { | |
1817 | wxALIGN_NOT = 0x0000, | |
1818 | wxALIGN_CENTER_HORIZONTAL = 0x0100, | |
1819 | wxALIGN_CENTRE_HORIZONTAL = wxALIGN_CENTER_HORIZONTAL, | |
1820 | wxALIGN_LEFT = wxALIGN_NOT, | |
1821 | wxALIGN_TOP = wxALIGN_NOT, | |
1822 | wxALIGN_RIGHT = 0x0200, | |
1823 | wxALIGN_BOTTOM = 0x0400, | |
1824 | wxALIGN_CENTER_VERTICAL = 0x0800, | |
1825 | wxALIGN_CENTRE_VERTICAL = wxALIGN_CENTER_VERTICAL, | |
1826 | ||
1827 | wxALIGN_CENTER = (wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL), | |
1828 | wxALIGN_CENTRE = wxALIGN_CENTER, | |
1829 | ||
1830 | ||
1831 | wxALIGN_MASK = 0x0f00 | |
1832 | }; | |
1833 | ||
1834 | enum wxStretch | |
1835 | { | |
1836 | wxSTRETCH_NOT = 0x0000, | |
1837 | wxSHRINK = 0x1000, | |
1838 | wxGROW = 0x2000, | |
1839 | wxEXPAND = wxGROW, | |
1840 | wxSHAPED = 0x4000, | |
1841 | wxFIXED_MINSIZE = 0x8000, | |
1842 | wxTILE = 0xc000, | |
1843 | ||
1844 | ||
1845 | ||
1846 | wxADJUST_MINSIZE = 0x00100000 | |
1847 | ||
1848 | ||
1849 | ||
1850 | }; | |
1851 | ||
1852 | ||
1853 | enum wxBorder | |
1854 | { | |
1855 | ||
1856 | ||
1857 | wxBORDER_DEFAULT = 0, | |
1858 | ||
1859 | wxBORDER_NONE = 0x00200000, | |
1860 | wxBORDER_STATIC = 0x01000000, | |
1861 | wxBORDER_SIMPLE = 0x02000000, | |
1862 | wxBORDER_RAISED = 0x04000000, | |
1863 | wxBORDER_SUNKEN = 0x08000000, | |
1864 | wxBORDER_DOUBLE = 0x10000000, | |
1865 | ||
1866 | ||
1867 | wxBORDER_MASK = 0x1f200000 | |
1868 | }; | |
1869 | # 1662 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" | |
1870 | enum wxBackgroundStyle | |
1871 | { | |
1872 | wxBG_STYLE_SYSTEM, | |
1873 | wxBG_STYLE_COLOUR, | |
1874 | wxBG_STYLE_CUSTOM | |
1875 | }; | |
1876 | ||
1877 | ||
1878 | ||
1879 | ||
1880 | ||
1881 | ||
1882 | enum | |
1883 | { | |
1884 | ||
1885 | wxID_NONE = -3, | |
1886 | ||
1887 | ||
1888 | wxID_SEPARATOR = -2, | |
1889 | ||
1890 | ||
1891 | ||
1892 | wxID_ANY = -1, | |
1893 | ||
1894 | ||
1895 | ||
1896 | wxID_LOWEST = 4999, | |
1897 | ||
1898 | wxID_OPEN, | |
1899 | wxID_CLOSE, | |
1900 | wxID_NEW, | |
1901 | wxID_SAVE, | |
1902 | wxID_SAVEAS, | |
1903 | wxID_REVERT, | |
1904 | wxID_EXIT, | |
1905 | wxID_UNDO, | |
1906 | wxID_REDO, | |
1907 | wxID_HELP, | |
1908 | wxID_PRINT, | |
1909 | wxID_PRINT_SETUP, | |
1910 | wxID_PREVIEW, | |
1911 | wxID_ABOUT, | |
1912 | wxID_HELP_CONTENTS, | |
1913 | wxID_HELP_COMMANDS, | |
1914 | wxID_HELP_PROCEDURES, | |
1915 | wxID_HELP_CONTEXT, | |
1916 | wxID_CLOSE_ALL, | |
1917 | wxID_PREFERENCES , | |
1918 | ||
1919 | wxID_CUT = 5030, | |
1920 | wxID_COPY, | |
1921 | wxID_PASTE, | |
1922 | wxID_CLEAR, | |
1923 | wxID_FIND, | |
1924 | wxID_DUPLICATE, | |
1925 | wxID_SELECTALL, | |
1926 | wxID_DELETE, | |
1927 | wxID_REPLACE, | |
1928 | wxID_REPLACE_ALL, | |
1929 | wxID_PROPERTIES, | |
1930 | ||
1931 | wxID_VIEW_DETAILS, | |
1932 | wxID_VIEW_LARGEICONS, | |
1933 | wxID_VIEW_SMALLICONS, | |
1934 | wxID_VIEW_LIST, | |
1935 | wxID_VIEW_SORTDATE, | |
1936 | wxID_VIEW_SORTNAME, | |
1937 | wxID_VIEW_SORTSIZE, | |
1938 | wxID_VIEW_SORTTYPE, | |
1939 | ||
1940 | wxID_FILE1 = 5050, | |
1941 | wxID_FILE2, | |
1942 | wxID_FILE3, | |
1943 | wxID_FILE4, | |
1944 | wxID_FILE5, | |
1945 | wxID_FILE6, | |
1946 | wxID_FILE7, | |
1947 | wxID_FILE8, | |
1948 | wxID_FILE9, | |
1949 | ||
1950 | ||
1951 | wxID_OK = 5100, | |
1952 | wxID_CANCEL, | |
1953 | wxID_APPLY, | |
1954 | wxID_YES, | |
1955 | wxID_NO, | |
1956 | wxID_STATIC, | |
1957 | wxID_FORWARD, | |
1958 | wxID_BACKWARD, | |
1959 | wxID_DEFAULT, | |
1960 | wxID_MORE, | |
1961 | wxID_SETUP, | |
1962 | wxID_RESET, | |
1963 | wxID_CONTEXT_HELP, | |
1964 | wxID_YESTOALL, | |
1965 | wxID_NOTOALL, | |
1966 | wxID_ABORT, | |
1967 | wxID_RETRY, | |
1968 | wxID_IGNORE, | |
1969 | wxID_ADD, | |
1970 | wxID_REMOVE, | |
1971 | ||
1972 | wxID_UP, | |
1973 | wxID_DOWN, | |
1974 | wxID_HOME, | |
1975 | wxID_REFRESH, | |
1976 | wxID_STOP, | |
1977 | wxID_INDEX, | |
1978 | ||
1979 | wxID_BOLD, | |
1980 | wxID_ITALIC, | |
1981 | wxID_JUSTIFY_CENTER, | |
1982 | wxID_JUSTIFY_FILL, | |
1983 | wxID_JUSTIFY_RIGHT, | |
1984 | wxID_JUSTIFY_LEFT, | |
1985 | wxID_UNDERLINE, | |
1986 | wxID_INDENT, | |
1987 | wxID_UNINDENT, | |
1988 | wxID_ZOOM_100, | |
1989 | wxID_ZOOM_FIT, | |
1990 | wxID_ZOOM_IN, | |
1991 | wxID_ZOOM_OUT, | |
1992 | wxID_UNDELETE, | |
1993 | wxID_REVERT_TO_SAVED, | |
1994 | ||
1995 | ||
1996 | wxID_SYSTEM_MENU = 5200, | |
1997 | wxID_CLOSE_FRAME, | |
1998 | wxID_MOVE_FRAME, | |
1999 | wxID_RESIZE_FRAME, | |
2000 | wxID_MAXIMIZE_FRAME, | |
2001 | wxID_ICONIZE_FRAME, | |
2002 | wxID_RESTORE_FRAME, | |
2003 | ||
2004 | ||
2005 | wxID_FILEDLGG = 5900, | |
2006 | ||
2007 | wxID_HIGHEST = 5999 | |
2008 | }; | |
2009 | ||
2010 | ||
2011 | ||
2012 | ||
2013 | ||
2014 | ||
2015 | enum wxItemKind | |
2016 | { | |
2017 | wxITEM_SEPARATOR = -1, | |
2018 | wxITEM_NORMAL, | |
2019 | wxITEM_CHECK, | |
2020 | wxITEM_RADIO, | |
2021 | wxITEM_MAX | |
2022 | }; | |
2023 | ||
2024 | ||
2025 | enum wxHitTest | |
2026 | { | |
2027 | wxHT_NOWHERE, | |
2028 | ||
2029 | ||
2030 | wxHT_SCROLLBAR_FIRST = wxHT_NOWHERE, | |
2031 | wxHT_SCROLLBAR_ARROW_LINE_1, | |
2032 | wxHT_SCROLLBAR_ARROW_LINE_2, | |
2033 | wxHT_SCROLLBAR_ARROW_PAGE_1, | |
2034 | wxHT_SCROLLBAR_ARROW_PAGE_2, | |
2035 | wxHT_SCROLLBAR_THUMB, | |
2036 | wxHT_SCROLLBAR_BAR_1, | |
2037 | wxHT_SCROLLBAR_BAR_2, | |
2038 | wxHT_SCROLLBAR_LAST, | |
2039 | ||
2040 | ||
2041 | wxHT_WINDOW_OUTSIDE, | |
2042 | wxHT_WINDOW_INSIDE, | |
2043 | wxHT_WINDOW_VERT_SCROLLBAR, | |
2044 | wxHT_WINDOW_HORZ_SCROLLBAR, | |
2045 | wxHT_WINDOW_CORNER, | |
2046 | ||
2047 | wxHT_MAX | |
2048 | }; | |
2049 | # 1869 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" | |
2050 | enum | |
2051 | { | |
2052 | ||
2053 | wxDEFAULT = 70, | |
2054 | wxDECORATIVE, | |
2055 | wxROMAN, | |
2056 | wxSCRIPT, | |
2057 | wxSWISS, | |
2058 | wxMODERN, | |
2059 | wxTELETYPE, | |
2060 | ||
2061 | ||
2062 | wxVARIABLE = 80, | |
2063 | wxFIXED, | |
2064 | ||
2065 | wxNORMAL = 90, | |
2066 | wxLIGHT, | |
2067 | wxBOLD, | |
2068 | ||
2069 | wxITALIC, | |
2070 | wxSLANT, | |
2071 | ||
2072 | ||
2073 | wxSOLID = 100, | |
2074 | wxDOT, | |
2075 | wxLONG_DASH, | |
2076 | wxSHORT_DASH, | |
2077 | wxDOT_DASH, | |
2078 | wxUSER_DASH, | |
2079 | ||
2080 | wxTRANSPARENT, | |
2081 | ||
2082 | ||
2083 | ||
2084 | wxSTIPPLE_MASK_OPAQUE, | |
2085 | wxSTIPPLE_MASK, | |
2086 | ||
2087 | wxSTIPPLE = 110, | |
2088 | ||
2089 | wxBDIAGONAL_HATCH, | |
2090 | wxCROSSDIAG_HATCH, | |
2091 | wxFDIAGONAL_HATCH, | |
2092 | wxCROSS_HATCH, | |
2093 | wxHORIZONTAL_HATCH, | |
2094 | wxVERTICAL_HATCH, | |
2095 | wxFIRST_HATCH = wxBDIAGONAL_HATCH, | |
2096 | wxLAST_HATCH = wxVERTICAL_HATCH, | |
2097 | ||
2098 | wxJOIN_BEVEL = 120, | |
2099 | wxJOIN_MITER, | |
2100 | wxJOIN_ROUND, | |
2101 | ||
2102 | wxCAP_ROUND = 130, | |
2103 | wxCAP_PROJECTING, | |
2104 | wxCAP_BUTT | |
2105 | }; | |
2106 | # 1933 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" | |
2107 | typedef enum | |
2108 | { | |
2109 | wxCLEAR, wxROP_BLACK = wxCLEAR, wxBLIT_BLACKNESS = wxCLEAR, | |
2110 | wxXOR, wxROP_XORPEN = wxXOR, wxBLIT_SRCINVERT = wxXOR, | |
2111 | wxINVERT, wxROP_NOT = wxINVERT, wxBLIT_DSTINVERT = wxINVERT, | |
2112 | wxOR_REVERSE, wxROP_MERGEPENNOT = wxOR_REVERSE, wxBLIT_00DD0228 = wxOR_REVERSE, | |
2113 | wxAND_REVERSE, wxROP_MASKPENNOT = wxAND_REVERSE, wxBLIT_SRCERASE = wxAND_REVERSE, | |
2114 | wxCOPY, wxROP_COPYPEN = wxCOPY, wxBLIT_SRCCOPY = wxCOPY, | |
2115 | wxAND, wxROP_MASKPEN = wxAND, wxBLIT_SRCAND = wxAND, | |
2116 | wxAND_INVERT, wxROP_MASKNOTPEN = wxAND_INVERT, wxBLIT_00220326 = wxAND_INVERT, | |
2117 | wxNO_OP, wxROP_NOP = wxNO_OP, wxBLIT_00AA0029 = wxNO_OP, | |
2118 | wxNOR, wxROP_NOTMERGEPEN = wxNOR, wxBLIT_NOTSRCERASE = wxNOR, | |
2119 | wxEQUIV, wxROP_NOTXORPEN = wxEQUIV, wxBLIT_00990066 = wxEQUIV, | |
2120 | wxSRC_INVERT, wxROP_NOTCOPYPEN = wxSRC_INVERT, wxBLIT_NOTSCRCOPY = wxSRC_INVERT, | |
2121 | wxOR_INVERT, wxROP_MERGENOTPEN = wxOR_INVERT, wxBLIT_MERGEPAINT = wxOR_INVERT, | |
2122 | wxNAND, wxROP_NOTMASKPEN = wxNAND, wxBLIT_007700E6 = wxNAND, | |
2123 | wxOR, wxROP_MERGEPEN = wxOR, wxBLIT_SRCPAINT = wxOR, | |
2124 | wxSET, wxROP_WHITE = wxSET, wxBLIT_WHITENESS = wxSET | |
2125 | } form_ops_t; | |
2126 | ||
2127 | ||
2128 | enum | |
2129 | { | |
2130 | wxFLOOD_SURFACE = 1, | |
2131 | wxFLOOD_BORDER | |
2132 | }; | |
2133 | ||
2134 | ||
2135 | enum | |
2136 | { | |
2137 | wxODDEVEN_RULE = 1, | |
2138 | wxWINDING_RULE | |
2139 | }; | |
2140 | ||
2141 | ||
2142 | enum | |
2143 | { | |
2144 | wxTOOL_TOP = 1, | |
2145 | wxTOOL_BOTTOM, | |
2146 | wxTOOL_LEFT, | |
2147 | wxTOOL_RIGHT | |
2148 | }; | |
2149 | ||
2150 | ||
2151 | ||
2152 | enum wxDataFormatId | |
2153 | { | |
2154 | wxDF_INVALID = 0, | |
2155 | wxDF_TEXT = 1, | |
2156 | wxDF_BITMAP = 2, | |
2157 | wxDF_METAFILE = 3, | |
2158 | wxDF_SYLK = 4, | |
2159 | wxDF_DIF = 5, | |
2160 | wxDF_TIFF = 6, | |
2161 | wxDF_OEMTEXT = 7, | |
2162 | wxDF_DIB = 8, | |
2163 | wxDF_PALETTE = 9, | |
2164 | wxDF_PENDATA = 10, | |
2165 | wxDF_RIFF = 11, | |
2166 | wxDF_WAVE = 12, | |
2167 | wxDF_UNICODETEXT = 13, | |
2168 | wxDF_ENHMETAFILE = 14, | |
2169 | wxDF_FILENAME = 15, | |
2170 | wxDF_LOCALE = 16, | |
2171 | wxDF_PRIVATE = 20, | |
2172 | wxDF_HTML = 30, | |
2173 | wxDF_MAX | |
2174 | }; | |
2175 | ||
2176 | ||
2177 | enum wxKeyCode | |
2178 | { | |
2179 | WXK_BACK = 8, | |
2180 | WXK_TAB = 9, | |
2181 | WXK_RETURN = 13, | |
2182 | WXK_ESCAPE = 27, | |
2183 | WXK_SPACE = 32, | |
2184 | WXK_DELETE = 127, | |
2185 | ||
2186 | ||
2187 | ||
2188 | ||
2189 | WXK_START = 300, | |
2190 | WXK_LBUTTON, | |
2191 | WXK_RBUTTON, | |
2192 | WXK_CANCEL, | |
2193 | WXK_MBUTTON, | |
2194 | WXK_CLEAR, | |
2195 | WXK_SHIFT, | |
2196 | WXK_ALT, | |
2197 | WXK_CONTROL, | |
2198 | WXK_MENU, | |
2199 | WXK_PAUSE, | |
2200 | WXK_CAPITAL, | |
2201 | WXK_PRIOR, | |
2202 | WXK_NEXT, | |
2203 | WXK_END, | |
2204 | WXK_HOME, | |
2205 | WXK_LEFT, | |
2206 | WXK_UP, | |
2207 | WXK_RIGHT, | |
2208 | WXK_DOWN, | |
2209 | WXK_SELECT, | |
2210 | WXK_PRINT, | |
2211 | WXK_EXECUTE, | |
2212 | WXK_SNAPSHOT, | |
2213 | WXK_INSERT, | |
2214 | WXK_HELP, | |
2215 | WXK_NUMPAD0, | |
2216 | WXK_NUMPAD1, | |
2217 | WXK_NUMPAD2, | |
2218 | WXK_NUMPAD3, | |
2219 | WXK_NUMPAD4, | |
2220 | WXK_NUMPAD5, | |
2221 | WXK_NUMPAD6, | |
2222 | WXK_NUMPAD7, | |
2223 | WXK_NUMPAD8, | |
2224 | WXK_NUMPAD9, | |
2225 | WXK_MULTIPLY, | |
2226 | WXK_ADD, | |
2227 | WXK_SEPARATOR, | |
2228 | WXK_SUBTRACT, | |
2229 | WXK_DECIMAL, | |
2230 | WXK_DIVIDE, | |
2231 | WXK_F1, | |
2232 | WXK_F2, | |
2233 | WXK_F3, | |
2234 | WXK_F4, | |
2235 | WXK_F5, | |
2236 | WXK_F6, | |
2237 | WXK_F7, | |
2238 | WXK_F8, | |
2239 | WXK_F9, | |
2240 | WXK_F10, | |
2241 | WXK_F11, | |
2242 | WXK_F12, | |
2243 | WXK_F13, | |
2244 | WXK_F14, | |
2245 | WXK_F15, | |
2246 | WXK_F16, | |
2247 | WXK_F17, | |
2248 | WXK_F18, | |
2249 | WXK_F19, | |
2250 | WXK_F20, | |
2251 | WXK_F21, | |
2252 | WXK_F22, | |
2253 | WXK_F23, | |
2254 | WXK_F24, | |
2255 | WXK_NUMLOCK, | |
2256 | WXK_SCROLL, | |
2257 | WXK_PAGEUP, | |
2258 | WXK_PAGEDOWN, | |
2259 | ||
2260 | WXK_NUMPAD_SPACE, | |
2261 | WXK_NUMPAD_TAB, | |
2262 | WXK_NUMPAD_ENTER, | |
2263 | WXK_NUMPAD_F1, | |
2264 | WXK_NUMPAD_F2, | |
2265 | WXK_NUMPAD_F3, | |
2266 | WXK_NUMPAD_F4, | |
2267 | WXK_NUMPAD_HOME, | |
2268 | WXK_NUMPAD_LEFT, | |
2269 | WXK_NUMPAD_UP, | |
2270 | WXK_NUMPAD_RIGHT, | |
2271 | WXK_NUMPAD_DOWN, | |
2272 | WXK_NUMPAD_PRIOR, | |
2273 | WXK_NUMPAD_PAGEUP, | |
2274 | WXK_NUMPAD_NEXT, | |
2275 | WXK_NUMPAD_PAGEDOWN, | |
2276 | WXK_NUMPAD_END, | |
2277 | WXK_NUMPAD_BEGIN, | |
2278 | WXK_NUMPAD_INSERT, | |
2279 | WXK_NUMPAD_DELETE, | |
2280 | WXK_NUMPAD_EQUAL, | |
2281 | WXK_NUMPAD_MULTIPLY, | |
2282 | WXK_NUMPAD_ADD, | |
2283 | WXK_NUMPAD_SEPARATOR, | |
2284 | WXK_NUMPAD_SUBTRACT, | |
2285 | WXK_NUMPAD_DECIMAL, | |
2286 | WXK_NUMPAD_DIVIDE, | |
2287 | ||
2288 | WXK_WINDOWS_LEFT, | |
2289 | WXK_WINDOWS_RIGHT, | |
2290 | WXK_WINDOWS_MENU , | |
2291 | WXK_COMMAND, | |
2292 | ||
2293 | ||
2294 | WXK_SPECIAL1 = 193, | |
2295 | WXK_SPECIAL2, | |
2296 | WXK_SPECIAL3, | |
2297 | WXK_SPECIAL4, | |
2298 | WXK_SPECIAL5, | |
2299 | WXK_SPECIAL6, | |
2300 | WXK_SPECIAL7, | |
2301 | WXK_SPECIAL8, | |
2302 | WXK_SPECIAL9, | |
2303 | WXK_SPECIAL10, | |
2304 | WXK_SPECIAL11, | |
2305 | WXK_SPECIAL12, | |
2306 | WXK_SPECIAL13, | |
2307 | WXK_SPECIAL14, | |
2308 | WXK_SPECIAL15, | |
2309 | WXK_SPECIAL16, | |
2310 | WXK_SPECIAL17, | |
2311 | WXK_SPECIAL18, | |
2312 | WXK_SPECIAL19, | |
2313 | WXK_SPECIAL20 | |
2314 | }; | |
2315 | # 2154 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" | |
2316 | enum | |
2317 | { | |
2318 | wxMM_TEXT = 1, | |
2319 | wxMM_LOMETRIC, | |
2320 | wxMM_HIMETRIC, | |
2321 | wxMM_LOENGLISH, | |
2322 | wxMM_HIENGLISH, | |
2323 | wxMM_TWIPS, | |
2324 | wxMM_ISOTROPIC, | |
2325 | wxMM_ANISOTROPIC, | |
2326 | wxMM_POINTS, | |
2327 | wxMM_METRIC | |
2328 | }; | |
2329 | ||
2330 | ||
2331 | ||
2332 | ||
2333 | ||
2334 | typedef enum | |
2335 | { | |
2336 | wxPAPER_NONE, | |
2337 | wxPAPER_LETTER, | |
2338 | wxPAPER_LEGAL, | |
2339 | wxPAPER_A4, | |
2340 | wxPAPER_CSHEET, | |
2341 | wxPAPER_DSHEET, | |
2342 | wxPAPER_ESHEET, | |
2343 | wxPAPER_LETTERSMALL, | |
2344 | wxPAPER_TABLOID, | |
2345 | wxPAPER_LEDGER, | |
2346 | wxPAPER_STATEMENT, | |
2347 | wxPAPER_EXECUTIVE, | |
2348 | wxPAPER_A3, | |
2349 | wxPAPER_A4SMALL, | |
2350 | wxPAPER_A5, | |
2351 | wxPAPER_B4, | |
2352 | wxPAPER_B5, | |
2353 | wxPAPER_FOLIO, | |
2354 | wxPAPER_QUARTO, | |
2355 | wxPAPER_10X14, | |
2356 | wxPAPER_11X17, | |
2357 | wxPAPER_NOTE, | |
2358 | wxPAPER_ENV_9, | |
2359 | wxPAPER_ENV_10, | |
2360 | wxPAPER_ENV_11, | |
2361 | wxPAPER_ENV_12, | |
2362 | wxPAPER_ENV_14, | |
2363 | wxPAPER_ENV_DL, | |
2364 | wxPAPER_ENV_C5, | |
2365 | wxPAPER_ENV_C3, | |
2366 | wxPAPER_ENV_C4, | |
2367 | wxPAPER_ENV_C6, | |
2368 | wxPAPER_ENV_C65, | |
2369 | wxPAPER_ENV_B4, | |
2370 | wxPAPER_ENV_B5, | |
2371 | wxPAPER_ENV_B6, | |
2372 | wxPAPER_ENV_ITALY, | |
2373 | wxPAPER_ENV_MONARCH, | |
2374 | wxPAPER_ENV_PERSONAL, | |
2375 | wxPAPER_FANFOLD_US, | |
2376 | wxPAPER_FANFOLD_STD_GERMAN, | |
2377 | wxPAPER_FANFOLD_LGL_GERMAN, | |
2378 | ||
2379 | wxPAPER_ISO_B4, | |
2380 | wxPAPER_JAPANESE_POSTCARD, | |
2381 | wxPAPER_9X11, | |
2382 | wxPAPER_10X11, | |
2383 | wxPAPER_15X11, | |
2384 | wxPAPER_ENV_INVITE, | |
2385 | wxPAPER_LETTER_EXTRA, | |
2386 | wxPAPER_LEGAL_EXTRA, | |
2387 | wxPAPER_TABLOID_EXTRA, | |
2388 | wxPAPER_A4_EXTRA, | |
2389 | wxPAPER_LETTER_TRANSVERSE, | |
2390 | wxPAPER_A4_TRANSVERSE, | |
2391 | wxPAPER_LETTER_EXTRA_TRANSVERSE, | |
2392 | wxPAPER_A_PLUS, | |
2393 | wxPAPER_B_PLUS, | |
2394 | wxPAPER_LETTER_PLUS, | |
2395 | wxPAPER_A4_PLUS, | |
2396 | wxPAPER_A5_TRANSVERSE, | |
2397 | wxPAPER_B5_TRANSVERSE, | |
2398 | wxPAPER_A3_EXTRA, | |
2399 | wxPAPER_A5_EXTRA, | |
2400 | wxPAPER_B5_EXTRA, | |
2401 | wxPAPER_A2, | |
2402 | wxPAPER_A3_TRANSVERSE, | |
2403 | wxPAPER_A3_EXTRA_TRANSVERSE, | |
2404 | ||
2405 | wxPAPER_DBL_JAPANESE_POSTCARD, | |
2406 | wxPAPER_A6, | |
2407 | wxPAPER_JENV_KAKU2, | |
2408 | wxPAPER_JENV_KAKU3, | |
2409 | wxPAPER_JENV_CHOU3, | |
2410 | wxPAPER_JENV_CHOU4, | |
2411 | wxPAPER_LETTER_ROTATED, | |
2412 | wxPAPER_A3_ROTATED, | |
2413 | wxPAPER_A4_ROTATED, | |
2414 | wxPAPER_A5_ROTATED, | |
2415 | wxPAPER_B4_JIS_ROTATED, | |
2416 | wxPAPER_B5_JIS_ROTATED, | |
2417 | wxPAPER_JAPANESE_POSTCARD_ROTATED, | |
2418 | wxPAPER_DBL_JAPANESE_POSTCARD_ROTATED, | |
2419 | wxPAPER_A6_ROTATED, | |
2420 | wxPAPER_JENV_KAKU2_ROTATED, | |
2421 | wxPAPER_JENV_KAKU3_ROTATED, | |
2422 | wxPAPER_JENV_CHOU3_ROTATED, | |
2423 | wxPAPER_JENV_CHOU4_ROTATED, | |
2424 | wxPAPER_B6_JIS, | |
2425 | wxPAPER_B6_JIS_ROTATED, | |
2426 | wxPAPER_12X11, | |
2427 | wxPAPER_JENV_YOU4, | |
2428 | wxPAPER_JENV_YOU4_ROTATED, | |
2429 | wxPAPER_P16K, | |
2430 | wxPAPER_P32K, | |
2431 | wxPAPER_P32KBIG, | |
2432 | wxPAPER_PENV_1, | |
2433 | wxPAPER_PENV_2, | |
2434 | wxPAPER_PENV_3, | |
2435 | wxPAPER_PENV_4, | |
2436 | wxPAPER_PENV_5, | |
2437 | wxPAPER_PENV_6, | |
2438 | wxPAPER_PENV_7, | |
2439 | wxPAPER_PENV_8, | |
2440 | wxPAPER_PENV_9, | |
2441 | wxPAPER_PENV_10, | |
2442 | wxPAPER_P16K_ROTATED, | |
2443 | wxPAPER_P32K_ROTATED, | |
2444 | wxPAPER_P32KBIG_ROTATED, | |
2445 | wxPAPER_PENV_1_ROTATED, | |
2446 | wxPAPER_PENV_2_ROTATED, | |
2447 | wxPAPER_PENV_3_ROTATED, | |
2448 | wxPAPER_PENV_4_ROTATED, | |
2449 | wxPAPER_PENV_5_ROTATED, | |
2450 | wxPAPER_PENV_6_ROTATED, | |
2451 | wxPAPER_PENV_7_ROTATED, | |
2452 | wxPAPER_PENV_8_ROTATED, | |
2453 | wxPAPER_PENV_9_ROTATED, | |
2454 | wxPAPER_PENV_10_ROTATED | |
2455 | } wxPaperSize; | |
2456 | # 2304 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" | |
2457 | enum wxDuplexMode | |
2458 | { | |
2459 | wxDUPLEX_SIMPLEX, | |
2460 | wxDUPLEX_HORIZONTAL, | |
2461 | wxDUPLEX_VERTICAL | |
2462 | }; | |
2463 | # 2319 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" | |
2464 | typedef int wxPrintQuality; | |
2465 | ||
2466 | ||
2467 | ||
2468 | ||
2469 | enum wxPrintMode | |
2470 | { | |
2471 | wxPRINT_MODE_NONE = 0, | |
2472 | wxPRINT_MODE_PREVIEW = 1, | |
2473 | wxPRINT_MODE_FILE = 2, | |
2474 | wxPRINT_MODE_PRINTER = 3, | |
2475 | wxPRINT_MODE_STREAM = 4 | |
2476 | }; | |
2477 | ||
2478 | ||
2479 | ||
2480 | ||
2481 | ||
2482 | enum wxUpdateUI | |
2483 | { | |
2484 | wxUPDATE_UI_NONE = 0x0000, | |
2485 | wxUPDATE_UI_RECURSE = 0x0001, | |
2486 | wxUPDATE_UI_FROMIDLE = 0x0002 | |
2487 | }; | |
2488 | # 2746 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" | |
2489 | typedef char gchar; | |
2490 | typedef signed char gint8; | |
2491 | typedef int gint; | |
2492 | typedef unsigned guint; | |
2493 | typedef unsigned long gulong; | |
2494 | typedef void* gpointer; | |
2495 | typedef struct _GSList GSList; | |
2496 | ||
2497 | ||
2498 | typedef struct _GdkColor GdkColor; | |
2499 | typedef struct _GdkColormap GdkColormap; | |
2500 | typedef struct _GdkFont GdkFont; | |
2501 | typedef struct _GdkGC GdkGC; | |
2502 | typedef struct _GdkVisual GdkVisual; | |
2503 | ||
2504 | ||
2505 | typedef struct _GdkAtom *GdkAtom; | |
2506 | typedef struct _GdkDrawable GdkWindow; | |
2507 | typedef struct _GdkDrawable GdkBitmap; | |
2508 | typedef struct _GdkDrawable GdkPixmap; | |
2509 | ||
2510 | ||
2511 | ||
2512 | ||
2513 | ||
2514 | ||
2515 | ||
2516 | typedef struct _GdkCursor GdkCursor; | |
2517 | typedef struct _GdkRegion GdkRegion; | |
2518 | typedef struct _GdkDragContext GdkDragContext; | |
2519 | ||
2520 | ||
2521 | ||
2522 | ||
2523 | ||
2524 | ||
2525 | ||
2526 | typedef struct _GtkWidget GtkWidget; | |
2527 | typedef struct _GtkRcStyle GtkRcStyle; | |
2528 | typedef struct _GtkAdjustment GtkAdjustment; | |
2529 | typedef struct _GtkList GtkList; | |
2530 | typedef struct _GtkToolbar GtkToolbar; | |
2531 | typedef struct _GtkTooltips GtkTooltips; | |
2532 | typedef struct _GtkNotebook GtkNotebook; | |
2533 | typedef struct _GtkNotebookPage GtkNotebookPage; | |
2534 | typedef struct _GtkAccelGroup GtkAccelGroup; | |
2535 | typedef struct _GtkItemFactory GtkItemFactory; | |
2536 | typedef struct _GtkSelectionData GtkSelectionData; | |
2537 | typedef struct _GtkTextBuffer GtkTextBuffer; | |
2538 | ||
2539 | typedef GtkWidget *WXWidget; | |
2540 | # 2813 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" | |
2541 | typedef struct _PangoContext PangoContext; | |
2542 | typedef struct _PangoLayout PangoLayout; | |
2543 | typedef struct _PangoFontDescription PangoFontDescription; | |
2544 | # 14 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wxprec.h" 2 | |
2545 | # 54 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wxprec.h" | |
2546 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 1 | |
2547 | # 16 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" | |
2548 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/object.h" 1 | |
2549 | # 25 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/object.h" | |
2550 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/memory.h" 1 | |
2551 | # 20 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/memory.h" | |
2552 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" 1 | |
2553 | # 39 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
2554 | # 1 "/usr/include/string.h" 1 3 4 | |
2555 | # 40 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" 2 | |
2556 | # 1 "/usr/include/stdio.h" 1 3 4 | |
2557 | ||
2558 | ||
2559 | ||
2560 | ||
2561 | ||
2562 | ||
2563 | ||
2564 | # 1 "/usr/include/gentoo-multilib/amd64/stdio.h" 1 3 4 | |
2565 | # 28 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4 | |
2566 | # 1 "/usr/include/features.h" 1 3 4 | |
2567 | # 29 "/usr/include/gentoo-multilib/amd64/stdio.h" 2 3 4 | |
2568 | ||
2569 | extern "C" { | |
2570 | ||
2571 | ||
2572 | ||
2573 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 | |
2574 | # 35 "/usr/include/gentoo-multilib/amd64/stdio.h" 2 3 4 | |
2575 | ||
2576 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
2577 | # 37 "/usr/include/gentoo-multilib/amd64/stdio.h" 2 3 4 | |
2578 | # 72 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4 | |
2579 | # 1 "/usr/include/libio.h" 1 3 4 | |
2580 | ||
2581 | ||
2582 | ||
2583 | ||
2584 | ||
2585 | ||
2586 | ||
2587 | # 1 "/usr/include/gentoo-multilib/amd64/libio.h" 1 3 4 | |
2588 | # 32 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4 | |
2589 | # 1 "/usr/include/_G_config.h" 1 3 4 | |
2590 | ||
2591 | ||
2592 | ||
2593 | ||
2594 | ||
2595 | ||
2596 | ||
2597 | # 1 "/usr/include/gentoo-multilib/amd64/_G_config.h" 1 3 4 | |
2598 | # 9 "/usr/include/gentoo-multilib/amd64/_G_config.h" 3 4 | |
2599 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
2600 | # 10 "/usr/include/gentoo-multilib/amd64/_G_config.h" 2 3 4 | |
2601 | ||
2602 | ||
2603 | ||
2604 | ||
2605 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 | |
2606 | # 15 "/usr/include/gentoo-multilib/amd64/_G_config.h" 2 3 4 | |
2607 | # 24 "/usr/include/gentoo-multilib/amd64/_G_config.h" 3 4 | |
2608 | # 1 "/usr/include/wchar.h" 1 3 4 | |
2609 | # 25 "/usr/include/gentoo-multilib/amd64/_G_config.h" 2 3 4 | |
2610 | ||
2611 | typedef struct | |
2612 | { | |
2613 | __off_t __pos; | |
2614 | __mbstate_t __state; | |
2615 | } _G_fpos_t; | |
2616 | typedef struct | |
2617 | { | |
2618 | __off64_t __pos; | |
2619 | __mbstate_t __state; | |
2620 | } _G_fpos64_t; | |
2621 | # 44 "/usr/include/gentoo-multilib/amd64/_G_config.h" 3 4 | |
2622 | # 1 "/usr/include/gconv.h" 1 3 4 | |
2623 | ||
2624 | ||
2625 | ||
2626 | ||
2627 | ||
2628 | ||
2629 | ||
2630 | # 1 "/usr/include/gentoo-multilib/amd64/gconv.h" 1 3 4 | |
2631 | # 26 "/usr/include/gentoo-multilib/amd64/gconv.h" 3 4 | |
2632 | # 1 "/usr/include/features.h" 1 3 4 | |
2633 | # 27 "/usr/include/gentoo-multilib/amd64/gconv.h" 2 3 4 | |
2634 | ||
2635 | # 1 "/usr/include/wchar.h" 1 3 4 | |
2636 | # 29 "/usr/include/gentoo-multilib/amd64/gconv.h" 2 3 4 | |
2637 | ||
2638 | ||
2639 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 | |
2640 | # 32 "/usr/include/gentoo-multilib/amd64/gconv.h" 2 3 4 | |
2641 | ||
2642 | ||
2643 | ||
2644 | ||
2645 | ||
2646 | enum | |
2647 | { | |
2648 | __GCONV_OK = 0, | |
2649 | __GCONV_NOCONV, | |
2650 | __GCONV_NODB, | |
2651 | __GCONV_NOMEM, | |
2652 | ||
2653 | __GCONV_EMPTY_INPUT, | |
2654 | __GCONV_FULL_OUTPUT, | |
2655 | __GCONV_ILLEGAL_INPUT, | |
2656 | __GCONV_INCOMPLETE_INPUT, | |
2657 | ||
2658 | __GCONV_ILLEGAL_DESCRIPTOR, | |
2659 | __GCONV_INTERNAL_ERROR | |
2660 | }; | |
2661 | ||
2662 | ||
2663 | ||
2664 | enum | |
2665 | { | |
2666 | __GCONV_IS_LAST = 0x0001, | |
2667 | __GCONV_IGNORE_ERRORS = 0x0002 | |
2668 | }; | |
2669 | ||
2670 | ||
2671 | ||
2672 | struct __gconv_step; | |
2673 | struct __gconv_step_data; | |
2674 | struct __gconv_loaded_object; | |
2675 | struct __gconv_trans_data; | |
2676 | ||
2677 | ||
2678 | ||
2679 | typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *, | |
2680 | __const unsigned char **, __const unsigned char *, | |
2681 | unsigned char **, size_t *, int, int); | |
2682 | ||
2683 | ||
2684 | typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char); | |
2685 | ||
2686 | ||
2687 | typedef int (*__gconv_init_fct) (struct __gconv_step *); | |
2688 | typedef void (*__gconv_end_fct) (struct __gconv_step *); | |
2689 | ||
2690 | ||
2691 | ||
2692 | typedef int (*__gconv_trans_fct) (struct __gconv_step *, | |
2693 | struct __gconv_step_data *, void *, | |
2694 | __const unsigned char *, | |
2695 | __const unsigned char **, | |
2696 | __const unsigned char *, unsigned char **, | |
2697 | size_t *); | |
2698 | ||
2699 | ||
2700 | typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *, | |
2701 | __const unsigned char *, | |
2702 | unsigned char *, unsigned char *); | |
2703 | ||
2704 | ||
2705 | typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***, | |
2706 | size_t *); | |
2707 | ||
2708 | ||
2709 | typedef int (*__gconv_trans_init_fct) (void **, const char *); | |
2710 | typedef void (*__gconv_trans_end_fct) (void *); | |
2711 | ||
2712 | struct __gconv_trans_data | |
2713 | { | |
2714 | ||
2715 | __gconv_trans_fct __trans_fct; | |
2716 | __gconv_trans_context_fct __trans_context_fct; | |
2717 | __gconv_trans_end_fct __trans_end_fct; | |
2718 | void *__data; | |
2719 | struct __gconv_trans_data *__next; | |
2720 | }; | |
2721 | ||
2722 | ||
2723 | ||
2724 | struct __gconv_step | |
2725 | { | |
2726 | struct __gconv_loaded_object *__shlib_handle; | |
2727 | __const char *__modname; | |
2728 | ||
2729 | int __counter; | |
2730 | ||
2731 | char *__from_name; | |
2732 | char *__to_name; | |
2733 | ||
2734 | __gconv_fct __fct; | |
2735 | __gconv_btowc_fct __btowc_fct; | |
2736 | __gconv_init_fct __init_fct; | |
2737 | __gconv_end_fct __end_fct; | |
2738 | ||
2739 | ||
2740 | ||
2741 | int __min_needed_from; | |
2742 | int __max_needed_from; | |
2743 | int __min_needed_to; | |
2744 | int __max_needed_to; | |
2745 | ||
2746 | ||
2747 | int __stateful; | |
2748 | ||
2749 | void *__data; | |
2750 | }; | |
2751 | ||
2752 | ||
2753 | ||
2754 | struct __gconv_step_data | |
2755 | { | |
2756 | unsigned char *__outbuf; | |
2757 | unsigned char *__outbufend; | |
2758 | ||
2759 | ||
2760 | ||
2761 | int __flags; | |
2762 | ||
2763 | ||
2764 | ||
2765 | int __invocation_counter; | |
2766 | ||
2767 | ||
2768 | ||
2769 | int __internal_use; | |
2770 | ||
2771 | __mbstate_t *__statep; | |
2772 | __mbstate_t __state; | |
2773 | ||
2774 | ||
2775 | ||
2776 | struct __gconv_trans_data *__trans; | |
2777 | }; | |
2778 | ||
2779 | ||
2780 | ||
2781 | typedef struct __gconv_info | |
2782 | { | |
2783 | size_t __nsteps; | |
2784 | struct __gconv_step *__steps; | |
2785 | __extension__ struct __gconv_step_data __data []; | |
2786 | } *__gconv_t; | |
2787 | # 9 "/usr/include/gconv.h" 2 3 4 | |
2788 | # 45 "/usr/include/gentoo-multilib/amd64/_G_config.h" 2 3 4 | |
2789 | typedef union | |
2790 | { | |
2791 | struct __gconv_info __cd; | |
2792 | struct | |
2793 | { | |
2794 | struct __gconv_info __cd; | |
2795 | struct __gconv_step_data __data; | |
2796 | } __combined; | |
2797 | } _G_iconv_t; | |
2798 | ||
2799 | typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); | |
2800 | typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); | |
2801 | typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); | |
2802 | typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); | |
2803 | # 9 "/usr/include/_G_config.h" 2 3 4 | |
2804 | # 33 "/usr/include/gentoo-multilib/amd64/libio.h" 2 3 4 | |
2805 | # 166 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4 | |
2806 | struct _IO_jump_t; struct _IO_FILE; | |
2807 | # 176 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4 | |
2808 | typedef void _IO_lock_t; | |
2809 | ||
2810 | ||
2811 | ||
2812 | ||
2813 | ||
2814 | struct _IO_marker { | |
2815 | struct _IO_marker *_next; | |
2816 | struct _IO_FILE *_sbuf; | |
2817 | ||
2818 | ||
2819 | ||
2820 | int _pos; | |
2821 | # 199 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4 | |
2822 | }; | |
2823 | ||
2824 | ||
2825 | enum __codecvt_result | |
2826 | { | |
2827 | __codecvt_ok, | |
2828 | __codecvt_partial, | |
2829 | __codecvt_error, | |
2830 | __codecvt_noconv | |
2831 | }; | |
2832 | # 267 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4 | |
2833 | struct _IO_FILE { | |
2834 | int _flags; | |
2835 | ||
2836 | ||
2837 | ||
2838 | ||
2839 | char* _IO_read_ptr; | |
2840 | char* _IO_read_end; | |
2841 | char* _IO_read_base; | |
2842 | char* _IO_write_base; | |
2843 | char* _IO_write_ptr; | |
2844 | char* _IO_write_end; | |
2845 | char* _IO_buf_base; | |
2846 | char* _IO_buf_end; | |
2847 | ||
2848 | char *_IO_save_base; | |
2849 | char *_IO_backup_base; | |
2850 | char *_IO_save_end; | |
2851 | ||
2852 | struct _IO_marker *_markers; | |
2853 | ||
2854 | struct _IO_FILE *_chain; | |
2855 | ||
2856 | int _fileno; | |
2857 | ||
2858 | ||
2859 | ||
2860 | int _flags2; | |
2861 | ||
2862 | __off_t _old_offset; | |
2863 | ||
2864 | ||
2865 | ||
2866 | unsigned short _cur_column; | |
2867 | signed char _vtable_offset; | |
2868 | char _shortbuf[1]; | |
2869 | ||
2870 | ||
2871 | ||
2872 | _IO_lock_t *_lock; | |
2873 | # 315 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4 | |
2874 | __off64_t _offset; | |
2875 | # 324 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4 | |
2876 | void *__pad1; | |
2877 | void *__pad2; | |
2878 | void *__pad3; | |
2879 | void *__pad4; | |
2880 | size_t __pad5; | |
2881 | ||
2882 | int _mode; | |
2883 | ||
2884 | char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; | |
2885 | ||
2886 | }; | |
2887 | ||
2888 | ||
2889 | ||
2890 | ||
2891 | ||
2892 | struct _IO_FILE_plus; | |
2893 | ||
2894 | extern struct _IO_FILE_plus _IO_2_1_stdin_; | |
2895 | extern struct _IO_FILE_plus _IO_2_1_stdout_; | |
2896 | extern struct _IO_FILE_plus _IO_2_1_stderr_; | |
2897 | # 360 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4 | |
2898 | typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); | |
2899 | ||
2900 | ||
2901 | ||
2902 | ||
2903 | ||
2904 | ||
2905 | ||
2906 | typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, | |
2907 | size_t __n); | |
2908 | ||
2909 | ||
2910 | ||
2911 | ||
2912 | ||
2913 | ||
2914 | ||
2915 | typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); | |
2916 | ||
2917 | ||
2918 | typedef int __io_close_fn (void *__cookie); | |
2919 | ||
2920 | ||
2921 | ||
2922 | ||
2923 | typedef __io_read_fn cookie_read_function_t; | |
2924 | typedef __io_write_fn cookie_write_function_t; | |
2925 | typedef __io_seek_fn cookie_seek_function_t; | |
2926 | typedef __io_close_fn cookie_close_function_t; | |
2927 | ||
2928 | ||
2929 | typedef struct | |
2930 | { | |
2931 | __io_read_fn *read; | |
2932 | __io_write_fn *write; | |
2933 | __io_seek_fn *seek; | |
2934 | __io_close_fn *close; | |
2935 | } _IO_cookie_io_functions_t; | |
2936 | typedef _IO_cookie_io_functions_t cookie_io_functions_t; | |
2937 | ||
2938 | struct _IO_cookie_file; | |
2939 | ||
2940 | ||
2941 | extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, | |
2942 | void *__cookie, _IO_cookie_io_functions_t __fns); | |
2943 | ||
2944 | ||
2945 | ||
2946 | ||
2947 | extern "C" { | |
2948 | ||
2949 | ||
2950 | extern int __underflow (_IO_FILE *) throw (); | |
2951 | extern int __uflow (_IO_FILE *) throw (); | |
2952 | extern int __overflow (_IO_FILE *, int) throw (); | |
2953 | extern wint_t __wunderflow (_IO_FILE *) throw (); | |
2954 | extern wint_t __wuflow (_IO_FILE *) throw (); | |
2955 | extern wint_t __woverflow (_IO_FILE *, wint_t) throw (); | |
2956 | # 450 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4 | |
2957 | extern int _IO_getc (_IO_FILE *__fp) throw (); | |
2958 | extern int _IO_putc (int __c, _IO_FILE *__fp) throw (); | |
2959 | extern int _IO_feof (_IO_FILE *__fp) throw (); | |
2960 | extern int _IO_ferror (_IO_FILE *__fp) throw (); | |
2961 | ||
2962 | extern int _IO_peekc_locked (_IO_FILE *__fp) throw (); | |
2963 | ||
2964 | ||
2965 | ||
2966 | ||
2967 | ||
2968 | extern void _IO_flockfile (_IO_FILE *) throw (); | |
2969 | extern void _IO_funlockfile (_IO_FILE *) throw (); | |
2970 | extern int _IO_ftrylockfile (_IO_FILE *) throw (); | |
2971 | # 480 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4 | |
2972 | extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, | |
2973 | __gnuc_va_list, int *__restrict); | |
2974 | extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, | |
2975 | __gnuc_va_list); | |
2976 | extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t) throw (); | |
2977 | extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) throw (); | |
2978 | ||
2979 | extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) throw (); | |
2980 | extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) throw (); | |
2981 | ||
2982 | extern void _IO_free_backup_area (_IO_FILE *) throw (); | |
2983 | # 542 "/usr/include/gentoo-multilib/amd64/libio.h" 3 4 | |
2984 | } | |
2985 | # 9 "/usr/include/libio.h" 2 3 4 | |
2986 | # 73 "/usr/include/gentoo-multilib/amd64/stdio.h" 2 3 4 | |
2987 | # 86 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4 | |
2988 | ||
2989 | ||
2990 | ||
2991 | ||
2992 | typedef _G_fpos64_t fpos_t; | |
2993 | ||
2994 | ||
2995 | ||
2996 | typedef _G_fpos64_t fpos64_t; | |
2997 | # 138 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4 | |
2998 | # 1 "/usr/include/bits/stdio_lim.h" 1 3 4 | |
2999 | ||
3000 | ||
3001 | ||
3002 | ||
3003 | ||
3004 | ||
3005 | ||
3006 | # 1 "/usr/include/gentoo-multilib/amd64/bits/stdio_lim.h" 1 3 4 | |
3007 | # 9 "/usr/include/bits/stdio_lim.h" 2 3 4 | |
3008 | # 139 "/usr/include/gentoo-multilib/amd64/stdio.h" 2 3 4 | |
3009 | ||
3010 | ||
3011 | ||
3012 | extern struct _IO_FILE *stdin; | |
3013 | extern struct _IO_FILE *stdout; | |
3014 | extern struct _IO_FILE *stderr; | |
3015 | ||
3016 | ||
3017 | ||
3018 | ||
3019 | ||
3020 | ||
3021 | ||
3022 | extern int remove (__const char *__filename) throw (); | |
3023 | ||
3024 | extern int rename (__const char *__old, __const char *__new) throw (); | |
3025 | ||
3026 | ||
3027 | ||
3028 | ||
3029 | extern int renameat (int __oldfd, __const char *__old, int __newfd, | |
3030 | __const char *__new) throw (); | |
3031 | ||
3032 | ||
3033 | ||
3034 | # 172 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4 | |
3035 | extern FILE *tmpfile (void) __asm__ ("" "tmpfile64"); | |
3036 | ||
3037 | ||
3038 | ||
3039 | ||
3040 | ||
3041 | ||
3042 | extern FILE *tmpfile64 (void); | |
3043 | ||
3044 | ||
3045 | ||
3046 | extern char *tmpnam (char *__s) throw (); | |
3047 | ||
3048 | ||
3049 | ||
3050 | ||
3051 | ||
3052 | extern char *tmpnam_r (char *__s) throw (); | |
3053 | # 201 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4 | |
3054 | extern char *tempnam (__const char *__dir, __const char *__pfx) | |
3055 | throw () __attribute__ ((__malloc__)); | |
3056 | ||
3057 | ||
3058 | ||
3059 | ||
3060 | ||
3061 | ||
3062 | ||
3063 | ||
3064 | extern int fclose (FILE *__stream); | |
3065 | ||
3066 | ||
3067 | ||
3068 | ||
3069 | extern int fflush (FILE *__stream); | |
3070 | ||
3071 | # 226 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4 | |
3072 | extern int fflush_unlocked (FILE *__stream); | |
3073 | # 236 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4 | |
3074 | extern int fcloseall (void); | |
3075 | ||
3076 | ||
3077 | ||
3078 | ||
3079 | # 257 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4 | |
3080 | extern FILE *fopen (__const char *__restrict __filename, __const char *__restrict __modes) __asm__ ("" "fopen64"); | |
3081 | ||
3082 | extern FILE *freopen (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream) __asm__ ("" "freopen64"); | |
3083 | ||
3084 | ||
3085 | ||
3086 | ||
3087 | ||
3088 | ||
3089 | ||
3090 | ||
3091 | ||
3092 | extern FILE *fopen64 (__const char *__restrict __filename, | |
3093 | __const char *__restrict __modes); | |
3094 | extern FILE *freopen64 (__const char *__restrict __filename, | |
3095 | __const char *__restrict __modes, | |
3096 | FILE *__restrict __stream); | |
3097 | ||
3098 | ||
3099 | ||
3100 | ||
3101 | extern FILE *fdopen (int __fd, __const char *__modes) throw (); | |
3102 | ||
3103 | ||
3104 | ||
3105 | ||
3106 | ||
3107 | extern FILE *fopencookie (void *__restrict __magic_cookie, | |
3108 | __const char *__restrict __modes, | |
3109 | _IO_cookie_io_functions_t __io_funcs) throw (); | |
3110 | ||
3111 | ||
3112 | extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) throw (); | |
3113 | ||
3114 | ||
3115 | ||
3116 | ||
3117 | extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw (); | |
3118 | ||
3119 | ||
3120 | ||
3121 | ||
3122 | ||
3123 | ||
3124 | extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw (); | |
3125 | ||
3126 | ||
3127 | ||
3128 | extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, | |
3129 | int __modes, size_t __n) throw (); | |
3130 | ||
3131 | ||
3132 | ||
3133 | ||
3134 | ||
3135 | extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, | |
3136 | size_t __size) throw (); | |
3137 | ||
3138 | ||
3139 | extern void setlinebuf (FILE *__stream) throw (); | |
3140 | ||
3141 | ||
3142 | ||
3143 | ||
3144 | ||
3145 | ||
3146 | ||
3147 | ||
3148 | extern int fprintf (FILE *__restrict __stream, | |
3149 | __const char *__restrict __format, ...); | |
3150 | ||
3151 | ||
3152 | ||
3153 | ||
3154 | extern int printf (__const char *__restrict __format, ...); | |
3155 | ||
3156 | extern int sprintf (char *__restrict __s, | |
3157 | __const char *__restrict __format, ...) throw (); | |
3158 | ||
3159 | ||
3160 | ||
3161 | ||
3162 | ||
3163 | extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, | |
3164 | __gnuc_va_list __arg); | |
3165 | ||
3166 | ||
3167 | ||
3168 | ||
3169 | extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); | |
3170 | ||
3171 | extern int vsprintf (char *__restrict __s, __const char *__restrict __format, | |
3172 | __gnuc_va_list __arg) throw (); | |
3173 | ||
3174 | ||
3175 | ||
3176 | ||
3177 | ||
3178 | extern int snprintf (char *__restrict __s, size_t __maxlen, | |
3179 | __const char *__restrict __format, ...) | |
3180 | throw () __attribute__ ((__format__ (__printf__, 3, 4))); | |
3181 | ||
3182 | extern int vsnprintf (char *__restrict __s, size_t __maxlen, | |
3183 | __const char *__restrict __format, __gnuc_va_list __arg) | |
3184 | throw () __attribute__ ((__format__ (__printf__, 3, 0))); | |
3185 | ||
3186 | ||
3187 | ||
3188 | ||
3189 | ||
3190 | ||
3191 | extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, | |
3192 | __gnuc_va_list __arg) | |
3193 | throw () __attribute__ ((__format__ (__printf__, 2, 0))); | |
3194 | extern int __asprintf (char **__restrict __ptr, | |
3195 | __const char *__restrict __fmt, ...) | |
3196 | throw () __attribute__ ((__format__ (__printf__, 2, 3))); | |
3197 | extern int asprintf (char **__restrict __ptr, | |
3198 | __const char *__restrict __fmt, ...) | |
3199 | throw () __attribute__ ((__format__ (__printf__, 2, 3))); | |
3200 | ||
3201 | ||
3202 | ||
3203 | ||
3204 | ||
3205 | ||
3206 | ||
3207 | extern int vdprintf (int __fd, __const char *__restrict __fmt, | |
3208 | __gnuc_va_list __arg) | |
3209 | __attribute__ ((__format__ (__printf__, 2, 0))); | |
3210 | extern int dprintf (int __fd, __const char *__restrict __fmt, ...) | |
3211 | __attribute__ ((__format__ (__printf__, 2, 3))); | |
3212 | ||
3213 | ||
3214 | ||
3215 | ||
3216 | ||
3217 | ||
3218 | ||
3219 | ||
3220 | extern int fscanf (FILE *__restrict __stream, | |
3221 | __const char *__restrict __format, ...) ; | |
3222 | ||
3223 | ||
3224 | ||
3225 | ||
3226 | extern int scanf (__const char *__restrict __format, ...) ; | |
3227 | ||
3228 | extern int sscanf (__const char *__restrict __s, | |
3229 | __const char *__restrict __format, ...) throw (); | |
3230 | ||
3231 | ||
3232 | ||
3233 | ||
3234 | ||
3235 | ||
3236 | ||
3237 | ||
3238 | extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, | |
3239 | __gnuc_va_list __arg) | |
3240 | __attribute__ ((__format__ (__scanf__, 2, 0))) ; | |
3241 | ||
3242 | ||
3243 | ||
3244 | ||
3245 | ||
3246 | extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) | |
3247 | __attribute__ ((__format__ (__scanf__, 1, 0))) ; | |
3248 | ||
3249 | ||
3250 | extern int vsscanf (__const char *__restrict __s, | |
3251 | __const char *__restrict __format, __gnuc_va_list __arg) | |
3252 | throw () __attribute__ ((__format__ (__scanf__, 2, 0))); | |
3253 | ||
3254 | ||
3255 | ||
3256 | ||
3257 | ||
3258 | ||
3259 | ||
3260 | ||
3261 | ||
3262 | extern int fgetc (FILE *__stream); | |
3263 | extern int getc (FILE *__stream); | |
3264 | ||
3265 | ||
3266 | ||
3267 | ||
3268 | ||
3269 | extern int getchar (void); | |
3270 | ||
3271 | # 458 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4 | |
3272 | extern int getc_unlocked (FILE *__stream); | |
3273 | extern int getchar_unlocked (void); | |
3274 | # 469 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4 | |
3275 | extern int fgetc_unlocked (FILE *__stream); | |
3276 | ||
3277 | ||
3278 | ||
3279 | ||
3280 | ||
3281 | ||
3282 | ||
3283 | ||
3284 | ||
3285 | ||
3286 | ||
3287 | extern int fputc (int __c, FILE *__stream); | |
3288 | extern int putc (int __c, FILE *__stream); | |
3289 | ||
3290 | ||
3291 | ||
3292 | ||
3293 | ||
3294 | extern int putchar (int __c); | |
3295 | ||
3296 | # 502 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4 | |
3297 | extern int fputc_unlocked (int __c, FILE *__stream); | |
3298 | ||
3299 | ||
3300 | ||
3301 | ||
3302 | ||
3303 | ||
3304 | ||
3305 | extern int putc_unlocked (int __c, FILE *__stream); | |
3306 | extern int putchar_unlocked (int __c); | |
3307 | ||
3308 | ||
3309 | ||
3310 | ||
3311 | ||
3312 | ||
3313 | extern int getw (FILE *__stream); | |
3314 | ||
3315 | ||
3316 | extern int putw (int __w, FILE *__stream); | |
3317 | ||
3318 | ||
3319 | ||
3320 | ||
3321 | ||
3322 | ||
3323 | ||
3324 | ||
3325 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) | |
3326 | ; | |
3327 | ||
3328 | ||
3329 | ||
3330 | ||
3331 | ||
3332 | ||
3333 | extern char *gets (char *__s) ; | |
3334 | ||
3335 | # 548 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4 | |
3336 | extern char *fgets_unlocked (char *__restrict __s, int __n, | |
3337 | FILE *__restrict __stream) ; | |
3338 | # 564 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4 | |
3339 | extern __ssize_t __getdelim (char **__restrict __lineptr, | |
3340 | size_t *__restrict __n, int __delimiter, | |
3341 | FILE *__restrict __stream) ; | |
3342 | extern __ssize_t getdelim (char **__restrict __lineptr, | |
3343 | size_t *__restrict __n, int __delimiter, | |
3344 | FILE *__restrict __stream) ; | |
3345 | ||
3346 | ||
3347 | ||
3348 | ||
3349 | ||
3350 | ||
3351 | ||
3352 | extern __ssize_t getline (char **__restrict __lineptr, | |
3353 | size_t *__restrict __n, | |
3354 | FILE *__restrict __stream) ; | |
3355 | ||
3356 | ||
3357 | ||
3358 | ||
3359 | ||
3360 | ||
3361 | ||
3362 | ||
3363 | extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); | |
3364 | ||
3365 | ||
3366 | ||
3367 | ||
3368 | ||
3369 | extern int puts (__const char *__s); | |
3370 | ||
3371 | ||
3372 | ||
3373 | ||
3374 | ||
3375 | ||
3376 | extern int ungetc (int __c, FILE *__stream); | |
3377 | ||
3378 | ||
3379 | ||
3380 | ||
3381 | ||
3382 | ||
3383 | extern size_t fread (void *__restrict __ptr, size_t __size, | |
3384 | size_t __n, FILE *__restrict __stream) ; | |
3385 | ||
3386 | ||
3387 | ||
3388 | ||
3389 | extern size_t fwrite (__const void *__restrict __ptr, size_t __size, | |
3390 | size_t __n, FILE *__restrict __s) ; | |
3391 | ||
3392 | # 625 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4 | |
3393 | extern int fputs_unlocked (__const char *__restrict __s, | |
3394 | FILE *__restrict __stream); | |
3395 | # 636 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4 | |
3396 | extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, | |
3397 | size_t __n, FILE *__restrict __stream) ; | |
3398 | extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, | |
3399 | size_t __n, FILE *__restrict __stream) ; | |
3400 | ||
3401 | ||
3402 | ||
3403 | ||
3404 | ||
3405 | ||
3406 | ||
3407 | ||
3408 | extern int fseek (FILE *__stream, long int __off, int __whence); | |
3409 | ||
3410 | ||
3411 | ||
3412 | ||
3413 | extern long int ftell (FILE *__stream) ; | |
3414 | ||
3415 | ||
3416 | ||
3417 | ||
3418 | extern void rewind (FILE *__stream); | |
3419 | ||
3420 | # 680 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4 | |
3421 | extern int fseeko (FILE *__stream, __off64_t __off, int __whence) __asm__ ("" "fseeko64"); | |
3422 | ||
3423 | ||
3424 | extern __off64_t ftello (FILE *__stream) __asm__ ("" "ftello64"); | |
3425 | ||
3426 | ||
3427 | ||
3428 | ||
3429 | ||
3430 | ||
3431 | ||
3432 | ||
3433 | # 705 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4 | |
3434 | extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos) __asm__ ("" "fgetpos64"); | |
3435 | ||
3436 | extern int fsetpos (FILE *__stream, __const fpos_t *__pos) __asm__ ("" "fsetpos64"); | |
3437 | ||
3438 | ||
3439 | ||
3440 | ||
3441 | ||
3442 | ||
3443 | ||
3444 | ||
3445 | ||
3446 | extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); | |
3447 | extern __off64_t ftello64 (FILE *__stream) ; | |
3448 | extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); | |
3449 | extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); | |
3450 | ||
3451 | ||
3452 | ||
3453 | ||
3454 | extern void clearerr (FILE *__stream) throw (); | |
3455 | ||
3456 | extern int feof (FILE *__stream) throw () ; | |
3457 | ||
3458 | extern int ferror (FILE *__stream) throw () ; | |
3459 | ||
3460 | ||
3461 | ||
3462 | ||
3463 | extern void clearerr_unlocked (FILE *__stream) throw (); | |
3464 | extern int feof_unlocked (FILE *__stream) throw () ; | |
3465 | extern int ferror_unlocked (FILE *__stream) throw () ; | |
3466 | ||
3467 | ||
3468 | ||
3469 | ||
3470 | ||
3471 | ||
3472 | ||
3473 | ||
3474 | extern void perror (__const char *__s); | |
3475 | ||
3476 | ||
3477 | ||
3478 | ||
3479 | ||
3480 | ||
3481 | # 1 "/usr/include/bits/sys_errlist.h" 1 3 4 | |
3482 | ||
3483 | ||
3484 | ||
3485 | ||
3486 | ||
3487 | ||
3488 | ||
3489 | # 1 "/usr/include/gentoo-multilib/amd64/bits/sys_errlist.h" 1 3 4 | |
3490 | # 27 "/usr/include/gentoo-multilib/amd64/bits/sys_errlist.h" 3 4 | |
3491 | extern int sys_nerr; | |
3492 | extern __const char *__const sys_errlist[]; | |
3493 | ||
3494 | ||
3495 | extern int _sys_nerr; | |
3496 | extern __const char *__const _sys_errlist[]; | |
3497 | # 9 "/usr/include/bits/sys_errlist.h" 2 3 4 | |
3498 | # 753 "/usr/include/gentoo-multilib/amd64/stdio.h" 2 3 4 | |
3499 | ||
3500 | ||
3501 | ||
3502 | ||
3503 | extern int fileno (FILE *__stream) throw () ; | |
3504 | ||
3505 | ||
3506 | ||
3507 | ||
3508 | extern int fileno_unlocked (FILE *__stream) throw () ; | |
3509 | # 772 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4 | |
3510 | extern FILE *popen (__const char *__command, __const char *__modes) ; | |
3511 | ||
3512 | ||
3513 | ||
3514 | ||
3515 | ||
3516 | extern int pclose (FILE *__stream); | |
3517 | ||
3518 | ||
3519 | ||
3520 | ||
3521 | ||
3522 | extern char *ctermid (char *__s) throw (); | |
3523 | ||
3524 | ||
3525 | ||
3526 | ||
3527 | ||
3528 | extern char *cuserid (char *__s); | |
3529 | ||
3530 | ||
3531 | ||
3532 | ||
3533 | struct obstack; | |
3534 | ||
3535 | ||
3536 | extern int obstack_printf (struct obstack *__restrict __obstack, | |
3537 | __const char *__restrict __format, ...) | |
3538 | throw () __attribute__ ((__format__ (__printf__, 2, 3))); | |
3539 | extern int obstack_vprintf (struct obstack *__restrict __obstack, | |
3540 | __const char *__restrict __format, | |
3541 | __gnuc_va_list __args) | |
3542 | throw () __attribute__ ((__format__ (__printf__, 2, 0))); | |
3543 | ||
3544 | ||
3545 | ||
3546 | ||
3547 | ||
3548 | ||
3549 | ||
3550 | extern void flockfile (FILE *__stream) throw (); | |
3551 | ||
3552 | ||
3553 | ||
3554 | extern int ftrylockfile (FILE *__stream) throw () ; | |
3555 | ||
3556 | ||
3557 | extern void funlockfile (FILE *__stream) throw (); | |
3558 | # 833 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4 | |
3559 | # 1 "/usr/include/bits/stdio.h" 1 3 4 | |
3560 | ||
3561 | ||
3562 | ||
3563 | ||
3564 | ||
3565 | ||
3566 | ||
3567 | # 1 "/usr/include/gentoo-multilib/amd64/bits/stdio.h" 1 3 4 | |
3568 | # 33 "/usr/include/gentoo-multilib/amd64/bits/stdio.h" 3 4 | |
3569 | inline int | |
3570 | vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg) | |
3571 | { | |
3572 | return vfprintf (stdout, __fmt, __arg); | |
3573 | } | |
3574 | ||
3575 | ||
3576 | inline int | |
3577 | getchar (void) | |
3578 | { | |
3579 | return _IO_getc (stdin); | |
3580 | } | |
3581 | ||
3582 | ||
3583 | ||
3584 | ||
3585 | inline int | |
3586 | getc_unlocked (FILE *__fp) | |
3587 | { | |
3588 | return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); | |
3589 | } | |
3590 | ||
3591 | ||
3592 | inline int | |
3593 | getchar_unlocked (void) | |
3594 | { | |
3595 | return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); | |
3596 | } | |
3597 | ||
3598 | ||
3599 | ||
3600 | ||
3601 | inline int | |
3602 | putchar (int __c) | |
3603 | { | |
3604 | return _IO_putc (__c, stdout); | |
3605 | } | |
3606 | ||
3607 | ||
3608 | ||
3609 | ||
3610 | inline int | |
3611 | fputc_unlocked (int __c, FILE *__stream) | |
3612 | { | |
3613 | return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); | |
3614 | } | |
3615 | ||
3616 | ||
3617 | ||
3618 | ||
3619 | ||
3620 | inline int | |
3621 | putc_unlocked (int __c, FILE *__stream) | |
3622 | { | |
3623 | return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); | |
3624 | } | |
3625 | ||
3626 | ||
3627 | inline int | |
3628 | putchar_unlocked (int __c) | |
3629 | { | |
3630 | return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); | |
3631 | } | |
3632 | ||
3633 | ||
3634 | ||
3635 | ||
3636 | ||
3637 | inline __ssize_t | |
3638 | getline (char **__lineptr, size_t *__n, FILE *__stream) | |
3639 | { | |
3640 | return __getdelim (__lineptr, __n, '\n', __stream); | |
3641 | } | |
3642 | ||
3643 | ||
3644 | ||
3645 | ||
3646 | ||
3647 | inline int | |
3648 | feof_unlocked (FILE *__stream) throw () | |
3649 | { | |
3650 | return (((__stream)->_flags & 0x10) != 0); | |
3651 | } | |
3652 | ||
3653 | ||
3654 | inline int | |
3655 | ferror_unlocked (FILE *__stream) throw () | |
3656 | { | |
3657 | return (((__stream)->_flags & 0x20) != 0); | |
3658 | } | |
3659 | # 9 "/usr/include/bits/stdio.h" 2 3 4 | |
3660 | # 834 "/usr/include/gentoo-multilib/amd64/stdio.h" 2 3 4 | |
3661 | # 842 "/usr/include/gentoo-multilib/amd64/stdio.h" 3 4 | |
3662 | } | |
3663 | # 9 "/usr/include/stdio.h" 2 3 4 | |
3664 | # 41 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" 2 | |
3665 | ||
3666 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/limits.h" 1 3 4 | |
3667 | # 43 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" 2 | |
3668 | # 1 "/usr/include/stdlib.h" 1 3 4 | |
3669 | ||
3670 | ||
3671 | ||
3672 | ||
3673 | ||
3674 | ||
3675 | ||
3676 | # 1 "/usr/include/gentoo-multilib/amd64/stdlib.h" 1 3 4 | |
3677 | # 25 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4 | |
3678 | # 1 "/usr/include/features.h" 1 3 4 | |
3679 | # 26 "/usr/include/gentoo-multilib/amd64/stdlib.h" 2 3 4 | |
3680 | ||
3681 | ||
3682 | ||
3683 | ||
3684 | ||
3685 | ||
3686 | ||
3687 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 | |
3688 | # 34 "/usr/include/gentoo-multilib/amd64/stdlib.h" 2 3 4 | |
3689 | ||
3690 | extern "C" { | |
3691 | ||
3692 | ||
3693 | ||
3694 | ||
3695 | ||
3696 | ||
3697 | # 1 "/usr/include/bits/waitflags.h" 1 3 4 | |
3698 | ||
3699 | ||
3700 | ||
3701 | ||
3702 | ||
3703 | ||
3704 | ||
3705 | # 1 "/usr/include/gentoo-multilib/amd64/bits/waitflags.h" 1 3 4 | |
3706 | # 9 "/usr/include/bits/waitflags.h" 2 3 4 | |
3707 | # 43 "/usr/include/gentoo-multilib/amd64/stdlib.h" 2 3 4 | |
3708 | # 1 "/usr/include/bits/waitstatus.h" 1 3 4 | |
3709 | ||
3710 | ||
3711 | ||
3712 | ||
3713 | ||
3714 | ||
3715 | ||
3716 | # 1 "/usr/include/gentoo-multilib/amd64/bits/waitstatus.h" 1 3 4 | |
3717 | # 65 "/usr/include/gentoo-multilib/amd64/bits/waitstatus.h" 3 4 | |
3718 | # 1 "/usr/include/endian.h" 1 3 4 | |
3719 | # 66 "/usr/include/gentoo-multilib/amd64/bits/waitstatus.h" 2 3 4 | |
3720 | ||
3721 | union wait | |
3722 | { | |
3723 | int w_status; | |
3724 | struct | |
3725 | { | |
3726 | ||
3727 | unsigned int __w_termsig:7; | |
3728 | unsigned int __w_coredump:1; | |
3729 | unsigned int __w_retcode:8; | |
3730 | unsigned int:16; | |
3731 | ||
3732 | ||
3733 | ||
3734 | ||
3735 | ||
3736 | ||
3737 | ||
3738 | } __wait_terminated; | |
3739 | struct | |
3740 | { | |
3741 | ||
3742 | unsigned int __w_stopval:8; | |
3743 | unsigned int __w_stopsig:8; | |
3744 | unsigned int:16; | |
3745 | ||
3746 | ||
3747 | ||
3748 | ||
3749 | ||
3750 | ||
3751 | } __wait_stopped; | |
3752 | }; | |
3753 | # 9 "/usr/include/bits/waitstatus.h" 2 3 4 | |
3754 | # 44 "/usr/include/gentoo-multilib/amd64/stdlib.h" 2 3 4 | |
3755 | # 96 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4 | |
3756 | ||
3757 | ||
3758 | typedef struct | |
3759 | { | |
3760 | int quot; | |
3761 | int rem; | |
3762 | } div_t; | |
3763 | ||
3764 | ||
3765 | ||
3766 | typedef struct | |
3767 | { | |
3768 | long int quot; | |
3769 | long int rem; | |
3770 | } ldiv_t; | |
3771 | ||
3772 | ||
3773 | ||
3774 | ||
3775 | ||
3776 | ||
3777 | ||
3778 | __extension__ typedef struct | |
3779 | { | |
3780 | long long int quot; | |
3781 | long long int rem; | |
3782 | } lldiv_t; | |
3783 | ||
3784 | ||
3785 | # 140 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4 | |
3786 | extern size_t __ctype_get_mb_cur_max (void) throw () ; | |
3787 | ||
3788 | ||
3789 | ||
3790 | ||
3791 | extern double atof (__const char *__nptr) | |
3792 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; | |
3793 | ||
3794 | extern int atoi (__const char *__nptr) | |
3795 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; | |
3796 | ||
3797 | extern long int atol (__const char *__nptr) | |
3798 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; | |
3799 | ||
3800 | ||
3801 | ||
3802 | ||
3803 | ||
3804 | __extension__ extern long long int atoll (__const char *__nptr) | |
3805 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; | |
3806 | ||
3807 | ||
3808 | ||
3809 | ||
3810 | ||
3811 | extern double strtod (__const char *__restrict __nptr, | |
3812 | char **__restrict __endptr) | |
3813 | throw () __attribute__ ((__nonnull__ (1))) ; | |
3814 | ||
3815 | ||
3816 | ||
3817 | ||
3818 | ||
3819 | extern float strtof (__const char *__restrict __nptr, | |
3820 | char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) ; | |
3821 | ||
3822 | extern long double strtold (__const char *__restrict __nptr, | |
3823 | char **__restrict __endptr) | |
3824 | throw () __attribute__ ((__nonnull__ (1))) ; | |
3825 | ||
3826 | ||
3827 | ||
3828 | ||
3829 | ||
3830 | extern long int strtol (__const char *__restrict __nptr, | |
3831 | char **__restrict __endptr, int __base) | |
3832 | throw () __attribute__ ((__nonnull__ (1))) ; | |
3833 | ||
3834 | extern unsigned long int strtoul (__const char *__restrict __nptr, | |
3835 | char **__restrict __endptr, int __base) | |
3836 | throw () __attribute__ ((__nonnull__ (1))) ; | |
3837 | ||
3838 | ||
3839 | ||
3840 | ||
3841 | __extension__ | |
3842 | extern long long int strtoq (__const char *__restrict __nptr, | |
3843 | char **__restrict __endptr, int __base) | |
3844 | throw () __attribute__ ((__nonnull__ (1))) ; | |
3845 | ||
3846 | __extension__ | |
3847 | extern unsigned long long int strtouq (__const char *__restrict __nptr, | |
3848 | char **__restrict __endptr, int __base) | |
3849 | throw () __attribute__ ((__nonnull__ (1))) ; | |
3850 | ||
3851 | ||
3852 | ||
3853 | ||
3854 | ||
3855 | __extension__ | |
3856 | extern long long int strtoll (__const char *__restrict __nptr, | |
3857 | char **__restrict __endptr, int __base) | |
3858 | throw () __attribute__ ((__nonnull__ (1))) ; | |
3859 | ||
3860 | __extension__ | |
3861 | extern unsigned long long int strtoull (__const char *__restrict __nptr, | |
3862 | char **__restrict __endptr, int __base) | |
3863 | throw () __attribute__ ((__nonnull__ (1))) ; | |
3864 | ||
3865 | # 236 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4 | |
3866 | # 1 "/usr/include/xlocale.h" 1 3 4 | |
3867 | # 237 "/usr/include/gentoo-multilib/amd64/stdlib.h" 2 3 4 | |
3868 | ||
3869 | ||
3870 | ||
3871 | extern long int strtol_l (__const char *__restrict __nptr, | |
3872 | char **__restrict __endptr, int __base, | |
3873 | __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ; | |
3874 | ||
3875 | extern unsigned long int strtoul_l (__const char *__restrict __nptr, | |
3876 | char **__restrict __endptr, | |
3877 | int __base, __locale_t __loc) | |
3878 | throw () __attribute__ ((__nonnull__ (1, 4))) ; | |
3879 | ||
3880 | __extension__ | |
3881 | extern long long int strtoll_l (__const char *__restrict __nptr, | |
3882 | char **__restrict __endptr, int __base, | |
3883 | __locale_t __loc) | |
3884 | throw () __attribute__ ((__nonnull__ (1, 4))) ; | |
3885 | ||
3886 | __extension__ | |
3887 | extern unsigned long long int strtoull_l (__const char *__restrict __nptr, | |
3888 | char **__restrict __endptr, | |
3889 | int __base, __locale_t __loc) | |
3890 | throw () __attribute__ ((__nonnull__ (1, 4))) ; | |
3891 | ||
3892 | extern double strtod_l (__const char *__restrict __nptr, | |
3893 | char **__restrict __endptr, __locale_t __loc) | |
3894 | throw () __attribute__ ((__nonnull__ (1, 3))) ; | |
3895 | ||
3896 | extern float strtof_l (__const char *__restrict __nptr, | |
3897 | char **__restrict __endptr, __locale_t __loc) | |
3898 | throw () __attribute__ ((__nonnull__ (1, 3))) ; | |
3899 | ||
3900 | extern long double strtold_l (__const char *__restrict __nptr, | |
3901 | char **__restrict __endptr, | |
3902 | __locale_t __loc) | |
3903 | throw () __attribute__ ((__nonnull__ (1, 3))) ; | |
3904 | ||
3905 | ||
3906 | ||
3907 | ||
3908 | ||
3909 | ||
3910 | extern double __strtod_internal (__const char *__restrict __nptr, | |
3911 | char **__restrict __endptr, int __group) | |
3912 | throw () __attribute__ ((__nonnull__ (1))) ; | |
3913 | extern float __strtof_internal (__const char *__restrict __nptr, | |
3914 | char **__restrict __endptr, int __group) | |
3915 | throw () __attribute__ ((__nonnull__ (1))) ; | |
3916 | extern long double __strtold_internal (__const char *__restrict __nptr, | |
3917 | char **__restrict __endptr, | |
3918 | int __group) | |
3919 | throw () __attribute__ ((__nonnull__ (1))) ; | |
3920 | ||
3921 | extern long int __strtol_internal (__const char *__restrict __nptr, | |
3922 | char **__restrict __endptr, | |
3923 | int __base, int __group) | |
3924 | throw () __attribute__ ((__nonnull__ (1))) ; | |
3925 | ||
3926 | ||
3927 | ||
3928 | extern unsigned long int __strtoul_internal (__const char *__restrict __nptr, | |
3929 | char **__restrict __endptr, | |
3930 | int __base, int __group) | |
3931 | throw () __attribute__ ((__nonnull__ (1))) ; | |
3932 | ||
3933 | ||
3934 | ||
3935 | ||
3936 | __extension__ | |
3937 | extern long long int __strtoll_internal (__const char *__restrict __nptr, | |
3938 | char **__restrict __endptr, | |
3939 | int __base, int __group) | |
3940 | throw () __attribute__ ((__nonnull__ (1))) ; | |
3941 | ||
3942 | ||
3943 | ||
3944 | __extension__ | |
3945 | extern unsigned long long int __strtoull_internal (__const char * | |
3946 | __restrict __nptr, | |
3947 | char **__restrict __endptr, | |
3948 | int __base, int __group) | |
3949 | throw () __attribute__ ((__nonnull__ (1))) ; | |
3950 | ||
3951 | ||
3952 | ||
3953 | ||
3954 | ||
3955 | ||
3956 | ||
3957 | ||
3958 | extern __inline double | |
3959 | strtod (__const char *__restrict __nptr, char **__restrict __endptr) throw () | |
3960 | { | |
3961 | return __strtod_internal (__nptr, __endptr, 0); | |
3962 | } | |
3963 | extern __inline long int | |
3964 | strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () | |
3965 | ||
3966 | { | |
3967 | return __strtol_internal (__nptr, __endptr, __base, 0); | |
3968 | } | |
3969 | extern __inline unsigned long int | |
3970 | strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () | |
3971 | ||
3972 | { | |
3973 | return __strtoul_internal (__nptr, __endptr, __base, 0); | |
3974 | } | |
3975 | ||
3976 | ||
3977 | ||
3978 | ||
3979 | extern __inline float | |
3980 | strtof (__const char *__restrict __nptr, char **__restrict __endptr) throw () | |
3981 | { | |
3982 | return __strtof_internal (__nptr, __endptr, 0); | |
3983 | } | |
3984 | ||
3985 | extern __inline long double | |
3986 | strtold (__const char *__restrict __nptr, char **__restrict __endptr) throw () | |
3987 | { | |
3988 | return __strtold_internal (__nptr, __endptr, 0); | |
3989 | } | |
3990 | ||
3991 | ||
3992 | ||
3993 | ||
3994 | ||
3995 | __extension__ extern __inline long long int | |
3996 | strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () | |
3997 | ||
3998 | { | |
3999 | return __strtoll_internal (__nptr, __endptr, __base, 0); | |
4000 | } | |
4001 | __extension__ extern __inline unsigned long long int | |
4002 | strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () | |
4003 | ||
4004 | { | |
4005 | return __strtoull_internal (__nptr, __endptr, __base, 0); | |
4006 | } | |
4007 | ||
4008 | ||
4009 | ||
4010 | ||
4011 | __extension__ extern __inline long long int | |
4012 | strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () | |
4013 | ||
4014 | { | |
4015 | return __strtoll_internal (__nptr, __endptr, __base, 0); | |
4016 | } | |
4017 | __extension__ extern __inline unsigned long long int | |
4018 | strtoull (__const char * __restrict __nptr, char **__restrict __endptr, int __base) throw () | |
4019 | ||
4020 | { | |
4021 | return __strtoull_internal (__nptr, __endptr, __base, 0); | |
4022 | } | |
4023 | ||
4024 | ||
4025 | ||
4026 | ||
4027 | extern __inline double | |
4028 | atof (__const char *__nptr) throw () | |
4029 | { | |
4030 | return strtod (__nptr, (char **) __null); | |
4031 | } | |
4032 | extern __inline int | |
4033 | atoi (__const char *__nptr) throw () | |
4034 | { | |
4035 | return (int) strtol (__nptr, (char **) __null, 10); | |
4036 | } | |
4037 | extern __inline long int | |
4038 | atol (__const char *__nptr) throw () | |
4039 | { | |
4040 | return strtol (__nptr, (char **) __null, 10); | |
4041 | } | |
4042 | ||
4043 | ||
4044 | ||
4045 | ||
4046 | __extension__ extern __inline long long int | |
4047 | atoll (__const char *__nptr) throw () | |
4048 | { | |
4049 | return strtoll (__nptr, (char **) __null, 10); | |
4050 | } | |
4051 | ||
4052 | # 429 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4 | |
4053 | extern char *l64a (long int __n) throw () ; | |
4054 | ||
4055 | ||
4056 | extern long int a64l (__const char *__s) | |
4057 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; | |
4058 | ||
4059 | ||
4060 | ||
4061 | ||
4062 | # 1 "/usr/include/sys/types.h" 1 3 4 | |
4063 | ||
4064 | ||
4065 | ||
4066 | ||
4067 | ||
4068 | ||
4069 | ||
4070 | # 1 "/usr/include/gentoo-multilib/amd64/sys/types.h" 1 3 4 | |
4071 | # 27 "/usr/include/gentoo-multilib/amd64/sys/types.h" 3 4 | |
4072 | # 1 "/usr/include/features.h" 1 3 4 | |
4073 | # 28 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4 | |
4074 | ||
4075 | extern "C" { | |
4076 | ||
4077 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
4078 | # 32 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4 | |
4079 | ||
4080 | ||
4081 | ||
4082 | typedef __u_char u_char; | |
4083 | typedef __u_short u_short; | |
4084 | typedef __u_int u_int; | |
4085 | typedef __u_long u_long; | |
4086 | typedef __quad_t quad_t; | |
4087 | typedef __u_quad_t u_quad_t; | |
4088 | typedef __fsid_t fsid_t; | |
4089 | ||
4090 | ||
4091 | ||
4092 | ||
4093 | typedef __loff_t loff_t; | |
4094 | ||
4095 | ||
4096 | ||
4097 | ||
4098 | ||
4099 | typedef __ino64_t ino_t; | |
4100 | ||
4101 | ||
4102 | ||
4103 | ||
4104 | typedef __ino64_t ino64_t; | |
4105 | ||
4106 | ||
4107 | ||
4108 | ||
4109 | typedef __dev_t dev_t; | |
4110 | ||
4111 | ||
4112 | ||
4113 | ||
4114 | typedef __gid_t gid_t; | |
4115 | ||
4116 | ||
4117 | ||
4118 | ||
4119 | typedef __mode_t mode_t; | |
4120 | ||
4121 | ||
4122 | ||
4123 | ||
4124 | typedef __nlink_t nlink_t; | |
4125 | ||
4126 | ||
4127 | ||
4128 | ||
4129 | typedef __uid_t uid_t; | |
4130 | ||
4131 | ||
4132 | ||
4133 | ||
4134 | ||
4135 | ||
4136 | ||
4137 | typedef __off64_t off_t; | |
4138 | ||
4139 | ||
4140 | ||
4141 | ||
4142 | typedef __off64_t off64_t; | |
4143 | ||
4144 | ||
4145 | ||
4146 | ||
4147 | typedef __pid_t pid_t; | |
4148 | ||
4149 | ||
4150 | ||
4151 | ||
4152 | typedef __id_t id_t; | |
4153 | ||
4154 | ||
4155 | ||
4156 | ||
4157 | typedef __ssize_t ssize_t; | |
4158 | ||
4159 | ||
4160 | ||
4161 | ||
4162 | ||
4163 | typedef __daddr_t daddr_t; | |
4164 | typedef __caddr_t caddr_t; | |
4165 | ||
4166 | ||
4167 | ||
4168 | ||
4169 | ||
4170 | typedef __key_t key_t; | |
4171 | # 133 "/usr/include/gentoo-multilib/amd64/sys/types.h" 3 4 | |
4172 | # 1 "/usr/include/time.h" 1 3 4 | |
4173 | ||
4174 | ||
4175 | ||
4176 | ||
4177 | ||
4178 | ||
4179 | ||
4180 | # 1 "/usr/include/gentoo-multilib/amd64/time.h" 1 3 4 | |
4181 | # 57 "/usr/include/gentoo-multilib/amd64/time.h" 3 4 | |
4182 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
4183 | # 58 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4 | |
4184 | ||
4185 | ||
4186 | ||
4187 | typedef __clock_t clock_t; | |
4188 | ||
4189 | ||
4190 | ||
4191 | # 73 "/usr/include/gentoo-multilib/amd64/time.h" 3 4 | |
4192 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
4193 | # 74 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4 | |
4194 | ||
4195 | ||
4196 | ||
4197 | typedef __time_t time_t; | |
4198 | ||
4199 | ||
4200 | ||
4201 | # 90 "/usr/include/gentoo-multilib/amd64/time.h" 3 4 | |
4202 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
4203 | # 91 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4 | |
4204 | ||
4205 | ||
4206 | typedef __clockid_t clockid_t; | |
4207 | # 102 "/usr/include/gentoo-multilib/amd64/time.h" 3 4 | |
4208 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
4209 | # 103 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4 | |
4210 | ||
4211 | ||
4212 | typedef __timer_t timer_t; | |
4213 | # 9 "/usr/include/time.h" 2 3 4 | |
4214 | # 134 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4 | |
4215 | ||
4216 | ||
4217 | ||
4218 | typedef __useconds_t useconds_t; | |
4219 | ||
4220 | ||
4221 | ||
4222 | typedef __suseconds_t suseconds_t; | |
4223 | ||
4224 | ||
4225 | ||
4226 | ||
4227 | ||
4228 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 | |
4229 | # 148 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4 | |
4230 | ||
4231 | ||
4232 | ||
4233 | typedef unsigned long int ulong; | |
4234 | typedef unsigned short int ushort; | |
4235 | typedef unsigned int uint; | |
4236 | # 195 "/usr/include/gentoo-multilib/amd64/sys/types.h" 3 4 | |
4237 | typedef int int8_t __attribute__ ((__mode__ (__QI__))); | |
4238 | typedef int int16_t __attribute__ ((__mode__ (__HI__))); | |
4239 | typedef int int32_t __attribute__ ((__mode__ (__SI__))); | |
4240 | typedef int int64_t __attribute__ ((__mode__ (__DI__))); | |
4241 | ||
4242 | ||
4243 | typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); | |
4244 | typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); | |
4245 | typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); | |
4246 | typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); | |
4247 | ||
4248 | typedef int register_t __attribute__ ((__mode__ (__word__))); | |
4249 | # 217 "/usr/include/gentoo-multilib/amd64/sys/types.h" 3 4 | |
4250 | # 1 "/usr/include/endian.h" 1 3 4 | |
4251 | # 218 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4 | |
4252 | ||
4253 | ||
4254 | # 1 "/usr/include/sys/select.h" 1 3 4 | |
4255 | ||
4256 | ||
4257 | ||
4258 | ||
4259 | ||
4260 | ||
4261 | ||
4262 | # 1 "/usr/include/gentoo-multilib/amd64/sys/select.h" 1 3 4 | |
4263 | # 25 "/usr/include/gentoo-multilib/amd64/sys/select.h" 3 4 | |
4264 | # 1 "/usr/include/features.h" 1 3 4 | |
4265 | # 26 "/usr/include/gentoo-multilib/amd64/sys/select.h" 2 3 4 | |
4266 | ||
4267 | ||
4268 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
4269 | # 29 "/usr/include/gentoo-multilib/amd64/sys/select.h" 2 3 4 | |
4270 | ||
4271 | ||
4272 | # 1 "/usr/include/bits/select.h" 1 3 4 | |
4273 | ||
4274 | ||
4275 | ||
4276 | ||
4277 | ||
4278 | ||
4279 | ||
4280 | # 1 "/usr/include/gentoo-multilib/amd64/bits/select.h" 1 3 4 | |
4281 | # 9 "/usr/include/bits/select.h" 2 3 4 | |
4282 | # 32 "/usr/include/gentoo-multilib/amd64/sys/select.h" 2 3 4 | |
4283 | ||
4284 | ||
4285 | # 1 "/usr/include/bits/sigset.h" 1 3 4 | |
4286 | ||
4287 | ||
4288 | ||
4289 | ||
4290 | ||
4291 | ||
4292 | ||
4293 | # 1 "/usr/include/gentoo-multilib/amd64/bits/sigset.h" 1 3 4 | |
4294 | # 23 "/usr/include/gentoo-multilib/amd64/bits/sigset.h" 3 4 | |
4295 | typedef int __sig_atomic_t; | |
4296 | ||
4297 | ||
4298 | ||
4299 | ||
4300 | typedef struct | |
4301 | { | |
4302 | unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; | |
4303 | } __sigset_t; | |
4304 | # 9 "/usr/include/bits/sigset.h" 2 3 4 | |
4305 | # 35 "/usr/include/gentoo-multilib/amd64/sys/select.h" 2 3 4 | |
4306 | ||
4307 | ||
4308 | ||
4309 | typedef __sigset_t sigset_t; | |
4310 | ||
4311 | ||
4312 | ||
4313 | ||
4314 | ||
4315 | # 1 "/usr/include/time.h" 1 3 4 | |
4316 | ||
4317 | ||
4318 | ||
4319 | ||
4320 | ||
4321 | ||
4322 | ||
4323 | # 1 "/usr/include/gentoo-multilib/amd64/time.h" 1 3 4 | |
4324 | # 117 "/usr/include/gentoo-multilib/amd64/time.h" 3 4 | |
4325 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
4326 | # 118 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4 | |
4327 | ||
4328 | ||
4329 | ||
4330 | struct timespec | |
4331 | { | |
4332 | __time_t tv_sec; | |
4333 | long int tv_nsec; | |
4334 | }; | |
4335 | # 9 "/usr/include/time.h" 2 3 4 | |
4336 | # 45 "/usr/include/gentoo-multilib/amd64/sys/select.h" 2 3 4 | |
4337 | ||
4338 | # 1 "/usr/include/bits/time.h" 1 3 4 | |
4339 | ||
4340 | ||
4341 | ||
4342 | ||
4343 | ||
4344 | ||
4345 | ||
4346 | # 1 "/usr/include/gentoo-multilib/amd64/bits/time.h" 1 3 4 | |
4347 | # 65 "/usr/include/gentoo-multilib/amd64/bits/time.h" 3 4 | |
4348 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
4349 | # 66 "/usr/include/gentoo-multilib/amd64/bits/time.h" 2 3 4 | |
4350 | ||
4351 | ||
4352 | ||
4353 | struct timeval | |
4354 | { | |
4355 | __time_t tv_sec; | |
4356 | __suseconds_t tv_usec; | |
4357 | }; | |
4358 | # 9 "/usr/include/bits/time.h" 2 3 4 | |
4359 | # 47 "/usr/include/gentoo-multilib/amd64/sys/select.h" 2 3 4 | |
4360 | # 55 "/usr/include/gentoo-multilib/amd64/sys/select.h" 3 4 | |
4361 | typedef long int __fd_mask; | |
4362 | # 67 "/usr/include/gentoo-multilib/amd64/sys/select.h" 3 4 | |
4363 | typedef struct | |
4364 | { | |
4365 | ||
4366 | ||
4367 | ||
4368 | __fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))]; | |
4369 | ||
4370 | ||
4371 | ||
4372 | ||
4373 | ||
4374 | } fd_set; | |
4375 | ||
4376 | ||
4377 | ||
4378 | ||
4379 | ||
4380 | ||
4381 | typedef __fd_mask fd_mask; | |
4382 | # 99 "/usr/include/gentoo-multilib/amd64/sys/select.h" 3 4 | |
4383 | extern "C" { | |
4384 | # 109 "/usr/include/gentoo-multilib/amd64/sys/select.h" 3 4 | |
4385 | extern int select (int __nfds, fd_set *__restrict __readfds, | |
4386 | fd_set *__restrict __writefds, | |
4387 | fd_set *__restrict __exceptfds, | |
4388 | struct timeval *__restrict __timeout); | |
4389 | # 121 "/usr/include/gentoo-multilib/amd64/sys/select.h" 3 4 | |
4390 | extern int pselect (int __nfds, fd_set *__restrict __readfds, | |
4391 | fd_set *__restrict __writefds, | |
4392 | fd_set *__restrict __exceptfds, | |
4393 | const struct timespec *__restrict __timeout, | |
4394 | const __sigset_t *__restrict __sigmask); | |
4395 | ||
4396 | ||
4397 | } | |
4398 | # 9 "/usr/include/sys/select.h" 2 3 4 | |
4399 | # 221 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4 | |
4400 | ||
4401 | ||
4402 | # 1 "/usr/include/sys/sysmacros.h" 1 3 4 | |
4403 | ||
4404 | ||
4405 | ||
4406 | ||
4407 | ||
4408 | ||
4409 | ||
4410 | # 1 "/usr/include/gentoo-multilib/amd64/sys/sysmacros.h" 1 3 4 | |
4411 | # 23 "/usr/include/gentoo-multilib/amd64/sys/sysmacros.h" 3 4 | |
4412 | # 1 "/usr/include/features.h" 1 3 4 | |
4413 | # 24 "/usr/include/gentoo-multilib/amd64/sys/sysmacros.h" 2 3 4 | |
4414 | ||
4415 | ||
4416 | ||
4417 | ||
4418 | ||
4419 | __extension__ | |
4420 | extern __inline unsigned int gnu_dev_major (unsigned long long int __dev) | |
4421 | throw (); | |
4422 | __extension__ | |
4423 | extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev) | |
4424 | throw (); | |
4425 | __extension__ | |
4426 | extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major, | |
4427 | unsigned int __minor) | |
4428 | throw (); | |
4429 | ||
4430 | ||
4431 | __extension__ extern __inline unsigned int | |
4432 | gnu_dev_major (unsigned long long int __dev) throw () | |
4433 | { | |
4434 | return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); | |
4435 | } | |
4436 | ||
4437 | __extension__ extern __inline unsigned int | |
4438 | gnu_dev_minor (unsigned long long int __dev) throw () | |
4439 | { | |
4440 | return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); | |
4441 | } | |
4442 | ||
4443 | __extension__ extern __inline unsigned long long int | |
4444 | gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw () | |
4445 | { | |
4446 | return ((__minor & 0xff) | ((__major & 0xfff) << 8) | |
4447 | | (((unsigned long long int) (__minor & ~0xff)) << 12) | |
4448 | | (((unsigned long long int) (__major & ~0xfff)) << 32)); | |
4449 | } | |
4450 | # 9 "/usr/include/sys/sysmacros.h" 2 3 4 | |
4451 | # 224 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4 | |
4452 | ||
4453 | ||
4454 | ||
4455 | ||
4456 | typedef __blksize_t blksize_t; | |
4457 | # 248 "/usr/include/gentoo-multilib/amd64/sys/types.h" 3 4 | |
4458 | typedef __blkcnt64_t blkcnt_t; | |
4459 | ||
4460 | ||
4461 | ||
4462 | typedef __fsblkcnt64_t fsblkcnt_t; | |
4463 | ||
4464 | ||
4465 | ||
4466 | typedef __fsfilcnt64_t fsfilcnt_t; | |
4467 | ||
4468 | ||
4469 | ||
4470 | ||
4471 | ||
4472 | typedef __blkcnt64_t blkcnt64_t; | |
4473 | typedef __fsblkcnt64_t fsblkcnt64_t; | |
4474 | typedef __fsfilcnt64_t fsfilcnt64_t; | |
4475 | ||
4476 | ||
4477 | ||
4478 | ||
4479 | ||
4480 | # 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 | |
4481 | ||
4482 | ||
4483 | ||
4484 | ||
4485 | ||
4486 | ||
4487 | ||
4488 | # 1 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 1 3 4 | |
4489 | # 23 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 3 4 | |
4490 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
4491 | ||
4492 | ||
4493 | ||
4494 | ||
4495 | ||
4496 | ||
4497 | ||
4498 | # 1 "/usr/include/gentoo-multilib/amd64/bits/wordsize.h" 1 3 4 | |
4499 | # 9 "/usr/include/bits/wordsize.h" 2 3 4 | |
4500 | # 24 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 2 3 4 | |
4501 | # 50 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 3 4 | |
4502 | typedef unsigned long int pthread_t; | |
4503 | ||
4504 | ||
4505 | typedef union | |
4506 | { | |
4507 | char __size[56]; | |
4508 | long int __align; | |
4509 | } pthread_attr_t; | |
4510 | ||
4511 | ||
4512 | ||
4513 | typedef struct __pthread_internal_list | |
4514 | { | |
4515 | struct __pthread_internal_list *__prev; | |
4516 | struct __pthread_internal_list *__next; | |
4517 | } __pthread_list_t; | |
4518 | # 76 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 3 4 | |
4519 | typedef union | |
4520 | { | |
4521 | struct __pthread_mutex_s | |
4522 | { | |
4523 | int __lock; | |
4524 | unsigned int __count; | |
4525 | int __owner; | |
4526 | ||
4527 | unsigned int __nusers; | |
4528 | ||
4529 | ||
4530 | ||
4531 | int __kind; | |
4532 | ||
4533 | int __spins; | |
4534 | __pthread_list_t __list; | |
4535 | # 101 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 3 4 | |
4536 | } __data; | |
4537 | char __size[40]; | |
4538 | long int __align; | |
4539 | } pthread_mutex_t; | |
4540 | ||
4541 | typedef union | |
4542 | { | |
4543 | char __size[4]; | |
4544 | int __align; | |
4545 | } pthread_mutexattr_t; | |
4546 | ||
4547 | ||
4548 | ||
4549 | ||
4550 | typedef union | |
4551 | { | |
4552 | struct | |
4553 | { | |
4554 | int __lock; | |
4555 | unsigned int __futex; | |
4556 | __extension__ unsigned long long int __total_seq; | |
4557 | __extension__ unsigned long long int __wakeup_seq; | |
4558 | __extension__ unsigned long long int __woken_seq; | |
4559 | void *__mutex; | |
4560 | unsigned int __nwaiters; | |
4561 | unsigned int __broadcast_seq; | |
4562 | } __data; | |
4563 | char __size[48]; | |
4564 | __extension__ long long int __align; | |
4565 | } pthread_cond_t; | |
4566 | ||
4567 | typedef union | |
4568 | { | |
4569 | char __size[4]; | |
4570 | int __align; | |
4571 | } pthread_condattr_t; | |
4572 | ||
4573 | ||
4574 | ||
4575 | typedef unsigned int pthread_key_t; | |
4576 | ||
4577 | ||
4578 | ||
4579 | typedef int pthread_once_t; | |
4580 | ||
4581 | ||
4582 | ||
4583 | ||
4584 | ||
4585 | typedef union | |
4586 | { | |
4587 | ||
4588 | struct | |
4589 | { | |
4590 | int __lock; | |
4591 | unsigned int __nr_readers; | |
4592 | unsigned int __readers_wakeup; | |
4593 | unsigned int __writer_wakeup; | |
4594 | unsigned int __nr_readers_queued; | |
4595 | unsigned int __nr_writers_queued; | |
4596 | int __writer; | |
4597 | int __pad1; | |
4598 | unsigned long int __pad2; | |
4599 | unsigned long int __pad3; | |
4600 | ||
4601 | ||
4602 | unsigned int __flags; | |
4603 | } __data; | |
4604 | # 184 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 3 4 | |
4605 | char __size[56]; | |
4606 | long int __align; | |
4607 | } pthread_rwlock_t; | |
4608 | ||
4609 | typedef union | |
4610 | { | |
4611 | char __size[8]; | |
4612 | long int __align; | |
4613 | } pthread_rwlockattr_t; | |
4614 | ||
4615 | ||
4616 | ||
4617 | ||
4618 | ||
4619 | typedef volatile int pthread_spinlock_t; | |
4620 | ||
4621 | ||
4622 | ||
4623 | ||
4624 | typedef union | |
4625 | { | |
4626 | char __size[32]; | |
4627 | long int __align; | |
4628 | } pthread_barrier_t; | |
4629 | ||
4630 | typedef union | |
4631 | { | |
4632 | char __size[4]; | |
4633 | int __align; | |
4634 | } pthread_barrierattr_t; | |
4635 | # 9 "/usr/include/bits/pthreadtypes.h" 2 3 4 | |
4636 | # 271 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4 | |
4637 | ||
4638 | ||
4639 | } | |
4640 | # 9 "/usr/include/sys/types.h" 2 3 4 | |
4641 | # 439 "/usr/include/gentoo-multilib/amd64/stdlib.h" 2 3 4 | |
4642 | ||
4643 | ||
4644 | ||
4645 | ||
4646 | ||
4647 | ||
4648 | extern long int random (void) throw (); | |
4649 | ||
4650 | ||
4651 | extern void srandom (unsigned int __seed) throw (); | |
4652 | ||
4653 | ||
4654 | ||
4655 | ||
4656 | ||
4657 | extern char *initstate (unsigned int __seed, char *__statebuf, | |
4658 | size_t __statelen) throw () __attribute__ ((__nonnull__ (2))); | |
4659 | ||
4660 | ||
4661 | ||
4662 | extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1))); | |
4663 | ||
4664 | ||
4665 | ||
4666 | ||
4667 | ||
4668 | ||
4669 | ||
4670 | struct random_data | |
4671 | { | |
4672 | int32_t *fptr; | |
4673 | int32_t *rptr; | |
4674 | int32_t *state; | |
4675 | int rand_type; | |
4676 | int rand_deg; | |
4677 | int rand_sep; | |
4678 | int32_t *end_ptr; | |
4679 | }; | |
4680 | ||
4681 | extern int random_r (struct random_data *__restrict __buf, | |
4682 | int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); | |
4683 | ||
4684 | extern int srandom_r (unsigned int __seed, struct random_data *__buf) | |
4685 | throw () __attribute__ ((__nonnull__ (2))); | |
4686 | ||
4687 | extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, | |
4688 | size_t __statelen, | |
4689 | struct random_data *__restrict __buf) | |
4690 | throw () __attribute__ ((__nonnull__ (2, 4))); | |
4691 | ||
4692 | extern int setstate_r (char *__restrict __statebuf, | |
4693 | struct random_data *__restrict __buf) | |
4694 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
4695 | ||
4696 | ||
4697 | ||
4698 | ||
4699 | ||
4700 | ||
4701 | extern int rand (void) throw (); | |
4702 | ||
4703 | extern void srand (unsigned int __seed) throw (); | |
4704 | ||
4705 | ||
4706 | ||
4707 | ||
4708 | extern int rand_r (unsigned int *__seed) throw (); | |
4709 | ||
4710 | ||
4711 | ||
4712 | ||
4713 | ||
4714 | ||
4715 | ||
4716 | extern double drand48 (void) throw (); | |
4717 | extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); | |
4718 | ||
4719 | ||
4720 | extern long int lrand48 (void) throw (); | |
4721 | extern long int nrand48 (unsigned short int __xsubi[3]) | |
4722 | throw () __attribute__ ((__nonnull__ (1))); | |
4723 | ||
4724 | ||
4725 | extern long int mrand48 (void) throw (); | |
4726 | extern long int jrand48 (unsigned short int __xsubi[3]) | |
4727 | throw () __attribute__ ((__nonnull__ (1))); | |
4728 | ||
4729 | ||
4730 | extern void srand48 (long int __seedval) throw (); | |
4731 | extern unsigned short int *seed48 (unsigned short int __seed16v[3]) | |
4732 | throw () __attribute__ ((__nonnull__ (1))); | |
4733 | extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1))); | |
4734 | ||
4735 | ||
4736 | ||
4737 | ||
4738 | ||
4739 | struct drand48_data | |
4740 | { | |
4741 | unsigned short int __x[3]; | |
4742 | unsigned short int __old_x[3]; | |
4743 | unsigned short int __c; | |
4744 | unsigned short int __init; | |
4745 | unsigned long long int __a; | |
4746 | }; | |
4747 | ||
4748 | ||
4749 | extern int drand48_r (struct drand48_data *__restrict __buffer, | |
4750 | double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); | |
4751 | extern int erand48_r (unsigned short int __xsubi[3], | |
4752 | struct drand48_data *__restrict __buffer, | |
4753 | double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); | |
4754 | ||
4755 | ||
4756 | extern int lrand48_r (struct drand48_data *__restrict __buffer, | |
4757 | long int *__restrict __result) | |
4758 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
4759 | extern int nrand48_r (unsigned short int __xsubi[3], | |
4760 | struct drand48_data *__restrict __buffer, | |
4761 | long int *__restrict __result) | |
4762 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
4763 | ||
4764 | ||
4765 | extern int mrand48_r (struct drand48_data *__restrict __buffer, | |
4766 | long int *__restrict __result) | |
4767 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
4768 | extern int jrand48_r (unsigned short int __xsubi[3], | |
4769 | struct drand48_data *__restrict __buffer, | |
4770 | long int *__restrict __result) | |
4771 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
4772 | ||
4773 | ||
4774 | extern int srand48_r (long int __seedval, struct drand48_data *__buffer) | |
4775 | throw () __attribute__ ((__nonnull__ (2))); | |
4776 | ||
4777 | extern int seed48_r (unsigned short int __seed16v[3], | |
4778 | struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); | |
4779 | ||
4780 | extern int lcong48_r (unsigned short int __param[7], | |
4781 | struct drand48_data *__buffer) | |
4782 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
4783 | ||
4784 | ||
4785 | ||
4786 | ||
4787 | ||
4788 | ||
4789 | ||
4790 | ||
4791 | ||
4792 | extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) ; | |
4793 | ||
4794 | extern void *calloc (size_t __nmemb, size_t __size) | |
4795 | throw () __attribute__ ((__malloc__)) ; | |
4796 | ||
4797 | ||
4798 | ||
4799 | ||
4800 | ||
4801 | ||
4802 | ||
4803 | extern void *realloc (void *__ptr, size_t __size) | |
4804 | throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); | |
4805 | ||
4806 | extern void free (void *__ptr) throw (); | |
4807 | ||
4808 | ||
4809 | ||
4810 | ||
4811 | extern void cfree (void *__ptr) throw (); | |
4812 | ||
4813 | ||
4814 | ||
4815 | # 1 "/usr/include/alloca.h" 1 3 4 | |
4816 | ||
4817 | ||
4818 | ||
4819 | ||
4820 | ||
4821 | ||
4822 | ||
4823 | # 1 "/usr/include/gentoo-multilib/amd64/alloca.h" 1 3 4 | |
4824 | # 22 "/usr/include/gentoo-multilib/amd64/alloca.h" 3 4 | |
4825 | # 1 "/usr/include/features.h" 1 3 4 | |
4826 | # 23 "/usr/include/gentoo-multilib/amd64/alloca.h" 2 3 4 | |
4827 | ||
4828 | ||
4829 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 | |
4830 | # 26 "/usr/include/gentoo-multilib/amd64/alloca.h" 2 3 4 | |
4831 | ||
4832 | extern "C" { | |
4833 | ||
4834 | ||
4835 | ||
4836 | ||
4837 | ||
4838 | extern void *alloca (size_t __size) throw (); | |
4839 | ||
4840 | ||
4841 | ||
4842 | ||
4843 | ||
4844 | } | |
4845 | # 9 "/usr/include/alloca.h" 2 3 4 | |
4846 | # 613 "/usr/include/gentoo-multilib/amd64/stdlib.h" 2 3 4 | |
4847 | ||
4848 | ||
4849 | ||
4850 | ||
4851 | extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) ; | |
4852 | ||
4853 | ||
4854 | ||
4855 | ||
4856 | extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) | |
4857 | throw () __attribute__ ((__nonnull__ (1))) ; | |
4858 | ||
4859 | ||
4860 | ||
4861 | ||
4862 | extern void abort (void) throw () __attribute__ ((__noreturn__)); | |
4863 | ||
4864 | ||
4865 | ||
4866 | extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1))); | |
4867 | ||
4868 | ||
4869 | ||
4870 | ||
4871 | ||
4872 | extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) | |
4873 | throw () __attribute__ ((__nonnull__ (1))); | |
4874 | ||
4875 | ||
4876 | ||
4877 | ||
4878 | ||
4879 | ||
4880 | extern void exit (int __status) throw () __attribute__ ((__noreturn__)); | |
4881 | ||
4882 | ||
4883 | ||
4884 | ||
4885 | ||
4886 | ||
4887 | extern void _Exit (int __status) throw () __attribute__ ((__noreturn__)); | |
4888 | ||
4889 | ||
4890 | ||
4891 | ||
4892 | ||
4893 | ||
4894 | extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) ; | |
4895 | ||
4896 | ||
4897 | ||
4898 | ||
4899 | extern char *__secure_getenv (__const char *__name) | |
4900 | throw () __attribute__ ((__nonnull__ (1))) ; | |
4901 | ||
4902 | ||
4903 | ||
4904 | ||
4905 | ||
4906 | extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1))); | |
4907 | ||
4908 | ||
4909 | ||
4910 | ||
4911 | ||
4912 | extern int setenv (__const char *__name, __const char *__value, int __replace) | |
4913 | throw () __attribute__ ((__nonnull__ (2))); | |
4914 | ||
4915 | ||
4916 | extern int unsetenv (__const char *__name) throw (); | |
4917 | ||
4918 | ||
4919 | ||
4920 | ||
4921 | ||
4922 | ||
4923 | extern int clearenv (void) throw (); | |
4924 | # 698 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4 | |
4925 | extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ; | |
4926 | # 712 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4 | |
4927 | extern int mkstemp (char *__template) __asm__ ("" "mkstemp64") | |
4928 | __attribute__ ((__nonnull__ (1))) ; | |
4929 | ||
4930 | ||
4931 | ||
4932 | ||
4933 | ||
4934 | extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ; | |
4935 | # 729 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4 | |
4936 | extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ; | |
4937 | ||
4938 | ||
4939 | ||
4940 | ||
4941 | ||
4942 | ||
4943 | ||
4944 | ||
4945 | extern int system (__const char *__command) ; | |
4946 | ||
4947 | ||
4948 | ||
4949 | ||
4950 | ||
4951 | ||
4952 | ||
4953 | extern char *canonicalize_file_name (__const char *__name) | |
4954 | throw () __attribute__ ((__nonnull__ (1))) ; | |
4955 | # 757 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4 | |
4956 | extern char *realpath (__const char *__restrict __name, | |
4957 | char *__restrict __resolved) throw () ; | |
4958 | ||
4959 | ||
4960 | ||
4961 | ||
4962 | ||
4963 | ||
4964 | typedef int (*__compar_fn_t) (__const void *, __const void *); | |
4965 | ||
4966 | ||
4967 | typedef __compar_fn_t comparison_fn_t; | |
4968 | ||
4969 | ||
4970 | ||
4971 | ||
4972 | ||
4973 | ||
4974 | extern void *bsearch (__const void *__key, __const void *__base, | |
4975 | size_t __nmemb, size_t __size, __compar_fn_t __compar) | |
4976 | __attribute__ ((__nonnull__ (1, 2, 5))) ; | |
4977 | ||
4978 | ||
4979 | ||
4980 | extern void qsort (void *__base, size_t __nmemb, size_t __size, | |
4981 | __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); | |
4982 | ||
4983 | ||
4984 | ||
4985 | extern int abs (int __x) throw () __attribute__ ((__const__)) ; | |
4986 | extern long int labs (long int __x) throw () __attribute__ ((__const__)) ; | |
4987 | ||
4988 | ||
4989 | ||
4990 | __extension__ extern long long int llabs (long long int __x) | |
4991 | throw () __attribute__ ((__const__)) ; | |
4992 | ||
4993 | ||
4994 | ||
4995 | ||
4996 | ||
4997 | ||
4998 | ||
4999 | extern div_t div (int __numer, int __denom) | |
5000 | throw () __attribute__ ((__const__)) ; | |
5001 | extern ldiv_t ldiv (long int __numer, long int __denom) | |
5002 | throw () __attribute__ ((__const__)) ; | |
5003 | ||
5004 | ||
5005 | ||
5006 | ||
5007 | __extension__ extern lldiv_t lldiv (long long int __numer, | |
5008 | long long int __denom) | |
5009 | throw () __attribute__ ((__const__)) ; | |
5010 | ||
5011 | # 822 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4 | |
5012 | extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, | |
5013 | int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; | |
5014 | ||
5015 | ||
5016 | ||
5017 | ||
5018 | extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, | |
5019 | int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; | |
5020 | ||
5021 | ||
5022 | ||
5023 | ||
5024 | extern char *gcvt (double __value, int __ndigit, char *__buf) | |
5025 | throw () __attribute__ ((__nonnull__ (3))) ; | |
5026 | ||
5027 | ||
5028 | ||
5029 | ||
5030 | extern char *qecvt (long double __value, int __ndigit, | |
5031 | int *__restrict __decpt, int *__restrict __sign) | |
5032 | throw () __attribute__ ((__nonnull__ (3, 4))) ; | |
5033 | extern char *qfcvt (long double __value, int __ndigit, | |
5034 | int *__restrict __decpt, int *__restrict __sign) | |
5035 | throw () __attribute__ ((__nonnull__ (3, 4))) ; | |
5036 | extern char *qgcvt (long double __value, int __ndigit, char *__buf) | |
5037 | throw () __attribute__ ((__nonnull__ (3))) ; | |
5038 | ||
5039 | ||
5040 | ||
5041 | ||
5042 | extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, | |
5043 | int *__restrict __sign, char *__restrict __buf, | |
5044 | size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); | |
5045 | extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, | |
5046 | int *__restrict __sign, char *__restrict __buf, | |
5047 | size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); | |
5048 | ||
5049 | extern int qecvt_r (long double __value, int __ndigit, | |
5050 | int *__restrict __decpt, int *__restrict __sign, | |
5051 | char *__restrict __buf, size_t __len) | |
5052 | throw () __attribute__ ((__nonnull__ (3, 4, 5))); | |
5053 | extern int qfcvt_r (long double __value, int __ndigit, | |
5054 | int *__restrict __decpt, int *__restrict __sign, | |
5055 | char *__restrict __buf, size_t __len) | |
5056 | throw () __attribute__ ((__nonnull__ (3, 4, 5))); | |
5057 | ||
5058 | ||
5059 | ||
5060 | ||
5061 | ||
5062 | ||
5063 | ||
5064 | extern int mblen (__const char *__s, size_t __n) throw () ; | |
5065 | ||
5066 | ||
5067 | extern int mbtowc (wchar_t *__restrict __pwc, | |
5068 | __const char *__restrict __s, size_t __n) throw () ; | |
5069 | ||
5070 | ||
5071 | extern int wctomb (char *__s, wchar_t __wchar) throw () ; | |
5072 | ||
5073 | ||
5074 | ||
5075 | extern size_t mbstowcs (wchar_t *__restrict __pwcs, | |
5076 | __const char *__restrict __s, size_t __n) throw (); | |
5077 | ||
5078 | extern size_t wcstombs (char *__restrict __s, | |
5079 | __const wchar_t *__restrict __pwcs, size_t __n) | |
5080 | throw (); | |
5081 | ||
5082 | ||
5083 | ||
5084 | ||
5085 | ||
5086 | ||
5087 | ||
5088 | ||
5089 | extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))) ; | |
5090 | # 910 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4 | |
5091 | extern int getsubopt (char **__restrict __optionp, | |
5092 | char *__const *__restrict __tokens, | |
5093 | char **__restrict __valuep) | |
5094 | throw () __attribute__ ((__nonnull__ (1, 2, 3))) ; | |
5095 | ||
5096 | ||
5097 | ||
5098 | ||
5099 | ||
5100 | extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1))); | |
5101 | ||
5102 | ||
5103 | ||
5104 | ||
5105 | ||
5106 | ||
5107 | ||
5108 | extern int posix_openpt (int __oflag) ; | |
5109 | ||
5110 | ||
5111 | ||
5112 | ||
5113 | ||
5114 | ||
5115 | ||
5116 | extern int grantpt (int __fd) throw (); | |
5117 | ||
5118 | ||
5119 | ||
5120 | extern int unlockpt (int __fd) throw (); | |
5121 | ||
5122 | ||
5123 | ||
5124 | ||
5125 | extern char *ptsname (int __fd) throw () ; | |
5126 | ||
5127 | ||
5128 | ||
5129 | ||
5130 | ||
5131 | ||
5132 | extern int ptsname_r (int __fd, char *__buf, size_t __buflen) | |
5133 | throw () __attribute__ ((__nonnull__ (2))); | |
5134 | ||
5135 | ||
5136 | extern int getpt (void); | |
5137 | ||
5138 | ||
5139 | ||
5140 | ||
5141 | ||
5142 | ||
5143 | extern int getloadavg (double __loadavg[], int __nelem) | |
5144 | throw () __attribute__ ((__nonnull__ (1))); | |
5145 | # 978 "/usr/include/gentoo-multilib/amd64/stdlib.h" 3 4 | |
5146 | } | |
5147 | # 9 "/usr/include/stdlib.h" 2 3 4 | |
5148 | # 44 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" 2 | |
5149 | # 55 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
5150 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/buffer.h" 1 | |
5151 | # 17 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/buffer.h" | |
5152 | # 1 "/usr/include/stdlib.h" 1 3 4 | |
5153 | # 18 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/buffer.h" 2 | |
5154 | # 96 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/buffer.h" | |
5155 | class wxCharBuffer { public: wxCharBuffer(const char *str) : m_str(str ? strdup(str) : __null) { } wxCharBuffer(size_t len=0) : m_str((char *)malloc((len + 1)*sizeof(char))) { m_str[len] = (char)0; } ~wxCharBuffer() { free(m_str); } char *release() const { char *p = m_str; ((wxCharBuffer *)this)->m_str = __null; return p; } wxCharBuffer(const wxCharBuffer& src) : m_str(src.release()) { } wxCharBuffer& operator=(const char *str) { free(m_str); m_str = str ? strdup(str) : __null; return *this; } wxCharBuffer& operator=(const wxCharBuffer& src) { free(m_str); m_str = src.release(); return *this; } char *data() { return m_str; } const char *data() const { return m_str; } operator const char *() const { return m_str; } char operator[](size_t n) const { return m_str[n]; } private: char *m_str; }; | |
5156 | ||
5157 | ||
5158 | ||
5159 | class wxWCharBuffer { public: wxWCharBuffer(const wchar_t *str) : m_str(str ? wxStrdupW(str) : __null) { } wxWCharBuffer(size_t len=0) : m_str((wchar_t *)malloc((len + 1)*sizeof(wchar_t))) { m_str[len] = (wchar_t)0; } ~wxWCharBuffer() { free(m_str); } wchar_t *release() const { wchar_t *p = m_str; ((wxWCharBuffer *)this)->m_str = __null; return p; } wxWCharBuffer(const wxWCharBuffer& src) : m_str(src.release()) { } wxWCharBuffer& operator=(const wchar_t *str) { free(m_str); m_str = str ? wxStrdupW(str) : __null; return *this; } wxWCharBuffer& operator=(const wxWCharBuffer& src) { free(m_str); m_str = src.release(); return *this; } wchar_t *data() { return m_str; } const wchar_t *data() const { return m_str; } operator const wchar_t *() const { return m_str; } wchar_t operator[](size_t n) const { return m_str[n]; } private: wchar_t *m_str; }; | |
5160 | # 123 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/buffer.h" | |
5161 | class wxMemoryBufferData | |
5162 | { | |
5163 | public: | |
5164 | ||
5165 | enum { BLOCK_SIZE = 1024 }; | |
5166 | ||
5167 | friend class wxMemoryBuffer; | |
5168 | ||
5169 | ||
5170 | private: | |
5171 | wxMemoryBufferData(size_t size = wxMemoryBufferData::BLOCK_SIZE) | |
5172 | : m_data(size ? malloc(size) : __null), m_size(size), m_len(0), m_ref(0) | |
5173 | { | |
5174 | } | |
5175 | ~wxMemoryBufferData() { free(m_data); } | |
5176 | ||
5177 | ||
5178 | void ResizeIfNeeded(size_t newSize) | |
5179 | { | |
5180 | if (newSize > m_size) | |
5181 | { | |
5182 | void *dataOld = m_data; | |
5183 | m_data = realloc(m_data, newSize + wxMemoryBufferData::BLOCK_SIZE); | |
5184 | if ( !m_data ) | |
5185 | { | |
5186 | free(dataOld); | |
5187 | } | |
5188 | ||
5189 | m_size = newSize + wxMemoryBufferData::BLOCK_SIZE; | |
5190 | } | |
5191 | } | |
5192 | ||
5193 | void IncRef() { m_ref += 1; } | |
5194 | void DecRef() | |
5195 | { | |
5196 | m_ref -= 1; | |
5197 | if (m_ref == 0) | |
5198 | delete this; | |
5199 | } | |
5200 | ||
5201 | ||
5202 | ||
5203 | void *m_data; | |
5204 | ||
5205 | ||
5206 | size_t m_size; | |
5207 | ||
5208 | ||
5209 | size_t m_len; | |
5210 | ||
5211 | ||
5212 | size_t m_ref; | |
5213 | ||
5214 | private: wxMemoryBufferData(const wxMemoryBufferData&); wxMemoryBufferData& operator=(const wxMemoryBufferData&); | |
5215 | }; | |
5216 | ||
5217 | ||
5218 | class wxMemoryBuffer | |
5219 | { | |
5220 | public: | |
5221 | ||
5222 | wxMemoryBuffer(size_t size = wxMemoryBufferData::BLOCK_SIZE) | |
5223 | { | |
5224 | m_bufdata = new wxMemoryBufferData(size); | |
5225 | m_bufdata->IncRef(); | |
5226 | } | |
5227 | ||
5228 | ~wxMemoryBuffer() { m_bufdata->DecRef(); } | |
5229 | ||
5230 | ||
5231 | ||
5232 | wxMemoryBuffer(const wxMemoryBuffer& src) | |
5233 | : m_bufdata(src.m_bufdata) | |
5234 | { | |
5235 | m_bufdata->IncRef(); | |
5236 | } | |
5237 | ||
5238 | wxMemoryBuffer& operator=(const wxMemoryBuffer& src) | |
5239 | { | |
5240 | m_bufdata->DecRef(); | |
5241 | m_bufdata = src.m_bufdata; | |
5242 | m_bufdata->IncRef(); | |
5243 | return *this; | |
5244 | } | |
5245 | ||
5246 | ||
5247 | ||
5248 | void *GetData() const { return m_bufdata->m_data; } | |
5249 | size_t GetBufSize() const { return m_bufdata->m_size; } | |
5250 | size_t GetDataLen() const { return m_bufdata->m_len; } | |
5251 | ||
5252 | void SetBufSize(size_t size) { m_bufdata->ResizeIfNeeded(size); } | |
5253 | void SetDataLen(size_t len) | |
5254 | { | |
5255 | ; | |
5256 | m_bufdata->m_len = len; | |
5257 | } | |
5258 | ||
5259 | ||
5260 | void *GetWriteBuf(size_t sizeNeeded) | |
5261 | { | |
5262 | m_bufdata->ResizeIfNeeded(sizeNeeded); | |
5263 | return m_bufdata->m_data; | |
5264 | } | |
5265 | ||
5266 | ||
5267 | void UngetWriteBuf(size_t sizeUsed) { SetDataLen(sizeUsed); } | |
5268 | ||
5269 | ||
5270 | void *GetAppendBuf(size_t sizeNeeded) | |
5271 | { | |
5272 | m_bufdata->ResizeIfNeeded(m_bufdata->m_len + sizeNeeded); | |
5273 | return (char*)m_bufdata->m_data + m_bufdata->m_len; | |
5274 | } | |
5275 | ||
5276 | ||
5277 | void UngetAppendBuf(size_t sizeUsed) | |
5278 | { | |
5279 | SetDataLen(m_bufdata->m_len + sizeUsed); | |
5280 | } | |
5281 | ||
5282 | ||
5283 | void AppendByte(char data) | |
5284 | { | |
5285 | if (!(m_bufdata->m_data)) {; return; }; | |
5286 | ||
5287 | m_bufdata->ResizeIfNeeded(m_bufdata->m_len + 1); | |
5288 | *(((char*)m_bufdata->m_data) + m_bufdata->m_len) = data; | |
5289 | m_bufdata->m_len += 1; | |
5290 | } | |
5291 | ||
5292 | void AppendData(void* data, size_t len) | |
5293 | { | |
5294 | memcpy(GetAppendBuf(len), data, len); | |
5295 | UngetAppendBuf(len); | |
5296 | } | |
5297 | ||
5298 | operator const char *() const { return (const char*)GetData(); } | |
5299 | ||
5300 | private: | |
5301 | wxMemoryBufferData* m_bufdata; | |
5302 | }; | |
5303 | # 56 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" 2 | |
5304 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/strconv.h" 1 | |
5305 | # 31 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/strconv.h" | |
5306 | # 1 "/usr/include/stdlib.h" 1 3 4 | |
5307 | # 32 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/strconv.h" 2 | |
5308 | ||
5309 | ||
5310 | ||
5311 | ||
5312 | ||
5313 | ||
5314 | ||
5315 | class wxMBConv | |
5316 | { | |
5317 | public: | |
5318 | ||
5319 | ||
5320 | ||
5321 | ||
5322 | virtual size_t MB2WC(wchar_t *outputBuf, const char *psz, size_t outputSize) const = 0; | |
5323 | virtual size_t WC2MB(char *outputBuf, const wchar_t *psz, size_t outputSize) const = 0; | |
5324 | ||
5325 | ||
5326 | const wxWCharBuffer cMB2WC(const char *psz) const; | |
5327 | const wxCharBuffer cWC2MB(const wchar_t *psz) const; | |
5328 | ||
5329 | ||
5330 | ||
5331 | ||
5332 | ||
5333 | const wxWCharBuffer cMB2WC(const char *psz, size_t pszLen, size_t* pOutSize) const; | |
5334 | const wxCharBuffer cWC2MB(const wchar_t *psz, size_t pszLen, size_t* pOutSize) const; | |
5335 | # 67 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/strconv.h" | |
5336 | const char* cMB2WX(const char *psz) const { return psz; } | |
5337 | const char* cWX2MB(const char *psz) const { return psz; } | |
5338 | const wxCharBuffer cWC2WX(const wchar_t *psz) const { return cWC2MB(psz); } | |
5339 | const wxWCharBuffer cWX2WC(const char *psz) const { return cMB2WC(psz); } | |
5340 | ||
5341 | ||
5342 | ||
5343 | virtual ~wxMBConv(); | |
5344 | }; | |
5345 | ||
5346 | ||
5347 | ||
5348 | ||
5349 | ||
5350 | ||
5351 | class wxMBConvLibc : public wxMBConv | |
5352 | { | |
5353 | public: | |
5354 | virtual size_t MB2WC(wchar_t *outputBuf, const char *psz, size_t outputSize) const; | |
5355 | virtual size_t WC2MB(char *outputBuf, const wchar_t *psz, size_t outputSize) const; | |
5356 | }; | |
5357 | # 98 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/strconv.h" | |
5358 | class wxConvBrokenFileNames : public wxMBConv | |
5359 | { | |
5360 | public: | |
5361 | wxConvBrokenFileNames(const wxChar *charset); | |
5362 | virtual ~wxConvBrokenFileNames() { delete m_conv; } | |
5363 | ||
5364 | virtual size_t MB2WC(wchar_t *outputBuf, const char *psz, size_t outputSize) const; | |
5365 | virtual size_t WC2MB(char *outputBuf, const wchar_t *psz, size_t outputSize) const; | |
5366 | ||
5367 | private: | |
5368 | ||
5369 | wxMBConv *m_conv; | |
5370 | }; | |
5371 | ||
5372 | ||
5373 | ||
5374 | ||
5375 | ||
5376 | ||
5377 | ||
5378 | class wxMBConvUTF7 : public wxMBConv | |
5379 | { | |
5380 | public: | |
5381 | virtual size_t MB2WC(wchar_t *outputBuf, const char *psz, size_t outputSize) const; | |
5382 | virtual size_t WC2MB(char *outputBuf, const wchar_t *psz, size_t outputSize) const; | |
5383 | }; | |
5384 | ||
5385 | ||
5386 | ||
5387 | ||
5388 | ||
5389 | class wxMBConvUTF8 : public wxMBConv | |
5390 | { | |
5391 | public: | |
5392 | enum { | |
5393 | MAP_INVALID_UTF8_NOT = 0, | |
5394 | MAP_INVALID_UTF8_TO_PUA = 1, | |
5395 | MAP_INVALID_UTF8_TO_OCTAL = 2 | |
5396 | }; | |
5397 | ||
5398 | wxMBConvUTF8(int options = MAP_INVALID_UTF8_NOT) : m_options(options) { } | |
5399 | virtual size_t MB2WC(wchar_t *outputBuf, const char *psz, size_t outputSize) const; | |
5400 | virtual size_t WC2MB(char *outputBuf, const wchar_t *psz, size_t outputSize) const; | |
5401 | ||
5402 | private: | |
5403 | int m_options; | |
5404 | }; | |
5405 | ||
5406 | ||
5407 | ||
5408 | ||
5409 | ||
5410 | class wxMBConvUTF16LE : public wxMBConv | |
5411 | { | |
5412 | public: | |
5413 | virtual size_t MB2WC(wchar_t *outputBuf, const char *psz, size_t outputSize) const; | |
5414 | virtual size_t WC2MB(char *outputBuf, const wchar_t *psz, size_t outputSize) const; | |
5415 | }; | |
5416 | ||
5417 | ||
5418 | ||
5419 | ||
5420 | ||
5421 | class wxMBConvUTF16BE : public wxMBConv | |
5422 | { | |
5423 | public: | |
5424 | virtual size_t MB2WC(wchar_t *outputBuf, const char *psz, size_t outputSize) const; | |
5425 | virtual size_t WC2MB(char *outputBuf, const wchar_t *psz, size_t outputSize) const; | |
5426 | }; | |
5427 | ||
5428 | ||
5429 | ||
5430 | ||
5431 | ||
5432 | class wxMBConvUTF32LE : public wxMBConv | |
5433 | { | |
5434 | public: | |
5435 | virtual size_t MB2WC(wchar_t *outputBuf, const char *psz, size_t outputSize) const; | |
5436 | virtual size_t WC2MB(char *outputBuf, const wchar_t *psz, size_t outputSize) const; | |
5437 | }; | |
5438 | ||
5439 | ||
5440 | ||
5441 | ||
5442 | ||
5443 | class wxMBConvUTF32BE : public wxMBConv | |
5444 | { | |
5445 | public: | |
5446 | virtual size_t MB2WC(wchar_t *outputBuf, const char *psz, size_t outputSize) const; | |
5447 | virtual size_t WC2MB(char *outputBuf, const wchar_t *psz, size_t outputSize) const; | |
5448 | }; | |
5449 | ||
5450 | ||
5451 | ||
5452 | ||
5453 | ||
5454 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/fontenc.h" 1 | |
5455 | # 16 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/fontenc.h" | |
5456 | enum wxFontEncoding | |
5457 | { | |
5458 | wxFONTENCODING_SYSTEM = -1, | |
5459 | wxFONTENCODING_DEFAULT, | |
5460 | ||
5461 | ||
5462 | wxFONTENCODING_ISO8859_1, | |
5463 | wxFONTENCODING_ISO8859_2, | |
5464 | wxFONTENCODING_ISO8859_3, | |
5465 | wxFONTENCODING_ISO8859_4, | |
5466 | wxFONTENCODING_ISO8859_5, | |
5467 | wxFONTENCODING_ISO8859_6, | |
5468 | wxFONTENCODING_ISO8859_7, | |
5469 | wxFONTENCODING_ISO8859_8, | |
5470 | wxFONTENCODING_ISO8859_9, | |
5471 | wxFONTENCODING_ISO8859_10, | |
5472 | wxFONTENCODING_ISO8859_11, | |
5473 | wxFONTENCODING_ISO8859_12, | |
5474 | ||
5475 | ||
5476 | wxFONTENCODING_ISO8859_13, | |
5477 | wxFONTENCODING_ISO8859_14, | |
5478 | wxFONTENCODING_ISO8859_15, | |
5479 | wxFONTENCODING_ISO8859_MAX, | |
5480 | ||
5481 | ||
5482 | wxFONTENCODING_KOI8, | |
5483 | wxFONTENCODING_KOI8_U, | |
5484 | wxFONTENCODING_ALTERNATIVE, | |
5485 | wxFONTENCODING_BULGARIAN, | |
5486 | ||
5487 | ||
5488 | ||
5489 | wxFONTENCODING_CP437, | |
5490 | wxFONTENCODING_CP850, | |
5491 | wxFONTENCODING_CP852, | |
5492 | wxFONTENCODING_CP855, | |
5493 | wxFONTENCODING_CP866, | |
5494 | ||
5495 | wxFONTENCODING_CP874, | |
5496 | wxFONTENCODING_CP932, | |
5497 | wxFONTENCODING_CP936, | |
5498 | wxFONTENCODING_CP949, | |
5499 | wxFONTENCODING_CP950, | |
5500 | wxFONTENCODING_CP1250, | |
5501 | wxFONTENCODING_CP1251, | |
5502 | wxFONTENCODING_CP1252, | |
5503 | wxFONTENCODING_CP1253, | |
5504 | wxFONTENCODING_CP1254, | |
5505 | wxFONTENCODING_CP1255, | |
5506 | wxFONTENCODING_CP1256, | |
5507 | wxFONTENCODING_CP1257, | |
5508 | wxFONTENCODING_CP12_MAX, | |
5509 | ||
5510 | wxFONTENCODING_UTF7, | |
5511 | wxFONTENCODING_UTF8, | |
5512 | wxFONTENCODING_EUC_JP, | |
5513 | wxFONTENCODING_UTF16BE, | |
5514 | wxFONTENCODING_UTF16LE, | |
5515 | wxFONTENCODING_UTF32BE, | |
5516 | wxFONTENCODING_UTF32LE, | |
5517 | ||
5518 | wxFONTENCODING_MACROMAN, | |
5519 | wxFONTENCODING_MACJAPANESE, | |
5520 | wxFONTENCODING_MACCHINESETRAD, | |
5521 | wxFONTENCODING_MACKOREAN, | |
5522 | wxFONTENCODING_MACARABIC, | |
5523 | wxFONTENCODING_MACHEBREW, | |
5524 | wxFONTENCODING_MACGREEK, | |
5525 | wxFONTENCODING_MACCYRILLIC, | |
5526 | wxFONTENCODING_MACDEVANAGARI, | |
5527 | wxFONTENCODING_MACGURMUKHI, | |
5528 | wxFONTENCODING_MACGUJARATI, | |
5529 | wxFONTENCODING_MACORIYA, | |
5530 | wxFONTENCODING_MACBENGALI, | |
5531 | wxFONTENCODING_MACTAMIL, | |
5532 | wxFONTENCODING_MACTELUGU, | |
5533 | wxFONTENCODING_MACKANNADA, | |
5534 | wxFONTENCODING_MACMALAJALAM, | |
5535 | wxFONTENCODING_MACSINHALESE, | |
5536 | wxFONTENCODING_MACBURMESE, | |
5537 | wxFONTENCODING_MACKHMER, | |
5538 | wxFONTENCODING_MACTHAI, | |
5539 | wxFONTENCODING_MACLAOTIAN, | |
5540 | wxFONTENCODING_MACGEORGIAN, | |
5541 | wxFONTENCODING_MACARMENIAN, | |
5542 | wxFONTENCODING_MACCHINESESIMP, | |
5543 | wxFONTENCODING_MACTIBETAN, | |
5544 | wxFONTENCODING_MACMONGOLIAN, | |
5545 | wxFONTENCODING_MACETHIOPIC, | |
5546 | wxFONTENCODING_MACCENTRALEUR, | |
5547 | wxFONTENCODING_MACVIATNAMESE, | |
5548 | wxFONTENCODING_MACARABICEXT, | |
5549 | wxFONTENCODING_MACSYMBOL, | |
5550 | wxFONTENCODING_MACDINGBATS, | |
5551 | wxFONTENCODING_MACTURKISH, | |
5552 | wxFONTENCODING_MACCROATIAN, | |
5553 | wxFONTENCODING_MACICELANDIC, | |
5554 | wxFONTENCODING_MACROMANIAN, | |
5555 | wxFONTENCODING_MACCELTIC, | |
5556 | wxFONTENCODING_MACGAELIC, | |
5557 | wxFONTENCODING_MACKEYBOARD, | |
5558 | ||
5559 | wxFONTENCODING_MAX, | |
5560 | ||
5561 | wxFONTENCODING_MACMIN = wxFONTENCODING_MACROMAN , | |
5562 | wxFONTENCODING_MACMAX = wxFONTENCODING_MACKEYBOARD , | |
5563 | ||
5564 | ||
5565 | ||
5566 | ||
5567 | ||
5568 | ||
5569 | wxFONTENCODING_UTF16 = wxFONTENCODING_UTF16LE, | |
5570 | wxFONTENCODING_UTF32 = wxFONTENCODING_UTF32LE, | |
5571 | ||
5572 | ||
5573 | ||
5574 | ||
5575 | ||
5576 | ||
5577 | ||
5578 | wxFONTENCODING_UNICODE = wxFONTENCODING_UTF32, | |
5579 | ||
5580 | ||
5581 | ||
5582 | ||
5583 | wxFONTENCODING_GB2312 = wxFONTENCODING_CP936, | |
5584 | wxFONTENCODING_BIG5 = wxFONTENCODING_CP950, | |
5585 | ||
5586 | ||
5587 | wxFONTENCODING_SHIFT_JIS = wxFONTENCODING_CP932 | |
5588 | }; | |
5589 | # 195 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/strconv.h" 2 | |
5590 | ||
5591 | class wxCSConv : public wxMBConv | |
5592 | { | |
5593 | public: | |
5594 | ||
5595 | ||
5596 | wxCSConv(const wxChar *charset); | |
5597 | wxCSConv(wxFontEncoding encoding); | |
5598 | ||
5599 | wxCSConv(const wxCSConv& conv); | |
5600 | virtual ~wxCSConv(); | |
5601 | ||
5602 | wxCSConv& operator=(const wxCSConv& conv); | |
5603 | ||
5604 | virtual size_t MB2WC(wchar_t *outputBuf, const char *psz, size_t outputSize) const; | |
5605 | virtual size_t WC2MB(char *outputBuf, const wchar_t *psz, size_t outputSize) const; | |
5606 | ||
5607 | void Clear() ; | |
5608 | ||
5609 | private: | |
5610 | ||
5611 | void Init(); | |
5612 | ||
5613 | ||
5614 | void CreateConvIfNeeded() const; | |
5615 | ||
5616 | ||
5617 | wxMBConv *DoCreate() const; | |
5618 | ||
5619 | ||
5620 | ||
5621 | void SetName(const wxChar *charset); | |
5622 | ||
5623 | ||
5624 | ||
5625 | ||
5626 | wxChar *m_name; | |
5627 | wxFontEncoding m_encoding; | |
5628 | ||
5629 | ||
5630 | wxMBConv *m_convReal; | |
5631 | bool m_deferred; | |
5632 | }; | |
5633 | # 246 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/strconv.h" | |
5634 | extern wxMBConv& wxConvLibc; | |
5635 | ||
5636 | ||
5637 | extern wxCSConv& wxConvISO8859_1; | |
5638 | extern wxMBConvUTF7& wxConvUTF7; | |
5639 | extern wxMBConvUTF8& wxConvUTF8; | |
5640 | # 260 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/strconv.h" | |
5641 | extern wxMBConv * wxConvFileName; | |
5642 | ||
5643 | ||
5644 | ||
5645 | ||
5646 | ||
5647 | ||
5648 | extern wxMBConv * wxConvCurrent; | |
5649 | ||
5650 | ||
5651 | extern wxCSConv& wxConvLocal; | |
5652 | # 281 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/strconv.h" | |
5653 | typedef wxMBConvUTF16LE wxMBConvUTF16; | |
5654 | typedef wxMBConvUTF32LE wxMBConvUTF32; | |
5655 | # 57 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" 2 | |
5656 | ||
5657 | class wxString; | |
5658 | # 87 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
5659 | extern const wxChar* wxEmptyString; | |
5660 | # 98 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
5661 | inline bool IsEmpty(const char *p) { return (!p || !*p); } | |
5662 | ||
5663 | ||
5664 | inline size_t Strlen(const char *psz) | |
5665 | { return psz ? strlen(psz) : 0; } | |
5666 | ||
5667 | ||
5668 | inline int Stricmp(const char *psz1, const char *psz2) | |
5669 | { | |
5670 | # 135 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
5671 | return strcasecmp(psz1, psz2); | |
5672 | # 160 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
5673 | } | |
5674 | # 169 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
5675 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/beforestd.h" 1 | |
5676 | # 170 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" 2 | |
5677 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/string" 1 3 | |
5678 | # 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/string" 3 | |
5679 | ||
5680 | # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/string" 3 | |
5681 | #pragma GCC visibility push(default) | |
5682 | ||
5683 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 1 3 | |
5684 | # 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 3 | |
5685 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/os_defines.h" 1 3 | |
5686 | # 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/os_defines.h" 3 | |
5687 | # 1 "/usr/include/features.h" 1 3 4 | |
5688 | # 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/os_defines.h" 2 3 | |
5689 | # 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 2 3 | |
5690 | ||
5691 | ||
5692 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/cpu_defines.h" 1 3 | |
5693 | # 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 2 3 | |
5694 | ||
5695 | ||
5696 | ||
5697 | ||
5698 | namespace __gnu_debug_def { } | |
5699 | ||
5700 | namespace __gnu_debug | |
5701 | { | |
5702 | using namespace __gnu_debug_def; | |
5703 | } | |
5704 | # 46 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/string" 2 3 | |
5705 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stringfwd.h" 1 3 | |
5706 | # 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stringfwd.h" 3 | |
5707 | ||
5708 | # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stringfwd.h" 3 | |
5709 | ||
5710 | ||
5711 | ||
5712 | namespace std | |
5713 | { | |
5714 | template<typename _Alloc> | |
5715 | class allocator; | |
5716 | ||
5717 | template<class _CharT> | |
5718 | struct char_traits; | |
5719 | ||
5720 | template<typename _CharT, typename _Traits = char_traits<_CharT>, | |
5721 | typename _Alloc = allocator<_CharT> > | |
5722 | class basic_string; | |
5723 | ||
5724 | template<> struct char_traits<char>; | |
5725 | ||
5726 | typedef basic_string<char> string; | |
5727 | ||
5728 | ||
5729 | template<> struct char_traits<wchar_t>; | |
5730 | ||
5731 | typedef basic_string<wchar_t> wstring; | |
5732 | ||
5733 | } | |
5734 | # 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/string" 2 3 | |
5735 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/char_traits.h" 1 3 | |
5736 | # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/char_traits.h" 3 | |
5737 | ||
5738 | # 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/char_traits.h" 3 | |
5739 | ||
5740 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cstring" 1 3 | |
5741 | # 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cstring" 3 | |
5742 | ||
5743 | # 49 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cstring" 3 | |
5744 | #pragma GCC visibility push(default) | |
5745 | ||
5746 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cstddef" 1 3 | |
5747 | # 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cstddef" 3 | |
5748 | ||
5749 | # 49 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cstddef" 3 | |
5750 | #pragma GCC visibility push(default) | |
5751 | ||
5752 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 | |
5753 | # 52 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cstddef" 2 3 | |
5754 | ||
5755 | namespace std | |
5756 | { | |
5757 | using ::ptrdiff_t; | |
5758 | using ::size_t; | |
5759 | } | |
5760 | ||
5761 | #pragma GCC visibility pop | |
5762 | # 52 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cstring" 2 3 | |
5763 | ||
5764 | # 1 "/usr/include/string.h" 1 3 4 | |
5765 | # 54 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cstring" 2 3 | |
5766 | # 79 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cstring" 3 | |
5767 | namespace std | |
5768 | { | |
5769 | using ::memcpy; | |
5770 | using ::memmove; | |
5771 | using ::strcpy; | |
5772 | using ::strncpy; | |
5773 | using ::strcat; | |
5774 | using ::strncat; | |
5775 | using ::memcmp; | |
5776 | using ::strcmp; | |
5777 | using ::strcoll; | |
5778 | using ::strncmp; | |
5779 | using ::strxfrm; | |
5780 | using ::strcspn; | |
5781 | using ::strspn; | |
5782 | using ::strtok; | |
5783 | using ::memset; | |
5784 | using ::strerror; | |
5785 | using ::strlen; | |
5786 | ||
5787 | using ::memchr; | |
5788 | ||
5789 | inline void* | |
5790 | memchr(void* __p, int __c, size_t __n) | |
5791 | { return memchr(const_cast<const void*>(__p), __c, __n); } | |
5792 | ||
5793 | using ::strchr; | |
5794 | ||
5795 | inline char* | |
5796 | strchr(char* __s1, int __n) | |
5797 | { return __builtin_strchr(const_cast<const char*>(__s1), __n); } | |
5798 | ||
5799 | using ::strpbrk; | |
5800 | ||
5801 | inline char* | |
5802 | strpbrk(char* __s1, const char* __s2) | |
5803 | { return __builtin_strpbrk(const_cast<const char*>(__s1), __s2); } | |
5804 | ||
5805 | using ::strrchr; | |
5806 | ||
5807 | inline char* | |
5808 | strrchr(char* __s1, int __n) | |
5809 | { return __builtin_strrchr(const_cast<const char*>(__s1), __n); } | |
5810 | ||
5811 | using ::strstr; | |
5812 | ||
5813 | inline char* | |
5814 | strstr(char* __s1, const char* __s2) | |
5815 | { return __builtin_strstr(const_cast<const char*>(__s1), __s2); } | |
5816 | } | |
5817 | ||
5818 | #pragma GCC visibility pop | |
5819 | # 46 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/char_traits.h" 2 3 | |
5820 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 1 3 | |
5821 | # 66 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3 | |
5822 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/climits" 1 3 | |
5823 | # 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/climits" 3 | |
5824 | ||
5825 | # 49 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/climits" 3 | |
5826 | #pragma GCC visibility push(default) | |
5827 | ||
5828 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/limits.h" 1 3 4 | |
5829 | # 52 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/climits" 2 3 | |
5830 | ||
5831 | #pragma GCC visibility pop | |
5832 | # 67 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 2 3 | |
5833 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cstdlib" 1 3 | |
5834 | # 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cstdlib" 3 | |
5835 | ||
5836 | # 49 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cstdlib" 3 | |
5837 | #pragma GCC visibility push(default) | |
5838 | # 72 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cstdlib" 3 | |
5839 | # 1 "/usr/include/stdlib.h" 1 3 4 | |
5840 | # 73 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cstdlib" 2 3 | |
5841 | # 104 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cstdlib" 3 | |
5842 | namespace std | |
5843 | { | |
5844 | using ::div_t; | |
5845 | using ::ldiv_t; | |
5846 | ||
5847 | using ::abort; | |
5848 | using ::abs; | |
5849 | using ::atexit; | |
5850 | using ::atof; | |
5851 | using ::atoi; | |
5852 | using ::atol; | |
5853 | using ::bsearch; | |
5854 | using ::calloc; | |
5855 | using ::div; | |
5856 | using ::exit; | |
5857 | using ::free; | |
5858 | using ::getenv; | |
5859 | using ::labs; | |
5860 | using ::ldiv; | |
5861 | using ::malloc; | |
5862 | ||
5863 | using ::mblen; | |
5864 | using ::mbstowcs; | |
5865 | using ::mbtowc; | |
5866 | ||
5867 | using ::qsort; | |
5868 | using ::rand; | |
5869 | using ::realloc; | |
5870 | using ::srand; | |
5871 | using ::strtod; | |
5872 | using ::strtol; | |
5873 | using ::strtoul; | |
5874 | using ::system; | |
5875 | ||
5876 | using ::wcstombs; | |
5877 | using ::wctomb; | |
5878 | ||
5879 | ||
5880 | inline long | |
5881 | abs(long __i) { return labs(__i); } | |
5882 | ||
5883 | inline ldiv_t | |
5884 | div(long __i, long __j) { return ldiv(__i, __j); } | |
5885 | } | |
5886 | # 160 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cstdlib" 3 | |
5887 | namespace __gnu_cxx | |
5888 | { | |
5889 | ||
5890 | using ::lldiv_t; | |
5891 | ||
5892 | ||
5893 | ||
5894 | ||
5895 | ||
5896 | using ::_Exit; | |
5897 | ||
5898 | ||
5899 | inline long long | |
5900 | abs(long long __x) { return __x >= 0 ? __x : -__x; } | |
5901 | ||
5902 | ||
5903 | using ::llabs; | |
5904 | ||
5905 | inline lldiv_t | |
5906 | div(long long __n, long long __d) | |
5907 | { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } | |
5908 | ||
5909 | using ::lldiv; | |
5910 | # 193 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cstdlib" 3 | |
5911 | using ::atoll; | |
5912 | using ::strtoll; | |
5913 | using ::strtoull; | |
5914 | ||
5915 | using ::strtof; | |
5916 | using ::strtold; | |
5917 | } | |
5918 | ||
5919 | namespace std | |
5920 | { | |
5921 | ||
5922 | using ::__gnu_cxx::lldiv_t; | |
5923 | ||
5924 | using ::__gnu_cxx::_Exit; | |
5925 | using ::__gnu_cxx::abs; | |
5926 | ||
5927 | using ::__gnu_cxx::llabs; | |
5928 | using ::__gnu_cxx::div; | |
5929 | using ::__gnu_cxx::lldiv; | |
5930 | ||
5931 | using ::__gnu_cxx::atoll; | |
5932 | using ::__gnu_cxx::strtof; | |
5933 | using ::__gnu_cxx::strtoll; | |
5934 | using ::__gnu_cxx::strtoull; | |
5935 | using ::__gnu_cxx::strtold; | |
5936 | } | |
5937 | ||
5938 | ||
5939 | ||
5940 | ||
5941 | ||
5942 | #pragma GCC visibility pop | |
5943 | # 68 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 2 3 | |
5944 | ||
5945 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/iosfwd" 1 3 | |
5946 | # 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/iosfwd" 3 | |
5947 | ||
5948 | # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/iosfwd" 3 | |
5949 | #pragma GCC visibility push(default) | |
5950 | ||
5951 | ||
5952 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/c++locale.h" 1 3 | |
5953 | # 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/c++locale.h" 3 | |
5954 | ||
5955 | # 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/c++locale.h" 3 | |
5956 | ||
5957 | ||
5958 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cstdio" 1 3 | |
5959 | # 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cstdio" 3 | |
5960 | ||
5961 | # 49 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cstdio" 3 | |
5962 | #pragma GCC visibility push(default) | |
5963 | ||
5964 | ||
5965 | ||
5966 | ||
5967 | # 1 "/usr/include/stdio.h" 1 3 4 | |
5968 | # 55 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cstdio" 2 3 | |
5969 | # 99 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cstdio" 3 | |
5970 | namespace std | |
5971 | { | |
5972 | using ::FILE; | |
5973 | using ::fpos_t; | |
5974 | ||
5975 | using ::clearerr; | |
5976 | using ::fclose; | |
5977 | using ::feof; | |
5978 | using ::ferror; | |
5979 | using ::fflush; | |
5980 | using ::fgetc; | |
5981 | using ::fgetpos; | |
5982 | using ::fgets; | |
5983 | using ::fopen; | |
5984 | using ::fprintf; | |
5985 | using ::fputc; | |
5986 | using ::fputs; | |
5987 | using ::fread; | |
5988 | using ::freopen; | |
5989 | using ::fscanf; | |
5990 | using ::fseek; | |
5991 | using ::fsetpos; | |
5992 | using ::ftell; | |
5993 | using ::fwrite; | |
5994 | using ::getc; | |
5995 | using ::getchar; | |
5996 | using ::gets; | |
5997 | using ::perror; | |
5998 | using ::printf; | |
5999 | using ::putc; | |
6000 | using ::putchar; | |
6001 | using ::puts; | |
6002 | using ::remove; | |
6003 | using ::rename; | |
6004 | using ::rewind; | |
6005 | using ::scanf; | |
6006 | using ::setbuf; | |
6007 | using ::setvbuf; | |
6008 | using ::sprintf; | |
6009 | using ::sscanf; | |
6010 | using ::tmpfile; | |
6011 | using ::tmpnam; | |
6012 | using ::ungetc; | |
6013 | using ::vfprintf; | |
6014 | using ::vprintf; | |
6015 | using ::vsprintf; | |
6016 | } | |
6017 | # 155 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cstdio" 3 | |
6018 | namespace __gnu_cxx | |
6019 | { | |
6020 | # 170 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cstdio" 3 | |
6021 | using ::snprintf; | |
6022 | using ::vfscanf; | |
6023 | using ::vscanf; | |
6024 | using ::vsnprintf; | |
6025 | using ::vsscanf; | |
6026 | ||
6027 | } | |
6028 | ||
6029 | namespace std | |
6030 | { | |
6031 | using __gnu_cxx::snprintf; | |
6032 | using __gnu_cxx::vfscanf; | |
6033 | using __gnu_cxx::vscanf; | |
6034 | using __gnu_cxx::vsnprintf; | |
6035 | using __gnu_cxx::vsscanf; | |
6036 | } | |
6037 | ||
6038 | ||
6039 | #pragma GCC visibility pop | |
6040 | # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/c++locale.h" 2 3 | |
6041 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/clocale" 1 3 | |
6042 | # 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/clocale" 3 | |
6043 | ||
6044 | # 49 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/clocale" 3 | |
6045 | #pragma GCC visibility push(default) | |
6046 | ||
6047 | # 1 "/usr/include/locale.h" 1 3 4 | |
6048 | ||
6049 | ||
6050 | ||
6051 | ||
6052 | ||
6053 | ||
6054 | ||
6055 | # 1 "/usr/include/gentoo-multilib/amd64/locale.h" 1 3 4 | |
6056 | # 26 "/usr/include/gentoo-multilib/amd64/locale.h" 3 4 | |
6057 | # 1 "/usr/include/features.h" 1 3 4 | |
6058 | # 27 "/usr/include/gentoo-multilib/amd64/locale.h" 2 3 4 | |
6059 | ||
6060 | ||
6061 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 | |
6062 | # 30 "/usr/include/gentoo-multilib/amd64/locale.h" 2 3 4 | |
6063 | # 1 "/usr/include/bits/locale.h" 1 3 4 | |
6064 | ||
6065 | ||
6066 | ||
6067 | ||
6068 | ||
6069 | ||
6070 | ||
6071 | # 1 "/usr/include/gentoo-multilib/amd64/bits/locale.h" 1 3 4 | |
6072 | # 27 "/usr/include/gentoo-multilib/amd64/bits/locale.h" 3 4 | |
6073 | enum | |
6074 | { | |
6075 | __LC_CTYPE = 0, | |
6076 | __LC_NUMERIC = 1, | |
6077 | __LC_TIME = 2, | |
6078 | __LC_COLLATE = 3, | |
6079 | __LC_MONETARY = 4, | |
6080 | __LC_MESSAGES = 5, | |
6081 | __LC_ALL = 6, | |
6082 | __LC_PAPER = 7, | |
6083 | __LC_NAME = 8, | |
6084 | __LC_ADDRESS = 9, | |
6085 | __LC_TELEPHONE = 10, | |
6086 | __LC_MEASUREMENT = 11, | |
6087 | __LC_IDENTIFICATION = 12 | |
6088 | }; | |
6089 | # 9 "/usr/include/bits/locale.h" 2 3 4 | |
6090 | # 31 "/usr/include/gentoo-multilib/amd64/locale.h" 2 3 4 | |
6091 | ||
6092 | extern "C" { | |
6093 | # 52 "/usr/include/gentoo-multilib/amd64/locale.h" 3 4 | |
6094 | struct lconv | |
6095 | { | |
6096 | ||
6097 | ||
6098 | char *decimal_point; | |
6099 | char *thousands_sep; | |
6100 | ||
6101 | ||
6102 | ||
6103 | ||
6104 | ||
6105 | char *grouping; | |
6106 | ||
6107 | ||
6108 | ||
6109 | ||
6110 | ||
6111 | char *int_curr_symbol; | |
6112 | char *currency_symbol; | |
6113 | char *mon_decimal_point; | |
6114 | char *mon_thousands_sep; | |
6115 | char *mon_grouping; | |
6116 | char *positive_sign; | |
6117 | char *negative_sign; | |
6118 | char int_frac_digits; | |
6119 | char frac_digits; | |
6120 | ||
6121 | char p_cs_precedes; | |
6122 | ||
6123 | char p_sep_by_space; | |
6124 | ||
6125 | char n_cs_precedes; | |
6126 | ||
6127 | char n_sep_by_space; | |
6128 | ||
6129 | ||
6130 | ||
6131 | ||
6132 | ||
6133 | ||
6134 | char p_sign_posn; | |
6135 | char n_sign_posn; | |
6136 | ||
6137 | ||
6138 | char int_p_cs_precedes; | |
6139 | ||
6140 | char int_p_sep_by_space; | |
6141 | ||
6142 | char int_n_cs_precedes; | |
6143 | ||
6144 | char int_n_sep_by_space; | |
6145 | ||
6146 | ||
6147 | ||
6148 | ||
6149 | ||
6150 | ||
6151 | char int_p_sign_posn; | |
6152 | char int_n_sign_posn; | |
6153 | # 119 "/usr/include/gentoo-multilib/amd64/locale.h" 3 4 | |
6154 | }; | |
6155 | ||
6156 | ||
6157 | ||
6158 | ||
6159 | ||
6160 | extern char *setlocale (int __category, __const char *__locale) throw (); | |
6161 | ||
6162 | ||
6163 | extern struct lconv *localeconv (void) throw (); | |
6164 | ||
6165 | ||
6166 | # 146 "/usr/include/gentoo-multilib/amd64/locale.h" 3 4 | |
6167 | # 1 "/usr/include/xlocale.h" 1 3 4 | |
6168 | # 147 "/usr/include/gentoo-multilib/amd64/locale.h" 2 3 4 | |
6169 | ||
6170 | typedef __locale_t locale_t; | |
6171 | ||
6172 | ||
6173 | ||
6174 | ||
6175 | ||
6176 | extern __locale_t newlocale (int __category_mask, __const char *__locale, | |
6177 | __locale_t __base) throw (); | |
6178 | # 189 "/usr/include/gentoo-multilib/amd64/locale.h" 3 4 | |
6179 | extern __locale_t duplocale (__locale_t __dataset) throw (); | |
6180 | ||
6181 | ||
6182 | ||
6183 | extern void freelocale (__locale_t __dataset) throw (); | |
6184 | ||
6185 | ||
6186 | ||
6187 | ||
6188 | ||
6189 | ||
6190 | extern __locale_t uselocale (__locale_t __dataset) throw (); | |
6191 | ||
6192 | ||
6193 | ||
6194 | ||
6195 | ||
6196 | ||
6197 | ||
6198 | } | |
6199 | # 9 "/usr/include/locale.h" 2 3 4 | |
6200 | # 52 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/clocale" 2 3 | |
6201 | ||
6202 | ||
6203 | ||
6204 | ||
6205 | ||
6206 | namespace std | |
6207 | { | |
6208 | using ::lconv; | |
6209 | using ::setlocale; | |
6210 | using ::localeconv; | |
6211 | } | |
6212 | ||
6213 | #pragma GCC visibility pop | |
6214 | # 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/c++locale.h" 2 3 | |
6215 | # 1 "/usr/include/langinfo.h" 1 3 4 | |
6216 | ||
6217 | ||
6218 | ||
6219 | ||
6220 | ||
6221 | ||
6222 | ||
6223 | # 1 "/usr/include/gentoo-multilib/amd64/langinfo.h" 1 3 4 | |
6224 | # 24 "/usr/include/gentoo-multilib/amd64/langinfo.h" 3 4 | |
6225 | # 1 "/usr/include/nl_types.h" 1 3 4 | |
6226 | ||
6227 | ||
6228 | ||
6229 | ||
6230 | ||
6231 | ||
6232 | ||
6233 | # 1 "/usr/include/gentoo-multilib/amd64/nl_types.h" 1 3 4 | |
6234 | # 22 "/usr/include/gentoo-multilib/amd64/nl_types.h" 3 4 | |
6235 | # 1 "/usr/include/features.h" 1 3 4 | |
6236 | # 23 "/usr/include/gentoo-multilib/amd64/nl_types.h" 2 3 4 | |
6237 | # 31 "/usr/include/gentoo-multilib/amd64/nl_types.h" 3 4 | |
6238 | extern "C" { | |
6239 | ||
6240 | ||
6241 | typedef void *nl_catd; | |
6242 | ||
6243 | ||
6244 | typedef int nl_item; | |
6245 | ||
6246 | ||
6247 | ||
6248 | ||
6249 | ||
6250 | extern nl_catd catopen (__const char *__cat_name, int __flag) __attribute__ ((__nonnull__ (1))); | |
6251 | ||
6252 | ||
6253 | ||
6254 | extern char *catgets (nl_catd __catalog, int __set, int __number, | |
6255 | __const char *__string) throw () __attribute__ ((__nonnull__ (1))); | |
6256 | ||
6257 | ||
6258 | extern int catclose (nl_catd __catalog) throw () __attribute__ ((__nonnull__ (1))); | |
6259 | ||
6260 | } | |
6261 | # 9 "/usr/include/nl_types.h" 2 3 4 | |
6262 | # 25 "/usr/include/gentoo-multilib/amd64/langinfo.h" 2 3 4 | |
6263 | ||
6264 | # 1 "/usr/include/bits/locale.h" 1 3 4 | |
6265 | ||
6266 | ||
6267 | ||
6268 | ||
6269 | ||
6270 | ||
6271 | ||
6272 | # 1 "/usr/include/gentoo-multilib/amd64/bits/locale.h" 1 3 4 | |
6273 | # 9 "/usr/include/bits/locale.h" 2 3 4 | |
6274 | # 27 "/usr/include/gentoo-multilib/amd64/langinfo.h" 2 3 4 | |
6275 | ||
6276 | ||
6277 | extern "C" { | |
6278 | # 42 "/usr/include/gentoo-multilib/amd64/langinfo.h" 3 4 | |
6279 | enum | |
6280 | { | |
6281 | ||
6282 | ||
6283 | ||
6284 | ABDAY_1 = (((__LC_TIME) << 16) | (0)), | |
6285 | ||
6286 | ABDAY_2, | |
6287 | ||
6288 | ABDAY_3, | |
6289 | ||
6290 | ABDAY_4, | |
6291 | ||
6292 | ABDAY_5, | |
6293 | ||
6294 | ABDAY_6, | |
6295 | ||
6296 | ABDAY_7, | |
6297 | ||
6298 | ||
6299 | ||
6300 | DAY_1, | |
6301 | ||
6302 | DAY_2, | |
6303 | ||
6304 | DAY_3, | |
6305 | ||
6306 | DAY_4, | |
6307 | ||
6308 | DAY_5, | |
6309 | ||
6310 | DAY_6, | |
6311 | ||
6312 | DAY_7, | |
6313 | ||
6314 | ||
6315 | ||
6316 | ABMON_1, | |
6317 | ||
6318 | ABMON_2, | |
6319 | ||
6320 | ABMON_3, | |
6321 | ||
6322 | ABMON_4, | |
6323 | ||
6324 | ABMON_5, | |
6325 | ||
6326 | ABMON_6, | |
6327 | ||
6328 | ABMON_7, | |
6329 | ||
6330 | ABMON_8, | |
6331 | ||
6332 | ABMON_9, | |
6333 | ||
6334 | ABMON_10, | |
6335 | ||
6336 | ABMON_11, | |
6337 | ||
6338 | ABMON_12, | |
6339 | ||
6340 | ||
6341 | ||
6342 | MON_1, | |
6343 | ||
6344 | MON_2, | |
6345 | ||
6346 | MON_3, | |
6347 | ||
6348 | MON_4, | |
6349 | ||
6350 | MON_5, | |
6351 | ||
6352 | MON_6, | |
6353 | ||
6354 | MON_7, | |
6355 | ||
6356 | MON_8, | |
6357 | ||
6358 | MON_9, | |
6359 | ||
6360 | MON_10, | |
6361 | ||
6362 | MON_11, | |
6363 | ||
6364 | MON_12, | |
6365 | ||
6366 | ||
6367 | AM_STR, | |
6368 | ||
6369 | PM_STR, | |
6370 | ||
6371 | ||
6372 | D_T_FMT, | |
6373 | ||
6374 | D_FMT, | |
6375 | ||
6376 | T_FMT, | |
6377 | ||
6378 | T_FMT_AMPM, | |
6379 | ||
6380 | ||
6381 | ERA, | |
6382 | ||
6383 | __ERA_YEAR, | |
6384 | ||
6385 | ||
6386 | ||
6387 | ERA_D_FMT, | |
6388 | ||
6389 | ALT_DIGITS, | |
6390 | ||
6391 | ERA_D_T_FMT, | |
6392 | ||
6393 | ERA_T_FMT, | |
6394 | ||
6395 | ||
6396 | _NL_TIME_ERA_NUM_ENTRIES, | |
6397 | _NL_TIME_ERA_ENTRIES, | |
6398 | ||
6399 | _NL_WABDAY_1, | |
6400 | _NL_WABDAY_2, | |
6401 | _NL_WABDAY_3, | |
6402 | _NL_WABDAY_4, | |
6403 | _NL_WABDAY_5, | |
6404 | _NL_WABDAY_6, | |
6405 | _NL_WABDAY_7, | |
6406 | ||
6407 | ||
6408 | _NL_WDAY_1, | |
6409 | _NL_WDAY_2, | |
6410 | _NL_WDAY_3, | |
6411 | _NL_WDAY_4, | |
6412 | _NL_WDAY_5, | |
6413 | _NL_WDAY_6, | |
6414 | _NL_WDAY_7, | |
6415 | ||
6416 | ||
6417 | _NL_WABMON_1, | |
6418 | _NL_WABMON_2, | |
6419 | _NL_WABMON_3, | |
6420 | _NL_WABMON_4, | |
6421 | _NL_WABMON_5, | |
6422 | _NL_WABMON_6, | |
6423 | _NL_WABMON_7, | |
6424 | _NL_WABMON_8, | |
6425 | _NL_WABMON_9, | |
6426 | _NL_WABMON_10, | |
6427 | _NL_WABMON_11, | |
6428 | _NL_WABMON_12, | |
6429 | ||
6430 | ||
6431 | _NL_WMON_1, | |
6432 | _NL_WMON_2, | |
6433 | _NL_WMON_3, | |
6434 | _NL_WMON_4, | |
6435 | _NL_WMON_5, | |
6436 | _NL_WMON_6, | |
6437 | _NL_WMON_7, | |
6438 | _NL_WMON_8, | |
6439 | _NL_WMON_9, | |
6440 | _NL_WMON_10, | |
6441 | _NL_WMON_11, | |
6442 | _NL_WMON_12, | |
6443 | ||
6444 | _NL_WAM_STR, | |
6445 | _NL_WPM_STR, | |
6446 | ||
6447 | _NL_WD_T_FMT, | |
6448 | _NL_WD_FMT, | |
6449 | _NL_WT_FMT, | |
6450 | _NL_WT_FMT_AMPM, | |
6451 | ||
6452 | _NL_WERA_YEAR, | |
6453 | _NL_WERA_D_FMT, | |
6454 | _NL_WALT_DIGITS, | |
6455 | _NL_WERA_D_T_FMT, | |
6456 | _NL_WERA_T_FMT, | |
6457 | ||
6458 | _NL_TIME_WEEK_NDAYS, | |
6459 | _NL_TIME_WEEK_1STDAY, | |
6460 | _NL_TIME_WEEK_1STWEEK, | |
6461 | _NL_TIME_FIRST_WEEKDAY, | |
6462 | _NL_TIME_FIRST_WORKDAY, | |
6463 | _NL_TIME_CAL_DIRECTION, | |
6464 | _NL_TIME_TIMEZONE, | |
6465 | ||
6466 | _DATE_FMT, | |
6467 | ||
6468 | _NL_W_DATE_FMT, | |
6469 | ||
6470 | _NL_TIME_CODESET, | |
6471 | ||
6472 | _NL_NUM_LC_TIME, | |
6473 | ||
6474 | ||
6475 | ||
6476 | ||
6477 | _NL_COLLATE_NRULES = (((__LC_COLLATE) << 16) | (0)), | |
6478 | _NL_COLLATE_RULESETS, | |
6479 | _NL_COLLATE_TABLEMB, | |
6480 | _NL_COLLATE_WEIGHTMB, | |
6481 | _NL_COLLATE_EXTRAMB, | |
6482 | _NL_COLLATE_INDIRECTMB, | |
6483 | _NL_COLLATE_GAP1, | |
6484 | _NL_COLLATE_GAP2, | |
6485 | _NL_COLLATE_GAP3, | |
6486 | _NL_COLLATE_TABLEWC, | |
6487 | _NL_COLLATE_WEIGHTWC, | |
6488 | _NL_COLLATE_EXTRAWC, | |
6489 | _NL_COLLATE_INDIRECTWC, | |
6490 | _NL_COLLATE_SYMB_HASH_SIZEMB, | |
6491 | _NL_COLLATE_SYMB_TABLEMB, | |
6492 | _NL_COLLATE_SYMB_EXTRAMB, | |
6493 | _NL_COLLATE_COLLSEQMB, | |
6494 | _NL_COLLATE_COLLSEQWC, | |
6495 | _NL_COLLATE_CODESET, | |
6496 | _NL_NUM_LC_COLLATE, | |
6497 | ||
6498 | ||
6499 | ||
6500 | ||
6501 | _NL_CTYPE_CLASS = (((__LC_CTYPE) << 16) | (0)), | |
6502 | _NL_CTYPE_TOUPPER, | |
6503 | _NL_CTYPE_GAP1, | |
6504 | _NL_CTYPE_TOLOWER, | |
6505 | _NL_CTYPE_GAP2, | |
6506 | _NL_CTYPE_CLASS32, | |
6507 | _NL_CTYPE_GAP3, | |
6508 | _NL_CTYPE_GAP4, | |
6509 | _NL_CTYPE_GAP5, | |
6510 | _NL_CTYPE_GAP6, | |
6511 | _NL_CTYPE_CLASS_NAMES, | |
6512 | _NL_CTYPE_MAP_NAMES, | |
6513 | _NL_CTYPE_WIDTH, | |
6514 | _NL_CTYPE_MB_CUR_MAX, | |
6515 | _NL_CTYPE_CODESET_NAME, | |
6516 | CODESET = _NL_CTYPE_CODESET_NAME, | |
6517 | ||
6518 | _NL_CTYPE_TOUPPER32, | |
6519 | _NL_CTYPE_TOLOWER32, | |
6520 | _NL_CTYPE_CLASS_OFFSET, | |
6521 | _NL_CTYPE_MAP_OFFSET, | |
6522 | _NL_CTYPE_INDIGITS_MB_LEN, | |
6523 | _NL_CTYPE_INDIGITS0_MB, | |
6524 | _NL_CTYPE_INDIGITS1_MB, | |
6525 | _NL_CTYPE_INDIGITS2_MB, | |
6526 | _NL_CTYPE_INDIGITS3_MB, | |
6527 | _NL_CTYPE_INDIGITS4_MB, | |
6528 | _NL_CTYPE_INDIGITS5_MB, | |
6529 | _NL_CTYPE_INDIGITS6_MB, | |
6530 | _NL_CTYPE_INDIGITS7_MB, | |
6531 | _NL_CTYPE_INDIGITS8_MB, | |
6532 | _NL_CTYPE_INDIGITS9_MB, | |
6533 | _NL_CTYPE_INDIGITS_WC_LEN, | |
6534 | _NL_CTYPE_INDIGITS0_WC, | |
6535 | _NL_CTYPE_INDIGITS1_WC, | |
6536 | _NL_CTYPE_INDIGITS2_WC, | |
6537 | _NL_CTYPE_INDIGITS3_WC, | |
6538 | _NL_CTYPE_INDIGITS4_WC, | |
6539 | _NL_CTYPE_INDIGITS5_WC, | |
6540 | _NL_CTYPE_INDIGITS6_WC, | |
6541 | _NL_CTYPE_INDIGITS7_WC, | |
6542 | _NL_CTYPE_INDIGITS8_WC, | |
6543 | _NL_CTYPE_INDIGITS9_WC, | |
6544 | _NL_CTYPE_OUTDIGIT0_MB, | |
6545 | _NL_CTYPE_OUTDIGIT1_MB, | |
6546 | _NL_CTYPE_OUTDIGIT2_MB, | |
6547 | _NL_CTYPE_OUTDIGIT3_MB, | |
6548 | _NL_CTYPE_OUTDIGIT4_MB, | |
6549 | _NL_CTYPE_OUTDIGIT5_MB, | |
6550 | _NL_CTYPE_OUTDIGIT6_MB, | |
6551 | _NL_CTYPE_OUTDIGIT7_MB, | |
6552 | _NL_CTYPE_OUTDIGIT8_MB, | |
6553 | _NL_CTYPE_OUTDIGIT9_MB, | |
6554 | _NL_CTYPE_OUTDIGIT0_WC, | |
6555 | _NL_CTYPE_OUTDIGIT1_WC, | |
6556 | _NL_CTYPE_OUTDIGIT2_WC, | |
6557 | _NL_CTYPE_OUTDIGIT3_WC, | |
6558 | _NL_CTYPE_OUTDIGIT4_WC, | |
6559 | _NL_CTYPE_OUTDIGIT5_WC, | |
6560 | _NL_CTYPE_OUTDIGIT6_WC, | |
6561 | _NL_CTYPE_OUTDIGIT7_WC, | |
6562 | _NL_CTYPE_OUTDIGIT8_WC, | |
6563 | _NL_CTYPE_OUTDIGIT9_WC, | |
6564 | _NL_CTYPE_TRANSLIT_TAB_SIZE, | |
6565 | _NL_CTYPE_TRANSLIT_FROM_IDX, | |
6566 | _NL_CTYPE_TRANSLIT_FROM_TBL, | |
6567 | _NL_CTYPE_TRANSLIT_TO_IDX, | |
6568 | _NL_CTYPE_TRANSLIT_TO_TBL, | |
6569 | _NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN, | |
6570 | _NL_CTYPE_TRANSLIT_DEFAULT_MISSING, | |
6571 | _NL_CTYPE_TRANSLIT_IGNORE_LEN, | |
6572 | _NL_CTYPE_TRANSLIT_IGNORE, | |
6573 | _NL_CTYPE_MAP_TO_NONASCII, | |
6574 | _NL_CTYPE_EXTRA_MAP_1, | |
6575 | _NL_CTYPE_EXTRA_MAP_2, | |
6576 | _NL_CTYPE_EXTRA_MAP_3, | |
6577 | _NL_CTYPE_EXTRA_MAP_4, | |
6578 | _NL_CTYPE_EXTRA_MAP_5, | |
6579 | _NL_CTYPE_EXTRA_MAP_6, | |
6580 | _NL_CTYPE_EXTRA_MAP_7, | |
6581 | _NL_CTYPE_EXTRA_MAP_8, | |
6582 | _NL_CTYPE_EXTRA_MAP_9, | |
6583 | _NL_CTYPE_EXTRA_MAP_10, | |
6584 | _NL_CTYPE_EXTRA_MAP_11, | |
6585 | _NL_CTYPE_EXTRA_MAP_12, | |
6586 | _NL_CTYPE_EXTRA_MAP_13, | |
6587 | _NL_CTYPE_EXTRA_MAP_14, | |
6588 | _NL_NUM_LC_CTYPE, | |
6589 | ||
6590 | ||
6591 | ||
6592 | ||
6593 | __INT_CURR_SYMBOL = (((__LC_MONETARY) << 16) | (0)), | |
6594 | ||
6595 | ||
6596 | ||
6597 | __CURRENCY_SYMBOL, | |
6598 | ||
6599 | ||
6600 | ||
6601 | __MON_DECIMAL_POINT, | |
6602 | ||
6603 | ||
6604 | ||
6605 | __MON_THOUSANDS_SEP, | |
6606 | ||
6607 | ||
6608 | ||
6609 | __MON_GROUPING, | |
6610 | ||
6611 | ||
6612 | ||
6613 | __POSITIVE_SIGN, | |
6614 | ||
6615 | ||
6616 | ||
6617 | __NEGATIVE_SIGN, | |
6618 | ||
6619 | ||
6620 | ||
6621 | __INT_FRAC_DIGITS, | |
6622 | ||
6623 | ||
6624 | ||
6625 | __FRAC_DIGITS, | |
6626 | ||
6627 | ||
6628 | ||
6629 | __P_CS_PRECEDES, | |
6630 | ||
6631 | ||
6632 | ||
6633 | __P_SEP_BY_SPACE, | |
6634 | ||
6635 | ||
6636 | ||
6637 | __N_CS_PRECEDES, | |
6638 | ||
6639 | ||
6640 | ||
6641 | __N_SEP_BY_SPACE, | |
6642 | ||
6643 | ||
6644 | ||
6645 | __P_SIGN_POSN, | |
6646 | ||
6647 | ||
6648 | ||
6649 | __N_SIGN_POSN, | |
6650 | ||
6651 | ||
6652 | ||
6653 | _NL_MONETARY_CRNCYSTR, | |
6654 | ||
6655 | __INT_P_CS_PRECEDES, | |
6656 | ||
6657 | ||
6658 | ||
6659 | __INT_P_SEP_BY_SPACE, | |
6660 | ||
6661 | ||
6662 | ||
6663 | __INT_N_CS_PRECEDES, | |
6664 | ||
6665 | ||
6666 | ||
6667 | __INT_N_SEP_BY_SPACE, | |
6668 | ||
6669 | ||
6670 | ||
6671 | __INT_P_SIGN_POSN, | |
6672 | ||
6673 | ||
6674 | ||
6675 | __INT_N_SIGN_POSN, | |
6676 | ||
6677 | ||
6678 | ||
6679 | _NL_MONETARY_DUO_INT_CURR_SYMBOL, | |
6680 | _NL_MONETARY_DUO_CURRENCY_SYMBOL, | |
6681 | _NL_MONETARY_DUO_INT_FRAC_DIGITS, | |
6682 | _NL_MONETARY_DUO_FRAC_DIGITS, | |
6683 | _NL_MONETARY_DUO_P_CS_PRECEDES, | |
6684 | _NL_MONETARY_DUO_P_SEP_BY_SPACE, | |
6685 | _NL_MONETARY_DUO_N_CS_PRECEDES, | |
6686 | _NL_MONETARY_DUO_N_SEP_BY_SPACE, | |
6687 | _NL_MONETARY_DUO_INT_P_CS_PRECEDES, | |
6688 | _NL_MONETARY_DUO_INT_P_SEP_BY_SPACE, | |
6689 | _NL_MONETARY_DUO_INT_N_CS_PRECEDES, | |
6690 | _NL_MONETARY_DUO_INT_N_SEP_BY_SPACE, | |
6691 | _NL_MONETARY_DUO_P_SIGN_POSN, | |
6692 | _NL_MONETARY_DUO_N_SIGN_POSN, | |
6693 | _NL_MONETARY_DUO_INT_P_SIGN_POSN, | |
6694 | _NL_MONETARY_DUO_INT_N_SIGN_POSN, | |
6695 | _NL_MONETARY_UNO_VALID_FROM, | |
6696 | _NL_MONETARY_UNO_VALID_TO, | |
6697 | _NL_MONETARY_DUO_VALID_FROM, | |
6698 | _NL_MONETARY_DUO_VALID_TO, | |
6699 | _NL_MONETARY_CONVERSION_RATE, | |
6700 | _NL_MONETARY_DECIMAL_POINT_WC, | |
6701 | _NL_MONETARY_THOUSANDS_SEP_WC, | |
6702 | _NL_MONETARY_CODESET, | |
6703 | _NL_NUM_LC_MONETARY, | |
6704 | ||
6705 | ||
6706 | ||
6707 | __DECIMAL_POINT = (((__LC_NUMERIC) << 16) | (0)), | |
6708 | ||
6709 | ||
6710 | ||
6711 | RADIXCHAR = __DECIMAL_POINT, | |
6712 | ||
6713 | __THOUSANDS_SEP, | |
6714 | ||
6715 | ||
6716 | ||
6717 | THOUSEP = __THOUSANDS_SEP, | |
6718 | ||
6719 | __GROUPING, | |
6720 | ||
6721 | ||
6722 | ||
6723 | _NL_NUMERIC_DECIMAL_POINT_WC, | |
6724 | _NL_NUMERIC_THOUSANDS_SEP_WC, | |
6725 | _NL_NUMERIC_CODESET, | |
6726 | _NL_NUM_LC_NUMERIC, | |
6727 | ||
6728 | __YESEXPR = (((__LC_MESSAGES) << 16) | (0)), | |
6729 | ||
6730 | __NOEXPR, | |
6731 | ||
6732 | __YESSTR, | |
6733 | ||
6734 | ||
6735 | ||
6736 | __NOSTR, | |
6737 | ||
6738 | ||
6739 | ||
6740 | _NL_MESSAGES_CODESET, | |
6741 | _NL_NUM_LC_MESSAGES, | |
6742 | ||
6743 | _NL_PAPER_HEIGHT = (((__LC_PAPER) << 16) | (0)), | |
6744 | _NL_PAPER_WIDTH, | |
6745 | _NL_PAPER_CODESET, | |
6746 | _NL_NUM_LC_PAPER, | |
6747 | ||
6748 | _NL_NAME_NAME_FMT = (((__LC_NAME) << 16) | (0)), | |
6749 | _NL_NAME_NAME_GEN, | |
6750 | _NL_NAME_NAME_MR, | |
6751 | _NL_NAME_NAME_MRS, | |
6752 | _NL_NAME_NAME_MISS, | |
6753 | _NL_NAME_NAME_MS, | |
6754 | _NL_NAME_CODESET, | |
6755 | _NL_NUM_LC_NAME, | |
6756 | ||
6757 | _NL_ADDRESS_POSTAL_FMT = (((__LC_ADDRESS) << 16) | (0)), | |
6758 | _NL_ADDRESS_COUNTRY_NAME, | |
6759 | _NL_ADDRESS_COUNTRY_POST, | |
6760 | _NL_ADDRESS_COUNTRY_AB2, | |
6761 | _NL_ADDRESS_COUNTRY_AB3, | |
6762 | _NL_ADDRESS_COUNTRY_CAR, | |
6763 | _NL_ADDRESS_COUNTRY_NUM, | |
6764 | _NL_ADDRESS_COUNTRY_ISBN, | |
6765 | _NL_ADDRESS_LANG_NAME, | |
6766 | _NL_ADDRESS_LANG_AB, | |
6767 | _NL_ADDRESS_LANG_TERM, | |
6768 | _NL_ADDRESS_LANG_LIB, | |
6769 | _NL_ADDRESS_CODESET, | |
6770 | _NL_NUM_LC_ADDRESS, | |
6771 | ||
6772 | _NL_TELEPHONE_TEL_INT_FMT = (((__LC_TELEPHONE) << 16) | (0)), | |
6773 | _NL_TELEPHONE_TEL_DOM_FMT, | |
6774 | _NL_TELEPHONE_INT_SELECT, | |
6775 | _NL_TELEPHONE_INT_PREFIX, | |
6776 | _NL_TELEPHONE_CODESET, | |
6777 | _NL_NUM_LC_TELEPHONE, | |
6778 | ||
6779 | _NL_MEASUREMENT_MEASUREMENT = (((__LC_MEASUREMENT) << 16) | (0)), | |
6780 | _NL_MEASUREMENT_CODESET, | |
6781 | _NL_NUM_LC_MEASUREMENT, | |
6782 | ||
6783 | _NL_IDENTIFICATION_TITLE = (((__LC_IDENTIFICATION) << 16) | (0)), | |
6784 | _NL_IDENTIFICATION_SOURCE, | |
6785 | _NL_IDENTIFICATION_ADDRESS, | |
6786 | _NL_IDENTIFICATION_CONTACT, | |
6787 | _NL_IDENTIFICATION_EMAIL, | |
6788 | _NL_IDENTIFICATION_TEL, | |
6789 | _NL_IDENTIFICATION_FAX, | |
6790 | _NL_IDENTIFICATION_LANGUAGE, | |
6791 | _NL_IDENTIFICATION_TERRITORY, | |
6792 | _NL_IDENTIFICATION_AUDIENCE, | |
6793 | _NL_IDENTIFICATION_APPLICATION, | |
6794 | _NL_IDENTIFICATION_ABBREVIATION, | |
6795 | _NL_IDENTIFICATION_REVISION, | |
6796 | _NL_IDENTIFICATION_DATE, | |
6797 | _NL_IDENTIFICATION_CATEGORY, | |
6798 | _NL_IDENTIFICATION_CODESET, | |
6799 | _NL_NUM_LC_IDENTIFICATION, | |
6800 | ||
6801 | ||
6802 | _NL_NUM | |
6803 | }; | |
6804 | # 582 "/usr/include/gentoo-multilib/amd64/langinfo.h" 3 4 | |
6805 | extern char *nl_langinfo (nl_item __item) throw (); | |
6806 | ||
6807 | ||
6808 | ||
6809 | ||
6810 | ||
6811 | ||
6812 | ||
6813 | # 1 "/usr/include/xlocale.h" 1 3 4 | |
6814 | # 591 "/usr/include/gentoo-multilib/amd64/langinfo.h" 2 3 4 | |
6815 | ||
6816 | ||
6817 | extern char *nl_langinfo_l (nl_item __item, __locale_t l); | |
6818 | ||
6819 | ||
6820 | } | |
6821 | # 9 "/usr/include/langinfo.h" 2 3 4 | |
6822 | # 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/c++locale.h" 2 3 | |
6823 | # 1 "/usr/include/iconv.h" 1 3 4 | |
6824 | ||
6825 | ||
6826 | ||
6827 | ||
6828 | ||
6829 | ||
6830 | ||
6831 | # 1 "/usr/include/gentoo-multilib/amd64/iconv.h" 1 3 4 | |
6832 | # 22 "/usr/include/gentoo-multilib/amd64/iconv.h" 3 4 | |
6833 | # 1 "/usr/include/features.h" 1 3 4 | |
6834 | # 23 "/usr/include/gentoo-multilib/amd64/iconv.h" 2 3 4 | |
6835 | ||
6836 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 | |
6837 | # 25 "/usr/include/gentoo-multilib/amd64/iconv.h" 2 3 4 | |
6838 | ||
6839 | ||
6840 | extern "C" { | |
6841 | ||
6842 | ||
6843 | typedef void *iconv_t; | |
6844 | ||
6845 | ||
6846 | ||
6847 | ||
6848 | ||
6849 | ||
6850 | ||
6851 | extern iconv_t iconv_open (__const char *__tocode, __const char *__fromcode); | |
6852 | ||
6853 | ||
6854 | ||
6855 | ||
6856 | extern size_t iconv (iconv_t __cd, char **__restrict __inbuf, | |
6857 | size_t *__restrict __inbytesleft, | |
6858 | char **__restrict __outbuf, | |
6859 | size_t *__restrict __outbytesleft); | |
6860 | ||
6861 | ||
6862 | ||
6863 | ||
6864 | ||
6865 | extern int iconv_close (iconv_t __cd); | |
6866 | ||
6867 | } | |
6868 | # 9 "/usr/include/iconv.h" 2 3 4 | |
6869 | # 46 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/c++locale.h" 2 3 | |
6870 | # 1 "/usr/include/libintl.h" 1 3 4 | |
6871 | ||
6872 | ||
6873 | ||
6874 | ||
6875 | ||
6876 | ||
6877 | ||
6878 | # 1 "/usr/include/gentoo-multilib/amd64/libintl.h" 1 3 4 | |
6879 | # 24 "/usr/include/gentoo-multilib/amd64/libintl.h" 3 4 | |
6880 | # 1 "/usr/include/features.h" 1 3 4 | |
6881 | # 25 "/usr/include/gentoo-multilib/amd64/libintl.h" 2 3 4 | |
6882 | # 35 "/usr/include/gentoo-multilib/amd64/libintl.h" 3 4 | |
6883 | extern "C" { | |
6884 | ||
6885 | ||
6886 | ||
6887 | ||
6888 | extern char *gettext (__const char *__msgid) | |
6889 | throw () __attribute__ ((__format_arg__ (1))); | |
6890 | ||
6891 | ||
6892 | ||
6893 | extern char *dgettext (__const char *__domainname, __const char *__msgid) | |
6894 | throw () __attribute__ ((__format_arg__ (2))); | |
6895 | extern char *__dgettext (__const char *__domainname, __const char *__msgid) | |
6896 | throw () __attribute__ ((__format_arg__ (2))); | |
6897 | ||
6898 | ||
6899 | ||
6900 | extern char *dcgettext (__const char *__domainname, | |
6901 | __const char *__msgid, int __category) | |
6902 | throw () __attribute__ ((__format_arg__ (2))); | |
6903 | extern char *__dcgettext (__const char *__domainname, | |
6904 | __const char *__msgid, int __category) | |
6905 | throw () __attribute__ ((__format_arg__ (2))); | |
6906 | ||
6907 | ||
6908 | ||
6909 | ||
6910 | extern char *ngettext (__const char *__msgid1, __const char *__msgid2, | |
6911 | unsigned long int __n) | |
6912 | throw () __attribute__ ((__format_arg__ (1))) __attribute__ ((__format_arg__ (2))); | |
6913 | ||
6914 | ||
6915 | ||
6916 | extern char *dngettext (__const char *__domainname, __const char *__msgid1, | |
6917 | __const char *__msgid2, unsigned long int __n) | |
6918 | throw () __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); | |
6919 | ||
6920 | ||
6921 | ||
6922 | extern char *dcngettext (__const char *__domainname, __const char *__msgid1, | |
6923 | __const char *__msgid2, unsigned long int __n, | |
6924 | int __category) | |
6925 | throw () __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); | |
6926 | ||
6927 | ||
6928 | ||
6929 | ||
6930 | ||
6931 | extern char *textdomain (__const char *__domainname) throw (); | |
6932 | ||
6933 | ||
6934 | ||
6935 | extern char *bindtextdomain (__const char *__domainname, | |
6936 | __const char *__dirname) throw (); | |
6937 | ||
6938 | ||
6939 | ||
6940 | extern char *bind_textdomain_codeset (__const char *__domainname, | |
6941 | __const char *__codeset) throw (); | |
6942 | # 122 "/usr/include/gentoo-multilib/amd64/libintl.h" 3 4 | |
6943 | } | |
6944 | # 9 "/usr/include/libintl.h" 2 3 4 | |
6945 | # 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/c++locale.h" 2 3 | |
6946 | ||
6947 | ||
6948 | ||
6949 | ||
6950 | ||
6951 | ||
6952 | namespace __gnu_cxx | |
6953 | { | |
6954 | extern "C" __typeof(uselocale) __uselocale; | |
6955 | } | |
6956 | ||
6957 | ||
6958 | namespace std | |
6959 | { | |
6960 | typedef __locale_t __c_locale; | |
6961 | ||
6962 | ||
6963 | ||
6964 | ||
6965 | ||
6966 | template<typename _Tv> | |
6967 | int | |
6968 | __convert_from_v(char* __out, | |
6969 | const int __size __attribute__ ((__unused__)), | |
6970 | const char* __fmt, | |
6971 | ||
6972 | _Tv __v, const __c_locale& __cloc, int __prec) | |
6973 | { | |
6974 | __c_locale __old = __gnu_cxx::__uselocale(__cloc); | |
6975 | # 86 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/c++locale.h" 3 | |
6976 | const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v); | |
6977 | ||
6978 | ||
6979 | ||
6980 | ||
6981 | ||
6982 | __gnu_cxx::__uselocale(__old); | |
6983 | ||
6984 | ||
6985 | ||
6986 | ||
6987 | return __ret; | |
6988 | } | |
6989 | } | |
6990 | # 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/iosfwd" 2 3 | |
6991 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/c++io.h" 1 3 | |
6992 | # 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/c++io.h" 3 | |
6993 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr.h" 1 3 | |
6994 | # 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr.h" 3 | |
6995 | #pragma GCC visibility push(default) | |
6996 | # 114 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr.h" 3 | |
6997 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 1 3 | |
6998 | # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 3 | |
6999 | # 1 "/usr/include/pthread.h" 1 3 4 | |
7000 | ||
7001 | ||
7002 | ||
7003 | ||
7004 | ||
7005 | ||
7006 | ||
7007 | # 1 "/usr/include/gentoo-multilib/amd64/pthread.h" 1 3 4 | |
7008 | # 22 "/usr/include/gentoo-multilib/amd64/pthread.h" 3 4 | |
7009 | # 1 "/usr/include/features.h" 1 3 4 | |
7010 | # 23 "/usr/include/gentoo-multilib/amd64/pthread.h" 2 3 4 | |
7011 | # 1 "/usr/include/sched.h" 1 3 4 | |
7012 | ||
7013 | ||
7014 | ||
7015 | ||
7016 | ||
7017 | ||
7018 | ||
7019 | # 1 "/usr/include/gentoo-multilib/amd64/sched.h" 1 3 4 | |
7020 | # 23 "/usr/include/gentoo-multilib/amd64/sched.h" 3 4 | |
7021 | # 1 "/usr/include/features.h" 1 3 4 | |
7022 | # 24 "/usr/include/gentoo-multilib/amd64/sched.h" 2 3 4 | |
7023 | ||
7024 | ||
7025 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
7026 | # 27 "/usr/include/gentoo-multilib/amd64/sched.h" 2 3 4 | |
7027 | ||
7028 | ||
7029 | # 1 "/usr/include/time.h" 1 3 4 | |
7030 | ||
7031 | ||
7032 | ||
7033 | ||
7034 | ||
7035 | ||
7036 | ||
7037 | # 1 "/usr/include/gentoo-multilib/amd64/time.h" 1 3 4 | |
7038 | # 9 "/usr/include/time.h" 2 3 4 | |
7039 | # 30 "/usr/include/gentoo-multilib/amd64/sched.h" 2 3 4 | |
7040 | ||
7041 | ||
7042 | # 1 "/usr/include/bits/sched.h" 1 3 4 | |
7043 | ||
7044 | ||
7045 | ||
7046 | ||
7047 | ||
7048 | ||
7049 | ||
7050 | # 1 "/usr/include/gentoo-multilib/amd64/bits/sched.h" 1 3 4 | |
7051 | # 65 "/usr/include/gentoo-multilib/amd64/bits/sched.h" 3 4 | |
7052 | struct sched_param | |
7053 | { | |
7054 | int __sched_priority; | |
7055 | }; | |
7056 | ||
7057 | extern "C" { | |
7058 | ||
7059 | ||
7060 | ||
7061 | extern int clone (int (*__fn) (void *__arg), void *__child_stack, | |
7062 | int __flags, void *__arg, ...) throw (); | |
7063 | ||
7064 | ||
7065 | extern int unshare (int __flags) throw (); | |
7066 | ||
7067 | ||
7068 | } | |
7069 | ||
7070 | ||
7071 | ||
7072 | ||
7073 | ||
7074 | ||
7075 | ||
7076 | struct __sched_param | |
7077 | { | |
7078 | int __sched_priority; | |
7079 | }; | |
7080 | # 104 "/usr/include/gentoo-multilib/amd64/bits/sched.h" 3 4 | |
7081 | typedef unsigned long int __cpu_mask; | |
7082 | ||
7083 | ||
7084 | ||
7085 | ||
7086 | ||
7087 | ||
7088 | typedef struct | |
7089 | { | |
7090 | __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; | |
7091 | } cpu_set_t; | |
7092 | # 9 "/usr/include/bits/sched.h" 2 3 4 | |
7093 | # 33 "/usr/include/gentoo-multilib/amd64/sched.h" 2 3 4 | |
7094 | ||
7095 | ||
7096 | ||
7097 | ||
7098 | extern "C" { | |
7099 | ||
7100 | ||
7101 | extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param) | |
7102 | throw (); | |
7103 | ||
7104 | ||
7105 | extern int sched_getparam (__pid_t __pid, struct sched_param *__param) throw (); | |
7106 | ||
7107 | ||
7108 | extern int sched_setscheduler (__pid_t __pid, int __policy, | |
7109 | __const struct sched_param *__param) throw (); | |
7110 | ||
7111 | ||
7112 | extern int sched_getscheduler (__pid_t __pid) throw (); | |
7113 | ||
7114 | ||
7115 | extern int sched_yield (void) throw (); | |
7116 | ||
7117 | ||
7118 | extern int sched_get_priority_max (int __algorithm) throw (); | |
7119 | ||
7120 | ||
7121 | extern int sched_get_priority_min (int __algorithm) throw (); | |
7122 | ||
7123 | ||
7124 | extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) throw (); | |
7125 | # 76 "/usr/include/gentoo-multilib/amd64/sched.h" 3 4 | |
7126 | extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, | |
7127 | __const cpu_set_t *__cpuset) throw (); | |
7128 | ||
7129 | ||
7130 | extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, | |
7131 | cpu_set_t *__cpuset) throw (); | |
7132 | ||
7133 | ||
7134 | } | |
7135 | # 9 "/usr/include/sched.h" 2 3 4 | |
7136 | # 24 "/usr/include/gentoo-multilib/amd64/pthread.h" 2 3 4 | |
7137 | # 1 "/usr/include/time.h" 1 3 4 | |
7138 | ||
7139 | ||
7140 | ||
7141 | ||
7142 | ||
7143 | ||
7144 | ||
7145 | # 1 "/usr/include/gentoo-multilib/amd64/time.h" 1 3 4 | |
7146 | # 29 "/usr/include/gentoo-multilib/amd64/time.h" 3 4 | |
7147 | # 1 "/usr/include/features.h" 1 3 4 | |
7148 | # 30 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4 | |
7149 | ||
7150 | extern "C" { | |
7151 | ||
7152 | ||
7153 | ||
7154 | ||
7155 | ||
7156 | ||
7157 | ||
7158 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 | |
7159 | # 40 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4 | |
7160 | ||
7161 | ||
7162 | ||
7163 | # 1 "/usr/include/bits/time.h" 1 3 4 | |
7164 | ||
7165 | ||
7166 | ||
7167 | ||
7168 | ||
7169 | ||
7170 | ||
7171 | # 1 "/usr/include/gentoo-multilib/amd64/bits/time.h" 1 3 4 | |
7172 | # 9 "/usr/include/bits/time.h" 2 3 4 | |
7173 | # 44 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4 | |
7174 | # 132 "/usr/include/gentoo-multilib/amd64/time.h" 3 4 | |
7175 | ||
7176 | ||
7177 | struct tm | |
7178 | { | |
7179 | int tm_sec; | |
7180 | int tm_min; | |
7181 | int tm_hour; | |
7182 | int tm_mday; | |
7183 | int tm_mon; | |
7184 | int tm_year; | |
7185 | int tm_wday; | |
7186 | int tm_yday; | |
7187 | int tm_isdst; | |
7188 | ||
7189 | ||
7190 | long int tm_gmtoff; | |
7191 | __const char *tm_zone; | |
7192 | ||
7193 | ||
7194 | ||
7195 | ||
7196 | }; | |
7197 | ||
7198 | ||
7199 | ||
7200 | ||
7201 | ||
7202 | ||
7203 | ||
7204 | ||
7205 | struct itimerspec | |
7206 | { | |
7207 | struct timespec it_interval; | |
7208 | struct timespec it_value; | |
7209 | }; | |
7210 | ||
7211 | ||
7212 | struct sigevent; | |
7213 | # 181 "/usr/include/gentoo-multilib/amd64/time.h" 3 4 | |
7214 | ||
7215 | ||
7216 | ||
7217 | extern clock_t clock (void) throw (); | |
7218 | ||
7219 | ||
7220 | extern time_t time (time_t *__timer) throw (); | |
7221 | ||
7222 | ||
7223 | extern double difftime (time_t __time1, time_t __time0) | |
7224 | throw () __attribute__ ((__const__)); | |
7225 | ||
7226 | ||
7227 | extern time_t mktime (struct tm *__tp) throw (); | |
7228 | ||
7229 | ||
7230 | ||
7231 | ||
7232 | ||
7233 | extern size_t strftime (char *__restrict __s, size_t __maxsize, | |
7234 | __const char *__restrict __format, | |
7235 | __const struct tm *__restrict __tp) throw (); | |
7236 | ||
7237 | ||
7238 | ||
7239 | ||
7240 | ||
7241 | extern char *strptime (__const char *__restrict __s, | |
7242 | __const char *__restrict __fmt, struct tm *__tp) | |
7243 | throw (); | |
7244 | ||
7245 | ||
7246 | ||
7247 | ||
7248 | ||
7249 | # 1 "/usr/include/xlocale.h" 1 3 4 | |
7250 | # 217 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4 | |
7251 | ||
7252 | extern size_t strftime_l (char *__restrict __s, size_t __maxsize, | |
7253 | __const char *__restrict __format, | |
7254 | __const struct tm *__restrict __tp, | |
7255 | __locale_t __loc) throw (); | |
7256 | ||
7257 | extern char *strptime_l (__const char *__restrict __s, | |
7258 | __const char *__restrict __fmt, struct tm *__tp, | |
7259 | __locale_t __loc) throw (); | |
7260 | ||
7261 | ||
7262 | ||
7263 | ||
7264 | ||
7265 | ||
7266 | extern struct tm *gmtime (__const time_t *__timer) throw (); | |
7267 | ||
7268 | ||
7269 | ||
7270 | extern struct tm *localtime (__const time_t *__timer) throw (); | |
7271 | ||
7272 | ||
7273 | ||
7274 | ||
7275 | ||
7276 | extern struct tm *gmtime_r (__const time_t *__restrict __timer, | |
7277 | struct tm *__restrict __tp) throw (); | |
7278 | ||
7279 | ||
7280 | ||
7281 | extern struct tm *localtime_r (__const time_t *__restrict __timer, | |
7282 | struct tm *__restrict __tp) throw (); | |
7283 | ||
7284 | ||
7285 | ||
7286 | ||
7287 | ||
7288 | extern char *asctime (__const struct tm *__tp) throw (); | |
7289 | ||
7290 | ||
7291 | extern char *ctime (__const time_t *__timer) throw (); | |
7292 | ||
7293 | ||
7294 | ||
7295 | ||
7296 | ||
7297 | ||
7298 | ||
7299 | extern char *asctime_r (__const struct tm *__restrict __tp, | |
7300 | char *__restrict __buf) throw (); | |
7301 | ||
7302 | ||
7303 | extern char *ctime_r (__const time_t *__restrict __timer, | |
7304 | char *__restrict __buf) throw (); | |
7305 | ||
7306 | ||
7307 | ||
7308 | ||
7309 | extern char *__tzname[2]; | |
7310 | extern int __daylight; | |
7311 | extern long int __timezone; | |
7312 | ||
7313 | ||
7314 | ||
7315 | ||
7316 | extern char *tzname[2]; | |
7317 | ||
7318 | ||
7319 | ||
7320 | extern void tzset (void) throw (); | |
7321 | ||
7322 | ||
7323 | ||
7324 | extern int daylight; | |
7325 | extern long int timezone; | |
7326 | ||
7327 | ||
7328 | ||
7329 | ||
7330 | ||
7331 | extern int stime (__const time_t *__when) throw (); | |
7332 | # 312 "/usr/include/gentoo-multilib/amd64/time.h" 3 4 | |
7333 | extern time_t timegm (struct tm *__tp) throw (); | |
7334 | ||
7335 | ||
7336 | extern time_t timelocal (struct tm *__tp) throw (); | |
7337 | ||
7338 | ||
7339 | extern int dysize (int __year) throw () __attribute__ ((__const__)); | |
7340 | # 327 "/usr/include/gentoo-multilib/amd64/time.h" 3 4 | |
7341 | extern int nanosleep (__const struct timespec *__requested_time, | |
7342 | struct timespec *__remaining); | |
7343 | ||
7344 | ||
7345 | ||
7346 | extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw (); | |
7347 | ||
7348 | ||
7349 | extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw (); | |
7350 | ||
7351 | ||
7352 | extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) | |
7353 | throw (); | |
7354 | ||
7355 | ||
7356 | ||
7357 | ||
7358 | ||
7359 | ||
7360 | extern int clock_nanosleep (clockid_t __clock_id, int __flags, | |
7361 | __const struct timespec *__req, | |
7362 | struct timespec *__rem); | |
7363 | ||
7364 | ||
7365 | extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw (); | |
7366 | ||
7367 | ||
7368 | ||
7369 | ||
7370 | extern int timer_create (clockid_t __clock_id, | |
7371 | struct sigevent *__restrict __evp, | |
7372 | timer_t *__restrict __timerid) throw (); | |
7373 | ||
7374 | ||
7375 | extern int timer_delete (timer_t __timerid) throw (); | |
7376 | ||
7377 | ||
7378 | extern int timer_settime (timer_t __timerid, int __flags, | |
7379 | __const struct itimerspec *__restrict __value, | |
7380 | struct itimerspec *__restrict __ovalue) throw (); | |
7381 | ||
7382 | ||
7383 | extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) | |
7384 | throw (); | |
7385 | ||
7386 | ||
7387 | extern int timer_getoverrun (timer_t __timerid) throw (); | |
7388 | # 389 "/usr/include/gentoo-multilib/amd64/time.h" 3 4 | |
7389 | extern int getdate_err; | |
7390 | # 398 "/usr/include/gentoo-multilib/amd64/time.h" 3 4 | |
7391 | extern struct tm *getdate (__const char *__string); | |
7392 | # 412 "/usr/include/gentoo-multilib/amd64/time.h" 3 4 | |
7393 | extern int getdate_r (__const char *__restrict __string, | |
7394 | struct tm *__restrict __resbufp); | |
7395 | ||
7396 | ||
7397 | } | |
7398 | # 9 "/usr/include/time.h" 2 3 4 | |
7399 | # 25 "/usr/include/gentoo-multilib/amd64/pthread.h" 2 3 4 | |
7400 | ||
7401 | ||
7402 | # 1 "/usr/include/signal.h" 1 3 4 | |
7403 | ||
7404 | ||
7405 | ||
7406 | ||
7407 | ||
7408 | ||
7409 | ||
7410 | # 1 "/usr/include/gentoo-multilib/amd64/signal.h" 1 3 4 | |
7411 | # 29 "/usr/include/gentoo-multilib/amd64/signal.h" 3 4 | |
7412 | # 1 "/usr/include/features.h" 1 3 4 | |
7413 | # 30 "/usr/include/gentoo-multilib/amd64/signal.h" 2 3 4 | |
7414 | ||
7415 | extern "C" { | |
7416 | ||
7417 | # 1 "/usr/include/bits/sigset.h" 1 3 4 | |
7418 | ||
7419 | ||
7420 | ||
7421 | ||
7422 | ||
7423 | ||
7424 | ||
7425 | # 1 "/usr/include/gentoo-multilib/amd64/bits/sigset.h" 1 3 4 | |
7426 | # 9 "/usr/include/bits/sigset.h" 2 3 4 | |
7427 | # 34 "/usr/include/gentoo-multilib/amd64/signal.h" 2 3 4 | |
7428 | # 400 "/usr/include/gentoo-multilib/amd64/signal.h" 3 4 | |
7429 | } | |
7430 | # 9 "/usr/include/signal.h" 2 3 4 | |
7431 | # 28 "/usr/include/gentoo-multilib/amd64/pthread.h" 2 3 4 | |
7432 | # 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 | |
7433 | # 29 "/usr/include/gentoo-multilib/amd64/pthread.h" 2 3 4 | |
7434 | # 1 "/usr/include/bits/setjmp.h" 1 3 4 | |
7435 | ||
7436 | ||
7437 | ||
7438 | ||
7439 | ||
7440 | ||
7441 | ||
7442 | # 1 "/usr/include/gentoo-multilib/amd64/bits/setjmp.h" 1 3 4 | |
7443 | # 27 "/usr/include/gentoo-multilib/amd64/bits/setjmp.h" 3 4 | |
7444 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
7445 | ||
7446 | ||
7447 | ||
7448 | ||
7449 | ||
7450 | ||
7451 | ||
7452 | # 1 "/usr/include/gentoo-multilib/amd64/bits/wordsize.h" 1 3 4 | |
7453 | # 9 "/usr/include/bits/wordsize.h" 2 3 4 | |
7454 | # 28 "/usr/include/gentoo-multilib/amd64/bits/setjmp.h" 2 3 4 | |
7455 | ||
7456 | ||
7457 | ||
7458 | ||
7459 | typedef long int __jmp_buf[8]; | |
7460 | # 9 "/usr/include/bits/setjmp.h" 2 3 4 | |
7461 | # 30 "/usr/include/gentoo-multilib/amd64/pthread.h" 2 3 4 | |
7462 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
7463 | ||
7464 | ||
7465 | ||
7466 | ||
7467 | ||
7468 | ||
7469 | ||
7470 | # 1 "/usr/include/gentoo-multilib/amd64/bits/wordsize.h" 1 3 4 | |
7471 | # 9 "/usr/include/bits/wordsize.h" 2 3 4 | |
7472 | # 31 "/usr/include/gentoo-multilib/amd64/pthread.h" 2 3 4 | |
7473 | ||
7474 | ||
7475 | ||
7476 | enum | |
7477 | { | |
7478 | PTHREAD_CREATE_JOINABLE, | |
7479 | ||
7480 | PTHREAD_CREATE_DETACHED | |
7481 | ||
7482 | }; | |
7483 | ||
7484 | ||
7485 | ||
7486 | enum | |
7487 | { | |
7488 | PTHREAD_MUTEX_TIMED_NP, | |
7489 | PTHREAD_MUTEX_RECURSIVE_NP, | |
7490 | PTHREAD_MUTEX_ERRORCHECK_NP, | |
7491 | PTHREAD_MUTEX_ADAPTIVE_NP | |
7492 | ||
7493 | , | |
7494 | PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, | |
7495 | PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, | |
7496 | PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, | |
7497 | PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL | |
7498 | ||
7499 | ||
7500 | ||
7501 | , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP | |
7502 | ||
7503 | }; | |
7504 | ||
7505 | ||
7506 | ||
7507 | ||
7508 | enum | |
7509 | { | |
7510 | PTHREAD_MUTEX_STALLED_NP, | |
7511 | PTHREAD_MUTEX_ROBUST_NP | |
7512 | }; | |
7513 | ||
7514 | ||
7515 | ||
7516 | ||
7517 | ||
7518 | enum | |
7519 | { | |
7520 | PTHREAD_PRIO_NONE, | |
7521 | PTHREAD_PRIO_INHERIT, | |
7522 | PTHREAD_PRIO_PROTECT | |
7523 | }; | |
7524 | # 113 "/usr/include/gentoo-multilib/amd64/pthread.h" 3 4 | |
7525 | enum | |
7526 | { | |
7527 | PTHREAD_RWLOCK_PREFER_READER_NP, | |
7528 | PTHREAD_RWLOCK_PREFER_WRITER_NP, | |
7529 | PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, | |
7530 | PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP | |
7531 | }; | |
7532 | # 143 "/usr/include/gentoo-multilib/amd64/pthread.h" 3 4 | |
7533 | enum | |
7534 | { | |
7535 | PTHREAD_INHERIT_SCHED, | |
7536 | ||
7537 | PTHREAD_EXPLICIT_SCHED | |
7538 | ||
7539 | }; | |
7540 | ||
7541 | ||
7542 | ||
7543 | enum | |
7544 | { | |
7545 | PTHREAD_SCOPE_SYSTEM, | |
7546 | ||
7547 | PTHREAD_SCOPE_PROCESS | |
7548 | ||
7549 | }; | |
7550 | ||
7551 | ||
7552 | ||
7553 | enum | |
7554 | { | |
7555 | PTHREAD_PROCESS_PRIVATE, | |
7556 | ||
7557 | PTHREAD_PROCESS_SHARED | |
7558 | ||
7559 | }; | |
7560 | # 178 "/usr/include/gentoo-multilib/amd64/pthread.h" 3 4 | |
7561 | struct _pthread_cleanup_buffer | |
7562 | { | |
7563 | void (*__routine) (void *); | |
7564 | void *__arg; | |
7565 | int __canceltype; | |
7566 | struct _pthread_cleanup_buffer *__prev; | |
7567 | }; | |
7568 | ||
7569 | ||
7570 | enum | |
7571 | { | |
7572 | PTHREAD_CANCEL_ENABLE, | |
7573 | ||
7574 | PTHREAD_CANCEL_DISABLE | |
7575 | ||
7576 | }; | |
7577 | enum | |
7578 | { | |
7579 | PTHREAD_CANCEL_DEFERRED, | |
7580 | ||
7581 | PTHREAD_CANCEL_ASYNCHRONOUS | |
7582 | ||
7583 | }; | |
7584 | # 216 "/usr/include/gentoo-multilib/amd64/pthread.h" 3 4 | |
7585 | extern "C" { | |
7586 | ||
7587 | ||
7588 | ||
7589 | ||
7590 | extern int pthread_create (pthread_t *__restrict __newthread, | |
7591 | __const pthread_attr_t *__restrict __attr, | |
7592 | void *(*__start_routine) (void *), | |
7593 | void *__restrict __arg) throw () __attribute__ ((__nonnull__ (1, 3))); | |
7594 | ||
7595 | ||
7596 | ||
7597 | ||
7598 | ||
7599 | extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); | |
7600 | ||
7601 | ||
7602 | ||
7603 | ||
7604 | ||
7605 | ||
7606 | ||
7607 | extern int pthread_join (pthread_t __th, void **__thread_return); | |
7608 | ||
7609 | ||
7610 | ||
7611 | ||
7612 | extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) throw (); | |
7613 | ||
7614 | ||
7615 | ||
7616 | ||
7617 | ||
7618 | ||
7619 | ||
7620 | extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, | |
7621 | __const struct timespec *__abstime); | |
7622 | ||
7623 | ||
7624 | ||
7625 | ||
7626 | ||
7627 | ||
7628 | extern int pthread_detach (pthread_t __th) throw (); | |
7629 | ||
7630 | ||
7631 | ||
7632 | extern pthread_t pthread_self (void) throw () __attribute__ ((__const__)); | |
7633 | ||
7634 | ||
7635 | extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) throw (); | |
7636 | ||
7637 | ||
7638 | ||
7639 | ||
7640 | ||
7641 | ||
7642 | ||
7643 | extern int pthread_attr_init (pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); | |
7644 | ||
7645 | ||
7646 | extern int pthread_attr_destroy (pthread_attr_t *__attr) | |
7647 | throw () __attribute__ ((__nonnull__ (1))); | |
7648 | ||
7649 | ||
7650 | extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, | |
7651 | int *__detachstate) | |
7652 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
7653 | ||
7654 | ||
7655 | extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, | |
7656 | int __detachstate) | |
7657 | throw () __attribute__ ((__nonnull__ (1))); | |
7658 | ||
7659 | ||
7660 | ||
7661 | extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr, | |
7662 | size_t *__guardsize) | |
7663 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
7664 | ||
7665 | ||
7666 | extern int pthread_attr_setguardsize (pthread_attr_t *__attr, | |
7667 | size_t __guardsize) | |
7668 | throw () __attribute__ ((__nonnull__ (1))); | |
7669 | ||
7670 | ||
7671 | ||
7672 | extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict | |
7673 | __attr, | |
7674 | struct sched_param *__restrict __param) | |
7675 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
7676 | ||
7677 | ||
7678 | extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, | |
7679 | __const struct sched_param *__restrict | |
7680 | __param) throw () __attribute__ ((__nonnull__ (1, 2))); | |
7681 | ||
7682 | ||
7683 | extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict | |
7684 | __attr, int *__restrict __policy) | |
7685 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
7686 | ||
7687 | ||
7688 | extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) | |
7689 | throw () __attribute__ ((__nonnull__ (1))); | |
7690 | ||
7691 | ||
7692 | extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict | |
7693 | __attr, int *__restrict __inherit) | |
7694 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
7695 | ||
7696 | ||
7697 | extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, | |
7698 | int __inherit) | |
7699 | throw () __attribute__ ((__nonnull__ (1))); | |
7700 | ||
7701 | ||
7702 | ||
7703 | extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, | |
7704 | int *__restrict __scope) | |
7705 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
7706 | ||
7707 | ||
7708 | extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) | |
7709 | throw () __attribute__ ((__nonnull__ (1))); | |
7710 | ||
7711 | ||
7712 | extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict | |
7713 | __attr, void **__restrict __stackaddr) | |
7714 | throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__)); | |
7715 | ||
7716 | ||
7717 | ||
7718 | ||
7719 | ||
7720 | extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, | |
7721 | void *__stackaddr) | |
7722 | throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)); | |
7723 | ||
7724 | ||
7725 | extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict | |
7726 | __attr, size_t *__restrict __stacksize) | |
7727 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
7728 | ||
7729 | ||
7730 | ||
7731 | ||
7732 | extern int pthread_attr_setstacksize (pthread_attr_t *__attr, | |
7733 | size_t __stacksize) | |
7734 | throw () __attribute__ ((__nonnull__ (1))); | |
7735 | ||
7736 | ||
7737 | ||
7738 | extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, | |
7739 | void **__restrict __stackaddr, | |
7740 | size_t *__restrict __stacksize) | |
7741 | throw () __attribute__ ((__nonnull__ (1, 2, 3))); | |
7742 | ||
7743 | ||
7744 | ||
7745 | ||
7746 | extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, | |
7747 | size_t __stacksize) throw () __attribute__ ((__nonnull__ (1))); | |
7748 | ||
7749 | ||
7750 | ||
7751 | ||
7752 | ||
7753 | extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, | |
7754 | size_t __cpusetsize, | |
7755 | __const cpu_set_t *__cpuset) | |
7756 | throw () __attribute__ ((__nonnull__ (1, 3))); | |
7757 | ||
7758 | ||
7759 | ||
7760 | extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr, | |
7761 | size_t __cpusetsize, | |
7762 | cpu_set_t *__cpuset) | |
7763 | throw () __attribute__ ((__nonnull__ (1, 3))); | |
7764 | ||
7765 | ||
7766 | ||
7767 | ||
7768 | ||
7769 | extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) | |
7770 | throw () __attribute__ ((__nonnull__ (2))); | |
7771 | ||
7772 | ||
7773 | ||
7774 | ||
7775 | ||
7776 | ||
7777 | ||
7778 | extern int pthread_setschedparam (pthread_t __target_thread, int __policy, | |
7779 | __const struct sched_param *__param) | |
7780 | throw () __attribute__ ((__nonnull__ (3))); | |
7781 | ||
7782 | ||
7783 | extern int pthread_getschedparam (pthread_t __target_thread, | |
7784 | int *__restrict __policy, | |
7785 | struct sched_param *__restrict __param) | |
7786 | throw () __attribute__ ((__nonnull__ (2, 3))); | |
7787 | ||
7788 | ||
7789 | extern int pthread_setschedprio (pthread_t __target_thread, int __prio) | |
7790 | throw (); | |
7791 | ||
7792 | ||
7793 | ||
7794 | ||
7795 | extern int pthread_getconcurrency (void) throw (); | |
7796 | ||
7797 | ||
7798 | extern int pthread_setconcurrency (int __level) throw (); | |
7799 | ||
7800 | ||
7801 | ||
7802 | ||
7803 | ||
7804 | ||
7805 | ||
7806 | extern int pthread_yield (void) throw (); | |
7807 | ||
7808 | ||
7809 | ||
7810 | ||
7811 | extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, | |
7812 | __const cpu_set_t *__cpuset) | |
7813 | throw () __attribute__ ((__nonnull__ (3))); | |
7814 | ||
7815 | ||
7816 | extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, | |
7817 | cpu_set_t *__cpuset) | |
7818 | throw () __attribute__ ((__nonnull__ (3))); | |
7819 | # 462 "/usr/include/gentoo-multilib/amd64/pthread.h" 3 4 | |
7820 | extern int pthread_once (pthread_once_t *__once_control, | |
7821 | void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); | |
7822 | # 474 "/usr/include/gentoo-multilib/amd64/pthread.h" 3 4 | |
7823 | extern int pthread_setcancelstate (int __state, int *__oldstate); | |
7824 | ||
7825 | ||
7826 | ||
7827 | extern int pthread_setcanceltype (int __type, int *__oldtype); | |
7828 | ||
7829 | ||
7830 | extern int pthread_cancel (pthread_t __th); | |
7831 | ||
7832 | ||
7833 | ||
7834 | ||
7835 | extern void pthread_testcancel (void); | |
7836 | ||
7837 | ||
7838 | ||
7839 | ||
7840 | typedef struct | |
7841 | { | |
7842 | struct | |
7843 | { | |
7844 | __jmp_buf __cancel_jmp_buf; | |
7845 | int __mask_was_saved; | |
7846 | } __cancel_jmp_buf[1]; | |
7847 | void *__pad[4]; | |
7848 | } __pthread_unwind_buf_t __attribute__ ((__aligned__)); | |
7849 | # 508 "/usr/include/gentoo-multilib/amd64/pthread.h" 3 4 | |
7850 | struct __pthread_cleanup_frame | |
7851 | { | |
7852 | void (*__cancel_routine) (void *); | |
7853 | void *__cancel_arg; | |
7854 | int __do_it; | |
7855 | int __cancel_type; | |
7856 | }; | |
7857 | ||
7858 | ||
7859 | ||
7860 | ||
7861 | class __pthread_cleanup_class | |
7862 | { | |
7863 | void (*__cancel_routine) (void *); | |
7864 | void *__cancel_arg; | |
7865 | int __do_it; | |
7866 | int __cancel_type; | |
7867 | ||
7868 | public: | |
7869 | __pthread_cleanup_class (void (*__fct) (void *), void *__arg) | |
7870 | : __cancel_routine (__fct), __cancel_arg (__arg), __do_it (1) { } | |
7871 | ~__pthread_cleanup_class () { if (__do_it) __cancel_routine (__cancel_arg); } | |
7872 | void __setdoit (int __newval) { __do_it = __newval; } | |
7873 | void __defer () { pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, | |
7874 | &__cancel_type); } | |
7875 | void __restore () const { pthread_setcanceltype (__cancel_type, 0); } | |
7876 | }; | |
7877 | # 708 "/usr/include/gentoo-multilib/amd64/pthread.h" 3 4 | |
7878 | struct __jmp_buf_tag; | |
7879 | extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) throw (); | |
7880 | ||
7881 | ||
7882 | ||
7883 | ||
7884 | ||
7885 | extern int pthread_mutex_init (pthread_mutex_t *__mutex, | |
7886 | __const pthread_mutexattr_t *__mutexattr) | |
7887 | throw () __attribute__ ((__nonnull__ (1))); | |
7888 | ||
7889 | ||
7890 | extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) | |
7891 | throw () __attribute__ ((__nonnull__ (1))); | |
7892 | ||
7893 | ||
7894 | extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) | |
7895 | throw () __attribute__ ((__nonnull__ (1))); | |
7896 | ||
7897 | ||
7898 | extern int pthread_mutex_lock (pthread_mutex_t *__mutex) | |
7899 | throw () __attribute__ ((__nonnull__ (1))); | |
7900 | ||
7901 | ||
7902 | ||
7903 | extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, | |
7904 | __const struct timespec *__restrict | |
7905 | __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); | |
7906 | ||
7907 | ||
7908 | ||
7909 | extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) | |
7910 | throw () __attribute__ ((__nonnull__ (1))); | |
7911 | ||
7912 | ||
7913 | ||
7914 | ||
7915 | extern int pthread_mutex_getprioceiling (__const pthread_mutex_t * | |
7916 | __restrict __mutex, | |
7917 | int *__restrict __prioceiling) | |
7918 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
7919 | ||
7920 | ||
7921 | ||
7922 | extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, | |
7923 | int __prioceiling, | |
7924 | int *__restrict __old_ceiling) | |
7925 | throw () __attribute__ ((__nonnull__ (1, 3))); | |
7926 | ||
7927 | ||
7928 | ||
7929 | ||
7930 | ||
7931 | extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) | |
7932 | throw () __attribute__ ((__nonnull__ (1))); | |
7933 | ||
7934 | ||
7935 | ||
7936 | ||
7937 | ||
7938 | ||
7939 | ||
7940 | extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) | |
7941 | throw () __attribute__ ((__nonnull__ (1))); | |
7942 | ||
7943 | ||
7944 | extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) | |
7945 | throw () __attribute__ ((__nonnull__ (1))); | |
7946 | ||
7947 | ||
7948 | extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * | |
7949 | __restrict __attr, | |
7950 | int *__restrict __pshared) | |
7951 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
7952 | ||
7953 | ||
7954 | extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, | |
7955 | int __pshared) | |
7956 | throw () __attribute__ ((__nonnull__ (1))); | |
7957 | ||
7958 | ||
7959 | ||
7960 | extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict | |
7961 | __attr, int *__restrict __kind) | |
7962 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
7963 | ||
7964 | ||
7965 | ||
7966 | ||
7967 | extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) | |
7968 | throw () __attribute__ ((__nonnull__ (1))); | |
7969 | ||
7970 | ||
7971 | extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t * | |
7972 | __restrict __attr, | |
7973 | int *__restrict __protocol) | |
7974 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
7975 | ||
7976 | ||
7977 | ||
7978 | extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, | |
7979 | int __protocol) | |
7980 | throw () __attribute__ ((__nonnull__ (1))); | |
7981 | ||
7982 | ||
7983 | extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t * | |
7984 | __restrict __attr, | |
7985 | int *__restrict __prioceiling) | |
7986 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
7987 | ||
7988 | ||
7989 | extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, | |
7990 | int __prioceiling) | |
7991 | throw () __attribute__ ((__nonnull__ (1))); | |
7992 | ||
7993 | ||
7994 | ||
7995 | ||
7996 | extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr, | |
7997 | int *__robustness) | |
7998 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
7999 | ||
8000 | ||
8001 | extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, | |
8002 | int __robustness) | |
8003 | throw () __attribute__ ((__nonnull__ (1))); | |
8004 | # 842 "/usr/include/gentoo-multilib/amd64/pthread.h" 3 4 | |
8005 | extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, | |
8006 | __const pthread_rwlockattr_t *__restrict | |
8007 | __attr) throw () __attribute__ ((__nonnull__ (1))); | |
8008 | ||
8009 | ||
8010 | extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) | |
8011 | throw () __attribute__ ((__nonnull__ (1))); | |
8012 | ||
8013 | ||
8014 | extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) | |
8015 | throw () __attribute__ ((__nonnull__ (1))); | |
8016 | ||
8017 | ||
8018 | extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) | |
8019 | throw () __attribute__ ((__nonnull__ (1))); | |
8020 | ||
8021 | ||
8022 | ||
8023 | extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, | |
8024 | __const struct timespec *__restrict | |
8025 | __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); | |
8026 | ||
8027 | ||
8028 | ||
8029 | extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) | |
8030 | throw () __attribute__ ((__nonnull__ (1))); | |
8031 | ||
8032 | ||
8033 | extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) | |
8034 | throw () __attribute__ ((__nonnull__ (1))); | |
8035 | ||
8036 | ||
8037 | ||
8038 | extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, | |
8039 | __const struct timespec *__restrict | |
8040 | __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); | |
8041 | ||
8042 | ||
8043 | ||
8044 | extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) | |
8045 | throw () __attribute__ ((__nonnull__ (1))); | |
8046 | ||
8047 | ||
8048 | ||
8049 | ||
8050 | ||
8051 | extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) | |
8052 | throw () __attribute__ ((__nonnull__ (1))); | |
8053 | ||
8054 | ||
8055 | extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) | |
8056 | throw () __attribute__ ((__nonnull__ (1))); | |
8057 | ||
8058 | ||
8059 | extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * | |
8060 | __restrict __attr, | |
8061 | int *__restrict __pshared) | |
8062 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
8063 | ||
8064 | ||
8065 | extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, | |
8066 | int __pshared) | |
8067 | throw () __attribute__ ((__nonnull__ (1))); | |
8068 | ||
8069 | ||
8070 | extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t * | |
8071 | __restrict __attr, | |
8072 | int *__restrict __pref) | |
8073 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
8074 | ||
8075 | ||
8076 | extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, | |
8077 | int __pref) throw () __attribute__ ((__nonnull__ (1))); | |
8078 | ||
8079 | ||
8080 | ||
8081 | ||
8082 | ||
8083 | ||
8084 | ||
8085 | extern int pthread_cond_init (pthread_cond_t *__restrict __cond, | |
8086 | __const pthread_condattr_t *__restrict | |
8087 | __cond_attr) throw () __attribute__ ((__nonnull__ (1))); | |
8088 | ||
8089 | ||
8090 | extern int pthread_cond_destroy (pthread_cond_t *__cond) | |
8091 | throw () __attribute__ ((__nonnull__ (1))); | |
8092 | ||
8093 | ||
8094 | extern int pthread_cond_signal (pthread_cond_t *__cond) | |
8095 | throw () __attribute__ ((__nonnull__ (1))); | |
8096 | ||
8097 | ||
8098 | extern int pthread_cond_broadcast (pthread_cond_t *__cond) | |
8099 | throw () __attribute__ ((__nonnull__ (1))); | |
8100 | ||
8101 | ||
8102 | ||
8103 | ||
8104 | ||
8105 | ||
8106 | extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, | |
8107 | pthread_mutex_t *__restrict __mutex) | |
8108 | __attribute__ ((__nonnull__ (1, 2))); | |
8109 | # 954 "/usr/include/gentoo-multilib/amd64/pthread.h" 3 4 | |
8110 | extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, | |
8111 | pthread_mutex_t *__restrict __mutex, | |
8112 | __const struct timespec *__restrict | |
8113 | __abstime) __attribute__ ((__nonnull__ (1, 2, 3))); | |
8114 | ||
8115 | ||
8116 | ||
8117 | ||
8118 | extern int pthread_condattr_init (pthread_condattr_t *__attr) | |
8119 | throw () __attribute__ ((__nonnull__ (1))); | |
8120 | ||
8121 | ||
8122 | extern int pthread_condattr_destroy (pthread_condattr_t *__attr) | |
8123 | throw () __attribute__ ((__nonnull__ (1))); | |
8124 | ||
8125 | ||
8126 | extern int pthread_condattr_getpshared (__const pthread_condattr_t * | |
8127 | __restrict __attr, | |
8128 | int *__restrict __pshared) | |
8129 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
8130 | ||
8131 | ||
8132 | extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, | |
8133 | int __pshared) throw () __attribute__ ((__nonnull__ (1))); | |
8134 | ||
8135 | ||
8136 | ||
8137 | extern int pthread_condattr_getclock (__const pthread_condattr_t * | |
8138 | __restrict __attr, | |
8139 | __clockid_t *__restrict __clock_id) | |
8140 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
8141 | ||
8142 | ||
8143 | extern int pthread_condattr_setclock (pthread_condattr_t *__attr, | |
8144 | __clockid_t __clock_id) | |
8145 | throw () __attribute__ ((__nonnull__ (1))); | |
8146 | # 998 "/usr/include/gentoo-multilib/amd64/pthread.h" 3 4 | |
8147 | extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) | |
8148 | throw () __attribute__ ((__nonnull__ (1))); | |
8149 | ||
8150 | ||
8151 | extern int pthread_spin_destroy (pthread_spinlock_t *__lock) | |
8152 | throw () __attribute__ ((__nonnull__ (1))); | |
8153 | ||
8154 | ||
8155 | extern int pthread_spin_lock (pthread_spinlock_t *__lock) | |
8156 | throw () __attribute__ ((__nonnull__ (1))); | |
8157 | ||
8158 | ||
8159 | extern int pthread_spin_trylock (pthread_spinlock_t *__lock) | |
8160 | throw () __attribute__ ((__nonnull__ (1))); | |
8161 | ||
8162 | ||
8163 | extern int pthread_spin_unlock (pthread_spinlock_t *__lock) | |
8164 | throw () __attribute__ ((__nonnull__ (1))); | |
8165 | ||
8166 | ||
8167 | ||
8168 | ||
8169 | ||
8170 | ||
8171 | extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, | |
8172 | __const pthread_barrierattr_t *__restrict | |
8173 | __attr, unsigned int __count) | |
8174 | throw () __attribute__ ((__nonnull__ (1))); | |
8175 | ||
8176 | ||
8177 | extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) | |
8178 | throw () __attribute__ ((__nonnull__ (1))); | |
8179 | ||
8180 | ||
8181 | extern int pthread_barrier_wait (pthread_barrier_t *__barrier) | |
8182 | throw () __attribute__ ((__nonnull__ (1))); | |
8183 | ||
8184 | ||
8185 | ||
8186 | extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) | |
8187 | throw () __attribute__ ((__nonnull__ (1))); | |
8188 | ||
8189 | ||
8190 | extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) | |
8191 | throw () __attribute__ ((__nonnull__ (1))); | |
8192 | ||
8193 | ||
8194 | extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * | |
8195 | __restrict __attr, | |
8196 | int *__restrict __pshared) | |
8197 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
8198 | ||
8199 | ||
8200 | extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, | |
8201 | int __pshared) | |
8202 | throw () __attribute__ ((__nonnull__ (1))); | |
8203 | # 1065 "/usr/include/gentoo-multilib/amd64/pthread.h" 3 4 | |
8204 | extern int pthread_key_create (pthread_key_t *__key, | |
8205 | void (*__destr_function) (void *)) | |
8206 | throw () __attribute__ ((__nonnull__ (1))); | |
8207 | ||
8208 | ||
8209 | extern int pthread_key_delete (pthread_key_t __key) throw (); | |
8210 | ||
8211 | ||
8212 | extern void *pthread_getspecific (pthread_key_t __key) throw (); | |
8213 | ||
8214 | ||
8215 | extern int pthread_setspecific (pthread_key_t __key, | |
8216 | __const void *__pointer) throw () ; | |
8217 | ||
8218 | ||
8219 | ||
8220 | ||
8221 | extern int pthread_getcpuclockid (pthread_t __thread_id, | |
8222 | __clockid_t *__clock_id) | |
8223 | throw () __attribute__ ((__nonnull__ (2))); | |
8224 | # 1099 "/usr/include/gentoo-multilib/amd64/pthread.h" 3 4 | |
8225 | extern int pthread_atfork (void (*__prepare) (void), | |
8226 | void (*__parent) (void), | |
8227 | void (*__child) (void)) throw (); | |
8228 | ||
8229 | ||
8230 | ||
8231 | ||
8232 | extern __inline int | |
8233 | pthread_equal (pthread_t __thread1, pthread_t __thread2) throw () | |
8234 | { | |
8235 | return __thread1 == __thread2; | |
8236 | } | |
8237 | ||
8238 | ||
8239 | } | |
8240 | # 9 "/usr/include/pthread.h" 2 3 4 | |
8241 | # 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 2 3 | |
8242 | # 1 "/usr/include/unistd.h" 1 3 4 | |
8243 | ||
8244 | ||
8245 | ||
8246 | ||
8247 | ||
8248 | ||
8249 | ||
8250 | # 1 "/usr/include/gentoo-multilib/amd64/unistd.h" 1 3 4 | |
8251 | # 26 "/usr/include/gentoo-multilib/amd64/unistd.h" 3 4 | |
8252 | # 1 "/usr/include/features.h" 1 3 4 | |
8253 | # 27 "/usr/include/gentoo-multilib/amd64/unistd.h" 2 3 4 | |
8254 | ||
8255 | extern "C" { | |
8256 | # 171 "/usr/include/gentoo-multilib/amd64/unistd.h" 3 4 | |
8257 | # 1 "/usr/include/bits/posix_opt.h" 1 3 4 | |
8258 | ||
8259 | ||
8260 | ||
8261 | ||
8262 | ||
8263 | ||
8264 | ||
8265 | # 1 "/usr/include/gentoo-multilib/amd64/bits/posix_opt.h" 1 3 4 | |
8266 | # 9 "/usr/include/bits/posix_opt.h" 2 3 4 | |
8267 | # 172 "/usr/include/gentoo-multilib/amd64/unistd.h" 2 3 4 | |
8268 | ||
8269 | ||
8270 | ||
8271 | # 1 "/usr/include/bits/environments.h" 1 3 4 | |
8272 | ||
8273 | ||
8274 | ||
8275 | ||
8276 | ||
8277 | ||
8278 | ||
8279 | # 1 "/usr/include/gentoo-multilib/amd64/bits/environments.h" 1 3 4 | |
8280 | # 23 "/usr/include/gentoo-multilib/amd64/bits/environments.h" 3 4 | |
8281 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
8282 | ||
8283 | ||
8284 | ||
8285 | ||
8286 | ||
8287 | ||
8288 | ||
8289 | # 1 "/usr/include/gentoo-multilib/amd64/bits/wordsize.h" 1 3 4 | |
8290 | # 9 "/usr/include/bits/wordsize.h" 2 3 4 | |
8291 | # 24 "/usr/include/gentoo-multilib/amd64/bits/environments.h" 2 3 4 | |
8292 | # 9 "/usr/include/bits/environments.h" 2 3 4 | |
8293 | # 176 "/usr/include/gentoo-multilib/amd64/unistd.h" 2 3 4 | |
8294 | # 186 "/usr/include/gentoo-multilib/amd64/unistd.h" 3 4 | |
8295 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
8296 | # 187 "/usr/include/gentoo-multilib/amd64/unistd.h" 2 3 4 | |
8297 | # 195 "/usr/include/gentoo-multilib/amd64/unistd.h" 3 4 | |
8298 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 | |
8299 | # 196 "/usr/include/gentoo-multilib/amd64/unistd.h" 2 3 4 | |
8300 | # 236 "/usr/include/gentoo-multilib/amd64/unistd.h" 3 4 | |
8301 | typedef __intptr_t intptr_t; | |
8302 | ||
8303 | ||
8304 | ||
8305 | ||
8306 | ||
8307 | ||
8308 | typedef __socklen_t socklen_t; | |
8309 | # 256 "/usr/include/gentoo-multilib/amd64/unistd.h" 3 4 | |
8310 | extern int access (__const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1))); | |
8311 | ||
8312 | ||
8313 | ||
8314 | ||
8315 | extern int euidaccess (__const char *__name, int __type) | |
8316 | throw () __attribute__ ((__nonnull__ (1))); | |
8317 | ||
8318 | ||
8319 | extern int eaccess (__const char *__name, int __type) | |
8320 | throw () __attribute__ ((__nonnull__ (1))); | |
8321 | ||
8322 | ||
8323 | ||
8324 | ||
8325 | ||
8326 | ||
8327 | extern int faccessat (int __fd, __const char *__file, int __type, int __flag) | |
8328 | throw () __attribute__ ((__nonnull__ (2))) ; | |
8329 | # 302 "/usr/include/gentoo-multilib/amd64/unistd.h" 3 4 | |
8330 | extern __off64_t lseek (int __fd, __off64_t __offset, int __whence) throw () __asm__ ("" "lseek64"); | |
8331 | ||
8332 | ||
8333 | ||
8334 | ||
8335 | ||
8336 | ||
8337 | ||
8338 | extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) | |
8339 | throw (); | |
8340 | ||
8341 | ||
8342 | ||
8343 | ||
8344 | ||
8345 | ||
8346 | extern int close (int __fd); | |
8347 | ||
8348 | ||
8349 | ||
8350 | ||
8351 | ||
8352 | ||
8353 | extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ; | |
8354 | ||
8355 | ||
8356 | ||
8357 | ||
8358 | ||
8359 | extern ssize_t write (int __fd, __const void *__buf, size_t __n) ; | |
8360 | # 353 "/usr/include/gentoo-multilib/amd64/unistd.h" 3 4 | |
8361 | extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64") ; | |
8362 | ||
8363 | ||
8364 | extern ssize_t pwrite (int __fd, __const void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pwrite64") ; | |
8365 | # 369 "/usr/include/gentoo-multilib/amd64/unistd.h" 3 4 | |
8366 | extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, | |
8367 | __off64_t __offset) ; | |
8368 | ||
8369 | ||
8370 | extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n, | |
8371 | __off64_t __offset) ; | |
8372 | ||
8373 | ||
8374 | ||
8375 | ||
8376 | ||
8377 | ||
8378 | ||
8379 | extern int pipe (int __pipedes[2]) throw () ; | |
8380 | # 391 "/usr/include/gentoo-multilib/amd64/unistd.h" 3 4 | |
8381 | extern unsigned int alarm (unsigned int __seconds) throw (); | |
8382 | # 403 "/usr/include/gentoo-multilib/amd64/unistd.h" 3 4 | |
8383 | extern unsigned int sleep (unsigned int __seconds); | |
8384 | ||
8385 | ||
8386 | ||
8387 | ||
8388 | ||
8389 | ||
8390 | extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) | |
8391 | throw (); | |
8392 | ||
8393 | ||
8394 | ||
8395 | ||
8396 | ||
8397 | ||
8398 | extern int usleep (__useconds_t __useconds); | |
8399 | # 427 "/usr/include/gentoo-multilib/amd64/unistd.h" 3 4 | |
8400 | extern int pause (void); | |
8401 | ||
8402 | ||
8403 | ||
8404 | extern int chown (__const char *__file, __uid_t __owner, __gid_t __group) | |
8405 | throw () __attribute__ ((__nonnull__ (1))) ; | |
8406 | ||
8407 | ||
8408 | ||
8409 | extern int fchown (int __fd, __uid_t __owner, __gid_t __group) throw () ; | |
8410 | ||
8411 | ||
8412 | ||
8413 | ||
8414 | extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group) | |
8415 | throw () __attribute__ ((__nonnull__ (1))) ; | |
8416 | ||
8417 | ||
8418 | ||
8419 | ||
8420 | ||
8421 | ||
8422 | extern int fchownat (int __fd, __const char *__file, __uid_t __owner, | |
8423 | __gid_t __group, int __flag) | |
8424 | throw () __attribute__ ((__nonnull__ (2))) ; | |
8425 | ||
8426 | ||
8427 | ||
8428 | extern int chdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) ; | |
8429 | ||
8430 | ||
8431 | ||
8432 | extern int fchdir (int __fd) throw () ; | |
8433 | # 469 "/usr/include/gentoo-multilib/amd64/unistd.h" 3 4 | |
8434 | extern char *getcwd (char *__buf, size_t __size) throw () ; | |
8435 | ||
8436 | ||
8437 | ||
8438 | ||
8439 | ||
8440 | extern char *get_current_dir_name (void) throw (); | |
8441 | ||
8442 | ||
8443 | ||
8444 | ||
8445 | ||
8446 | ||
8447 | extern char *getwd (char *__buf) | |
8448 | throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) ; | |
8449 | ||
8450 | ||
8451 | ||
8452 | ||
8453 | extern int dup (int __fd) throw () ; | |
8454 | ||
8455 | ||
8456 | extern int dup2 (int __fd, int __fd2) throw (); | |
8457 | ||
8458 | ||
8459 | extern char **__environ; | |
8460 | ||
8461 | extern char **environ; | |
8462 | ||
8463 | ||
8464 | ||
8465 | ||
8466 | ||
8467 | extern int execve (__const char *__path, char *__const __argv[], | |
8468 | char *__const __envp[]) throw () __attribute__ ((__nonnull__ (1))); | |
8469 | ||
8470 | ||
8471 | ||
8472 | ||
8473 | extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[]) | |
8474 | throw (); | |
8475 | ||
8476 | ||
8477 | ||
8478 | ||
8479 | extern int execv (__const char *__path, char *__const __argv[]) | |
8480 | throw () __attribute__ ((__nonnull__ (1))); | |
8481 | ||
8482 | ||
8483 | ||
8484 | extern int execle (__const char *__path, __const char *__arg, ...) | |
8485 | throw () __attribute__ ((__nonnull__ (1))); | |
8486 | ||
8487 | ||
8488 | ||
8489 | extern int execl (__const char *__path, __const char *__arg, ...) | |
8490 | throw () __attribute__ ((__nonnull__ (1))); | |
8491 | ||
8492 | ||
8493 | ||
8494 | extern int execvp (__const char *__file, char *__const __argv[]) | |
8495 | throw () __attribute__ ((__nonnull__ (1))); | |
8496 | ||
8497 | ||
8498 | ||
8499 | ||
8500 | extern int execlp (__const char *__file, __const char *__arg, ...) | |
8501 | throw () __attribute__ ((__nonnull__ (1))); | |
8502 | ||
8503 | ||
8504 | ||
8505 | ||
8506 | extern int nice (int __inc) throw () ; | |
8507 | ||
8508 | ||
8509 | ||
8510 | ||
8511 | extern void _exit (int __status) __attribute__ ((__noreturn__)); | |
8512 | ||
8513 | ||
8514 | ||
8515 | ||
8516 | ||
8517 | # 1 "/usr/include/bits/confname.h" 1 3 4 | |
8518 | ||
8519 | ||
8520 | ||
8521 | ||
8522 | ||
8523 | ||
8524 | ||
8525 | # 1 "/usr/include/gentoo-multilib/amd64/bits/confname.h" 1 3 4 | |
8526 | # 26 "/usr/include/gentoo-multilib/amd64/bits/confname.h" 3 4 | |
8527 | enum | |
8528 | { | |
8529 | _PC_LINK_MAX, | |
8530 | ||
8531 | _PC_MAX_CANON, | |
8532 | ||
8533 | _PC_MAX_INPUT, | |
8534 | ||
8535 | _PC_NAME_MAX, | |
8536 | ||
8537 | _PC_PATH_MAX, | |
8538 | ||
8539 | _PC_PIPE_BUF, | |
8540 | ||
8541 | _PC_CHOWN_RESTRICTED, | |
8542 | ||
8543 | _PC_NO_TRUNC, | |
8544 | ||
8545 | _PC_VDISABLE, | |
8546 | ||
8547 | _PC_SYNC_IO, | |
8548 | ||
8549 | _PC_ASYNC_IO, | |
8550 | ||
8551 | _PC_PRIO_IO, | |
8552 | ||
8553 | _PC_SOCK_MAXBUF, | |
8554 | ||
8555 | _PC_FILESIZEBITS, | |
8556 | ||
8557 | _PC_REC_INCR_XFER_SIZE, | |
8558 | ||
8559 | _PC_REC_MAX_XFER_SIZE, | |
8560 | ||
8561 | _PC_REC_MIN_XFER_SIZE, | |
8562 | ||
8563 | _PC_REC_XFER_ALIGN, | |
8564 | ||
8565 | _PC_ALLOC_SIZE_MIN, | |
8566 | ||
8567 | _PC_SYMLINK_MAX, | |
8568 | ||
8569 | _PC_2_SYMLINKS | |
8570 | ||
8571 | }; | |
8572 | ||
8573 | ||
8574 | enum | |
8575 | { | |
8576 | _SC_ARG_MAX, | |
8577 | ||
8578 | _SC_CHILD_MAX, | |
8579 | ||
8580 | _SC_CLK_TCK, | |
8581 | ||
8582 | _SC_NGROUPS_MAX, | |
8583 | ||
8584 | _SC_OPEN_MAX, | |
8585 | ||
8586 | _SC_STREAM_MAX, | |
8587 | ||
8588 | _SC_TZNAME_MAX, | |
8589 | ||
8590 | _SC_JOB_CONTROL, | |
8591 | ||
8592 | _SC_SAVED_IDS, | |
8593 | ||
8594 | _SC_REALTIME_SIGNALS, | |
8595 | ||
8596 | _SC_PRIORITY_SCHEDULING, | |
8597 | ||
8598 | _SC_TIMERS, | |
8599 | ||
8600 | _SC_ASYNCHRONOUS_IO, | |
8601 | ||
8602 | _SC_PRIORITIZED_IO, | |
8603 | ||
8604 | _SC_SYNCHRONIZED_IO, | |
8605 | ||
8606 | _SC_FSYNC, | |
8607 | ||
8608 | _SC_MAPPED_FILES, | |
8609 | ||
8610 | _SC_MEMLOCK, | |
8611 | ||
8612 | _SC_MEMLOCK_RANGE, | |
8613 | ||
8614 | _SC_MEMORY_PROTECTION, | |
8615 | ||
8616 | _SC_MESSAGE_PASSING, | |
8617 | ||
8618 | _SC_SEMAPHORES, | |
8619 | ||
8620 | _SC_SHARED_MEMORY_OBJECTS, | |
8621 | ||
8622 | _SC_AIO_LISTIO_MAX, | |
8623 | ||
8624 | _SC_AIO_MAX, | |
8625 | ||
8626 | _SC_AIO_PRIO_DELTA_MAX, | |
8627 | ||
8628 | _SC_DELAYTIMER_MAX, | |
8629 | ||
8630 | _SC_MQ_OPEN_MAX, | |
8631 | ||
8632 | _SC_MQ_PRIO_MAX, | |
8633 | ||
8634 | _SC_VERSION, | |
8635 | ||
8636 | _SC_PAGESIZE, | |
8637 | ||
8638 | ||
8639 | _SC_RTSIG_MAX, | |
8640 | ||
8641 | _SC_SEM_NSEMS_MAX, | |
8642 | ||
8643 | _SC_SEM_VALUE_MAX, | |
8644 | ||
8645 | _SC_SIGQUEUE_MAX, | |
8646 | ||
8647 | _SC_TIMER_MAX, | |
8648 | ||
8649 | ||
8650 | ||
8651 | ||
8652 | _SC_BC_BASE_MAX, | |
8653 | ||
8654 | _SC_BC_DIM_MAX, | |
8655 | ||
8656 | _SC_BC_SCALE_MAX, | |
8657 | ||
8658 | _SC_BC_STRING_MAX, | |
8659 | ||
8660 | _SC_COLL_WEIGHTS_MAX, | |
8661 | ||
8662 | _SC_EQUIV_CLASS_MAX, | |
8663 | ||
8664 | _SC_EXPR_NEST_MAX, | |
8665 | ||
8666 | _SC_LINE_MAX, | |
8667 | ||
8668 | _SC_RE_DUP_MAX, | |
8669 | ||
8670 | _SC_CHARCLASS_NAME_MAX, | |
8671 | ||
8672 | ||
8673 | _SC_2_VERSION, | |
8674 | ||
8675 | _SC_2_C_BIND, | |
8676 | ||
8677 | _SC_2_C_DEV, | |
8678 | ||
8679 | _SC_2_FORT_DEV, | |
8680 | ||
8681 | _SC_2_FORT_RUN, | |
8682 | ||
8683 | _SC_2_SW_DEV, | |
8684 | ||
8685 | _SC_2_LOCALEDEF, | |
8686 | ||
8687 | ||
8688 | _SC_PII, | |
8689 | ||
8690 | _SC_PII_XTI, | |
8691 | ||
8692 | _SC_PII_SOCKET, | |
8693 | ||
8694 | _SC_PII_INTERNET, | |
8695 | ||
8696 | _SC_PII_OSI, | |
8697 | ||
8698 | _SC_POLL, | |
8699 | ||
8700 | _SC_SELECT, | |
8701 | ||
8702 | _SC_UIO_MAXIOV, | |
8703 | ||
8704 | _SC_IOV_MAX = _SC_UIO_MAXIOV, | |
8705 | ||
8706 | _SC_PII_INTERNET_STREAM, | |
8707 | ||
8708 | _SC_PII_INTERNET_DGRAM, | |
8709 | ||
8710 | _SC_PII_OSI_COTS, | |
8711 | ||
8712 | _SC_PII_OSI_CLTS, | |
8713 | ||
8714 | _SC_PII_OSI_M, | |
8715 | ||
8716 | _SC_T_IOV_MAX, | |
8717 | ||
8718 | ||
8719 | ||
8720 | _SC_THREADS, | |
8721 | ||
8722 | _SC_THREAD_SAFE_FUNCTIONS, | |
8723 | ||
8724 | _SC_GETGR_R_SIZE_MAX, | |
8725 | ||
8726 | _SC_GETPW_R_SIZE_MAX, | |
8727 | ||
8728 | _SC_LOGIN_NAME_MAX, | |
8729 | ||
8730 | _SC_TTY_NAME_MAX, | |
8731 | ||
8732 | _SC_THREAD_DESTRUCTOR_ITERATIONS, | |
8733 | ||
8734 | _SC_THREAD_KEYS_MAX, | |
8735 | ||
8736 | _SC_THREAD_STACK_MIN, | |
8737 | ||
8738 | _SC_THREAD_THREADS_MAX, | |
8739 | ||
8740 | _SC_THREAD_ATTR_STACKADDR, | |
8741 | ||
8742 | _SC_THREAD_ATTR_STACKSIZE, | |
8743 | ||
8744 | _SC_THREAD_PRIORITY_SCHEDULING, | |
8745 | ||
8746 | _SC_THREAD_PRIO_INHERIT, | |
8747 | ||
8748 | _SC_THREAD_PRIO_PROTECT, | |
8749 | ||
8750 | _SC_THREAD_PROCESS_SHARED, | |
8751 | ||
8752 | ||
8753 | _SC_NPROCESSORS_CONF, | |
8754 | ||
8755 | _SC_NPROCESSORS_ONLN, | |
8756 | ||
8757 | _SC_PHYS_PAGES, | |
8758 | ||
8759 | _SC_AVPHYS_PAGES, | |
8760 | ||
8761 | _SC_ATEXIT_MAX, | |
8762 | ||
8763 | _SC_PASS_MAX, | |
8764 | ||
8765 | ||
8766 | _SC_XOPEN_VERSION, | |
8767 | ||
8768 | _SC_XOPEN_XCU_VERSION, | |
8769 | ||
8770 | _SC_XOPEN_UNIX, | |
8771 | ||
8772 | _SC_XOPEN_CRYPT, | |
8773 | ||
8774 | _SC_XOPEN_ENH_I18N, | |
8775 | ||
8776 | _SC_XOPEN_SHM, | |
8777 | ||
8778 | ||
8779 | _SC_2_CHAR_TERM, | |
8780 | ||
8781 | _SC_2_C_VERSION, | |
8782 | ||
8783 | _SC_2_UPE, | |
8784 | ||
8785 | ||
8786 | _SC_XOPEN_XPG2, | |
8787 | ||
8788 | _SC_XOPEN_XPG3, | |
8789 | ||
8790 | _SC_XOPEN_XPG4, | |
8791 | ||
8792 | ||
8793 | _SC_CHAR_BIT, | |
8794 | ||
8795 | _SC_CHAR_MAX, | |
8796 | ||
8797 | _SC_CHAR_MIN, | |
8798 | ||
8799 | _SC_INT_MAX, | |
8800 | ||
8801 | _SC_INT_MIN, | |
8802 | ||
8803 | _SC_LONG_BIT, | |
8804 | ||
8805 | _SC_WORD_BIT, | |
8806 | ||
8807 | _SC_MB_LEN_MAX, | |
8808 | ||
8809 | _SC_NZERO, | |
8810 | ||
8811 | _SC_SSIZE_MAX, | |
8812 | ||
8813 | _SC_SCHAR_MAX, | |
8814 | ||
8815 | _SC_SCHAR_MIN, | |
8816 | ||
8817 | _SC_SHRT_MAX, | |
8818 | ||
8819 | _SC_SHRT_MIN, | |
8820 | ||
8821 | _SC_UCHAR_MAX, | |
8822 | ||
8823 | _SC_UINT_MAX, | |
8824 | ||
8825 | _SC_ULONG_MAX, | |
8826 | ||
8827 | _SC_USHRT_MAX, | |
8828 | ||
8829 | ||
8830 | _SC_NL_ARGMAX, | |
8831 | ||
8832 | _SC_NL_LANGMAX, | |
8833 | ||
8834 | _SC_NL_MSGMAX, | |
8835 | ||
8836 | _SC_NL_NMAX, | |
8837 | ||
8838 | _SC_NL_SETMAX, | |
8839 | ||
8840 | _SC_NL_TEXTMAX, | |
8841 | ||
8842 | ||
8843 | _SC_XBS5_ILP32_OFF32, | |
8844 | ||
8845 | _SC_XBS5_ILP32_OFFBIG, | |
8846 | ||
8847 | _SC_XBS5_LP64_OFF64, | |
8848 | ||
8849 | _SC_XBS5_LPBIG_OFFBIG, | |
8850 | ||
8851 | ||
8852 | _SC_XOPEN_LEGACY, | |
8853 | ||
8854 | _SC_XOPEN_REALTIME, | |
8855 | ||
8856 | _SC_XOPEN_REALTIME_THREADS, | |
8857 | ||
8858 | ||
8859 | _SC_ADVISORY_INFO, | |
8860 | ||
8861 | _SC_BARRIERS, | |
8862 | ||
8863 | _SC_BASE, | |
8864 | ||
8865 | _SC_C_LANG_SUPPORT, | |
8866 | ||
8867 | _SC_C_LANG_SUPPORT_R, | |
8868 | ||
8869 | _SC_CLOCK_SELECTION, | |
8870 | ||
8871 | _SC_CPUTIME, | |
8872 | ||
8873 | _SC_THREAD_CPUTIME, | |
8874 | ||
8875 | _SC_DEVICE_IO, | |
8876 | ||
8877 | _SC_DEVICE_SPECIFIC, | |
8878 | ||
8879 | _SC_DEVICE_SPECIFIC_R, | |
8880 | ||
8881 | _SC_FD_MGMT, | |
8882 | ||
8883 | _SC_FIFO, | |
8884 | ||
8885 | _SC_PIPE, | |
8886 | ||
8887 | _SC_FILE_ATTRIBUTES, | |
8888 | ||
8889 | _SC_FILE_LOCKING, | |
8890 | ||
8891 | _SC_FILE_SYSTEM, | |
8892 | ||
8893 | _SC_MONOTONIC_CLOCK, | |
8894 | ||
8895 | _SC_MULTI_PROCESS, | |
8896 | ||
8897 | _SC_SINGLE_PROCESS, | |
8898 | ||
8899 | _SC_NETWORKING, | |
8900 | ||
8901 | _SC_READER_WRITER_LOCKS, | |
8902 | ||
8903 | _SC_SPIN_LOCKS, | |
8904 | ||
8905 | _SC_REGEXP, | |
8906 | ||
8907 | _SC_REGEX_VERSION, | |
8908 | ||
8909 | _SC_SHELL, | |
8910 | ||
8911 | _SC_SIGNALS, | |
8912 | ||
8913 | _SC_SPAWN, | |
8914 | ||
8915 | _SC_SPORADIC_SERVER, | |
8916 | ||
8917 | _SC_THREAD_SPORADIC_SERVER, | |
8918 | ||
8919 | _SC_SYSTEM_DATABASE, | |
8920 | ||
8921 | _SC_SYSTEM_DATABASE_R, | |
8922 | ||
8923 | _SC_TIMEOUTS, | |
8924 | ||
8925 | _SC_TYPED_MEMORY_OBJECTS, | |
8926 | ||
8927 | _SC_USER_GROUPS, | |
8928 | ||
8929 | _SC_USER_GROUPS_R, | |
8930 | ||
8931 | _SC_2_PBS, | |
8932 | ||
8933 | _SC_2_PBS_ACCOUNTING, | |
8934 | ||
8935 | _SC_2_PBS_LOCATE, | |
8936 | ||
8937 | _SC_2_PBS_MESSAGE, | |
8938 | ||
8939 | _SC_2_PBS_TRACK, | |
8940 | ||
8941 | _SC_SYMLOOP_MAX, | |
8942 | ||
8943 | _SC_STREAMS, | |
8944 | ||
8945 | _SC_2_PBS_CHECKPOINT, | |
8946 | ||
8947 | ||
8948 | _SC_V6_ILP32_OFF32, | |
8949 | ||
8950 | _SC_V6_ILP32_OFFBIG, | |
8951 | ||
8952 | _SC_V6_LP64_OFF64, | |
8953 | ||
8954 | _SC_V6_LPBIG_OFFBIG, | |
8955 | ||
8956 | ||
8957 | _SC_HOST_NAME_MAX, | |
8958 | ||
8959 | _SC_TRACE, | |
8960 | ||
8961 | _SC_TRACE_EVENT_FILTER, | |
8962 | ||
8963 | _SC_TRACE_INHERIT, | |
8964 | ||
8965 | _SC_TRACE_LOG, | |
8966 | ||
8967 | ||
8968 | _SC_LEVEL1_ICACHE_SIZE, | |
8969 | ||
8970 | _SC_LEVEL1_ICACHE_ASSOC, | |
8971 | ||
8972 | _SC_LEVEL1_ICACHE_LINESIZE, | |
8973 | ||
8974 | _SC_LEVEL1_DCACHE_SIZE, | |
8975 | ||
8976 | _SC_LEVEL1_DCACHE_ASSOC, | |
8977 | ||
8978 | _SC_LEVEL1_DCACHE_LINESIZE, | |
8979 | ||
8980 | _SC_LEVEL2_CACHE_SIZE, | |
8981 | ||
8982 | _SC_LEVEL2_CACHE_ASSOC, | |
8983 | ||
8984 | _SC_LEVEL2_CACHE_LINESIZE, | |
8985 | ||
8986 | _SC_LEVEL3_CACHE_SIZE, | |
8987 | ||
8988 | _SC_LEVEL3_CACHE_ASSOC, | |
8989 | ||
8990 | _SC_LEVEL3_CACHE_LINESIZE, | |
8991 | ||
8992 | _SC_LEVEL4_CACHE_SIZE, | |
8993 | ||
8994 | _SC_LEVEL4_CACHE_ASSOC, | |
8995 | ||
8996 | _SC_LEVEL4_CACHE_LINESIZE, | |
8997 | ||
8998 | ||
8999 | ||
9000 | _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, | |
9001 | ||
9002 | _SC_RAW_SOCKETS | |
9003 | ||
9004 | }; | |
9005 | ||
9006 | ||
9007 | enum | |
9008 | { | |
9009 | _CS_PATH, | |
9010 | ||
9011 | ||
9012 | _CS_V6_WIDTH_RESTRICTED_ENVS, | |
9013 | ||
9014 | ||
9015 | _CS_GNU_LIBC_VERSION, | |
9016 | ||
9017 | _CS_GNU_LIBPTHREAD_VERSION, | |
9018 | ||
9019 | ||
9020 | _CS_LFS_CFLAGS = 1000, | |
9021 | ||
9022 | _CS_LFS_LDFLAGS, | |
9023 | ||
9024 | _CS_LFS_LIBS, | |
9025 | ||
9026 | _CS_LFS_LINTFLAGS, | |
9027 | ||
9028 | _CS_LFS64_CFLAGS, | |
9029 | ||
9030 | _CS_LFS64_LDFLAGS, | |
9031 | ||
9032 | _CS_LFS64_LIBS, | |
9033 | ||
9034 | _CS_LFS64_LINTFLAGS, | |
9035 | ||
9036 | ||
9037 | _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, | |
9038 | ||
9039 | _CS_XBS5_ILP32_OFF32_LDFLAGS, | |
9040 | ||
9041 | _CS_XBS5_ILP32_OFF32_LIBS, | |
9042 | ||
9043 | _CS_XBS5_ILP32_OFF32_LINTFLAGS, | |
9044 | ||
9045 | _CS_XBS5_ILP32_OFFBIG_CFLAGS, | |
9046 | ||
9047 | _CS_XBS5_ILP32_OFFBIG_LDFLAGS, | |
9048 | ||
9049 | _CS_XBS5_ILP32_OFFBIG_LIBS, | |
9050 | ||
9051 | _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, | |
9052 | ||
9053 | _CS_XBS5_LP64_OFF64_CFLAGS, | |
9054 | ||
9055 | _CS_XBS5_LP64_OFF64_LDFLAGS, | |
9056 | ||
9057 | _CS_XBS5_LP64_OFF64_LIBS, | |
9058 | ||
9059 | _CS_XBS5_LP64_OFF64_LINTFLAGS, | |
9060 | ||
9061 | _CS_XBS5_LPBIG_OFFBIG_CFLAGS, | |
9062 | ||
9063 | _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, | |
9064 | ||
9065 | _CS_XBS5_LPBIG_OFFBIG_LIBS, | |
9066 | ||
9067 | _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, | |
9068 | ||
9069 | ||
9070 | _CS_POSIX_V6_ILP32_OFF32_CFLAGS, | |
9071 | ||
9072 | _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, | |
9073 | ||
9074 | _CS_POSIX_V6_ILP32_OFF32_LIBS, | |
9075 | ||
9076 | _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, | |
9077 | ||
9078 | _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, | |
9079 | ||
9080 | _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, | |
9081 | ||
9082 | _CS_POSIX_V6_ILP32_OFFBIG_LIBS, | |
9083 | ||
9084 | _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, | |
9085 | ||
9086 | _CS_POSIX_V6_LP64_OFF64_CFLAGS, | |
9087 | ||
9088 | _CS_POSIX_V6_LP64_OFF64_LDFLAGS, | |
9089 | ||
9090 | _CS_POSIX_V6_LP64_OFF64_LIBS, | |
9091 | ||
9092 | _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, | |
9093 | ||
9094 | _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, | |
9095 | ||
9096 | _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, | |
9097 | ||
9098 | _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, | |
9099 | ||
9100 | _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS | |
9101 | ||
9102 | }; | |
9103 | # 9 "/usr/include/bits/confname.h" 2 3 4 | |
9104 | # 553 "/usr/include/gentoo-multilib/amd64/unistd.h" 2 3 4 | |
9105 | ||
9106 | ||
9107 | extern long int pathconf (__const char *__path, int __name) | |
9108 | throw () __attribute__ ((__nonnull__ (1))); | |
9109 | ||
9110 | ||
9111 | extern long int fpathconf (int __fd, int __name) throw (); | |
9112 | ||
9113 | ||
9114 | extern long int sysconf (int __name) throw () __attribute__ ((__const__)); | |
9115 | ||
9116 | ||
9117 | ||
9118 | extern size_t confstr (int __name, char *__buf, size_t __len) throw (); | |
9119 | ||
9120 | ||
9121 | ||
9122 | ||
9123 | extern __pid_t getpid (void) throw (); | |
9124 | ||
9125 | ||
9126 | extern __pid_t getppid (void) throw (); | |
9127 | ||
9128 | ||
9129 | ||
9130 | ||
9131 | extern __pid_t getpgrp (void) throw (); | |
9132 | # 589 "/usr/include/gentoo-multilib/amd64/unistd.h" 3 4 | |
9133 | extern __pid_t __getpgid (__pid_t __pid) throw (); | |
9134 | ||
9135 | extern __pid_t getpgid (__pid_t __pid) throw (); | |
9136 | ||
9137 | ||
9138 | ||
9139 | ||
9140 | ||
9141 | ||
9142 | extern int setpgid (__pid_t __pid, __pid_t __pgid) throw (); | |
9143 | # 615 "/usr/include/gentoo-multilib/amd64/unistd.h" 3 4 | |
9144 | extern int setpgrp (void) throw (); | |
9145 | # 632 "/usr/include/gentoo-multilib/amd64/unistd.h" 3 4 | |
9146 | extern __pid_t setsid (void) throw (); | |
9147 | ||
9148 | ||
9149 | ||
9150 | extern __pid_t getsid (__pid_t __pid) throw (); | |
9151 | ||
9152 | ||
9153 | ||
9154 | extern __uid_t getuid (void) throw (); | |
9155 | ||
9156 | ||
9157 | extern __uid_t geteuid (void) throw (); | |
9158 | ||
9159 | ||
9160 | extern __gid_t getgid (void) throw (); | |
9161 | ||
9162 | ||
9163 | extern __gid_t getegid (void) throw (); | |
9164 | ||
9165 | ||
9166 | ||
9167 | ||
9168 | extern int getgroups (int __size, __gid_t __list[]) throw () ; | |
9169 | ||
9170 | ||
9171 | ||
9172 | extern int group_member (__gid_t __gid) throw (); | |
9173 | ||
9174 | ||
9175 | ||
9176 | ||
9177 | ||
9178 | ||
9179 | extern int setuid (__uid_t __uid) throw (); | |
9180 | ||
9181 | ||
9182 | ||
9183 | ||
9184 | extern int setreuid (__uid_t __ruid, __uid_t __euid) throw (); | |
9185 | ||
9186 | ||
9187 | ||
9188 | ||
9189 | extern int seteuid (__uid_t __uid) throw (); | |
9190 | ||
9191 | ||
9192 | ||
9193 | ||
9194 | ||
9195 | ||
9196 | extern int setgid (__gid_t __gid) throw (); | |
9197 | ||
9198 | ||
9199 | ||
9200 | ||
9201 | extern int setregid (__gid_t __rgid, __gid_t __egid) throw (); | |
9202 | ||
9203 | ||
9204 | ||
9205 | ||
9206 | extern int setegid (__gid_t __gid) throw (); | |
9207 | ||
9208 | ||
9209 | ||
9210 | ||
9211 | ||
9212 | extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) | |
9213 | throw (); | |
9214 | ||
9215 | ||
9216 | ||
9217 | extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) | |
9218 | throw (); | |
9219 | ||
9220 | ||
9221 | ||
9222 | extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) | |
9223 | throw (); | |
9224 | ||
9225 | ||
9226 | ||
9227 | extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) | |
9228 | throw (); | |
9229 | ||
9230 | ||
9231 | ||
9232 | ||
9233 | ||
9234 | ||
9235 | extern __pid_t fork (void) throw (); | |
9236 | ||
9237 | ||
9238 | ||
9239 | ||
9240 | ||
9241 | ||
9242 | extern __pid_t vfork (void) throw (); | |
9243 | ||
9244 | ||
9245 | ||
9246 | ||
9247 | ||
9248 | extern char *ttyname (int __fd) throw (); | |
9249 | ||
9250 | ||
9251 | ||
9252 | extern int ttyname_r (int __fd, char *__buf, size_t __buflen) | |
9253 | throw () __attribute__ ((__nonnull__ (2))) ; | |
9254 | ||
9255 | ||
9256 | ||
9257 | extern int isatty (int __fd) throw (); | |
9258 | ||
9259 | ||
9260 | ||
9261 | ||
9262 | ||
9263 | extern int ttyslot (void) throw (); | |
9264 | ||
9265 | ||
9266 | ||
9267 | ||
9268 | extern int link (__const char *__from, __const char *__to) | |
9269 | throw () __attribute__ ((__nonnull__ (1, 2))) ; | |
9270 | ||
9271 | ||
9272 | ||
9273 | ||
9274 | extern int linkat (int __fromfd, __const char *__from, int __tofd, | |
9275 | __const char *__to, int __flags) | |
9276 | throw () __attribute__ ((__nonnull__ (2, 4))) ; | |
9277 | ||
9278 | ||
9279 | ||
9280 | ||
9281 | extern int symlink (__const char *__from, __const char *__to) | |
9282 | throw () __attribute__ ((__nonnull__ (1, 2))) ; | |
9283 | ||
9284 | ||
9285 | ||
9286 | ||
9287 | extern ssize_t readlink (__const char *__restrict __path, | |
9288 | char *__restrict __buf, size_t __len) | |
9289 | throw () __attribute__ ((__nonnull__ (1, 2))) ; | |
9290 | ||
9291 | ||
9292 | ||
9293 | ||
9294 | extern int symlinkat (__const char *__from, int __tofd, | |
9295 | __const char *__to) throw () __attribute__ ((__nonnull__ (1, 3))) ; | |
9296 | ||
9297 | ||
9298 | extern ssize_t readlinkat (int __fd, __const char *__restrict __path, | |
9299 | char *__restrict __buf, size_t __len) | |
9300 | throw () __attribute__ ((__nonnull__ (2, 3))) ; | |
9301 | ||
9302 | ||
9303 | ||
9304 | extern int unlink (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); | |
9305 | ||
9306 | ||
9307 | ||
9308 | extern int unlinkat (int __fd, __const char *__name, int __flag) | |
9309 | throw () __attribute__ ((__nonnull__ (2))); | |
9310 | ||
9311 | ||
9312 | ||
9313 | extern int rmdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))); | |
9314 | ||
9315 | ||
9316 | ||
9317 | extern __pid_t tcgetpgrp (int __fd) throw (); | |
9318 | ||
9319 | ||
9320 | extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) throw (); | |
9321 | ||
9322 | ||
9323 | ||
9324 | ||
9325 | ||
9326 | ||
9327 | extern char *getlogin (void); | |
9328 | ||
9329 | ||
9330 | ||
9331 | ||
9332 | ||
9333 | ||
9334 | ||
9335 | extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))); | |
9336 | ||
9337 | ||
9338 | ||
9339 | ||
9340 | extern int setlogin (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); | |
9341 | # 835 "/usr/include/gentoo-multilib/amd64/unistd.h" 3 4 | |
9342 | # 1 "/usr/include/getopt.h" 1 3 4 | |
9343 | ||
9344 | ||
9345 | ||
9346 | ||
9347 | ||
9348 | ||
9349 | ||
9350 | # 1 "/usr/include/gentoo-multilib/amd64/getopt.h" 1 3 4 | |
9351 | # 50 "/usr/include/gentoo-multilib/amd64/getopt.h" 3 4 | |
9352 | extern "C" { | |
9353 | # 59 "/usr/include/gentoo-multilib/amd64/getopt.h" 3 4 | |
9354 | extern char *optarg; | |
9355 | # 73 "/usr/include/gentoo-multilib/amd64/getopt.h" 3 4 | |
9356 | extern int optind; | |
9357 | ||
9358 | ||
9359 | ||
9360 | ||
9361 | extern int opterr; | |
9362 | ||
9363 | ||
9364 | ||
9365 | extern int optopt; | |
9366 | # 152 "/usr/include/gentoo-multilib/amd64/getopt.h" 3 4 | |
9367 | extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) | |
9368 | throw (); | |
9369 | # 171 "/usr/include/gentoo-multilib/amd64/getopt.h" 3 4 | |
9370 | } | |
9371 | # 9 "/usr/include/getopt.h" 2 3 4 | |
9372 | # 836 "/usr/include/gentoo-multilib/amd64/unistd.h" 2 3 4 | |
9373 | ||
9374 | ||
9375 | ||
9376 | ||
9377 | ||
9378 | ||
9379 | ||
9380 | extern int gethostname (char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))); | |
9381 | ||
9382 | ||
9383 | ||
9384 | ||
9385 | ||
9386 | ||
9387 | extern int sethostname (__const char *__name, size_t __len) | |
9388 | throw () __attribute__ ((__nonnull__ (1))) ; | |
9389 | ||
9390 | ||
9391 | ||
9392 | extern int sethostid (long int __id) throw () ; | |
9393 | ||
9394 | ||
9395 | ||
9396 | ||
9397 | ||
9398 | extern int getdomainname (char *__name, size_t __len) | |
9399 | throw () __attribute__ ((__nonnull__ (1))) ; | |
9400 | extern int setdomainname (__const char *__name, size_t __len) | |
9401 | throw () __attribute__ ((__nonnull__ (1))) ; | |
9402 | ||
9403 | ||
9404 | ||
9405 | ||
9406 | ||
9407 | extern int vhangup (void) throw (); | |
9408 | ||
9409 | ||
9410 | extern int revoke (__const char *__file) throw () __attribute__ ((__nonnull__ (1))) ; | |
9411 | ||
9412 | ||
9413 | ||
9414 | ||
9415 | ||
9416 | ||
9417 | ||
9418 | extern int profil (unsigned short int *__sample_buffer, size_t __size, | |
9419 | size_t __offset, unsigned int __scale) | |
9420 | throw () __attribute__ ((__nonnull__ (1))); | |
9421 | ||
9422 | ||
9423 | ||
9424 | ||
9425 | ||
9426 | extern int acct (__const char *__name) throw (); | |
9427 | ||
9428 | ||
9429 | ||
9430 | extern char *getusershell (void) throw (); | |
9431 | extern void endusershell (void) throw (); | |
9432 | extern void setusershell (void) throw (); | |
9433 | ||
9434 | ||
9435 | ||
9436 | ||
9437 | ||
9438 | extern int daemon (int __nochdir, int __noclose) throw () ; | |
9439 | ||
9440 | ||
9441 | ||
9442 | ||
9443 | ||
9444 | ||
9445 | extern int chroot (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) ; | |
9446 | ||
9447 | ||
9448 | ||
9449 | extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1))); | |
9450 | # 921 "/usr/include/gentoo-multilib/amd64/unistd.h" 3 4 | |
9451 | extern int fsync (int __fd); | |
9452 | ||
9453 | ||
9454 | ||
9455 | ||
9456 | ||
9457 | ||
9458 | extern long int gethostid (void); | |
9459 | ||
9460 | ||
9461 | extern void sync (void) throw (); | |
9462 | ||
9463 | ||
9464 | ||
9465 | ||
9466 | extern int getpagesize (void) throw () __attribute__ ((__const__)); | |
9467 | ||
9468 | ||
9469 | ||
9470 | ||
9471 | extern int getdtablesize (void) throw (); | |
9472 | # 950 "/usr/include/gentoo-multilib/amd64/unistd.h" 3 4 | |
9473 | extern int truncate (__const char *__file, __off64_t __length) throw () __asm__ ("" "truncate64") __attribute__ ((__nonnull__ (1))) ; | |
9474 | ||
9475 | ||
9476 | ||
9477 | ||
9478 | ||
9479 | ||
9480 | ||
9481 | extern int truncate64 (__const char *__file, __off64_t __length) | |
9482 | throw () __attribute__ ((__nonnull__ (1))) ; | |
9483 | # 971 "/usr/include/gentoo-multilib/amd64/unistd.h" 3 4 | |
9484 | extern int ftruncate (int __fd, __off64_t __length) throw () __asm__ ("" "ftruncate64") ; | |
9485 | ||
9486 | ||
9487 | ||
9488 | ||
9489 | ||
9490 | ||
9491 | extern int ftruncate64 (int __fd, __off64_t __length) throw () ; | |
9492 | # 988 "/usr/include/gentoo-multilib/amd64/unistd.h" 3 4 | |
9493 | extern int brk (void *__addr) throw () ; | |
9494 | ||
9495 | ||
9496 | ||
9497 | ||
9498 | ||
9499 | extern void *sbrk (intptr_t __delta) throw (); | |
9500 | # 1009 "/usr/include/gentoo-multilib/amd64/unistd.h" 3 4 | |
9501 | extern long int syscall (long int __sysno, ...) throw (); | |
9502 | # 1035 "/usr/include/gentoo-multilib/amd64/unistd.h" 3 4 | |
9503 | extern int lockf (int __fd, int __cmd, __off64_t __len) __asm__ ("" "lockf64") ; | |
9504 | ||
9505 | ||
9506 | ||
9507 | ||
9508 | ||
9509 | ||
9510 | extern int lockf64 (int __fd, int __cmd, __off64_t __len) ; | |
9511 | # 1063 "/usr/include/gentoo-multilib/amd64/unistd.h" 3 4 | |
9512 | extern int fdatasync (int __fildes) throw (); | |
9513 | ||
9514 | ||
9515 | ||
9516 | ||
9517 | ||
9518 | ||
9519 | ||
9520 | extern char *crypt (__const char *__key, __const char *__salt) | |
9521 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
9522 | ||
9523 | ||
9524 | ||
9525 | extern void encrypt (char *__block, int __edflag) throw () __attribute__ ((__nonnull__ (1))); | |
9526 | ||
9527 | ||
9528 | ||
9529 | ||
9530 | ||
9531 | ||
9532 | extern void swab (__const void *__restrict __from, void *__restrict __to, | |
9533 | ssize_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); | |
9534 | ||
9535 | ||
9536 | ||
9537 | ||
9538 | ||
9539 | ||
9540 | ||
9541 | extern char *ctermid (char *__s) throw (); | |
9542 | # 1101 "/usr/include/gentoo-multilib/amd64/unistd.h" 3 4 | |
9543 | } | |
9544 | # 9 "/usr/include/unistd.h" 2 3 4 | |
9545 | # 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 2 3 | |
9546 | ||
9547 | typedef pthread_key_t __gthread_key_t; | |
9548 | typedef pthread_once_t __gthread_once_t; | |
9549 | typedef pthread_mutex_t __gthread_mutex_t; | |
9550 | typedef pthread_mutex_t __gthread_recursive_mutex_t; | |
9551 | # 88 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 3 | |
9552 | extern __typeof(pthread_once) __gthrw_pthread_once __attribute__ ((__weakref__("pthread_once"))); | |
9553 | extern __typeof(pthread_getspecific) __gthrw_pthread_getspecific __attribute__ ((__weakref__("pthread_getspecific"))); | |
9554 | extern __typeof(pthread_setspecific) __gthrw_pthread_setspecific __attribute__ ((__weakref__("pthread_setspecific"))); | |
9555 | extern __typeof(pthread_create) __gthrw_pthread_create __attribute__ ((__weakref__("pthread_create"))); | |
9556 | extern __typeof(pthread_cancel) __gthrw_pthread_cancel __attribute__ ((__weakref__("pthread_cancel"))); | |
9557 | extern __typeof(pthread_mutex_lock) __gthrw_pthread_mutex_lock __attribute__ ((__weakref__("pthread_mutex_lock"))); | |
9558 | extern __typeof(pthread_mutex_trylock) __gthrw_pthread_mutex_trylock __attribute__ ((__weakref__("pthread_mutex_trylock"))); | |
9559 | extern __typeof(pthread_mutex_unlock) __gthrw_pthread_mutex_unlock __attribute__ ((__weakref__("pthread_mutex_unlock"))); | |
9560 | extern __typeof(pthread_mutex_init) __gthrw_pthread_mutex_init __attribute__ ((__weakref__("pthread_mutex_init"))); | |
9561 | ||
9562 | ||
9563 | extern __typeof(pthread_key_create) __gthrw_pthread_key_create __attribute__ ((__weakref__("pthread_key_create"))); | |
9564 | extern __typeof(pthread_key_delete) __gthrw_pthread_key_delete __attribute__ ((__weakref__("pthread_key_delete"))); | |
9565 | extern __typeof(pthread_mutexattr_init) __gthrw_pthread_mutexattr_init __attribute__ ((__weakref__("pthread_mutexattr_init"))); | |
9566 | extern __typeof(pthread_mutexattr_settype) __gthrw_pthread_mutexattr_settype __attribute__ ((__weakref__("pthread_mutexattr_settype"))); | |
9567 | extern __typeof(pthread_mutexattr_destroy) __gthrw_pthread_mutexattr_destroy __attribute__ ((__weakref__("pthread_mutexattr_destroy"))); | |
9568 | # 145 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 3 | |
9569 | static inline int | |
9570 | __gthread_active_p (void) | |
9571 | { | |
9572 | static void *const __gthread_active_ptr | |
9573 | = __extension__ (void *) &__gthrw_pthread_cancel; | |
9574 | return __gthread_active_ptr != 0; | |
9575 | } | |
9576 | # 512 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 3 | |
9577 | static inline int | |
9578 | __gthread_once (__gthread_once_t *once, void (*func) (void)) | |
9579 | { | |
9580 | if (__gthread_active_p ()) | |
9581 | return __gthrw_pthread_once (once, func); | |
9582 | else | |
9583 | return -1; | |
9584 | } | |
9585 | ||
9586 | static inline int | |
9587 | __gthread_key_create (__gthread_key_t *key, void (*dtor) (void *)) | |
9588 | { | |
9589 | return __gthrw_pthread_key_create (key, dtor); | |
9590 | } | |
9591 | ||
9592 | static inline int | |
9593 | __gthread_key_delete (__gthread_key_t key) | |
9594 | { | |
9595 | return __gthrw_pthread_key_delete (key); | |
9596 | } | |
9597 | ||
9598 | static inline void * | |
9599 | __gthread_getspecific (__gthread_key_t key) | |
9600 | { | |
9601 | return __gthrw_pthread_getspecific (key); | |
9602 | } | |
9603 | ||
9604 | static inline int | |
9605 | __gthread_setspecific (__gthread_key_t key, const void *ptr) | |
9606 | { | |
9607 | return __gthrw_pthread_setspecific (key, ptr); | |
9608 | } | |
9609 | ||
9610 | static inline int | |
9611 | __gthread_mutex_lock (__gthread_mutex_t *mutex) | |
9612 | { | |
9613 | if (__gthread_active_p ()) | |
9614 | return __gthrw_pthread_mutex_lock (mutex); | |
9615 | else | |
9616 | return 0; | |
9617 | } | |
9618 | ||
9619 | static inline int | |
9620 | __gthread_mutex_trylock (__gthread_mutex_t *mutex) | |
9621 | { | |
9622 | if (__gthread_active_p ()) | |
9623 | return __gthrw_pthread_mutex_trylock (mutex); | |
9624 | else | |
9625 | return 0; | |
9626 | } | |
9627 | ||
9628 | static inline int | |
9629 | __gthread_mutex_unlock (__gthread_mutex_t *mutex) | |
9630 | { | |
9631 | if (__gthread_active_p ()) | |
9632 | return __gthrw_pthread_mutex_unlock (mutex); | |
9633 | else | |
9634 | return 0; | |
9635 | } | |
9636 | # 594 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 3 | |
9637 | static inline int | |
9638 | __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex) | |
9639 | { | |
9640 | return __gthread_mutex_lock (mutex); | |
9641 | } | |
9642 | ||
9643 | static inline int | |
9644 | __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex) | |
9645 | { | |
9646 | return __gthread_mutex_trylock (mutex); | |
9647 | } | |
9648 | ||
9649 | static inline int | |
9650 | __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex) | |
9651 | { | |
9652 | return __gthread_mutex_unlock (mutex); | |
9653 | } | |
9654 | # 115 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr.h" 2 3 | |
9655 | ||
9656 | ||
9657 | ||
9658 | ||
9659 | ||
9660 | ||
9661 | ||
9662 | #pragma GCC visibility pop | |
9663 | # 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/c++io.h" 2 3 | |
9664 | ||
9665 | namespace std | |
9666 | { | |
9667 | typedef __gthread_mutex_t __c_lock; | |
9668 | ||
9669 | ||
9670 | typedef FILE __c_file; | |
9671 | } | |
9672 | # 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/iosfwd" 2 3 | |
9673 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cctype" 1 3 | |
9674 | # 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cctype" 3 | |
9675 | ||
9676 | # 49 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cctype" 3 | |
9677 | #pragma GCC visibility push(default) | |
9678 | ||
9679 | ||
9680 | # 1 "/usr/include/ctype.h" 1 3 4 | |
9681 | # 53 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cctype" 2 3 | |
9682 | # 69 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cctype" 3 | |
9683 | namespace std | |
9684 | { | |
9685 | using ::isalnum; | |
9686 | using ::isalpha; | |
9687 | using ::iscntrl; | |
9688 | using ::isdigit; | |
9689 | using ::isgraph; | |
9690 | using ::islower; | |
9691 | using ::isprint; | |
9692 | using ::ispunct; | |
9693 | using ::isspace; | |
9694 | using ::isupper; | |
9695 | using ::isxdigit; | |
9696 | using ::tolower; | |
9697 | using ::toupper; | |
9698 | } | |
9699 | ||
9700 | #pragma GCC visibility pop | |
9701 | # 49 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/iosfwd" 2 3 | |
9702 | ||
9703 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/postypes.h" 1 3 | |
9704 | # 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/postypes.h" 3 | |
9705 | ||
9706 | # 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/postypes.h" 3 | |
9707 | ||
9708 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cwchar" 1 3 | |
9709 | # 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cwchar" 3 | |
9710 | ||
9711 | # 49 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cwchar" 3 | |
9712 | #pragma GCC visibility push(default) | |
9713 | ||
9714 | ||
9715 | ||
9716 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ctime" 1 3 | |
9717 | # 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ctime" 3 | |
9718 | ||
9719 | # 49 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ctime" 3 | |
9720 | #pragma GCC visibility push(default) | |
9721 | ||
9722 | ||
9723 | ||
9724 | # 1 "/usr/include/time.h" 1 3 4 | |
9725 | # 54 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ctime" 2 3 | |
9726 | # 66 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ctime" 3 | |
9727 | namespace std | |
9728 | { | |
9729 | using ::clock_t; | |
9730 | using ::time_t; | |
9731 | using ::tm; | |
9732 | ||
9733 | using ::clock; | |
9734 | using ::difftime; | |
9735 | using ::mktime; | |
9736 | using ::time; | |
9737 | using ::asctime; | |
9738 | using ::ctime; | |
9739 | using ::gmtime; | |
9740 | using ::localtime; | |
9741 | using ::strftime; | |
9742 | } | |
9743 | ||
9744 | #pragma GCC visibility pop | |
9745 | # 54 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cwchar" 2 3 | |
9746 | ||
9747 | ||
9748 | # 1 "/usr/include/wchar.h" 1 3 4 | |
9749 | # 57 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cwchar" 2 3 | |
9750 | # 71 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cwchar" 3 | |
9751 | namespace std | |
9752 | { | |
9753 | using ::mbstate_t; | |
9754 | } | |
9755 | # 143 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cwchar" 3 | |
9756 | namespace std | |
9757 | { | |
9758 | using ::wint_t; | |
9759 | ||
9760 | using ::btowc; | |
9761 | using ::fgetwc; | |
9762 | using ::fgetws; | |
9763 | using ::fputwc; | |
9764 | using ::fputws; | |
9765 | using ::fwide; | |
9766 | using ::fwprintf; | |
9767 | using ::fwscanf; | |
9768 | using ::getwc; | |
9769 | using ::getwchar; | |
9770 | using ::mbrlen; | |
9771 | using ::mbrtowc; | |
9772 | using ::mbsinit; | |
9773 | using ::mbsrtowcs; | |
9774 | using ::putwc; | |
9775 | using ::putwchar; | |
9776 | using ::swprintf; | |
9777 | using ::swscanf; | |
9778 | using ::ungetwc; | |
9779 | using ::vfwprintf; | |
9780 | ||
9781 | using ::vfwscanf; | |
9782 | ||
9783 | using ::vswprintf; | |
9784 | ||
9785 | using ::vswscanf; | |
9786 | ||
9787 | using ::vwprintf; | |
9788 | ||
9789 | using ::vwscanf; | |
9790 | ||
9791 | using ::wcrtomb; | |
9792 | using ::wcscat; | |
9793 | using ::wcscmp; | |
9794 | using ::wcscoll; | |
9795 | using ::wcscpy; | |
9796 | using ::wcscspn; | |
9797 | ||
9798 | ||
9799 | ||
9800 | using ::wcslen; | |
9801 | using ::wcsncat; | |
9802 | using ::wcsncmp; | |
9803 | using ::wcsncpy; | |
9804 | using ::wcsrtombs; | |
9805 | using ::wcsspn; | |
9806 | using ::wcstod; | |
9807 | ||
9808 | using ::wcstof; | |
9809 | ||
9810 | using ::wcstok; | |
9811 | using ::wcstol; | |
9812 | using ::wcstoul; | |
9813 | using ::wcsxfrm; | |
9814 | using ::wctob; | |
9815 | using ::wmemcmp; | |
9816 | using ::wmemcpy; | |
9817 | using ::wmemmove; | |
9818 | using ::wmemset; | |
9819 | using ::wprintf; | |
9820 | using ::wscanf; | |
9821 | ||
9822 | using ::wcschr; | |
9823 | ||
9824 | inline wchar_t* | |
9825 | wcschr(wchar_t* __p, wchar_t __c) | |
9826 | { return wcschr(const_cast<const wchar_t*>(__p), __c); } | |
9827 | ||
9828 | using ::wcspbrk; | |
9829 | ||
9830 | inline wchar_t* | |
9831 | wcspbrk(wchar_t* __s1, const wchar_t* __s2) | |
9832 | { return wcspbrk(const_cast<const wchar_t*>(__s1), __s2); } | |
9833 | ||
9834 | using ::wcsrchr; | |
9835 | ||
9836 | inline wchar_t* | |
9837 | wcsrchr(wchar_t* __p, wchar_t __c) | |
9838 | { return wcsrchr(const_cast<const wchar_t*>(__p), __c); } | |
9839 | ||
9840 | using ::wcsstr; | |
9841 | ||
9842 | inline wchar_t* | |
9843 | wcsstr(wchar_t* __s1, const wchar_t* __s2) | |
9844 | { return wcsstr(const_cast<const wchar_t*>(__s1), __s2); } | |
9845 | ||
9846 | using ::wmemchr; | |
9847 | ||
9848 | inline wchar_t* | |
9849 | wmemchr(wchar_t* __p, wchar_t __c, size_t __n) | |
9850 | { return wmemchr(const_cast<const wchar_t*>(__p), __c, __n); } | |
9851 | } | |
9852 | ||
9853 | ||
9854 | ||
9855 | ||
9856 | ||
9857 | ||
9858 | ||
9859 | namespace __gnu_cxx | |
9860 | { | |
9861 | ||
9862 | ||
9863 | ||
9864 | ||
9865 | ||
9866 | using ::wcstold; | |
9867 | # 262 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cwchar" 3 | |
9868 | using ::wcstoll; | |
9869 | using ::wcstoull; | |
9870 | ||
9871 | } | |
9872 | ||
9873 | namespace std | |
9874 | { | |
9875 | using __gnu_cxx::wcstold; | |
9876 | using __gnu_cxx::wcstoll; | |
9877 | using __gnu_cxx::wcstoull; | |
9878 | } | |
9879 | ||
9880 | ||
9881 | ||
9882 | ||
9883 | #pragma GCC visibility pop | |
9884 | # 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/postypes.h" 2 3 | |
9885 | ||
9886 | ||
9887 | # 1 "/usr/include/stdint.h" 1 3 4 | |
9888 | ||
9889 | ||
9890 | ||
9891 | ||
9892 | ||
9893 | ||
9894 | ||
9895 | # 1 "/usr/include/gentoo-multilib/amd64/stdint.h" 1 3 4 | |
9896 | # 26 "/usr/include/gentoo-multilib/amd64/stdint.h" 3 4 | |
9897 | # 1 "/usr/include/features.h" 1 3 4 | |
9898 | # 27 "/usr/include/gentoo-multilib/amd64/stdint.h" 2 3 4 | |
9899 | # 1 "/usr/include/bits/wchar.h" 1 3 4 | |
9900 | # 28 "/usr/include/gentoo-multilib/amd64/stdint.h" 2 3 4 | |
9901 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
9902 | ||
9903 | ||
9904 | ||
9905 | ||
9906 | ||
9907 | ||
9908 | ||
9909 | # 1 "/usr/include/gentoo-multilib/amd64/bits/wordsize.h" 1 3 4 | |
9910 | # 9 "/usr/include/bits/wordsize.h" 2 3 4 | |
9911 | # 29 "/usr/include/gentoo-multilib/amd64/stdint.h" 2 3 4 | |
9912 | # 49 "/usr/include/gentoo-multilib/amd64/stdint.h" 3 4 | |
9913 | typedef unsigned char uint8_t; | |
9914 | typedef unsigned short int uint16_t; | |
9915 | ||
9916 | typedef unsigned int uint32_t; | |
9917 | ||
9918 | ||
9919 | ||
9920 | typedef unsigned long int uint64_t; | |
9921 | # 66 "/usr/include/gentoo-multilib/amd64/stdint.h" 3 4 | |
9922 | typedef signed char int_least8_t; | |
9923 | typedef short int int_least16_t; | |
9924 | typedef int int_least32_t; | |
9925 | ||
9926 | typedef long int int_least64_t; | |
9927 | ||
9928 | ||
9929 | ||
9930 | ||
9931 | ||
9932 | ||
9933 | typedef unsigned char uint_least8_t; | |
9934 | typedef unsigned short int uint_least16_t; | |
9935 | typedef unsigned int uint_least32_t; | |
9936 | ||
9937 | typedef unsigned long int uint_least64_t; | |
9938 | # 91 "/usr/include/gentoo-multilib/amd64/stdint.h" 3 4 | |
9939 | typedef signed char int_fast8_t; | |
9940 | ||
9941 | typedef long int int_fast16_t; | |
9942 | typedef long int int_fast32_t; | |
9943 | typedef long int int_fast64_t; | |
9944 | # 104 "/usr/include/gentoo-multilib/amd64/stdint.h" 3 4 | |
9945 | typedef unsigned char uint_fast8_t; | |
9946 | ||
9947 | typedef unsigned long int uint_fast16_t; | |
9948 | typedef unsigned long int uint_fast32_t; | |
9949 | typedef unsigned long int uint_fast64_t; | |
9950 | # 123 "/usr/include/gentoo-multilib/amd64/stdint.h" 3 4 | |
9951 | typedef unsigned long int uintptr_t; | |
9952 | # 135 "/usr/include/gentoo-multilib/amd64/stdint.h" 3 4 | |
9953 | typedef long int intmax_t; | |
9954 | typedef unsigned long int uintmax_t; | |
9955 | # 9 "/usr/include/stdint.h" 2 3 4 | |
9956 | # 50 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/postypes.h" 2 3 | |
9957 | ||
9958 | ||
9959 | namespace std | |
9960 | { | |
9961 | # 72 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/postypes.h" 3 | |
9962 | typedef int64_t streamoff; | |
9963 | ||
9964 | ||
9965 | ||
9966 | ||
9967 | ||
9968 | typedef ptrdiff_t streamsize; | |
9969 | ||
9970 | template<typename _StateT> | |
9971 | class fpos; | |
9972 | # 94 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/postypes.h" 3 | |
9973 | template<typename _StateT> | |
9974 | class fpos | |
9975 | { | |
9976 | private: | |
9977 | streamoff _M_off; | |
9978 | _StateT _M_state; | |
9979 | ||
9980 | public: | |
9981 | ||
9982 | ||
9983 | ||
9984 | ||
9985 | fpos() | |
9986 | : _M_off(0), _M_state() { } | |
9987 | # 116 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/postypes.h" 3 | |
9988 | fpos(streamoff __off) | |
9989 | : _M_off(__off), _M_state() { } | |
9990 | ||
9991 | ||
9992 | operator streamoff() const { return _M_off; } | |
9993 | ||
9994 | ||
9995 | void | |
9996 | state(_StateT __st) | |
9997 | { _M_state = __st; } | |
9998 | ||
9999 | ||
10000 | _StateT | |
10001 | state() const | |
10002 | { return _M_state; } | |
10003 | ||
10004 | ||
10005 | ||
10006 | ||
10007 | ||
10008 | ||
10009 | bool | |
10010 | operator==(const fpos& __other) const | |
10011 | { return _M_off == __other._M_off; } | |
10012 | ||
10013 | ||
10014 | bool | |
10015 | operator!=(const fpos& __other) const | |
10016 | { return _M_off != __other._M_off; } | |
10017 | ||
10018 | ||
10019 | ||
10020 | ||
10021 | ||
10022 | fpos& | |
10023 | operator+=(streamoff __off) | |
10024 | { | |
10025 | _M_off += __off; | |
10026 | return *this; | |
10027 | } | |
10028 | ||
10029 | ||
10030 | ||
10031 | ||
10032 | ||
10033 | fpos& | |
10034 | operator-=(streamoff __off) | |
10035 | { | |
10036 | _M_off -= __off; | |
10037 | return *this; | |
10038 | } | |
10039 | ||
10040 | ||
10041 | ||
10042 | ||
10043 | ||
10044 | ||
10045 | ||
10046 | fpos | |
10047 | operator+(streamoff __off) const | |
10048 | { | |
10049 | fpos __pos(*this); | |
10050 | __pos += __off; | |
10051 | return __pos; | |
10052 | } | |
10053 | ||
10054 | ||
10055 | ||
10056 | ||
10057 | ||
10058 | ||
10059 | ||
10060 | fpos | |
10061 | operator-(streamoff __off) const | |
10062 | { | |
10063 | fpos __pos(*this); | |
10064 | __pos -= __off; | |
10065 | return __pos; | |
10066 | } | |
10067 | ||
10068 | ||
10069 | ||
10070 | ||
10071 | ||
10072 | ||
10073 | streamoff | |
10074 | operator-(const fpos& __other) const | |
10075 | { return _M_off - __other._M_off; } | |
10076 | }; | |
10077 | ||
10078 | ||
10079 | ||
10080 | ||
10081 | ||
10082 | typedef fpos<mbstate_t> streampos; | |
10083 | ||
10084 | typedef fpos<mbstate_t> wstreampos; | |
10085 | } | |
10086 | # 51 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/iosfwd" 2 3 | |
10087 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/functexcept.h" 1 3 | |
10088 | # 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/functexcept.h" 3 | |
10089 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/exception_defines.h" 1 3 | |
10090 | # 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/functexcept.h" 2 3 | |
10091 | ||
10092 | namespace std | |
10093 | { | |
10094 | ||
10095 | void | |
10096 | __throw_bad_exception(void) __attribute__((__noreturn__)); | |
10097 | ||
10098 | ||
10099 | void | |
10100 | __throw_bad_alloc(void) __attribute__((__noreturn__)); | |
10101 | ||
10102 | ||
10103 | void | |
10104 | __throw_bad_cast(void) __attribute__((__noreturn__)); | |
10105 | ||
10106 | void | |
10107 | __throw_bad_typeid(void) __attribute__((__noreturn__)); | |
10108 | ||
10109 | ||
10110 | void | |
10111 | __throw_logic_error(const char*) __attribute__((__noreturn__)); | |
10112 | ||
10113 | void | |
10114 | __throw_domain_error(const char*) __attribute__((__noreturn__)); | |
10115 | ||
10116 | void | |
10117 | __throw_invalid_argument(const char*) __attribute__((__noreturn__)); | |
10118 | ||
10119 | void | |
10120 | __throw_length_error(const char*) __attribute__((__noreturn__)); | |
10121 | ||
10122 | void | |
10123 | __throw_out_of_range(const char*) __attribute__((__noreturn__)); | |
10124 | ||
10125 | void | |
10126 | __throw_runtime_error(const char*) __attribute__((__noreturn__)); | |
10127 | ||
10128 | void | |
10129 | __throw_range_error(const char*) __attribute__((__noreturn__)); | |
10130 | ||
10131 | void | |
10132 | __throw_overflow_error(const char*) __attribute__((__noreturn__)); | |
10133 | ||
10134 | void | |
10135 | __throw_underflow_error(const char*) __attribute__((__noreturn__)); | |
10136 | ||
10137 | ||
10138 | void | |
10139 | __throw_ios_failure(const char*) __attribute__((__noreturn__)); | |
10140 | } | |
10141 | # 52 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/iosfwd" 2 3 | |
10142 | ||
10143 | namespace std | |
10144 | { | |
10145 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
10146 | class basic_ios; | |
10147 | ||
10148 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
10149 | class basic_streambuf; | |
10150 | ||
10151 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
10152 | class basic_istream; | |
10153 | ||
10154 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
10155 | class basic_ostream; | |
10156 | ||
10157 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
10158 | class basic_iostream; | |
10159 | ||
10160 | template<typename _CharT, typename _Traits = char_traits<_CharT>, | |
10161 | typename _Alloc = allocator<_CharT> > | |
10162 | class basic_stringbuf; | |
10163 | ||
10164 | template<typename _CharT, typename _Traits = char_traits<_CharT>, | |
10165 | typename _Alloc = allocator<_CharT> > | |
10166 | class basic_istringstream; | |
10167 | ||
10168 | template<typename _CharT, typename _Traits = char_traits<_CharT>, | |
10169 | typename _Alloc = allocator<_CharT> > | |
10170 | class basic_ostringstream; | |
10171 | ||
10172 | template<typename _CharT, typename _Traits = char_traits<_CharT>, | |
10173 | typename _Alloc = allocator<_CharT> > | |
10174 | class basic_stringstream; | |
10175 | ||
10176 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
10177 | class basic_filebuf; | |
10178 | ||
10179 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
10180 | class basic_ifstream; | |
10181 | ||
10182 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
10183 | class basic_ofstream; | |
10184 | ||
10185 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
10186 | class basic_fstream; | |
10187 | ||
10188 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
10189 | class istreambuf_iterator; | |
10190 | ||
10191 | template<typename _CharT, typename _Traits = char_traits<_CharT> > | |
10192 | class ostreambuf_iterator; | |
10193 | ||
10194 | ||
10195 | ||
10196 | class ios_base; | |
10197 | # 136 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/iosfwd" 3 | |
10198 | typedef basic_ios<char> ios; | |
10199 | typedef basic_streambuf<char> streambuf; | |
10200 | typedef basic_istream<char> istream; | |
10201 | typedef basic_ostream<char> ostream; | |
10202 | typedef basic_iostream<char> iostream; | |
10203 | typedef basic_stringbuf<char> stringbuf; | |
10204 | typedef basic_istringstream<char> istringstream; | |
10205 | typedef basic_ostringstream<char> ostringstream; | |
10206 | typedef basic_stringstream<char> stringstream; | |
10207 | typedef basic_filebuf<char> filebuf; | |
10208 | typedef basic_ifstream<char> ifstream; | |
10209 | typedef basic_ofstream<char> ofstream; | |
10210 | typedef basic_fstream<char> fstream; | |
10211 | ||
10212 | ||
10213 | typedef basic_ios<wchar_t> wios; | |
10214 | typedef basic_streambuf<wchar_t> wstreambuf; | |
10215 | typedef basic_istream<wchar_t> wistream; | |
10216 | typedef basic_ostream<wchar_t> wostream; | |
10217 | typedef basic_iostream<wchar_t> wiostream; | |
10218 | typedef basic_stringbuf<wchar_t> wstringbuf; | |
10219 | typedef basic_istringstream<wchar_t> wistringstream; | |
10220 | typedef basic_ostringstream<wchar_t> wostringstream; | |
10221 | typedef basic_stringstream<wchar_t> wstringstream; | |
10222 | typedef basic_filebuf<wchar_t> wfilebuf; | |
10223 | typedef basic_ifstream<wchar_t> wifstream; | |
10224 | typedef basic_ofstream<wchar_t> wofstream; | |
10225 | typedef basic_fstream<wchar_t> wfstream; | |
10226 | ||
10227 | ||
10228 | } | |
10229 | ||
10230 | #pragma GCC visibility pop | |
10231 | # 70 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 2 3 | |
10232 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_pair.h" 1 3 | |
10233 | # 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_pair.h" 3 | |
10234 | namespace std | |
10235 | { | |
10236 | ||
10237 | template<class _T1, class _T2> | |
10238 | struct pair | |
10239 | { | |
10240 | typedef _T1 first_type; | |
10241 | typedef _T2 second_type; | |
10242 | ||
10243 | _T1 first; | |
10244 | _T2 second; | |
10245 | ||
10246 | ||
10247 | ||
10248 | ||
10249 | ||
10250 | pair() | |
10251 | : first(), second() { } | |
10252 | ||
10253 | ||
10254 | pair(const _T1& __a, const _T2& __b) | |
10255 | : first(__a), second(__b) { } | |
10256 | ||
10257 | ||
10258 | template<class _U1, class _U2> | |
10259 | pair(const pair<_U1, _U2>& __p) | |
10260 | : first(__p.first), second(__p.second) { } | |
10261 | }; | |
10262 | ||
10263 | ||
10264 | template<class _T1, class _T2> | |
10265 | inline bool | |
10266 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | |
10267 | { return __x.first == __y.first && __x.second == __y.second; } | |
10268 | ||
10269 | ||
10270 | template<class _T1, class _T2> | |
10271 | inline bool | |
10272 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | |
10273 | { return __x.first < __y.first | |
10274 | || (!(__y.first < __x.first) && __x.second < __y.second); } | |
10275 | ||
10276 | ||
10277 | template<class _T1, class _T2> | |
10278 | inline bool | |
10279 | operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | |
10280 | { return !(__x == __y); } | |
10281 | ||
10282 | ||
10283 | template<class _T1, class _T2> | |
10284 | inline bool | |
10285 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | |
10286 | { return __y < __x; } | |
10287 | ||
10288 | ||
10289 | template<class _T1, class _T2> | |
10290 | inline bool | |
10291 | operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | |
10292 | { return !(__y < __x); } | |
10293 | ||
10294 | ||
10295 | template<class _T1, class _T2> | |
10296 | inline bool | |
10297 | operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | |
10298 | { return !(__x < __y); } | |
10299 | # 142 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_pair.h" 3 | |
10300 | template<class _T1, class _T2> | |
10301 | inline pair<_T1, _T2> | |
10302 | make_pair(_T1 __x, _T2 __y) | |
10303 | { return pair<_T1, _T2>(__x, __y); } | |
10304 | } | |
10305 | # 71 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 2 3 | |
10306 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/cpp_type_traits.h" 1 3 | |
10307 | # 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/cpp_type_traits.h" 3 | |
10308 | ||
10309 | # 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/cpp_type_traits.h" 3 | |
10310 | # 75 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/cpp_type_traits.h" 3 | |
10311 | namespace __gnu_internal | |
10312 | { | |
10313 | typedef char __one; | |
10314 | typedef char __two[2]; | |
10315 | ||
10316 | template<typename _Tp> | |
10317 | __one __test_type(int _Tp::*); | |
10318 | template<typename _Tp> | |
10319 | __two& __test_type(...); | |
10320 | } | |
10321 | ||
10322 | ||
10323 | namespace __gnu_cxx | |
10324 | { | |
10325 | template<typename _Iterator, typename _Container> | |
10326 | class __normal_iterator; | |
10327 | } | |
10328 | ||
10329 | struct __true_type { }; | |
10330 | struct __false_type { }; | |
10331 | ||
10332 | namespace std | |
10333 | { | |
10334 | template<bool> | |
10335 | struct __truth_type | |
10336 | { typedef __false_type __type; }; | |
10337 | ||
10338 | template<> | |
10339 | struct __truth_type<true> | |
10340 | { typedef __true_type __type; }; | |
10341 | ||
10342 | ||
10343 | ||
10344 | template<class _Sp, class _Tp> | |
10345 | struct __traitor | |
10346 | { | |
10347 | enum { __value = bool(_Sp::__value) || bool(_Tp::__value) }; | |
10348 | typedef typename __truth_type<__value>::__type __type; | |
10349 | }; | |
10350 | ||
10351 | ||
10352 | template<typename, typename> | |
10353 | struct __are_same | |
10354 | { | |
10355 | enum { __value = 0 }; | |
10356 | typedef __false_type __type; | |
10357 | }; | |
10358 | ||
10359 | template<typename _Tp> | |
10360 | struct __are_same<_Tp, _Tp> | |
10361 | { | |
10362 | enum { __value = 1 }; | |
10363 | typedef __true_type __type; | |
10364 | }; | |
10365 | ||
10366 | ||
10367 | template<typename, bool> | |
10368 | struct __enable_if | |
10369 | { | |
10370 | }; | |
10371 | ||
10372 | template<typename _Tp> | |
10373 | struct __enable_if<_Tp, true> | |
10374 | { | |
10375 | typedef _Tp __type; | |
10376 | }; | |
10377 | ||
10378 | ||
10379 | template<typename _Tp> | |
10380 | struct __is_void | |
10381 | { | |
10382 | enum { __value = 0 }; | |
10383 | typedef __false_type __type; | |
10384 | }; | |
10385 | ||
10386 | template<> | |
10387 | struct __is_void<void> | |
10388 | { | |
10389 | enum { __value = 1 }; | |
10390 | typedef __true_type __type; | |
10391 | }; | |
10392 | ||
10393 | ||
10394 | ||
10395 | ||
10396 | template<typename _Tp> | |
10397 | struct __is_integer | |
10398 | { | |
10399 | enum { __value = 0 }; | |
10400 | typedef __false_type __type; | |
10401 | }; | |
10402 | ||
10403 | ||
10404 | ||
10405 | ||
10406 | template<> | |
10407 | struct __is_integer<bool> | |
10408 | { | |
10409 | enum { __value = 1 }; | |
10410 | typedef __true_type __type; | |
10411 | }; | |
10412 | ||
10413 | template<> | |
10414 | struct __is_integer<char> | |
10415 | { | |
10416 | enum { __value = 1 }; | |
10417 | typedef __true_type __type; | |
10418 | }; | |
10419 | ||
10420 | template<> | |
10421 | struct __is_integer<signed char> | |
10422 | { | |
10423 | enum { __value = 1 }; | |
10424 | typedef __true_type __type; | |
10425 | }; | |
10426 | ||
10427 | template<> | |
10428 | struct __is_integer<unsigned char> | |
10429 | { | |
10430 | enum { __value = 1 }; | |
10431 | typedef __true_type __type; | |
10432 | }; | |
10433 | ||
10434 | ||
10435 | template<> | |
10436 | struct __is_integer<wchar_t> | |
10437 | { | |
10438 | enum { __value = 1 }; | |
10439 | typedef __true_type __type; | |
10440 | }; | |
10441 | ||
10442 | ||
10443 | template<> | |
10444 | struct __is_integer<short> | |
10445 | { | |
10446 | enum { __value = 1 }; | |
10447 | typedef __true_type __type; | |
10448 | }; | |
10449 | ||
10450 | template<> | |
10451 | struct __is_integer<unsigned short> | |
10452 | { | |
10453 | enum { __value = 1 }; | |
10454 | typedef __true_type __type; | |
10455 | }; | |
10456 | ||
10457 | template<> | |
10458 | struct __is_integer<int> | |
10459 | { | |
10460 | enum { __value = 1 }; | |
10461 | typedef __true_type __type; | |
10462 | }; | |
10463 | ||
10464 | template<> | |
10465 | struct __is_integer<unsigned int> | |
10466 | { | |
10467 | enum { __value = 1 }; | |
10468 | typedef __true_type __type; | |
10469 | }; | |
10470 | ||
10471 | template<> | |
10472 | struct __is_integer<long> | |
10473 | { | |
10474 | enum { __value = 1 }; | |
10475 | typedef __true_type __type; | |
10476 | }; | |
10477 | ||
10478 | template<> | |
10479 | struct __is_integer<unsigned long> | |
10480 | { | |
10481 | enum { __value = 1 }; | |
10482 | typedef __true_type __type; | |
10483 | }; | |
10484 | ||
10485 | template<> | |
10486 | struct __is_integer<long long> | |
10487 | { | |
10488 | enum { __value = 1 }; | |
10489 | typedef __true_type __type; | |
10490 | }; | |
10491 | ||
10492 | template<> | |
10493 | struct __is_integer<unsigned long long> | |
10494 | { | |
10495 | enum { __value = 1 }; | |
10496 | typedef __true_type __type; | |
10497 | }; | |
10498 | ||
10499 | ||
10500 | ||
10501 | ||
10502 | template<typename _Tp> | |
10503 | struct __is_floating | |
10504 | { | |
10505 | enum { __value = 0 }; | |
10506 | typedef __false_type __type; | |
10507 | }; | |
10508 | ||
10509 | ||
10510 | template<> | |
10511 | struct __is_floating<float> | |
10512 | { | |
10513 | enum { __value = 1 }; | |
10514 | typedef __true_type __type; | |
10515 | }; | |
10516 | ||
10517 | template<> | |
10518 | struct __is_floating<double> | |
10519 | { | |
10520 | enum { __value = 1 }; | |
10521 | typedef __true_type __type; | |
10522 | }; | |
10523 | ||
10524 | template<> | |
10525 | struct __is_floating<long double> | |
10526 | { | |
10527 | enum { __value = 1 }; | |
10528 | typedef __true_type __type; | |
10529 | }; | |
10530 | ||
10531 | ||
10532 | ||
10533 | ||
10534 | template<typename _Tp> | |
10535 | struct __is_pointer | |
10536 | { | |
10537 | enum { __value = 0 }; | |
10538 | typedef __false_type __type; | |
10539 | }; | |
10540 | ||
10541 | template<typename _Tp> | |
10542 | struct __is_pointer<_Tp*> | |
10543 | { | |
10544 | enum { __value = 1 }; | |
10545 | typedef __true_type __type; | |
10546 | }; | |
10547 | ||
10548 | ||
10549 | ||
10550 | ||
10551 | template<typename _Tp> | |
10552 | struct __is_normal_iterator | |
10553 | { | |
10554 | enum { __value = 0 }; | |
10555 | typedef __false_type __type; | |
10556 | }; | |
10557 | ||
10558 | template<typename _Iterator, typename _Container> | |
10559 | struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator, | |
10560 | _Container> > | |
10561 | { | |
10562 | enum { __value = 1 }; | |
10563 | typedef __true_type __type; | |
10564 | }; | |
10565 | ||
10566 | ||
10567 | ||
10568 | ||
10569 | template<typename _Tp> | |
10570 | struct __is_arithmetic | |
10571 | : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> > | |
10572 | { }; | |
10573 | ||
10574 | ||
10575 | ||
10576 | ||
10577 | template<typename _Tp> | |
10578 | struct __is_fundamental | |
10579 | : public __traitor<__is_void<_Tp>, __is_arithmetic<_Tp> > | |
10580 | { }; | |
10581 | ||
10582 | ||
10583 | ||
10584 | ||
10585 | template<typename _Tp> | |
10586 | struct __is_scalar | |
10587 | : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > | |
10588 | { }; | |
10589 | ||
10590 | ||
10591 | ||
10592 | ||
10593 | template<typename _Tp> | |
10594 | struct __is_pod | |
10595 | { | |
10596 | enum | |
10597 | { | |
10598 | __value = (sizeof(__gnu_internal::__test_type<_Tp>(0)) | |
10599 | != sizeof(__gnu_internal::__one)) | |
10600 | }; | |
10601 | }; | |
10602 | ||
10603 | ||
10604 | ||
10605 | ||
10606 | template<typename _Tp> | |
10607 | struct __is_empty | |
10608 | { | |
10609 | private: | |
10610 | template<typename> | |
10611 | struct __first { }; | |
10612 | template<typename _Up> | |
10613 | struct __second | |
10614 | : public _Up { }; | |
10615 | ||
10616 | public: | |
10617 | enum | |
10618 | { | |
10619 | __value = sizeof(__first<_Tp>) == sizeof(__second<_Tp>) | |
10620 | }; | |
10621 | }; | |
10622 | ||
10623 | } | |
10624 | # 72 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 2 3 | |
10625 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator_base_types.h" 1 3 | |
10626 | # 67 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator_base_types.h" 3 | |
10627 | ||
10628 | # 68 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator_base_types.h" 3 | |
10629 | ||
10630 | namespace std | |
10631 | { | |
10632 | # 80 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator_base_types.h" 3 | |
10633 | struct input_iterator_tag {}; | |
10634 | ||
10635 | struct output_iterator_tag {}; | |
10636 | ||
10637 | struct forward_iterator_tag : public input_iterator_tag {}; | |
10638 | ||
10639 | ||
10640 | struct bidirectional_iterator_tag : public forward_iterator_tag {}; | |
10641 | ||
10642 | ||
10643 | struct random_access_iterator_tag : public bidirectional_iterator_tag {}; | |
10644 | # 104 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator_base_types.h" 3 | |
10645 | template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t, | |
10646 | typename _Pointer = _Tp*, typename _Reference = _Tp&> | |
10647 | struct iterator | |
10648 | { | |
10649 | ||
10650 | typedef _Category iterator_category; | |
10651 | ||
10652 | typedef _Tp value_type; | |
10653 | ||
10654 | typedef _Distance difference_type; | |
10655 | ||
10656 | typedef _Pointer pointer; | |
10657 | ||
10658 | typedef _Reference reference; | |
10659 | }; | |
10660 | ||
10661 | ||
10662 | ||
10663 | ||
10664 | ||
10665 | ||
10666 | ||
10667 | template<typename _Iterator> | |
10668 | struct iterator_traits | |
10669 | { | |
10670 | typedef typename _Iterator::iterator_category iterator_category; | |
10671 | typedef typename _Iterator::value_type value_type; | |
10672 | typedef typename _Iterator::difference_type difference_type; | |
10673 | typedef typename _Iterator::pointer pointer; | |
10674 | typedef typename _Iterator::reference reference; | |
10675 | }; | |
10676 | ||
10677 | template<typename _Tp> | |
10678 | struct iterator_traits<_Tp*> | |
10679 | { | |
10680 | typedef random_access_iterator_tag iterator_category; | |
10681 | typedef _Tp value_type; | |
10682 | typedef ptrdiff_t difference_type; | |
10683 | typedef _Tp* pointer; | |
10684 | typedef _Tp& reference; | |
10685 | }; | |
10686 | ||
10687 | template<typename _Tp> | |
10688 | struct iterator_traits<const _Tp*> | |
10689 | { | |
10690 | typedef random_access_iterator_tag iterator_category; | |
10691 | typedef _Tp value_type; | |
10692 | typedef ptrdiff_t difference_type; | |
10693 | typedef const _Tp* pointer; | |
10694 | typedef const _Tp& reference; | |
10695 | }; | |
10696 | ||
10697 | ||
10698 | ||
10699 | ||
10700 | ||
10701 | ||
10702 | ||
10703 | template<typename _Iter> | |
10704 | inline typename iterator_traits<_Iter>::iterator_category | |
10705 | __iterator_category(const _Iter&) | |
10706 | { return typename iterator_traits<_Iter>::iterator_category(); } | |
10707 | ||
10708 | } | |
10709 | # 73 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 2 3 | |
10710 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator_base_funcs.h" 1 3 | |
10711 | # 67 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator_base_funcs.h" 3 | |
10712 | ||
10713 | # 68 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator_base_funcs.h" 3 | |
10714 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/concept_check.h" 1 3 | |
10715 | # 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/concept_check.h" 3 | |
10716 | ||
10717 | # 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/concept_check.h" 3 | |
10718 | # 69 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator_base_funcs.h" 2 3 | |
10719 | ||
10720 | namespace std | |
10721 | { | |
10722 | template<typename _InputIterator> | |
10723 | inline typename iterator_traits<_InputIterator>::difference_type | |
10724 | __distance(_InputIterator __first, _InputIterator __last, | |
10725 | input_iterator_tag) | |
10726 | { | |
10727 | ||
10728 | ||
10729 | ||
10730 | typename iterator_traits<_InputIterator>::difference_type __n = 0; | |
10731 | while (__first != __last) | |
10732 | { | |
10733 | ++__first; | |
10734 | ++__n; | |
10735 | } | |
10736 | return __n; | |
10737 | } | |
10738 | ||
10739 | template<typename _RandomAccessIterator> | |
10740 | inline typename iterator_traits<_RandomAccessIterator>::difference_type | |
10741 | __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
10742 | random_access_iterator_tag) | |
10743 | { | |
10744 | ||
10745 | ||
10746 | ||
10747 | return __last - __first; | |
10748 | } | |
10749 | # 112 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator_base_funcs.h" 3 | |
10750 | template<typename _InputIterator> | |
10751 | inline typename iterator_traits<_InputIterator>::difference_type | |
10752 | distance(_InputIterator __first, _InputIterator __last) | |
10753 | { | |
10754 | ||
10755 | return std::__distance(__first, __last, | |
10756 | std::__iterator_category(__first)); | |
10757 | } | |
10758 | ||
10759 | template<typename _InputIterator, typename _Distance> | |
10760 | inline void | |
10761 | __advance(_InputIterator& __i, _Distance __n, input_iterator_tag) | |
10762 | { | |
10763 | ||
10764 | ||
10765 | while (__n--) | |
10766 | ++__i; | |
10767 | } | |
10768 | ||
10769 | template<typename _BidirectionalIterator, typename _Distance> | |
10770 | inline void | |
10771 | __advance(_BidirectionalIterator& __i, _Distance __n, | |
10772 | bidirectional_iterator_tag) | |
10773 | { | |
10774 | ||
10775 | ||
10776 | ||
10777 | if (__n > 0) | |
10778 | while (__n--) | |
10779 | ++__i; | |
10780 | else | |
10781 | while (__n++) | |
10782 | --__i; | |
10783 | } | |
10784 | ||
10785 | template<typename _RandomAccessIterator, typename _Distance> | |
10786 | inline void | |
10787 | __advance(_RandomAccessIterator& __i, _Distance __n, | |
10788 | random_access_iterator_tag) | |
10789 | { | |
10790 | ||
10791 | ||
10792 | ||
10793 | __i += __n; | |
10794 | } | |
10795 | # 170 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator_base_funcs.h" 3 | |
10796 | template<typename _InputIterator, typename _Distance> | |
10797 | inline void | |
10798 | advance(_InputIterator& __i, _Distance __n) | |
10799 | { | |
10800 | ||
10801 | std::__advance(__i, __n, std::__iterator_category(__i)); | |
10802 | } | |
10803 | } | |
10804 | # 74 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 2 3 | |
10805 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 1 3 | |
10806 | # 70 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 3 | |
10807 | namespace std | |
10808 | { | |
10809 | # 91 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 3 | |
10810 | template<typename _Iterator> | |
10811 | class reverse_iterator | |
10812 | : public iterator<typename iterator_traits<_Iterator>::iterator_category, | |
10813 | typename iterator_traits<_Iterator>::value_type, | |
10814 | typename iterator_traits<_Iterator>::difference_type, | |
10815 | typename iterator_traits<_Iterator>::pointer, | |
10816 | typename iterator_traits<_Iterator>::reference> | |
10817 | { | |
10818 | protected: | |
10819 | _Iterator current; | |
10820 | ||
10821 | public: | |
10822 | typedef _Iterator iterator_type; | |
10823 | typedef typename iterator_traits<_Iterator>::difference_type | |
10824 | difference_type; | |
10825 | typedef typename iterator_traits<_Iterator>::reference reference; | |
10826 | typedef typename iterator_traits<_Iterator>::pointer pointer; | |
10827 | ||
10828 | public: | |
10829 | ||
10830 | ||
10831 | ||
10832 | ||
10833 | ||
10834 | ||
10835 | reverse_iterator() : current() { } | |
10836 | ||
10837 | ||
10838 | ||
10839 | ||
10840 | explicit | |
10841 | reverse_iterator(iterator_type __x) : current(__x) { } | |
10842 | ||
10843 | ||
10844 | ||
10845 | ||
10846 | reverse_iterator(const reverse_iterator& __x) | |
10847 | : current(__x.current) { } | |
10848 | ||
10849 | ||
10850 | ||
10851 | ||
10852 | ||
10853 | template<typename _Iter> | |
10854 | reverse_iterator(const reverse_iterator<_Iter>& __x) | |
10855 | : current(__x.base()) { } | |
10856 | ||
10857 | ||
10858 | ||
10859 | ||
10860 | iterator_type | |
10861 | base() const | |
10862 | { return current; } | |
10863 | ||
10864 | ||
10865 | ||
10866 | ||
10867 | ||
10868 | ||
10869 | reference | |
10870 | operator*() const | |
10871 | { | |
10872 | _Iterator __tmp = current; | |
10873 | return *--__tmp; | |
10874 | } | |
10875 | ||
10876 | ||
10877 | ||
10878 | ||
10879 | ||
10880 | ||
10881 | pointer | |
10882 | operator->() const | |
10883 | { return &(operator*()); } | |
10884 | ||
10885 | ||
10886 | ||
10887 | ||
10888 | ||
10889 | ||
10890 | reverse_iterator& | |
10891 | operator++() | |
10892 | { | |
10893 | --current; | |
10894 | return *this; | |
10895 | } | |
10896 | ||
10897 | ||
10898 | ||
10899 | ||
10900 | ||
10901 | ||
10902 | reverse_iterator | |
10903 | operator++(int) | |
10904 | { | |
10905 | reverse_iterator __tmp = *this; | |
10906 | --current; | |
10907 | return __tmp; | |
10908 | } | |
10909 | ||
10910 | ||
10911 | ||
10912 | ||
10913 | ||
10914 | ||
10915 | reverse_iterator& | |
10916 | operator--() | |
10917 | { | |
10918 | ++current; | |
10919 | return *this; | |
10920 | } | |
10921 | ||
10922 | ||
10923 | ||
10924 | ||
10925 | ||
10926 | ||
10927 | reverse_iterator | |
10928 | operator--(int) | |
10929 | { | |
10930 | reverse_iterator __tmp = *this; | |
10931 | ++current; | |
10932 | return __tmp; | |
10933 | } | |
10934 | ||
10935 | ||
10936 | ||
10937 | ||
10938 | ||
10939 | ||
10940 | reverse_iterator | |
10941 | operator+(difference_type __n) const | |
10942 | { return reverse_iterator(current - __n); } | |
10943 | ||
10944 | ||
10945 | ||
10946 | ||
10947 | ||
10948 | ||
10949 | reverse_iterator& | |
10950 | operator+=(difference_type __n) | |
10951 | { | |
10952 | current -= __n; | |
10953 | return *this; | |
10954 | } | |
10955 | ||
10956 | ||
10957 | ||
10958 | ||
10959 | ||
10960 | ||
10961 | reverse_iterator | |
10962 | operator-(difference_type __n) const | |
10963 | { return reverse_iterator(current + __n); } | |
10964 | ||
10965 | ||
10966 | ||
10967 | ||
10968 | ||
10969 | ||
10970 | reverse_iterator& | |
10971 | operator-=(difference_type __n) | |
10972 | { | |
10973 | current += __n; | |
10974 | return *this; | |
10975 | } | |
10976 | ||
10977 | ||
10978 | ||
10979 | ||
10980 | ||
10981 | ||
10982 | reference | |
10983 | operator[](difference_type __n) const | |
10984 | { return *(*this + __n); } | |
10985 | }; | |
10986 | # 278 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 3 | |
10987 | template<typename _Iterator> | |
10988 | inline bool | |
10989 | operator==(const reverse_iterator<_Iterator>& __x, | |
10990 | const reverse_iterator<_Iterator>& __y) | |
10991 | { return __x.base() == __y.base(); } | |
10992 | ||
10993 | template<typename _Iterator> | |
10994 | inline bool | |
10995 | operator<(const reverse_iterator<_Iterator>& __x, | |
10996 | const reverse_iterator<_Iterator>& __y) | |
10997 | { return __y.base() < __x.base(); } | |
10998 | ||
10999 | template<typename _Iterator> | |
11000 | inline bool | |
11001 | operator!=(const reverse_iterator<_Iterator>& __x, | |
11002 | const reverse_iterator<_Iterator>& __y) | |
11003 | { return !(__x == __y); } | |
11004 | ||
11005 | template<typename _Iterator> | |
11006 | inline bool | |
11007 | operator>(const reverse_iterator<_Iterator>& __x, | |
11008 | const reverse_iterator<_Iterator>& __y) | |
11009 | { return __y < __x; } | |
11010 | ||
11011 | template<typename _Iterator> | |
11012 | inline bool | |
11013 | operator<=(const reverse_iterator<_Iterator>& __x, | |
11014 | const reverse_iterator<_Iterator>& __y) | |
11015 | { return !(__y < __x); } | |
11016 | ||
11017 | template<typename _Iterator> | |
11018 | inline bool | |
11019 | operator>=(const reverse_iterator<_Iterator>& __x, | |
11020 | const reverse_iterator<_Iterator>& __y) | |
11021 | { return !(__x < __y); } | |
11022 | ||
11023 | template<typename _Iterator> | |
11024 | inline typename reverse_iterator<_Iterator>::difference_type | |
11025 | operator-(const reverse_iterator<_Iterator>& __x, | |
11026 | const reverse_iterator<_Iterator>& __y) | |
11027 | { return __y.base() - __x.base(); } | |
11028 | ||
11029 | template<typename _Iterator> | |
11030 | inline reverse_iterator<_Iterator> | |
11031 | operator+(typename reverse_iterator<_Iterator>::difference_type __n, | |
11032 | const reverse_iterator<_Iterator>& __x) | |
11033 | { return reverse_iterator<_Iterator>(__x.base() - __n); } | |
11034 | ||
11035 | ||
11036 | ||
11037 | template<typename _IteratorL, typename _IteratorR> | |
11038 | inline bool | |
11039 | operator==(const reverse_iterator<_IteratorL>& __x, | |
11040 | const reverse_iterator<_IteratorR>& __y) | |
11041 | { return __x.base() == __y.base(); } | |
11042 | ||
11043 | template<typename _IteratorL, typename _IteratorR> | |
11044 | inline bool | |
11045 | operator<(const reverse_iterator<_IteratorL>& __x, | |
11046 | const reverse_iterator<_IteratorR>& __y) | |
11047 | { return __y.base() < __x.base(); } | |
11048 | ||
11049 | template<typename _IteratorL, typename _IteratorR> | |
11050 | inline bool | |
11051 | operator!=(const reverse_iterator<_IteratorL>& __x, | |
11052 | const reverse_iterator<_IteratorR>& __y) | |
11053 | { return !(__x == __y); } | |
11054 | ||
11055 | template<typename _IteratorL, typename _IteratorR> | |
11056 | inline bool | |
11057 | operator>(const reverse_iterator<_IteratorL>& __x, | |
11058 | const reverse_iterator<_IteratorR>& __y) | |
11059 | { return __y < __x; } | |
11060 | ||
11061 | template<typename _IteratorL, typename _IteratorR> | |
11062 | inline bool | |
11063 | operator<=(const reverse_iterator<_IteratorL>& __x, | |
11064 | const reverse_iterator<_IteratorR>& __y) | |
11065 | { return !(__y < __x); } | |
11066 | ||
11067 | template<typename _IteratorL, typename _IteratorR> | |
11068 | inline bool | |
11069 | operator>=(const reverse_iterator<_IteratorL>& __x, | |
11070 | const reverse_iterator<_IteratorR>& __y) | |
11071 | { return !(__x < __y); } | |
11072 | ||
11073 | template<typename _IteratorL, typename _IteratorR> | |
11074 | inline typename reverse_iterator<_IteratorL>::difference_type | |
11075 | operator-(const reverse_iterator<_IteratorL>& __x, | |
11076 | const reverse_iterator<_IteratorR>& __y) | |
11077 | { return __y.base() - __x.base(); } | |
11078 | # 382 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 3 | |
11079 | template<typename _Container> | |
11080 | class back_insert_iterator | |
11081 | : public iterator<output_iterator_tag, void, void, void, void> | |
11082 | { | |
11083 | protected: | |
11084 | _Container* container; | |
11085 | ||
11086 | public: | |
11087 | ||
11088 | typedef _Container container_type; | |
11089 | ||
11090 | ||
11091 | explicit | |
11092 | back_insert_iterator(_Container& __x) : container(&__x) { } | |
11093 | # 408 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 3 | |
11094 | back_insert_iterator& | |
11095 | operator=(typename _Container::const_reference __value) | |
11096 | { | |
11097 | container->push_back(__value); | |
11098 | return *this; | |
11099 | } | |
11100 | ||
11101 | ||
11102 | back_insert_iterator& | |
11103 | operator*() | |
11104 | { return *this; } | |
11105 | ||
11106 | ||
11107 | back_insert_iterator& | |
11108 | operator++() | |
11109 | { return *this; } | |
11110 | ||
11111 | ||
11112 | back_insert_iterator | |
11113 | operator++(int) | |
11114 | { return *this; } | |
11115 | }; | |
11116 | # 442 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 3 | |
11117 | template<typename _Container> | |
11118 | inline back_insert_iterator<_Container> | |
11119 | back_inserter(_Container& __x) | |
11120 | { return back_insert_iterator<_Container>(__x); } | |
11121 | # 457 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 3 | |
11122 | template<typename _Container> | |
11123 | class front_insert_iterator | |
11124 | : public iterator<output_iterator_tag, void, void, void, void> | |
11125 | { | |
11126 | protected: | |
11127 | _Container* container; | |
11128 | ||
11129 | public: | |
11130 | ||
11131 | typedef _Container container_type; | |
11132 | ||
11133 | ||
11134 | explicit front_insert_iterator(_Container& __x) : container(&__x) { } | |
11135 | # 482 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 3 | |
11136 | front_insert_iterator& | |
11137 | operator=(typename _Container::const_reference __value) | |
11138 | { | |
11139 | container->push_front(__value); | |
11140 | return *this; | |
11141 | } | |
11142 | ||
11143 | ||
11144 | front_insert_iterator& | |
11145 | operator*() | |
11146 | { return *this; } | |
11147 | ||
11148 | ||
11149 | front_insert_iterator& | |
11150 | operator++() | |
11151 | { return *this; } | |
11152 | ||
11153 | ||
11154 | front_insert_iterator | |
11155 | operator++(int) | |
11156 | { return *this; } | |
11157 | }; | |
11158 | # 516 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 3 | |
11159 | template<typename _Container> | |
11160 | inline front_insert_iterator<_Container> | |
11161 | front_inserter(_Container& __x) | |
11162 | { return front_insert_iterator<_Container>(__x); } | |
11163 | # 535 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 3 | |
11164 | template<typename _Container> | |
11165 | class insert_iterator | |
11166 | : public iterator<output_iterator_tag, void, void, void, void> | |
11167 | { | |
11168 | protected: | |
11169 | _Container* container; | |
11170 | typename _Container::iterator iter; | |
11171 | ||
11172 | public: | |
11173 | ||
11174 | typedef _Container container_type; | |
11175 | ||
11176 | ||
11177 | ||
11178 | ||
11179 | ||
11180 | insert_iterator(_Container& __x, typename _Container::iterator __i) | |
11181 | : container(&__x), iter(__i) {} | |
11182 | # 577 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 3 | |
11183 | insert_iterator& | |
11184 | operator=(const typename _Container::const_reference __value) | |
11185 | { | |
11186 | iter = container->insert(iter, __value); | |
11187 | ++iter; | |
11188 | return *this; | |
11189 | } | |
11190 | ||
11191 | ||
11192 | insert_iterator& | |
11193 | operator*() | |
11194 | { return *this; } | |
11195 | ||
11196 | ||
11197 | insert_iterator& | |
11198 | operator++() | |
11199 | { return *this; } | |
11200 | ||
11201 | ||
11202 | insert_iterator& | |
11203 | operator++(int) | |
11204 | { return *this; } | |
11205 | }; | |
11206 | # 612 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 3 | |
11207 | template<typename _Container, typename _Iterator> | |
11208 | inline insert_iterator<_Container> | |
11209 | inserter(_Container& __x, _Iterator __i) | |
11210 | { | |
11211 | return insert_iterator<_Container>(__x, | |
11212 | typename _Container::iterator(__i)); | |
11213 | } | |
11214 | } | |
11215 | ||
11216 | namespace __gnu_cxx | |
11217 | { | |
11218 | ||
11219 | ||
11220 | ||
11221 | ||
11222 | ||
11223 | ||
11224 | ||
11225 | using std::iterator_traits; | |
11226 | using std::iterator; | |
11227 | template<typename _Iterator, typename _Container> | |
11228 | class __normal_iterator | |
11229 | { | |
11230 | protected: | |
11231 | _Iterator _M_current; | |
11232 | ||
11233 | public: | |
11234 | typedef typename iterator_traits<_Iterator>::iterator_category | |
11235 | iterator_category; | |
11236 | typedef typename iterator_traits<_Iterator>::value_type value_type; | |
11237 | typedef typename iterator_traits<_Iterator>::difference_type | |
11238 | difference_type; | |
11239 | typedef typename iterator_traits<_Iterator>::reference reference; | |
11240 | typedef typename iterator_traits<_Iterator>::pointer pointer; | |
11241 | ||
11242 | __normal_iterator() : _M_current(_Iterator()) { } | |
11243 | ||
11244 | explicit | |
11245 | __normal_iterator(const _Iterator& __i) : _M_current(__i) { } | |
11246 | ||
11247 | ||
11248 | template<typename _Iter> | |
11249 | __normal_iterator(const __normal_iterator<_Iter, | |
11250 | typename std::__enable_if<_Container, | |
11251 | (std::__are_same<_Iter, | |
11252 | typename _Container::pointer>::__value) | |
11253 | >::__type>& __i) | |
11254 | : _M_current(__i.base()) { } | |
11255 | ||
11256 | ||
11257 | reference | |
11258 | operator*() const | |
11259 | { return *_M_current; } | |
11260 | ||
11261 | pointer | |
11262 | operator->() const | |
11263 | { return _M_current; } | |
11264 | ||
11265 | __normal_iterator& | |
11266 | operator++() | |
11267 | { | |
11268 | ++_M_current; | |
11269 | return *this; | |
11270 | } | |
11271 | ||
11272 | __normal_iterator | |
11273 | operator++(int) | |
11274 | { return __normal_iterator(_M_current++); } | |
11275 | ||
11276 | ||
11277 | __normal_iterator& | |
11278 | operator--() | |
11279 | { | |
11280 | --_M_current; | |
11281 | return *this; | |
11282 | } | |
11283 | ||
11284 | __normal_iterator | |
11285 | operator--(int) | |
11286 | { return __normal_iterator(_M_current--); } | |
11287 | ||
11288 | ||
11289 | reference | |
11290 | operator[](const difference_type& __n) const | |
11291 | { return _M_current[__n]; } | |
11292 | ||
11293 | __normal_iterator& | |
11294 | operator+=(const difference_type& __n) | |
11295 | { _M_current += __n; return *this; } | |
11296 | ||
11297 | __normal_iterator | |
11298 | operator+(const difference_type& __n) const | |
11299 | { return __normal_iterator(_M_current + __n); } | |
11300 | ||
11301 | __normal_iterator& | |
11302 | operator-=(const difference_type& __n) | |
11303 | { _M_current -= __n; return *this; } | |
11304 | ||
11305 | __normal_iterator | |
11306 | operator-(const difference_type& __n) const | |
11307 | { return __normal_iterator(_M_current - __n); } | |
11308 | ||
11309 | const _Iterator& | |
11310 | base() const | |
11311 | { return _M_current; } | |
11312 | }; | |
11313 | # 728 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_iterator.h" 3 | |
11314 | template<typename _IteratorL, typename _IteratorR, typename _Container> | |
11315 | inline bool | |
11316 | operator==(const __normal_iterator<_IteratorL, _Container>& __lhs, | |
11317 | const __normal_iterator<_IteratorR, _Container>& __rhs) | |
11318 | { return __lhs.base() == __rhs.base(); } | |
11319 | ||
11320 | template<typename _Iterator, typename _Container> | |
11321 | inline bool | |
11322 | operator==(const __normal_iterator<_Iterator, _Container>& __lhs, | |
11323 | const __normal_iterator<_Iterator, _Container>& __rhs) | |
11324 | { return __lhs.base() == __rhs.base(); } | |
11325 | ||
11326 | template<typename _IteratorL, typename _IteratorR, typename _Container> | |
11327 | inline bool | |
11328 | operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs, | |
11329 | const __normal_iterator<_IteratorR, _Container>& __rhs) | |
11330 | { return __lhs.base() != __rhs.base(); } | |
11331 | ||
11332 | template<typename _Iterator, typename _Container> | |
11333 | inline bool | |
11334 | operator!=(const __normal_iterator<_Iterator, _Container>& __lhs, | |
11335 | const __normal_iterator<_Iterator, _Container>& __rhs) | |
11336 | { return __lhs.base() != __rhs.base(); } | |
11337 | ||
11338 | ||
11339 | template<typename _IteratorL, typename _IteratorR, typename _Container> | |
11340 | inline bool | |
11341 | operator<(const __normal_iterator<_IteratorL, _Container>& __lhs, | |
11342 | const __normal_iterator<_IteratorR, _Container>& __rhs) | |
11343 | { return __lhs.base() < __rhs.base(); } | |
11344 | ||
11345 | template<typename _Iterator, typename _Container> | |
11346 | inline bool | |
11347 | operator<(const __normal_iterator<_Iterator, _Container>& __lhs, | |
11348 | const __normal_iterator<_Iterator, _Container>& __rhs) | |
11349 | { return __lhs.base() < __rhs.base(); } | |
11350 | ||
11351 | template<typename _IteratorL, typename _IteratorR, typename _Container> | |
11352 | inline bool | |
11353 | operator>(const __normal_iterator<_IteratorL, _Container>& __lhs, | |
11354 | const __normal_iterator<_IteratorR, _Container>& __rhs) | |
11355 | { return __lhs.base() > __rhs.base(); } | |
11356 | ||
11357 | template<typename _Iterator, typename _Container> | |
11358 | inline bool | |
11359 | operator>(const __normal_iterator<_Iterator, _Container>& __lhs, | |
11360 | const __normal_iterator<_Iterator, _Container>& __rhs) | |
11361 | { return __lhs.base() > __rhs.base(); } | |
11362 | ||
11363 | template<typename _IteratorL, typename _IteratorR, typename _Container> | |
11364 | inline bool | |
11365 | operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs, | |
11366 | const __normal_iterator<_IteratorR, _Container>& __rhs) | |
11367 | { return __lhs.base() <= __rhs.base(); } | |
11368 | ||
11369 | template<typename _Iterator, typename _Container> | |
11370 | inline bool | |
11371 | operator<=(const __normal_iterator<_Iterator, _Container>& __lhs, | |
11372 | const __normal_iterator<_Iterator, _Container>& __rhs) | |
11373 | { return __lhs.base() <= __rhs.base(); } | |
11374 | ||
11375 | template<typename _IteratorL, typename _IteratorR, typename _Container> | |
11376 | inline bool | |
11377 | operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs, | |
11378 | const __normal_iterator<_IteratorR, _Container>& __rhs) | |
11379 | { return __lhs.base() >= __rhs.base(); } | |
11380 | ||
11381 | template<typename _Iterator, typename _Container> | |
11382 | inline bool | |
11383 | operator>=(const __normal_iterator<_Iterator, _Container>& __lhs, | |
11384 | const __normal_iterator<_Iterator, _Container>& __rhs) | |
11385 | { return __lhs.base() >= __rhs.base(); } | |
11386 | ||
11387 | ||
11388 | ||
11389 | ||
11390 | ||
11391 | template<typename _IteratorL, typename _IteratorR, typename _Container> | |
11392 | inline typename __normal_iterator<_IteratorL, _Container>::difference_type | |
11393 | operator-(const __normal_iterator<_IteratorL, _Container>& __lhs, | |
11394 | const __normal_iterator<_IteratorR, _Container>& __rhs) | |
11395 | { return __lhs.base() - __rhs.base(); } | |
11396 | ||
11397 | template<typename _Iterator, typename _Container> | |
11398 | inline __normal_iterator<_Iterator, _Container> | |
11399 | operator+(typename __normal_iterator<_Iterator, _Container>::difference_type | |
11400 | __n, const __normal_iterator<_Iterator, _Container>& __i) | |
11401 | { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); } | |
11402 | } | |
11403 | # 75 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 2 3 | |
11404 | ||
11405 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/debug/debug.h" 1 3 | |
11406 | # 77 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 2 3 | |
11407 | ||
11408 | namespace std | |
11409 | { | |
11410 | # 90 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3 | |
11411 | template<typename _Tp> | |
11412 | inline void | |
11413 | swap(_Tp& __a, _Tp& __b) | |
11414 | { | |
11415 | ||
11416 | ||
11417 | ||
11418 | _Tp __tmp = __a; | |
11419 | __a = __b; | |
11420 | __b = __tmp; | |
11421 | } | |
11422 | ||
11423 | ||
11424 | ||
11425 | ||
11426 | template<bool _BoolType> | |
11427 | struct __iter_swap | |
11428 | { | |
11429 | template<typename _ForwardIterator1, typename _ForwardIterator2> | |
11430 | static void | |
11431 | iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) | |
11432 | { | |
11433 | typedef typename iterator_traits<_ForwardIterator1>::value_type | |
11434 | _ValueType1; | |
11435 | _ValueType1 __tmp = *__a; | |
11436 | *__a = *__b; | |
11437 | *__b = __tmp; | |
11438 | } | |
11439 | }; | |
11440 | ||
11441 | template<> | |
11442 | struct __iter_swap<true> | |
11443 | { | |
11444 | template<typename _ForwardIterator1, typename _ForwardIterator2> | |
11445 | static void | |
11446 | iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) | |
11447 | { | |
11448 | swap(*__a, *__b); | |
11449 | } | |
11450 | }; | |
11451 | # 140 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3 | |
11452 | template<typename _ForwardIterator1, typename _ForwardIterator2> | |
11453 | inline void | |
11454 | iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) | |
11455 | { | |
11456 | typedef typename iterator_traits<_ForwardIterator1>::value_type | |
11457 | _ValueType1; | |
11458 | typedef typename iterator_traits<_ForwardIterator2>::value_type | |
11459 | _ValueType2; | |
11460 | ||
11461 | ||
11462 | ||
11463 | ||
11464 | ||
11465 | ||
11466 | ||
11467 | ||
11468 | ||
11469 | ||
11470 | ||
11471 | typedef typename iterator_traits<_ForwardIterator1>::reference | |
11472 | _ReferenceType1; | |
11473 | typedef typename iterator_traits<_ForwardIterator2>::reference | |
11474 | _ReferenceType2; | |
11475 | std::__iter_swap<__are_same<_ValueType1, _ValueType2>::__value && | |
11476 | __are_same<_ValueType1 &, _ReferenceType1>::__value && | |
11477 | __are_same<_ValueType2 &, _ReferenceType2>::__value>:: | |
11478 | iter_swap(__a, __b); | |
11479 | } | |
11480 | # 182 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3 | |
11481 | template<typename _Tp> | |
11482 | inline const _Tp& | |
11483 | min(const _Tp& __a, const _Tp& __b) | |
11484 | { | |
11485 | ||
11486 | ||
11487 | ||
11488 | if (__b < __a) | |
11489 | return __b; | |
11490 | return __a; | |
11491 | } | |
11492 | # 204 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3 | |
11493 | template<typename _Tp> | |
11494 | inline const _Tp& | |
11495 | max(const _Tp& __a, const _Tp& __b) | |
11496 | { | |
11497 | ||
11498 | ||
11499 | ||
11500 | if (__a < __b) | |
11501 | return __b; | |
11502 | return __a; | |
11503 | } | |
11504 | # 226 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3 | |
11505 | template<typename _Tp, typename _Compare> | |
11506 | inline const _Tp& | |
11507 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | |
11508 | { | |
11509 | ||
11510 | if (__comp(__b, __a)) | |
11511 | return __b; | |
11512 | return __a; | |
11513 | } | |
11514 | # 246 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3 | |
11515 | template<typename _Tp, typename _Compare> | |
11516 | inline const _Tp& | |
11517 | max(const _Tp& __a, const _Tp& __b, _Compare __comp) | |
11518 | { | |
11519 | ||
11520 | if (__comp(__a, __b)) | |
11521 | return __b; | |
11522 | return __a; | |
11523 | } | |
11524 | ||
11525 | ||
11526 | ||
11527 | ||
11528 | ||
11529 | ||
11530 | ||
11531 | template<bool, typename> | |
11532 | struct __copy | |
11533 | { | |
11534 | template<typename _II, typename _OI> | |
11535 | static _OI | |
11536 | copy(_II __first, _II __last, _OI __result) | |
11537 | { | |
11538 | for (; __first != __last; ++__result, ++__first) | |
11539 | *__result = *__first; | |
11540 | return __result; | |
11541 | } | |
11542 | }; | |
11543 | ||
11544 | template<bool _BoolType> | |
11545 | struct __copy<_BoolType, random_access_iterator_tag> | |
11546 | { | |
11547 | template<typename _II, typename _OI> | |
11548 | static _OI | |
11549 | copy(_II __first, _II __last, _OI __result) | |
11550 | { | |
11551 | typedef typename iterator_traits<_II>::difference_type _Distance; | |
11552 | for(_Distance __n = __last - __first; __n > 0; --__n) | |
11553 | { | |
11554 | *__result = *__first; | |
11555 | ++__first; | |
11556 | ++__result; | |
11557 | } | |
11558 | return __result; | |
11559 | } | |
11560 | }; | |
11561 | ||
11562 | template<> | |
11563 | struct __copy<true, random_access_iterator_tag> | |
11564 | { | |
11565 | template<typename _Tp> | |
11566 | static _Tp* | |
11567 | copy(const _Tp* __first, const _Tp* __last, _Tp* __result) | |
11568 | { | |
11569 | std::memmove(__result, __first, sizeof(_Tp) * (__last - __first)); | |
11570 | return __result + (__last - __first); | |
11571 | } | |
11572 | }; | |
11573 | ||
11574 | template<typename _II, typename _OI> | |
11575 | inline _OI | |
11576 | __copy_aux(_II __first, _II __last, _OI __result) | |
11577 | { | |
11578 | typedef typename iterator_traits<_II>::value_type _ValueTypeI; | |
11579 | typedef typename iterator_traits<_OI>::value_type _ValueTypeO; | |
11580 | typedef typename iterator_traits<_II>::iterator_category _Category; | |
11581 | const bool __simple = (__is_scalar<_ValueTypeI>::__value | |
11582 | && __is_pointer<_II>::__value | |
11583 | && __is_pointer<_OI>::__value | |
11584 | && __are_same<_ValueTypeI, _ValueTypeO>::__value); | |
11585 | ||
11586 | return std::__copy<__simple, _Category>::copy(__first, __last, __result); | |
11587 | } | |
11588 | ||
11589 | template<bool, bool> | |
11590 | struct __copy_normal | |
11591 | { | |
11592 | template<typename _II, typename _OI> | |
11593 | static _OI | |
11594 | copy_n(_II __first, _II __last, _OI __result) | |
11595 | { return std::__copy_aux(__first, __last, __result); } | |
11596 | }; | |
11597 | ||
11598 | template<> | |
11599 | struct __copy_normal<true, false> | |
11600 | { | |
11601 | template<typename _II, typename _OI> | |
11602 | static _OI | |
11603 | copy_n(_II __first, _II __last, _OI __result) | |
11604 | { return std::__copy_aux(__first.base(), __last.base(), __result); } | |
11605 | }; | |
11606 | ||
11607 | template<> | |
11608 | struct __copy_normal<false, true> | |
11609 | { | |
11610 | template<typename _II, typename _OI> | |
11611 | static _OI | |
11612 | copy_n(_II __first, _II __last, _OI __result) | |
11613 | { return _OI(std::__copy_aux(__first, __last, __result.base())); } | |
11614 | }; | |
11615 | ||
11616 | template<> | |
11617 | struct __copy_normal<true, true> | |
11618 | { | |
11619 | template<typename _II, typename _OI> | |
11620 | static _OI | |
11621 | copy_n(_II __first, _II __last, _OI __result) | |
11622 | { return _OI(std::__copy_aux(__first.base(), __last.base(), | |
11623 | __result.base())); } | |
11624 | }; | |
11625 | # 373 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3 | |
11626 | template<typename _InputIterator, typename _OutputIterator> | |
11627 | inline _OutputIterator | |
11628 | copy(_InputIterator __first, _InputIterator __last, | |
11629 | _OutputIterator __result) | |
11630 | { | |
11631 | ||
11632 | ||
11633 | ||
11634 | ||
11635 | ; | |
11636 | ||
11637 | const bool __in = __is_normal_iterator<_InputIterator>::__value; | |
11638 | const bool __out = __is_normal_iterator<_OutputIterator>::__value; | |
11639 | return std::__copy_normal<__in, __out>::copy_n(__first, __last, | |
11640 | __result); | |
11641 | } | |
11642 | ||
11643 | template<bool, typename> | |
11644 | struct __copy_backward | |
11645 | { | |
11646 | template<typename _BI1, typename _BI2> | |
11647 | static _BI2 | |
11648 | copy_b(_BI1 __first, _BI1 __last, _BI2 __result) | |
11649 | { | |
11650 | while (__first != __last) | |
11651 | *--__result = *--__last; | |
11652 | return __result; | |
11653 | } | |
11654 | }; | |
11655 | ||
11656 | template<bool _BoolType> | |
11657 | struct __copy_backward<_BoolType, random_access_iterator_tag> | |
11658 | { | |
11659 | template<typename _BI1, typename _BI2> | |
11660 | static _BI2 | |
11661 | copy_b(_BI1 __first, _BI1 __last, _BI2 __result) | |
11662 | { | |
11663 | typename iterator_traits<_BI1>::difference_type __n; | |
11664 | for (__n = __last - __first; __n > 0; --__n) | |
11665 | *--__result = *--__last; | |
11666 | return __result; | |
11667 | } | |
11668 | }; | |
11669 | ||
11670 | template<> | |
11671 | struct __copy_backward<true, random_access_iterator_tag> | |
11672 | { | |
11673 | template<typename _Tp> | |
11674 | static _Tp* | |
11675 | copy_b(const _Tp* __first, const _Tp* __last, _Tp* __result) | |
11676 | { | |
11677 | const ptrdiff_t _Num = __last - __first; | |
11678 | std::memmove(__result - _Num, __first, sizeof(_Tp) * _Num); | |
11679 | return __result - _Num; | |
11680 | } | |
11681 | }; | |
11682 | ||
11683 | template<typename _BI1, typename _BI2> | |
11684 | inline _BI2 | |
11685 | __copy_backward_aux(_BI1 __first, _BI1 __last, _BI2 __result) | |
11686 | { | |
11687 | typedef typename iterator_traits<_BI1>::value_type _ValueType1; | |
11688 | typedef typename iterator_traits<_BI2>::value_type _ValueType2; | |
11689 | typedef typename iterator_traits<_BI1>::iterator_category _Category; | |
11690 | const bool __simple = (__is_scalar<_ValueType1>::__value | |
11691 | && __is_pointer<_BI1>::__value | |
11692 | && __is_pointer<_BI2>::__value | |
11693 | && __are_same<_ValueType1, _ValueType2>::__value); | |
11694 | ||
11695 | return std::__copy_backward<__simple, _Category>::copy_b(__first, __last, | |
11696 | __result); | |
11697 | } | |
11698 | ||
11699 | template<bool, bool> | |
11700 | struct __copy_backward_normal | |
11701 | { | |
11702 | template<typename _BI1, typename _BI2> | |
11703 | static _BI2 | |
11704 | copy_b_n(_BI1 __first, _BI1 __last, _BI2 __result) | |
11705 | { return std::__copy_backward_aux(__first, __last, __result); } | |
11706 | }; | |
11707 | ||
11708 | template<> | |
11709 | struct __copy_backward_normal<true, false> | |
11710 | { | |
11711 | template<typename _BI1, typename _BI2> | |
11712 | static _BI2 | |
11713 | copy_b_n(_BI1 __first, _BI1 __last, _BI2 __result) | |
11714 | { return std::__copy_backward_aux(__first.base(), __last.base(), | |
11715 | __result); } | |
11716 | }; | |
11717 | ||
11718 | template<> | |
11719 | struct __copy_backward_normal<false, true> | |
11720 | { | |
11721 | template<typename _BI1, typename _BI2> | |
11722 | static _BI2 | |
11723 | copy_b_n(_BI1 __first, _BI1 __last, _BI2 __result) | |
11724 | { return _BI2(std::__copy_backward_aux(__first, __last, | |
11725 | __result.base())); } | |
11726 | }; | |
11727 | ||
11728 | template<> | |
11729 | struct __copy_backward_normal<true, true> | |
11730 | { | |
11731 | template<typename _BI1, typename _BI2> | |
11732 | static _BI2 | |
11733 | copy_b_n(_BI1 __first, _BI1 __last, _BI2 __result) | |
11734 | { return _BI2(std::__copy_backward_aux(__first.base(), __last.base(), | |
11735 | __result.base())); } | |
11736 | }; | |
11737 | # 502 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3 | |
11738 | template <typename _BI1, typename _BI2> | |
11739 | inline _BI2 | |
11740 | copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) | |
11741 | { | |
11742 | ||
11743 | ||
11744 | ||
11745 | ||
11746 | ||
11747 | ||
11748 | ; | |
11749 | ||
11750 | const bool __bi1 = __is_normal_iterator<_BI1>::__value; | |
11751 | const bool __bi2 = __is_normal_iterator<_BI2>::__value; | |
11752 | return std::__copy_backward_normal<__bi1, __bi2>::copy_b_n(__first, __last, | |
11753 | __result); | |
11754 | } | |
11755 | ||
11756 | template<bool> | |
11757 | struct __fill | |
11758 | { | |
11759 | template<typename _ForwardIterator, typename _Tp> | |
11760 | static void | |
11761 | fill(_ForwardIterator __first, _ForwardIterator __last, | |
11762 | const _Tp& __value) | |
11763 | { | |
11764 | for (; __first != __last; ++__first) | |
11765 | *__first = __value; | |
11766 | } | |
11767 | }; | |
11768 | ||
11769 | template<> | |
11770 | struct __fill<true> | |
11771 | { | |
11772 | template<typename _ForwardIterator, typename _Tp> | |
11773 | static void | |
11774 | fill(_ForwardIterator __first, _ForwardIterator __last, | |
11775 | const _Tp& __value) | |
11776 | { | |
11777 | const _Tp __tmp = __value; | |
11778 | for (; __first != __last; ++__first) | |
11779 | *__first = __tmp; | |
11780 | } | |
11781 | }; | |
11782 | # 558 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3 | |
11783 | template<typename _ForwardIterator, typename _Tp> | |
11784 | void | |
11785 | fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) | |
11786 | { | |
11787 | ||
11788 | ||
11789 | ||
11790 | ; | |
11791 | ||
11792 | const bool __scalar = __is_scalar<_Tp>::__value; | |
11793 | std::__fill<__scalar>::fill(__first, __last, __value); | |
11794 | } | |
11795 | ||
11796 | ||
11797 | inline void | |
11798 | fill(unsigned char* __first, unsigned char* __last, const unsigned char& __c) | |
11799 | { | |
11800 | ; | |
11801 | const unsigned char __tmp = __c; | |
11802 | std::memset(__first, __tmp, __last - __first); | |
11803 | } | |
11804 | ||
11805 | inline void | |
11806 | fill(signed char* __first, signed char* __last, const signed char& __c) | |
11807 | { | |
11808 | ; | |
11809 | const signed char __tmp = __c; | |
11810 | std::memset(__first, static_cast<unsigned char>(__tmp), __last - __first); | |
11811 | } | |
11812 | ||
11813 | inline void | |
11814 | fill(char* __first, char* __last, const char& __c) | |
11815 | { | |
11816 | ; | |
11817 | const char __tmp = __c; | |
11818 | std::memset(__first, static_cast<unsigned char>(__tmp), __last - __first); | |
11819 | } | |
11820 | ||
11821 | template<bool> | |
11822 | struct __fill_n | |
11823 | { | |
11824 | template<typename _OutputIterator, typename _Size, typename _Tp> | |
11825 | static _OutputIterator | |
11826 | fill_n(_OutputIterator __first, _Size __n, const _Tp& __value) | |
11827 | { | |
11828 | for (; __n > 0; --__n, ++__first) | |
11829 | *__first = __value; | |
11830 | return __first; | |
11831 | } | |
11832 | }; | |
11833 | ||
11834 | template<> | |
11835 | struct __fill_n<true> | |
11836 | { | |
11837 | template<typename _OutputIterator, typename _Size, typename _Tp> | |
11838 | static _OutputIterator | |
11839 | fill_n(_OutputIterator __first, _Size __n, const _Tp& __value) | |
11840 | { | |
11841 | const _Tp __tmp = __value; | |
11842 | for (; __n > 0; --__n, ++__first) | |
11843 | *__first = __tmp; | |
11844 | return __first; | |
11845 | } | |
11846 | }; | |
11847 | # 634 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3 | |
11848 | template<typename _OutputIterator, typename _Size, typename _Tp> | |
11849 | _OutputIterator | |
11850 | fill_n(_OutputIterator __first, _Size __n, const _Tp& __value) | |
11851 | { | |
11852 | ||
11853 | ||
11854 | ||
11855 | const bool __scalar = __is_scalar<_Tp>::__value; | |
11856 | return std::__fill_n<__scalar>::fill_n(__first, __n, __value); | |
11857 | } | |
11858 | ||
11859 | template<typename _Size> | |
11860 | inline unsigned char* | |
11861 | fill_n(unsigned char* __first, _Size __n, const unsigned char& __c) | |
11862 | { | |
11863 | std::fill(__first, __first + __n, __c); | |
11864 | return __first + __n; | |
11865 | } | |
11866 | ||
11867 | template<typename _Size> | |
11868 | inline signed char* | |
11869 | fill_n(char* __first, _Size __n, const signed char& __c) | |
11870 | { | |
11871 | std::fill(__first, __first + __n, __c); | |
11872 | return __first + __n; | |
11873 | } | |
11874 | ||
11875 | template<typename _Size> | |
11876 | inline char* | |
11877 | fill_n(char* __first, _Size __n, const char& __c) | |
11878 | { | |
11879 | std::fill(__first, __first + __n, __c); | |
11880 | return __first + __n; | |
11881 | } | |
11882 | # 681 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3 | |
11883 | template<typename _InputIterator1, typename _InputIterator2> | |
11884 | pair<_InputIterator1, _InputIterator2> | |
11885 | mismatch(_InputIterator1 __first1, _InputIterator1 __last1, | |
11886 | _InputIterator2 __first2) | |
11887 | { | |
11888 | ||
11889 | ||
11890 | ||
11891 | ||
11892 | ||
11893 | ||
11894 | ; | |
11895 | ||
11896 | while (__first1 != __last1 && *__first1 == *__first2) | |
11897 | { | |
11898 | ++__first1; | |
11899 | ++__first2; | |
11900 | } | |
11901 | return pair<_InputIterator1, _InputIterator2>(__first1, __first2); | |
11902 | } | |
11903 | # 716 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3 | |
11904 | template<typename _InputIterator1, typename _InputIterator2, | |
11905 | typename _BinaryPredicate> | |
11906 | pair<_InputIterator1, _InputIterator2> | |
11907 | mismatch(_InputIterator1 __first1, _InputIterator1 __last1, | |
11908 | _InputIterator2 __first2, _BinaryPredicate __binary_pred) | |
11909 | { | |
11910 | ||
11911 | ||
11912 | ||
11913 | ; | |
11914 | ||
11915 | while (__first1 != __last1 && __binary_pred(*__first1, *__first2)) | |
11916 | { | |
11917 | ++__first1; | |
11918 | ++__first2; | |
11919 | } | |
11920 | return pair<_InputIterator1, _InputIterator2>(__first1, __first2); | |
11921 | } | |
11922 | # 746 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3 | |
11923 | template<typename _InputIterator1, typename _InputIterator2> | |
11924 | inline bool | |
11925 | equal(_InputIterator1 __first1, _InputIterator1 __last1, | |
11926 | _InputIterator2 __first2) | |
11927 | { | |
11928 | ||
11929 | ||
11930 | ||
11931 | ||
11932 | ||
11933 | ||
11934 | ; | |
11935 | ||
11936 | for (; __first1 != __last1; ++__first1, ++__first2) | |
11937 | if (!(*__first1 == *__first2)) | |
11938 | return false; | |
11939 | return true; | |
11940 | } | |
11941 | # 778 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3 | |
11942 | template<typename _InputIterator1, typename _InputIterator2, | |
11943 | typename _BinaryPredicate> | |
11944 | inline bool | |
11945 | equal(_InputIterator1 __first1, _InputIterator1 __last1, | |
11946 | _InputIterator2 __first2, | |
11947 | _BinaryPredicate __binary_pred) | |
11948 | { | |
11949 | ||
11950 | ||
11951 | ||
11952 | ; | |
11953 | ||
11954 | for (; __first1 != __last1; ++__first1, ++__first2) | |
11955 | if (!__binary_pred(*__first1, *__first2)) | |
11956 | return false; | |
11957 | return true; | |
11958 | } | |
11959 | # 810 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3 | |
11960 | template<typename _InputIterator1, typename _InputIterator2> | |
11961 | bool | |
11962 | lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1, | |
11963 | _InputIterator2 __first2, _InputIterator2 __last2) | |
11964 | { | |
11965 | ||
11966 | ||
11967 | ||
11968 | ||
11969 | ||
11970 | ||
11971 | ||
11972 | ||
11973 | ||
11974 | ; | |
11975 | ; | |
11976 | ||
11977 | for (; __first1 != __last1 && __first2 != __last2; | |
11978 | ++__first1, ++__first2) | |
11979 | { | |
11980 | if (*__first1 < *__first2) | |
11981 | return true; | |
11982 | if (*__first2 < *__first1) | |
11983 | return false; | |
11984 | } | |
11985 | return __first1 == __last1 && __first2 != __last2; | |
11986 | } | |
11987 | # 850 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algobase.h" 3 | |
11988 | template<typename _InputIterator1, typename _InputIterator2, | |
11989 | typename _Compare> | |
11990 | bool | |
11991 | lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1, | |
11992 | _InputIterator2 __first2, _InputIterator2 __last2, | |
11993 | _Compare __comp) | |
11994 | { | |
11995 | ||
11996 | ||
11997 | ||
11998 | ; | |
11999 | ; | |
12000 | ||
12001 | for (; __first1 != __last1 && __first2 != __last2; | |
12002 | ++__first1, ++__first2) | |
12003 | { | |
12004 | if (__comp(*__first1, *__first2)) | |
12005 | return true; | |
12006 | if (__comp(*__first2, *__first1)) | |
12007 | return false; | |
12008 | } | |
12009 | return __first1 == __last1 && __first2 != __last2; | |
12010 | } | |
12011 | ||
12012 | inline bool | |
12013 | lexicographical_compare(const unsigned char* __first1, | |
12014 | const unsigned char* __last1, | |
12015 | const unsigned char* __first2, | |
12016 | const unsigned char* __last2) | |
12017 | { | |
12018 | ; | |
12019 | ; | |
12020 | ||
12021 | const size_t __len1 = __last1 - __first1; | |
12022 | const size_t __len2 = __last2 - __first2; | |
12023 | const int __result = std::memcmp(__first1, __first2, | |
12024 | std::min(__len1, __len2)); | |
12025 | return __result != 0 ? __result < 0 : __len1 < __len2; | |
12026 | } | |
12027 | ||
12028 | inline bool | |
12029 | lexicographical_compare(const char* __first1, const char* __last1, | |
12030 | const char* __first2, const char* __last2) | |
12031 | { | |
12032 | ; | |
12033 | ; | |
12034 | ||
12035 | ||
12036 | return std::lexicographical_compare((const signed char*) __first1, | |
12037 | (const signed char*) __last1, | |
12038 | (const signed char*) __first2, | |
12039 | (const signed char*) __last2); | |
12040 | ||
12041 | ||
12042 | ||
12043 | ||
12044 | ||
12045 | ||
12046 | } | |
12047 | ||
12048 | } | |
12049 | # 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/char_traits.h" 2 3 | |
12050 | ||
12051 | ||
12052 | namespace __gnu_cxx | |
12053 | { | |
12054 | # 61 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/char_traits.h" 3 | |
12055 | template <class _CharT> | |
12056 | struct _Char_types | |
12057 | { | |
12058 | typedef unsigned long int_type; | |
12059 | typedef std::streampos pos_type; | |
12060 | typedef std::streamoff off_type; | |
12061 | typedef std::mbstate_t state_type; | |
12062 | }; | |
12063 | # 86 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/char_traits.h" 3 | |
12064 | template<typename _CharT> | |
12065 | struct char_traits | |
12066 | { | |
12067 | typedef _CharT char_type; | |
12068 | typedef typename _Char_types<_CharT>::int_type int_type; | |
12069 | typedef typename _Char_types<_CharT>::pos_type pos_type; | |
12070 | typedef typename _Char_types<_CharT>::off_type off_type; | |
12071 | typedef typename _Char_types<_CharT>::state_type state_type; | |
12072 | ||
12073 | static void | |
12074 | assign(char_type& __c1, const char_type& __c2) | |
12075 | { __c1 = __c2; } | |
12076 | ||
12077 | static bool | |
12078 | eq(const char_type& __c1, const char_type& __c2) | |
12079 | { return __c1 == __c2; } | |
12080 | ||
12081 | static bool | |
12082 | lt(const char_type& __c1, const char_type& __c2) | |
12083 | { return __c1 < __c2; } | |
12084 | ||
12085 | static int | |
12086 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n); | |
12087 | ||
12088 | static std::size_t | |
12089 | length(const char_type* __s); | |
12090 | ||
12091 | static const char_type* | |
12092 | find(const char_type* __s, std::size_t __n, const char_type& __a); | |
12093 | ||
12094 | static char_type* | |
12095 | move(char_type* __s1, const char_type* __s2, std::size_t __n); | |
12096 | ||
12097 | static char_type* | |
12098 | copy(char_type* __s1, const char_type* __s2, std::size_t __n); | |
12099 | ||
12100 | static char_type* | |
12101 | assign(char_type* __s, std::size_t __n, char_type __a); | |
12102 | ||
12103 | static char_type | |
12104 | to_char_type(const int_type& __c) | |
12105 | { return static_cast<char_type>(__c); } | |
12106 | ||
12107 | static int_type | |
12108 | to_int_type(const char_type& __c) | |
12109 | { return static_cast<int_type>(__c); } | |
12110 | ||
12111 | static bool | |
12112 | eq_int_type(const int_type& __c1, const int_type& __c2) | |
12113 | { return __c1 == __c2; } | |
12114 | ||
12115 | static int_type | |
12116 | eof() | |
12117 | { return static_cast<int_type>((-1)); } | |
12118 | ||
12119 | static int_type | |
12120 | not_eof(const int_type& __c) | |
12121 | { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); } | |
12122 | }; | |
12123 | ||
12124 | template<typename _CharT> | |
12125 | int | |
12126 | char_traits<_CharT>:: | |
12127 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n) | |
12128 | { | |
12129 | for (size_t __i = 0; __i < __n; ++__i) | |
12130 | if (lt(__s1[__i], __s2[__i])) | |
12131 | return -1; | |
12132 | else if (lt(__s2[__i], __s1[__i])) | |
12133 | return 1; | |
12134 | return 0; | |
12135 | } | |
12136 | ||
12137 | template<typename _CharT> | |
12138 | std::size_t | |
12139 | char_traits<_CharT>:: | |
12140 | length(const char_type* __p) | |
12141 | { | |
12142 | std::size_t __i = 0; | |
12143 | while (!eq(__p[__i], char_type())) | |
12144 | ++__i; | |
12145 | return __i; | |
12146 | } | |
12147 | ||
12148 | template<typename _CharT> | |
12149 | const typename char_traits<_CharT>::char_type* | |
12150 | char_traits<_CharT>:: | |
12151 | find(const char_type* __s, std::size_t __n, const char_type& __a) | |
12152 | { | |
12153 | for (std::size_t __i = 0; __i < __n; ++__i) | |
12154 | if (eq(__s[__i], __a)) | |
12155 | return __s + __i; | |
12156 | return 0; | |
12157 | } | |
12158 | ||
12159 | template<typename _CharT> | |
12160 | typename char_traits<_CharT>::char_type* | |
12161 | char_traits<_CharT>:: | |
12162 | move(char_type* __s1, const char_type* __s2, std::size_t __n) | |
12163 | { | |
12164 | return static_cast<_CharT*>(std::memmove(__s1, __s2, | |
12165 | __n * sizeof(char_type))); | |
12166 | } | |
12167 | ||
12168 | template<typename _CharT> | |
12169 | typename char_traits<_CharT>::char_type* | |
12170 | char_traits<_CharT>:: | |
12171 | copy(char_type* __s1, const char_type* __s2, std::size_t __n) | |
12172 | { | |
12173 | std::copy(__s2, __s2 + __n, __s1); | |
12174 | return __s1; | |
12175 | } | |
12176 | ||
12177 | template<typename _CharT> | |
12178 | typename char_traits<_CharT>::char_type* | |
12179 | char_traits<_CharT>:: | |
12180 | assign(char_type* __s, std::size_t __n, char_type __a) | |
12181 | { | |
12182 | std::fill_n(__s, __n, __a); | |
12183 | return __s; | |
12184 | } | |
12185 | } | |
12186 | ||
12187 | namespace std | |
12188 | { | |
12189 | # 224 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/char_traits.h" 3 | |
12190 | template<class _CharT> | |
12191 | struct char_traits : public __gnu_cxx::char_traits<_CharT> | |
12192 | { }; | |
12193 | ||
12194 | ||
12195 | ||
12196 | template<> | |
12197 | struct char_traits<char> | |
12198 | { | |
12199 | typedef char char_type; | |
12200 | typedef int int_type; | |
12201 | typedef streampos pos_type; | |
12202 | typedef streamoff off_type; | |
12203 | typedef mbstate_t state_type; | |
12204 | ||
12205 | static void | |
12206 | assign(char_type& __c1, const char_type& __c2) | |
12207 | { __c1 = __c2; } | |
12208 | ||
12209 | static bool | |
12210 | eq(const char_type& __c1, const char_type& __c2) | |
12211 | { return __c1 == __c2; } | |
12212 | ||
12213 | static bool | |
12214 | lt(const char_type& __c1, const char_type& __c2) | |
12215 | { return __c1 < __c2; } | |
12216 | ||
12217 | static int | |
12218 | compare(const char_type* __s1, const char_type* __s2, size_t __n) | |
12219 | { return memcmp(__s1, __s2, __n); } | |
12220 | ||
12221 | static size_t | |
12222 | length(const char_type* __s) | |
12223 | { return strlen(__s); } | |
12224 | ||
12225 | static const char_type* | |
12226 | find(const char_type* __s, size_t __n, const char_type& __a) | |
12227 | { return static_cast<const char_type*>(memchr(__s, __a, __n)); } | |
12228 | ||
12229 | static char_type* | |
12230 | move(char_type* __s1, const char_type* __s2, size_t __n) | |
12231 | { return static_cast<char_type*>(memmove(__s1, __s2, __n)); } | |
12232 | ||
12233 | static char_type* | |
12234 | copy(char_type* __s1, const char_type* __s2, size_t __n) | |
12235 | { return static_cast<char_type*>(memcpy(__s1, __s2, __n)); } | |
12236 | ||
12237 | static char_type* | |
12238 | assign(char_type* __s, size_t __n, char_type __a) | |
12239 | { return static_cast<char_type*>(memset(__s, __a, __n)); } | |
12240 | ||
12241 | static char_type | |
12242 | to_char_type(const int_type& __c) | |
12243 | { return static_cast<char_type>(__c); } | |
12244 | ||
12245 | ||
12246 | ||
12247 | static int_type | |
12248 | to_int_type(const char_type& __c) | |
12249 | { return static_cast<int_type>(static_cast<unsigned char>(__c)); } | |
12250 | ||
12251 | static bool | |
12252 | eq_int_type(const int_type& __c1, const int_type& __c2) | |
12253 | { return __c1 == __c2; } | |
12254 | ||
12255 | static int_type | |
12256 | eof() { return static_cast<int_type>((-1)); } | |
12257 | ||
12258 | static int_type | |
12259 | not_eof(const int_type& __c) | |
12260 | { return (__c == eof()) ? 0 : __c; } | |
12261 | }; | |
12262 | ||
12263 | ||
12264 | ||
12265 | ||
12266 | template<> | |
12267 | struct char_traits<wchar_t> | |
12268 | { | |
12269 | typedef wchar_t char_type; | |
12270 | typedef wint_t int_type; | |
12271 | typedef streamoff off_type; | |
12272 | typedef wstreampos pos_type; | |
12273 | typedef mbstate_t state_type; | |
12274 | ||
12275 | static void | |
12276 | assign(char_type& __c1, const char_type& __c2) | |
12277 | { __c1 = __c2; } | |
12278 | ||
12279 | static bool | |
12280 | eq(const char_type& __c1, const char_type& __c2) | |
12281 | { return __c1 == __c2; } | |
12282 | ||
12283 | static bool | |
12284 | lt(const char_type& __c1, const char_type& __c2) | |
12285 | { return __c1 < __c2; } | |
12286 | ||
12287 | static int | |
12288 | compare(const char_type* __s1, const char_type* __s2, size_t __n) | |
12289 | { return wmemcmp(__s1, __s2, __n); } | |
12290 | ||
12291 | static size_t | |
12292 | length(const char_type* __s) | |
12293 | { return wcslen(__s); } | |
12294 | ||
12295 | static const char_type* | |
12296 | find(const char_type* __s, size_t __n, const char_type& __a) | |
12297 | { return wmemchr(__s, __a, __n); } | |
12298 | ||
12299 | static char_type* | |
12300 | move(char_type* __s1, const char_type* __s2, size_t __n) | |
12301 | { return wmemmove(__s1, __s2, __n); } | |
12302 | ||
12303 | static char_type* | |
12304 | copy(char_type* __s1, const char_type* __s2, size_t __n) | |
12305 | { return wmemcpy(__s1, __s2, __n); } | |
12306 | ||
12307 | static char_type* | |
12308 | assign(char_type* __s, size_t __n, char_type __a) | |
12309 | { return wmemset(__s, __a, __n); } | |
12310 | ||
12311 | static char_type | |
12312 | to_char_type(const int_type& __c) { return char_type(__c); } | |
12313 | ||
12314 | static int_type | |
12315 | to_int_type(const char_type& __c) { return int_type(__c); } | |
12316 | ||
12317 | static bool | |
12318 | eq_int_type(const int_type& __c1, const int_type& __c2) | |
12319 | { return __c1 == __c2; } | |
12320 | ||
12321 | static int_type | |
12322 | eof() { return static_cast<int_type>((0xffffffffu)); } | |
12323 | ||
12324 | static int_type | |
12325 | not_eof(const int_type& __c) | |
12326 | { return eq_int_type(__c, eof()) ? 0 : __c; } | |
12327 | }; | |
12328 | ||
12329 | ||
12330 | } | |
12331 | # 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/string" 2 3 | |
12332 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/memory" 1 3 | |
12333 | # 51 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3 | |
12334 | ||
12335 | # 52 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3 | |
12336 | #pragma GCC visibility push(default) | |
12337 | ||
12338 | ||
12339 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/allocator.h" 1 3 | |
12340 | # 52 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/allocator.h" 3 | |
12341 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/c++allocator.h" 1 3 | |
12342 | # 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/c++allocator.h" 3 | |
12343 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ext/new_allocator.h" 1 3 | |
12344 | # 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ext/new_allocator.h" 3 | |
12345 | #pragma GCC visibility push(default) | |
12346 | ||
12347 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/new" 1 3 | |
12348 | # 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/new" 3 | |
12349 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/exception" 1 3 | |
12350 | # 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/exception" 3 | |
12351 | #pragma GCC visibility push(default) | |
12352 | ||
12353 | extern "C++" { | |
12354 | ||
12355 | namespace std | |
12356 | { | |
12357 | # 54 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/exception" 3 | |
12358 | class exception | |
12359 | { | |
12360 | public: | |
12361 | exception() throw() { } | |
12362 | virtual ~exception() throw(); | |
12363 | ||
12364 | ||
12365 | virtual const char* what() const throw(); | |
12366 | }; | |
12367 | ||
12368 | ||
12369 | ||
12370 | class bad_exception : public exception | |
12371 | { | |
12372 | public: | |
12373 | bad_exception() throw() { } | |
12374 | ||
12375 | ||
12376 | virtual ~bad_exception() throw(); | |
12377 | }; | |
12378 | ||
12379 | ||
12380 | typedef void (*terminate_handler) (); | |
12381 | ||
12382 | typedef void (*unexpected_handler) (); | |
12383 | ||
12384 | ||
12385 | terminate_handler set_terminate(terminate_handler) throw(); | |
12386 | ||
12387 | ||
12388 | void terminate() __attribute__ ((__noreturn__)); | |
12389 | ||
12390 | ||
12391 | unexpected_handler set_unexpected(unexpected_handler) throw(); | |
12392 | ||
12393 | ||
12394 | void unexpected() __attribute__ ((__noreturn__)); | |
12395 | # 102 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/exception" 3 | |
12396 | bool uncaught_exception() throw(); | |
12397 | } | |
12398 | ||
12399 | namespace __gnu_cxx | |
12400 | { | |
12401 | # 117 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/exception" 3 | |
12402 | void __verbose_terminate_handler (); | |
12403 | } | |
12404 | ||
12405 | } | |
12406 | ||
12407 | #pragma GCC visibility pop | |
12408 | # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/new" 2 3 | |
12409 | ||
12410 | #pragma GCC visibility push(default) | |
12411 | ||
12412 | extern "C++" { | |
12413 | ||
12414 | namespace std | |
12415 | { | |
12416 | ||
12417 | ||
12418 | ||
12419 | ||
12420 | ||
12421 | class bad_alloc : public exception | |
12422 | { | |
12423 | public: | |
12424 | bad_alloc() throw() { } | |
12425 | ||
12426 | ||
12427 | virtual ~bad_alloc() throw(); | |
12428 | }; | |
12429 | ||
12430 | struct nothrow_t { }; | |
12431 | extern const nothrow_t nothrow; | |
12432 | ||
12433 | ||
12434 | typedef void (*new_handler)(); | |
12435 | ||
12436 | new_handler set_new_handler(new_handler) throw(); | |
12437 | } | |
12438 | # 84 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/new" 3 | |
12439 | void* operator new(std::size_t) throw (std::bad_alloc); | |
12440 | void* operator new[](std::size_t) throw (std::bad_alloc); | |
12441 | void operator delete(void*) throw(); | |
12442 | void operator delete[](void*) throw(); | |
12443 | void* operator new(std::size_t, const std::nothrow_t&) throw(); | |
12444 | void* operator new[](std::size_t, const std::nothrow_t&) throw(); | |
12445 | void operator delete(void*, const std::nothrow_t&) throw(); | |
12446 | void operator delete[](void*, const std::nothrow_t&) throw(); | |
12447 | ||
12448 | ||
12449 | inline void* operator new(std::size_t, void* __p) throw() { return __p; } | |
12450 | inline void* operator new[](std::size_t, void* __p) throw() { return __p; } | |
12451 | ||
12452 | ||
12453 | inline void operator delete (void*, void*) throw() { } | |
12454 | inline void operator delete[](void*, void*) throw() { } | |
12455 | ||
12456 | } | |
12457 | ||
12458 | #pragma GCC visibility pop | |
12459 | # 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ext/new_allocator.h" 2 3 | |
12460 | ||
12461 | ||
12462 | namespace __gnu_cxx | |
12463 | { | |
12464 | ||
12465 | ||
12466 | ||
12467 | ||
12468 | ||
12469 | ||
12470 | ||
12471 | template<typename _Tp> | |
12472 | class new_allocator | |
12473 | { | |
12474 | public: | |
12475 | typedef size_t size_type; | |
12476 | typedef ptrdiff_t difference_type; | |
12477 | typedef _Tp* pointer; | |
12478 | typedef const _Tp* const_pointer; | |
12479 | typedef _Tp& reference; | |
12480 | typedef const _Tp& const_reference; | |
12481 | typedef _Tp value_type; | |
12482 | ||
12483 | template<typename _Tp1> | |
12484 | struct rebind | |
12485 | { typedef new_allocator<_Tp1> other; }; | |
12486 | ||
12487 | new_allocator() throw() { } | |
12488 | ||
12489 | new_allocator(const new_allocator&) throw() { } | |
12490 | ||
12491 | template<typename _Tp1> | |
12492 | new_allocator(const new_allocator<_Tp1>&) throw() { } | |
12493 | ||
12494 | ~new_allocator() throw() { } | |
12495 | ||
12496 | pointer | |
12497 | address(reference __x) const { return &__x; } | |
12498 | ||
12499 | const_pointer | |
12500 | address(const_reference __x) const { return &__x; } | |
12501 | ||
12502 | ||
12503 | ||
12504 | pointer | |
12505 | allocate(size_type __n, const void* = 0) | |
12506 | { | |
12507 | if (__builtin_expect(__n > this->max_size(), false)) | |
12508 | std::__throw_bad_alloc(); | |
12509 | ||
12510 | return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); | |
12511 | } | |
12512 | ||
12513 | ||
12514 | void | |
12515 | deallocate(pointer __p, size_type) | |
12516 | { ::operator delete(__p); } | |
12517 | ||
12518 | size_type | |
12519 | max_size() const throw() | |
12520 | { return size_t(-1) / sizeof(_Tp); } | |
12521 | ||
12522 | ||
12523 | ||
12524 | void | |
12525 | construct(pointer __p, const _Tp& __val) | |
12526 | { ::new(__p) _Tp(__val); } | |
12527 | ||
12528 | void | |
12529 | destroy(pointer __p) { __p->~_Tp(); } | |
12530 | }; | |
12531 | ||
12532 | template<typename _Tp> | |
12533 | inline bool | |
12534 | operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&) | |
12535 | { return true; } | |
12536 | ||
12537 | template<typename _Tp> | |
12538 | inline bool | |
12539 | operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&) | |
12540 | { return false; } | |
12541 | } | |
12542 | ||
12543 | #pragma GCC visibility pop | |
12544 | # 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/c++allocator.h" 2 3 | |
12545 | # 53 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/allocator.h" 2 3 | |
12546 | ||
12547 | namespace std | |
12548 | { | |
12549 | template<typename _Tp> | |
12550 | class allocator; | |
12551 | ||
12552 | ||
12553 | template<> | |
12554 | class allocator<void> | |
12555 | { | |
12556 | public: | |
12557 | typedef size_t size_type; | |
12558 | typedef ptrdiff_t difference_type; | |
12559 | typedef void* pointer; | |
12560 | typedef const void* const_pointer; | |
12561 | typedef void value_type; | |
12562 | ||
12563 | template<typename _Tp1> | |
12564 | struct rebind | |
12565 | { typedef allocator<_Tp1> other; }; | |
12566 | }; | |
12567 | ||
12568 | ||
12569 | ||
12570 | ||
12571 | ||
12572 | ||
12573 | ||
12574 | template<typename _Tp> | |
12575 | class allocator: public __gnu_cxx::new_allocator<_Tp> | |
12576 | { | |
12577 | public: | |
12578 | typedef size_t size_type; | |
12579 | typedef ptrdiff_t difference_type; | |
12580 | typedef _Tp* pointer; | |
12581 | typedef const _Tp* const_pointer; | |
12582 | typedef _Tp& reference; | |
12583 | typedef const _Tp& const_reference; | |
12584 | typedef _Tp value_type; | |
12585 | ||
12586 | template<typename _Tp1> | |
12587 | struct rebind | |
12588 | { typedef allocator<_Tp1> other; }; | |
12589 | ||
12590 | allocator() throw() { } | |
12591 | ||
12592 | allocator(const allocator& __a) throw() | |
12593 | : __gnu_cxx::new_allocator<_Tp>(__a) { } | |
12594 | ||
12595 | template<typename _Tp1> | |
12596 | allocator(const allocator<_Tp1>&) throw() { } | |
12597 | ||
12598 | ~allocator() throw() { } | |
12599 | ||
12600 | ||
12601 | }; | |
12602 | ||
12603 | template<typename _T1, typename _T2> | |
12604 | inline bool | |
12605 | operator==(const allocator<_T1>&, const allocator<_T2>&) | |
12606 | { return true; } | |
12607 | ||
12608 | template<typename _T1, typename _T2> | |
12609 | inline bool | |
12610 | operator!=(const allocator<_T1>&, const allocator<_T2>&) | |
12611 | { return false; } | |
12612 | ||
12613 | ||
12614 | ||
12615 | ||
12616 | ||
12617 | extern template class allocator<char>; | |
12618 | extern template class allocator<wchar_t>; | |
12619 | ||
12620 | ||
12621 | ||
12622 | ||
12623 | } | |
12624 | # 56 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/memory" 2 3 | |
12625 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_construct.h" 1 3 | |
12626 | # 67 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_construct.h" 3 | |
12627 | namespace std | |
12628 | { | |
12629 | ||
12630 | ||
12631 | ||
12632 | ||
12633 | ||
12634 | ||
12635 | template<typename _T1, typename _T2> | |
12636 | inline void | |
12637 | _Construct(_T1* __p, const _T2& __value) | |
12638 | { | |
12639 | ||
12640 | ||
12641 | ::new(static_cast<void*>(__p)) _T1(__value); | |
12642 | } | |
12643 | ||
12644 | ||
12645 | ||
12646 | ||
12647 | ||
12648 | ||
12649 | ||
12650 | template<typename _T1> | |
12651 | inline void | |
12652 | _Construct(_T1* __p) | |
12653 | { | |
12654 | ||
12655 | ||
12656 | ::new(static_cast<void*>(__p)) _T1(); | |
12657 | } | |
12658 | ||
12659 | ||
12660 | ||
12661 | ||
12662 | ||
12663 | ||
12664 | template<typename _Tp> | |
12665 | inline void | |
12666 | _Destroy(_Tp* __pointer) | |
12667 | { __pointer->~_Tp(); } | |
12668 | # 116 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_construct.h" 3 | |
12669 | template<typename _ForwardIterator> | |
12670 | inline void | |
12671 | __destroy_aux(_ForwardIterator __first, _ForwardIterator __last, | |
12672 | __false_type) | |
12673 | { | |
12674 | for (; __first != __last; ++__first) | |
12675 | std::_Destroy(&*__first); | |
12676 | } | |
12677 | # 134 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_construct.h" 3 | |
12678 | template<typename _ForwardIterator> | |
12679 | inline void | |
12680 | __destroy_aux(_ForwardIterator, _ForwardIterator, __true_type) | |
12681 | { } | |
12682 | # 146 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_construct.h" 3 | |
12683 | template<typename _ForwardIterator> | |
12684 | inline void | |
12685 | _Destroy(_ForwardIterator __first, _ForwardIterator __last) | |
12686 | { | |
12687 | typedef typename iterator_traits<_ForwardIterator>::value_type | |
12688 | _Value_type; | |
12689 | typedef typename std::__is_scalar<_Value_type>::__type | |
12690 | _Has_trivial_destructor; | |
12691 | ||
12692 | std::__destroy_aux(__first, __last, _Has_trivial_destructor()); | |
12693 | } | |
12694 | # 166 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_construct.h" 3 | |
12695 | template <typename _Tp> class allocator; | |
12696 | ||
12697 | template<typename _ForwardIterator, typename _Allocator> | |
12698 | void | |
12699 | _Destroy(_ForwardIterator __first, _ForwardIterator __last, | |
12700 | _Allocator __alloc) | |
12701 | { | |
12702 | for (; __first != __last; ++__first) | |
12703 | __alloc.destroy(&*__first); | |
12704 | } | |
12705 | ||
12706 | template<typename _ForwardIterator, typename _Tp> | |
12707 | inline void | |
12708 | _Destroy(_ForwardIterator __first, _ForwardIterator __last, | |
12709 | allocator<_Tp>) | |
12710 | { | |
12711 | _Destroy(__first, __last); | |
12712 | } | |
12713 | ||
12714 | ||
12715 | } | |
12716 | # 57 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/memory" 2 3 | |
12717 | ||
12718 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_uninitialized.h" 1 3 | |
12719 | # 66 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_uninitialized.h" 3 | |
12720 | namespace std | |
12721 | { | |
12722 | ||
12723 | template<typename _InputIterator, typename _ForwardIterator> | |
12724 | inline _ForwardIterator | |
12725 | __uninitialized_copy_aux(_InputIterator __first, _InputIterator __last, | |
12726 | _ForwardIterator __result, | |
12727 | __true_type) | |
12728 | { return std::copy(__first, __last, __result); } | |
12729 | ||
12730 | template<typename _InputIterator, typename _ForwardIterator> | |
12731 | inline _ForwardIterator | |
12732 | __uninitialized_copy_aux(_InputIterator __first, _InputIterator __last, | |
12733 | _ForwardIterator __result, | |
12734 | __false_type) | |
12735 | { | |
12736 | _ForwardIterator __cur = __result; | |
12737 | try | |
12738 | { | |
12739 | for (; __first != __last; ++__first, ++__cur) | |
12740 | std::_Construct(&*__cur, *__first); | |
12741 | return __cur; | |
12742 | } | |
12743 | catch(...) | |
12744 | { | |
12745 | std::_Destroy(__result, __cur); | |
12746 | throw; | |
12747 | } | |
12748 | } | |
12749 | # 105 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_uninitialized.h" 3 | |
12750 | template<typename _InputIterator, typename _ForwardIterator> | |
12751 | inline _ForwardIterator | |
12752 | uninitialized_copy(_InputIterator __first, _InputIterator __last, | |
12753 | _ForwardIterator __result) | |
12754 | { | |
12755 | typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; | |
12756 | typedef typename std::__is_scalar<_ValueType>::__type _Is_POD; | |
12757 | return std::__uninitialized_copy_aux(__first, __last, __result, | |
12758 | _Is_POD()); | |
12759 | } | |
12760 | ||
12761 | inline char* | |
12762 | uninitialized_copy(const char* __first, const char* __last, char* __result) | |
12763 | { | |
12764 | std::memmove(__result, __first, __last - __first); | |
12765 | return __result + (__last - __first); | |
12766 | } | |
12767 | ||
12768 | inline wchar_t* | |
12769 | uninitialized_copy(const wchar_t* __first, const wchar_t* __last, | |
12770 | wchar_t* __result) | |
12771 | { | |
12772 | std::memmove(__result, __first, sizeof(wchar_t) * (__last - __first)); | |
12773 | return __result + (__last - __first); | |
12774 | } | |
12775 | ||
12776 | ||
12777 | ||
12778 | template<typename _ForwardIterator, typename _Tp> | |
12779 | inline void | |
12780 | __uninitialized_fill_aux(_ForwardIterator __first, | |
12781 | _ForwardIterator __last, | |
12782 | const _Tp& __x, __true_type) | |
12783 | { std::fill(__first, __last, __x); } | |
12784 | ||
12785 | template<typename _ForwardIterator, typename _Tp> | |
12786 | void | |
12787 | __uninitialized_fill_aux(_ForwardIterator __first, _ForwardIterator __last, | |
12788 | const _Tp& __x, __false_type) | |
12789 | { | |
12790 | _ForwardIterator __cur = __first; | |
12791 | try | |
12792 | { | |
12793 | for (; __cur != __last; ++__cur) | |
12794 | std::_Construct(&*__cur, __x); | |
12795 | } | |
12796 | catch(...) | |
12797 | { | |
12798 | std::_Destroy(__first, __cur); | |
12799 | throw; | |
12800 | } | |
12801 | } | |
12802 | # 167 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_uninitialized.h" 3 | |
12803 | template<typename _ForwardIterator, typename _Tp> | |
12804 | inline void | |
12805 | uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, | |
12806 | const _Tp& __x) | |
12807 | { | |
12808 | typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; | |
12809 | typedef typename std::__is_scalar<_ValueType>::__type _Is_POD; | |
12810 | std::__uninitialized_fill_aux(__first, __last, __x, _Is_POD()); | |
12811 | } | |
12812 | ||
12813 | ||
12814 | ||
12815 | template<typename _ForwardIterator, typename _Size, typename _Tp> | |
12816 | inline void | |
12817 | __uninitialized_fill_n_aux(_ForwardIterator __first, _Size __n, | |
12818 | const _Tp& __x, __true_type) | |
12819 | { std::fill_n(__first, __n, __x); } | |
12820 | ||
12821 | template<typename _ForwardIterator, typename _Size, typename _Tp> | |
12822 | void | |
12823 | __uninitialized_fill_n_aux(_ForwardIterator __first, _Size __n, | |
12824 | const _Tp& __x, __false_type) | |
12825 | { | |
12826 | _ForwardIterator __cur = __first; | |
12827 | try | |
12828 | { | |
12829 | for (; __n > 0; --__n, ++__cur) | |
12830 | std::_Construct(&*__cur, __x); | |
12831 | } | |
12832 | catch(...) | |
12833 | { | |
12834 | std::_Destroy(__first, __cur); | |
12835 | throw; | |
12836 | } | |
12837 | } | |
12838 | # 212 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_uninitialized.h" 3 | |
12839 | template<typename _ForwardIterator, typename _Size, typename _Tp> | |
12840 | inline void | |
12841 | uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) | |
12842 | { | |
12843 | typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; | |
12844 | typedef typename std::__is_scalar<_ValueType>::__type _Is_POD; | |
12845 | std::__uninitialized_fill_n_aux(__first, __n, __x, _Is_POD()); | |
12846 | } | |
12847 | ||
12848 | ||
12849 | ||
12850 | ||
12851 | ||
12852 | ||
12853 | ||
12854 | template<typename _InputIterator, typename _ForwardIterator, | |
12855 | typename _Allocator> | |
12856 | _ForwardIterator | |
12857 | __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, | |
12858 | _ForwardIterator __result, | |
12859 | _Allocator __alloc) | |
12860 | { | |
12861 | _ForwardIterator __cur = __result; | |
12862 | try | |
12863 | { | |
12864 | for (; __first != __last; ++__first, ++__cur) | |
12865 | __alloc.construct(&*__cur, *__first); | |
12866 | return __cur; | |
12867 | } | |
12868 | catch(...) | |
12869 | { | |
12870 | std::_Destroy(__result, __cur, __alloc); | |
12871 | throw; | |
12872 | } | |
12873 | } | |
12874 | ||
12875 | template<typename _InputIterator, typename _ForwardIterator, typename _Tp> | |
12876 | inline _ForwardIterator | |
12877 | __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, | |
12878 | _ForwardIterator __result, | |
12879 | allocator<_Tp>) | |
12880 | { | |
12881 | return std::uninitialized_copy(__first, __last, __result); | |
12882 | } | |
12883 | ||
12884 | template<typename _ForwardIterator, typename _Tp, typename _Allocator> | |
12885 | void | |
12886 | __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, | |
12887 | const _Tp& __x, _Allocator __alloc) | |
12888 | { | |
12889 | _ForwardIterator __cur = __first; | |
12890 | try | |
12891 | { | |
12892 | for (; __cur != __last; ++__cur) | |
12893 | __alloc.construct(&*__cur, __x); | |
12894 | } | |
12895 | catch(...) | |
12896 | { | |
12897 | std::_Destroy(__first, __cur, __alloc); | |
12898 | throw; | |
12899 | } | |
12900 | } | |
12901 | ||
12902 | template<typename _ForwardIterator, typename _Tp, typename _Tp2> | |
12903 | inline void | |
12904 | __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, | |
12905 | const _Tp& __x, allocator<_Tp2>) | |
12906 | { | |
12907 | std::uninitialized_fill(__first, __last, __x); | |
12908 | } | |
12909 | ||
12910 | template<typename _ForwardIterator, typename _Size, typename _Tp, | |
12911 | typename _Allocator> | |
12912 | void | |
12913 | __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, | |
12914 | const _Tp& __x, | |
12915 | _Allocator __alloc) | |
12916 | { | |
12917 | _ForwardIterator __cur = __first; | |
12918 | try | |
12919 | { | |
12920 | for (; __n > 0; --__n, ++__cur) | |
12921 | __alloc.construct(&*__cur, __x); | |
12922 | } | |
12923 | catch(...) | |
12924 | { | |
12925 | std::_Destroy(__first, __cur, __alloc); | |
12926 | throw; | |
12927 | } | |
12928 | } | |
12929 | ||
12930 | template<typename _ForwardIterator, typename _Size, typename _Tp, | |
12931 | typename _Tp2> | |
12932 | void | |
12933 | __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, | |
12934 | const _Tp& __x, | |
12935 | allocator<_Tp2>) | |
12936 | { | |
12937 | std::uninitialized_fill_n(__first, __n, __x); | |
12938 | } | |
12939 | # 323 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_uninitialized.h" 3 | |
12940 | template<typename _InputIterator1, typename _InputIterator2, | |
12941 | typename _ForwardIterator, typename _Allocator> | |
12942 | inline _ForwardIterator | |
12943 | __uninitialized_copy_copy(_InputIterator1 __first1, | |
12944 | _InputIterator1 __last1, | |
12945 | _InputIterator2 __first2, | |
12946 | _InputIterator2 __last2, | |
12947 | _ForwardIterator __result, | |
12948 | _Allocator __alloc) | |
12949 | { | |
12950 | _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1, | |
12951 | __result, | |
12952 | __alloc); | |
12953 | try | |
12954 | { | |
12955 | return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc); | |
12956 | } | |
12957 | catch(...) | |
12958 | { | |
12959 | std::_Destroy(__result, __mid, __alloc); | |
12960 | throw; | |
12961 | } | |
12962 | } | |
12963 | ||
12964 | ||
12965 | ||
12966 | ||
12967 | template<typename _ForwardIterator, typename _Tp, typename _InputIterator, | |
12968 | typename _Allocator> | |
12969 | inline _ForwardIterator | |
12970 | __uninitialized_fill_copy(_ForwardIterator __result, _ForwardIterator __mid, | |
12971 | const _Tp& __x, _InputIterator __first, | |
12972 | _InputIterator __last, | |
12973 | _Allocator __alloc) | |
12974 | { | |
12975 | std::__uninitialized_fill_a(__result, __mid, __x, __alloc); | |
12976 | try | |
12977 | { | |
12978 | return std::__uninitialized_copy_a(__first, __last, __mid, __alloc); | |
12979 | } | |
12980 | catch(...) | |
12981 | { | |
12982 | std::_Destroy(__result, __mid, __alloc); | |
12983 | throw; | |
12984 | } | |
12985 | } | |
12986 | ||
12987 | ||
12988 | ||
12989 | ||
12990 | template<typename _InputIterator, typename _ForwardIterator, typename _Tp, | |
12991 | typename _Allocator> | |
12992 | inline void | |
12993 | __uninitialized_copy_fill(_InputIterator __first1, _InputIterator __last1, | |
12994 | _ForwardIterator __first2, | |
12995 | _ForwardIterator __last2, const _Tp& __x, | |
12996 | _Allocator __alloc) | |
12997 | { | |
12998 | _ForwardIterator __mid2 = std::__uninitialized_copy_a(__first1, __last1, | |
12999 | __first2, | |
13000 | __alloc); | |
13001 | try | |
13002 | { | |
13003 | std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc); | |
13004 | } | |
13005 | catch(...) | |
13006 | { | |
13007 | std::_Destroy(__first2, __mid2, __alloc); | |
13008 | throw; | |
13009 | } | |
13010 | } | |
13011 | ||
13012 | } | |
13013 | # 59 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/memory" 2 3 | |
13014 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_raw_storage_iter.h" 1 3 | |
13015 | # 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_raw_storage_iter.h" 3 | |
13016 | namespace std | |
13017 | { | |
13018 | ||
13019 | ||
13020 | ||
13021 | ||
13022 | template <class _ForwardIterator, class _Tp> | |
13023 | class raw_storage_iterator | |
13024 | : public iterator<output_iterator_tag, void, void, void, void> | |
13025 | { | |
13026 | protected: | |
13027 | _ForwardIterator _M_iter; | |
13028 | ||
13029 | public: | |
13030 | explicit | |
13031 | raw_storage_iterator(_ForwardIterator __x) | |
13032 | : _M_iter(__x) {} | |
13033 | ||
13034 | raw_storage_iterator& | |
13035 | operator*() { return *this; } | |
13036 | ||
13037 | raw_storage_iterator& | |
13038 | operator=(const _Tp& __element) | |
13039 | { | |
13040 | std::_Construct(&*_M_iter, __element); | |
13041 | return *this; | |
13042 | } | |
13043 | ||
13044 | raw_storage_iterator<_ForwardIterator, _Tp>& | |
13045 | operator++() | |
13046 | { | |
13047 | ++_M_iter; | |
13048 | return *this; | |
13049 | } | |
13050 | ||
13051 | raw_storage_iterator<_ForwardIterator, _Tp> | |
13052 | operator++(int) | |
13053 | { | |
13054 | raw_storage_iterator<_ForwardIterator, _Tp> __tmp = *this; | |
13055 | ++_M_iter; | |
13056 | return __tmp; | |
13057 | } | |
13058 | }; | |
13059 | } | |
13060 | # 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/memory" 2 3 | |
13061 | ||
13062 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/limits" 1 3 | |
13063 | # 46 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/limits" 3 | |
13064 | ||
13065 | # 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/limits" 3 | |
13066 | #pragma GCC visibility push(default) | |
13067 | # 151 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/limits" 3 | |
13068 | namespace std | |
13069 | { | |
13070 | ||
13071 | ||
13072 | ||
13073 | ||
13074 | ||
13075 | enum float_round_style | |
13076 | { | |
13077 | round_indeterminate = -1, | |
13078 | round_toward_zero = 0, | |
13079 | round_to_nearest = 1, | |
13080 | round_toward_infinity = 2, | |
13081 | round_toward_neg_infinity = 3 | |
13082 | }; | |
13083 | ||
13084 | ||
13085 | ||
13086 | ||
13087 | ||
13088 | ||
13089 | ||
13090 | enum float_denorm_style | |
13091 | { | |
13092 | ||
13093 | denorm_indeterminate = -1, | |
13094 | ||
13095 | denorm_absent = 0, | |
13096 | ||
13097 | denorm_present = 1 | |
13098 | }; | |
13099 | # 193 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/limits" 3 | |
13100 | struct __numeric_limits_base | |
13101 | { | |
13102 | ||
13103 | ||
13104 | static const bool is_specialized = false; | |
13105 | ||
13106 | ||
13107 | ||
13108 | ||
13109 | static const int digits = 0; | |
13110 | ||
13111 | static const int digits10 = 0; | |
13112 | ||
13113 | static const bool is_signed = false; | |
13114 | ||
13115 | ||
13116 | ||
13117 | ||
13118 | ||
13119 | static const bool is_integer = false; | |
13120 | ||
13121 | ||
13122 | ||
13123 | ||
13124 | static const bool is_exact = false; | |
13125 | ||
13126 | ||
13127 | static const int radix = 0; | |
13128 | ||
13129 | ||
13130 | ||
13131 | static const int min_exponent = 0; | |
13132 | ||
13133 | ||
13134 | static const int min_exponent10 = 0; | |
13135 | ||
13136 | ||
13137 | ||
13138 | static const int max_exponent = 0; | |
13139 | ||
13140 | ||
13141 | static const int max_exponent10 = 0; | |
13142 | ||
13143 | ||
13144 | static const bool has_infinity = false; | |
13145 | ||
13146 | ||
13147 | static const bool has_quiet_NaN = false; | |
13148 | ||
13149 | ||
13150 | static const bool has_signaling_NaN = false; | |
13151 | ||
13152 | static const float_denorm_style has_denorm = denorm_absent; | |
13153 | ||
13154 | ||
13155 | static const bool has_denorm_loss = false; | |
13156 | ||
13157 | ||
13158 | ||
13159 | static const bool is_iec559 = false; | |
13160 | ||
13161 | ||
13162 | ||
13163 | static const bool is_bounded = false; | |
13164 | ||
13165 | ||
13166 | ||
13167 | ||
13168 | static const bool is_modulo = false; | |
13169 | ||
13170 | ||
13171 | static const bool traps = false; | |
13172 | ||
13173 | static const bool tinyness_before = false; | |
13174 | ||
13175 | ||
13176 | ||
13177 | static const float_round_style round_style = round_toward_zero; | |
13178 | }; | |
13179 | # 286 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/limits" 3 | |
13180 | template<typename _Tp> | |
13181 | struct numeric_limits : public __numeric_limits_base | |
13182 | { | |
13183 | ||
13184 | ||
13185 | static _Tp min() throw() { return static_cast<_Tp>(0); } | |
13186 | ||
13187 | static _Tp max() throw() { return static_cast<_Tp>(0); } | |
13188 | ||
13189 | ||
13190 | static _Tp epsilon() throw() { return static_cast<_Tp>(0); } | |
13191 | ||
13192 | static _Tp round_error() throw() { return static_cast<_Tp>(0); } | |
13193 | ||
13194 | static _Tp infinity() throw() { return static_cast<_Tp>(0); } | |
13195 | ||
13196 | static _Tp quiet_NaN() throw() { return static_cast<_Tp>(0); } | |
13197 | ||
13198 | ||
13199 | static _Tp signaling_NaN() throw() { return static_cast<_Tp>(0); } | |
13200 | ||
13201 | ||
13202 | ||
13203 | static _Tp denorm_min() throw() { return static_cast<_Tp>(0); } | |
13204 | }; | |
13205 | ||
13206 | ||
13207 | ||
13208 | ||
13209 | ||
13210 | template<> | |
13211 | struct numeric_limits<bool> | |
13212 | { | |
13213 | static const bool is_specialized = true; | |
13214 | ||
13215 | static bool min() throw() | |
13216 | { return false; } | |
13217 | static bool max() throw() | |
13218 | { return true; } | |
13219 | ||
13220 | static const int digits = 1; | |
13221 | static const int digits10 = 0; | |
13222 | static const bool is_signed = false; | |
13223 | static const bool is_integer = true; | |
13224 | static const bool is_exact = true; | |
13225 | static const int radix = 2; | |
13226 | static bool epsilon() throw() | |
13227 | { return false; } | |
13228 | static bool round_error() throw() | |
13229 | { return false; } | |
13230 | ||
13231 | static const int min_exponent = 0; | |
13232 | static const int min_exponent10 = 0; | |
13233 | static const int max_exponent = 0; | |
13234 | static const int max_exponent10 = 0; | |
13235 | ||
13236 | static const bool has_infinity = false; | |
13237 | static const bool has_quiet_NaN = false; | |
13238 | static const bool has_signaling_NaN = false; | |
13239 | static const float_denorm_style has_denorm = denorm_absent; | |
13240 | static const bool has_denorm_loss = false; | |
13241 | ||
13242 | static bool infinity() throw() | |
13243 | { return false; } | |
13244 | static bool quiet_NaN() throw() | |
13245 | { return false; } | |
13246 | static bool signaling_NaN() throw() | |
13247 | { return false; } | |
13248 | static bool denorm_min() throw() | |
13249 | { return false; } | |
13250 | ||
13251 | static const bool is_iec559 = false; | |
13252 | static const bool is_bounded = true; | |
13253 | static const bool is_modulo = false; | |
13254 | ||
13255 | ||
13256 | ||
13257 | ||
13258 | static const bool traps = true; | |
13259 | static const bool tinyness_before = false; | |
13260 | static const float_round_style round_style = round_toward_zero; | |
13261 | }; | |
13262 | ||
13263 | ||
13264 | template<> | |
13265 | struct numeric_limits<char> | |
13266 | { | |
13267 | static const bool is_specialized = true; | |
13268 | ||
13269 | static char min() throw() | |
13270 | { return (((char)(-1) < 0) ? (char)1 << (sizeof(char) * 8 - ((char)(-1) < 0)) : (char)0); } | |
13271 | static char max() throw() | |
13272 | { return (((char)(-1) < 0) ? ((char)1 << (sizeof(char) * 8 - ((char)(-1) < 0))) - 1 : ~(char)0); } | |
13273 | ||
13274 | static const int digits = (sizeof(char) * 8 - ((char)(-1) < 0)); | |
13275 | static const int digits10 = ((sizeof(char) * 8 - ((char)(-1) < 0)) * 643 / 2136); | |
13276 | static const bool is_signed = ((char)(-1) < 0); | |
13277 | static const bool is_integer = true; | |
13278 | static const bool is_exact = true; | |
13279 | static const int radix = 2; | |
13280 | static char epsilon() throw() | |
13281 | { return 0; } | |
13282 | static char round_error() throw() | |
13283 | { return 0; } | |
13284 | ||
13285 | static const int min_exponent = 0; | |
13286 | static const int min_exponent10 = 0; | |
13287 | static const int max_exponent = 0; | |
13288 | static const int max_exponent10 = 0; | |
13289 | ||
13290 | static const bool has_infinity = false; | |
13291 | static const bool has_quiet_NaN = false; | |
13292 | static const bool has_signaling_NaN = false; | |
13293 | static const float_denorm_style has_denorm = denorm_absent; | |
13294 | static const bool has_denorm_loss = false; | |
13295 | ||
13296 | static char infinity() throw() | |
13297 | { return char(); } | |
13298 | static char quiet_NaN() throw() | |
13299 | { return char(); } | |
13300 | static char signaling_NaN() throw() | |
13301 | { return char(); } | |
13302 | static char denorm_min() throw() | |
13303 | { return static_cast<char>(0); } | |
13304 | ||
13305 | static const bool is_iec559 = false; | |
13306 | static const bool is_bounded = true; | |
13307 | static const bool is_modulo = true; | |
13308 | ||
13309 | static const bool traps = true; | |
13310 | static const bool tinyness_before = false; | |
13311 | static const float_round_style round_style = round_toward_zero; | |
13312 | }; | |
13313 | ||
13314 | ||
13315 | template<> | |
13316 | struct numeric_limits<signed char> | |
13317 | { | |
13318 | static const bool is_specialized = true; | |
13319 | ||
13320 | static signed char min() throw() | |
13321 | { return -127 - 1; } | |
13322 | static signed char max() throw() | |
13323 | { return 127; } | |
13324 | ||
13325 | static const int digits = (sizeof(signed char) * 8 - ((signed char)(-1) < 0)); | |
13326 | static const int digits10 = ((sizeof(signed char) * 8 - ((signed char)(-1) < 0)) * 643 / 2136); | |
13327 | static const bool is_signed = true; | |
13328 | static const bool is_integer = true; | |
13329 | static const bool is_exact = true; | |
13330 | static const int radix = 2; | |
13331 | static signed char epsilon() throw() | |
13332 | { return 0; } | |
13333 | static signed char round_error() throw() | |
13334 | { return 0; } | |
13335 | ||
13336 | static const int min_exponent = 0; | |
13337 | static const int min_exponent10 = 0; | |
13338 | static const int max_exponent = 0; | |
13339 | static const int max_exponent10 = 0; | |
13340 | ||
13341 | static const bool has_infinity = false; | |
13342 | static const bool has_quiet_NaN = false; | |
13343 | static const bool has_signaling_NaN = false; | |
13344 | static const float_denorm_style has_denorm = denorm_absent; | |
13345 | static const bool has_denorm_loss = false; | |
13346 | ||
13347 | static signed char infinity() throw() | |
13348 | { return static_cast<signed char>(0); } | |
13349 | static signed char quiet_NaN() throw() | |
13350 | { return static_cast<signed char>(0); } | |
13351 | static signed char signaling_NaN() throw() | |
13352 | { return static_cast<signed char>(0); } | |
13353 | static signed char denorm_min() throw() | |
13354 | { return static_cast<signed char>(0); } | |
13355 | ||
13356 | static const bool is_iec559 = false; | |
13357 | static const bool is_bounded = true; | |
13358 | static const bool is_modulo = true; | |
13359 | ||
13360 | static const bool traps = true; | |
13361 | static const bool tinyness_before = false; | |
13362 | static const float_round_style round_style = round_toward_zero; | |
13363 | }; | |
13364 | ||
13365 | ||
13366 | template<> | |
13367 | struct numeric_limits<unsigned char> | |
13368 | { | |
13369 | static const bool is_specialized = true; | |
13370 | ||
13371 | static unsigned char min() throw() | |
13372 | { return 0; } | |
13373 | static unsigned char max() throw() | |
13374 | { return 127 * 2U + 1; } | |
13375 | ||
13376 | static const int digits = (sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)); | |
13377 | static const int digits10 = ((sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)) * 643 / 2136); | |
13378 | static const bool is_signed = false; | |
13379 | static const bool is_integer = true; | |
13380 | static const bool is_exact = true; | |
13381 | static const int radix = 2; | |
13382 | static unsigned char epsilon() throw() | |
13383 | { return 0; } | |
13384 | static unsigned char round_error() throw() | |
13385 | { return 0; } | |
13386 | ||
13387 | static const int min_exponent = 0; | |
13388 | static const int min_exponent10 = 0; | |
13389 | static const int max_exponent = 0; | |
13390 | static const int max_exponent10 = 0; | |
13391 | ||
13392 | static const bool has_infinity = false; | |
13393 | static const bool has_quiet_NaN = false; | |
13394 | static const bool has_signaling_NaN = false; | |
13395 | static const float_denorm_style has_denorm = denorm_absent; | |
13396 | static const bool has_denorm_loss = false; | |
13397 | ||
13398 | static unsigned char infinity() throw() | |
13399 | { return static_cast<unsigned char>(0); } | |
13400 | static unsigned char quiet_NaN() throw() | |
13401 | { return static_cast<unsigned char>(0); } | |
13402 | static unsigned char signaling_NaN() throw() | |
13403 | { return static_cast<unsigned char>(0); } | |
13404 | static unsigned char denorm_min() throw() | |
13405 | { return static_cast<unsigned char>(0); } | |
13406 | ||
13407 | static const bool is_iec559 = false; | |
13408 | static const bool is_bounded = true; | |
13409 | static const bool is_modulo = true; | |
13410 | ||
13411 | static const bool traps = true; | |
13412 | static const bool tinyness_before = false; | |
13413 | static const float_round_style round_style = round_toward_zero; | |
13414 | }; | |
13415 | ||
13416 | ||
13417 | template<> | |
13418 | struct numeric_limits<wchar_t> | |
13419 | { | |
13420 | static const bool is_specialized = true; | |
13421 | ||
13422 | static wchar_t min() throw() | |
13423 | { return (((wchar_t)(-1) < 0) ? (wchar_t)1 << (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) : (wchar_t)0); } | |
13424 | static wchar_t max() throw() | |
13425 | { return (((wchar_t)(-1) < 0) ? ((wchar_t)1 << (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0))) - 1 : ~(wchar_t)0); } | |
13426 | ||
13427 | static const int digits = (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)); | |
13428 | static const int digits10 = ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) * 643 / 2136); | |
13429 | static const bool is_signed = ((wchar_t)(-1) < 0); | |
13430 | static const bool is_integer = true; | |
13431 | static const bool is_exact = true; | |
13432 | static const int radix = 2; | |
13433 | static wchar_t epsilon() throw() | |
13434 | { return 0; } | |
13435 | static wchar_t round_error() throw() | |
13436 | { return 0; } | |
13437 | ||
13438 | static const int min_exponent = 0; | |
13439 | static const int min_exponent10 = 0; | |
13440 | static const int max_exponent = 0; | |
13441 | static const int max_exponent10 = 0; | |
13442 | ||
13443 | static const bool has_infinity = false; | |
13444 | static const bool has_quiet_NaN = false; | |
13445 | static const bool has_signaling_NaN = false; | |
13446 | static const float_denorm_style has_denorm = denorm_absent; | |
13447 | static const bool has_denorm_loss = false; | |
13448 | ||
13449 | static wchar_t infinity() throw() | |
13450 | { return wchar_t(); } | |
13451 | static wchar_t quiet_NaN() throw() | |
13452 | { return wchar_t(); } | |
13453 | static wchar_t signaling_NaN() throw() | |
13454 | { return wchar_t(); } | |
13455 | static wchar_t denorm_min() throw() | |
13456 | { return wchar_t(); } | |
13457 | ||
13458 | static const bool is_iec559 = false; | |
13459 | static const bool is_bounded = true; | |
13460 | static const bool is_modulo = true; | |
13461 | ||
13462 | static const bool traps = true; | |
13463 | static const bool tinyness_before = false; | |
13464 | static const float_round_style round_style = round_toward_zero; | |
13465 | }; | |
13466 | ||
13467 | ||
13468 | template<> | |
13469 | struct numeric_limits<short> | |
13470 | { | |
13471 | static const bool is_specialized = true; | |
13472 | ||
13473 | static short min() throw() | |
13474 | { return -32767 - 1; } | |
13475 | static short max() throw() | |
13476 | { return 32767; } | |
13477 | ||
13478 | static const int digits = (sizeof(short) * 8 - ((short)(-1) < 0)); | |
13479 | static const int digits10 = ((sizeof(short) * 8 - ((short)(-1) < 0)) * 643 / 2136); | |
13480 | static const bool is_signed = true; | |
13481 | static const bool is_integer = true; | |
13482 | static const bool is_exact = true; | |
13483 | static const int radix = 2; | |
13484 | static short epsilon() throw() | |
13485 | { return 0; } | |
13486 | static short round_error() throw() | |
13487 | { return 0; } | |
13488 | ||
13489 | static const int min_exponent = 0; | |
13490 | static const int min_exponent10 = 0; | |
13491 | static const int max_exponent = 0; | |
13492 | static const int max_exponent10 = 0; | |
13493 | ||
13494 | static const bool has_infinity = false; | |
13495 | static const bool has_quiet_NaN = false; | |
13496 | static const bool has_signaling_NaN = false; | |
13497 | static const float_denorm_style has_denorm = denorm_absent; | |
13498 | static const bool has_denorm_loss = false; | |
13499 | ||
13500 | static short infinity() throw() | |
13501 | { return short(); } | |
13502 | static short quiet_NaN() throw() | |
13503 | { return short(); } | |
13504 | static short signaling_NaN() throw() | |
13505 | { return short(); } | |
13506 | static short denorm_min() throw() | |
13507 | { return short(); } | |
13508 | ||
13509 | static const bool is_iec559 = false; | |
13510 | static const bool is_bounded = true; | |
13511 | static const bool is_modulo = true; | |
13512 | ||
13513 | static const bool traps = true; | |
13514 | static const bool tinyness_before = false; | |
13515 | static const float_round_style round_style = round_toward_zero; | |
13516 | }; | |
13517 | ||
13518 | ||
13519 | template<> | |
13520 | struct numeric_limits<unsigned short> | |
13521 | { | |
13522 | static const bool is_specialized = true; | |
13523 | ||
13524 | static unsigned short min() throw() | |
13525 | { return 0; } | |
13526 | static unsigned short max() throw() | |
13527 | { return 32767 * 2U + 1; } | |
13528 | ||
13529 | static const int digits = (sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)); | |
13530 | static const int digits10 = ((sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)) * 643 / 2136); | |
13531 | static const bool is_signed = false; | |
13532 | static const bool is_integer = true; | |
13533 | static const bool is_exact = true; | |
13534 | static const int radix = 2; | |
13535 | static unsigned short epsilon() throw() | |
13536 | { return 0; } | |
13537 | static unsigned short round_error() throw() | |
13538 | { return 0; } | |
13539 | ||
13540 | static const int min_exponent = 0; | |
13541 | static const int min_exponent10 = 0; | |
13542 | static const int max_exponent = 0; | |
13543 | static const int max_exponent10 = 0; | |
13544 | ||
13545 | static const bool has_infinity = false; | |
13546 | static const bool has_quiet_NaN = false; | |
13547 | static const bool has_signaling_NaN = false; | |
13548 | static const float_denorm_style has_denorm = denorm_absent; | |
13549 | static const bool has_denorm_loss = false; | |
13550 | ||
13551 | static unsigned short infinity() throw() | |
13552 | { return static_cast<unsigned short>(0); } | |
13553 | static unsigned short quiet_NaN() throw() | |
13554 | { return static_cast<unsigned short>(0); } | |
13555 | static unsigned short signaling_NaN() throw() | |
13556 | { return static_cast<unsigned short>(0); } | |
13557 | static unsigned short denorm_min() throw() | |
13558 | { return static_cast<unsigned short>(0); } | |
13559 | ||
13560 | static const bool is_iec559 = false; | |
13561 | static const bool is_bounded = true; | |
13562 | static const bool is_modulo = true; | |
13563 | ||
13564 | static const bool traps = true; | |
13565 | static const bool tinyness_before = false; | |
13566 | static const float_round_style round_style = round_toward_zero; | |
13567 | }; | |
13568 | ||
13569 | ||
13570 | template<> | |
13571 | struct numeric_limits<int> | |
13572 | { | |
13573 | static const bool is_specialized = true; | |
13574 | ||
13575 | static int min() throw() | |
13576 | { return -2147483647 - 1; } | |
13577 | static int max() throw() | |
13578 | { return 2147483647; } | |
13579 | ||
13580 | static const int digits = (sizeof(int) * 8 - ((int)(-1) < 0)); | |
13581 | static const int digits10 = ((sizeof(int) * 8 - ((int)(-1) < 0)) * 643 / 2136); | |
13582 | static const bool is_signed = true; | |
13583 | static const bool is_integer = true; | |
13584 | static const bool is_exact = true; | |
13585 | static const int radix = 2; | |
13586 | static int epsilon() throw() | |
13587 | { return 0; } | |
13588 | static int round_error() throw() | |
13589 | { return 0; } | |
13590 | ||
13591 | static const int min_exponent = 0; | |
13592 | static const int min_exponent10 = 0; | |
13593 | static const int max_exponent = 0; | |
13594 | static const int max_exponent10 = 0; | |
13595 | ||
13596 | static const bool has_infinity = false; | |
13597 | static const bool has_quiet_NaN = false; | |
13598 | static const bool has_signaling_NaN = false; | |
13599 | static const float_denorm_style has_denorm = denorm_absent; | |
13600 | static const bool has_denorm_loss = false; | |
13601 | ||
13602 | static int infinity() throw() | |
13603 | { return static_cast<int>(0); } | |
13604 | static int quiet_NaN() throw() | |
13605 | { return static_cast<int>(0); } | |
13606 | static int signaling_NaN() throw() | |
13607 | { return static_cast<int>(0); } | |
13608 | static int denorm_min() throw() | |
13609 | { return static_cast<int>(0); } | |
13610 | ||
13611 | static const bool is_iec559 = false; | |
13612 | static const bool is_bounded = true; | |
13613 | static const bool is_modulo = true; | |
13614 | ||
13615 | static const bool traps = true; | |
13616 | static const bool tinyness_before = false; | |
13617 | static const float_round_style round_style = round_toward_zero; | |
13618 | }; | |
13619 | ||
13620 | ||
13621 | template<> | |
13622 | struct numeric_limits<unsigned int> | |
13623 | { | |
13624 | static const bool is_specialized = true; | |
13625 | ||
13626 | static unsigned int min() throw() | |
13627 | { return 0; } | |
13628 | static unsigned int max() throw() | |
13629 | { return 2147483647 * 2U + 1; } | |
13630 | ||
13631 | static const int digits = (sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)); | |
13632 | static const int digits10 = ((sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)) * 643 / 2136); | |
13633 | static const bool is_signed = false; | |
13634 | static const bool is_integer = true; | |
13635 | static const bool is_exact = true; | |
13636 | static const int radix = 2; | |
13637 | static unsigned int epsilon() throw() | |
13638 | { return 0; } | |
13639 | static unsigned int round_error() throw() | |
13640 | { return 0; } | |
13641 | ||
13642 | static const int min_exponent = 0; | |
13643 | static const int min_exponent10 = 0; | |
13644 | static const int max_exponent = 0; | |
13645 | static const int max_exponent10 = 0; | |
13646 | ||
13647 | static const bool has_infinity = false; | |
13648 | static const bool has_quiet_NaN = false; | |
13649 | static const bool has_signaling_NaN = false; | |
13650 | static const float_denorm_style has_denorm = denorm_absent; | |
13651 | static const bool has_denorm_loss = false; | |
13652 | ||
13653 | static unsigned int infinity() throw() | |
13654 | { return static_cast<unsigned int>(0); } | |
13655 | static unsigned int quiet_NaN() throw() | |
13656 | { return static_cast<unsigned int>(0); } | |
13657 | static unsigned int signaling_NaN() throw() | |
13658 | { return static_cast<unsigned int>(0); } | |
13659 | static unsigned int denorm_min() throw() | |
13660 | { return static_cast<unsigned int>(0); } | |
13661 | ||
13662 | static const bool is_iec559 = false; | |
13663 | static const bool is_bounded = true; | |
13664 | static const bool is_modulo = true; | |
13665 | ||
13666 | static const bool traps = true; | |
13667 | static const bool tinyness_before = false; | |
13668 | static const float_round_style round_style = round_toward_zero; | |
13669 | }; | |
13670 | ||
13671 | ||
13672 | template<> | |
13673 | struct numeric_limits<long> | |
13674 | { | |
13675 | static const bool is_specialized = true; | |
13676 | ||
13677 | static long min() throw() | |
13678 | { return -9223372036854775807L - 1; } | |
13679 | static long max() throw() | |
13680 | { return 9223372036854775807L; } | |
13681 | ||
13682 | static const int digits = (sizeof(long) * 8 - ((long)(-1) < 0)); | |
13683 | static const int digits10 = ((sizeof(long) * 8 - ((long)(-1) < 0)) * 643 / 2136); | |
13684 | static const bool is_signed = true; | |
13685 | static const bool is_integer = true; | |
13686 | static const bool is_exact = true; | |
13687 | static const int radix = 2; | |
13688 | static long epsilon() throw() | |
13689 | { return 0; } | |
13690 | static long round_error() throw() | |
13691 | { return 0; } | |
13692 | ||
13693 | static const int min_exponent = 0; | |
13694 | static const int min_exponent10 = 0; | |
13695 | static const int max_exponent = 0; | |
13696 | static const int max_exponent10 = 0; | |
13697 | ||
13698 | static const bool has_infinity = false; | |
13699 | static const bool has_quiet_NaN = false; | |
13700 | static const bool has_signaling_NaN = false; | |
13701 | static const float_denorm_style has_denorm = denorm_absent; | |
13702 | static const bool has_denorm_loss = false; | |
13703 | ||
13704 | static long infinity() throw() | |
13705 | { return static_cast<long>(0); } | |
13706 | static long quiet_NaN() throw() | |
13707 | { return static_cast<long>(0); } | |
13708 | static long signaling_NaN() throw() | |
13709 | { return static_cast<long>(0); } | |
13710 | static long denorm_min() throw() | |
13711 | { return static_cast<long>(0); } | |
13712 | ||
13713 | static const bool is_iec559 = false; | |
13714 | static const bool is_bounded = true; | |
13715 | static const bool is_modulo = true; | |
13716 | ||
13717 | static const bool traps = true; | |
13718 | static const bool tinyness_before = false; | |
13719 | static const float_round_style round_style = round_toward_zero; | |
13720 | }; | |
13721 | ||
13722 | ||
13723 | template<> | |
13724 | struct numeric_limits<unsigned long> | |
13725 | { | |
13726 | static const bool is_specialized = true; | |
13727 | ||
13728 | static unsigned long min() throw() | |
13729 | { return 0; } | |
13730 | static unsigned long max() throw() | |
13731 | { return 9223372036854775807L * 2UL + 1; } | |
13732 | ||
13733 | static const int digits = (sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)); | |
13734 | static const int digits10 = ((sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)) * 643 / 2136); | |
13735 | static const bool is_signed = false; | |
13736 | static const bool is_integer = true; | |
13737 | static const bool is_exact = true; | |
13738 | static const int radix = 2; | |
13739 | static unsigned long epsilon() throw() | |
13740 | { return 0; } | |
13741 | static unsigned long round_error() throw() | |
13742 | { return 0; } | |
13743 | ||
13744 | static const int min_exponent = 0; | |
13745 | static const int min_exponent10 = 0; | |
13746 | static const int max_exponent = 0; | |
13747 | static const int max_exponent10 = 0; | |
13748 | ||
13749 | static const bool has_infinity = false; | |
13750 | static const bool has_quiet_NaN = false; | |
13751 | static const bool has_signaling_NaN = false; | |
13752 | static const float_denorm_style has_denorm = denorm_absent; | |
13753 | static const bool has_denorm_loss = false; | |
13754 | ||
13755 | static unsigned long infinity() throw() | |
13756 | { return static_cast<unsigned long>(0); } | |
13757 | static unsigned long quiet_NaN() throw() | |
13758 | { return static_cast<unsigned long>(0); } | |
13759 | static unsigned long signaling_NaN() throw() | |
13760 | { return static_cast<unsigned long>(0); } | |
13761 | static unsigned long denorm_min() throw() | |
13762 | { return static_cast<unsigned long>(0); } | |
13763 | ||
13764 | static const bool is_iec559 = false; | |
13765 | static const bool is_bounded = true; | |
13766 | static const bool is_modulo = true; | |
13767 | ||
13768 | static const bool traps = true; | |
13769 | static const bool tinyness_before = false; | |
13770 | static const float_round_style round_style = round_toward_zero; | |
13771 | }; | |
13772 | ||
13773 | ||
13774 | template<> | |
13775 | struct numeric_limits<long long> | |
13776 | { | |
13777 | static const bool is_specialized = true; | |
13778 | ||
13779 | static long long min() throw() | |
13780 | { return -9223372036854775807LL - 1; } | |
13781 | static long long max() throw() | |
13782 | { return 9223372036854775807LL; } | |
13783 | ||
13784 | static const int digits = (sizeof(long long) * 8 - ((long long)(-1) < 0)); | |
13785 | static const int digits10 = ((sizeof(long long) * 8 - ((long long)(-1) < 0)) * 643 / 2136); | |
13786 | static const bool is_signed = true; | |
13787 | static const bool is_integer = true; | |
13788 | static const bool is_exact = true; | |
13789 | static const int radix = 2; | |
13790 | static long long epsilon() throw() | |
13791 | { return 0; } | |
13792 | static long long round_error() throw() | |
13793 | { return 0; } | |
13794 | ||
13795 | static const int min_exponent = 0; | |
13796 | static const int min_exponent10 = 0; | |
13797 | static const int max_exponent = 0; | |
13798 | static const int max_exponent10 = 0; | |
13799 | ||
13800 | static const bool has_infinity = false; | |
13801 | static const bool has_quiet_NaN = false; | |
13802 | static const bool has_signaling_NaN = false; | |
13803 | static const float_denorm_style has_denorm = denorm_absent; | |
13804 | static const bool has_denorm_loss = false; | |
13805 | ||
13806 | static long long infinity() throw() | |
13807 | { return static_cast<long long>(0); } | |
13808 | static long long quiet_NaN() throw() | |
13809 | { return static_cast<long long>(0); } | |
13810 | static long long signaling_NaN() throw() | |
13811 | { return static_cast<long long>(0); } | |
13812 | static long long denorm_min() throw() | |
13813 | { return static_cast<long long>(0); } | |
13814 | ||
13815 | static const bool is_iec559 = false; | |
13816 | static const bool is_bounded = true; | |
13817 | static const bool is_modulo = true; | |
13818 | ||
13819 | static const bool traps = true; | |
13820 | static const bool tinyness_before = false; | |
13821 | static const float_round_style round_style = round_toward_zero; | |
13822 | }; | |
13823 | ||
13824 | ||
13825 | template<> | |
13826 | struct numeric_limits<unsigned long long> | |
13827 | { | |
13828 | static const bool is_specialized = true; | |
13829 | ||
13830 | static unsigned long long min() throw() | |
13831 | { return 0; } | |
13832 | static unsigned long long max() throw() | |
13833 | { return 9223372036854775807LL * 2ULL + 1; } | |
13834 | ||
13835 | static const int digits = (sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)); | |
13836 | static const int digits10 = ((sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)) * 643 / 2136); | |
13837 | static const bool is_signed = false; | |
13838 | static const bool is_integer = true; | |
13839 | static const bool is_exact = true; | |
13840 | static const int radix = 2; | |
13841 | static unsigned long long epsilon() throw() | |
13842 | { return 0; } | |
13843 | static unsigned long long round_error() throw() | |
13844 | { return 0; } | |
13845 | ||
13846 | static const int min_exponent = 0; | |
13847 | static const int min_exponent10 = 0; | |
13848 | static const int max_exponent = 0; | |
13849 | static const int max_exponent10 = 0; | |
13850 | ||
13851 | static const bool has_infinity = false; | |
13852 | static const bool has_quiet_NaN = false; | |
13853 | static const bool has_signaling_NaN = false; | |
13854 | static const float_denorm_style has_denorm = denorm_absent; | |
13855 | static const bool has_denorm_loss = false; | |
13856 | ||
13857 | static unsigned long long infinity() throw() | |
13858 | { return static_cast<unsigned long long>(0); } | |
13859 | static unsigned long long quiet_NaN() throw() | |
13860 | { return static_cast<unsigned long long>(0); } | |
13861 | static unsigned long long signaling_NaN() throw() | |
13862 | { return static_cast<unsigned long long>(0); } | |
13863 | static unsigned long long denorm_min() throw() | |
13864 | { return static_cast<unsigned long long>(0); } | |
13865 | ||
13866 | static const bool is_iec559 = false; | |
13867 | static const bool is_bounded = true; | |
13868 | static const bool is_modulo = true; | |
13869 | ||
13870 | static const bool traps = true; | |
13871 | static const bool tinyness_before = false; | |
13872 | static const float_round_style round_style = round_toward_zero; | |
13873 | }; | |
13874 | ||
13875 | ||
13876 | template<> | |
13877 | struct numeric_limits<float> | |
13878 | { | |
13879 | static const bool is_specialized = true; | |
13880 | ||
13881 | static float min() throw() | |
13882 | { return 1.17549435e-38F; } | |
13883 | static float max() throw() | |
13884 | { return 3.40282347e+38F; } | |
13885 | ||
13886 | static const int digits = 24; | |
13887 | static const int digits10 = 6; | |
13888 | static const bool is_signed = true; | |
13889 | static const bool is_integer = false; | |
13890 | static const bool is_exact = false; | |
13891 | static const int radix = 2; | |
13892 | static float epsilon() throw() | |
13893 | { return 1.19209290e-7F; } | |
13894 | static float round_error() throw() | |
13895 | { return 0.5F; } | |
13896 | ||
13897 | static const int min_exponent = (-125); | |
13898 | static const int min_exponent10 = (-37); | |
13899 | static const int max_exponent = 128; | |
13900 | static const int max_exponent10 = 38; | |
13901 | ||
13902 | static const bool has_infinity = 1; | |
13903 | static const bool has_quiet_NaN = 1; | |
13904 | static const bool has_signaling_NaN = has_quiet_NaN; | |
13905 | static const float_denorm_style has_denorm | |
13906 | = bool(1.40129846e-45F) ? denorm_present : denorm_absent; | |
13907 | static const bool has_denorm_loss = false; | |
13908 | ||
13909 | static float infinity() throw() | |
13910 | { return __builtin_huge_valf (); } | |
13911 | static float quiet_NaN() throw() | |
13912 | { return __builtin_nanf (""); } | |
13913 | static float signaling_NaN() throw() | |
13914 | { return __builtin_nansf (""); } | |
13915 | static float denorm_min() throw() | |
13916 | { return 1.40129846e-45F; } | |
13917 | ||
13918 | static const bool is_iec559 | |
13919 | = has_infinity && has_quiet_NaN && has_denorm == denorm_present; | |
13920 | static const bool is_bounded = true; | |
13921 | static const bool is_modulo = false; | |
13922 | ||
13923 | static const bool traps = false; | |
13924 | static const bool tinyness_before = false; | |
13925 | static const float_round_style round_style = round_to_nearest; | |
13926 | }; | |
13927 | ||
13928 | ||
13929 | ||
13930 | ||
13931 | ||
13932 | ||
13933 | template<> | |
13934 | struct numeric_limits<double> | |
13935 | { | |
13936 | static const bool is_specialized = true; | |
13937 | ||
13938 | static double min() throw() | |
13939 | { return 2.2250738585072014e-308; } | |
13940 | static double max() throw() | |
13941 | { return 1.7976931348623157e+308; } | |
13942 | ||
13943 | static const int digits = 53; | |
13944 | static const int digits10 = 15; | |
13945 | static const bool is_signed = true; | |
13946 | static const bool is_integer = false; | |
13947 | static const bool is_exact = false; | |
13948 | static const int radix = 2; | |
13949 | static double epsilon() throw() | |
13950 | { return 2.2204460492503131e-16; } | |
13951 | static double round_error() throw() | |
13952 | { return 0.5; } | |
13953 | ||
13954 | static const int min_exponent = (-1021); | |
13955 | static const int min_exponent10 = (-307); | |
13956 | static const int max_exponent = 1024; | |
13957 | static const int max_exponent10 = 308; | |
13958 | ||
13959 | static const bool has_infinity = 1; | |
13960 | static const bool has_quiet_NaN = 1; | |
13961 | static const bool has_signaling_NaN = has_quiet_NaN; | |
13962 | static const float_denorm_style has_denorm | |
13963 | = bool(4.9406564584124654e-324) ? denorm_present : denorm_absent; | |
13964 | static const bool has_denorm_loss = false; | |
13965 | ||
13966 | static double infinity() throw() | |
13967 | { return __builtin_huge_val(); } | |
13968 | static double quiet_NaN() throw() | |
13969 | { return __builtin_nan (""); } | |
13970 | static double signaling_NaN() throw() | |
13971 | { return __builtin_nans (""); } | |
13972 | static double denorm_min() throw() | |
13973 | { return 4.9406564584124654e-324; } | |
13974 | ||
13975 | static const bool is_iec559 | |
13976 | = has_infinity && has_quiet_NaN && has_denorm == denorm_present; | |
13977 | static const bool is_bounded = true; | |
13978 | static const bool is_modulo = false; | |
13979 | ||
13980 | static const bool traps = false; | |
13981 | static const bool tinyness_before = false; | |
13982 | static const float_round_style round_style = round_to_nearest; | |
13983 | }; | |
13984 | ||
13985 | ||
13986 | ||
13987 | ||
13988 | ||
13989 | ||
13990 | template<> | |
13991 | struct numeric_limits<long double> | |
13992 | { | |
13993 | static const bool is_specialized = true; | |
13994 | ||
13995 | static long double min() throw() | |
13996 | { return 3.36210314311209350626e-4932L; } | |
13997 | static long double max() throw() | |
13998 | { return 1.18973149535723176502e+4932L; } | |
13999 | ||
14000 | static const int digits = 64; | |
14001 | static const int digits10 = 18; | |
14002 | static const bool is_signed = true; | |
14003 | static const bool is_integer = false; | |
14004 | static const bool is_exact = false; | |
14005 | static const int radix = 2; | |
14006 | static long double epsilon() throw() | |
14007 | { return 1.08420217248550443401e-19L; } | |
14008 | static long double round_error() throw() | |
14009 | { return 0.5L; } | |
14010 | ||
14011 | static const int min_exponent = (-16381); | |
14012 | static const int min_exponent10 = (-4931); | |
14013 | static const int max_exponent = 16384; | |
14014 | static const int max_exponent10 = 4932; | |
14015 | ||
14016 | static const bool has_infinity = 1; | |
14017 | static const bool has_quiet_NaN = 1; | |
14018 | static const bool has_signaling_NaN = has_quiet_NaN; | |
14019 | static const float_denorm_style has_denorm | |
14020 | = bool(3.64519953188247460253e-4951L) ? denorm_present : denorm_absent; | |
14021 | static const bool has_denorm_loss | |
14022 | = false; | |
14023 | ||
14024 | static long double infinity() throw() | |
14025 | { return __builtin_huge_vall (); } | |
14026 | static long double quiet_NaN() throw() | |
14027 | { return __builtin_nanl (""); } | |
14028 | static long double signaling_NaN() throw() | |
14029 | { return __builtin_nansl (""); } | |
14030 | static long double denorm_min() throw() | |
14031 | { return 3.64519953188247460253e-4951L; } | |
14032 | ||
14033 | static const bool is_iec559 | |
14034 | = has_infinity && has_quiet_NaN && has_denorm == denorm_present; | |
14035 | static const bool is_bounded = true; | |
14036 | static const bool is_modulo = false; | |
14037 | ||
14038 | static const bool traps = false; | |
14039 | static const bool tinyness_before = false; | |
14040 | static const float_round_style round_style = round_to_nearest; | |
14041 | }; | |
14042 | ||
14043 | ||
14044 | ||
14045 | ||
14046 | ||
14047 | } | |
14048 | ||
14049 | ||
14050 | ||
14051 | ||
14052 | ||
14053 | ||
14054 | ||
14055 | #pragma GCC visibility pop | |
14056 | # 62 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/memory" 2 3 | |
14057 | ||
14058 | namespace std | |
14059 | { | |
14060 | # 73 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3 | |
14061 | template<typename _Tp> | |
14062 | pair<_Tp*, ptrdiff_t> | |
14063 | __get_temporary_buffer(ptrdiff_t __len, _Tp*) | |
14064 | { | |
14065 | const ptrdiff_t __max = numeric_limits<ptrdiff_t>::max() / sizeof(_Tp); | |
14066 | if (__len > __max) | |
14067 | __len = __max; | |
14068 | ||
14069 | while (__len > 0) | |
14070 | { | |
14071 | _Tp* __tmp = static_cast<_Tp*>(::operator new(__len * sizeof(_Tp), | |
14072 | nothrow)); | |
14073 | if (__tmp != 0) | |
14074 | return pair<_Tp*, ptrdiff_t>(__tmp, __len); | |
14075 | __len /= 2; | |
14076 | } | |
14077 | return pair<_Tp*, ptrdiff_t>(static_cast<_Tp*>(0), 0); | |
14078 | } | |
14079 | # 109 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3 | |
14080 | template<typename _Tp> | |
14081 | inline pair<_Tp*, ptrdiff_t> | |
14082 | get_temporary_buffer(ptrdiff_t __len) | |
14083 | { return std::__get_temporary_buffer(__len, static_cast<_Tp*>(0)); } | |
14084 | # 121 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3 | |
14085 | template<typename _Tp> | |
14086 | void | |
14087 | return_temporary_buffer(_Tp* __p) | |
14088 | { ::operator delete(__p, nothrow); } | |
14089 | # 133 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3 | |
14090 | template<typename _Tp1> | |
14091 | struct auto_ptr_ref | |
14092 | { | |
14093 | _Tp1* _M_ptr; | |
14094 | ||
14095 | explicit | |
14096 | auto_ptr_ref(_Tp1* __p): _M_ptr(__p) { } | |
14097 | }; | |
14098 | # 174 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3 | |
14099 | template<typename _Tp> | |
14100 | class auto_ptr | |
14101 | { | |
14102 | private: | |
14103 | _Tp* _M_ptr; | |
14104 | ||
14105 | public: | |
14106 | ||
14107 | typedef _Tp element_type; | |
14108 | ||
14109 | ||
14110 | ||
14111 | ||
14112 | ||
14113 | ||
14114 | ||
14115 | explicit | |
14116 | auto_ptr(element_type* __p = 0) throw() : _M_ptr(__p) { } | |
14117 | # 200 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3 | |
14118 | auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) { } | |
14119 | # 212 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3 | |
14120 | template<typename _Tp1> | |
14121 | auto_ptr(auto_ptr<_Tp1>& __a) throw() : _M_ptr(__a.release()) { } | |
14122 | # 223 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3 | |
14123 | auto_ptr& | |
14124 | operator=(auto_ptr& __a) throw() | |
14125 | { | |
14126 | reset(__a.release()); | |
14127 | return *this; | |
14128 | } | |
14129 | # 240 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3 | |
14130 | template<typename _Tp1> | |
14131 | auto_ptr& | |
14132 | operator=(auto_ptr<_Tp1>& __a) throw() | |
14133 | { | |
14134 | reset(__a.release()); | |
14135 | return *this; | |
14136 | } | |
14137 | # 260 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3 | |
14138 | ~auto_ptr() { delete _M_ptr; } | |
14139 | # 270 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3 | |
14140 | element_type& | |
14141 | operator*() const throw() | |
14142 | { | |
14143 | ; | |
14144 | return *_M_ptr; | |
14145 | } | |
14146 | ||
14147 | ||
14148 | ||
14149 | ||
14150 | ||
14151 | ||
14152 | ||
14153 | element_type* | |
14154 | operator->() const throw() | |
14155 | { | |
14156 | ; | |
14157 | return _M_ptr; | |
14158 | } | |
14159 | # 300 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3 | |
14160 | element_type* | |
14161 | get() const throw() { return _M_ptr; } | |
14162 | # 314 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3 | |
14163 | element_type* | |
14164 | release() throw() | |
14165 | { | |
14166 | element_type* __tmp = _M_ptr; | |
14167 | _M_ptr = 0; | |
14168 | return __tmp; | |
14169 | } | |
14170 | # 329 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3 | |
14171 | void | |
14172 | reset(element_type* __p = 0) throw() | |
14173 | { | |
14174 | if (__p != _M_ptr) | |
14175 | { | |
14176 | delete _M_ptr; | |
14177 | _M_ptr = __p; | |
14178 | } | |
14179 | } | |
14180 | # 350 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/memory" 3 | |
14181 | auto_ptr(auto_ptr_ref<element_type> __ref) throw() | |
14182 | : _M_ptr(__ref._M_ptr) { } | |
14183 | ||
14184 | auto_ptr& | |
14185 | operator=(auto_ptr_ref<element_type> __ref) throw() | |
14186 | { | |
14187 | if (__ref._M_ptr != this->get()) | |
14188 | { | |
14189 | delete _M_ptr; | |
14190 | _M_ptr = __ref._M_ptr; | |
14191 | } | |
14192 | return *this; | |
14193 | } | |
14194 | ||
14195 | template<typename _Tp1> | |
14196 | operator auto_ptr_ref<_Tp1>() throw() | |
14197 | { return auto_ptr_ref<_Tp1>(this->release()); } | |
14198 | ||
14199 | template<typename _Tp1> | |
14200 | operator auto_ptr<_Tp1>() throw() | |
14201 | { return auto_ptr<_Tp1>(this->release()); } | |
14202 | }; | |
14203 | } | |
14204 | ||
14205 | #pragma GCC visibility pop | |
14206 | # 49 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/string" 2 3 | |
14207 | ||
14208 | ||
14209 | ||
14210 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_function.h" 1 3 | |
14211 | # 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_function.h" 3 | |
14212 | namespace std | |
14213 | { | |
14214 | # 101 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_function.h" 3 | |
14215 | template <class _Arg, class _Result> | |
14216 | struct unary_function | |
14217 | { | |
14218 | typedef _Arg argument_type; | |
14219 | ||
14220 | ||
14221 | typedef _Result result_type; | |
14222 | }; | |
14223 | ||
14224 | ||
14225 | ||
14226 | ||
14227 | template <class _Arg1, class _Arg2, class _Result> | |
14228 | struct binary_function | |
14229 | { | |
14230 | typedef _Arg1 first_argument_type; | |
14231 | ||
14232 | ||
14233 | typedef _Arg2 second_argument_type; | |
14234 | typedef _Result result_type; | |
14235 | }; | |
14236 | # 133 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_function.h" 3 | |
14237 | template <class _Tp> | |
14238 | struct plus : public binary_function<_Tp, _Tp, _Tp> | |
14239 | { | |
14240 | _Tp | |
14241 | operator()(const _Tp& __x, const _Tp& __y) const | |
14242 | { return __x + __y; } | |
14243 | }; | |
14244 | ||
14245 | ||
14246 | template <class _Tp> | |
14247 | struct minus : public binary_function<_Tp, _Tp, _Tp> | |
14248 | { | |
14249 | _Tp | |
14250 | operator()(const _Tp& __x, const _Tp& __y) const | |
14251 | { return __x - __y; } | |
14252 | }; | |
14253 | ||
14254 | ||
14255 | template <class _Tp> | |
14256 | struct multiplies : public binary_function<_Tp, _Tp, _Tp> | |
14257 | { | |
14258 | _Tp | |
14259 | operator()(const _Tp& __x, const _Tp& __y) const | |
14260 | { return __x * __y; } | |
14261 | }; | |
14262 | ||
14263 | ||
14264 | template <class _Tp> | |
14265 | struct divides : public binary_function<_Tp, _Tp, _Tp> | |
14266 | { | |
14267 | _Tp | |
14268 | operator()(const _Tp& __x, const _Tp& __y) const | |
14269 | { return __x / __y; } | |
14270 | }; | |
14271 | ||
14272 | ||
14273 | template <class _Tp> | |
14274 | struct modulus : public binary_function<_Tp, _Tp, _Tp> | |
14275 | { | |
14276 | _Tp | |
14277 | operator()(const _Tp& __x, const _Tp& __y) const | |
14278 | { return __x % __y; } | |
14279 | }; | |
14280 | ||
14281 | ||
14282 | template <class _Tp> | |
14283 | struct negate : public unary_function<_Tp, _Tp> | |
14284 | { | |
14285 | _Tp | |
14286 | operator()(const _Tp& __x) const | |
14287 | { return -__x; } | |
14288 | }; | |
14289 | # 195 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_function.h" 3 | |
14290 | template <class _Tp> | |
14291 | struct equal_to : public binary_function<_Tp, _Tp, bool> | |
14292 | { | |
14293 | bool | |
14294 | operator()(const _Tp& __x, const _Tp& __y) const | |
14295 | { return __x == __y; } | |
14296 | }; | |
14297 | ||
14298 | ||
14299 | template <class _Tp> | |
14300 | struct not_equal_to : public binary_function<_Tp, _Tp, bool> | |
14301 | { | |
14302 | bool | |
14303 | operator()(const _Tp& __x, const _Tp& __y) const | |
14304 | { return __x != __y; } | |
14305 | }; | |
14306 | ||
14307 | ||
14308 | template <class _Tp> | |
14309 | struct greater : public binary_function<_Tp, _Tp, bool> | |
14310 | { | |
14311 | bool | |
14312 | operator()(const _Tp& __x, const _Tp& __y) const | |
14313 | { return __x > __y; } | |
14314 | }; | |
14315 | ||
14316 | ||
14317 | template <class _Tp> | |
14318 | struct less : public binary_function<_Tp, _Tp, bool> | |
14319 | { | |
14320 | bool | |
14321 | operator()(const _Tp& __x, const _Tp& __y) const | |
14322 | { return __x < __y; } | |
14323 | }; | |
14324 | ||
14325 | ||
14326 | template <class _Tp> | |
14327 | struct greater_equal : public binary_function<_Tp, _Tp, bool> | |
14328 | { | |
14329 | bool | |
14330 | operator()(const _Tp& __x, const _Tp& __y) const | |
14331 | { return __x >= __y; } | |
14332 | }; | |
14333 | ||
14334 | ||
14335 | template <class _Tp> | |
14336 | struct less_equal : public binary_function<_Tp, _Tp, bool> | |
14337 | { | |
14338 | bool | |
14339 | operator()(const _Tp& __x, const _Tp& __y) const | |
14340 | { return __x <= __y; } | |
14341 | }; | |
14342 | # 256 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_function.h" 3 | |
14343 | template <class _Tp> | |
14344 | struct logical_and : public binary_function<_Tp, _Tp, bool> | |
14345 | { | |
14346 | bool | |
14347 | operator()(const _Tp& __x, const _Tp& __y) const | |
14348 | { return __x && __y; } | |
14349 | }; | |
14350 | ||
14351 | ||
14352 | template <class _Tp> | |
14353 | struct logical_or : public binary_function<_Tp, _Tp, bool> | |
14354 | { | |
14355 | bool | |
14356 | operator()(const _Tp& __x, const _Tp& __y) const | |
14357 | { return __x || __y; } | |
14358 | }; | |
14359 | ||
14360 | ||
14361 | template <class _Tp> | |
14362 | struct logical_not : public unary_function<_Tp, bool> | |
14363 | { | |
14364 | bool | |
14365 | operator()(const _Tp& __x) const | |
14366 | { return !__x; } | |
14367 | }; | |
14368 | # 311 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_function.h" 3 | |
14369 | template <class _Predicate> | |
14370 | class unary_negate | |
14371 | : public unary_function<typename _Predicate::argument_type, bool> | |
14372 | { | |
14373 | protected: | |
14374 | _Predicate _M_pred; | |
14375 | public: | |
14376 | explicit | |
14377 | unary_negate(const _Predicate& __x) : _M_pred(__x) {} | |
14378 | ||
14379 | bool | |
14380 | operator()(const typename _Predicate::argument_type& __x) const | |
14381 | { return !_M_pred(__x); } | |
14382 | }; | |
14383 | ||
14384 | ||
14385 | template <class _Predicate> | |
14386 | inline unary_negate<_Predicate> | |
14387 | not1(const _Predicate& __pred) | |
14388 | { return unary_negate<_Predicate>(__pred); } | |
14389 | ||
14390 | ||
14391 | template <class _Predicate> | |
14392 | class binary_negate | |
14393 | : public binary_function<typename _Predicate::first_argument_type, | |
14394 | typename _Predicate::second_argument_type, | |
14395 | bool> | |
14396 | { | |
14397 | protected: | |
14398 | _Predicate _M_pred; | |
14399 | public: | |
14400 | explicit | |
14401 | binary_negate(const _Predicate& __x) | |
14402 | : _M_pred(__x) { } | |
14403 | ||
14404 | bool | |
14405 | operator()(const typename _Predicate::first_argument_type& __x, | |
14406 | const typename _Predicate::second_argument_type& __y) const | |
14407 | { return !_M_pred(__x, __y); } | |
14408 | }; | |
14409 | ||
14410 | ||
14411 | template <class _Predicate> | |
14412 | inline binary_negate<_Predicate> | |
14413 | not2(const _Predicate& __pred) | |
14414 | { return binary_negate<_Predicate>(__pred); } | |
14415 | # 391 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_function.h" 3 | |
14416 | template <class _Operation> | |
14417 | class binder1st | |
14418 | : public unary_function<typename _Operation::second_argument_type, | |
14419 | typename _Operation::result_type> | |
14420 | { | |
14421 | protected: | |
14422 | _Operation op; | |
14423 | typename _Operation::first_argument_type value; | |
14424 | public: | |
14425 | binder1st(const _Operation& __x, | |
14426 | const typename _Operation::first_argument_type& __y) | |
14427 | : op(__x), value(__y) {} | |
14428 | ||
14429 | typename _Operation::result_type | |
14430 | operator()(const typename _Operation::second_argument_type& __x) const | |
14431 | { return op(value, __x); } | |
14432 | ||
14433 | ||
14434 | ||
14435 | typename _Operation::result_type | |
14436 | operator()(typename _Operation::second_argument_type& __x) const | |
14437 | { return op(value, __x); } | |
14438 | }; | |
14439 | ||
14440 | ||
14441 | template <class _Operation, class _Tp> | |
14442 | inline binder1st<_Operation> | |
14443 | bind1st(const _Operation& __fn, const _Tp& __x) | |
14444 | { | |
14445 | typedef typename _Operation::first_argument_type _Arg1_type; | |
14446 | return binder1st<_Operation>(__fn, _Arg1_type(__x)); | |
14447 | } | |
14448 | ||
14449 | ||
14450 | template <class _Operation> | |
14451 | class binder2nd | |
14452 | : public unary_function<typename _Operation::first_argument_type, | |
14453 | typename _Operation::result_type> | |
14454 | { | |
14455 | protected: | |
14456 | _Operation op; | |
14457 | typename _Operation::second_argument_type value; | |
14458 | public: | |
14459 | binder2nd(const _Operation& __x, | |
14460 | const typename _Operation::second_argument_type& __y) | |
14461 | : op(__x), value(__y) {} | |
14462 | ||
14463 | typename _Operation::result_type | |
14464 | operator()(const typename _Operation::first_argument_type& __x) const | |
14465 | { return op(__x, value); } | |
14466 | ||
14467 | ||
14468 | ||
14469 | typename _Operation::result_type | |
14470 | operator()(typename _Operation::first_argument_type& __x) const | |
14471 | { return op(__x, value); } | |
14472 | }; | |
14473 | ||
14474 | ||
14475 | template <class _Operation, class _Tp> | |
14476 | inline binder2nd<_Operation> | |
14477 | bind2nd(const _Operation& __fn, const _Tp& __x) | |
14478 | { | |
14479 | typedef typename _Operation::second_argument_type _Arg2_type; | |
14480 | return binder2nd<_Operation>(__fn, _Arg2_type(__x)); | |
14481 | } | |
14482 | # 480 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_function.h" 3 | |
14483 | template <class _Arg, class _Result> | |
14484 | class pointer_to_unary_function : public unary_function<_Arg, _Result> | |
14485 | { | |
14486 | protected: | |
14487 | _Result (*_M_ptr)(_Arg); | |
14488 | public: | |
14489 | pointer_to_unary_function() {} | |
14490 | ||
14491 | explicit | |
14492 | pointer_to_unary_function(_Result (*__x)(_Arg)) | |
14493 | : _M_ptr(__x) {} | |
14494 | ||
14495 | _Result | |
14496 | operator()(_Arg __x) const | |
14497 | { return _M_ptr(__x); } | |
14498 | }; | |
14499 | ||
14500 | ||
14501 | template <class _Arg, class _Result> | |
14502 | inline pointer_to_unary_function<_Arg, _Result> | |
14503 | ptr_fun(_Result (*__x)(_Arg)) | |
14504 | { return pointer_to_unary_function<_Arg, _Result>(__x); } | |
14505 | ||
14506 | ||
14507 | template <class _Arg1, class _Arg2, class _Result> | |
14508 | class pointer_to_binary_function | |
14509 | : public binary_function<_Arg1, _Arg2, _Result> | |
14510 | { | |
14511 | protected: | |
14512 | _Result (*_M_ptr)(_Arg1, _Arg2); | |
14513 | public: | |
14514 | pointer_to_binary_function() {} | |
14515 | ||
14516 | explicit | |
14517 | pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2)) | |
14518 | : _M_ptr(__x) {} | |
14519 | ||
14520 | _Result | |
14521 | operator()(_Arg1 __x, _Arg2 __y) const | |
14522 | { return _M_ptr(__x, __y); } | |
14523 | }; | |
14524 | ||
14525 | ||
14526 | template <class _Arg1, class _Arg2, class _Result> | |
14527 | inline pointer_to_binary_function<_Arg1, _Arg2, _Result> | |
14528 | ptr_fun(_Result (*__x)(_Arg1, _Arg2)) | |
14529 | { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); } | |
14530 | ||
14531 | ||
14532 | template <class _Tp> | |
14533 | struct _Identity : public unary_function<_Tp,_Tp> | |
14534 | { | |
14535 | _Tp& | |
14536 | operator()(_Tp& __x) const | |
14537 | { return __x; } | |
14538 | ||
14539 | const _Tp& | |
14540 | operator()(const _Tp& __x) const | |
14541 | { return __x; } | |
14542 | }; | |
14543 | ||
14544 | template <class _Pair> | |
14545 | struct _Select1st : public unary_function<_Pair, | |
14546 | typename _Pair::first_type> | |
14547 | { | |
14548 | typename _Pair::first_type& | |
14549 | operator()(_Pair& __x) const | |
14550 | { return __x.first; } | |
14551 | ||
14552 | const typename _Pair::first_type& | |
14553 | operator()(const _Pair& __x) const | |
14554 | { return __x.first; } | |
14555 | }; | |
14556 | ||
14557 | template <class _Pair> | |
14558 | struct _Select2nd : public unary_function<_Pair, | |
14559 | typename _Pair::second_type> | |
14560 | { | |
14561 | typename _Pair::second_type& | |
14562 | operator()(_Pair& __x) const | |
14563 | { return __x.second; } | |
14564 | ||
14565 | const typename _Pair::second_type& | |
14566 | operator()(const _Pair& __x) const | |
14567 | { return __x.second; } | |
14568 | }; | |
14569 | # 582 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_function.h" 3 | |
14570 | template <class _Ret, class _Tp> | |
14571 | class mem_fun_t : public unary_function<_Tp*, _Ret> | |
14572 | { | |
14573 | public: | |
14574 | explicit | |
14575 | mem_fun_t(_Ret (_Tp::*__pf)()) | |
14576 | : _M_f(__pf) {} | |
14577 | ||
14578 | _Ret | |
14579 | operator()(_Tp* __p) const | |
14580 | { return (__p->*_M_f)(); } | |
14581 | private: | |
14582 | _Ret (_Tp::*_M_f)(); | |
14583 | }; | |
14584 | ||
14585 | ||
14586 | template <class _Ret, class _Tp> | |
14587 | class const_mem_fun_t : public unary_function<const _Tp*, _Ret> | |
14588 | { | |
14589 | public: | |
14590 | explicit | |
14591 | const_mem_fun_t(_Ret (_Tp::*__pf)() const) | |
14592 | : _M_f(__pf) {} | |
14593 | ||
14594 | _Ret | |
14595 | operator()(const _Tp* __p) const | |
14596 | { return (__p->*_M_f)(); } | |
14597 | private: | |
14598 | _Ret (_Tp::*_M_f)() const; | |
14599 | }; | |
14600 | ||
14601 | ||
14602 | template <class _Ret, class _Tp> | |
14603 | class mem_fun_ref_t : public unary_function<_Tp, _Ret> | |
14604 | { | |
14605 | public: | |
14606 | explicit | |
14607 | mem_fun_ref_t(_Ret (_Tp::*__pf)()) | |
14608 | : _M_f(__pf) {} | |
14609 | ||
14610 | _Ret | |
14611 | operator()(_Tp& __r) const | |
14612 | { return (__r.*_M_f)(); } | |
14613 | private: | |
14614 | _Ret (_Tp::*_M_f)(); | |
14615 | }; | |
14616 | ||
14617 | ||
14618 | template <class _Ret, class _Tp> | |
14619 | class const_mem_fun_ref_t : public unary_function<_Tp, _Ret> | |
14620 | { | |
14621 | public: | |
14622 | explicit | |
14623 | const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const) | |
14624 | : _M_f(__pf) {} | |
14625 | ||
14626 | _Ret | |
14627 | operator()(const _Tp& __r) const | |
14628 | { return (__r.*_M_f)(); } | |
14629 | private: | |
14630 | _Ret (_Tp::*_M_f)() const; | |
14631 | }; | |
14632 | ||
14633 | ||
14634 | template <class _Ret, class _Tp, class _Arg> | |
14635 | class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret> | |
14636 | { | |
14637 | public: | |
14638 | explicit | |
14639 | mem_fun1_t(_Ret (_Tp::*__pf)(_Arg)) | |
14640 | : _M_f(__pf) {} | |
14641 | ||
14642 | _Ret | |
14643 | operator()(_Tp* __p, _Arg __x) const | |
14644 | { return (__p->*_M_f)(__x); } | |
14645 | private: | |
14646 | _Ret (_Tp::*_M_f)(_Arg); | |
14647 | }; | |
14648 | ||
14649 | ||
14650 | template <class _Ret, class _Tp, class _Arg> | |
14651 | class const_mem_fun1_t : public binary_function<const _Tp*, _Arg, _Ret> | |
14652 | { | |
14653 | public: | |
14654 | explicit | |
14655 | const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const) | |
14656 | : _M_f(__pf) {} | |
14657 | ||
14658 | _Ret | |
14659 | operator()(const _Tp* __p, _Arg __x) const | |
14660 | { return (__p->*_M_f)(__x); } | |
14661 | private: | |
14662 | _Ret (_Tp::*_M_f)(_Arg) const; | |
14663 | }; | |
14664 | ||
14665 | ||
14666 | template <class _Ret, class _Tp, class _Arg> | |
14667 | class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> | |
14668 | { | |
14669 | public: | |
14670 | explicit | |
14671 | mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg)) | |
14672 | : _M_f(__pf) {} | |
14673 | ||
14674 | _Ret | |
14675 | operator()(_Tp& __r, _Arg __x) const | |
14676 | { return (__r.*_M_f)(__x); } | |
14677 | private: | |
14678 | _Ret (_Tp::*_M_f)(_Arg); | |
14679 | }; | |
14680 | ||
14681 | ||
14682 | template <class _Ret, class _Tp, class _Arg> | |
14683 | class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> | |
14684 | { | |
14685 | public: | |
14686 | explicit | |
14687 | const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const) | |
14688 | : _M_f(__pf) {} | |
14689 | ||
14690 | _Ret | |
14691 | operator()(const _Tp& __r, _Arg __x) const | |
14692 | { return (__r.*_M_f)(__x); } | |
14693 | private: | |
14694 | _Ret (_Tp::*_M_f)(_Arg) const; | |
14695 | }; | |
14696 | ||
14697 | ||
14698 | ||
14699 | template <class _Ret, class _Tp> | |
14700 | inline mem_fun_t<_Ret, _Tp> | |
14701 | mem_fun(_Ret (_Tp::*__f)()) | |
14702 | { return mem_fun_t<_Ret, _Tp>(__f); } | |
14703 | ||
14704 | template <class _Ret, class _Tp> | |
14705 | inline const_mem_fun_t<_Ret, _Tp> | |
14706 | mem_fun(_Ret (_Tp::*__f)() const) | |
14707 | { return const_mem_fun_t<_Ret, _Tp>(__f); } | |
14708 | ||
14709 | template <class _Ret, class _Tp> | |
14710 | inline mem_fun_ref_t<_Ret, _Tp> | |
14711 | mem_fun_ref(_Ret (_Tp::*__f)()) | |
14712 | { return mem_fun_ref_t<_Ret, _Tp>(__f); } | |
14713 | ||
14714 | template <class _Ret, class _Tp> | |
14715 | inline const_mem_fun_ref_t<_Ret, _Tp> | |
14716 | mem_fun_ref(_Ret (_Tp::*__f)() const) | |
14717 | { return const_mem_fun_ref_t<_Ret, _Tp>(__f); } | |
14718 | ||
14719 | template <class _Ret, class _Tp, class _Arg> | |
14720 | inline mem_fun1_t<_Ret, _Tp, _Arg> | |
14721 | mem_fun(_Ret (_Tp::*__f)(_Arg)) | |
14722 | { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); } | |
14723 | ||
14724 | template <class _Ret, class _Tp, class _Arg> | |
14725 | inline const_mem_fun1_t<_Ret, _Tp, _Arg> | |
14726 | mem_fun(_Ret (_Tp::*__f)(_Arg) const) | |
14727 | { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); } | |
14728 | ||
14729 | template <class _Ret, class _Tp, class _Arg> | |
14730 | inline mem_fun1_ref_t<_Ret, _Tp, _Arg> | |
14731 | mem_fun_ref(_Ret (_Tp::*__f)(_Arg)) | |
14732 | { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } | |
14733 | ||
14734 | template <class _Ret, class _Tp, class _Arg> | |
14735 | inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg> | |
14736 | mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const) | |
14737 | { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } | |
14738 | ||
14739 | ||
14740 | ||
14741 | } | |
14742 | # 53 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/string" 2 3 | |
14743 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 1 3 | |
14744 | # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
14745 | ||
14746 | # 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
14747 | ||
14748 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/atomicity.h" 1 3 | |
14749 | # 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/atomicity.h" 3 | |
14750 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/atomic_word.h" 1 3 | |
14751 | # 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/atomic_word.h" 3 | |
14752 | typedef int _Atomic_word; | |
14753 | # 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/atomicity.h" 2 3 | |
14754 | ||
14755 | namespace __gnu_cxx | |
14756 | { | |
14757 | _Atomic_word | |
14758 | __attribute__ ((__unused__)) | |
14759 | __exchange_and_add(volatile _Atomic_word* __mem, int __val); | |
14760 | ||
14761 | void | |
14762 | __attribute__ ((__unused__)) | |
14763 | __atomic_add(volatile _Atomic_word* __mem, int __val); | |
14764 | } | |
14765 | # 46 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 2 3 | |
14766 | ||
14767 | ||
14768 | namespace std | |
14769 | { | |
14770 | # 109 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
14771 | template<typename _CharT, typename _Traits, typename _Alloc> | |
14772 | class basic_string | |
14773 | { | |
14774 | typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type; | |
14775 | ||
14776 | ||
14777 | public: | |
14778 | typedef _Traits traits_type; | |
14779 | typedef typename _Traits::char_type value_type; | |
14780 | typedef _Alloc allocator_type; | |
14781 | typedef typename _CharT_alloc_type::size_type size_type; | |
14782 | typedef typename _CharT_alloc_type::difference_type difference_type; | |
14783 | typedef typename _CharT_alloc_type::reference reference; | |
14784 | typedef typename _CharT_alloc_type::const_reference const_reference; | |
14785 | typedef typename _CharT_alloc_type::pointer pointer; | |
14786 | typedef typename _CharT_alloc_type::const_pointer const_pointer; | |
14787 | typedef __gnu_cxx::__normal_iterator<pointer, basic_string> iterator; | |
14788 | typedef __gnu_cxx::__normal_iterator<const_pointer, basic_string> | |
14789 | const_iterator; | |
14790 | typedef std::reverse_iterator<const_iterator> const_reverse_iterator; | |
14791 | typedef std::reverse_iterator<iterator> reverse_iterator; | |
14792 | ||
14793 | private: | |
14794 | # 146 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
14795 | struct _Rep_base | |
14796 | { | |
14797 | size_type _M_length; | |
14798 | size_type _M_capacity; | |
14799 | _Atomic_word _M_refcount; | |
14800 | }; | |
14801 | ||
14802 | struct _Rep : _Rep_base | |
14803 | { | |
14804 | ||
14805 | typedef typename _Alloc::template rebind<char>::other _Raw_bytes_alloc; | |
14806 | # 171 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
14807 | static const size_type _S_max_size; | |
14808 | static const _CharT _S_terminal; | |
14809 | ||
14810 | ||
14811 | ||
14812 | static size_type _S_empty_rep_storage[]; | |
14813 | ||
14814 | static _Rep& | |
14815 | _S_empty_rep() | |
14816 | { | |
14817 | void* __p = reinterpret_cast<void*>(&_S_empty_rep_storage); | |
14818 | return *reinterpret_cast<_Rep*>(__p); | |
14819 | } | |
14820 | ||
14821 | bool | |
14822 | _M_is_leaked() const | |
14823 | { return this->_M_refcount < 0; } | |
14824 | ||
14825 | bool | |
14826 | _M_is_shared() const | |
14827 | { return this->_M_refcount > 0; } | |
14828 | ||
14829 | void | |
14830 | _M_set_leaked() | |
14831 | { this->_M_refcount = -1; } | |
14832 | ||
14833 | void | |
14834 | _M_set_sharable() | |
14835 | { this->_M_refcount = 0; } | |
14836 | ||
14837 | void | |
14838 | _M_set_length_and_sharable(size_type __n) | |
14839 | { | |
14840 | this->_M_set_sharable(); | |
14841 | this->_M_length = __n; | |
14842 | traits_type::assign(this->_M_refdata()[__n], _S_terminal); | |
14843 | ||
14844 | ||
14845 | } | |
14846 | ||
14847 | _CharT* | |
14848 | _M_refdata() throw() | |
14849 | { return reinterpret_cast<_CharT*>(this + 1); } | |
14850 | ||
14851 | _CharT* | |
14852 | _M_grab(const _Alloc& __alloc1, const _Alloc& __alloc2) | |
14853 | { | |
14854 | return (!_M_is_leaked() && __alloc1 == __alloc2) | |
14855 | ? _M_refcopy() : _M_clone(__alloc1); | |
14856 | } | |
14857 | ||
14858 | ||
14859 | static _Rep* | |
14860 | _S_create(size_type, size_type, const _Alloc&); | |
14861 | ||
14862 | void | |
14863 | _M_dispose(const _Alloc& __a) | |
14864 | { | |
14865 | ||
14866 | if (__builtin_expect(this != &_S_empty_rep(), false)) | |
14867 | ||
14868 | if (__gnu_cxx::__exchange_and_add(&this->_M_refcount, -1) <= 0) | |
14869 | _M_destroy(__a); | |
14870 | } | |
14871 | ||
14872 | void | |
14873 | _M_destroy(const _Alloc&) throw(); | |
14874 | ||
14875 | _CharT* | |
14876 | _M_refcopy() throw() | |
14877 | { | |
14878 | ||
14879 | if (__builtin_expect(this != &_S_empty_rep(), false)) | |
14880 | ||
14881 | __gnu_cxx::__atomic_add(&this->_M_refcount, 1); | |
14882 | return _M_refdata(); | |
14883 | } | |
14884 | ||
14885 | _CharT* | |
14886 | _M_clone(const _Alloc&, size_type __res = 0); | |
14887 | }; | |
14888 | ||
14889 | ||
14890 | struct _Alloc_hider : _Alloc | |
14891 | { | |
14892 | _Alloc_hider(_CharT* __dat, const _Alloc& __a) | |
14893 | : _Alloc(__a), _M_p(__dat) { } | |
14894 | ||
14895 | _CharT* _M_p; | |
14896 | }; | |
14897 | ||
14898 | public: | |
14899 | ||
14900 | ||
14901 | ||
14902 | ||
14903 | static const size_type npos = static_cast<size_type>(-1); | |
14904 | ||
14905 | private: | |
14906 | ||
14907 | mutable _Alloc_hider _M_dataplus; | |
14908 | ||
14909 | _CharT* | |
14910 | _M_data() const | |
14911 | { return _M_dataplus._M_p; } | |
14912 | ||
14913 | _CharT* | |
14914 | _M_data(_CharT* __p) | |
14915 | { return (_M_dataplus._M_p = __p); } | |
14916 | ||
14917 | _Rep* | |
14918 | _M_rep() const | |
14919 | { return &((reinterpret_cast<_Rep*> (_M_data()))[-1]); } | |
14920 | ||
14921 | ||
14922 | ||
14923 | iterator | |
14924 | _M_ibegin() const | |
14925 | { return iterator(_M_data()); } | |
14926 | ||
14927 | iterator | |
14928 | _M_iend() const | |
14929 | { return iterator(_M_data() + this->size()); } | |
14930 | ||
14931 | void | |
14932 | _M_leak() | |
14933 | { | |
14934 | if (!_M_rep()->_M_is_leaked()) | |
14935 | _M_leak_hard(); | |
14936 | } | |
14937 | ||
14938 | size_type | |
14939 | _M_check(size_type __pos, const char* __s) const | |
14940 | { | |
14941 | if (__pos > this->size()) | |
14942 | __throw_out_of_range((__s)); | |
14943 | return __pos; | |
14944 | } | |
14945 | ||
14946 | void | |
14947 | _M_check_length(size_type __n1, size_type __n2, const char* __s) const | |
14948 | { | |
14949 | if (this->max_size() - (this->size() - __n1) < __n2) | |
14950 | __throw_length_error((__s)); | |
14951 | } | |
14952 | ||
14953 | ||
14954 | size_type | |
14955 | _M_limit(size_type __pos, size_type __off) const | |
14956 | { | |
14957 | const bool __testoff = __off < this->size() - __pos; | |
14958 | return __testoff ? __off : this->size() - __pos; | |
14959 | } | |
14960 | ||
14961 | ||
14962 | bool | |
14963 | _M_disjunct(const _CharT* __s) const | |
14964 | { | |
14965 | return (less<const _CharT*>()(__s, _M_data()) | |
14966 | || less<const _CharT*>()(_M_data() + this->size(), __s)); | |
14967 | } | |
14968 | ||
14969 | ||
14970 | ||
14971 | static void | |
14972 | _M_copy(_CharT* __d, const _CharT* __s, size_type __n) | |
14973 | { | |
14974 | if (__n == 1) | |
14975 | traits_type::assign(*__d, *__s); | |
14976 | else | |
14977 | traits_type::copy(__d, __s, __n); | |
14978 | } | |
14979 | ||
14980 | static void | |
14981 | _M_move(_CharT* __d, const _CharT* __s, size_type __n) | |
14982 | { | |
14983 | if (__n == 1) | |
14984 | traits_type::assign(*__d, *__s); | |
14985 | else | |
14986 | traits_type::move(__d, __s, __n); | |
14987 | } | |
14988 | ||
14989 | static void | |
14990 | _M_assign(_CharT* __d, size_type __n, _CharT __c) | |
14991 | { | |
14992 | if (__n == 1) | |
14993 | traits_type::assign(*__d, __c); | |
14994 | else | |
14995 | traits_type::assign(__d, __n, __c); | |
14996 | } | |
14997 | ||
14998 | ||
14999 | ||
15000 | template<class _Iterator> | |
15001 | static void | |
15002 | _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2) | |
15003 | { | |
15004 | for (; __k1 != __k2; ++__k1, ++__p) | |
15005 | traits_type::assign(*__p, *__k1); | |
15006 | } | |
15007 | ||
15008 | static void | |
15009 | _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) | |
15010 | { _S_copy_chars(__p, __k1.base(), __k2.base()); } | |
15011 | ||
15012 | static void | |
15013 | _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2) | |
15014 | { _S_copy_chars(__p, __k1.base(), __k2.base()); } | |
15015 | ||
15016 | static void | |
15017 | _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) | |
15018 | { _M_copy(__p, __k1, __k2 - __k1); } | |
15019 | ||
15020 | static void | |
15021 | _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2) | |
15022 | { _M_copy(__p, __k1, __k2 - __k1); } | |
15023 | ||
15024 | void | |
15025 | _M_mutate(size_type __pos, size_type __len1, size_type __len2); | |
15026 | ||
15027 | void | |
15028 | _M_leak_hard(); | |
15029 | ||
15030 | static _Rep& | |
15031 | _S_empty_rep() | |
15032 | { return _Rep::_S_empty_rep(); } | |
15033 | ||
15034 | public: | |
15035 | ||
15036 | ||
15037 | ||
15038 | ||
15039 | ||
15040 | ||
15041 | ||
15042 | inline | |
15043 | basic_string(); | |
15044 | ||
15045 | ||
15046 | ||
15047 | ||
15048 | explicit | |
15049 | basic_string(const _Alloc& __a); | |
15050 | ||
15051 | ||
15052 | ||
15053 | ||
15054 | ||
15055 | ||
15056 | basic_string(const basic_string& __str); | |
15057 | ||
15058 | ||
15059 | ||
15060 | ||
15061 | ||
15062 | ||
15063 | basic_string(const basic_string& __str, size_type __pos, | |
15064 | size_type __n = npos); | |
15065 | ||
15066 | ||
15067 | ||
15068 | ||
15069 | ||
15070 | ||
15071 | ||
15072 | basic_string(const basic_string& __str, size_type __pos, | |
15073 | size_type __n, const _Alloc& __a); | |
15074 | # 448 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15075 | basic_string(const _CharT* __s, size_type __n, | |
15076 | const _Alloc& __a = _Alloc()); | |
15077 | ||
15078 | ||
15079 | ||
15080 | ||
15081 | ||
15082 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()); | |
15083 | ||
15084 | ||
15085 | ||
15086 | ||
15087 | ||
15088 | ||
15089 | basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()); | |
15090 | ||
15091 | ||
15092 | ||
15093 | ||
15094 | ||
15095 | ||
15096 | ||
15097 | template<class _InputIterator> | |
15098 | basic_string(_InputIterator __beg, _InputIterator __end, | |
15099 | const _Alloc& __a = _Alloc()); | |
15100 | ||
15101 | ||
15102 | ||
15103 | ||
15104 | ~basic_string() | |
15105 | { _M_rep()->_M_dispose(this->get_allocator()); } | |
15106 | ||
15107 | ||
15108 | ||
15109 | ||
15110 | ||
15111 | basic_string& | |
15112 | operator=(const basic_string& __str) | |
15113 | { return this->assign(__str); } | |
15114 | ||
15115 | ||
15116 | ||
15117 | ||
15118 | ||
15119 | basic_string& | |
15120 | operator=(const _CharT* __s) | |
15121 | { return this->assign(__s); } | |
15122 | # 503 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15123 | basic_string& | |
15124 | operator=(_CharT __c) | |
15125 | { | |
15126 | this->assign(1, __c); | |
15127 | return *this; | |
15128 | } | |
15129 | ||
15130 | ||
15131 | ||
15132 | ||
15133 | ||
15134 | ||
15135 | iterator | |
15136 | begin() | |
15137 | { | |
15138 | _M_leak(); | |
15139 | return iterator(_M_data()); | |
15140 | } | |
15141 | ||
15142 | ||
15143 | ||
15144 | ||
15145 | ||
15146 | const_iterator | |
15147 | begin() const | |
15148 | { return const_iterator(_M_data()); } | |
15149 | ||
15150 | ||
15151 | ||
15152 | ||
15153 | ||
15154 | iterator | |
15155 | end() | |
15156 | { | |
15157 | _M_leak(); | |
15158 | return iterator(_M_data() + this->size()); | |
15159 | } | |
15160 | ||
15161 | ||
15162 | ||
15163 | ||
15164 | ||
15165 | const_iterator | |
15166 | end() const | |
15167 | { return const_iterator(_M_data() + this->size()); } | |
15168 | ||
15169 | ||
15170 | ||
15171 | ||
15172 | ||
15173 | ||
15174 | reverse_iterator | |
15175 | rbegin() | |
15176 | { return reverse_iterator(this->end()); } | |
15177 | ||
15178 | ||
15179 | ||
15180 | ||
15181 | ||
15182 | ||
15183 | const_reverse_iterator | |
15184 | rbegin() const | |
15185 | { return const_reverse_iterator(this->end()); } | |
15186 | ||
15187 | ||
15188 | ||
15189 | ||
15190 | ||
15191 | ||
15192 | reverse_iterator | |
15193 | rend() | |
15194 | { return reverse_iterator(this->begin()); } | |
15195 | ||
15196 | ||
15197 | ||
15198 | ||
15199 | ||
15200 | ||
15201 | const_reverse_iterator | |
15202 | rend() const | |
15203 | { return const_reverse_iterator(this->begin()); } | |
15204 | ||
15205 | public: | |
15206 | ||
15207 | ||
15208 | ||
15209 | size_type | |
15210 | size() const | |
15211 | { return _M_rep()->_M_length; } | |
15212 | ||
15213 | ||
15214 | ||
15215 | size_type | |
15216 | length() const | |
15217 | { return _M_rep()->_M_length; } | |
15218 | ||
15219 | ||
15220 | size_type | |
15221 | max_size() const | |
15222 | { return _Rep::_S_max_size; } | |
15223 | # 614 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15224 | void | |
15225 | resize(size_type __n, _CharT __c); | |
15226 | # 627 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15227 | void | |
15228 | resize(size_type __n) | |
15229 | { this->resize(__n, _CharT()); } | |
15230 | ||
15231 | ||
15232 | ||
15233 | ||
15234 | ||
15235 | size_type | |
15236 | capacity() const | |
15237 | { return _M_rep()->_M_capacity; } | |
15238 | # 656 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15239 | void | |
15240 | reserve(size_type __res_arg = 0); | |
15241 | ||
15242 | ||
15243 | ||
15244 | ||
15245 | void | |
15246 | clear() | |
15247 | { _M_mutate(0, this->size(), 0); } | |
15248 | ||
15249 | ||
15250 | ||
15251 | ||
15252 | bool | |
15253 | empty() const | |
15254 | { return this->size() == 0; } | |
15255 | # 684 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15256 | const_reference | |
15257 | operator[] (size_type __pos) const | |
15258 | { | |
15259 | ; | |
15260 | return _M_data()[__pos]; | |
15261 | } | |
15262 | # 701 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15263 | reference | |
15264 | operator[](size_type __pos) | |
15265 | { | |
15266 | ||
15267 | ; | |
15268 | ||
15269 | ; | |
15270 | _M_leak(); | |
15271 | return _M_data()[__pos]; | |
15272 | } | |
15273 | # 722 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15274 | const_reference | |
15275 | at(size_type __n) const | |
15276 | { | |
15277 | if (__n >= this->size()) | |
15278 | __throw_out_of_range(("basic_string::at")); | |
15279 | return _M_data()[__n]; | |
15280 | } | |
15281 | # 741 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15282 | reference | |
15283 | at(size_type __n) | |
15284 | { | |
15285 | if (__n >= size()) | |
15286 | __throw_out_of_range(("basic_string::at")); | |
15287 | _M_leak(); | |
15288 | return _M_data()[__n]; | |
15289 | } | |
15290 | ||
15291 | ||
15292 | ||
15293 | ||
15294 | ||
15295 | ||
15296 | ||
15297 | basic_string& | |
15298 | operator+=(const basic_string& __str) | |
15299 | { return this->append(__str); } | |
15300 | ||
15301 | ||
15302 | ||
15303 | ||
15304 | ||
15305 | ||
15306 | basic_string& | |
15307 | operator+=(const _CharT* __s) | |
15308 | { return this->append(__s); } | |
15309 | ||
15310 | ||
15311 | ||
15312 | ||
15313 | ||
15314 | ||
15315 | basic_string& | |
15316 | operator+=(_CharT __c) | |
15317 | { | |
15318 | this->push_back(__c); | |
15319 | return *this; | |
15320 | } | |
15321 | ||
15322 | ||
15323 | ||
15324 | ||
15325 | ||
15326 | ||
15327 | basic_string& | |
15328 | append(const basic_string& __str); | |
15329 | # 801 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15330 | basic_string& | |
15331 | append(const basic_string& __str, size_type __pos, size_type __n); | |
15332 | ||
15333 | ||
15334 | ||
15335 | ||
15336 | ||
15337 | ||
15338 | ||
15339 | basic_string& | |
15340 | append(const _CharT* __s, size_type __n); | |
15341 | ||
15342 | ||
15343 | ||
15344 | ||
15345 | ||
15346 | ||
15347 | basic_string& | |
15348 | append(const _CharT* __s) | |
15349 | { | |
15350 | ; | |
15351 | return this->append(__s, traits_type::length(__s)); | |
15352 | } | |
15353 | # 833 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15354 | basic_string& | |
15355 | append(size_type __n, _CharT __c); | |
15356 | # 844 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15357 | template<class _InputIterator> | |
15358 | basic_string& | |
15359 | append(_InputIterator __first, _InputIterator __last) | |
15360 | { return this->replace(_M_iend(), _M_iend(), __first, __last); } | |
15361 | ||
15362 | ||
15363 | ||
15364 | ||
15365 | ||
15366 | void | |
15367 | push_back(_CharT __c) | |
15368 | { | |
15369 | const size_type __len = 1 + this->size(); | |
15370 | if (__len > this->capacity() || _M_rep()->_M_is_shared()) | |
15371 | this->reserve(__len); | |
15372 | traits_type::assign(_M_data()[this->size()], __c); | |
15373 | _M_rep()->_M_set_length_and_sharable(__len); | |
15374 | } | |
15375 | ||
15376 | ||
15377 | ||
15378 | ||
15379 | ||
15380 | ||
15381 | basic_string& | |
15382 | assign(const basic_string& __str); | |
15383 | # 883 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15384 | basic_string& | |
15385 | assign(const basic_string& __str, size_type __pos, size_type __n) | |
15386 | { return this->assign(__str._M_data() | |
15387 | + __str._M_check(__pos, "basic_string::assign"), | |
15388 | __str._M_limit(__pos, __n)); } | |
15389 | # 899 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15390 | basic_string& | |
15391 | assign(const _CharT* __s, size_type __n); | |
15392 | # 911 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15393 | basic_string& | |
15394 | assign(const _CharT* __s) | |
15395 | { | |
15396 | ; | |
15397 | return this->assign(__s, traits_type::length(__s)); | |
15398 | } | |
15399 | # 927 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15400 | basic_string& | |
15401 | assign(size_type __n, _CharT __c) | |
15402 | { return _M_replace_aux(size_type(0), this->size(), __n, __c); } | |
15403 | # 939 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15404 | template<class _InputIterator> | |
15405 | basic_string& | |
15406 | assign(_InputIterator __first, _InputIterator __last) | |
15407 | { return this->replace(_M_ibegin(), _M_iend(), __first, __last); } | |
15408 | # 956 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15409 | void | |
15410 | insert(iterator __p, size_type __n, _CharT __c) | |
15411 | { this->replace(__p, __p, __n, __c); } | |
15412 | # 971 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15413 | template<class _InputIterator> | |
15414 | void | |
15415 | insert(iterator __p, _InputIterator __beg, _InputIterator __end) | |
15416 | { this->replace(__p, __p, __beg, __end); } | |
15417 | # 987 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15418 | basic_string& | |
15419 | insert(size_type __pos1, const basic_string& __str) | |
15420 | { return this->insert(__pos1, __str, size_type(0), __str.size()); } | |
15421 | # 1009 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15422 | basic_string& | |
15423 | insert(size_type __pos1, const basic_string& __str, | |
15424 | size_type __pos2, size_type __n) | |
15425 | { return this->insert(__pos1, __str._M_data() | |
15426 | + __str._M_check(__pos2, "basic_string::insert"), | |
15427 | __str._M_limit(__pos2, __n)); } | |
15428 | # 1032 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15429 | basic_string& | |
15430 | insert(size_type __pos, const _CharT* __s, size_type __n); | |
15431 | # 1050 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15432 | basic_string& | |
15433 | insert(size_type __pos, const _CharT* __s) | |
15434 | { | |
15435 | ; | |
15436 | return this->insert(__pos, __s, traits_type::length(__s)); | |
15437 | } | |
15438 | # 1073 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15439 | basic_string& | |
15440 | insert(size_type __pos, size_type __n, _CharT __c) | |
15441 | { return _M_replace_aux(_M_check(__pos, "basic_string::insert"), | |
15442 | size_type(0), __n, __c); } | |
15443 | # 1090 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15444 | iterator | |
15445 | insert(iterator __p, _CharT __c) | |
15446 | { | |
15447 | ; | |
15448 | const size_type __pos = __p - _M_ibegin(); | |
15449 | _M_replace_aux(__pos, size_type(0), size_type(1), __c); | |
15450 | _M_rep()->_M_set_leaked(); | |
15451 | return this->_M_ibegin() + __pos; | |
15452 | } | |
15453 | # 1114 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15454 | basic_string& | |
15455 | erase(size_type __pos = 0, size_type __n = npos) | |
15456 | { | |
15457 | _M_mutate(_M_check(__pos, "basic_string::erase"), | |
15458 | _M_limit(__pos, __n), size_type(0)); | |
15459 | return *this; | |
15460 | } | |
15461 | # 1130 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15462 | iterator | |
15463 | erase(iterator __position) | |
15464 | { | |
15465 | ; | |
15466 | ||
15467 | const size_type __pos = __position - _M_ibegin(); | |
15468 | _M_mutate(__pos, size_type(1), size_type(0)); | |
15469 | _M_rep()->_M_set_leaked(); | |
15470 | return _M_ibegin() + __pos; | |
15471 | } | |
15472 | # 1150 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15473 | iterator | |
15474 | erase(iterator __first, iterator __last) | |
15475 | { | |
15476 | ; | |
15477 | ||
15478 | const size_type __pos = __first - _M_ibegin(); | |
15479 | _M_mutate(__pos, __last - __first, size_type(0)); | |
15480 | _M_rep()->_M_set_leaked(); | |
15481 | return _M_ibegin() + __pos; | |
15482 | } | |
15483 | # 1177 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15484 | basic_string& | |
15485 | replace(size_type __pos, size_type __n, const basic_string& __str) | |
15486 | { return this->replace(__pos, __n, __str._M_data(), __str.size()); } | |
15487 | # 1199 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15488 | basic_string& | |
15489 | replace(size_type __pos1, size_type __n1, const basic_string& __str, | |
15490 | size_type __pos2, size_type __n2) | |
15491 | { return this->replace(__pos1, __n1, __str._M_data() | |
15492 | + __str._M_check(__pos2, "basic_string::replace"), | |
15493 | __str._M_limit(__pos2, __n2)); } | |
15494 | # 1223 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15495 | basic_string& | |
15496 | replace(size_type __pos, size_type __n1, const _CharT* __s, | |
15497 | size_type __n2); | |
15498 | # 1242 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15499 | basic_string& | |
15500 | replace(size_type __pos, size_type __n1, const _CharT* __s) | |
15501 | { | |
15502 | ; | |
15503 | return this->replace(__pos, __n1, __s, traits_type::length(__s)); | |
15504 | } | |
15505 | # 1265 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15506 | basic_string& | |
15507 | replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) | |
15508 | { return _M_replace_aux(_M_check(__pos, "basic_string::replace"), | |
15509 | _M_limit(__pos, __n1), __n2, __c); } | |
15510 | # 1283 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15511 | basic_string& | |
15512 | replace(iterator __i1, iterator __i2, const basic_string& __str) | |
15513 | { return this->replace(__i1, __i2, __str._M_data(), __str.size()); } | |
15514 | # 1301 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15515 | basic_string& | |
15516 | replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n) | |
15517 | { | |
15518 | ; | |
15519 | ||
15520 | return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n); | |
15521 | } | |
15522 | # 1322 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15523 | basic_string& | |
15524 | replace(iterator __i1, iterator __i2, const _CharT* __s) | |
15525 | { | |
15526 | ; | |
15527 | return this->replace(__i1, __i2, __s, traits_type::length(__s)); | |
15528 | } | |
15529 | # 1343 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15530 | basic_string& | |
15531 | replace(iterator __i1, iterator __i2, size_type __n, _CharT __c) | |
15532 | { | |
15533 | ; | |
15534 | ||
15535 | return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __c); | |
15536 | } | |
15537 | # 1365 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15538 | template<class _InputIterator> | |
15539 | basic_string& | |
15540 | replace(iterator __i1, iterator __i2, | |
15541 | _InputIterator __k1, _InputIterator __k2) | |
15542 | { | |
15543 | ; | |
15544 | ||
15545 | ; | |
15546 | typedef typename std::__is_integer<_InputIterator>::__type _Integral; | |
15547 | return _M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral()); | |
15548 | } | |
15549 | ||
15550 | ||
15551 | ||
15552 | basic_string& | |
15553 | replace(iterator __i1, iterator __i2, _CharT* __k1, _CharT* __k2) | |
15554 | { | |
15555 | ; | |
15556 | ||
15557 | ; | |
15558 | return this->replace(__i1 - _M_ibegin(), __i2 - __i1, | |
15559 | __k1, __k2 - __k1); | |
15560 | } | |
15561 | ||
15562 | basic_string& | |
15563 | replace(iterator __i1, iterator __i2, | |
15564 | const _CharT* __k1, const _CharT* __k2) | |
15565 | { | |
15566 | ; | |
15567 | ||
15568 | ; | |
15569 | return this->replace(__i1 - _M_ibegin(), __i2 - __i1, | |
15570 | __k1, __k2 - __k1); | |
15571 | } | |
15572 | ||
15573 | basic_string& | |
15574 | replace(iterator __i1, iterator __i2, iterator __k1, iterator __k2) | |
15575 | { | |
15576 | ; | |
15577 | ||
15578 | ; | |
15579 | return this->replace(__i1 - _M_ibegin(), __i2 - __i1, | |
15580 | __k1.base(), __k2 - __k1); | |
15581 | } | |
15582 | ||
15583 | basic_string& | |
15584 | replace(iterator __i1, iterator __i2, | |
15585 | const_iterator __k1, const_iterator __k2) | |
15586 | { | |
15587 | ; | |
15588 | ||
15589 | ; | |
15590 | return this->replace(__i1 - _M_ibegin(), __i2 - __i1, | |
15591 | __k1.base(), __k2 - __k1); | |
15592 | } | |
15593 | ||
15594 | private: | |
15595 | template<class _Integer> | |
15596 | basic_string& | |
15597 | _M_replace_dispatch(iterator __i1, iterator __i2, _Integer __n, | |
15598 | _Integer __val, __true_type) | |
15599 | { return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __val); } | |
15600 | ||
15601 | template<class _InputIterator> | |
15602 | basic_string& | |
15603 | _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, | |
15604 | _InputIterator __k2, __false_type); | |
15605 | ||
15606 | basic_string& | |
15607 | _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, | |
15608 | _CharT __c); | |
15609 | ||
15610 | basic_string& | |
15611 | _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, | |
15612 | size_type __n2); | |
15613 | ||
15614 | ||
15615 | ||
15616 | template<class _InIterator> | |
15617 | static _CharT* | |
15618 | _S_construct_aux(_InIterator __beg, _InIterator __end, | |
15619 | const _Alloc& __a, __false_type) | |
15620 | { | |
15621 | typedef typename iterator_traits<_InIterator>::iterator_category _Tag; | |
15622 | return _S_construct(__beg, __end, __a, _Tag()); | |
15623 | } | |
15624 | ||
15625 | template<class _InIterator> | |
15626 | static _CharT* | |
15627 | _S_construct_aux(_InIterator __beg, _InIterator __end, | |
15628 | const _Alloc& __a, __true_type) | |
15629 | { return _S_construct(static_cast<size_type>(__beg), | |
15630 | static_cast<value_type>(__end), __a); } | |
15631 | ||
15632 | template<class _InIterator> | |
15633 | static _CharT* | |
15634 | _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a) | |
15635 | { | |
15636 | typedef typename std::__is_integer<_InIterator>::__type _Integral; | |
15637 | return _S_construct_aux(__beg, __end, __a, _Integral()); | |
15638 | } | |
15639 | ||
15640 | ||
15641 | template<class _InIterator> | |
15642 | static _CharT* | |
15643 | _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, | |
15644 | input_iterator_tag); | |
15645 | ||
15646 | ||
15647 | ||
15648 | template<class _FwdIterator> | |
15649 | static _CharT* | |
15650 | _S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a, | |
15651 | forward_iterator_tag); | |
15652 | ||
15653 | static _CharT* | |
15654 | _S_construct(size_type __req, _CharT __c, const _Alloc& __a); | |
15655 | ||
15656 | public: | |
15657 | # 1496 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15658 | size_type | |
15659 | copy(_CharT* __s, size_type __n, size_type __pos = 0) const; | |
15660 | # 1506 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15661 | void | |
15662 | swap(basic_string& __s); | |
15663 | # 1516 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15664 | const _CharT* | |
15665 | c_str() const | |
15666 | { return _M_data(); } | |
15667 | ||
15668 | ||
15669 | ||
15670 | ||
15671 | ||
15672 | ||
15673 | ||
15674 | const _CharT* | |
15675 | data() const | |
15676 | { return _M_data(); } | |
15677 | ||
15678 | ||
15679 | ||
15680 | ||
15681 | allocator_type | |
15682 | get_allocator() const | |
15683 | { return _M_dataplus; } | |
15684 | # 1548 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15685 | size_type | |
15686 | find(const _CharT* __s, size_type __pos, size_type __n) const; | |
15687 | # 1561 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15688 | size_type | |
15689 | find(const basic_string& __str, size_type __pos = 0) const | |
15690 | { return this->find(__str.data(), __pos, __str.size()); } | |
15691 | # 1575 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15692 | size_type | |
15693 | find(const _CharT* __s, size_type __pos = 0) const | |
15694 | { | |
15695 | ; | |
15696 | return this->find(__s, __pos, traits_type::length(__s)); | |
15697 | } | |
15698 | # 1592 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15699 | size_type | |
15700 | find(_CharT __c, size_type __pos = 0) const; | |
15701 | # 1605 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15702 | size_type | |
15703 | rfind(const basic_string& __str, size_type __pos = npos) const | |
15704 | { return this->rfind(__str.data(), __pos, __str.size()); } | |
15705 | # 1620 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15706 | size_type | |
15707 | rfind(const _CharT* __s, size_type __pos, size_type __n) const; | |
15708 | # 1633 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15709 | size_type | |
15710 | rfind(const _CharT* __s, size_type __pos = npos) const | |
15711 | { | |
15712 | ; | |
15713 | return this->rfind(__s, __pos, traits_type::length(__s)); | |
15714 | } | |
15715 | # 1650 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15716 | size_type | |
15717 | rfind(_CharT __c, size_type __pos = npos) const; | |
15718 | # 1663 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15719 | size_type | |
15720 | find_first_of(const basic_string& __str, size_type __pos = 0) const | |
15721 | { return this->find_first_of(__str.data(), __pos, __str.size()); } | |
15722 | # 1678 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15723 | size_type | |
15724 | find_first_of(const _CharT* __s, size_type __pos, size_type __n) const; | |
15725 | # 1691 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15726 | size_type | |
15727 | find_first_of(const _CharT* __s, size_type __pos = 0) const | |
15728 | { | |
15729 | ; | |
15730 | return this->find_first_of(__s, __pos, traits_type::length(__s)); | |
15731 | } | |
15732 | # 1710 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15733 | size_type | |
15734 | find_first_of(_CharT __c, size_type __pos = 0) const | |
15735 | { return this->find(__c, __pos); } | |
15736 | # 1724 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15737 | size_type | |
15738 | find_last_of(const basic_string& __str, size_type __pos = npos) const | |
15739 | { return this->find_last_of(__str.data(), __pos, __str.size()); } | |
15740 | # 1739 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15741 | size_type | |
15742 | find_last_of(const _CharT* __s, size_type __pos, size_type __n) const; | |
15743 | # 1752 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15744 | size_type | |
15745 | find_last_of(const _CharT* __s, size_type __pos = npos) const | |
15746 | { | |
15747 | ; | |
15748 | return this->find_last_of(__s, __pos, traits_type::length(__s)); | |
15749 | } | |
15750 | # 1771 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15751 | size_type | |
15752 | find_last_of(_CharT __c, size_type __pos = npos) const | |
15753 | { return this->rfind(__c, __pos); } | |
15754 | # 1785 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15755 | size_type | |
15756 | find_first_not_of(const basic_string& __str, size_type __pos = 0) const | |
15757 | { return this->find_first_not_of(__str.data(), __pos, __str.size()); } | |
15758 | # 1800 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15759 | size_type | |
15760 | find_first_not_of(const _CharT* __s, size_type __pos, | |
15761 | size_type __n) const; | |
15762 | # 1814 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15763 | size_type | |
15764 | find_first_not_of(const _CharT* __s, size_type __pos = 0) const | |
15765 | { | |
15766 | ; | |
15767 | return this->find_first_not_of(__s, __pos, traits_type::length(__s)); | |
15768 | } | |
15769 | # 1831 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15770 | size_type | |
15771 | find_first_not_of(_CharT __c, size_type __pos = 0) const; | |
15772 | # 1844 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15773 | size_type | |
15774 | find_last_not_of(const basic_string& __str, size_type __pos = npos) const | |
15775 | { return this->find_last_not_of(__str.data(), __pos, __str.size()); } | |
15776 | # 1860 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15777 | size_type | |
15778 | find_last_not_of(const _CharT* __s, size_type __pos, | |
15779 | size_type __n) const; | |
15780 | # 1873 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15781 | size_type | |
15782 | find_last_not_of(const _CharT* __s, size_type __pos = npos) const | |
15783 | { | |
15784 | ; | |
15785 | return this->find_last_not_of(__s, __pos, traits_type::length(__s)); | |
15786 | } | |
15787 | # 1890 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15788 | size_type | |
15789 | find_last_not_of(_CharT __c, size_type __pos = npos) const; | |
15790 | # 1905 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15791 | basic_string | |
15792 | substr(size_type __pos = 0, size_type __n = npos) const | |
15793 | { return basic_string(*this, | |
15794 | _M_check(__pos, "basic_string::substr"), __n); } | |
15795 | # 1923 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15796 | int | |
15797 | compare(const basic_string& __str) const | |
15798 | { | |
15799 | const size_type __size = this->size(); | |
15800 | const size_type __osize = __str.size(); | |
15801 | const size_type __len = std::min(__size, __osize); | |
15802 | ||
15803 | int __r = traits_type::compare(_M_data(), __str.data(), __len); | |
15804 | if (!__r) | |
15805 | __r = __size - __osize; | |
15806 | return __r; | |
15807 | } | |
15808 | # 1953 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15809 | int | |
15810 | compare(size_type __pos, size_type __n, const basic_string& __str) const; | |
15811 | # 1977 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15812 | int | |
15813 | compare(size_type __pos1, size_type __n1, const basic_string& __str, | |
15814 | size_type __pos2, size_type __n2) const; | |
15815 | # 1995 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15816 | int | |
15817 | compare(const _CharT* __s) const; | |
15818 | # 2018 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15819 | int | |
15820 | compare(size_type __pos, size_type __n1, const _CharT* __s) const; | |
15821 | # 2043 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15822 | int | |
15823 | compare(size_type __pos, size_type __n1, const _CharT* __s, | |
15824 | size_type __n2) const; | |
15825 | }; | |
15826 | ||
15827 | template<typename _CharT, typename _Traits, typename _Alloc> | |
15828 | inline basic_string<_CharT, _Traits, _Alloc>:: | |
15829 | basic_string() | |
15830 | ||
15831 | : _M_dataplus(_S_empty_rep()._M_refdata(), _Alloc()) { } | |
15832 | # 2064 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15833 | template<typename _CharT, typename _Traits, typename _Alloc> | |
15834 | basic_string<_CharT, _Traits, _Alloc> | |
15835 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
15836 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
15837 | { | |
15838 | basic_string<_CharT, _Traits, _Alloc> __str(__lhs); | |
15839 | __str.append(__rhs); | |
15840 | return __str; | |
15841 | } | |
15842 | ||
15843 | ||
15844 | ||
15845 | ||
15846 | ||
15847 | ||
15848 | ||
15849 | template<typename _CharT, typename _Traits, typename _Alloc> | |
15850 | basic_string<_CharT,_Traits,_Alloc> | |
15851 | operator+(const _CharT* __lhs, | |
15852 | const basic_string<_CharT,_Traits,_Alloc>& __rhs); | |
15853 | ||
15854 | ||
15855 | ||
15856 | ||
15857 | ||
15858 | ||
15859 | ||
15860 | template<typename _CharT, typename _Traits, typename _Alloc> | |
15861 | basic_string<_CharT,_Traits,_Alloc> | |
15862 | operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); | |
15863 | ||
15864 | ||
15865 | ||
15866 | ||
15867 | ||
15868 | ||
15869 | ||
15870 | template<typename _CharT, typename _Traits, typename _Alloc> | |
15871 | inline basic_string<_CharT, _Traits, _Alloc> | |
15872 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
15873 | const _CharT* __rhs) | |
15874 | { | |
15875 | basic_string<_CharT, _Traits, _Alloc> __str(__lhs); | |
15876 | __str.append(__rhs); | |
15877 | return __str; | |
15878 | } | |
15879 | ||
15880 | ||
15881 | ||
15882 | ||
15883 | ||
15884 | ||
15885 | ||
15886 | template<typename _CharT, typename _Traits, typename _Alloc> | |
15887 | inline basic_string<_CharT, _Traits, _Alloc> | |
15888 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) | |
15889 | { | |
15890 | typedef basic_string<_CharT, _Traits, _Alloc> __string_type; | |
15891 | typedef typename __string_type::size_type __size_type; | |
15892 | __string_type __str(__lhs); | |
15893 | __str.append(__size_type(1), __rhs); | |
15894 | return __str; | |
15895 | } | |
15896 | # 2135 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15897 | template<typename _CharT, typename _Traits, typename _Alloc> | |
15898 | inline bool | |
15899 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
15900 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
15901 | { return __lhs.compare(__rhs) == 0; } | |
15902 | ||
15903 | ||
15904 | ||
15905 | ||
15906 | ||
15907 | ||
15908 | ||
15909 | template<typename _CharT, typename _Traits, typename _Alloc> | |
15910 | inline bool | |
15911 | operator==(const _CharT* __lhs, | |
15912 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
15913 | { return __rhs.compare(__lhs) == 0; } | |
15914 | ||
15915 | ||
15916 | ||
15917 | ||
15918 | ||
15919 | ||
15920 | ||
15921 | template<typename _CharT, typename _Traits, typename _Alloc> | |
15922 | inline bool | |
15923 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
15924 | const _CharT* __rhs) | |
15925 | { return __lhs.compare(__rhs) == 0; } | |
15926 | # 2172 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15927 | template<typename _CharT, typename _Traits, typename _Alloc> | |
15928 | inline bool | |
15929 | operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
15930 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
15931 | { return __rhs.compare(__lhs) != 0; } | |
15932 | ||
15933 | ||
15934 | ||
15935 | ||
15936 | ||
15937 | ||
15938 | ||
15939 | template<typename _CharT, typename _Traits, typename _Alloc> | |
15940 | inline bool | |
15941 | operator!=(const _CharT* __lhs, | |
15942 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
15943 | { return __rhs.compare(__lhs) != 0; } | |
15944 | ||
15945 | ||
15946 | ||
15947 | ||
15948 | ||
15949 | ||
15950 | ||
15951 | template<typename _CharT, typename _Traits, typename _Alloc> | |
15952 | inline bool | |
15953 | operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
15954 | const _CharT* __rhs) | |
15955 | { return __lhs.compare(__rhs) != 0; } | |
15956 | # 2209 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15957 | template<typename _CharT, typename _Traits, typename _Alloc> | |
15958 | inline bool | |
15959 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
15960 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
15961 | { return __lhs.compare(__rhs) < 0; } | |
15962 | ||
15963 | ||
15964 | ||
15965 | ||
15966 | ||
15967 | ||
15968 | ||
15969 | template<typename _CharT, typename _Traits, typename _Alloc> | |
15970 | inline bool | |
15971 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
15972 | const _CharT* __rhs) | |
15973 | { return __lhs.compare(__rhs) < 0; } | |
15974 | ||
15975 | ||
15976 | ||
15977 | ||
15978 | ||
15979 | ||
15980 | ||
15981 | template<typename _CharT, typename _Traits, typename _Alloc> | |
15982 | inline bool | |
15983 | operator<(const _CharT* __lhs, | |
15984 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
15985 | { return __rhs.compare(__lhs) > 0; } | |
15986 | # 2246 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
15987 | template<typename _CharT, typename _Traits, typename _Alloc> | |
15988 | inline bool | |
15989 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
15990 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
15991 | { return __lhs.compare(__rhs) > 0; } | |
15992 | ||
15993 | ||
15994 | ||
15995 | ||
15996 | ||
15997 | ||
15998 | ||
15999 | template<typename _CharT, typename _Traits, typename _Alloc> | |
16000 | inline bool | |
16001 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
16002 | const _CharT* __rhs) | |
16003 | { return __lhs.compare(__rhs) > 0; } | |
16004 | ||
16005 | ||
16006 | ||
16007 | ||
16008 | ||
16009 | ||
16010 | ||
16011 | template<typename _CharT, typename _Traits, typename _Alloc> | |
16012 | inline bool | |
16013 | operator>(const _CharT* __lhs, | |
16014 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
16015 | { return __rhs.compare(__lhs) < 0; } | |
16016 | # 2283 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
16017 | template<typename _CharT, typename _Traits, typename _Alloc> | |
16018 | inline bool | |
16019 | operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
16020 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
16021 | { return __lhs.compare(__rhs) <= 0; } | |
16022 | ||
16023 | ||
16024 | ||
16025 | ||
16026 | ||
16027 | ||
16028 | ||
16029 | template<typename _CharT, typename _Traits, typename _Alloc> | |
16030 | inline bool | |
16031 | operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
16032 | const _CharT* __rhs) | |
16033 | { return __lhs.compare(__rhs) <= 0; } | |
16034 | ||
16035 | ||
16036 | ||
16037 | ||
16038 | ||
16039 | ||
16040 | ||
16041 | template<typename _CharT, typename _Traits, typename _Alloc> | |
16042 | inline bool | |
16043 | operator<=(const _CharT* __lhs, | |
16044 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
16045 | { return __rhs.compare(__lhs) >= 0; } | |
16046 | # 2320 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
16047 | template<typename _CharT, typename _Traits, typename _Alloc> | |
16048 | inline bool | |
16049 | operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
16050 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
16051 | { return __lhs.compare(__rhs) >= 0; } | |
16052 | ||
16053 | ||
16054 | ||
16055 | ||
16056 | ||
16057 | ||
16058 | ||
16059 | template<typename _CharT, typename _Traits, typename _Alloc> | |
16060 | inline bool | |
16061 | operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
16062 | const _CharT* __rhs) | |
16063 | { return __lhs.compare(__rhs) >= 0; } | |
16064 | ||
16065 | ||
16066 | ||
16067 | ||
16068 | ||
16069 | ||
16070 | ||
16071 | template<typename _CharT, typename _Traits, typename _Alloc> | |
16072 | inline bool | |
16073 | operator>=(const _CharT* __lhs, | |
16074 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
16075 | { return __rhs.compare(__lhs) <= 0; } | |
16076 | # 2357 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
16077 | template<typename _CharT, typename _Traits, typename _Alloc> | |
16078 | inline void | |
16079 | swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, | |
16080 | basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
16081 | { __lhs.swap(__rhs); } | |
16082 | # 2374 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
16083 | template<typename _CharT, typename _Traits, typename _Alloc> | |
16084 | basic_istream<_CharT, _Traits>& | |
16085 | operator>>(basic_istream<_CharT, _Traits>& __is, | |
16086 | basic_string<_CharT, _Traits, _Alloc>& __str); | |
16087 | ||
16088 | template<> | |
16089 | basic_istream<char>& | |
16090 | operator>>(basic_istream<char>& __is, basic_string<char>& __str); | |
16091 | # 2392 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
16092 | template<typename _CharT, typename _Traits, typename _Alloc> | |
16093 | basic_ostream<_CharT, _Traits>& | |
16094 | operator<<(basic_ostream<_CharT, _Traits>& __os, | |
16095 | const basic_string<_CharT, _Traits, _Alloc>& __str); | |
16096 | # 2410 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
16097 | template<typename _CharT, typename _Traits, typename _Alloc> | |
16098 | basic_istream<_CharT, _Traits>& | |
16099 | getline(basic_istream<_CharT, _Traits>& __is, | |
16100 | basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim); | |
16101 | # 2427 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.h" 3 | |
16102 | template<typename _CharT, typename _Traits, typename _Alloc> | |
16103 | inline basic_istream<_CharT, _Traits>& | |
16104 | getline(basic_istream<_CharT, _Traits>& __is, | |
16105 | basic_string<_CharT, _Traits, _Alloc>& __str); | |
16106 | ||
16107 | template<> | |
16108 | basic_istream<char>& | |
16109 | getline(basic_istream<char>& __in, basic_string<char>& __str, | |
16110 | char __delim); | |
16111 | ||
16112 | ||
16113 | template<> | |
16114 | basic_istream<wchar_t>& | |
16115 | getline(basic_istream<wchar_t>& __in, basic_string<wchar_t>& __str, | |
16116 | wchar_t __delim); | |
16117 | ||
16118 | } | |
16119 | # 54 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/string" 2 3 | |
16120 | ||
16121 | ||
16122 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/algorithm" 1 3 | |
16123 | # 63 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/algorithm" 3 | |
16124 | ||
16125 | # 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/algorithm" 3 | |
16126 | #pragma GCC visibility push(default) | |
16127 | ||
16128 | ||
16129 | ||
16130 | ||
16131 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 1 3 | |
16132 | # 65 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
16133 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_heap.h" 1 3 | |
16134 | # 65 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_heap.h" 3 | |
16135 | namespace std | |
16136 | { | |
16137 | ||
16138 | ||
16139 | ||
16140 | template<typename _RandomAccessIterator, typename _Distance> | |
16141 | bool | |
16142 | __is_heap(_RandomAccessIterator __first, _Distance __n) | |
16143 | { | |
16144 | _Distance __parent = 0; | |
16145 | for (_Distance __child = 1; __child < __n; ++__child) | |
16146 | { | |
16147 | if (__first[__parent] < __first[__child]) | |
16148 | return false; | |
16149 | if ((__child & 1) == 0) | |
16150 | ++__parent; | |
16151 | } | |
16152 | return true; | |
16153 | } | |
16154 | ||
16155 | template<typename _RandomAccessIterator, typename _Distance, | |
16156 | typename _StrictWeakOrdering> | |
16157 | bool | |
16158 | __is_heap(_RandomAccessIterator __first, _StrictWeakOrdering __comp, | |
16159 | _Distance __n) | |
16160 | { | |
16161 | _Distance __parent = 0; | |
16162 | for (_Distance __child = 1; __child < __n; ++__child) | |
16163 | { | |
16164 | if (__comp(__first[__parent], __first[__child])) | |
16165 | return false; | |
16166 | if ((__child & 1) == 0) | |
16167 | ++__parent; | |
16168 | } | |
16169 | return true; | |
16170 | } | |
16171 | ||
16172 | template<typename _RandomAccessIterator> | |
16173 | bool | |
16174 | __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) | |
16175 | { return std::__is_heap(__first, std::distance(__first, __last)); } | |
16176 | ||
16177 | template<typename _RandomAccessIterator, typename _StrictWeakOrdering> | |
16178 | bool | |
16179 | __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
16180 | _StrictWeakOrdering __comp) | |
16181 | { return std::__is_heap(__first, __comp, std::distance(__first, __last)); } | |
16182 | ||
16183 | ||
16184 | ||
16185 | template<typename _RandomAccessIterator, typename _Distance, typename _Tp> | |
16186 | void | |
16187 | __push_heap(_RandomAccessIterator __first, | |
16188 | _Distance __holeIndex, _Distance __topIndex, _Tp __value) | |
16189 | { | |
16190 | _Distance __parent = (__holeIndex - 1) / 2; | |
16191 | while (__holeIndex > __topIndex && *(__first + __parent) < __value) | |
16192 | { | |
16193 | *(__first + __holeIndex) = *(__first + __parent); | |
16194 | __holeIndex = __parent; | |
16195 | __parent = (__holeIndex - 1) / 2; | |
16196 | } | |
16197 | *(__first + __holeIndex) = __value; | |
16198 | } | |
16199 | # 139 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_heap.h" 3 | |
16200 | template<typename _RandomAccessIterator> | |
16201 | inline void | |
16202 | push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) | |
16203 | { | |
16204 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
16205 | _ValueType; | |
16206 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
16207 | _DistanceType; | |
16208 | ||
16209 | ||
16210 | ||
16211 | ||
16212 | ||
16213 | ; | |
16214 | ||
16215 | ||
16216 | std::__push_heap(__first, _DistanceType((__last - __first) - 1), | |
16217 | _DistanceType(0), _ValueType(*(__last - 1))); | |
16218 | } | |
16219 | ||
16220 | template<typename _RandomAccessIterator, typename _Distance, typename _Tp, | |
16221 | typename _Compare> | |
16222 | void | |
16223 | __push_heap(_RandomAccessIterator __first, _Distance __holeIndex, | |
16224 | _Distance __topIndex, _Tp __value, _Compare __comp) | |
16225 | { | |
16226 | _Distance __parent = (__holeIndex - 1) / 2; | |
16227 | while (__holeIndex > __topIndex | |
16228 | && __comp(*(__first + __parent), __value)) | |
16229 | { | |
16230 | *(__first + __holeIndex) = *(__first + __parent); | |
16231 | __holeIndex = __parent; | |
16232 | __parent = (__holeIndex - 1) / 2; | |
16233 | } | |
16234 | *(__first + __holeIndex) = __value; | |
16235 | } | |
16236 | # 187 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_heap.h" 3 | |
16237 | template<typename _RandomAccessIterator, typename _Compare> | |
16238 | inline void | |
16239 | push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
16240 | _Compare __comp) | |
16241 | { | |
16242 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
16243 | _ValueType; | |
16244 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
16245 | _DistanceType; | |
16246 | ||
16247 | ||
16248 | ||
16249 | ||
16250 | ; | |
16251 | ; | |
16252 | ||
16253 | std::__push_heap(__first, _DistanceType((__last - __first) - 1), | |
16254 | _DistanceType(0), _ValueType(*(__last - 1)), __comp); | |
16255 | } | |
16256 | ||
16257 | template<typename _RandomAccessIterator, typename _Distance, typename _Tp> | |
16258 | void | |
16259 | __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, | |
16260 | _Distance __len, _Tp __value) | |
16261 | { | |
16262 | const _Distance __topIndex = __holeIndex; | |
16263 | _Distance __secondChild = 2 * __holeIndex + 2; | |
16264 | while (__secondChild < __len) | |
16265 | { | |
16266 | if (*(__first + __secondChild) < *(__first + (__secondChild - 1))) | |
16267 | __secondChild--; | |
16268 | *(__first + __holeIndex) = *(__first + __secondChild); | |
16269 | __holeIndex = __secondChild; | |
16270 | __secondChild = 2 * (__secondChild + 1); | |
16271 | } | |
16272 | if (__secondChild == __len) | |
16273 | { | |
16274 | *(__first + __holeIndex) = *(__first + (__secondChild - 1)); | |
16275 | __holeIndex = __secondChild - 1; | |
16276 | } | |
16277 | std::__push_heap(__first, __holeIndex, __topIndex, __value); | |
16278 | } | |
16279 | ||
16280 | template<typename _RandomAccessIterator, typename _Tp> | |
16281 | inline void | |
16282 | __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
16283 | _RandomAccessIterator __result, _Tp __value) | |
16284 | { | |
16285 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
16286 | _Distance; | |
16287 | *__result = *__first; | |
16288 | std::__adjust_heap(__first, _Distance(0), _Distance(__last - __first), | |
16289 | __value); | |
16290 | } | |
16291 | # 251 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_heap.h" 3 | |
16292 | template<typename _RandomAccessIterator> | |
16293 | inline void | |
16294 | pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) | |
16295 | { | |
16296 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
16297 | _ValueType; | |
16298 | ||
16299 | ||
16300 | ||
16301 | ||
16302 | ||
16303 | ; | |
16304 | ; | |
16305 | ||
16306 | std::__pop_heap(__first, __last - 1, __last - 1, | |
16307 | _ValueType(*(__last - 1))); | |
16308 | } | |
16309 | ||
16310 | template<typename _RandomAccessIterator, typename _Distance, | |
16311 | typename _Tp, typename _Compare> | |
16312 | void | |
16313 | __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, | |
16314 | _Distance __len, _Tp __value, _Compare __comp) | |
16315 | { | |
16316 | const _Distance __topIndex = __holeIndex; | |
16317 | _Distance __secondChild = 2 * __holeIndex + 2; | |
16318 | while (__secondChild < __len) | |
16319 | { | |
16320 | if (__comp(*(__first + __secondChild), | |
16321 | *(__first + (__secondChild - 1)))) | |
16322 | __secondChild--; | |
16323 | *(__first + __holeIndex) = *(__first + __secondChild); | |
16324 | __holeIndex = __secondChild; | |
16325 | __secondChild = 2 * (__secondChild + 1); | |
16326 | } | |
16327 | if (__secondChild == __len) | |
16328 | { | |
16329 | *(__first + __holeIndex) = *(__first + (__secondChild - 1)); | |
16330 | __holeIndex = __secondChild - 1; | |
16331 | } | |
16332 | std::__push_heap(__first, __holeIndex, __topIndex, __value, __comp); | |
16333 | } | |
16334 | ||
16335 | template<typename _RandomAccessIterator, typename _Tp, typename _Compare> | |
16336 | inline void | |
16337 | __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
16338 | _RandomAccessIterator __result, _Tp __value, _Compare __comp) | |
16339 | { | |
16340 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
16341 | _Distance; | |
16342 | *__result = *__first; | |
16343 | std::__adjust_heap(__first, _Distance(0), _Distance(__last - __first), | |
16344 | __value, __comp); | |
16345 | } | |
16346 | # 317 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_heap.h" 3 | |
16347 | template<typename _RandomAccessIterator, typename _Compare> | |
16348 | inline void | |
16349 | pop_heap(_RandomAccessIterator __first, | |
16350 | _RandomAccessIterator __last, _Compare __comp) | |
16351 | { | |
16352 | ||
16353 | ||
16354 | ||
16355 | ; | |
16356 | ; | |
16357 | ||
16358 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
16359 | _ValueType; | |
16360 | std::__pop_heap(__first, __last - 1, __last - 1, | |
16361 | _ValueType(*(__last - 1)), __comp); | |
16362 | } | |
16363 | # 342 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_heap.h" 3 | |
16364 | template<typename _RandomAccessIterator> | |
16365 | void | |
16366 | make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) | |
16367 | { | |
16368 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
16369 | _ValueType; | |
16370 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
16371 | _DistanceType; | |
16372 | ||
16373 | ||
16374 | ||
16375 | ||
16376 | ||
16377 | ; | |
16378 | ||
16379 | if (__last - __first < 2) | |
16380 | return; | |
16381 | ||
16382 | const _DistanceType __len = __last - __first; | |
16383 | _DistanceType __parent = (__len - 2) / 2; | |
16384 | while (true) | |
16385 | { | |
16386 | std::__adjust_heap(__first, __parent, __len, | |
16387 | _ValueType(*(__first + __parent))); | |
16388 | if (__parent == 0) | |
16389 | return; | |
16390 | __parent--; | |
16391 | } | |
16392 | } | |
16393 | # 382 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_heap.h" 3 | |
16394 | template<typename _RandomAccessIterator, typename _Compare> | |
16395 | inline void | |
16396 | make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
16397 | _Compare __comp) | |
16398 | { | |
16399 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
16400 | _ValueType; | |
16401 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
16402 | _DistanceType; | |
16403 | ||
16404 | ||
16405 | ||
16406 | ||
16407 | ; | |
16408 | ||
16409 | if (__last - __first < 2) | |
16410 | return; | |
16411 | ||
16412 | const _DistanceType __len = __last - __first; | |
16413 | _DistanceType __parent = (__len - 2) / 2; | |
16414 | while (true) | |
16415 | { | |
16416 | std::__adjust_heap(__first, __parent, __len, | |
16417 | _ValueType(*(__first + __parent)), __comp); | |
16418 | if (__parent == 0) | |
16419 | return; | |
16420 | __parent--; | |
16421 | } | |
16422 | } | |
16423 | # 420 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_heap.h" 3 | |
16424 | template<typename _RandomAccessIterator> | |
16425 | void | |
16426 | sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) | |
16427 | { | |
16428 | ||
16429 | ||
16430 | ||
16431 | ||
16432 | ||
16433 | ; | |
16434 | ||
16435 | ||
16436 | while (__last - __first > 1) | |
16437 | std::pop_heap(__first, __last--); | |
16438 | } | |
16439 | # 446 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_heap.h" 3 | |
16440 | template<typename _RandomAccessIterator, typename _Compare> | |
16441 | void | |
16442 | sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
16443 | _Compare __comp) | |
16444 | { | |
16445 | ||
16446 | ||
16447 | ||
16448 | ; | |
16449 | ; | |
16450 | ||
16451 | while (__last - __first > 1) | |
16452 | std::pop_heap(__first, __last--, __comp); | |
16453 | } | |
16454 | ||
16455 | } | |
16456 | # 66 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 2 3 | |
16457 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_tempbuf.h" 1 3 | |
16458 | # 66 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_tempbuf.h" 3 | |
16459 | namespace std | |
16460 | { | |
16461 | ||
16462 | ||
16463 | ||
16464 | ||
16465 | ||
16466 | ||
16467 | ||
16468 | template<typename _ForwardIterator, typename _Tp> | |
16469 | class _Temporary_buffer | |
16470 | { | |
16471 | ||
16472 | ||
16473 | ||
16474 | public: | |
16475 | typedef _Tp value_type; | |
16476 | typedef value_type* pointer; | |
16477 | typedef pointer iterator; | |
16478 | typedef ptrdiff_t size_type; | |
16479 | ||
16480 | protected: | |
16481 | size_type _M_original_len; | |
16482 | size_type _M_len; | |
16483 | pointer _M_buffer; | |
16484 | ||
16485 | void | |
16486 | _M_initialize_buffer(const _Tp&, __true_type) { } | |
16487 | ||
16488 | void | |
16489 | _M_initialize_buffer(const _Tp& val, __false_type) | |
16490 | { std::uninitialized_fill_n(_M_buffer, _M_len, val); } | |
16491 | ||
16492 | public: | |
16493 | ||
16494 | size_type | |
16495 | size() const | |
16496 | { return _M_len; } | |
16497 | ||
16498 | ||
16499 | size_type | |
16500 | requested_size() const | |
16501 | { return _M_original_len; } | |
16502 | ||
16503 | ||
16504 | iterator | |
16505 | begin() | |
16506 | { return _M_buffer; } | |
16507 | ||
16508 | ||
16509 | iterator | |
16510 | end() | |
16511 | { return _M_buffer + _M_len; } | |
16512 | ||
16513 | ||
16514 | ||
16515 | ||
16516 | ||
16517 | _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last); | |
16518 | ||
16519 | ~_Temporary_buffer() | |
16520 | { | |
16521 | std::_Destroy(_M_buffer, _M_buffer + _M_len); | |
16522 | std::return_temporary_buffer(_M_buffer); | |
16523 | } | |
16524 | ||
16525 | private: | |
16526 | ||
16527 | _Temporary_buffer(const _Temporary_buffer&); | |
16528 | ||
16529 | void | |
16530 | operator=(const _Temporary_buffer&); | |
16531 | }; | |
16532 | ||
16533 | ||
16534 | template<typename _ForwardIterator, typename _Tp> | |
16535 | _Temporary_buffer<_ForwardIterator, _Tp>:: | |
16536 | _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) | |
16537 | : _M_original_len(std::distance(__first, __last)), | |
16538 | _M_len(0), _M_buffer(0) | |
16539 | { | |
16540 | ||
16541 | typedef typename std::__is_scalar<_Tp>::__type _Trivial; | |
16542 | ||
16543 | try | |
16544 | { | |
16545 | pair<pointer, size_type> __p(get_temporary_buffer< | |
16546 | value_type>(_M_original_len)); | |
16547 | _M_buffer = __p.first; | |
16548 | _M_len = __p.second; | |
16549 | if (_M_len > 0) | |
16550 | _M_initialize_buffer(*__first, _Trivial()); | |
16551 | } | |
16552 | catch(...) | |
16553 | { | |
16554 | std::return_temporary_buffer(_M_buffer); | |
16555 | _M_buffer = 0; | |
16556 | _M_len = 0; | |
16557 | throw; | |
16558 | } | |
16559 | } | |
16560 | } | |
16561 | # 67 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 2 3 | |
16562 | ||
16563 | ||
16564 | ||
16565 | ||
16566 | namespace std | |
16567 | { | |
16568 | # 85 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
16569 | template<typename _Tp> | |
16570 | inline const _Tp& | |
16571 | __median(const _Tp& __a, const _Tp& __b, const _Tp& __c) | |
16572 | { | |
16573 | ||
16574 | ||
16575 | if (__a < __b) | |
16576 | if (__b < __c) | |
16577 | return __b; | |
16578 | else if (__a < __c) | |
16579 | return __c; | |
16580 | else | |
16581 | return __a; | |
16582 | else if (__a < __c) | |
16583 | return __a; | |
16584 | else if (__b < __c) | |
16585 | return __c; | |
16586 | else | |
16587 | return __b; | |
16588 | } | |
16589 | # 119 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
16590 | template<typename _Tp, typename _Compare> | |
16591 | inline const _Tp& | |
16592 | __median(const _Tp& __a, const _Tp& __b, const _Tp& __c, _Compare __comp) | |
16593 | { | |
16594 | ||
16595 | ||
16596 | if (__comp(__a, __b)) | |
16597 | if (__comp(__b, __c)) | |
16598 | return __b; | |
16599 | else if (__comp(__a, __c)) | |
16600 | return __c; | |
16601 | else | |
16602 | return __a; | |
16603 | else if (__comp(__a, __c)) | |
16604 | return __a; | |
16605 | else if (__comp(__b, __c)) | |
16606 | return __c; | |
16607 | else | |
16608 | return __b; | |
16609 | } | |
16610 | # 151 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
16611 | template<typename _InputIterator, typename _Function> | |
16612 | _Function | |
16613 | for_each(_InputIterator __first, _InputIterator __last, _Function __f) | |
16614 | { | |
16615 | ||
16616 | ||
16617 | ; | |
16618 | for ( ; __first != __last; ++__first) | |
16619 | __f(*__first); | |
16620 | return __f; | |
16621 | } | |
16622 | ||
16623 | ||
16624 | ||
16625 | ||
16626 | ||
16627 | ||
16628 | template<typename _InputIterator, typename _Tp> | |
16629 | inline _InputIterator | |
16630 | __find(_InputIterator __first, _InputIterator __last, | |
16631 | const _Tp& __val, input_iterator_tag) | |
16632 | { | |
16633 | while (__first != __last && !(*__first == __val)) | |
16634 | ++__first; | |
16635 | return __first; | |
16636 | } | |
16637 | ||
16638 | ||
16639 | ||
16640 | ||
16641 | ||
16642 | ||
16643 | template<typename _InputIterator, typename _Predicate> | |
16644 | inline _InputIterator | |
16645 | __find_if(_InputIterator __first, _InputIterator __last, | |
16646 | _Predicate __pred, input_iterator_tag) | |
16647 | { | |
16648 | while (__first != __last && !__pred(*__first)) | |
16649 | ++__first; | |
16650 | return __first; | |
16651 | } | |
16652 | ||
16653 | ||
16654 | ||
16655 | ||
16656 | ||
16657 | ||
16658 | template<typename _RandomAccessIterator, typename _Tp> | |
16659 | _RandomAccessIterator | |
16660 | __find(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
16661 | const _Tp& __val, random_access_iterator_tag) | |
16662 | { | |
16663 | typename iterator_traits<_RandomAccessIterator>::difference_type | |
16664 | __trip_count = (__last - __first) >> 2; | |
16665 | ||
16666 | for ( ; __trip_count > 0 ; --__trip_count) | |
16667 | { | |
16668 | if (*__first == __val) | |
16669 | return __first; | |
16670 | ++__first; | |
16671 | ||
16672 | if (*__first == __val) | |
16673 | return __first; | |
16674 | ++__first; | |
16675 | ||
16676 | if (*__first == __val) | |
16677 | return __first; | |
16678 | ++__first; | |
16679 | ||
16680 | if (*__first == __val) | |
16681 | return __first; | |
16682 | ++__first; | |
16683 | } | |
16684 | ||
16685 | switch (__last - __first) | |
16686 | { | |
16687 | case 3: | |
16688 | if (*__first == __val) | |
16689 | return __first; | |
16690 | ++__first; | |
16691 | case 2: | |
16692 | if (*__first == __val) | |
16693 | return __first; | |
16694 | ++__first; | |
16695 | case 1: | |
16696 | if (*__first == __val) | |
16697 | return __first; | |
16698 | ++__first; | |
16699 | case 0: | |
16700 | default: | |
16701 | return __last; | |
16702 | } | |
16703 | } | |
16704 | ||
16705 | ||
16706 | ||
16707 | ||
16708 | ||
16709 | ||
16710 | template<typename _RandomAccessIterator, typename _Predicate> | |
16711 | _RandomAccessIterator | |
16712 | __find_if(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
16713 | _Predicate __pred, random_access_iterator_tag) | |
16714 | { | |
16715 | typename iterator_traits<_RandomAccessIterator>::difference_type | |
16716 | __trip_count = (__last - __first) >> 2; | |
16717 | ||
16718 | for ( ; __trip_count > 0 ; --__trip_count) | |
16719 | { | |
16720 | if (__pred(*__first)) | |
16721 | return __first; | |
16722 | ++__first; | |
16723 | ||
16724 | if (__pred(*__first)) | |
16725 | return __first; | |
16726 | ++__first; | |
16727 | ||
16728 | if (__pred(*__first)) | |
16729 | return __first; | |
16730 | ++__first; | |
16731 | ||
16732 | if (__pred(*__first)) | |
16733 | return __first; | |
16734 | ++__first; | |
16735 | } | |
16736 | ||
16737 | switch (__last - __first) | |
16738 | { | |
16739 | case 3: | |
16740 | if (__pred(*__first)) | |
16741 | return __first; | |
16742 | ++__first; | |
16743 | case 2: | |
16744 | if (__pred(*__first)) | |
16745 | return __first; | |
16746 | ++__first; | |
16747 | case 1: | |
16748 | if (__pred(*__first)) | |
16749 | return __first; | |
16750 | ++__first; | |
16751 | case 0: | |
16752 | default: | |
16753 | return __last; | |
16754 | } | |
16755 | } | |
16756 | # 305 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
16757 | template<typename _InputIterator, typename _Tp> | |
16758 | inline _InputIterator | |
16759 | find(_InputIterator __first, _InputIterator __last, | |
16760 | const _Tp& __val) | |
16761 | { | |
16762 | ||
16763 | ||
16764 | ||
16765 | ||
16766 | ; | |
16767 | return std::__find(__first, __last, __val, | |
16768 | std::__iterator_category(__first)); | |
16769 | } | |
16770 | # 327 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
16771 | template<typename _InputIterator, typename _Predicate> | |
16772 | inline _InputIterator | |
16773 | find_if(_InputIterator __first, _InputIterator __last, | |
16774 | _Predicate __pred) | |
16775 | { | |
16776 | ||
16777 | ||
16778 | ||
16779 | ||
16780 | ; | |
16781 | return std::__find_if(__first, __last, __pred, | |
16782 | std::__iterator_category(__first)); | |
16783 | } | |
16784 | # 349 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
16785 | template<typename _ForwardIterator> | |
16786 | _ForwardIterator | |
16787 | adjacent_find(_ForwardIterator __first, _ForwardIterator __last) | |
16788 | { | |
16789 | ||
16790 | ||
16791 | ||
16792 | ||
16793 | ; | |
16794 | if (__first == __last) | |
16795 | return __last; | |
16796 | _ForwardIterator __next = __first; | |
16797 | while(++__next != __last) | |
16798 | { | |
16799 | if (*__first == *__next) | |
16800 | return __first; | |
16801 | __first = __next; | |
16802 | } | |
16803 | return __last; | |
16804 | } | |
16805 | # 380 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
16806 | template<typename _ForwardIterator, typename _BinaryPredicate> | |
16807 | _ForwardIterator | |
16808 | adjacent_find(_ForwardIterator __first, _ForwardIterator __last, | |
16809 | _BinaryPredicate __binary_pred) | |
16810 | { | |
16811 | ||
16812 | ||
16813 | ||
16814 | ||
16815 | ||
16816 | ; | |
16817 | if (__first == __last) | |
16818 | return __last; | |
16819 | _ForwardIterator __next = __first; | |
16820 | while(++__next != __last) | |
16821 | { | |
16822 | if (__binary_pred(*__first, *__next)) | |
16823 | return __first; | |
16824 | __first = __next; | |
16825 | } | |
16826 | return __last; | |
16827 | } | |
16828 | # 411 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
16829 | template<typename _InputIterator, typename _Tp> | |
16830 | typename iterator_traits<_InputIterator>::difference_type | |
16831 | count(_InputIterator __first, _InputIterator __last, const _Tp& __value) | |
16832 | { | |
16833 | ||
16834 | ||
16835 | ||
16836 | ||
16837 | ; | |
16838 | typename iterator_traits<_InputIterator>::difference_type __n = 0; | |
16839 | for ( ; __first != __last; ++__first) | |
16840 | if (*__first == __value) | |
16841 | ++__n; | |
16842 | return __n; | |
16843 | } | |
16844 | # 435 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
16845 | template<typename _InputIterator, typename _Predicate> | |
16846 | typename iterator_traits<_InputIterator>::difference_type | |
16847 | count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) | |
16848 | { | |
16849 | ||
16850 | ||
16851 | ||
16852 | ||
16853 | ; | |
16854 | typename iterator_traits<_InputIterator>::difference_type __n = 0; | |
16855 | for ( ; __first != __last; ++__first) | |
16856 | if (__pred(*__first)) | |
16857 | ++__n; | |
16858 | return __n; | |
16859 | } | |
16860 | # 474 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
16861 | template<typename _ForwardIterator1, typename _ForwardIterator2> | |
16862 | _ForwardIterator1 | |
16863 | search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, | |
16864 | _ForwardIterator2 __first2, _ForwardIterator2 __last2) | |
16865 | { | |
16866 | ||
16867 | ||
16868 | ||
16869 | ||
16870 | ||
16871 | ||
16872 | ; | |
16873 | ; | |
16874 | ||
16875 | if (__first1 == __last1 || __first2 == __last2) | |
16876 | return __first1; | |
16877 | ||
16878 | ||
16879 | _ForwardIterator2 __tmp(__first2); | |
16880 | ++__tmp; | |
16881 | if (__tmp == __last2) | |
16882 | return std::find(__first1, __last1, *__first2); | |
16883 | ||
16884 | ||
16885 | _ForwardIterator2 __p1, __p; | |
16886 | __p1 = __first2; ++__p1; | |
16887 | _ForwardIterator1 __current = __first1; | |
16888 | ||
16889 | while (__first1 != __last1) | |
16890 | { | |
16891 | __first1 = std::find(__first1, __last1, *__first2); | |
16892 | if (__first1 == __last1) | |
16893 | return __last1; | |
16894 | ||
16895 | __p = __p1; | |
16896 | __current = __first1; | |
16897 | if (++__current == __last1) | |
16898 | return __last1; | |
16899 | ||
16900 | while (*__current == *__p) | |
16901 | { | |
16902 | if (++__p == __last2) | |
16903 | return __first1; | |
16904 | if (++__current == __last1) | |
16905 | return __last1; | |
16906 | } | |
16907 | ++__first1; | |
16908 | } | |
16909 | return __first1; | |
16910 | } | |
16911 | # 545 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
16912 | template<typename _ForwardIterator1, typename _ForwardIterator2, | |
16913 | typename _BinaryPredicate> | |
16914 | _ForwardIterator1 | |
16915 | search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, | |
16916 | _ForwardIterator2 __first2, _ForwardIterator2 __last2, | |
16917 | _BinaryPredicate __predicate) | |
16918 | { | |
16919 | ||
16920 | ||
16921 | ||
16922 | ||
16923 | ||
16924 | ||
16925 | ; | |
16926 | ; | |
16927 | ||
16928 | ||
16929 | if (__first1 == __last1 || __first2 == __last2) | |
16930 | return __first1; | |
16931 | ||
16932 | ||
16933 | _ForwardIterator2 __tmp(__first2); | |
16934 | ++__tmp; | |
16935 | if (__tmp == __last2) | |
16936 | { | |
16937 | while (__first1 != __last1 && !__predicate(*__first1, *__first2)) | |
16938 | ++__first1; | |
16939 | return __first1; | |
16940 | } | |
16941 | ||
16942 | ||
16943 | _ForwardIterator2 __p1, __p; | |
16944 | __p1 = __first2; ++__p1; | |
16945 | _ForwardIterator1 __current = __first1; | |
16946 | ||
16947 | while (__first1 != __last1) | |
16948 | { | |
16949 | while (__first1 != __last1) | |
16950 | { | |
16951 | if (__predicate(*__first1, *__first2)) | |
16952 | break; | |
16953 | ++__first1; | |
16954 | } | |
16955 | while (__first1 != __last1 && !__predicate(*__first1, *__first2)) | |
16956 | ++__first1; | |
16957 | if (__first1 == __last1) | |
16958 | return __last1; | |
16959 | ||
16960 | __p = __p1; | |
16961 | __current = __first1; | |
16962 | if (++__current == __last1) | |
16963 | return __last1; | |
16964 | ||
16965 | while (__predicate(*__current, *__p)) | |
16966 | { | |
16967 | if (++__p == __last2) | |
16968 | return __first1; | |
16969 | if (++__current == __last1) | |
16970 | return __last1; | |
16971 | } | |
16972 | ++__first1; | |
16973 | } | |
16974 | return __first1; | |
16975 | } | |
16976 | # 617 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
16977 | template<typename _ForwardIterator, typename _Integer, typename _Tp> | |
16978 | _ForwardIterator | |
16979 | __search_n(_ForwardIterator __first, _ForwardIterator __last, | |
16980 | _Integer __count, const _Tp& __val, | |
16981 | std::forward_iterator_tag) | |
16982 | { | |
16983 | __first = std::find(__first, __last, __val); | |
16984 | while (__first != __last) | |
16985 | { | |
16986 | typename iterator_traits<_ForwardIterator>::difference_type | |
16987 | __n = __count; | |
16988 | _ForwardIterator __i = __first; | |
16989 | ++__i; | |
16990 | while (__i != __last && __n != 1 && *__i == __val) | |
16991 | { | |
16992 | ++__i; | |
16993 | --__n; | |
16994 | } | |
16995 | if (__n == 1) | |
16996 | return __first; | |
16997 | if (__i == __last) | |
16998 | return __last; | |
16999 | __first = std::find(++__i, __last, __val); | |
17000 | } | |
17001 | return __last; | |
17002 | } | |
17003 | # 651 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17004 | template<typename _RandomAccessIter, typename _Integer, typename _Tp> | |
17005 | _RandomAccessIter | |
17006 | __search_n(_RandomAccessIter __first, _RandomAccessIter __last, | |
17007 | _Integer __count, const _Tp& __val, | |
17008 | std::random_access_iterator_tag) | |
17009 | { | |
17010 | ||
17011 | typedef typename std::iterator_traits<_RandomAccessIter>::difference_type | |
17012 | _DistanceType; | |
17013 | ||
17014 | _DistanceType __tailSize = __last - __first; | |
17015 | const _DistanceType __pattSize = __count; | |
17016 | ||
17017 | if (__tailSize < __pattSize) | |
17018 | return __last; | |
17019 | ||
17020 | const _DistanceType __skipOffset = __pattSize - 1; | |
17021 | _RandomAccessIter __lookAhead = __first + __skipOffset; | |
17022 | __tailSize -= __pattSize; | |
17023 | ||
17024 | while (1) | |
17025 | { | |
17026 | ||
17027 | ||
17028 | while (!(*__lookAhead == __val)) | |
17029 | { | |
17030 | if (__tailSize < __pattSize) | |
17031 | return __last; | |
17032 | __lookAhead += __pattSize; | |
17033 | __tailSize -= __pattSize; | |
17034 | } | |
17035 | _DistanceType __remainder = __skipOffset; | |
17036 | for (_RandomAccessIter __backTrack = __lookAhead - 1; | |
17037 | *__backTrack == __val; --__backTrack) | |
17038 | { | |
17039 | if (--__remainder == 0) | |
17040 | return (__lookAhead - __skipOffset); | |
17041 | } | |
17042 | if (__remainder > __tailSize) | |
17043 | return __last; | |
17044 | __lookAhead += __remainder; | |
17045 | __tailSize -= __remainder; | |
17046 | } | |
17047 | } | |
17048 | # 709 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17049 | template<typename _ForwardIterator, typename _Integer, typename _Tp> | |
17050 | _ForwardIterator | |
17051 | search_n(_ForwardIterator __first, _ForwardIterator __last, | |
17052 | _Integer __count, const _Tp& __val) | |
17053 | { | |
17054 | ||
17055 | ||
17056 | ||
17057 | ||
17058 | ; | |
17059 | ||
17060 | if (__count <= 0) | |
17061 | return __first; | |
17062 | if (__count == 1) | |
17063 | return std::find(__first, __last, __val); | |
17064 | return std::__search_n(__first, __last, __count, __val, | |
17065 | std::__iterator_category(__first)); | |
17066 | } | |
17067 | # 736 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17068 | template<typename _ForwardIterator, typename _Integer, typename _Tp, | |
17069 | typename _BinaryPredicate> | |
17070 | _ForwardIterator | |
17071 | __search_n(_ForwardIterator __first, _ForwardIterator __last, | |
17072 | _Integer __count, const _Tp& __val, | |
17073 | _BinaryPredicate __binary_pred, std::forward_iterator_tag) | |
17074 | { | |
17075 | while (__first != __last && !__binary_pred(*__first, __val)) | |
17076 | ++__first; | |
17077 | ||
17078 | while (__first != __last) | |
17079 | { | |
17080 | typename iterator_traits<_ForwardIterator>::difference_type | |
17081 | __n = __count; | |
17082 | _ForwardIterator __i = __first; | |
17083 | ++__i; | |
17084 | while (__i != __last && __n != 1 && __binary_pred(*__i, __val)) | |
17085 | { | |
17086 | ++__i; | |
17087 | --__n; | |
17088 | } | |
17089 | if (__n == 1) | |
17090 | return __first; | |
17091 | if (__i == __last) | |
17092 | return __last; | |
17093 | __first = ++__i; | |
17094 | while (__first != __last && !__binary_pred(*__first, __val)) | |
17095 | ++__first; | |
17096 | } | |
17097 | return __last; | |
17098 | } | |
17099 | # 776 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17100 | template<typename _RandomAccessIter, typename _Integer, typename _Tp, | |
17101 | typename _BinaryPredicate> | |
17102 | _RandomAccessIter | |
17103 | __search_n(_RandomAccessIter __first, _RandomAccessIter __last, | |
17104 | _Integer __count, const _Tp& __val, | |
17105 | _BinaryPredicate __binary_pred, std::random_access_iterator_tag) | |
17106 | { | |
17107 | ||
17108 | typedef typename std::iterator_traits<_RandomAccessIter>::difference_type | |
17109 | _DistanceType; | |
17110 | ||
17111 | _DistanceType __tailSize = __last - __first; | |
17112 | const _DistanceType __pattSize = __count; | |
17113 | ||
17114 | if (__tailSize < __pattSize) | |
17115 | return __last; | |
17116 | ||
17117 | const _DistanceType __skipOffset = __pattSize - 1; | |
17118 | _RandomAccessIter __lookAhead = __first + __skipOffset; | |
17119 | __tailSize -= __pattSize; | |
17120 | ||
17121 | while (1) | |
17122 | { | |
17123 | ||
17124 | ||
17125 | while (!__binary_pred(*__lookAhead, __val)) | |
17126 | { | |
17127 | if (__tailSize < __pattSize) | |
17128 | return __last; | |
17129 | __lookAhead += __pattSize; | |
17130 | __tailSize -= __pattSize; | |
17131 | } | |
17132 | _DistanceType __remainder = __skipOffset; | |
17133 | for (_RandomAccessIter __backTrack = __lookAhead - 1; | |
17134 | __binary_pred(*__backTrack, __val); --__backTrack) | |
17135 | { | |
17136 | if (--__remainder == 0) | |
17137 | return (__lookAhead - __skipOffset); | |
17138 | } | |
17139 | if (__remainder > __tailSize) | |
17140 | return __last; | |
17141 | __lookAhead += __remainder; | |
17142 | __tailSize -= __remainder; | |
17143 | } | |
17144 | } | |
17145 | # 837 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17146 | template<typename _ForwardIterator, typename _Integer, typename _Tp, | |
17147 | typename _BinaryPredicate> | |
17148 | _ForwardIterator | |
17149 | search_n(_ForwardIterator __first, _ForwardIterator __last, | |
17150 | _Integer __count, const _Tp& __val, | |
17151 | _BinaryPredicate __binary_pred) | |
17152 | { | |
17153 | ||
17154 | ||
17155 | ||
17156 | ||
17157 | ; | |
17158 | ||
17159 | if (__count <= 0) | |
17160 | return __first; | |
17161 | if (__count == 1) | |
17162 | { | |
17163 | while (__first != __last && !__binary_pred(*__first, __val)) | |
17164 | ++__first; | |
17165 | return __first; | |
17166 | } | |
17167 | return std::__search_n(__first, __last, __count, __val, __binary_pred, | |
17168 | std::__iterator_category(__first)); | |
17169 | } | |
17170 | # 873 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17171 | template<typename _ForwardIterator1, typename _ForwardIterator2> | |
17172 | _ForwardIterator2 | |
17173 | swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, | |
17174 | _ForwardIterator2 __first2) | |
17175 | { | |
17176 | ||
17177 | ||
17178 | ||
17179 | ||
17180 | ||
17181 | ||
17182 | ||
17183 | ||
17184 | ||
17185 | ||
17186 | ||
17187 | ; | |
17188 | ||
17189 | for ( ; __first1 != __last1; ++__first1, ++__first2) | |
17190 | std::iter_swap(__first1, __first2); | |
17191 | return __first2; | |
17192 | } | |
17193 | # 911 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17194 | template<typename _InputIterator, typename _OutputIterator, | |
17195 | typename _UnaryOperation> | |
17196 | _OutputIterator | |
17197 | transform(_InputIterator __first, _InputIterator __last, | |
17198 | _OutputIterator __result, _UnaryOperation __unary_op) | |
17199 | { | |
17200 | ||
17201 | ||
17202 | ||
17203 | ||
17204 | ||
17205 | ; | |
17206 | ||
17207 | for ( ; __first != __last; ++__first, ++__result) | |
17208 | *__result = __unary_op(*__first); | |
17209 | return __result; | |
17210 | } | |
17211 | # 946 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17212 | template<typename _InputIterator1, typename _InputIterator2, | |
17213 | typename _OutputIterator, typename _BinaryOperation> | |
17214 | _OutputIterator | |
17215 | transform(_InputIterator1 __first1, _InputIterator1 __last1, | |
17216 | _InputIterator2 __first2, _OutputIterator __result, | |
17217 | _BinaryOperation __binary_op) | |
17218 | { | |
17219 | ||
17220 | ||
17221 | ||
17222 | ||
17223 | ||
17224 | ||
17225 | ; | |
17226 | ||
17227 | for ( ; __first1 != __last1; ++__first1, ++__first2, ++__result) | |
17228 | *__result = __binary_op(*__first1, *__first2); | |
17229 | return __result; | |
17230 | } | |
17231 | # 978 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17232 | template<typename _ForwardIterator, typename _Tp> | |
17233 | void | |
17234 | replace(_ForwardIterator __first, _ForwardIterator __last, | |
17235 | const _Tp& __old_value, const _Tp& __new_value) | |
17236 | { | |
17237 | ||
17238 | ||
17239 | ||
17240 | ||
17241 | ||
17242 | ||
17243 | ||
17244 | ; | |
17245 | ||
17246 | for ( ; __first != __last; ++__first) | |
17247 | if (*__first == __old_value) | |
17248 | *__first = __new_value; | |
17249 | } | |
17250 | # 1009 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17251 | template<typename _ForwardIterator, typename _Predicate, typename _Tp> | |
17252 | void | |
17253 | replace_if(_ForwardIterator __first, _ForwardIterator __last, | |
17254 | _Predicate __pred, const _Tp& __new_value) | |
17255 | { | |
17256 | ||
17257 | ||
17258 | ||
17259 | ||
17260 | ||
17261 | ||
17262 | ||
17263 | ; | |
17264 | ||
17265 | for ( ; __first != __last; ++__first) | |
17266 | if (__pred(*__first)) | |
17267 | *__first = __new_value; | |
17268 | } | |
17269 | # 1042 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17270 | template<typename _InputIterator, typename _OutputIterator, typename _Tp> | |
17271 | _OutputIterator | |
17272 | replace_copy(_InputIterator __first, _InputIterator __last, | |
17273 | _OutputIterator __result, | |
17274 | const _Tp& __old_value, const _Tp& __new_value) | |
17275 | { | |
17276 | ||
17277 | ||
17278 | ||
17279 | ||
17280 | ||
17281 | ||
17282 | ; | |
17283 | ||
17284 | for ( ; __first != __last; ++__first, ++__result) | |
17285 | if (*__first == __old_value) | |
17286 | *__result = __new_value; | |
17287 | else | |
17288 | *__result = *__first; | |
17289 | return __result; | |
17290 | } | |
17291 | # 1078 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17292 | template<typename _InputIterator, typename _OutputIterator, | |
17293 | typename _Predicate, typename _Tp> | |
17294 | _OutputIterator | |
17295 | replace_copy_if(_InputIterator __first, _InputIterator __last, | |
17296 | _OutputIterator __result, | |
17297 | _Predicate __pred, const _Tp& __new_value) | |
17298 | { | |
17299 | ||
17300 | ||
17301 | ||
17302 | ||
17303 | ||
17304 | ||
17305 | ; | |
17306 | ||
17307 | for ( ; __first != __last; ++__first, ++__result) | |
17308 | if (__pred(*__first)) | |
17309 | *__result = __new_value; | |
17310 | else | |
17311 | *__result = *__first; | |
17312 | return __result; | |
17313 | } | |
17314 | # 1112 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17315 | template<typename _ForwardIterator, typename _Generator> | |
17316 | void | |
17317 | generate(_ForwardIterator __first, _ForwardIterator __last, | |
17318 | _Generator __gen) | |
17319 | { | |
17320 | ||
17321 | ||
17322 | ||
17323 | ||
17324 | ; | |
17325 | ||
17326 | for ( ; __first != __last; ++__first) | |
17327 | *__first = __gen(); | |
17328 | } | |
17329 | # 1138 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17330 | template<typename _OutputIterator, typename _Size, typename _Generator> | |
17331 | _OutputIterator | |
17332 | generate_n(_OutputIterator __first, _Size __n, _Generator __gen) | |
17333 | { | |
17334 | ||
17335 | ||
17336 | ||
17337 | ||
17338 | ||
17339 | for ( ; __n > 0; --__n, ++__first) | |
17340 | *__first = __gen(); | |
17341 | return __first; | |
17342 | } | |
17343 | # 1165 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17344 | template<typename _InputIterator, typename _OutputIterator, typename _Tp> | |
17345 | _OutputIterator | |
17346 | remove_copy(_InputIterator __first, _InputIterator __last, | |
17347 | _OutputIterator __result, const _Tp& __value) | |
17348 | { | |
17349 | ||
17350 | ||
17351 | ||
17352 | ||
17353 | ||
17354 | ||
17355 | ; | |
17356 | ||
17357 | for ( ; __first != __last; ++__first) | |
17358 | if (!(*__first == __value)) | |
17359 | { | |
17360 | *__result = *__first; | |
17361 | ++__result; | |
17362 | } | |
17363 | return __result; | |
17364 | } | |
17365 | # 1201 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17366 | template<typename _InputIterator, typename _OutputIterator, | |
17367 | typename _Predicate> | |
17368 | _OutputIterator | |
17369 | remove_copy_if(_InputIterator __first, _InputIterator __last, | |
17370 | _OutputIterator __result, _Predicate __pred) | |
17371 | { | |
17372 | ||
17373 | ||
17374 | ||
17375 | ||
17376 | ||
17377 | ||
17378 | ; | |
17379 | ||
17380 | for ( ; __first != __last; ++__first) | |
17381 | if (!__pred(*__first)) | |
17382 | { | |
17383 | *__result = *__first; | |
17384 | ++__result; | |
17385 | } | |
17386 | return __result; | |
17387 | } | |
17388 | # 1240 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17389 | template<typename _ForwardIterator, typename _Tp> | |
17390 | _ForwardIterator | |
17391 | remove(_ForwardIterator __first, _ForwardIterator __last, | |
17392 | const _Tp& __value) | |
17393 | { | |
17394 | ||
17395 | ||
17396 | ||
17397 | ||
17398 | ||
17399 | ; | |
17400 | ||
17401 | __first = std::find(__first, __last, __value); | |
17402 | _ForwardIterator __i = __first; | |
17403 | return __first == __last ? __first | |
17404 | : std::remove_copy(++__i, __last, | |
17405 | __first, __value); | |
17406 | } | |
17407 | # 1275 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17408 | template<typename _ForwardIterator, typename _Predicate> | |
17409 | _ForwardIterator | |
17410 | remove_if(_ForwardIterator __first, _ForwardIterator __last, | |
17411 | _Predicate __pred) | |
17412 | { | |
17413 | ||
17414 | ||
17415 | ||
17416 | ||
17417 | ||
17418 | ; | |
17419 | ||
17420 | __first = std::find_if(__first, __last, __pred); | |
17421 | _ForwardIterator __i = __first; | |
17422 | return __first == __last ? __first | |
17423 | : std::remove_copy_if(++__i, __last, | |
17424 | __first, __pred); | |
17425 | } | |
17426 | # 1301 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17427 | template<typename _InputIterator, typename _OutputIterator> | |
17428 | _OutputIterator | |
17429 | __unique_copy(_InputIterator __first, _InputIterator __last, | |
17430 | _OutputIterator __result, | |
17431 | output_iterator_tag) | |
17432 | { | |
17433 | ||
17434 | typename iterator_traits<_InputIterator>::value_type __value = *__first; | |
17435 | *__result = __value; | |
17436 | while (++__first != __last) | |
17437 | if (!(__value == *__first)) | |
17438 | { | |
17439 | __value = *__first; | |
17440 | *++__result = __value; | |
17441 | } | |
17442 | return ++__result; | |
17443 | } | |
17444 | # 1326 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17445 | template<typename _InputIterator, typename _ForwardIterator> | |
17446 | _ForwardIterator | |
17447 | __unique_copy(_InputIterator __first, _InputIterator __last, | |
17448 | _ForwardIterator __result, | |
17449 | forward_iterator_tag) | |
17450 | { | |
17451 | ||
17452 | *__result = *__first; | |
17453 | while (++__first != __last) | |
17454 | if (!(*__result == *__first)) | |
17455 | *++__result = *__first; | |
17456 | return ++__result; | |
17457 | } | |
17458 | # 1348 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17459 | template<typename _InputIterator, typename _OutputIterator, | |
17460 | typename _BinaryPredicate> | |
17461 | _OutputIterator | |
17462 | __unique_copy(_InputIterator __first, _InputIterator __last, | |
17463 | _OutputIterator __result, | |
17464 | _BinaryPredicate __binary_pred, | |
17465 | output_iterator_tag) | |
17466 | { | |
17467 | ||
17468 | ||
17469 | ||
17470 | ||
17471 | ||
17472 | typename iterator_traits<_InputIterator>::value_type __value = *__first; | |
17473 | *__result = __value; | |
17474 | while (++__first != __last) | |
17475 | if (!__binary_pred(__value, *__first)) | |
17476 | { | |
17477 | __value = *__first; | |
17478 | *++__result = __value; | |
17479 | } | |
17480 | return ++__result; | |
17481 | } | |
17482 | # 1380 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17483 | template<typename _InputIterator, typename _ForwardIterator, | |
17484 | typename _BinaryPredicate> | |
17485 | _ForwardIterator | |
17486 | __unique_copy(_InputIterator __first, _InputIterator __last, | |
17487 | _ForwardIterator __result, | |
17488 | _BinaryPredicate __binary_pred, | |
17489 | forward_iterator_tag) | |
17490 | { | |
17491 | ||
17492 | ||
17493 | ||
17494 | ||
17495 | ||
17496 | *__result = *__first; | |
17497 | while (++__first != __last) | |
17498 | if (!__binary_pred(*__result, *__first)) *++__result = *__first; | |
17499 | return ++__result; | |
17500 | } | |
17501 | # 1412 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17502 | template<typename _InputIterator, typename _OutputIterator> | |
17503 | inline _OutputIterator | |
17504 | unique_copy(_InputIterator __first, _InputIterator __last, | |
17505 | _OutputIterator __result) | |
17506 | { | |
17507 | ||
17508 | ||
17509 | ||
17510 | ||
17511 | ||
17512 | ||
17513 | ; | |
17514 | ||
17515 | typedef typename iterator_traits<_OutputIterator>::iterator_category | |
17516 | _IterType; | |
17517 | ||
17518 | if (__first == __last) return __result; | |
17519 | return std::__unique_copy(__first, __last, __result, _IterType()); | |
17520 | } | |
17521 | # 1447 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17522 | template<typename _InputIterator, typename _OutputIterator, | |
17523 | typename _BinaryPredicate> | |
17524 | inline _OutputIterator | |
17525 | unique_copy(_InputIterator __first, _InputIterator __last, | |
17526 | _OutputIterator __result, | |
17527 | _BinaryPredicate __binary_pred) | |
17528 | { | |
17529 | ||
17530 | ||
17531 | ||
17532 | ||
17533 | ; | |
17534 | ||
17535 | typedef typename iterator_traits<_OutputIterator>::iterator_category | |
17536 | _IterType; | |
17537 | ||
17538 | if (__first == __last) return __result; | |
17539 | return std::__unique_copy(__first, __last, __result, | |
17540 | __binary_pred, _IterType()); | |
17541 | } | |
17542 | # 1481 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17543 | template<typename _ForwardIterator> | |
17544 | _ForwardIterator | |
17545 | unique(_ForwardIterator __first, _ForwardIterator __last) | |
17546 | { | |
17547 | ||
17548 | ||
17549 | ||
17550 | ||
17551 | ||
17552 | ; | |
17553 | ||
17554 | ||
17555 | __first = std::adjacent_find(__first, __last); | |
17556 | if (__first == __last) | |
17557 | return __last; | |
17558 | ||
17559 | ||
17560 | _ForwardIterator __dest = __first; | |
17561 | ++__first; | |
17562 | while (++__first != __last) | |
17563 | if (!(*__dest == *__first)) | |
17564 | *++__dest = *__first; | |
17565 | return ++__dest; | |
17566 | } | |
17567 | # 1520 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17568 | template<typename _ForwardIterator, typename _BinaryPredicate> | |
17569 | _ForwardIterator | |
17570 | unique(_ForwardIterator __first, _ForwardIterator __last, | |
17571 | _BinaryPredicate __binary_pred) | |
17572 | { | |
17573 | ||
17574 | ||
17575 | ||
17576 | ||
17577 | ||
17578 | ||
17579 | ; | |
17580 | ||
17581 | ||
17582 | __first = std::adjacent_find(__first, __last, __binary_pred); | |
17583 | if (__first == __last) | |
17584 | return __last; | |
17585 | ||
17586 | ||
17587 | _ForwardIterator __dest = __first; | |
17588 | ++__first; | |
17589 | while (++__first != __last) | |
17590 | if (!__binary_pred(*__dest, *__first)) | |
17591 | *++__dest = *__first; | |
17592 | return ++__dest; | |
17593 | } | |
17594 | # 1554 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17595 | template<typename _BidirectionalIterator> | |
17596 | void | |
17597 | __reverse(_BidirectionalIterator __first, _BidirectionalIterator __last, | |
17598 | bidirectional_iterator_tag) | |
17599 | { | |
17600 | while (true) | |
17601 | if (__first == __last || __first == --__last) | |
17602 | return; | |
17603 | else | |
17604 | { | |
17605 | std::iter_swap(__first, __last); | |
17606 | ++__first; | |
17607 | } | |
17608 | } | |
17609 | # 1576 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17610 | template<typename _RandomAccessIterator> | |
17611 | void | |
17612 | __reverse(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
17613 | random_access_iterator_tag) | |
17614 | { | |
17615 | if (__first == __last) | |
17616 | return; | |
17617 | --__last; | |
17618 | while (__first < __last) | |
17619 | { | |
17620 | std::iter_swap(__first, __last); | |
17621 | ++__first; | |
17622 | --__last; | |
17623 | } | |
17624 | } | |
17625 | # 1603 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17626 | template<typename _BidirectionalIterator> | |
17627 | inline void | |
17628 | reverse(_BidirectionalIterator __first, _BidirectionalIterator __last) | |
17629 | { | |
17630 | ||
17631 | ||
17632 | ||
17633 | ; | |
17634 | std::__reverse(__first, __last, std::__iterator_category(__first)); | |
17635 | } | |
17636 | # 1629 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17637 | template<typename _BidirectionalIterator, typename _OutputIterator> | |
17638 | _OutputIterator | |
17639 | reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last, | |
17640 | _OutputIterator __result) | |
17641 | { | |
17642 | ||
17643 | ||
17644 | ||
17645 | ||
17646 | ||
17647 | ; | |
17648 | ||
17649 | while (__first != __last) | |
17650 | { | |
17651 | --__last; | |
17652 | *__result = *__last; | |
17653 | ++__result; | |
17654 | } | |
17655 | return __result; | |
17656 | } | |
17657 | # 1657 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17658 | template<typename _EuclideanRingElement> | |
17659 | _EuclideanRingElement | |
17660 | __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n) | |
17661 | { | |
17662 | while (__n != 0) | |
17663 | { | |
17664 | _EuclideanRingElement __t = __m % __n; | |
17665 | __m = __n; | |
17666 | __n = __t; | |
17667 | } | |
17668 | return __m; | |
17669 | } | |
17670 | ||
17671 | ||
17672 | ||
17673 | ||
17674 | ||
17675 | ||
17676 | template<typename _ForwardIterator> | |
17677 | void | |
17678 | __rotate(_ForwardIterator __first, | |
17679 | _ForwardIterator __middle, | |
17680 | _ForwardIterator __last, | |
17681 | forward_iterator_tag) | |
17682 | { | |
17683 | if (__first == __middle || __last == __middle) | |
17684 | return; | |
17685 | ||
17686 | _ForwardIterator __first2 = __middle; | |
17687 | do | |
17688 | { | |
17689 | swap(*__first, *__first2); | |
17690 | ++__first; | |
17691 | ++__first2; | |
17692 | if (__first == __middle) | |
17693 | __middle = __first2; | |
17694 | } | |
17695 | while (__first2 != __last); | |
17696 | ||
17697 | __first2 = __middle; | |
17698 | ||
17699 | while (__first2 != __last) | |
17700 | { | |
17701 | swap(*__first, *__first2); | |
17702 | ++__first; | |
17703 | ++__first2; | |
17704 | if (__first == __middle) | |
17705 | __middle = __first2; | |
17706 | else if (__first2 == __last) | |
17707 | __first2 = __middle; | |
17708 | } | |
17709 | } | |
17710 | ||
17711 | ||
17712 | ||
17713 | ||
17714 | ||
17715 | ||
17716 | template<typename _BidirectionalIterator> | |
17717 | void | |
17718 | __rotate(_BidirectionalIterator __first, | |
17719 | _BidirectionalIterator __middle, | |
17720 | _BidirectionalIterator __last, | |
17721 | bidirectional_iterator_tag) | |
17722 | { | |
17723 | ||
17724 | ||
17725 | ||
17726 | ||
17727 | if (__first == __middle || __last == __middle) | |
17728 | return; | |
17729 | ||
17730 | std::__reverse(__first, __middle, bidirectional_iterator_tag()); | |
17731 | std::__reverse(__middle, __last, bidirectional_iterator_tag()); | |
17732 | ||
17733 | while (__first != __middle && __middle != __last) | |
17734 | { | |
17735 | swap(*__first, *--__last); | |
17736 | ++__first; | |
17737 | } | |
17738 | ||
17739 | if (__first == __middle) | |
17740 | std::__reverse(__middle, __last, bidirectional_iterator_tag()); | |
17741 | else | |
17742 | std::__reverse(__first, __middle, bidirectional_iterator_tag()); | |
17743 | } | |
17744 | ||
17745 | ||
17746 | ||
17747 | ||
17748 | ||
17749 | ||
17750 | template<typename _RandomAccessIterator> | |
17751 | void | |
17752 | __rotate(_RandomAccessIterator __first, | |
17753 | _RandomAccessIterator __middle, | |
17754 | _RandomAccessIterator __last, | |
17755 | random_access_iterator_tag) | |
17756 | { | |
17757 | ||
17758 | ||
17759 | ||
17760 | ||
17761 | if (__first == __middle || __last == __middle) | |
17762 | return; | |
17763 | ||
17764 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
17765 | _Distance; | |
17766 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
17767 | _ValueType; | |
17768 | ||
17769 | const _Distance __n = __last - __first; | |
17770 | const _Distance __k = __middle - __first; | |
17771 | const _Distance __l = __n - __k; | |
17772 | ||
17773 | if (__k == __l) | |
17774 | { | |
17775 | std::swap_ranges(__first, __middle, __middle); | |
17776 | return; | |
17777 | } | |
17778 | ||
17779 | const _Distance __d = __gcd(__n, __k); | |
17780 | ||
17781 | for (_Distance __i = 0; __i < __d; __i++) | |
17782 | { | |
17783 | _ValueType __tmp = *__first; | |
17784 | _RandomAccessIterator __p = __first; | |
17785 | ||
17786 | if (__k < __l) | |
17787 | { | |
17788 | for (_Distance __j = 0; __j < __l / __d; __j++) | |
17789 | { | |
17790 | if (__p > __first + __l) | |
17791 | { | |
17792 | *__p = *(__p - __l); | |
17793 | __p -= __l; | |
17794 | } | |
17795 | ||
17796 | *__p = *(__p + __k); | |
17797 | __p += __k; | |
17798 | } | |
17799 | } | |
17800 | else | |
17801 | { | |
17802 | for (_Distance __j = 0; __j < __k / __d - 1; __j ++) | |
17803 | { | |
17804 | if (__p < __last - __k) | |
17805 | { | |
17806 | *__p = *(__p + __k); | |
17807 | __p += __k; | |
17808 | } | |
17809 | *__p = * (__p - __l); | |
17810 | __p -= __l; | |
17811 | } | |
17812 | } | |
17813 | ||
17814 | *__p = __tmp; | |
17815 | ++__first; | |
17816 | } | |
17817 | } | |
17818 | # 1836 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17819 | template<typename _ForwardIterator> | |
17820 | inline void | |
17821 | rotate(_ForwardIterator __first, _ForwardIterator __middle, | |
17822 | _ForwardIterator __last) | |
17823 | { | |
17824 | ||
17825 | ||
17826 | ||
17827 | ; | |
17828 | ; | |
17829 | ||
17830 | typedef typename iterator_traits<_ForwardIterator>::iterator_category | |
17831 | _IterType; | |
17832 | std::__rotate(__first, __middle, __last, _IterType()); | |
17833 | } | |
17834 | # 1869 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17835 | template<typename _ForwardIterator, typename _OutputIterator> | |
17836 | _OutputIterator | |
17837 | rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, | |
17838 | _ForwardIterator __last, _OutputIterator __result) | |
17839 | { | |
17840 | ||
17841 | ||
17842 | ||
17843 | ||
17844 | ; | |
17845 | ; | |
17846 | ||
17847 | return std::copy(__first, __middle, | |
17848 | std::copy(__middle, __last, __result)); | |
17849 | } | |
17850 | # 1895 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17851 | template<typename _RandomAccessIterator> | |
17852 | inline void | |
17853 | random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last) | |
17854 | { | |
17855 | ||
17856 | ||
17857 | ||
17858 | ; | |
17859 | ||
17860 | if (__first != __last) | |
17861 | for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) | |
17862 | std::iter_swap(__i, __first + (std::rand() % ((__i - __first) + 1))); | |
17863 | } | |
17864 | # 1922 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17865 | template<typename _RandomAccessIterator, typename _RandomNumberGenerator> | |
17866 | void | |
17867 | random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
17868 | _RandomNumberGenerator& __rand) | |
17869 | { | |
17870 | ||
17871 | ||
17872 | ||
17873 | ; | |
17874 | ||
17875 | if (__first == __last) | |
17876 | return; | |
17877 | for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) | |
17878 | std::iter_swap(__i, __first + __rand((__i - __first) + 1)); | |
17879 | } | |
17880 | ||
17881 | ||
17882 | ||
17883 | ||
17884 | ||
17885 | ||
17886 | ||
17887 | template<typename _ForwardIterator, typename _Predicate> | |
17888 | _ForwardIterator | |
17889 | __partition(_ForwardIterator __first, _ForwardIterator __last, | |
17890 | _Predicate __pred, | |
17891 | forward_iterator_tag) | |
17892 | { | |
17893 | if (__first == __last) | |
17894 | return __first; | |
17895 | ||
17896 | while (__pred(*__first)) | |
17897 | if (++__first == __last) | |
17898 | return __first; | |
17899 | ||
17900 | _ForwardIterator __next = __first; | |
17901 | ||
17902 | while (++__next != __last) | |
17903 | if (__pred(*__next)) | |
17904 | { | |
17905 | swap(*__first, *__next); | |
17906 | ++__first; | |
17907 | } | |
17908 | ||
17909 | return __first; | |
17910 | } | |
17911 | ||
17912 | ||
17913 | ||
17914 | ||
17915 | ||
17916 | ||
17917 | template<typename _BidirectionalIterator, typename _Predicate> | |
17918 | _BidirectionalIterator | |
17919 | __partition(_BidirectionalIterator __first, _BidirectionalIterator __last, | |
17920 | _Predicate __pred, | |
17921 | bidirectional_iterator_tag) | |
17922 | { | |
17923 | while (true) | |
17924 | { | |
17925 | while (true) | |
17926 | if (__first == __last) | |
17927 | return __first; | |
17928 | else if (__pred(*__first)) | |
17929 | ++__first; | |
17930 | else | |
17931 | break; | |
17932 | --__last; | |
17933 | while (true) | |
17934 | if (__first == __last) | |
17935 | return __first; | |
17936 | else if (!__pred(*__last)) | |
17937 | --__last; | |
17938 | else | |
17939 | break; | |
17940 | std::iter_swap(__first, __last); | |
17941 | ++__first; | |
17942 | } | |
17943 | } | |
17944 | # 2016 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
17945 | template<typename _ForwardIterator, typename _Predicate> | |
17946 | inline _ForwardIterator | |
17947 | partition(_ForwardIterator __first, _ForwardIterator __last, | |
17948 | _Predicate __pred) | |
17949 | { | |
17950 | ||
17951 | ||
17952 | ||
17953 | ||
17954 | ||
17955 | ; | |
17956 | ||
17957 | return std::__partition(__first, __last, __pred, | |
17958 | std::__iterator_category(__first)); | |
17959 | } | |
17960 | ||
17961 | ||
17962 | ||
17963 | ||
17964 | ||
17965 | ||
17966 | ||
17967 | template<typename _ForwardIterator, typename _Predicate, typename _Distance> | |
17968 | _ForwardIterator | |
17969 | __inplace_stable_partition(_ForwardIterator __first, | |
17970 | _ForwardIterator __last, | |
17971 | _Predicate __pred, _Distance __len) | |
17972 | { | |
17973 | if (__len == 1) | |
17974 | return __pred(*__first) ? __last : __first; | |
17975 | _ForwardIterator __middle = __first; | |
17976 | std::advance(__middle, __len / 2); | |
17977 | _ForwardIterator __begin = std::__inplace_stable_partition(__first, | |
17978 | __middle, | |
17979 | __pred, | |
17980 | __len / 2); | |
17981 | _ForwardIterator __end = std::__inplace_stable_partition(__middle, __last, | |
17982 | __pred, | |
17983 | __len | |
17984 | - __len / 2); | |
17985 | std::rotate(__begin, __middle, __end); | |
17986 | std::advance(__begin, std::distance(__middle, __end)); | |
17987 | return __begin; | |
17988 | } | |
17989 | ||
17990 | ||
17991 | ||
17992 | ||
17993 | ||
17994 | ||
17995 | template<typename _ForwardIterator, typename _Pointer, typename _Predicate, | |
17996 | typename _Distance> | |
17997 | _ForwardIterator | |
17998 | __stable_partition_adaptive(_ForwardIterator __first, | |
17999 | _ForwardIterator __last, | |
18000 | _Predicate __pred, _Distance __len, | |
18001 | _Pointer __buffer, | |
18002 | _Distance __buffer_size) | |
18003 | { | |
18004 | if (__len <= __buffer_size) | |
18005 | { | |
18006 | _ForwardIterator __result1 = __first; | |
18007 | _Pointer __result2 = __buffer; | |
18008 | for ( ; __first != __last ; ++__first) | |
18009 | if (__pred(*__first)) | |
18010 | { | |
18011 | *__result1 = *__first; | |
18012 | ++__result1; | |
18013 | } | |
18014 | else | |
18015 | { | |
18016 | *__result2 = *__first; | |
18017 | ++__result2; | |
18018 | } | |
18019 | std::copy(__buffer, __result2, __result1); | |
18020 | return __result1; | |
18021 | } | |
18022 | else | |
18023 | { | |
18024 | _ForwardIterator __middle = __first; | |
18025 | std::advance(__middle, __len / 2); | |
18026 | _ForwardIterator __begin = | |
18027 | std::__stable_partition_adaptive(__first, __middle, __pred, | |
18028 | __len / 2, __buffer, | |
18029 | __buffer_size); | |
18030 | _ForwardIterator __end = | |
18031 | std::__stable_partition_adaptive(__middle, __last, __pred, | |
18032 | __len - __len / 2, | |
18033 | __buffer, __buffer_size); | |
18034 | std::rotate(__begin, __middle, __end); | |
18035 | std::advance(__begin, std::distance(__middle, __end)); | |
18036 | return __begin; | |
18037 | } | |
18038 | } | |
18039 | # 2127 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
18040 | template<typename _ForwardIterator, typename _Predicate> | |
18041 | _ForwardIterator | |
18042 | stable_partition(_ForwardIterator __first, _ForwardIterator __last, | |
18043 | _Predicate __pred) | |
18044 | { | |
18045 | ||
18046 | ||
18047 | ||
18048 | ||
18049 | ||
18050 | ; | |
18051 | ||
18052 | if (__first == __last) | |
18053 | return __first; | |
18054 | else | |
18055 | { | |
18056 | typedef typename iterator_traits<_ForwardIterator>::value_type | |
18057 | _ValueType; | |
18058 | typedef typename iterator_traits<_ForwardIterator>::difference_type | |
18059 | _DistanceType; | |
18060 | ||
18061 | _Temporary_buffer<_ForwardIterator, _ValueType> __buf(__first, | |
18062 | __last); | |
18063 | if (__buf.size() > 0) | |
18064 | return | |
18065 | std::__stable_partition_adaptive(__first, __last, __pred, | |
18066 | _DistanceType(__buf.requested_size()), | |
18067 | __buf.begin(), __buf.size()); | |
18068 | else | |
18069 | return | |
18070 | std::__inplace_stable_partition(__first, __last, __pred, | |
18071 | _DistanceType(__buf.requested_size())); | |
18072 | } | |
18073 | } | |
18074 | ||
18075 | ||
18076 | ||
18077 | ||
18078 | ||
18079 | ||
18080 | template<typename _RandomAccessIterator, typename _Tp> | |
18081 | _RandomAccessIterator | |
18082 | __unguarded_partition(_RandomAccessIterator __first, | |
18083 | _RandomAccessIterator __last, _Tp __pivot) | |
18084 | { | |
18085 | while (true) | |
18086 | { | |
18087 | while (*__first < __pivot) | |
18088 | ++__first; | |
18089 | --__last; | |
18090 | while (__pivot < *__last) | |
18091 | --__last; | |
18092 | if (!(__first < __last)) | |
18093 | return __first; | |
18094 | std::iter_swap(__first, __last); | |
18095 | ++__first; | |
18096 | } | |
18097 | } | |
18098 | ||
18099 | ||
18100 | ||
18101 | ||
18102 | ||
18103 | ||
18104 | template<typename _RandomAccessIterator, typename _Tp, typename _Compare> | |
18105 | _RandomAccessIterator | |
18106 | __unguarded_partition(_RandomAccessIterator __first, | |
18107 | _RandomAccessIterator __last, | |
18108 | _Tp __pivot, _Compare __comp) | |
18109 | { | |
18110 | while (true) | |
18111 | { | |
18112 | while (__comp(*__first, __pivot)) | |
18113 | ++__first; | |
18114 | --__last; | |
18115 | while (__comp(__pivot, *__last)) | |
18116 | --__last; | |
18117 | if (!(__first < __last)) | |
18118 | return __first; | |
18119 | std::iter_swap(__first, __last); | |
18120 | ++__first; | |
18121 | } | |
18122 | } | |
18123 | ||
18124 | ||
18125 | ||
18126 | ||
18127 | ||
18128 | ||
18129 | ||
18130 | enum { _S_threshold = 16 }; | |
18131 | ||
18132 | ||
18133 | ||
18134 | ||
18135 | ||
18136 | ||
18137 | template<typename _RandomAccessIterator, typename _Tp> | |
18138 | void | |
18139 | __unguarded_linear_insert(_RandomAccessIterator __last, _Tp __val) | |
18140 | { | |
18141 | _RandomAccessIterator __next = __last; | |
18142 | --__next; | |
18143 | while (__val < *__next) | |
18144 | { | |
18145 | *__last = *__next; | |
18146 | __last = __next; | |
18147 | --__next; | |
18148 | } | |
18149 | *__last = __val; | |
18150 | } | |
18151 | ||
18152 | ||
18153 | ||
18154 | ||
18155 | ||
18156 | ||
18157 | template<typename _RandomAccessIterator, typename _Tp, typename _Compare> | |
18158 | void | |
18159 | __unguarded_linear_insert(_RandomAccessIterator __last, _Tp __val, | |
18160 | _Compare __comp) | |
18161 | { | |
18162 | _RandomAccessIterator __next = __last; | |
18163 | --__next; | |
18164 | while (__comp(__val, *__next)) | |
18165 | { | |
18166 | *__last = *__next; | |
18167 | __last = __next; | |
18168 | --__next; | |
18169 | } | |
18170 | *__last = __val; | |
18171 | } | |
18172 | ||
18173 | ||
18174 | ||
18175 | ||
18176 | ||
18177 | ||
18178 | template<typename _RandomAccessIterator> | |
18179 | void | |
18180 | __insertion_sort(_RandomAccessIterator __first, | |
18181 | _RandomAccessIterator __last) | |
18182 | { | |
18183 | if (__first == __last) | |
18184 | return; | |
18185 | ||
18186 | for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) | |
18187 | { | |
18188 | typename iterator_traits<_RandomAccessIterator>::value_type | |
18189 | __val = *__i; | |
18190 | if (__val < *__first) | |
18191 | { | |
18192 | std::copy_backward(__first, __i, __i + 1); | |
18193 | *__first = __val; | |
18194 | } | |
18195 | else | |
18196 | std::__unguarded_linear_insert(__i, __val); | |
18197 | } | |
18198 | } | |
18199 | ||
18200 | ||
18201 | ||
18202 | ||
18203 | ||
18204 | ||
18205 | template<typename _RandomAccessIterator, typename _Compare> | |
18206 | void | |
18207 | __insertion_sort(_RandomAccessIterator __first, | |
18208 | _RandomAccessIterator __last, _Compare __comp) | |
18209 | { | |
18210 | if (__first == __last) return; | |
18211 | ||
18212 | for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) | |
18213 | { | |
18214 | typename iterator_traits<_RandomAccessIterator>::value_type | |
18215 | __val = *__i; | |
18216 | if (__comp(__val, *__first)) | |
18217 | { | |
18218 | std::copy_backward(__first, __i, __i + 1); | |
18219 | *__first = __val; | |
18220 | } | |
18221 | else | |
18222 | std::__unguarded_linear_insert(__i, __val, __comp); | |
18223 | } | |
18224 | } | |
18225 | ||
18226 | ||
18227 | ||
18228 | ||
18229 | ||
18230 | ||
18231 | template<typename _RandomAccessIterator> | |
18232 | inline void | |
18233 | __unguarded_insertion_sort(_RandomAccessIterator __first, | |
18234 | _RandomAccessIterator __last) | |
18235 | { | |
18236 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
18237 | _ValueType; | |
18238 | ||
18239 | for (_RandomAccessIterator __i = __first; __i != __last; ++__i) | |
18240 | std::__unguarded_linear_insert(__i, _ValueType(*__i)); | |
18241 | } | |
18242 | ||
18243 | ||
18244 | ||
18245 | ||
18246 | ||
18247 | ||
18248 | template<typename _RandomAccessIterator, typename _Compare> | |
18249 | inline void | |
18250 | __unguarded_insertion_sort(_RandomAccessIterator __first, | |
18251 | _RandomAccessIterator __last, _Compare __comp) | |
18252 | { | |
18253 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
18254 | _ValueType; | |
18255 | ||
18256 | for (_RandomAccessIterator __i = __first; __i != __last; ++__i) | |
18257 | std::__unguarded_linear_insert(__i, _ValueType(*__i), __comp); | |
18258 | } | |
18259 | ||
18260 | ||
18261 | ||
18262 | ||
18263 | ||
18264 | ||
18265 | template<typename _RandomAccessIterator> | |
18266 | void | |
18267 | __final_insertion_sort(_RandomAccessIterator __first, | |
18268 | _RandomAccessIterator __last) | |
18269 | { | |
18270 | if (__last - __first > int(_S_threshold)) | |
18271 | { | |
18272 | std::__insertion_sort(__first, __first + int(_S_threshold)); | |
18273 | std::__unguarded_insertion_sort(__first + int(_S_threshold), __last); | |
18274 | } | |
18275 | else | |
18276 | std::__insertion_sort(__first, __last); | |
18277 | } | |
18278 | ||
18279 | ||
18280 | ||
18281 | ||
18282 | ||
18283 | ||
18284 | template<typename _RandomAccessIterator, typename _Compare> | |
18285 | void | |
18286 | __final_insertion_sort(_RandomAccessIterator __first, | |
18287 | _RandomAccessIterator __last, _Compare __comp) | |
18288 | { | |
18289 | if (__last - __first > int(_S_threshold)) | |
18290 | { | |
18291 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp); | |
18292 | std::__unguarded_insertion_sort(__first + int(_S_threshold), __last, | |
18293 | __comp); | |
18294 | } | |
18295 | else | |
18296 | std::__insertion_sort(__first, __last, __comp); | |
18297 | } | |
18298 | ||
18299 | ||
18300 | ||
18301 | ||
18302 | ||
18303 | ||
18304 | template<typename _Size> | |
18305 | inline _Size | |
18306 | __lg(_Size __n) | |
18307 | { | |
18308 | _Size __k; | |
18309 | for (__k = 0; __n != 1; __n >>= 1) | |
18310 | ++__k; | |
18311 | return __k; | |
18312 | } | |
18313 | # 2416 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
18314 | template<typename _RandomAccessIterator> | |
18315 | void | |
18316 | partial_sort(_RandomAccessIterator __first, | |
18317 | _RandomAccessIterator __middle, | |
18318 | _RandomAccessIterator __last) | |
18319 | { | |
18320 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
18321 | _ValueType; | |
18322 | ||
18323 | ||
18324 | ||
18325 | ||
18326 | ||
18327 | ; | |
18328 | ; | |
18329 | ||
18330 | std::make_heap(__first, __middle); | |
18331 | for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) | |
18332 | if (*__i < *__first) | |
18333 | std::__pop_heap(__first, __middle, __i, _ValueType(*__i)); | |
18334 | std::sort_heap(__first, __middle); | |
18335 | } | |
18336 | # 2457 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
18337 | template<typename _RandomAccessIterator, typename _Compare> | |
18338 | void | |
18339 | partial_sort(_RandomAccessIterator __first, | |
18340 | _RandomAccessIterator __middle, | |
18341 | _RandomAccessIterator __last, | |
18342 | _Compare __comp) | |
18343 | { | |
18344 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
18345 | _ValueType; | |
18346 | ||
18347 | ||
18348 | ||
18349 | ||
18350 | ||
18351 | ||
18352 | ; | |
18353 | ; | |
18354 | ||
18355 | std::make_heap(__first, __middle, __comp); | |
18356 | for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) | |
18357 | if (__comp(*__i, *__first)) | |
18358 | std::__pop_heap(__first, __middle, __i, _ValueType(*__i), __comp); | |
18359 | std::sort_heap(__first, __middle, __comp); | |
18360 | } | |
18361 | # 2499 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
18362 | template<typename _InputIterator, typename _RandomAccessIterator> | |
18363 | _RandomAccessIterator | |
18364 | partial_sort_copy(_InputIterator __first, _InputIterator __last, | |
18365 | _RandomAccessIterator __result_first, | |
18366 | _RandomAccessIterator __result_last) | |
18367 | { | |
18368 | typedef typename iterator_traits<_InputIterator>::value_type | |
18369 | _InputValueType; | |
18370 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
18371 | _OutputValueType; | |
18372 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
18373 | _DistanceType; | |
18374 | ||
18375 | ||
18376 | ||
18377 | ||
18378 | ||
18379 | ||
18380 | ||
18381 | ; | |
18382 | ; | |
18383 | ||
18384 | if (__result_first == __result_last) | |
18385 | return __result_last; | |
18386 | _RandomAccessIterator __result_real_last = __result_first; | |
18387 | while(__first != __last && __result_real_last != __result_last) | |
18388 | { | |
18389 | *__result_real_last = *__first; | |
18390 | ++__result_real_last; | |
18391 | ++__first; | |
18392 | } | |
18393 | std::make_heap(__result_first, __result_real_last); | |
18394 | while (__first != __last) | |
18395 | { | |
18396 | if (*__first < *__result_first) | |
18397 | std::__adjust_heap(__result_first, _DistanceType(0), | |
18398 | _DistanceType(__result_real_last | |
18399 | - __result_first), | |
18400 | _InputValueType(*__first)); | |
18401 | ++__first; | |
18402 | } | |
18403 | std::sort_heap(__result_first, __result_real_last); | |
18404 | return __result_real_last; | |
18405 | } | |
18406 | # 2563 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
18407 | template<typename _InputIterator, typename _RandomAccessIterator, typename _Compare> | |
18408 | _RandomAccessIterator | |
18409 | partial_sort_copy(_InputIterator __first, _InputIterator __last, | |
18410 | _RandomAccessIterator __result_first, | |
18411 | _RandomAccessIterator __result_last, | |
18412 | _Compare __comp) | |
18413 | { | |
18414 | typedef typename iterator_traits<_InputIterator>::value_type | |
18415 | _InputValueType; | |
18416 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
18417 | _OutputValueType; | |
18418 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
18419 | _DistanceType; | |
18420 | ||
18421 | ||
18422 | ||
18423 | ||
18424 | ||
18425 | ||
18426 | ||
18427 | ||
18428 | ||
18429 | ; | |
18430 | ; | |
18431 | ||
18432 | if (__result_first == __result_last) | |
18433 | return __result_last; | |
18434 | _RandomAccessIterator __result_real_last = __result_first; | |
18435 | while(__first != __last && __result_real_last != __result_last) | |
18436 | { | |
18437 | *__result_real_last = *__first; | |
18438 | ++__result_real_last; | |
18439 | ++__first; | |
18440 | } | |
18441 | std::make_heap(__result_first, __result_real_last, __comp); | |
18442 | while (__first != __last) | |
18443 | { | |
18444 | if (__comp(*__first, *__result_first)) | |
18445 | std::__adjust_heap(__result_first, _DistanceType(0), | |
18446 | _DistanceType(__result_real_last | |
18447 | - __result_first), | |
18448 | _InputValueType(*__first), | |
18449 | __comp); | |
18450 | ++__first; | |
18451 | } | |
18452 | std::sort_heap(__result_first, __result_real_last, __comp); | |
18453 | return __result_real_last; | |
18454 | } | |
18455 | ||
18456 | ||
18457 | ||
18458 | ||
18459 | ||
18460 | ||
18461 | template<typename _RandomAccessIterator, typename _Size> | |
18462 | void | |
18463 | __introsort_loop(_RandomAccessIterator __first, | |
18464 | _RandomAccessIterator __last, | |
18465 | _Size __depth_limit) | |
18466 | { | |
18467 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
18468 | _ValueType; | |
18469 | ||
18470 | while (__last - __first > int(_S_threshold)) | |
18471 | { | |
18472 | if (__depth_limit == 0) | |
18473 | { | |
18474 | std::partial_sort(__first, __last, __last); | |
18475 | return; | |
18476 | } | |
18477 | --__depth_limit; | |
18478 | _RandomAccessIterator __cut = | |
18479 | std::__unguarded_partition(__first, __last, | |
18480 | _ValueType(std::__median(*__first, | |
18481 | *(__first | |
18482 | + (__last | |
18483 | - __first) | |
18484 | / 2), | |
18485 | *(__last | |
18486 | - 1)))); | |
18487 | std::__introsort_loop(__cut, __last, __depth_limit); | |
18488 | __last = __cut; | |
18489 | } | |
18490 | } | |
18491 | ||
18492 | ||
18493 | ||
18494 | ||
18495 | ||
18496 | ||
18497 | template<typename _RandomAccessIterator, typename _Size, typename _Compare> | |
18498 | void | |
18499 | __introsort_loop(_RandomAccessIterator __first, | |
18500 | _RandomAccessIterator __last, | |
18501 | _Size __depth_limit, _Compare __comp) | |
18502 | { | |
18503 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
18504 | _ValueType; | |
18505 | ||
18506 | while (__last - __first > int(_S_threshold)) | |
18507 | { | |
18508 | if (__depth_limit == 0) | |
18509 | { | |
18510 | std::partial_sort(__first, __last, __last, __comp); | |
18511 | return; | |
18512 | } | |
18513 | --__depth_limit; | |
18514 | _RandomAccessIterator __cut = | |
18515 | std::__unguarded_partition(__first, __last, | |
18516 | _ValueType(std::__median(*__first, | |
18517 | *(__first | |
18518 | + (__last | |
18519 | - __first) | |
18520 | / 2), | |
18521 | *(__last - 1), | |
18522 | __comp)), | |
18523 | __comp); | |
18524 | std::__introsort_loop(__cut, __last, __depth_limit, __comp); | |
18525 | __last = __cut; | |
18526 | } | |
18527 | } | |
18528 | # 2698 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
18529 | template<typename _RandomAccessIterator> | |
18530 | inline void | |
18531 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last) | |
18532 | { | |
18533 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
18534 | _ValueType; | |
18535 | ||
18536 | ||
18537 | ||
18538 | ||
18539 | ||
18540 | ; | |
18541 | ||
18542 | if (__first != __last) | |
18543 | { | |
18544 | std::__introsort_loop(__first, __last, __lg(__last - __first) * 2); | |
18545 | std::__final_insertion_sort(__first, __last); | |
18546 | } | |
18547 | } | |
18548 | # 2732 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
18549 | template<typename _RandomAccessIterator, typename _Compare> | |
18550 | inline void | |
18551 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
18552 | _Compare __comp) | |
18553 | { | |
18554 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
18555 | _ValueType; | |
18556 | ||
18557 | ||
18558 | ||
18559 | ||
18560 | ||
18561 | ||
18562 | ; | |
18563 | ||
18564 | if (__first != __last) | |
18565 | { | |
18566 | std::__introsort_loop(__first, __last, __lg(__last - __first) * 2, | |
18567 | __comp); | |
18568 | std::__final_insertion_sort(__first, __last, __comp); | |
18569 | } | |
18570 | } | |
18571 | # 2765 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
18572 | template<typename _ForwardIterator, typename _Tp> | |
18573 | _ForwardIterator | |
18574 | lower_bound(_ForwardIterator __first, _ForwardIterator __last, | |
18575 | const _Tp& __val) | |
18576 | { | |
18577 | typedef typename iterator_traits<_ForwardIterator>::value_type | |
18578 | _ValueType; | |
18579 | typedef typename iterator_traits<_ForwardIterator>::difference_type | |
18580 | _DistanceType; | |
18581 | ||
18582 | ||
18583 | ||
18584 | ||
18585 | ||
18586 | ||
18587 | ||
18588 | ||
18589 | ||
18590 | ; | |
18591 | ||
18592 | _DistanceType __len = std::distance(__first, __last); | |
18593 | _DistanceType __half; | |
18594 | _ForwardIterator __middle; | |
18595 | ||
18596 | while (__len > 0) | |
18597 | { | |
18598 | __half = __len >> 1; | |
18599 | __middle = __first; | |
18600 | std::advance(__middle, __half); | |
18601 | if (*__middle < __val) | |
18602 | { | |
18603 | __first = __middle; | |
18604 | ++__first; | |
18605 | __len = __len - __half - 1; | |
18606 | } | |
18607 | else | |
18608 | __len = __half; | |
18609 | } | |
18610 | return __first; | |
18611 | } | |
18612 | # 2820 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
18613 | template<typename _ForwardIterator, typename _Tp, typename _Compare> | |
18614 | _ForwardIterator | |
18615 | lower_bound(_ForwardIterator __first, _ForwardIterator __last, | |
18616 | const _Tp& __val, _Compare __comp) | |
18617 | { | |
18618 | typedef typename iterator_traits<_ForwardIterator>::value_type | |
18619 | _ValueType; | |
18620 | typedef typename iterator_traits<_ForwardIterator>::difference_type | |
18621 | _DistanceType; | |
18622 | ||
18623 | ||
18624 | ||
18625 | ||
18626 | ||
18627 | ; | |
18628 | ||
18629 | _DistanceType __len = std::distance(__first, __last); | |
18630 | _DistanceType __half; | |
18631 | _ForwardIterator __middle; | |
18632 | ||
18633 | while (__len > 0) | |
18634 | { | |
18635 | __half = __len >> 1; | |
18636 | __middle = __first; | |
18637 | std::advance(__middle, __half); | |
18638 | if (__comp(*__middle, __val)) | |
18639 | { | |
18640 | __first = __middle; | |
18641 | ++__first; | |
18642 | __len = __len - __half - 1; | |
18643 | } | |
18644 | else | |
18645 | __len = __half; | |
18646 | } | |
18647 | return __first; | |
18648 | } | |
18649 | # 2867 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
18650 | template<typename _ForwardIterator, typename _Tp> | |
18651 | _ForwardIterator | |
18652 | upper_bound(_ForwardIterator __first, _ForwardIterator __last, | |
18653 | const _Tp& __val) | |
18654 | { | |
18655 | typedef typename iterator_traits<_ForwardIterator>::value_type | |
18656 | _ValueType; | |
18657 | typedef typename iterator_traits<_ForwardIterator>::difference_type | |
18658 | _DistanceType; | |
18659 | ||
18660 | ||
18661 | ||
18662 | ||
18663 | ||
18664 | ||
18665 | ; | |
18666 | ||
18667 | _DistanceType __len = std::distance(__first, __last); | |
18668 | _DistanceType __half; | |
18669 | _ForwardIterator __middle; | |
18670 | ||
18671 | while (__len > 0) | |
18672 | { | |
18673 | __half = __len >> 1; | |
18674 | __middle = __first; | |
18675 | std::advance(__middle, __half); | |
18676 | if (__val < *__middle) | |
18677 | __len = __half; | |
18678 | else | |
18679 | { | |
18680 | __first = __middle; | |
18681 | ++__first; | |
18682 | __len = __len - __half - 1; | |
18683 | } | |
18684 | } | |
18685 | return __first; | |
18686 | } | |
18687 | # 2919 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
18688 | template<typename _ForwardIterator, typename _Tp, typename _Compare> | |
18689 | _ForwardIterator | |
18690 | upper_bound(_ForwardIterator __first, _ForwardIterator __last, | |
18691 | const _Tp& __val, _Compare __comp) | |
18692 | { | |
18693 | typedef typename iterator_traits<_ForwardIterator>::value_type | |
18694 | _ValueType; | |
18695 | typedef typename iterator_traits<_ForwardIterator>::difference_type | |
18696 | _DistanceType; | |
18697 | ||
18698 | ||
18699 | ||
18700 | ||
18701 | ||
18702 | ; | |
18703 | ||
18704 | _DistanceType __len = std::distance(__first, __last); | |
18705 | _DistanceType __half; | |
18706 | _ForwardIterator __middle; | |
18707 | ||
18708 | while (__len > 0) | |
18709 | { | |
18710 | __half = __len >> 1; | |
18711 | __middle = __first; | |
18712 | std::advance(__middle, __half); | |
18713 | if (__comp(__val, *__middle)) | |
18714 | __len = __half; | |
18715 | else | |
18716 | { | |
18717 | __first = __middle; | |
18718 | ++__first; | |
18719 | __len = __len - __half - 1; | |
18720 | } | |
18721 | } | |
18722 | return __first; | |
18723 | } | |
18724 | ||
18725 | ||
18726 | ||
18727 | ||
18728 | ||
18729 | ||
18730 | template<typename _BidirectionalIterator, typename _Distance> | |
18731 | void | |
18732 | __merge_without_buffer(_BidirectionalIterator __first, | |
18733 | _BidirectionalIterator __middle, | |
18734 | _BidirectionalIterator __last, | |
18735 | _Distance __len1, _Distance __len2) | |
18736 | { | |
18737 | if (__len1 == 0 || __len2 == 0) | |
18738 | return; | |
18739 | if (__len1 + __len2 == 2) | |
18740 | { | |
18741 | if (*__middle < *__first) | |
18742 | std::iter_swap(__first, __middle); | |
18743 | return; | |
18744 | } | |
18745 | _BidirectionalIterator __first_cut = __first; | |
18746 | _BidirectionalIterator __second_cut = __middle; | |
18747 | _Distance __len11 = 0; | |
18748 | _Distance __len22 = 0; | |
18749 | if (__len1 > __len2) | |
18750 | { | |
18751 | __len11 = __len1 / 2; | |
18752 | std::advance(__first_cut, __len11); | |
18753 | __second_cut = std::lower_bound(__middle, __last, *__first_cut); | |
18754 | __len22 = std::distance(__middle, __second_cut); | |
18755 | } | |
18756 | else | |
18757 | { | |
18758 | __len22 = __len2 / 2; | |
18759 | std::advance(__second_cut, __len22); | |
18760 | __first_cut = std::upper_bound(__first, __middle, *__second_cut); | |
18761 | __len11 = std::distance(__first, __first_cut); | |
18762 | } | |
18763 | std::rotate(__first_cut, __middle, __second_cut); | |
18764 | _BidirectionalIterator __new_middle = __first_cut; | |
18765 | std::advance(__new_middle, std::distance(__middle, __second_cut)); | |
18766 | std::__merge_without_buffer(__first, __first_cut, __new_middle, | |
18767 | __len11, __len22); | |
18768 | std::__merge_without_buffer(__new_middle, __second_cut, __last, | |
18769 | __len1 - __len11, __len2 - __len22); | |
18770 | } | |
18771 | ||
18772 | ||
18773 | ||
18774 | ||
18775 | ||
18776 | ||
18777 | template<typename _BidirectionalIterator, typename _Distance, | |
18778 | typename _Compare> | |
18779 | void | |
18780 | __merge_without_buffer(_BidirectionalIterator __first, | |
18781 | _BidirectionalIterator __middle, | |
18782 | _BidirectionalIterator __last, | |
18783 | _Distance __len1, _Distance __len2, | |
18784 | _Compare __comp) | |
18785 | { | |
18786 | if (__len1 == 0 || __len2 == 0) | |
18787 | return; | |
18788 | if (__len1 + __len2 == 2) | |
18789 | { | |
18790 | if (__comp(*__middle, *__first)) | |
18791 | std::iter_swap(__first, __middle); | |
18792 | return; | |
18793 | } | |
18794 | _BidirectionalIterator __first_cut = __first; | |
18795 | _BidirectionalIterator __second_cut = __middle; | |
18796 | _Distance __len11 = 0; | |
18797 | _Distance __len22 = 0; | |
18798 | if (__len1 > __len2) | |
18799 | { | |
18800 | __len11 = __len1 / 2; | |
18801 | std::advance(__first_cut, __len11); | |
18802 | __second_cut = std::lower_bound(__middle, __last, *__first_cut, | |
18803 | __comp); | |
18804 | __len22 = std::distance(__middle, __second_cut); | |
18805 | } | |
18806 | else | |
18807 | { | |
18808 | __len22 = __len2 / 2; | |
18809 | std::advance(__second_cut, __len22); | |
18810 | __first_cut = std::upper_bound(__first, __middle, *__second_cut, | |
18811 | __comp); | |
18812 | __len11 = std::distance(__first, __first_cut); | |
18813 | } | |
18814 | std::rotate(__first_cut, __middle, __second_cut); | |
18815 | _BidirectionalIterator __new_middle = __first_cut; | |
18816 | std::advance(__new_middle, std::distance(__middle, __second_cut)); | |
18817 | std::__merge_without_buffer(__first, __first_cut, __new_middle, | |
18818 | __len11, __len22, __comp); | |
18819 | std::__merge_without_buffer(__new_middle, __second_cut, __last, | |
18820 | __len1 - __len11, __len2 - __len22, __comp); | |
18821 | } | |
18822 | ||
18823 | ||
18824 | ||
18825 | ||
18826 | ||
18827 | ||
18828 | template<typename _RandomAccessIterator> | |
18829 | void | |
18830 | __inplace_stable_sort(_RandomAccessIterator __first, | |
18831 | _RandomAccessIterator __last) | |
18832 | { | |
18833 | if (__last - __first < 15) | |
18834 | { | |
18835 | std::__insertion_sort(__first, __last); | |
18836 | return; | |
18837 | } | |
18838 | _RandomAccessIterator __middle = __first + (__last - __first) / 2; | |
18839 | std::__inplace_stable_sort(__first, __middle); | |
18840 | std::__inplace_stable_sort(__middle, __last); | |
18841 | std::__merge_without_buffer(__first, __middle, __last, | |
18842 | __middle - __first, | |
18843 | __last - __middle); | |
18844 | } | |
18845 | ||
18846 | ||
18847 | ||
18848 | ||
18849 | ||
18850 | ||
18851 | template<typename _RandomAccessIterator, typename _Compare> | |
18852 | void | |
18853 | __inplace_stable_sort(_RandomAccessIterator __first, | |
18854 | _RandomAccessIterator __last, _Compare __comp) | |
18855 | { | |
18856 | if (__last - __first < 15) | |
18857 | { | |
18858 | std::__insertion_sort(__first, __last, __comp); | |
18859 | return; | |
18860 | } | |
18861 | _RandomAccessIterator __middle = __first + (__last - __first) / 2; | |
18862 | std::__inplace_stable_sort(__first, __middle, __comp); | |
18863 | std::__inplace_stable_sort(__middle, __last, __comp); | |
18864 | std::__merge_without_buffer(__first, __middle, __last, | |
18865 | __middle - __first, | |
18866 | __last - __middle, | |
18867 | __comp); | |
18868 | } | |
18869 | # 3117 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
18870 | template<typename _InputIterator1, typename _InputIterator2, | |
18871 | typename _OutputIterator> | |
18872 | _OutputIterator | |
18873 | merge(_InputIterator1 __first1, _InputIterator1 __last1, | |
18874 | _InputIterator2 __first2, _InputIterator2 __last2, | |
18875 | _OutputIterator __result) | |
18876 | { | |
18877 | ||
18878 | ||
18879 | ||
18880 | ||
18881 | ||
18882 | ||
18883 | ||
18884 | ||
18885 | ||
18886 | ||
18887 | ; | |
18888 | ; | |
18889 | ||
18890 | while (__first1 != __last1 && __first2 != __last2) | |
18891 | { | |
18892 | if (*__first2 < *__first1) | |
18893 | { | |
18894 | *__result = *__first2; | |
18895 | ++__first2; | |
18896 | } | |
18897 | else | |
18898 | { | |
18899 | *__result = *__first1; | |
18900 | ++__first1; | |
18901 | } | |
18902 | ++__result; | |
18903 | } | |
18904 | return std::copy(__first2, __last2, std::copy(__first1, __last1, | |
18905 | __result)); | |
18906 | } | |
18907 | # 3175 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
18908 | template<typename _InputIterator1, typename _InputIterator2, | |
18909 | typename _OutputIterator, typename _Compare> | |
18910 | _OutputIterator | |
18911 | merge(_InputIterator1 __first1, _InputIterator1 __last1, | |
18912 | _InputIterator2 __first2, _InputIterator2 __last2, | |
18913 | _OutputIterator __result, _Compare __comp) | |
18914 | { | |
18915 | ||
18916 | ||
18917 | ||
18918 | ||
18919 | ||
18920 | ||
18921 | ||
18922 | ||
18923 | ||
18924 | ||
18925 | ||
18926 | ; | |
18927 | ; | |
18928 | ||
18929 | while (__first1 != __last1 && __first2 != __last2) | |
18930 | { | |
18931 | if (__comp(*__first2, *__first1)) | |
18932 | { | |
18933 | *__result = *__first2; | |
18934 | ++__first2; | |
18935 | } | |
18936 | else | |
18937 | { | |
18938 | *__result = *__first1; | |
18939 | ++__first1; | |
18940 | } | |
18941 | ++__result; | |
18942 | } | |
18943 | return std::copy(__first2, __last2, std::copy(__first1, __last1, | |
18944 | __result)); | |
18945 | } | |
18946 | ||
18947 | template<typename _RandomAccessIterator1, typename _RandomAccessIterator2, | |
18948 | typename _Distance> | |
18949 | void | |
18950 | __merge_sort_loop(_RandomAccessIterator1 __first, | |
18951 | _RandomAccessIterator1 __last, | |
18952 | _RandomAccessIterator2 __result, | |
18953 | _Distance __step_size) | |
18954 | { | |
18955 | const _Distance __two_step = 2 * __step_size; | |
18956 | ||
18957 | while (__last - __first >= __two_step) | |
18958 | { | |
18959 | __result = std::merge(__first, __first + __step_size, | |
18960 | __first + __step_size, __first + __two_step, | |
18961 | __result); | |
18962 | __first += __two_step; | |
18963 | } | |
18964 | ||
18965 | __step_size = std::min(_Distance(__last - __first), __step_size); | |
18966 | std::merge(__first, __first + __step_size, __first + __step_size, __last, | |
18967 | __result); | |
18968 | } | |
18969 | ||
18970 | template<typename _RandomAccessIterator1, typename _RandomAccessIterator2, | |
18971 | typename _Distance, typename _Compare> | |
18972 | void | |
18973 | __merge_sort_loop(_RandomAccessIterator1 __first, | |
18974 | _RandomAccessIterator1 __last, | |
18975 | _RandomAccessIterator2 __result, _Distance __step_size, | |
18976 | _Compare __comp) | |
18977 | { | |
18978 | const _Distance __two_step = 2 * __step_size; | |
18979 | ||
18980 | while (__last - __first >= __two_step) | |
18981 | { | |
18982 | __result = std::merge(__first, __first + __step_size, | |
18983 | __first + __step_size, __first + __two_step, | |
18984 | __result, | |
18985 | __comp); | |
18986 | __first += __two_step; | |
18987 | } | |
18988 | __step_size = std::min(_Distance(__last - __first), __step_size); | |
18989 | ||
18990 | std::merge(__first, __first + __step_size, | |
18991 | __first + __step_size, __last, | |
18992 | __result, | |
18993 | __comp); | |
18994 | } | |
18995 | ||
18996 | enum { _S_chunk_size = 7 }; | |
18997 | ||
18998 | template<typename _RandomAccessIterator, typename _Distance> | |
18999 | void | |
19000 | __chunk_insertion_sort(_RandomAccessIterator __first, | |
19001 | _RandomAccessIterator __last, | |
19002 | _Distance __chunk_size) | |
19003 | { | |
19004 | while (__last - __first >= __chunk_size) | |
19005 | { | |
19006 | std::__insertion_sort(__first, __first + __chunk_size); | |
19007 | __first += __chunk_size; | |
19008 | } | |
19009 | std::__insertion_sort(__first, __last); | |
19010 | } | |
19011 | ||
19012 | template<typename _RandomAccessIterator, typename _Distance, typename _Compare> | |
19013 | void | |
19014 | __chunk_insertion_sort(_RandomAccessIterator __first, | |
19015 | _RandomAccessIterator __last, | |
19016 | _Distance __chunk_size, _Compare __comp) | |
19017 | { | |
19018 | while (__last - __first >= __chunk_size) | |
19019 | { | |
19020 | std::__insertion_sort(__first, __first + __chunk_size, __comp); | |
19021 | __first += __chunk_size; | |
19022 | } | |
19023 | std::__insertion_sort(__first, __last, __comp); | |
19024 | } | |
19025 | ||
19026 | template<typename _RandomAccessIterator, typename _Pointer> | |
19027 | void | |
19028 | __merge_sort_with_buffer(_RandomAccessIterator __first, | |
19029 | _RandomAccessIterator __last, | |
19030 | _Pointer __buffer) | |
19031 | { | |
19032 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
19033 | _Distance; | |
19034 | ||
19035 | const _Distance __len = __last - __first; | |
19036 | const _Pointer __buffer_last = __buffer + __len; | |
19037 | ||
19038 | _Distance __step_size = _S_chunk_size; | |
19039 | std::__chunk_insertion_sort(__first, __last, __step_size); | |
19040 | ||
19041 | while (__step_size < __len) | |
19042 | { | |
19043 | std::__merge_sort_loop(__first, __last, __buffer, __step_size); | |
19044 | __step_size *= 2; | |
19045 | std::__merge_sort_loop(__buffer, __buffer_last, __first, __step_size); | |
19046 | __step_size *= 2; | |
19047 | } | |
19048 | } | |
19049 | ||
19050 | template<typename _RandomAccessIterator, typename _Pointer, typename _Compare> | |
19051 | void | |
19052 | __merge_sort_with_buffer(_RandomAccessIterator __first, | |
19053 | _RandomAccessIterator __last, | |
19054 | _Pointer __buffer, _Compare __comp) | |
19055 | { | |
19056 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
19057 | _Distance; | |
19058 | ||
19059 | const _Distance __len = __last - __first; | |
19060 | const _Pointer __buffer_last = __buffer + __len; | |
19061 | ||
19062 | _Distance __step_size = _S_chunk_size; | |
19063 | std::__chunk_insertion_sort(__first, __last, __step_size, __comp); | |
19064 | ||
19065 | while (__step_size < __len) | |
19066 | { | |
19067 | std::__merge_sort_loop(__first, __last, __buffer, | |
19068 | __step_size, __comp); | |
19069 | __step_size *= 2; | |
19070 | std::__merge_sort_loop(__buffer, __buffer_last, __first, | |
19071 | __step_size, __comp); | |
19072 | __step_size *= 2; | |
19073 | } | |
19074 | } | |
19075 | ||
19076 | ||
19077 | ||
19078 | ||
19079 | ||
19080 | ||
19081 | template<typename _BidirectionalIterator1, typename _BidirectionalIterator2, | |
19082 | typename _BidirectionalIterator3> | |
19083 | _BidirectionalIterator3 | |
19084 | __merge_backward(_BidirectionalIterator1 __first1, | |
19085 | _BidirectionalIterator1 __last1, | |
19086 | _BidirectionalIterator2 __first2, | |
19087 | _BidirectionalIterator2 __last2, | |
19088 | _BidirectionalIterator3 __result) | |
19089 | { | |
19090 | if (__first1 == __last1) | |
19091 | return std::copy_backward(__first2, __last2, __result); | |
19092 | if (__first2 == __last2) | |
19093 | return std::copy_backward(__first1, __last1, __result); | |
19094 | --__last1; | |
19095 | --__last2; | |
19096 | while (true) | |
19097 | { | |
19098 | if (*__last2 < *__last1) | |
19099 | { | |
19100 | *--__result = *__last1; | |
19101 | if (__first1 == __last1) | |
19102 | return std::copy_backward(__first2, ++__last2, __result); | |
19103 | --__last1; | |
19104 | } | |
19105 | else | |
19106 | { | |
19107 | *--__result = *__last2; | |
19108 | if (__first2 == __last2) | |
19109 | return std::copy_backward(__first1, ++__last1, __result); | |
19110 | --__last2; | |
19111 | } | |
19112 | } | |
19113 | } | |
19114 | ||
19115 | ||
19116 | ||
19117 | ||
19118 | ||
19119 | ||
19120 | template<typename _BidirectionalIterator1, typename _BidirectionalIterator2, | |
19121 | typename _BidirectionalIterator3, typename _Compare> | |
19122 | _BidirectionalIterator3 | |
19123 | __merge_backward(_BidirectionalIterator1 __first1, | |
19124 | _BidirectionalIterator1 __last1, | |
19125 | _BidirectionalIterator2 __first2, | |
19126 | _BidirectionalIterator2 __last2, | |
19127 | _BidirectionalIterator3 __result, | |
19128 | _Compare __comp) | |
19129 | { | |
19130 | if (__first1 == __last1) | |
19131 | return std::copy_backward(__first2, __last2, __result); | |
19132 | if (__first2 == __last2) | |
19133 | return std::copy_backward(__first1, __last1, __result); | |
19134 | --__last1; | |
19135 | --__last2; | |
19136 | while (true) | |
19137 | { | |
19138 | if (__comp(*__last2, *__last1)) | |
19139 | { | |
19140 | *--__result = *__last1; | |
19141 | if (__first1 == __last1) | |
19142 | return std::copy_backward(__first2, ++__last2, __result); | |
19143 | --__last1; | |
19144 | } | |
19145 | else | |
19146 | { | |
19147 | *--__result = *__last2; | |
19148 | if (__first2 == __last2) | |
19149 | return std::copy_backward(__first1, ++__last1, __result); | |
19150 | --__last2; | |
19151 | } | |
19152 | } | |
19153 | } | |
19154 | ||
19155 | ||
19156 | ||
19157 | ||
19158 | ||
19159 | ||
19160 | template<typename _BidirectionalIterator1, typename _BidirectionalIterator2, | |
19161 | typename _Distance> | |
19162 | _BidirectionalIterator1 | |
19163 | __rotate_adaptive(_BidirectionalIterator1 __first, | |
19164 | _BidirectionalIterator1 __middle, | |
19165 | _BidirectionalIterator1 __last, | |
19166 | _Distance __len1, _Distance __len2, | |
19167 | _BidirectionalIterator2 __buffer, | |
19168 | _Distance __buffer_size) | |
19169 | { | |
19170 | _BidirectionalIterator2 __buffer_end; | |
19171 | if (__len1 > __len2 && __len2 <= __buffer_size) | |
19172 | { | |
19173 | __buffer_end = std::copy(__middle, __last, __buffer); | |
19174 | std::copy_backward(__first, __middle, __last); | |
19175 | return std::copy(__buffer, __buffer_end, __first); | |
19176 | } | |
19177 | else if (__len1 <= __buffer_size) | |
19178 | { | |
19179 | __buffer_end = std::copy(__first, __middle, __buffer); | |
19180 | std::copy(__middle, __last, __first); | |
19181 | return std::copy_backward(__buffer, __buffer_end, __last); | |
19182 | } | |
19183 | else | |
19184 | { | |
19185 | std::rotate(__first, __middle, __last); | |
19186 | std::advance(__first, std::distance(__middle, __last)); | |
19187 | return __first; | |
19188 | } | |
19189 | } | |
19190 | ||
19191 | ||
19192 | ||
19193 | ||
19194 | ||
19195 | ||
19196 | template<typename _BidirectionalIterator, typename _Distance, | |
19197 | typename _Pointer> | |
19198 | void | |
19199 | __merge_adaptive(_BidirectionalIterator __first, | |
19200 | _BidirectionalIterator __middle, | |
19201 | _BidirectionalIterator __last, | |
19202 | _Distance __len1, _Distance __len2, | |
19203 | _Pointer __buffer, _Distance __buffer_size) | |
19204 | { | |
19205 | if (__len1 <= __len2 && __len1 <= __buffer_size) | |
19206 | { | |
19207 | _Pointer __buffer_end = std::copy(__first, __middle, __buffer); | |
19208 | std::merge(__buffer, __buffer_end, __middle, __last, __first); | |
19209 | } | |
19210 | else if (__len2 <= __buffer_size) | |
19211 | { | |
19212 | _Pointer __buffer_end = std::copy(__middle, __last, __buffer); | |
19213 | std::__merge_backward(__first, __middle, __buffer, | |
19214 | __buffer_end, __last); | |
19215 | } | |
19216 | else | |
19217 | { | |
19218 | _BidirectionalIterator __first_cut = __first; | |
19219 | _BidirectionalIterator __second_cut = __middle; | |
19220 | _Distance __len11 = 0; | |
19221 | _Distance __len22 = 0; | |
19222 | if (__len1 > __len2) | |
19223 | { | |
19224 | __len11 = __len1 / 2; | |
19225 | std::advance(__first_cut, __len11); | |
19226 | __second_cut = std::lower_bound(__middle, __last, | |
19227 | *__first_cut); | |
19228 | __len22 = std::distance(__middle, __second_cut); | |
19229 | } | |
19230 | else | |
19231 | { | |
19232 | __len22 = __len2 / 2; | |
19233 | std::advance(__second_cut, __len22); | |
19234 | __first_cut = std::upper_bound(__first, __middle, | |
19235 | *__second_cut); | |
19236 | __len11 = std::distance(__first, __first_cut); | |
19237 | } | |
19238 | _BidirectionalIterator __new_middle = | |
19239 | std::__rotate_adaptive(__first_cut, __middle, __second_cut, | |
19240 | __len1 - __len11, __len22, __buffer, | |
19241 | __buffer_size); | |
19242 | std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, | |
19243 | __len22, __buffer, __buffer_size); | |
19244 | std::__merge_adaptive(__new_middle, __second_cut, __last, | |
19245 | __len1 - __len11, | |
19246 | __len2 - __len22, __buffer, __buffer_size); | |
19247 | } | |
19248 | } | |
19249 | ||
19250 | ||
19251 | ||
19252 | ||
19253 | ||
19254 | ||
19255 | template<typename _BidirectionalIterator, typename _Distance, typename _Pointer, | |
19256 | typename _Compare> | |
19257 | void | |
19258 | __merge_adaptive(_BidirectionalIterator __first, | |
19259 | _BidirectionalIterator __middle, | |
19260 | _BidirectionalIterator __last, | |
19261 | _Distance __len1, _Distance __len2, | |
19262 | _Pointer __buffer, _Distance __buffer_size, | |
19263 | _Compare __comp) | |
19264 | { | |
19265 | if (__len1 <= __len2 && __len1 <= __buffer_size) | |
19266 | { | |
19267 | _Pointer __buffer_end = std::copy(__first, __middle, __buffer); | |
19268 | std::merge(__buffer, __buffer_end, __middle, __last, __first, __comp); | |
19269 | } | |
19270 | else if (__len2 <= __buffer_size) | |
19271 | { | |
19272 | _Pointer __buffer_end = std::copy(__middle, __last, __buffer); | |
19273 | std::__merge_backward(__first, __middle, __buffer, __buffer_end, | |
19274 | __last, __comp); | |
19275 | } | |
19276 | else | |
19277 | { | |
19278 | _BidirectionalIterator __first_cut = __first; | |
19279 | _BidirectionalIterator __second_cut = __middle; | |
19280 | _Distance __len11 = 0; | |
19281 | _Distance __len22 = 0; | |
19282 | if (__len1 > __len2) | |
19283 | { | |
19284 | __len11 = __len1 / 2; | |
19285 | std::advance(__first_cut, __len11); | |
19286 | __second_cut = std::lower_bound(__middle, __last, *__first_cut, | |
19287 | __comp); | |
19288 | __len22 = std::distance(__middle, __second_cut); | |
19289 | } | |
19290 | else | |
19291 | { | |
19292 | __len22 = __len2 / 2; | |
19293 | std::advance(__second_cut, __len22); | |
19294 | __first_cut = std::upper_bound(__first, __middle, *__second_cut, | |
19295 | __comp); | |
19296 | __len11 = std::distance(__first, __first_cut); | |
19297 | } | |
19298 | _BidirectionalIterator __new_middle = | |
19299 | std::__rotate_adaptive(__first_cut, __middle, __second_cut, | |
19300 | __len1 - __len11, __len22, __buffer, | |
19301 | __buffer_size); | |
19302 | std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, | |
19303 | __len22, __buffer, __buffer_size, __comp); | |
19304 | std::__merge_adaptive(__new_middle, __second_cut, __last, | |
19305 | __len1 - __len11, | |
19306 | __len2 - __len22, __buffer, | |
19307 | __buffer_size, __comp); | |
19308 | } | |
19309 | } | |
19310 | # 3595 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
19311 | template<typename _BidirectionalIterator> | |
19312 | void | |
19313 | inplace_merge(_BidirectionalIterator __first, | |
19314 | _BidirectionalIterator __middle, | |
19315 | _BidirectionalIterator __last) | |
19316 | { | |
19317 | typedef typename iterator_traits<_BidirectionalIterator>::value_type | |
19318 | _ValueType; | |
19319 | typedef typename iterator_traits<_BidirectionalIterator>::difference_type | |
19320 | _DistanceType; | |
19321 | ||
19322 | ||
19323 | ||
19324 | ||
19325 | ||
19326 | ; | |
19327 | ; | |
19328 | ||
19329 | if (__first == __middle || __middle == __last) | |
19330 | return; | |
19331 | ||
19332 | _DistanceType __len1 = std::distance(__first, __middle); | |
19333 | _DistanceType __len2 = std::distance(__middle, __last); | |
19334 | ||
19335 | _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first, | |
19336 | __last); | |
19337 | if (__buf.begin() == 0) | |
19338 | std::__merge_without_buffer(__first, __middle, __last, __len1, __len2); | |
19339 | else | |
19340 | std::__merge_adaptive(__first, __middle, __last, __len1, __len2, | |
19341 | __buf.begin(), _DistanceType(__buf.size())); | |
19342 | } | |
19343 | # 3649 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
19344 | template<typename _BidirectionalIterator, typename _Compare> | |
19345 | void | |
19346 | inplace_merge(_BidirectionalIterator __first, | |
19347 | _BidirectionalIterator __middle, | |
19348 | _BidirectionalIterator __last, | |
19349 | _Compare __comp) | |
19350 | { | |
19351 | typedef typename iterator_traits<_BidirectionalIterator>::value_type | |
19352 | _ValueType; | |
19353 | typedef typename iterator_traits<_BidirectionalIterator>::difference_type | |
19354 | _DistanceType; | |
19355 | ||
19356 | ||
19357 | ||
19358 | ||
19359 | ||
19360 | ||
19361 | ; | |
19362 | ; | |
19363 | ||
19364 | if (__first == __middle || __middle == __last) | |
19365 | return; | |
19366 | ||
19367 | const _DistanceType __len1 = std::distance(__first, __middle); | |
19368 | const _DistanceType __len2 = std::distance(__middle, __last); | |
19369 | ||
19370 | _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first, | |
19371 | __last); | |
19372 | if (__buf.begin() == 0) | |
19373 | std::__merge_without_buffer(__first, __middle, __last, __len1, | |
19374 | __len2, __comp); | |
19375 | else | |
19376 | std::__merge_adaptive(__first, __middle, __last, __len1, __len2, | |
19377 | __buf.begin(), _DistanceType(__buf.size()), | |
19378 | __comp); | |
19379 | } | |
19380 | ||
19381 | template<typename _RandomAccessIterator, typename _Pointer, | |
19382 | typename _Distance> | |
19383 | void | |
19384 | __stable_sort_adaptive(_RandomAccessIterator __first, | |
19385 | _RandomAccessIterator __last, | |
19386 | _Pointer __buffer, _Distance __buffer_size) | |
19387 | { | |
19388 | const _Distance __len = (__last - __first + 1) / 2; | |
19389 | const _RandomAccessIterator __middle = __first + __len; | |
19390 | if (__len > __buffer_size) | |
19391 | { | |
19392 | std::__stable_sort_adaptive(__first, __middle, | |
19393 | __buffer, __buffer_size); | |
19394 | std::__stable_sort_adaptive(__middle, __last, | |
19395 | __buffer, __buffer_size); | |
19396 | } | |
19397 | else | |
19398 | { | |
19399 | std::__merge_sort_with_buffer(__first, __middle, __buffer); | |
19400 | std::__merge_sort_with_buffer(__middle, __last, __buffer); | |
19401 | } | |
19402 | std::__merge_adaptive(__first, __middle, __last, | |
19403 | _Distance(__middle - __first), | |
19404 | _Distance(__last - __middle), | |
19405 | __buffer, __buffer_size); | |
19406 | } | |
19407 | ||
19408 | template<typename _RandomAccessIterator, typename _Pointer, | |
19409 | typename _Distance, typename _Compare> | |
19410 | void | |
19411 | __stable_sort_adaptive(_RandomAccessIterator __first, | |
19412 | _RandomAccessIterator __last, | |
19413 | _Pointer __buffer, _Distance __buffer_size, | |
19414 | _Compare __comp) | |
19415 | { | |
19416 | const _Distance __len = (__last - __first + 1) / 2; | |
19417 | const _RandomAccessIterator __middle = __first + __len; | |
19418 | if (__len > __buffer_size) | |
19419 | { | |
19420 | std::__stable_sort_adaptive(__first, __middle, __buffer, | |
19421 | __buffer_size, __comp); | |
19422 | std::__stable_sort_adaptive(__middle, __last, __buffer, | |
19423 | __buffer_size, __comp); | |
19424 | } | |
19425 | else | |
19426 | { | |
19427 | std::__merge_sort_with_buffer(__first, __middle, __buffer, __comp); | |
19428 | std::__merge_sort_with_buffer(__middle, __last, __buffer, __comp); | |
19429 | } | |
19430 | std::__merge_adaptive(__first, __middle, __last, | |
19431 | _Distance(__middle - __first), | |
19432 | _Distance(__last - __middle), | |
19433 | __buffer, __buffer_size, | |
19434 | __comp); | |
19435 | } | |
19436 | # 3758 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
19437 | template<typename _RandomAccessIterator> | |
19438 | inline void | |
19439 | stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) | |
19440 | { | |
19441 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
19442 | _ValueType; | |
19443 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
19444 | _DistanceType; | |
19445 | ||
19446 | ||
19447 | ||
19448 | ||
19449 | ||
19450 | ; | |
19451 | ||
19452 | _Temporary_buffer<_RandomAccessIterator, _ValueType> | |
19453 | buf(__first, __last); | |
19454 | if (buf.begin() == 0) | |
19455 | std::__inplace_stable_sort(__first, __last); | |
19456 | else | |
19457 | std::__stable_sort_adaptive(__first, __last, buf.begin(), | |
19458 | _DistanceType(buf.size())); | |
19459 | } | |
19460 | # 3799 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
19461 | template<typename _RandomAccessIterator, typename _Compare> | |
19462 | inline void | |
19463 | stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, | |
19464 | _Compare __comp) | |
19465 | { | |
19466 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
19467 | _ValueType; | |
19468 | typedef typename iterator_traits<_RandomAccessIterator>::difference_type | |
19469 | _DistanceType; | |
19470 | ||
19471 | ||
19472 | ||
19473 | ||
19474 | ||
19475 | ||
19476 | ||
19477 | ; | |
19478 | ||
19479 | _Temporary_buffer<_RandomAccessIterator, _ValueType> buf(__first, __last); | |
19480 | if (buf.begin() == 0) | |
19481 | std::__inplace_stable_sort(__first, __last, __comp); | |
19482 | else | |
19483 | std::__stable_sort_adaptive(__first, __last, buf.begin(), | |
19484 | _DistanceType(buf.size()), __comp); | |
19485 | } | |
19486 | # 3840 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
19487 | template<typename _RandomAccessIterator> | |
19488 | void | |
19489 | nth_element(_RandomAccessIterator __first, | |
19490 | _RandomAccessIterator __nth, | |
19491 | _RandomAccessIterator __last) | |
19492 | { | |
19493 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
19494 | _ValueType; | |
19495 | ||
19496 | ||
19497 | ||
19498 | ||
19499 | ||
19500 | ; | |
19501 | ; | |
19502 | ||
19503 | while (__last - __first > 3) | |
19504 | { | |
19505 | _RandomAccessIterator __cut = | |
19506 | std::__unguarded_partition(__first, __last, | |
19507 | _ValueType(std::__median(*__first, | |
19508 | *(__first | |
19509 | + (__last | |
19510 | - __first) | |
19511 | / 2), | |
19512 | *(__last | |
19513 | - 1)))); | |
19514 | if (__cut <= __nth) | |
19515 | __first = __cut; | |
19516 | else | |
19517 | __last = __cut; | |
19518 | } | |
19519 | std::__insertion_sort(__first, __last); | |
19520 | } | |
19521 | # 3891 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
19522 | template<typename _RandomAccessIterator, typename _Compare> | |
19523 | void | |
19524 | nth_element(_RandomAccessIterator __first, | |
19525 | _RandomAccessIterator __nth, | |
19526 | _RandomAccessIterator __last, | |
19527 | _Compare __comp) | |
19528 | { | |
19529 | typedef typename iterator_traits<_RandomAccessIterator>::value_type | |
19530 | _ValueType; | |
19531 | ||
19532 | ||
19533 | ||
19534 | ||
19535 | ||
19536 | ||
19537 | ; | |
19538 | ; | |
19539 | ||
19540 | while (__last - __first > 3) | |
19541 | { | |
19542 | _RandomAccessIterator __cut = | |
19543 | std::__unguarded_partition(__first, __last, | |
19544 | _ValueType(std::__median(*__first, | |
19545 | *(__first | |
19546 | + (__last | |
19547 | - __first) | |
19548 | / 2), | |
19549 | *(__last - 1), | |
19550 | __comp)), __comp); | |
19551 | if (__cut <= __nth) | |
19552 | __first = __cut; | |
19553 | else | |
19554 | __last = __cut; | |
19555 | } | |
19556 | std::__insertion_sort(__first, __last, __comp); | |
19557 | } | |
19558 | # 3944 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
19559 | template<typename _ForwardIterator, typename _Tp> | |
19560 | pair<_ForwardIterator, _ForwardIterator> | |
19561 | equal_range(_ForwardIterator __first, _ForwardIterator __last, | |
19562 | const _Tp& __val) | |
19563 | { | |
19564 | typedef typename iterator_traits<_ForwardIterator>::value_type | |
19565 | _ValueType; | |
19566 | typedef typename iterator_traits<_ForwardIterator>::difference_type | |
19567 | _DistanceType; | |
19568 | ||
19569 | ||
19570 | ||
19571 | ||
19572 | ||
19573 | ||
19574 | ; | |
19575 | ||
19576 | _DistanceType __len = std::distance(__first, __last); | |
19577 | _DistanceType __half; | |
19578 | _ForwardIterator __middle, __left, __right; | |
19579 | ||
19580 | while (__len > 0) | |
19581 | { | |
19582 | __half = __len >> 1; | |
19583 | __middle = __first; | |
19584 | std::advance(__middle, __half); | |
19585 | if (*__middle < __val) | |
19586 | { | |
19587 | __first = __middle; | |
19588 | ++__first; | |
19589 | __len = __len - __half - 1; | |
19590 | } | |
19591 | else if (__val < *__middle) | |
19592 | __len = __half; | |
19593 | else | |
19594 | { | |
19595 | __left = std::lower_bound(__first, __middle, __val); | |
19596 | std::advance(__first, __len); | |
19597 | __right = std::upper_bound(++__middle, __first, __val); | |
19598 | return pair<_ForwardIterator, _ForwardIterator>(__left, __right); | |
19599 | } | |
19600 | } | |
19601 | return pair<_ForwardIterator, _ForwardIterator>(__first, __first); | |
19602 | } | |
19603 | # 4006 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
19604 | template<typename _ForwardIterator, typename _Tp, typename _Compare> | |
19605 | pair<_ForwardIterator, _ForwardIterator> | |
19606 | equal_range(_ForwardIterator __first, _ForwardIterator __last, | |
19607 | const _Tp& __val, | |
19608 | _Compare __comp) | |
19609 | { | |
19610 | typedef typename iterator_traits<_ForwardIterator>::value_type | |
19611 | _ValueType; | |
19612 | typedef typename iterator_traits<_ForwardIterator>::difference_type | |
19613 | _DistanceType; | |
19614 | ||
19615 | ||
19616 | ||
19617 | ||
19618 | ||
19619 | ||
19620 | ||
19621 | ; | |
19622 | ||
19623 | _DistanceType __len = std::distance(__first, __last); | |
19624 | _DistanceType __half; | |
19625 | _ForwardIterator __middle, __left, __right; | |
19626 | ||
19627 | while (__len > 0) | |
19628 | { | |
19629 | __half = __len >> 1; | |
19630 | __middle = __first; | |
19631 | std::advance(__middle, __half); | |
19632 | if (__comp(*__middle, __val)) | |
19633 | { | |
19634 | __first = __middle; | |
19635 | ++__first; | |
19636 | __len = __len - __half - 1; | |
19637 | } | |
19638 | else if (__comp(__val, *__middle)) | |
19639 | __len = __half; | |
19640 | else | |
19641 | { | |
19642 | __left = std::lower_bound(__first, __middle, __val, __comp); | |
19643 | std::advance(__first, __len); | |
19644 | __right = std::upper_bound(++__middle, __first, __val, __comp); | |
19645 | return pair<_ForwardIterator, _ForwardIterator>(__left, __right); | |
19646 | } | |
19647 | } | |
19648 | return pair<_ForwardIterator, _ForwardIterator>(__first, __first); | |
19649 | } | |
19650 | # 4064 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
19651 | template<typename _ForwardIterator, typename _Tp> | |
19652 | bool | |
19653 | binary_search(_ForwardIterator __first, _ForwardIterator __last, | |
19654 | const _Tp& __val) | |
19655 | { | |
19656 | ||
19657 | ||
19658 | ||
19659 | ||
19660 | ||
19661 | ||
19662 | ; | |
19663 | ||
19664 | _ForwardIterator __i = std::lower_bound(__first, __last, __val); | |
19665 | return __i != __last && !(__val < *__i); | |
19666 | } | |
19667 | # 4096 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
19668 | template<typename _ForwardIterator, typename _Tp, typename _Compare> | |
19669 | bool | |
19670 | binary_search(_ForwardIterator __first, _ForwardIterator __last, | |
19671 | const _Tp& __val, _Compare __comp) | |
19672 | { | |
19673 | ||
19674 | ||
19675 | ||
19676 | ||
19677 | ||
19678 | ||
19679 | ; | |
19680 | ||
19681 | _ForwardIterator __i = std::lower_bound(__first, __last, __val, __comp); | |
19682 | return __i != __last && !__comp(__val, *__i); | |
19683 | } | |
19684 | # 4134 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
19685 | template<typename _InputIterator1, typename _InputIterator2> | |
19686 | bool | |
19687 | includes(_InputIterator1 __first1, _InputIterator1 __last1, | |
19688 | _InputIterator2 __first2, _InputIterator2 __last2) | |
19689 | { | |
19690 | ||
19691 | ||
19692 | ||
19693 | ||
19694 | ||
19695 | ||
19696 | ||
19697 | ||
19698 | ; | |
19699 | ; | |
19700 | ||
19701 | while (__first1 != __last1 && __first2 != __last2) | |
19702 | if (*__first2 < *__first1) | |
19703 | return false; | |
19704 | else if(*__first1 < *__first2) | |
19705 | ++__first1; | |
19706 | else | |
19707 | ++__first1, ++__first2; | |
19708 | ||
19709 | return __first2 == __last2; | |
19710 | } | |
19711 | # 4180 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
19712 | template<typename _InputIterator1, typename _InputIterator2, | |
19713 | typename _Compare> | |
19714 | bool | |
19715 | includes(_InputIterator1 __first1, _InputIterator1 __last1, | |
19716 | _InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp) | |
19717 | { | |
19718 | ||
19719 | ||
19720 | ||
19721 | ||
19722 | ||
19723 | ||
19724 | ||
19725 | ||
19726 | ||
19727 | ; | |
19728 | ; | |
19729 | ||
19730 | while (__first1 != __last1 && __first2 != __last2) | |
19731 | if (__comp(*__first2, *__first1)) | |
19732 | return false; | |
19733 | else if(__comp(*__first1, *__first2)) | |
19734 | ++__first1; | |
19735 | else | |
19736 | ++__first1, ++__first2; | |
19737 | ||
19738 | return __first2 == __last2; | |
19739 | } | |
19740 | # 4226 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
19741 | template<typename _InputIterator1, typename _InputIterator2, | |
19742 | typename _OutputIterator> | |
19743 | _OutputIterator | |
19744 | set_union(_InputIterator1 __first1, _InputIterator1 __last1, | |
19745 | _InputIterator2 __first2, _InputIterator2 __last2, | |
19746 | _OutputIterator __result) | |
19747 | { | |
19748 | ||
19749 | ||
19750 | ||
19751 | ||
19752 | ||
19753 | ||
19754 | ||
19755 | ||
19756 | ||
19757 | ||
19758 | ; | |
19759 | ; | |
19760 | ||
19761 | while (__first1 != __last1 && __first2 != __last2) | |
19762 | { | |
19763 | if (*__first1 < *__first2) | |
19764 | { | |
19765 | *__result = *__first1; | |
19766 | ++__first1; | |
19767 | } | |
19768 | else if (*__first2 < *__first1) | |
19769 | { | |
19770 | *__result = *__first2; | |
19771 | ++__first2; | |
19772 | } | |
19773 | else | |
19774 | { | |
19775 | *__result = *__first1; | |
19776 | ++__first1; | |
19777 | ++__first2; | |
19778 | } | |
19779 | ++__result; | |
19780 | } | |
19781 | return std::copy(__first2, __last2, std::copy(__first1, __last1, | |
19782 | __result)); | |
19783 | } | |
19784 | # 4288 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
19785 | template<typename _InputIterator1, typename _InputIterator2, | |
19786 | typename _OutputIterator, typename _Compare> | |
19787 | _OutputIterator | |
19788 | set_union(_InputIterator1 __first1, _InputIterator1 __last1, | |
19789 | _InputIterator2 __first2, _InputIterator2 __last2, | |
19790 | _OutputIterator __result, _Compare __comp) | |
19791 | { | |
19792 | ||
19793 | ||
19794 | ||
19795 | ||
19796 | ||
19797 | ||
19798 | ||
19799 | ||
19800 | ||
19801 | ||
19802 | ||
19803 | ; | |
19804 | ; | |
19805 | ||
19806 | while (__first1 != __last1 && __first2 != __last2) | |
19807 | { | |
19808 | if (__comp(*__first1, *__first2)) | |
19809 | { | |
19810 | *__result = *__first1; | |
19811 | ++__first1; | |
19812 | } | |
19813 | else if (__comp(*__first2, *__first1)) | |
19814 | { | |
19815 | *__result = *__first2; | |
19816 | ++__first2; | |
19817 | } | |
19818 | else | |
19819 | { | |
19820 | *__result = *__first1; | |
19821 | ++__first1; | |
19822 | ++__first2; | |
19823 | } | |
19824 | ++__result; | |
19825 | } | |
19826 | return std::copy(__first2, __last2, std::copy(__first1, __last1, | |
19827 | __result)); | |
19828 | } | |
19829 | # 4349 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
19830 | template<typename _InputIterator1, typename _InputIterator2, | |
19831 | typename _OutputIterator> | |
19832 | _OutputIterator | |
19833 | set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, | |
19834 | _InputIterator2 __first2, _InputIterator2 __last2, | |
19835 | _OutputIterator __result) | |
19836 | { | |
19837 | ||
19838 | ||
19839 | ||
19840 | ||
19841 | ||
19842 | ||
19843 | ||
19844 | ||
19845 | ||
19846 | ||
19847 | ; | |
19848 | ; | |
19849 | ||
19850 | while (__first1 != __last1 && __first2 != __last2) | |
19851 | if (*__first1 < *__first2) | |
19852 | ++__first1; | |
19853 | else if (*__first2 < *__first1) | |
19854 | ++__first2; | |
19855 | else | |
19856 | { | |
19857 | *__result = *__first1; | |
19858 | ++__first1; | |
19859 | ++__first2; | |
19860 | ++__result; | |
19861 | } | |
19862 | return __result; | |
19863 | } | |
19864 | # 4403 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
19865 | template<typename _InputIterator1, typename _InputIterator2, | |
19866 | typename _OutputIterator, typename _Compare> | |
19867 | _OutputIterator | |
19868 | set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, | |
19869 | _InputIterator2 __first2, _InputIterator2 __last2, | |
19870 | _OutputIterator __result, _Compare __comp) | |
19871 | { | |
19872 | ||
19873 | ||
19874 | ||
19875 | ||
19876 | ||
19877 | ||
19878 | ||
19879 | ||
19880 | ||
19881 | ||
19882 | ||
19883 | ; | |
19884 | ; | |
19885 | ||
19886 | while (__first1 != __last1 && __first2 != __last2) | |
19887 | if (__comp(*__first1, *__first2)) | |
19888 | ++__first1; | |
19889 | else if (__comp(*__first2, *__first1)) | |
19890 | ++__first2; | |
19891 | else | |
19892 | { | |
19893 | *__result = *__first1; | |
19894 | ++__first1; | |
19895 | ++__first2; | |
19896 | ++__result; | |
19897 | } | |
19898 | return __result; | |
19899 | } | |
19900 | # 4457 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
19901 | template<typename _InputIterator1, typename _InputIterator2, | |
19902 | typename _OutputIterator> | |
19903 | _OutputIterator | |
19904 | set_difference(_InputIterator1 __first1, _InputIterator1 __last1, | |
19905 | _InputIterator2 __first2, _InputIterator2 __last2, | |
19906 | _OutputIterator __result) | |
19907 | { | |
19908 | ||
19909 | ||
19910 | ||
19911 | ||
19912 | ||
19913 | ||
19914 | ||
19915 | ||
19916 | ||
19917 | ||
19918 | ; | |
19919 | ; | |
19920 | ||
19921 | while (__first1 != __last1 && __first2 != __last2) | |
19922 | if (*__first1 < *__first2) | |
19923 | { | |
19924 | *__result = *__first1; | |
19925 | ++__first1; | |
19926 | ++__result; | |
19927 | } | |
19928 | else if (*__first2 < *__first1) | |
19929 | ++__first2; | |
19930 | else | |
19931 | { | |
19932 | ++__first1; | |
19933 | ++__first2; | |
19934 | } | |
19935 | return std::copy(__first1, __last1, __result); | |
19936 | } | |
19937 | # 4515 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
19938 | template<typename _InputIterator1, typename _InputIterator2, | |
19939 | typename _OutputIterator, typename _Compare> | |
19940 | _OutputIterator | |
19941 | set_difference(_InputIterator1 __first1, _InputIterator1 __last1, | |
19942 | _InputIterator2 __first2, _InputIterator2 __last2, | |
19943 | _OutputIterator __result, _Compare __comp) | |
19944 | { | |
19945 | ||
19946 | ||
19947 | ||
19948 | ||
19949 | ||
19950 | ||
19951 | ||
19952 | ||
19953 | ||
19954 | ||
19955 | ||
19956 | ; | |
19957 | ; | |
19958 | ||
19959 | while (__first1 != __last1 && __first2 != __last2) | |
19960 | if (__comp(*__first1, *__first2)) | |
19961 | { | |
19962 | *__result = *__first1; | |
19963 | ++__first1; | |
19964 | ++__result; | |
19965 | } | |
19966 | else if (__comp(*__first2, *__first1)) | |
19967 | ++__first2; | |
19968 | else | |
19969 | { | |
19970 | ++__first1; | |
19971 | ++__first2; | |
19972 | } | |
19973 | return std::copy(__first1, __last1, __result); | |
19974 | } | |
19975 | # 4569 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
19976 | template<typename _InputIterator1, typename _InputIterator2, | |
19977 | typename _OutputIterator> | |
19978 | _OutputIterator | |
19979 | set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, | |
19980 | _InputIterator2 __first2, _InputIterator2 __last2, | |
19981 | _OutputIterator __result) | |
19982 | { | |
19983 | ||
19984 | ||
19985 | ||
19986 | ||
19987 | ||
19988 | ||
19989 | ||
19990 | ||
19991 | ||
19992 | ||
19993 | ; | |
19994 | ; | |
19995 | ||
19996 | while (__first1 != __last1 && __first2 != __last2) | |
19997 | if (*__first1 < *__first2) | |
19998 | { | |
19999 | *__result = *__first1; | |
20000 | ++__first1; | |
20001 | ++__result; | |
20002 | } | |
20003 | else if (*__first2 < *__first1) | |
20004 | { | |
20005 | *__result = *__first2; | |
20006 | ++__first2; | |
20007 | ++__result; | |
20008 | } | |
20009 | else | |
20010 | { | |
20011 | ++__first1; | |
20012 | ++__first2; | |
20013 | } | |
20014 | return std::copy(__first2, __last2, std::copy(__first1, | |
20015 | __last1, __result)); | |
20016 | } | |
20017 | # 4630 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
20018 | template<typename _InputIterator1, typename _InputIterator2, | |
20019 | typename _OutputIterator, typename _Compare> | |
20020 | _OutputIterator | |
20021 | set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, | |
20022 | _InputIterator2 __first2, _InputIterator2 __last2, | |
20023 | _OutputIterator __result, | |
20024 | _Compare __comp) | |
20025 | { | |
20026 | ||
20027 | ||
20028 | ||
20029 | ||
20030 | ||
20031 | ||
20032 | ||
20033 | ||
20034 | ||
20035 | ||
20036 | ||
20037 | ; | |
20038 | ; | |
20039 | ||
20040 | while (__first1 != __last1 && __first2 != __last2) | |
20041 | if (__comp(*__first1, *__first2)) | |
20042 | { | |
20043 | *__result = *__first1; | |
20044 | ++__first1; | |
20045 | ++__result; | |
20046 | } | |
20047 | else if (__comp(*__first2, *__first1)) | |
20048 | { | |
20049 | *__result = *__first2; | |
20050 | ++__first2; | |
20051 | ++__result; | |
20052 | } | |
20053 | else | |
20054 | { | |
20055 | ++__first1; | |
20056 | ++__first2; | |
20057 | } | |
20058 | return std::copy(__first2, __last2, std::copy(__first1, | |
20059 | __last1, __result)); | |
20060 | } | |
20061 | # 4683 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
20062 | template<typename _ForwardIterator> | |
20063 | _ForwardIterator | |
20064 | max_element(_ForwardIterator __first, _ForwardIterator __last) | |
20065 | { | |
20066 | ||
20067 | ||
20068 | ||
20069 | ||
20070 | ; | |
20071 | ||
20072 | if (__first == __last) | |
20073 | return __first; | |
20074 | _ForwardIterator __result = __first; | |
20075 | while (++__first != __last) | |
20076 | if (*__result < *__first) | |
20077 | __result = __first; | |
20078 | return __result; | |
20079 | } | |
20080 | # 4710 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
20081 | template<typename _ForwardIterator, typename _Compare> | |
20082 | _ForwardIterator | |
20083 | max_element(_ForwardIterator __first, _ForwardIterator __last, | |
20084 | _Compare __comp) | |
20085 | { | |
20086 | ||
20087 | ||
20088 | ||
20089 | ||
20090 | ||
20091 | ; | |
20092 | ||
20093 | if (__first == __last) return __first; | |
20094 | _ForwardIterator __result = __first; | |
20095 | while (++__first != __last) | |
20096 | if (__comp(*__result, *__first)) __result = __first; | |
20097 | return __result; | |
20098 | } | |
20099 | ||
20100 | ||
20101 | ||
20102 | ||
20103 | ||
20104 | ||
20105 | ||
20106 | template<typename _ForwardIterator> | |
20107 | _ForwardIterator | |
20108 | min_element(_ForwardIterator __first, _ForwardIterator __last) | |
20109 | { | |
20110 | ||
20111 | ||
20112 | ||
20113 | ||
20114 | ; | |
20115 | ||
20116 | if (__first == __last) | |
20117 | return __first; | |
20118 | _ForwardIterator __result = __first; | |
20119 | while (++__first != __last) | |
20120 | if (*__first < *__result) | |
20121 | __result = __first; | |
20122 | return __result; | |
20123 | } | |
20124 | # 4762 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
20125 | template<typename _ForwardIterator, typename _Compare> | |
20126 | _ForwardIterator | |
20127 | min_element(_ForwardIterator __first, _ForwardIterator __last, | |
20128 | _Compare __comp) | |
20129 | { | |
20130 | ||
20131 | ||
20132 | ||
20133 | ||
20134 | ||
20135 | ; | |
20136 | ||
20137 | if (__first == __last) | |
20138 | return __first; | |
20139 | _ForwardIterator __result = __first; | |
20140 | while (++__first != __last) | |
20141 | if (__comp(*__first, *__result)) | |
20142 | __result = __first; | |
20143 | return __result; | |
20144 | } | |
20145 | # 4797 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
20146 | template<typename _BidirectionalIterator> | |
20147 | bool | |
20148 | next_permutation(_BidirectionalIterator __first, | |
20149 | _BidirectionalIterator __last) | |
20150 | { | |
20151 | ||
20152 | ||
20153 | ||
20154 | ||
20155 | ||
20156 | ; | |
20157 | ||
20158 | if (__first == __last) | |
20159 | return false; | |
20160 | _BidirectionalIterator __i = __first; | |
20161 | ++__i; | |
20162 | if (__i == __last) | |
20163 | return false; | |
20164 | __i = __last; | |
20165 | --__i; | |
20166 | ||
20167 | for(;;) | |
20168 | { | |
20169 | _BidirectionalIterator __ii = __i; | |
20170 | --__i; | |
20171 | if (*__i < *__ii) | |
20172 | { | |
20173 | _BidirectionalIterator __j = __last; | |
20174 | while (!(*__i < *--__j)) | |
20175 | {} | |
20176 | std::iter_swap(__i, __j); | |
20177 | std::reverse(__ii, __last); | |
20178 | return true; | |
20179 | } | |
20180 | if (__i == __first) | |
20181 | { | |
20182 | std::reverse(__first, __last); | |
20183 | return false; | |
20184 | } | |
20185 | } | |
20186 | } | |
20187 | # 4853 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
20188 | template<typename _BidirectionalIterator, typename _Compare> | |
20189 | bool | |
20190 | next_permutation(_BidirectionalIterator __first, | |
20191 | _BidirectionalIterator __last, _Compare __comp) | |
20192 | { | |
20193 | ||
20194 | ||
20195 | ||
20196 | ||
20197 | ||
20198 | ||
20199 | ; | |
20200 | ||
20201 | if (__first == __last) | |
20202 | return false; | |
20203 | _BidirectionalIterator __i = __first; | |
20204 | ++__i; | |
20205 | if (__i == __last) | |
20206 | return false; | |
20207 | __i = __last; | |
20208 | --__i; | |
20209 | ||
20210 | for(;;) | |
20211 | { | |
20212 | _BidirectionalIterator __ii = __i; | |
20213 | --__i; | |
20214 | if (__comp(*__i, *__ii)) | |
20215 | { | |
20216 | _BidirectionalIterator __j = __last; | |
20217 | while (!__comp(*__i, *--__j)) | |
20218 | {} | |
20219 | std::iter_swap(__i, __j); | |
20220 | std::reverse(__ii, __last); | |
20221 | return true; | |
20222 | } | |
20223 | if (__i == __first) | |
20224 | { | |
20225 | std::reverse(__first, __last); | |
20226 | return false; | |
20227 | } | |
20228 | } | |
20229 | } | |
20230 | # 4908 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
20231 | template<typename _BidirectionalIterator> | |
20232 | bool | |
20233 | prev_permutation(_BidirectionalIterator __first, | |
20234 | _BidirectionalIterator __last) | |
20235 | { | |
20236 | ||
20237 | ||
20238 | ||
20239 | ||
20240 | ||
20241 | ; | |
20242 | ||
20243 | if (__first == __last) | |
20244 | return false; | |
20245 | _BidirectionalIterator __i = __first; | |
20246 | ++__i; | |
20247 | if (__i == __last) | |
20248 | return false; | |
20249 | __i = __last; | |
20250 | --__i; | |
20251 | ||
20252 | for(;;) | |
20253 | { | |
20254 | _BidirectionalIterator __ii = __i; | |
20255 | --__i; | |
20256 | if (*__ii < *__i) | |
20257 | { | |
20258 | _BidirectionalIterator __j = __last; | |
20259 | while (!(*--__j < *__i)) | |
20260 | {} | |
20261 | std::iter_swap(__i, __j); | |
20262 | std::reverse(__ii, __last); | |
20263 | return true; | |
20264 | } | |
20265 | if (__i == __first) | |
20266 | { | |
20267 | std::reverse(__first, __last); | |
20268 | return false; | |
20269 | } | |
20270 | } | |
20271 | } | |
20272 | # 4964 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
20273 | template<typename _BidirectionalIterator, typename _Compare> | |
20274 | bool | |
20275 | prev_permutation(_BidirectionalIterator __first, | |
20276 | _BidirectionalIterator __last, _Compare __comp) | |
20277 | { | |
20278 | ||
20279 | ||
20280 | ||
20281 | ||
20282 | ||
20283 | ||
20284 | ; | |
20285 | ||
20286 | if (__first == __last) | |
20287 | return false; | |
20288 | _BidirectionalIterator __i = __first; | |
20289 | ++__i; | |
20290 | if (__i == __last) | |
20291 | return false; | |
20292 | __i = __last; | |
20293 | --__i; | |
20294 | ||
20295 | for(;;) | |
20296 | { | |
20297 | _BidirectionalIterator __ii = __i; | |
20298 | --__i; | |
20299 | if (__comp(*__ii, *__i)) | |
20300 | { | |
20301 | _BidirectionalIterator __j = __last; | |
20302 | while (!__comp(*--__j, *__i)) | |
20303 | {} | |
20304 | std::iter_swap(__i, __j); | |
20305 | std::reverse(__ii, __last); | |
20306 | return true; | |
20307 | } | |
20308 | if (__i == __first) | |
20309 | { | |
20310 | std::reverse(__first, __last); | |
20311 | return false; | |
20312 | } | |
20313 | } | |
20314 | } | |
20315 | # 5023 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
20316 | template<typename _InputIterator, typename _ForwardIterator> | |
20317 | _InputIterator | |
20318 | find_first_of(_InputIterator __first1, _InputIterator __last1, | |
20319 | _ForwardIterator __first2, _ForwardIterator __last2) | |
20320 | { | |
20321 | ||
20322 | ||
20323 | ||
20324 | ||
20325 | ||
20326 | ||
20327 | ; | |
20328 | ; | |
20329 | ||
20330 | for ( ; __first1 != __last1; ++__first1) | |
20331 | for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) | |
20332 | if (*__first1 == *__iter) | |
20333 | return __first1; | |
20334 | return __last1; | |
20335 | } | |
20336 | # 5059 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
20337 | template<typename _InputIterator, typename _ForwardIterator, | |
20338 | typename _BinaryPredicate> | |
20339 | _InputIterator | |
20340 | find_first_of(_InputIterator __first1, _InputIterator __last1, | |
20341 | _ForwardIterator __first2, _ForwardIterator __last2, | |
20342 | _BinaryPredicate __comp) | |
20343 | { | |
20344 | ||
20345 | ||
20346 | ||
20347 | ||
20348 | ||
20349 | ||
20350 | ; | |
20351 | ; | |
20352 | ||
20353 | for ( ; __first1 != __last1; ++__first1) | |
20354 | for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) | |
20355 | if (__comp(*__first1, *__iter)) | |
20356 | return __first1; | |
20357 | return __last1; | |
20358 | } | |
20359 | # 5089 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
20360 | template<typename _ForwardIterator1, typename _ForwardIterator2> | |
20361 | _ForwardIterator1 | |
20362 | __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, | |
20363 | _ForwardIterator2 __first2, _ForwardIterator2 __last2, | |
20364 | forward_iterator_tag, forward_iterator_tag) | |
20365 | { | |
20366 | if (__first2 == __last2) | |
20367 | return __last1; | |
20368 | else | |
20369 | { | |
20370 | _ForwardIterator1 __result = __last1; | |
20371 | while (1) | |
20372 | { | |
20373 | _ForwardIterator1 __new_result | |
20374 | = std::search(__first1, __last1, __first2, __last2); | |
20375 | if (__new_result == __last1) | |
20376 | return __result; | |
20377 | else | |
20378 | { | |
20379 | __result = __new_result; | |
20380 | __first1 = __new_result; | |
20381 | ++__first1; | |
20382 | } | |
20383 | } | |
20384 | } | |
20385 | } | |
20386 | ||
20387 | template<typename _ForwardIterator1, typename _ForwardIterator2, | |
20388 | typename _BinaryPredicate> | |
20389 | _ForwardIterator1 | |
20390 | __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, | |
20391 | _ForwardIterator2 __first2, _ForwardIterator2 __last2, | |
20392 | forward_iterator_tag, forward_iterator_tag, | |
20393 | _BinaryPredicate __comp) | |
20394 | { | |
20395 | if (__first2 == __last2) | |
20396 | return __last1; | |
20397 | else | |
20398 | { | |
20399 | _ForwardIterator1 __result = __last1; | |
20400 | while (1) | |
20401 | { | |
20402 | _ForwardIterator1 __new_result | |
20403 | = std::search(__first1, __last1, __first2, __last2, __comp); | |
20404 | if (__new_result == __last1) | |
20405 | return __result; | |
20406 | else | |
20407 | { | |
20408 | __result = __new_result; | |
20409 | __first1 = __new_result; | |
20410 | ++__first1; | |
20411 | } | |
20412 | } | |
20413 | } | |
20414 | } | |
20415 | ||
20416 | ||
20417 | template<typename _BidirectionalIterator1, typename _BidirectionalIterator2> | |
20418 | _BidirectionalIterator1 | |
20419 | __find_end(_BidirectionalIterator1 __first1, | |
20420 | _BidirectionalIterator1 __last1, | |
20421 | _BidirectionalIterator2 __first2, | |
20422 | _BidirectionalIterator2 __last2, | |
20423 | bidirectional_iterator_tag, bidirectional_iterator_tag) | |
20424 | { | |
20425 | ||
20426 | ||
20427 | ||
20428 | ||
20429 | ||
20430 | ||
20431 | typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; | |
20432 | typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; | |
20433 | ||
20434 | _RevIterator1 __rlast1(__first1); | |
20435 | _RevIterator2 __rlast2(__first2); | |
20436 | _RevIterator1 __rresult = std::search(_RevIterator1(__last1), __rlast1, | |
20437 | _RevIterator2(__last2), __rlast2); | |
20438 | ||
20439 | if (__rresult == __rlast1) | |
20440 | return __last1; | |
20441 | else | |
20442 | { | |
20443 | _BidirectionalIterator1 __result = __rresult.base(); | |
20444 | std::advance(__result, -std::distance(__first2, __last2)); | |
20445 | return __result; | |
20446 | } | |
20447 | } | |
20448 | ||
20449 | template<typename _BidirectionalIterator1, typename _BidirectionalIterator2, | |
20450 | typename _BinaryPredicate> | |
20451 | _BidirectionalIterator1 | |
20452 | __find_end(_BidirectionalIterator1 __first1, | |
20453 | _BidirectionalIterator1 __last1, | |
20454 | _BidirectionalIterator2 __first2, | |
20455 | _BidirectionalIterator2 __last2, | |
20456 | bidirectional_iterator_tag, bidirectional_iterator_tag, | |
20457 | _BinaryPredicate __comp) | |
20458 | { | |
20459 | ||
20460 | ||
20461 | ||
20462 | ||
20463 | ||
20464 | ||
20465 | typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; | |
20466 | typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; | |
20467 | ||
20468 | _RevIterator1 __rlast1(__first1); | |
20469 | _RevIterator2 __rlast2(__first2); | |
20470 | _RevIterator1 __rresult = std::search(_RevIterator1(__last1), __rlast1, | |
20471 | _RevIterator2(__last2), __rlast2, | |
20472 | __comp); | |
20473 | ||
20474 | if (__rresult == __rlast1) | |
20475 | return __last1; | |
20476 | else | |
20477 | { | |
20478 | _BidirectionalIterator1 __result = __rresult.base(); | |
20479 | std::advance(__result, -std::distance(__first2, __last2)); | |
20480 | return __result; | |
20481 | } | |
20482 | } | |
20483 | # 5239 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
20484 | template<typename _ForwardIterator1, typename _ForwardIterator2> | |
20485 | inline _ForwardIterator1 | |
20486 | find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, | |
20487 | _ForwardIterator2 __first2, _ForwardIterator2 __last2) | |
20488 | { | |
20489 | ||
20490 | ||
20491 | ||
20492 | ||
20493 | ||
20494 | ||
20495 | ; | |
20496 | ; | |
20497 | ||
20498 | return std::__find_end(__first1, __last1, __first2, __last2, | |
20499 | std::__iterator_category(__first1), | |
20500 | std::__iterator_category(__first2)); | |
20501 | } | |
20502 | # 5284 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h" 3 | |
20503 | template<typename _ForwardIterator1, typename _ForwardIterator2, | |
20504 | typename _BinaryPredicate> | |
20505 | inline _ForwardIterator1 | |
20506 | find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, | |
20507 | _ForwardIterator2 __first2, _ForwardIterator2 __last2, | |
20508 | _BinaryPredicate __comp) | |
20509 | { | |
20510 | ||
20511 | ||
20512 | ||
20513 | ||
20514 | ||
20515 | ||
20516 | ; | |
20517 | ; | |
20518 | ||
20519 | return std::__find_end(__first1, __last1, __first2, __last2, | |
20520 | std::__iterator_category(__first1), | |
20521 | std::__iterator_category(__first2), | |
20522 | __comp); | |
20523 | } | |
20524 | ||
20525 | } | |
20526 | # 70 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/algorithm" 2 3 | |
20527 | ||
20528 | #pragma GCC visibility pop | |
20529 | # 57 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/string" 2 3 | |
20530 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.tcc" 1 3 | |
20531 | # 46 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.tcc" 3 | |
20532 | ||
20533 | # 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.tcc" 3 | |
20534 | ||
20535 | namespace std | |
20536 | { | |
20537 | template<typename _Type> | |
20538 | inline bool | |
20539 | __is_null_pointer(_Type* __ptr) | |
20540 | { return __ptr == 0; } | |
20541 | ||
20542 | template<typename _Type> | |
20543 | inline bool | |
20544 | __is_null_pointer(_Type) | |
20545 | { return false; } | |
20546 | ||
20547 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20548 | const typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
20549 | basic_string<_CharT, _Traits, _Alloc>:: | |
20550 | _Rep::_S_max_size = (((npos - sizeof(_Rep_base))/sizeof(_CharT)) - 1) / 4; | |
20551 | ||
20552 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20553 | const _CharT | |
20554 | basic_string<_CharT, _Traits, _Alloc>:: | |
20555 | _Rep::_S_terminal = _CharT(); | |
20556 | ||
20557 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20558 | const typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
20559 | basic_string<_CharT, _Traits, _Alloc>::npos; | |
20560 | ||
20561 | ||
20562 | ||
20563 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20564 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
20565 | basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_empty_rep_storage[ | |
20566 | (sizeof(_Rep_base) + sizeof(_CharT) + sizeof(size_type) - 1) / | |
20567 | sizeof(size_type)]; | |
20568 | ||
20569 | ||
20570 | ||
20571 | ||
20572 | ||
20573 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20574 | template<typename _InIterator> | |
20575 | _CharT* | |
20576 | basic_string<_CharT, _Traits, _Alloc>:: | |
20577 | _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, | |
20578 | input_iterator_tag) | |
20579 | { | |
20580 | ||
20581 | if (__beg == __end && __a == _Alloc()) | |
20582 | return _S_empty_rep()._M_refdata(); | |
20583 | ||
20584 | ||
20585 | _CharT __buf[128]; | |
20586 | size_type __len = 0; | |
20587 | while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT)) | |
20588 | { | |
20589 | __buf[__len++] = *__beg; | |
20590 | ++__beg; | |
20591 | } | |
20592 | _Rep* __r = _Rep::_S_create(__len, size_type(0), __a); | |
20593 | _M_copy(__r->_M_refdata(), __buf, __len); | |
20594 | try | |
20595 | { | |
20596 | while (__beg != __end) | |
20597 | { | |
20598 | if (__len == __r->_M_capacity) | |
20599 | { | |
20600 | ||
20601 | _Rep* __another = _Rep::_S_create(__len + 1, __len, __a); | |
20602 | _M_copy(__another->_M_refdata(), __r->_M_refdata(), __len); | |
20603 | __r->_M_destroy(__a); | |
20604 | __r = __another; | |
20605 | } | |
20606 | __r->_M_refdata()[__len++] = *__beg; | |
20607 | ++__beg; | |
20608 | } | |
20609 | } | |
20610 | catch(...) | |
20611 | { | |
20612 | __r->_M_destroy(__a); | |
20613 | throw; | |
20614 | } | |
20615 | __r->_M_set_length_and_sharable(__len); | |
20616 | return __r->_M_refdata(); | |
20617 | } | |
20618 | ||
20619 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20620 | template <typename _InIterator> | |
20621 | _CharT* | |
20622 | basic_string<_CharT, _Traits, _Alloc>:: | |
20623 | _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, | |
20624 | forward_iterator_tag) | |
20625 | { | |
20626 | ||
20627 | if (__beg == __end && __a == _Alloc()) | |
20628 | return _S_empty_rep()._M_refdata(); | |
20629 | ||
20630 | ||
20631 | if (__builtin_expect(__is_null_pointer(__beg) && __beg != __end, 0)) | |
20632 | __throw_logic_error(("basic_string::_S_construct NULL not valid")); | |
20633 | ||
20634 | const size_type __dnew = static_cast<size_type>(std::distance(__beg, | |
20635 | __end)); | |
20636 | ||
20637 | _Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a); | |
20638 | try | |
20639 | { _S_copy_chars(__r->_M_refdata(), __beg, __end); } | |
20640 | catch(...) | |
20641 | { | |
20642 | __r->_M_destroy(__a); | |
20643 | throw; | |
20644 | } | |
20645 | __r->_M_set_length_and_sharable(__dnew); | |
20646 | return __r->_M_refdata(); | |
20647 | } | |
20648 | ||
20649 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20650 | _CharT* | |
20651 | basic_string<_CharT, _Traits, _Alloc>:: | |
20652 | _S_construct(size_type __n, _CharT __c, const _Alloc& __a) | |
20653 | { | |
20654 | ||
20655 | if (__n == 0 && __a == _Alloc()) | |
20656 | return _S_empty_rep()._M_refdata(); | |
20657 | ||
20658 | ||
20659 | _Rep* __r = _Rep::_S_create(__n, size_type(0), __a); | |
20660 | if (__n) | |
20661 | _M_assign(__r->_M_refdata(), __n, __c); | |
20662 | ||
20663 | __r->_M_set_length_and_sharable(__n); | |
20664 | return __r->_M_refdata(); | |
20665 | } | |
20666 | ||
20667 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20668 | basic_string<_CharT, _Traits, _Alloc>:: | |
20669 | basic_string(const basic_string& __str) | |
20670 | : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(__str.get_allocator()), | |
20671 | __str.get_allocator()), | |
20672 | __str.get_allocator()) | |
20673 | { } | |
20674 | ||
20675 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20676 | basic_string<_CharT, _Traits, _Alloc>:: | |
20677 | basic_string(const _Alloc& __a) | |
20678 | : _M_dataplus(_S_construct(size_type(), _CharT(), __a), __a) | |
20679 | { } | |
20680 | ||
20681 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20682 | basic_string<_CharT, _Traits, _Alloc>:: | |
20683 | basic_string(const basic_string& __str, size_type __pos, size_type __n) | |
20684 | : _M_dataplus(_S_construct(__str._M_data() | |
20685 | + __str._M_check(__pos, | |
20686 | "basic_string::basic_string"), | |
20687 | __str._M_data() + __str._M_limit(__pos, __n) | |
20688 | + __pos, _Alloc()), _Alloc()) | |
20689 | { } | |
20690 | ||
20691 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20692 | basic_string<_CharT, _Traits, _Alloc>:: | |
20693 | basic_string(const basic_string& __str, size_type __pos, | |
20694 | size_type __n, const _Alloc& __a) | |
20695 | : _M_dataplus(_S_construct(__str._M_data() | |
20696 | + __str._M_check(__pos, | |
20697 | "basic_string::basic_string"), | |
20698 | __str._M_data() + __str._M_limit(__pos, __n) | |
20699 | + __pos, __a), __a) | |
20700 | { } | |
20701 | ||
20702 | ||
20703 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20704 | basic_string<_CharT, _Traits, _Alloc>:: | |
20705 | basic_string(const _CharT* __s, size_type __n, const _Alloc& __a) | |
20706 | : _M_dataplus(_S_construct(__s, __s + __n, __a), __a) | |
20707 | { } | |
20708 | ||
20709 | ||
20710 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20711 | basic_string<_CharT, _Traits, _Alloc>:: | |
20712 | basic_string(const _CharT* __s, const _Alloc& __a) | |
20713 | : _M_dataplus(_S_construct(__s, __s ? __s + traits_type::length(__s) : | |
20714 | __s + npos, __a), __a) | |
20715 | { } | |
20716 | ||
20717 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20718 | basic_string<_CharT, _Traits, _Alloc>:: | |
20719 | basic_string(size_type __n, _CharT __c, const _Alloc& __a) | |
20720 | : _M_dataplus(_S_construct(__n, __c, __a), __a) | |
20721 | { } | |
20722 | ||
20723 | ||
20724 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20725 | template<typename _InputIterator> | |
20726 | basic_string<_CharT, _Traits, _Alloc>:: | |
20727 | basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a) | |
20728 | : _M_dataplus(_S_construct(__beg, __end, __a), __a) | |
20729 | { } | |
20730 | ||
20731 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20732 | basic_string<_CharT, _Traits, _Alloc>& | |
20733 | basic_string<_CharT, _Traits, _Alloc>:: | |
20734 | assign(const basic_string& __str) | |
20735 | { | |
20736 | if (_M_rep() != __str._M_rep()) | |
20737 | { | |
20738 | ||
20739 | const allocator_type __a = this->get_allocator(); | |
20740 | _CharT* __tmp = __str._M_rep()->_M_grab(__a, __str.get_allocator()); | |
20741 | _M_rep()->_M_dispose(__a); | |
20742 | _M_data(__tmp); | |
20743 | } | |
20744 | return *this; | |
20745 | } | |
20746 | ||
20747 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20748 | basic_string<_CharT, _Traits, _Alloc>& | |
20749 | basic_string<_CharT, _Traits, _Alloc>:: | |
20750 | assign(const _CharT* __s, size_type __n) | |
20751 | { | |
20752 | ; | |
20753 | _M_check_length(this->size(), __n, "basic_string::assign"); | |
20754 | if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) | |
20755 | return _M_replace_safe(size_type(0), this->size(), __s, __n); | |
20756 | else | |
20757 | { | |
20758 | ||
20759 | const size_type __pos = __s - _M_data(); | |
20760 | if (__pos >= __n) | |
20761 | _M_copy(_M_data(), __s, __n); | |
20762 | else if (__pos) | |
20763 | _M_move(_M_data(), __s, __n); | |
20764 | _M_rep()->_M_set_length_and_sharable(__n); | |
20765 | return *this; | |
20766 | } | |
20767 | } | |
20768 | ||
20769 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20770 | basic_string<_CharT, _Traits, _Alloc>& | |
20771 | basic_string<_CharT, _Traits, _Alloc>:: | |
20772 | append(size_type __n, _CharT __c) | |
20773 | { | |
20774 | if (__n) | |
20775 | { | |
20776 | _M_check_length(size_type(0), __n, "basic_string::append"); | |
20777 | const size_type __len = __n + this->size(); | |
20778 | if (__len > this->capacity() || _M_rep()->_M_is_shared()) | |
20779 | this->reserve(__len); | |
20780 | _M_assign(_M_data() + this->size(), __n, __c); | |
20781 | _M_rep()->_M_set_length_and_sharable(__len); | |
20782 | } | |
20783 | return *this; | |
20784 | } | |
20785 | ||
20786 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20787 | basic_string<_CharT, _Traits, _Alloc>& | |
20788 | basic_string<_CharT, _Traits, _Alloc>:: | |
20789 | append(const _CharT* __s, size_type __n) | |
20790 | { | |
20791 | ; | |
20792 | if (__n) | |
20793 | { | |
20794 | _M_check_length(size_type(0), __n, "basic_string::append"); | |
20795 | const size_type __len = __n + this->size(); | |
20796 | if (__len > this->capacity() || _M_rep()->_M_is_shared()) | |
20797 | { | |
20798 | if (_M_disjunct(__s)) | |
20799 | this->reserve(__len); | |
20800 | else | |
20801 | { | |
20802 | const size_type __off = __s - _M_data(); | |
20803 | this->reserve(__len); | |
20804 | __s = _M_data() + __off; | |
20805 | } | |
20806 | } | |
20807 | _M_copy(_M_data() + this->size(), __s, __n); | |
20808 | _M_rep()->_M_set_length_and_sharable(__len); | |
20809 | } | |
20810 | return *this; | |
20811 | } | |
20812 | ||
20813 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20814 | basic_string<_CharT, _Traits, _Alloc>& | |
20815 | basic_string<_CharT, _Traits, _Alloc>:: | |
20816 | append(const basic_string& __str) | |
20817 | { | |
20818 | const size_type __size = __str.size(); | |
20819 | if (__size) | |
20820 | { | |
20821 | const size_type __len = __size + this->size(); | |
20822 | if (__len > this->capacity() || _M_rep()->_M_is_shared()) | |
20823 | this->reserve(__len); | |
20824 | _M_copy(_M_data() + this->size(), __str._M_data(), __size); | |
20825 | _M_rep()->_M_set_length_and_sharable(__len); | |
20826 | } | |
20827 | return *this; | |
20828 | } | |
20829 | ||
20830 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20831 | basic_string<_CharT, _Traits, _Alloc>& | |
20832 | basic_string<_CharT, _Traits, _Alloc>:: | |
20833 | append(const basic_string& __str, size_type __pos, size_type __n) | |
20834 | { | |
20835 | __str._M_check(__pos, "basic_string::append"); | |
20836 | __n = __str._M_limit(__pos, __n); | |
20837 | if (__n) | |
20838 | { | |
20839 | const size_type __len = __n + this->size(); | |
20840 | if (__len > this->capacity() || _M_rep()->_M_is_shared()) | |
20841 | this->reserve(__len); | |
20842 | _M_copy(_M_data() + this->size(), __str._M_data() + __pos, __n); | |
20843 | _M_rep()->_M_set_length_and_sharable(__len); | |
20844 | } | |
20845 | return *this; | |
20846 | } | |
20847 | ||
20848 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20849 | basic_string<_CharT, _Traits, _Alloc>& | |
20850 | basic_string<_CharT, _Traits, _Alloc>:: | |
20851 | insert(size_type __pos, const _CharT* __s, size_type __n) | |
20852 | { | |
20853 | ; | |
20854 | _M_check(__pos, "basic_string::insert"); | |
20855 | _M_check_length(size_type(0), __n, "basic_string::insert"); | |
20856 | if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) | |
20857 | return _M_replace_safe(__pos, size_type(0), __s, __n); | |
20858 | else | |
20859 | { | |
20860 | ||
20861 | const size_type __off = __s - _M_data(); | |
20862 | _M_mutate(__pos, 0, __n); | |
20863 | __s = _M_data() + __off; | |
20864 | _CharT* __p = _M_data() + __pos; | |
20865 | if (__s + __n <= __p) | |
20866 | _M_copy(__p, __s, __n); | |
20867 | else if (__s >= __p) | |
20868 | _M_copy(__p, __s + __n, __n); | |
20869 | else | |
20870 | { | |
20871 | const size_type __nleft = __p - __s; | |
20872 | _M_copy(__p, __s, __nleft); | |
20873 | _M_copy(__p + __nleft, __p + __n, __n - __nleft); | |
20874 | } | |
20875 | return *this; | |
20876 | } | |
20877 | } | |
20878 | ||
20879 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20880 | basic_string<_CharT, _Traits, _Alloc>& | |
20881 | basic_string<_CharT, _Traits, _Alloc>:: | |
20882 | replace(size_type __pos, size_type __n1, const _CharT* __s, | |
20883 | size_type __n2) | |
20884 | { | |
20885 | ; | |
20886 | _M_check(__pos, "basic_string::replace"); | |
20887 | __n1 = _M_limit(__pos, __n1); | |
20888 | _M_check_length(__n1, __n2, "basic_string::replace"); | |
20889 | bool __left; | |
20890 | if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) | |
20891 | return _M_replace_safe(__pos, __n1, __s, __n2); | |
20892 | else if ((__left = __s + __n2 <= _M_data() + __pos) | |
20893 | || _M_data() + __pos + __n1 <= __s) | |
20894 | { | |
20895 | ||
20896 | size_type __off = __s - _M_data(); | |
20897 | __left ? __off : (__off += __n2 - __n1); | |
20898 | _M_mutate(__pos, __n1, __n2); | |
20899 | _M_copy(_M_data() + __pos, _M_data() + __off, __n2); | |
20900 | return *this; | |
20901 | } | |
20902 | else | |
20903 | { | |
20904 | ||
20905 | const basic_string __tmp(__s, __n2); | |
20906 | return _M_replace_safe(__pos, __n1, __tmp._M_data(), __n2); | |
20907 | } | |
20908 | } | |
20909 | ||
20910 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20911 | void | |
20912 | basic_string<_CharT, _Traits, _Alloc>::_Rep:: | |
20913 | _M_destroy(const _Alloc& __a) throw () | |
20914 | { | |
20915 | const size_type __size = sizeof(_Rep_base) + | |
20916 | (this->_M_capacity + 1) * sizeof(_CharT); | |
20917 | _Raw_bytes_alloc(__a).deallocate(reinterpret_cast<char*>(this), __size); | |
20918 | } | |
20919 | ||
20920 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20921 | void | |
20922 | basic_string<_CharT, _Traits, _Alloc>:: | |
20923 | _M_leak_hard() | |
20924 | { | |
20925 | ||
20926 | if (_M_rep() == &_S_empty_rep()) | |
20927 | return; | |
20928 | ||
20929 | if (_M_rep()->_M_is_shared()) | |
20930 | _M_mutate(0, 0, 0); | |
20931 | _M_rep()->_M_set_leaked(); | |
20932 | } | |
20933 | ||
20934 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20935 | void | |
20936 | basic_string<_CharT, _Traits, _Alloc>:: | |
20937 | _M_mutate(size_type __pos, size_type __len1, size_type __len2) | |
20938 | { | |
20939 | const size_type __old_size = this->size(); | |
20940 | const size_type __new_size = __old_size + __len2 - __len1; | |
20941 | const size_type __how_much = __old_size - __pos - __len1; | |
20942 | ||
20943 | if (__new_size > this->capacity() || _M_rep()->_M_is_shared()) | |
20944 | { | |
20945 | ||
20946 | const allocator_type __a = get_allocator(); | |
20947 | _Rep* __r = _Rep::_S_create(__new_size, this->capacity(), __a); | |
20948 | ||
20949 | if (__pos) | |
20950 | _M_copy(__r->_M_refdata(), _M_data(), __pos); | |
20951 | if (__how_much) | |
20952 | _M_copy(__r->_M_refdata() + __pos + __len2, | |
20953 | _M_data() + __pos + __len1, __how_much); | |
20954 | ||
20955 | _M_rep()->_M_dispose(__a); | |
20956 | _M_data(__r->_M_refdata()); | |
20957 | } | |
20958 | else if (__how_much && __len1 != __len2) | |
20959 | { | |
20960 | ||
20961 | _M_move(_M_data() + __pos + __len2, | |
20962 | _M_data() + __pos + __len1, __how_much); | |
20963 | } | |
20964 | _M_rep()->_M_set_length_and_sharable(__new_size); | |
20965 | } | |
20966 | ||
20967 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20968 | void | |
20969 | basic_string<_CharT, _Traits, _Alloc>:: | |
20970 | reserve(size_type __res) | |
20971 | { | |
20972 | if (__res != this->capacity() || _M_rep()->_M_is_shared()) | |
20973 | { | |
20974 | ||
20975 | if (__res < this->size()) | |
20976 | __res = this->size(); | |
20977 | const allocator_type __a = get_allocator(); | |
20978 | _CharT* __tmp = _M_rep()->_M_clone(__a, __res - this->size()); | |
20979 | _M_rep()->_M_dispose(__a); | |
20980 | _M_data(__tmp); | |
20981 | } | |
20982 | } | |
20983 | ||
20984 | template<typename _CharT, typename _Traits, typename _Alloc> | |
20985 | void | |
20986 | basic_string<_CharT, _Traits, _Alloc>:: | |
20987 | swap(basic_string& __s) | |
20988 | { | |
20989 | if (_M_rep()->_M_is_leaked()) | |
20990 | _M_rep()->_M_set_sharable(); | |
20991 | if (__s._M_rep()->_M_is_leaked()) | |
20992 | __s._M_rep()->_M_set_sharable(); | |
20993 | if (this->get_allocator() == __s.get_allocator()) | |
20994 | { | |
20995 | _CharT* __tmp = _M_data(); | |
20996 | _M_data(__s._M_data()); | |
20997 | __s._M_data(__tmp); | |
20998 | } | |
20999 | ||
21000 | else | |
21001 | { | |
21002 | const basic_string __tmp1(_M_ibegin(), _M_iend(), | |
21003 | __s.get_allocator()); | |
21004 | const basic_string __tmp2(__s._M_ibegin(), __s._M_iend(), | |
21005 | this->get_allocator()); | |
21006 | *this = __tmp2; | |
21007 | __s = __tmp1; | |
21008 | } | |
21009 | } | |
21010 | ||
21011 | template<typename _CharT, typename _Traits, typename _Alloc> | |
21012 | typename basic_string<_CharT, _Traits, _Alloc>::_Rep* | |
21013 | basic_string<_CharT, _Traits, _Alloc>::_Rep:: | |
21014 | _S_create(size_type __capacity, size_type __old_capacity, | |
21015 | const _Alloc& __alloc) | |
21016 | { | |
21017 | ||
21018 | ||
21019 | if (__capacity > _S_max_size) | |
21020 | __throw_length_error(("basic_string::_S_create")); | |
21021 | # 558 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_string.tcc" 3 | |
21022 | const size_type __pagesize = 4096; | |
21023 | const size_type __malloc_header_size = 4 * sizeof(void*); | |
21024 | ||
21025 | ||
21026 | ||
21027 | ||
21028 | ||
21029 | ||
21030 | ||
21031 | if (__capacity > __old_capacity && __capacity < 2 * __old_capacity) | |
21032 | __capacity = 2 * __old_capacity; | |
21033 | ||
21034 | ||
21035 | ||
21036 | ||
21037 | size_type __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); | |
21038 | ||
21039 | const size_type __adj_size = __size + __malloc_header_size; | |
21040 | if (__adj_size > __pagesize && __capacity > __old_capacity) | |
21041 | { | |
21042 | const size_type __extra = __pagesize - __adj_size % __pagesize; | |
21043 | __capacity += __extra / sizeof(_CharT); | |
21044 | ||
21045 | if (__capacity > _S_max_size) | |
21046 | __capacity = _S_max_size; | |
21047 | __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); | |
21048 | } | |
21049 | ||
21050 | ||
21051 | ||
21052 | void* __place = _Raw_bytes_alloc(__alloc).allocate(__size); | |
21053 | _Rep *__p = new (__place) _Rep; | |
21054 | __p->_M_capacity = __capacity; | |
21055 | return __p; | |
21056 | } | |
21057 | ||
21058 | template<typename _CharT, typename _Traits, typename _Alloc> | |
21059 | _CharT* | |
21060 | basic_string<_CharT, _Traits, _Alloc>::_Rep:: | |
21061 | _M_clone(const _Alloc& __alloc, size_type __res) | |
21062 | { | |
21063 | ||
21064 | const size_type __requested_cap = this->_M_length + __res; | |
21065 | _Rep* __r = _Rep::_S_create(__requested_cap, this->_M_capacity, | |
21066 | __alloc); | |
21067 | if (this->_M_length) | |
21068 | _M_copy(__r->_M_refdata(), _M_refdata(), this->_M_length); | |
21069 | ||
21070 | __r->_M_set_length_and_sharable(this->_M_length); | |
21071 | return __r->_M_refdata(); | |
21072 | } | |
21073 | ||
21074 | template<typename _CharT, typename _Traits, typename _Alloc> | |
21075 | void | |
21076 | basic_string<_CharT, _Traits, _Alloc>:: | |
21077 | resize(size_type __n, _CharT __c) | |
21078 | { | |
21079 | const size_type __size = this->size(); | |
21080 | _M_check_length(__size, __n, "basic_string::resize"); | |
21081 | if (__size < __n) | |
21082 | this->append(__n - __size, __c); | |
21083 | else if (__n < __size) | |
21084 | this->erase(__n); | |
21085 | ||
21086 | } | |
21087 | ||
21088 | template<typename _CharT, typename _Traits, typename _Alloc> | |
21089 | template<typename _InputIterator> | |
21090 | basic_string<_CharT, _Traits, _Alloc>& | |
21091 | basic_string<_CharT, _Traits, _Alloc>:: | |
21092 | _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, | |
21093 | _InputIterator __k2, __false_type) | |
21094 | { | |
21095 | const basic_string __s(__k1, __k2); | |
21096 | const size_type __n1 = __i2 - __i1; | |
21097 | _M_check_length(__n1, __s.size(), "basic_string::_M_replace_dispatch"); | |
21098 | return _M_replace_safe(__i1 - _M_ibegin(), __n1, __s._M_data(), | |
21099 | __s.size()); | |
21100 | } | |
21101 | ||
21102 | template<typename _CharT, typename _Traits, typename _Alloc> | |
21103 | basic_string<_CharT, _Traits, _Alloc>& | |
21104 | basic_string<_CharT, _Traits, _Alloc>:: | |
21105 | _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, | |
21106 | _CharT __c) | |
21107 | { | |
21108 | _M_check_length(__n1, __n2, "basic_string::_M_replace_aux"); | |
21109 | _M_mutate(__pos1, __n1, __n2); | |
21110 | if (__n2) | |
21111 | _M_assign(_M_data() + __pos1, __n2, __c); | |
21112 | return *this; | |
21113 | } | |
21114 | ||
21115 | template<typename _CharT, typename _Traits, typename _Alloc> | |
21116 | basic_string<_CharT, _Traits, _Alloc>& | |
21117 | basic_string<_CharT, _Traits, _Alloc>:: | |
21118 | _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, | |
21119 | size_type __n2) | |
21120 | { | |
21121 | _M_mutate(__pos1, __n1, __n2); | |
21122 | if (__n2) | |
21123 | _M_copy(_M_data() + __pos1, __s, __n2); | |
21124 | return *this; | |
21125 | } | |
21126 | ||
21127 | template<typename _CharT, typename _Traits, typename _Alloc> | |
21128 | basic_string<_CharT, _Traits, _Alloc> | |
21129 | operator+(const _CharT* __lhs, | |
21130 | const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
21131 | { | |
21132 | ; | |
21133 | typedef basic_string<_CharT, _Traits, _Alloc> __string_type; | |
21134 | typedef typename __string_type::size_type __size_type; | |
21135 | const __size_type __len = _Traits::length(__lhs); | |
21136 | __string_type __str; | |
21137 | __str.reserve(__len + __rhs.size()); | |
21138 | __str.append(__lhs, __len); | |
21139 | __str.append(__rhs); | |
21140 | return __str; | |
21141 | } | |
21142 | ||
21143 | template<typename _CharT, typename _Traits, typename _Alloc> | |
21144 | basic_string<_CharT, _Traits, _Alloc> | |
21145 | operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) | |
21146 | { | |
21147 | typedef basic_string<_CharT, _Traits, _Alloc> __string_type; | |
21148 | typedef typename __string_type::size_type __size_type; | |
21149 | __string_type __str; | |
21150 | const __size_type __len = __rhs.size(); | |
21151 | __str.reserve(__len + 1); | |
21152 | __str.append(__size_type(1), __lhs); | |
21153 | __str.append(__rhs); | |
21154 | return __str; | |
21155 | } | |
21156 | ||
21157 | template<typename _CharT, typename _Traits, typename _Alloc> | |
21158 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
21159 | basic_string<_CharT, _Traits, _Alloc>:: | |
21160 | copy(_CharT* __s, size_type __n, size_type __pos) const | |
21161 | { | |
21162 | _M_check(__pos, "basic_string::copy"); | |
21163 | __n = _M_limit(__pos, __n); | |
21164 | ; | |
21165 | if (__n) | |
21166 | _M_copy(__s, _M_data() + __pos, __n); | |
21167 | ||
21168 | return __n; | |
21169 | } | |
21170 | ||
21171 | template<typename _CharT, typename _Traits, typename _Alloc> | |
21172 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
21173 | basic_string<_CharT, _Traits, _Alloc>:: | |
21174 | find(const _CharT* __s, size_type __pos, size_type __n) const | |
21175 | { | |
21176 | ; | |
21177 | size_type __ret = npos; | |
21178 | const size_type __size = this->size(); | |
21179 | if (__pos + __n <= __size) | |
21180 | { | |
21181 | const _CharT* __data = _M_data(); | |
21182 | const _CharT* __p = std::search(__data + __pos, __data + __size, | |
21183 | __s, __s + __n, traits_type::eq); | |
21184 | if (__p != __data + __size || __n == 0) | |
21185 | __ret = __p - __data; | |
21186 | } | |
21187 | return __ret; | |
21188 | } | |
21189 | ||
21190 | template<typename _CharT, typename _Traits, typename _Alloc> | |
21191 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
21192 | basic_string<_CharT, _Traits, _Alloc>:: | |
21193 | find(_CharT __c, size_type __pos) const | |
21194 | { | |
21195 | size_type __ret = npos; | |
21196 | const size_type __size = this->size(); | |
21197 | if (__pos < __size) | |
21198 | { | |
21199 | const _CharT* __data = _M_data(); | |
21200 | const size_type __n = __size - __pos; | |
21201 | const _CharT* __p = traits_type::find(__data + __pos, __n, __c); | |
21202 | if (__p) | |
21203 | __ret = __p - __data; | |
21204 | } | |
21205 | return __ret; | |
21206 | } | |
21207 | ||
21208 | template<typename _CharT, typename _Traits, typename _Alloc> | |
21209 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
21210 | basic_string<_CharT, _Traits, _Alloc>:: | |
21211 | rfind(const _CharT* __s, size_type __pos, size_type __n) const | |
21212 | { | |
21213 | ; | |
21214 | const size_type __size = this->size(); | |
21215 | if (__n <= __size) | |
21216 | { | |
21217 | __pos = std::min(size_type(__size - __n), __pos); | |
21218 | const _CharT* __data = _M_data(); | |
21219 | do | |
21220 | { | |
21221 | if (traits_type::compare(__data + __pos, __s, __n) == 0) | |
21222 | return __pos; | |
21223 | } | |
21224 | while (__pos-- > 0); | |
21225 | } | |
21226 | return npos; | |
21227 | } | |
21228 | ||
21229 | template<typename _CharT, typename _Traits, typename _Alloc> | |
21230 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
21231 | basic_string<_CharT, _Traits, _Alloc>:: | |
21232 | rfind(_CharT __c, size_type __pos) const | |
21233 | { | |
21234 | size_type __size = this->size(); | |
21235 | if (__size) | |
21236 | { | |
21237 | if (--__size > __pos) | |
21238 | __size = __pos; | |
21239 | for (++__size; __size-- > 0; ) | |
21240 | if (traits_type::eq(_M_data()[__size], __c)) | |
21241 | return __size; | |
21242 | } | |
21243 | return npos; | |
21244 | } | |
21245 | ||
21246 | template<typename _CharT, typename _Traits, typename _Alloc> | |
21247 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
21248 | basic_string<_CharT, _Traits, _Alloc>:: | |
21249 | find_first_of(const _CharT* __s, size_type __pos, size_type __n) const | |
21250 | { | |
21251 | ; | |
21252 | for (; __n && __pos < this->size(); ++__pos) | |
21253 | { | |
21254 | const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]); | |
21255 | if (__p) | |
21256 | return __pos; | |
21257 | } | |
21258 | return npos; | |
21259 | } | |
21260 | ||
21261 | template<typename _CharT, typename _Traits, typename _Alloc> | |
21262 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
21263 | basic_string<_CharT, _Traits, _Alloc>:: | |
21264 | find_last_of(const _CharT* __s, size_type __pos, size_type __n) const | |
21265 | { | |
21266 | ; | |
21267 | size_type __size = this->size(); | |
21268 | if (__size && __n) | |
21269 | { | |
21270 | if (--__size > __pos) | |
21271 | __size = __pos; | |
21272 | do | |
21273 | { | |
21274 | if (traits_type::find(__s, __n, _M_data()[__size])) | |
21275 | return __size; | |
21276 | } | |
21277 | while (__size-- != 0); | |
21278 | } | |
21279 | return npos; | |
21280 | } | |
21281 | ||
21282 | template<typename _CharT, typename _Traits, typename _Alloc> | |
21283 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
21284 | basic_string<_CharT, _Traits, _Alloc>:: | |
21285 | find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const | |
21286 | { | |
21287 | ; | |
21288 | for (; __pos < this->size(); ++__pos) | |
21289 | if (!traits_type::find(__s, __n, _M_data()[__pos])) | |
21290 | return __pos; | |
21291 | return npos; | |
21292 | } | |
21293 | ||
21294 | template<typename _CharT, typename _Traits, typename _Alloc> | |
21295 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
21296 | basic_string<_CharT, _Traits, _Alloc>:: | |
21297 | find_first_not_of(_CharT __c, size_type __pos) const | |
21298 | { | |
21299 | for (; __pos < this->size(); ++__pos) | |
21300 | if (!traits_type::eq(_M_data()[__pos], __c)) | |
21301 | return __pos; | |
21302 | return npos; | |
21303 | } | |
21304 | ||
21305 | template<typename _CharT, typename _Traits, typename _Alloc> | |
21306 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
21307 | basic_string<_CharT, _Traits, _Alloc>:: | |
21308 | find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const | |
21309 | { | |
21310 | ; | |
21311 | size_type __size = this->size(); | |
21312 | if (__size) | |
21313 | { | |
21314 | if (--__size > __pos) | |
21315 | __size = __pos; | |
21316 | do | |
21317 | { | |
21318 | if (!traits_type::find(__s, __n, _M_data()[__size])) | |
21319 | return __size; | |
21320 | } | |
21321 | while (__size--); | |
21322 | } | |
21323 | return npos; | |
21324 | } | |
21325 | ||
21326 | template<typename _CharT, typename _Traits, typename _Alloc> | |
21327 | typename basic_string<_CharT, _Traits, _Alloc>::size_type | |
21328 | basic_string<_CharT, _Traits, _Alloc>:: | |
21329 | find_last_not_of(_CharT __c, size_type __pos) const | |
21330 | { | |
21331 | size_type __size = this->size(); | |
21332 | if (__size) | |
21333 | { | |
21334 | if (--__size > __pos) | |
21335 | __size = __pos; | |
21336 | do | |
21337 | { | |
21338 | if (!traits_type::eq(_M_data()[__size], __c)) | |
21339 | return __size; | |
21340 | } | |
21341 | while (__size--); | |
21342 | } | |
21343 | return npos; | |
21344 | } | |
21345 | ||
21346 | template<typename _CharT, typename _Traits, typename _Alloc> | |
21347 | int | |
21348 | basic_string<_CharT, _Traits, _Alloc>:: | |
21349 | compare(size_type __pos, size_type __n, const basic_string& __str) const | |
21350 | { | |
21351 | _M_check(__pos, "basic_string::compare"); | |
21352 | __n = _M_limit(__pos, __n); | |
21353 | const size_type __osize = __str.size(); | |
21354 | const size_type __len = std::min(__n, __osize); | |
21355 | int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len); | |
21356 | if (!__r) | |
21357 | __r = __n - __osize; | |
21358 | return __r; | |
21359 | } | |
21360 | ||
21361 | template<typename _CharT, typename _Traits, typename _Alloc> | |
21362 | int | |
21363 | basic_string<_CharT, _Traits, _Alloc>:: | |
21364 | compare(size_type __pos1, size_type __n1, const basic_string& __str, | |
21365 | size_type __pos2, size_type __n2) const | |
21366 | { | |
21367 | _M_check(__pos1, "basic_string::compare"); | |
21368 | __str._M_check(__pos2, "basic_string::compare"); | |
21369 | __n1 = _M_limit(__pos1, __n1); | |
21370 | __n2 = __str._M_limit(__pos2, __n2); | |
21371 | const size_type __len = std::min(__n1, __n2); | |
21372 | int __r = traits_type::compare(_M_data() + __pos1, | |
21373 | __str.data() + __pos2, __len); | |
21374 | if (!__r) | |
21375 | __r = __n1 - __n2; | |
21376 | return __r; | |
21377 | } | |
21378 | ||
21379 | template<typename _CharT, typename _Traits, typename _Alloc> | |
21380 | int | |
21381 | basic_string<_CharT, _Traits, _Alloc>:: | |
21382 | compare(const _CharT* __s) const | |
21383 | { | |
21384 | ; | |
21385 | const size_type __size = this->size(); | |
21386 | const size_type __osize = traits_type::length(__s); | |
21387 | const size_type __len = std::min(__size, __osize); | |
21388 | int __r = traits_type::compare(_M_data(), __s, __len); | |
21389 | if (!__r) | |
21390 | __r = __size - __osize; | |
21391 | return __r; | |
21392 | } | |
21393 | ||
21394 | template<typename _CharT, typename _Traits, typename _Alloc> | |
21395 | int | |
21396 | basic_string <_CharT, _Traits, _Alloc>:: | |
21397 | compare(size_type __pos, size_type __n1, const _CharT* __s) const | |
21398 | { | |
21399 | ; | |
21400 | _M_check(__pos, "basic_string::compare"); | |
21401 | __n1 = _M_limit(__pos, __n1); | |
21402 | const size_type __osize = traits_type::length(__s); | |
21403 | const size_type __len = std::min(__n1, __osize); | |
21404 | int __r = traits_type::compare(_M_data() + __pos, __s, __len); | |
21405 | if (!__r) | |
21406 | __r = __n1 - __osize; | |
21407 | return __r; | |
21408 | } | |
21409 | ||
21410 | template<typename _CharT, typename _Traits, typename _Alloc> | |
21411 | int | |
21412 | basic_string <_CharT, _Traits, _Alloc>:: | |
21413 | compare(size_type __pos, size_type __n1, const _CharT* __s, | |
21414 | size_type __n2) const | |
21415 | { | |
21416 | ; | |
21417 | _M_check(__pos, "basic_string::compare"); | |
21418 | __n1 = _M_limit(__pos, __n1); | |
21419 | const size_type __len = std::min(__n1, __n2); | |
21420 | int __r = traits_type::compare(_M_data() + __pos, __s, __len); | |
21421 | if (!__r) | |
21422 | __r = __n1 - __n2; | |
21423 | return __r; | |
21424 | } | |
21425 | ||
21426 | ||
21427 | ||
21428 | ||
21429 | ||
21430 | extern template class basic_string<char>; | |
21431 | extern template | |
21432 | basic_istream<char>& | |
21433 | operator>>(basic_istream<char>&, string&); | |
21434 | extern template | |
21435 | basic_ostream<char>& | |
21436 | operator<<(basic_ostream<char>&, const string&); | |
21437 | extern template | |
21438 | basic_istream<char>& | |
21439 | getline(basic_istream<char>&, string&, char); | |
21440 | extern template | |
21441 | basic_istream<char>& | |
21442 | getline(basic_istream<char>&, string&); | |
21443 | ||
21444 | ||
21445 | extern template class basic_string<wchar_t>; | |
21446 | extern template | |
21447 | basic_istream<wchar_t>& | |
21448 | operator>>(basic_istream<wchar_t>&, wstring&); | |
21449 | extern template | |
21450 | basic_ostream<wchar_t>& | |
21451 | operator<<(basic_ostream<wchar_t>&, const wstring&); | |
21452 | extern template | |
21453 | basic_istream<wchar_t>& | |
21454 | getline(basic_istream<wchar_t>&, wstring&, wchar_t); | |
21455 | extern template | |
21456 | basic_istream<wchar_t>& | |
21457 | getline(basic_istream<wchar_t>&, wstring&); | |
21458 | ||
21459 | ||
21460 | } | |
21461 | # 58 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/string" 2 3 | |
21462 | ||
21463 | ||
21464 | #pragma GCC visibility pop | |
21465 | # 171 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" 2 | |
21466 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/afterstd.h" 1 | |
21467 | # 172 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" 2 | |
21468 | # 180 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
21469 | typedef std::string wxStdString; | |
21470 | # 210 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
21471 | struct wxStringData | |
21472 | { | |
21473 | int nRefs; | |
21474 | size_t nDataLength, | |
21475 | nAllocLength; | |
21476 | ||
21477 | ||
21478 | wxChar* data() const { return (wxChar*)(this + 1); } | |
21479 | ||
21480 | ||
21481 | bool IsEmpty() const { return (nRefs == -1); } | |
21482 | bool IsShared() const { return (nRefs > 1); } | |
21483 | ||
21484 | ||
21485 | void Lock() { if ( !IsEmpty() ) nRefs++; } | |
21486 | # 237 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
21487 | void Unlock() { if ( !IsEmpty() && --nRefs == 0) free(this); } | |
21488 | ||
21489 | ||
21490 | ||
21491 | ||
21492 | void Validate(bool b) { nRefs = (b ? 1 : 0); } | |
21493 | bool IsValid() const { return (nRefs != 0); } | |
21494 | }; | |
21495 | ||
21496 | class wxStringBase | |
21497 | { | |
21498 | ||
21499 | friend class wxArrayString; | |
21500 | ||
21501 | public : | |
21502 | ||
21503 | static const size_t npos; | |
21504 | protected: | |
21505 | ||
21506 | wxChar *m_pchData; | |
21507 | ||
21508 | ||
21509 | wxStringData* GetStringData() const { return (wxStringData*)m_pchData - 1; } | |
21510 | ||
21511 | ||
21512 | ||
21513 | ||
21514 | void Init() { m_pchData = (wxChar *)wxEmptyString; } | |
21515 | ||
21516 | void InitWith(const wxChar *psz, size_t nPos = 0, size_t nLen = npos); | |
21517 | ||
21518 | void Reinit() { GetStringData()->Unlock(); Init(); } | |
21519 | ||
21520 | ||
21521 | ||
21522 | bool AllocBuffer(size_t nLen); | |
21523 | ||
21524 | bool AllocCopy(wxString&, int, int) const; | |
21525 | ||
21526 | bool AssignCopy(size_t, const wxChar *); | |
21527 | ||
21528 | ||
21529 | bool ConcatSelf(size_t nLen, const wxChar *src, size_t nMaxLen); | |
21530 | bool ConcatSelf(size_t nLen, const wxChar *src) | |
21531 | { return ConcatSelf(nLen, src, nLen); } | |
21532 | ||
21533 | ||
21534 | ||
21535 | bool CopyBeforeWrite(); | |
21536 | bool AllocBeforeWrite(size_t); | |
21537 | ||
21538 | ||
21539 | bool Alloc(size_t nLen); | |
21540 | public: | |
21541 | ||
21542 | typedef wxChar value_type; | |
21543 | typedef wxChar char_type; | |
21544 | typedef size_t size_type; | |
21545 | typedef value_type& reference; | |
21546 | typedef const value_type& const_reference; | |
21547 | typedef value_type* pointer; | |
21548 | typedef const value_type* const_pointer; | |
21549 | typedef value_type *iterator; | |
21550 | typedef const value_type *const_iterator; | |
21551 | # 332 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
21552 | class const_reverse_iterator { public: typedef wxChar value_type; typedef const value_type& reference; typedef const value_type *pointer; typedef const value_type *iterator_type; const_reverse_iterator(iterator_type i) : m_cur(i) { } const_reverse_iterator(const const_reverse_iterator& ri) : m_cur(ri.m_cur) { } iterator_type base() const { return m_cur; } reference operator*() const { return *(m_cur - 1); } const_reverse_iterator& operator++() { --m_cur; return *this; } const_reverse_iterator operator++(int) { const_reverse_iterator tmp = *this; --m_cur; return tmp; } const_reverse_iterator& operator--() { ++m_cur; return *this; } const_reverse_iterator operator--(int) { const_reverse_iterator tmp = *this; ++m_cur; return tmp; } bool operator==(const_reverse_iterator ri) const { return m_cur == ri.m_cur; } bool operator!=(const_reverse_iterator ri) const { return !(*this == ri); } private: iterator_type m_cur; }; | |
21553 | ||
21554 | ||
21555 | class reverse_iterator { public: typedef wxChar value_type; typedef value_type& reference; typedef value_type *pointer; typedef value_type *iterator_type; reverse_iterator(iterator_type i) : m_cur(i) { } reverse_iterator(const reverse_iterator& ri) : m_cur(ri.m_cur) { } iterator_type base() const { return m_cur; } reference operator*() const { return *(m_cur - 1); } reverse_iterator& operator++() { --m_cur; return *this; } reverse_iterator operator++(int) { reverse_iterator tmp = *this; --m_cur; return tmp; } reverse_iterator& operator--() { ++m_cur; return *this; } reverse_iterator operator--(int) { reverse_iterator tmp = *this; ++m_cur; return tmp; } bool operator==(reverse_iterator ri) const { return m_cur == ri.m_cur; } bool operator!=(reverse_iterator ri) const { return !(*this == ri); } private: iterator_type m_cur; }; | |
21556 | ||
21557 | ||
21558 | ||
21559 | ||
21560 | ||
21561 | const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); } | |
21562 | reverse_iterator rbegin() { return reverse_iterator(end()); } | |
21563 | ||
21564 | const_reverse_iterator rend() const { return const_reverse_iterator(begin()); } | |
21565 | reverse_iterator rend() { return reverse_iterator(begin()); } | |
21566 | ||
21567 | ||
21568 | ||
21569 | ||
21570 | ||
21571 | wxStringBase() { Init(); } | |
21572 | ||
21573 | wxStringBase(const wxStringBase& stringSrc) | |
21574 | { | |
21575 | ; | |
21576 | ||
21577 | ||
21578 | if ( stringSrc.empty() ) { | |
21579 | ||
21580 | Init(); | |
21581 | } | |
21582 | else { | |
21583 | m_pchData = stringSrc.m_pchData; | |
21584 | GetStringData()->Lock(); | |
21585 | } | |
21586 | } | |
21587 | ||
21588 | wxStringBase(size_type nRepeat, wxChar ch); | |
21589 | ||
21590 | ||
21591 | wxStringBase(const wxChar *psz) | |
21592 | { InitWith(psz, 0, npos); } | |
21593 | wxStringBase(const wxChar *psz, size_t nLength) | |
21594 | { InitWith(psz, 0, nLength); } | |
21595 | wxStringBase(const wxChar *psz, wxMBConv& , size_t nLength = npos) | |
21596 | { InitWith(psz, 0, nLength); } | |
21597 | ||
21598 | wxStringBase(const wxStringBase& str, size_t nPos, size_t nLen) | |
21599 | { | |
21600 | ; | |
21601 | ||
21602 | Init(); | |
21603 | size_t strLen = str.length() - nPos; nLen = strLen < nLen ? strLen : nLen; | |
21604 | InitWith(str.c_str(), nPos, nLen); | |
21605 | } | |
21606 | ||
21607 | wxStringBase(const void *pStart, const void *pEnd); | |
21608 | ||
21609 | ||
21610 | ~wxStringBase() | |
21611 | { | |
21612 | ||
21613 | ||
21614 | ||
21615 | ||
21616 | ||
21617 | ||
21618 | GetStringData()->Unlock(); | |
21619 | } | |
21620 | ||
21621 | ||
21622 | ||
21623 | ||
21624 | ||
21625 | ||
21626 | ||
21627 | wxStringBase& operator=(const wxStringBase& stringSrc); | |
21628 | ||
21629 | wxStringBase& operator=(wxChar ch); | |
21630 | ||
21631 | wxStringBase& operator=(const wxChar *psz); | |
21632 | ||
21633 | ||
21634 | size_type size() const { return GetStringData()->nDataLength; } | |
21635 | ||
21636 | size_type length() const { return size(); } | |
21637 | ||
21638 | size_type max_size() const { return wxStringBase::npos; } | |
21639 | ||
21640 | void resize(size_t nSize, wxChar ch = '\0'); | |
21641 | ||
21642 | void clear() { erase(0, npos); } | |
21643 | ||
21644 | bool empty() const { return size() == 0; } | |
21645 | ||
21646 | void reserve(size_t sz) { Alloc(sz); } | |
21647 | size_type capacity() const { return GetStringData()->nAllocLength; } | |
21648 | ||
21649 | ||
21650 | ||
21651 | value_type at(size_type n) const | |
21652 | { ; return m_pchData[n]; } | |
21653 | ||
21654 | reference at(size_type n) | |
21655 | { ; CopyBeforeWrite(); return m_pchData[n]; } | |
21656 | ||
21657 | ||
21658 | ||
21659 | wxStringBase& append(const wxStringBase& str, size_t pos, size_t n) | |
21660 | { | |
21661 | ; | |
21662 | ConcatSelf(n, str.c_str() + pos, str.length() - pos); | |
21663 | return *this; | |
21664 | } | |
21665 | ||
21666 | wxStringBase& append(const wxStringBase& str) | |
21667 | { ConcatSelf(str.length(), str.c_str()); return *this; } | |
21668 | ||
21669 | wxStringBase& append(const wxChar *sz) | |
21670 | { ConcatSelf(wxStrlen(sz), sz); return *this; } | |
21671 | wxStringBase& append(const wxChar *sz, size_t n) | |
21672 | { ConcatSelf(n, sz); return *this; } | |
21673 | ||
21674 | wxStringBase& append(size_t n, wxChar ch); | |
21675 | ||
21676 | wxStringBase& append(const_iterator first, const_iterator last) | |
21677 | { ConcatSelf(last - first, first); return *this; } | |
21678 | ||
21679 | ||
21680 | wxStringBase& assign(const wxStringBase& str) | |
21681 | { return *this = str; } | |
21682 | ||
21683 | wxStringBase& assign(const wxStringBase& str, size_t pos, size_t n) | |
21684 | { clear(); return append(str, pos, n); } | |
21685 | ||
21686 | wxStringBase& assign(const wxChar *sz) | |
21687 | { clear(); return append(sz, wxStrlen(sz)); } | |
21688 | wxStringBase& assign(const wxChar *sz, size_t n) | |
21689 | { clear(); return append(sz, n); } | |
21690 | ||
21691 | wxStringBase& assign(size_t n, wxChar ch) | |
21692 | { clear(); return append(n, ch); } | |
21693 | ||
21694 | wxStringBase& assign(const_iterator first, const_iterator last) | |
21695 | { clear(); return append(first, last); } | |
21696 | ||
21697 | ||
21698 | const_iterator begin() const { return m_pchData; } | |
21699 | ||
21700 | const_iterator end() const { return m_pchData + length(); } | |
21701 | ||
21702 | ||
21703 | iterator begin(); | |
21704 | ||
21705 | iterator end(); | |
21706 | ||
21707 | ||
21708 | wxStringBase& insert(size_t nPos, const wxStringBase& str) | |
21709 | { | |
21710 | ; | |
21711 | return insert(nPos, str.c_str(), str.length()); | |
21712 | } | |
21713 | ||
21714 | wxStringBase& insert(size_t nPos, const wxStringBase& str, size_t nStart, size_t n) | |
21715 | { | |
21716 | ; | |
21717 | ; | |
21718 | size_t strLen = str.length() - nStart; | |
21719 | n = strLen < n ? strLen : n; | |
21720 | return insert(nPos, str.c_str() + nStart, n); | |
21721 | } | |
21722 | ||
21723 | wxStringBase& insert(size_t nPos, const wxChar *sz, size_t n = npos); | |
21724 | ||
21725 | wxStringBase& insert(size_t nPos, size_t n, wxChar ch) | |
21726 | { return insert(nPos, wxStringBase(n, ch)); } | |
21727 | iterator insert(iterator it, wxChar ch) | |
21728 | { size_t idx = it - begin(); insert(idx, 1, ch); return begin() + idx; } | |
21729 | void insert(iterator it, const_iterator first, const_iterator last) | |
21730 | { insert(it - begin(), first, last - first); } | |
21731 | void insert(iterator it, size_type n, wxChar ch) | |
21732 | { insert(it - begin(), n, ch); } | |
21733 | ||
21734 | ||
21735 | wxStringBase& erase(size_type pos = 0, size_type n = npos); | |
21736 | iterator erase(iterator first, iterator last) | |
21737 | { | |
21738 | size_t idx = first - begin(); | |
21739 | erase(idx, last - first); | |
21740 | return begin() + idx; | |
21741 | } | |
21742 | iterator erase(iterator first); | |
21743 | ||
21744 | ||
21745 | const wxChar* c_str() const { return m_pchData; } | |
21746 | const wxChar* data() const { return m_pchData; } | |
21747 | ||
21748 | ||
21749 | wxStringBase& replace(size_t nStart, size_t nLen, const wxChar* sz); | |
21750 | ||
21751 | wxStringBase& replace(size_t nStart, size_t nLen, const wxStringBase& str) | |
21752 | { return replace(nStart, nLen, str.c_str()); } | |
21753 | ||
21754 | wxStringBase& replace(size_t nStart, size_t nLen, size_t nCount, wxChar ch); | |
21755 | ||
21756 | wxStringBase& replace(size_t nStart, size_t nLen, | |
21757 | const wxStringBase& str, size_t nStart2, size_t nLen2); | |
21758 | ||
21759 | wxStringBase& replace(size_t nStart, size_t nLen, | |
21760 | const wxChar* sz, size_t nCount); | |
21761 | wxStringBase& replace(iterator first, iterator last, const_pointer s) | |
21762 | { return replace(first - begin(), last - first, s); } | |
21763 | wxStringBase& replace(iterator first, iterator last, const_pointer s, | |
21764 | size_type n) | |
21765 | { return replace(first - begin(), last - first, s, n); } | |
21766 | wxStringBase& replace(iterator first, iterator last, const wxStringBase& s) | |
21767 | { return replace(first - begin(), last - first, s); } | |
21768 | wxStringBase& replace(iterator first, iterator last, size_type n, wxChar c) | |
21769 | { return replace(first - begin(), last - first, n, c); } | |
21770 | wxStringBase& replace(iterator first, iterator last, | |
21771 | const_iterator first1, const_iterator last1) | |
21772 | { return replace(first - begin(), last - first, first1, last1 - first1); } | |
21773 | ||
21774 | ||
21775 | void swap(wxStringBase& str); | |
21776 | ||
21777 | ||
21778 | ||
21779 | ||
21780 | ||
21781 | ||
21782 | size_t find(const wxStringBase& str, size_t nStart = 0) const; | |
21783 | ||
21784 | ||
21785 | size_t find(const wxChar* sz, size_t nStart = 0, size_t n = npos) const; | |
21786 | ||
21787 | ||
21788 | size_t find(wxChar ch, size_t nStart = 0) const; | |
21789 | ||
21790 | ||
21791 | ||
21792 | ||
21793 | size_t rfind(const wxStringBase& str, size_t nStart = npos) const; | |
21794 | ||
21795 | ||
21796 | size_t rfind(const wxChar* sz, size_t nStart = npos, | |
21797 | size_t n = npos) const; | |
21798 | ||
21799 | size_t rfind(wxChar ch, size_t nStart = npos) const; | |
21800 | ||
21801 | ||
21802 | ||
21803 | ||
21804 | size_t find_first_of(const wxStringBase& str, size_t nStart = 0) const | |
21805 | { return find_first_of(str.c_str(), nStart); } | |
21806 | ||
21807 | size_t find_first_of(const wxChar* sz, size_t nStart = 0) const; | |
21808 | size_t find_first_of(const wxChar* sz, size_t nStart, size_t n) const; | |
21809 | ||
21810 | size_t find_first_of(wxChar c, size_t nStart = 0) const | |
21811 | { return find(c, nStart); } | |
21812 | ||
21813 | size_t find_last_of (const wxStringBase& str, size_t nStart = npos) const | |
21814 | { return find_last_of(str.c_str(), nStart); } | |
21815 | ||
21816 | size_t find_last_of (const wxChar* sz, size_t nStart = npos) const; | |
21817 | size_t find_last_of(const wxChar* sz, size_t nStart, size_t n) const; | |
21818 | ||
21819 | size_t find_last_of(wxChar c, size_t nStart = npos) const | |
21820 | { return rfind(c, nStart); } | |
21821 | ||
21822 | ||
21823 | ||
21824 | ||
21825 | size_t find_first_not_of(const wxStringBase& str, size_t nStart = 0) const | |
21826 | { return find_first_not_of(str.c_str(), nStart); } | |
21827 | ||
21828 | size_t find_first_not_of(const wxChar* sz, size_t nStart = 0) const; | |
21829 | size_t find_first_not_of(const wxChar* sz, size_t nStart, size_t n) const; | |
21830 | ||
21831 | size_t find_first_not_of(wxChar ch, size_t nStart = 0) const; | |
21832 | ||
21833 | size_t find_last_not_of(const wxStringBase& str, size_t nStart = npos) const | |
21834 | { return find_last_not_of(str.c_str(), nStart); } | |
21835 | ||
21836 | size_t find_last_not_of(const wxChar* sz, size_t nStart = npos) const; | |
21837 | size_t find_last_not_of(const wxChar* sz, size_t nStart, size_t n) const; | |
21838 | ||
21839 | size_t find_last_not_of(wxChar ch, size_t nStart = npos) const; | |
21840 | ||
21841 | ||
21842 | ||
21843 | ||
21844 | ||
21845 | int compare(const wxStringBase& str) const; | |
21846 | ||
21847 | int compare(size_t nStart, size_t nLen, const wxStringBase& str) const; | |
21848 | ||
21849 | int compare(size_t nStart, size_t nLen, | |
21850 | const wxStringBase& str, size_t nStart2, size_t nLen2) const; | |
21851 | ||
21852 | int compare(const wxChar* sz) const; | |
21853 | ||
21854 | int compare(size_t nStart, size_t nLen, | |
21855 | const wxChar* sz, size_t nCount = npos) const; | |
21856 | ||
21857 | size_type copy(wxChar* s, size_type n, size_type pos = 0); | |
21858 | ||
21859 | ||
21860 | wxStringBase substr(size_t nStart = 0, size_t nLen = npos) const; | |
21861 | ||
21862 | ||
21863 | wxStringBase& operator+=(const wxStringBase& s) { return append(s); } | |
21864 | ||
21865 | wxStringBase& operator+=(const wxChar *psz) { return append(psz); } | |
21866 | ||
21867 | wxStringBase& operator+=(wxChar ch) { return append(1, ch); } | |
21868 | }; | |
21869 | # 657 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
21870 | class wxString : public wxStringBase | |
21871 | { | |
21872 | ||
21873 | friend class wxArrayString; | |
21874 | ||
21875 | ||
21876 | ||
21877 | ||
21878 | ||
21879 | private: | |
21880 | ||
21881 | ||
21882 | ||
21883 | ||
21884 | ||
21885 | ||
21886 | ||
21887 | wxString& operator=(int); | |
21888 | ||
21889 | ||
21890 | ||
21891 | ||
21892 | ||
21893 | wxString(int); | |
21894 | ||
21895 | public: | |
21896 | ||
21897 | ||
21898 | wxString() : wxStringBase() { } | |
21899 | ||
21900 | wxString(const wxStringBase& stringSrc) : wxStringBase(stringSrc) { } | |
21901 | wxString(const wxString& stringSrc) : wxStringBase(stringSrc) { } | |
21902 | ||
21903 | wxString(wxChar ch, size_t nRepeat = 1) | |
21904 | : wxStringBase(nRepeat, ch) { } | |
21905 | wxString(size_t nRepeat, wxChar ch) | |
21906 | : wxStringBase(nRepeat, ch) { } | |
21907 | ||
21908 | ||
21909 | wxString(const wxChar *psz) | |
21910 | : wxStringBase(psz ? psz : "") { } | |
21911 | wxString(const wxChar *psz, size_t nLength) | |
21912 | : wxStringBase(psz, nLength) { } | |
21913 | wxString(const wxChar *psz, wxMBConv& , size_t nLength = npos) | |
21914 | : wxStringBase(psz, nLength == npos ? wxStrlen(psz) : nLength) { } | |
21915 | # 710 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
21916 | wxString(const wxStdString& s) | |
21917 | : wxStringBase(s.c_str()) { } | |
21918 | # 721 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
21919 | wxString(const unsigned char* psz, size_t nLength = npos) | |
21920 | : wxStringBase((const char*)psz, nLength) { } | |
21921 | ||
21922 | ||
21923 | ||
21924 | wxString(const wchar_t *pwz, wxMBConv& conv = wxConvLibc, size_t nLength = npos); | |
21925 | ||
21926 | ||
21927 | ||
21928 | wxString(const wxCharBuffer& psz) | |
21929 | : wxStringBase(psz) { } | |
21930 | ||
21931 | ||
21932 | ||
21933 | ||
21934 | size_t Len() const { return length(); } | |
21935 | ||
21936 | bool IsEmpty() const { return empty(); } | |
21937 | ||
21938 | bool operator!() const { return IsEmpty(); } | |
21939 | ||
21940 | wxString& Truncate(size_t uiLen); | |
21941 | ||
21942 | void Empty() | |
21943 | { | |
21944 | Truncate(0); | |
21945 | ||
21946 | ; | |
21947 | } | |
21948 | ||
21949 | void Clear() | |
21950 | { | |
21951 | wxString tmp(wxEmptyString); | |
21952 | swap(tmp); | |
21953 | } | |
21954 | ||
21955 | ||
21956 | ||
21957 | bool IsAscii() const; | |
21958 | ||
21959 | bool IsNumber() const; | |
21960 | ||
21961 | bool IsWord() const; | |
21962 | ||
21963 | ||
21964 | ||
21965 | wxChar GetChar(size_t n) const | |
21966 | { return at(n); } | |
21967 | ||
21968 | wxChar& GetWritableChar(size_t n) | |
21969 | { return at(n); } | |
21970 | ||
21971 | void SetChar(size_t n, wxChar ch) | |
21972 | { at(n) = ch; } | |
21973 | ||
21974 | ||
21975 | wxChar Last() const | |
21976 | { | |
21977 | ; | |
21978 | ||
21979 | return at(length() - 1); | |
21980 | } | |
21981 | ||
21982 | ||
21983 | wxChar& Last() | |
21984 | { | |
21985 | ; | |
21986 | return at(length() - 1); | |
21987 | } | |
21988 | # 813 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
21989 | wxChar& operator[](int n) | |
21990 | { return wxStringBase::at(n); } | |
21991 | wxChar& operator[](size_type n) | |
21992 | { return wxStringBase::at(n); } | |
21993 | ||
21994 | wxChar& operator[](unsigned int n) | |
21995 | { return wxStringBase::at(n); } | |
21996 | ||
21997 | ||
21998 | ||
21999 | operator const wxChar*() const { return c_str(); } | |
22000 | ||
22001 | ||
22002 | const wxChar* wx_str() const { return c_str(); } | |
22003 | ||
22004 | const wxChar* GetData() const { return c_str(); } | |
22005 | # 841 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
22006 | static wxString FromAscii(const char *ascii) { return wxString( ascii ); } | |
22007 | static wxString FromAscii(const char ascii) { return wxString( ascii ); } | |
22008 | const char *ToAscii() const { return c_str(); } | |
22009 | # 871 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
22010 | const wxChar* mb_str() const { return c_str(); } | |
22011 | ||
22012 | ||
22013 | const wxChar* mb_str(wxMBConv& ) const { return c_str(); } | |
22014 | ||
22015 | const wxChar* mbc_str() const { return mb_str(); } | |
22016 | ||
22017 | ||
22018 | const wxWCharBuffer wc_str(wxMBConv& conv) const; | |
22019 | ||
22020 | ||
22021 | ||
22022 | ||
22023 | const wxChar* fn_str() const { return c_str(); } | |
22024 | ||
22025 | ||
22026 | ||
22027 | ||
22028 | ||
22029 | wxString& operator=(const wxStringBase& stringSrc) | |
22030 | { return (wxString&)wxStringBase::operator=(stringSrc); } | |
22031 | ||
22032 | wxString& operator=(wxChar ch) | |
22033 | { return (wxString&)wxStringBase::operator=(ch); } | |
22034 | ||
22035 | ||
22036 | ||
22037 | ||
22038 | ||
22039 | ||
22040 | wxString& operator=(const wxChar *psz) | |
22041 | { return (wxString&)wxStringBase::operator=(psz); } | |
22042 | # 911 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
22043 | wxString& operator=(const unsigned char* psz); | |
22044 | ||
22045 | ||
22046 | wxString& operator=(const wchar_t *pwz); | |
22047 | ||
22048 | ||
22049 | wxString& operator=(const wxCharBuffer& psz) | |
22050 | { (void) operator=((const char *)psz); return *this; } | |
22051 | # 929 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
22052 | wxString& operator<<(const wxString& s) | |
22053 | { | |
22054 | ||
22055 | ; | |
22056 | ||
22057 | ||
22058 | ||
22059 | append(s); | |
22060 | return *this; | |
22061 | } | |
22062 | ||
22063 | wxString& operator<<(const wxChar *psz) | |
22064 | { append(psz); return *this; } | |
22065 | ||
22066 | wxString& operator<<(wxChar ch) { append(1, ch); return *this; } | |
22067 | # 952 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
22068 | wxString& operator<<(const wxCharBuffer& s) | |
22069 | { (void)operator<<((const char *)s); return *this; } | |
22070 | void operator+=(const wxCharBuffer& s) | |
22071 | { (void)operator<<((const char *)s); } | |
22072 | ||
22073 | ||
22074 | ||
22075 | wxString& Append(const wxString& s) | |
22076 | { | |
22077 | ||
22078 | if ( empty() ) | |
22079 | *this = s; | |
22080 | else | |
22081 | append(s); | |
22082 | return *this; | |
22083 | } | |
22084 | wxString& Append(const wxChar* psz) | |
22085 | { append(psz); return *this; } | |
22086 | ||
22087 | wxString& Append(wxChar ch, size_t count = 1u) | |
22088 | { append(count, ch); return *this; } | |
22089 | wxString& Append(const wxChar* psz, size_t nLen) | |
22090 | { append(psz, nLen); return *this; } | |
22091 | ||
22092 | ||
22093 | wxString& Prepend(const wxString& str) | |
22094 | { *this = str + *this; return *this; } | |
22095 | ||
22096 | ||
22097 | ||
22098 | friend wxString operator+(const wxString& string1, const wxString& string2); | |
22099 | ||
22100 | friend wxString operator+(const wxString& string, wxChar ch); | |
22101 | ||
22102 | friend wxString operator+(wxChar ch, const wxString& string); | |
22103 | ||
22104 | friend wxString operator+(const wxString& string, const wxChar *psz); | |
22105 | ||
22106 | friend wxString operator+(const wxChar *psz, const wxString& string); | |
22107 | ||
22108 | ||
22109 | ||
22110 | wxString& operator<<(int i) | |
22111 | { return (*this) << Format("%d", i); } | |
22112 | ||
22113 | wxString& operator<<(unsigned int ui) | |
22114 | { return (*this) << Format("%u", ui); } | |
22115 | ||
22116 | wxString& operator<<(long l) | |
22117 | { return (*this) << Format("%ld", l); } | |
22118 | ||
22119 | wxString& operator<<(unsigned long ul) | |
22120 | { return (*this) << Format("%lu", ul); } | |
22121 | # 1022 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
22122 | wxString& operator<<(float f) | |
22123 | { return (*this) << Format("%f", f); } | |
22124 | ||
22125 | wxString& operator<<(double d) | |
22126 | { return (*this) << Format("%g", d); } | |
22127 | ||
22128 | ||
22129 | ||
22130 | int Cmp(const wxChar *psz) const; | |
22131 | int Cmp(const wxString& s) const; | |
22132 | ||
22133 | int CmpNoCase(const wxChar *psz) const; | |
22134 | int CmpNoCase(const wxString& s) const; | |
22135 | ||
22136 | ||
22137 | bool IsSameAs(const wxChar *psz, bool compareWithCase = true) const | |
22138 | { return (compareWithCase ? Cmp(psz) : CmpNoCase(psz)) == 0; } | |
22139 | ||
22140 | bool IsSameAs(wxChar c, bool compareWithCase = true) const | |
22141 | { | |
22142 | return (length() == 1) && (compareWithCase ? GetChar(0u) == c | |
22143 | : toupper(GetChar(0u)) == toupper(c)); | |
22144 | } | |
22145 | ||
22146 | ||
22147 | ||
22148 | ||
22149 | wxString Mid(size_t nFirst, size_t nCount = npos) const; | |
22150 | ||
22151 | ||
22152 | wxString operator()(size_t start, size_t len) const | |
22153 | { return Mid(start, len); } | |
22154 | ||
22155 | ||
22156 | ||
22157 | ||
22158 | bool StartsWith(const wxChar *prefix, wxString *rest = __null) const; | |
22159 | ||
22160 | ||
22161 | wxString Left(size_t nCount) const; | |
22162 | ||
22163 | wxString Right(size_t nCount) const; | |
22164 | ||
22165 | ||
22166 | wxString BeforeFirst(wxChar ch) const; | |
22167 | ||
22168 | ||
22169 | wxString BeforeLast(wxChar ch) const; | |
22170 | ||
22171 | ||
22172 | wxString AfterFirst(wxChar ch) const; | |
22173 | ||
22174 | ||
22175 | wxString AfterLast(wxChar ch) const; | |
22176 | ||
22177 | ||
22178 | wxString Before(wxChar ch) const { return BeforeLast(ch); } | |
22179 | wxString After(wxChar ch) const { return AfterFirst(ch); } | |
22180 | ||
22181 | ||
22182 | ||
22183 | wxString& MakeUpper(); | |
22184 | ||
22185 | ||
22186 | wxString Upper() const ; | |
22187 | ||
22188 | wxString& MakeLower(); | |
22189 | ||
22190 | wxString Lower() const ; | |
22191 | ||
22192 | ||
22193 | ||
22194 | wxString& Trim(bool bFromRight = true); | |
22195 | ||
22196 | wxString& Pad(size_t nCount, wxChar chPad = ' ', bool bFromRight = true); | |
22197 | ||
22198 | ||
22199 | ||
22200 | int Find(wxChar ch, bool bFromEnd = false) const; | |
22201 | ||
22202 | int Find(const wxChar *pszSub) const; | |
22203 | ||
22204 | ||
22205 | size_t Replace(const wxChar *szOld, | |
22206 | const wxChar *szNew, | |
22207 | bool bReplaceAll = true); | |
22208 | ||
22209 | ||
22210 | bool Matches(const wxChar *szMask) const; | |
22211 | ||
22212 | ||
22213 | ||
22214 | ||
22215 | ||
22216 | ||
22217 | ||
22218 | bool ToLong(long *val, int base = 10) const; | |
22219 | ||
22220 | bool ToULong(unsigned long *val, int base = 10) const; | |
22221 | ||
22222 | bool ToDouble(double *val) const; | |
22223 | ||
22224 | ||
22225 | ||
22226 | ||
22227 | int Printf(const wxChar *pszFormat, ...) __attribute__ ((__format__ (__printf__, 2, 3))); | |
22228 | ||
22229 | int PrintfV(const wxChar* pszFormat, va_list argptr); | |
22230 | ||
22231 | ||
22232 | static wxString Format(const wxChar *pszFormat, ...) __attribute__ ((__format__ (__printf__, 1, 2))); | |
22233 | ||
22234 | static wxString FormatV(const wxChar *pszFormat, va_list argptr); | |
22235 | ||
22236 | ||
22237 | ||
22238 | ||
22239 | bool Alloc(size_t nLen) { reserve(nLen); return true; } | |
22240 | ||
22241 | ||
22242 | bool Shrink(); | |
22243 | ||
22244 | ||
22245 | ||
22246 | wxChar *GetWriteBuf(size_t nLen); | |
22247 | ||
22248 | void UngetWriteBuf(); | |
22249 | void UngetWriteBuf(size_t nLen); | |
22250 | ||
22251 | ||
22252 | ||
22253 | ||
22254 | ||
22255 | wxString SubString(size_t from, size_t to) const | |
22256 | { return Mid(from, (to - from + 1)); } | |
22257 | ||
22258 | enum caseCompare {exact, ignoreCase}; | |
22259 | ||
22260 | enum stripType {leading = 0x1, trailing = 0x2, both = 0x3}; | |
22261 | ||
22262 | ||
22263 | ||
22264 | int sprintf(const wxChar *pszFormat, ...) __attribute__ ((__format__ (__printf__, 2, 3))); | |
22265 | ||
22266 | ||
22267 | inline int CompareTo(const wxChar* psz, caseCompare cmp = exact) const | |
22268 | { return cmp == exact ? Cmp(psz) : CmpNoCase(psz); } | |
22269 | ||
22270 | ||
22271 | size_t Length() const { return length(); } | |
22272 | ||
22273 | int Freq(wxChar ch) const; | |
22274 | ||
22275 | void LowerCase() { MakeLower(); } | |
22276 | ||
22277 | void UpperCase() { MakeUpper(); } | |
22278 | ||
22279 | wxString Strip(stripType w = trailing) const; | |
22280 | ||
22281 | ||
22282 | size_t Index(const wxChar* psz) const { return Find(psz); } | |
22283 | size_t Index(wxChar ch) const { return Find(ch); } | |
22284 | ||
22285 | wxString& Remove(size_t pos) { return Truncate(pos); } | |
22286 | wxString& RemoveLast(size_t n = 1) { return Truncate(length() - n); } | |
22287 | ||
22288 | wxString& Remove(size_t nStart, size_t nLen) | |
22289 | { return (wxString&)erase( nStart, nLen ); } | |
22290 | ||
22291 | ||
22292 | int First( const wxChar ch ) const { return Find(ch); } | |
22293 | int First( const wxChar* psz ) const { return Find(psz); } | |
22294 | int First( const wxString &str ) const { return Find(str); } | |
22295 | int Last( const wxChar ch ) const { return Find(ch, true); } | |
22296 | bool Contains(const wxString& str) const { return Find(str) != (-1); } | |
22297 | ||
22298 | ||
22299 | bool IsNull() const { return empty(); } | |
22300 | ||
22301 | ||
22302 | ||
22303 | ||
22304 | wxString(const wxString& str, size_t nPos, size_t nLen) | |
22305 | : wxStringBase(str, nPos, nLen) { } | |
22306 | ||
22307 | wxString(const void *pStart, const void *pEnd) | |
22308 | : wxStringBase((const wxChar*)pStart, (const wxChar*)pEnd) { } | |
22309 | ||
22310 | ||
22311 | ||
22312 | ||
22313 | ||
22314 | ||
22315 | ||
22316 | wxString& append(const wxString& str, size_t pos, size_t n) | |
22317 | { return (wxString&)wxStringBase::append(str, pos, n); } | |
22318 | ||
22319 | wxString& append(const wxString& str) | |
22320 | { return (wxString&)wxStringBase::append(str); } | |
22321 | ||
22322 | wxString& append(const wxChar *sz) | |
22323 | { return (wxString&)wxStringBase::append(sz); } | |
22324 | wxString& append(const wxChar *sz, size_t n) | |
22325 | { return (wxString&)wxStringBase::append(sz, n); } | |
22326 | ||
22327 | wxString& append(size_t n, wxChar ch) | |
22328 | { return (wxString&)wxStringBase::append(n, ch); } | |
22329 | ||
22330 | wxString& append(const_iterator first, const_iterator last) | |
22331 | { return (wxString&)wxStringBase::append(first, last); } | |
22332 | ||
22333 | ||
22334 | wxString& assign(const wxString& str) | |
22335 | { return (wxString&)wxStringBase::assign(str); } | |
22336 | ||
22337 | wxString& assign(const wxString& str, size_t pos, size_t n) | |
22338 | { return (wxString&)wxStringBase::assign(str, pos, n); } | |
22339 | ||
22340 | wxString& assign(const wxChar *sz) | |
22341 | { return (wxString&)wxStringBase::assign(sz); } | |
22342 | wxString& assign(const wxChar *sz, size_t n) | |
22343 | { return (wxString&)wxStringBase::assign(sz, n); } | |
22344 | ||
22345 | wxString& assign(size_t n, wxChar ch) | |
22346 | { return (wxString&)wxStringBase::assign(n, ch); } | |
22347 | ||
22348 | wxString& assign(const_iterator first, const_iterator last) | |
22349 | { return (wxString&)wxStringBase::assign(first, last); } | |
22350 | # 1267 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
22351 | wxString& insert(size_t nPos, const wxString& str) | |
22352 | { return (wxString&)wxStringBase::insert(nPos, str); } | |
22353 | ||
22354 | wxString& insert(size_t nPos, const wxString& str, size_t nStart, size_t n) | |
22355 | { return (wxString&)wxStringBase::insert(nPos, str, nStart, n); } | |
22356 | ||
22357 | wxString& insert(size_t nPos, const wxChar *sz) | |
22358 | { return (wxString&)wxStringBase::insert(nPos, sz); } | |
22359 | wxString& insert(size_t nPos, const wxChar *sz, size_t n) | |
22360 | { return (wxString&)wxStringBase::insert(nPos, sz, n); } | |
22361 | ||
22362 | wxString& insert(size_t nPos, size_t n, wxChar ch) | |
22363 | { return (wxString&)wxStringBase::insert(nPos, n, ch); } | |
22364 | iterator insert(iterator it, wxChar ch) | |
22365 | { return wxStringBase::insert(it, ch); } | |
22366 | void insert(iterator it, const_iterator first, const_iterator last) | |
22367 | { wxStringBase::insert(it, first, last); } | |
22368 | void insert(iterator it, size_type n, wxChar ch) | |
22369 | { wxStringBase::insert(it, n, ch); } | |
22370 | ||
22371 | ||
22372 | wxString& erase(size_type pos = 0, size_type n = npos) | |
22373 | { return (wxString&)wxStringBase::erase(pos, n); } | |
22374 | iterator erase(iterator first, iterator last) | |
22375 | { return wxStringBase::erase(first, last); } | |
22376 | iterator erase(iterator first) | |
22377 | { return wxStringBase::erase(first); } | |
22378 | ||
22379 | ||
22380 | ||
22381 | ||
22382 | ||
22383 | ||
22384 | wxString& replace(size_t nStart, size_t nLen, const wxChar* sz) | |
22385 | { return (wxString&)wxStringBase::replace(nStart, nLen, sz); } | |
22386 | ||
22387 | wxString& replace(size_t nStart, size_t nLen, const wxString& str) | |
22388 | { return (wxString&)wxStringBase::replace(nStart, nLen, str); } | |
22389 | ||
22390 | wxString& replace(size_t nStart, size_t nLen, size_t nCount, wxChar ch) | |
22391 | { return (wxString&)wxStringBase::replace(nStart, nLen, nCount, ch); } | |
22392 | ||
22393 | wxString& replace(size_t nStart, size_t nLen, | |
22394 | const wxString& str, size_t nStart2, size_t nLen2) | |
22395 | { return (wxString&)wxStringBase::replace(nStart, nLen, str, | |
22396 | nStart2, nLen2); } | |
22397 | ||
22398 | wxString& replace(size_t nStart, size_t nLen, | |
22399 | const wxChar* sz, size_t nCount) | |
22400 | { return (wxString&)wxStringBase::replace(nStart, nLen, sz, nCount); } | |
22401 | wxString& replace(iterator first, iterator last, const_pointer s) | |
22402 | { return (wxString&)wxStringBase::replace(first, last, s); } | |
22403 | wxString& replace(iterator first, iterator last, const_pointer s, | |
22404 | size_type n) | |
22405 | { return (wxString&)wxStringBase::replace(first, last, s, n); } | |
22406 | wxString& replace(iterator first, iterator last, const wxString& s) | |
22407 | { return (wxString&)wxStringBase::replace(first, last, s); } | |
22408 | wxString& replace(iterator first, iterator last, size_type n, wxChar c) | |
22409 | { return (wxString&)wxStringBase::replace(first, last, n, c); } | |
22410 | wxString& replace(iterator first, iterator last, | |
22411 | const_iterator first1, const_iterator last1) | |
22412 | { return (wxString&)wxStringBase::replace(first, last, first1, last1); } | |
22413 | ||
22414 | ||
22415 | wxString& operator+=(const wxString& s) | |
22416 | { return (wxString&)wxStringBase::operator+=(s); } | |
22417 | ||
22418 | wxString& operator+=(const wxChar *psz) | |
22419 | { return (wxString&)wxStringBase::operator+=(psz); } | |
22420 | ||
22421 | wxString& operator+=(wxChar ch) | |
22422 | { return (wxString&)wxStringBase::operator+=(ch); } | |
22423 | }; | |
22424 | ||
22425 | ||
22426 | ||
22427 | ||
22428 | ||
22429 | wxString operator+(const wxString& string1, const wxString& string2); | |
22430 | wxString operator+(const wxString& string, wxChar ch); | |
22431 | wxString operator+(wxChar ch, const wxString& string); | |
22432 | wxString operator+(const wxString& string, const wxChar *psz); | |
22433 | wxString operator+(const wxChar *psz, const wxString& string); | |
22434 | ||
22435 | ||
22436 | ||
22437 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/arrstr.h" 1 | |
22438 | # 16 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/arrstr.h" | |
22439 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" 1 | |
22440 | # 17 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/arrstr.h" 2 | |
22441 | ||
22442 | int wxStringSortAscending(wxString*, wxString*); | |
22443 | int wxStringSortDescending(wxString*, wxString*); | |
22444 | # 98 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/arrstr.h" | |
22445 | class wxArrayString | |
22446 | { | |
22447 | public: | |
22448 | ||
22449 | typedef int ( *CompareFunction)(const wxString& first, | |
22450 | const wxString& second); | |
22451 | ||
22452 | ||
22453 | typedef int ( *CompareFunction2)(wxString* first, | |
22454 | wxString* second); | |
22455 | ||
22456 | ||
22457 | ||
22458 | wxArrayString() { Init(false); } | |
22459 | # 120 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/arrstr.h" | |
22460 | wxArrayString(int autoSort) { Init(autoSort != 0); } | |
22461 | ||
22462 | wxArrayString(size_t sz, const wxChar** a); | |
22463 | ||
22464 | wxArrayString(size_t sz, const wxString* a); | |
22465 | ||
22466 | wxArrayString(const wxArrayString& array); | |
22467 | ||
22468 | wxArrayString& operator=(const wxArrayString& src); | |
22469 | ||
22470 | ~wxArrayString(); | |
22471 | ||
22472 | ||
22473 | ||
22474 | void Empty(); | |
22475 | ||
22476 | void Clear(); | |
22477 | ||
22478 | void Alloc(size_t nCount); | |
22479 | ||
22480 | void Shrink(); | |
22481 | ||
22482 | ||
22483 | ||
22484 | size_t GetCount() const { return m_nCount; } | |
22485 | ||
22486 | bool IsEmpty() const { return m_nCount == 0; } | |
22487 | ||
22488 | size_t Count() const { return m_nCount; } | |
22489 | ||
22490 | ||
22491 | ||
22492 | wxString& Item(size_t nIndex) const | |
22493 | { | |
22494 | ; | |
22495 | ||
22496 | ||
22497 | return *(wxString *)&(m_pItems[nIndex]); | |
22498 | } | |
22499 | ||
22500 | ||
22501 | wxString& operator[](size_t nIndex) const { return Item(nIndex); } | |
22502 | ||
22503 | wxString& Last() const | |
22504 | { | |
22505 | ; | |
22506 | ||
22507 | return Item(Count() - 1); | |
22508 | } | |
22509 | ||
22510 | ||
22511 | ||
22512 | ||
22513 | ||
22514 | ||
22515 | wxString* GetStringArray() const __attribute__ ((deprecated)); | |
22516 | ||
22517 | ||
22518 | ||
22519 | ||
22520 | ||
22521 | ||
22522 | ||
22523 | int Index (const wxChar *sz, bool bCase = true, bool bFromEnd = false) const; | |
22524 | ||
22525 | ||
22526 | size_t Add(const wxString& str, size_t nInsert = 1); | |
22527 | ||
22528 | void Insert(const wxString& str, size_t uiIndex, size_t nInsert = 1); | |
22529 | ||
22530 | void SetCount(size_t count); | |
22531 | ||
22532 | void Remove(const wxChar *sz); | |
22533 | ||
22534 | ||
22535 | void Remove(size_t nIndex, size_t nRemove = 1) __attribute__ ((deprecated)); | |
22536 | ||
22537 | void RemoveAt(size_t nIndex, size_t nRemove = 1); | |
22538 | ||
22539 | ||
22540 | ||
22541 | ||
22542 | void Sort(bool reverseOrder = false); | |
22543 | ||
22544 | void Sort(CompareFunction compareFunction); | |
22545 | void Sort(CompareFunction2 compareFunction); | |
22546 | ||
22547 | ||
22548 | ||
22549 | bool operator==(const wxArrayString& a) const; | |
22550 | ||
22551 | bool operator!=(const wxArrayString& a) const { return !(*this == a); } | |
22552 | ||
22553 | ||
22554 | typedef wxString value_type; | |
22555 | typedef value_type* pointer; | |
22556 | typedef const value_type* const_pointer; | |
22557 | typedef value_type* iterator; | |
22558 | typedef const value_type* const_iterator; | |
22559 | typedef value_type& reference; | |
22560 | typedef const value_type& const_reference; | |
22561 | typedef int difference_type; | |
22562 | typedef size_t size_type; | |
22563 | ||
22564 | ||
22565 | class reverse_iterator | |
22566 | { | |
22567 | typedef wxString value_type; | |
22568 | typedef value_type* pointer; | |
22569 | typedef value_type& reference; | |
22570 | typedef reverse_iterator itor; | |
22571 | friend itor operator+(int o, const itor& it); | |
22572 | friend itor operator+(const itor& it, int o); | |
22573 | friend itor operator-(const itor& it, int o); | |
22574 | friend difference_type operator -(const itor& i1, const itor& i2); | |
22575 | public: | |
22576 | pointer m_ptr; | |
22577 | reverse_iterator() : m_ptr(__null) { } | |
22578 | reverse_iterator(pointer ptr) : m_ptr(ptr) { } | |
22579 | reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { } | |
22580 | reference operator*() const { return *m_ptr; } | |
22581 | pointer operator->() const { return m_ptr; } | |
22582 | itor& operator++() { --m_ptr; return *this; } | |
22583 | const itor operator++(int) | |
22584 | { reverse_iterator tmp = *this; --m_ptr; return tmp; } | |
22585 | itor& operator--() { ++m_ptr; return *this; } | |
22586 | const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; } | |
22587 | bool operator ==(const itor& it) const { return m_ptr == it.m_ptr; } | |
22588 | bool operator !=(const itor& it) const { return m_ptr != it.m_ptr; } | |
22589 | }; | |
22590 | ||
22591 | class const_reverse_iterator | |
22592 | { | |
22593 | typedef wxString value_type; | |
22594 | typedef const value_type* pointer; | |
22595 | typedef const value_type& reference; | |
22596 | typedef const_reverse_iterator itor; | |
22597 | friend itor operator+(int o, const itor& it); | |
22598 | friend itor operator+(const itor& it, int o); | |
22599 | friend itor operator-(const itor& it, int o); | |
22600 | friend difference_type operator -(const itor& i1, const itor& i2); | |
22601 | public: | |
22602 | pointer m_ptr; | |
22603 | const_reverse_iterator() : m_ptr(__null) { } | |
22604 | const_reverse_iterator(pointer ptr) : m_ptr(ptr) { } | |
22605 | const_reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { } | |
22606 | const_reverse_iterator(const reverse_iterator& it) : m_ptr(it.m_ptr) { } | |
22607 | reference operator*() const { return *m_ptr; } | |
22608 | pointer operator->() const { return m_ptr; } | |
22609 | itor& operator++() { --m_ptr; return *this; } | |
22610 | const itor operator++(int) | |
22611 | { itor tmp = *this; --m_ptr; return tmp; } | |
22612 | itor& operator--() { ++m_ptr; return *this; } | |
22613 | const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; } | |
22614 | bool operator ==(const itor& it) const { return m_ptr == it.m_ptr; } | |
22615 | bool operator !=(const itor& it) const { return m_ptr != it.m_ptr; } | |
22616 | }; | |
22617 | ||
22618 | wxArrayString(const_iterator first, const_iterator last) | |
22619 | { Init(false); assign(first, last); } | |
22620 | wxArrayString(size_type n, const_reference v) { Init(false); assign(n, v); } | |
22621 | void assign(const_iterator first, const_iterator last); | |
22622 | void assign(size_type n, const_reference v) | |
22623 | { clear(); Add(v, n); } | |
22624 | reference back() { return *(end() - 1); } | |
22625 | const_reference back() const { return *(end() - 1); } | |
22626 | iterator begin() { return (wxString *)&(m_pItems[0]); } | |
22627 | const_iterator begin() const { return (wxString *)&(m_pItems[0]); } | |
22628 | size_type capacity() const { return m_nSize; } | |
22629 | void clear() { Clear(); } | |
22630 | bool empty() const { return IsEmpty(); } | |
22631 | iterator end() { return begin() + GetCount(); } | |
22632 | const_iterator end() const { return begin() + GetCount(); } | |
22633 | iterator erase(iterator first, iterator last) | |
22634 | { | |
22635 | size_t idx = first - begin(); | |
22636 | RemoveAt(idx, last - first); | |
22637 | return begin() + idx; | |
22638 | } | |
22639 | iterator erase(iterator it) { return erase(it, it + 1); } | |
22640 | reference front() { return *begin(); } | |
22641 | const_reference front() const { return *begin(); } | |
22642 | void insert(iterator it, size_type n, const_reference v) | |
22643 | { Insert(v, it - begin(), n); } | |
22644 | iterator insert(iterator it, const_reference v = value_type()) | |
22645 | { size_t idx = it - begin(); Insert(v, idx); return begin() + idx; } | |
22646 | void insert(iterator it, const_iterator first, const_iterator last); | |
22647 | size_type max_size() const { return 2147483647; } | |
22648 | void pop_back() { RemoveAt(GetCount() - 1); } | |
22649 | void push_back(const_reference v) { Add(v); } | |
22650 | reverse_iterator rbegin() { return reverse_iterator(end() - 1); } | |
22651 | const_reverse_iterator rbegin() const; | |
22652 | reverse_iterator rend() { return reverse_iterator(begin() - 1); } | |
22653 | const_reverse_iterator rend() const; | |
22654 | void reserve(size_type n) ; | |
22655 | void resize(size_type n, value_type v = value_type()); | |
22656 | size_type size() const { return GetCount(); } | |
22657 | ||
22658 | protected: | |
22659 | void Init(bool autoSort); | |
22660 | void Copy(const wxArrayString& src); | |
22661 | ||
22662 | private: | |
22663 | void Grow(size_t nIncrement = 0); | |
22664 | void Free(); | |
22665 | ||
22666 | void DoSort(); | |
22667 | ||
22668 | size_t m_nSize, | |
22669 | m_nCount; | |
22670 | ||
22671 | wxChar **m_pItems; | |
22672 | ||
22673 | bool m_autoSort; | |
22674 | }; | |
22675 | ||
22676 | class wxSortedArrayString : public wxArrayString | |
22677 | { | |
22678 | public: | |
22679 | wxSortedArrayString() : wxArrayString(true) | |
22680 | { } | |
22681 | wxSortedArrayString(const wxArrayString& array) : wxArrayString(true) | |
22682 | { Copy(array); } | |
22683 | }; | |
22684 | ||
22685 | ||
22686 | ||
22687 | ||
22688 | ||
22689 | class wxCArrayString | |
22690 | { | |
22691 | public: | |
22692 | wxCArrayString( const wxArrayString& array ) | |
22693 | : m_array( array ), m_strings( __null ) | |
22694 | { } | |
22695 | ~wxCArrayString() { delete[] m_strings; } | |
22696 | ||
22697 | size_t GetCount() const { return m_array.GetCount(); } | |
22698 | wxString* GetStrings() | |
22699 | { | |
22700 | if( m_strings ) return m_strings; | |
22701 | size_t count = m_array.GetCount(); | |
22702 | m_strings = new wxString[count]; | |
22703 | for( size_t i = 0; i < count; ++i ) | |
22704 | m_strings[i] = m_array[i]; | |
22705 | return m_strings; | |
22706 | } | |
22707 | private: | |
22708 | const wxArrayString& m_array; | |
22709 | wxString* m_strings; | |
22710 | }; | |
22711 | # 1354 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" 2 | |
22712 | ||
22713 | ||
22714 | ||
22715 | ||
22716 | ||
22717 | ||
22718 | ||
22719 | inline const wxString& wxGetEmptyString() | |
22720 | { | |
22721 | return *(wxString *)&wxEmptyString; | |
22722 | } | |
22723 | # 1426 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
22724 | class wxStringBuffer | |
22725 | { | |
22726 | public: | |
22727 | wxStringBuffer(wxString& str, size_t lenWanted = 1024) | |
22728 | : m_str(str), m_buf(__null) | |
22729 | { m_buf = m_str.GetWriteBuf(lenWanted); } | |
22730 | ||
22731 | ~wxStringBuffer() { m_str.UngetWriteBuf(); } | |
22732 | ||
22733 | operator wxChar*() const { return m_buf; } | |
22734 | ||
22735 | private: | |
22736 | wxString& m_str; | |
22737 | wxChar *m_buf; | |
22738 | ||
22739 | private: wxStringBuffer(const wxStringBuffer&); wxStringBuffer& operator=(const wxStringBuffer&); | |
22740 | }; | |
22741 | ||
22742 | class wxStringBufferLength | |
22743 | { | |
22744 | public: | |
22745 | wxStringBufferLength(wxString& str, size_t lenWanted = 1024) | |
22746 | : m_str(str), m_buf(__null), m_len(0), m_lenSet(false) | |
22747 | { | |
22748 | m_buf = m_str.GetWriteBuf(lenWanted); | |
22749 | ; | |
22750 | } | |
22751 | ||
22752 | ~wxStringBufferLength() | |
22753 | { | |
22754 | ; | |
22755 | m_str.UngetWriteBuf(m_len); | |
22756 | } | |
22757 | ||
22758 | operator wxChar*() const { return m_buf; } | |
22759 | void SetLength(size_t length) { m_len = length; m_lenSet = true; } | |
22760 | ||
22761 | private: | |
22762 | wxString& m_str; | |
22763 | wxChar *m_buf; | |
22764 | size_t m_len; | |
22765 | bool m_lenSet; | |
22766 | ||
22767 | private: wxStringBufferLength(const wxStringBufferLength&); wxStringBufferLength& operator=(const wxStringBufferLength&); | |
22768 | }; | |
22769 | # 1483 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
22770 | inline bool operator==(const wxString& s1, const wxString& s2) | |
22771 | { return (s1.Len() == s2.Len()) && (s1.Cmp(s2) == 0); } | |
22772 | inline bool operator==(const wxString& s1, const wxChar * s2) | |
22773 | { return s1.Cmp(s2) == 0; } | |
22774 | inline bool operator==(const wxChar * s1, const wxString& s2) | |
22775 | { return s2.Cmp(s1) == 0; } | |
22776 | inline bool operator!=(const wxString& s1, const wxString& s2) | |
22777 | { return (s1.Len() != s2.Len()) || (s1.Cmp(s2) != 0); } | |
22778 | inline bool operator!=(const wxString& s1, const wxChar * s2) | |
22779 | { return s1.Cmp(s2) != 0; } | |
22780 | inline bool operator!=(const wxChar * s1, const wxString& s2) | |
22781 | { return s2.Cmp(s1) != 0; } | |
22782 | inline bool operator< (const wxString& s1, const wxString& s2) | |
22783 | { return s1.Cmp(s2) < 0; } | |
22784 | inline bool operator< (const wxString& s1, const wxChar * s2) | |
22785 | { return s1.Cmp(s2) < 0; } | |
22786 | inline bool operator< (const wxChar * s1, const wxString& s2) | |
22787 | { return s2.Cmp(s1) > 0; } | |
22788 | inline bool operator> (const wxString& s1, const wxString& s2) | |
22789 | { return s1.Cmp(s2) > 0; } | |
22790 | inline bool operator> (const wxString& s1, const wxChar * s2) | |
22791 | { return s1.Cmp(s2) > 0; } | |
22792 | inline bool operator> (const wxChar * s1, const wxString& s2) | |
22793 | { return s2.Cmp(s1) < 0; } | |
22794 | inline bool operator<=(const wxString& s1, const wxString& s2) | |
22795 | { return s1.Cmp(s2) <= 0; } | |
22796 | inline bool operator<=(const wxString& s1, const wxChar * s2) | |
22797 | { return s1.Cmp(s2) <= 0; } | |
22798 | inline bool operator<=(const wxChar * s1, const wxString& s2) | |
22799 | { return s2.Cmp(s1) >= 0; } | |
22800 | inline bool operator>=(const wxString& s1, const wxString& s2) | |
22801 | { return s1.Cmp(s2) >= 0; } | |
22802 | inline bool operator>=(const wxString& s1, const wxChar * s2) | |
22803 | { return s1.Cmp(s2) >= 0; } | |
22804 | inline bool operator>=(const wxChar * s1, const wxString& s2) | |
22805 | { return s2.Cmp(s1) <= 0; } | |
22806 | # 1530 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
22807 | inline bool operator==(const wxString& s1, const wxCharBuffer& s2) | |
22808 | { return (s1.Cmp((const char *)s2) == 0); } | |
22809 | inline bool operator==(const wxCharBuffer& s1, const wxString& s2) | |
22810 | { return (s2.Cmp((const char *)s1) == 0); } | |
22811 | inline bool operator!=(const wxString& s1, const wxCharBuffer& s2) | |
22812 | { return (s1.Cmp((const char *)s2) != 0); } | |
22813 | inline bool operator!=(const wxCharBuffer& s1, const wxString& s2) | |
22814 | { return (s2.Cmp((const char *)s1) != 0); } | |
22815 | # 1546 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
22816 | inline wxString operator+(const wxString& string, const wxCharBuffer& buf) | |
22817 | { return string + (const char *)buf; } | |
22818 | inline wxString operator+(const wxCharBuffer& buf, const wxString& string) | |
22819 | { return (const char *)buf + string; } | |
22820 | ||
22821 | ||
22822 | ||
22823 | ||
22824 | ||
22825 | ||
22826 | inline bool operator==(wxChar c, const wxString& s) { return s.IsSameAs(c); } | |
22827 | inline bool operator==(const wxString& s, wxChar c) { return s.IsSameAs(c); } | |
22828 | inline bool operator!=(wxChar c, const wxString& s) { return !s.IsSameAs(c); } | |
22829 | inline bool operator!=(const wxString& s, wxChar c) { return !s.IsSameAs(c); } | |
22830 | # 1570 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" | |
22831 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/iosfwrap.h" 1 | |
22832 | # 1571 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" 2 | |
22833 | ||
22834 | std:: istream& operator>>(std:: istream&, wxString&); | |
22835 | std:: ostream& operator<<(std:: ostream&, const wxString&); | |
22836 | # 21 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/memory.h" 2 | |
22837 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/msgout.h" 1 | |
22838 | # 38 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/msgout.h" | |
22839 | class wxMessageOutput | |
22840 | { | |
22841 | public: | |
22842 | virtual ~wxMessageOutput() { } | |
22843 | ||
22844 | ||
22845 | virtual void Printf(const wxChar* format, ...) __attribute__ ((__format__ (__printf__, 2, 3))) = 0; | |
22846 | ||
22847 | ||
22848 | ||
22849 | static wxMessageOutput* Get(); | |
22850 | ||
22851 | ||
22852 | static wxMessageOutput* Set(wxMessageOutput* msgout); | |
22853 | ||
22854 | private: | |
22855 | static wxMessageOutput* ms_msgOut; | |
22856 | }; | |
22857 | # 65 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/msgout.h" | |
22858 | class wxMessageOutputBest : public wxMessageOutput | |
22859 | { | |
22860 | public: | |
22861 | wxMessageOutputBest() { } | |
22862 | ||
22863 | virtual void Printf(const wxChar* format, ...) __attribute__ ((__format__ (__printf__, 2, 3))); | |
22864 | }; | |
22865 | ||
22866 | ||
22867 | ||
22868 | ||
22869 | ||
22870 | ||
22871 | ||
22872 | class wxMessageOutputStderr : public wxMessageOutput | |
22873 | { | |
22874 | public: | |
22875 | wxMessageOutputStderr() { } | |
22876 | ||
22877 | virtual void Printf(const wxChar* format, ...) __attribute__ ((__format__ (__printf__, 2, 3))); | |
22878 | }; | |
22879 | ||
22880 | ||
22881 | ||
22882 | ||
22883 | ||
22884 | ||
22885 | ||
22886 | class wxMessageOutputMessageBox : public wxMessageOutput | |
22887 | { | |
22888 | public: | |
22889 | wxMessageOutputMessageBox() { } | |
22890 | ||
22891 | virtual void Printf(const wxChar* format, ...) __attribute__ ((__format__ (__printf__, 2, 3))); | |
22892 | }; | |
22893 | ||
22894 | ||
22895 | ||
22896 | ||
22897 | ||
22898 | ||
22899 | ||
22900 | class wxMessageOutputDebug : public wxMessageOutput | |
22901 | { | |
22902 | public: | |
22903 | wxMessageOutputDebug() { } | |
22904 | ||
22905 | virtual void Printf(const wxChar* format, ...) __attribute__ ((__format__ (__printf__, 2, 3))); | |
22906 | }; | |
22907 | ||
22908 | ||
22909 | ||
22910 | ||
22911 | ||
22912 | class wxMessageOutputLog : public wxMessageOutput | |
22913 | { | |
22914 | public: | |
22915 | wxMessageOutputLog() { } | |
22916 | ||
22917 | virtual void Printf(const wxChar* format, ...) __attribute__ ((__format__ (__printf__, 2, 3))); | |
22918 | }; | |
22919 | # 22 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/memory.h" 2 | |
22920 | # 26 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/object.h" 2 | |
22921 | ||
22922 | class wxObject; | |
22923 | # 50 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/object.h" | |
22924 | class wxClassInfo; | |
22925 | class wxHashTable; | |
22926 | class wxObjectRefData; | |
22927 | ||
22928 | ||
22929 | ||
22930 | ||
22931 | ||
22932 | typedef wxObject *(*wxObjectConstructorFn)(void); | |
22933 | ||
22934 | class wxClassInfo | |
22935 | { | |
22936 | public: | |
22937 | wxClassInfo( const wxChar *className, | |
22938 | const wxClassInfo *baseInfo1, | |
22939 | const wxClassInfo *baseInfo2, | |
22940 | int size, | |
22941 | wxObjectConstructorFn ctor ) | |
22942 | : m_className(className) | |
22943 | , m_objectSize(size) | |
22944 | , m_objectConstructor(ctor) | |
22945 | , m_baseInfo1(baseInfo1) | |
22946 | , m_baseInfo2(baseInfo2) | |
22947 | , m_next(sm_first) | |
22948 | { | |
22949 | sm_first = this; | |
22950 | Register(); | |
22951 | } | |
22952 | ||
22953 | ~wxClassInfo(); | |
22954 | ||
22955 | wxObject *CreateObject() { return m_objectConstructor ? (*m_objectConstructor)() : 0; } | |
22956 | ||
22957 | const wxChar *GetClassName() const { return m_className; } | |
22958 | const wxChar *GetBaseClassName1() const | |
22959 | { return m_baseInfo1 ? m_baseInfo1->GetClassName() : __null; } | |
22960 | const wxChar *GetBaseClassName2() const | |
22961 | { return m_baseInfo2 ? m_baseInfo2->GetClassName() : __null; } | |
22962 | const wxClassInfo *GetBaseClass1() const { return m_baseInfo1; } | |
22963 | const wxClassInfo *GetBaseClass2() const { return m_baseInfo2; } | |
22964 | int GetSize() const { return m_objectSize; } | |
22965 | ||
22966 | wxObjectConstructorFn GetConstructor() const { return m_objectConstructor; } | |
22967 | static const wxClassInfo *GetFirst() { return sm_first; } | |
22968 | const wxClassInfo *GetNext() const { return m_next; } | |
22969 | static wxClassInfo *FindClass(const wxChar *className); | |
22970 | ||
22971 | ||
22972 | ||
22973 | ||
22974 | bool IsKindOf(const wxClassInfo *info) const | |
22975 | { | |
22976 | return info != 0 && | |
22977 | ( info == this || | |
22978 | ( m_baseInfo1 && m_baseInfo1->IsKindOf(info) ) || | |
22979 | ( m_baseInfo2 && m_baseInfo2->IsKindOf(info) ) ); | |
22980 | } | |
22981 | ||
22982 | ||
22983 | ||
22984 | static void InitializeClasses() __attribute__ ((deprecated)); | |
22985 | ||
22986 | static void CleanUpClasses() __attribute__ ((deprecated)); | |
22987 | ||
22988 | static void CleanUp(); | |
22989 | ||
22990 | public: | |
22991 | const wxChar *m_className; | |
22992 | int m_objectSize; | |
22993 | wxObjectConstructorFn m_objectConstructor; | |
22994 | ||
22995 | ||
22996 | ||
22997 | const wxClassInfo *m_baseInfo1; | |
22998 | const wxClassInfo *m_baseInfo2; | |
22999 | ||
23000 | ||
23001 | ||
23002 | ||
23003 | static wxClassInfo *sm_first; | |
23004 | wxClassInfo *m_next; | |
23005 | ||
23006 | ||
23007 | ||
23008 | static wxHashTable *sm_classTable; | |
23009 | ||
23010 | private: | |
23011 | ||
23012 | static wxClassInfo *GetBaseByName(const wxChar *name); | |
23013 | ||
23014 | private: wxClassInfo(const wxClassInfo&); wxClassInfo& operator=(const wxClassInfo&); | |
23015 | ||
23016 | protected: | |
23017 | ||
23018 | void Register(); | |
23019 | void Unregister(); | |
23020 | }; | |
23021 | ||
23022 | wxObject *wxCreateDynamicObject(const wxChar *name); | |
23023 | ||
23024 | ||
23025 | inline void wxClassInfo::InitializeClasses() {} | |
23026 | inline void wxClassInfo::CleanUpClasses() {} | |
23027 | # 400 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/object.h" | |
23028 | class wxObject | |
23029 | { | |
23030 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; | |
23031 | ||
23032 | private: | |
23033 | void InitFrom(const wxObject& other); | |
23034 | ||
23035 | public: | |
23036 | wxObject() { m_refData = __null; } | |
23037 | virtual ~wxObject() { UnRef(); } | |
23038 | ||
23039 | wxObject(const wxObject& other) | |
23040 | { | |
23041 | InitFrom(other); | |
23042 | } | |
23043 | ||
23044 | wxObject& operator=(const wxObject& other) | |
23045 | { | |
23046 | if ( this != &other ) | |
23047 | { | |
23048 | UnRef(); | |
23049 | InitFrom(other); | |
23050 | } | |
23051 | return *this; | |
23052 | } | |
23053 | ||
23054 | bool IsKindOf(wxClassInfo *info) const; | |
23055 | # 462 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/object.h" | |
23056 | wxObjectRefData *GetRefData() const { return m_refData; } | |
23057 | void SetRefData(wxObjectRefData *data) { m_refData = data; } | |
23058 | ||
23059 | ||
23060 | void Ref(const wxObject& clone); | |
23061 | ||
23062 | ||
23063 | void UnRef(); | |
23064 | ||
23065 | ||
23066 | ||
23067 | ||
23068 | virtual void ReservedObjectFunc1() {} | |
23069 | virtual void ReservedObjectFunc2() {} | |
23070 | virtual void ReservedObjectFunc3() {} | |
23071 | virtual void ReservedObjectFunc4() {} | |
23072 | virtual void ReservedObjectFunc5() {} | |
23073 | virtual void ReservedObjectFunc6() {} | |
23074 | virtual void ReservedObjectFunc7() {} | |
23075 | virtual void ReservedObjectFunc8() {} | |
23076 | virtual void ReservedObjectFunc9() {} | |
23077 | ||
23078 | ||
23079 | protected: | |
23080 | ||
23081 | ||
23082 | ||
23083 | void AllocExclusive(); | |
23084 | ||
23085 | ||
23086 | ||
23087 | ||
23088 | ||
23089 | virtual wxObjectRefData *CreateRefData() const; | |
23090 | ||
23091 | ||
23092 | virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const; | |
23093 | ||
23094 | wxObjectRefData *m_refData; | |
23095 | }; | |
23096 | ||
23097 | ||
23098 | ||
23099 | ||
23100 | ||
23101 | class wxObjectRefData | |
23102 | { | |
23103 | friend class wxObject; | |
23104 | ||
23105 | public: | |
23106 | wxObjectRefData() : m_count(1) { } | |
23107 | virtual ~wxObjectRefData() { } | |
23108 | ||
23109 | int GetRefCount() const { return m_count; } | |
23110 | ||
23111 | private: | |
23112 | int m_count; | |
23113 | }; | |
23114 | ||
23115 | ||
23116 | inline wxObject *wxCheckDynamicCast(wxObject *obj, wxClassInfo *classInfo) | |
23117 | { | |
23118 | return obj && obj->GetClassInfo()->IsKindOf(classInfo) ? obj : __null; | |
23119 | } | |
23120 | # 17 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
23121 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dynarray.h" 1 | |
23122 | # 72 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dynarray.h" | |
23123 | extern "C" | |
23124 | { | |
23125 | typedef int ( *CMPFUNC)(const void* pItem1, const void* pItem2); | |
23126 | } | |
23127 | # 809 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dynarray.h" | |
23128 | typedef const void * _wxArraywxBaseArrayPtrVoid; class wxBaseArrayPtrVoid { typedef CMPFUNC SCMPFUNC; public: wxBaseArrayPtrVoid(); wxBaseArrayPtrVoid(const wxBaseArrayPtrVoid& array); wxBaseArrayPtrVoid& operator=(const wxBaseArrayPtrVoid& src); ~wxBaseArrayPtrVoid(); void Empty() { m_nCount = 0; } void Clear(); void Alloc(size_t uiSize); void Shrink(); size_t GetCount() const { return m_nCount; } void SetCount(size_t n, _wxArraywxBaseArrayPtrVoid defval = _wxArraywxBaseArrayPtrVoid()); bool IsEmpty() const { return m_nCount == 0; } size_t Count() const { return m_nCount; } typedef _wxArraywxBaseArrayPtrVoid base_type; protected: _wxArraywxBaseArrayPtrVoid& Item(size_t uiIndex) const { ; return m_pItems[uiIndex]; } _wxArraywxBaseArrayPtrVoid& operator[](size_t uiIndex) const { return Item(uiIndex); } int Index(_wxArraywxBaseArrayPtrVoid lItem, bool bFromEnd = false) const; int Index(_wxArraywxBaseArrayPtrVoid lItem, CMPFUNC fnCompare) const; size_t IndexForInsert(_wxArraywxBaseArrayPtrVoid lItem, CMPFUNC fnCompare) const; void Add(_wxArraywxBaseArrayPtrVoid lItem, size_t nInsert = 1); size_t Add(_wxArraywxBaseArrayPtrVoid lItem, CMPFUNC fnCompare); void Insert(_wxArraywxBaseArrayPtrVoid lItem, size_t uiIndex, size_t nInsert = 1); void Remove(_wxArraywxBaseArrayPtrVoid lItem); void RemoveAt(size_t uiIndex, size_t nRemove = 1); void Sort(CMPFUNC fnCompare); typedef _wxArraywxBaseArrayPtrVoid value_type; typedef value_type* iterator; typedef const value_type* const_iterator; typedef value_type& reference; typedef const value_type& const_reference; typedef int difference_type; typedef size_t size_type; void assign(const_iterator first, const_iterator last); void assign(size_type n, const_reference v); size_type capacity() const { return m_nSize; } iterator erase(iterator first, iterator last) { size_type idx = first - begin(); RemoveAt(idx, last - first); return begin() + idx; } iterator erase(iterator it) { return erase(it, it + 1); } void insert(iterator it, size_type n, const value_type& v) { Insert(v, it - begin(), n); } iterator insert(iterator it, const value_type& v = value_type()) { size_type idx = it - begin(); Insert(v, idx); return begin() + idx; } void insert(iterator it, const_iterator first, const_iterator last); void pop_back() { RemoveAt(size() - 1); } void push_back(const value_type& v) { Add(v); } void reserve(size_type n) { if(n > m_nSize) Realloc(n); } void resize(size_type n, value_type v = value_type()); iterator begin() { return m_pItems; } iterator end() { return m_pItems + m_nCount; } const_iterator begin() const { return m_pItems; } const_iterator end() const { return m_pItems + m_nCount; } public: void clear() { Clear(); } bool empty() const { return IsEmpty(); } size_type max_size() const { return 2147483647; } size_type size() const { return GetCount(); } private: void Grow(size_t nIncrement = 0); bool Realloc(size_t nSize); size_t m_nSize, m_nCount; _wxArraywxBaseArrayPtrVoid *m_pItems; }; | |
23129 | ||
23130 | typedef short _wxArraywxBaseArrayShort; class wxBaseArrayShort { typedef CMPFUNC SCMPFUNC; public: wxBaseArrayShort(); wxBaseArrayShort(const wxBaseArrayShort& array); wxBaseArrayShort& operator=(const wxBaseArrayShort& src); ~wxBaseArrayShort(); void Empty() { m_nCount = 0; } void Clear(); void Alloc(size_t uiSize); void Shrink(); size_t GetCount() const { return m_nCount; } void SetCount(size_t n, _wxArraywxBaseArrayShort defval = _wxArraywxBaseArrayShort()); bool IsEmpty() const { return m_nCount == 0; } size_t Count() const { return m_nCount; } typedef _wxArraywxBaseArrayShort base_type; protected: _wxArraywxBaseArrayShort& Item(size_t uiIndex) const { ; return m_pItems[uiIndex]; } _wxArraywxBaseArrayShort& operator[](size_t uiIndex) const { return Item(uiIndex); } int Index(_wxArraywxBaseArrayShort lItem, bool bFromEnd = false) const; int Index(_wxArraywxBaseArrayShort lItem, CMPFUNC fnCompare) const; size_t IndexForInsert(_wxArraywxBaseArrayShort lItem, CMPFUNC fnCompare) const; void Add(_wxArraywxBaseArrayShort lItem, size_t nInsert = 1); size_t Add(_wxArraywxBaseArrayShort lItem, CMPFUNC fnCompare); void Insert(_wxArraywxBaseArrayShort lItem, size_t uiIndex, size_t nInsert = 1); void Remove(_wxArraywxBaseArrayShort lItem); void RemoveAt(size_t uiIndex, size_t nRemove = 1); void Sort(CMPFUNC fnCompare); typedef _wxArraywxBaseArrayShort value_type; typedef value_type* iterator; typedef const value_type* const_iterator; typedef value_type& reference; typedef const value_type& const_reference; typedef int difference_type; typedef size_t size_type; void assign(const_iterator first, const_iterator last); void assign(size_type n, const_reference v); size_type capacity() const { return m_nSize; } iterator erase(iterator first, iterator last) { size_type idx = first - begin(); RemoveAt(idx, last - first); return begin() + idx; } iterator erase(iterator it) { return erase(it, it + 1); } void insert(iterator it, size_type n, const value_type& v) { Insert(v, it - begin(), n); } iterator insert(iterator it, const value_type& v = value_type()) { size_type idx = it - begin(); Insert(v, idx); return begin() + idx; } void insert(iterator it, const_iterator first, const_iterator last); void pop_back() { RemoveAt(size() - 1); } void push_back(const value_type& v) { Add(v); } void reserve(size_type n) { if(n > m_nSize) Realloc(n); } void resize(size_type n, value_type v = value_type()); iterator begin() { return m_pItems; } iterator end() { return m_pItems + m_nCount; } const_iterator begin() const { return m_pItems; } const_iterator end() const { return m_pItems + m_nCount; } public: void clear() { Clear(); } bool empty() const { return IsEmpty(); } size_type max_size() const { return 2147483647; } size_type size() const { return GetCount(); } private: void Grow(size_t nIncrement = 0); bool Realloc(size_t nSize); size_t m_nSize, m_nCount; _wxArraywxBaseArrayShort *m_pItems; }; | |
23131 | typedef int _wxArraywxBaseArrayInt; class wxBaseArrayInt { typedef CMPFUNC SCMPFUNC; public: wxBaseArrayInt(); wxBaseArrayInt(const wxBaseArrayInt& array); wxBaseArrayInt& operator=(const wxBaseArrayInt& src); ~wxBaseArrayInt(); void Empty() { m_nCount = 0; } void Clear(); void Alloc(size_t uiSize); void Shrink(); size_t GetCount() const { return m_nCount; } void SetCount(size_t n, _wxArraywxBaseArrayInt defval = _wxArraywxBaseArrayInt()); bool IsEmpty() const { return m_nCount == 0; } size_t Count() const { return m_nCount; } typedef _wxArraywxBaseArrayInt base_type; protected: _wxArraywxBaseArrayInt& Item(size_t uiIndex) const { ; return m_pItems[uiIndex]; } _wxArraywxBaseArrayInt& operator[](size_t uiIndex) const { return Item(uiIndex); } int Index(_wxArraywxBaseArrayInt lItem, bool bFromEnd = false) const; int Index(_wxArraywxBaseArrayInt lItem, CMPFUNC fnCompare) const; size_t IndexForInsert(_wxArraywxBaseArrayInt lItem, CMPFUNC fnCompare) const; void Add(_wxArraywxBaseArrayInt lItem, size_t nInsert = 1); size_t Add(_wxArraywxBaseArrayInt lItem, CMPFUNC fnCompare); void Insert(_wxArraywxBaseArrayInt lItem, size_t uiIndex, size_t nInsert = 1); void Remove(_wxArraywxBaseArrayInt lItem); void RemoveAt(size_t uiIndex, size_t nRemove = 1); void Sort(CMPFUNC fnCompare); typedef _wxArraywxBaseArrayInt value_type; typedef value_type* iterator; typedef const value_type* const_iterator; typedef value_type& reference; typedef const value_type& const_reference; typedef int difference_type; typedef size_t size_type; void assign(const_iterator first, const_iterator last); void assign(size_type n, const_reference v); size_type capacity() const { return m_nSize; } iterator erase(iterator first, iterator last) { size_type idx = first - begin(); RemoveAt(idx, last - first); return begin() + idx; } iterator erase(iterator it) { return erase(it, it + 1); } void insert(iterator it, size_type n, const value_type& v) { Insert(v, it - begin(), n); } iterator insert(iterator it, const value_type& v = value_type()) { size_type idx = it - begin(); Insert(v, idx); return begin() + idx; } void insert(iterator it, const_iterator first, const_iterator last); void pop_back() { RemoveAt(size() - 1); } void push_back(const value_type& v) { Add(v); } void reserve(size_type n) { if(n > m_nSize) Realloc(n); } void resize(size_type n, value_type v = value_type()); iterator begin() { return m_pItems; } iterator end() { return m_pItems + m_nCount; } const_iterator begin() const { return m_pItems; } const_iterator end() const { return m_pItems + m_nCount; } public: void clear() { Clear(); } bool empty() const { return IsEmpty(); } size_type max_size() const { return 2147483647; } size_type size() const { return GetCount(); } private: void Grow(size_t nIncrement = 0); bool Realloc(size_t nSize); size_t m_nSize, m_nCount; _wxArraywxBaseArrayInt *m_pItems; }; | |
23132 | typedef long _wxArraywxBaseArrayLong; class wxBaseArrayLong { typedef CMPFUNC SCMPFUNC; public: wxBaseArrayLong(); wxBaseArrayLong(const wxBaseArrayLong& array); wxBaseArrayLong& operator=(const wxBaseArrayLong& src); ~wxBaseArrayLong(); void Empty() { m_nCount = 0; } void Clear(); void Alloc(size_t uiSize); void Shrink(); size_t GetCount() const { return m_nCount; } void SetCount(size_t n, _wxArraywxBaseArrayLong defval = _wxArraywxBaseArrayLong()); bool IsEmpty() const { return m_nCount == 0; } size_t Count() const { return m_nCount; } typedef _wxArraywxBaseArrayLong base_type; protected: _wxArraywxBaseArrayLong& Item(size_t uiIndex) const { ; return m_pItems[uiIndex]; } _wxArraywxBaseArrayLong& operator[](size_t uiIndex) const { return Item(uiIndex); } int Index(_wxArraywxBaseArrayLong lItem, bool bFromEnd = false) const; int Index(_wxArraywxBaseArrayLong lItem, CMPFUNC fnCompare) const; size_t IndexForInsert(_wxArraywxBaseArrayLong lItem, CMPFUNC fnCompare) const; void Add(_wxArraywxBaseArrayLong lItem, size_t nInsert = 1); size_t Add(_wxArraywxBaseArrayLong lItem, CMPFUNC fnCompare); void Insert(_wxArraywxBaseArrayLong lItem, size_t uiIndex, size_t nInsert = 1); void Remove(_wxArraywxBaseArrayLong lItem); void RemoveAt(size_t uiIndex, size_t nRemove = 1); void Sort(CMPFUNC fnCompare); typedef _wxArraywxBaseArrayLong value_type; typedef value_type* iterator; typedef const value_type* const_iterator; typedef value_type& reference; typedef const value_type& const_reference; typedef int difference_type; typedef size_t size_type; void assign(const_iterator first, const_iterator last); void assign(size_type n, const_reference v); size_type capacity() const { return m_nSize; } iterator erase(iterator first, iterator last) { size_type idx = first - begin(); RemoveAt(idx, last - first); return begin() + idx; } iterator erase(iterator it) { return erase(it, it + 1); } void insert(iterator it, size_type n, const value_type& v) { Insert(v, it - begin(), n); } iterator insert(iterator it, const value_type& v = value_type()) { size_type idx = it - begin(); Insert(v, idx); return begin() + idx; } void insert(iterator it, const_iterator first, const_iterator last); void pop_back() { RemoveAt(size() - 1); } void push_back(const value_type& v) { Add(v); } void reserve(size_type n) { if(n > m_nSize) Realloc(n); } void resize(size_type n, value_type v = value_type()); iterator begin() { return m_pItems; } iterator end() { return m_pItems + m_nCount; } const_iterator begin() const { return m_pItems; } const_iterator end() const { return m_pItems + m_nCount; } public: void clear() { Clear(); } bool empty() const { return IsEmpty(); } size_type max_size() const { return 2147483647; } size_type size() const { return GetCount(); } private: void Grow(size_t nIncrement = 0); bool Realloc(size_t nSize); size_t m_nSize, m_nCount; _wxArraywxBaseArrayLong *m_pItems; }; | |
23133 | typedef size_t _wxArraywxBaseArraySizeT; class wxBaseArraySizeT { typedef CMPFUNC SCMPFUNC; public: wxBaseArraySizeT(); wxBaseArraySizeT(const wxBaseArraySizeT& array); wxBaseArraySizeT& operator=(const wxBaseArraySizeT& src); ~wxBaseArraySizeT(); void Empty() { m_nCount = 0; } void Clear(); void Alloc(size_t uiSize); void Shrink(); size_t GetCount() const { return m_nCount; } void SetCount(size_t n, _wxArraywxBaseArraySizeT defval = _wxArraywxBaseArraySizeT()); bool IsEmpty() const { return m_nCount == 0; } size_t Count() const { return m_nCount; } typedef _wxArraywxBaseArraySizeT base_type; protected: _wxArraywxBaseArraySizeT& Item(size_t uiIndex) const { ; return m_pItems[uiIndex]; } _wxArraywxBaseArraySizeT& operator[](size_t uiIndex) const { return Item(uiIndex); } int Index(_wxArraywxBaseArraySizeT lItem, bool bFromEnd = false) const; int Index(_wxArraywxBaseArraySizeT lItem, CMPFUNC fnCompare) const; size_t IndexForInsert(_wxArraywxBaseArraySizeT lItem, CMPFUNC fnCompare) const; void Add(_wxArraywxBaseArraySizeT lItem, size_t nInsert = 1); size_t Add(_wxArraywxBaseArraySizeT lItem, CMPFUNC fnCompare); void Insert(_wxArraywxBaseArraySizeT lItem, size_t uiIndex, size_t nInsert = 1); void Remove(_wxArraywxBaseArraySizeT lItem); void RemoveAt(size_t uiIndex, size_t nRemove = 1); void Sort(CMPFUNC fnCompare); typedef _wxArraywxBaseArraySizeT value_type; typedef value_type* iterator; typedef const value_type* const_iterator; typedef value_type& reference; typedef const value_type& const_reference; typedef int difference_type; typedef size_t size_type; void assign(const_iterator first, const_iterator last); void assign(size_type n, const_reference v); size_type capacity() const { return m_nSize; } iterator erase(iterator first, iterator last) { size_type idx = first - begin(); RemoveAt(idx, last - first); return begin() + idx; } iterator erase(iterator it) { return erase(it, it + 1); } void insert(iterator it, size_type n, const value_type& v) { Insert(v, it - begin(), n); } iterator insert(iterator it, const value_type& v = value_type()) { size_type idx = it - begin(); Insert(v, idx); return begin() + idx; } void insert(iterator it, const_iterator first, const_iterator last); void pop_back() { RemoveAt(size() - 1); } void push_back(const value_type& v) { Add(v); } void reserve(size_type n) { if(n > m_nSize) Realloc(n); } void resize(size_type n, value_type v = value_type()); iterator begin() { return m_pItems; } iterator end() { return m_pItems + m_nCount; } const_iterator begin() const { return m_pItems; } const_iterator end() const { return m_pItems + m_nCount; } public: void clear() { Clear(); } bool empty() const { return IsEmpty(); } size_type max_size() const { return 2147483647; } size_type size() const { return GetCount(); } private: void Grow(size_t nIncrement = 0); bool Realloc(size_t nSize); size_t m_nSize, m_nCount; _wxArraywxBaseArraySizeT *m_pItems; }; | |
23134 | typedef double _wxArraywxBaseArrayDouble; class wxBaseArrayDouble { typedef CMPFUNC SCMPFUNC; public: wxBaseArrayDouble(); wxBaseArrayDouble(const wxBaseArrayDouble& array); wxBaseArrayDouble& operator=(const wxBaseArrayDouble& src); ~wxBaseArrayDouble(); void Empty() { m_nCount = 0; } void Clear(); void Alloc(size_t uiSize); void Shrink(); size_t GetCount() const { return m_nCount; } void SetCount(size_t n, _wxArraywxBaseArrayDouble defval = _wxArraywxBaseArrayDouble()); bool IsEmpty() const { return m_nCount == 0; } size_t Count() const { return m_nCount; } typedef _wxArraywxBaseArrayDouble base_type; protected: _wxArraywxBaseArrayDouble& Item(size_t uiIndex) const { ; return m_pItems[uiIndex]; } _wxArraywxBaseArrayDouble& operator[](size_t uiIndex) const { return Item(uiIndex); } int Index(_wxArraywxBaseArrayDouble lItem, bool bFromEnd = false) const; int Index(_wxArraywxBaseArrayDouble lItem, CMPFUNC fnCompare) const; size_t IndexForInsert(_wxArraywxBaseArrayDouble lItem, CMPFUNC fnCompare) const; void Add(_wxArraywxBaseArrayDouble lItem, size_t nInsert = 1); size_t Add(_wxArraywxBaseArrayDouble lItem, CMPFUNC fnCompare); void Insert(_wxArraywxBaseArrayDouble lItem, size_t uiIndex, size_t nInsert = 1); void Remove(_wxArraywxBaseArrayDouble lItem); void RemoveAt(size_t uiIndex, size_t nRemove = 1); void Sort(CMPFUNC fnCompare); typedef _wxArraywxBaseArrayDouble value_type; typedef value_type* iterator; typedef const value_type* const_iterator; typedef value_type& reference; typedef const value_type& const_reference; typedef int difference_type; typedef size_t size_type; void assign(const_iterator first, const_iterator last); void assign(size_type n, const_reference v); size_type capacity() const { return m_nSize; } iterator erase(iterator first, iterator last) { size_type idx = first - begin(); RemoveAt(idx, last - first); return begin() + idx; } iterator erase(iterator it) { return erase(it, it + 1); } void insert(iterator it, size_type n, const value_type& v) { Insert(v, it - begin(), n); } iterator insert(iterator it, const value_type& v = value_type()) { size_type idx = it - begin(); Insert(v, idx); return begin() + idx; } void insert(iterator it, const_iterator first, const_iterator last); void pop_back() { RemoveAt(size() - 1); } void push_back(const value_type& v) { Add(v); } void reserve(size_type n) { if(n > m_nSize) Realloc(n); } void resize(size_type n, value_type v = value_type()); iterator begin() { return m_pItems; } iterator end() { return m_pItems + m_nCount; } const_iterator begin() const { return m_pItems; } const_iterator end() const { return m_pItems + m_nCount; } public: void clear() { Clear(); } bool empty() const { return IsEmpty(); } size_type max_size() const { return 2147483647; } size_type size() const { return GetCount(); } private: void Grow(size_t nIncrement = 0); bool Realloc(size_t nSize); size_t m_nSize, m_nCount; _wxArraywxBaseArrayDouble *m_pItems; }; | |
23135 | # 963 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dynarray.h" | |
23136 | typedef short _wxArraywxArrayShort; struct wxAssert_wxArrayShort { unsigned int TypeTooBigToBeStoredInwxBaseArrayShort: sizeof(_wxArraywxArrayShort) <= sizeof(wxBaseArrayShort::base_type); }; typedef int ( *CMPFUNC_wxArraywxArrayShort)(_wxArraywxArrayShort *pItem1, _wxArraywxArrayShort *pItem2); class wxArrayShort : public wxBaseArrayShort { public: wxArrayShort() { } ~wxArrayShort() { } wxArrayShort& operator=(const wxArrayShort& src) { wxBaseArrayShort* temp = (wxBaseArrayShort*) this; (*temp) = ((const wxBaseArrayShort&)src); return *this; } _wxArraywxArrayShort& operator[](size_t uiIndex) const { return (_wxArraywxArrayShort&)(wxBaseArrayShort::operator[](uiIndex)); } _wxArraywxArrayShort& Item(size_t uiIndex) const { return (_wxArraywxArrayShort&)(wxBaseArrayShort::operator[](uiIndex)); } _wxArraywxArrayShort& Last() const { return (_wxArraywxArrayShort&)(wxBaseArrayShort::operator[](Count() - 1)); } int Index(_wxArraywxArrayShort lItem, bool bFromEnd = false) const { return wxBaseArrayShort::Index((base_type)lItem, bFromEnd); } void Add(_wxArraywxArrayShort lItem, size_t nInsert = 1) { wxBaseArrayShort::Add((base_type)lItem, nInsert); } void Insert(_wxArraywxArrayShort lItem, size_t uiIndex, size_t nInsert = 1) { wxBaseArrayShort::Insert((base_type)lItem, uiIndex, nInsert) ; } void RemoveAt(size_t uiIndex, size_t nRemove = 1) { wxBaseArrayShort::RemoveAt(uiIndex, nRemove); } void Remove(_wxArraywxArrayShort lItem) { int iIndex = Index(lItem); if (!(iIndex != (-1))) {; return; }; wxBaseArrayShort::RemoveAt((size_t)iIndex); } void Sort(CMPFUNC_wxArraywxArrayShort fCmp) { wxBaseArrayShort::Sort((CMPFUNC)fCmp); } private: typedef wxBaseArrayShort::iterator biterator; typedef wxBaseArrayShort::const_iterator bconst_iterator; typedef wxBaseArrayShort::value_type bvalue_type; typedef wxBaseArrayShort::const_reference bconst_reference; public: typedef _wxArraywxArrayShort value_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type* iterator; typedef const value_type* const_iterator; typedef value_type& reference; typedef const value_type& const_reference; typedef wxBaseArrayShort::difference_type difference_type; typedef wxBaseArrayShort::size_type size_type; class reverse_iterator { typedef _wxArraywxArrayShort value_type; typedef value_type& reference; typedef value_type* pointer; typedef reverse_iterator itor; friend inline itor operator+(int o, const itor& it) { return it.m_ptr - o; } friend inline itor operator+(const itor& it, int o) { return it.m_ptr - o; } friend inline itor operator-(const itor& it, int o) { return it.m_ptr + o; } friend inline difference_type operator-(const itor& i1, const itor& i2) { return i1.m_ptr - i2.m_ptr; } public: pointer m_ptr; reverse_iterator() : m_ptr(__null) { } reverse_iterator(pointer ptr) : m_ptr(ptr) { } reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { } reference operator*() const { return *m_ptr; } itor& operator++() { --m_ptr; return *this; } const itor operator++(int) { reverse_iterator tmp = *this; --m_ptr; return tmp; } itor& operator--() { ++m_ptr; return *this; } const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; } bool operator ==(const itor& it) { return m_ptr == it.m_ptr; } bool operator !=(const itor& it) { return m_ptr != it.m_ptr; } }; class const_reverse_iterator { typedef _wxArraywxArrayShort value_type; typedef const value_type& reference; typedef const value_type* pointer; typedef const_reverse_iterator itor; friend inline itor operator+(int o, const itor& it) { return it.m_ptr - o; } friend inline itor operator+(const itor& it, int o) { return it.m_ptr - o; } friend inline itor operator-(const itor& it, int o) { return it.m_ptr + o; } friend inline difference_type operator-(const itor& i1, const itor& i2) { return i1.m_ptr - i2.m_ptr; } public: pointer m_ptr; const_reverse_iterator() : m_ptr(__null) { } const_reverse_iterator(pointer ptr) : m_ptr(ptr) { } const_reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { } const_reverse_iterator(const reverse_iterator& it) : m_ptr(it.m_ptr) { } reference operator*() const { return *m_ptr; } itor& operator++() { --m_ptr; return *this; } const itor operator++(int) { itor tmp = *this; --m_ptr; return tmp; } itor& operator--() { ++m_ptr; return *this; } const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; } bool operator ==(const itor& it) { return m_ptr == it.m_ptr; } bool operator !=(const itor& it) { return m_ptr != it.m_ptr; } }; wxArrayShort(size_type n, const_reference v) { assign(n, v); } wxArrayShort(const_iterator first, const_iterator last) { assign(first, last); } void assign(const_iterator first, const_iterator last) { wxBaseArrayShort::assign((bconst_iterator)first, (bconst_iterator)last); } void assign(size_type n, const_reference v) { wxBaseArrayShort::assign(n, (bconst_reference)v); } reference back() { return *(end() - 1); } const_reference back() const { return *(end() - 1); } iterator begin() { return (iterator)wxBaseArrayShort::begin(); } const_iterator begin() const { return (const_iterator)wxBaseArrayShort::begin(); } size_type capacity() const { return wxBaseArrayShort::capacity(); } iterator end() { return (iterator)wxBaseArrayShort::end(); } const_iterator end() const { return (const_iterator)wxBaseArrayShort::end(); } iterator erase(iterator first, iterator last) { return (iterator)wxBaseArrayShort::erase((biterator)first, (biterator)last); } iterator erase(iterator it) { return (iterator)wxBaseArrayShort::erase((biterator)it); } reference front() { return *begin(); } const_reference front() const { return *begin(); } void insert(iterator it, size_type n, const_reference v) { wxBaseArrayShort::insert((biterator)it, n, (bconst_reference)v); } iterator insert(iterator it, const_reference v = value_type()) { return (iterator)wxBaseArrayShort::insert((biterator)it, (bconst_reference)v); } void insert(iterator it, const_iterator first, const_iterator last) { wxBaseArrayShort::insert((biterator)it, (bconst_iterator)first, (bconst_iterator)last); } void pop_back() { wxBaseArrayShort::pop_back(); } void push_back(const_reference v) { wxBaseArrayShort::push_back((bconst_reference)v); } reverse_iterator rbegin() { return reverse_iterator(end() - 1); } const_reverse_iterator rbegin() const; reverse_iterator rend() { return reverse_iterator(begin() - 1); } const_reverse_iterator rend() const; void reserve(size_type n) { wxBaseArrayShort::reserve(n); }; void resize(size_type n, value_type v = value_type()); }; | |
23137 | typedef int _wxArraywxArrayInt; struct wxAssert_wxArrayInt { unsigned int TypeTooBigToBeStoredInwxBaseArrayInt: sizeof(_wxArraywxArrayInt) <= sizeof(wxBaseArrayInt::base_type); }; typedef int ( *CMPFUNC_wxArraywxArrayInt)(_wxArraywxArrayInt *pItem1, _wxArraywxArrayInt *pItem2); class wxArrayInt : public wxBaseArrayInt { public: wxArrayInt() { } ~wxArrayInt() { } wxArrayInt& operator=(const wxArrayInt& src) { wxBaseArrayInt* temp = (wxBaseArrayInt*) this; (*temp) = ((const wxBaseArrayInt&)src); return *this; } _wxArraywxArrayInt& operator[](size_t uiIndex) const { return (_wxArraywxArrayInt&)(wxBaseArrayInt::operator[](uiIndex)); } _wxArraywxArrayInt& Item(size_t uiIndex) const { return (_wxArraywxArrayInt&)(wxBaseArrayInt::operator[](uiIndex)); } _wxArraywxArrayInt& Last() const { return (_wxArraywxArrayInt&)(wxBaseArrayInt::operator[](Count() - 1)); } int Index(_wxArraywxArrayInt lItem, bool bFromEnd = false) const { return wxBaseArrayInt::Index((base_type)lItem, bFromEnd); } void Add(_wxArraywxArrayInt lItem, size_t nInsert = 1) { wxBaseArrayInt::Add((base_type)lItem, nInsert); } void Insert(_wxArraywxArrayInt lItem, size_t uiIndex, size_t nInsert = 1) { wxBaseArrayInt::Insert((base_type)lItem, uiIndex, nInsert) ; } void RemoveAt(size_t uiIndex, size_t nRemove = 1) { wxBaseArrayInt::RemoveAt(uiIndex, nRemove); } void Remove(_wxArraywxArrayInt lItem) { int iIndex = Index(lItem); if (!(iIndex != (-1))) {; return; }; wxBaseArrayInt::RemoveAt((size_t)iIndex); } void Sort(CMPFUNC_wxArraywxArrayInt fCmp) { wxBaseArrayInt::Sort((CMPFUNC)fCmp); } private: typedef wxBaseArrayInt::iterator biterator; typedef wxBaseArrayInt::const_iterator bconst_iterator; typedef wxBaseArrayInt::value_type bvalue_type; typedef wxBaseArrayInt::const_reference bconst_reference; public: typedef _wxArraywxArrayInt value_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type* iterator; typedef const value_type* const_iterator; typedef value_type& reference; typedef const value_type& const_reference; typedef wxBaseArrayInt::difference_type difference_type; typedef wxBaseArrayInt::size_type size_type; class reverse_iterator { typedef _wxArraywxArrayInt value_type; typedef value_type& reference; typedef value_type* pointer; typedef reverse_iterator itor; friend inline itor operator+(int o, const itor& it) { return it.m_ptr - o; } friend inline itor operator+(const itor& it, int o) { return it.m_ptr - o; } friend inline itor operator-(const itor& it, int o) { return it.m_ptr + o; } friend inline difference_type operator-(const itor& i1, const itor& i2) { return i1.m_ptr - i2.m_ptr; } public: pointer m_ptr; reverse_iterator() : m_ptr(__null) { } reverse_iterator(pointer ptr) : m_ptr(ptr) { } reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { } reference operator*() const { return *m_ptr; } itor& operator++() { --m_ptr; return *this; } const itor operator++(int) { reverse_iterator tmp = *this; --m_ptr; return tmp; } itor& operator--() { ++m_ptr; return *this; } const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; } bool operator ==(const itor& it) { return m_ptr == it.m_ptr; } bool operator !=(const itor& it) { return m_ptr != it.m_ptr; } }; class const_reverse_iterator { typedef _wxArraywxArrayInt value_type; typedef const value_type& reference; typedef const value_type* pointer; typedef const_reverse_iterator itor; friend inline itor operator+(int o, const itor& it) { return it.m_ptr - o; } friend inline itor operator+(const itor& it, int o) { return it.m_ptr - o; } friend inline itor operator-(const itor& it, int o) { return it.m_ptr + o; } friend inline difference_type operator-(const itor& i1, const itor& i2) { return i1.m_ptr - i2.m_ptr; } public: pointer m_ptr; const_reverse_iterator() : m_ptr(__null) { } const_reverse_iterator(pointer ptr) : m_ptr(ptr) { } const_reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { } const_reverse_iterator(const reverse_iterator& it) : m_ptr(it.m_ptr) { } reference operator*() const { return *m_ptr; } itor& operator++() { --m_ptr; return *this; } const itor operator++(int) { itor tmp = *this; --m_ptr; return tmp; } itor& operator--() { ++m_ptr; return *this; } const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; } bool operator ==(const itor& it) { return m_ptr == it.m_ptr; } bool operator !=(const itor& it) { return m_ptr != it.m_ptr; } }; wxArrayInt(size_type n, const_reference v) { assign(n, v); } wxArrayInt(const_iterator first, const_iterator last) { assign(first, last); } void assign(const_iterator first, const_iterator last) { wxBaseArrayInt::assign((bconst_iterator)first, (bconst_iterator)last); } void assign(size_type n, const_reference v) { wxBaseArrayInt::assign(n, (bconst_reference)v); } reference back() { return *(end() - 1); } const_reference back() const { return *(end() - 1); } iterator begin() { return (iterator)wxBaseArrayInt::begin(); } const_iterator begin() const { return (const_iterator)wxBaseArrayInt::begin(); } size_type capacity() const { return wxBaseArrayInt::capacity(); } iterator end() { return (iterator)wxBaseArrayInt::end(); } const_iterator end() const { return (const_iterator)wxBaseArrayInt::end(); } iterator erase(iterator first, iterator last) { return (iterator)wxBaseArrayInt::erase((biterator)first, (biterator)last); } iterator erase(iterator it) { return (iterator)wxBaseArrayInt::erase((biterator)it); } reference front() { return *begin(); } const_reference front() const { return *begin(); } void insert(iterator it, size_type n, const_reference v) { wxBaseArrayInt::insert((biterator)it, n, (bconst_reference)v); } iterator insert(iterator it, const_reference v = value_type()) { return (iterator)wxBaseArrayInt::insert((biterator)it, (bconst_reference)v); } void insert(iterator it, const_iterator first, const_iterator last) { wxBaseArrayInt::insert((biterator)it, (bconst_iterator)first, (bconst_iterator)last); } void pop_back() { wxBaseArrayInt::pop_back(); } void push_back(const_reference v) { wxBaseArrayInt::push_back((bconst_reference)v); } reverse_iterator rbegin() { return reverse_iterator(end() - 1); } const_reverse_iterator rbegin() const; reverse_iterator rend() { return reverse_iterator(begin() - 1); } const_reverse_iterator rend() const; void reserve(size_type n) { wxBaseArrayInt::reserve(n); }; void resize(size_type n, value_type v = value_type()); }; | |
23138 | typedef long _wxArraywxArrayLong; struct wxAssert_wxArrayLong { unsigned int TypeTooBigToBeStoredInwxBaseArrayLong: sizeof(_wxArraywxArrayLong) <= sizeof(wxBaseArrayLong::base_type); }; typedef int ( *CMPFUNC_wxArraywxArrayLong)(_wxArraywxArrayLong *pItem1, _wxArraywxArrayLong *pItem2); class wxArrayLong : public wxBaseArrayLong { public: wxArrayLong() { } ~wxArrayLong() { } wxArrayLong& operator=(const wxArrayLong& src) { wxBaseArrayLong* temp = (wxBaseArrayLong*) this; (*temp) = ((const wxBaseArrayLong&)src); return *this; } _wxArraywxArrayLong& operator[](size_t uiIndex) const { return (_wxArraywxArrayLong&)(wxBaseArrayLong::operator[](uiIndex)); } _wxArraywxArrayLong& Item(size_t uiIndex) const { return (_wxArraywxArrayLong&)(wxBaseArrayLong::operator[](uiIndex)); } _wxArraywxArrayLong& Last() const { return (_wxArraywxArrayLong&)(wxBaseArrayLong::operator[](Count() - 1)); } int Index(_wxArraywxArrayLong lItem, bool bFromEnd = false) const { return wxBaseArrayLong::Index((base_type)lItem, bFromEnd); } void Add(_wxArraywxArrayLong lItem, size_t nInsert = 1) { wxBaseArrayLong::Add((base_type)lItem, nInsert); } void Insert(_wxArraywxArrayLong lItem, size_t uiIndex, size_t nInsert = 1) { wxBaseArrayLong::Insert((base_type)lItem, uiIndex, nInsert) ; } void RemoveAt(size_t uiIndex, size_t nRemove = 1) { wxBaseArrayLong::RemoveAt(uiIndex, nRemove); } void Remove(_wxArraywxArrayLong lItem) { int iIndex = Index(lItem); if (!(iIndex != (-1))) {; return; }; wxBaseArrayLong::RemoveAt((size_t)iIndex); } void Sort(CMPFUNC_wxArraywxArrayLong fCmp) { wxBaseArrayLong::Sort((CMPFUNC)fCmp); } private: typedef wxBaseArrayLong::iterator biterator; typedef wxBaseArrayLong::const_iterator bconst_iterator; typedef wxBaseArrayLong::value_type bvalue_type; typedef wxBaseArrayLong::const_reference bconst_reference; public: typedef _wxArraywxArrayLong value_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type* iterator; typedef const value_type* const_iterator; typedef value_type& reference; typedef const value_type& const_reference; typedef wxBaseArrayLong::difference_type difference_type; typedef wxBaseArrayLong::size_type size_type; class reverse_iterator { typedef _wxArraywxArrayLong value_type; typedef value_type& reference; typedef value_type* pointer; typedef reverse_iterator itor; friend inline itor operator+(int o, const itor& it) { return it.m_ptr - o; } friend inline itor operator+(const itor& it, int o) { return it.m_ptr - o; } friend inline itor operator-(const itor& it, int o) { return it.m_ptr + o; } friend inline difference_type operator-(const itor& i1, const itor& i2) { return i1.m_ptr - i2.m_ptr; } public: pointer m_ptr; reverse_iterator() : m_ptr(__null) { } reverse_iterator(pointer ptr) : m_ptr(ptr) { } reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { } reference operator*() const { return *m_ptr; } itor& operator++() { --m_ptr; return *this; } const itor operator++(int) { reverse_iterator tmp = *this; --m_ptr; return tmp; } itor& operator--() { ++m_ptr; return *this; } const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; } bool operator ==(const itor& it) { return m_ptr == it.m_ptr; } bool operator !=(const itor& it) { return m_ptr != it.m_ptr; } }; class const_reverse_iterator { typedef _wxArraywxArrayLong value_type; typedef const value_type& reference; typedef const value_type* pointer; typedef const_reverse_iterator itor; friend inline itor operator+(int o, const itor& it) { return it.m_ptr - o; } friend inline itor operator+(const itor& it, int o) { return it.m_ptr - o; } friend inline itor operator-(const itor& it, int o) { return it.m_ptr + o; } friend inline difference_type operator-(const itor& i1, const itor& i2) { return i1.m_ptr - i2.m_ptr; } public: pointer m_ptr; const_reverse_iterator() : m_ptr(__null) { } const_reverse_iterator(pointer ptr) : m_ptr(ptr) { } const_reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { } const_reverse_iterator(const reverse_iterator& it) : m_ptr(it.m_ptr) { } reference operator*() const { return *m_ptr; } itor& operator++() { --m_ptr; return *this; } const itor operator++(int) { itor tmp = *this; --m_ptr; return tmp; } itor& operator--() { ++m_ptr; return *this; } const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; } bool operator ==(const itor& it) { return m_ptr == it.m_ptr; } bool operator !=(const itor& it) { return m_ptr != it.m_ptr; } }; wxArrayLong(size_type n, const_reference v) { assign(n, v); } wxArrayLong(const_iterator first, const_iterator last) { assign(first, last); } void assign(const_iterator first, const_iterator last) { wxBaseArrayLong::assign((bconst_iterator)first, (bconst_iterator)last); } void assign(size_type n, const_reference v) { wxBaseArrayLong::assign(n, (bconst_reference)v); } reference back() { return *(end() - 1); } const_reference back() const { return *(end() - 1); } iterator begin() { return (iterator)wxBaseArrayLong::begin(); } const_iterator begin() const { return (const_iterator)wxBaseArrayLong::begin(); } size_type capacity() const { return wxBaseArrayLong::capacity(); } iterator end() { return (iterator)wxBaseArrayLong::end(); } const_iterator end() const { return (const_iterator)wxBaseArrayLong::end(); } iterator erase(iterator first, iterator last) { return (iterator)wxBaseArrayLong::erase((biterator)first, (biterator)last); } iterator erase(iterator it) { return (iterator)wxBaseArrayLong::erase((biterator)it); } reference front() { return *begin(); } const_reference front() const { return *begin(); } void insert(iterator it, size_type n, const_reference v) { wxBaseArrayLong::insert((biterator)it, n, (bconst_reference)v); } iterator insert(iterator it, const_reference v = value_type()) { return (iterator)wxBaseArrayLong::insert((biterator)it, (bconst_reference)v); } void insert(iterator it, const_iterator first, const_iterator last) { wxBaseArrayLong::insert((biterator)it, (bconst_iterator)first, (bconst_iterator)last); } void pop_back() { wxBaseArrayLong::pop_back(); } void push_back(const_reference v) { wxBaseArrayLong::push_back((bconst_reference)v); } reverse_iterator rbegin() { return reverse_iterator(end() - 1); } const_reverse_iterator rbegin() const; reverse_iterator rend() { return reverse_iterator(begin() - 1); } const_reverse_iterator rend() const; void reserve(size_type n) { wxBaseArrayLong::reserve(n); }; void resize(size_type n, value_type v = value_type()); }; | |
23139 | typedef void * _wxArraywxArrayPtrVoid; struct wxAssert_wxArrayPtrVoid { unsigned int TypeTooBigToBeStoredInwxBaseArrayPtrVoid: sizeof(_wxArraywxArrayPtrVoid) <= sizeof(wxBaseArrayPtrVoid::base_type); }; typedef int ( *CMPFUNC_wxArraywxArrayPtrVoid)(_wxArraywxArrayPtrVoid *pItem1, _wxArraywxArrayPtrVoid *pItem2); class wxArrayPtrVoid : public wxBaseArrayPtrVoid { public: wxArrayPtrVoid() { } ~wxArrayPtrVoid() { } wxArrayPtrVoid& operator=(const wxArrayPtrVoid& src) { wxBaseArrayPtrVoid* temp = (wxBaseArrayPtrVoid*) this; (*temp) = ((const wxBaseArrayPtrVoid&)src); return *this; } _wxArraywxArrayPtrVoid& operator[](size_t uiIndex) const { return (_wxArraywxArrayPtrVoid&)(wxBaseArrayPtrVoid::operator[](uiIndex)); } _wxArraywxArrayPtrVoid& Item(size_t uiIndex) const { return (_wxArraywxArrayPtrVoid&)(wxBaseArrayPtrVoid::operator[](uiIndex)); } _wxArraywxArrayPtrVoid& Last() const { return (_wxArraywxArrayPtrVoid&)(wxBaseArrayPtrVoid::operator[](Count() - 1)); } int Index(_wxArraywxArrayPtrVoid lItem, bool bFromEnd = false) const { return wxBaseArrayPtrVoid::Index((base_type)lItem, bFromEnd); } void Add(_wxArraywxArrayPtrVoid lItem, size_t nInsert = 1) { wxBaseArrayPtrVoid::Add((base_type)lItem, nInsert); } void Insert(_wxArraywxArrayPtrVoid lItem, size_t uiIndex, size_t nInsert = 1) { wxBaseArrayPtrVoid::Insert((base_type)lItem, uiIndex, nInsert) ; } void RemoveAt(size_t uiIndex, size_t nRemove = 1) { wxBaseArrayPtrVoid::RemoveAt(uiIndex, nRemove); } void Remove(_wxArraywxArrayPtrVoid lItem) { int iIndex = Index(lItem); if (!(iIndex != (-1))) {; return; }; wxBaseArrayPtrVoid::RemoveAt((size_t)iIndex); } void Sort(CMPFUNC_wxArraywxArrayPtrVoid fCmp) { wxBaseArrayPtrVoid::Sort((CMPFUNC)fCmp); } private: typedef wxBaseArrayPtrVoid::iterator biterator; typedef wxBaseArrayPtrVoid::const_iterator bconst_iterator; typedef wxBaseArrayPtrVoid::value_type bvalue_type; typedef wxBaseArrayPtrVoid::const_reference bconst_reference; public: typedef _wxArraywxArrayPtrVoid value_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type* iterator; typedef const value_type* const_iterator; typedef value_type& reference; typedef const value_type& const_reference; typedef wxBaseArrayPtrVoid::difference_type difference_type; typedef wxBaseArrayPtrVoid::size_type size_type; class reverse_iterator { typedef _wxArraywxArrayPtrVoid value_type; typedef value_type& reference; typedef value_type* pointer; typedef reverse_iterator itor; friend inline itor operator+(int o, const itor& it) { return it.m_ptr - o; } friend inline itor operator+(const itor& it, int o) { return it.m_ptr - o; } friend inline itor operator-(const itor& it, int o) { return it.m_ptr + o; } friend inline difference_type operator-(const itor& i1, const itor& i2) { return i1.m_ptr - i2.m_ptr; } public: pointer m_ptr; reverse_iterator() : m_ptr(__null) { } reverse_iterator(pointer ptr) : m_ptr(ptr) { } reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { } reference operator*() const { return *m_ptr; } itor& operator++() { --m_ptr; return *this; } const itor operator++(int) { reverse_iterator tmp = *this; --m_ptr; return tmp; } itor& operator--() { ++m_ptr; return *this; } const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; } bool operator ==(const itor& it) { return m_ptr == it.m_ptr; } bool operator !=(const itor& it) { return m_ptr != it.m_ptr; } }; class const_reverse_iterator { typedef _wxArraywxArrayPtrVoid value_type; typedef const value_type& reference; typedef const value_type* pointer; typedef const_reverse_iterator itor; friend inline itor operator+(int o, const itor& it) { return it.m_ptr - o; } friend inline itor operator+(const itor& it, int o) { return it.m_ptr - o; } friend inline itor operator-(const itor& it, int o) { return it.m_ptr + o; } friend inline difference_type operator-(const itor& i1, const itor& i2) { return i1.m_ptr - i2.m_ptr; } public: pointer m_ptr; const_reverse_iterator() : m_ptr(__null) { } const_reverse_iterator(pointer ptr) : m_ptr(ptr) { } const_reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { } const_reverse_iterator(const reverse_iterator& it) : m_ptr(it.m_ptr) { } reference operator*() const { return *m_ptr; } itor& operator++() { --m_ptr; return *this; } const itor operator++(int) { itor tmp = *this; --m_ptr; return tmp; } itor& operator--() { ++m_ptr; return *this; } const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; } bool operator ==(const itor& it) { return m_ptr == it.m_ptr; } bool operator !=(const itor& it) { return m_ptr != it.m_ptr; } }; wxArrayPtrVoid(size_type n, const_reference v) { assign(n, v); } wxArrayPtrVoid(const_iterator first, const_iterator last) { assign(first, last); } void assign(const_iterator first, const_iterator last) { wxBaseArrayPtrVoid::assign((bconst_iterator)first, (bconst_iterator)last); } void assign(size_type n, const_reference v) { wxBaseArrayPtrVoid::assign(n, (bconst_reference)v); } reference back() { return *(end() - 1); } const_reference back() const { return *(end() - 1); } iterator begin() { return (iterator)wxBaseArrayPtrVoid::begin(); } const_iterator begin() const { return (const_iterator)wxBaseArrayPtrVoid::begin(); } size_type capacity() const { return wxBaseArrayPtrVoid::capacity(); } iterator end() { return (iterator)wxBaseArrayPtrVoid::end(); } const_iterator end() const { return (const_iterator)wxBaseArrayPtrVoid::end(); } iterator erase(iterator first, iterator last) { return (iterator)wxBaseArrayPtrVoid::erase((biterator)first, (biterator)last); } iterator erase(iterator it) { return (iterator)wxBaseArrayPtrVoid::erase((biterator)it); } reference front() { return *begin(); } const_reference front() const { return *begin(); } void insert(iterator it, size_type n, const_reference v) { wxBaseArrayPtrVoid::insert((biterator)it, n, (bconst_reference)v); } iterator insert(iterator it, const_reference v = value_type()) { return (iterator)wxBaseArrayPtrVoid::insert((biterator)it, (bconst_reference)v); } void insert(iterator it, const_iterator first, const_iterator last) { wxBaseArrayPtrVoid::insert((biterator)it, (bconst_iterator)first, (bconst_iterator)last); } void pop_back() { wxBaseArrayPtrVoid::pop_back(); } void push_back(const_reference v) { wxBaseArrayPtrVoid::push_back((bconst_reference)v); } reverse_iterator rbegin() { return reverse_iterator(end() - 1); } const_reverse_iterator rbegin() const; reverse_iterator rend() { return reverse_iterator(begin() - 1); } const_reverse_iterator rend() const; void reserve(size_type n) { wxBaseArrayPtrVoid::reserve(n); }; void resize(size_type n, value_type v = value_type()); }; | |
23140 | # 18 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
23141 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/list.h" 1 | |
23142 | # 57 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/list.h" | |
23143 | extern "C" | |
23144 | { | |
23145 | typedef int (* wxSortCompareFunction)(const void *elem1, const void *elem2); | |
23146 | } | |
23147 | ||
23148 | class wxObjectListNode; | |
23149 | typedef wxObjectListNode wxNode; | |
23150 | ||
23151 | ||
23152 | typedef int (* wxListIterateFunction)(void *current); | |
23153 | # 75 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/list.h" | |
23154 | enum wxKeyType | |
23155 | { | |
23156 | wxKEY_NONE, | |
23157 | wxKEY_INTEGER, | |
23158 | wxKEY_STRING | |
23159 | }; | |
23160 | # 338 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/list.h" | |
23161 | extern wxChar* copystring(const wxChar *s); | |
23162 | # 348 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/list.h" | |
23163 | union wxListKeyValue | |
23164 | { | |
23165 | long integer; | |
23166 | wxChar *string; | |
23167 | }; | |
23168 | ||
23169 | ||
23170 | ||
23171 | ||
23172 | ||
23173 | ||
23174 | ||
23175 | class wxListKey | |
23176 | { | |
23177 | public: | |
23178 | ||
23179 | wxListKey() : m_keyType(wxKEY_NONE) | |
23180 | { } | |
23181 | wxListKey(long i) : m_keyType(wxKEY_INTEGER) | |
23182 | { m_key.integer = i; } | |
23183 | wxListKey(const wxChar *s) : m_keyType(wxKEY_STRING) | |
23184 | { m_key.string = strdup(s); } | |
23185 | wxListKey(const wxString& s) : m_keyType(wxKEY_STRING) | |
23186 | { m_key.string = strdup(s.c_str()); } | |
23187 | ||
23188 | ||
23189 | wxKeyType GetKeyType() const { return m_keyType; } | |
23190 | const wxChar *GetString() const | |
23191 | { ; return m_key.string; } | |
23192 | long GetNumber() const | |
23193 | { ; return m_key.integer; } | |
23194 | ||
23195 | ||
23196 | ||
23197 | ||
23198 | bool operator==(wxListKeyValue value) const ; | |
23199 | ||
23200 | ||
23201 | ~wxListKey() | |
23202 | { | |
23203 | if ( m_keyType == wxKEY_STRING ) | |
23204 | free(m_key.string); | |
23205 | } | |
23206 | ||
23207 | private: | |
23208 | wxKeyType m_keyType; | |
23209 | wxListKeyValue m_key; | |
23210 | }; | |
23211 | ||
23212 | ||
23213 | ||
23214 | ||
23215 | ||
23216 | extern wxListKey wxDefaultListKey; | |
23217 | ||
23218 | class wxListBase; | |
23219 | ||
23220 | class wxNodeBase | |
23221 | { | |
23222 | friend class wxListBase; | |
23223 | public: | |
23224 | ||
23225 | wxNodeBase(wxListBase *list = (wxListBase *)__null, | |
23226 | wxNodeBase *previous = (wxNodeBase *)__null, | |
23227 | wxNodeBase *next = (wxNodeBase *)__null, | |
23228 | void *data = __null, | |
23229 | const wxListKey& key = wxDefaultListKey); | |
23230 | ||
23231 | virtual ~wxNodeBase(); | |
23232 | ||
23233 | ||
23234 | const wxChar *GetKeyString() const { return m_key.string; } | |
23235 | long GetKeyInteger() const { return m_key.integer; } | |
23236 | ||
23237 | ||
23238 | void SetKeyString(wxChar* s) { m_key.string = s; } | |
23239 | void SetKeyInteger(long i) { m_key.integer = i; } | |
23240 | ||
23241 | ||
23242 | ||
23243 | wxNode *Next() const __attribute__ ((deprecated)); | |
23244 | wxNode *Previous() const __attribute__ ((deprecated)); | |
23245 | wxObject *Data() const __attribute__ ((deprecated)); | |
23246 | ||
23247 | ||
23248 | protected: | |
23249 | ||
23250 | wxNodeBase *GetNext() const { return m_next; } | |
23251 | wxNodeBase *GetPrevious() const { return m_previous; } | |
23252 | ||
23253 | void *GetData() const { return m_data; } | |
23254 | void SetData(void *data) { m_data = data; } | |
23255 | ||
23256 | ||
23257 | int IndexOf() const; | |
23258 | ||
23259 | virtual void DeleteData() { } | |
23260 | public: | |
23261 | ||
23262 | void** GetDataPtr() const { return &(((wxNodeBase*)this)->m_data); } | |
23263 | private: | |
23264 | ||
23265 | wxListKeyValue m_key; | |
23266 | ||
23267 | void *m_data; | |
23268 | wxNodeBase *m_next, | |
23269 | *m_previous; | |
23270 | ||
23271 | wxListBase *m_list; | |
23272 | ||
23273 | private: wxNodeBase(const wxNodeBase&); wxNodeBase& operator=(const wxNodeBase&); | |
23274 | }; | |
23275 | ||
23276 | ||
23277 | ||
23278 | ||
23279 | ||
23280 | class wxList; | |
23281 | ||
23282 | class wxListBase : public wxObject | |
23283 | { | |
23284 | friend class wxNodeBase; | |
23285 | friend class wxHashTableBase; | |
23286 | ||
23287 | public: | |
23288 | ||
23289 | wxListBase(wxKeyType keyType = wxKEY_NONE) | |
23290 | { Init(keyType); } | |
23291 | virtual ~wxListBase(); | |
23292 | ||
23293 | ||
23294 | ||
23295 | size_t GetCount() const { return m_count; } | |
23296 | ||
23297 | ||
23298 | bool IsEmpty() const { return m_count == 0; } | |
23299 | ||
23300 | ||
23301 | ||
23302 | ||
23303 | void Clear(); | |
23304 | ||
23305 | ||
23306 | void DeleteContents(bool destroy) { m_destroy = destroy; } | |
23307 | ||
23308 | ||
23309 | bool GetDeleteContents() const | |
23310 | { return m_destroy; } | |
23311 | ||
23312 | ||
23313 | wxKeyType GetKeyType() const | |
23314 | { return m_keyType; } | |
23315 | ||
23316 | ||
23317 | void SetKeyType(wxKeyType keyType) | |
23318 | { ; m_keyType = keyType; } | |
23319 | ||
23320 | ||
23321 | ||
23322 | int Number() const __attribute__ ((deprecated)); | |
23323 | wxNode *First() const __attribute__ ((deprecated)); | |
23324 | wxNode *Last() const __attribute__ ((deprecated)); | |
23325 | wxNode *Nth(size_t n) const __attribute__ ((deprecated)); | |
23326 | ||
23327 | ||
23328 | operator wxList&() const __attribute__ ((deprecated)); | |
23329 | ||
23330 | ||
23331 | protected: | |
23332 | ||
23333 | ||
23334 | ||
23335 | ||
23336 | ||
23337 | virtual wxNodeBase *CreateNode(wxNodeBase *prev, wxNodeBase *next, | |
23338 | void *data, | |
23339 | const wxListKey& key = wxDefaultListKey) = 0; | |
23340 | # 533 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/list.h" | |
23341 | wxListBase(size_t count, void *elements[]); | |
23342 | ||
23343 | wxListBase(void *object, ... ); | |
23344 | ||
23345 | protected: | |
23346 | void Assign(const wxListBase& list) | |
23347 | { Clear(); DoCopy(list); } | |
23348 | ||
23349 | ||
23350 | wxNodeBase *GetFirst() const { return m_nodeFirst; } | |
23351 | wxNodeBase *GetLast() const { return m_nodeLast; } | |
23352 | ||
23353 | ||
23354 | wxNodeBase *Item(size_t index) const; | |
23355 | ||
23356 | ||
23357 | void *operator[](size_t n) const | |
23358 | { | |
23359 | wxNodeBase *node = Item(n); | |
23360 | ||
23361 | return node ? node->GetData() : (wxNodeBase *)__null; | |
23362 | } | |
23363 | ||
23364 | ||
23365 | ||
23366 | wxNodeBase *Prepend(void *object) | |
23367 | { return (wxNodeBase *)wxListBase::Insert(object); } | |
23368 | ||
23369 | wxNodeBase *Append(void *object); | |
23370 | ||
23371 | wxNodeBase *Insert(void *object) { return Insert( (wxNodeBase*)__null, object); } | |
23372 | ||
23373 | wxNodeBase *Insert(size_t pos, void *object) | |
23374 | { return pos == GetCount() ? Append(object) | |
23375 | : Insert(Item(pos), object); } | |
23376 | ||
23377 | wxNodeBase *Insert(wxNodeBase *prev, void *object); | |
23378 | ||
23379 | ||
23380 | wxNodeBase *Append(long key, void *object); | |
23381 | wxNodeBase *Append(const wxChar *key, void *object); | |
23382 | ||
23383 | ||
23384 | ||
23385 | wxNodeBase *DetachNode(wxNodeBase *node); | |
23386 | ||
23387 | bool DeleteNode(wxNodeBase *node); | |
23388 | ||
23389 | ||
23390 | bool DeleteObject(void *object); | |
23391 | ||
23392 | ||
23393 | ||
23394 | wxNodeBase *Find(const void *object) const; | |
23395 | ||
23396 | ||
23397 | wxNodeBase *Find(const wxListKey& key) const; | |
23398 | ||
23399 | ||
23400 | int IndexOf( void *object ) const; | |
23401 | ||
23402 | ||
23403 | ||
23404 | void Sort(const wxSortCompareFunction compfunc); | |
23405 | ||
23406 | ||
23407 | void *FirstThat(wxListIterateFunction func); | |
23408 | void ForEach(wxListIterateFunction func); | |
23409 | void *LastThat(wxListIterateFunction func); | |
23410 | ||
23411 | ||
23412 | ||
23413 | void Reverse(); | |
23414 | void DeleteNodes(wxNodeBase* first, wxNodeBase* last); | |
23415 | private: | |
23416 | ||
23417 | ||
23418 | void Init(wxKeyType keyType = wxKEY_NONE); | |
23419 | ||
23420 | ||
23421 | ||
23422 | void DoCopy(const wxListBase& list); | |
23423 | ||
23424 | wxNodeBase *AppendCommon(wxNodeBase *node); | |
23425 | ||
23426 | void DoDeleteNode(wxNodeBase *node); | |
23427 | ||
23428 | size_t m_count; | |
23429 | bool m_destroy; | |
23430 | wxNodeBase *m_nodeFirst, | |
23431 | *m_nodeLast; | |
23432 | ||
23433 | wxKeyType m_keyType; | |
23434 | }; | |
23435 | # 1108 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/list.h" | |
23436 | inline wxNode *wxNodeBase::Next() const { return (wxNode *)GetNext(); } | |
23437 | inline wxNode *wxNodeBase::Previous() const { return (wxNode *)GetPrevious(); } | |
23438 | inline wxObject *wxNodeBase::Data() const { return (wxObject *)GetData(); } | |
23439 | ||
23440 | ||
23441 | ||
23442 | ||
23443 | ||
23444 | inline int wxListBase::Number() const { return (int)GetCount(); } | |
23445 | inline wxNode *wxListBase::First() const { return (wxNode *)GetFirst(); } | |
23446 | inline wxNode *wxListBase::Last() const { return (wxNode *)GetLast(); } | |
23447 | inline wxNode *wxListBase::Nth(size_t n) const { return (wxNode *)Item(n); } | |
23448 | inline wxListBase::operator wxList&() const { return *(wxList*)this; } | |
23449 | # 1131 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/list.h" | |
23450 | typedef int (*wxSortFuncFor_wxObjectList)(const wxObject **, const wxObject **); class wxObjectListNode : public wxNodeBase { public: wxObjectListNode(wxListBase *list = (wxListBase *)__null, wxObjectListNode *previous = (wxObjectListNode *)__null, wxObjectListNode *next = (wxObjectListNode *)__null, wxObject *data = (wxObject *)__null, const wxListKey& key = wxDefaultListKey) : wxNodeBase(list, previous, next, data, key) { } wxObjectListNode *GetNext() const { return (wxObjectListNode *)wxNodeBase::GetNext(); } wxObjectListNode *GetPrevious() const { return (wxObjectListNode *)wxNodeBase::GetPrevious(); } wxObject *GetData() const { return (wxObject *)wxNodeBase::GetData(); } void SetData(wxObject *data) { wxNodeBase::SetData(data); } protected: virtual void DeleteData(); private: wxObjectListNode(const wxObjectListNode&); wxObjectListNode& operator=(const wxObjectListNode&); }; class wxObjectList : public wxListBase { public: typedef wxObjectListNode Node; typedef Node* compatibility_iterator; wxObjectList(wxKeyType keyType = wxKEY_NONE) : wxListBase(keyType) { } wxObjectList(const wxObjectList& list) : wxListBase(list.GetKeyType()) { Assign(list); } wxObjectList(size_t count, wxObject *elements[]) : wxListBase(count, (void **)elements) { } wxObjectList& operator=(const wxObjectList& list) { Assign(list); return *this; } wxObjectListNode *GetFirst() const { return (wxObjectListNode *)wxListBase::GetFirst(); } wxObjectListNode *GetLast() const { return (wxObjectListNode *)wxListBase::GetLast(); } wxObjectListNode *Item(size_t index) const { return (wxObjectListNode *)wxListBase::Item(index); } wxObject *operator[](size_t index) const { wxObjectListNode *node = Item(index); return node ? (wxObject*)(node->GetData()) : (wxObject*)__null; } wxObjectListNode *Append(wxObject *object) { return (wxObjectListNode *)wxListBase::Append(object); } wxObjectListNode *Insert(wxObject *object) { return (wxObjectListNode *)Insert((wxObjectListNode*)__null, object); } wxObjectListNode *Insert(size_t pos, wxObject *object) { return (wxObjectListNode *)wxListBase::Insert(pos, object); } wxObjectListNode *Insert(wxObjectListNode *prev, wxObject *object) { return (wxObjectListNode *)wxListBase::Insert(prev, object); } wxObjectListNode *Append(long key, void *object) { return (wxObjectListNode *)wxListBase::Append(key, object); } wxObjectListNode *Append(const wxChar *key, void *object) { return (wxObjectListNode *)wxListBase::Append(key, object); } wxObjectListNode *DetachNode(wxObjectListNode *node) { return (wxObjectListNode *)wxListBase::DetachNode(node); } bool DeleteNode(wxObjectListNode *node) { return wxListBase::DeleteNode(node); } bool DeleteObject(wxObject *object) { return wxListBase::DeleteObject(object); } void Erase(compatibility_iterator it) { DeleteNode(it); } wxObjectListNode *Find(const wxObject *object) const { return (wxObjectListNode *)wxListBase::Find(object); } virtual wxObjectListNode *Find(const wxListKey& key) const { return (wxObjectListNode *)wxListBase::Find(key); } int IndexOf(wxObject *object) const { return wxListBase::IndexOf(object); } void Sort(wxSortCompareFunction func) { wxListBase::Sort(func); } void Sort(wxSortFuncFor_wxObjectList func) { Sort((wxSortCompareFunction)func); } protected: virtual wxNodeBase *CreateNode(wxNodeBase *prev, wxNodeBase *next, void *data, const wxListKey& key = wxDefaultListKey) { return new wxObjectListNode(this, (wxObjectListNode *)prev, (wxObjectListNode *)next, (wxObject *)data, key); } public: typedef size_t size_type; typedef int difference_type; typedef wxObject* value_type; typedef wxObject* base_value_type; typedef value_type& reference; typedef const value_type& const_reference; typedef base_value_type& base_reference; typedef const base_value_type& const_base_reference; class iterator { typedef wxObjectList list; public: typedef wxObjectListNode Node; typedef iterator itor; typedef wxObject* value_type; typedef value_type* ptr_type; typedef value_type& reference; Node* m_node; Node* m_init; public: typedef reference reference_type; typedef ptr_type pointer_type; iterator(Node* node, Node* init) : m_node(node), m_init(init) {} iterator() : m_node(__null), m_init(__null) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetNext(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetNext(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetPrevious() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetPrevious() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class const_iterator { typedef wxObjectList list; public: typedef wxObjectListNode Node; typedef wxObject* value_type; typedef const value_type& const_reference; typedef const_iterator itor; typedef value_type* ptr_type; Node* m_node; Node* m_init; public: typedef const_reference reference_type; typedef const ptr_type pointer_type; const_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } const_iterator() : m_node(__null), m_init(__null) { } const_iterator(const iterator& it) : m_node(it.m_node), m_init(it.m_init) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetNext(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetNext(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetPrevious() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetPrevious() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class reverse_iterator { typedef wxObjectList list; public: typedef wxObjectListNode Node; typedef wxObject* value_type; typedef reverse_iterator itor; typedef value_type* ptr_type; typedef value_type& reference; Node* m_node; Node* m_init; public: typedef reference reference_type; typedef ptr_type pointer_type; reverse_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } reverse_iterator() : m_node(__null), m_init(__null) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetPrevious(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetPrevious(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetNext() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetNext() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class const_reverse_iterator { typedef wxObjectList list; public: typedef wxObjectListNode Node; typedef wxObject* value_type; typedef const_reverse_iterator itor; typedef value_type* ptr_type; typedef const value_type& const_reference; Node* m_node; Node* m_init; public: typedef const_reference reference_type; typedef const ptr_type pointer_type; const_reverse_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } const_reverse_iterator() : m_node(__null), m_init(__null) { } const_reverse_iterator(const reverse_iterator& it) : m_node(it.m_node), m_init(it.m_init) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetPrevious(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetPrevious(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetNext() : m_init; return *this;} const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetNext() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; explicit wxObjectList(size_type n, const_reference v = value_type()) { assign(n, v); } wxObjectList(const const_iterator& first, const const_iterator& last) { assign(first, last); } iterator begin() { return iterator(GetFirst(), GetLast()); } const_iterator begin() const { return const_iterator(GetFirst(), GetLast()); } iterator end() { return iterator(__null, GetLast()); } const_iterator end() const { return const_iterator(__null, GetLast()); } reverse_iterator rbegin() { return reverse_iterator(GetLast(), GetFirst()); } const_reverse_iterator rbegin() const { return const_reverse_iterator(GetLast(), GetFirst()); } reverse_iterator rend() { return reverse_iterator(__null, GetFirst()); } const_reverse_iterator rend() const { return const_reverse_iterator(__null, GetFirst()); } void resize(size_type n, value_type v = value_type()) { while (n < size()) pop_back(); while (n > size()) push_back(v); } size_type size() const { return GetCount(); } size_type max_size() const { return 2147483647; } bool empty() const { return IsEmpty(); } reference front() { return *begin(); } const_reference front() const { return *begin(); } reference back() { iterator tmp = end(); return *--tmp; } const_reference back() const { const_iterator tmp = end(); return *--tmp; } void push_front(const_reference v = value_type()) { Insert(GetFirst(), (const_base_reference)v); } void pop_front() { DeleteNode(GetFirst()); } void push_back(const_reference v = value_type()) { Append((const_base_reference)v); } void pop_back() { DeleteNode(GetLast()); } void assign(const_iterator first, const const_iterator& last) { clear(); for(; first != last; ++first) Append((const_base_reference)*first); } void assign(size_type n, const_reference v = value_type()) { clear(); for(size_type i = 0; i < n; ++i) Append((const_base_reference)v); } iterator insert(const iterator& it, const_reference v = value_type()) { Insert(it.m_node, (const_base_reference)v); return iterator(it.m_node->GetPrevious(), GetLast()); } void insert(const iterator& it, size_type n, const_reference v = value_type()) { for(size_type i = 0; i < n; ++i) Insert(it.m_node, (const_base_reference)v); } void insert(const iterator& it, const_iterator first, const const_iterator& last) { for(; first != last; ++first) Insert(it.m_node, (const_base_reference)*first); } iterator erase(const iterator& it) { iterator next = iterator(it.m_node->GetNext(), GetLast()); DeleteNode(it.m_node); return next; } iterator erase(const iterator& first, const iterator& last) { iterator next = last; ++next; DeleteNodes(first.m_node, last.m_node); return next; } void clear() { Clear(); } void splice(const iterator& it, wxObjectList& l, const iterator& first, const iterator& last) { insert(it, first, last); l.erase(first, last); } void splice(const iterator& it, wxObjectList& l) { splice(it, l, l.begin(), l.end() ); } void splice(const iterator& it, wxObjectList& l, const iterator& first) { iterator tmp = first; ++tmp; if(it == first || it == tmp) return; insert(it, *first); l.erase(first); } void remove(const_reference v) { DeleteObject((const_base_reference)v); } void reverse() { Reverse(); } }; | |
23451 | ||
23452 | ||
23453 | class wxList : public wxObjectList | |
23454 | { | |
23455 | public: | |
23456 | ||
23457 | ||
23458 | ||
23459 | ||
23460 | wxList(int key_type = wxKEY_NONE); | |
23461 | ||
23462 | ||
23463 | ||
23464 | ~wxList() { } | |
23465 | ||
23466 | ||
23467 | wxList& operator=(const wxList& list) | |
23468 | { (void) wxListBase::operator=(list); return *this; } | |
23469 | ||
23470 | ||
23471 | void Sort(wxSortCompareFunction compfunc) { wxListBase::Sort(compfunc); } | |
23472 | ||
23473 | ||
23474 | ||
23475 | ||
23476 | wxNode *Member(wxObject *object) const { return (wxNode *)Find(object); } | |
23477 | ||
23478 | ||
23479 | private: | |
23480 | ||
23481 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
23482 | ||
23483 | }; | |
23484 | ||
23485 | ||
23486 | ||
23487 | ||
23488 | ||
23489 | ||
23490 | typedef int (*wxSortFuncFor_wxStringListBase)(const wxChar **, const wxChar **); class wxStringListNode : public wxNodeBase { public: wxStringListNode(wxListBase *list = (wxListBase *)__null, wxStringListNode *previous = (wxStringListNode *)__null, wxStringListNode *next = (wxStringListNode *)__null, wxChar *data = (wxChar *)__null, const wxListKey& key = wxDefaultListKey) : wxNodeBase(list, previous, next, data, key) { } wxStringListNode *GetNext() const { return (wxStringListNode *)wxNodeBase::GetNext(); } wxStringListNode *GetPrevious() const { return (wxStringListNode *)wxNodeBase::GetPrevious(); } wxChar *GetData() const { return (wxChar *)wxNodeBase::GetData(); } void SetData(wxChar *data) { wxNodeBase::SetData(data); } protected: virtual void DeleteData(); private: wxStringListNode(const wxStringListNode&); wxStringListNode& operator=(const wxStringListNode&); }; class wxStringListBase : public wxListBase { public: typedef wxStringListNode Node; typedef Node* compatibility_iterator; wxStringListBase(wxKeyType keyType = wxKEY_NONE) : wxListBase(keyType) { } wxStringListBase(const wxStringListBase& list) : wxListBase(list.GetKeyType()) { Assign(list); } wxStringListBase(size_t count, wxChar *elements[]) : wxListBase(count, (void **)elements) { } wxStringListBase& operator=(const wxStringListBase& list) { Assign(list); return *this; } wxStringListNode *GetFirst() const { return (wxStringListNode *)wxListBase::GetFirst(); } wxStringListNode *GetLast() const { return (wxStringListNode *)wxListBase::GetLast(); } wxStringListNode *Item(size_t index) const { return (wxStringListNode *)wxListBase::Item(index); } wxChar *operator[](size_t index) const { wxStringListNode *node = Item(index); return node ? (wxChar*)(node->GetData()) : (wxChar*)__null; } wxStringListNode *Append(wxChar *object) { return (wxStringListNode *)wxListBase::Append(object); } wxStringListNode *Insert(wxChar *object) { return (wxStringListNode *)Insert((wxStringListNode*)__null, object); } wxStringListNode *Insert(size_t pos, wxChar *object) { return (wxStringListNode *)wxListBase::Insert(pos, object); } wxStringListNode *Insert(wxStringListNode *prev, wxChar *object) { return (wxStringListNode *)wxListBase::Insert(prev, object); } wxStringListNode *Append(long key, void *object) { return (wxStringListNode *)wxListBase::Append(key, object); } wxStringListNode *Append(const wxChar *key, void *object) { return (wxStringListNode *)wxListBase::Append(key, object); } wxStringListNode *DetachNode(wxStringListNode *node) { return (wxStringListNode *)wxListBase::DetachNode(node); } bool DeleteNode(wxStringListNode *node) { return wxListBase::DeleteNode(node); } bool DeleteObject(wxChar *object) { return wxListBase::DeleteObject(object); } void Erase(compatibility_iterator it) { DeleteNode(it); } wxStringListNode *Find(const wxChar *object) const { return (wxStringListNode *)wxListBase::Find(object); } virtual wxStringListNode *Find(const wxListKey& key) const { return (wxStringListNode *)wxListBase::Find(key); } int IndexOf(wxChar *object) const { return wxListBase::IndexOf(object); } void Sort(wxSortCompareFunction func) { wxListBase::Sort(func); } void Sort(wxSortFuncFor_wxStringListBase func) { Sort((wxSortCompareFunction)func); } protected: virtual wxNodeBase *CreateNode(wxNodeBase *prev, wxNodeBase *next, void *data, const wxListKey& key = wxDefaultListKey) { return new wxStringListNode(this, (wxStringListNode *)prev, (wxStringListNode *)next, (wxChar *)data, key); } public: typedef size_t size_type; typedef int difference_type; typedef wxChar* value_type; typedef wxChar* base_value_type; typedef value_type& reference; typedef const value_type& const_reference; typedef base_value_type& base_reference; typedef const base_value_type& const_base_reference; class iterator { typedef wxStringListBase list; public: typedef wxStringListNode Node; typedef iterator itor; typedef wxChar* value_type; typedef value_type* ptr_type; typedef value_type& reference; Node* m_node; Node* m_init; public: typedef reference reference_type; typedef ptr_type pointer_type; iterator(Node* node, Node* init) : m_node(node), m_init(init) {} iterator() : m_node(__null), m_init(__null) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetNext(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetNext(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetPrevious() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetPrevious() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class const_iterator { typedef wxStringListBase list; public: typedef wxStringListNode Node; typedef wxChar* value_type; typedef const value_type& const_reference; typedef const_iterator itor; typedef value_type* ptr_type; Node* m_node; Node* m_init; public: typedef const_reference reference_type; typedef const ptr_type pointer_type; const_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } const_iterator() : m_node(__null), m_init(__null) { } const_iterator(const iterator& it) : m_node(it.m_node), m_init(it.m_init) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetNext(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetNext(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetPrevious() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetPrevious() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class reverse_iterator { typedef wxStringListBase list; public: typedef wxStringListNode Node; typedef wxChar* value_type; typedef reverse_iterator itor; typedef value_type* ptr_type; typedef value_type& reference; Node* m_node; Node* m_init; public: typedef reference reference_type; typedef ptr_type pointer_type; reverse_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } reverse_iterator() : m_node(__null), m_init(__null) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetPrevious(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetPrevious(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetNext() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetNext() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class const_reverse_iterator { typedef wxStringListBase list; public: typedef wxStringListNode Node; typedef wxChar* value_type; typedef const_reverse_iterator itor; typedef value_type* ptr_type; typedef const value_type& const_reference; Node* m_node; Node* m_init; public: typedef const_reference reference_type; typedef const ptr_type pointer_type; const_reverse_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } const_reverse_iterator() : m_node(__null), m_init(__null) { } const_reverse_iterator(const reverse_iterator& it) : m_node(it.m_node), m_init(it.m_init) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetPrevious(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetPrevious(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetNext() : m_init; return *this;} const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetNext() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; explicit wxStringListBase(size_type n, const_reference v = value_type()) { assign(n, v); } wxStringListBase(const const_iterator& first, const const_iterator& last) { assign(first, last); } iterator begin() { return iterator(GetFirst(), GetLast()); } const_iterator begin() const { return const_iterator(GetFirst(), GetLast()); } iterator end() { return iterator(__null, GetLast()); } const_iterator end() const { return const_iterator(__null, GetLast()); } reverse_iterator rbegin() { return reverse_iterator(GetLast(), GetFirst()); } const_reverse_iterator rbegin() const { return const_reverse_iterator(GetLast(), GetFirst()); } reverse_iterator rend() { return reverse_iterator(__null, GetFirst()); } const_reverse_iterator rend() const { return const_reverse_iterator(__null, GetFirst()); } void resize(size_type n, value_type v = value_type()) { while (n < size()) pop_back(); while (n > size()) push_back(v); } size_type size() const { return GetCount(); } size_type max_size() const { return 2147483647; } bool empty() const { return IsEmpty(); } reference front() { return *begin(); } const_reference front() const { return *begin(); } reference back() { iterator tmp = end(); return *--tmp; } const_reference back() const { const_iterator tmp = end(); return *--tmp; } void push_front(const_reference v = value_type()) { Insert(GetFirst(), (const_base_reference)v); } void pop_front() { DeleteNode(GetFirst()); } void push_back(const_reference v = value_type()) { Append((const_base_reference)v); } void pop_back() { DeleteNode(GetLast()); } void assign(const_iterator first, const const_iterator& last) { clear(); for(; first != last; ++first) Append((const_base_reference)*first); } void assign(size_type n, const_reference v = value_type()) { clear(); for(size_type i = 0; i < n; ++i) Append((const_base_reference)v); } iterator insert(const iterator& it, const_reference v = value_type()) { Insert(it.m_node, (const_base_reference)v); return iterator(it.m_node->GetPrevious(), GetLast()); } void insert(const iterator& it, size_type n, const_reference v = value_type()) { for(size_type i = 0; i < n; ++i) Insert(it.m_node, (const_base_reference)v); } void insert(const iterator& it, const_iterator first, const const_iterator& last) { for(; first != last; ++first) Insert(it.m_node, (const_base_reference)*first); } iterator erase(const iterator& it) { iterator next = iterator(it.m_node->GetNext(), GetLast()); DeleteNode(it.m_node); return next; } iterator erase(const iterator& first, const iterator& last) { iterator next = last; ++next; DeleteNodes(first.m_node, last.m_node); return next; } void clear() { Clear(); } void splice(const iterator& it, wxStringListBase& l, const iterator& first, const iterator& last) { insert(it, first, last); l.erase(first, last); } void splice(const iterator& it, wxStringListBase& l) { splice(it, l, l.begin(), l.end() ); } void splice(const iterator& it, wxStringListBase& l, const iterator& first) { iterator tmp = first; ++tmp; if(it == first || it == tmp) return; insert(it, *first); l.erase(first); } void remove(const_reference v) { DeleteObject((const_base_reference)v); } void reverse() { Reverse(); } }; | |
23491 | ||
23492 | class wxStringList : public wxStringListBase | |
23493 | { | |
23494 | public: | |
23495 | ||
23496 | ||
23497 | ||
23498 | ||
23499 | ||
23500 | ||
23501 | wxStringList(); | |
23502 | wxStringList(const wxChar *first ...); | |
23503 | ||
23504 | ||
23505 | ||
23506 | ||
23507 | wxStringList(const wxStringList& other) : wxStringListBase() { DeleteContents(true); DoCopy(other); } | |
23508 | wxStringList& operator=(const wxStringList& other) | |
23509 | { Clear(); DoCopy(other); return *this; } | |
23510 | ||
23511 | ||
23512 | ||
23513 | wxNode *Add(const wxChar *s); | |
23514 | ||
23515 | ||
23516 | wxNode *Prepend(const wxChar *s); | |
23517 | ||
23518 | bool Delete(const wxChar *s); | |
23519 | ||
23520 | wxChar **ListToArray(bool new_copies = false) const; | |
23521 | bool Member(const wxChar *s) const; | |
23522 | ||
23523 | ||
23524 | void Sort(); | |
23525 | ||
23526 | private: | |
23527 | void DoCopy(const wxStringList&); | |
23528 | ||
23529 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
23530 | }; | |
23531 | # 19 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
23532 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/hash.h" 1 | |
23533 | # 56 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/hash.h" | |
23534 | class wxHashTableBase : public wxObject | |
23535 | { | |
23536 | public: | |
23537 | wxHashTableBase(); | |
23538 | ||
23539 | void Create(wxKeyType keyType = wxKEY_INTEGER, | |
23540 | size_t size = (1000)); | |
23541 | void Destroy(); | |
23542 | ||
23543 | size_t GetSize() const { return m_hashSize; } | |
23544 | size_t GetCount() const { return m_count; } | |
23545 | ||
23546 | void DeleteContents(bool flag); | |
23547 | ||
23548 | protected: | |
23549 | ||
23550 | wxNodeBase *GetNode(long key, long value) const; | |
23551 | ||
23552 | ||
23553 | wxListBase **m_hashTable; | |
23554 | ||
23555 | ||
23556 | size_t m_hashSize; | |
23557 | ||
23558 | ||
23559 | wxKeyType m_keyType; | |
23560 | ||
23561 | ||
23562 | size_t m_count; | |
23563 | ||
23564 | ||
23565 | bool m_deleteContents; | |
23566 | ||
23567 | private: | |
23568 | ||
23569 | private: wxHashTableBase(const wxHashTableBase&); wxHashTableBase& operator=(const wxHashTableBase&); | |
23570 | }; | |
23571 | # 240 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/hash.h" | |
23572 | class wxHashTableLong : public wxObject | |
23573 | { | |
23574 | public: | |
23575 | wxHashTableLong(size_t size = (1000)) | |
23576 | { Init(size); } | |
23577 | virtual ~wxHashTableLong(); | |
23578 | ||
23579 | void Create(size_t size = (1000)); | |
23580 | void Destroy(); | |
23581 | ||
23582 | size_t GetSize() const { return m_hashSize; } | |
23583 | size_t GetCount() const { return m_count; } | |
23584 | ||
23585 | void Put(long key, long value); | |
23586 | long Get(long key) const; | |
23587 | long Delete(long key); | |
23588 | ||
23589 | protected: | |
23590 | void Init(size_t size); | |
23591 | ||
23592 | private: | |
23593 | wxArrayLong **m_values, | |
23594 | **m_keys; | |
23595 | ||
23596 | ||
23597 | size_t m_hashSize; | |
23598 | ||
23599 | ||
23600 | size_t m_count; | |
23601 | ||
23602 | ||
23603 | private: wxHashTableLong(const wxHashTableLong&); wxHashTableLong& operator=(const wxHashTableLong&); | |
23604 | }; | |
23605 | ||
23606 | ||
23607 | ||
23608 | ||
23609 | ||
23610 | class wxStringHashTable : public wxObject | |
23611 | { | |
23612 | public: | |
23613 | wxStringHashTable(size_t sizeTable = (1000)); | |
23614 | virtual ~wxStringHashTable(); | |
23615 | ||
23616 | ||
23617 | void Put(long key, const wxString& value); | |
23618 | ||
23619 | ||
23620 | ||
23621 | wxString Get(long key, bool *wasFound = __null) const; | |
23622 | ||
23623 | ||
23624 | bool Delete(long key) const; | |
23625 | ||
23626 | ||
23627 | void Destroy(); | |
23628 | ||
23629 | private: | |
23630 | wxArrayLong **m_keys; | |
23631 | wxArrayString **m_values; | |
23632 | ||
23633 | ||
23634 | size_t m_hashSize; | |
23635 | ||
23636 | private: wxStringHashTable(const wxStringHashTable&); wxStringHashTable& operator=(const wxStringHashTable&); | |
23637 | }; | |
23638 | # 418 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/hash.h" | |
23639 | class wxHashTable : public wxObject | |
23640 | { | |
23641 | public: | |
23642 | typedef wxNode Node; | |
23643 | typedef wxNode* compatibility_iterator; | |
23644 | ||
23645 | int n; | |
23646 | int current_position; | |
23647 | wxNode *current_node; | |
23648 | ||
23649 | unsigned int key_type; | |
23650 | wxList **hash_table; | |
23651 | ||
23652 | wxHashTable(int the_key_type = wxKEY_INTEGER, | |
23653 | int size = (1000)); | |
23654 | ~wxHashTable(); | |
23655 | ||
23656 | ||
23657 | wxHashTable(const wxHashTable& table) : wxObject() | |
23658 | { DoCopy(table); } | |
23659 | wxHashTable& operator=(const wxHashTable& table) | |
23660 | { Clear(); DoCopy(table); return *this; } | |
23661 | ||
23662 | void DoCopy(const wxHashTable& table); | |
23663 | ||
23664 | void Destroy(); | |
23665 | ||
23666 | bool Create(int the_key_type = wxKEY_INTEGER, | |
23667 | int size = (1000)); | |
23668 | # 461 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/hash.h" | |
23669 | void Put(long key, long value, wxObject *object); | |
23670 | void Put(long key, const wxChar *value, wxObject *object); | |
23671 | ||
23672 | ||
23673 | void Put(long value, wxObject *object); | |
23674 | void Put(const wxChar *value, wxObject *object); | |
23675 | ||
23676 | ||
23677 | wxObject *Get(long key, long value) const; | |
23678 | wxObject *Get(long key, const wxChar *value) const; | |
23679 | ||
23680 | ||
23681 | wxObject *Get(long value) const; | |
23682 | wxObject *Get(const wxChar *value) const; | |
23683 | ||
23684 | ||
23685 | wxObject *Delete(long key); | |
23686 | wxObject *Delete(const wxChar *key); | |
23687 | ||
23688 | wxObject *Delete(long key, int value); | |
23689 | wxObject *Delete(long key, const wxChar *value); | |
23690 | ||
23691 | ||
23692 | ||
23693 | long MakeKey(const wxChar *string) const; | |
23694 | ||
23695 | ||
23696 | ||
23697 | ||
23698 | ||
23699 | void BeginFind(); | |
23700 | Node* Next(); | |
23701 | ||
23702 | void DeleteContents(bool flag); | |
23703 | void Clear(); | |
23704 | ||
23705 | ||
23706 | size_t GetCount() const { return m_count; } | |
23707 | ||
23708 | private: | |
23709 | size_t m_count; | |
23710 | bool m_deleteContents; | |
23711 | ||
23712 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
23713 | }; | |
23714 | # 20 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
23715 | ||
23716 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/intl.h" 1 | |
23717 | # 51 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/intl.h" | |
23718 | class wxLocale; | |
23719 | class wxLanguageInfoArray; | |
23720 | class wxMsgCatalog; | |
23721 | # 67 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/intl.h" | |
23722 | enum wxLanguage | |
23723 | { | |
23724 | ||
23725 | wxLANGUAGE_DEFAULT, | |
23726 | ||
23727 | wxLANGUAGE_UNKNOWN, | |
23728 | ||
23729 | wxLANGUAGE_ABKHAZIAN, | |
23730 | wxLANGUAGE_AFAR, | |
23731 | wxLANGUAGE_AFRIKAANS, | |
23732 | wxLANGUAGE_ALBANIAN, | |
23733 | wxLANGUAGE_AMHARIC, | |
23734 | wxLANGUAGE_ARABIC, | |
23735 | wxLANGUAGE_ARABIC_ALGERIA, | |
23736 | wxLANGUAGE_ARABIC_BAHRAIN, | |
23737 | wxLANGUAGE_ARABIC_EGYPT, | |
23738 | wxLANGUAGE_ARABIC_IRAQ, | |
23739 | wxLANGUAGE_ARABIC_JORDAN, | |
23740 | wxLANGUAGE_ARABIC_KUWAIT, | |
23741 | wxLANGUAGE_ARABIC_LEBANON, | |
23742 | wxLANGUAGE_ARABIC_LIBYA, | |
23743 | wxLANGUAGE_ARABIC_MOROCCO, | |
23744 | wxLANGUAGE_ARABIC_OMAN, | |
23745 | wxLANGUAGE_ARABIC_QATAR, | |
23746 | wxLANGUAGE_ARABIC_SAUDI_ARABIA, | |
23747 | wxLANGUAGE_ARABIC_SUDAN, | |
23748 | wxLANGUAGE_ARABIC_SYRIA, | |
23749 | wxLANGUAGE_ARABIC_TUNISIA, | |
23750 | wxLANGUAGE_ARABIC_UAE, | |
23751 | wxLANGUAGE_ARABIC_YEMEN, | |
23752 | wxLANGUAGE_ARMENIAN, | |
23753 | wxLANGUAGE_ASSAMESE, | |
23754 | wxLANGUAGE_AYMARA, | |
23755 | wxLANGUAGE_AZERI, | |
23756 | wxLANGUAGE_AZERI_CYRILLIC, | |
23757 | wxLANGUAGE_AZERI_LATIN, | |
23758 | wxLANGUAGE_BASHKIR, | |
23759 | wxLANGUAGE_BASQUE, | |
23760 | wxLANGUAGE_BELARUSIAN, | |
23761 | wxLANGUAGE_BENGALI, | |
23762 | wxLANGUAGE_BHUTANI, | |
23763 | wxLANGUAGE_BIHARI, | |
23764 | wxLANGUAGE_BISLAMA, | |
23765 | wxLANGUAGE_BRETON, | |
23766 | wxLANGUAGE_BULGARIAN, | |
23767 | wxLANGUAGE_BURMESE, | |
23768 | wxLANGUAGE_CAMBODIAN, | |
23769 | wxLANGUAGE_CATALAN, | |
23770 | wxLANGUAGE_CHINESE, | |
23771 | wxLANGUAGE_CHINESE_SIMPLIFIED, | |
23772 | wxLANGUAGE_CHINESE_TRADITIONAL, | |
23773 | wxLANGUAGE_CHINESE_HONGKONG, | |
23774 | wxLANGUAGE_CHINESE_MACAU, | |
23775 | wxLANGUAGE_CHINESE_SINGAPORE, | |
23776 | wxLANGUAGE_CHINESE_TAIWAN, | |
23777 | wxLANGUAGE_CORSICAN, | |
23778 | wxLANGUAGE_CROATIAN, | |
23779 | wxLANGUAGE_CZECH, | |
23780 | wxLANGUAGE_DANISH, | |
23781 | wxLANGUAGE_DUTCH, | |
23782 | wxLANGUAGE_DUTCH_BELGIAN, | |
23783 | wxLANGUAGE_ENGLISH, | |
23784 | wxLANGUAGE_ENGLISH_UK, | |
23785 | wxLANGUAGE_ENGLISH_US, | |
23786 | wxLANGUAGE_ENGLISH_AUSTRALIA, | |
23787 | wxLANGUAGE_ENGLISH_BELIZE, | |
23788 | wxLANGUAGE_ENGLISH_BOTSWANA, | |
23789 | wxLANGUAGE_ENGLISH_CANADA, | |
23790 | wxLANGUAGE_ENGLISH_CARIBBEAN, | |
23791 | wxLANGUAGE_ENGLISH_DENMARK, | |
23792 | wxLANGUAGE_ENGLISH_EIRE, | |
23793 | wxLANGUAGE_ENGLISH_JAMAICA, | |
23794 | wxLANGUAGE_ENGLISH_NEW_ZEALAND, | |
23795 | wxLANGUAGE_ENGLISH_PHILIPPINES, | |
23796 | wxLANGUAGE_ENGLISH_SOUTH_AFRICA, | |
23797 | wxLANGUAGE_ENGLISH_TRINIDAD, | |
23798 | wxLANGUAGE_ENGLISH_ZIMBABWE, | |
23799 | wxLANGUAGE_ESPERANTO, | |
23800 | wxLANGUAGE_ESTONIAN, | |
23801 | wxLANGUAGE_FAEROESE, | |
23802 | wxLANGUAGE_FARSI, | |
23803 | wxLANGUAGE_FIJI, | |
23804 | wxLANGUAGE_FINNISH, | |
23805 | wxLANGUAGE_FRENCH, | |
23806 | wxLANGUAGE_FRENCH_BELGIAN, | |
23807 | wxLANGUAGE_FRENCH_CANADIAN, | |
23808 | wxLANGUAGE_FRENCH_LUXEMBOURG, | |
23809 | wxLANGUAGE_FRENCH_MONACO, | |
23810 | wxLANGUAGE_FRENCH_SWISS, | |
23811 | wxLANGUAGE_FRISIAN, | |
23812 | wxLANGUAGE_GALICIAN, | |
23813 | wxLANGUAGE_GEORGIAN, | |
23814 | wxLANGUAGE_GERMAN, | |
23815 | wxLANGUAGE_GERMAN_AUSTRIAN, | |
23816 | wxLANGUAGE_GERMAN_BELGIUM, | |
23817 | wxLANGUAGE_GERMAN_LIECHTENSTEIN, | |
23818 | wxLANGUAGE_GERMAN_LUXEMBOURG, | |
23819 | wxLANGUAGE_GERMAN_SWISS, | |
23820 | wxLANGUAGE_GREEK, | |
23821 | wxLANGUAGE_GREENLANDIC, | |
23822 | wxLANGUAGE_GUARANI, | |
23823 | wxLANGUAGE_GUJARATI, | |
23824 | wxLANGUAGE_HAUSA, | |
23825 | wxLANGUAGE_HEBREW, | |
23826 | wxLANGUAGE_HINDI, | |
23827 | wxLANGUAGE_HUNGARIAN, | |
23828 | wxLANGUAGE_ICELANDIC, | |
23829 | wxLANGUAGE_INDONESIAN, | |
23830 | wxLANGUAGE_INTERLINGUA, | |
23831 | wxLANGUAGE_INTERLINGUE, | |
23832 | wxLANGUAGE_INUKTITUT, | |
23833 | wxLANGUAGE_INUPIAK, | |
23834 | wxLANGUAGE_IRISH, | |
23835 | wxLANGUAGE_ITALIAN, | |
23836 | wxLANGUAGE_ITALIAN_SWISS, | |
23837 | wxLANGUAGE_JAPANESE, | |
23838 | wxLANGUAGE_JAVANESE, | |
23839 | wxLANGUAGE_KANNADA, | |
23840 | wxLANGUAGE_KASHMIRI, | |
23841 | wxLANGUAGE_KASHMIRI_INDIA, | |
23842 | wxLANGUAGE_KAZAKH, | |
23843 | wxLANGUAGE_KERNEWEK, | |
23844 | wxLANGUAGE_KINYARWANDA, | |
23845 | wxLANGUAGE_KIRGHIZ, | |
23846 | wxLANGUAGE_KIRUNDI, | |
23847 | wxLANGUAGE_KONKANI, | |
23848 | wxLANGUAGE_KOREAN, | |
23849 | wxLANGUAGE_KURDISH, | |
23850 | wxLANGUAGE_LAOTHIAN, | |
23851 | wxLANGUAGE_LATIN, | |
23852 | wxLANGUAGE_LATVIAN, | |
23853 | wxLANGUAGE_LINGALA, | |
23854 | wxLANGUAGE_LITHUANIAN, | |
23855 | wxLANGUAGE_MACEDONIAN, | |
23856 | wxLANGUAGE_MALAGASY, | |
23857 | wxLANGUAGE_MALAY, | |
23858 | wxLANGUAGE_MALAYALAM, | |
23859 | wxLANGUAGE_MALAY_BRUNEI_DARUSSALAM, | |
23860 | wxLANGUAGE_MALAY_MALAYSIA, | |
23861 | wxLANGUAGE_MALTESE, | |
23862 | wxLANGUAGE_MANIPURI, | |
23863 | wxLANGUAGE_MAORI, | |
23864 | wxLANGUAGE_MARATHI, | |
23865 | wxLANGUAGE_MOLDAVIAN, | |
23866 | wxLANGUAGE_MONGOLIAN, | |
23867 | wxLANGUAGE_NAURU, | |
23868 | wxLANGUAGE_NEPALI, | |
23869 | wxLANGUAGE_NEPALI_INDIA, | |
23870 | wxLANGUAGE_NORWEGIAN_BOKMAL, | |
23871 | wxLANGUAGE_NORWEGIAN_NYNORSK, | |
23872 | wxLANGUAGE_OCCITAN, | |
23873 | wxLANGUAGE_ORIYA, | |
23874 | wxLANGUAGE_OROMO, | |
23875 | wxLANGUAGE_PASHTO, | |
23876 | wxLANGUAGE_POLISH, | |
23877 | wxLANGUAGE_PORTUGUESE, | |
23878 | wxLANGUAGE_PORTUGUESE_BRAZILIAN, | |
23879 | wxLANGUAGE_PUNJABI, | |
23880 | wxLANGUAGE_QUECHUA, | |
23881 | wxLANGUAGE_RHAETO_ROMANCE, | |
23882 | wxLANGUAGE_ROMANIAN, | |
23883 | wxLANGUAGE_RUSSIAN, | |
23884 | wxLANGUAGE_RUSSIAN_UKRAINE, | |
23885 | wxLANGUAGE_SAMOAN, | |
23886 | wxLANGUAGE_SANGHO, | |
23887 | wxLANGUAGE_SANSKRIT, | |
23888 | wxLANGUAGE_SCOTS_GAELIC, | |
23889 | wxLANGUAGE_SERBIAN, | |
23890 | wxLANGUAGE_SERBIAN_CYRILLIC, | |
23891 | wxLANGUAGE_SERBIAN_LATIN, | |
23892 | wxLANGUAGE_SERBO_CROATIAN, | |
23893 | wxLANGUAGE_SESOTHO, | |
23894 | wxLANGUAGE_SETSWANA, | |
23895 | wxLANGUAGE_SHONA, | |
23896 | wxLANGUAGE_SINDHI, | |
23897 | wxLANGUAGE_SINHALESE, | |
23898 | wxLANGUAGE_SISWATI, | |
23899 | wxLANGUAGE_SLOVAK, | |
23900 | wxLANGUAGE_SLOVENIAN, | |
23901 | wxLANGUAGE_SOMALI, | |
23902 | wxLANGUAGE_SPANISH, | |
23903 | wxLANGUAGE_SPANISH_ARGENTINA, | |
23904 | wxLANGUAGE_SPANISH_BOLIVIA, | |
23905 | wxLANGUAGE_SPANISH_CHILE, | |
23906 | wxLANGUAGE_SPANISH_COLOMBIA, | |
23907 | wxLANGUAGE_SPANISH_COSTA_RICA, | |
23908 | wxLANGUAGE_SPANISH_DOMINICAN_REPUBLIC, | |
23909 | wxLANGUAGE_SPANISH_ECUADOR, | |
23910 | wxLANGUAGE_SPANISH_EL_SALVADOR, | |
23911 | wxLANGUAGE_SPANISH_GUATEMALA, | |
23912 | wxLANGUAGE_SPANISH_HONDURAS, | |
23913 | wxLANGUAGE_SPANISH_MEXICAN, | |
23914 | wxLANGUAGE_SPANISH_MODERN, | |
23915 | wxLANGUAGE_SPANISH_NICARAGUA, | |
23916 | wxLANGUAGE_SPANISH_PANAMA, | |
23917 | wxLANGUAGE_SPANISH_PARAGUAY, | |
23918 | wxLANGUAGE_SPANISH_PERU, | |
23919 | wxLANGUAGE_SPANISH_PUERTO_RICO, | |
23920 | wxLANGUAGE_SPANISH_URUGUAY, | |
23921 | wxLANGUAGE_SPANISH_US, | |
23922 | wxLANGUAGE_SPANISH_VENEZUELA, | |
23923 | wxLANGUAGE_SUNDANESE, | |
23924 | wxLANGUAGE_SWAHILI, | |
23925 | wxLANGUAGE_SWEDISH, | |
23926 | wxLANGUAGE_SWEDISH_FINLAND, | |
23927 | wxLANGUAGE_TAGALOG, | |
23928 | wxLANGUAGE_TAJIK, | |
23929 | wxLANGUAGE_TAMIL, | |
23930 | wxLANGUAGE_TATAR, | |
23931 | wxLANGUAGE_TELUGU, | |
23932 | wxLANGUAGE_THAI, | |
23933 | wxLANGUAGE_TIBETAN, | |
23934 | wxLANGUAGE_TIGRINYA, | |
23935 | wxLANGUAGE_TONGA, | |
23936 | wxLANGUAGE_TSONGA, | |
23937 | wxLANGUAGE_TURKISH, | |
23938 | wxLANGUAGE_TURKMEN, | |
23939 | wxLANGUAGE_TWI, | |
23940 | wxLANGUAGE_UIGHUR, | |
23941 | wxLANGUAGE_UKRAINIAN, | |
23942 | wxLANGUAGE_URDU, | |
23943 | wxLANGUAGE_URDU_INDIA, | |
23944 | wxLANGUAGE_URDU_PAKISTAN, | |
23945 | wxLANGUAGE_UZBEK, | |
23946 | wxLANGUAGE_UZBEK_CYRILLIC, | |
23947 | wxLANGUAGE_UZBEK_LATIN, | |
23948 | wxLANGUAGE_VIETNAMESE, | |
23949 | wxLANGUAGE_VOLAPUK, | |
23950 | wxLANGUAGE_WELSH, | |
23951 | wxLANGUAGE_WOLOF, | |
23952 | wxLANGUAGE_XHOSA, | |
23953 | wxLANGUAGE_YIDDISH, | |
23954 | wxLANGUAGE_YORUBA, | |
23955 | wxLANGUAGE_ZHUANG, | |
23956 | wxLANGUAGE_ZULU, | |
23957 | ||
23958 | ||
23959 | wxLANGUAGE_USER_DEFINED | |
23960 | }; | |
23961 | # 314 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/intl.h" | |
23962 | struct wxLanguageInfo | |
23963 | { | |
23964 | int Language; | |
23965 | wxString CanonicalName; | |
23966 | ||
23967 | ||
23968 | ||
23969 | ||
23970 | wxString Description; | |
23971 | }; | |
23972 | ||
23973 | ||
23974 | ||
23975 | ||
23976 | ||
23977 | enum wxLocaleCategory | |
23978 | { | |
23979 | ||
23980 | wxLOCALE_CAT_NUMBER, | |
23981 | ||
23982 | ||
23983 | wxLOCALE_CAT_DATE, | |
23984 | ||
23985 | ||
23986 | wxLOCALE_CAT_MONEY, | |
23987 | ||
23988 | wxLOCALE_CAT_MAX | |
23989 | }; | |
23990 | ||
23991 | ||
23992 | ||
23993 | ||
23994 | ||
23995 | enum wxLocaleInfo | |
23996 | { | |
23997 | ||
23998 | wxLOCALE_THOUSANDS_SEP, | |
23999 | ||
24000 | ||
24001 | wxLOCALE_DECIMAL_POINT | |
24002 | ||
24003 | }; | |
24004 | ||
24005 | ||
24006 | ||
24007 | ||
24008 | ||
24009 | ||
24010 | enum wxLocaleInitFlags | |
24011 | { | |
24012 | wxLOCALE_LOAD_DEFAULT = 0x0001, | |
24013 | wxLOCALE_CONV_ENCODING = 0x0002 | |
24014 | }; | |
24015 | ||
24016 | class wxLocale | |
24017 | { | |
24018 | public: | |
24019 | ||
24020 | ||
24021 | ||
24022 | ||
24023 | wxLocale() { DoCommonInit(); } | |
24024 | ||
24025 | ||
24026 | wxLocale(const wxChar *szName, | |
24027 | const wxChar *szShort = (const wxChar *) __null, | |
24028 | const wxChar *szLocale = (const wxChar *) __null, | |
24029 | bool bLoadDefault = true, | |
24030 | bool bConvertEncoding = false) | |
24031 | { | |
24032 | DoCommonInit(); | |
24033 | ||
24034 | Init(szName, szShort, szLocale, bLoadDefault, bConvertEncoding); | |
24035 | } | |
24036 | ||
24037 | wxLocale(int language, | |
24038 | int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING) | |
24039 | { | |
24040 | DoCommonInit(); | |
24041 | ||
24042 | Init(language, flags); | |
24043 | } | |
24044 | ||
24045 | ||
24046 | bool Init(const wxChar *szName, | |
24047 | const wxChar *szShort = (const wxChar *) __null, | |
24048 | const wxChar *szLocale = (const wxChar *) __null, | |
24049 | bool bLoadDefault = true, | |
24050 | bool bConvertEncoding = false); | |
24051 | ||
24052 | ||
24053 | bool Init(int language = wxLANGUAGE_DEFAULT, | |
24054 | int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING); | |
24055 | ||
24056 | ||
24057 | ~wxLocale(); | |
24058 | ||
24059 | ||
24060 | ||
24061 | static int GetSystemLanguage(); | |
24062 | ||
24063 | ||
24064 | ||
24065 | static wxFontEncoding GetSystemEncoding(); | |
24066 | ||
24067 | ||
24068 | ||
24069 | static wxString GetSystemEncodingName(); | |
24070 | ||
24071 | ||
24072 | ||
24073 | static wxString GetInfo(wxLocaleInfo index, wxLocaleCategory cat); | |
24074 | ||
24075 | ||
24076 | bool IsOk() const { return m_pszOldLocale != __null; } | |
24077 | ||
24078 | ||
24079 | const wxChar *GetLocale() const { return m_strLocale; } | |
24080 | ||
24081 | ||
24082 | int GetLanguage() const { return m_language; } | |
24083 | ||
24084 | ||
24085 | wxString GetSysName() const; | |
24086 | ||
24087 | ||
24088 | ||
24089 | ||
24090 | wxString GetCanonicalName() const { return m_strShort; } | |
24091 | ||
24092 | ||
24093 | ||
24094 | ||
24095 | ||
24096 | ||
24097 | static void AddCatalogLookupPathPrefix(const wxString& prefix); | |
24098 | # 458 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/intl.h" | |
24099 | bool AddCatalog(const wxChar *szDomain); | |
24100 | bool AddCatalog(const wxChar *szDomain, | |
24101 | wxLanguage msgIdLanguage, const wxChar *msgIdCharset); | |
24102 | ||
24103 | ||
24104 | bool IsLoaded(const wxChar *szDomain) const; | |
24105 | ||
24106 | ||
24107 | ||
24108 | ||
24109 | static const wxLanguageInfo *GetLanguageInfo(int lang); | |
24110 | ||
24111 | ||
24112 | ||
24113 | static wxString GetLanguageName(int lang); | |
24114 | ||
24115 | ||
24116 | ||
24117 | ||
24118 | ||
24119 | ||
24120 | static const wxLanguageInfo *FindLanguageInfo(const wxString& locale); | |
24121 | ||
24122 | ||
24123 | ||
24124 | ||
24125 | static void AddLanguage(const wxLanguageInfo& info); | |
24126 | # 497 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/intl.h" | |
24127 | const wxChar *GetString(const wxChar *szOrigString, | |
24128 | const wxChar *szDomain = __null) const; | |
24129 | ||
24130 | const wxChar *GetString(const wxChar *szOrigString, | |
24131 | const wxChar *szOrigString2, | |
24132 | size_t n, | |
24133 | const wxChar *szDomain = __null) const; | |
24134 | ||
24135 | ||
24136 | const wxString& GetName() const { return m_strShort; } | |
24137 | ||
24138 | ||
24139 | wxString GetHeaderValue( const wxChar* szHeader, | |
24140 | const wxChar* szDomain = __null ) const; | |
24141 | ||
24142 | ||
24143 | ||
24144 | ||
24145 | static void CreateLanguagesDB(); | |
24146 | static void DestroyLanguagesDB(); | |
24147 | ||
24148 | private: | |
24149 | ||
24150 | wxMsgCatalog *FindCatalog(const wxChar *szDomain) const; | |
24151 | ||
24152 | ||
24153 | ||
24154 | static void InitLanguagesDB(); | |
24155 | ||
24156 | ||
24157 | void DoCommonInit(); | |
24158 | ||
24159 | wxString m_strLocale, | |
24160 | m_strShort; | |
24161 | int m_language; | |
24162 | ||
24163 | const wxChar *m_pszOldLocale; | |
24164 | wxLocale *m_pOldLocale; | |
24165 | ||
24166 | wxMsgCatalog *m_pMsgCat; | |
24167 | ||
24168 | bool m_bConvertEncoding; | |
24169 | ||
24170 | bool m_initialized; | |
24171 | ||
24172 | static wxLanguageInfoArray *ms_languagesDB; | |
24173 | ||
24174 | private: wxLocale(const wxLocale&); wxLocale& operator=(const wxLocale&); | |
24175 | }; | |
24176 | ||
24177 | ||
24178 | ||
24179 | ||
24180 | ||
24181 | ||
24182 | extern wxLocale* wxGetLocale(); | |
24183 | ||
24184 | ||
24185 | inline const wxChar *wxGetTranslation(const wxChar *sz) | |
24186 | { | |
24187 | wxLocale *pLoc = wxGetLocale(); | |
24188 | if (pLoc) | |
24189 | return pLoc->GetString(sz); | |
24190 | else | |
24191 | return sz; | |
24192 | } | |
24193 | inline const wxChar *wxGetTranslation(const wxChar *sz1, const wxChar *sz2, | |
24194 | size_t n) | |
24195 | { | |
24196 | wxLocale *pLoc = wxGetLocale(); | |
24197 | if (pLoc) | |
24198 | return pLoc->GetString(sz1, sz2, n); | |
24199 | else | |
24200 | return n == 1 ? sz1 : sz2; | |
24201 | } | |
24202 | # 22 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
24203 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/log.h" 1 | |
24204 | # 44 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/log.h" | |
24205 | typedef unsigned long wxTraceMask; | |
24206 | typedef unsigned long wxLogLevel; | |
24207 | # 58 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/log.h" | |
24208 | # 1 "/usr/include/time.h" 1 3 4 | |
24209 | # 59 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/log.h" 2 | |
24210 | # 76 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/log.h" | |
24211 | class wxTextCtrl; | |
24212 | class wxLogFrame; | |
24213 | class wxFrame; | |
24214 | class wxWindow; | |
24215 | ||
24216 | ||
24217 | ||
24218 | ||
24219 | ||
24220 | ||
24221 | ||
24222 | enum | |
24223 | { | |
24224 | wxLOG_FatalError, | |
24225 | wxLOG_Error, | |
24226 | wxLOG_Warning, | |
24227 | wxLOG_Message, | |
24228 | wxLOG_Status, | |
24229 | wxLOG_Info, | |
24230 | wxLOG_Debug, | |
24231 | wxLOG_Trace, | |
24232 | wxLOG_Progress, | |
24233 | wxLOG_User = 100, | |
24234 | wxLOG_Max = 10000 | |
24235 | }; | |
24236 | # 115 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/log.h" | |
24237 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/iosfwrap.h" 1 | |
24238 | # 116 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/log.h" 2 | |
24239 | ||
24240 | ||
24241 | ||
24242 | ||
24243 | ||
24244 | ||
24245 | class wxLog | |
24246 | { | |
24247 | public: | |
24248 | ||
24249 | wxLog(){} | |
24250 | ||
24251 | ||
24252 | ||
24253 | ||
24254 | ||
24255 | ||
24256 | static wxChar *SetLogBuffer( wxChar *buf, size_t size = 0 ); | |
24257 | ||
24258 | ||
24259 | ||
24260 | ||
24261 | static bool IsEnabled() { return ms_doLog; } | |
24262 | ||
24263 | ||
24264 | static bool EnableLogging(bool doIt = true) | |
24265 | { bool doLogOld = ms_doLog; ms_doLog = doIt; return doLogOld; } | |
24266 | ||
24267 | ||
24268 | ||
24269 | static void OnLog(wxLogLevel level, const wxChar *szString, time_t t) | |
24270 | { | |
24271 | if ( IsEnabled() && ms_logLevel >= level ) | |
24272 | { | |
24273 | wxLog *pLogger = GetActiveTarget(); | |
24274 | if ( pLogger ) | |
24275 | pLogger->DoLog(level, szString, t); | |
24276 | } | |
24277 | } | |
24278 | ||
24279 | ||
24280 | ||
24281 | ||
24282 | ||
24283 | ||
24284 | virtual void Flush(); | |
24285 | ||
24286 | ||
24287 | static void FlushActive() | |
24288 | { | |
24289 | if ( !ms_suspendCount ) | |
24290 | { | |
24291 | wxLog *log = GetActiveTarget(); | |
24292 | if ( log ) | |
24293 | log->Flush(); | |
24294 | } | |
24295 | } | |
24296 | ||
24297 | ||
24298 | ||
24299 | ||
24300 | static wxLog *GetActiveTarget(); | |
24301 | ||
24302 | ||
24303 | static wxLog *SetActiveTarget(wxLog *pLogger); | |
24304 | ||
24305 | ||
24306 | ||
24307 | ||
24308 | static void Suspend() { ms_suspendCount++; } | |
24309 | ||
24310 | ||
24311 | static void Resume() { ms_suspendCount--; } | |
24312 | ||
24313 | ||
24314 | ||
24315 | ||
24316 | static void SetVerbose(bool bVerbose = true) { ms_bVerbose = bVerbose; } | |
24317 | ||
24318 | ||
24319 | static void SetLogLevel(wxLogLevel logLevel) { ms_logLevel = logLevel; } | |
24320 | ||
24321 | ||
24322 | ||
24323 | static void DontCreateOnDemand(); | |
24324 | ||
24325 | ||
24326 | static void SetTraceMask(wxTraceMask ulMask) { ms_ulTraceMask = ulMask; } | |
24327 | ||
24328 | ||
24329 | static void AddTraceMask(const wxString& str) | |
24330 | { ms_aTraceMasks.push_back(str); } | |
24331 | ||
24332 | ||
24333 | static void RemoveTraceMask(const wxString& str); | |
24334 | ||
24335 | ||
24336 | static void ClearTraceMasks(); | |
24337 | ||
24338 | ||
24339 | static const wxArrayString &GetTraceMasks() { return ms_aTraceMasks; } | |
24340 | ||
24341 | ||
24342 | ||
24343 | ||
24344 | static void SetTimestamp(const wxChar *ts) { ms_timestamp = ts; } | |
24345 | ||
24346 | ||
24347 | ||
24348 | ||
24349 | ||
24350 | static bool GetVerbose() { return ms_bVerbose; } | |
24351 | ||
24352 | ||
24353 | static wxTraceMask GetTraceMask() { return ms_ulTraceMask; } | |
24354 | ||
24355 | ||
24356 | static bool IsAllowedTraceMask(const wxChar *mask); | |
24357 | ||
24358 | ||
24359 | static wxLogLevel GetLogLevel() { return ms_logLevel; } | |
24360 | ||
24361 | ||
24362 | static const wxChar *GetTimestamp() { return ms_timestamp; } | |
24363 | ||
24364 | ||
24365 | ||
24366 | ||
24367 | ||
24368 | ||
24369 | static void TimeStamp(wxString *str); | |
24370 | ||
24371 | ||
24372 | virtual ~wxLog() { } | |
24373 | ||
24374 | ||
24375 | ||
24376 | bool HasPendingMessages() const { return true; } | |
24377 | ||
24378 | protected: | |
24379 | ||
24380 | ||
24381 | ||
24382 | ||
24383 | virtual void DoLog(wxLogLevel level, const wxChar *szString, time_t t); | |
24384 | ||
24385 | ||
24386 | ||
24387 | virtual void DoLogString(const wxChar *szString, time_t t); | |
24388 | ||
24389 | private: | |
24390 | ||
24391 | ||
24392 | ||
24393 | static wxLog *ms_pLogger; | |
24394 | static bool ms_doLog; | |
24395 | static bool ms_bAutoCreate; | |
24396 | static bool ms_bVerbose; | |
24397 | ||
24398 | static wxLogLevel ms_logLevel; | |
24399 | ||
24400 | static size_t ms_suspendCount; | |
24401 | ||
24402 | ||
24403 | ||
24404 | static const wxChar *ms_timestamp; | |
24405 | ||
24406 | static wxTraceMask ms_ulTraceMask; | |
24407 | static wxArrayString ms_aTraceMasks; | |
24408 | }; | |
24409 | # 294 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/log.h" | |
24410 | class wxLogBuffer : public wxLog | |
24411 | { | |
24412 | public: | |
24413 | wxLogBuffer() { } | |
24414 | ||
24415 | ||
24416 | const wxString& GetBuffer() const { return m_str; } | |
24417 | ||
24418 | ||
24419 | ||
24420 | virtual void Flush(); | |
24421 | ||
24422 | protected: | |
24423 | virtual void DoLog(wxLogLevel level, const wxChar *szString, time_t t); | |
24424 | virtual void DoLogString(const wxChar *szString, time_t t); | |
24425 | ||
24426 | private: | |
24427 | wxString m_str; | |
24428 | ||
24429 | private: wxLogBuffer(const wxLogBuffer&); wxLogBuffer& operator=(const wxLogBuffer&); | |
24430 | }; | |
24431 | ||
24432 | ||
24433 | ||
24434 | ||
24435 | class wxLogStderr : public wxLog | |
24436 | { | |
24437 | public: | |
24438 | ||
24439 | wxLogStderr(FILE *fp = (FILE *) __null); | |
24440 | ||
24441 | protected: | |
24442 | ||
24443 | virtual void DoLogString(const wxChar *szString, time_t t); | |
24444 | ||
24445 | FILE *m_fp; | |
24446 | ||
24447 | private: wxLogStderr(const wxLogStderr&); wxLogStderr& operator=(const wxLogStderr&); | |
24448 | }; | |
24449 | ||
24450 | ||
24451 | ||
24452 | ||
24453 | class wxLogStream : public wxLog | |
24454 | { | |
24455 | public: | |
24456 | ||
24457 | wxLogStream(std:: ostream *ostr = (std:: ostream *) __null); | |
24458 | ||
24459 | protected: | |
24460 | ||
24461 | virtual void DoLogString(const wxChar *szString, time_t t); | |
24462 | ||
24463 | ||
24464 | std:: ostream *m_ostr; | |
24465 | }; | |
24466 | # 373 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/log.h" | |
24467 | class wxLogNull | |
24468 | { | |
24469 | public: | |
24470 | wxLogNull() : m_flagOld(wxLog::EnableLogging(false)) { } | |
24471 | ~wxLogNull() { (void)wxLog::EnableLogging(m_flagOld); } | |
24472 | ||
24473 | private: | |
24474 | bool m_flagOld; | |
24475 | }; | |
24476 | # 392 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/log.h" | |
24477 | class wxLogChain : public wxLog | |
24478 | { | |
24479 | public: | |
24480 | wxLogChain(wxLog *logger); | |
24481 | virtual ~wxLogChain(); | |
24482 | ||
24483 | ||
24484 | void SetLog(wxLog *logger); | |
24485 | ||
24486 | ||
24487 | ||
24488 | void PassMessages(bool bDoPass) { m_bPassMessages = bDoPass; } | |
24489 | ||
24490 | ||
24491 | bool IsPassingMessages() const { return m_bPassMessages; } | |
24492 | ||
24493 | ||
24494 | wxLog *GetOldLog() const { return m_logOld; } | |
24495 | ||
24496 | ||
24497 | virtual void Flush(); | |
24498 | ||
24499 | protected: | |
24500 | ||
24501 | virtual void DoLog(wxLogLevel level, const wxChar *szString, time_t t); | |
24502 | ||
24503 | private: | |
24504 | ||
24505 | wxLog *m_logNew; | |
24506 | ||
24507 | ||
24508 | wxLog *m_logOld; | |
24509 | ||
24510 | ||
24511 | bool m_bPassMessages; | |
24512 | ||
24513 | private: wxLogChain(const wxLogChain&); wxLogChain& operator=(const wxLogChain&); | |
24514 | }; | |
24515 | ||
24516 | ||
24517 | class wxLogPassThrough : public wxLogChain | |
24518 | { | |
24519 | public: | |
24520 | wxLogPassThrough(); | |
24521 | ||
24522 | private: | |
24523 | private: wxLogPassThrough(const wxLogPassThrough&); wxLogPassThrough& operator=(const wxLogPassThrough&); | |
24524 | }; | |
24525 | ||
24526 | ||
24527 | ||
24528 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/logg.h" 1 | |
24529 | # 30 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/logg.h" | |
24530 | class wxLogTextCtrl : public wxLog | |
24531 | { | |
24532 | public: | |
24533 | wxLogTextCtrl(wxTextCtrl *pTextCtrl); | |
24534 | ||
24535 | private: | |
24536 | ||
24537 | virtual void DoLogString(const wxChar *szString, time_t t); | |
24538 | ||
24539 | ||
24540 | wxTextCtrl *m_pTextCtrl; | |
24541 | ||
24542 | private: wxLogTextCtrl(const wxLogTextCtrl&); wxLogTextCtrl& operator=(const wxLogTextCtrl&); | |
24543 | }; | |
24544 | # 53 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/logg.h" | |
24545 | class wxLogGui : public wxLog | |
24546 | { | |
24547 | public: | |
24548 | ||
24549 | wxLogGui(); | |
24550 | ||
24551 | ||
24552 | virtual void Flush(); | |
24553 | ||
24554 | protected: | |
24555 | virtual void DoLog(wxLogLevel level, const wxChar *szString, time_t t); | |
24556 | ||
24557 | ||
24558 | void Clear(); | |
24559 | ||
24560 | wxArrayString m_aMessages; | |
24561 | wxArrayInt m_aSeverity; | |
24562 | wxArrayLong m_aTimes; | |
24563 | bool m_bErrors, | |
24564 | m_bWarnings, | |
24565 | m_bHasMessages; | |
24566 | ||
24567 | }; | |
24568 | # 88 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/logg.h" | |
24569 | class wxLogWindow : public wxLogPassThrough | |
24570 | { | |
24571 | public: | |
24572 | wxLogWindow(wxWindow *pParent, | |
24573 | const wxChar *szTitle, | |
24574 | bool bShow = true, | |
24575 | bool bPassToOld = true); | |
24576 | ||
24577 | ~wxLogWindow(); | |
24578 | ||
24579 | ||
24580 | ||
24581 | void Show(bool bShow = true); | |
24582 | ||
24583 | wxFrame *GetFrame() const; | |
24584 | ||
24585 | ||
24586 | ||
24587 | ||
24588 | virtual void OnFrameCreate(wxFrame *frame); | |
24589 | ||
24590 | ||
24591 | ||
24592 | ||
24593 | virtual bool OnFrameClose(wxFrame *frame); | |
24594 | ||
24595 | ||
24596 | virtual void OnFrameDelete(wxFrame *frame); | |
24597 | ||
24598 | protected: | |
24599 | virtual void DoLog(wxLogLevel level, const wxChar *szString, time_t t); | |
24600 | virtual void DoLogString(const wxChar *szString, time_t t); | |
24601 | ||
24602 | private: | |
24603 | wxLogFrame *m_pLogFrame; | |
24604 | ||
24605 | private: wxLogWindow(const wxLogWindow&); wxLogWindow& operator=(const wxLogWindow&); | |
24606 | }; | |
24607 | # 444 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/log.h" 2 | |
24608 | # 460 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/log.h" | |
24609 | unsigned long wxSysErrorCode(); | |
24610 | ||
24611 | ||
24612 | const wxChar* wxSysErrorMsg(unsigned long nErrCode = 0); | |
24613 | # 517 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/log.h" | |
24614 | extern void wxVLogGeneric(wxLogLevel level, const wxChar *szFormat, va_list argptr); extern void wxLogGeneric(wxLogLevel level, const wxChar *szFormat, ...) __attribute__ ((__format__ (__printf__, 2, 3))); | |
24615 | ||
24616 | ||
24617 | extern void wxVLogFatalError(const wxChar *szFormat, va_list argptr); extern void wxLogFatalError(const wxChar *szFormat, ...) __attribute__ ((__format__ (__printf__, 1, 2))); | |
24618 | extern void wxVLogError(const wxChar *szFormat, va_list argptr); extern void wxLogError(const wxChar *szFormat, ...) __attribute__ ((__format__ (__printf__, 1, 2))); | |
24619 | extern void wxVLogWarning(const wxChar *szFormat, va_list argptr); extern void wxLogWarning(const wxChar *szFormat, ...) __attribute__ ((__format__ (__printf__, 1, 2))); | |
24620 | extern void wxVLogMessage(const wxChar *szFormat, va_list argptr); extern void wxLogMessage(const wxChar *szFormat, ...) __attribute__ ((__format__ (__printf__, 1, 2))); | |
24621 | extern void wxVLogInfo(const wxChar *szFormat, va_list argptr); extern void wxLogInfo(const wxChar *szFormat, ...) __attribute__ ((__format__ (__printf__, 1, 2))); | |
24622 | extern void wxVLogVerbose(const wxChar *szFormat, va_list argptr); extern void wxLogVerbose(const wxChar *szFormat, ...) __attribute__ ((__format__ (__printf__, 1, 2))); | |
24623 | ||
24624 | ||
24625 | ||
24626 | extern void wxVLogStatus(const wxChar *szFormat, va_list argptr); extern void wxLogStatus(const wxChar *szFormat, ...) __attribute__ ((__format__ (__printf__, 1, 2))); | |
24627 | ||
24628 | ||
24629 | ||
24630 | class wxFrame; | |
24631 | ||
24632 | extern void wxVLogStatus(wxFrame * pFrame, const wxChar *szFormat, va_list argptr); extern void wxLogStatus(wxFrame * pFrame, const wxChar *szFormat, ...) __attribute__ ((__format__ (__printf__, 2, 3))); | |
24633 | ||
24634 | ||
24635 | ||
24636 | ||
24637 | extern void wxVLogSysError(const wxChar *szFormat, va_list argptr); extern void wxLogSysError(const wxChar *szFormat, ...) __attribute__ ((__format__ (__printf__, 1, 2))); | |
24638 | ||
24639 | ||
24640 | ||
24641 | extern void wxVLogSysError(long lErrCode, const wxChar *szFormat, va_list argptr); extern void wxLogSysError(long lErrCode, const wxChar *szFormat, ...) __attribute__ ((__format__ (__printf__, 2, 3))); | |
24642 | # 564 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/log.h" | |
24643 | inline void wxVLogDebug(const wxChar *, va_list) { } | |
24644 | inline void wxLogDebug(const wxChar *, ...) { } | |
24645 | inline void wxVLogTrace(wxTraceMask, const wxChar *, va_list) { } | |
24646 | inline void wxLogTrace(wxTraceMask, const wxChar *, ...) { } | |
24647 | inline void wxVLogTrace(const wxChar *, const wxChar *, va_list) { } | |
24648 | inline void wxLogTrace(const wxChar *, const wxChar *, ...) { } | |
24649 | ||
24650 | ||
24651 | ||
24652 | ||
24653 | void | |
24654 | wxSafeShowMessage(const wxString& title, const wxString& text); | |
24655 | # 600 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/log.h" | |
24656 | inline void wxLogApiError(const wxChar *, long) { } | |
24657 | inline void wxLogLastError(const wxChar *) { } | |
24658 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
24659 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" 1 | |
24660 | # 28 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
24661 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/clntdata.h" 1 | |
24662 | # 21 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/clntdata.h" | |
24663 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/hashmap.h" 1 | |
24664 | # 49 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/hashmap.h" | |
24665 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 | |
24666 | # 50 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/hashmap.h" 2 | |
24667 | ||
24668 | ||
24669 | ||
24670 | struct _wxHashTable_NodeBase | |
24671 | { | |
24672 | _wxHashTable_NodeBase() : m_nxt(0) {} | |
24673 | ||
24674 | _wxHashTable_NodeBase* m_nxt; | |
24675 | ||
24676 | ||
24677 | ||
24678 | ||
24679 | }; | |
24680 | ||
24681 | ||
24682 | class _wxHashTableBase2 | |
24683 | { | |
24684 | public: | |
24685 | typedef void (*NodeDtor)(_wxHashTable_NodeBase*); | |
24686 | typedef unsigned long (*BucketFromNode)(_wxHashTableBase2*,_wxHashTable_NodeBase*); | |
24687 | typedef _wxHashTable_NodeBase* (*ProcessNode)(_wxHashTable_NodeBase*); | |
24688 | protected: | |
24689 | static _wxHashTable_NodeBase* DummyProcessNode(_wxHashTable_NodeBase* node); | |
24690 | static void DeleteNodes( size_t buckets, _wxHashTable_NodeBase** table, | |
24691 | NodeDtor dtor ); | |
24692 | static _wxHashTable_NodeBase* GetFirstNode( size_t buckets, | |
24693 | _wxHashTable_NodeBase** table ) | |
24694 | { | |
24695 | for( size_t i = 0; i < buckets; ++i ) | |
24696 | if( table[i] ) | |
24697 | return table[i]; | |
24698 | return 0; | |
24699 | } | |
24700 | ||
24701 | ||
24702 | enum { prime_count = 31 }; | |
24703 | static const unsigned long ms_primes[prime_count]; | |
24704 | ||
24705 | ||
24706 | static unsigned long GetNextPrime( unsigned long n ); | |
24707 | ||
24708 | ||
24709 | ||
24710 | static unsigned long GetPreviousPrime( unsigned long n ); | |
24711 | ||
24712 | static void CopyHashTable( _wxHashTable_NodeBase** srcTable, | |
24713 | size_t srcBuckets, _wxHashTableBase2* dst, | |
24714 | _wxHashTable_NodeBase** dstTable, | |
24715 | BucketFromNode func, ProcessNode proc ); | |
24716 | ||
24717 | static void** AllocTable( size_t sz ) | |
24718 | { | |
24719 | return (void **)calloc(sz, sizeof(void*)); | |
24720 | } | |
24721 | static void FreeTable(void *table) | |
24722 | { | |
24723 | free(table); | |
24724 | } | |
24725 | }; | |
24726 | # 440 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/hashmap.h" | |
24727 | inline bool never_grow( size_t, size_t ) { return false; } | |
24728 | inline bool never_shrink( size_t, size_t ) { return false; } | |
24729 | inline bool grow_lf70( size_t buckets, size_t items ) | |
24730 | { | |
24731 | return float(items)/float(buckets) >= 0.85; | |
24732 | } | |
24733 | # 496 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/hashmap.h" | |
24734 | class wxIntegerHash | |
24735 | { | |
24736 | public: | |
24737 | wxIntegerHash() { } | |
24738 | unsigned long operator()( long x ) const { return (unsigned long)x; } | |
24739 | unsigned long operator()( unsigned long x ) const { return x; } | |
24740 | unsigned long operator()( int x ) const { return (unsigned long)x; } | |
24741 | unsigned long operator()( unsigned int x ) const { return x; } | |
24742 | unsigned long operator()( short x ) const { return (unsigned long)x; } | |
24743 | unsigned long operator()( unsigned short x ) const { return x; } | |
24744 | ||
24745 | ||
24746 | ||
24747 | ||
24748 | ||
24749 | wxIntegerHash& operator=(const wxIntegerHash&) { return *this; } | |
24750 | }; | |
24751 | ||
24752 | ||
24753 | ||
24754 | class wxIntegerEqual | |
24755 | { | |
24756 | public: | |
24757 | wxIntegerEqual() { } | |
24758 | bool operator()( long a, long b ) const { return a == b; } | |
24759 | bool operator()( unsigned long a, unsigned long b ) const { return a == b; } | |
24760 | bool operator()( int a, int b ) const { return a == b; } | |
24761 | bool operator()( unsigned int a, unsigned int b ) const { return a == b; } | |
24762 | bool operator()( short a, short b ) const { return a == b; } | |
24763 | bool operator()( unsigned short a, unsigned short b ) const { return a == b; } | |
24764 | ||
24765 | ||
24766 | ||
24767 | ||
24768 | ||
24769 | wxIntegerEqual& operator=(const wxIntegerEqual&) { return *this; } | |
24770 | }; | |
24771 | ||
24772 | ||
24773 | class wxPointerHash | |
24774 | { | |
24775 | public: | |
24776 | wxPointerHash() { } | |
24777 | ||
24778 | ||
24779 | ||
24780 | ||
24781 | wxUIntPtr operator()( const void* k ) const { return wxPtrToUInt(k); } | |
24782 | ||
24783 | ||
24784 | wxPointerHash& operator=(const wxPointerHash&) { return *this; } | |
24785 | }; | |
24786 | ||
24787 | class wxPointerEqual | |
24788 | { | |
24789 | public: | |
24790 | wxPointerEqual() { } | |
24791 | bool operator()( const void* a, const void* b ) const { return a == b; } | |
24792 | ||
24793 | wxPointerEqual& operator=(const wxPointerEqual&) { return *this; } | |
24794 | }; | |
24795 | ||
24796 | ||
24797 | class wxStringHash | |
24798 | { | |
24799 | public: | |
24800 | wxStringHash() {} | |
24801 | unsigned long operator()( const wxString& x ) const | |
24802 | { return wxCharStringHash( x.c_str() ); } | |
24803 | unsigned long operator()( const wxChar* x ) const | |
24804 | { return wxCharStringHash( x ); } | |
24805 | static unsigned long wxCharStringHash( const wxChar* ); | |
24806 | ||
24807 | ||
24808 | ||
24809 | ||
24810 | ||
24811 | ||
24812 | wxStringHash& operator=(const wxStringHash&) { return *this; } | |
24813 | }; | |
24814 | ||
24815 | class wxStringEqual | |
24816 | { | |
24817 | public: | |
24818 | wxStringEqual() {} | |
24819 | bool operator()( const wxString& a, const wxString& b ) const | |
24820 | { return a == b; } | |
24821 | bool operator()( const wxChar* a, const wxChar* b ) const | |
24822 | { return strcmp( a, b ) == 0; } | |
24823 | ||
24824 | ||
24825 | ||
24826 | ||
24827 | ||
24828 | wxStringEqual& operator=(const wxStringEqual&) { return *this; } | |
24829 | }; | |
24830 | # 705 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/hashmap.h" | |
24831 | class wxLongToLongHashMap_wxImplementation_Pair { public: typedef long t1; typedef long t2; typedef const long const_t1; typedef const long const_t2; wxLongToLongHashMap_wxImplementation_Pair( const const_t1& f, const const_t2& s ):first(t1(f)),second(t2(s)) {} t1 first; t2 second; }; class wxLongToLongHashMap_wxImplementation_KeyEx { typedef long key_type; typedef wxLongToLongHashMap_wxImplementation_Pair pair_type; typedef const key_type const_key_type; typedef const pair_type const_pair_type; typedef const_key_type& const_key_reference; typedef const_pair_type& const_pair_reference; public: wxLongToLongHashMap_wxImplementation_KeyEx() { } const_key_reference operator()( const_pair_reference pair ) const { return pair.first; } wxLongToLongHashMap_wxImplementation_KeyEx& operator=(const wxLongToLongHashMap_wxImplementation_KeyEx&) { return *this; } }; class wxLongToLongHashMap_wxImplementation_HashTable : protected _wxHashTableBase2 { public: typedef long key_type; typedef wxLongToLongHashMap_wxImplementation_Pair value_type; typedef wxIntegerHash hasher; typedef wxIntegerEqual key_equal; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type& reference; typedef const value_type& const_reference; typedef const long const_key_type; typedef const wxLongToLongHashMap_wxImplementation_Pair const_mapped_type; public: struct Node; typedef wxLongToLongHashMap_wxImplementation_KeyEx key_extractor; typedef wxLongToLongHashMap_wxImplementation_HashTable Self; protected: Node** m_table; size_t m_tableBuckets; size_t m_items; hasher m_hasher; key_equal m_equals; key_extractor m_getKey; public: struct Node:public _wxHashTable_NodeBase { public: Node( const value_type& value ) : m_value( value ) {} Node* m_next() { return (Node*)this->m_nxt; } value_type m_value; }; class Iterator; friend class Iterator; protected: static void DeleteNode( _wxHashTable_NodeBase* node ) { delete (Node*)node; } public: class Iterator { public: Node* m_node; Self* m_ht; Iterator() : m_node(0), m_ht(0) {} Iterator( Node* node, const Self* ht ) : m_node(node), m_ht((Self*)ht) {} bool operator ==( const Iterator& it ) const { return m_node == it.m_node; } bool operator !=( const Iterator& it ) const { return m_node != it.m_node; } protected: Node* GetNextNode() { size_type bucket = GetBucketForNode(m_ht,m_node); for( size_type i = bucket + 1; i < m_ht->m_tableBuckets; ++i ) { if( m_ht->m_table[i] ) return m_ht->m_table[i]; } return 0; } void PlusPlus() { Node* next = m_node->m_next(); m_node = next ? next : GetNextNode(); } }; public: class iterator : public Iterator { public: iterator() : Iterator() {} iterator( Node* node, Self* ht ) : Iterator( node, ht ) {} iterator& operator++() { PlusPlus(); return *this; } iterator operator++(int) { iterator it=*this;PlusPlus();return it; } reference operator *() const { return m_node->m_value; } pointer operator ->() const { return &(m_node->m_value); } }; class const_iterator : public Iterator { public: const_iterator() : Iterator() {} const_iterator( Node* node, const Self* ht ) : Iterator( node, (Self*)ht ) {} const_iterator& operator++() { PlusPlus();return *this; } const_iterator operator++(int) { const_iterator it=*this;PlusPlus();return it; } const_reference operator *() const { return m_node->m_value; } const_pointer operator ->() const { return &(m_node->m_value); } }; wxLongToLongHashMap_wxImplementation_HashTable( size_type sz = 10, const hasher& hfun = hasher(), const key_equal& k_eq = key_equal(), const key_extractor& k_ex = key_extractor() ) : m_tableBuckets( GetNextPrime( (unsigned long) sz ) ), m_items( 0 ), m_hasher( hfun ), m_equals( k_eq ), m_getKey( k_ex ) { m_table = (Node**)AllocTable( m_tableBuckets ); } wxLongToLongHashMap_wxImplementation_HashTable( const Self& ht ) : m_table( 0 ), m_tableBuckets( 0 ), m_items( ht.m_items ), m_hasher( ht.m_hasher ), m_equals( ht.m_equals ), m_getKey( ht.m_getKey ) { HashCopy( ht ); } const Self& operator=( const Self& ht ) { clear(); m_hasher = ht.m_hasher; m_equals = ht.m_equals; m_getKey = ht.m_getKey; m_items = ht.m_items; HashCopy( ht ); return *this; } ~wxLongToLongHashMap_wxImplementation_HashTable() { clear(); FreeTable(m_table); } hasher hash_funct() { return m_hasher; } key_equal key_eq() { return m_equals; } void clear() { DeleteNodes( m_tableBuckets, (_wxHashTable_NodeBase**)m_table, DeleteNode ); m_items = 0; } size_type size() const { return m_items; } size_type max_size() const { return size_type(-1); } bool empty() const { return size() == 0; } const_iterator end() const { return const_iterator( 0, this ); } iterator end() { return iterator( 0, this ); } const_iterator begin() const { return const_iterator( (Node*)GetFirstNode( m_tableBuckets, (_wxHashTable_NodeBase**)m_table ), this ); }; iterator begin() { return iterator( (Node*)GetFirstNode( m_tableBuckets, (_wxHashTable_NodeBase**)m_table ), this ); }; size_type erase( const const_key_type& key ) { Node** node = GetNodePtr( key ); if( !node ) return 0; --m_items; Node* temp = (*node)->m_next(); delete *node; (*node) = temp; if( never_shrink( m_tableBuckets, m_items ) ) ResizeTable( GetPreviousPrime( (unsigned long) m_tableBuckets ) - 1 ); return 1; } protected: static size_type GetBucketForNode( Self* ht, Node* node ) { return ht->m_hasher( ht->m_getKey( node->m_value ) ) % ht->m_tableBuckets; } static Node* CopyNode( Node* node ) { return new Node( *node ); } Node* GetOrCreateNode( const value_type& value, bool& created ) { const const_key_type& key = m_getKey( value ); size_t bucket = m_hasher( key ) % m_tableBuckets; Node* node = m_table[bucket]; while( node ) { if( m_equals( m_getKey( node->m_value ), key ) ) { created = false; return node; } node = node->m_next(); } created = true; return CreateNode( value, bucket); } Node * CreateNode( const value_type& value, size_t bucket ) { Node* node = new Node( value ); node->m_nxt = m_table[bucket]; m_table[bucket] = node; ++m_items; if( grow_lf70( m_tableBuckets, m_items ) ) ResizeTable( m_tableBuckets ); return node; } void CreateNode( const value_type& value ) { CreateNode(value, m_hasher( m_getKey(value) ) % m_tableBuckets ); } Node** GetNodePtr( const const_key_type& key ) const { size_t bucket = m_hasher( key ) % m_tableBuckets; Node** node = &m_table[bucket]; while( *node ) { if( m_equals( m_getKey( (*node)->m_value ), key ) ) return node; node = (Node**)&(*node)->m_nxt; } return 0; } Node* GetNode( const const_key_type& key ) const { size_t bucket = m_hasher( key ) % m_tableBuckets; Node* node = m_table[bucket]; while( node ) { if( m_equals( m_getKey( node->m_value ), key ) ) return node; node = node->m_next(); } return 0; } void ResizeTable( size_t newSize ) { newSize = GetNextPrime( (unsigned long)newSize ); Node** srcTable = m_table; size_t srcBuckets = m_tableBuckets; m_table = (Node**)AllocTable( newSize ); m_tableBuckets = newSize; CopyHashTable( (_wxHashTable_NodeBase**)srcTable, srcBuckets, this, (_wxHashTable_NodeBase**)m_table, (BucketFromNode)GetBucketForNode, (ProcessNode)&DummyProcessNode ); FreeTable(srcTable); } void HashCopy( const Self& ht ) { ResizeTable( ht.size() ); CopyHashTable( (_wxHashTable_NodeBase**)ht.m_table, ht.m_tableBuckets, (_wxHashTableBase2*)this, (_wxHashTable_NodeBase**)m_table, (BucketFromNode)GetBucketForNode, (ProcessNode)CopyNode ); } }; class wxLongToLongHashMap:public wxLongToLongHashMap_wxImplementation_HashTable { public: typedef long mapped_type; class Insert_Result { public: typedef iterator t1; typedef bool t2; typedef const iterator const_t1; typedef const bool const_t2; Insert_Result( const const_t1& f, const const_t2& s ):first(t1(f)),second(t2(s)) {} t1 first; t2 second; }; explicit wxLongToLongHashMap( size_type hint = 100, hasher hf = hasher(), key_equal eq = key_equal() ) : wxLongToLongHashMap_wxImplementation_HashTable( hint, hf, eq, wxLongToLongHashMap_wxImplementation_KeyEx() ) {} mapped_type& operator[]( const const_key_type& key ) { bool created; return GetOrCreateNode( wxLongToLongHashMap_wxImplementation_Pair( key, mapped_type() ), created)->m_value.second; } const_iterator find( const const_key_type& key ) const { return const_iterator( GetNode( key ), this ); } iterator find( const const_key_type& key ) { return iterator( GetNode( key ), this ); } Insert_Result insert( const value_type& v ) { bool created; Node *node = GetOrCreateNode( wxLongToLongHashMap_wxImplementation_Pair( v.first, v.second ), created); if ( !created ) node->m_value.second = v.second; return Insert_Result(iterator(node, this), created); } size_type erase( const key_type& k ) { return wxLongToLongHashMap_wxImplementation_HashTable::erase( k ); } void erase( const iterator& it ) { erase( it->first ); } void erase( const const_iterator& it ) { erase( it->first ); } size_type count( const const_key_type& key ) { return GetNode( key ) ? 1 : 0; } }; | |
24832 | # 22 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/clntdata.h" 2 | |
24833 | ||
24834 | ||
24835 | ||
24836 | typedef int (*wxShadowObjectMethod)(void*, void*); | |
24837 | class wxShadowObjectMethods_wxImplementation_Pair { public: typedef wxString t1; typedef wxShadowObjectMethod t2; typedef const wxString const_t1; typedef const wxShadowObjectMethod const_t2; wxShadowObjectMethods_wxImplementation_Pair( const const_t1& f, const const_t2& s ):first(t1(f)),second(t2(s)) {} t1 first; t2 second; }; class wxShadowObjectMethods_wxImplementation_KeyEx { typedef wxString key_type; typedef wxShadowObjectMethods_wxImplementation_Pair pair_type; typedef const key_type const_key_type; typedef const pair_type const_pair_type; typedef const_key_type& const_key_reference; typedef const_pair_type& const_pair_reference; public: wxShadowObjectMethods_wxImplementation_KeyEx() { } const_key_reference operator()( const_pair_reference pair ) const { return pair.first; } wxShadowObjectMethods_wxImplementation_KeyEx& operator=(const wxShadowObjectMethods_wxImplementation_KeyEx&) { return *this; } }; class wxShadowObjectMethods_wxImplementation_HashTable : protected _wxHashTableBase2 { public: typedef wxString key_type; typedef wxShadowObjectMethods_wxImplementation_Pair value_type; typedef wxStringHash hasher; typedef wxStringEqual key_equal; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type& reference; typedef const value_type& const_reference; typedef const wxString const_key_type; typedef const wxShadowObjectMethods_wxImplementation_Pair const_mapped_type; public: struct Node; typedef wxShadowObjectMethods_wxImplementation_KeyEx key_extractor; typedef wxShadowObjectMethods_wxImplementation_HashTable Self; protected: Node** m_table; size_t m_tableBuckets; size_t m_items; hasher m_hasher; key_equal m_equals; key_extractor m_getKey; public: struct Node:public _wxHashTable_NodeBase { public: Node( const value_type& value ) : m_value( value ) {} Node* m_next() { return (Node*)this->m_nxt; } value_type m_value; }; class Iterator; friend class Iterator; protected: static void DeleteNode( _wxHashTable_NodeBase* node ) { delete (Node*)node; } public: class Iterator { public: Node* m_node; Self* m_ht; Iterator() : m_node(0), m_ht(0) {} Iterator( Node* node, const Self* ht ) : m_node(node), m_ht((Self*)ht) {} bool operator ==( const Iterator& it ) const { return m_node == it.m_node; } bool operator !=( const Iterator& it ) const { return m_node != it.m_node; } protected: Node* GetNextNode() { size_type bucket = GetBucketForNode(m_ht,m_node); for( size_type i = bucket + 1; i < m_ht->m_tableBuckets; ++i ) { if( m_ht->m_table[i] ) return m_ht->m_table[i]; } return 0; } void PlusPlus() { Node* next = m_node->m_next(); m_node = next ? next : GetNextNode(); } }; public: class iterator : public Iterator { public: iterator() : Iterator() {} iterator( Node* node, Self* ht ) : Iterator( node, ht ) {} iterator& operator++() { PlusPlus(); return *this; } iterator operator++(int) { iterator it=*this;PlusPlus();return it; } reference operator *() const { return m_node->m_value; } pointer operator ->() const { return &(m_node->m_value); } }; class const_iterator : public Iterator { public: const_iterator() : Iterator() {} const_iterator( Node* node, const Self* ht ) : Iterator( node, (Self*)ht ) {} const_iterator& operator++() { PlusPlus();return *this; } const_iterator operator++(int) { const_iterator it=*this;PlusPlus();return it; } const_reference operator *() const { return m_node->m_value; } const_pointer operator ->() const { return &(m_node->m_value); } }; wxShadowObjectMethods_wxImplementation_HashTable( size_type sz = 10, const hasher& hfun = hasher(), const key_equal& k_eq = key_equal(), const key_extractor& k_ex = key_extractor() ) : m_tableBuckets( GetNextPrime( (unsigned long) sz ) ), m_items( 0 ), m_hasher( hfun ), m_equals( k_eq ), m_getKey( k_ex ) { m_table = (Node**)AllocTable( m_tableBuckets ); } wxShadowObjectMethods_wxImplementation_HashTable( const Self& ht ) : m_table( 0 ), m_tableBuckets( 0 ), m_items( ht.m_items ), m_hasher( ht.m_hasher ), m_equals( ht.m_equals ), m_getKey( ht.m_getKey ) { HashCopy( ht ); } const Self& operator=( const Self& ht ) { clear(); m_hasher = ht.m_hasher; m_equals = ht.m_equals; m_getKey = ht.m_getKey; m_items = ht.m_items; HashCopy( ht ); return *this; } ~wxShadowObjectMethods_wxImplementation_HashTable() { clear(); FreeTable(m_table); } hasher hash_funct() { return m_hasher; } key_equal key_eq() { return m_equals; } void clear() { DeleteNodes( m_tableBuckets, (_wxHashTable_NodeBase**)m_table, DeleteNode ); m_items = 0; } size_type size() const { return m_items; } size_type max_size() const { return size_type(-1); } bool empty() const { return size() == 0; } const_iterator end() const { return const_iterator( 0, this ); } iterator end() { return iterator( 0, this ); } const_iterator begin() const { return const_iterator( (Node*)GetFirstNode( m_tableBuckets, (_wxHashTable_NodeBase**)m_table ), this ); }; iterator begin() { return iterator( (Node*)GetFirstNode( m_tableBuckets, (_wxHashTable_NodeBase**)m_table ), this ); }; size_type erase( const const_key_type& key ) { Node** node = GetNodePtr( key ); if( !node ) return 0; --m_items; Node* temp = (*node)->m_next(); delete *node; (*node) = temp; if( never_shrink( m_tableBuckets, m_items ) ) ResizeTable( GetPreviousPrime( (unsigned long) m_tableBuckets ) - 1 ); return 1; } protected: static size_type GetBucketForNode( Self* ht, Node* node ) { return ht->m_hasher( ht->m_getKey( node->m_value ) ) % ht->m_tableBuckets; } static Node* CopyNode( Node* node ) { return new Node( *node ); } Node* GetOrCreateNode( const value_type& value, bool& created ) { const const_key_type& key = m_getKey( value ); size_t bucket = m_hasher( key ) % m_tableBuckets; Node* node = m_table[bucket]; while( node ) { if( m_equals( m_getKey( node->m_value ), key ) ) { created = false; return node; } node = node->m_next(); } created = true; return CreateNode( value, bucket); } Node * CreateNode( const value_type& value, size_t bucket ) { Node* node = new Node( value ); node->m_nxt = m_table[bucket]; m_table[bucket] = node; ++m_items; if( grow_lf70( m_tableBuckets, m_items ) ) ResizeTable( m_tableBuckets ); return node; } void CreateNode( const value_type& value ) { CreateNode(value, m_hasher( m_getKey(value) ) % m_tableBuckets ); } Node** GetNodePtr( const const_key_type& key ) const { size_t bucket = m_hasher( key ) % m_tableBuckets; Node** node = &m_table[bucket]; while( *node ) { if( m_equals( m_getKey( (*node)->m_value ), key ) ) return node; node = (Node**)&(*node)->m_nxt; } return 0; } Node* GetNode( const const_key_type& key ) const { size_t bucket = m_hasher( key ) % m_tableBuckets; Node* node = m_table[bucket]; while( node ) { if( m_equals( m_getKey( node->m_value ), key ) ) return node; node = node->m_next(); } return 0; } void ResizeTable( size_t newSize ) { newSize = GetNextPrime( (unsigned long)newSize ); Node** srcTable = m_table; size_t srcBuckets = m_tableBuckets; m_table = (Node**)AllocTable( newSize ); m_tableBuckets = newSize; CopyHashTable( (_wxHashTable_NodeBase**)srcTable, srcBuckets, this, (_wxHashTable_NodeBase**)m_table, (BucketFromNode)GetBucketForNode, (ProcessNode)&DummyProcessNode ); FreeTable(srcTable); } void HashCopy( const Self& ht ) { ResizeTable( ht.size() ); CopyHashTable( (_wxHashTable_NodeBase**)ht.m_table, ht.m_tableBuckets, (_wxHashTableBase2*)this, (_wxHashTable_NodeBase**)m_table, (BucketFromNode)GetBucketForNode, (ProcessNode)CopyNode ); } }; class wxShadowObjectMethods:public wxShadowObjectMethods_wxImplementation_HashTable { public: typedef wxShadowObjectMethod mapped_type; class Insert_Result { public: typedef iterator t1; typedef bool t2; typedef const iterator const_t1; typedef const bool const_t2; Insert_Result( const const_t1& f, const const_t2& s ):first(t1(f)),second(t2(s)) {} t1 first; t2 second; }; explicit wxShadowObjectMethods( size_type hint = 100, hasher hf = hasher(), key_equal eq = key_equal() ) : wxShadowObjectMethods_wxImplementation_HashTable( hint, hf, eq, wxShadowObjectMethods_wxImplementation_KeyEx() ) {} mapped_type& operator[]( const const_key_type& key ) { bool created; return GetOrCreateNode( wxShadowObjectMethods_wxImplementation_Pair( key, mapped_type() ), created)->m_value.second; } const_iterator find( const const_key_type& key ) const { return const_iterator( GetNode( key ), this ); } iterator find( const const_key_type& key ) { return iterator( GetNode( key ), this ); } Insert_Result insert( const value_type& v ) { bool created; Node *node = GetOrCreateNode( wxShadowObjectMethods_wxImplementation_Pair( v.first, v.second ), created); if ( !created ) node->m_value.second = v.second; return Insert_Result(iterator(node, this), created); } size_type erase( const key_type& k ) { return wxShadowObjectMethods_wxImplementation_HashTable::erase( k ); } void erase( const iterator& it ) { erase( it->first ); } void erase( const const_iterator& it ) { erase( it->first ); } size_type count( const const_key_type& key ) { return GetNode( key ) ? 1 : 0; } }; | |
24838 | ||
24839 | ||
24840 | ||
24841 | ||
24842 | class wxShadowObjectFields_wxImplementation_Pair { public: typedef wxString t1; typedef void * t2; typedef const wxString const_t1; typedef const void * const_t2; wxShadowObjectFields_wxImplementation_Pair( const const_t1& f, const const_t2& s ):first(t1(f)),second(t2(s)) {} t1 first; t2 second; }; class wxShadowObjectFields_wxImplementation_KeyEx { typedef wxString key_type; typedef wxShadowObjectFields_wxImplementation_Pair pair_type; typedef const key_type const_key_type; typedef const pair_type const_pair_type; typedef const_key_type& const_key_reference; typedef const_pair_type& const_pair_reference; public: wxShadowObjectFields_wxImplementation_KeyEx() { } const_key_reference operator()( const_pair_reference pair ) const { return pair.first; } wxShadowObjectFields_wxImplementation_KeyEx& operator=(const wxShadowObjectFields_wxImplementation_KeyEx&) { return *this; } }; class wxShadowObjectFields_wxImplementation_HashTable : protected _wxHashTableBase2 { public: typedef wxString key_type; typedef wxShadowObjectFields_wxImplementation_Pair value_type; typedef wxStringHash hasher; typedef wxStringEqual key_equal; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type& reference; typedef const value_type& const_reference; typedef const wxString const_key_type; typedef const wxShadowObjectFields_wxImplementation_Pair const_mapped_type; public: struct Node; typedef wxShadowObjectFields_wxImplementation_KeyEx key_extractor; typedef wxShadowObjectFields_wxImplementation_HashTable Self; protected: Node** m_table; size_t m_tableBuckets; size_t m_items; hasher m_hasher; key_equal m_equals; key_extractor m_getKey; public: struct Node:public _wxHashTable_NodeBase { public: Node( const value_type& value ) : m_value( value ) {} Node* m_next() { return (Node*)this->m_nxt; } value_type m_value; }; class Iterator; friend class Iterator; protected: static void DeleteNode( _wxHashTable_NodeBase* node ) { delete (Node*)node; } public: class Iterator { public: Node* m_node; Self* m_ht; Iterator() : m_node(0), m_ht(0) {} Iterator( Node* node, const Self* ht ) : m_node(node), m_ht((Self*)ht) {} bool operator ==( const Iterator& it ) const { return m_node == it.m_node; } bool operator !=( const Iterator& it ) const { return m_node != it.m_node; } protected: Node* GetNextNode() { size_type bucket = GetBucketForNode(m_ht,m_node); for( size_type i = bucket + 1; i < m_ht->m_tableBuckets; ++i ) { if( m_ht->m_table[i] ) return m_ht->m_table[i]; } return 0; } void PlusPlus() { Node* next = m_node->m_next(); m_node = next ? next : GetNextNode(); } }; public: class iterator : public Iterator { public: iterator() : Iterator() {} iterator( Node* node, Self* ht ) : Iterator( node, ht ) {} iterator& operator++() { PlusPlus(); return *this; } iterator operator++(int) { iterator it=*this;PlusPlus();return it; } reference operator *() const { return m_node->m_value; } pointer operator ->() const { return &(m_node->m_value); } }; class const_iterator : public Iterator { public: const_iterator() : Iterator() {} const_iterator( Node* node, const Self* ht ) : Iterator( node, (Self*)ht ) {} const_iterator& operator++() { PlusPlus();return *this; } const_iterator operator++(int) { const_iterator it=*this;PlusPlus();return it; } const_reference operator *() const { return m_node->m_value; } const_pointer operator ->() const { return &(m_node->m_value); } }; wxShadowObjectFields_wxImplementation_HashTable( size_type sz = 10, const hasher& hfun = hasher(), const key_equal& k_eq = key_equal(), const key_extractor& k_ex = key_extractor() ) : m_tableBuckets( GetNextPrime( (unsigned long) sz ) ), m_items( 0 ), m_hasher( hfun ), m_equals( k_eq ), m_getKey( k_ex ) { m_table = (Node**)AllocTable( m_tableBuckets ); } wxShadowObjectFields_wxImplementation_HashTable( const Self& ht ) : m_table( 0 ), m_tableBuckets( 0 ), m_items( ht.m_items ), m_hasher( ht.m_hasher ), m_equals( ht.m_equals ), m_getKey( ht.m_getKey ) { HashCopy( ht ); } const Self& operator=( const Self& ht ) { clear(); m_hasher = ht.m_hasher; m_equals = ht.m_equals; m_getKey = ht.m_getKey; m_items = ht.m_items; HashCopy( ht ); return *this; } ~wxShadowObjectFields_wxImplementation_HashTable() { clear(); FreeTable(m_table); } hasher hash_funct() { return m_hasher; } key_equal key_eq() { return m_equals; } void clear() { DeleteNodes( m_tableBuckets, (_wxHashTable_NodeBase**)m_table, DeleteNode ); m_items = 0; } size_type size() const { return m_items; } size_type max_size() const { return size_type(-1); } bool empty() const { return size() == 0; } const_iterator end() const { return const_iterator( 0, this ); } iterator end() { return iterator( 0, this ); } const_iterator begin() const { return const_iterator( (Node*)GetFirstNode( m_tableBuckets, (_wxHashTable_NodeBase**)m_table ), this ); }; iterator begin() { return iterator( (Node*)GetFirstNode( m_tableBuckets, (_wxHashTable_NodeBase**)m_table ), this ); }; size_type erase( const const_key_type& key ) { Node** node = GetNodePtr( key ); if( !node ) return 0; --m_items; Node* temp = (*node)->m_next(); delete *node; (*node) = temp; if( never_shrink( m_tableBuckets, m_items ) ) ResizeTable( GetPreviousPrime( (unsigned long) m_tableBuckets ) - 1 ); return 1; } protected: static size_type GetBucketForNode( Self* ht, Node* node ) { return ht->m_hasher( ht->m_getKey( node->m_value ) ) % ht->m_tableBuckets; } static Node* CopyNode( Node* node ) { return new Node( *node ); } Node* GetOrCreateNode( const value_type& value, bool& created ) { const const_key_type& key = m_getKey( value ); size_t bucket = m_hasher( key ) % m_tableBuckets; Node* node = m_table[bucket]; while( node ) { if( m_equals( m_getKey( node->m_value ), key ) ) { created = false; return node; } node = node->m_next(); } created = true; return CreateNode( value, bucket); } Node * CreateNode( const value_type& value, size_t bucket ) { Node* node = new Node( value ); node->m_nxt = m_table[bucket]; m_table[bucket] = node; ++m_items; if( grow_lf70( m_tableBuckets, m_items ) ) ResizeTable( m_tableBuckets ); return node; } void CreateNode( const value_type& value ) { CreateNode(value, m_hasher( m_getKey(value) ) % m_tableBuckets ); } Node** GetNodePtr( const const_key_type& key ) const { size_t bucket = m_hasher( key ) % m_tableBuckets; Node** node = &m_table[bucket]; while( *node ) { if( m_equals( m_getKey( (*node)->m_value ), key ) ) return node; node = (Node**)&(*node)->m_nxt; } return 0; } Node* GetNode( const const_key_type& key ) const { size_t bucket = m_hasher( key ) % m_tableBuckets; Node* node = m_table[bucket]; while( node ) { if( m_equals( m_getKey( node->m_value ), key ) ) return node; node = node->m_next(); } return 0; } void ResizeTable( size_t newSize ) { newSize = GetNextPrime( (unsigned long)newSize ); Node** srcTable = m_table; size_t srcBuckets = m_tableBuckets; m_table = (Node**)AllocTable( newSize ); m_tableBuckets = newSize; CopyHashTable( (_wxHashTable_NodeBase**)srcTable, srcBuckets, this, (_wxHashTable_NodeBase**)m_table, (BucketFromNode)GetBucketForNode, (ProcessNode)&DummyProcessNode ); FreeTable(srcTable); } void HashCopy( const Self& ht ) { ResizeTable( ht.size() ); CopyHashTable( (_wxHashTable_NodeBase**)ht.m_table, ht.m_tableBuckets, (_wxHashTableBase2*)this, (_wxHashTable_NodeBase**)m_table, (BucketFromNode)GetBucketForNode, (ProcessNode)CopyNode ); } }; class wxShadowObjectFields:public wxShadowObjectFields_wxImplementation_HashTable { public: typedef void * mapped_type; class Insert_Result { public: typedef iterator t1; typedef bool t2; typedef const iterator const_t1; typedef const bool const_t2; Insert_Result( const const_t1& f, const const_t2& s ):first(t1(f)),second(t2(s)) {} t1 first; t2 second; }; explicit wxShadowObjectFields( size_type hint = 100, hasher hf = hasher(), key_equal eq = key_equal() ) : wxShadowObjectFields_wxImplementation_HashTable( hint, hf, eq, wxShadowObjectFields_wxImplementation_KeyEx() ) {} mapped_type& operator[]( const const_key_type& key ) { bool created; return GetOrCreateNode( wxShadowObjectFields_wxImplementation_Pair( key, mapped_type() ), created)->m_value.second; } const_iterator find( const const_key_type& key ) const { return const_iterator( GetNode( key ), this ); } iterator find( const const_key_type& key ) { return iterator( GetNode( key ), this ); } Insert_Result insert( const value_type& v ) { bool created; Node *node = GetOrCreateNode( wxShadowObjectFields_wxImplementation_Pair( v.first, v.second ), created); if ( !created ) node->m_value.second = v.second; return Insert_Result(iterator(node, this), created); } size_type erase( const key_type& k ) { return wxShadowObjectFields_wxImplementation_HashTable::erase( k ); } void erase( const iterator& it ) { erase( it->first ); } void erase( const const_iterator& it ) { erase( it->first ); } size_type count( const const_key_type& key ) { return GetNode( key ) ? 1 : 0; } }; | |
24843 | ||
24844 | ||
24845 | ||
24846 | ||
24847 | ||
24848 | class wxShadowObject | |
24849 | { | |
24850 | public: | |
24851 | wxShadowObject() { } | |
24852 | ||
24853 | void AddMethod( const wxString &name, wxShadowObjectMethod method ) | |
24854 | { | |
24855 | wxShadowObjectMethods::iterator it = m_methods.find( name ); | |
24856 | if (it == m_methods.end()) | |
24857 | m_methods[ name ] = method; | |
24858 | else | |
24859 | it->second = method; | |
24860 | } | |
24861 | ||
24862 | bool InvokeMethod( const wxString &name, void* window, void* param, int* returnValue ) | |
24863 | { | |
24864 | wxShadowObjectMethods::iterator it = m_methods.find( name ); | |
24865 | if (it == m_methods.end()) | |
24866 | return false; | |
24867 | wxShadowObjectMethod method = it->second; | |
24868 | int ret = (*method)(window, param); | |
24869 | if (returnValue) | |
24870 | *returnValue = ret; | |
24871 | return true; | |
24872 | } | |
24873 | ||
24874 | void AddField( const wxString &name, void* initialValue = __null ) | |
24875 | { | |
24876 | wxShadowObjectFields::iterator it = m_fields.find( name ); | |
24877 | if (it == m_fields.end()) | |
24878 | m_fields[ name ] = initialValue; | |
24879 | else | |
24880 | it->second = initialValue; | |
24881 | } | |
24882 | ||
24883 | void SetField( const wxString &name, void* value ) | |
24884 | { | |
24885 | wxShadowObjectFields::iterator it = m_fields.find( name ); | |
24886 | if (it == m_fields.end()) | |
24887 | return; | |
24888 | it->second = value; | |
24889 | } | |
24890 | ||
24891 | void* GetField( const wxString &name, void *defaultValue = __null ) | |
24892 | { | |
24893 | wxShadowObjectFields::iterator it = m_fields.find( name ); | |
24894 | if (it == m_fields.end()) | |
24895 | return defaultValue; | |
24896 | return it->second; | |
24897 | } | |
24898 | ||
24899 | private: | |
24900 | wxShadowObjectMethods m_methods; | |
24901 | wxShadowObjectFields m_fields; | |
24902 | }; | |
24903 | ||
24904 | ||
24905 | ||
24906 | ||
24907 | ||
24908 | ||
24909 | enum wxClientDataType | |
24910 | { | |
24911 | wxClientData_None, | |
24912 | wxClientData_Object, | |
24913 | wxClientData_Void | |
24914 | }; | |
24915 | ||
24916 | class wxClientData | |
24917 | { | |
24918 | public: | |
24919 | wxClientData() { } | |
24920 | virtual ~wxClientData() { } | |
24921 | }; | |
24922 | ||
24923 | class wxStringClientData : public wxClientData | |
24924 | { | |
24925 | public: | |
24926 | wxStringClientData() : m_data() { } | |
24927 | wxStringClientData( const wxString &data ) : m_data(data) { } | |
24928 | void SetData( const wxString &data ) { m_data = data; } | |
24929 | const wxString& GetData() const { return m_data; } | |
24930 | ||
24931 | private: | |
24932 | wxString m_data; | |
24933 | }; | |
24934 | # 133 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/clntdata.h" | |
24935 | class wxClientDataContainer | |
24936 | { | |
24937 | public: | |
24938 | wxClientDataContainer(); | |
24939 | virtual ~wxClientDataContainer(); | |
24940 | ||
24941 | void SetClientObject( wxClientData *data ) { DoSetClientObject(data); } | |
24942 | wxClientData *GetClientObject() const { return DoGetClientObject(); } | |
24943 | ||
24944 | void SetClientData( void *data ) { DoSetClientData(data); } | |
24945 | void *GetClientData() const { return DoGetClientData(); } | |
24946 | ||
24947 | protected: | |
24948 | ||
24949 | ||
24950 | ||
24951 | ||
24952 | ||
24953 | union | |
24954 | { | |
24955 | wxClientData *m_clientObject; | |
24956 | void *m_clientData; | |
24957 | }; | |
24958 | ||
24959 | ||
24960 | virtual void DoSetClientObject( wxClientData *data ); | |
24961 | virtual wxClientData *DoGetClientObject() const; | |
24962 | ||
24963 | virtual void DoSetClientData( void *data ); | |
24964 | virtual void *DoGetClientData() const; | |
24965 | ||
24966 | ||
24967 | wxClientDataType m_clientDataType; | |
24968 | ||
24969 | }; | |
24970 | ||
24971 | ||
24972 | ||
24973 | ||
24974 | ||
24975 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/vector.h" 1 | |
24976 | # 16 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/vector.h" | |
24977 | class wxVectorBase | |
24978 | { | |
24979 | public: | |
24980 | typedef size_t size_type; | |
24981 | private: | |
24982 | size_type m_allocsize; | |
24983 | size_type m_size, | |
24984 | m_capacity; | |
24985 | void **m_objects; | |
24986 | ||
24987 | protected: | |
24988 | bool Alloc(size_type sz) | |
24989 | { | |
24990 | ||
24991 | sz = (sz / m_allocsize + 1) * m_allocsize; | |
24992 | if (sz <= m_capacity) | |
24993 | return true; | |
24994 | ||
24995 | ||
24996 | void *mem = realloc(m_objects, sizeof(void *) * sz); | |
24997 | if (! mem) | |
24998 | return false; | |
24999 | ||
25000 | m_objects = (void **) mem; | |
25001 | m_capacity = sz; | |
25002 | return true; | |
25003 | } | |
25004 | ||
25005 | ||
25006 | virtual void Free(void *) = 0; | |
25007 | ||
25008 | virtual void *Copy(const void *) const = 0; | |
25009 | ||
25010 | const void *GetItem(size_type idx) const | |
25011 | { | |
25012 | ; | |
25013 | return m_objects[idx]; | |
25014 | } | |
25015 | ||
25016 | void Append(void *obj) | |
25017 | { | |
25018 | ; | |
25019 | m_objects[m_size] = obj; | |
25020 | m_size++; | |
25021 | } | |
25022 | ||
25023 | void RemoveAt(size_type idx) | |
25024 | { | |
25025 | ; | |
25026 | Free(m_objects[idx]); | |
25027 | if (idx < m_size - 1) | |
25028 | memcpy( | |
25029 | m_objects + idx, | |
25030 | m_objects + idx + 1, | |
25031 | ( m_size - idx - 1 ) * sizeof(void*) ); | |
25032 | m_size--; | |
25033 | } | |
25034 | ||
25035 | bool copy(const wxVectorBase& vb) | |
25036 | { | |
25037 | clear(); | |
25038 | if (! Alloc(vb.size())) | |
25039 | return false; | |
25040 | ||
25041 | for (size_type i = 0; i < vb.size(); i++) | |
25042 | { | |
25043 | void *o = vb.Copy(vb.GetItem(i)); | |
25044 | if (! o) | |
25045 | return false; | |
25046 | Append(o); | |
25047 | } | |
25048 | ||
25049 | return true; | |
25050 | } | |
25051 | ||
25052 | public: | |
25053 | wxVectorBase() : m_allocsize(16), m_size(0), m_capacity(0), m_objects(0) {} | |
25054 | virtual ~wxVectorBase() {} | |
25055 | ||
25056 | void clear() | |
25057 | { | |
25058 | for (size_type i = 0; i < size(); i++) | |
25059 | Free(m_objects[i]); | |
25060 | free(m_objects); | |
25061 | m_objects = 0; | |
25062 | m_size = m_capacity = 0; | |
25063 | } | |
25064 | ||
25065 | void reserve(size_type n) | |
25066 | { | |
25067 | if ( !Alloc(n) ) | |
25068 | { | |
25069 | ; | |
25070 | } | |
25071 | } | |
25072 | ||
25073 | size_type size() const | |
25074 | { | |
25075 | return m_size; | |
25076 | } | |
25077 | ||
25078 | size_type capacity() const | |
25079 | { | |
25080 | return m_capacity; | |
25081 | } | |
25082 | ||
25083 | bool empty() const | |
25084 | { | |
25085 | return size() == 0; | |
25086 | } | |
25087 | ||
25088 | wxVectorBase& operator = (const wxVectorBase& vb) | |
25089 | { | |
25090 | if (!(copy(vb))) {; return *this; }; | |
25091 | return *this; | |
25092 | } | |
25093 | }; | |
25094 | # 174 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/clntdata.h" 2 | |
25095 | ||
25096 | struct wxClientDataDictionaryPair | |
25097 | { | |
25098 | wxClientDataDictionaryPair( size_t idx ) : index( idx ), data( 0 ) { } | |
25099 | ||
25100 | size_t index; | |
25101 | wxClientData* data; | |
25102 | }; | |
25103 | ||
25104 | class wxClientDataDictionaryPairVector : public wxVectorBase{ private: virtual void Free(void *o) { delete (wxClientDataDictionaryPair *) o; } virtual void *Copy(const void *o) const { return new wxClientDataDictionaryPair(*(wxClientDataDictionaryPair *) o); }public: wxClientDataDictionaryPairVector() {} wxClientDataDictionaryPairVector(const wxClientDataDictionaryPairVector& c) : wxVectorBase() { if (!(copy(c))) {; return; }; } ~wxClientDataDictionaryPairVector() { clear(); };public: void push_back(const wxClientDataDictionaryPair& o) { if (!(Alloc(size() + 1))) {; return; }; Append(new wxClientDataDictionaryPair(o)); } void pop_back() { RemoveAt(size() - 1); } const wxClientDataDictionaryPair& at(size_type idx) const { return *(wxClientDataDictionaryPair *) GetItem(idx); } wxClientDataDictionaryPair& at(size_type idx) { return *(wxClientDataDictionaryPair *) GetItem(idx); } const wxClientDataDictionaryPair& operator[](size_type idx) const { return at(idx); } wxClientDataDictionaryPair& operator[](size_type idx) { return at(idx); } const wxClientDataDictionaryPair& front() const { return at(0); } wxClientDataDictionaryPair& front() { return at(0); } const wxClientDataDictionaryPair& back() const { return at(size() - 1); } wxClientDataDictionaryPair& back() { return at(size() - 1); } size_type erase(size_type idx) { RemoveAt(idx); return idx; }}; | |
25105 | # 195 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/clntdata.h" | |
25106 | class wxClientDataDictionary | |
25107 | { | |
25108 | public: | |
25109 | wxClientDataDictionary() {} | |
25110 | ||
25111 | ||
25112 | void DestroyData() | |
25113 | { | |
25114 | for( size_t i = 0, end = m_vec.size(); i != end; ++i ) | |
25115 | delete m_vec[i].data; | |
25116 | m_vec.clear(); | |
25117 | } | |
25118 | ||
25119 | ||
25120 | ||
25121 | ||
25122 | void Set( size_t index, wxClientData* data, bool doDelete ) | |
25123 | { | |
25124 | size_t ptr = Find( index ); | |
25125 | ||
25126 | if( !data ) | |
25127 | { | |
25128 | if( ptr == m_vec.size() ) return; | |
25129 | if( doDelete ) | |
25130 | delete m_vec[ptr].data; | |
25131 | m_vec.erase( ptr ); | |
25132 | } | |
25133 | else | |
25134 | { | |
25135 | if( ptr == m_vec.size() ) | |
25136 | { | |
25137 | m_vec.push_back( wxClientDataDictionaryPair( index ) ); | |
25138 | ptr = m_vec.size() - 1; | |
25139 | } | |
25140 | ||
25141 | if( doDelete ) | |
25142 | delete m_vec[ptr].data; | |
25143 | m_vec[ptr].data = data; | |
25144 | } | |
25145 | } | |
25146 | ||
25147 | ||
25148 | ||
25149 | wxClientData* Get( size_t index ) const | |
25150 | { | |
25151 | size_t it = Find( index ); | |
25152 | if( it == m_vec.size() ) return 0; | |
25153 | return (wxClientData*)m_vec[it].data; | |
25154 | } | |
25155 | ||
25156 | ||
25157 | ||
25158 | ||
25159 | void Delete( size_t index, bool doDelete ) | |
25160 | { | |
25161 | size_t todel = m_vec.size(); | |
25162 | ||
25163 | for( size_t i = 0, end = m_vec.size(); i != end; ++i ) | |
25164 | { | |
25165 | if( m_vec[i].index == index ) | |
25166 | todel = i; | |
25167 | else if( m_vec[i].index > index ) | |
25168 | --(m_vec[i].index); | |
25169 | } | |
25170 | ||
25171 | if( todel != m_vec.size() ) | |
25172 | { | |
25173 | if( doDelete ) | |
25174 | delete m_vec[todel].data; | |
25175 | m_vec.erase( todel ); | |
25176 | } | |
25177 | } | |
25178 | private: | |
25179 | ||
25180 | size_t Find( size_t index ) const | |
25181 | { | |
25182 | for( size_t i = 0, end = m_vec.size(); i != end; ++i ) | |
25183 | { | |
25184 | if( m_vec[i].index == index ) | |
25185 | return i; | |
25186 | } | |
25187 | ||
25188 | return m_vec.size(); | |
25189 | } | |
25190 | ||
25191 | wxClientDataDictionaryPairVector m_vec; | |
25192 | }; | |
25193 | # 29 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" 2 | |
25194 | ||
25195 | ||
25196 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gdicmn.h" 1 | |
25197 | # 33 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gdicmn.h" | |
25198 | class wxBitmap; | |
25199 | class wxBrush; | |
25200 | class wxColour; | |
25201 | class wxCursor; | |
25202 | class wxFont; | |
25203 | class wxIcon; | |
25204 | class wxPalette; | |
25205 | class wxPen; | |
25206 | class wxRegion; | |
25207 | class wxString; | |
25208 | ||
25209 | ||
25210 | ||
25211 | ||
25212 | ||
25213 | ||
25214 | enum wxBitmapType | |
25215 | { | |
25216 | wxBITMAP_TYPE_INVALID, | |
25217 | wxBITMAP_TYPE_BMP, | |
25218 | wxBITMAP_TYPE_BMP_RESOURCE, | |
25219 | wxBITMAP_TYPE_RESOURCE = wxBITMAP_TYPE_BMP_RESOURCE, | |
25220 | wxBITMAP_TYPE_ICO, | |
25221 | wxBITMAP_TYPE_ICO_RESOURCE, | |
25222 | wxBITMAP_TYPE_CUR, | |
25223 | wxBITMAP_TYPE_CUR_RESOURCE, | |
25224 | wxBITMAP_TYPE_XBM, | |
25225 | wxBITMAP_TYPE_XBM_DATA, | |
25226 | wxBITMAP_TYPE_XPM, | |
25227 | wxBITMAP_TYPE_XPM_DATA, | |
25228 | wxBITMAP_TYPE_TIF, | |
25229 | wxBITMAP_TYPE_TIF_RESOURCE, | |
25230 | wxBITMAP_TYPE_GIF, | |
25231 | wxBITMAP_TYPE_GIF_RESOURCE, | |
25232 | wxBITMAP_TYPE_PNG, | |
25233 | wxBITMAP_TYPE_PNG_RESOURCE, | |
25234 | wxBITMAP_TYPE_JPEG, | |
25235 | wxBITMAP_TYPE_JPEG_RESOURCE, | |
25236 | wxBITMAP_TYPE_PNM, | |
25237 | wxBITMAP_TYPE_PNM_RESOURCE, | |
25238 | wxBITMAP_TYPE_PCX, | |
25239 | wxBITMAP_TYPE_PCX_RESOURCE, | |
25240 | wxBITMAP_TYPE_PICT, | |
25241 | wxBITMAP_TYPE_PICT_RESOURCE, | |
25242 | wxBITMAP_TYPE_ICON, | |
25243 | wxBITMAP_TYPE_ICON_RESOURCE, | |
25244 | wxBITMAP_TYPE_ANI, | |
25245 | wxBITMAP_TYPE_IFF, | |
25246 | wxBITMAP_TYPE_MACCURSOR, | |
25247 | wxBITMAP_TYPE_MACCURSOR_RESOURCE, | |
25248 | wxBITMAP_TYPE_ANY = 50 | |
25249 | }; | |
25250 | ||
25251 | ||
25252 | enum wxStockCursor | |
25253 | { | |
25254 | wxCURSOR_NONE, | |
25255 | wxCURSOR_ARROW, | |
25256 | wxCURSOR_RIGHT_ARROW, | |
25257 | wxCURSOR_BULLSEYE, | |
25258 | wxCURSOR_CHAR, | |
25259 | wxCURSOR_CROSS, | |
25260 | wxCURSOR_HAND, | |
25261 | wxCURSOR_IBEAM, | |
25262 | wxCURSOR_LEFT_BUTTON, | |
25263 | wxCURSOR_MAGNIFIER, | |
25264 | wxCURSOR_MIDDLE_BUTTON, | |
25265 | wxCURSOR_NO_ENTRY, | |
25266 | wxCURSOR_PAINT_BRUSH, | |
25267 | wxCURSOR_PENCIL, | |
25268 | wxCURSOR_POINT_LEFT, | |
25269 | wxCURSOR_POINT_RIGHT, | |
25270 | wxCURSOR_QUESTION_ARROW, | |
25271 | wxCURSOR_RIGHT_BUTTON, | |
25272 | wxCURSOR_SIZENESW, | |
25273 | wxCURSOR_SIZENS, | |
25274 | wxCURSOR_SIZENWSE, | |
25275 | wxCURSOR_SIZEWE, | |
25276 | wxCURSOR_SIZING, | |
25277 | wxCURSOR_SPRAYCAN, | |
25278 | wxCURSOR_WAIT, | |
25279 | wxCURSOR_WATCH, | |
25280 | wxCURSOR_BLANK, | |
25281 | ||
25282 | wxCURSOR_DEFAULT, | |
25283 | # 130 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gdicmn.h" | |
25284 | wxCURSOR_ARROWWAIT, | |
25285 | ||
25286 | wxCURSOR_MAX | |
25287 | }; | |
25288 | # 205 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gdicmn.h" | |
25289 | class wxSize | |
25290 | { | |
25291 | public: | |
25292 | ||
25293 | int x, y; | |
25294 | ||
25295 | ||
25296 | wxSize() : x(0), y(0) { } | |
25297 | wxSize(int xx, int yy) : x(xx), y(yy) { } | |
25298 | ||
25299 | ||
25300 | ||
25301 | bool operator==(const wxSize& sz) const { return x == sz.x && y == sz.y; } | |
25302 | bool operator!=(const wxSize& sz) const { return x != sz.x || y != sz.y; } | |
25303 | ||
25304 | wxSize operator+(const wxSize& sz) { return wxSize(x + sz.x, y + sz.y); } | |
25305 | wxSize operator-(const wxSize& sz) { return wxSize(x - sz.x, y - sz.y); } | |
25306 | wxSize operator/(const int i) { return wxSize(x / i, y / i); } | |
25307 | wxSize operator*(const int i) { return wxSize(x * i, y * i); } | |
25308 | ||
25309 | wxSize& operator+=(const wxSize& sz) { x += sz.x; y += sz.y; return *this; } | |
25310 | wxSize& operator-=(const wxSize& sz) { x -= sz.x; y -= sz.y; return *this; } | |
25311 | wxSize& operator/=(const int i) { x /= i; y /= i; return *this; } | |
25312 | wxSize& operator*=(const int i) { x *= i; y *= i; return *this; } | |
25313 | ||
25314 | void IncTo(const wxSize& sz) | |
25315 | { if ( sz.x > x ) x = sz.x; if ( sz.y > y ) y = sz.y; } | |
25316 | void DecTo(const wxSize& sz) | |
25317 | { if ( sz.x < x ) x = sz.x; if ( sz.y < y ) y = sz.y; } | |
25318 | ||
25319 | ||
25320 | void Set(int xx, int yy) { x = xx; y = yy; } | |
25321 | void SetWidth(int w) { x = w; } | |
25322 | void SetHeight(int h) { y = h; } | |
25323 | ||
25324 | int GetWidth() const { return x; } | |
25325 | int GetHeight() const { return y; } | |
25326 | ||
25327 | bool IsFullySpecified() const { return x != wxDefaultCoord && y != wxDefaultCoord; } | |
25328 | ||
25329 | ||
25330 | ||
25331 | void SetDefaults(const wxSize& size) | |
25332 | { | |
25333 | if ( x == wxDefaultCoord ) | |
25334 | x = size.x; | |
25335 | if ( y == wxDefaultCoord ) | |
25336 | y = size.y; | |
25337 | } | |
25338 | ||
25339 | ||
25340 | int GetX() const { return x; } | |
25341 | int GetY() const { return y; } | |
25342 | }; | |
25343 | ||
25344 | ||
25345 | ||
25346 | ||
25347 | ||
25348 | class wxRealPoint | |
25349 | { | |
25350 | public: | |
25351 | double x; | |
25352 | double y; | |
25353 | ||
25354 | wxRealPoint() : x(0.0), y(0.0) { } | |
25355 | wxRealPoint(double xx, double yy) : x(xx), y(yy) { } | |
25356 | ||
25357 | wxRealPoint operator+(const wxRealPoint& pt) const { return wxRealPoint(x + pt.x, y + pt.y); } | |
25358 | wxRealPoint operator-(const wxRealPoint& pt) const { return wxRealPoint(x - pt.x, y - pt.y); } | |
25359 | ||
25360 | bool operator==(const wxRealPoint& pt) const { return x == pt.x && y == pt.y; } | |
25361 | bool operator!=(const wxRealPoint& pt) const { return x != pt.x || y != pt.y; } | |
25362 | }; | |
25363 | ||
25364 | class wxPoint | |
25365 | { | |
25366 | public: | |
25367 | int x, y; | |
25368 | ||
25369 | wxPoint() : x(0), y(0) { } | |
25370 | wxPoint(int xx, int yy) : x(xx), y(yy) { } | |
25371 | ||
25372 | ||
25373 | ||
25374 | ||
25375 | bool operator==(const wxPoint& p) const { return x == p.x && y == p.y; } | |
25376 | bool operator!=(const wxPoint& p) const { return !(*this == p); } | |
25377 | ||
25378 | ||
25379 | wxPoint operator+(const wxPoint& p) const { return wxPoint(x + p.x, y + p.y); } | |
25380 | wxPoint operator-(const wxPoint& p) const { return wxPoint(x - p.x, y - p.y); } | |
25381 | ||
25382 | wxPoint& operator+=(const wxPoint& p) { x += p.x; y += p.y; return *this; } | |
25383 | wxPoint& operator-=(const wxPoint& p) { x -= p.x; y -= p.y; return *this; } | |
25384 | ||
25385 | wxPoint& operator+=(const wxSize& s) { x += s.GetWidth(); y += s.GetHeight(); return *this; } | |
25386 | wxPoint& operator-=(const wxSize& s) { x -= s.GetWidth(); y -= s.GetHeight(); return *this; } | |
25387 | ||
25388 | wxPoint operator+(const wxSize& s) const { return wxPoint(x + s.GetWidth(), y + s.GetHeight()); } | |
25389 | wxPoint operator-(const wxSize& s) const { return wxPoint(x - s.GetWidth(), y - s.GetHeight()); } | |
25390 | }; | |
25391 | ||
25392 | ||
25393 | ||
25394 | ||
25395 | ||
25396 | class wxRect | |
25397 | { | |
25398 | public: | |
25399 | wxRect() | |
25400 | : x(0), y(0), width(0), height(0) | |
25401 | { } | |
25402 | wxRect(int xx, int yy, int ww, int hh) | |
25403 | : x(xx), y(yy), width(ww), height(hh) | |
25404 | { } | |
25405 | wxRect(const wxPoint& topLeft, const wxPoint& bottomRight); | |
25406 | wxRect(const wxPoint& pt, const wxSize& size) | |
25407 | : x(pt.x), y(pt.y), width(size.x), height(size.y) | |
25408 | { } | |
25409 | wxRect(const wxSize& size) | |
25410 | : x(0), y(0), width(size.x), height(size.y) | |
25411 | { } | |
25412 | ||
25413 | ||
25414 | ||
25415 | int GetX() const { return x; } | |
25416 | void SetX(int xx) { x = xx; } | |
25417 | ||
25418 | int GetY() const { return y; } | |
25419 | void SetY(int yy) { y = yy; } | |
25420 | ||
25421 | int GetWidth() const { return width; } | |
25422 | void SetWidth(int w) { width = w; } | |
25423 | ||
25424 | int GetHeight() const { return height; } | |
25425 | void SetHeight(int h) { height = h; } | |
25426 | ||
25427 | wxPoint GetPosition() const { return wxPoint(x, y); } | |
25428 | void SetPosition( const wxPoint &p ) { x = p.x; y = p.y; } | |
25429 | ||
25430 | wxSize GetSize() const { return wxSize(width, height); } | |
25431 | void SetSize( const wxSize &s ) { width = s.GetWidth(); height = s.GetHeight(); } | |
25432 | ||
25433 | bool IsEmpty() const { return (width <= 0) || (height <= 0); } | |
25434 | ||
25435 | wxPoint GetTopLeft() const { return GetPosition(); } | |
25436 | wxPoint GetLeftTop() const { return GetTopLeft(); } | |
25437 | void SetTopLeft(const wxPoint &p) { SetPosition(p); } | |
25438 | void SetLeftTop(const wxPoint &p) { SetTopLeft(p); } | |
25439 | ||
25440 | wxPoint GetBottomRight() const { return wxPoint(GetRight(), GetBottom()); } | |
25441 | wxPoint GetRightBottom() const { return GetBottomRight(); } | |
25442 | void SetBottomRight(const wxPoint &p) { SetRight(p.x); SetBottom(p.y); } | |
25443 | void SetRightBottom(const wxPoint &p) { SetBottomRight(p); } | |
25444 | ||
25445 | int GetLeft() const { return x; } | |
25446 | int GetTop() const { return y; } | |
25447 | int GetBottom() const { return y + height - 1; } | |
25448 | int GetRight() const { return x + width - 1; } | |
25449 | ||
25450 | void SetLeft(int left) { x = left; } | |
25451 | void SetRight(int right) { width = right - x + 1; } | |
25452 | void SetTop(int top) { y = top; } | |
25453 | void SetBottom(int bottom) { height = bottom - y + 1; } | |
25454 | ||
25455 | ||
25456 | wxRect& Inflate(wxCoord dx, wxCoord dy); | |
25457 | wxRect& Inflate(wxCoord d) { return Inflate(d, d); } | |
25458 | wxRect Inflate(wxCoord dx, wxCoord dy) const | |
25459 | { | |
25460 | wxRect r = *this; | |
25461 | r.Inflate(dx, dy); | |
25462 | return r; | |
25463 | } | |
25464 | ||
25465 | wxRect& Deflate(wxCoord dx, wxCoord dy) { return Inflate(-dx, -dy); } | |
25466 | wxRect& Deflate(wxCoord d) { return Inflate(-d); } | |
25467 | wxRect Deflate(wxCoord dx, wxCoord dy) const | |
25468 | { | |
25469 | wxRect r = *this; | |
25470 | r.Deflate(dx, dy); | |
25471 | return r; | |
25472 | } | |
25473 | ||
25474 | void Offset(wxCoord dx, wxCoord dy) { x += dx; y += dy; } | |
25475 | void Offset(const wxPoint& pt) { Offset(pt.x, pt.y); } | |
25476 | ||
25477 | wxRect& Intersect(const wxRect& rect); | |
25478 | wxRect Intersect(const wxRect& rect) const | |
25479 | { | |
25480 | wxRect r = *this; | |
25481 | r.Intersect(rect); | |
25482 | return r; | |
25483 | } | |
25484 | ||
25485 | wxRect& Union(const wxRect& rect); | |
25486 | wxRect Union(const wxRect& rect) const | |
25487 | { | |
25488 | wxRect r = *this; | |
25489 | r.Union(rect); | |
25490 | return r; | |
25491 | } | |
25492 | ||
25493 | ||
25494 | bool operator==(const wxRect& rect) const; | |
25495 | bool operator!=(const wxRect& rect) const { return !(*this == rect); } | |
25496 | ||
25497 | ||
25498 | bool Inside(int x, int y) const; | |
25499 | bool Inside(const wxPoint& pt) const { return Inside(pt.x, pt.y); } | |
25500 | ||
25501 | ||
25502 | bool Intersects(const wxRect& rect) const; | |
25503 | ||
25504 | ||
25505 | ||
25506 | wxRect operator+(const wxRect& rect) const; | |
25507 | wxRect& operator+=(const wxRect& rect) | |
25508 | { | |
25509 | *this = *this + rect; | |
25510 | return *this; | |
25511 | } | |
25512 | ||
25513 | ||
25514 | public: | |
25515 | int x, y, width, height; | |
25516 | }; | |
25517 | ||
25518 | ||
25519 | ||
25520 | ||
25521 | ||
25522 | typedef wxInt8 wxDash; | |
25523 | ||
25524 | class wxPenList : public wxList | |
25525 | { | |
25526 | public: | |
25527 | wxPenList() { } | |
25528 | ~wxPenList(); | |
25529 | ||
25530 | void AddPen(wxPen *pen); | |
25531 | void RemovePen(wxPen *pen); | |
25532 | wxPen *FindOrCreatePen(const wxColour& colour, int width, int style); | |
25533 | }; | |
25534 | ||
25535 | class wxBrushList : public wxList | |
25536 | { | |
25537 | public: | |
25538 | wxBrushList() { } | |
25539 | ~wxBrushList(); | |
25540 | ||
25541 | void AddBrush(wxBrush *brush); | |
25542 | void RemoveBrush(wxBrush *brush); | |
25543 | wxBrush *FindOrCreateBrush(const wxColour& colour, int style = wxSOLID); | |
25544 | }; | |
25545 | ||
25546 | class wxFontList : public wxList | |
25547 | { | |
25548 | public: | |
25549 | wxFontList() { } | |
25550 | ~wxFontList(); | |
25551 | ||
25552 | void AddFont(wxFont *font); | |
25553 | void RemoveFont(wxFont *font); | |
25554 | wxFont *FindOrCreateFont(int pointSize, int family, int style, int weight, | |
25555 | bool underline = false, | |
25556 | const wxString& face = wxEmptyString, | |
25557 | wxFontEncoding encoding = wxFONTENCODING_DEFAULT); | |
25558 | }; | |
25559 | ||
25560 | class wxStringToColourHashMap_wxImplementation_Pair { public: typedef wxString t1; typedef wxColour * t2; typedef const wxString const_t1; typedef const wxColour * const_t2; wxStringToColourHashMap_wxImplementation_Pair( const const_t1& f, const const_t2& s ):first(t1(f)),second(t2(s)) {} t1 first; t2 second; }; class wxStringToColourHashMap_wxImplementation_KeyEx { typedef wxString key_type; typedef wxStringToColourHashMap_wxImplementation_Pair pair_type; typedef const key_type const_key_type; typedef const pair_type const_pair_type; typedef const_key_type& const_key_reference; typedef const_pair_type& const_pair_reference; public: wxStringToColourHashMap_wxImplementation_KeyEx() { } const_key_reference operator()( const_pair_reference pair ) const { return pair.first; } wxStringToColourHashMap_wxImplementation_KeyEx& operator=(const wxStringToColourHashMap_wxImplementation_KeyEx&) { return *this; } }; class wxStringToColourHashMap_wxImplementation_HashTable : protected _wxHashTableBase2 { public: typedef wxString key_type; typedef wxStringToColourHashMap_wxImplementation_Pair value_type; typedef wxStringHash hasher; typedef wxStringEqual key_equal; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type& reference; typedef const value_type& const_reference; typedef const wxString const_key_type; typedef const wxStringToColourHashMap_wxImplementation_Pair const_mapped_type; public: struct Node; typedef wxStringToColourHashMap_wxImplementation_KeyEx key_extractor; typedef wxStringToColourHashMap_wxImplementation_HashTable Self; protected: Node** m_table; size_t m_tableBuckets; size_t m_items; hasher m_hasher; key_equal m_equals; key_extractor m_getKey; public: struct Node:public _wxHashTable_NodeBase { public: Node( const value_type& value ) : m_value( value ) {} Node* m_next() { return (Node*)this->m_nxt; } value_type m_value; }; class Iterator; friend class Iterator; protected: static void DeleteNode( _wxHashTable_NodeBase* node ) { delete (Node*)node; } public: class Iterator { public: Node* m_node; Self* m_ht; Iterator() : m_node(0), m_ht(0) {} Iterator( Node* node, const Self* ht ) : m_node(node), m_ht((Self*)ht) {} bool operator ==( const Iterator& it ) const { return m_node == it.m_node; } bool operator !=( const Iterator& it ) const { return m_node != it.m_node; } protected: Node* GetNextNode() { size_type bucket = GetBucketForNode(m_ht,m_node); for( size_type i = bucket + 1; i < m_ht->m_tableBuckets; ++i ) { if( m_ht->m_table[i] ) return m_ht->m_table[i]; } return 0; } void PlusPlus() { Node* next = m_node->m_next(); m_node = next ? next : GetNextNode(); } }; public: class iterator : public Iterator { public: iterator() : Iterator() {} iterator( Node* node, Self* ht ) : Iterator( node, ht ) {} iterator& operator++() { PlusPlus(); return *this; } iterator operator++(int) { iterator it=*this;PlusPlus();return it; } reference operator *() const { return m_node->m_value; } pointer operator ->() const { return &(m_node->m_value); } }; class const_iterator : public Iterator { public: const_iterator() : Iterator() {} const_iterator( Node* node, const Self* ht ) : Iterator( node, (Self*)ht ) {} const_iterator& operator++() { PlusPlus();return *this; } const_iterator operator++(int) { const_iterator it=*this;PlusPlus();return it; } const_reference operator *() const { return m_node->m_value; } const_pointer operator ->() const { return &(m_node->m_value); } }; wxStringToColourHashMap_wxImplementation_HashTable( size_type sz = 10, const hasher& hfun = hasher(), const key_equal& k_eq = key_equal(), const key_extractor& k_ex = key_extractor() ) : m_tableBuckets( GetNextPrime( (unsigned long) sz ) ), m_items( 0 ), m_hasher( hfun ), m_equals( k_eq ), m_getKey( k_ex ) { m_table = (Node**)AllocTable( m_tableBuckets ); } wxStringToColourHashMap_wxImplementation_HashTable( const Self& ht ) : m_table( 0 ), m_tableBuckets( 0 ), m_items( ht.m_items ), m_hasher( ht.m_hasher ), m_equals( ht.m_equals ), m_getKey( ht.m_getKey ) { HashCopy( ht ); } const Self& operator=( const Self& ht ) { clear(); m_hasher = ht.m_hasher; m_equals = ht.m_equals; m_getKey = ht.m_getKey; m_items = ht.m_items; HashCopy( ht ); return *this; } ~wxStringToColourHashMap_wxImplementation_HashTable() { clear(); FreeTable(m_table); } hasher hash_funct() { return m_hasher; } key_equal key_eq() { return m_equals; } void clear() { DeleteNodes( m_tableBuckets, (_wxHashTable_NodeBase**)m_table, DeleteNode ); m_items = 0; } size_type size() const { return m_items; } size_type max_size() const { return size_type(-1); } bool empty() const { return size() == 0; } const_iterator end() const { return const_iterator( 0, this ); } iterator end() { return iterator( 0, this ); } const_iterator begin() const { return const_iterator( (Node*)GetFirstNode( m_tableBuckets, (_wxHashTable_NodeBase**)m_table ), this ); }; iterator begin() { return iterator( (Node*)GetFirstNode( m_tableBuckets, (_wxHashTable_NodeBase**)m_table ), this ); }; size_type erase( const const_key_type& key ) { Node** node = GetNodePtr( key ); if( !node ) return 0; --m_items; Node* temp = (*node)->m_next(); delete *node; (*node) = temp; if( never_shrink( m_tableBuckets, m_items ) ) ResizeTable( GetPreviousPrime( (unsigned long) m_tableBuckets ) - 1 ); return 1; } protected: static size_type GetBucketForNode( Self* ht, Node* node ) { return ht->m_hasher( ht->m_getKey( node->m_value ) ) % ht->m_tableBuckets; } static Node* CopyNode( Node* node ) { return new Node( *node ); } Node* GetOrCreateNode( const value_type& value, bool& created ) { const const_key_type& key = m_getKey( value ); size_t bucket = m_hasher( key ) % m_tableBuckets; Node* node = m_table[bucket]; while( node ) { if( m_equals( m_getKey( node->m_value ), key ) ) { created = false; return node; } node = node->m_next(); } created = true; return CreateNode( value, bucket); } Node * CreateNode( const value_type& value, size_t bucket ) { Node* node = new Node( value ); node->m_nxt = m_table[bucket]; m_table[bucket] = node; ++m_items; if( grow_lf70( m_tableBuckets, m_items ) ) ResizeTable( m_tableBuckets ); return node; } void CreateNode( const value_type& value ) { CreateNode(value, m_hasher( m_getKey(value) ) % m_tableBuckets ); } Node** GetNodePtr( const const_key_type& key ) const { size_t bucket = m_hasher( key ) % m_tableBuckets; Node** node = &m_table[bucket]; while( *node ) { if( m_equals( m_getKey( (*node)->m_value ), key ) ) return node; node = (Node**)&(*node)->m_nxt; } return 0; } Node* GetNode( const const_key_type& key ) const { size_t bucket = m_hasher( key ) % m_tableBuckets; Node* node = m_table[bucket]; while( node ) { if( m_equals( m_getKey( node->m_value ), key ) ) return node; node = node->m_next(); } return 0; } void ResizeTable( size_t newSize ) { newSize = GetNextPrime( (unsigned long)newSize ); Node** srcTable = m_table; size_t srcBuckets = m_tableBuckets; m_table = (Node**)AllocTable( newSize ); m_tableBuckets = newSize; CopyHashTable( (_wxHashTable_NodeBase**)srcTable, srcBuckets, this, (_wxHashTable_NodeBase**)m_table, (BucketFromNode)GetBucketForNode, (ProcessNode)&DummyProcessNode ); FreeTable(srcTable); } void HashCopy( const Self& ht ) { ResizeTable( ht.size() ); CopyHashTable( (_wxHashTable_NodeBase**)ht.m_table, ht.m_tableBuckets, (_wxHashTableBase2*)this, (_wxHashTable_NodeBase**)m_table, (BucketFromNode)GetBucketForNode, (ProcessNode)CopyNode ); } }; class wxStringToColourHashMap:public wxStringToColourHashMap_wxImplementation_HashTable { public: typedef wxColour * mapped_type; class Insert_Result { public: typedef iterator t1; typedef bool t2; typedef const iterator const_t1; typedef const bool const_t2; Insert_Result( const const_t1& f, const const_t2& s ):first(t1(f)),second(t2(s)) {} t1 first; t2 second; }; explicit wxStringToColourHashMap( size_type hint = 100, hasher hf = hasher(), key_equal eq = key_equal() ) : wxStringToColourHashMap_wxImplementation_HashTable( hint, hf, eq, wxStringToColourHashMap_wxImplementation_KeyEx() ) {} mapped_type& operator[]( const const_key_type& key ) { bool created; return GetOrCreateNode( wxStringToColourHashMap_wxImplementation_Pair( key, mapped_type() ), created)->m_value.second; } const_iterator find( const const_key_type& key ) const { return const_iterator( GetNode( key ), this ); } iterator find( const const_key_type& key ) { return iterator( GetNode( key ), this ); } Insert_Result insert( const value_type& v ) { bool created; Node *node = GetOrCreateNode( wxStringToColourHashMap_wxImplementation_Pair( v.first, v.second ), created); if ( !created ) node->m_value.second = v.second; return Insert_Result(iterator(node, this), created); } size_type erase( const key_type& k ) { return wxStringToColourHashMap_wxImplementation_HashTable::erase( k ); } void erase( const iterator& it ) { erase( it->first ); } void erase( const const_iterator& it ) { erase( it->first ); } size_type count( const const_key_type& key ) { return GetNode( key ) ? 1 : 0; } }; | |
25561 | ||
25562 | class wxColourDatabase | |
25563 | { | |
25564 | public: | |
25565 | wxColourDatabase(); | |
25566 | ~wxColourDatabase(); | |
25567 | ||
25568 | ||
25569 | wxColour Find(const wxString& name) const; | |
25570 | wxString FindName(const wxColour& colour) const; | |
25571 | ||
25572 | ||
25573 | void AddColour(const wxString& name, const wxColour& colour); | |
25574 | ||
25575 | ||
25576 | wxColour *FindColour(const wxString& name) __attribute__ ((deprecated)); | |
25577 | # 501 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gdicmn.h" | |
25578 | private: | |
25579 | ||
25580 | ||
25581 | void Initialize(); | |
25582 | ||
25583 | wxStringToColourHashMap *m_map; | |
25584 | }; | |
25585 | ||
25586 | class wxBitmapList : public wxList | |
25587 | { | |
25588 | public: | |
25589 | wxBitmapList(){} | |
25590 | ~wxBitmapList(); | |
25591 | ||
25592 | void AddBitmap(wxBitmap *bitmap); | |
25593 | void RemoveBitmap(wxBitmap *bitmap); | |
25594 | }; | |
25595 | ||
25596 | class wxResourceCache: public wxList | |
25597 | { | |
25598 | public: | |
25599 | wxResourceCache() { } | |
25600 | ||
25601 | wxResourceCache(const unsigned int keyType) : wxList(keyType) { } | |
25602 | ||
25603 | ~wxResourceCache(); | |
25604 | }; | |
25605 | ||
25606 | ||
25607 | ||
25608 | ||
25609 | ||
25610 | ||
25611 | extern wxPenList* wxThePenList; | |
25612 | extern wxBrushList* wxTheBrushList; | |
25613 | extern wxFontList* wxTheFontList; | |
25614 | extern wxBitmapList* wxTheBitmapList; | |
25615 | ||
25616 | ||
25617 | extern wxFont* wxNORMAL_FONT; | |
25618 | extern wxFont* wxSMALL_FONT; | |
25619 | extern wxFont* wxITALIC_FONT; | |
25620 | extern wxFont* wxSWISS_FONT; | |
25621 | ||
25622 | extern wxPen* wxRED_PEN; | |
25623 | extern wxPen* wxCYAN_PEN; | |
25624 | extern wxPen* wxGREEN_PEN; | |
25625 | extern wxPen* wxBLACK_PEN; | |
25626 | extern wxPen* wxWHITE_PEN; | |
25627 | extern wxPen* wxTRANSPARENT_PEN; | |
25628 | extern wxPen* wxBLACK_DASHED_PEN; | |
25629 | extern wxPen* wxGREY_PEN; | |
25630 | extern wxPen* wxMEDIUM_GREY_PEN; | |
25631 | extern wxPen* wxLIGHT_GREY_PEN; | |
25632 | ||
25633 | extern wxBrush* wxBLUE_BRUSH; | |
25634 | extern wxBrush* wxGREEN_BRUSH; | |
25635 | extern wxBrush* wxWHITE_BRUSH; | |
25636 | extern wxBrush* wxBLACK_BRUSH; | |
25637 | extern wxBrush* wxGREY_BRUSH; | |
25638 | extern wxBrush* wxMEDIUM_GREY_BRUSH; | |
25639 | extern wxBrush* wxLIGHT_GREY_BRUSH; | |
25640 | extern wxBrush* wxTRANSPARENT_BRUSH; | |
25641 | extern wxBrush* wxCYAN_BRUSH; | |
25642 | extern wxBrush* wxRED_BRUSH; | |
25643 | ||
25644 | extern wxColour* wxBLACK; | |
25645 | extern wxColour* wxWHITE; | |
25646 | extern wxColour* wxRED; | |
25647 | extern wxColour* wxBLUE; | |
25648 | extern wxColour* wxGREEN; | |
25649 | extern wxColour* wxCYAN; | |
25650 | extern wxColour* wxLIGHT_GREY; | |
25651 | ||
25652 | ||
25653 | extern wxBitmap wxNullBitmap; | |
25654 | extern wxIcon wxNullIcon; | |
25655 | extern wxCursor wxNullCursor; | |
25656 | extern wxPen wxNullPen; | |
25657 | extern wxBrush wxNullBrush; | |
25658 | extern wxPalette wxNullPalette; | |
25659 | extern wxFont wxNullFont; | |
25660 | extern wxColour wxNullColour; | |
25661 | ||
25662 | ||
25663 | extern wxCursor* wxSTANDARD_CURSOR; | |
25664 | extern wxCursor* wxHOURGLASS_CURSOR; | |
25665 | extern wxCursor* wxCROSS_CURSOR; | |
25666 | ||
25667 | extern wxColourDatabase* wxTheColourDatabase; | |
25668 | ||
25669 | extern const wxChar* wxPanelNameStr; | |
25670 | ||
25671 | extern const wxSize wxDefaultSize; | |
25672 | extern const wxPoint wxDefaultPosition; | |
25673 | ||
25674 | ||
25675 | extern wxList wxPendingDelete; | |
25676 | ||
25677 | ||
25678 | ||
25679 | ||
25680 | ||
25681 | ||
25682 | extern void wxInitializeStockObjects(); | |
25683 | extern void wxInitializeStockLists(); | |
25684 | extern void wxDeleteStockObjects(); | |
25685 | extern void wxDeleteStockLists(); | |
25686 | ||
25687 | ||
25688 | extern bool wxColourDisplay(); | |
25689 | ||
25690 | ||
25691 | extern int wxDisplayDepth(); | |
25692 | ||
25693 | ||
25694 | ||
25695 | extern void wxDisplaySize(int *width, int *height); | |
25696 | extern wxSize wxGetDisplaySize(); | |
25697 | extern void wxDisplaySizeMM(int *width, int *height); | |
25698 | extern wxSize wxGetDisplaySizeMM(); | |
25699 | ||
25700 | ||
25701 | extern void wxClientDisplayRect(int *x, int *y, int *width, int *height); | |
25702 | extern wxRect wxGetClientDisplayRect(); | |
25703 | ||
25704 | ||
25705 | extern void wxSetCursor(const wxCursor& cursor); | |
25706 | # 32 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" 2 | |
25707 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/cursor.h" 1 | |
25708 | # 24 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/cursor.h" | |
25709 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/cursor.h" 1 | |
25710 | # 18 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/cursor.h" | |
25711 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" 1 | |
25712 | # 19 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/cursor.h" 2 | |
25713 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/object.h" 1 | |
25714 | # 20 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/cursor.h" 2 | |
25715 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gdicmn.h" 1 | |
25716 | # 21 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/cursor.h" 2 | |
25717 | ||
25718 | ||
25719 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/image.h" 1 | |
25720 | # 24 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/image.h" | |
25721 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/stream.h" 1 | |
25722 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/stream.h" | |
25723 | # 1 "/usr/include/stdio.h" 1 3 4 | |
25724 | # 24 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/stream.h" 2 | |
25725 | ||
25726 | ||
25727 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/filefn.h" 1 | |
25728 | # 26 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/filefn.h" | |
25729 | # 1 "/usr/include/time.h" 1 3 4 | |
25730 | # 27 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/filefn.h" 2 | |
25731 | ||
25732 | ||
25733 | ||
25734 | ||
25735 | ||
25736 | # 1 "/usr/include/sys/types.h" 1 3 4 | |
25737 | # 33 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/filefn.h" 2 | |
25738 | # 1 "/usr/include/sys/stat.h" 1 3 4 | |
25739 | ||
25740 | ||
25741 | ||
25742 | ||
25743 | ||
25744 | ||
25745 | ||
25746 | # 1 "/usr/include/gentoo-multilib/amd64/sys/stat.h" 1 3 4 | |
25747 | # 26 "/usr/include/gentoo-multilib/amd64/sys/stat.h" 3 4 | |
25748 | # 1 "/usr/include/features.h" 1 3 4 | |
25749 | # 27 "/usr/include/gentoo-multilib/amd64/sys/stat.h" 2 3 4 | |
25750 | ||
25751 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
25752 | # 29 "/usr/include/gentoo-multilib/amd64/sys/stat.h" 2 3 4 | |
25753 | # 37 "/usr/include/gentoo-multilib/amd64/sys/stat.h" 3 4 | |
25754 | # 1 "/usr/include/time.h" 1 3 4 | |
25755 | # 38 "/usr/include/gentoo-multilib/amd64/sys/stat.h" 2 3 4 | |
25756 | # 103 "/usr/include/gentoo-multilib/amd64/sys/stat.h" 3 4 | |
25757 | extern "C" { | |
25758 | ||
25759 | # 1 "/usr/include/bits/stat.h" 1 3 4 | |
25760 | ||
25761 | ||
25762 | ||
25763 | ||
25764 | ||
25765 | ||
25766 | ||
25767 | # 1 "/usr/include/gentoo-multilib/amd64/bits/stat.h" 1 3 4 | |
25768 | # 43 "/usr/include/gentoo-multilib/amd64/bits/stat.h" 3 4 | |
25769 | struct stat | |
25770 | { | |
25771 | __dev_t st_dev; | |
25772 | ||
25773 | ||
25774 | ||
25775 | ||
25776 | __ino_t st_ino; | |
25777 | ||
25778 | ||
25779 | ||
25780 | ||
25781 | ||
25782 | ||
25783 | ||
25784 | __nlink_t st_nlink; | |
25785 | __mode_t st_mode; | |
25786 | ||
25787 | __uid_t st_uid; | |
25788 | __gid_t st_gid; | |
25789 | ||
25790 | int pad0; | |
25791 | ||
25792 | __dev_t st_rdev; | |
25793 | ||
25794 | ||
25795 | ||
25796 | ||
25797 | __off_t st_size; | |
25798 | ||
25799 | ||
25800 | ||
25801 | __blksize_t st_blksize; | |
25802 | ||
25803 | __blkcnt_t st_blocks; | |
25804 | # 88 "/usr/include/gentoo-multilib/amd64/bits/stat.h" 3 4 | |
25805 | struct timespec st_atim; | |
25806 | struct timespec st_mtim; | |
25807 | struct timespec st_ctim; | |
25808 | # 103 "/usr/include/gentoo-multilib/amd64/bits/stat.h" 3 4 | |
25809 | long int __unused[3]; | |
25810 | # 112 "/usr/include/gentoo-multilib/amd64/bits/stat.h" 3 4 | |
25811 | }; | |
25812 | ||
25813 | ||
25814 | ||
25815 | struct stat64 | |
25816 | { | |
25817 | __dev_t st_dev; | |
25818 | ||
25819 | __ino64_t st_ino; | |
25820 | __nlink_t st_nlink; | |
25821 | __mode_t st_mode; | |
25822 | ||
25823 | ||
25824 | ||
25825 | ||
25826 | ||
25827 | ||
25828 | __uid_t st_uid; | |
25829 | __gid_t st_gid; | |
25830 | ||
25831 | int pad0; | |
25832 | __dev_t st_rdev; | |
25833 | __off_t st_size; | |
25834 | ||
25835 | ||
25836 | ||
25837 | ||
25838 | ||
25839 | __blksize_t st_blksize; | |
25840 | __blkcnt64_t st_blocks; | |
25841 | ||
25842 | ||
25843 | ||
25844 | ||
25845 | ||
25846 | ||
25847 | ||
25848 | struct timespec st_atim; | |
25849 | struct timespec st_mtim; | |
25850 | struct timespec st_ctim; | |
25851 | # 164 "/usr/include/gentoo-multilib/amd64/bits/stat.h" 3 4 | |
25852 | long int __unused[3]; | |
25853 | ||
25854 | ||
25855 | ||
25856 | }; | |
25857 | # 9 "/usr/include/bits/stat.h" 2 3 4 | |
25858 | # 106 "/usr/include/gentoo-multilib/amd64/sys/stat.h" 2 3 4 | |
25859 | # 215 "/usr/include/gentoo-multilib/amd64/sys/stat.h" 3 4 | |
25860 | extern int stat (__const char *__restrict __file, struct stat *__restrict __buf) throw () __asm__ ("" "stat64") | |
25861 | ||
25862 | __attribute__ ((__nonnull__ (1, 2))); | |
25863 | extern int fstat (int __fd, struct stat *__buf) throw () __asm__ ("" "fstat64") | |
25864 | __attribute__ ((__nonnull__ (2))); | |
25865 | ||
25866 | ||
25867 | ||
25868 | ||
25869 | ||
25870 | ||
25871 | extern int stat64 (__const char *__restrict __file, | |
25872 | struct stat64 *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2))); | |
25873 | extern int fstat64 (int __fd, struct stat64 *__buf) throw () __attribute__ ((__nonnull__ (2))); | |
25874 | # 241 "/usr/include/gentoo-multilib/amd64/sys/stat.h" 3 4 | |
25875 | extern int fstatat (int __fd, __const char *__restrict __file, struct stat *__restrict __buf, int __flag) throw () __asm__ ("" "fstatat64") __attribute__ ((__nonnull__ (2, 3))); | |
25876 | # 250 "/usr/include/gentoo-multilib/amd64/sys/stat.h" 3 4 | |
25877 | extern int fstatat64 (int __fd, __const char *__restrict __file, | |
25878 | struct stat64 *__restrict __buf, int __flag) | |
25879 | throw () __attribute__ ((__nonnull__ (2, 3))); | |
25880 | # 263 "/usr/include/gentoo-multilib/amd64/sys/stat.h" 3 4 | |
25881 | extern int lstat (__const char *__restrict __file, struct stat *__restrict __buf) throw () __asm__ ("" "lstat64") | |
25882 | ||
25883 | ||
25884 | __attribute__ ((__nonnull__ (1, 2))); | |
25885 | ||
25886 | ||
25887 | ||
25888 | ||
25889 | ||
25890 | extern int lstat64 (__const char *__restrict __file, | |
25891 | struct stat64 *__restrict __buf) | |
25892 | throw () __attribute__ ((__nonnull__ (1, 2))); | |
25893 | ||
25894 | ||
25895 | ||
25896 | ||
25897 | ||
25898 | extern int chmod (__const char *__file, __mode_t __mode) | |
25899 | throw () __attribute__ ((__nonnull__ (1))); | |
25900 | ||
25901 | ||
25902 | ||
25903 | ||
25904 | ||
25905 | extern int lchmod (__const char *__file, __mode_t __mode) | |
25906 | throw () __attribute__ ((__nonnull__ (1))); | |
25907 | ||
25908 | ||
25909 | ||
25910 | ||
25911 | extern int fchmod (int __fd, __mode_t __mode) throw (); | |
25912 | ||
25913 | ||
25914 | ||
25915 | ||
25916 | ||
25917 | extern int fchmodat (int __fd, __const char *__file, __mode_t mode, int __flag) | |
25918 | throw () __attribute__ ((__nonnull__ (2))) ; | |
25919 | ||
25920 | ||
25921 | ||
25922 | ||
25923 | ||
25924 | ||
25925 | extern __mode_t umask (__mode_t __mask) throw (); | |
25926 | ||
25927 | ||
25928 | ||
25929 | ||
25930 | extern __mode_t getumask (void) throw (); | |
25931 | ||
25932 | ||
25933 | ||
25934 | extern int mkdir (__const char *__path, __mode_t __mode) | |
25935 | throw () __attribute__ ((__nonnull__ (1))); | |
25936 | ||
25937 | ||
25938 | ||
25939 | ||
25940 | ||
25941 | extern int mkdirat (int __fd, __const char *__path, __mode_t __mode) | |
25942 | throw () __attribute__ ((__nonnull__ (2))); | |
25943 | ||
25944 | ||
25945 | ||
25946 | ||
25947 | ||
25948 | ||
25949 | extern int mknod (__const char *__path, __mode_t __mode, __dev_t __dev) | |
25950 | throw () __attribute__ ((__nonnull__ (1))); | |
25951 | ||
25952 | ||
25953 | ||
25954 | ||
25955 | ||
25956 | ||
25957 | extern int mknodat (int __fd, __const char *__path, __mode_t __mode, | |
25958 | __dev_t __dev) throw () __attribute__ ((__nonnull__ (2))); | |
25959 | ||
25960 | ||
25961 | ||
25962 | ||
25963 | extern int mkfifo (__const char *__path, __mode_t __mode) | |
25964 | throw () __attribute__ ((__nonnull__ (1))); | |
25965 | ||
25966 | ||
25967 | ||
25968 | ||
25969 | ||
25970 | extern int mkfifoat (int __fd, __const char *__path, __mode_t __mode) | |
25971 | throw () __attribute__ ((__nonnull__ (2))); | |
25972 | # 391 "/usr/include/gentoo-multilib/amd64/sys/stat.h" 3 4 | |
25973 | extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf) throw () __asm__ ("" "__fxstat64") | |
25974 | ||
25975 | __attribute__ ((__nonnull__ (3))); | |
25976 | extern int __xstat (int __ver, __const char *__filename, struct stat *__stat_buf) throw () __asm__ ("" "__xstat64") | |
25977 | ||
25978 | __attribute__ ((__nonnull__ (2, 3))); | |
25979 | extern int __lxstat (int __ver, __const char *__filename, struct stat *__stat_buf) throw () __asm__ ("" "__lxstat64") | |
25980 | ||
25981 | __attribute__ ((__nonnull__ (2, 3))); | |
25982 | extern int __fxstatat (int __ver, int __fildes, __const char *__filename, struct stat *__stat_buf, int __flag) throw () __asm__ ("" "__fxstatat64") __attribute__ ((__nonnull__ (3, 4))); | |
25983 | # 413 "/usr/include/gentoo-multilib/amd64/sys/stat.h" 3 4 | |
25984 | extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf) | |
25985 | throw () __attribute__ ((__nonnull__ (3))); | |
25986 | extern int __xstat64 (int __ver, __const char *__filename, | |
25987 | struct stat64 *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3))); | |
25988 | extern int __lxstat64 (int __ver, __const char *__filename, | |
25989 | struct stat64 *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3))); | |
25990 | extern int __fxstatat64 (int __ver, int __fildes, __const char *__filename, | |
25991 | struct stat64 *__stat_buf, int __flag) | |
25992 | throw () __attribute__ ((__nonnull__ (3, 4))); | |
25993 | ||
25994 | extern int __xmknod (int __ver, __const char *__path, __mode_t __mode, | |
25995 | __dev_t *__dev) throw () __attribute__ ((__nonnull__ (2, 4))); | |
25996 | ||
25997 | extern int __xmknodat (int __ver, int __fd, __const char *__path, | |
25998 | __mode_t __mode, __dev_t *__dev) | |
25999 | throw () __attribute__ ((__nonnull__ (3, 5))); | |
26000 | ||
26001 | ||
26002 | ||
26003 | ||
26004 | extern __inline__ int | |
26005 | stat (__const char *__path, struct stat *__statbuf) throw () | |
26006 | { | |
26007 | return __xstat (1, __path, __statbuf); | |
26008 | } | |
26009 | ||
26010 | ||
26011 | extern __inline__ int | |
26012 | lstat (__const char *__path, struct stat *__statbuf) throw () | |
26013 | { | |
26014 | return __lxstat (1, __path, __statbuf); | |
26015 | } | |
26016 | ||
26017 | ||
26018 | extern __inline__ int | |
26019 | fstat (int __fd, struct stat *__statbuf) throw () | |
26020 | { | |
26021 | return __fxstat (1, __fd, __statbuf); | |
26022 | } | |
26023 | ||
26024 | ||
26025 | extern __inline__ int | |
26026 | fstatat (int __fd, __const char *__filename, struct stat *__statbuf, int __flag) throw () | |
26027 | ||
26028 | { | |
26029 | return __fxstatat (1, __fd, __filename, __statbuf, __flag); | |
26030 | } | |
26031 | ||
26032 | ||
26033 | ||
26034 | extern __inline__ int | |
26035 | mknod (__const char *__path, __mode_t __mode, __dev_t __dev) throw () | |
26036 | { | |
26037 | return __xmknod (0, __path, __mode, &__dev); | |
26038 | } | |
26039 | ||
26040 | ||
26041 | ||
26042 | extern __inline__ int | |
26043 | mknodat (int __fd, __const char *__path, __mode_t __mode, __dev_t __dev) throw () | |
26044 | ||
26045 | { | |
26046 | return __xmknodat (0, __fd, __path, __mode, &__dev); | |
26047 | } | |
26048 | ||
26049 | ||
26050 | ||
26051 | ||
26052 | ||
26053 | extern __inline__ int | |
26054 | stat64 (__const char *__path, struct stat64 *__statbuf) throw () | |
26055 | { | |
26056 | return __xstat64 (1, __path, __statbuf); | |
26057 | } | |
26058 | ||
26059 | ||
26060 | extern __inline__ int | |
26061 | lstat64 (__const char *__path, struct stat64 *__statbuf) throw () | |
26062 | { | |
26063 | return __lxstat64 (1, __path, __statbuf); | |
26064 | } | |
26065 | ||
26066 | ||
26067 | extern __inline__ int | |
26068 | fstat64 (int __fd, struct stat64 *__statbuf) throw () | |
26069 | { | |
26070 | return __fxstat64 (1, __fd, __statbuf); | |
26071 | } | |
26072 | ||
26073 | ||
26074 | extern __inline__ int | |
26075 | fstatat64 (int __fd, __const char *__filename, struct stat64 *__statbuf, int __flag) throw () | |
26076 | ||
26077 | { | |
26078 | return __fxstatat64 (1, __fd, __filename, __statbuf, __flag); | |
26079 | } | |
26080 | ||
26081 | ||
26082 | ||
26083 | ||
26084 | ||
26085 | ||
26086 | } | |
26087 | # 9 "/usr/include/sys/stat.h" 2 3 4 | |
26088 | # 34 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/filefn.h" 2 | |
26089 | # 60 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/filefn.h" | |
26090 | # 1 "/usr/include/unistd.h" 1 3 4 | |
26091 | # 61 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/filefn.h" 2 | |
26092 | # 1 "/usr/include/dirent.h" 1 3 4 | |
26093 | ||
26094 | ||
26095 | ||
26096 | ||
26097 | ||
26098 | ||
26099 | ||
26100 | # 1 "/usr/include/gentoo-multilib/amd64/dirent.h" 1 3 4 | |
26101 | # 26 "/usr/include/gentoo-multilib/amd64/dirent.h" 3 4 | |
26102 | # 1 "/usr/include/features.h" 1 3 4 | |
26103 | # 27 "/usr/include/gentoo-multilib/amd64/dirent.h" 2 3 4 | |
26104 | ||
26105 | extern "C" { | |
26106 | ||
26107 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
26108 | # 31 "/usr/include/gentoo-multilib/amd64/dirent.h" 2 3 4 | |
26109 | # 62 "/usr/include/gentoo-multilib/amd64/dirent.h" 3 4 | |
26110 | # 1 "/usr/include/bits/dirent.h" 1 3 4 | |
26111 | ||
26112 | ||
26113 | ||
26114 | ||
26115 | ||
26116 | ||
26117 | ||
26118 | # 1 "/usr/include/gentoo-multilib/amd64/bits/dirent.h" 1 3 4 | |
26119 | # 23 "/usr/include/gentoo-multilib/amd64/bits/dirent.h" 3 4 | |
26120 | struct dirent | |
26121 | { | |
26122 | ||
26123 | ||
26124 | ||
26125 | ||
26126 | __ino64_t d_ino; | |
26127 | __off64_t d_off; | |
26128 | ||
26129 | unsigned short int d_reclen; | |
26130 | unsigned char d_type; | |
26131 | char d_name[256]; | |
26132 | }; | |
26133 | ||
26134 | ||
26135 | struct dirent64 | |
26136 | { | |
26137 | __ino64_t d_ino; | |
26138 | __off64_t d_off; | |
26139 | unsigned short int d_reclen; | |
26140 | unsigned char d_type; | |
26141 | char d_name[256]; | |
26142 | }; | |
26143 | # 9 "/usr/include/bits/dirent.h" 2 3 4 | |
26144 | # 63 "/usr/include/gentoo-multilib/amd64/dirent.h" 2 3 4 | |
26145 | # 98 "/usr/include/gentoo-multilib/amd64/dirent.h" 3 4 | |
26146 | enum | |
26147 | { | |
26148 | DT_UNKNOWN = 0, | |
26149 | ||
26150 | DT_FIFO = 1, | |
26151 | ||
26152 | DT_CHR = 2, | |
26153 | ||
26154 | DT_DIR = 4, | |
26155 | ||
26156 | DT_BLK = 6, | |
26157 | ||
26158 | DT_REG = 8, | |
26159 | ||
26160 | DT_LNK = 10, | |
26161 | ||
26162 | DT_SOCK = 12, | |
26163 | ||
26164 | DT_WHT = 14 | |
26165 | ||
26166 | }; | |
26167 | # 128 "/usr/include/gentoo-multilib/amd64/dirent.h" 3 4 | |
26168 | typedef struct __dirstream DIR; | |
26169 | ||
26170 | ||
26171 | ||
26172 | ||
26173 | ||
26174 | ||
26175 | extern DIR *opendir (__const char *__name) __attribute__ ((__nonnull__ (1))); | |
26176 | ||
26177 | ||
26178 | ||
26179 | ||
26180 | ||
26181 | ||
26182 | extern DIR *fdopendir (int __fd); | |
26183 | ||
26184 | ||
26185 | ||
26186 | ||
26187 | ||
26188 | ||
26189 | ||
26190 | extern int closedir (DIR *__dirp) __attribute__ ((__nonnull__ (1))); | |
26191 | # 166 "/usr/include/gentoo-multilib/amd64/dirent.h" 3 4 | |
26192 | extern struct dirent *readdir (DIR *__dirp) __asm__ ("" "readdir64") | |
26193 | __attribute__ ((__nonnull__ (1))); | |
26194 | ||
26195 | ||
26196 | ||
26197 | ||
26198 | ||
26199 | ||
26200 | extern struct dirent64 *readdir64 (DIR *__dirp) __attribute__ ((__nonnull__ (1))); | |
26201 | # 190 "/usr/include/gentoo-multilib/amd64/dirent.h" 3 4 | |
26202 | extern int readdir_r (DIR *__restrict __dirp, struct dirent *__restrict __entry, struct dirent **__restrict __result) __asm__ ("" "readdir64_r") __attribute__ ((__nonnull__ (1, 2, 3))); | |
26203 | # 201 "/usr/include/gentoo-multilib/amd64/dirent.h" 3 4 | |
26204 | extern int readdir64_r (DIR *__restrict __dirp, | |
26205 | struct dirent64 *__restrict __entry, | |
26206 | struct dirent64 **__restrict __result) | |
26207 | __attribute__ ((__nonnull__ (1, 2, 3))); | |
26208 | ||
26209 | ||
26210 | ||
26211 | ||
26212 | extern void rewinddir (DIR *__dirp) throw () __attribute__ ((__nonnull__ (1))); | |
26213 | ||
26214 | ||
26215 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
26216 | # 213 "/usr/include/gentoo-multilib/amd64/dirent.h" 2 3 4 | |
26217 | ||
26218 | ||
26219 | extern void seekdir (DIR *__dirp, long int __pos) throw () __attribute__ ((__nonnull__ (1))); | |
26220 | ||
26221 | ||
26222 | extern long int telldir (DIR *__dirp) throw () __attribute__ ((__nonnull__ (1))); | |
26223 | ||
26224 | ||
26225 | ||
26226 | ||
26227 | ||
26228 | extern int dirfd (DIR *__dirp) throw () __attribute__ ((__nonnull__ (1))); | |
26229 | ||
26230 | ||
26231 | ||
26232 | ||
26233 | ||
26234 | ||
26235 | ||
26236 | # 1 "/usr/include/bits/posix1_lim.h" 1 3 4 | |
26237 | # 233 "/usr/include/gentoo-multilib/amd64/dirent.h" 2 3 4 | |
26238 | # 243 "/usr/include/gentoo-multilib/amd64/dirent.h" 3 4 | |
26239 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 | |
26240 | # 244 "/usr/include/gentoo-multilib/amd64/dirent.h" 2 3 4 | |
26241 | # 257 "/usr/include/gentoo-multilib/amd64/dirent.h" 3 4 | |
26242 | extern int scandir (__const char *__restrict __dir, struct dirent ***__restrict __namelist, int (*__selector) (__const struct dirent *), int (*__cmp) (__const void *, __const void *)) __asm__ ("" "scandir64") __attribute__ ((__nonnull__ (1, 2))); | |
26243 | # 271 "/usr/include/gentoo-multilib/amd64/dirent.h" 3 4 | |
26244 | extern int scandir64 (__const char *__restrict __dir, | |
26245 | struct dirent64 ***__restrict __namelist, | |
26246 | int (*__selector) (__const struct dirent64 *), | |
26247 | int (*__cmp) (__const void *, __const void *)) | |
26248 | __attribute__ ((__nonnull__ (1, 2))); | |
26249 | # 284 "/usr/include/gentoo-multilib/amd64/dirent.h" 3 4 | |
26250 | extern int alphasort (__const void *__e1, __const void *__e2) throw () __asm__ ("" "alphasort64") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
26251 | # 293 "/usr/include/gentoo-multilib/amd64/dirent.h" 3 4 | |
26252 | extern int alphasort64 (__const void *__e1, __const void *__e2) | |
26253 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
26254 | # 304 "/usr/include/gentoo-multilib/amd64/dirent.h" 3 4 | |
26255 | extern int versionsort (__const void *__e1, __const void *__e2) throw () __asm__ ("" "versionsort64") | |
26256 | ||
26257 | ||
26258 | __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
26259 | ||
26260 | ||
26261 | ||
26262 | ||
26263 | ||
26264 | ||
26265 | extern int versionsort64 (__const void *__e1, __const void *__e2) | |
26266 | throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
26267 | # 330 "/usr/include/gentoo-multilib/amd64/dirent.h" 3 4 | |
26268 | extern __ssize_t getdirentries (int __fd, char *__restrict __buf, size_t __nbytes, __off64_t *__restrict __basep) throw () __asm__ ("" "getdirentries64") __attribute__ ((__nonnull__ (2, 4))); | |
26269 | # 341 "/usr/include/gentoo-multilib/amd64/dirent.h" 3 4 | |
26270 | extern __ssize_t getdirentries64 (int __fd, char *__restrict __buf, | |
26271 | size_t __nbytes, | |
26272 | __off64_t *__restrict __basep) | |
26273 | throw () __attribute__ ((__nonnull__ (2, 4))); | |
26274 | ||
26275 | ||
26276 | ||
26277 | ||
26278 | } | |
26279 | # 9 "/usr/include/dirent.h" 2 3 4 | |
26280 | # 62 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/filefn.h" 2 | |
26281 | # 96 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/filefn.h" | |
26282 | # 1 "/usr/include/fcntl.h" 1 3 4 | |
26283 | ||
26284 | ||
26285 | ||
26286 | ||
26287 | ||
26288 | ||
26289 | ||
26290 | # 1 "/usr/include/gentoo-multilib/amd64/fcntl.h" 1 3 4 | |
26291 | # 27 "/usr/include/gentoo-multilib/amd64/fcntl.h" 3 4 | |
26292 | # 1 "/usr/include/features.h" 1 3 4 | |
26293 | # 28 "/usr/include/gentoo-multilib/amd64/fcntl.h" 2 3 4 | |
26294 | ||
26295 | ||
26296 | extern "C" { | |
26297 | ||
26298 | ||
26299 | ||
26300 | # 1 "/usr/include/bits/fcntl.h" 1 3 4 | |
26301 | ||
26302 | ||
26303 | ||
26304 | ||
26305 | ||
26306 | ||
26307 | ||
26308 | # 1 "/usr/include/gentoo-multilib/amd64/bits/fcntl.h" 1 3 4 | |
26309 | # 24 "/usr/include/gentoo-multilib/amd64/bits/fcntl.h" 3 4 | |
26310 | # 1 "/usr/include/sys/types.h" 1 3 4 | |
26311 | # 25 "/usr/include/gentoo-multilib/amd64/bits/fcntl.h" 2 3 4 | |
26312 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
26313 | ||
26314 | ||
26315 | ||
26316 | ||
26317 | ||
26318 | ||
26319 | ||
26320 | # 1 "/usr/include/gentoo-multilib/amd64/bits/wordsize.h" 1 3 4 | |
26321 | # 9 "/usr/include/bits/wordsize.h" 2 3 4 | |
26322 | # 26 "/usr/include/gentoo-multilib/amd64/bits/fcntl.h" 2 3 4 | |
26323 | ||
26324 | # 1 "/usr/include/bits/uio.h" 1 3 4 | |
26325 | ||
26326 | ||
26327 | ||
26328 | ||
26329 | ||
26330 | ||
26331 | ||
26332 | # 1 "/usr/include/gentoo-multilib/amd64/bits/uio.h" 1 3 4 | |
26333 | # 26 "/usr/include/gentoo-multilib/amd64/bits/uio.h" 3 4 | |
26334 | # 1 "/usr/include/sys/types.h" 1 3 4 | |
26335 | # 27 "/usr/include/gentoo-multilib/amd64/bits/uio.h" 2 3 4 | |
26336 | # 44 "/usr/include/gentoo-multilib/amd64/bits/uio.h" 3 4 | |
26337 | struct iovec | |
26338 | { | |
26339 | void *iov_base; | |
26340 | size_t iov_len; | |
26341 | }; | |
26342 | # 9 "/usr/include/bits/uio.h" 2 3 4 | |
26343 | # 28 "/usr/include/gentoo-multilib/amd64/bits/fcntl.h" 2 3 4 | |
26344 | # 155 "/usr/include/gentoo-multilib/amd64/bits/fcntl.h" 3 4 | |
26345 | struct flock | |
26346 | { | |
26347 | short int l_type; | |
26348 | short int l_whence; | |
26349 | ||
26350 | ||
26351 | ||
26352 | ||
26353 | __off64_t l_start; | |
26354 | __off64_t l_len; | |
26355 | ||
26356 | __pid_t l_pid; | |
26357 | }; | |
26358 | ||
26359 | ||
26360 | struct flock64 | |
26361 | { | |
26362 | short int l_type; | |
26363 | short int l_whence; | |
26364 | __off64_t l_start; | |
26365 | __off64_t l_len; | |
26366 | __pid_t l_pid; | |
26367 | }; | |
26368 | # 222 "/usr/include/gentoo-multilib/amd64/bits/fcntl.h" 3 4 | |
26369 | extern "C" { | |
26370 | ||
26371 | ||
26372 | ||
26373 | ||
26374 | extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) | |
26375 | throw (); | |
26376 | ||
26377 | ||
26378 | ||
26379 | extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, | |
26380 | unsigned int __flags); | |
26381 | ||
26382 | ||
26383 | ||
26384 | extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count, | |
26385 | unsigned int __flags); | |
26386 | ||
26387 | ||
26388 | extern int splice (int __fdin, __off64_t *__offin, int __fdout, | |
26389 | __off64_t *__offout, size_t __len, unsigned int __flags) | |
26390 | throw (); | |
26391 | ||
26392 | ||
26393 | extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags) | |
26394 | throw (); | |
26395 | ||
26396 | ||
26397 | ||
26398 | } | |
26399 | # 9 "/usr/include/bits/fcntl.h" 2 3 4 | |
26400 | # 35 "/usr/include/gentoo-multilib/amd64/fcntl.h" 2 3 4 | |
26401 | ||
26402 | ||
26403 | ||
26404 | # 1 "/usr/include/sys/stat.h" 1 3 4 | |
26405 | # 39 "/usr/include/gentoo-multilib/amd64/fcntl.h" 2 3 4 | |
26406 | # 76 "/usr/include/gentoo-multilib/amd64/fcntl.h" 3 4 | |
26407 | extern int fcntl (int __fd, int __cmd, ...); | |
26408 | # 88 "/usr/include/gentoo-multilib/amd64/fcntl.h" 3 4 | |
26409 | extern int open (__const char *__file, int __oflag, ...) __asm__ ("" "open64") | |
26410 | __attribute__ ((__nonnull__ (1))); | |
26411 | ||
26412 | ||
26413 | ||
26414 | ||
26415 | ||
26416 | extern int open64 (__const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1))); | |
26417 | # 113 "/usr/include/gentoo-multilib/amd64/fcntl.h" 3 4 | |
26418 | extern int openat (int __fd, __const char *__file, int __oflag, ...) __asm__ ("" "openat64") __attribute__ ((__nonnull__ (2))); | |
26419 | ||
26420 | ||
26421 | ||
26422 | ||
26423 | ||
26424 | ||
26425 | extern int openat64 (int __fd, __const char *__file, int __oflag, ...) | |
26426 | __attribute__ ((__nonnull__ (2))); | |
26427 | # 133 "/usr/include/gentoo-multilib/amd64/fcntl.h" 3 4 | |
26428 | extern int creat (__const char *__file, __mode_t __mode) __asm__ ("" "creat64") __attribute__ ((__nonnull__ (1))); | |
26429 | ||
26430 | ||
26431 | ||
26432 | ||
26433 | ||
26434 | ||
26435 | extern int creat64 (__const char *__file, __mode_t __mode) __attribute__ ((__nonnull__ (1))); | |
26436 | # 180 "/usr/include/gentoo-multilib/amd64/fcntl.h" 3 4 | |
26437 | extern int posix_fadvise (int __fd, __off64_t __offset, __off64_t __len, int __advise) throw () __asm__ ("" "posix_fadvise64"); | |
26438 | ||
26439 | ||
26440 | ||
26441 | ||
26442 | ||
26443 | ||
26444 | ||
26445 | extern int posix_fadvise64 (int __fd, __off64_t __offset, __off64_t __len, | |
26446 | int __advise) throw (); | |
26447 | # 201 "/usr/include/gentoo-multilib/amd64/fcntl.h" 3 4 | |
26448 | extern int posix_fallocate (int __fd, __off64_t __offset, __off64_t __len) __asm__ ("" "posix_fallocate64"); | |
26449 | ||
26450 | ||
26451 | ||
26452 | ||
26453 | ||
26454 | ||
26455 | ||
26456 | extern int posix_fallocate64 (int __fd, __off64_t __offset, __off64_t __len); | |
26457 | ||
26458 | ||
26459 | ||
26460 | } | |
26461 | # 9 "/usr/include/fcntl.h" 2 3 4 | |
26462 | # 97 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/filefn.h" 2 | |
26463 | # 107 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/filefn.h" | |
26464 | # 1 "/usr/include/sys/types.h" 1 3 4 | |
26465 | # 108 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/filefn.h" 2 | |
26466 | # 121 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/filefn.h" | |
26467 | enum wxSeekMode | |
26468 | { | |
26469 | wxFromStart, | |
26470 | wxFromCurrent, | |
26471 | wxFromEnd | |
26472 | }; | |
26473 | ||
26474 | enum wxFileKind | |
26475 | { | |
26476 | wxFILE_KIND_UNKNOWN, | |
26477 | wxFILE_KIND_DISK, | |
26478 | wxFILE_KIND_TERMINAL, | |
26479 | wxFILE_KIND_PIPE | |
26480 | }; | |
26481 | # 319 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/filefn.h" | |
26482 | typedef off_t wxFileOffset; | |
26483 | ||
26484 | ||
26485 | struct wxAssert_323 { unsigned int BadFileSizeType: sizeof(off_t) == sizeof(long); }; | |
26486 | # 365 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/filefn.h" | |
26487 | const int wxInvalidOffset = -1; | |
26488 | ||
26489 | ||
26490 | ||
26491 | ||
26492 | ||
26493 | bool wxFileExists(const wxString& filename); | |
26494 | ||
26495 | ||
26496 | bool wxDirExists(const wxChar *pszPathName); | |
26497 | ||
26498 | bool wxIsAbsolutePath(const wxString& filename); | |
26499 | ||
26500 | ||
26501 | wxChar* wxFileNameFromPath(wxChar *path); | |
26502 | wxString wxFileNameFromPath(const wxString& path); | |
26503 | ||
26504 | ||
26505 | wxString wxPathOnly(const wxString& path); | |
26506 | ||
26507 | ||
26508 | wxString wxRealPath(const wxString& path); | |
26509 | ||
26510 | void wxDos2UnixFilename(wxChar *s); | |
26511 | ||
26512 | void wxUnix2DosFilename(wxChar *s); | |
26513 | ||
26514 | ||
26515 | void wxStripExtension(wxChar *buffer); | |
26516 | void wxStripExtension(wxString& buffer); | |
26517 | ||
26518 | ||
26519 | wxChar* wxGetTempFileName(const wxString& prefix, wxChar *buf = (wxChar *) __null); | |
26520 | bool wxGetTempFileName(const wxString& prefix, wxString& buf); | |
26521 | ||
26522 | ||
26523 | wxChar* wxExpandPath(wxChar *dest, const wxChar *path); | |
26524 | bool wxExpandPath(wxString& dest, const wxChar *path); | |
26525 | ||
26526 | ||
26527 | ||
26528 | ||
26529 | wxChar* wxContractPath(const wxString& filename, | |
26530 | const wxString& envname = wxEmptyString, | |
26531 | const wxString& user = wxEmptyString); | |
26532 | ||
26533 | ||
26534 | wxChar* wxRealPath(wxChar *path); | |
26535 | ||
26536 | ||
26537 | wxChar* wxCopyAbsolutePath(const wxString& path); | |
26538 | ||
26539 | ||
26540 | ||
26541 | ||
26542 | ||
26543 | wxString wxFindFirstFile(const wxChar *spec, int flags = 1); | |
26544 | wxString wxFindNextFile(); | |
26545 | ||
26546 | ||
26547 | bool wxIsWild(const wxString& pattern); | |
26548 | ||
26549 | ||
26550 | ||
26551 | ||
26552 | bool wxMatchWild(const wxString& pattern, const wxString& text, bool dot_special = true); | |
26553 | ||
26554 | ||
26555 | bool wxConcatFiles(const wxString& file1, const wxString& file2, const wxString& file3); | |
26556 | ||
26557 | ||
26558 | bool wxCopyFile(const wxString& file1, const wxString& file2, | |
26559 | bool overwrite = true); | |
26560 | ||
26561 | ||
26562 | bool wxRemoveFile(const wxString& file); | |
26563 | ||
26564 | ||
26565 | bool wxRenameFile(const wxString& file1, const wxString& file2); | |
26566 | ||
26567 | ||
26568 | ||
26569 | ||
26570 | ||
26571 | ||
26572 | wxChar* wxGetWorkingDirectory(wxChar *buf = (wxChar *) __null, int sz = 1000); | |
26573 | ||
26574 | ||
26575 | wxString wxGetCwd(); | |
26576 | ||
26577 | ||
26578 | bool wxSetWorkingDirectory(const wxString& d); | |
26579 | ||
26580 | ||
26581 | bool wxMkdir(const wxString& dir, int perm = 0777); | |
26582 | ||
26583 | ||
26584 | bool wxRmdir(const wxString& dir, int flags = 0); | |
26585 | ||
26586 | ||
26587 | wxFileKind wxGetFileKind(int fd); | |
26588 | wxFileKind wxGetFileKind(FILE *fp); | |
26589 | ||
26590 | ||
26591 | ||
26592 | ||
26593 | inline bool wxPathExists(const wxChar *pszPathName) __attribute__ ((deprecated)); | |
26594 | inline bool wxPathExists(const wxChar *pszPathName) | |
26595 | { | |
26596 | return wxDirExists(pszPathName); | |
26597 | } | |
26598 | # 524 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/filefn.h" | |
26599 | inline bool wxIsPathSeparator(wxChar c) | |
26600 | { | |
26601 | ||
26602 | ||
26603 | return c == '/'; | |
26604 | ||
26605 | ||
26606 | ||
26607 | } | |
26608 | ||
26609 | ||
26610 | bool wxEndsWithPathSeparator(const wxChar *pszFileName); | |
26611 | ||
26612 | ||
26613 | ||
26614 | void wxSplitPath(const wxChar *pszFileName, | |
26615 | wxString *pstrPath, | |
26616 | wxString *pstrName, | |
26617 | wxString *pstrExt); | |
26618 | ||
26619 | ||
26620 | bool wxFindFileInPath(wxString *pStr, const wxChar *pszPath, const wxChar *pszFile); | |
26621 | ||
26622 | ||
26623 | ||
26624 | wxString wxGetOSDirectory(); | |
26625 | ||
26626 | ||
26627 | time_t wxFileModificationTime(const wxString& filename); | |
26628 | ||
26629 | ||
26630 | ||
26631 | ||
26632 | ||
26633 | ||
26634 | int wxParseCommonDialogsFilter(const wxString& wildCard, wxArrayString& descriptions, wxArrayString& filters); | |
26635 | # 568 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/filefn.h" | |
26636 | class wxUmaskChanger | |
26637 | { | |
26638 | public: | |
26639 | ||
26640 | ||
26641 | ||
26642 | wxUmaskChanger(int umaskNew) | |
26643 | { | |
26644 | m_umaskOld = umaskNew == -1 ? -1 : (int)umask((mode_t)umaskNew); | |
26645 | } | |
26646 | ||
26647 | ~wxUmaskChanger() | |
26648 | { | |
26649 | if ( m_umaskOld != -1 ) | |
26650 | umask((mode_t)m_umaskOld); | |
26651 | } | |
26652 | ||
26653 | private: | |
26654 | int m_umaskOld; | |
26655 | }; | |
26656 | # 601 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/filefn.h" | |
26657 | class wxPathList : public wxStringList | |
26658 | { | |
26659 | public: | |
26660 | ||
26661 | virtual ~wxPathList() {} | |
26662 | ||
26663 | ||
26664 | void AddEnvList(const wxString& envVariable); | |
26665 | ||
26666 | void Add(const wxString& path); | |
26667 | ||
26668 | wxString FindValidPath(const wxString& filename); | |
26669 | ||
26670 | ||
26671 | wxString FindAbsoluteValidPath(const wxString& filename); | |
26672 | ||
26673 | void EnsureFileAccessible(const wxString& path); | |
26674 | ||
26675 | bool Member(const wxString& path); | |
26676 | ||
26677 | private: | |
26678 | ||
26679 | }; | |
26680 | # 27 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/stream.h" 2 | |
26681 | ||
26682 | class wxStreamBase; | |
26683 | class wxInputStream; | |
26684 | class wxOutputStream; | |
26685 | ||
26686 | typedef wxInputStream& (*__wxInputManip)(wxInputStream&); | |
26687 | typedef wxOutputStream& (*__wxOutputManip)(wxOutputStream&); | |
26688 | ||
26689 | wxOutputStream& wxEndL(wxOutputStream& o_stream); | |
26690 | ||
26691 | ||
26692 | ||
26693 | ||
26694 | ||
26695 | enum wxStreamError | |
26696 | { | |
26697 | wxSTREAM_NO_ERROR = 0, | |
26698 | wxSTREAM_EOF, | |
26699 | wxSTREAM_WRITE_ERROR, | |
26700 | wxSTREAM_READ_ERROR | |
26701 | }; | |
26702 | # 70 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/stream.h" | |
26703 | class wxStreamBase | |
26704 | { | |
26705 | public: | |
26706 | wxStreamBase(); | |
26707 | virtual ~wxStreamBase(); | |
26708 | ||
26709 | ||
26710 | wxStreamError GetLastError() const { return m_lasterror; } | |
26711 | bool IsOk() const { return GetLastError() == wxSTREAM_NO_ERROR; } | |
26712 | bool operator!() const { return !IsOk(); } | |
26713 | ||
26714 | ||
26715 | void Reset() { m_lasterror = wxSTREAM_NO_ERROR; } | |
26716 | ||
26717 | ||
26718 | virtual size_t GetSize() const; | |
26719 | virtual wxFileOffset GetLength() const { return wxInvalidOffset; } | |
26720 | ||
26721 | ||
26722 | virtual bool IsSeekable() const { return false; } | |
26723 | # 100 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/stream.h" | |
26724 | virtual void ReservedStreamFunc1() {} | |
26725 | virtual void ReservedStreamFunc2() {} | |
26726 | virtual void ReservedStreamFunc3() {} | |
26727 | virtual void ReservedStreamFunc4() {} | |
26728 | virtual void ReservedStreamFunc5() {} | |
26729 | virtual void ReservedStreamFunc6() {} | |
26730 | virtual void ReservedStreamFunc7() {} | |
26731 | virtual void ReservedStreamFunc8() {} | |
26732 | virtual void ReservedStreamFunc9() {} | |
26733 | ||
26734 | ||
26735 | protected: | |
26736 | virtual wxFileOffset OnSysSeek(wxFileOffset seek, wxSeekMode mode); | |
26737 | virtual wxFileOffset OnSysTell() const; | |
26738 | ||
26739 | size_t m_lastcount; | |
26740 | wxStreamError m_lasterror; | |
26741 | ||
26742 | friend class wxStreamBuffer; | |
26743 | ||
26744 | private: wxStreamBase(const wxStreamBase&); wxStreamBase& operator=(const wxStreamBase&); | |
26745 | }; | |
26746 | ||
26747 | ||
26748 | ||
26749 | ||
26750 | ||
26751 | class wxInputStream : public wxStreamBase | |
26752 | { | |
26753 | public: | |
26754 | ||
26755 | wxInputStream(); | |
26756 | virtual ~wxInputStream(); | |
26757 | # 144 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/stream.h" | |
26758 | virtual char Peek(); | |
26759 | ||
26760 | ||
26761 | ||
26762 | ||
26763 | ||
26764 | char GetC(); | |
26765 | # 163 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/stream.h" | |
26766 | virtual wxInputStream& Read(void *buffer, size_t size); | |
26767 | ||
26768 | ||
26769 | ||
26770 | wxInputStream& Read(wxOutputStream& streamOut); | |
26771 | # 178 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/stream.h" | |
26772 | virtual size_t LastRead() const { return wxStreamBase::m_lastcount; } | |
26773 | ||
26774 | ||
26775 | ||
26776 | virtual bool CanRead() const; | |
26777 | ||
26778 | ||
26779 | ||
26780 | ||
26781 | ||
26782 | virtual bool Eof() const; | |
26783 | # 198 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/stream.h" | |
26784 | size_t Ungetch(const void *buffer, size_t size); | |
26785 | ||
26786 | ||
26787 | ||
26788 | ||
26789 | bool Ungetch(char c); | |
26790 | # 213 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/stream.h" | |
26791 | virtual wxFileOffset SeekI(wxFileOffset pos, wxSeekMode mode = wxFromStart); | |
26792 | ||
26793 | ||
26794 | virtual wxFileOffset TellI() const; | |
26795 | ||
26796 | ||
26797 | ||
26798 | ||
26799 | ||
26800 | wxInputStream& operator>>(wxOutputStream& out) { return Read(out); } | |
26801 | wxInputStream& operator>>(__wxInputManip func) { return func(*this); } | |
26802 | ||
26803 | protected: | |
26804 | ||
26805 | ||
26806 | ||
26807 | ||
26808 | ||
26809 | virtual size_t OnSysRead(void *buffer, size_t size) = 0; | |
26810 | ||
26811 | ||
26812 | ||
26813 | ||
26814 | ||
26815 | char *AllocSpaceWBack(size_t sizeNeeded); | |
26816 | ||
26817 | ||
26818 | ||
26819 | size_t GetWBack(void *buf, size_t size); | |
26820 | ||
26821 | ||
26822 | char *m_wback; | |
26823 | ||
26824 | ||
26825 | size_t m_wbacksize; | |
26826 | ||
26827 | ||
26828 | size_t m_wbackcur; | |
26829 | ||
26830 | friend class wxStreamBuffer; | |
26831 | ||
26832 | private: wxInputStream(const wxInputStream&); wxInputStream& operator=(const wxInputStream&); | |
26833 | }; | |
26834 | ||
26835 | ||
26836 | ||
26837 | ||
26838 | ||
26839 | class wxOutputStream : public wxStreamBase | |
26840 | { | |
26841 | public: | |
26842 | wxOutputStream(); | |
26843 | virtual ~wxOutputStream(); | |
26844 | ||
26845 | void PutC(char c); | |
26846 | virtual wxOutputStream& Write(const void *buffer, size_t size); | |
26847 | wxOutputStream& Write(wxInputStream& stream_in); | |
26848 | ||
26849 | virtual wxFileOffset SeekO(wxFileOffset pos, wxSeekMode mode = wxFromStart); | |
26850 | virtual wxFileOffset TellO() const; | |
26851 | ||
26852 | virtual size_t LastWrite() const { return wxStreamBase::m_lastcount; } | |
26853 | ||
26854 | virtual void Sync(); | |
26855 | virtual bool Close() { return true; } | |
26856 | ||
26857 | wxOutputStream& operator<<(wxInputStream& out) { return Write(out); } | |
26858 | wxOutputStream& operator<<( __wxOutputManip func) { return func(*this); } | |
26859 | ||
26860 | protected: | |
26861 | ||
26862 | ||
26863 | virtual size_t OnSysWrite(const void *buffer, size_t bufsize); | |
26864 | ||
26865 | friend class wxStreamBuffer; | |
26866 | ||
26867 | private: wxOutputStream(const wxOutputStream&); wxOutputStream& operator=(const wxOutputStream&); | |
26868 | }; | |
26869 | # 300 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/stream.h" | |
26870 | class wxCountingOutputStream : public wxOutputStream | |
26871 | { | |
26872 | public: | |
26873 | wxCountingOutputStream(); | |
26874 | ||
26875 | wxFileOffset GetLength() const; | |
26876 | bool Ok() const { return true; } | |
26877 | ||
26878 | protected: | |
26879 | virtual size_t OnSysWrite(const void *buffer, size_t size); | |
26880 | virtual wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); | |
26881 | virtual wxFileOffset OnSysTell() const; | |
26882 | ||
26883 | size_t m_currentPos; | |
26884 | ||
26885 | private: wxCountingOutputStream(const wxCountingOutputStream&); wxCountingOutputStream& operator=(const wxCountingOutputStream&); | |
26886 | }; | |
26887 | ||
26888 | ||
26889 | ||
26890 | ||
26891 | ||
26892 | class wxFilterInputStream : public wxInputStream | |
26893 | { | |
26894 | public: | |
26895 | wxFilterInputStream(); | |
26896 | wxFilterInputStream(wxInputStream& stream); | |
26897 | virtual ~wxFilterInputStream(); | |
26898 | ||
26899 | char Peek() { return m_parent_i_stream->Peek(); } | |
26900 | ||
26901 | wxFileOffset GetLength() const { return m_parent_i_stream->GetLength(); } | |
26902 | ||
26903 | wxInputStream *GetFilterInputStream() const { return m_parent_i_stream; } | |
26904 | ||
26905 | protected: | |
26906 | wxInputStream *m_parent_i_stream; | |
26907 | ||
26908 | private: wxFilterInputStream(const wxFilterInputStream&); wxFilterInputStream& operator=(const wxFilterInputStream&); | |
26909 | }; | |
26910 | ||
26911 | class wxFilterOutputStream : public wxOutputStream | |
26912 | { | |
26913 | public: | |
26914 | wxFilterOutputStream(); | |
26915 | wxFilterOutputStream(wxOutputStream& stream); | |
26916 | virtual ~wxFilterOutputStream(); | |
26917 | ||
26918 | wxFileOffset GetLength() const { return m_parent_o_stream->GetLength(); } | |
26919 | ||
26920 | wxOutputStream *GetFilterOutputStream() const { return m_parent_o_stream; } | |
26921 | ||
26922 | protected: | |
26923 | wxOutputStream *m_parent_o_stream; | |
26924 | ||
26925 | private: wxFilterOutputStream(const wxFilterOutputStream&); wxFilterOutputStream& operator=(const wxFilterOutputStream&); | |
26926 | }; | |
26927 | # 367 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/stream.h" | |
26928 | class wxStreamBuffer | |
26929 | { | |
26930 | public: | |
26931 | enum BufMode | |
26932 | { | |
26933 | read, | |
26934 | write, | |
26935 | read_write | |
26936 | }; | |
26937 | ||
26938 | wxStreamBuffer(wxStreamBase& stream, BufMode mode); | |
26939 | wxStreamBuffer(const wxStreamBuffer& buf); | |
26940 | virtual ~wxStreamBuffer(); | |
26941 | ||
26942 | ||
26943 | virtual size_t Read(void *buffer, size_t size); | |
26944 | size_t Read(wxStreamBuffer *buf); | |
26945 | virtual size_t Write(const void *buffer, size_t size); | |
26946 | size_t Write(wxStreamBuffer *buf); | |
26947 | ||
26948 | virtual char Peek(); | |
26949 | virtual char GetChar(); | |
26950 | virtual void PutChar(char c); | |
26951 | virtual wxFileOffset Tell() const; | |
26952 | virtual wxFileOffset Seek(wxFileOffset pos, wxSeekMode mode); | |
26953 | ||
26954 | ||
26955 | void ResetBuffer(); | |
26956 | ||
26957 | ||
26958 | ||
26959 | void SetBufferIO(void *start, void *end, bool takeOwnership = false); | |
26960 | void SetBufferIO(void *start, size_t len, bool takeOwnership = false); | |
26961 | void SetBufferIO(size_t bufsize); | |
26962 | void *GetBufferStart() const { return m_buffer_start; } | |
26963 | void *GetBufferEnd() const { return m_buffer_end; } | |
26964 | void *GetBufferPos() const { return m_buffer_pos; } | |
26965 | size_t GetBufferSize() const { return m_buffer_size; } | |
26966 | size_t GetIntPosition() const { return m_buffer_pos - m_buffer_start; } | |
26967 | void SetIntPosition(size_t pos) { m_buffer_pos = m_buffer_start + pos; } | |
26968 | size_t GetLastAccess() const { return m_buffer_end - m_buffer_start; } | |
26969 | size_t GetBytesLeft() const { return m_buffer_end - m_buffer_pos; } | |
26970 | ||
26971 | void Fixed(bool fixed) { m_fixed = fixed; } | |
26972 | void Flushable(bool f) { m_flushable = f; } | |
26973 | ||
26974 | bool FlushBuffer(); | |
26975 | bool FillBuffer(); | |
26976 | size_t GetDataLeft(); | |
26977 | ||
26978 | ||
26979 | wxStreamBase *GetStream() const { return m_stream; } | |
26980 | bool HasBuffer() const { return m_buffer_size != 0; } | |
26981 | ||
26982 | bool IsFixed() const { return m_fixed; } | |
26983 | bool IsFlushable() const { return m_flushable; } | |
26984 | ||
26985 | ||
26986 | wxInputStream *GetInputStream() const; | |
26987 | wxOutputStream *GetOutputStream() const; | |
26988 | ||
26989 | ||
26990 | wxStreamBase *Stream() { return m_stream; } | |
26991 | ||
26992 | ||
26993 | ||
26994 | wxStreamBuffer(BufMode mode); | |
26995 | ||
26996 | protected: | |
26997 | void GetFromBuffer(void *buffer, size_t size); | |
26998 | void PutToBuffer(const void *buffer, size_t size); | |
26999 | ||
27000 | ||
27001 | void SetError(wxStreamError err); | |
27002 | ||
27003 | ||
27004 | void Init(); | |
27005 | ||
27006 | ||
27007 | void InitBuffer(); | |
27008 | ||
27009 | ||
27010 | void FreeBuffer(); | |
27011 | ||
27012 | ||
27013 | ||
27014 | char *m_buffer_start, | |
27015 | *m_buffer_end, | |
27016 | *m_buffer_pos; | |
27017 | ||
27018 | ||
27019 | ||
27020 | size_t m_buffer_size; | |
27021 | ||
27022 | ||
27023 | wxStreamBase *m_stream; | |
27024 | ||
27025 | ||
27026 | BufMode m_mode; | |
27027 | ||
27028 | ||
27029 | bool m_destroybuf, | |
27030 | m_fixed, | |
27031 | m_flushable; | |
27032 | ||
27033 | private: | |
27034 | ||
27035 | ||
27036 | ||
27037 | ||
27038 | ||
27039 | wxStreamBuffer& operator=(const wxStreamBuffer&); | |
27040 | }; | |
27041 | ||
27042 | ||
27043 | ||
27044 | ||
27045 | ||
27046 | class wxBufferedInputStream : public wxFilterInputStream | |
27047 | { | |
27048 | public: | |
27049 | ||
27050 | wxBufferedInputStream(wxInputStream& stream, | |
27051 | wxStreamBuffer *buffer = __null); | |
27052 | virtual ~wxBufferedInputStream(); | |
27053 | ||
27054 | char Peek(); | |
27055 | wxInputStream& Read(void *buffer, size_t size); | |
27056 | ||
27057 | ||
27058 | wxFileOffset SeekI(wxFileOffset pos, wxSeekMode mode = wxFromStart); | |
27059 | wxFileOffset TellI() const; | |
27060 | bool IsSeekable() const { return m_parent_i_stream->IsSeekable(); } | |
27061 | ||
27062 | ||
27063 | void SetInputStreamBuffer(wxStreamBuffer *buffer); | |
27064 | wxStreamBuffer *GetInputStreamBuffer() const { return m_i_streambuf; } | |
27065 | ||
27066 | ||
27067 | wxStreamBuffer *InputStreamBuffer() const { return m_i_streambuf; } | |
27068 | ||
27069 | protected: | |
27070 | virtual size_t OnSysRead(void *buffer, size_t bufsize); | |
27071 | virtual wxFileOffset OnSysSeek(wxFileOffset seek, wxSeekMode mode); | |
27072 | virtual wxFileOffset OnSysTell() const; | |
27073 | ||
27074 | wxStreamBuffer *m_i_streambuf; | |
27075 | ||
27076 | private: wxBufferedInputStream(const wxBufferedInputStream&); wxBufferedInputStream& operator=(const wxBufferedInputStream&); | |
27077 | }; | |
27078 | ||
27079 | ||
27080 | ||
27081 | ||
27082 | ||
27083 | class wxBufferedOutputStream : public wxFilterOutputStream | |
27084 | { | |
27085 | public: | |
27086 | ||
27087 | wxBufferedOutputStream(wxOutputStream& stream, | |
27088 | wxStreamBuffer *buffer = __null); | |
27089 | virtual ~wxBufferedOutputStream(); | |
27090 | ||
27091 | wxOutputStream& Write(const void *buffer, size_t size); | |
27092 | ||
27093 | ||
27094 | wxFileOffset SeekO(wxFileOffset pos, wxSeekMode mode = wxFromStart); | |
27095 | wxFileOffset TellO() const; | |
27096 | bool IsSeekable() const { return m_parent_o_stream->IsSeekable(); } | |
27097 | ||
27098 | void Sync(); | |
27099 | bool Close(); | |
27100 | ||
27101 | wxFileOffset GetLength() const; | |
27102 | ||
27103 | ||
27104 | void SetOutputStreamBuffer(wxStreamBuffer *buffer); | |
27105 | wxStreamBuffer *GetOutputStreamBuffer() const { return m_o_streambuf; } | |
27106 | ||
27107 | ||
27108 | wxStreamBuffer *OutputStreamBuffer() const { return m_o_streambuf; } | |
27109 | ||
27110 | protected: | |
27111 | virtual size_t OnSysWrite(const void *buffer, size_t bufsize); | |
27112 | virtual wxFileOffset OnSysSeek(wxFileOffset seek, wxSeekMode mode); | |
27113 | virtual wxFileOffset OnSysTell() const; | |
27114 | ||
27115 | wxStreamBuffer *m_o_streambuf; | |
27116 | ||
27117 | private: wxBufferedOutputStream(const wxBufferedOutputStream&); wxBufferedOutputStream& operator=(const wxBufferedOutputStream&); | |
27118 | }; | |
27119 | # 25 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/image.h" 2 | |
27120 | # 43 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/image.h" | |
27121 | enum | |
27122 | { | |
27123 | wxIMAGE_RESOLUTION_INCHES = 1, | |
27124 | wxIMAGE_RESOLUTION_CM = 2 | |
27125 | }; | |
27126 | ||
27127 | ||
27128 | ||
27129 | ||
27130 | const unsigned char wxIMAGE_ALPHA_TRANSPARENT = 0; | |
27131 | const unsigned char wxIMAGE_ALPHA_THRESHOLD = 0x80; | |
27132 | const unsigned char wxIMAGE_ALPHA_OPAQUE = 0xff; | |
27133 | ||
27134 | ||
27135 | ||
27136 | ||
27137 | ||
27138 | class wxImageHandler; | |
27139 | class wxImage; | |
27140 | class wxPalette; | |
27141 | ||
27142 | ||
27143 | ||
27144 | ||
27145 | ||
27146 | class wxImageHandler: public wxObject | |
27147 | { | |
27148 | public: | |
27149 | wxImageHandler() | |
27150 | : m_name(wxEmptyString), m_extension(wxEmptyString), m_mime(), m_type(0) | |
27151 | { } | |
27152 | ||
27153 | ||
27154 | virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); | |
27155 | virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); | |
27156 | ||
27157 | virtual int GetImageCount( wxInputStream& stream ); | |
27158 | ||
27159 | bool CanRead( wxInputStream& stream ) { return CallDoCanRead(stream); } | |
27160 | bool CanRead( const wxString& name ); | |
27161 | ||
27162 | ||
27163 | void SetName(const wxString& name) { m_name = name; } | |
27164 | void SetExtension(const wxString& ext) { m_extension = ext; } | |
27165 | void SetType(long type) { m_type = type; } | |
27166 | void SetMimeType(const wxString& type) { m_mime = type; } | |
27167 | wxString GetName() const { return m_name; } | |
27168 | wxString GetExtension() const { return m_extension; } | |
27169 | long GetType() const { return m_type; } | |
27170 | wxString GetMimeType() const { return m_mime; } | |
27171 | ||
27172 | protected: | |
27173 | ||
27174 | virtual bool DoCanRead( wxInputStream& stream ) = 0; | |
27175 | ||
27176 | ||
27177 | bool CallDoCanRead(wxInputStream& stream); | |
27178 | ||
27179 | ||
27180 | wxString m_name; | |
27181 | wxString m_extension; | |
27182 | wxString m_mime; | |
27183 | long m_type; | |
27184 | ||
27185 | private: | |
27186 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
27187 | }; | |
27188 | ||
27189 | ||
27190 | ||
27191 | ||
27192 | ||
27193 | class wxImageHistogramEntry | |
27194 | { | |
27195 | public: | |
27196 | wxImageHistogramEntry() { index = value = 0; } | |
27197 | unsigned long index; | |
27198 | unsigned long value; | |
27199 | }; | |
27200 | ||
27201 | class wxImageHistogramBase_wxImplementation_Pair { public: typedef unsigned long t1; typedef wxImageHistogramEntry t2; typedef const unsigned long const_t1; typedef const wxImageHistogramEntry const_t2; wxImageHistogramBase_wxImplementation_Pair( const const_t1& f, const const_t2& s ):first(t1(f)),second(t2(s)) {} t1 first; t2 second; }; class wxImageHistogramBase_wxImplementation_KeyEx { typedef unsigned long key_type; typedef wxImageHistogramBase_wxImplementation_Pair pair_type; typedef const key_type const_key_type; typedef const pair_type const_pair_type; typedef const_key_type& const_key_reference; typedef const_pair_type& const_pair_reference; public: wxImageHistogramBase_wxImplementation_KeyEx() { } const_key_reference operator()( const_pair_reference pair ) const { return pair.first; } wxImageHistogramBase_wxImplementation_KeyEx& operator=(const wxImageHistogramBase_wxImplementation_KeyEx&) { return *this; } }; class wxImageHistogramBase_wxImplementation_HashTable : protected _wxHashTableBase2 { public: typedef unsigned long key_type; typedef wxImageHistogramBase_wxImplementation_Pair value_type; typedef wxIntegerHash hasher; typedef wxIntegerEqual key_equal; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type& reference; typedef const value_type& const_reference; typedef const unsigned long const_key_type; typedef const wxImageHistogramBase_wxImplementation_Pair const_mapped_type; public: struct Node; typedef wxImageHistogramBase_wxImplementation_KeyEx key_extractor; typedef wxImageHistogramBase_wxImplementation_HashTable Self; protected: Node** m_table; size_t m_tableBuckets; size_t m_items; hasher m_hasher; key_equal m_equals; key_extractor m_getKey; public: struct Node:public _wxHashTable_NodeBase { public: Node( const value_type& value ) : m_value( value ) {} Node* m_next() { return (Node*)this->m_nxt; } value_type m_value; }; class Iterator; friend class Iterator; protected: static void DeleteNode( _wxHashTable_NodeBase* node ) { delete (Node*)node; } public: class Iterator { public: Node* m_node; Self* m_ht; Iterator() : m_node(0), m_ht(0) {} Iterator( Node* node, const Self* ht ) : m_node(node), m_ht((Self*)ht) {} bool operator ==( const Iterator& it ) const { return m_node == it.m_node; } bool operator !=( const Iterator& it ) const { return m_node != it.m_node; } protected: Node* GetNextNode() { size_type bucket = GetBucketForNode(m_ht,m_node); for( size_type i = bucket + 1; i < m_ht->m_tableBuckets; ++i ) { if( m_ht->m_table[i] ) return m_ht->m_table[i]; } return 0; } void PlusPlus() { Node* next = m_node->m_next(); m_node = next ? next : GetNextNode(); } }; public: class iterator : public Iterator { public: iterator() : Iterator() {} iterator( Node* node, Self* ht ) : Iterator( node, ht ) {} iterator& operator++() { PlusPlus(); return *this; } iterator operator++(int) { iterator it=*this;PlusPlus();return it; } reference operator *() const { return m_node->m_value; } pointer operator ->() const { return &(m_node->m_value); } }; class const_iterator : public Iterator { public: const_iterator() : Iterator() {} const_iterator( Node* node, const Self* ht ) : Iterator( node, (Self*)ht ) {} const_iterator& operator++() { PlusPlus();return *this; } const_iterator operator++(int) { const_iterator it=*this;PlusPlus();return it; } const_reference operator *() const { return m_node->m_value; } const_pointer operator ->() const { return &(m_node->m_value); } }; wxImageHistogramBase_wxImplementation_HashTable( size_type sz = 10, const hasher& hfun = hasher(), const key_equal& k_eq = key_equal(), const key_extractor& k_ex = key_extractor() ) : m_tableBuckets( GetNextPrime( (unsigned long) sz ) ), m_items( 0 ), m_hasher( hfun ), m_equals( k_eq ), m_getKey( k_ex ) { m_table = (Node**)AllocTable( m_tableBuckets ); } wxImageHistogramBase_wxImplementation_HashTable( const Self& ht ) : m_table( 0 ), m_tableBuckets( 0 ), m_items( ht.m_items ), m_hasher( ht.m_hasher ), m_equals( ht.m_equals ), m_getKey( ht.m_getKey ) { HashCopy( ht ); } const Self& operator=( const Self& ht ) { clear(); m_hasher = ht.m_hasher; m_equals = ht.m_equals; m_getKey = ht.m_getKey; m_items = ht.m_items; HashCopy( ht ); return *this; } ~wxImageHistogramBase_wxImplementation_HashTable() { clear(); FreeTable(m_table); } hasher hash_funct() { return m_hasher; } key_equal key_eq() { return m_equals; } void clear() { DeleteNodes( m_tableBuckets, (_wxHashTable_NodeBase**)m_table, DeleteNode ); m_items = 0; } size_type size() const { return m_items; } size_type max_size() const { return size_type(-1); } bool empty() const { return size() == 0; } const_iterator end() const { return const_iterator( 0, this ); } iterator end() { return iterator( 0, this ); } const_iterator begin() const { return const_iterator( (Node*)GetFirstNode( m_tableBuckets, (_wxHashTable_NodeBase**)m_table ), this ); }; iterator begin() { return iterator( (Node*)GetFirstNode( m_tableBuckets, (_wxHashTable_NodeBase**)m_table ), this ); }; size_type erase( const const_key_type& key ) { Node** node = GetNodePtr( key ); if( !node ) return 0; --m_items; Node* temp = (*node)->m_next(); delete *node; (*node) = temp; if( never_shrink( m_tableBuckets, m_items ) ) ResizeTable( GetPreviousPrime( (unsigned long) m_tableBuckets ) - 1 ); return 1; } protected: static size_type GetBucketForNode( Self* ht, Node* node ) { return ht->m_hasher( ht->m_getKey( node->m_value ) ) % ht->m_tableBuckets; } static Node* CopyNode( Node* node ) { return new Node( *node ); } Node* GetOrCreateNode( const value_type& value, bool& created ) { const const_key_type& key = m_getKey( value ); size_t bucket = m_hasher( key ) % m_tableBuckets; Node* node = m_table[bucket]; while( node ) { if( m_equals( m_getKey( node->m_value ), key ) ) { created = false; return node; } node = node->m_next(); } created = true; return CreateNode( value, bucket); } Node * CreateNode( const value_type& value, size_t bucket ) { Node* node = new Node( value ); node->m_nxt = m_table[bucket]; m_table[bucket] = node; ++m_items; if( grow_lf70( m_tableBuckets, m_items ) ) ResizeTable( m_tableBuckets ); return node; } void CreateNode( const value_type& value ) { CreateNode(value, m_hasher( m_getKey(value) ) % m_tableBuckets ); } Node** GetNodePtr( const const_key_type& key ) const { size_t bucket = m_hasher( key ) % m_tableBuckets; Node** node = &m_table[bucket]; while( *node ) { if( m_equals( m_getKey( (*node)->m_value ), key ) ) return node; node = (Node**)&(*node)->m_nxt; } return 0; } Node* GetNode( const const_key_type& key ) const { size_t bucket = m_hasher( key ) % m_tableBuckets; Node* node = m_table[bucket]; while( node ) { if( m_equals( m_getKey( node->m_value ), key ) ) return node; node = node->m_next(); } return 0; } void ResizeTable( size_t newSize ) { newSize = GetNextPrime( (unsigned long)newSize ); Node** srcTable = m_table; size_t srcBuckets = m_tableBuckets; m_table = (Node**)AllocTable( newSize ); m_tableBuckets = newSize; CopyHashTable( (_wxHashTable_NodeBase**)srcTable, srcBuckets, this, (_wxHashTable_NodeBase**)m_table, (BucketFromNode)GetBucketForNode, (ProcessNode)&DummyProcessNode ); FreeTable(srcTable); } void HashCopy( const Self& ht ) { ResizeTable( ht.size() ); CopyHashTable( (_wxHashTable_NodeBase**)ht.m_table, ht.m_tableBuckets, (_wxHashTableBase2*)this, (_wxHashTable_NodeBase**)m_table, (BucketFromNode)GetBucketForNode, (ProcessNode)CopyNode ); } }; class wxImageHistogramBase:public wxImageHistogramBase_wxImplementation_HashTable { public: typedef wxImageHistogramEntry mapped_type; class Insert_Result { public: typedef iterator t1; typedef bool t2; typedef const iterator const_t1; typedef const bool const_t2; Insert_Result( const const_t1& f, const const_t2& s ):first(t1(f)),second(t2(s)) {} t1 first; t2 second; }; explicit wxImageHistogramBase( size_type hint = 100, hasher hf = hasher(), key_equal eq = key_equal() ) : wxImageHistogramBase_wxImplementation_HashTable( hint, hf, eq, wxImageHistogramBase_wxImplementation_KeyEx() ) {} mapped_type& operator[]( const const_key_type& key ) { bool created; return GetOrCreateNode( wxImageHistogramBase_wxImplementation_Pair( key, mapped_type() ), created)->m_value.second; } const_iterator find( const const_key_type& key ) const { return const_iterator( GetNode( key ), this ); } iterator find( const const_key_type& key ) { return iterator( GetNode( key ), this ); } Insert_Result insert( const value_type& v ) { bool created; Node *node = GetOrCreateNode( wxImageHistogramBase_wxImplementation_Pair( v.first, v.second ), created); if ( !created ) node->m_value.second = v.second; return Insert_Result(iterator(node, this), created); } size_type erase( const key_type& k ) { return wxImageHistogramBase_wxImplementation_HashTable::erase( k ); } void erase( const iterator& it ) { erase( it->first ); } void erase( const const_iterator& it ) { erase( it->first ); } size_type count( const const_key_type& key ) { return GetNode( key ) ? 1 : 0; } }; | |
27202 | ||
27203 | ||
27204 | ||
27205 | class wxImageHistogram : public wxImageHistogramBase | |
27206 | { | |
27207 | public: | |
27208 | wxImageHistogram() : wxImageHistogramBase(256) { } | |
27209 | ||
27210 | ||
27211 | static unsigned long MakeKey(unsigned char r, | |
27212 | unsigned char g, | |
27213 | unsigned char b) | |
27214 | { | |
27215 | return (r << 16) | (g << 8) | b; | |
27216 | } | |
27217 | ||
27218 | ||
27219 | ||
27220 | ||
27221 | ||
27222 | ||
27223 | bool FindFirstUnusedColour(unsigned char *r, | |
27224 | unsigned char *g, | |
27225 | unsigned char *b, | |
27226 | unsigned char startR = 1, | |
27227 | unsigned char startG = 0, | |
27228 | unsigned char startB = 0 ) const; | |
27229 | }; | |
27230 | ||
27231 | ||
27232 | ||
27233 | ||
27234 | ||
27235 | class wxImage: public wxObject | |
27236 | { | |
27237 | public: | |
27238 | ||
27239 | ||
27240 | ||
27241 | class RGBValue | |
27242 | { | |
27243 | public: | |
27244 | RGBValue(unsigned char r=0, unsigned char g=0, unsigned char b=0) | |
27245 | : red(r), green(g), blue(b) {} | |
27246 | unsigned char red; | |
27247 | unsigned char green; | |
27248 | unsigned char blue; | |
27249 | }; | |
27250 | ||
27251 | ||
27252 | class HSVValue | |
27253 | { | |
27254 | public: | |
27255 | HSVValue(double h=0.0, double s=0.0, double v=0.0) | |
27256 | : hue(h), saturation(s), value(v) {} | |
27257 | double hue; | |
27258 | double saturation; | |
27259 | double value; | |
27260 | }; | |
27261 | ||
27262 | ||
27263 | wxImage(){} | |
27264 | wxImage( int width, int height, bool clear = true ); | |
27265 | wxImage( int width, int height, unsigned char* data, bool static_data = false ); | |
27266 | wxImage( int width, int height, unsigned char* data, unsigned char* alpha, bool static_data = false ); | |
27267 | wxImage( const wxString& name, long type = wxBITMAP_TYPE_ANY, int index = -1 ); | |
27268 | wxImage( const wxString& name, const wxString& mimetype, int index = -1 ); | |
27269 | wxImage( const char** xpmData ); | |
27270 | wxImage( char** xpmData ); | |
27271 | ||
27272 | ||
27273 | wxImage( wxInputStream& stream, long type = wxBITMAP_TYPE_ANY, int index = -1 ); | |
27274 | wxImage( wxInputStream& stream, const wxString& mimetype, int index = -1 ); | |
27275 | ||
27276 | ||
27277 | wxImage( const wxImage& image ); | |
27278 | wxImage( const wxImage* image ); | |
27279 | ||
27280 | bool Create( int width, int height, bool clear = true ); | |
27281 | bool Create( int width, int height, unsigned char* data, bool static_data = false ); | |
27282 | bool Create( int width, int height, unsigned char* data, unsigned char* alpha, bool static_data = false ); | |
27283 | bool Create( const char** xpmData ); | |
27284 | void Destroy(); | |
27285 | ||
27286 | ||
27287 | ||
27288 | wxImage Copy() const; | |
27289 | ||
27290 | ||
27291 | wxImage GetSubImage( const wxRect& rect) const; | |
27292 | ||
27293 | ||
27294 | ||
27295 | ||
27296 | ||
27297 | wxImage Size( const wxSize& size, const wxPoint& pos, | |
27298 | int r = -1, int g = -1, int b = -1 ) const; | |
27299 | ||
27300 | ||
27301 | ||
27302 | void Paste( const wxImage &image, int x, int y ); | |
27303 | ||
27304 | ||
27305 | wxImage Scale( int width, int height ) const; | |
27306 | ||
27307 | wxImage ShrinkBy( int xFactor , int yFactor ) const ; | |
27308 | ||
27309 | ||
27310 | wxImage& Rescale( int width, int height ) { return *this = Scale(width, height); } | |
27311 | ||
27312 | ||
27313 | wxImage& Resize( const wxSize& size, const wxPoint& pos, | |
27314 | int r = -1, int g = -1, int b = -1 ) { return *this = Size(size, pos, r, g, b); } | |
27315 | ||
27316 | ||
27317 | ||
27318 | wxImage Rotate(double angle, const wxPoint & centre_of_rotation, | |
27319 | bool interpolating = true, wxPoint * offset_after_rotation = (wxPoint*) __null) const; | |
27320 | ||
27321 | wxImage Rotate90( bool clockwise = true ) const; | |
27322 | wxImage Mirror( bool horizontally = true ) const; | |
27323 | ||
27324 | ||
27325 | void Replace( unsigned char r1, unsigned char g1, unsigned char b1, | |
27326 | unsigned char r2, unsigned char g2, unsigned char b2 ); | |
27327 | ||
27328 | ||
27329 | ||
27330 | wxImage ConvertToMono( unsigned char r, unsigned char g, unsigned char b ) const; | |
27331 | ||
27332 | ||
27333 | void SetRGB( int x, int y, unsigned char r, unsigned char g, unsigned char b ); | |
27334 | void SetRGB( const wxRect& rect, unsigned char r, unsigned char g, unsigned char b ); | |
27335 | unsigned char GetRed( int x, int y ) const; | |
27336 | unsigned char GetGreen( int x, int y ) const; | |
27337 | unsigned char GetBlue( int x, int y ) const; | |
27338 | ||
27339 | void SetAlpha(int x, int y, unsigned char alpha); | |
27340 | unsigned char GetAlpha(int x, int y) const; | |
27341 | ||
27342 | ||
27343 | ||
27344 | bool FindFirstUnusedColour( unsigned char *r, unsigned char *g, unsigned char *b, | |
27345 | unsigned char startR = 1, unsigned char startG = 0, | |
27346 | unsigned char startB = 0 ) const; | |
27347 | ||
27348 | bool SetMaskFromImage(const wxImage & mask, | |
27349 | unsigned char mr, unsigned char mg, unsigned char mb); | |
27350 | ||
27351 | ||
27352 | ||
27353 | bool ConvertAlphaToMask(unsigned char threshold = wxIMAGE_ALPHA_THRESHOLD); | |
27354 | # 287 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/image.h" | |
27355 | bool ConvertColourToAlpha( unsigned char r, unsigned char g, unsigned char b ); | |
27356 | ||
27357 | static bool CanRead( const wxString& name ); | |
27358 | static int GetImageCount( const wxString& name, long type = wxBITMAP_TYPE_ANY ); | |
27359 | virtual bool LoadFile( const wxString& name, long type = wxBITMAP_TYPE_ANY, int index = -1 ); | |
27360 | virtual bool LoadFile( const wxString& name, const wxString& mimetype, int index = -1 ); | |
27361 | ||
27362 | ||
27363 | static bool CanRead( wxInputStream& stream ); | |
27364 | static int GetImageCount( wxInputStream& stream, long type = wxBITMAP_TYPE_ANY ); | |
27365 | virtual bool LoadFile( wxInputStream& stream, long type = wxBITMAP_TYPE_ANY, int index = -1 ); | |
27366 | virtual bool LoadFile( wxInputStream& stream, const wxString& mimetype, int index = -1 ); | |
27367 | ||
27368 | ||
27369 | virtual bool SaveFile( const wxString& name ) const; | |
27370 | virtual bool SaveFile( const wxString& name, int type ) const; | |
27371 | virtual bool SaveFile( const wxString& name, const wxString& mimetype ) const; | |
27372 | ||
27373 | ||
27374 | virtual bool SaveFile( wxOutputStream& stream, int type ) const; | |
27375 | virtual bool SaveFile( wxOutputStream& stream, const wxString& mimetype ) const; | |
27376 | ||
27377 | ||
27378 | bool Ok() const; | |
27379 | int GetWidth() const; | |
27380 | int GetHeight() const; | |
27381 | ||
27382 | ||
27383 | ||
27384 | unsigned char *GetData() const; | |
27385 | void SetData( unsigned char *data, bool static_data=false ); | |
27386 | void SetData( unsigned char *data, int new_width, int new_height, bool static_data=false ); | |
27387 | ||
27388 | unsigned char *GetAlpha() const; | |
27389 | bool HasAlpha() const { return GetAlpha() != __null; } | |
27390 | void SetAlpha(unsigned char *alpha = __null, bool static_data=false); | |
27391 | void InitAlpha(); | |
27392 | ||
27393 | ||
27394 | ||
27395 | bool IsTransparent(int x, int y, | |
27396 | unsigned char threshold = wxIMAGE_ALPHA_THRESHOLD) const; | |
27397 | ||
27398 | ||
27399 | void SetMaskColour( unsigned char r, unsigned char g, unsigned char b ); | |
27400 | ||
27401 | ||
27402 | bool GetOrFindMaskColour( unsigned char *r, unsigned char *g, unsigned char *b ) const; | |
27403 | unsigned char GetMaskRed() const; | |
27404 | unsigned char GetMaskGreen() const; | |
27405 | unsigned char GetMaskBlue() const; | |
27406 | void SetMask( bool mask = true ); | |
27407 | bool HasMask() const; | |
27408 | ||
27409 | ||
27410 | ||
27411 | bool HasPalette() const; | |
27412 | const wxPalette& GetPalette() const; | |
27413 | void SetPalette(const wxPalette& palette); | |
27414 | ||
27415 | ||
27416 | ||
27417 | void SetOption(const wxString& name, const wxString& value); | |
27418 | void SetOption(const wxString& name, int value); | |
27419 | wxString GetOption(const wxString& name) const; | |
27420 | int GetOptionInt(const wxString& name) const; | |
27421 | bool HasOption(const wxString& name) const; | |
27422 | ||
27423 | unsigned long CountColours( unsigned long stopafter = (unsigned long) -1 ) const; | |
27424 | ||
27425 | ||
27426 | ||
27427 | ||
27428 | ||
27429 | ||
27430 | ||
27431 | unsigned long ComputeHistogram( wxImageHistogram &h ) const; | |
27432 | ||
27433 | ||
27434 | ||
27435 | ||
27436 | void RotateHue(double angle); | |
27437 | ||
27438 | ||
27439 | wxImage& operator = (const wxImage& image) | |
27440 | { | |
27441 | if ( (*this) != image ) | |
27442 | Ref(image); | |
27443 | return *this; | |
27444 | } | |
27445 | ||
27446 | bool operator == (const wxImage& image) const | |
27447 | { return m_refData == image.m_refData; } | |
27448 | bool operator != (const wxImage& image) const | |
27449 | { return m_refData != image.m_refData; } | |
27450 | ||
27451 | static wxList& GetHandlers() { return sm_handlers; } | |
27452 | static void AddHandler( wxImageHandler *handler ); | |
27453 | static void InsertHandler( wxImageHandler *handler ); | |
27454 | static bool RemoveHandler( const wxString& name ); | |
27455 | static wxImageHandler *FindHandler( const wxString& name ); | |
27456 | static wxImageHandler *FindHandler( const wxString& extension, long imageType ); | |
27457 | static wxImageHandler *FindHandler( long imageType ); | |
27458 | static wxImageHandler *FindHandlerMime( const wxString& mimetype ); | |
27459 | ||
27460 | static wxString GetImageExtWildcard(); | |
27461 | ||
27462 | static void CleanUpHandlers(); | |
27463 | static void InitStandardHandlers(); | |
27464 | ||
27465 | ||
27466 | static HSVValue RGBtoHSV(const RGBValue& rgb); | |
27467 | static RGBValue HSVtoRGB(const HSVValue& hsv); | |
27468 | ||
27469 | ||
27470 | ||
27471 | protected: | |
27472 | static wxList sm_handlers; | |
27473 | ||
27474 | ||
27475 | ||
27476 | ||
27477 | ||
27478 | long XYToIndex(int x, int y) const; | |
27479 | ||
27480 | private: | |
27481 | friend class wxImageHandler; | |
27482 | ||
27483 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
27484 | }; | |
27485 | ||
27486 | ||
27487 | extern void wxInitAllImageHandlers(); | |
27488 | ||
27489 | extern wxImage wxNullImage; | |
27490 | ||
27491 | ||
27492 | ||
27493 | ||
27494 | ||
27495 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/imagbmp.h" 1 | |
27496 | # 17 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/imagbmp.h" | |
27497 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/image.h" 1 | |
27498 | # 18 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/imagbmp.h" 2 | |
27499 | # 36 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/imagbmp.h" | |
27500 | enum | |
27501 | { | |
27502 | wxBMP_24BPP = 24, | |
27503 | ||
27504 | wxBMP_8BPP = 8, | |
27505 | wxBMP_8BPP_GREY = 9, | |
27506 | wxBMP_8BPP_GRAY = wxBMP_8BPP_GREY, | |
27507 | wxBMP_8BPP_RED = 10, | |
27508 | wxBMP_8BPP_PALETTE = 11, | |
27509 | wxBMP_4BPP = 4, | |
27510 | wxBMP_1BPP = 1, | |
27511 | wxBMP_1BPP_BW = 2 | |
27512 | }; | |
27513 | ||
27514 | ||
27515 | ||
27516 | ||
27517 | ||
27518 | class wxBMPHandler : public wxImageHandler | |
27519 | { | |
27520 | public: | |
27521 | wxBMPHandler() | |
27522 | { | |
27523 | m_name = "Windows bitmap file"; | |
27524 | m_extension = "bmp"; | |
27525 | m_type = wxBITMAP_TYPE_BMP; | |
27526 | m_mime = "image/x-bmp"; | |
27527 | }; | |
27528 | ||
27529 | ||
27530 | virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); | |
27531 | virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); | |
27532 | virtual bool DoCanRead( wxInputStream& stream ); | |
27533 | ||
27534 | protected: | |
27535 | bool SaveDib(wxImage *image, wxOutputStream& stream, bool verbose, | |
27536 | bool IsBmp, bool IsMask); | |
27537 | bool DoLoadDib(wxImage *image, int width, int height, int bpp, int ncolors, | |
27538 | int comp, wxFileOffset bmpOffset, wxInputStream& stream, | |
27539 | bool verbose, bool IsBmp, bool hasPalette); | |
27540 | bool LoadDib(wxImage *image, wxInputStream& stream, bool verbose, bool IsBmp); | |
27541 | ||
27542 | ||
27543 | private: | |
27544 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
27545 | }; | |
27546 | ||
27547 | ||
27548 | ||
27549 | ||
27550 | ||
27551 | ||
27552 | class wxICOHandler : public wxBMPHandler | |
27553 | { | |
27554 | public: | |
27555 | wxICOHandler() | |
27556 | { | |
27557 | m_name = "Windows icon file"; | |
27558 | m_extension = "ico"; | |
27559 | m_type = wxBITMAP_TYPE_ICO; | |
27560 | m_mime = "image/x-ico"; | |
27561 | }; | |
27562 | ||
27563 | ||
27564 | virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); | |
27565 | virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); | |
27566 | virtual bool DoLoadFile( wxImage *image, wxInputStream& stream, bool verbose, int index ); | |
27567 | virtual bool DoCanRead( wxInputStream& stream ); | |
27568 | virtual int GetImageCount( wxInputStream& stream ); | |
27569 | ||
27570 | ||
27571 | private: | |
27572 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
27573 | }; | |
27574 | ||
27575 | ||
27576 | ||
27577 | ||
27578 | ||
27579 | ||
27580 | class wxCURHandler : public wxICOHandler | |
27581 | { | |
27582 | public: | |
27583 | wxCURHandler() | |
27584 | { | |
27585 | m_name = "Windows cursor file"; | |
27586 | m_extension = "cur"; | |
27587 | m_type = wxBITMAP_TYPE_CUR; | |
27588 | m_mime = "image/x-cur"; | |
27589 | }; | |
27590 | ||
27591 | ||
27592 | ||
27593 | ||
27594 | ||
27595 | ||
27596 | virtual bool DoCanRead( wxInputStream& stream ); | |
27597 | ||
27598 | ||
27599 | private: | |
27600 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
27601 | }; | |
27602 | ||
27603 | ||
27604 | ||
27605 | ||
27606 | class wxANIHandler : public wxCURHandler | |
27607 | { | |
27608 | public: | |
27609 | wxANIHandler() | |
27610 | { | |
27611 | m_name = "Windows animated cursor file"; | |
27612 | m_extension = "ani"; | |
27613 | m_type = wxBITMAP_TYPE_ANI; | |
27614 | m_mime = "image/x-ani"; | |
27615 | }; | |
27616 | ||
27617 | ||
27618 | ||
27619 | virtual bool SaveFile( wxImage *, wxOutputStream& , bool ){return false ;}; | |
27620 | virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); | |
27621 | virtual bool DoCanRead( wxInputStream& stream ); | |
27622 | virtual int GetImageCount( wxInputStream& stream ); | |
27623 | ||
27624 | ||
27625 | private: | |
27626 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
27627 | }; | |
27628 | # 428 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/image.h" 2 | |
27629 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/imagpng.h" 1 | |
27630 | # 30 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/imagpng.h" | |
27631 | enum | |
27632 | { | |
27633 | wxPNG_TYPE_COLOUR = 0, | |
27634 | wxPNG_TYPE_GREY = 2, | |
27635 | wxPNG_TYPE_GREY_RED = 3 | |
27636 | }; | |
27637 | ||
27638 | class wxPNGHandler: public wxImageHandler | |
27639 | { | |
27640 | public: | |
27641 | inline wxPNGHandler() | |
27642 | { | |
27643 | m_name = "PNG file"; | |
27644 | m_extension = "png"; | |
27645 | m_type = wxBITMAP_TYPE_PNG; | |
27646 | m_mime = "image/png"; | |
27647 | } | |
27648 | ||
27649 | ||
27650 | virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); | |
27651 | virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); | |
27652 | virtual bool DoCanRead( wxInputStream& stream ); | |
27653 | ||
27654 | ||
27655 | private: | |
27656 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
27657 | }; | |
27658 | # 429 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/image.h" 2 | |
27659 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/imaggif.h" 1 | |
27660 | # 26 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/imaggif.h" | |
27661 | class wxGIFHandler : public wxImageHandler | |
27662 | { | |
27663 | public: | |
27664 | inline wxGIFHandler() | |
27665 | { | |
27666 | m_name = "GIF file"; | |
27667 | m_extension = "gif"; | |
27668 | m_type = wxBITMAP_TYPE_GIF; | |
27669 | m_mime = "image/gif"; | |
27670 | } | |
27671 | ||
27672 | ||
27673 | virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); | |
27674 | virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); | |
27675 | virtual bool DoCanRead( wxInputStream& stream ); | |
27676 | ||
27677 | ||
27678 | private: | |
27679 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
27680 | }; | |
27681 | # 430 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/image.h" 2 | |
27682 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/imagpcx.h" 1 | |
27683 | # 25 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/imagpcx.h" | |
27684 | class wxPCXHandler : public wxImageHandler | |
27685 | { | |
27686 | public: | |
27687 | inline wxPCXHandler() | |
27688 | { | |
27689 | m_name = "PCX file"; | |
27690 | m_extension = "pcx"; | |
27691 | m_type = wxBITMAP_TYPE_PCX; | |
27692 | m_mime = "image/pcx"; | |
27693 | } | |
27694 | ||
27695 | ||
27696 | virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); | |
27697 | virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); | |
27698 | virtual bool DoCanRead( wxInputStream& stream ); | |
27699 | ||
27700 | ||
27701 | private: | |
27702 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
27703 | }; | |
27704 | # 431 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/image.h" 2 | |
27705 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/imagjpeg.h" 1 | |
27706 | # 27 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/imagjpeg.h" | |
27707 | class wxJPEGHandler: public wxImageHandler | |
27708 | { | |
27709 | public: | |
27710 | inline wxJPEGHandler() | |
27711 | { | |
27712 | m_name = "JPEG file"; | |
27713 | m_extension = "jpg"; | |
27714 | m_type = wxBITMAP_TYPE_JPEG; | |
27715 | m_mime = "image/jpeg"; | |
27716 | } | |
27717 | ||
27718 | ||
27719 | virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); | |
27720 | virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); | |
27721 | virtual bool DoCanRead( wxInputStream& stream ); | |
27722 | ||
27723 | ||
27724 | private: | |
27725 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
27726 | }; | |
27727 | # 432 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/image.h" 2 | |
27728 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/imagtiff.h" 1 | |
27729 | # 33 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/imagtiff.h" | |
27730 | class wxTIFFHandler: public wxImageHandler | |
27731 | { | |
27732 | public: | |
27733 | wxTIFFHandler(); | |
27734 | ||
27735 | ||
27736 | virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); | |
27737 | virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); | |
27738 | virtual bool DoCanRead( wxInputStream& stream ); | |
27739 | virtual int GetImageCount( wxInputStream& stream ); | |
27740 | ||
27741 | ||
27742 | private: | |
27743 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
27744 | }; | |
27745 | # 433 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/image.h" 2 | |
27746 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/imagpnm.h" 1 | |
27747 | # 24 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/imagpnm.h" | |
27748 | class wxPNMHandler : public wxImageHandler | |
27749 | { | |
27750 | public: | |
27751 | inline wxPNMHandler() | |
27752 | { | |
27753 | m_name = "PNM file"; | |
27754 | m_extension = "pnm"; | |
27755 | m_type = wxBITMAP_TYPE_PNM; | |
27756 | m_mime = "image/pnm"; | |
27757 | } | |
27758 | ||
27759 | ||
27760 | virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); | |
27761 | virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); | |
27762 | virtual bool DoCanRead( wxInputStream& stream ); | |
27763 | ||
27764 | ||
27765 | private: | |
27766 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
27767 | }; | |
27768 | # 434 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/image.h" 2 | |
27769 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/imagxpm.h" 1 | |
27770 | # 24 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/imagxpm.h" | |
27771 | class wxXPMHandler : public wxImageHandler | |
27772 | { | |
27773 | public: | |
27774 | inline wxXPMHandler() | |
27775 | { | |
27776 | m_name = "XPM file"; | |
27777 | m_extension = "xpm"; | |
27778 | m_type = wxBITMAP_TYPE_XPM; | |
27779 | m_mime = "image/xpm"; | |
27780 | } | |
27781 | ||
27782 | ||
27783 | virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); | |
27784 | virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); | |
27785 | virtual bool DoCanRead( wxInputStream& stream ); | |
27786 | ||
27787 | ||
27788 | private: | |
27789 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
27790 | }; | |
27791 | # 435 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/image.h" 2 | |
27792 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/imagiff.h" 1 | |
27793 | # 436 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/image.h" 2 | |
27794 | # 24 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/cursor.h" 2 | |
27795 | ||
27796 | ||
27797 | ||
27798 | ||
27799 | ||
27800 | ||
27801 | class wxCursor: public wxObject | |
27802 | { | |
27803 | public: | |
27804 | ||
27805 | wxCursor(); | |
27806 | wxCursor( int cursorId ); | |
27807 | wxCursor( const wxCursor &cursor ); | |
27808 | ||
27809 | wxCursor( const wxImage & image ); | |
27810 | ||
27811 | wxCursor( const char bits[], int width, int height, | |
27812 | int hotSpotX=-1, int hotSpotY=-1, | |
27813 | const char maskBits[]=0, wxColour *fg=0, wxColour *bg=0 ); | |
27814 | ~wxCursor(); | |
27815 | wxCursor& operator = ( const wxCursor& cursor ); | |
27816 | bool operator == ( const wxCursor& cursor ) const; | |
27817 | bool operator != ( const wxCursor& cursor ) const; | |
27818 | bool Ok() const; | |
27819 | ||
27820 | ||
27821 | ||
27822 | GdkCursor *GetCursor() const; | |
27823 | ||
27824 | private: | |
27825 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
27826 | }; | |
27827 | # 25 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/cursor.h" 2 | |
27828 | # 37 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/cursor.h" | |
27829 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/utils.h" 1 | |
27830 | # 34 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/utils.h" | |
27831 | class wxArrayString; | |
27832 | ||
27833 | ||
27834 | ||
27835 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/longlong.h" 1 | |
27836 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/longlong.h" | |
27837 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/limits.h" 1 3 4 | |
27838 | # 24 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/longlong.h" 2 | |
27839 | # 85 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/longlong.h" | |
27840 | class wxLongLongNative; | |
27841 | class wxULongLongNative; | |
27842 | typedef wxLongLongNative wxLongLong; | |
27843 | typedef wxULongLongNative wxULongLong; | |
27844 | # 99 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/longlong.h" | |
27845 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/iosfwrap.h" 1 | |
27846 | # 100 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/longlong.h" 2 | |
27847 | ||
27848 | ||
27849 | ||
27850 | class wxLongLongNative | |
27851 | { | |
27852 | public: | |
27853 | ||
27854 | ||
27855 | wxLongLongNative() : m_ll(0) { } | |
27856 | ||
27857 | wxLongLongNative(long ll) : m_ll(ll) { } | |
27858 | ||
27859 | wxLongLongNative(long hi, unsigned long lo) : m_ll(0) | |
27860 | { | |
27861 | ||
27862 | m_ll = ((long) hi) << 32; | |
27863 | m_ll |= (long) lo; | |
27864 | } | |
27865 | # 128 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/longlong.h" | |
27866 | wxLongLongNative& operator=(long ll) | |
27867 | { m_ll = ll; return *this; } | |
27868 | # 138 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/longlong.h" | |
27869 | wxLongLongNative& Assign(double d) | |
27870 | { m_ll = (long)d; return *this; } | |
27871 | ||
27872 | ||
27873 | ||
27874 | ||
27875 | ||
27876 | long GetHi() const | |
27877 | { return (long)(m_ll >> 32); } | |
27878 | ||
27879 | unsigned long GetLo() const | |
27880 | { return (unsigned long)m_ll; } | |
27881 | ||
27882 | ||
27883 | wxLongLongNative Abs() const { return wxLongLongNative(*this).Abs(); } | |
27884 | wxLongLongNative& Abs() { if ( m_ll < 0 ) m_ll = -m_ll; return *this; } | |
27885 | ||
27886 | ||
27887 | long GetValue() const { return m_ll; } | |
27888 | ||
27889 | ||
27890 | long ToLong() const | |
27891 | { | |
27892 | ; | |
27893 | ||
27894 | ||
27895 | return (long)m_ll; | |
27896 | } | |
27897 | ||
27898 | ||
27899 | ||
27900 | double ToDouble() const { return m_ll; } | |
27901 | # 178 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/longlong.h" | |
27902 | wxLongLongNative operator+(const wxLongLongNative& ll) const | |
27903 | { return wxLongLongNative(m_ll + ll.m_ll); } | |
27904 | wxLongLongNative& operator+=(const wxLongLongNative& ll) | |
27905 | { m_ll += ll.m_ll; return *this; } | |
27906 | ||
27907 | wxLongLongNative operator+(const long ll) const | |
27908 | { return wxLongLongNative(m_ll + ll); } | |
27909 | wxLongLongNative& operator+=(const long ll) | |
27910 | { m_ll += ll; return *this; } | |
27911 | ||
27912 | ||
27913 | wxLongLongNative& operator++() | |
27914 | { m_ll++; return *this; } | |
27915 | ||
27916 | ||
27917 | wxLongLongNative operator++(int) | |
27918 | { wxLongLongNative value(*this); m_ll++; return value; } | |
27919 | ||
27920 | ||
27921 | wxLongLongNative operator-() const | |
27922 | { return wxLongLongNative(-m_ll); } | |
27923 | wxLongLongNative& Negate() { m_ll = -m_ll; return *this; } | |
27924 | ||
27925 | ||
27926 | wxLongLongNative operator-(const wxLongLongNative& ll) const | |
27927 | { return wxLongLongNative(m_ll - ll.m_ll); } | |
27928 | wxLongLongNative& operator-=(const wxLongLongNative& ll) | |
27929 | { m_ll -= ll.m_ll; return *this; } | |
27930 | ||
27931 | wxLongLongNative operator-(const long ll) const | |
27932 | { return wxLongLongNative(m_ll - ll); } | |
27933 | wxLongLongNative& operator-=(const long ll) | |
27934 | { m_ll -= ll; return *this; } | |
27935 | ||
27936 | ||
27937 | wxLongLongNative& operator--() | |
27938 | { m_ll--; return *this; } | |
27939 | ||
27940 | ||
27941 | wxLongLongNative operator--(int) | |
27942 | { wxLongLongNative value(*this); m_ll--; return value; } | |
27943 | ||
27944 | ||
27945 | ||
27946 | wxLongLongNative operator<<(int shift) const | |
27947 | { return wxLongLongNative(m_ll << shift); } | |
27948 | wxLongLongNative& operator<<=(int shift) | |
27949 | { m_ll <<= shift; return *this; } | |
27950 | ||
27951 | ||
27952 | wxLongLongNative operator>>(int shift) const | |
27953 | { return wxLongLongNative(m_ll >> shift); } | |
27954 | wxLongLongNative& operator>>=(int shift) | |
27955 | { m_ll >>= shift; return *this; } | |
27956 | ||
27957 | ||
27958 | wxLongLongNative operator&(const wxLongLongNative& ll) const | |
27959 | { return wxLongLongNative(m_ll & ll.m_ll); } | |
27960 | wxLongLongNative& operator&=(const wxLongLongNative& ll) | |
27961 | { m_ll &= ll.m_ll; return *this; } | |
27962 | ||
27963 | wxLongLongNative operator|(const wxLongLongNative& ll) const | |
27964 | { return wxLongLongNative(m_ll | ll.m_ll); } | |
27965 | wxLongLongNative& operator|=(const wxLongLongNative& ll) | |
27966 | { m_ll |= ll.m_ll; return *this; } | |
27967 | ||
27968 | wxLongLongNative operator^(const wxLongLongNative& ll) const | |
27969 | { return wxLongLongNative(m_ll ^ ll.m_ll); } | |
27970 | wxLongLongNative& operator^=(const wxLongLongNative& ll) | |
27971 | { m_ll ^= ll.m_ll; return *this; } | |
27972 | ||
27973 | ||
27974 | wxLongLongNative operator*(const wxLongLongNative& ll) const | |
27975 | { return wxLongLongNative(m_ll * ll.m_ll); } | |
27976 | wxLongLongNative operator*(long l) const | |
27977 | { return wxLongLongNative(m_ll * l); } | |
27978 | wxLongLongNative& operator*=(const wxLongLongNative& ll) | |
27979 | { m_ll *= ll.m_ll; return *this; } | |
27980 | wxLongLongNative& operator*=(long l) | |
27981 | { m_ll *= l; return *this; } | |
27982 | ||
27983 | wxLongLongNative operator/(const wxLongLongNative& ll) const | |
27984 | { return wxLongLongNative(m_ll / ll.m_ll); } | |
27985 | wxLongLongNative operator/(long l) const | |
27986 | { return wxLongLongNative(m_ll / l); } | |
27987 | wxLongLongNative& operator/=(const wxLongLongNative& ll) | |
27988 | { m_ll /= ll.m_ll; return *this; } | |
27989 | wxLongLongNative& operator/=(long l) | |
27990 | { m_ll /= l; return *this; } | |
27991 | ||
27992 | wxLongLongNative operator%(const wxLongLongNative& ll) const | |
27993 | { return wxLongLongNative(m_ll % ll.m_ll); } | |
27994 | wxLongLongNative operator%(long l) const | |
27995 | { return wxLongLongNative(m_ll % l); } | |
27996 | ||
27997 | ||
27998 | bool operator==(const wxLongLongNative& ll) const | |
27999 | { return m_ll == ll.m_ll; } | |
28000 | bool operator==(long l) const | |
28001 | { return m_ll == l; } | |
28002 | bool operator!=(const wxLongLongNative& ll) const | |
28003 | { return m_ll != ll.m_ll; } | |
28004 | bool operator!=(long l) const | |
28005 | { return m_ll != l; } | |
28006 | bool operator<(const wxLongLongNative& ll) const | |
28007 | { return m_ll < ll.m_ll; } | |
28008 | bool operator<(long l) const | |
28009 | { return m_ll < l; } | |
28010 | bool operator>(const wxLongLongNative& ll) const | |
28011 | { return m_ll > ll.m_ll; } | |
28012 | bool operator>(long l) const | |
28013 | { return m_ll > l; } | |
28014 | bool operator<=(const wxLongLongNative& ll) const | |
28015 | { return m_ll <= ll.m_ll; } | |
28016 | bool operator<=(long l) const | |
28017 | { return m_ll <= l; } | |
28018 | bool operator>=(const wxLongLongNative& ll) const | |
28019 | { return m_ll >= ll.m_ll; } | |
28020 | bool operator>=(long l) const | |
28021 | { return m_ll >= l; } | |
28022 | ||
28023 | ||
28024 | ||
28025 | ||
28026 | wxString ToString() const; | |
28027 | ||
28028 | ||
28029 | void *asArray() const; | |
28030 | ||
28031 | ||
28032 | ||
28033 | friend | |
28034 | std:: ostream& operator<<(std:: ostream&, const wxLongLongNative&); | |
28035 | ||
28036 | ||
28037 | friend | |
28038 | wxString& operator<<(wxString&, const wxLongLongNative&); | |
28039 | ||
28040 | private: | |
28041 | long m_ll; | |
28042 | }; | |
28043 | ||
28044 | ||
28045 | class wxULongLongNative | |
28046 | { | |
28047 | public: | |
28048 | ||
28049 | ||
28050 | wxULongLongNative() : m_ll(0) { } | |
28051 | ||
28052 | wxULongLongNative(unsigned long ll) : m_ll(ll) { } | |
28053 | ||
28054 | wxULongLongNative(unsigned long hi, unsigned long lo) : m_ll(0) | |
28055 | { | |
28056 | ||
28057 | m_ll = ((unsigned long) hi) << 32; | |
28058 | m_ll |= (unsigned long) lo; | |
28059 | } | |
28060 | ||
28061 | ||
28062 | ||
28063 | ||
28064 | ||
28065 | ||
28066 | ||
28067 | wxULongLongNative& operator=(unsigned long ll) | |
28068 | { m_ll = ll; return *this; } | |
28069 | ||
28070 | ||
28071 | ||
28072 | ||
28073 | ||
28074 | unsigned long GetHi() const | |
28075 | { return (unsigned long)(m_ll >> 32); } | |
28076 | ||
28077 | unsigned long GetLo() const | |
28078 | { return (unsigned long)m_ll; } | |
28079 | ||
28080 | ||
28081 | unsigned long GetValue() const { return m_ll; } | |
28082 | ||
28083 | ||
28084 | unsigned long ToULong() const | |
28085 | { | |
28086 | ; | |
28087 | ||
28088 | ||
28089 | return (unsigned long)m_ll; | |
28090 | } | |
28091 | ||
28092 | ||
28093 | ||
28094 | wxULongLongNative operator+(const wxULongLongNative& ll) const | |
28095 | { return wxULongLongNative(m_ll + ll.m_ll); } | |
28096 | wxULongLongNative& operator+=(const wxULongLongNative& ll) | |
28097 | { m_ll += ll.m_ll; return *this; } | |
28098 | ||
28099 | wxULongLongNative operator+(const unsigned long ll) const | |
28100 | { return wxULongLongNative(m_ll + ll); } | |
28101 | wxULongLongNative& operator+=(const unsigned long ll) | |
28102 | { m_ll += ll; return *this; } | |
28103 | ||
28104 | ||
28105 | wxULongLongNative& operator++() | |
28106 | { m_ll++; return *this; } | |
28107 | ||
28108 | ||
28109 | wxULongLongNative operator++(int) | |
28110 | { wxULongLongNative value(*this); m_ll++; return value; } | |
28111 | ||
28112 | ||
28113 | wxULongLongNative operator-(const wxULongLongNative& ll) const | |
28114 | { return wxULongLongNative(m_ll - ll.m_ll); } | |
28115 | wxULongLongNative& operator-=(const wxULongLongNative& ll) | |
28116 | { m_ll -= ll.m_ll; return *this; } | |
28117 | ||
28118 | wxULongLongNative operator-(const unsigned long ll) const | |
28119 | { return wxULongLongNative(m_ll - ll); } | |
28120 | wxULongLongNative& operator-=(const unsigned long ll) | |
28121 | { m_ll -= ll; return *this; } | |
28122 | ||
28123 | ||
28124 | wxULongLongNative& operator--() | |
28125 | { m_ll--; return *this; } | |
28126 | ||
28127 | ||
28128 | wxULongLongNative operator--(int) | |
28129 | { wxULongLongNative value(*this); m_ll--; return value; } | |
28130 | ||
28131 | ||
28132 | ||
28133 | wxULongLongNative operator<<(int shift) const | |
28134 | { return wxULongLongNative(m_ll << shift); } | |
28135 | wxULongLongNative& operator<<=(int shift) | |
28136 | { m_ll <<= shift; return *this; } | |
28137 | ||
28138 | ||
28139 | wxULongLongNative operator>>(int shift) const | |
28140 | { return wxULongLongNative(m_ll >> shift); } | |
28141 | wxULongLongNative& operator>>=(int shift) | |
28142 | { m_ll >>= shift; return *this; } | |
28143 | ||
28144 | ||
28145 | wxULongLongNative operator&(const wxULongLongNative& ll) const | |
28146 | { return wxULongLongNative(m_ll & ll.m_ll); } | |
28147 | wxULongLongNative& operator&=(const wxULongLongNative& ll) | |
28148 | { m_ll &= ll.m_ll; return *this; } | |
28149 | ||
28150 | wxULongLongNative operator|(const wxULongLongNative& ll) const | |
28151 | { return wxULongLongNative(m_ll | ll.m_ll); } | |
28152 | wxULongLongNative& operator|=(const wxULongLongNative& ll) | |
28153 | { m_ll |= ll.m_ll; return *this; } | |
28154 | ||
28155 | wxULongLongNative operator^(const wxULongLongNative& ll) const | |
28156 | { return wxULongLongNative(m_ll ^ ll.m_ll); } | |
28157 | wxULongLongNative& operator^=(const wxULongLongNative& ll) | |
28158 | { m_ll ^= ll.m_ll; return *this; } | |
28159 | ||
28160 | ||
28161 | wxULongLongNative operator*(const wxULongLongNative& ll) const | |
28162 | { return wxULongLongNative(m_ll * ll.m_ll); } | |
28163 | wxULongLongNative operator*(unsigned long l) const | |
28164 | { return wxULongLongNative(m_ll * l); } | |
28165 | wxULongLongNative& operator*=(const wxULongLongNative& ll) | |
28166 | { m_ll *= ll.m_ll; return *this; } | |
28167 | wxULongLongNative& operator*=(unsigned long l) | |
28168 | { m_ll *= l; return *this; } | |
28169 | ||
28170 | wxULongLongNative operator/(const wxULongLongNative& ll) const | |
28171 | { return wxULongLongNative(m_ll / ll.m_ll); } | |
28172 | wxULongLongNative operator/(unsigned long l) const | |
28173 | { return wxULongLongNative(m_ll / l); } | |
28174 | wxULongLongNative& operator/=(const wxULongLongNative& ll) | |
28175 | { m_ll /= ll.m_ll; return *this; } | |
28176 | wxULongLongNative& operator/=(unsigned long l) | |
28177 | { m_ll /= l; return *this; } | |
28178 | ||
28179 | wxULongLongNative operator%(const wxULongLongNative& ll) const | |
28180 | { return wxULongLongNative(m_ll % ll.m_ll); } | |
28181 | wxULongLongNative operator%(unsigned long l) const | |
28182 | { return wxULongLongNative(m_ll % l); } | |
28183 | ||
28184 | ||
28185 | bool operator==(const wxULongLongNative& ll) const | |
28186 | { return m_ll == ll.m_ll; } | |
28187 | bool operator==(unsigned long l) const | |
28188 | { return m_ll == l; } | |
28189 | bool operator!=(const wxULongLongNative& ll) const | |
28190 | { return m_ll != ll.m_ll; } | |
28191 | bool operator!=(unsigned long l) const | |
28192 | { return m_ll != l; } | |
28193 | bool operator<(const wxULongLongNative& ll) const | |
28194 | { return m_ll < ll.m_ll; } | |
28195 | bool operator<(unsigned long l) const | |
28196 | { return m_ll < l; } | |
28197 | bool operator>(const wxULongLongNative& ll) const | |
28198 | { return m_ll > ll.m_ll; } | |
28199 | bool operator>(unsigned long l) const | |
28200 | { return m_ll > l; } | |
28201 | bool operator<=(const wxULongLongNative& ll) const | |
28202 | { return m_ll <= ll.m_ll; } | |
28203 | bool operator<=(unsigned long l) const | |
28204 | { return m_ll <= l; } | |
28205 | bool operator>=(const wxULongLongNative& ll) const | |
28206 | { return m_ll >= ll.m_ll; } | |
28207 | bool operator>=(unsigned long l) const | |
28208 | { return m_ll >= l; } | |
28209 | ||
28210 | ||
28211 | ||
28212 | ||
28213 | wxString ToString() const; | |
28214 | ||
28215 | ||
28216 | void *asArray() const; | |
28217 | ||
28218 | ||
28219 | ||
28220 | friend | |
28221 | std:: ostream& operator<<(std:: ostream&, const wxULongLongNative&); | |
28222 | ||
28223 | ||
28224 | friend | |
28225 | wxString& operator<<(wxString&, const wxULongLongNative&); | |
28226 | ||
28227 | private: | |
28228 | unsigned long m_ll; | |
28229 | }; | |
28230 | # 912 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/longlong.h" | |
28231 | inline bool operator<(long l, const wxLongLong& ll) { return ll > l; } | |
28232 | inline bool operator>(long l, const wxLongLong& ll) { return ll < l; } | |
28233 | inline bool operator<=(long l, const wxLongLong& ll) { return ll >= l; } | |
28234 | inline bool operator>=(long l, const wxLongLong& ll) { return ll <= l; } | |
28235 | inline bool operator==(long l, const wxLongLong& ll) { return ll == l; } | |
28236 | inline bool operator!=(long l, const wxLongLong& ll) { return ll != l; } | |
28237 | ||
28238 | inline wxLongLong operator+(long l, const wxLongLong& ll) { return ll + l; } | |
28239 | inline wxLongLong operator-(long l, const wxLongLong& ll) | |
28240 | { | |
28241 | return wxLongLong(l) - ll; | |
28242 | } | |
28243 | ||
28244 | inline bool operator<(unsigned long l, const wxULongLong& ull) { return ull > l; } | |
28245 | inline bool operator>(unsigned long l, const wxULongLong& ull) { return ull < l; } | |
28246 | inline bool operator<=(unsigned long l, const wxULongLong& ull) { return ull >= l; } | |
28247 | inline bool operator>=(unsigned long l, const wxULongLong& ull) { return ull <= l; } | |
28248 | inline bool operator==(unsigned long l, const wxULongLong& ull) { return ull == l; } | |
28249 | inline bool operator!=(unsigned long l, const wxULongLong& ull) { return ull != l; } | |
28250 | ||
28251 | inline wxULongLong operator+(unsigned long l, const wxULongLong& ull) { return ull + l; } | |
28252 | ||
28253 | inline wxLongLong operator-(unsigned long l, const wxULongLong& ull) | |
28254 | { | |
28255 | wxULongLong ret = wxULongLong(l) - ull; | |
28256 | return wxLongLong((long)ret.GetHi(),ret.GetLo()); | |
28257 | } | |
28258 | # 39 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/utils.h" 2 | |
28259 | ||
28260 | ||
28261 | ||
28262 | ||
28263 | ||
28264 | ||
28265 | # 1 "/usr/include/stdio.h" 1 3 4 | |
28266 | # 46 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/utils.h" 2 | |
28267 | ||
28268 | ||
28269 | ||
28270 | ||
28271 | ||
28272 | class wxProcess; | |
28273 | class wxFrame; | |
28274 | class wxWindow; | |
28275 | class wxWindowList; | |
28276 | class wxPoint; | |
28277 | # 82 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/utils.h" | |
28278 | wxChar* copystring(const wxChar *s) __attribute__ ((deprecated)); | |
28279 | # 95 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/utils.h" | |
28280 | void wxBell(); | |
28281 | ||
28282 | ||
28283 | ||
28284 | ||
28285 | ||
28286 | wxString wxGetOsDescription(); | |
28287 | ||
28288 | ||
28289 | int wxGetOsVersion(int *majorVsn = (int *) __null, | |
28290 | int *minorVsn = (int *) __null); | |
28291 | ||
28292 | ||
28293 | wxString wxNow(); | |
28294 | ||
28295 | ||
28296 | const wxChar *wxGetInstallPrefix(); | |
28297 | ||
28298 | wxString wxGetDataDir(); | |
28299 | ||
28300 | ||
28301 | ||
28302 | ||
28303 | ||
28304 | ||
28305 | ||
28306 | bool wxGetKeyState(wxKeyCode key); | |
28307 | ||
28308 | ||
28309 | ||
28310 | ||
28311 | ||
28312 | bool wxSetDetectableAutoRepeat( bool flag ); | |
28313 | ||
28314 | ||
28315 | ||
28316 | ||
28317 | ||
28318 | ||
28319 | class wxMouseState | |
28320 | { | |
28321 | public: | |
28322 | wxMouseState() | |
28323 | : m_x(0), m_y(0), | |
28324 | m_leftDown(false), m_middleDown(false), m_rightDown(false), | |
28325 | m_controlDown(false), m_shiftDown(false), m_altDown(false), | |
28326 | m_metaDown(false) | |
28327 | {} | |
28328 | ||
28329 | wxCoord GetX() { return m_x; } | |
28330 | wxCoord GetY() { return m_y; } | |
28331 | ||
28332 | bool LeftDown() { return m_leftDown; } | |
28333 | bool MiddleDown() { return m_middleDown; } | |
28334 | bool RightDown() { return m_rightDown; } | |
28335 | ||
28336 | bool ControlDown() { return m_controlDown; } | |
28337 | bool ShiftDown() { return m_shiftDown; } | |
28338 | bool AltDown() { return m_altDown; } | |
28339 | bool MetaDown() { return m_metaDown; } | |
28340 | bool CmdDown() | |
28341 | { | |
28342 | ||
28343 | ||
28344 | ||
28345 | return ControlDown(); | |
28346 | ||
28347 | } | |
28348 | ||
28349 | void SetX(wxCoord x) { m_x = x; } | |
28350 | void SetY(wxCoord y) { m_y = y; } | |
28351 | ||
28352 | void SetLeftDown(bool down) { m_leftDown = down; } | |
28353 | void SetMiddleDown(bool down) { m_middleDown = down; } | |
28354 | void SetRightDown(bool down) { m_rightDown = down; } | |
28355 | ||
28356 | void SetControlDown(bool down) { m_controlDown = down; } | |
28357 | void SetShiftDown(bool down) { m_shiftDown = down; } | |
28358 | void SetAltDown(bool down) { m_altDown = down; } | |
28359 | void SetMetaDown(bool down) { m_metaDown = down; } | |
28360 | ||
28361 | private: | |
28362 | wxCoord m_x; | |
28363 | wxCoord m_y; | |
28364 | ||
28365 | bool m_leftDown; | |
28366 | bool m_middleDown; | |
28367 | bool m_rightDown; | |
28368 | ||
28369 | bool m_controlDown; | |
28370 | bool m_shiftDown; | |
28371 | bool m_altDown; | |
28372 | bool m_metaDown; | |
28373 | }; | |
28374 | ||
28375 | ||
28376 | ||
28377 | wxMouseState wxGetMouseState(); | |
28378 | # 201 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/utils.h" | |
28379 | long wxNewId(); | |
28380 | ||
28381 | ||
28382 | void wxRegisterId(long id); | |
28383 | ||
28384 | ||
28385 | long wxGetCurrentId(); | |
28386 | # 218 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/utils.h" | |
28387 | extern const wxChar* wxFloatToStringStr; | |
28388 | extern const wxChar* wxDoubleToStringStr; | |
28389 | ||
28390 | void StringToFloat(const wxChar *s, float *number) __attribute__ ((deprecated)); | |
28391 | wxChar* FloatToString(float number, const wxChar *fmt = wxFloatToStringStr) __attribute__ ((deprecated)); | |
28392 | void StringToDouble(const wxChar *s, double *number) __attribute__ ((deprecated)); | |
28393 | wxChar* DoubleToString(double number, const wxChar *fmt = wxDoubleToStringStr) __attribute__ ((deprecated)); | |
28394 | void StringToInt(const wxChar *s, int *number) __attribute__ ((deprecated)); | |
28395 | void StringToLong(const wxChar *s, long *number) __attribute__ ((deprecated)); | |
28396 | wxChar* IntToString(int number) __attribute__ ((deprecated)); | |
28397 | wxChar* LongToString(long number) __attribute__ ((deprecated)); | |
28398 | ||
28399 | ||
28400 | ||
28401 | ||
28402 | int wxHexToDec(const wxString& buf); | |
28403 | ||
28404 | ||
28405 | void wxDecToHex(int dec, wxChar *buf); | |
28406 | wxString wxDecToHex(int dec); | |
28407 | # 246 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/utils.h" | |
28408 | enum | |
28409 | { | |
28410 | ||
28411 | wxEXEC_ASYNC = 0, | |
28412 | ||
28413 | ||
28414 | wxEXEC_SYNC = 1, | |
28415 | ||
28416 | ||
28417 | ||
28418 | wxEXEC_NOHIDE = 2, | |
28419 | ||
28420 | ||
28421 | ||
28422 | wxEXEC_MAKE_GROUP_LEADER = 4, | |
28423 | ||
28424 | ||
28425 | ||
28426 | ||
28427 | wxEXEC_NODISABLE = 8 | |
28428 | }; | |
28429 | ||
28430 | ||
28431 | ||
28432 | ||
28433 | ||
28434 | ||
28435 | long wxExecute(wxChar **argv, int flags = wxEXEC_ASYNC, | |
28436 | wxProcess *process = (wxProcess *) __null); | |
28437 | long wxExecute(const wxString& command, int flags = wxEXEC_ASYNC, | |
28438 | wxProcess *process = (wxProcess *) __null); | |
28439 | ||
28440 | ||
28441 | ||
28442 | long wxExecute(const wxString& command, | |
28443 | wxArrayString& output, | |
28444 | int flags = 0); | |
28445 | ||
28446 | ||
28447 | long wxExecute(const wxString& command, | |
28448 | wxArrayString& output, | |
28449 | wxArrayString& error, | |
28450 | int flags = 0); | |
28451 | ||
28452 | enum wxSignal | |
28453 | { | |
28454 | wxSIGNONE = 0, | |
28455 | wxSIGHUP, | |
28456 | wxSIGINT, | |
28457 | wxSIGQUIT, | |
28458 | wxSIGILL, | |
28459 | wxSIGTRAP, | |
28460 | wxSIGABRT, | |
28461 | wxSIGIOT = wxSIGABRT, | |
28462 | wxSIGEMT, | |
28463 | wxSIGFPE, | |
28464 | wxSIGKILL, | |
28465 | wxSIGBUS, | |
28466 | wxSIGSEGV, | |
28467 | wxSIGSYS, | |
28468 | wxSIGPIPE, | |
28469 | wxSIGALRM, | |
28470 | wxSIGTERM | |
28471 | ||
28472 | ||
28473 | }; | |
28474 | ||
28475 | enum wxKillError | |
28476 | { | |
28477 | wxKILL_OK, | |
28478 | wxKILL_BAD_SIGNAL, | |
28479 | wxKILL_ACCESS_DENIED, | |
28480 | wxKILL_NO_PROCESS, | |
28481 | wxKILL_ERROR | |
28482 | }; | |
28483 | ||
28484 | enum wxKillFlags | |
28485 | { | |
28486 | wxKILL_NOCHILDREN = 0, | |
28487 | wxKILL_CHILDREN = 1 | |
28488 | }; | |
28489 | ||
28490 | enum wxShutdownFlags | |
28491 | { | |
28492 | wxSHUTDOWN_POWEROFF, | |
28493 | wxSHUTDOWN_REBOOT | |
28494 | }; | |
28495 | ||
28496 | ||
28497 | bool wxShutdown(wxShutdownFlags wFlags); | |
28498 | ||
28499 | enum wxPowerType | |
28500 | { | |
28501 | wxPOWER_SOCKET, | |
28502 | wxPOWER_BATTERY, | |
28503 | wxPOWER_UNKNOWN | |
28504 | }; | |
28505 | ||
28506 | wxPowerType wxGetPowerType(); | |
28507 | ||
28508 | enum wxBatteryState | |
28509 | { | |
28510 | wxBATTERY_NORMAL_STATE, | |
28511 | wxBATTERY_LOW_STATE, | |
28512 | wxBATTERY_CRITICAL_STATE, | |
28513 | wxBATTERY_SHUTDOWN_STATE, | |
28514 | wxBATTERY_UNKNOWN_STATE | |
28515 | }; | |
28516 | ||
28517 | wxBatteryState wxGetBatteryState(); | |
28518 | ||
28519 | ||
28520 | ||
28521 | ||
28522 | ||
28523 | int wxKill(long pid, | |
28524 | wxSignal sig = wxSIGTERM, | |
28525 | wxKillError *rc = __null, | |
28526 | int flags = wxKILL_NOCHILDREN); | |
28527 | ||
28528 | ||
28529 | ||
28530 | bool wxShell(const wxString& command = wxEmptyString); | |
28531 | ||
28532 | ||
28533 | ||
28534 | bool wxShell(const wxString& command, wxArrayString& output); | |
28535 | ||
28536 | ||
28537 | void wxSleep(int nSecs); | |
28538 | ||
28539 | ||
28540 | void wxMilliSleep(unsigned long milliseconds); | |
28541 | ||
28542 | ||
28543 | void wxMicroSleep(unsigned long microseconds); | |
28544 | ||
28545 | ||
28546 | void wxUsleep(unsigned long milliseconds) __attribute__ ((deprecated)); | |
28547 | ||
28548 | ||
28549 | unsigned long wxGetProcessId(); | |
28550 | ||
28551 | ||
28552 | long wxGetFreeMemory(); | |
28553 | ||
28554 | ||
28555 | ||
28556 | ||
28557 | bool wxHandleFatalExceptions(bool doit = true); | |
28558 | ||
28559 | ||
28560 | ||
28561 | ||
28562 | ||
28563 | bool wxLaunchDefaultBrowser(const wxString& url); | |
28564 | # 410 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/utils.h" | |
28565 | bool wxGetEnv(const wxString& var, wxString *value); | |
28566 | ||
28567 | ||
28568 | bool wxSetEnv(const wxString& var, const wxChar *value); | |
28569 | ||
28570 | ||
28571 | inline bool wxUnsetEnv(const wxString& var) { return wxSetEnv(var, __null); } | |
28572 | # 425 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/utils.h" | |
28573 | bool wxGetEmailAddress(wxChar *buf, int maxSize); | |
28574 | wxString wxGetEmailAddress(); | |
28575 | ||
28576 | ||
28577 | bool wxGetHostName(wxChar *buf, int maxSize); | |
28578 | wxString wxGetHostName(); | |
28579 | ||
28580 | ||
28581 | wxString wxGetFullHostName(); | |
28582 | bool wxGetFullHostName(wxChar *buf, int maxSize); | |
28583 | ||
28584 | ||
28585 | bool wxGetUserId(wxChar *buf, int maxSize); | |
28586 | wxString wxGetUserId(); | |
28587 | ||
28588 | ||
28589 | bool wxGetUserName(wxChar *buf, int maxSize); | |
28590 | wxString wxGetUserName(); | |
28591 | ||
28592 | ||
28593 | wxString wxGetHomeDir(); | |
28594 | const wxChar* wxGetHomeDir(wxString *pstr); | |
28595 | ||
28596 | ||
28597 | ||
28598 | ||
28599 | ||
28600 | ||
28601 | wxChar* wxGetUserHome(const wxString& user = wxEmptyString); | |
28602 | ||
28603 | ||
28604 | ||
28605 | bool wxGetDiskSpace(const wxString& path, | |
28606 | wxLongLong *pTotal = __null, | |
28607 | wxLongLong *pFree = __null); | |
28608 | ||
28609 | ||
28610 | ||
28611 | ||
28612 | ||
28613 | ||
28614 | ||
28615 | wxChar* wxStripMenuCodes(const wxChar *in, wxChar *out = (wxChar *) __null); | |
28616 | wxString wxStripMenuCodes(const wxString& str); | |
28617 | ||
28618 | ||
28619 | class wxAcceleratorEntry; | |
28620 | wxAcceleratorEntry *wxGetAccelFromString(const wxString& label); | |
28621 | ||
28622 | ||
28623 | ||
28624 | ||
28625 | ||
28626 | ||
28627 | ||
28628 | int wxFindMenuItemId(wxFrame *frame, const wxString& menuString, const wxString& itemString); | |
28629 | ||
28630 | ||
28631 | ||
28632 | wxWindow* wxGenericFindWindowAtPoint(const wxPoint& pt); | |
28633 | wxWindow* wxFindWindowAtPoint(const wxPoint& pt); | |
28634 | ||
28635 | ||
28636 | ||
28637 | ||
28638 | ||
28639 | ||
28640 | wxWindow* wxFindWindowByLabel(const wxString& title, wxWindow *parent = (wxWindow *) __null); | |
28641 | ||
28642 | ||
28643 | ||
28644 | ||
28645 | wxWindow* wxFindWindowByName(const wxString& name, wxWindow *parent = (wxWindow *) __null); | |
28646 | ||
28647 | ||
28648 | ||
28649 | ||
28650 | ||
28651 | ||
28652 | bool wxSafeYield(wxWindow *win = __null, bool onlyIfNeeded = false); | |
28653 | ||
28654 | ||
28655 | void wxEnableTopLevelWindows(bool enable = true); | |
28656 | ||
28657 | ||
28658 | ||
28659 | bool wxCheckForInterrupt(wxWindow *wnd); | |
28660 | ||
28661 | ||
28662 | void wxFlushEvents(); | |
28663 | ||
28664 | ||
28665 | ||
28666 | class wxWindowDisabler | |
28667 | { | |
28668 | public: | |
28669 | wxWindowDisabler(wxWindow *winToSkip = (wxWindow *)__null); | |
28670 | ~wxWindowDisabler(); | |
28671 | ||
28672 | private: | |
28673 | wxWindowList *m_winDisabled; | |
28674 | ||
28675 | private: wxWindowDisabler(const wxWindowDisabler&); wxWindowDisabler& operator=(const wxWindowDisabler&); | |
28676 | }; | |
28677 | ||
28678 | ||
28679 | ||
28680 | ||
28681 | ||
28682 | ||
28683 | class wxCursor; | |
28684 | extern wxCursor* wxHOURGLASS_CURSOR; | |
28685 | void wxBeginBusyCursor(wxCursor *cursor = wxHOURGLASS_CURSOR); | |
28686 | ||
28687 | ||
28688 | void wxEndBusyCursor(); | |
28689 | ||
28690 | ||
28691 | bool wxIsBusy(); | |
28692 | ||
28693 | ||
28694 | class wxBusyCursor | |
28695 | { | |
28696 | public: | |
28697 | wxBusyCursor(wxCursor* cursor = wxHOURGLASS_CURSOR) | |
28698 | { wxBeginBusyCursor(cursor); } | |
28699 | ~wxBusyCursor() | |
28700 | { wxEndBusyCursor(); } | |
28701 | ||
28702 | ||
28703 | ||
28704 | ||
28705 | ||
28706 | ||
28707 | static const wxCursor &GetStoredCursor(); | |
28708 | static const wxCursor GetBusyCursor(); | |
28709 | }; | |
28710 | # 580 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/utils.h" | |
28711 | void wxGetMousePosition( int* x, int* y ); | |
28712 | # 594 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/utils.h" | |
28713 | void *wxGetDisplay(); | |
28714 | # 623 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/utils.h" | |
28715 | bool wxYield(); | |
28716 | ||
28717 | ||
28718 | bool wxYieldIfNeeded(); | |
28719 | # 38 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/cursor.h" 2 | |
28720 | # 56 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/cursor.h" | |
28721 | class wxBusyCursorSuspender | |
28722 | { | |
28723 | public: | |
28724 | wxBusyCursorSuspender() | |
28725 | { | |
28726 | if( wxIsBusy() ) | |
28727 | { | |
28728 | wxSetCursor( wxBusyCursor::GetStoredCursor() ); | |
28729 | } | |
28730 | } | |
28731 | ~wxBusyCursorSuspender() | |
28732 | { | |
28733 | if( wxIsBusy() ) | |
28734 | { | |
28735 | wxSetCursor( wxBusyCursor::GetBusyCursor() ); | |
28736 | } | |
28737 | } | |
28738 | }; | |
28739 | # 33 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" 2 | |
28740 | ||
28741 | ||
28742 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/thread.h" 1 | |
28743 | # 39 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/thread.h" | |
28744 | enum wxMutexError | |
28745 | { | |
28746 | wxMUTEX_NO_ERROR = 0, | |
28747 | wxMUTEX_INVALID, | |
28748 | wxMUTEX_DEAD_LOCK, | |
28749 | wxMUTEX_BUSY, | |
28750 | wxMUTEX_UNLOCKED, | |
28751 | wxMUTEX_MISC_ERROR | |
28752 | }; | |
28753 | ||
28754 | enum wxCondError | |
28755 | { | |
28756 | wxCOND_NO_ERROR = 0, | |
28757 | wxCOND_INVALID, | |
28758 | wxCOND_TIMEOUT, | |
28759 | wxCOND_MISC_ERROR | |
28760 | }; | |
28761 | ||
28762 | enum wxSemaError | |
28763 | { | |
28764 | wxSEMA_NO_ERROR = 0, | |
28765 | wxSEMA_INVALID, | |
28766 | wxSEMA_BUSY, | |
28767 | wxSEMA_TIMEOUT, | |
28768 | wxSEMA_OVERFLOW, | |
28769 | wxSEMA_MISC_ERROR | |
28770 | }; | |
28771 | ||
28772 | enum wxThreadError | |
28773 | { | |
28774 | wxTHREAD_NO_ERROR = 0, | |
28775 | wxTHREAD_NO_RESOURCE, | |
28776 | wxTHREAD_RUNNING, | |
28777 | wxTHREAD_NOT_RUNNING, | |
28778 | wxTHREAD_KILLED, | |
28779 | wxTHREAD_MISC_ERROR | |
28780 | }; | |
28781 | ||
28782 | enum wxThreadKind | |
28783 | { | |
28784 | wxTHREAD_DETACHED, | |
28785 | wxTHREAD_JOINABLE | |
28786 | }; | |
28787 | ||
28788 | ||
28789 | enum | |
28790 | { | |
28791 | WXTHREAD_MIN_PRIORITY = 0u, | |
28792 | WXTHREAD_DEFAULT_PRIORITY = 50u, | |
28793 | WXTHREAD_MAX_PRIORITY = 100u | |
28794 | }; | |
28795 | # 107 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/thread.h" | |
28796 | enum wxMutexType | |
28797 | { | |
28798 | ||
28799 | wxMUTEX_DEFAULT, | |
28800 | ||
28801 | ||
28802 | wxMUTEX_RECURSIVE | |
28803 | }; | |
28804 | ||
28805 | ||
28806 | class wxThreadHelper; | |
28807 | class wxConditionInternal; | |
28808 | class wxMutexInternal; | |
28809 | class wxSemaphoreInternal; | |
28810 | class wxThreadInternal; | |
28811 | # 132 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/thread.h" | |
28812 | class wxMutex | |
28813 | { | |
28814 | public: | |
28815 | ||
28816 | ||
28817 | ||
28818 | ||
28819 | wxMutex(wxMutexType mutexType = wxMUTEX_DEFAULT); | |
28820 | ||
28821 | ||
28822 | ~wxMutex(); | |
28823 | ||
28824 | ||
28825 | bool IsOk() const; | |
28826 | # 155 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/thread.h" | |
28827 | wxMutexError Lock(); | |
28828 | ||
28829 | ||
28830 | ||
28831 | wxMutexError TryLock(); | |
28832 | ||
28833 | ||
28834 | wxMutexError Unlock(); | |
28835 | ||
28836 | protected: | |
28837 | wxMutexInternal *m_internal; | |
28838 | ||
28839 | friend class wxConditionInternal; | |
28840 | ||
28841 | private: wxMutex(const wxMutex&); wxMutex& operator=(const wxMutex&); | |
28842 | }; | |
28843 | ||
28844 | ||
28845 | ||
28846 | ||
28847 | class wxMutexLocker | |
28848 | { | |
28849 | public: | |
28850 | ||
28851 | wxMutexLocker(wxMutex& mutex) | |
28852 | : m_isOk(false), m_mutex(mutex) | |
28853 | { m_isOk = ( m_mutex.Lock() == wxMUTEX_NO_ERROR ); } | |
28854 | ||
28855 | ||
28856 | bool IsOk() const | |
28857 | { return m_isOk; } | |
28858 | ||
28859 | ||
28860 | ~wxMutexLocker() | |
28861 | { if ( IsOk() ) m_mutex.Unlock(); } | |
28862 | ||
28863 | private: | |
28864 | ||
28865 | wxMutexLocker(const wxMutexLocker&); | |
28866 | wxMutexLocker& operator=(const wxMutexLocker&); | |
28867 | ||
28868 | bool m_isOk; | |
28869 | wxMutex& m_mutex; | |
28870 | }; | |
28871 | # 224 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/thread.h" | |
28872 | class wxCriticalSection | |
28873 | { | |
28874 | public: | |
28875 | ||
28876 | inline wxCriticalSection(); | |
28877 | inline ~wxCriticalSection(); | |
28878 | ||
28879 | ||
28880 | inline void Enter(); | |
28881 | ||
28882 | ||
28883 | inline void Leave(); | |
28884 | ||
28885 | private: | |
28886 | ||
28887 | wxMutex m_mutex; | |
28888 | # 268 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/thread.h" | |
28889 | private: wxCriticalSection(const wxCriticalSection&); wxCriticalSection& operator=(const wxCriticalSection&); | |
28890 | }; | |
28891 | ||
28892 | ||
28893 | ||
28894 | inline wxCriticalSection::wxCriticalSection() { } | |
28895 | inline wxCriticalSection::~wxCriticalSection() { } | |
28896 | ||
28897 | inline void wxCriticalSection::Enter() { (void)m_mutex.Lock(); } | |
28898 | inline void wxCriticalSection::Leave() { (void)m_mutex.Unlock(); } | |
28899 | ||
28900 | ||
28901 | ||
28902 | ||
28903 | ||
28904 | ||
28905 | ||
28906 | class wxCriticalSectionLocker | |
28907 | { | |
28908 | public: | |
28909 | wxCriticalSectionLocker(wxCriticalSection& cs) | |
28910 | : m_critsect(cs) | |
28911 | { | |
28912 | m_critsect.Enter(); | |
28913 | } | |
28914 | ||
28915 | ~wxCriticalSectionLocker() | |
28916 | { | |
28917 | m_critsect.Leave(); | |
28918 | } | |
28919 | ||
28920 | private: | |
28921 | wxCriticalSection& m_critsect; | |
28922 | ||
28923 | private: wxCriticalSectionLocker(const wxCriticalSectionLocker&); wxCriticalSectionLocker& operator=(const wxCriticalSectionLocker&); | |
28924 | }; | |
28925 | ||
28926 | ||
28927 | ||
28928 | ||
28929 | ||
28930 | ||
28931 | class wxCondition | |
28932 | { | |
28933 | public: | |
28934 | ||
28935 | ||
28936 | wxCondition(wxMutex& mutex); | |
28937 | ||
28938 | ||
28939 | ~wxCondition(); | |
28940 | ||
28941 | ||
28942 | bool IsOk() const; | |
28943 | ||
28944 | ||
28945 | ||
28946 | ||
28947 | ||
28948 | ||
28949 | ||
28950 | wxCondError Wait(); | |
28951 | # 338 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/thread.h" | |
28952 | wxCondError WaitTimeout(unsigned long milliseconds); | |
28953 | ||
28954 | ||
28955 | ||
28956 | ||
28957 | ||
28958 | ||
28959 | ||
28960 | wxCondError Signal(); | |
28961 | ||
28962 | ||
28963 | ||
28964 | ||
28965 | ||
28966 | ||
28967 | ||
28968 | wxCondError Broadcast(); | |
28969 | ||
28970 | ||
28971 | ||
28972 | bool Wait(unsigned long milliseconds) | |
28973 | { return WaitTimeout(milliseconds) == wxCOND_NO_ERROR; } | |
28974 | ||
28975 | private: | |
28976 | wxConditionInternal *m_internal; | |
28977 | ||
28978 | private: wxCondition(const wxCondition&); wxCondition& operator=(const wxCondition&); | |
28979 | }; | |
28980 | ||
28981 | ||
28982 | ||
28983 | ||
28984 | ||
28985 | ||
28986 | class wxSemaphore | |
28987 | { | |
28988 | public: | |
28989 | ||
28990 | ||
28991 | wxSemaphore( int initialcount = 0, int maxcount = 0 ); | |
28992 | ||
28993 | ||
28994 | ~wxSemaphore(); | |
28995 | ||
28996 | ||
28997 | bool IsOk() const; | |
28998 | ||
28999 | ||
29000 | ||
29001 | ||
29002 | wxSemaError Wait(); | |
29003 | ||
29004 | ||
29005 | ||
29006 | wxSemaError TryWait(); | |
29007 | ||
29008 | ||
29009 | ||
29010 | wxSemaError WaitTimeout(unsigned long milliseconds); | |
29011 | ||
29012 | ||
29013 | wxSemaError Post(); | |
29014 | ||
29015 | private: | |
29016 | wxSemaphoreInternal *m_internal; | |
29017 | ||
29018 | private: wxSemaphore(const wxSemaphore&); wxSemaphore& operator=(const wxSemaphore&); | |
29019 | }; | |
29020 | # 424 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/thread.h" | |
29021 | typedef unsigned long wxThreadIdType; | |
29022 | ||
29023 | ||
29024 | class wxThread | |
29025 | { | |
29026 | public: | |
29027 | ||
29028 | typedef void *ExitCode; | |
29029 | ||
29030 | ||
29031 | ||
29032 | ||
29033 | ||
29034 | ||
29035 | ||
29036 | static wxThread *This(); | |
29037 | ||
29038 | ||
29039 | static bool IsMain(); | |
29040 | ||
29041 | ||
29042 | static void Yield(); | |
29043 | ||
29044 | ||
29045 | ||
29046 | ||
29047 | static void Sleep(unsigned long milliseconds); | |
29048 | ||
29049 | ||
29050 | ||
29051 | ||
29052 | ||
29053 | static int GetCPUCount(); | |
29054 | ||
29055 | ||
29056 | ||
29057 | ||
29058 | static wxThreadIdType GetCurrentId(); | |
29059 | # 470 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/thread.h" | |
29060 | static bool SetConcurrency(size_t level); | |
29061 | ||
29062 | ||
29063 | ||
29064 | wxThread(wxThreadKind kind = wxTHREAD_DETACHED); | |
29065 | # 484 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/thread.h" | |
29066 | wxThreadError Create(unsigned int stackSize = 0); | |
29067 | ||
29068 | ||
29069 | ||
29070 | ||
29071 | wxThreadError Run(); | |
29072 | # 501 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/thread.h" | |
29073 | wxThreadError Delete(ExitCode *rc = (ExitCode *)__null); | |
29074 | ||
29075 | ||
29076 | ||
29077 | ||
29078 | ||
29079 | ExitCode Wait(); | |
29080 | # 517 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/thread.h" | |
29081 | wxThreadError Kill(); | |
29082 | ||
29083 | ||
29084 | ||
29085 | wxThreadError Pause(); | |
29086 | ||
29087 | ||
29088 | wxThreadError Resume(); | |
29089 | ||
29090 | ||
29091 | ||
29092 | ||
29093 | ||
29094 | void SetPriority(unsigned int prio); | |
29095 | ||
29096 | ||
29097 | unsigned int GetPriority() const; | |
29098 | ||
29099 | ||
29100 | ||
29101 | bool IsAlive() const; | |
29102 | ||
29103 | bool IsRunning() const; | |
29104 | ||
29105 | bool IsPaused() const; | |
29106 | ||
29107 | ||
29108 | bool IsDetached() const { return m_isDetached; } | |
29109 | ||
29110 | ||
29111 | ||
29112 | wxThreadIdType GetId() const; | |
29113 | ||
29114 | ||
29115 | ||
29116 | ||
29117 | virtual void OnExit() { } | |
29118 | ||
29119 | ||
29120 | ||
29121 | ||
29122 | virtual bool TestDestroy(); | |
29123 | ||
29124 | ||
29125 | ||
29126 | virtual ~wxThread(); | |
29127 | ||
29128 | protected: | |
29129 | ||
29130 | void Exit(ExitCode exitcode = 0); | |
29131 | ||
29132 | ||
29133 | ||
29134 | virtual void *Entry() = 0; | |
29135 | ||
29136 | private: | |
29137 | ||
29138 | wxThread(const wxThread&); | |
29139 | wxThread& operator=(const wxThread&); | |
29140 | ||
29141 | friend class wxThreadInternal; | |
29142 | ||
29143 | ||
29144 | wxThreadInternal *m_internal; | |
29145 | ||
29146 | ||
29147 | wxCriticalSection m_critsect; | |
29148 | ||
29149 | ||
29150 | bool m_isDetached; | |
29151 | }; | |
29152 | ||
29153 | ||
29154 | ||
29155 | ||
29156 | class wxThreadHelperThread : public wxThread | |
29157 | { | |
29158 | public: | |
29159 | ||
29160 | ||
29161 | wxThreadHelperThread(wxThreadHelper& owner) | |
29162 | : wxThread(wxTHREAD_JOINABLE), m_owner(owner) | |
29163 | { } | |
29164 | ||
29165 | protected: | |
29166 | ||
29167 | virtual void *Entry(); | |
29168 | ||
29169 | private: | |
29170 | ||
29171 | wxThreadHelper& m_owner; | |
29172 | ||
29173 | ||
29174 | wxThreadHelperThread(const wxThreadHelperThread&); | |
29175 | wxThreadHelperThread& operator=(const wxThreadHelperThread&); | |
29176 | }; | |
29177 | ||
29178 | ||
29179 | ||
29180 | ||
29181 | ||
29182 | ||
29183 | ||
29184 | class wxThreadHelper | |
29185 | { | |
29186 | private: | |
29187 | void KillThread() | |
29188 | { | |
29189 | if ( m_thread ) | |
29190 | { | |
29191 | m_thread->Kill(); | |
29192 | delete m_thread; | |
29193 | } | |
29194 | } | |
29195 | ||
29196 | public: | |
29197 | ||
29198 | wxThreadHelper() : m_thread(__null) { } | |
29199 | ||
29200 | ||
29201 | virtual ~wxThreadHelper() { KillThread(); } | |
29202 | ||
29203 | ||
29204 | ||
29205 | wxThreadError Create(unsigned int stackSize = 0) | |
29206 | { | |
29207 | KillThread(); | |
29208 | ||
29209 | m_thread = new wxThreadHelperThread(*this); | |
29210 | ||
29211 | return m_thread->Create(stackSize); | |
29212 | } | |
29213 | ||
29214 | ||
29215 | ||
29216 | virtual void *Entry() = 0; | |
29217 | ||
29218 | ||
29219 | wxThread *GetThread() const { return m_thread; } | |
29220 | ||
29221 | protected: | |
29222 | wxThread *m_thread; | |
29223 | }; | |
29224 | ||
29225 | ||
29226 | inline void *wxThreadHelperThread::Entry() | |
29227 | { | |
29228 | return m_owner.Entry(); | |
29229 | } | |
29230 | ||
29231 | ||
29232 | ||
29233 | ||
29234 | ||
29235 | ||
29236 | void wxMutexGuiEnter(); | |
29237 | void wxMutexGuiLeave(); | |
29238 | # 685 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/thread.h" | |
29239 | inline bool wxIsMainThread() { return wxThread::IsMain(); } | |
29240 | # 728 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/thread.h" | |
29241 | class wxMutexGuiLocker | |
29242 | { | |
29243 | public: | |
29244 | wxMutexGuiLocker() { wxMutexGuiEnter(); } | |
29245 | ~wxMutexGuiLocker() { wxMutexGuiLeave(); } | |
29246 | }; | |
29247 | # 36 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" 2 | |
29248 | ||
29249 | ||
29250 | ||
29251 | ||
29252 | ||
29253 | ||
29254 | ||
29255 | class wxList; | |
29256 | ||
29257 | ||
29258 | class wxDC; | |
29259 | class wxMenu; | |
29260 | class wxWindow; | |
29261 | class wxWindowBase; | |
29262 | ||
29263 | ||
29264 | class wxEvtHandler; | |
29265 | ||
29266 | ||
29267 | ||
29268 | ||
29269 | ||
29270 | typedef int wxEventType; | |
29271 | # 122 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
29272 | extern wxEventType wxNewEventType(); | |
29273 | ||
29274 | ||
29275 | ||
29276 | ||
29277 | # 135 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
29278 | extern const wxEventType wxEVT_NULL; | |
29279 | extern const wxEventType wxEVT_FIRST; | |
29280 | extern const wxEventType wxEVT_USER_FIRST; | |
29281 | ||
29282 | ||
29283 | extern const wxEventType wxEVT_COMMAND_BUTTON_CLICKED; | |
29284 | extern const wxEventType wxEVT_COMMAND_CHECKBOX_CLICKED; | |
29285 | extern const wxEventType wxEVT_COMMAND_CHOICE_SELECTED; | |
29286 | extern const wxEventType wxEVT_COMMAND_LISTBOX_SELECTED; | |
29287 | extern const wxEventType wxEVT_COMMAND_LISTBOX_DOUBLECLICKED; | |
29288 | extern const wxEventType wxEVT_COMMAND_CHECKLISTBOX_TOGGLED; | |
29289 | ||
29290 | ||
29291 | ||
29292 | ||
29293 | ||
29294 | ||
29295 | ||
29296 | extern const wxEventType wxEVT_COMMAND_MENU_SELECTED; | |
29297 | extern const wxEventType wxEVT_COMMAND_SLIDER_UPDATED; | |
29298 | extern const wxEventType wxEVT_COMMAND_RADIOBOX_SELECTED; | |
29299 | extern const wxEventType wxEVT_COMMAND_RADIOBUTTON_SELECTED; | |
29300 | ||
29301 | ||
29302 | ||
29303 | ||
29304 | extern const wxEventType wxEVT_COMMAND_SCROLLBAR_UPDATED; | |
29305 | extern const wxEventType wxEVT_COMMAND_VLBOX_SELECTED; | |
29306 | extern const wxEventType wxEVT_COMMAND_COMBOBOX_SELECTED; | |
29307 | extern const wxEventType wxEVT_COMMAND_TOOL_RCLICKED; | |
29308 | extern const wxEventType wxEVT_COMMAND_TOOL_ENTER; | |
29309 | extern const wxEventType wxEVT_COMMAND_SPINCTRL_UPDATED; | |
29310 | ||
29311 | ||
29312 | extern const wxEventType wxEVT_SOCKET; | |
29313 | extern const wxEventType wxEVT_TIMER; | |
29314 | ||
29315 | ||
29316 | extern const wxEventType wxEVT_LEFT_DOWN; | |
29317 | extern const wxEventType wxEVT_LEFT_UP; | |
29318 | extern const wxEventType wxEVT_MIDDLE_DOWN; | |
29319 | extern const wxEventType wxEVT_MIDDLE_UP; | |
29320 | extern const wxEventType wxEVT_RIGHT_DOWN; | |
29321 | extern const wxEventType wxEVT_RIGHT_UP; | |
29322 | extern const wxEventType wxEVT_MOTION; | |
29323 | extern const wxEventType wxEVT_ENTER_WINDOW; | |
29324 | extern const wxEventType wxEVT_LEAVE_WINDOW; | |
29325 | extern const wxEventType wxEVT_LEFT_DCLICK; | |
29326 | extern const wxEventType wxEVT_MIDDLE_DCLICK; | |
29327 | extern const wxEventType wxEVT_RIGHT_DCLICK; | |
29328 | extern const wxEventType wxEVT_SET_FOCUS; | |
29329 | extern const wxEventType wxEVT_KILL_FOCUS; | |
29330 | extern const wxEventType wxEVT_CHILD_FOCUS; | |
29331 | extern const wxEventType wxEVT_MOUSEWHEEL; | |
29332 | ||
29333 | ||
29334 | extern const wxEventType wxEVT_NC_LEFT_DOWN; | |
29335 | extern const wxEventType wxEVT_NC_LEFT_UP; | |
29336 | extern const wxEventType wxEVT_NC_MIDDLE_DOWN; | |
29337 | extern const wxEventType wxEVT_NC_MIDDLE_UP; | |
29338 | extern const wxEventType wxEVT_NC_RIGHT_DOWN; | |
29339 | extern const wxEventType wxEVT_NC_RIGHT_UP; | |
29340 | extern const wxEventType wxEVT_NC_MOTION; | |
29341 | extern const wxEventType wxEVT_NC_ENTER_WINDOW; | |
29342 | extern const wxEventType wxEVT_NC_LEAVE_WINDOW; | |
29343 | extern const wxEventType wxEVT_NC_LEFT_DCLICK; | |
29344 | extern const wxEventType wxEVT_NC_MIDDLE_DCLICK; | |
29345 | extern const wxEventType wxEVT_NC_RIGHT_DCLICK; | |
29346 | ||
29347 | ||
29348 | extern const wxEventType wxEVT_CHAR; | |
29349 | extern const wxEventType wxEVT_CHAR_HOOK; | |
29350 | extern const wxEventType wxEVT_NAVIGATION_KEY; | |
29351 | extern const wxEventType wxEVT_KEY_DOWN; | |
29352 | extern const wxEventType wxEVT_KEY_UP; | |
29353 | ||
29354 | ||
29355 | ||
29356 | ||
29357 | extern const wxEventType wxEVT_SET_CURSOR; | |
29358 | ||
29359 | ||
29360 | extern const wxEventType wxEVT_SCROLL_TOP; | |
29361 | extern const wxEventType wxEVT_SCROLL_BOTTOM; | |
29362 | extern const wxEventType wxEVT_SCROLL_LINEUP; | |
29363 | extern const wxEventType wxEVT_SCROLL_LINEDOWN; | |
29364 | extern const wxEventType wxEVT_SCROLL_PAGEUP; | |
29365 | extern const wxEventType wxEVT_SCROLL_PAGEDOWN; | |
29366 | extern const wxEventType wxEVT_SCROLL_THUMBTRACK; | |
29367 | extern const wxEventType wxEVT_SCROLL_THUMBRELEASE; | |
29368 | ||
29369 | extern const wxEventType wxEVT_SCROLL_CHANGED; | |
29370 | ||
29371 | ||
29372 | ||
29373 | extern const wxEventType wxEVT_SCROLLWIN_TOP; | |
29374 | extern const wxEventType wxEVT_SCROLLWIN_BOTTOM; | |
29375 | extern const wxEventType wxEVT_SCROLLWIN_LINEUP; | |
29376 | extern const wxEventType wxEVT_SCROLLWIN_LINEDOWN; | |
29377 | extern const wxEventType wxEVT_SCROLLWIN_PAGEUP; | |
29378 | extern const wxEventType wxEVT_SCROLLWIN_PAGEDOWN; | |
29379 | extern const wxEventType wxEVT_SCROLLWIN_THUMBTRACK; | |
29380 | extern const wxEventType wxEVT_SCROLLWIN_THUMBRELEASE; | |
29381 | ||
29382 | ||
29383 | extern const wxEventType wxEVT_SIZE; | |
29384 | extern const wxEventType wxEVT_MOVE; | |
29385 | extern const wxEventType wxEVT_CLOSE_WINDOW; | |
29386 | extern const wxEventType wxEVT_END_SESSION; | |
29387 | extern const wxEventType wxEVT_QUERY_END_SESSION; | |
29388 | extern const wxEventType wxEVT_ACTIVATE_APP; | |
29389 | extern const wxEventType wxEVT_POWER; | |
29390 | extern const wxEventType wxEVT_ACTIVATE; | |
29391 | extern const wxEventType wxEVT_CREATE; | |
29392 | extern const wxEventType wxEVT_DESTROY; | |
29393 | extern const wxEventType wxEVT_SHOW; | |
29394 | extern const wxEventType wxEVT_ICONIZE; | |
29395 | extern const wxEventType wxEVT_MAXIMIZE; | |
29396 | extern const wxEventType wxEVT_MOUSE_CAPTURE_CHANGED; | |
29397 | extern const wxEventType wxEVT_PAINT; | |
29398 | extern const wxEventType wxEVT_ERASE_BACKGROUND; | |
29399 | extern const wxEventType wxEVT_NC_PAINT; | |
29400 | extern const wxEventType wxEVT_PAINT_ICON; | |
29401 | extern const wxEventType wxEVT_MENU_OPEN; | |
29402 | extern const wxEventType wxEVT_MENU_CLOSE; | |
29403 | extern const wxEventType wxEVT_MENU_HIGHLIGHT; | |
29404 | ||
29405 | extern const wxEventType wxEVT_CONTEXT_MENU; | |
29406 | extern const wxEventType wxEVT_SYS_COLOUR_CHANGED; | |
29407 | extern const wxEventType wxEVT_DISPLAY_CHANGED; | |
29408 | extern const wxEventType wxEVT_SETTING_CHANGED; | |
29409 | extern const wxEventType wxEVT_QUERY_NEW_PALETTE; | |
29410 | extern const wxEventType wxEVT_PALETTE_CHANGED; | |
29411 | extern const wxEventType wxEVT_JOY_BUTTON_DOWN; | |
29412 | extern const wxEventType wxEVT_JOY_BUTTON_UP; | |
29413 | extern const wxEventType wxEVT_JOY_MOVE; | |
29414 | extern const wxEventType wxEVT_JOY_ZMOVE; | |
29415 | extern const wxEventType wxEVT_DROP_FILES; | |
29416 | extern const wxEventType wxEVT_DRAW_ITEM; | |
29417 | extern const wxEventType wxEVT_MEASURE_ITEM; | |
29418 | extern const wxEventType wxEVT_COMPARE_ITEM; | |
29419 | extern const wxEventType wxEVT_INIT_DIALOG; | |
29420 | extern const wxEventType wxEVT_IDLE; | |
29421 | extern const wxEventType wxEVT_UPDATE_UI; | |
29422 | extern const wxEventType wxEVT_SIZING; | |
29423 | extern const wxEventType wxEVT_MOVING; | |
29424 | extern const wxEventType wxEVT_HIBERNATE; | |
29425 | ||
29426 | ||
29427 | ||
29428 | extern const wxEventType wxEVT_COMMAND_LEFT_CLICK; | |
29429 | extern const wxEventType wxEVT_COMMAND_LEFT_DCLICK; | |
29430 | extern const wxEventType wxEVT_COMMAND_RIGHT_CLICK; | |
29431 | extern const wxEventType wxEVT_COMMAND_RIGHT_DCLICK; | |
29432 | extern const wxEventType wxEVT_COMMAND_SET_FOCUS; | |
29433 | extern const wxEventType wxEVT_COMMAND_KILL_FOCUS; | |
29434 | extern const wxEventType wxEVT_COMMAND_ENTER; | |
29435 | ||
29436 | ||
29437 | extern const wxEventType wxEVT_HELP; | |
29438 | extern const wxEventType wxEVT_DETAILED_HELP; | |
29439 | ||
29440 | ||
29441 | # 311 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
29442 | extern const wxEventType wxEVT_COMMAND_TEXT_UPDATED; | |
29443 | ||
29444 | ||
29445 | ||
29446 | ||
29447 | enum Propagation_state | |
29448 | { | |
29449 | ||
29450 | wxEVENT_PROPAGATE_NONE = 0, | |
29451 | ||
29452 | ||
29453 | wxEVENT_PROPAGATE_MAX = 2147483647 | |
29454 | }; | |
29455 | # 337 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
29456 | class wxEvent : public wxObject | |
29457 | { | |
29458 | private: | |
29459 | wxEvent& operator=(const wxEvent&); | |
29460 | ||
29461 | protected: | |
29462 | wxEvent(const wxEvent&); | |
29463 | ||
29464 | public: | |
29465 | wxEvent(int winid = 0, wxEventType commandType = wxEVT_NULL ); | |
29466 | ||
29467 | void SetEventType(wxEventType typ) { m_eventType = typ; } | |
29468 | wxEventType GetEventType() const { return m_eventType; } | |
29469 | wxObject *GetEventObject() const { return m_eventObject; } | |
29470 | void SetEventObject(wxObject *obj) { m_eventObject = obj; } | |
29471 | long GetTimestamp() const { return m_timeStamp; } | |
29472 | void SetTimestamp(long ts = 0) { m_timeStamp = ts; } | |
29473 | int GetId() const { return m_id; } | |
29474 | void SetId(int Id) { m_id = Id; } | |
29475 | ||
29476 | ||
29477 | ||
29478 | ||
29479 | ||
29480 | void Skip(bool skip = true) { m_skipped = skip; } | |
29481 | bool GetSkipped() const { return m_skipped; }; | |
29482 | ||
29483 | ||
29484 | ||
29485 | ||
29486 | virtual wxEvent *Clone() const = 0; | |
29487 | ||
29488 | ||
29489 | ||
29490 | bool IsCommandEvent() const { return m_isCommandEvent; } | |
29491 | ||
29492 | ||
29493 | bool ShouldPropagate() const | |
29494 | { return m_propagationLevel != wxEVENT_PROPAGATE_NONE; } | |
29495 | ||
29496 | ||
29497 | ||
29498 | int StopPropagation() | |
29499 | { | |
29500 | int propagationLevel = m_propagationLevel; | |
29501 | m_propagationLevel = wxEVENT_PROPAGATE_NONE; | |
29502 | return propagationLevel; | |
29503 | } | |
29504 | ||
29505 | ||
29506 | ||
29507 | void ResumePropagation(int propagationLevel) | |
29508 | { | |
29509 | m_propagationLevel = propagationLevel; | |
29510 | } | |
29511 | ||
29512 | ||
29513 | public: | |
29514 | ||
29515 | ||
29516 | ||
29517 | wxObject* m_eventObject; | |
29518 | wxEventType m_eventType; | |
29519 | long m_timeStamp; | |
29520 | int m_id; | |
29521 | ||
29522 | public: | |
29523 | ||
29524 | wxObject* m_callbackUserData; | |
29525 | ||
29526 | protected: | |
29527 | ||
29528 | ||
29529 | ||
29530 | ||
29531 | ||
29532 | int m_propagationLevel; | |
29533 | ||
29534 | ||
29535 | public: | |
29536 | ||
29537 | ||
29538 | ||
29539 | bool m_skipped; | |
29540 | bool m_isCommandEvent; | |
29541 | ||
29542 | private: | |
29543 | ||
29544 | friend class wxPropagateOnce; | |
29545 | ||
29546 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; | |
29547 | }; | |
29548 | ||
29549 | ||
29550 | ||
29551 | ||
29552 | class wxPropagationDisabler | |
29553 | { | |
29554 | public: | |
29555 | wxPropagationDisabler(wxEvent& event) : m_event(event) | |
29556 | { | |
29557 | m_propagationLevelOld = m_event.StopPropagation(); | |
29558 | } | |
29559 | ||
29560 | ~wxPropagationDisabler() | |
29561 | { | |
29562 | m_event.ResumePropagation(m_propagationLevelOld); | |
29563 | } | |
29564 | ||
29565 | private: | |
29566 | wxEvent& m_event; | |
29567 | int m_propagationLevelOld; | |
29568 | ||
29569 | private: wxPropagationDisabler(const wxPropagationDisabler&); wxPropagationDisabler& operator=(const wxPropagationDisabler&); | |
29570 | }; | |
29571 | ||
29572 | ||
29573 | ||
29574 | ||
29575 | class wxPropagateOnce | |
29576 | { | |
29577 | public: | |
29578 | wxPropagateOnce(wxEvent& event) : m_event(event) | |
29579 | { | |
29580 | ; | |
29581 | ||
29582 | ||
29583 | m_event.m_propagationLevel--; | |
29584 | } | |
29585 | ||
29586 | ~wxPropagateOnce() | |
29587 | { | |
29588 | m_event.m_propagationLevel++; | |
29589 | } | |
29590 | ||
29591 | private: | |
29592 | wxEvent& m_event; | |
29593 | ||
29594 | private: wxPropagateOnce(const wxPropagateOnce&); wxPropagateOnce& operator=(const wxPropagateOnce&); | |
29595 | }; | |
29596 | # 502 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
29597 | class wxCommandEvent; | |
29598 | ||
29599 | class wxCommandEventStringHelper | |
29600 | { | |
29601 | public: | |
29602 | wxCommandEventStringHelper(wxCommandEvent * evt) | |
29603 | : m_evt(evt) | |
29604 | { } | |
29605 | ||
29606 | void operator=(const wxString &str); | |
29607 | operator wxString(); | |
29608 | const wxChar* c_str() const; | |
29609 | ||
29610 | private: | |
29611 | wxCommandEvent* m_evt; | |
29612 | }; | |
29613 | # 528 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
29614 | class wxCommandEvent : public wxEvent | |
29615 | { | |
29616 | public: | |
29617 | wxCommandEvent(wxEventType commandType = wxEVT_NULL, int winid = 0); | |
29618 | ||
29619 | wxCommandEvent(const wxCommandEvent& event) | |
29620 | : wxEvent(event), | |
29621 | ||
29622 | m_commandString(this), | |
29623 | ||
29624 | m_cmdString(event.m_cmdString), | |
29625 | m_commandInt(event.m_commandInt), | |
29626 | m_extraLong(event.m_extraLong), | |
29627 | m_clientData(event.m_clientData), | |
29628 | m_clientObject(event.m_clientObject) | |
29629 | { } | |
29630 | ||
29631 | ||
29632 | void SetClientData(void* clientData) { m_clientData = clientData; } | |
29633 | void *GetClientData() const { return m_clientData; } | |
29634 | ||
29635 | ||
29636 | void SetClientObject(wxClientData* clientObject) { m_clientObject = clientObject; } | |
29637 | wxClientData *GetClientObject() const { return m_clientObject; } | |
29638 | ||
29639 | ||
29640 | int GetSelection() const { return m_commandInt; } | |
29641 | ||
29642 | ||
29643 | void SetString(const wxString& s) { m_cmdString = s; } | |
29644 | wxString GetString() const; | |
29645 | ||
29646 | ||
29647 | bool IsChecked() const { return m_commandInt != 0; } | |
29648 | ||
29649 | ||
29650 | bool IsSelection() const { return (m_extraLong != 0); } | |
29651 | ||
29652 | void SetExtraLong(long extraLong) { m_extraLong = extraLong; } | |
29653 | long GetExtraLong() const { return m_extraLong; } | |
29654 | ||
29655 | void SetInt(int i) { m_commandInt = i; } | |
29656 | long GetInt() const { return m_commandInt; } | |
29657 | ||
29658 | virtual wxEvent *Clone() const { return new wxCommandEvent(*this); } | |
29659 | ||
29660 | ||
29661 | public: | |
29662 | wxCommandEventStringHelper m_commandString; | |
29663 | ||
29664 | ||
29665 | ||
29666 | wxString m_cmdString; | |
29667 | int m_commandInt; | |
29668 | long m_extraLong; | |
29669 | void* m_clientData; | |
29670 | wxClientData* m_clientObject; | |
29671 | ||
29672 | private: | |
29673 | private: wxCommandEvent& operator=(const wxCommandEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
29674 | }; | |
29675 | ||
29676 | ||
29677 | ||
29678 | ||
29679 | ||
29680 | ||
29681 | inline void wxCommandEventStringHelper::operator=(const wxString &str) | |
29682 | { | |
29683 | m_evt->SetString(str); | |
29684 | } | |
29685 | ||
29686 | inline wxCommandEventStringHelper::operator wxString() | |
29687 | { | |
29688 | return m_evt->GetString(); | |
29689 | } | |
29690 | ||
29691 | inline const wxChar* wxCommandEventStringHelper::c_str() const | |
29692 | { | |
29693 | return m_evt->GetString().c_str(); | |
29694 | } | |
29695 | ||
29696 | ||
29697 | ||
29698 | ||
29699 | class wxNotifyEvent : public wxCommandEvent | |
29700 | { | |
29701 | public: | |
29702 | wxNotifyEvent(wxEventType commandType = wxEVT_NULL, int winid = 0) | |
29703 | : wxCommandEvent(commandType, winid) | |
29704 | { m_bAllow = true; } | |
29705 | ||
29706 | wxNotifyEvent(const wxNotifyEvent& event) | |
29707 | : wxCommandEvent(event) | |
29708 | { m_bAllow = event.m_bAllow; } | |
29709 | ||
29710 | ||
29711 | void Veto() { m_bAllow = false; } | |
29712 | ||
29713 | ||
29714 | void Allow() { m_bAllow = true; } | |
29715 | ||
29716 | ||
29717 | bool IsAllowed() const { return m_bAllow; } | |
29718 | ||
29719 | virtual wxEvent *Clone() const { return new wxNotifyEvent(*this); } | |
29720 | ||
29721 | private: | |
29722 | bool m_bAllow; | |
29723 | ||
29724 | private: | |
29725 | private: wxNotifyEvent& operator=(const wxNotifyEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
29726 | }; | |
29727 | # 656 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
29728 | class wxScrollEvent : public wxCommandEvent | |
29729 | { | |
29730 | public: | |
29731 | wxScrollEvent(wxEventType commandType = wxEVT_NULL, | |
29732 | int winid = 0, int pos = 0, int orient = 0); | |
29733 | ||
29734 | int GetOrientation() const { return (int) m_extraLong; } | |
29735 | int GetPosition() const { return m_commandInt; } | |
29736 | void SetOrientation(int orient) { m_extraLong = (long) orient; } | |
29737 | void SetPosition(int pos) { m_commandInt = pos; } | |
29738 | ||
29739 | virtual wxEvent *Clone() const { return new wxScrollEvent(*this); } | |
29740 | ||
29741 | private: | |
29742 | private: wxScrollEvent& operator=(const wxScrollEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
29743 | }; | |
29744 | # 686 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
29745 | class wxScrollWinEvent : public wxEvent | |
29746 | { | |
29747 | public: | |
29748 | wxScrollWinEvent(wxEventType commandType = wxEVT_NULL, | |
29749 | int pos = 0, int orient = 0); | |
29750 | wxScrollWinEvent(const wxScrollWinEvent & event) : wxEvent(event) | |
29751 | { m_commandInt = event.m_commandInt; | |
29752 | m_extraLong = event.m_extraLong; } | |
29753 | ||
29754 | int GetOrientation() const { return (int) m_extraLong; } | |
29755 | int GetPosition() const { return m_commandInt; } | |
29756 | void SetOrientation(int orient) { m_extraLong = (long) orient; } | |
29757 | void SetPosition(int pos) { m_commandInt = pos; } | |
29758 | ||
29759 | virtual wxEvent *Clone() const { return new wxScrollWinEvent(*this); } | |
29760 | ||
29761 | ||
29762 | public: | |
29763 | ||
29764 | ||
29765 | ||
29766 | int m_commandInt; | |
29767 | long m_extraLong; | |
29768 | ||
29769 | private: | |
29770 | private: wxScrollWinEvent& operator=(const wxScrollWinEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
29771 | }; | |
29772 | # 744 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
29773 | enum | |
29774 | { | |
29775 | wxMOUSE_BTN_ANY = -1, | |
29776 | wxMOUSE_BTN_NONE = 0, | |
29777 | wxMOUSE_BTN_LEFT = 1, | |
29778 | wxMOUSE_BTN_MIDDLE = 2, | |
29779 | wxMOUSE_BTN_RIGHT = 3 | |
29780 | }; | |
29781 | ||
29782 | class wxMouseEvent : public wxEvent | |
29783 | { | |
29784 | public: | |
29785 | wxMouseEvent(wxEventType mouseType = wxEVT_NULL); | |
29786 | wxMouseEvent(const wxMouseEvent& event) : wxEvent(event) | |
29787 | { Assign(event); } | |
29788 | ||
29789 | ||
29790 | bool IsButton() const { return Button(wxMOUSE_BTN_ANY); } | |
29791 | ||
29792 | ||
29793 | bool ButtonDown(int but = wxMOUSE_BTN_ANY) const; | |
29794 | ||
29795 | ||
29796 | bool ButtonDClick(int but = wxMOUSE_BTN_ANY) const; | |
29797 | ||
29798 | ||
29799 | bool ButtonUp(int but = wxMOUSE_BTN_ANY) const; | |
29800 | ||
29801 | ||
29802 | bool Button(int but) const; | |
29803 | ||
29804 | ||
29805 | bool ButtonIsDown(int but) const; | |
29806 | ||
29807 | ||
29808 | int GetButton() const; | |
29809 | ||
29810 | ||
29811 | bool ControlDown() const { return m_controlDown; } | |
29812 | bool MetaDown() const { return m_metaDown; } | |
29813 | bool AltDown() const { return m_altDown; } | |
29814 | bool ShiftDown() const { return m_shiftDown; } | |
29815 | bool CmdDown() const | |
29816 | { | |
29817 | ||
29818 | ||
29819 | ||
29820 | return ControlDown(); | |
29821 | ||
29822 | } | |
29823 | ||
29824 | ||
29825 | bool LeftDown() const { return (m_eventType == wxEVT_LEFT_DOWN); } | |
29826 | bool MiddleDown() const { return (m_eventType == wxEVT_MIDDLE_DOWN); } | |
29827 | bool RightDown() const { return (m_eventType == wxEVT_RIGHT_DOWN); } | |
29828 | ||
29829 | bool LeftUp() const { return (m_eventType == wxEVT_LEFT_UP); } | |
29830 | bool MiddleUp() const { return (m_eventType == wxEVT_MIDDLE_UP); } | |
29831 | bool RightUp() const { return (m_eventType == wxEVT_RIGHT_UP); } | |
29832 | ||
29833 | bool LeftDClick() const { return (m_eventType == wxEVT_LEFT_DCLICK); } | |
29834 | bool MiddleDClick() const { return (m_eventType == wxEVT_MIDDLE_DCLICK); } | |
29835 | bool RightDClick() const { return (m_eventType == wxEVT_RIGHT_DCLICK); } | |
29836 | ||
29837 | ||
29838 | ||
29839 | bool LeftIsDown() const { return m_leftDown; } | |
29840 | bool MiddleIsDown() const { return m_middleDown; } | |
29841 | bool RightIsDown() const { return m_rightDown; } | |
29842 | ||
29843 | ||
29844 | bool Dragging() const | |
29845 | { | |
29846 | return (m_eventType == wxEVT_MOTION) && ButtonIsDown(wxMOUSE_BTN_ANY); | |
29847 | } | |
29848 | ||
29849 | ||
29850 | bool Moving() const | |
29851 | { | |
29852 | return (m_eventType == wxEVT_MOTION) && !ButtonIsDown(wxMOUSE_BTN_ANY); | |
29853 | } | |
29854 | ||
29855 | ||
29856 | bool Entering() const { return (m_eventType == wxEVT_ENTER_WINDOW); } | |
29857 | ||
29858 | ||
29859 | bool Leaving() const { return (m_eventType == wxEVT_LEAVE_WINDOW); } | |
29860 | ||
29861 | ||
29862 | void GetPosition(wxCoord *xpos, wxCoord *ypos) const | |
29863 | { | |
29864 | if (xpos) | |
29865 | *xpos = m_x; | |
29866 | if (ypos) | |
29867 | *ypos = m_y; | |
29868 | } | |
29869 | ||
29870 | void GetPosition(long *xpos, long *ypos) const | |
29871 | { | |
29872 | if (xpos) | |
29873 | *xpos = (long)m_x; | |
29874 | if (ypos) | |
29875 | *ypos = (long)m_y; | |
29876 | } | |
29877 | ||
29878 | ||
29879 | wxPoint GetPosition() const { return wxPoint(m_x, m_y); } | |
29880 | ||
29881 | ||
29882 | wxPoint GetLogicalPosition(const wxDC& dc) const; | |
29883 | ||
29884 | ||
29885 | wxCoord GetX() const { return m_x; } | |
29886 | ||
29887 | ||
29888 | wxCoord GetY() const { return m_y; } | |
29889 | # 868 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
29890 | int GetWheelRotation() const { return m_wheelRotation; } | |
29891 | ||
29892 | ||
29893 | ||
29894 | ||
29895 | int GetWheelDelta() const { return m_wheelDelta; } | |
29896 | ||
29897 | ||
29898 | ||
29899 | int GetLinesPerAction() const { return m_linesPerAction; } | |
29900 | ||
29901 | ||
29902 | bool IsPageScroll() const { return ((unsigned int)m_linesPerAction == (2147483647 * 2U + 1U)); } | |
29903 | ||
29904 | virtual wxEvent *Clone() const { return new wxMouseEvent(*this); } | |
29905 | ||
29906 | wxMouseEvent& operator=(const wxMouseEvent& event) { Assign(event); return *this; } | |
29907 | ||
29908 | public: | |
29909 | wxCoord m_x, m_y; | |
29910 | ||
29911 | bool m_leftDown; | |
29912 | bool m_middleDown; | |
29913 | bool m_rightDown; | |
29914 | ||
29915 | bool m_controlDown; | |
29916 | bool m_shiftDown; | |
29917 | bool m_altDown; | |
29918 | bool m_metaDown; | |
29919 | ||
29920 | int m_wheelRotation; | |
29921 | int m_wheelDelta; | |
29922 | int m_linesPerAction; | |
29923 | ||
29924 | protected: | |
29925 | void Assign(const wxMouseEvent& evt); | |
29926 | ||
29927 | private: | |
29928 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
29929 | }; | |
29930 | ||
29931 | ||
29932 | ||
29933 | ||
29934 | ||
29935 | ||
29936 | ||
29937 | class wxSetCursorEvent : public wxEvent | |
29938 | { | |
29939 | public: | |
29940 | wxSetCursorEvent(wxCoord x = 0, wxCoord y = 0) | |
29941 | : wxEvent(0, wxEVT_SET_CURSOR), | |
29942 | m_x(x), m_y(y), m_cursor() | |
29943 | { } | |
29944 | ||
29945 | wxSetCursorEvent(const wxSetCursorEvent & event) | |
29946 | : wxEvent(event), | |
29947 | m_x(event.m_x), | |
29948 | m_y(event.m_y), | |
29949 | m_cursor(event.m_cursor) | |
29950 | { } | |
29951 | ||
29952 | wxCoord GetX() const { return m_x; } | |
29953 | wxCoord GetY() const { return m_y; } | |
29954 | ||
29955 | void SetCursor(const wxCursor& cursor) { m_cursor = cursor; } | |
29956 | const wxCursor& GetCursor() const { return m_cursor; } | |
29957 | bool HasCursor() const { return m_cursor.Ok(); } | |
29958 | ||
29959 | virtual wxEvent *Clone() const { return new wxSetCursorEvent(*this); } | |
29960 | ||
29961 | private: | |
29962 | wxCoord m_x, m_y; | |
29963 | wxCursor m_cursor; | |
29964 | ||
29965 | private: | |
29966 | private: wxSetCursorEvent& operator=(const wxSetCursorEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
29967 | }; | |
29968 | # 957 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
29969 | class wxKeyEvent : public wxEvent | |
29970 | { | |
29971 | public: | |
29972 | wxKeyEvent(wxEventType keyType = wxEVT_NULL); | |
29973 | wxKeyEvent(const wxKeyEvent& evt); | |
29974 | ||
29975 | ||
29976 | bool ControlDown() const { return m_controlDown; } | |
29977 | bool MetaDown() const { return m_metaDown; } | |
29978 | bool AltDown() const { return m_altDown; } | |
29979 | bool ShiftDown() const { return m_shiftDown; } | |
29980 | ||
29981 | ||
29982 | ||
29983 | ||
29984 | ||
29985 | ||
29986 | bool CmdDown() const | |
29987 | { | |
29988 | ||
29989 | ||
29990 | ||
29991 | return ControlDown(); | |
29992 | ||
29993 | } | |
29994 | ||
29995 | ||
29996 | ||
29997 | ||
29998 | bool HasModifiers() const { return ControlDown() || AltDown(); } | |
29999 | ||
30000 | ||
30001 | int GetKeyCode() const { return (int)m_keyCode; } | |
30002 | ||
30003 | ||
30004 | ||
30005 | ||
30006 | ||
30007 | ||
30008 | ||
30009 | wxUint32 GetRawKeyCode() const { return m_rawCode; } | |
30010 | ||
30011 | ||
30012 | wxUint32 GetRawKeyFlags() const { return m_rawFlags; } | |
30013 | ||
30014 | ||
30015 | void GetPosition(wxCoord *xpos, wxCoord *ypos) const | |
30016 | { | |
30017 | if (xpos) *xpos = m_x; | |
30018 | if (ypos) *ypos = m_y; | |
30019 | } | |
30020 | ||
30021 | void GetPosition(long *xpos, long *ypos) const | |
30022 | { | |
30023 | if (xpos) *xpos = (long)m_x; | |
30024 | if (ypos) *ypos = (long)m_y; | |
30025 | } | |
30026 | ||
30027 | wxPoint GetPosition() const | |
30028 | { return wxPoint(m_x, m_y); } | |
30029 | ||
30030 | ||
30031 | wxCoord GetX() const { return m_x; } | |
30032 | ||
30033 | ||
30034 | wxCoord GetY() const { return m_y; } | |
30035 | ||
30036 | ||
30037 | long KeyCode() const __attribute__ ((deprecated)); | |
30038 | ||
30039 | virtual wxEvent *Clone() const { return new wxKeyEvent(*this); } | |
30040 | ||
30041 | ||
30042 | ||
30043 | wxKeyEvent& operator=(const wxKeyEvent& evt) | |
30044 | { | |
30045 | m_x = evt.m_x; | |
30046 | m_y = evt.m_y; | |
30047 | ||
30048 | m_keyCode = evt.m_keyCode; | |
30049 | ||
30050 | m_controlDown = evt.m_controlDown; | |
30051 | m_shiftDown = evt.m_shiftDown; | |
30052 | m_altDown = evt.m_altDown; | |
30053 | m_metaDown = evt.m_metaDown; | |
30054 | m_scanCode = evt.m_scanCode; | |
30055 | m_rawCode = evt.m_rawCode; | |
30056 | m_rawFlags = evt.m_rawFlags; | |
30057 | ||
30058 | ||
30059 | ||
30060 | ||
30061 | return *this; | |
30062 | } | |
30063 | ||
30064 | public: | |
30065 | wxCoord m_x, m_y; | |
30066 | ||
30067 | long m_keyCode; | |
30068 | ||
30069 | bool m_controlDown; | |
30070 | bool m_shiftDown; | |
30071 | bool m_altDown; | |
30072 | bool m_metaDown; | |
30073 | bool m_scanCode; | |
30074 | # 1071 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
30075 | wxUint32 m_rawCode; | |
30076 | wxUint32 m_rawFlags; | |
30077 | ||
30078 | private: | |
30079 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30080 | }; | |
30081 | ||
30082 | ||
30083 | ||
30084 | ||
30085 | ||
30086 | ||
30087 | class wxSizeEvent : public wxEvent | |
30088 | { | |
30089 | public: | |
30090 | wxSizeEvent() : wxEvent(0, wxEVT_SIZE) | |
30091 | { } | |
30092 | wxSizeEvent(const wxSize& sz, int winid = 0) | |
30093 | : wxEvent(winid, wxEVT_SIZE), | |
30094 | m_size(sz) | |
30095 | { } | |
30096 | wxSizeEvent(const wxSizeEvent & event) | |
30097 | : wxEvent(event), | |
30098 | m_size(event.m_size), m_rect(event.m_rect) | |
30099 | { } | |
30100 | wxSizeEvent(const wxRect& rect, int id = 0) | |
30101 | : m_size(rect.GetSize()), m_rect(rect) | |
30102 | { m_eventType = wxEVT_SIZING; m_id = id; } | |
30103 | ||
30104 | wxSize GetSize() const { return m_size; } | |
30105 | wxRect GetRect() const { return m_rect; } | |
30106 | void SetRect(wxRect rect) { m_rect = rect; } | |
30107 | ||
30108 | virtual wxEvent *Clone() const { return new wxSizeEvent(*this); } | |
30109 | ||
30110 | public: | |
30111 | ||
30112 | wxSize m_size; | |
30113 | wxRect m_rect; | |
30114 | ||
30115 | private: | |
30116 | private: wxSizeEvent& operator=(const wxSizeEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30117 | }; | |
30118 | ||
30119 | ||
30120 | ||
30121 | ||
30122 | ||
30123 | ||
30124 | ||
30125 | class wxMoveEvent : public wxEvent | |
30126 | { | |
30127 | public: | |
30128 | wxMoveEvent() | |
30129 | : wxEvent(0, wxEVT_MOVE) | |
30130 | { } | |
30131 | wxMoveEvent(const wxPoint& pos, int winid = 0) | |
30132 | : wxEvent(winid, wxEVT_MOVE), | |
30133 | m_pos(pos) | |
30134 | { } | |
30135 | wxMoveEvent(const wxMoveEvent& event) | |
30136 | : wxEvent(event), | |
30137 | m_pos(event.m_pos) | |
30138 | { } | |
30139 | wxMoveEvent(const wxRect& rect, int id = 0) | |
30140 | : m_pos(rect.GetPosition()), m_rect(rect) | |
30141 | { m_eventType = wxEVT_MOVING; m_id = id; } | |
30142 | ||
30143 | wxPoint GetPosition() const { return m_pos; } | |
30144 | void SetPosition(const wxPoint& pos) { m_pos = pos; } | |
30145 | wxRect GetRect() const { return m_rect; } | |
30146 | void SetRect(wxRect rect) { m_rect = rect; } | |
30147 | ||
30148 | virtual wxEvent *Clone() const { return new wxMoveEvent(*this); } | |
30149 | ||
30150 | ||
30151 | public: | |
30152 | ||
30153 | ||
30154 | ||
30155 | wxPoint m_pos; | |
30156 | wxRect m_rect; | |
30157 | ||
30158 | private: | |
30159 | private: wxMoveEvent& operator=(const wxMoveEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30160 | }; | |
30161 | # 1170 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
30162 | class wxPaintEvent : public wxEvent | |
30163 | { | |
30164 | public: | |
30165 | wxPaintEvent(int Id = 0) | |
30166 | : wxEvent(Id, wxEVT_PAINT) | |
30167 | { | |
30168 | ||
30169 | ||
30170 | ||
30171 | ||
30172 | } | |
30173 | # 1197 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
30174 | virtual wxEvent *Clone() const { return new wxPaintEvent(*this); } | |
30175 | ||
30176 | private: | |
30177 | private: wxPaintEvent& operator=(const wxPaintEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30178 | }; | |
30179 | ||
30180 | class wxNcPaintEvent : public wxEvent | |
30181 | { | |
30182 | public: | |
30183 | wxNcPaintEvent(int winid = 0) | |
30184 | : wxEvent(winid, wxEVT_NC_PAINT) | |
30185 | { } | |
30186 | ||
30187 | virtual wxEvent *Clone() const { return new wxNcPaintEvent(*this); } | |
30188 | ||
30189 | private: | |
30190 | private: wxNcPaintEvent& operator=(const wxNcPaintEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30191 | }; | |
30192 | ||
30193 | ||
30194 | ||
30195 | ||
30196 | ||
30197 | ||
30198 | class wxEraseEvent : public wxEvent | |
30199 | { | |
30200 | public: | |
30201 | wxEraseEvent(int Id = 0, wxDC *dc = (wxDC *) __null) | |
30202 | : wxEvent(Id, wxEVT_ERASE_BACKGROUND), | |
30203 | m_dc(dc) | |
30204 | { } | |
30205 | ||
30206 | wxEraseEvent(const wxEraseEvent& event) | |
30207 | : wxEvent(event), | |
30208 | m_dc(event.m_dc) | |
30209 | { } | |
30210 | ||
30211 | wxDC *GetDC() const { return m_dc; } | |
30212 | ||
30213 | virtual wxEvent *Clone() const { return new wxEraseEvent(*this); } | |
30214 | ||
30215 | ||
30216 | public: | |
30217 | ||
30218 | ||
30219 | ||
30220 | wxDC *m_dc; | |
30221 | ||
30222 | private: | |
30223 | private: wxEraseEvent& operator=(const wxEraseEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30224 | }; | |
30225 | ||
30226 | ||
30227 | ||
30228 | ||
30229 | ||
30230 | ||
30231 | ||
30232 | class wxFocusEvent : public wxEvent | |
30233 | { | |
30234 | public: | |
30235 | wxFocusEvent(wxEventType type = wxEVT_NULL, int winid = 0) | |
30236 | : wxEvent(winid, type) | |
30237 | { m_win = __null; } | |
30238 | ||
30239 | wxFocusEvent(const wxFocusEvent& event) | |
30240 | : wxEvent(event) | |
30241 | { m_win = event.m_win; } | |
30242 | ||
30243 | ||
30244 | ||
30245 | ||
30246 | wxWindow *GetWindow() const { return m_win; } | |
30247 | void SetWindow(wxWindow *win) { m_win = win; } | |
30248 | ||
30249 | virtual wxEvent *Clone() const { return new wxFocusEvent(*this); } | |
30250 | ||
30251 | private: | |
30252 | wxWindow *m_win; | |
30253 | ||
30254 | private: | |
30255 | private: wxFocusEvent& operator=(const wxFocusEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30256 | }; | |
30257 | ||
30258 | ||
30259 | ||
30260 | class wxChildFocusEvent : public wxCommandEvent | |
30261 | { | |
30262 | public: | |
30263 | wxChildFocusEvent(wxWindow *win = __null); | |
30264 | ||
30265 | wxWindow *GetWindow() const { return (wxWindow *)GetEventObject(); } | |
30266 | ||
30267 | virtual wxEvent *Clone() const { return new wxChildFocusEvent(*this); } | |
30268 | ||
30269 | private: | |
30270 | private: wxChildFocusEvent& operator=(const wxChildFocusEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30271 | }; | |
30272 | # 1303 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
30273 | class wxActivateEvent : public wxEvent | |
30274 | { | |
30275 | public: | |
30276 | wxActivateEvent(wxEventType type = wxEVT_NULL, bool active = true, int Id = 0) | |
30277 | : wxEvent(Id, type) | |
30278 | { m_active = active; } | |
30279 | wxActivateEvent(const wxActivateEvent& event) | |
30280 | : wxEvent(event) | |
30281 | { m_active = event.m_active; } | |
30282 | ||
30283 | bool GetActive() const { return m_active; } | |
30284 | ||
30285 | virtual wxEvent *Clone() const { return new wxActivateEvent(*this); } | |
30286 | ||
30287 | private: | |
30288 | bool m_active; | |
30289 | ||
30290 | private: | |
30291 | private: wxActivateEvent& operator=(const wxActivateEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30292 | }; | |
30293 | ||
30294 | ||
30295 | ||
30296 | ||
30297 | ||
30298 | ||
30299 | class wxInitDialogEvent : public wxEvent | |
30300 | { | |
30301 | public: | |
30302 | wxInitDialogEvent(int Id = 0) | |
30303 | : wxEvent(Id, wxEVT_INIT_DIALOG) | |
30304 | { } | |
30305 | ||
30306 | virtual wxEvent *Clone() const { return new wxInitDialogEvent(*this); } | |
30307 | ||
30308 | private: | |
30309 | private: wxInitDialogEvent& operator=(const wxInitDialogEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30310 | }; | |
30311 | # 1349 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
30312 | class wxMenuEvent : public wxEvent | |
30313 | { | |
30314 | public: | |
30315 | wxMenuEvent(wxEventType type = wxEVT_NULL, int winid = 0, wxMenu* menu = __null) | |
30316 | : wxEvent(winid, type) | |
30317 | { m_menuId = winid; m_menu = menu; } | |
30318 | wxMenuEvent(const wxMenuEvent & event) | |
30319 | : wxEvent(event) | |
30320 | { m_menuId = event.m_menuId; m_menu = event.m_menu; } | |
30321 | ||
30322 | ||
30323 | int GetMenuId() const { return m_menuId; } | |
30324 | ||
30325 | ||
30326 | bool IsPopup() const { return m_menuId == wxID_ANY; } | |
30327 | ||
30328 | ||
30329 | wxMenu* GetMenu() const { return m_menu; } | |
30330 | ||
30331 | virtual wxEvent *Clone() const { return new wxMenuEvent(*this); } | |
30332 | ||
30333 | private: | |
30334 | int m_menuId; | |
30335 | wxMenu* m_menu; | |
30336 | ||
30337 | private: wxMenuEvent& operator=(const wxMenuEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30338 | }; | |
30339 | # 1384 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
30340 | class wxCloseEvent : public wxEvent | |
30341 | { | |
30342 | public: | |
30343 | wxCloseEvent(wxEventType type = wxEVT_NULL, int winid = 0) | |
30344 | : wxEvent(winid, type), | |
30345 | m_loggingOff(true), | |
30346 | m_veto(false), | |
30347 | m_canVeto(true) {} | |
30348 | ||
30349 | wxCloseEvent(const wxCloseEvent & event) | |
30350 | : wxEvent(event), | |
30351 | m_loggingOff(event.m_loggingOff), | |
30352 | m_veto(event.m_veto), | |
30353 | m_canVeto(event.m_canVeto) {} | |
30354 | ||
30355 | void SetLoggingOff(bool logOff) { m_loggingOff = logOff; } | |
30356 | bool GetLoggingOff() const | |
30357 | { | |
30358 | ||
30359 | ||
30360 | ; | |
30361 | ||
30362 | ||
30363 | return m_loggingOff; | |
30364 | } | |
30365 | ||
30366 | void Veto(bool veto = true) | |
30367 | { | |
30368 | ||
30369 | if (!(m_canVeto)) {; return; }; | |
30370 | ||
30371 | ||
30372 | m_veto = veto; | |
30373 | } | |
30374 | void SetCanVeto(bool canVeto) { m_canVeto = canVeto; } | |
30375 | bool CanVeto() const { return m_canVeto; } | |
30376 | bool GetVeto() const { return m_canVeto && m_veto; } | |
30377 | ||
30378 | virtual wxEvent *Clone() const { return new wxCloseEvent(*this); } | |
30379 | ||
30380 | protected: | |
30381 | bool m_loggingOff, | |
30382 | m_veto, | |
30383 | m_canVeto; | |
30384 | ||
30385 | private: | |
30386 | private: wxCloseEvent& operator=(const wxCloseEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30387 | }; | |
30388 | ||
30389 | ||
30390 | ||
30391 | ||
30392 | ||
30393 | class wxShowEvent : public wxEvent | |
30394 | { | |
30395 | public: | |
30396 | wxShowEvent(int winid = 0, bool show = false) | |
30397 | : wxEvent(winid, wxEVT_SHOW) | |
30398 | { m_show = show; } | |
30399 | wxShowEvent(const wxShowEvent & event) | |
30400 | : wxEvent(event) | |
30401 | { m_show = event.m_show; } | |
30402 | ||
30403 | void SetShow(bool show) { m_show = show; } | |
30404 | bool GetShow() const { return m_show; } | |
30405 | ||
30406 | virtual wxEvent *Clone() const { return new wxShowEvent(*this); } | |
30407 | ||
30408 | protected: | |
30409 | bool m_show; | |
30410 | ||
30411 | private: | |
30412 | private: wxShowEvent& operator=(const wxShowEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30413 | }; | |
30414 | ||
30415 | ||
30416 | ||
30417 | ||
30418 | ||
30419 | class wxIconizeEvent : public wxEvent | |
30420 | { | |
30421 | public: | |
30422 | wxIconizeEvent(int winid = 0, bool iconized = true) | |
30423 | : wxEvent(winid, wxEVT_ICONIZE) | |
30424 | { m_iconized = iconized; } | |
30425 | wxIconizeEvent(const wxIconizeEvent & event) | |
30426 | : wxEvent(event) | |
30427 | { m_iconized = event.m_iconized; } | |
30428 | ||
30429 | ||
30430 | bool Iconized() const { return m_iconized; } | |
30431 | ||
30432 | virtual wxEvent *Clone() const { return new wxIconizeEvent(*this); } | |
30433 | ||
30434 | protected: | |
30435 | bool m_iconized; | |
30436 | ||
30437 | private: | |
30438 | private: wxIconizeEvent& operator=(const wxIconizeEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30439 | }; | |
30440 | ||
30441 | ||
30442 | ||
30443 | ||
30444 | class wxMaximizeEvent : public wxEvent | |
30445 | { | |
30446 | public: | |
30447 | wxMaximizeEvent(int winid = 0) | |
30448 | : wxEvent(winid, wxEVT_MAXIMIZE) | |
30449 | { } | |
30450 | ||
30451 | virtual wxEvent *Clone() const { return new wxMaximizeEvent(*this); } | |
30452 | ||
30453 | private: | |
30454 | private: wxMaximizeEvent& operator=(const wxMaximizeEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30455 | }; | |
30456 | # 1510 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
30457 | enum | |
30458 | { | |
30459 | wxJOYSTICK1, | |
30460 | wxJOYSTICK2 | |
30461 | }; | |
30462 | ||
30463 | ||
30464 | enum | |
30465 | { | |
30466 | wxJOY_BUTTON_ANY = -1, | |
30467 | wxJOY_BUTTON1 = 1, | |
30468 | wxJOY_BUTTON2 = 2, | |
30469 | wxJOY_BUTTON3 = 4, | |
30470 | wxJOY_BUTTON4 = 8 | |
30471 | }; | |
30472 | ||
30473 | class wxJoystickEvent : public wxEvent | |
30474 | { | |
30475 | ||
30476 | public: | |
30477 | ||
30478 | ||
30479 | ||
30480 | wxPoint m_pos; | |
30481 | int m_zPosition; | |
30482 | int m_buttonChange; | |
30483 | int m_buttonState; | |
30484 | int m_joyStick; | |
30485 | ||
30486 | public: | |
30487 | wxJoystickEvent(wxEventType type = wxEVT_NULL, | |
30488 | int state = 0, | |
30489 | int joystick = wxJOYSTICK1, | |
30490 | int change = 0) | |
30491 | : wxEvent(0, type), | |
30492 | m_pos(), | |
30493 | m_zPosition(0), | |
30494 | m_buttonChange(change), | |
30495 | m_buttonState(state), | |
30496 | m_joyStick(joystick) | |
30497 | { | |
30498 | } | |
30499 | wxJoystickEvent(const wxJoystickEvent & event) | |
30500 | : wxEvent(event), | |
30501 | m_pos(event.m_pos), | |
30502 | m_zPosition(event.m_zPosition), | |
30503 | m_buttonChange(event.m_buttonChange), | |
30504 | m_buttonState(event.m_buttonState), | |
30505 | m_joyStick(event.m_joyStick) | |
30506 | { } | |
30507 | ||
30508 | wxPoint GetPosition() const { return m_pos; } | |
30509 | int GetZPosition() const { return m_zPosition; } | |
30510 | int GetButtonState() const { return m_buttonState; } | |
30511 | int GetButtonChange() const { return m_buttonChange; } | |
30512 | int GetJoystick() const { return m_joyStick; } | |
30513 | ||
30514 | void SetJoystick(int stick) { m_joyStick = stick; } | |
30515 | void SetButtonState(int state) { m_buttonState = state; } | |
30516 | void SetButtonChange(int change) { m_buttonChange = change; } | |
30517 | void SetPosition(const wxPoint& pos) { m_pos = pos; } | |
30518 | void SetZPosition(int zPos) { m_zPosition = zPos; } | |
30519 | ||
30520 | ||
30521 | bool IsButton() const { return ((GetEventType() == wxEVT_JOY_BUTTON_DOWN) || | |
30522 | (GetEventType() == wxEVT_JOY_BUTTON_UP)); } | |
30523 | ||
30524 | ||
30525 | bool IsMove() const { return (GetEventType() == wxEVT_JOY_MOVE); } | |
30526 | ||
30527 | ||
30528 | bool IsZMove() const { return (GetEventType() == wxEVT_JOY_ZMOVE); } | |
30529 | ||
30530 | ||
30531 | bool ButtonDown(int but = wxJOY_BUTTON_ANY) const | |
30532 | { return ((GetEventType() == wxEVT_JOY_BUTTON_DOWN) && | |
30533 | ((but == wxJOY_BUTTON_ANY) || (but == m_buttonChange))); } | |
30534 | ||
30535 | ||
30536 | bool ButtonUp(int but = wxJOY_BUTTON_ANY) const | |
30537 | { return ((GetEventType() == wxEVT_JOY_BUTTON_UP) && | |
30538 | ((but == wxJOY_BUTTON_ANY) || (but == m_buttonChange))); } | |
30539 | ||
30540 | ||
30541 | bool ButtonIsDown(int but = wxJOY_BUTTON_ANY) const | |
30542 | { return (((but == wxJOY_BUTTON_ANY) && (m_buttonState != 0)) || | |
30543 | ((m_buttonState & but) == but)); } | |
30544 | ||
30545 | virtual wxEvent *Clone() const { return new wxJoystickEvent(*this); } | |
30546 | ||
30547 | private: | |
30548 | private: wxJoystickEvent& operator=(const wxJoystickEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30549 | }; | |
30550 | ||
30551 | ||
30552 | ||
30553 | ||
30554 | ||
30555 | ||
30556 | class wxDropFilesEvent : public wxEvent | |
30557 | { | |
30558 | public: | |
30559 | int m_noFiles; | |
30560 | wxPoint m_pos; | |
30561 | wxString* m_files; | |
30562 | ||
30563 | wxDropFilesEvent(wxEventType type = wxEVT_NULL, | |
30564 | int noFiles = 0, | |
30565 | wxString *files = (wxString *) __null) | |
30566 | : wxEvent(0, type), | |
30567 | m_noFiles(noFiles), | |
30568 | m_pos(), | |
30569 | m_files(files) | |
30570 | { } | |
30571 | ||
30572 | ||
30573 | wxDropFilesEvent(const wxDropFilesEvent& other) | |
30574 | : wxEvent(other), | |
30575 | m_noFiles(other.m_noFiles), | |
30576 | m_pos(other.m_pos), | |
30577 | m_files(__null) | |
30578 | { | |
30579 | m_files = new wxString[m_noFiles]; | |
30580 | for ( int n = 0; n < m_noFiles; n++ ) | |
30581 | { | |
30582 | m_files[n] = other.m_files[n]; | |
30583 | } | |
30584 | } | |
30585 | ||
30586 | virtual ~wxDropFilesEvent() | |
30587 | { | |
30588 | delete [] m_files; | |
30589 | } | |
30590 | ||
30591 | wxPoint GetPosition() const { return m_pos; } | |
30592 | int GetNumberOfFiles() const { return m_noFiles; } | |
30593 | wxString *GetFiles() const { return m_files; } | |
30594 | ||
30595 | virtual wxEvent *Clone() const { return new wxDropFilesEvent(*this); } | |
30596 | ||
30597 | private: | |
30598 | private: wxDropFilesEvent& operator=(const wxDropFilesEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30599 | }; | |
30600 | # 1663 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
30601 | enum wxUpdateUIMode | |
30602 | { | |
30603 | ||
30604 | wxUPDATE_UI_PROCESS_ALL, | |
30605 | ||
30606 | ||
30607 | ||
30608 | wxUPDATE_UI_PROCESS_SPECIFIED | |
30609 | }; | |
30610 | ||
30611 | class wxUpdateUIEvent : public wxCommandEvent | |
30612 | { | |
30613 | public: | |
30614 | wxUpdateUIEvent(wxWindowID commandId = 0) | |
30615 | : wxCommandEvent(wxEVT_UPDATE_UI, commandId) | |
30616 | { | |
30617 | m_checked = | |
30618 | m_enabled = | |
30619 | m_setEnabled = | |
30620 | m_setText = | |
30621 | m_setChecked = false; | |
30622 | } | |
30623 | wxUpdateUIEvent(const wxUpdateUIEvent & event) | |
30624 | : wxCommandEvent(event), | |
30625 | m_checked(event.m_checked), | |
30626 | m_enabled(event.m_enabled), | |
30627 | m_setEnabled(event.m_setEnabled), | |
30628 | m_setText(event.m_setText), | |
30629 | m_setChecked(event.m_setChecked), | |
30630 | m_text(event.m_text) | |
30631 | { } | |
30632 | ||
30633 | bool GetChecked() const { return m_checked; } | |
30634 | bool GetEnabled() const { return m_enabled; } | |
30635 | wxString GetText() const { return m_text; } | |
30636 | bool GetSetText() const { return m_setText; } | |
30637 | bool GetSetChecked() const { return m_setChecked; } | |
30638 | bool GetSetEnabled() const { return m_setEnabled; } | |
30639 | ||
30640 | void Check(bool check) { m_checked = check; m_setChecked = true; } | |
30641 | void Enable(bool enable) { m_enabled = enable; m_setEnabled = true; } | |
30642 | void SetText(const wxString& text) { m_text = text; m_setText = true; } | |
30643 | ||
30644 | ||
30645 | ||
30646 | static void SetUpdateInterval(long updateInterval) { sm_updateInterval = updateInterval; } | |
30647 | ||
30648 | ||
30649 | static long GetUpdateInterval() { return sm_updateInterval; } | |
30650 | ||
30651 | ||
30652 | static bool CanUpdate(wxWindowBase *win); | |
30653 | ||
30654 | ||
30655 | ||
30656 | static void ResetUpdateTime(); | |
30657 | ||
30658 | ||
30659 | ||
30660 | ||
30661 | static void SetMode(wxUpdateUIMode mode) { sm_updateMode = mode; } | |
30662 | ||
30663 | ||
30664 | static wxUpdateUIMode GetMode() { return sm_updateMode; } | |
30665 | ||
30666 | virtual wxEvent *Clone() const { return new wxUpdateUIEvent(*this); } | |
30667 | ||
30668 | protected: | |
30669 | bool m_checked; | |
30670 | bool m_enabled; | |
30671 | bool m_setEnabled; | |
30672 | bool m_setText; | |
30673 | bool m_setChecked; | |
30674 | wxString m_text; | |
30675 | ||
30676 | static wxLongLong sm_lastUpdate; | |
30677 | ||
30678 | static long sm_updateInterval; | |
30679 | static wxUpdateUIMode sm_updateMode; | |
30680 | ||
30681 | private: | |
30682 | private: wxUpdateUIEvent& operator=(const wxUpdateUIEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30683 | }; | |
30684 | ||
30685 | ||
30686 | ||
30687 | ||
30688 | ||
30689 | ||
30690 | class wxSysColourChangedEvent : public wxEvent | |
30691 | { | |
30692 | public: | |
30693 | wxSysColourChangedEvent() | |
30694 | : wxEvent(0, wxEVT_SYS_COLOUR_CHANGED) | |
30695 | { } | |
30696 | ||
30697 | virtual wxEvent *Clone() const { return new wxSysColourChangedEvent(*this); } | |
30698 | ||
30699 | private: | |
30700 | private: wxSysColourChangedEvent& operator=(const wxSysColourChangedEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30701 | }; | |
30702 | ||
30703 | ||
30704 | ||
30705 | ||
30706 | ||
30707 | ||
30708 | ||
30709 | class wxMouseCaptureChangedEvent : public wxEvent | |
30710 | { | |
30711 | public: | |
30712 | wxMouseCaptureChangedEvent(wxWindowID winid = 0, wxWindow* gainedCapture = __null) | |
30713 | : wxEvent(winid, wxEVT_MOUSE_CAPTURE_CHANGED), | |
30714 | m_gainedCapture(gainedCapture) | |
30715 | { } | |
30716 | ||
30717 | wxMouseCaptureChangedEvent(const wxMouseCaptureChangedEvent& event) | |
30718 | : wxEvent(event), | |
30719 | m_gainedCapture(event.m_gainedCapture) | |
30720 | { } | |
30721 | ||
30722 | virtual wxEvent *Clone() const { return new wxMouseCaptureChangedEvent(*this); } | |
30723 | ||
30724 | wxWindow* GetCapturedWindow() const { return m_gainedCapture; }; | |
30725 | ||
30726 | private: | |
30727 | wxWindow* m_gainedCapture; | |
30728 | ||
30729 | private: wxMouseCaptureChangedEvent& operator=(const wxMouseCaptureChangedEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30730 | }; | |
30731 | ||
30732 | ||
30733 | ||
30734 | ||
30735 | class wxDisplayChangedEvent : public wxEvent | |
30736 | { | |
30737 | private: | |
30738 | private: wxDisplayChangedEvent& operator=(const wxDisplayChangedEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30739 | ||
30740 | public: | |
30741 | wxDisplayChangedEvent() | |
30742 | : wxEvent(0, wxEVT_DISPLAY_CHANGED) | |
30743 | { } | |
30744 | ||
30745 | virtual wxEvent *Clone() const { return new wxDisplayChangedEvent(*this); } | |
30746 | }; | |
30747 | ||
30748 | ||
30749 | ||
30750 | ||
30751 | ||
30752 | class wxPaletteChangedEvent : public wxEvent | |
30753 | { | |
30754 | public: | |
30755 | wxPaletteChangedEvent(wxWindowID winid = 0) | |
30756 | : wxEvent(winid, wxEVT_PALETTE_CHANGED), | |
30757 | m_changedWindow((wxWindow *) __null) | |
30758 | { } | |
30759 | ||
30760 | wxPaletteChangedEvent(const wxPaletteChangedEvent& event) | |
30761 | : wxEvent(event), | |
30762 | m_changedWindow(event.m_changedWindow) | |
30763 | { } | |
30764 | ||
30765 | void SetChangedWindow(wxWindow* win) { m_changedWindow = win; } | |
30766 | wxWindow* GetChangedWindow() const { return m_changedWindow; } | |
30767 | ||
30768 | virtual wxEvent *Clone() const { return new wxPaletteChangedEvent(*this); } | |
30769 | ||
30770 | protected: | |
30771 | wxWindow* m_changedWindow; | |
30772 | ||
30773 | private: | |
30774 | private: wxPaletteChangedEvent& operator=(const wxPaletteChangedEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30775 | }; | |
30776 | ||
30777 | ||
30778 | ||
30779 | ||
30780 | ||
30781 | ||
30782 | class wxQueryNewPaletteEvent : public wxEvent | |
30783 | { | |
30784 | public: | |
30785 | wxQueryNewPaletteEvent(wxWindowID winid = 0) | |
30786 | : wxEvent(winid, wxEVT_QUERY_NEW_PALETTE), | |
30787 | m_paletteRealized(false) | |
30788 | { } | |
30789 | wxQueryNewPaletteEvent(const wxQueryNewPaletteEvent & event) | |
30790 | : wxEvent(event), | |
30791 | m_paletteRealized(event.m_paletteRealized) | |
30792 | { } | |
30793 | ||
30794 | ||
30795 | void SetPaletteRealized(bool realized) { m_paletteRealized = realized; } | |
30796 | bool GetPaletteRealized() const { return m_paletteRealized; } | |
30797 | ||
30798 | virtual wxEvent *Clone() const { return new wxQueryNewPaletteEvent(*this); } | |
30799 | ||
30800 | protected: | |
30801 | bool m_paletteRealized; | |
30802 | ||
30803 | private: | |
30804 | private: wxQueryNewPaletteEvent& operator=(const wxQueryNewPaletteEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30805 | }; | |
30806 | ||
30807 | ||
30808 | ||
30809 | ||
30810 | ||
30811 | ||
30812 | class wxNavigationKeyEvent : public wxEvent | |
30813 | { | |
30814 | public: | |
30815 | wxNavigationKeyEvent() | |
30816 | : wxEvent(0, wxEVT_NAVIGATION_KEY), | |
30817 | m_flags(IsForward | FromTab), | |
30818 | m_focus((wxWindow *)__null) | |
30819 | { | |
30820 | m_propagationLevel = wxEVENT_PROPAGATE_NONE; | |
30821 | } | |
30822 | ||
30823 | wxNavigationKeyEvent(const wxNavigationKeyEvent& event) | |
30824 | : wxEvent(event), | |
30825 | m_flags(event.m_flags), | |
30826 | m_focus(event.m_focus) | |
30827 | { } | |
30828 | ||
30829 | ||
30830 | bool GetDirection() const | |
30831 | { return (m_flags & IsForward) != 0; } | |
30832 | void SetDirection(bool bForward) | |
30833 | { if ( bForward ) m_flags |= IsForward; else m_flags &= ~IsForward; } | |
30834 | ||
30835 | ||
30836 | ||
30837 | bool IsWindowChange() const | |
30838 | { return (m_flags & WinChange) != 0; } | |
30839 | void SetWindowChange(bool bIs) | |
30840 | { if ( bIs ) m_flags |= WinChange; else m_flags &= ~WinChange; } | |
30841 | ||
30842 | ||
30843 | ||
30844 | bool IsFromTab() const | |
30845 | { return (m_flags & FromTab) != 0; } | |
30846 | void SetFromTab(bool bIs) | |
30847 | { if ( bIs ) m_flags |= FromTab; else m_flags &= ~FromTab; } | |
30848 | ||
30849 | ||
30850 | ||
30851 | wxWindow* GetCurrentFocus() const { return m_focus; } | |
30852 | void SetCurrentFocus(wxWindow *win) { m_focus = win; } | |
30853 | ||
30854 | ||
30855 | void SetFlags(long flags) { m_flags = flags; } | |
30856 | ||
30857 | virtual wxEvent *Clone() const { return new wxNavigationKeyEvent(*this); } | |
30858 | ||
30859 | enum | |
30860 | { | |
30861 | IsBackward = 0x0000, | |
30862 | IsForward = 0x0001, | |
30863 | WinChange = 0x0002, | |
30864 | FromTab = 0x0004 | |
30865 | }; | |
30866 | ||
30867 | long m_flags; | |
30868 | wxWindow *m_focus; | |
30869 | ||
30870 | private: | |
30871 | private: wxNavigationKeyEvent& operator=(const wxNavigationKeyEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30872 | }; | |
30873 | # 1946 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
30874 | class wxWindowCreateEvent : public wxCommandEvent | |
30875 | { | |
30876 | public: | |
30877 | wxWindowCreateEvent(wxWindow *win = __null); | |
30878 | ||
30879 | wxWindow *GetWindow() const { return (wxWindow *)GetEventObject(); } | |
30880 | ||
30881 | virtual wxEvent *Clone() const { return new wxWindowCreateEvent(*this); } | |
30882 | ||
30883 | private: | |
30884 | private: wxWindowCreateEvent& operator=(const wxWindowCreateEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30885 | }; | |
30886 | ||
30887 | class wxWindowDestroyEvent : public wxCommandEvent | |
30888 | { | |
30889 | public: | |
30890 | wxWindowDestroyEvent(wxWindow *win = __null); | |
30891 | ||
30892 | wxWindow *GetWindow() const { return (wxWindow *)GetEventObject(); } | |
30893 | ||
30894 | virtual wxEvent *Clone() const { return new wxWindowDestroyEvent(*this); } | |
30895 | ||
30896 | private: | |
30897 | private: wxWindowDestroyEvent& operator=(const wxWindowDestroyEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30898 | }; | |
30899 | ||
30900 | ||
30901 | ||
30902 | ||
30903 | ||
30904 | ||
30905 | ||
30906 | class wxHelpEvent : public wxCommandEvent | |
30907 | { | |
30908 | public: | |
30909 | wxHelpEvent(wxEventType type = wxEVT_NULL, | |
30910 | wxWindowID winid = 0, | |
30911 | const wxPoint& pt = wxDefaultPosition) | |
30912 | : wxCommandEvent(type, winid), | |
30913 | m_pos(pt), m_target(), m_link() | |
30914 | { } | |
30915 | wxHelpEvent(const wxHelpEvent & event) | |
30916 | : wxCommandEvent(event), | |
30917 | m_pos(event.m_pos), | |
30918 | m_target(event.m_target), | |
30919 | m_link(event.m_link) | |
30920 | { } | |
30921 | ||
30922 | ||
30923 | const wxPoint& GetPosition() const { return m_pos; } | |
30924 | void SetPosition(const wxPoint& pos) { m_pos = pos; } | |
30925 | ||
30926 | ||
30927 | const wxString& GetLink() const { return m_link; } | |
30928 | void SetLink(const wxString& link) { m_link = link; } | |
30929 | ||
30930 | ||
30931 | const wxString& GetTarget() const { return m_target; } | |
30932 | void SetTarget(const wxString& target) { m_target = target; } | |
30933 | ||
30934 | virtual wxEvent *Clone() const { return new wxHelpEvent(*this); } | |
30935 | ||
30936 | protected: | |
30937 | wxPoint m_pos; | |
30938 | wxString m_target; | |
30939 | wxString m_link; | |
30940 | ||
30941 | private: | |
30942 | private: wxHelpEvent& operator=(const wxHelpEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30943 | }; | |
30944 | # 2025 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
30945 | class wxContextMenuEvent : public wxCommandEvent | |
30946 | { | |
30947 | public: | |
30948 | wxContextMenuEvent(wxEventType type = wxEVT_NULL, | |
30949 | wxWindowID winid = 0, | |
30950 | const wxPoint& pt = wxDefaultPosition) | |
30951 | : wxCommandEvent(type, winid), | |
30952 | m_pos(pt) | |
30953 | { } | |
30954 | wxContextMenuEvent(const wxContextMenuEvent & event) | |
30955 | : wxCommandEvent(event), | |
30956 | m_pos(event.m_pos) | |
30957 | { } | |
30958 | ||
30959 | ||
30960 | const wxPoint& GetPosition() const { return m_pos; } | |
30961 | void SetPosition(const wxPoint& pos) { m_pos = pos; } | |
30962 | ||
30963 | virtual wxEvent *Clone() const { return new wxContextMenuEvent(*this); } | |
30964 | ||
30965 | protected: | |
30966 | wxPoint m_pos; | |
30967 | ||
30968 | private: | |
30969 | private: wxContextMenuEvent& operator=(const wxContextMenuEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
30970 | }; | |
30971 | # 2061 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
30972 | enum wxIdleMode | |
30973 | { | |
30974 | ||
30975 | wxIDLE_PROCESS_ALL, | |
30976 | ||
30977 | ||
30978 | ||
30979 | wxIDLE_PROCESS_SPECIFIED | |
30980 | }; | |
30981 | ||
30982 | class wxIdleEvent : public wxEvent | |
30983 | { | |
30984 | public: | |
30985 | wxIdleEvent() | |
30986 | : wxEvent(0, wxEVT_IDLE), | |
30987 | m_requestMore(false) | |
30988 | { } | |
30989 | wxIdleEvent(const wxIdleEvent & event) | |
30990 | : wxEvent(event), | |
30991 | m_requestMore(event.m_requestMore) | |
30992 | { } | |
30993 | ||
30994 | void RequestMore(bool needMore = true) { m_requestMore = needMore; } | |
30995 | bool MoreRequested() const { return m_requestMore; } | |
30996 | ||
30997 | virtual wxEvent *Clone() const { return new wxIdleEvent(*this); } | |
30998 | ||
30999 | ||
31000 | ||
31001 | ||
31002 | static void SetMode(wxIdleMode mode) { sm_idleMode = mode; } | |
31003 | ||
31004 | ||
31005 | static wxIdleMode GetMode() { return sm_idleMode; } | |
31006 | ||
31007 | ||
31008 | static bool CanSend(wxWindow* win); | |
31009 | ||
31010 | protected: | |
31011 | bool m_requestMore; | |
31012 | static wxIdleMode sm_idleMode; | |
31013 | ||
31014 | private: | |
31015 | private: wxIdleEvent& operator=(const wxIdleEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
31016 | }; | |
31017 | # 2128 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
31018 | typedef void (wxObject::*wxObjectEventFunction)(wxEvent&); | |
31019 | # 2151 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
31020 | struct wxEventTableEntryBase | |
31021 | { | |
31022 | private: | |
31023 | wxEventTableEntryBase& operator=(const wxEventTableEntryBase& event); | |
31024 | ||
31025 | public: | |
31026 | wxEventTableEntryBase(int winid, int idLast, | |
31027 | wxObjectEventFunction fn, wxObject *data) | |
31028 | : m_id(winid), | |
31029 | m_lastId(idLast), | |
31030 | m_fn(fn), | |
31031 | m_callbackUserData(data) | |
31032 | { } | |
31033 | ||
31034 | wxEventTableEntryBase(const wxEventTableEntryBase& event) | |
31035 | : m_id(event.m_id), | |
31036 | m_lastId(event.m_lastId), | |
31037 | m_fn(event.m_fn), | |
31038 | m_callbackUserData(event.m_callbackUserData) | |
31039 | { } | |
31040 | ||
31041 | ||
31042 | ||
31043 | int m_id, | |
31044 | m_lastId; | |
31045 | ||
31046 | ||
31047 | wxObjectEventFunction m_fn; | |
31048 | ||
31049 | ||
31050 | wxObject* m_callbackUserData; | |
31051 | }; | |
31052 | ||
31053 | ||
31054 | struct wxEventTableEntry : public wxEventTableEntryBase | |
31055 | { | |
31056 | wxEventTableEntry(const int& evType, int winid, int idLast, | |
31057 | wxObjectEventFunction fn, wxObject *data) | |
31058 | : wxEventTableEntryBase(winid, idLast, fn, data), | |
31059 | m_eventType(evType) | |
31060 | { } | |
31061 | ||
31062 | ||
31063 | ||
31064 | ||
31065 | ||
31066 | ||
31067 | ||
31068 | const int& m_eventType; | |
31069 | ||
31070 | private: | |
31071 | wxEventTableEntry& operator=(const wxEventTableEntry&); | |
31072 | }; | |
31073 | ||
31074 | ||
31075 | struct wxDynamicEventTableEntry : public wxEventTableEntryBase | |
31076 | { | |
31077 | wxDynamicEventTableEntry(int evType, int winid, int idLast, | |
31078 | wxObjectEventFunction fn, wxObject *data, wxEvtHandler* eventSink) | |
31079 | : wxEventTableEntryBase(winid, idLast, fn, data), | |
31080 | m_eventType(evType), | |
31081 | m_eventSink(eventSink) | |
31082 | { } | |
31083 | ||
31084 | ||
31085 | ||
31086 | ||
31087 | int m_eventType; | |
31088 | ||
31089 | ||
31090 | ||
31091 | ||
31092 | wxEvtHandler* m_eventSink; | |
31093 | ||
31094 | private: wxDynamicEventTableEntry(const wxDynamicEventTableEntry&); wxDynamicEventTableEntry& operator=(const wxDynamicEventTableEntry&); | |
31095 | }; | |
31096 | ||
31097 | ||
31098 | ||
31099 | ||
31100 | ||
31101 | ||
31102 | ||
31103 | struct wxEventTable | |
31104 | { | |
31105 | const wxEventTable *baseTable; | |
31106 | const wxEventTableEntry *entries; | |
31107 | }; | |
31108 | ||
31109 | ||
31110 | ||
31111 | ||
31112 | ||
31113 | typedef const wxEventTableEntry* _wxArraywxEventTableEntryPointerArray; struct wxAssert_wxEventTableEntryPointerArray { unsigned int TypeTooBigToBeStoredInwxBaseArrayPtrVoid: sizeof(_wxArraywxEventTableEntryPointerArray) <= sizeof(wxBaseArrayPtrVoid::base_type); }; typedef int ( *CMPFUNC_wxArraywxEventTableEntryPointerArray)(_wxArraywxEventTableEntryPointerArray *pItem1, _wxArraywxEventTableEntryPointerArray *pItem2); class wxEventTableEntryPointerArray : public wxBaseArrayPtrVoid { public: wxEventTableEntryPointerArray() { } ~wxEventTableEntryPointerArray() { } wxEventTableEntryPointerArray& operator=(const wxEventTableEntryPointerArray& src) { wxBaseArrayPtrVoid* temp = (wxBaseArrayPtrVoid*) this; (*temp) = ((const wxBaseArrayPtrVoid&)src); return *this; } _wxArraywxEventTableEntryPointerArray& operator[](size_t uiIndex) const { return (_wxArraywxEventTableEntryPointerArray&)(wxBaseArrayPtrVoid::operator[](uiIndex)); } _wxArraywxEventTableEntryPointerArray& Item(size_t uiIndex) const { return (_wxArraywxEventTableEntryPointerArray&)(wxBaseArrayPtrVoid::operator[](uiIndex)); } _wxArraywxEventTableEntryPointerArray& Last() const { return (_wxArraywxEventTableEntryPointerArray&)(wxBaseArrayPtrVoid::operator[](Count() - 1)); } int Index(_wxArraywxEventTableEntryPointerArray lItem, bool bFromEnd = false) const { return wxBaseArrayPtrVoid::Index((base_type)lItem, bFromEnd); } void Add(_wxArraywxEventTableEntryPointerArray lItem, size_t nInsert = 1) { wxBaseArrayPtrVoid::Add((base_type)lItem, nInsert); } void Insert(_wxArraywxEventTableEntryPointerArray lItem, size_t uiIndex, size_t nInsert = 1) { wxBaseArrayPtrVoid::Insert((base_type)lItem, uiIndex, nInsert) ; } void RemoveAt(size_t uiIndex, size_t nRemove = 1) { wxBaseArrayPtrVoid::RemoveAt(uiIndex, nRemove); } void Remove(_wxArraywxEventTableEntryPointerArray lItem) { int iIndex = Index(lItem); if (!(iIndex != (-1))) {; return; }; wxBaseArrayPtrVoid::RemoveAt((size_t)iIndex); } void Sort(CMPFUNC_wxArraywxEventTableEntryPointerArray fCmp) { wxBaseArrayPtrVoid::Sort((CMPFUNC)fCmp); } private: typedef wxBaseArrayPtrVoid::iterator biterator; typedef wxBaseArrayPtrVoid::const_iterator bconst_iterator; typedef wxBaseArrayPtrVoid::value_type bvalue_type; typedef wxBaseArrayPtrVoid::const_reference bconst_reference; public: typedef _wxArraywxEventTableEntryPointerArray value_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type* iterator; typedef const value_type* const_iterator; typedef value_type& reference; typedef const value_type& const_reference; typedef wxBaseArrayPtrVoid::difference_type difference_type; typedef wxBaseArrayPtrVoid::size_type size_type; class reverse_iterator { typedef _wxArraywxEventTableEntryPointerArray value_type; typedef value_type& reference; typedef value_type* pointer; typedef reverse_iterator itor; friend inline itor operator+(int o, const itor& it) { return it.m_ptr - o; } friend inline itor operator+(const itor& it, int o) { return it.m_ptr - o; } friend inline itor operator-(const itor& it, int o) { return it.m_ptr + o; } friend inline difference_type operator-(const itor& i1, const itor& i2) { return i1.m_ptr - i2.m_ptr; } public: pointer m_ptr; reverse_iterator() : m_ptr(__null) { } reverse_iterator(pointer ptr) : m_ptr(ptr) { } reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { } reference operator*() const { return *m_ptr; } itor& operator++() { --m_ptr; return *this; } const itor operator++(int) { reverse_iterator tmp = *this; --m_ptr; return tmp; } itor& operator--() { ++m_ptr; return *this; } const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; } bool operator ==(const itor& it) { return m_ptr == it.m_ptr; } bool operator !=(const itor& it) { return m_ptr != it.m_ptr; } }; class const_reverse_iterator { typedef _wxArraywxEventTableEntryPointerArray value_type; typedef const value_type& reference; typedef const value_type* pointer; typedef const_reverse_iterator itor; friend inline itor operator+(int o, const itor& it) { return it.m_ptr - o; } friend inline itor operator+(const itor& it, int o) { return it.m_ptr - o; } friend inline itor operator-(const itor& it, int o) { return it.m_ptr + o; } friend inline difference_type operator-(const itor& i1, const itor& i2) { return i1.m_ptr - i2.m_ptr; } public: pointer m_ptr; const_reverse_iterator() : m_ptr(__null) { } const_reverse_iterator(pointer ptr) : m_ptr(ptr) { } const_reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { } const_reverse_iterator(const reverse_iterator& it) : m_ptr(it.m_ptr) { } reference operator*() const { return *m_ptr; } itor& operator++() { --m_ptr; return *this; } const itor operator++(int) { itor tmp = *this; --m_ptr; return tmp; } itor& operator--() { ++m_ptr; return *this; } const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; } bool operator ==(const itor& it) { return m_ptr == it.m_ptr; } bool operator !=(const itor& it) { return m_ptr != it.m_ptr; } }; wxEventTableEntryPointerArray(size_type n, const_reference v) { assign(n, v); } wxEventTableEntryPointerArray(const_iterator first, const_iterator last) { assign(first, last); } void assign(const_iterator first, const_iterator last) { wxBaseArrayPtrVoid::assign((bconst_iterator)first, (bconst_iterator)last); } void assign(size_type n, const_reference v) { wxBaseArrayPtrVoid::assign(n, (bconst_reference)v); } reference back() { return *(end() - 1); } const_reference back() const { return *(end() - 1); } iterator begin() { return (iterator)wxBaseArrayPtrVoid::begin(); } const_iterator begin() const { return (const_iterator)wxBaseArrayPtrVoid::begin(); } size_type capacity() const { return wxBaseArrayPtrVoid::capacity(); } iterator end() { return (iterator)wxBaseArrayPtrVoid::end(); } const_iterator end() const { return (const_iterator)wxBaseArrayPtrVoid::end(); } iterator erase(iterator first, iterator last) { return (iterator)wxBaseArrayPtrVoid::erase((biterator)first, (biterator)last); } iterator erase(iterator it) { return (iterator)wxBaseArrayPtrVoid::erase((biterator)it); } reference front() { return *begin(); } const_reference front() const { return *begin(); } void insert(iterator it, size_type n, const_reference v) { wxBaseArrayPtrVoid::insert((biterator)it, n, (bconst_reference)v); } iterator insert(iterator it, const_reference v = value_type()) { return (iterator)wxBaseArrayPtrVoid::insert((biterator)it, (bconst_reference)v); } void insert(iterator it, const_iterator first, const_iterator last) { wxBaseArrayPtrVoid::insert((biterator)it, (bconst_iterator)first, (bconst_iterator)last); } void pop_back() { wxBaseArrayPtrVoid::pop_back(); } void push_back(const_reference v) { wxBaseArrayPtrVoid::push_back((bconst_reference)v); } reverse_iterator rbegin() { return reverse_iterator(end() - 1); } const_reverse_iterator rbegin() const; reverse_iterator rend() { return reverse_iterator(begin() - 1); } const_reverse_iterator rend() const; void reserve(size_type n) { wxBaseArrayPtrVoid::reserve(n); }; void resize(size_type n, value_type v = value_type()); }; | |
31114 | ||
31115 | class wxEventHashTable | |
31116 | { | |
31117 | private: | |
31118 | ||
31119 | struct EventTypeTable | |
31120 | { | |
31121 | wxEventType eventType; | |
31122 | wxEventTableEntryPointerArray eventEntryTable; | |
31123 | }; | |
31124 | typedef EventTypeTable* EventTypeTablePointer; | |
31125 | ||
31126 | public: | |
31127 | ||
31128 | ||
31129 | ||
31130 | ||
31131 | wxEventHashTable(const wxEventTable &table); | |
31132 | ||
31133 | ~wxEventHashTable(); | |
31134 | ||
31135 | ||
31136 | ||
31137 | bool HandleEvent(wxEvent &event, wxEvtHandler *self); | |
31138 | ||
31139 | ||
31140 | void Clear(); | |
31141 | ||
31142 | ||
31143 | static void ClearAll(); | |
31144 | ||
31145 | protected: | |
31146 | ||
31147 | void InitHashTable(); | |
31148 | ||
31149 | void AddEntry(const wxEventTableEntry &entry); | |
31150 | ||
31151 | void AllocEventTypeTable(size_t size); | |
31152 | ||
31153 | ||
31154 | void GrowEventTypeTable(); | |
31155 | ||
31156 | protected: | |
31157 | const wxEventTable &m_table; | |
31158 | bool m_rebuildHash; | |
31159 | ||
31160 | size_t m_size; | |
31161 | EventTypeTablePointer *m_eventTypeTable; | |
31162 | ||
31163 | static wxEventHashTable* sm_first; | |
31164 | wxEventHashTable* m_previous; | |
31165 | wxEventHashTable* m_next; | |
31166 | ||
31167 | private: wxEventHashTable(const wxEventHashTable&); wxEventHashTable& operator=(const wxEventHashTable&); | |
31168 | }; | |
31169 | ||
31170 | ||
31171 | ||
31172 | ||
31173 | ||
31174 | class wxEvtHandler : public wxObject | |
31175 | { | |
31176 | public: | |
31177 | wxEvtHandler(); | |
31178 | virtual ~wxEvtHandler(); | |
31179 | ||
31180 | wxEvtHandler *GetNextHandler() const { return m_nextHandler; } | |
31181 | wxEvtHandler *GetPreviousHandler() const { return m_previousHandler; } | |
31182 | void SetNextHandler(wxEvtHandler *handler) { m_nextHandler = handler; } | |
31183 | void SetPreviousHandler(wxEvtHandler *handler) { m_previousHandler = handler; } | |
31184 | ||
31185 | void SetEvtHandlerEnabled(bool enabled) { m_enabled = enabled; } | |
31186 | bool GetEvtHandlerEnabled() const { return m_enabled; } | |
31187 | ||
31188 | ||
31189 | virtual bool ProcessEvent(wxEvent& event); | |
31190 | ||
31191 | ||
31192 | void AddPendingEvent(wxEvent& event); | |
31193 | ||
31194 | ||
31195 | void ProcessPendingEvents(); | |
31196 | ||
31197 | ||
31198 | bool ProcessThreadEvent(wxEvent& event); | |
31199 | ||
31200 | ||
31201 | ||
31202 | ||
31203 | void Connect(int winid, | |
31204 | int lastId, | |
31205 | int eventType, | |
31206 | wxObjectEventFunction func, | |
31207 | wxObject *userData = (wxObject *) __null, | |
31208 | wxEvtHandler *eventSink = (wxEvtHandler *) __null); | |
31209 | ||
31210 | ||
31211 | void Connect(int winid, | |
31212 | int eventType, | |
31213 | wxObjectEventFunction func, | |
31214 | wxObject *userData = (wxObject *) __null, | |
31215 | wxEvtHandler *eventSink = (wxEvtHandler *) __null) | |
31216 | { Connect(winid, wxID_ANY, eventType, func, userData, eventSink); } | |
31217 | ||
31218 | ||
31219 | void Connect(int eventType, | |
31220 | wxObjectEventFunction func, | |
31221 | wxObject *userData = (wxObject *) __null, | |
31222 | wxEvtHandler *eventSink = (wxEvtHandler *) __null) | |
31223 | { Connect(wxID_ANY, wxID_ANY, eventType, func, userData, eventSink); } | |
31224 | ||
31225 | bool Disconnect(int winid, | |
31226 | int lastId, | |
31227 | wxEventType eventType, | |
31228 | wxObjectEventFunction func = __null, | |
31229 | wxObject *userData = (wxObject *) __null, | |
31230 | wxEvtHandler *eventSink = (wxEvtHandler *) __null); | |
31231 | ||
31232 | bool Disconnect(int winid = wxID_ANY, | |
31233 | wxEventType eventType = wxEVT_NULL, | |
31234 | wxObjectEventFunction func = __null, | |
31235 | wxObject *userData = (wxObject *) __null, | |
31236 | wxEvtHandler *eventSink = (wxEvtHandler *) __null) | |
31237 | { return Disconnect(winid, wxID_ANY, eventType, func, userData, eventSink); } | |
31238 | ||
31239 | bool Disconnect(wxEventType eventType, | |
31240 | wxObjectEventFunction func, | |
31241 | wxObject *userData = (wxObject *) __null, | |
31242 | wxEvtHandler *eventSink = (wxEvtHandler *) __null) | |
31243 | { return Disconnect(wxID_ANY, eventType, func, userData, eventSink); } | |
31244 | ||
31245 | wxList* GetDynamicEventTable() const { return m_dynamicEvents ; } | |
31246 | ||
31247 | ||
31248 | void SetClientObject( wxClientData *data ) { DoSetClientObject(data); } | |
31249 | wxClientData *GetClientObject() const { return DoGetClientObject(); } | |
31250 | ||
31251 | void SetClientData( void *data ) { DoSetClientData(data); } | |
31252 | void *GetClientData() const { return DoGetClientData(); } | |
31253 | ||
31254 | ||
31255 | ||
31256 | ||
31257 | ||
31258 | ||
31259 | static bool ProcessEventIfMatches(const wxEventTableEntryBase& tableEntry, | |
31260 | wxEvtHandler *handler, | |
31261 | wxEvent& event); | |
31262 | ||
31263 | ||
31264 | virtual bool SearchEventTable(wxEventTable& table, wxEvent& event); | |
31265 | bool SearchDynamicEventTable( wxEvent& event ); | |
31266 | ||
31267 | ||
31268 | void ClearEventLocker(); | |
31269 | ||
31270 | ||
31271 | ||
31272 | void ClearEventHashTable() { GetEventHashTable().Clear(); } | |
31273 | ||
31274 | private: | |
31275 | static const wxEventTableEntry sm_eventTableEntries[]; | |
31276 | ||
31277 | protected: | |
31278 | # 2420 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
31279 | virtual bool TryValidator(wxEvent& ) { return false; } | |
31280 | ||
31281 | ||
31282 | ||
31283 | ||
31284 | ||
31285 | virtual bool TryParent(wxEvent& event); | |
31286 | ||
31287 | ||
31288 | static const wxEventTable sm_eventTable; | |
31289 | virtual const wxEventTable *GetEventTable() const; | |
31290 | ||
31291 | static wxEventHashTable sm_eventHashTable; | |
31292 | virtual wxEventHashTable& GetEventHashTable() const; | |
31293 | ||
31294 | wxEvtHandler* m_nextHandler; | |
31295 | wxEvtHandler* m_previousHandler; | |
31296 | wxList* m_dynamicEvents; | |
31297 | wxList* m_pendingEvents; | |
31298 | # 2447 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
31299 | const wxCriticalSection& Lock() const { return *m_eventsLocker; } | |
31300 | wxCriticalSection& Lock() { return *m_eventsLocker; } | |
31301 | ||
31302 | wxCriticalSection* m_eventsLocker; | |
31303 | ||
31304 | ||
31305 | ||
31306 | ||
31307 | bool m_enabled; | |
31308 | ||
31309 | ||
31310 | ||
31311 | ||
31312 | ||
31313 | ||
31314 | ||
31315 | union | |
31316 | { | |
31317 | wxClientData *m_clientObject; | |
31318 | void *m_clientData; | |
31319 | }; | |
31320 | ||
31321 | ||
31322 | wxClientDataType m_clientDataType; | |
31323 | ||
31324 | ||
31325 | virtual void DoSetClientObject( wxClientData *data ); | |
31326 | virtual wxClientData *DoGetClientObject() const; | |
31327 | ||
31328 | virtual void DoSetClientData( void *data ); | |
31329 | virtual void *DoGetClientData() const; | |
31330 | ||
31331 | private: | |
31332 | private: wxEvtHandler(const wxEvtHandler&); wxEvtHandler& operator=(const wxEvtHandler&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
31333 | }; | |
31334 | ||
31335 | ||
31336 | ||
31337 | inline void wxPostEvent(wxEvtHandler *dest, wxEvent& event) | |
31338 | { | |
31339 | if (!(dest)) {; return; }; | |
31340 | ||
31341 | dest->AddPendingEvent(event); | |
31342 | } | |
31343 | ||
31344 | typedef void (wxEvtHandler::*wxEventFunction)(wxEvent&); | |
31345 | ||
31346 | ||
31347 | ||
31348 | ||
31349 | ||
31350 | ||
31351 | typedef void (wxEvtHandler::*wxCommandEventFunction)(wxCommandEvent&); | |
31352 | typedef void (wxEvtHandler::*wxScrollEventFunction)(wxScrollEvent&); | |
31353 | typedef void (wxEvtHandler::*wxScrollWinEventFunction)(wxScrollWinEvent&); | |
31354 | typedef void (wxEvtHandler::*wxSizeEventFunction)(wxSizeEvent&); | |
31355 | typedef void (wxEvtHandler::*wxMoveEventFunction)(wxMoveEvent&); | |
31356 | typedef void (wxEvtHandler::*wxPaintEventFunction)(wxPaintEvent&); | |
31357 | typedef void (wxEvtHandler::*wxNcPaintEventFunction)(wxNcPaintEvent&); | |
31358 | typedef void (wxEvtHandler::*wxEraseEventFunction)(wxEraseEvent&); | |
31359 | typedef void (wxEvtHandler::*wxMouseEventFunction)(wxMouseEvent&); | |
31360 | typedef void (wxEvtHandler::*wxCharEventFunction)(wxKeyEvent&); | |
31361 | typedef void (wxEvtHandler::*wxFocusEventFunction)(wxFocusEvent&); | |
31362 | typedef void (wxEvtHandler::*wxChildFocusEventFunction)(wxChildFocusEvent&); | |
31363 | typedef void (wxEvtHandler::*wxActivateEventFunction)(wxActivateEvent&); | |
31364 | typedef void (wxEvtHandler::*wxMenuEventFunction)(wxMenuEvent&); | |
31365 | typedef void (wxEvtHandler::*wxJoystickEventFunction)(wxJoystickEvent&); | |
31366 | typedef void (wxEvtHandler::*wxDropFilesEventFunction)(wxDropFilesEvent&); | |
31367 | typedef void (wxEvtHandler::*wxInitDialogEventFunction)(wxInitDialogEvent&); | |
31368 | typedef void (wxEvtHandler::*wxSysColourChangedEventFunction)(wxSysColourChangedEvent&); | |
31369 | typedef void (wxEvtHandler::*wxDisplayChangedEventFunction)(wxDisplayChangedEvent&); | |
31370 | typedef void (wxEvtHandler::*wxUpdateUIEventFunction)(wxUpdateUIEvent&); | |
31371 | typedef void (wxEvtHandler::*wxIdleEventFunction)(wxIdleEvent&); | |
31372 | typedef void (wxEvtHandler::*wxCloseEventFunction)(wxCloseEvent&); | |
31373 | typedef void (wxEvtHandler::*wxShowEventFunction)(wxShowEvent&); | |
31374 | typedef void (wxEvtHandler::*wxIconizeEventFunction)(wxIconizeEvent&); | |
31375 | typedef void (wxEvtHandler::*wxMaximizeEventFunction)(wxMaximizeEvent&); | |
31376 | typedef void (wxEvtHandler::*wxNavigationKeyEventFunction)(wxNavigationKeyEvent&); | |
31377 | typedef void (wxEvtHandler::*wxPaletteChangedEventFunction)(wxPaletteChangedEvent&); | |
31378 | typedef void (wxEvtHandler::*wxQueryNewPaletteEventFunction)(wxQueryNewPaletteEvent&); | |
31379 | typedef void (wxEvtHandler::*wxWindowCreateEventFunction)(wxWindowCreateEvent&); | |
31380 | typedef void (wxEvtHandler::*wxWindowDestroyEventFunction)(wxWindowDestroyEvent&); | |
31381 | typedef void (wxEvtHandler::*wxSetCursorEventFunction)(wxSetCursorEvent&); | |
31382 | typedef void (wxEvtHandler::*wxNotifyEventFunction)(wxNotifyEvent&); | |
31383 | typedef void (wxEvtHandler::*wxHelpEventFunction)(wxHelpEvent&); | |
31384 | typedef void (wxEvtHandler::*wxContextMenuEventFunction)(wxContextMenuEvent&); | |
31385 | typedef void (wxEvtHandler::*wxMouseCaptureChangedEventFunction)(wxMouseCaptureChangedEvent&); | |
31386 | ||
31387 | ||
31388 | ||
31389 | ||
31390 | typedef wxSysColourChangedEventFunction wxSysColourChangedFunction; | |
31391 | typedef wxDisplayChangedEventFunction wxDisplayChangedFunction; | |
31392 | # 2922 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
31393 | extern wxList *wxPendingEvents; | |
31394 | ||
31395 | extern wxCriticalSection *wxPendingEventsLocker; | |
31396 | # 2935 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/event.h" | |
31397 | wxWindow* wxFindFocusDescendant(wxWindow* ancestor); | |
31398 | # 24 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
31399 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/app.h" 1 | |
31400 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/app.h" | |
31401 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/window.h" 1 | |
31402 | # 28 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/window.h" | |
31403 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/font.h" 1 | |
31404 | # 25 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/font.h" | |
31405 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gdiobj.h" 1 | |
31406 | # 22 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gdiobj.h" | |
31407 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/gdiobj.h" 1 | |
31408 | # 20 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/gdiobj.h" | |
31409 | class wxGDIObject : public wxObject | |
31410 | { | |
31411 | public: | |
31412 | inline wxGDIObject() { m_visible = 0; }; | |
31413 | inline ~wxGDIObject() {} | |
31414 | ||
31415 | virtual bool GetVisible() { return m_visible; } | |
31416 | virtual void SetVisible( bool visible ) { m_visible = visible; } | |
31417 | ||
31418 | bool IsNull() const { return (m_refData == 0); } | |
31419 | ||
31420 | protected: | |
31421 | bool m_visible; | |
31422 | ||
31423 | private: | |
31424 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
31425 | }; | |
31426 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gdiobj.h" 2 | |
31427 | # 26 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/font.h" 2 | |
31428 | ||
31429 | ||
31430 | ||
31431 | ||
31432 | ||
31433 | class wxFontData; | |
31434 | class wxFontBase; | |
31435 | class wxFont; | |
31436 | class wxSize; | |
31437 | # 44 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/font.h" | |
31438 | enum wxFontFamily | |
31439 | { | |
31440 | wxFONTFAMILY_DEFAULT = wxDEFAULT, | |
31441 | wxFONTFAMILY_DECORATIVE = wxDECORATIVE, | |
31442 | wxFONTFAMILY_ROMAN = wxROMAN, | |
31443 | wxFONTFAMILY_SCRIPT = wxSCRIPT, | |
31444 | wxFONTFAMILY_SWISS = wxSWISS, | |
31445 | wxFONTFAMILY_MODERN = wxMODERN, | |
31446 | wxFONTFAMILY_TELETYPE = wxTELETYPE, | |
31447 | wxFONTFAMILY_MAX, | |
31448 | wxFONTFAMILY_UNKNOWN = wxFONTFAMILY_MAX | |
31449 | }; | |
31450 | ||
31451 | ||
31452 | enum wxFontStyle | |
31453 | { | |
31454 | wxFONTSTYLE_NORMAL = wxNORMAL, | |
31455 | wxFONTSTYLE_ITALIC = wxITALIC, | |
31456 | wxFONTSTYLE_SLANT = wxSLANT, | |
31457 | wxFONTSTYLE_MAX | |
31458 | }; | |
31459 | ||
31460 | ||
31461 | enum wxFontWeight | |
31462 | { | |
31463 | wxFONTWEIGHT_NORMAL = wxNORMAL, | |
31464 | wxFONTWEIGHT_LIGHT = wxLIGHT, | |
31465 | wxFONTWEIGHT_BOLD = wxBOLD, | |
31466 | wxFONTWEIGHT_MAX | |
31467 | }; | |
31468 | ||
31469 | ||
31470 | enum | |
31471 | { | |
31472 | ||
31473 | wxFONTFLAG_DEFAULT = 0, | |
31474 | ||
31475 | ||
31476 | wxFONTFLAG_ITALIC = 1 << 0, | |
31477 | wxFONTFLAG_SLANT = 1 << 1, | |
31478 | ||
31479 | ||
31480 | wxFONTFLAG_LIGHT = 1 << 2, | |
31481 | wxFONTFLAG_BOLD = 1 << 3, | |
31482 | ||
31483 | ||
31484 | wxFONTFLAG_ANTIALIASED = 1 << 4, | |
31485 | wxFONTFLAG_NOT_ANTIALIASED = 1 << 5, | |
31486 | ||
31487 | ||
31488 | wxFONTFLAG_UNDERLINED = 1 << 6, | |
31489 | wxFONTFLAG_STRIKETHROUGH = 1 << 7, | |
31490 | ||
31491 | ||
31492 | wxFONTFLAG_MASK = wxFONTFLAG_ITALIC | | |
31493 | wxFONTFLAG_SLANT | | |
31494 | wxFONTFLAG_LIGHT | | |
31495 | wxFONTFLAG_BOLD | | |
31496 | wxFONTFLAG_ANTIALIASED | | |
31497 | wxFONTFLAG_NOT_ANTIALIASED | | |
31498 | wxFONTFLAG_UNDERLINED | | |
31499 | wxFONTFLAG_STRIKETHROUGH | |
31500 | }; | |
31501 | ||
31502 | ||
31503 | ||
31504 | ||
31505 | ||
31506 | class wxFontRefData; | |
31507 | struct wxNativeFontInfo; | |
31508 | ||
31509 | class wxFontBase : public wxGDIObject | |
31510 | { | |
31511 | public: | |
31512 | ||
31513 | virtual ~wxFontBase(); | |
31514 | ||
31515 | ||
31516 | static wxFont *New( | |
31517 | int pointSize, | |
31518 | int family, | |
31519 | int style, | |
31520 | int weight, | |
31521 | bool underlined = false, | |
31522 | const wxString& face = wxEmptyString, | |
31523 | wxFontEncoding encoding = wxFONTENCODING_DEFAULT); | |
31524 | ||
31525 | ||
31526 | ||
31527 | static wxFont *New(int pointSize, | |
31528 | wxFontFamily family, | |
31529 | int flags = wxFONTFLAG_DEFAULT, | |
31530 | const wxString& face = wxEmptyString, | |
31531 | wxFontEncoding encoding = wxFONTENCODING_DEFAULT); | |
31532 | ||
31533 | ||
31534 | static wxFont *New( | |
31535 | const wxSize& pixelSize, | |
31536 | int family, | |
31537 | int style, | |
31538 | int weight, | |
31539 | bool underlined = false, | |
31540 | const wxString& face = wxEmptyString, | |
31541 | wxFontEncoding encoding = wxFONTENCODING_DEFAULT); | |
31542 | ||
31543 | ||
31544 | ||
31545 | static wxFont *New(const wxSize& pixelSize, | |
31546 | wxFontFamily family, | |
31547 | int flags = wxFONTFLAG_DEFAULT, | |
31548 | const wxString& face = wxEmptyString, | |
31549 | wxFontEncoding encoding = wxFONTENCODING_DEFAULT); | |
31550 | ||
31551 | ||
31552 | static wxFont *New(const wxNativeFontInfo& nativeFontDesc); | |
31553 | ||
31554 | ||
31555 | static wxFont *New(const wxString& strNativeFontDesc); | |
31556 | ||
31557 | ||
31558 | bool Ok() const { return m_refData != __null; } | |
31559 | ||
31560 | ||
31561 | bool operator == (const wxFont& font) const; | |
31562 | bool operator != (const wxFont& font) const; | |
31563 | ||
31564 | ||
31565 | virtual int GetPointSize() const = 0; | |
31566 | virtual wxSize GetPixelSize() const; | |
31567 | virtual bool IsUsingSizeInPixels() const; | |
31568 | virtual int GetFamily() const = 0; | |
31569 | virtual int GetStyle() const = 0; | |
31570 | virtual int GetWeight() const = 0; | |
31571 | virtual bool GetUnderlined() const = 0; | |
31572 | virtual wxString GetFaceName() const = 0; | |
31573 | virtual wxFontEncoding GetEncoding() const = 0; | |
31574 | virtual const wxNativeFontInfo *GetNativeFontInfo() const = 0; | |
31575 | ||
31576 | virtual bool IsFixedWidth() const; | |
31577 | ||
31578 | wxString GetNativeFontInfoDesc() const; | |
31579 | wxString GetNativeFontInfoUserDesc() const; | |
31580 | ||
31581 | ||
31582 | virtual void SetPointSize( int pointSize ) = 0; | |
31583 | virtual void SetPixelSize( const wxSize& pixelSize ); | |
31584 | virtual void SetFamily( int family ) = 0; | |
31585 | virtual void SetStyle( int style ) = 0; | |
31586 | virtual void SetWeight( int weight ) = 0; | |
31587 | virtual void SetFaceName( const wxString& faceName ) = 0; | |
31588 | virtual void SetUnderlined( bool underlined ) = 0; | |
31589 | virtual void SetEncoding(wxFontEncoding encoding) = 0; | |
31590 | void SetNativeFontInfo(const wxNativeFontInfo& info) | |
31591 | { DoSetNativeFontInfo(info); } | |
31592 | ||
31593 | void SetNativeFontInfo(const wxString& info); | |
31594 | void SetNativeFontInfoUserDesc(const wxString& info); | |
31595 | ||
31596 | ||
31597 | ||
31598 | wxString GetFamilyString() const; | |
31599 | wxString GetStyleString() const; | |
31600 | wxString GetWeightString() const; | |
31601 | ||
31602 | ||
31603 | virtual void SetNoAntiAliasing( bool = true ) { } | |
31604 | virtual bool GetNoAntiAliasing() const { return false; } | |
31605 | ||
31606 | ||
31607 | ||
31608 | static wxFontEncoding GetDefaultEncoding() { return ms_encodingDefault; } | |
31609 | static void SetDefaultEncoding(wxFontEncoding encoding); | |
31610 | ||
31611 | protected: | |
31612 | ||
31613 | wxFontRefData *GetFontData() const | |
31614 | { return (wxFontRefData *)m_refData; } | |
31615 | ||
31616 | ||
31617 | virtual void DoSetNativeFontInfo(const wxNativeFontInfo& info); | |
31618 | ||
31619 | private: | |
31620 | ||
31621 | ||
31622 | ||
31623 | ||
31624 | static wxFontEncoding ms_encodingDefault; | |
31625 | }; | |
31626 | # 241 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/font.h" | |
31627 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/font.h" 1 | |
31628 | # 17 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/font.h" | |
31629 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/hash.h" 1 | |
31630 | # 18 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/font.h" 2 | |
31631 | ||
31632 | ||
31633 | ||
31634 | ||
31635 | ||
31636 | class wxDC; | |
31637 | class wxPaintDC; | |
31638 | class wxWindow; | |
31639 | ||
31640 | class wxFont; | |
31641 | ||
31642 | ||
31643 | ||
31644 | ||
31645 | ||
31646 | class wxFont : public wxFontBase | |
31647 | { | |
31648 | public: | |
31649 | ||
31650 | wxFont() { Init(); } | |
31651 | wxFont(const wxFont& font) : wxFontBase() { Init(); Ref(font); } | |
31652 | ||
31653 | ||
31654 | wxFont(const wxString& fontname) | |
31655 | { | |
31656 | Init(); | |
31657 | ||
31658 | Create(fontname); | |
31659 | } | |
31660 | ||
31661 | wxFont(const wxNativeFontInfo& info); | |
31662 | ||
31663 | wxFont(int size, | |
31664 | int family, | |
31665 | int style, | |
31666 | int weight, | |
31667 | bool underlined = false, | |
31668 | const wxString& face = wxEmptyString, | |
31669 | wxFontEncoding encoding = wxFONTENCODING_DEFAULT) | |
31670 | { | |
31671 | Init(); | |
31672 | ||
31673 | (void)Create(size, family, style, weight, underlined, face, encoding); | |
31674 | } | |
31675 | ||
31676 | bool Create(int size, | |
31677 | int family, | |
31678 | int style, | |
31679 | int weight, | |
31680 | bool underlined = false, | |
31681 | const wxString& face = wxEmptyString, | |
31682 | wxFontEncoding encoding = wxFONTENCODING_DEFAULT); | |
31683 | ||
31684 | ||
31685 | bool Create(const wxString& fontname); | |
31686 | ||
31687 | ~wxFont(); | |
31688 | ||
31689 | ||
31690 | wxFont& operator=(const wxFont& font); | |
31691 | ||
31692 | ||
31693 | virtual int GetPointSize() const; | |
31694 | virtual int GetFamily() const; | |
31695 | virtual int GetStyle() const; | |
31696 | virtual int GetWeight() const; | |
31697 | virtual wxString GetFaceName() const; | |
31698 | virtual bool GetUnderlined() const; | |
31699 | virtual wxFontEncoding GetEncoding() const; | |
31700 | virtual const wxNativeFontInfo *GetNativeFontInfo() const; | |
31701 | virtual bool IsFixedWidth() const; | |
31702 | ||
31703 | virtual void SetPointSize( int pointSize ); | |
31704 | virtual void SetFamily( int family ); | |
31705 | virtual void SetStyle( int style ); | |
31706 | virtual void SetWeight( int weight ); | |
31707 | virtual void SetFaceName( const wxString& faceName ); | |
31708 | virtual void SetUnderlined( bool underlined ); | |
31709 | virtual void SetEncoding(wxFontEncoding encoding); | |
31710 | ||
31711 | virtual void SetNoAntiAliasing( bool no = true ); | |
31712 | virtual bool GetNoAntiAliasing() const ; | |
31713 | ||
31714 | ||
31715 | void Unshare(); | |
31716 | ||
31717 | ||
31718 | ||
31719 | ||
31720 | ||
31721 | ||
31722 | ||
31723 | protected: | |
31724 | virtual void DoSetNativeFontInfo( const wxNativeFontInfo& info ); | |
31725 | ||
31726 | ||
31727 | void Init(); | |
31728 | ||
31729 | private: | |
31730 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
31731 | }; | |
31732 | # 242 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/font.h" 2 | |
31733 | # 29 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/window.h" 2 | |
31734 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/colour.h" 1 | |
31735 | # 22 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/colour.h" | |
31736 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/colour.h" 1 | |
31737 | # 20 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/colour.h" | |
31738 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/string.h" 1 | |
31739 | # 21 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/colour.h" 2 | |
31740 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gdiobj.h" 1 | |
31741 | # 22 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/colour.h" 2 | |
31742 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/palette.h" 1 | |
31743 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/palette.h" | |
31744 | class wxPaletteBase: public wxGDIObject | |
31745 | { | |
31746 | public: | |
31747 | virtual ~wxPaletteBase() { } | |
31748 | ||
31749 | virtual bool Ok() const = 0; | |
31750 | virtual int GetColoursCount() const { ; return 0; }; | |
31751 | }; | |
31752 | # 39 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/palette.h" | |
31753 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/paletteg.h" 1 | |
31754 | # 19 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/paletteg.h" | |
31755 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/defs.h" 1 | |
31756 | # 20 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/paletteg.h" 2 | |
31757 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/object.h" 1 | |
31758 | # 21 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/paletteg.h" 2 | |
31759 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gdiobj.h" 1 | |
31760 | # 22 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/paletteg.h" 2 | |
31761 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gdicmn.h" 1 | |
31762 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/paletteg.h" 2 | |
31763 | ||
31764 | ||
31765 | ||
31766 | ||
31767 | ||
31768 | class wxPalette; | |
31769 | ||
31770 | ||
31771 | ||
31772 | ||
31773 | ||
31774 | class wxPalette: public wxPaletteBase | |
31775 | { | |
31776 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
31777 | ||
31778 | public: | |
31779 | ||
31780 | wxPalette(); | |
31781 | wxPalette( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue ); | |
31782 | wxPalette( const wxPalette& palette ); | |
31783 | ~wxPalette(); | |
31784 | wxPalette& operator = ( const wxPalette& palette ); | |
31785 | bool operator == ( const wxPalette& palette ); | |
31786 | bool operator != ( const wxPalette& palette ); | |
31787 | virtual bool Ok() const; | |
31788 | ||
31789 | bool Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue); | |
31790 | int GetPixel( const unsigned char red, const unsigned char green, const unsigned char blue ) const; | |
31791 | bool GetRGB( int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const; | |
31792 | ||
31793 | ||
31794 | }; | |
31795 | # 40 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/palette.h" 2 | |
31796 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/colour.h" 2 | |
31797 | ||
31798 | ||
31799 | ||
31800 | ||
31801 | ||
31802 | class wxDC; | |
31803 | class wxPaintDC; | |
31804 | class wxBitmap; | |
31805 | class wxWindow; | |
31806 | ||
31807 | class wxColour; | |
31808 | ||
31809 | ||
31810 | ||
31811 | ||
31812 | ||
31813 | class wxColour: public wxGDIObject | |
31814 | { | |
31815 | public: | |
31816 | wxColour() { } | |
31817 | ||
31818 | ||
31819 | wxColour( unsigned char red, unsigned char green, unsigned char blue ); | |
31820 | wxColour( unsigned long colRGB ) { Set(colRGB); } | |
31821 | ||
31822 | ||
31823 | wxColour( const wxString &colourName ) { InitFromName(colourName); } | |
31824 | wxColour( const char *colourName ) { InitFromName( wxString::FromAscii(colourName) ); } | |
31825 | ||
31826 | ||
31827 | ||
31828 | ||
31829 | ||
31830 | wxColour( const wxColour& col ) | |
31831 | : wxGDIObject() | |
31832 | { Ref(col); } | |
31833 | wxColour& operator = ( const wxColour& col ) { Ref(col); return *this; } | |
31834 | ||
31835 | ~wxColour(); | |
31836 | ||
31837 | bool Ok() const { return m_refData != __null; } | |
31838 | ||
31839 | bool operator == ( const wxColour& col ) const; | |
31840 | bool operator != ( const wxColour& col ) const { return !(*this == col); } | |
31841 | ||
31842 | void Set( unsigned char red, unsigned char green, unsigned char blue ); | |
31843 | void Set( unsigned long colRGB ) | |
31844 | { | |
31845 | ||
31846 | ||
31847 | Set((unsigned char)colRGB, | |
31848 | (unsigned char)(colRGB >> 8), | |
31849 | (unsigned char)(colRGB >> 16)); | |
31850 | } | |
31851 | ||
31852 | unsigned char Red() const; | |
31853 | unsigned char Green() const; | |
31854 | unsigned char Blue() const; | |
31855 | ||
31856 | ||
31857 | ||
31858 | static wxColour CreateByName(const wxString& name); | |
31859 | ||
31860 | ||
31861 | void CalcPixel( GdkColormap *cmap ); | |
31862 | int GetPixel() const; | |
31863 | GdkColor *GetColor() const; | |
31864 | ||
31865 | void InitFromName(const wxString& colourName); | |
31866 | ||
31867 | protected: | |
31868 | ||
31869 | virtual wxObjectRefData *CreateRefData() const; | |
31870 | virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const; | |
31871 | ||
31872 | ||
31873 | private: | |
31874 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
31875 | }; | |
31876 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/colour.h" 2 | |
31877 | # 30 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/window.h" 2 | |
31878 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/region.h" 1 | |
31879 | # 22 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/region.h" | |
31880 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/region.h" 1 | |
31881 | # 17 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/region.h" | |
31882 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/list.h" 1 | |
31883 | # 18 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/region.h" 2 | |
31884 | ||
31885 | ||
31886 | ||
31887 | ||
31888 | ||
31889 | ||
31890 | ||
31891 | class wxRegion; | |
31892 | ||
31893 | ||
31894 | ||
31895 | ||
31896 | ||
31897 | enum wxRegionContain | |
31898 | { | |
31899 | wxOutRegion = 0, | |
31900 | wxPartRegion = 1, | |
31901 | wxInRegion = 2 | |
31902 | }; | |
31903 | ||
31904 | ||
31905 | enum wxRegionOp | |
31906 | { | |
31907 | wxRGN_AND, | |
31908 | wxRGN_COPY, | |
31909 | wxRGN_DIFF, | |
31910 | wxRGN_OR, | |
31911 | wxRGN_XOR | |
31912 | }; | |
31913 | ||
31914 | ||
31915 | ||
31916 | ||
31917 | ||
31918 | class wxRegion : public wxGDIObject | |
31919 | { | |
31920 | public: | |
31921 | wxRegion() { } | |
31922 | ||
31923 | wxRegion( wxCoord x, wxCoord y, wxCoord w, wxCoord h ) | |
31924 | { | |
31925 | InitRect(x, y, w, h); | |
31926 | } | |
31927 | ||
31928 | wxRegion( const wxPoint& topLeft, const wxPoint& bottomRight ) | |
31929 | { | |
31930 | InitRect(topLeft.x, topLeft.y, | |
31931 | bottomRight.x - topLeft.x, bottomRight.y - topLeft.y); | |
31932 | } | |
31933 | ||
31934 | wxRegion( const wxRect& rect ) | |
31935 | { | |
31936 | InitRect(rect.x, rect.y, rect.width, rect.height); | |
31937 | } | |
31938 | ||
31939 | wxRegion( size_t n, const wxPoint *points, int fillStyle = wxODDEVEN_RULE ); | |
31940 | ||
31941 | wxRegion( const wxBitmap& bmp) | |
31942 | { | |
31943 | Union(bmp); | |
31944 | } | |
31945 | wxRegion( const wxBitmap& bmp, | |
31946 | const wxColour& transColour, int tolerance = 0) | |
31947 | { | |
31948 | Union(bmp, transColour, tolerance); | |
31949 | } | |
31950 | ||
31951 | ~wxRegion(); | |
31952 | ||
31953 | wxRegion( const wxRegion& region ) | |
31954 | : wxGDIObject() | |
31955 | { Ref(region); } | |
31956 | wxRegion& operator = ( const wxRegion& region ) { Ref(region); return *this; } | |
31957 | ||
31958 | bool Ok() const { return m_refData != __null; } | |
31959 | ||
31960 | bool operator == ( const wxRegion& region ); | |
31961 | bool operator != ( const wxRegion& region ) { return !(*this == region); } | |
31962 | ||
31963 | void Clear(); | |
31964 | ||
31965 | bool Offset( wxCoord x, wxCoord y ); | |
31966 | ||
31967 | bool Union( wxCoord x, wxCoord y, wxCoord width, wxCoord height ); | |
31968 | bool Union( const wxRect& rect ); | |
31969 | bool Union( const wxRegion& region ); | |
31970 | ||
31971 | bool Intersect( wxCoord x, wxCoord y, wxCoord width, wxCoord height ); | |
31972 | bool Intersect( const wxRect& rect ); | |
31973 | bool Intersect( const wxRegion& region ); | |
31974 | ||
31975 | bool Subtract( wxCoord x, wxCoord y, wxCoord width, wxCoord height ); | |
31976 | bool Subtract( const wxRect& rect ); | |
31977 | bool Subtract( const wxRegion& region ); | |
31978 | ||
31979 | bool Xor( wxCoord x, wxCoord y, wxCoord width, wxCoord height ); | |
31980 | bool Xor( const wxRect& rect ); | |
31981 | bool Xor( const wxRegion& region ); | |
31982 | ||
31983 | void GetBox( wxCoord& x, wxCoord& y, wxCoord&w, wxCoord &h ) const; | |
31984 | wxRect GetBox() const ; | |
31985 | ||
31986 | bool Empty() const; | |
31987 | bool IsEmpty() const { return Empty(); } | |
31988 | ||
31989 | wxRegionContain Contains( wxCoord x, wxCoord y ) const; | |
31990 | wxRegionContain Contains( wxCoord x, wxCoord y, wxCoord w, wxCoord h ) const; | |
31991 | wxRegionContain Contains(const wxPoint& pt) const; | |
31992 | wxRegionContain Contains(const wxRect& rect) const; | |
31993 | ||
31994 | ||
31995 | ||
31996 | wxBitmap ConvertToBitmap() const; | |
31997 | ||
31998 | ||
31999 | ||
32000 | ||
32001 | ||
32002 | ||
32003 | bool Union(const wxBitmap& bmp); | |
32004 | bool Union(const wxBitmap& bmp, | |
32005 | const wxColour& transColour, int tolerance = 0); | |
32006 | ||
32007 | ||
32008 | public: | |
32009 | ||
32010 | ||
32011 | wxRegion( GdkRegion *region ); | |
32012 | ||
32013 | GdkRegion *GetRegion() const; | |
32014 | ||
32015 | protected: | |
32016 | ||
32017 | virtual wxObjectRefData *CreateRefData() const; | |
32018 | virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const; | |
32019 | ||
32020 | ||
32021 | void InitRect(wxCoord x, wxCoord y, wxCoord w, wxCoord h); | |
32022 | ||
32023 | private: | |
32024 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
32025 | }; | |
32026 | ||
32027 | ||
32028 | ||
32029 | ||
32030 | ||
32031 | class wxRegionIterator: public wxObject | |
32032 | { | |
32033 | public: | |
32034 | wxRegionIterator(); | |
32035 | wxRegionIterator(const wxRegion& region); | |
32036 | ||
32037 | void Reset() { m_current = 0u; } | |
32038 | void Reset(const wxRegion& region); | |
32039 | ||
32040 | bool HaveRects() const; | |
32041 | operator bool () const { return HaveRects(); } | |
32042 | ||
32043 | wxRegionIterator& operator ++ (); | |
32044 | wxRegionIterator operator ++ (int); | |
32045 | ||
32046 | wxCoord GetX() const; | |
32047 | wxCoord GetY() const; | |
32048 | wxCoord GetW() const; | |
32049 | wxCoord GetWidth() const { return GetW(); } | |
32050 | wxCoord GetH() const; | |
32051 | wxCoord GetHeight() const { return GetH(); } | |
32052 | wxRect GetRect() const; | |
32053 | ||
32054 | private: | |
32055 | size_t m_current; | |
32056 | wxRegion m_region; | |
32057 | ||
32058 | private: | |
32059 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
32060 | }; | |
32061 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/region.h" 2 | |
32062 | # 31 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/window.h" 2 | |
32063 | ||
32064 | ||
32065 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/validate.h" 1 | |
32066 | # 25 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/validate.h" | |
32067 | class wxWindow; | |
32068 | class wxWindowBase; | |
32069 | # 40 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/validate.h" | |
32070 | class wxValidator : public wxEvtHandler | |
32071 | { | |
32072 | public: | |
32073 | wxValidator(); | |
32074 | virtual ~wxValidator(); | |
32075 | ||
32076 | ||
32077 | ||
32078 | ||
32079 | ||
32080 | virtual wxObject *Clone() const | |
32081 | { return (wxValidator *)__null; } | |
32082 | bool Copy(const wxValidator& val) | |
32083 | { m_validatorWindow = val.m_validatorWindow; return true; } | |
32084 | ||
32085 | ||
32086 | ||
32087 | virtual bool Validate(wxWindow *) { return false; }; | |
32088 | ||
32089 | ||
32090 | virtual bool TransferToWindow() { return false; } | |
32091 | ||
32092 | ||
32093 | virtual bool TransferFromWindow() { return false; }; | |
32094 | ||
32095 | ||
32096 | wxWindow *GetWindow() const { return (wxWindow *)m_validatorWindow; } | |
32097 | void SetWindow(wxWindowBase *win) { m_validatorWindow = win; } | |
32098 | ||
32099 | ||
32100 | ||
32101 | static bool IsSilent() { return ms_isSilent; } | |
32102 | static void SetBellOnError(bool doIt = true) { ms_isSilent = doIt; } | |
32103 | ||
32104 | protected: | |
32105 | wxWindowBase *m_validatorWindow; | |
32106 | ||
32107 | private: | |
32108 | static bool ms_isSilent; | |
32109 | ||
32110 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
32111 | private: wxValidator(const wxValidator&); wxValidator& operator=(const wxValidator&); | |
32112 | }; | |
32113 | ||
32114 | extern const wxValidator wxDefaultValidator; | |
32115 | # 34 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/window.h" 2 | |
32116 | ||
32117 | ||
32118 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/palette.h" 1 | |
32119 | # 37 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/window.h" 2 | |
32120 | ||
32121 | ||
32122 | ||
32123 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/accel.h" 1 | |
32124 | # 21 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/accel.h" | |
32125 | class wxAcceleratorTable; | |
32126 | class wxMenuItem; | |
32127 | class wxKeyEvent; | |
32128 | ||
32129 | ||
32130 | ||
32131 | ||
32132 | ||
32133 | ||
32134 | enum | |
32135 | { | |
32136 | wxACCEL_NORMAL = 0x0000, | |
32137 | wxACCEL_ALT = 0x0001, | |
32138 | wxACCEL_CTRL = 0x0002, | |
32139 | wxACCEL_SHIFT = 0x0004 | |
32140 | }; | |
32141 | ||
32142 | ||
32143 | ||
32144 | ||
32145 | ||
32146 | class wxAcceleratorEntry | |
32147 | { | |
32148 | public: | |
32149 | wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmd = 0, | |
32150 | wxMenuItem *item = __null) | |
32151 | : m_flags(flags) | |
32152 | , m_keyCode(keyCode) | |
32153 | , m_command(cmd) | |
32154 | , m_item(item) | |
32155 | { } | |
32156 | ||
32157 | wxAcceleratorEntry(const wxAcceleratorEntry& entry) | |
32158 | : m_flags(entry.m_flags) | |
32159 | , m_keyCode(entry.m_keyCode) | |
32160 | , m_command(entry.m_command) | |
32161 | , m_item(entry.m_item) | |
32162 | { } | |
32163 | ||
32164 | wxAcceleratorEntry& operator=(const wxAcceleratorEntry& entry) | |
32165 | { | |
32166 | Set(entry.m_flags, entry.m_keyCode, entry.m_command, entry.m_item); | |
32167 | return *this; | |
32168 | } | |
32169 | ||
32170 | void Set(int flags, int keyCode, int cmd, wxMenuItem *item = __null) | |
32171 | { | |
32172 | m_flags = flags; | |
32173 | m_keyCode = keyCode; | |
32174 | m_command = cmd; | |
32175 | m_item = item; | |
32176 | } | |
32177 | ||
32178 | void SetMenuItem(wxMenuItem *item) { m_item = item; } | |
32179 | ||
32180 | int GetFlags() const { return m_flags; } | |
32181 | int GetKeyCode() const { return m_keyCode; } | |
32182 | int GetCommand() const { return m_command; } | |
32183 | ||
32184 | wxMenuItem *GetMenuItem() const { return m_item; } | |
32185 | ||
32186 | bool operator==(const wxAcceleratorEntry& entry) const | |
32187 | { | |
32188 | return m_flags == entry.m_flags && | |
32189 | m_keyCode == entry.m_keyCode && | |
32190 | m_command == entry.m_command && | |
32191 | m_item == entry.m_item; | |
32192 | } | |
32193 | ||
32194 | bool operator!=(const wxAcceleratorEntry& entry) const | |
32195 | { return !(*this == entry); } | |
32196 | ||
32197 | ||
32198 | ||
32199 | ||
32200 | ||
32201 | ||
32202 | private: | |
32203 | int m_flags; | |
32204 | int m_keyCode; | |
32205 | int m_command; | |
32206 | ||
32207 | ||
32208 | wxMenuItem *m_item; | |
32209 | ||
32210 | ||
32211 | friend class wxMenu; | |
32212 | }; | |
32213 | # 122 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/accel.h" | |
32214 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/accel.h" 1 | |
32215 | # 15 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/accel.h" | |
32216 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/accel.h" 1 | |
32217 | # 17 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/accel.h" | |
32218 | class wxKeyEvent; | |
32219 | ||
32220 | ||
32221 | ||
32222 | ||
32223 | ||
32224 | class wxAcceleratorTable : public wxObject | |
32225 | { | |
32226 | public: | |
32227 | wxAcceleratorTable(); | |
32228 | wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]); | |
32229 | virtual ~wxAcceleratorTable(); | |
32230 | ||
32231 | wxAcceleratorTable(const wxAcceleratorTable& accel) | |
32232 | : wxObject() | |
32233 | { Ref(accel); } | |
32234 | wxAcceleratorTable& operator=(const wxAcceleratorTable& accel) | |
32235 | { if ( m_refData != accel.m_refData ) Ref(accel); return *this; } | |
32236 | ||
32237 | ||
32238 | bool operator==(const wxAcceleratorTable& accel) const | |
32239 | { return m_refData == accel.m_refData; } | |
32240 | bool operator!=(const wxAcceleratorTable& accel) const | |
32241 | { return !(*this == accel); } | |
32242 | ||
32243 | ||
32244 | bool Ok() const; | |
32245 | ||
32246 | void Add(const wxAcceleratorEntry& entry); | |
32247 | void Remove(const wxAcceleratorEntry& entry); | |
32248 | ||
32249 | ||
32250 | ||
32251 | ||
32252 | wxMenuItem *GetMenuItem(const wxKeyEvent& event) const; | |
32253 | int GetCommand(const wxKeyEvent& event) const; | |
32254 | ||
32255 | const wxAcceleratorEntry *GetEntry(const wxKeyEvent& event) const; | |
32256 | ||
32257 | protected: | |
32258 | ||
32259 | virtual wxObjectRefData *CreateRefData() const; | |
32260 | virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const; | |
32261 | ||
32262 | private: | |
32263 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
32264 | }; | |
32265 | # 15 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/accel.h" 2 | |
32266 | # 123 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/accel.h" 2 | |
32267 | # 131 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/accel.h" | |
32268 | extern wxAcceleratorTable wxNullAcceleratorTable; | |
32269 | # 41 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/window.h" 2 | |
32270 | # 59 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/window.h" | |
32271 | class wxCaret; | |
32272 | class wxControl; | |
32273 | class wxCursor; | |
32274 | class wxDC; | |
32275 | class wxDropTarget; | |
32276 | class wxItemResource; | |
32277 | class wxLayoutConstraints; | |
32278 | class wxResourceTable; | |
32279 | class wxSizer; | |
32280 | class wxToolTip; | |
32281 | class wxWindowBase; | |
32282 | class wxWindow; | |
32283 | # 81 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/window.h" | |
32284 | struct wxVisualAttributes | |
32285 | { | |
32286 | ||
32287 | wxFont font; | |
32288 | ||
32289 | ||
32290 | wxColour colFg; | |
32291 | ||
32292 | ||
32293 | ||
32294 | wxColour colBg; | |
32295 | }; | |
32296 | ||
32297 | ||
32298 | ||
32299 | enum wxWindowVariant | |
32300 | { | |
32301 | wxWINDOW_VARIANT_NORMAL, | |
32302 | wxWINDOW_VARIANT_SMALL, | |
32303 | wxWINDOW_VARIANT_MINI, | |
32304 | wxWINDOW_VARIANT_LARGE, | |
32305 | wxWINDOW_VARIANT_MAX | |
32306 | }; | |
32307 | # 113 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/window.h" | |
32308 | typedef int (*wxSortFuncFor_wxWindowList)(const wxWindow **, const wxWindow **); class wxWindowListNode : public wxNodeBase { public: wxWindowListNode(wxListBase *list = (wxListBase *)__null, wxWindowListNode *previous = (wxWindowListNode *)__null, wxWindowListNode *next = (wxWindowListNode *)__null, wxWindow *data = (wxWindow *)__null, const wxListKey& key = wxDefaultListKey) : wxNodeBase(list, previous, next, data, key) { } wxWindowListNode *GetNext() const { return (wxWindowListNode *)wxNodeBase::GetNext(); } wxWindowListNode *GetPrevious() const { return (wxWindowListNode *)wxNodeBase::GetPrevious(); } wxWindow *GetData() const { return (wxWindow *)wxNodeBase::GetData(); } void SetData(wxWindow *data) { wxNodeBase::SetData(data); } protected: virtual void DeleteData(); private: wxWindowListNode(const wxWindowListNode&); wxWindowListNode& operator=(const wxWindowListNode&); }; class wxWindowList : public wxListBase { public: typedef wxWindowListNode Node; typedef Node* compatibility_iterator; wxWindowList(wxKeyType keyType = wxKEY_NONE) : wxListBase(keyType) { } wxWindowList(const wxWindowList& list) : wxListBase(list.GetKeyType()) { Assign(list); } wxWindowList(size_t count, wxWindow *elements[]) : wxListBase(count, (void **)elements) { } wxWindowList& operator=(const wxWindowList& list) { Assign(list); return *this; } wxWindowListNode *GetFirst() const { return (wxWindowListNode *)wxListBase::GetFirst(); } wxWindowListNode *GetLast() const { return (wxWindowListNode *)wxListBase::GetLast(); } wxWindowListNode *Item(size_t index) const { return (wxWindowListNode *)wxListBase::Item(index); } wxWindow *operator[](size_t index) const { wxWindowListNode *node = Item(index); return node ? (wxWindow*)(node->GetData()) : (wxWindow*)__null; } wxWindowListNode *Append(wxWindowBase *object) { return (wxWindowListNode *)wxListBase::Append(object); } wxWindowListNode *Insert(wxWindowBase *object) { return (wxWindowListNode *)Insert((wxWindowListNode*)__null, object); } wxWindowListNode *Insert(size_t pos, wxWindowBase *object) { return (wxWindowListNode *)wxListBase::Insert(pos, object); } wxWindowListNode *Insert(wxWindowListNode *prev, wxWindowBase *object) { return (wxWindowListNode *)wxListBase::Insert(prev, object); } wxWindowListNode *Append(long key, void *object) { return (wxWindowListNode *)wxListBase::Append(key, object); } wxWindowListNode *Append(const wxChar *key, void *object) { return (wxWindowListNode *)wxListBase::Append(key, object); } wxWindowListNode *DetachNode(wxWindowListNode *node) { return (wxWindowListNode *)wxListBase::DetachNode(node); } bool DeleteNode(wxWindowListNode *node) { return wxListBase::DeleteNode(node); } bool DeleteObject(wxWindowBase *object) { return wxListBase::DeleteObject(object); } void Erase(compatibility_iterator it) { DeleteNode(it); } wxWindowListNode *Find(const wxWindowBase *object) const { return (wxWindowListNode *)wxListBase::Find(object); } virtual wxWindowListNode *Find(const wxListKey& key) const { return (wxWindowListNode *)wxListBase::Find(key); } int IndexOf(wxWindowBase *object) const { return wxListBase::IndexOf(object); } void Sort(wxSortCompareFunction func) { wxListBase::Sort(func); } void Sort(wxSortFuncFor_wxWindowList func) { Sort((wxSortCompareFunction)func); } protected: virtual wxNodeBase *CreateNode(wxNodeBase *prev, wxNodeBase *next, void *data, const wxListKey& key = wxDefaultListKey) { return new wxWindowListNode(this, (wxWindowListNode *)prev, (wxWindowListNode *)next, (wxWindow *)data, key); } public: typedef size_t size_type; typedef int difference_type; typedef wxWindow* value_type; typedef wxWindowBase* base_value_type; typedef value_type& reference; typedef const value_type& const_reference; typedef base_value_type& base_reference; typedef const base_value_type& const_base_reference; class iterator { typedef wxWindowList list; public: typedef wxWindowListNode Node; typedef iterator itor; typedef wxWindow* value_type; typedef value_type* ptr_type; typedef value_type& reference; Node* m_node; Node* m_init; public: typedef reference reference_type; typedef ptr_type pointer_type; iterator(Node* node, Node* init) : m_node(node), m_init(init) {} iterator() : m_node(__null), m_init(__null) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetNext(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetNext(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetPrevious() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetPrevious() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class const_iterator { typedef wxWindowList list; public: typedef wxWindowListNode Node; typedef wxWindow* value_type; typedef const value_type& const_reference; typedef const_iterator itor; typedef value_type* ptr_type; Node* m_node; Node* m_init; public: typedef const_reference reference_type; typedef const ptr_type pointer_type; const_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } const_iterator() : m_node(__null), m_init(__null) { } const_iterator(const iterator& it) : m_node(it.m_node), m_init(it.m_init) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetNext(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetNext(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetPrevious() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetPrevious() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class reverse_iterator { typedef wxWindowList list; public: typedef wxWindowListNode Node; typedef wxWindow* value_type; typedef reverse_iterator itor; typedef value_type* ptr_type; typedef value_type& reference; Node* m_node; Node* m_init; public: typedef reference reference_type; typedef ptr_type pointer_type; reverse_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } reverse_iterator() : m_node(__null), m_init(__null) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetPrevious(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetPrevious(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetNext() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetNext() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class const_reverse_iterator { typedef wxWindowList list; public: typedef wxWindowListNode Node; typedef wxWindow* value_type; typedef const_reverse_iterator itor; typedef value_type* ptr_type; typedef const value_type& const_reference; Node* m_node; Node* m_init; public: typedef const_reference reference_type; typedef const ptr_type pointer_type; const_reverse_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } const_reverse_iterator() : m_node(__null), m_init(__null) { } const_reverse_iterator(const reverse_iterator& it) : m_node(it.m_node), m_init(it.m_init) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetPrevious(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetPrevious(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetNext() : m_init; return *this;} const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetNext() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; explicit wxWindowList(size_type n, const_reference v = value_type()) { assign(n, v); } wxWindowList(const const_iterator& first, const const_iterator& last) { assign(first, last); } iterator begin() { return iterator(GetFirst(), GetLast()); } const_iterator begin() const { return const_iterator(GetFirst(), GetLast()); } iterator end() { return iterator(__null, GetLast()); } const_iterator end() const { return const_iterator(__null, GetLast()); } reverse_iterator rbegin() { return reverse_iterator(GetLast(), GetFirst()); } const_reverse_iterator rbegin() const { return const_reverse_iterator(GetLast(), GetFirst()); } reverse_iterator rend() { return reverse_iterator(__null, GetFirst()); } const_reverse_iterator rend() const { return const_reverse_iterator(__null, GetFirst()); } void resize(size_type n, value_type v = value_type()) { while (n < size()) pop_back(); while (n > size()) push_back(v); } size_type size() const { return GetCount(); } size_type max_size() const { return 2147483647; } bool empty() const { return IsEmpty(); } reference front() { return *begin(); } const_reference front() const { return *begin(); } reference back() { iterator tmp = end(); return *--tmp; } const_reference back() const { const_iterator tmp = end(); return *--tmp; } void push_front(const_reference v = value_type()) { Insert(GetFirst(), (const_base_reference)v); } void pop_front() { DeleteNode(GetFirst()); } void push_back(const_reference v = value_type()) { Append((const_base_reference)v); } void pop_back() { DeleteNode(GetLast()); } void assign(const_iterator first, const const_iterator& last) { clear(); for(; first != last; ++first) Append((const_base_reference)*first); } void assign(size_type n, const_reference v = value_type()) { clear(); for(size_type i = 0; i < n; ++i) Append((const_base_reference)v); } iterator insert(const iterator& it, const_reference v = value_type()) { Insert(it.m_node, (const_base_reference)v); return iterator(it.m_node->GetPrevious(), GetLast()); } void insert(const iterator& it, size_type n, const_reference v = value_type()) { for(size_type i = 0; i < n; ++i) Insert(it.m_node, (const_base_reference)v); } void insert(const iterator& it, const_iterator first, const const_iterator& last) { for(; first != last; ++first) Insert(it.m_node, (const_base_reference)*first); } iterator erase(const iterator& it) { iterator next = iterator(it.m_node->GetNext(), GetLast()); DeleteNode(it.m_node); return next; } iterator erase(const iterator& first, const iterator& last) { iterator next = last; ++next; DeleteNodes(first.m_node, last.m_node); return next; } void clear() { Clear(); } void splice(const iterator& it, wxWindowList& l, const iterator& first, const iterator& last) { insert(it, first, last); l.erase(first, last); } void splice(const iterator& it, wxWindowList& l) { splice(it, l, l.begin(), l.end() ); } void splice(const iterator& it, wxWindowList& l, const iterator& first) { iterator tmp = first; ++tmp; if(it == first || it == tmp) return; insert(it, *first); l.erase(first); } void remove(const_reference v) { DeleteObject((const_base_reference)v); } void reverse() { Reverse(); } }; | |
32309 | ||
32310 | ||
32311 | ||
32312 | ||
32313 | ||
32314 | extern wxWindowList wxTopLevelWindows; | |
32315 | # 132 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/window.h" | |
32316 | class wxWindowBase : public wxEvtHandler | |
32317 | { | |
32318 | public: | |
32319 | ||
32320 | ||
32321 | ||
32322 | ||
32323 | ||
32324 | wxWindowBase() ; | |
32325 | ||
32326 | ||
32327 | bool CreateBase(wxWindowBase *parent, | |
32328 | wxWindowID winid, | |
32329 | const wxPoint& pos = wxDefaultPosition, | |
32330 | const wxSize& size = wxDefaultSize, | |
32331 | long style = 0, | |
32332 | const wxValidator& validator = wxDefaultValidator, | |
32333 | const wxString& name = wxPanelNameStr); | |
32334 | ||
32335 | virtual ~wxWindowBase(); | |
32336 | ||
32337 | ||
32338 | ||
32339 | ||
32340 | ||
32341 | ||
32342 | bool Close( bool force = false ); | |
32343 | ||
32344 | ||
32345 | ||
32346 | ||
32347 | ||
32348 | ||
32349 | virtual bool Destroy(); | |
32350 | ||
32351 | bool DestroyChildren(); | |
32352 | ||
32353 | ||
32354 | bool IsBeingDeleted() const { return m_isBeingDeleted; } | |
32355 | # 181 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/window.h" | |
32356 | virtual void SetTitle( const wxString& ) {} | |
32357 | virtual wxString GetTitle() const { return wxEmptyString; } | |
32358 | ||
32359 | ||
32360 | ||
32361 | virtual void SetLabel(const wxString& label) { SetTitle(label); } | |
32362 | virtual wxString GetLabel() const { return GetTitle(); } | |
32363 | ||
32364 | ||
32365 | ||
32366 | virtual void SetName( const wxString &name ) { m_windowName = name; } | |
32367 | virtual wxString GetName() const { return m_windowName; } | |
32368 | ||
32369 | ||
32370 | void SetWindowVariant( wxWindowVariant variant ) ; | |
32371 | wxWindowVariant GetWindowVariant() const { return m_windowVariant ; } | |
32372 | ||
32373 | ||
32374 | ||
32375 | ||
32376 | void SetId( wxWindowID winid ) { m_windowId = winid; } | |
32377 | wxWindowID GetId() const { return m_windowId; } | |
32378 | ||
32379 | ||
32380 | ||
32381 | static int NewControlId() { return --ms_lastControlId; } | |
32382 | ||
32383 | ||
32384 | static int NextControlId(int winid) { return winid - 1; } | |
32385 | ||
32386 | ||
32387 | static int PrevControlId(int winid) { return winid + 1; } | |
32388 | ||
32389 | ||
32390 | ||
32391 | ||
32392 | ||
32393 | void SetSize( int x, int y, int width, int height, | |
32394 | int sizeFlags = (0x0001|0x0002) ) | |
32395 | { DoSetSize(x, y, width, height, sizeFlags); } | |
32396 | ||
32397 | void SetSize( int width, int height ) | |
32398 | { DoSetSize( wxDefaultCoord, wxDefaultCoord, width, height, 0x0000 ); } | |
32399 | ||
32400 | void SetSize( const wxSize& size ) | |
32401 | { SetSize( size.x, size.y); } | |
32402 | ||
32403 | void SetSize(const wxRect& rect, int sizeFlags = (0x0001|0x0002)) | |
32404 | { DoSetSize(rect.x, rect.y, rect.width, rect.height, sizeFlags); } | |
32405 | ||
32406 | void Move(int x, int y, int flags = 0x0000) | |
32407 | { DoSetSize(x, y, wxDefaultCoord, wxDefaultCoord, flags); } | |
32408 | ||
32409 | void Move(const wxPoint& pt, int flags = 0x0000) | |
32410 | { Move(pt.x, pt.y, flags); } | |
32411 | ||
32412 | ||
32413 | virtual void Raise() = 0; | |
32414 | virtual void Lower() = 0; | |
32415 | ||
32416 | ||
32417 | void SetClientSize( int width, int height ) | |
32418 | { DoSetClientSize(width, height); } | |
32419 | ||
32420 | void SetClientSize( const wxSize& size ) | |
32421 | { DoSetClientSize(size.x, size.y); } | |
32422 | ||
32423 | void SetClientSize(const wxRect& rect) | |
32424 | { SetClientSize( rect.width, rect.height ); } | |
32425 | ||
32426 | ||
32427 | void GetPosition( int *x, int *y ) const { DoGetPosition(x, y); } | |
32428 | wxPoint GetPosition() const | |
32429 | { | |
32430 | int w, h; | |
32431 | DoGetPosition(&w, &h); | |
32432 | ||
32433 | return wxPoint(w, h); | |
32434 | } | |
32435 | ||
32436 | void SetPosition( const wxPoint& pt ) { Move( pt ) ; } | |
32437 | ||
32438 | void GetSize( int *w, int *h ) const { DoGetSize(w, h); } | |
32439 | wxSize GetSize() const | |
32440 | { | |
32441 | int w, h; | |
32442 | DoGetSize(& w, & h); | |
32443 | return wxSize(w, h); | |
32444 | } | |
32445 | ||
32446 | wxRect GetRect() const | |
32447 | { | |
32448 | int x, y, w, h; | |
32449 | GetPosition(& x, & y); | |
32450 | GetSize(& w, & h); | |
32451 | ||
32452 | return wxRect(x, y, w, h); | |
32453 | } | |
32454 | ||
32455 | void GetClientSize( int *w, int *h ) const { DoGetClientSize(w, h); } | |
32456 | wxSize GetClientSize() const | |
32457 | { | |
32458 | int w, h; | |
32459 | DoGetClientSize(& w, & h); | |
32460 | ||
32461 | return wxSize(w, h); | |
32462 | } | |
32463 | ||
32464 | ||
32465 | ||
32466 | ||
32467 | virtual wxPoint GetClientAreaOrigin() const; | |
32468 | ||
32469 | ||
32470 | wxRect GetClientRect() const | |
32471 | { | |
32472 | return wxRect(GetClientAreaOrigin(), GetClientSize()); | |
32473 | } | |
32474 | ||
32475 | ||
32476 | ||
32477 | ||
32478 | wxSize GetBestSize() const | |
32479 | { | |
32480 | if (m_bestSizeCache.IsFullySpecified()) | |
32481 | return m_bestSizeCache; | |
32482 | return DoGetBestSize(); | |
32483 | } | |
32484 | void GetBestSize(int *w, int *h) const | |
32485 | { | |
32486 | wxSize s = GetBestSize(); | |
32487 | if ( w ) | |
32488 | *w = s.x; | |
32489 | if ( h ) | |
32490 | *h = s.y; | |
32491 | } | |
32492 | ||
32493 | ||
32494 | ||
32495 | void InvalidateBestSize(); | |
32496 | void CacheBestSize(const wxSize& size) const | |
32497 | { const_cast<wxWindowBase *>(this)->m_bestSizeCache = size; } | |
32498 | ||
32499 | ||
32500 | ||
32501 | ||
32502 | ||
32503 | ||
32504 | wxSize GetAdjustedBestSize() const | |
32505 | { | |
32506 | wxSize s( GetBestSize() ); | |
32507 | return wxSize( (((s.x) > (GetMinWidth())) ? (s.x) : (GetMinWidth())), (((s.y) > (GetMinHeight())) ? (s.y) : (GetMinHeight())) ); | |
32508 | } | |
32509 | ||
32510 | ||
32511 | ||
32512 | ||
32513 | wxSize GetBestFittingSize() const; | |
32514 | ||
32515 | ||
32516 | ||
32517 | void SetBestFittingSize(const wxSize& size=wxDefaultSize); | |
32518 | ||
32519 | ||
32520 | ||
32521 | ||
32522 | void Centre( int direction = wxBOTH ); | |
32523 | void Center( int direction = wxBOTH ) { Centre(direction); } | |
32524 | ||
32525 | ||
32526 | void CentreOnScreen(int dir = wxBOTH) { Centre(dir | 0x0002); } | |
32527 | void CenterOnScreen(int dir = wxBOTH) { CentreOnScreen(dir); } | |
32528 | ||
32529 | ||
32530 | void CentreOnParent(int dir = wxBOTH) { Centre(dir | 0x0000); } | |
32531 | void CenterOnParent(int dir = wxBOTH) { CentreOnParent(dir); } | |
32532 | ||
32533 | ||
32534 | virtual void Fit(); | |
32535 | ||
32536 | ||
32537 | virtual void FitInside(); | |
32538 | ||
32539 | ||
32540 | virtual void SetSizeHints( int minW, int minH, | |
32541 | int maxW = wxDefaultCoord, int maxH = wxDefaultCoord, | |
32542 | int incW = wxDefaultCoord, int incH = wxDefaultCoord ) | |
32543 | { | |
32544 | DoSetSizeHints(minW, minH, maxW, maxH, incW, incH); | |
32545 | } | |
32546 | ||
32547 | void SetSizeHints( const wxSize& minSize, | |
32548 | const wxSize& maxSize=wxDefaultSize, | |
32549 | const wxSize& incSize=wxDefaultSize) | |
32550 | { | |
32551 | DoSetSizeHints(minSize.x, minSize.y, | |
32552 | maxSize.x, maxSize.y, | |
32553 | incSize.x, incSize.y); | |
32554 | } | |
32555 | ||
32556 | virtual void DoSetSizeHints(int minW, int minH, | |
32557 | int maxW = wxDefaultCoord, int maxH = wxDefaultCoord, | |
32558 | int incW = wxDefaultCoord, int incH = wxDefaultCoord ); | |
32559 | ||
32560 | virtual void SetVirtualSizeHints( int minW, int minH, | |
32561 | int maxW = wxDefaultCoord, int maxH = wxDefaultCoord ); | |
32562 | void SetVirtualSizeHints( const wxSize& minSize, | |
32563 | const wxSize& maxSize=wxDefaultSize) | |
32564 | { | |
32565 | SetVirtualSizeHints(minSize.x, minSize.y, maxSize.x, maxSize.y); | |
32566 | } | |
32567 | ||
32568 | virtual int GetMinWidth() const { return m_minWidth; } | |
32569 | virtual int GetMinHeight() const { return m_minHeight; } | |
32570 | int GetMaxWidth() const { return m_maxWidth; } | |
32571 | int GetMaxHeight() const { return m_maxHeight; } | |
32572 | ||
32573 | ||
32574 | virtual wxSize GetMaxSize() const { return wxSize( m_maxWidth, m_maxHeight ); } | |
32575 | virtual wxSize GetMinSize() const { return wxSize( m_minWidth, m_minHeight ); } | |
32576 | ||
32577 | void SetMinSize(const wxSize& minSize) { SetSizeHints(minSize); } | |
32578 | void SetMaxSize(const wxSize& maxSize) { SetSizeHints(GetMinSize(), maxSize); } | |
32579 | ||
32580 | ||
32581 | ||
32582 | ||
32583 | ||
32584 | ||
32585 | ||
32586 | void SetVirtualSize( const wxSize &size ) { DoSetVirtualSize( size.x, size.y ); } | |
32587 | void SetVirtualSize( int x, int y ) { DoSetVirtualSize( x, y ); } | |
32588 | ||
32589 | wxSize GetVirtualSize() const { return DoGetVirtualSize(); } | |
32590 | void GetVirtualSize( int *x, int *y ) const | |
32591 | { | |
32592 | wxSize s( DoGetVirtualSize() ); | |
32593 | ||
32594 | if( x ) | |
32595 | *x = s.GetWidth(); | |
32596 | if( y ) | |
32597 | *y = s.GetHeight(); | |
32598 | } | |
32599 | ||
32600 | ||
32601 | ||
32602 | ||
32603 | ||
32604 | virtual void DoSetVirtualSize( int x, int y ); | |
32605 | virtual wxSize DoGetVirtualSize() const; | |
32606 | ||
32607 | ||
32608 | ||
32609 | ||
32610 | virtual wxSize GetBestVirtualSize() const | |
32611 | { | |
32612 | wxSize client( GetClientSize() ); | |
32613 | wxSize best( GetBestSize() ); | |
32614 | ||
32615 | return wxSize( (((client.x) > (best.x)) ? (client.x) : (best.x)), (((client.y) > (best.y)) ? (client.y) : (best.y)) ); | |
32616 | } | |
32617 | ||
32618 | ||
32619 | ||
32620 | ||
32621 | ||
32622 | ||
32623 | virtual bool Show( bool show = true ); | |
32624 | bool Hide() { return Show(false); } | |
32625 | ||
32626 | ||
32627 | virtual bool Enable( bool enable = true ); | |
32628 | bool Disable() { return Enable(false); } | |
32629 | ||
32630 | virtual bool IsShown() const { return m_isShown; } | |
32631 | virtual bool IsEnabled() const { return m_isEnabled; } | |
32632 | ||
32633 | ||
32634 | ||
32635 | virtual void SetWindowStyleFlag( long style ) { m_windowStyle = style; } | |
32636 | virtual long GetWindowStyleFlag() const { return m_windowStyle; } | |
32637 | ||
32638 | ||
32639 | void SetWindowStyle( long style ) { SetWindowStyleFlag(style); } | |
32640 | long GetWindowStyle() const { return GetWindowStyleFlag(); } | |
32641 | ||
32642 | bool HasFlag(int flag) const { return (m_windowStyle & flag) != 0; } | |
32643 | virtual bool IsRetained() const { return HasFlag(0x00000000); } | |
32644 | ||
32645 | ||
32646 | ||
32647 | virtual void SetExtraStyle(long exStyle) { m_exStyle = exStyle; } | |
32648 | long GetExtraStyle() const { return m_exStyle; } | |
32649 | ||
32650 | ||
32651 | virtual void MakeModal(bool modal = true); | |
32652 | ||
32653 | ||
32654 | ||
32655 | ||
32656 | ||
32657 | virtual void SetThemeEnabled(bool enableTheme) { m_themeEnabled = enableTheme; } | |
32658 | virtual bool GetThemeEnabled() const { return m_themeEnabled; } | |
32659 | ||
32660 | ||
32661 | ||
32662 | ||
32663 | ||
32664 | ||
32665 | virtual void SetFocus() = 0; | |
32666 | ||
32667 | ||
32668 | virtual void SetFocusFromKbd() { SetFocus(); } | |
32669 | ||
32670 | ||
32671 | static wxWindow *FindFocus(); | |
32672 | ||
32673 | static wxWindow *DoFindFocus() ; | |
32674 | ||
32675 | ||
32676 | virtual bool AcceptsFocus() const { return IsShown() && IsEnabled(); } | |
32677 | ||
32678 | ||
32679 | ||
32680 | ||
32681 | virtual bool AcceptsFocusFromKeyboard() const { return AcceptsFocus(); } | |
32682 | ||
32683 | ||
32684 | ||
32685 | ||
32686 | ||
32687 | ||
32688 | virtual wxWindow *GetDefaultItem() const { return __null; } | |
32689 | ||
32690 | ||
32691 | virtual wxWindow *SetDefaultItem(wxWindow * ) | |
32692 | { return __null; } | |
32693 | ||
32694 | ||
32695 | virtual void SetTmpDefaultItem(wxWindow * ) { } | |
32696 | ||
32697 | ||
32698 | virtual bool Navigate(int flags = wxNavigationKeyEvent::IsForward); | |
32699 | ||
32700 | ||
32701 | ||
32702 | void MoveBeforeInTabOrder(wxWindow *win) | |
32703 | { DoMoveInTabOrder(win, MoveBefore); } | |
32704 | void MoveAfterInTabOrder(wxWindow *win) | |
32705 | { DoMoveInTabOrder(win, MoveAfter); } | |
32706 | ||
32707 | ||
32708 | ||
32709 | ||
32710 | ||
32711 | ||
32712 | const wxWindowList& GetChildren() const { return m_children; } | |
32713 | wxWindowList& GetChildren() { return m_children; } | |
32714 | ||
32715 | ||
32716 | const wxWindowList& GetWindowChildren() const { return GetChildren() ; } | |
32717 | ||
32718 | ||
32719 | wxWindow *GetParent() const { return m_parent; } | |
32720 | inline wxWindow *GetGrandParent() const; | |
32721 | ||
32722 | ||
32723 | virtual bool IsTopLevel() const; | |
32724 | ||
32725 | ||
32726 | void SetParent( wxWindowBase *parent ) { m_parent = (wxWindow *)parent; } | |
32727 | ||
32728 | ||
32729 | virtual bool Reparent( wxWindowBase *newParent ); | |
32730 | ||
32731 | ||
32732 | virtual void AddChild( wxWindowBase *child ); | |
32733 | virtual void RemoveChild( wxWindowBase *child ); | |
32734 | ||
32735 | ||
32736 | ||
32737 | ||
32738 | ||
32739 | ||
32740 | wxWindow *FindWindow(long winid) const; | |
32741 | wxWindow *FindWindow(const wxString& name) const; | |
32742 | ||
32743 | ||
32744 | static wxWindow *FindWindowById( long winid, const wxWindow *parent = __null ); | |
32745 | static wxWindow *FindWindowByName( const wxString& name, | |
32746 | const wxWindow *parent = __null ); | |
32747 | static wxWindow *FindWindowByLabel( const wxString& label, | |
32748 | const wxWindow *parent = __null ); | |
32749 | ||
32750 | ||
32751 | ||
32752 | ||
32753 | ||
32754 | wxEvtHandler *GetEventHandler() const { return m_eventHandler; } | |
32755 | ||
32756 | ||
32757 | ||
32758 | void SetEventHandler( wxEvtHandler *handler ) { m_eventHandler = handler; } | |
32759 | ||
32760 | ||
32761 | ||
32762 | void PushEventHandler( wxEvtHandler *handler ); | |
32763 | wxEvtHandler *PopEventHandler( bool deleteHandler = false ); | |
32764 | ||
32765 | ||
32766 | ||
32767 | ||
32768 | ||
32769 | ||
32770 | bool RemoveEventHandler(wxEvtHandler *handler); | |
32771 | ||
32772 | ||
32773 | ||
32774 | ||
32775 | ||
32776 | ||
32777 | ||
32778 | virtual void SetValidator( const wxValidator &validator ); | |
32779 | virtual wxValidator *GetValidator() { return m_windowValidator; } | |
32780 | ||
32781 | ||
32782 | ||
32783 | ||
32784 | ||
32785 | ||
32786 | ||
32787 | virtual bool Validate(); | |
32788 | ||
32789 | ||
32790 | virtual bool TransferDataToWindow(); | |
32791 | virtual bool TransferDataFromWindow(); | |
32792 | ||
32793 | virtual void InitDialog(); | |
32794 | ||
32795 | ||
32796 | ||
32797 | ||
32798 | virtual void SetAcceleratorTable( const wxAcceleratorTable& accel ) | |
32799 | { m_acceleratorTable = accel; } | |
32800 | wxAcceleratorTable *GetAcceleratorTable() | |
32801 | { return &m_acceleratorTable; } | |
32802 | # 642 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/window.h" | |
32803 | wxPoint ConvertPixelsToDialog( const wxPoint& pt ); | |
32804 | wxPoint ConvertDialogToPixels( const wxPoint& pt ); | |
32805 | wxSize ConvertPixelsToDialog( const wxSize& sz ) | |
32806 | { | |
32807 | wxPoint pt(ConvertPixelsToDialog(wxPoint(sz.x, sz.y))); | |
32808 | ||
32809 | return wxSize(pt.x, pt.y); | |
32810 | } | |
32811 | ||
32812 | wxSize ConvertDialogToPixels( const wxSize& sz ) | |
32813 | { | |
32814 | wxPoint pt(ConvertDialogToPixels(wxPoint(sz.x, sz.y))); | |
32815 | ||
32816 | return wxSize(pt.x, pt.y); | |
32817 | } | |
32818 | ||
32819 | ||
32820 | ||
32821 | ||
32822 | ||
32823 | virtual void WarpPointer(int x, int y) = 0; | |
32824 | ||
32825 | ||
32826 | ||
32827 | ||
32828 | ||
32829 | void CaptureMouse(); | |
32830 | void ReleaseMouse(); | |
32831 | ||
32832 | ||
32833 | static wxWindow *GetCapture(); | |
32834 | ||
32835 | ||
32836 | virtual bool HasCapture() const | |
32837 | { return (wxWindow *)this == GetCapture(); } | |
32838 | ||
32839 | ||
32840 | ||
32841 | ||
32842 | ||
32843 | ||
32844 | virtual void Refresh( bool eraseBackground = true, | |
32845 | const wxRect *rect = (const wxRect *) __null ) = 0; | |
32846 | ||
32847 | ||
32848 | void RefreshRect(const wxRect& rect, bool eraseBackground = true) | |
32849 | { | |
32850 | Refresh(eraseBackground, &rect); | |
32851 | } | |
32852 | ||
32853 | ||
32854 | virtual void Update() { } | |
32855 | ||
32856 | ||
32857 | virtual void ClearBackground(); | |
32858 | ||
32859 | ||
32860 | virtual void Freeze() { } | |
32861 | ||
32862 | ||
32863 | virtual void Thaw() { } | |
32864 | ||
32865 | ||
32866 | virtual void PrepareDC( wxDC & ) { } | |
32867 | ||
32868 | ||
32869 | ||
32870 | const wxRegion& GetUpdateRegion() const { return m_updateRegion; } | |
32871 | wxRegion& GetUpdateRegion() { return m_updateRegion; } | |
32872 | ||
32873 | ||
32874 | wxRect GetUpdateClientRect() const; | |
32875 | ||
32876 | ||
32877 | ||
32878 | bool IsExposed( int x, int y ) const; | |
32879 | bool IsExposed( int x, int y, int w, int h ) const; | |
32880 | ||
32881 | bool IsExposed( const wxPoint& pt ) const | |
32882 | { return IsExposed(pt.x, pt.y); } | |
32883 | bool IsExposed( const wxRect& rect ) const | |
32884 | { return IsExposed(rect.x, rect.y, rect.width, rect.height); } | |
32885 | # 735 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/window.h" | |
32886 | virtual wxVisualAttributes GetDefaultAttributes() const | |
32887 | { | |
32888 | return GetClassDefaultAttributes(GetWindowVariant()); | |
32889 | } | |
32890 | ||
32891 | static wxVisualAttributes | |
32892 | GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); | |
32893 | ||
32894 | ||
32895 | ||
32896 | ||
32897 | ||
32898 | virtual bool SetBackgroundColour(const wxColour& colour); | |
32899 | void SetOwnBackgroundColour(const wxColour& colour) | |
32900 | { | |
32901 | if ( SetBackgroundColour(colour) ) | |
32902 | m_inheritBgCol = false; | |
32903 | } | |
32904 | wxColour GetBackgroundColour() const; | |
32905 | bool InheritsBackgroundColour() const | |
32906 | { | |
32907 | return m_inheritBgCol; | |
32908 | } | |
32909 | bool UseBgCol() const | |
32910 | { | |
32911 | return m_hasBgCol; | |
32912 | } | |
32913 | ||
32914 | virtual bool SetForegroundColour(const wxColour& colour); | |
32915 | void SetOwnForegroundColour(const wxColour& colour) | |
32916 | { | |
32917 | if ( SetForegroundColour(colour) ) | |
32918 | m_inheritFgCol = false; | |
32919 | } | |
32920 | wxColour GetForegroundColour() const; | |
32921 | ||
32922 | ||
32923 | ||
32924 | virtual bool SetBackgroundStyle(wxBackgroundStyle style) { m_backgroundStyle = style; return true; } | |
32925 | virtual wxBackgroundStyle GetBackgroundStyle() const { return m_backgroundStyle; } | |
32926 | ||
32927 | ||
32928 | ||
32929 | ||
32930 | virtual bool HasTransparentBackground() { return false; } | |
32931 | ||
32932 | ||
32933 | ||
32934 | virtual bool SetFont(const wxFont& font) = 0; | |
32935 | void SetOwnFont(const wxFont& font) | |
32936 | { | |
32937 | if ( SetFont(font) ) | |
32938 | m_inheritFont = false; | |
32939 | } | |
32940 | wxFont GetFont() const; | |
32941 | ||
32942 | ||
32943 | ||
32944 | virtual bool SetCursor( const wxCursor &cursor ); | |
32945 | const wxCursor& GetCursor() const { return m_cursor; } | |
32946 | ||
32947 | ||
32948 | ||
32949 | void SetCaret(wxCaret *caret); | |
32950 | ||
32951 | wxCaret *GetCaret() const { return m_caret; } | |
32952 | ||
32953 | ||
32954 | ||
32955 | virtual int GetCharHeight() const = 0; | |
32956 | virtual int GetCharWidth() const = 0; | |
32957 | ||
32958 | ||
32959 | ||
32960 | virtual void GetTextExtent(const wxString& string, | |
32961 | int *x, int *y, | |
32962 | int *descent = (int *) __null, | |
32963 | int *externalLeading = (int *) __null, | |
32964 | const wxFont *theFont = (const wxFont *) __null) | |
32965 | const = 0; | |
32966 | ||
32967 | ||
32968 | ||
32969 | ||
32970 | ||
32971 | void ClientToScreen( int *x, int *y ) const | |
32972 | { DoClientToScreen(x, y); } | |
32973 | void ScreenToClient( int *x, int *y ) const | |
32974 | { DoScreenToClient(x, y); } | |
32975 | ||
32976 | ||
32977 | wxPoint ClientToScreen(const wxPoint& pt) const | |
32978 | { | |
32979 | int x = pt.x, y = pt.y; | |
32980 | DoClientToScreen(&x, &y); | |
32981 | ||
32982 | return wxPoint(x, y); | |
32983 | } | |
32984 | ||
32985 | wxPoint ScreenToClient(const wxPoint& pt) const | |
32986 | { | |
32987 | int x = pt.x, y = pt.y; | |
32988 | DoScreenToClient(&x, &y); | |
32989 | ||
32990 | return wxPoint(x, y); | |
32991 | } | |
32992 | ||
32993 | ||
32994 | wxHitTest HitTest(wxCoord x, wxCoord y) const | |
32995 | { return DoHitTest(x, y); } | |
32996 | ||
32997 | wxHitTest HitTest(const wxPoint& pt) const | |
32998 | { return DoHitTest(pt.x, pt.y); } | |
32999 | ||
33000 | ||
33001 | ||
33002 | ||
33003 | ||
33004 | ||
33005 | ||
33006 | wxBorder GetBorder(long flags) const; | |
33007 | ||
33008 | ||
33009 | wxBorder GetBorder() const { return GetBorder(GetWindowStyleFlag()); } | |
33010 | ||
33011 | ||
33012 | virtual void UpdateWindowUI(long flags = wxUPDATE_UI_NONE); | |
33013 | ||
33014 | ||
33015 | virtual void DoUpdateWindowUI(wxUpdateUIEvent& event) ; | |
33016 | ||
33017 | ||
33018 | bool PopupMenu(wxMenu *menu, const wxPoint& pos = wxDefaultPosition) | |
33019 | { return DoPopupMenu(menu, pos.x, pos.y); } | |
33020 | bool PopupMenu(wxMenu *menu, int x, int y) | |
33021 | { return DoPopupMenu(menu, x, y); } | |
33022 | ||
33023 | ||
33024 | ||
33025 | ||
33026 | ||
33027 | ||
33028 | bool HasScrollbar(int orient) const | |
33029 | { | |
33030 | return (m_windowStyle & | |
33031 | (orient == wxHORIZONTAL ? 0x40000000 : 0x80000000)) != 0; | |
33032 | } | |
33033 | ||
33034 | ||
33035 | virtual void SetScrollbar( int orient, | |
33036 | int pos, | |
33037 | int thumbvisible, | |
33038 | int range, | |
33039 | bool refresh = true ) = 0; | |
33040 | virtual void SetScrollPos( int orient, int pos, bool refresh = true ) = 0; | |
33041 | virtual int GetScrollPos( int orient ) const = 0; | |
33042 | virtual int GetScrollThumb( int orient ) const = 0; | |
33043 | virtual int GetScrollRange( int orient ) const = 0; | |
33044 | ||
33045 | ||
33046 | virtual void ScrollWindow( int dx, int dy, | |
33047 | const wxRect* rect = (wxRect *) __null ) = 0; | |
33048 | ||
33049 | ||
33050 | ||
33051 | ||
33052 | virtual bool ScrollLines(int ) { return false; } | |
33053 | virtual bool ScrollPages(int ) { return false; } | |
33054 | ||
33055 | ||
33056 | bool LineUp() { return ScrollLines(-1); } | |
33057 | bool LineDown() { return ScrollLines(1); } | |
33058 | bool PageUp() { return ScrollPages(-1); } | |
33059 | bool PageDown() { return ScrollPages(1); } | |
33060 | # 917 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/window.h" | |
33061 | void SetHelpText(const wxString& text); | |
33062 | ||
33063 | ||
33064 | void SetHelpTextForId(const wxString& text); | |
33065 | ||
33066 | wxString GetHelpText() const; | |
33067 | # 934 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/window.h" | |
33068 | void SetToolTip( const wxString &tip ); | |
33069 | ||
33070 | void SetToolTip( wxToolTip *tip ) { DoSetToolTip(tip); } | |
33071 | ||
33072 | wxToolTip* GetToolTip() const { return m_tooltip; } | |
33073 | wxString GetToolTipText() const ; | |
33074 | # 951 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/window.h" | |
33075 | virtual void SetDropTarget( wxDropTarget *dropTarget ) = 0; | |
33076 | virtual wxDropTarget *GetDropTarget() const { return m_dropTarget; } | |
33077 | ||
33078 | ||
33079 | ||
33080 | ||
33081 | ||
33082 | ||
33083 | void SetConstraints( wxLayoutConstraints *constraints ); | |
33084 | wxLayoutConstraints *GetConstraints() const { return m_constraints; } | |
33085 | ||
33086 | ||
33087 | void UnsetConstraints(wxLayoutConstraints *c); | |
33088 | wxWindowList *GetConstraintsInvolvedIn() const | |
33089 | { return m_constraintsInvolvedIn; } | |
33090 | void AddConstraintReference(wxWindowBase *otherWin); | |
33091 | void RemoveConstraintReference(wxWindowBase *otherWin); | |
33092 | void DeleteRelatedConstraints(); | |
33093 | void ResetConstraints(); | |
33094 | ||
33095 | ||
33096 | virtual void SetConstraintSizes(bool recurse = true); | |
33097 | virtual bool LayoutPhase1(int *noChanges); | |
33098 | virtual bool LayoutPhase2(int *noChanges); | |
33099 | virtual bool DoPhase(int phase); | |
33100 | ||
33101 | ||
33102 | virtual void SetSizeConstraint(int x, int y, int w, int h); | |
33103 | virtual void MoveConstraint(int x, int y); | |
33104 | virtual void GetSizeConstraint(int *w, int *h) const ; | |
33105 | virtual void GetClientSizeConstraint(int *w, int *h) const ; | |
33106 | virtual void GetPositionConstraint(int *x, int *y) const ; | |
33107 | ||
33108 | ||
33109 | ||
33110 | ||
33111 | ||
33112 | ||
33113 | void SetAutoLayout( bool autoLayout ) { m_autoLayout = autoLayout; } | |
33114 | bool GetAutoLayout() const { return m_autoLayout; } | |
33115 | ||
33116 | ||
33117 | virtual bool Layout(); | |
33118 | ||
33119 | ||
33120 | void SetSizer(wxSizer *sizer, bool deleteOld = true ); | |
33121 | void SetSizerAndFit( wxSizer *sizer, bool deleteOld = true ); | |
33122 | ||
33123 | wxSizer *GetSizer() const { return m_windowSizer; } | |
33124 | ||
33125 | ||
33126 | void SetContainingSizer(wxSizer* sizer); | |
33127 | wxSizer *GetContainingSizer() const { return m_containingSizer; } | |
33128 | # 1025 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/window.h" | |
33129 | void OnSysColourChanged( wxSysColourChangedEvent& event ); | |
33130 | void OnInitDialog( wxInitDialogEvent &event ); | |
33131 | void OnMiddleClick( wxMouseEvent& event ); | |
33132 | ||
33133 | void OnHelp(wxHelpEvent& event); | |
33134 | ||
33135 | ||
33136 | ||
33137 | ||
33138 | virtual void OnInternalIdle() {} | |
33139 | ||
33140 | ||
33141 | ||
33142 | ||
33143 | ||
33144 | ||
33145 | ||
33146 | virtual WXWidget GetHandle() const = 0; | |
33147 | ||
33148 | virtual void AssociateHandle(WXWidget ) { } | |
33149 | ||
33150 | virtual void DissociateHandle() { } | |
33151 | ||
33152 | ||
33153 | ||
33154 | ||
33155 | wxPalette GetPalette() const { return m_palette; } | |
33156 | ||
33157 | ||
33158 | ||
33159 | void SetPalette(const wxPalette& pal); | |
33160 | ||
33161 | ||
33162 | bool HasCustomPalette() const { return m_hasCustomPalette; } | |
33163 | ||
33164 | ||
33165 | wxWindow *GetAncestorWithCustomPalette() const; | |
33166 | ||
33167 | ||
33168 | ||
33169 | ||
33170 | ||
33171 | virtual void InheritAttributes(); | |
33172 | ||
33173 | ||
33174 | ||
33175 | ||
33176 | ||
33177 | ||
33178 | virtual bool ShouldInheritColours() const { return false; } | |
33179 | ||
33180 | ||
33181 | ||
33182 | virtual void ReservedWindowFunc1() {} | |
33183 | virtual void ReservedWindowFunc2() {} | |
33184 | virtual void ReservedWindowFunc3() {} | |
33185 | virtual void ReservedWindowFunc4() {} | |
33186 | virtual void ReservedWindowFunc5() {} | |
33187 | virtual void ReservedWindowFunc6() {} | |
33188 | virtual void ReservedWindowFunc7() {} | |
33189 | virtual void ReservedWindowFunc8() {} | |
33190 | virtual void ReservedWindowFunc9() {} | |
33191 | ||
33192 | ||
33193 | protected: | |
33194 | ||
33195 | virtual bool TryValidator(wxEvent& event); | |
33196 | virtual bool TryParent(wxEvent& event); | |
33197 | ||
33198 | ||
33199 | enum MoveKind | |
33200 | { | |
33201 | MoveBefore, | |
33202 | MoveAfter | |
33203 | }; | |
33204 | virtual void DoMoveInTabOrder(wxWindow *win, MoveKind move); | |
33205 | ||
33206 | ||
33207 | ||
33208 | void SatisfyConstraints(); | |
33209 | ||
33210 | ||
33211 | ||
33212 | void SendDestroyEvent(); | |
33213 | ||
33214 | ||
33215 | ||
33216 | ||
33217 | virtual wxWindow *GetMainWindowOfCompositeControl() | |
33218 | { return (wxWindow*)this; } | |
33219 | ||
33220 | ||
33221 | ||
33222 | wxWindowID m_windowId; | |
33223 | ||
33224 | ||
33225 | ||
33226 | wxWindow *m_parent; | |
33227 | wxWindowList m_children; | |
33228 | ||
33229 | ||
33230 | ||
33231 | int m_minWidth, | |
33232 | m_minHeight, | |
33233 | m_maxWidth, | |
33234 | m_maxHeight; | |
33235 | ||
33236 | ||
33237 | ||
33238 | wxEvtHandler *m_eventHandler; | |
33239 | ||
33240 | ||
33241 | ||
33242 | wxValidator *m_windowValidator; | |
33243 | ||
33244 | ||
33245 | ||
33246 | wxDropTarget *m_dropTarget; | |
33247 | ||
33248 | ||
33249 | ||
33250 | wxCursor m_cursor; | |
33251 | wxFont m_font; | |
33252 | wxColour m_backgroundColour, | |
33253 | m_foregroundColour; | |
33254 | ||
33255 | ||
33256 | wxCaret *m_caret; | |
33257 | ||
33258 | ||
33259 | ||
33260 | wxRegion m_updateRegion; | |
33261 | ||
33262 | ||
33263 | ||
33264 | ||
33265 | wxAcceleratorTable m_acceleratorTable; | |
33266 | ||
33267 | ||
33268 | ||
33269 | ||
33270 | wxToolTip *m_tooltip; | |
33271 | ||
33272 | ||
33273 | ||
33274 | ||
33275 | ||
33276 | wxLayoutConstraints *m_constraints; | |
33277 | ||
33278 | ||
33279 | wxWindowList *m_constraintsInvolvedIn; | |
33280 | ||
33281 | ||
33282 | ||
33283 | wxSizer *m_windowSizer; | |
33284 | ||
33285 | ||
33286 | wxSizer *m_containingSizer; | |
33287 | ||
33288 | ||
33289 | bool m_autoLayout:1; | |
33290 | ||
33291 | ||
33292 | bool m_isShown:1; | |
33293 | bool m_isEnabled:1; | |
33294 | bool m_isBeingDeleted:1; | |
33295 | ||
33296 | ||
33297 | bool m_hasBgCol:1; | |
33298 | bool m_hasFgCol:1; | |
33299 | bool m_hasFont:1; | |
33300 | ||
33301 | ||
33302 | bool m_inheritBgCol:1; | |
33303 | bool m_inheritFgCol:1; | |
33304 | bool m_inheritFont:1; | |
33305 | ||
33306 | ||
33307 | long m_windowStyle, | |
33308 | m_exStyle; | |
33309 | wxString m_windowName; | |
33310 | bool m_themeEnabled; | |
33311 | wxBackgroundStyle m_backgroundStyle; | |
33312 | ||
33313 | wxPalette m_palette; | |
33314 | bool m_hasCustomPalette; | |
33315 | ||
33316 | ||
33317 | ||
33318 | ||
33319 | ||
33320 | ||
33321 | ||
33322 | wxSize m_virtualSize; | |
33323 | ||
33324 | int m_minVirtualWidth; | |
33325 | int m_minVirtualHeight; | |
33326 | int m_maxVirtualWidth; | |
33327 | int m_maxVirtualHeight; | |
33328 | ||
33329 | wxWindowVariant m_windowVariant ; | |
33330 | ||
33331 | ||
33332 | ||
33333 | virtual wxBorder GetDefaultBorder() const; | |
33334 | ||
33335 | ||
33336 | ||
33337 | static int WidthDefault(int w) { return w == wxDefaultCoord ? 20 : w; } | |
33338 | static int HeightDefault(int h) { return h == wxDefaultCoord ? 20 : h; } | |
33339 | ||
33340 | ||
33341 | ||
33342 | ||
33343 | wxSize m_bestSizeCache; | |
33344 | ||
33345 | ||
33346 | ||
33347 | void SetBestSize(const wxSize& size) { SetBestFittingSize(size); } | |
33348 | # 1252 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/window.h" | |
33349 | virtual void SetInitialBestSize(const wxSize& ) {} | |
33350 | # 1269 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/window.h" | |
33351 | virtual void DoClientToScreen( int *x, int *y ) const = 0; | |
33352 | virtual void DoScreenToClient( int *x, int *y ) const = 0; | |
33353 | ||
33354 | virtual wxHitTest DoHitTest(wxCoord x, wxCoord y) const; | |
33355 | ||
33356 | ||
33357 | virtual void DoCaptureMouse() = 0; | |
33358 | virtual void DoReleaseMouse() = 0; | |
33359 | ||
33360 | ||
33361 | virtual void DoGetPosition( int *x, int *y ) const = 0; | |
33362 | virtual void DoGetSize( int *width, int *height ) const = 0; | |
33363 | virtual void DoGetClientSize( int *width, int *height ) const = 0; | |
33364 | ||
33365 | ||
33366 | ||
33367 | ||
33368 | virtual wxSize DoGetBestSize() const; | |
33369 | ||
33370 | ||
33371 | ||
33372 | ||
33373 | virtual void DoSetSize(int x, int y, | |
33374 | int width, int height, | |
33375 | int sizeFlags = (0x0001|0x0002)) = 0; | |
33376 | ||
33377 | ||
33378 | virtual void DoSetClientSize(int width, int height) = 0; | |
33379 | ||
33380 | ||
33381 | ||
33382 | ||
33383 | ||
33384 | virtual void DoMoveWindow(int x, int y, int width, int height) = 0; | |
33385 | ||
33386 | ||
33387 | virtual void DoSetToolTip( wxToolTip *tip ); | |
33388 | ||
33389 | ||
33390 | ||
33391 | virtual bool DoPopupMenu(wxMenu *menu, int x, int y) = 0; | |
33392 | ||
33393 | ||
33394 | ||
33395 | ||
33396 | ||
33397 | virtual void AdjustForParentClientOrigin(int& x, int& y, | |
33398 | int sizeFlags = 0) const; | |
33399 | ||
33400 | ||
33401 | virtual void DoSetWindowVariant( wxWindowVariant variant ) ; | |
33402 | ||
33403 | ||
33404 | ||
33405 | void* m_windowReserved; | |
33406 | ||
33407 | ||
33408 | private: | |
33409 | ||
33410 | static int ms_lastControlId; | |
33411 | ||
33412 | ||
33413 | static struct wxWindowNext *ms_winCaptureNext; | |
33414 | ||
33415 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; | |
33416 | private: wxWindowBase(const wxWindowBase&); wxWindowBase& operator=(const wxWindowBase&); | |
33417 | private: static const wxEventTableEntry sm_eventTableEntries[]; protected: static const wxEventTable sm_eventTable; virtual const wxEventTable* GetEventTable() const; static wxEventHashTable sm_eventHashTable; virtual wxEventHashTable& GetEventHashTable() const; | |
33418 | }; | |
33419 | # 1365 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/window.h" | |
33420 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/window.h" 1 | |
33421 | # 20 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/window.h" | |
33422 | struct wxGtkIMData; | |
33423 | ||
33424 | ||
33425 | ||
33426 | ||
33427 | ||
33428 | class wxWindow; | |
33429 | typedef void (*wxInsertChildFunction)( wxWindow*, wxWindow* ); | |
33430 | ||
33431 | ||
33432 | ||
33433 | ||
33434 | ||
33435 | class wxWindow : public wxWindowBase | |
33436 | { | |
33437 | public: | |
33438 | ||
33439 | ||
33440 | wxWindow(); | |
33441 | wxWindow(wxWindow *parent, | |
33442 | wxWindowID id, | |
33443 | const wxPoint& pos = wxDefaultPosition, | |
33444 | const wxSize& size = wxDefaultSize, | |
33445 | long style = 0, | |
33446 | const wxString& name = wxPanelNameStr); | |
33447 | bool Create(wxWindow *parent, | |
33448 | wxWindowID id, | |
33449 | const wxPoint& pos = wxDefaultPosition, | |
33450 | const wxSize& size = wxDefaultSize, | |
33451 | long style = 0, | |
33452 | const wxString& name = wxPanelNameStr); | |
33453 | virtual ~wxWindow(); | |
33454 | ||
33455 | ||
33456 | ||
33457 | ||
33458 | virtual bool Destroy(); | |
33459 | ||
33460 | virtual void Raise(); | |
33461 | virtual void Lower(); | |
33462 | ||
33463 | virtual bool Show( bool show = 1 ); | |
33464 | virtual bool Enable( bool enable = 1 ); | |
33465 | ||
33466 | virtual bool IsRetained() const; | |
33467 | ||
33468 | virtual void SetFocus(); | |
33469 | virtual bool AcceptsFocus() const; | |
33470 | ||
33471 | virtual bool Reparent( wxWindowBase *newParent ); | |
33472 | ||
33473 | virtual void WarpPointer(int x, int y); | |
33474 | ||
33475 | virtual void Refresh( bool eraseBackground = 1, | |
33476 | const wxRect *rect = (const wxRect *) __null ); | |
33477 | virtual void Update(); | |
33478 | virtual void ClearBackground(); | |
33479 | ||
33480 | virtual bool SetBackgroundColour( const wxColour &colour ); | |
33481 | virtual bool SetForegroundColour( const wxColour &colour ); | |
33482 | virtual bool SetCursor( const wxCursor &cursor ); | |
33483 | virtual bool SetFont( const wxFont &font ); | |
33484 | ||
33485 | virtual bool SetBackgroundStyle(wxBackgroundStyle style) ; | |
33486 | ||
33487 | virtual int GetCharHeight() const; | |
33488 | virtual int GetCharWidth() const; | |
33489 | virtual void GetTextExtent(const wxString& string, | |
33490 | int *x, int *y, | |
33491 | int *descent = (int *) __null, | |
33492 | int *externalLeading = (int *) __null, | |
33493 | const wxFont *theFont = (const wxFont *) __null) | |
33494 | const; | |
33495 | ||
33496 | ||
33497 | virtual bool DoPopupMenu( wxMenu *menu, int x, int y ); | |
33498 | ||
33499 | ||
33500 | virtual void SetScrollbar( int orient, int pos, int thumbVisible, | |
33501 | int range, bool refresh = 1 ); | |
33502 | virtual void SetScrollPos( int orient, int pos, bool refresh = 1 ); | |
33503 | virtual int GetScrollPos( int orient ) const; | |
33504 | virtual int GetScrollThumb( int orient ) const; | |
33505 | virtual int GetScrollRange( int orient ) const; | |
33506 | virtual void ScrollWindow( int dx, int dy, | |
33507 | const wxRect* rect = (wxRect *) __null ); | |
33508 | ||
33509 | ||
33510 | virtual void SetDropTarget( wxDropTarget *dropTarget ); | |
33511 | ||
33512 | ||
33513 | ||
33514 | virtual void AddChild( wxWindowBase *child ); | |
33515 | virtual void RemoveChild( wxWindowBase *child ); | |
33516 | ||
33517 | ||
33518 | ||
33519 | ||
33520 | void SetDoubleBuffered( bool on ); | |
33521 | ||
33522 | ||
33523 | ||
33524 | ||
33525 | ||
33526 | ||
33527 | virtual WXWidget GetHandle() const { return m_widget; } | |
33528 | ||
33529 | ||
33530 | ||
33531 | ||
33532 | virtual void OnInternalIdle(); | |
33533 | ||
33534 | ||
33535 | void GtkUpdate(); | |
33536 | ||
33537 | ||
33538 | void OnIdle(wxIdleEvent& ) {} | |
33539 | ||
33540 | ||
33541 | ||
33542 | ||
33543 | virtual void OnParentEnable( bool ) {} | |
33544 | ||
33545 | ||
33546 | bool PreCreation( wxWindow *parent, const wxPoint &pos, const wxSize &size ); | |
33547 | void PostCreation(); | |
33548 | ||
33549 | ||
33550 | ||
33551 | ||
33552 | void DoAddChild(wxWindow *child); | |
33553 | ||
33554 | ||
33555 | ||
33556 | ||
33557 | ||
33558 | ||
33559 | void GtkSendPaintEvents(); | |
33560 | ||
33561 | ||
33562 | ||
33563 | ||
33564 | ||
33565 | ||
33566 | ||
33567 | virtual GtkWidget* GetConnectWidget(); | |
33568 | virtual bool IsOwnGtkWindow( GdkWindow *window ); | |
33569 | void ConnectWidget( GtkWidget *widget ); | |
33570 | ||
33571 | ||
33572 | ||
33573 | PangoContext *GtkGetPangoDefaultContext(); | |
33574 | ||
33575 | ||
33576 | ||
33577 | ||
33578 | ||
33579 | ||
33580 | ||
33581 | PangoContext *GtkGetPangoX11Context(); | |
33582 | PangoContext *m_x11Context; | |
33583 | ||
33584 | ||
33585 | ||
33586 | virtual void ApplyToolTip( GtkTooltips *tips, const wxChar *tip ); | |
33587 | ||
33588 | ||
33589 | ||
33590 | ||
33591 | ||
33592 | void GtkUpdateSize() { m_sizeSet = 0; } | |
33593 | ||
33594 | ||
33595 | virtual void FixUpMouseEvent(GtkWidget * , | |
33596 | wxCoord& , | |
33597 | wxCoord& ) { } | |
33598 | ||
33599 | ||
33600 | virtual bool IsTransparentForMouse() const { return 0; } | |
33601 | ||
33602 | ||
33603 | virtual bool IsRadioButton() const { return 0; } | |
33604 | ||
33605 | ||
33606 | int m_x, m_y; | |
33607 | int m_width, m_height; | |
33608 | int m_oldClientWidth,m_oldClientHeight; | |
33609 | ||
33610 | ||
33611 | GtkWidget *m_widget; | |
33612 | GtkWidget *m_wxwindow; | |
33613 | ||
33614 | ||
33615 | GtkWidget *m_focusWidget; | |
33616 | ||
33617 | ||
33618 | wxGtkIMData *m_imData; | |
33619 | # 232 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/window.h" | |
33620 | GtkAdjustment *m_hAdjust,*m_vAdjust; | |
33621 | float m_oldHorizontalPos; | |
33622 | float m_oldVerticalPos; | |
33623 | ||
33624 | ||
33625 | bool m_needParent:1; | |
33626 | bool m_noExpose:1; | |
33627 | bool m_nativeSizeEvent:1; | |
33628 | bool m_hasScrolling:1; | |
33629 | bool m_hasVMT:1; | |
33630 | bool m_sizeSet:1; | |
33631 | bool m_resizing:1; | |
33632 | bool m_acceptsFocus:1; | |
33633 | bool m_hasFocus:1; | |
33634 | bool m_isScrolling:1; | |
33635 | bool m_clipPaintRegion:1; | |
33636 | ||
33637 | bool m_dirtyTabOrder:1; | |
33638 | ||
33639 | ||
33640 | bool m_needsStyleChange:1; | |
33641 | ||
33642 | ||
33643 | ||
33644 | ||
33645 | ||
33646 | wxInsertChildFunction m_insertCallback; | |
33647 | ||
33648 | ||
33649 | virtual void DoClientToScreen( int *x, int *y ) const; | |
33650 | virtual void DoScreenToClient( int *x, int *y ) const; | |
33651 | virtual void DoGetPosition( int *x, int *y ) const; | |
33652 | virtual void DoGetSize( int *width, int *height ) const; | |
33653 | virtual void DoGetClientSize( int *width, int *height ) const; | |
33654 | virtual void DoSetSize(int x, int y, | |
33655 | int width, int height, | |
33656 | int sizeFlags = (0x0001|0x0002)); | |
33657 | virtual void DoSetClientSize(int width, int height); | |
33658 | virtual void DoMoveWindow(int x, int y, int width, int height); | |
33659 | ||
33660 | virtual void DoCaptureMouse(); | |
33661 | virtual void DoReleaseMouse(); | |
33662 | ||
33663 | ||
33664 | virtual void DoSetToolTip( wxToolTip *tip ); | |
33665 | ||
33666 | ||
33667 | void HandleScrollEvent(GtkAdjustment* adj); | |
33668 | ||
33669 | protected: | |
33670 | ||
33671 | void Init(); | |
33672 | ||
33673 | ||
33674 | virtual void DoMoveInTabOrder(wxWindow *win, MoveKind move); | |
33675 | ||
33676 | ||
33677 | void RealizeTabOrder(); | |
33678 | ||
33679 | ||
33680 | ||
33681 | ||
33682 | ||
33683 | ||
33684 | ||
33685 | GtkRcStyle *CreateWidgetStyle(bool forceStyle = false); | |
33686 | ||
33687 | ||
33688 | virtual void ApplyWidgetStyle(bool forceStyle = false); | |
33689 | ||
33690 | ||
33691 | ||
33692 | virtual void DoApplyWidgetStyle(GtkRcStyle *style); | |
33693 | ||
33694 | private: | |
33695 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
33696 | private: wxWindow(const wxWindow&); wxWindow& operator=(const wxWindow&); | |
33697 | }; | |
33698 | ||
33699 | extern wxWindow *wxFindFocusedChild(wxWindow *win); | |
33700 | # 1366 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/window.h" 2 | |
33701 | # 1418 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/window.h" | |
33702 | inline wxWindow *wxWindowBase::GetGrandParent() const | |
33703 | { | |
33704 | return m_parent ? m_parent->GetParent() : (wxWindow *)__null; | |
33705 | } | |
33706 | ||
33707 | ||
33708 | ||
33709 | ||
33710 | ||
33711 | ||
33712 | ||
33713 | extern wxWindow* wxFindWindowAtPointer(wxPoint& pt); | |
33714 | ||
33715 | ||
33716 | extern wxPoint wxGetMousePosition(); | |
33717 | ||
33718 | ||
33719 | extern wxWindow *wxGetActiveWindow(); | |
33720 | ||
33721 | ||
33722 | wxWindow* wxGetTopLevelParent(wxWindow *win); | |
33723 | ||
33724 | ||
33725 | inline int NewControlId() { return wxWindowBase::NewControlId(); } | |
33726 | # 24 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/app.h" 2 | |
33727 | ||
33728 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/vidmode.h" 1 | |
33729 | # 19 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/vidmode.h" | |
33730 | struct wxVideoMode | |
33731 | { | |
33732 | wxVideoMode(int width = 0, int height = 0, int depth = 0, int freq = 0) | |
33733 | { | |
33734 | w = width; | |
33735 | h = height; | |
33736 | ||
33737 | bpp = depth; | |
33738 | ||
33739 | refresh = freq; | |
33740 | } | |
33741 | ||
33742 | ||
33743 | ||
33744 | bool operator==(const wxVideoMode& m) const | |
33745 | { | |
33746 | return w == m.w && h == m.h && bpp == m.bpp && refresh == m.refresh; | |
33747 | } | |
33748 | bool operator!=(const wxVideoMode& mode) const | |
33749 | { | |
33750 | return !operator==(mode); | |
33751 | } | |
33752 | ||
33753 | ||
33754 | ||
33755 | ||
33756 | bool Matches(const wxVideoMode& other) const | |
33757 | { | |
33758 | return (!other.w || w == other.w) && | |
33759 | (!other.h || h == other.h) && | |
33760 | (!other.bpp || bpp == other.bpp) && | |
33761 | (!other.refresh || refresh >= other.refresh); | |
33762 | } | |
33763 | ||
33764 | ||
33765 | int GetWidth() const { return w; } | |
33766 | int GetHeight() const { return h; } | |
33767 | int GetDepth() const { return bpp; } | |
33768 | ||
33769 | ||
33770 | bool IsOk() const { return w && h; } | |
33771 | ||
33772 | ||
33773 | ||
33774 | int w, h; | |
33775 | ||
33776 | ||
33777 | int bpp; | |
33778 | ||
33779 | ||
33780 | int refresh; | |
33781 | }; | |
33782 | # 26 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/app.h" 2 | |
33783 | ||
33784 | ||
33785 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/build.h" 1 | |
33786 | # 132 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/build.h" | |
33787 | class wxBuildOptions | |
33788 | { | |
33789 | public: | |
33790 | ||
33791 | ||
33792 | wxBuildOptions() : m_signature("2" "." "6" " (" "no debug" "," "ANSI" ",compiler with C++ ABI " "1002" ",wx containers" ",compatible with 2.4" ")") {} | |
33793 | ||
33794 | private: | |
33795 | const char *m_signature; | |
33796 | ||
33797 | ||
33798 | friend class wxAppConsole; | |
33799 | }; | |
33800 | # 29 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/app.h" 2 | |
33801 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/init.h" 1 | |
33802 | # 29 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/init.h" | |
33803 | extern bool wxEntryStart(int& argc, wxChar **argv); | |
33804 | ||
33805 | ||
33806 | ||
33807 | extern void wxEntryCleanup(); | |
33808 | # 45 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/init.h" | |
33809 | extern int wxEntry(int& argc, wxChar **argv); | |
33810 | # 63 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/init.h" | |
33811 | extern bool wxInitialize(int argc = 0, wxChar **argv = __null); | |
33812 | ||
33813 | ||
33814 | ||
33815 | extern void wxUninitialize(); | |
33816 | ||
33817 | ||
33818 | ||
33819 | class wxInitializer | |
33820 | { | |
33821 | public: | |
33822 | ||
33823 | wxInitializer(int argc = 0, wxChar **argv = __null) | |
33824 | { | |
33825 | m_ok = wxInitialize(argc, argv); | |
33826 | } | |
33827 | ||
33828 | ||
33829 | bool IsOk() const { return m_ok; } | |
33830 | ||
33831 | ||
33832 | operator bool() const { return m_ok; } | |
33833 | ||
33834 | ||
33835 | ~wxInitializer() { if ( m_ok ) wxUninitialize(); } | |
33836 | ||
33837 | private: | |
33838 | bool m_ok; | |
33839 | }; | |
33840 | # 30 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/app.h" 2 | |
33841 | ||
33842 | class wxAppConsole; | |
33843 | class wxAppTraits; | |
33844 | class wxCmdLineParser; | |
33845 | class wxLog; | |
33846 | class wxMessageOutput; | |
33847 | # 44 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/app.h" | |
33848 | class wxEventLoop; | |
33849 | ||
33850 | ||
33851 | ||
33852 | ||
33853 | ||
33854 | ||
33855 | ||
33856 | typedef wxAppConsole* (*wxAppInitializerFunction)(); | |
33857 | ||
33858 | ||
33859 | ||
33860 | ||
33861 | ||
33862 | enum | |
33863 | { | |
33864 | wxPRINT_WINDOWS = 1, | |
33865 | wxPRINT_POSTSCRIPT = 2 | |
33866 | }; | |
33867 | ||
33868 | ||
33869 | ||
33870 | ||
33871 | ||
33872 | class wxAppConsole : public wxEvtHandler | |
33873 | { | |
33874 | public: | |
33875 | ||
33876 | wxAppConsole(); | |
33877 | virtual ~wxAppConsole(); | |
33878 | # 84 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/app.h" | |
33879 | virtual bool Initialize(int& argc, wxChar **argv); | |
33880 | ||
33881 | ||
33882 | virtual bool CallOnInit() { return OnInit(); } | |
33883 | ||
33884 | ||
33885 | ||
33886 | ||
33887 | ||
33888 | virtual bool OnInit(); | |
33889 | ||
33890 | ||
33891 | virtual bool OnInitGui() { return true; } | |
33892 | ||
33893 | ||
33894 | ||
33895 | virtual int OnRun() = 0; | |
33896 | ||
33897 | ||
33898 | ||
33899 | virtual int OnExit(); | |
33900 | ||
33901 | ||
33902 | ||
33903 | ||
33904 | virtual void CleanUp(); | |
33905 | ||
33906 | ||
33907 | ||
33908 | ||
33909 | ||
33910 | ||
33911 | ||
33912 | virtual void OnFatalException() { } | |
33913 | ||
33914 | ||
33915 | ||
33916 | ||
33917 | ||
33918 | ||
33919 | virtual bool OnExceptionInMainLoop(); | |
33920 | ||
33921 | ||
33922 | ||
33923 | ||
33924 | ||
33925 | virtual void OnUnhandledException() { } | |
33926 | ||
33927 | ||
33928 | ||
33929 | virtual void Exit(); | |
33930 | # 145 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/app.h" | |
33931 | wxString GetAppName() const | |
33932 | { | |
33933 | return m_appName.empty() ? m_className : m_appName; | |
33934 | } | |
33935 | void SetAppName(const wxString& name) { m_appName = name; } | |
33936 | ||
33937 | ||
33938 | wxString GetClassName() const { return m_className; } | |
33939 | void SetClassName(const wxString& name) { m_className = name; } | |
33940 | ||
33941 | ||
33942 | const wxString& GetVendorName() const { return m_vendorName; } | |
33943 | void SetVendorName(const wxString& name) { m_vendorName = name; } | |
33944 | # 174 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/app.h" | |
33945 | virtual void OnInitCmdLine(wxCmdLineParser& parser); | |
33946 | ||
33947 | ||
33948 | ||
33949 | ||
33950 | virtual bool OnCmdLineParsed(wxCmdLineParser& parser); | |
33951 | ||
33952 | ||
33953 | ||
33954 | virtual bool OnCmdLineHelp(wxCmdLineParser& parser); | |
33955 | ||
33956 | ||
33957 | ||
33958 | virtual bool OnCmdLineError(wxCmdLineParser& parser); | |
33959 | # 199 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/app.h" | |
33960 | wxAppTraits *GetTraits(); | |
33961 | # 209 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/app.h" | |
33962 | virtual wxLog *CreateLogTarget() __attribute__ ((deprecated)); | |
33963 | ||
33964 | ||
33965 | ||
33966 | ||
33967 | virtual wxMessageOutput *CreateMessageOutput() __attribute__ ((deprecated)); | |
33968 | # 229 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/app.h" | |
33969 | virtual int FilterEvent(wxEvent& event); | |
33970 | ||
33971 | ||
33972 | ||
33973 | ||
33974 | ||
33975 | ||
33976 | ||
33977 | virtual void HandleEvent(wxEvtHandler *handler, | |
33978 | wxEventFunction func, | |
33979 | wxEvent& event) const; | |
33980 | ||
33981 | ||
33982 | ||
33983 | ||
33984 | ||
33985 | ||
33986 | virtual void ProcessPendingEvents(); | |
33987 | ||
33988 | ||
33989 | virtual bool Yield(bool = false) { return true; } | |
33990 | ||
33991 | ||
33992 | virtual void WakeUpIdle() { } | |
33993 | ||
33994 | ||
33995 | ||
33996 | static bool IsMainLoopRunning() { return false; } | |
33997 | # 278 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/app.h" | |
33998 | static bool CheckBuildOptions(const char *optionsSignature, | |
33999 | const char *componentName); | |
34000 | ||
34001 | static bool CheckBuildOptions(const wxBuildOptions& buildOptions) __attribute__ ((deprecated)); | |
34002 | ||
34003 | ||
34004 | ||
34005 | ||
34006 | ||
34007 | ||
34008 | static void SetInitializerFunction(wxAppInitializerFunction fn) | |
34009 | { ms_appInitFn = fn; } | |
34010 | static wxAppInitializerFunction GetInitializerFunction() | |
34011 | { return ms_appInitFn; } | |
34012 | ||
34013 | ||
34014 | ||
34015 | ||
34016 | ||
34017 | static wxAppConsole *GetInstance() { return ms_appInstance; } | |
34018 | static void SetInstance(wxAppConsole *app) { ms_appInstance = app; } | |
34019 | ||
34020 | ||
34021 | ||
34022 | int argc; | |
34023 | wxChar **argv; | |
34024 | ||
34025 | protected: | |
34026 | ||
34027 | ||
34028 | virtual wxAppTraits *CreateTraits(); | |
34029 | ||
34030 | ||
34031 | ||
34032 | static wxAppInitializerFunction ms_appInitFn; | |
34033 | ||
34034 | ||
34035 | static wxAppConsole *ms_appInstance; | |
34036 | ||
34037 | ||
34038 | ||
34039 | wxString m_vendorName, | |
34040 | m_appName, | |
34041 | m_className; | |
34042 | ||
34043 | ||
34044 | ||
34045 | wxAppTraits *m_traits; | |
34046 | ||
34047 | ||
34048 | ||
34049 | ||
34050 | private: wxAppConsole(const wxAppConsole&); wxAppConsole& operator=(const wxAppConsole&); | |
34051 | }; | |
34052 | ||
34053 | ||
34054 | ||
34055 | ||
34056 | ||
34057 | ||
34058 | ||
34059 | class wxAppBase : public wxAppConsole | |
34060 | { | |
34061 | public: | |
34062 | wxAppBase(); | |
34063 | virtual ~wxAppBase(); | |
34064 | ||
34065 | ||
34066 | ||
34067 | ||
34068 | ||
34069 | ||
34070 | ||
34071 | virtual bool Initialize(int& argc, wxChar **argv); | |
34072 | ||
34073 | ||
34074 | ||
34075 | ||
34076 | ||
34077 | virtual bool OnInitGui(); | |
34078 | # 366 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/app.h" | |
34079 | virtual int OnRun(); | |
34080 | ||
34081 | ||
34082 | virtual int OnExit(); | |
34083 | ||
34084 | ||
34085 | ||
34086 | ||
34087 | virtual void CleanUp(); | |
34088 | ||
34089 | ||
34090 | ||
34091 | ||
34092 | ||
34093 | ||
34094 | ||
34095 | static bool IsMainLoopRunning() | |
34096 | { | |
34097 | ||
34098 | wxAppBase *app = static_cast<wxAppBase *>(GetInstance()); | |
34099 | return app && app->m_mainLoop != __null; | |
34100 | ||
34101 | ||
34102 | ||
34103 | } | |
34104 | ||
34105 | ||
34106 | virtual int MainLoop(); | |
34107 | ||
34108 | ||
34109 | virtual void Exit(); | |
34110 | ||
34111 | ||
34112 | ||
34113 | virtual void ExitMainLoop(); | |
34114 | ||
34115 | ||
34116 | virtual bool Pending(); | |
34117 | ||
34118 | ||
34119 | ||
34120 | ||
34121 | ||
34122 | virtual bool Dispatch(); | |
34123 | # 420 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/app.h" | |
34124 | virtual bool Yield(bool onlyIfNeeded = false) = 0; | |
34125 | ||
34126 | ||
34127 | ||
34128 | ||
34129 | ||
34130 | ||
34131 | virtual bool ProcessIdle(); | |
34132 | ||
34133 | ||
34134 | ||
34135 | virtual bool SendIdleEvents(wxWindow* win, wxIdleEvent& event); | |
34136 | ||
34137 | ||
34138 | void OnIdle(wxIdleEvent& event); | |
34139 | ||
34140 | ||
34141 | ||
34142 | ||
34143 | ||
34144 | ||
34145 | virtual bool IsActive() const { return m_isActive; } | |
34146 | ||
34147 | ||
34148 | void SetTopWindow(wxWindow *win) { m_topWindow = win; } | |
34149 | ||
34150 | ||
34151 | ||
34152 | ||
34153 | virtual wxWindow *GetTopWindow() const | |
34154 | { | |
34155 | if (m_topWindow) | |
34156 | return m_topWindow; | |
34157 | else if (wxTopLevelWindows.GetCount() > 0) | |
34158 | return wxTopLevelWindows.GetFirst()->GetData(); | |
34159 | else | |
34160 | return (wxWindow *)__null; | |
34161 | } | |
34162 | ||
34163 | ||
34164 | ||
34165 | ||
34166 | ||
34167 | ||
34168 | void SetExitOnFrameDelete(bool flag) | |
34169 | { m_exitOnFrameDelete = flag ? Yes : No; } | |
34170 | bool GetExitOnFrameDelete() const | |
34171 | { return m_exitOnFrameDelete == Yes; } | |
34172 | ||
34173 | ||
34174 | ||
34175 | ||
34176 | ||
34177 | ||
34178 | ||
34179 | virtual wxVideoMode GetDisplayMode() const { return wxVideoMode(); } | |
34180 | ||
34181 | ||
34182 | ||
34183 | virtual bool SetDisplayMode(const wxVideoMode& ) { return true; } | |
34184 | ||
34185 | ||
34186 | void SetUseBestVisual( bool flag ) { m_useBestVisual = flag; } | |
34187 | bool GetUseBestVisual() const { return m_useBestVisual; } | |
34188 | ||
34189 | ||
34190 | ||
34191 | ||
34192 | ||
34193 | virtual void SetPrintMode(int ) { } | |
34194 | int GetPrintMode() const { return wxPRINT_POSTSCRIPT; } | |
34195 | ||
34196 | ||
34197 | ||
34198 | ||
34199 | ||
34200 | ||
34201 | virtual bool OnCmdLineParsed(wxCmdLineParser& parser); | |
34202 | virtual void OnInitCmdLine(wxCmdLineParser& parser); | |
34203 | # 507 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/app.h" | |
34204 | virtual void SetActive(bool isActive, wxWindow *lastFocus); | |
34205 | ||
34206 | ||
34207 | ||
34208 | ||
34209 | bool Initialized() { return true; } | |
34210 | ||
34211 | ||
34212 | protected: | |
34213 | ||
34214 | void DeletePendingObjects(); | |
34215 | ||
34216 | ||
34217 | virtual wxAppTraits *CreateTraits(); | |
34218 | ||
34219 | ||
34220 | ||
34221 | ||
34222 | ||
34223 | wxEventLoop *m_mainLoop; | |
34224 | ||
34225 | ||
34226 | ||
34227 | wxWindow *m_topWindow; | |
34228 | ||
34229 | ||
34230 | ||
34231 | ||
34232 | ||
34233 | enum | |
34234 | { | |
34235 | Later = -1, | |
34236 | No, | |
34237 | Yes | |
34238 | } m_exitOnFrameDelete; | |
34239 | ||
34240 | ||
34241 | ||
34242 | bool m_useBestVisual; | |
34243 | ||
34244 | ||
34245 | bool m_isActive; | |
34246 | ||
34247 | ||
34248 | private: wxAppBase(const wxAppBase&); wxAppBase& operator=(const wxAppBase&); | |
34249 | }; | |
34250 | # 570 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/app.h" | |
34251 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/app.h" 1 | |
34252 | # 17 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/app.h" | |
34253 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/frame.h" 1 | |
34254 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/frame.h" | |
34255 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/toplevel.h" 1 | |
34256 | # 26 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/toplevel.h" | |
34257 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/iconbndl.h" 1 | |
34258 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/iconbndl.h" | |
34259 | class wxIcon; | |
34260 | class wxString; | |
34261 | ||
34262 | typedef wxIcon _wxObjArraywxIconArray; typedef int ( *CMPFUNC_wxObjArraywxIconArray)(_wxObjArraywxIconArray **pItem1, _wxObjArraywxIconArray **pItem2); class wxIconArray : protected wxArrayPtrVoid { typedef int ( *CMPFUNCwxArrayPtrVoid)(void **pItem1, void **pItem2); typedef wxArrayPtrVoid base_array; public: wxIconArray() { } wxIconArray(const wxIconArray& src); wxIconArray& operator=(const wxIconArray& src); ~wxIconArray(); void Alloc(size_t count) { reserve(count); } size_t GetCount() const { return base_array::size(); } size_t size() const { return base_array::size(); } bool IsEmpty() const { return base_array::empty(); } bool empty() const { return base_array::empty(); } size_t Count() const { return base_array::size(); } void Shrink() { wxArrayPtrVoid::Shrink(); } _wxObjArraywxIconArray& operator[](size_t uiIndex) const { return *(_wxObjArraywxIconArray*)wxArrayPtrVoid::operator[](uiIndex); } _wxObjArraywxIconArray& Item(size_t uiIndex) const { return *(_wxObjArraywxIconArray*)wxArrayPtrVoid::operator[](uiIndex); } _wxObjArraywxIconArray& Last() const { return *(_wxObjArraywxIconArray*)(wxArrayPtrVoid::operator[](size() - 1)); } int Index(const _wxObjArraywxIconArray& lItem, bool bFromEnd = false) const; void Add(const _wxObjArraywxIconArray& lItem, size_t nInsert = 1); void Add(const _wxObjArraywxIconArray* pItem) { wxArrayPtrVoid::push_back((_wxObjArraywxIconArray*)pItem); } void push_back(const _wxObjArraywxIconArray* pItem) { wxArrayPtrVoid::push_back((_wxObjArraywxIconArray*)pItem); } void push_back(const _wxObjArraywxIconArray& lItem) { Add(lItem); } void Insert(const _wxObjArraywxIconArray& lItem, size_t uiIndex, size_t nInsert = 1); void Insert(const _wxObjArraywxIconArray* pItem, size_t uiIndex) { wxArrayPtrVoid::insert(begin() + uiIndex, (_wxObjArraywxIconArray*)pItem); } void Empty() { DoEmpty(); wxArrayPtrVoid::clear(); } void Clear() { DoEmpty(); wxArrayPtrVoid::clear(); } _wxObjArraywxIconArray* Detach(size_t uiIndex) { _wxObjArraywxIconArray* p = (_wxObjArraywxIconArray*)wxArrayPtrVoid::operator[](uiIndex); wxArrayPtrVoid::erase(begin() + uiIndex); return p; } void RemoveAt(size_t uiIndex, size_t nRemove = 1); void Sort(CMPFUNC_wxObjArraywxIconArray fCmp) { wxArrayPtrVoid::Sort((CMPFUNCwxArrayPtrVoid)fCmp); } private: void DoEmpty(); void DoCopy(const wxIconArray& src); }; | |
34263 | ||
34264 | ||
34265 | ||
34266 | ||
34267 | class wxIconBundle | |
34268 | { | |
34269 | public: | |
34270 | ||
34271 | wxIconBundle() : m_icons() {} | |
34272 | ||
34273 | wxIconBundle( const wxString& file, long type ) : m_icons() | |
34274 | { AddIcon( file, type ); } | |
34275 | ||
34276 | wxIconBundle( const wxIcon& icon ) : m_icons() | |
34277 | { AddIcon( icon ); } | |
34278 | ||
34279 | const wxIconBundle& operator =( const wxIconBundle& ic ); | |
34280 | wxIconBundle( const wxIconBundle& ic ) : m_icons() | |
34281 | { *this = ic; } | |
34282 | ||
34283 | ~wxIconBundle() { DeleteIcons(); } | |
34284 | ||
34285 | ||
34286 | ||
34287 | ||
34288 | void AddIcon( const wxString& file, long type ); | |
34289 | ||
34290 | ||
34291 | ||
34292 | void AddIcon( const wxIcon& icon ); | |
34293 | ||
34294 | ||
34295 | ||
34296 | ||
34297 | const wxIcon& GetIcon( const wxSize& size ) const; | |
34298 | ||
34299 | const wxIcon& GetIcon( wxCoord size = wxDefaultCoord ) const | |
34300 | { return GetIcon( wxSize( size, size ) ); } | |
34301 | private: | |
34302 | ||
34303 | void DeleteIcons(); | |
34304 | public: | |
34305 | wxIconArray m_icons; | |
34306 | }; | |
34307 | # 27 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/toplevel.h" 2 | |
34308 | ||
34309 | ||
34310 | extern const wxChar* wxFrameNameStr; | |
34311 | ||
34312 | class wxTopLevelWindowBase; | |
34313 | # 94 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/toplevel.h" | |
34314 | enum | |
34315 | { | |
34316 | wxFULLSCREEN_NOMENUBAR = 0x0001, | |
34317 | wxFULLSCREEN_NOTOOLBAR = 0x0002, | |
34318 | wxFULLSCREEN_NOSTATUSBAR = 0x0004, | |
34319 | wxFULLSCREEN_NOBORDER = 0x0008, | |
34320 | wxFULLSCREEN_NOCAPTION = 0x0010, | |
34321 | ||
34322 | wxFULLSCREEN_ALL = wxFULLSCREEN_NOMENUBAR | wxFULLSCREEN_NOTOOLBAR | | |
34323 | wxFULLSCREEN_NOSTATUSBAR | wxFULLSCREEN_NOBORDER | | |
34324 | wxFULLSCREEN_NOCAPTION | |
34325 | }; | |
34326 | ||
34327 | ||
34328 | enum | |
34329 | { | |
34330 | wxUSER_ATTENTION_INFO = 1, | |
34331 | wxUSER_ATTENTION_ERROR = 2 | |
34332 | }; | |
34333 | ||
34334 | ||
34335 | ||
34336 | ||
34337 | ||
34338 | class wxTopLevelWindowBase : public wxWindow | |
34339 | { | |
34340 | public: | |
34341 | ||
34342 | wxTopLevelWindowBase(); | |
34343 | virtual ~wxTopLevelWindowBase(); | |
34344 | ||
34345 | ||
34346 | ||
34347 | ||
34348 | ||
34349 | virtual void Maximize(bool maximize = true) = 0; | |
34350 | ||
34351 | ||
34352 | virtual void Restore() = 0; | |
34353 | ||
34354 | ||
34355 | virtual void Iconize(bool iconize = true) = 0; | |
34356 | ||
34357 | ||
34358 | virtual bool IsMaximized() const = 0; | |
34359 | ||
34360 | ||
34361 | virtual bool IsIconized() const = 0; | |
34362 | ||
34363 | ||
34364 | const wxIcon& GetIcon() const { return m_icons.GetIcon( -1 ); } | |
34365 | ||
34366 | ||
34367 | const wxIconBundle& GetIcons() const { return m_icons; } | |
34368 | ||
34369 | ||
34370 | virtual void SetIcon(const wxIcon& icon) { m_icons = wxIconBundle( icon ); } | |
34371 | ||
34372 | ||
34373 | virtual void SetIcons(const wxIconBundle& icons ) { m_icons = icons; } | |
34374 | ||
34375 | ||
34376 | virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL) = 0; | |
34377 | ||
34378 | ||
34379 | virtual bool IsFullScreen() const = 0; | |
34380 | # 172 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/toplevel.h" | |
34381 | virtual bool SetShape(const wxRegion& ) { return false; } | |
34382 | ||
34383 | ||
34384 | ||
34385 | virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO); | |
34386 | ||
34387 | ||
34388 | virtual bool IsActive() | |
34389 | { return (wxGetTopLevelParent(FindFocus()) == this); } | |
34390 | # 191 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/toplevel.h" | |
34391 | virtual bool Destroy(); | |
34392 | virtual bool IsTopLevel() const { return true; } | |
34393 | virtual wxSize GetMaxSize() const; | |
34394 | ||
34395 | ||
34396 | void OnCloseWindow(wxCloseEvent& event); | |
34397 | void OnSize(wxSizeEvent& ) { DoLayout(); } | |
34398 | ||
34399 | ||
34400 | virtual void GetRectForTopLevelChildren(int *x, int *y, int *w, int *h); | |
34401 | ||
34402 | ||
34403 | ||
34404 | void OnActivate(wxActivateEvent &) { } | |
34405 | ||
34406 | ||
34407 | virtual void DoUpdateWindowUI(wxUpdateUIEvent& event) ; | |
34408 | ||
34409 | ||
34410 | ||
34411 | virtual void ReservedTopLevelWindowFunc1() {} | |
34412 | virtual void ReservedTopLevelWindowFunc2() {} | |
34413 | virtual void ReservedTopLevelWindowFunc3() {} | |
34414 | virtual void ReservedTopLevelWindowFunc4() {} | |
34415 | virtual void ReservedTopLevelWindowFunc5() {} | |
34416 | virtual void ReservedTopLevelWindowFunc6() {} | |
34417 | virtual void ReservedTopLevelWindowFunc7() {} | |
34418 | virtual void ReservedTopLevelWindowFunc8() {} | |
34419 | virtual void ReservedTopLevelWindowFunc9() {} | |
34420 | ||
34421 | ||
34422 | protected: | |
34423 | ||
34424 | ||
34425 | virtual void DoClientToScreen(int *x, int *y) const; | |
34426 | virtual void DoScreenToClient(int *x, int *y) const; | |
34427 | ||
34428 | ||
34429 | ||
34430 | virtual bool IsOneOfBars(const wxWindow *) const | |
34431 | { return false; } | |
34432 | ||
34433 | ||
34434 | ||
34435 | bool IsLastBeforeExit() const; | |
34436 | ||
34437 | ||
34438 | bool SendIconizeEvent(bool iconized = true); | |
34439 | ||
34440 | ||
34441 | ||
34442 | void DoLayout(); | |
34443 | ||
34444 | ||
34445 | ||
34446 | ||
34447 | static wxSize GetDefaultSize(); | |
34448 | static int WidthDefault(int w) { return w == wxDefaultCoord ? GetDefaultSize().x : w; } | |
34449 | static int HeightDefault(int h) { return h == wxDefaultCoord ? GetDefaultSize().y : h; } | |
34450 | ||
34451 | ||
34452 | wxIconBundle m_icons; | |
34453 | ||
34454 | private: wxTopLevelWindowBase(const wxTopLevelWindowBase&); wxTopLevelWindowBase& operator=(const wxTopLevelWindowBase&); | |
34455 | private: static const wxEventTableEntry sm_eventTableEntries[]; protected: static const wxEventTable sm_eventTable; virtual const wxEventTable* GetEventTable() const; static wxEventHashTable sm_eventHashTable; virtual wxEventHashTable& GetEventHashTable() const; | |
34456 | }; | |
34457 | # 267 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/toplevel.h" | |
34458 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/toplevel.h" 1 | |
34459 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/toplevel.h" | |
34460 | class wxTopLevelWindowGTK : public wxTopLevelWindowBase | |
34461 | { | |
34462 | public: | |
34463 | ||
34464 | wxTopLevelWindowGTK() { Init(); } | |
34465 | wxTopLevelWindowGTK(wxWindow *parent, | |
34466 | wxWindowID id, | |
34467 | const wxString& title, | |
34468 | const wxPoint& pos = wxDefaultPosition, | |
34469 | const wxSize& size = wxDefaultSize, | |
34470 | long style = (0x0800 | 0x0040 | 0x0400 | 0x0200 | 0x1000 | 0x20000000 | 0x00400000), | |
34471 | const wxString& name = wxFrameNameStr) | |
34472 | { | |
34473 | Init(); | |
34474 | ||
34475 | Create(parent, id, title, pos, size, style, name); | |
34476 | } | |
34477 | ||
34478 | bool Create(wxWindow *parent, | |
34479 | wxWindowID id, | |
34480 | const wxString& title, | |
34481 | const wxPoint& pos = wxDefaultPosition, | |
34482 | const wxSize& size = wxDefaultSize, | |
34483 | long style = (0x0800 | 0x0040 | 0x0400 | 0x0200 | 0x1000 | 0x20000000 | 0x00400000), | |
34484 | const wxString& name = wxFrameNameStr); | |
34485 | ||
34486 | virtual ~wxTopLevelWindowGTK(); | |
34487 | ||
34488 | ||
34489 | virtual void Maximize(bool maximize = 1); | |
34490 | virtual bool IsMaximized() const; | |
34491 | virtual void Iconize(bool iconize = 1); | |
34492 | virtual bool IsIconized() const; | |
34493 | virtual void SetIcon(const wxIcon& icon); | |
34494 | virtual void SetIcons(const wxIconBundle& icons); | |
34495 | virtual void Restore(); | |
34496 | ||
34497 | virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL); | |
34498 | virtual bool IsFullScreen() const { return m_fsIsShowing; }; | |
34499 | ||
34500 | virtual bool SetShape(const wxRegion& region); | |
34501 | ||
34502 | ||
34503 | virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO); | |
34504 | ||
34505 | ||
34506 | virtual bool Show(bool show = 1); | |
34507 | ||
34508 | virtual void Raise(); | |
34509 | ||
34510 | virtual bool IsActive(); | |
34511 | ||
34512 | virtual void SetTitle( const wxString &title ); | |
34513 | virtual wxString GetTitle() const { return m_title; } | |
34514 | ||
34515 | ||
34516 | ||
34517 | virtual void AddGrab(); | |
34518 | virtual void RemoveGrab(); | |
34519 | virtual bool IsGrabbed() const { return m_grabbed; } | |
34520 | ||
34521 | ||
34522 | ||
34523 | ||
34524 | ||
34525 | ||
34526 | virtual void DoMoveWindow(int x, int y, int width, int height); | |
34527 | ||
34528 | ||
34529 | virtual void GtkOnSize( int x, int y, int width, int height ); | |
34530 | virtual void OnInternalIdle(); | |
34531 | ||
34532 | ||
34533 | void SetIconizeState(bool iconic); | |
34534 | ||
34535 | wxString m_title; | |
34536 | int m_miniEdge, | |
34537 | m_miniTitle; | |
34538 | GtkWidget *m_mainWidget; | |
34539 | bool m_insertInClientArea; | |
34540 | ||
34541 | bool m_fsIsShowing; | |
34542 | long m_fsSaveGdkFunc, m_fsSaveGdkDecor; | |
34543 | long m_fsSaveFlag; | |
34544 | wxRect m_fsSaveFrame; | |
34545 | ||
34546 | ||
34547 | long m_gdkFunc, | |
34548 | m_gdkDecor; | |
34549 | ||
34550 | protected: | |
34551 | ||
34552 | void Init(); | |
34553 | ||
34554 | ||
34555 | virtual void DoSetSize(int x, int y, | |
34556 | int width, int height, | |
34557 | int sizeFlags = (0x0001|0x0002)); | |
34558 | ||
34559 | virtual void DoSetClientSize(int width, int height); | |
34560 | virtual void DoGetClientSize( int *width, int *height ) const; | |
34561 | ||
34562 | ||
34563 | bool m_isIconized; | |
34564 | ||
34565 | ||
34566 | bool m_grabbed; | |
34567 | }; | |
34568 | # 268 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/toplevel.h" 2 | |
34569 | # 293 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/toplevel.h" | |
34570 | class wxTopLevelWindow : public wxTopLevelWindowGTK | |
34571 | { | |
34572 | public: | |
34573 | ||
34574 | wxTopLevelWindow() { Init(); } | |
34575 | wxTopLevelWindow(wxWindow *parent, | |
34576 | wxWindowID winid, | |
34577 | const wxString& title, | |
34578 | const wxPoint& pos = wxDefaultPosition, | |
34579 | const wxSize& size = wxDefaultSize, | |
34580 | long style = (0x0800 | 0x0040 | 0x0400 | 0x0200 | 0x1000 | 0x20000000 | 0x00400000), | |
34581 | const wxString& name = wxFrameNameStr) | |
34582 | { | |
34583 | Init(); | |
34584 | Create(parent, winid, title, pos, size, style, name); | |
34585 | } | |
34586 | ||
34587 | private: wxTopLevelWindow(const wxTopLevelWindow&); wxTopLevelWindow& operator=(const wxTopLevelWindow&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
34588 | }; | |
34589 | # 24 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/frame.h" 2 | |
34590 | ||
34591 | ||
34592 | extern const wxChar* wxFrameNameStr; | |
34593 | extern const wxChar* wxStatusLineNameStr; | |
34594 | extern const wxChar* wxToolBarNameStr; | |
34595 | ||
34596 | class wxFrame; | |
34597 | class wxMenuBar; | |
34598 | class wxStatusBar; | |
34599 | class wxToolBar; | |
34600 | # 57 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/frame.h" | |
34601 | class wxFrameBase : public wxTopLevelWindow | |
34602 | { | |
34603 | public: | |
34604 | ||
34605 | wxFrameBase(); | |
34606 | virtual ~wxFrameBase(); | |
34607 | ||
34608 | wxFrame *New(wxWindow *parent, | |
34609 | wxWindowID winid, | |
34610 | const wxString& title, | |
34611 | const wxPoint& pos = wxDefaultPosition, | |
34612 | const wxSize& size = wxDefaultSize, | |
34613 | long style = (0x0800 | 0x0040 | 0x0400 | 0x0200 | 0x1000 | 0x20000000 | 0x00400000), | |
34614 | const wxString& name = wxFrameNameStr); | |
34615 | ||
34616 | ||
34617 | ||
34618 | ||
34619 | ||
34620 | ||
34621 | virtual wxPoint GetClientAreaOrigin() const; | |
34622 | ||
34623 | ||
34624 | ||
34625 | virtual void SendSizeEvent(); | |
34626 | ||
34627 | ||
34628 | ||
34629 | ||
34630 | ||
34631 | virtual void SetMenuBar(wxMenuBar *menubar); | |
34632 | virtual wxMenuBar *GetMenuBar() const { return m_frameMenuBar; } | |
34633 | ||
34634 | ||
34635 | ||
34636 | bool ProcessCommand(int winid); | |
34637 | ||
34638 | ||
34639 | ||
34640 | ||
34641 | ||
34642 | virtual wxStatusBar* CreateStatusBar(int number = 1, | |
34643 | long style = 0x0010|0x00010000, | |
34644 | wxWindowID winid = 0, | |
34645 | const wxString& name = | |
34646 | wxStatusLineNameStr); | |
34647 | ||
34648 | virtual wxStatusBar *OnCreateStatusBar(int number, | |
34649 | long style, | |
34650 | wxWindowID winid, | |
34651 | const wxString& name); | |
34652 | ||
34653 | virtual wxStatusBar *GetStatusBar() const { return m_frameStatusBar; } | |
34654 | ||
34655 | ||
34656 | virtual void SetStatusBar(wxStatusBar *statBar); | |
34657 | ||
34658 | ||
34659 | virtual void SetStatusText(const wxString &text, int number = 0); | |
34660 | virtual void SetStatusWidths(int n, const int widths_field[]); | |
34661 | void PushStatusText(const wxString &text, int number = 0); | |
34662 | void PopStatusText(int number = 0); | |
34663 | ||
34664 | ||
34665 | void SetStatusBarPane(int n) { m_statusBarPane = n; } | |
34666 | int GetStatusBarPane() const { return m_statusBarPane; } | |
34667 | ||
34668 | ||
34669 | ||
34670 | ||
34671 | ||
34672 | ||
34673 | ||
34674 | virtual wxToolBar* CreateToolBar(long style = -1, | |
34675 | wxWindowID winid = wxID_ANY, | |
34676 | const wxString& name = wxToolBarNameStr); | |
34677 | ||
34678 | virtual wxToolBar *OnCreateToolBar(long style, | |
34679 | wxWindowID winid, | |
34680 | const wxString& name ); | |
34681 | ||
34682 | ||
34683 | virtual wxToolBar *GetToolBar() const { return m_frameToolBar; } | |
34684 | virtual void SetToolBar(wxToolBar *toolbar); | |
34685 | # 149 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/frame.h" | |
34686 | void OnMenuOpen(wxMenuEvent& event); | |
34687 | void OnMenuClose(wxMenuEvent& event); | |
34688 | void OnMenuHighlight(wxMenuEvent& event); | |
34689 | ||
34690 | ||
34691 | ||
34692 | ||
34693 | virtual void DoMenuUpdates(wxMenu* menu = __null); | |
34694 | ||
34695 | ||
34696 | ||
34697 | virtual void UpdateWindowUI(long flags = wxUPDATE_UI_NONE); | |
34698 | ||
34699 | ||
34700 | virtual void OnInternalIdle(); | |
34701 | # 178 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/frame.h" | |
34702 | virtual void DoGiveHelp(const wxString& text, bool show); | |
34703 | ||
34704 | ||
34705 | ||
34706 | ||
34707 | ||
34708 | ||
34709 | protected: | |
34710 | ||
34711 | ||
34712 | ||
34713 | ||
34714 | ||
34715 | void DeleteAllBars(); | |
34716 | ||
34717 | ||
34718 | virtual bool IsOneOfBars(const wxWindow *win) const; | |
34719 | ||
34720 | ||
34721 | ||
34722 | virtual void PositionMenuBar() { } | |
34723 | ||
34724 | ||
34725 | ||
34726 | virtual void DetachMenuBar(); | |
34727 | ||
34728 | ||
34729 | ||
34730 | virtual void AttachMenuBar(wxMenuBar *menubar); | |
34731 | ||
34732 | wxMenuBar *m_frameMenuBar; | |
34733 | ||
34734 | ||
34735 | ||
34736 | wxString m_oldStatusText; | |
34737 | ||
34738 | ||
34739 | ||
34740 | ||
34741 | ||
34742 | ||
34743 | virtual void PositionStatusBar() { } | |
34744 | ||
34745 | ||
34746 | ||
34747 | bool ShowMenuHelp(wxStatusBar *statbar, int helpid); | |
34748 | ||
34749 | wxStatusBar *m_frameStatusBar; | |
34750 | ||
34751 | ||
34752 | ||
34753 | int m_statusBarPane; | |
34754 | ||
34755 | ||
34756 | ||
34757 | ||
34758 | virtual void PositionToolBar() { } | |
34759 | ||
34760 | wxToolBar *m_frameToolBar; | |
34761 | ||
34762 | ||
34763 | ||
34764 | private: static const wxEventTableEntry sm_eventTableEntries[]; protected: static const wxEventTable sm_eventTable; virtual const wxEventTable* GetEventTable() const; static wxEventHashTable sm_eventHashTable; virtual wxEventHashTable& GetEventHashTable() const; | |
34765 | ||
34766 | ||
34767 | private: wxFrameBase(const wxFrameBase&); wxFrameBase& operator=(const wxFrameBase&); | |
34768 | }; | |
34769 | # 255 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/frame.h" | |
34770 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/frame.h" 1 | |
34771 | # 22 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/frame.h" | |
34772 | class wxMDIChildFrame; | |
34773 | class wxMDIClientWindow; | |
34774 | class wxMenu; | |
34775 | class wxMenuBar; | |
34776 | class wxToolBar; | |
34777 | class wxStatusBar; | |
34778 | ||
34779 | ||
34780 | ||
34781 | ||
34782 | ||
34783 | class wxFrame : public wxFrameBase | |
34784 | { | |
34785 | public: | |
34786 | ||
34787 | wxFrame() { Init(); } | |
34788 | wxFrame(wxWindow *parent, | |
34789 | wxWindowID id, | |
34790 | const wxString& title, | |
34791 | const wxPoint& pos = wxDefaultPosition, | |
34792 | const wxSize& size = wxDefaultSize, | |
34793 | long style = (0x0800 | 0x0040 | 0x0400 | 0x0200 | 0x1000 | 0x20000000 | 0x00400000), | |
34794 | const wxString& name = wxFrameNameStr) | |
34795 | { | |
34796 | Init(); | |
34797 | ||
34798 | Create(parent, id, title, pos, size, style, name); | |
34799 | } | |
34800 | ||
34801 | bool Create(wxWindow *parent, | |
34802 | wxWindowID id, | |
34803 | const wxString& title, | |
34804 | const wxPoint& pos = wxDefaultPosition, | |
34805 | const wxSize& size = wxDefaultSize, | |
34806 | long style = (0x0800 | 0x0040 | 0x0400 | 0x0200 | 0x1000 | 0x20000000 | 0x00400000), | |
34807 | const wxString& name = wxFrameNameStr); | |
34808 | ||
34809 | virtual ~wxFrame(); | |
34810 | ||
34811 | ||
34812 | virtual void PositionStatusBar(); | |
34813 | ||
34814 | virtual wxStatusBar* CreateStatusBar(int number = 1, | |
34815 | long style = 0x0010|0x00010000, | |
34816 | wxWindowID id = 0, | |
34817 | const wxString& name = wxStatusLineNameStr); | |
34818 | ||
34819 | void SetStatusBar(wxStatusBar *statbar); | |
34820 | ||
34821 | ||
34822 | ||
34823 | virtual wxToolBar* CreateToolBar(long style = -1, | |
34824 | wxWindowID id = -1, | |
34825 | const wxString& name = wxToolBarNameStr); | |
34826 | void SetToolBar(wxToolBar *toolbar); | |
34827 | ||
34828 | ||
34829 | wxPoint GetClientAreaOrigin() const { return wxPoint(0, 0); } | |
34830 | ||
34831 | ||
34832 | ||
34833 | ||
34834 | ||
34835 | virtual void GtkOnSize( int x, int y, int width, int height ); | |
34836 | virtual void OnInternalIdle(); | |
34837 | ||
34838 | bool m_menuBarDetached; | |
34839 | int m_menuBarHeight; | |
34840 | bool m_toolBarDetached; | |
34841 | ||
34842 | protected: | |
34843 | ||
34844 | void Init(); | |
34845 | ||
34846 | ||
34847 | virtual void DoSetClientSize(int width, int height); | |
34848 | virtual void DoGetClientSize( int *width, int *height ) const; | |
34849 | ||
34850 | ||
34851 | ||
34852 | virtual void DetachMenuBar(); | |
34853 | virtual void AttachMenuBar(wxMenuBar *menubar); | |
34854 | ||
34855 | public: | |
34856 | ||
34857 | void UpdateMenuBarSize(); | |
34858 | ||
34859 | ||
34860 | ||
34861 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
34862 | }; | |
34863 | # 256 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/frame.h" 2 | |
34864 | # 18 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/app.h" 2 | |
34865 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/icon.h" 1 | |
34866 | # 15 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/icon.h" | |
34867 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/iconloc.h" 1 | |
34868 | # 21 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/iconloc.h" | |
34869 | class wxIconLocationBase | |
34870 | { | |
34871 | public: | |
34872 | ||
34873 | explicit wxIconLocationBase(const wxString& filename = wxEmptyString) | |
34874 | : m_filename(filename) { } | |
34875 | ||
34876 | ||
34877 | ||
34878 | ||
34879 | ||
34880 | bool IsOk() const { return !m_filename.empty(); } | |
34881 | ||
34882 | ||
34883 | void SetFileName(const wxString& filename) { m_filename = filename; } | |
34884 | const wxString& GetFileName() const { return m_filename; } | |
34885 | ||
34886 | private: | |
34887 | wxString m_filename; | |
34888 | }; | |
34889 | # 71 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/iconloc.h" | |
34890 | class wxIconLocation : public wxIconLocationBase | |
34891 | { | |
34892 | public: | |
34893 | explicit wxIconLocation(const wxString& filename = wxEmptyString) | |
34894 | : wxIconLocationBase(filename) { } | |
34895 | }; | |
34896 | # 16 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/icon.h" 2 | |
34897 | # 24 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/icon.h" | |
34898 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/icon.h" 1 | |
34899 | # 20 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/icon.h" | |
34900 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/bitmap.h" 1 | |
34901 | # 29 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/bitmap.h" | |
34902 | class wxBitmap; | |
34903 | class wxBitmapHandler; | |
34904 | class wxImage; | |
34905 | class wxMask; | |
34906 | class wxPalette; | |
34907 | # 49 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/bitmap.h" | |
34908 | class wxBitmapHandlerBase : public wxObject | |
34909 | { | |
34910 | public: | |
34911 | wxBitmapHandlerBase() | |
34912 | : m_name() | |
34913 | , m_extension() | |
34914 | , m_type(wxBITMAP_TYPE_INVALID) | |
34915 | { } | |
34916 | ||
34917 | virtual ~wxBitmapHandlerBase() { } | |
34918 | ||
34919 | virtual bool Create(wxBitmap *bitmap, void *data, long flags, | |
34920 | int width, int height, int depth = 1) = 0; | |
34921 | virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, | |
34922 | int desiredWidth, int desiredHeight) = 0; | |
34923 | virtual bool SaveFile(const wxBitmap *bitmap, const wxString& name, | |
34924 | int type, const wxPalette *palette = __null) = 0; | |
34925 | ||
34926 | void SetName(const wxString& name) { m_name = name; } | |
34927 | void SetExtension(const wxString& ext) { m_extension = ext; } | |
34928 | void SetType(wxBitmapType type) { m_type = type; } | |
34929 | wxString GetName() const { return m_name; } | |
34930 | wxString GetExtension() const { return m_extension; } | |
34931 | wxBitmapType GetType() const { return m_type; } | |
34932 | ||
34933 | private: | |
34934 | wxString m_name; | |
34935 | wxString m_extension; | |
34936 | wxBitmapType m_type; | |
34937 | ||
34938 | private: | |
34939 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; | |
34940 | }; | |
34941 | ||
34942 | class wxBitmapBase : public wxGDIObject | |
34943 | { | |
34944 | public: | |
34945 | wxBitmapBase() : wxGDIObject() {} | |
34946 | virtual ~wxBitmapBase() {} | |
34947 | # 109 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/bitmap.h" | |
34948 | virtual bool Ok() const = 0; | |
34949 | ||
34950 | virtual int GetHeight() const = 0; | |
34951 | virtual int GetWidth() const = 0; | |
34952 | virtual int GetDepth() const = 0; | |
34953 | ||
34954 | virtual wxImage ConvertToImage() const = 0; | |
34955 | ||
34956 | virtual wxMask *GetMask() const = 0; | |
34957 | virtual void SetMask(wxMask *mask) = 0; | |
34958 | ||
34959 | virtual wxBitmap GetSubBitmap(const wxRect& rect) const = 0; | |
34960 | ||
34961 | virtual bool SaveFile(const wxString &name, wxBitmapType type, | |
34962 | const wxPalette *palette = (wxPalette *)__null) const = 0; | |
34963 | virtual bool LoadFile(const wxString &name, wxBitmapType type) = 0; | |
34964 | # 135 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/bitmap.h" | |
34965 | virtual wxPalette *GetPalette() const = 0; | |
34966 | virtual void SetPalette(const wxPalette& palette) = 0; | |
34967 | ||
34968 | ||
34969 | ||
34970 | virtual bool CopyFromIcon(const wxIcon& icon) = 0; | |
34971 | ||
34972 | ||
34973 | virtual void SetHeight(int height) = 0; | |
34974 | virtual void SetWidth(int width) = 0; | |
34975 | virtual void SetDepth(int depth) = 0; | |
34976 | ||
34977 | ||
34978 | static inline wxList& GetHandlers() { return sm_handlers; } | |
34979 | static void AddHandler(wxBitmapHandlerBase *handler); | |
34980 | static void InsertHandler(wxBitmapHandlerBase *handler); | |
34981 | static bool RemoveHandler(const wxString& name); | |
34982 | static wxBitmapHandler *FindHandler(const wxString& name); | |
34983 | static wxBitmapHandler *FindHandler(const wxString& extension, wxBitmapType bitmapType); | |
34984 | static wxBitmapHandler *FindHandler(wxBitmapType bitmapType); | |
34985 | ||
34986 | ||
34987 | ||
34988 | ||
34989 | static void CleanUpHandlers(); | |
34990 | ||
34991 | protected: | |
34992 | static wxList sm_handlers; | |
34993 | ||
34994 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; | |
34995 | }; | |
34996 | # 175 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/bitmap.h" | |
34997 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/bitmap.h" 1 | |
34998 | # 25 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/bitmap.h" | |
34999 | typedef struct _GdkPixbuf GdkPixbuf; | |
35000 | ||
35001 | ||
35002 | class wxPixelDataBase; | |
35003 | ||
35004 | ||
35005 | ||
35006 | ||
35007 | ||
35008 | class wxMask; | |
35009 | class wxBitmap; | |
35010 | class wxImage; | |
35011 | ||
35012 | ||
35013 | ||
35014 | ||
35015 | ||
35016 | class wxMask: public wxObject | |
35017 | { | |
35018 | public: | |
35019 | wxMask(); | |
35020 | wxMask( const wxBitmap& bitmap, const wxColour& colour ); | |
35021 | ||
35022 | wxMask( const wxBitmap& bitmap, int paletteIndex ); | |
35023 | ||
35024 | wxMask( const wxBitmap& bitmap ); | |
35025 | ~wxMask(); | |
35026 | ||
35027 | bool Create( const wxBitmap& bitmap, const wxColour& colour ); | |
35028 | ||
35029 | bool Create( const wxBitmap& bitmap, int paletteIndex ); | |
35030 | ||
35031 | bool Create( const wxBitmap& bitmap ); | |
35032 | ||
35033 | ||
35034 | GdkBitmap *m_bitmap; | |
35035 | ||
35036 | GdkBitmap *GetBitmap() const; | |
35037 | ||
35038 | private: | |
35039 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
35040 | }; | |
35041 | ||
35042 | ||
35043 | ||
35044 | ||
35045 | ||
35046 | class wxBitmap: public wxBitmapBase | |
35047 | { | |
35048 | public: | |
35049 | wxBitmap(); | |
35050 | wxBitmap( int width, int height, int depth = -1 ); | |
35051 | wxBitmap( const char bits[], int width, int height, int depth = 1 ); | |
35052 | wxBitmap( const char **bits ) { (void)CreateFromXpm(bits); } | |
35053 | wxBitmap( char **bits ) { (void)CreateFromXpm((const char **)bits); } | |
35054 | wxBitmap( const wxBitmap& bmp ); | |
35055 | wxBitmap( const wxString &filename, wxBitmapType type = wxBITMAP_TYPE_XPM ); | |
35056 | wxBitmap( const wxImage& image, int depth = -1 ) { (void)CreateFromImage(image, depth); } | |
35057 | ~wxBitmap(); | |
35058 | wxBitmap& operator = ( const wxBitmap& bmp ); | |
35059 | bool operator == ( const wxBitmap& bmp ) const; | |
35060 | bool operator != ( const wxBitmap& bmp ) const; | |
35061 | bool Ok() const; | |
35062 | ||
35063 | bool Create(int width, int height, int depth = -1); | |
35064 | ||
35065 | int GetHeight() const; | |
35066 | int GetWidth() const; | |
35067 | int GetDepth() const; | |
35068 | ||
35069 | wxImage ConvertToImage() const; | |
35070 | ||
35071 | ||
35072 | virtual bool CopyFromIcon(const wxIcon& icon); | |
35073 | ||
35074 | wxMask *GetMask() const; | |
35075 | void SetMask( wxMask *mask ); | |
35076 | ||
35077 | wxBitmap GetSubBitmap( const wxRect& rect ) const; | |
35078 | ||
35079 | bool SaveFile(const wxString &name, wxBitmapType type, | |
35080 | const wxPalette *palette = (wxPalette *)__null) const; | |
35081 | bool LoadFile(const wxString &name, wxBitmapType type = wxBITMAP_TYPE_XPM ); | |
35082 | ||
35083 | ||
35084 | wxPalette *GetPalette() const; | |
35085 | void SetPalette(const wxPalette& palette); | |
35086 | wxPalette *GetColourMap() const { return GetPalette(); }; | |
35087 | ||
35088 | ||
35089 | static void InitStandardHandlers(); | |
35090 | ||
35091 | ||
35092 | ||
35093 | ||
35094 | void SetHeight( int height ); | |
35095 | void SetWidth( int width ); | |
35096 | void SetDepth( int depth ); | |
35097 | void SetPixmap( GdkPixmap *pixmap ); | |
35098 | void SetBitmap( GdkBitmap *bitmap ); | |
35099 | ||
35100 | void SetPixbuf(GdkPixbuf *pixbuf); | |
35101 | ||
35102 | ||
35103 | GdkPixmap *GetPixmap() const; | |
35104 | GdkBitmap *GetBitmap() const; | |
35105 | bool HasPixmap() const; | |
35106 | ||
35107 | bool HasPixbuf() const; | |
35108 | GdkPixbuf *GetPixbuf() const; | |
35109 | ||
35110 | ||
35111 | ||
35112 | wxBitmap Rescale( int clipx, int clipy, int clipwidth, int clipheight, int width, int height ); | |
35113 | ||
35114 | ||
35115 | void *GetRawData(wxPixelDataBase& data, int bpp); | |
35116 | void UngetRawData(wxPixelDataBase& data); | |
35117 | ||
35118 | bool HasAlpha() const; | |
35119 | void UseAlpha(); | |
35120 | ||
35121 | protected: | |
35122 | bool CreateFromXpm(const char **bits); | |
35123 | bool CreateFromImage(const wxImage& image, int depth); | |
35124 | ||
35125 | private: | |
35126 | ||
35127 | bool CreateFromImageAsBitmap(const wxImage& image); | |
35128 | bool CreateFromImageAsPixmap(const wxImage& image); | |
35129 | ||
35130 | ||
35131 | bool CreateFromImageAsPixbuf(const wxImage& image); | |
35132 | ||
35133 | enum Representation | |
35134 | { | |
35135 | Pixmap, | |
35136 | Pixbuf | |
35137 | }; | |
35138 | ||
35139 | ||
35140 | void PurgeOtherRepresentations(Representation keep); | |
35141 | ||
35142 | friend class wxMemoryDC; | |
35143 | ||
35144 | friend class wxBitmapHandler; | |
35145 | ||
35146 | private: | |
35147 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
35148 | }; | |
35149 | ||
35150 | ||
35151 | ||
35152 | ||
35153 | ||
35154 | class wxBitmapHandler: public wxBitmapHandlerBase | |
35155 | { | |
35156 | public: | |
35157 | wxBitmapHandler() { } | |
35158 | virtual ~wxBitmapHandler(); | |
35159 | ||
35160 | virtual bool Create(wxBitmap *bitmap, void *data, long flags, int width, int height, int depth = 1); | |
35161 | virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags, | |
35162 | int desiredWidth, int desiredHeight); | |
35163 | virtual bool SaveFile(const wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette = __null); | |
35164 | ||
35165 | private: | |
35166 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
35167 | }; | |
35168 | # 176 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/bitmap.h" 2 | |
35169 | # 21 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/icon.h" 2 | |
35170 | ||
35171 | ||
35172 | ||
35173 | ||
35174 | ||
35175 | class wxIcon; | |
35176 | ||
35177 | ||
35178 | ||
35179 | ||
35180 | ||
35181 | class wxIcon: public wxBitmap | |
35182 | { | |
35183 | public: | |
35184 | wxIcon(); | |
35185 | wxIcon( const wxIcon& icon); | |
35186 | wxIcon( const char **bits, int width=-1, int height=-1 ); | |
35187 | ||
35188 | ||
35189 | ||
35190 | wxIcon( const wxString& filename, wxBitmapType type = wxBITMAP_TYPE_XPM, | |
35191 | int =-1, int =-1 ) : | |
35192 | wxBitmap(filename, type) | |
35193 | { | |
35194 | } | |
35195 | wxIcon( char **bits, int width=-1, int height=-1 ); | |
35196 | ||
35197 | wxIcon(const wxIconLocation& loc) | |
35198 | : wxBitmap(loc.GetFileName(), wxBITMAP_TYPE_ANY) | |
35199 | { | |
35200 | } | |
35201 | ||
35202 | wxIcon& operator=(const wxIcon& icon); | |
35203 | bool operator==(const wxIcon& icon) const { return m_refData == icon.m_refData; } | |
35204 | bool operator!=(const wxIcon& icon) const { return !(*this == icon); } | |
35205 | ||
35206 | ||
35207 | ||
35208 | ||
35209 | void CopyFromBitmap(const wxBitmap& bmp); | |
35210 | ||
35211 | private: | |
35212 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
35213 | }; | |
35214 | # 25 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/icon.h" 2 | |
35215 | # 19 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/app.h" 2 | |
35216 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/strconv.h" 1 | |
35217 | # 20 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/app.h" 2 | |
35218 | ||
35219 | ||
35220 | ||
35221 | ||
35222 | ||
35223 | class wxApp; | |
35224 | class wxLog; | |
35225 | ||
35226 | ||
35227 | ||
35228 | ||
35229 | ||
35230 | class wxApp: public wxAppBase | |
35231 | { | |
35232 | public: | |
35233 | wxApp(); | |
35234 | virtual ~wxApp(); | |
35235 | ||
35236 | ||
35237 | ||
35238 | ||
35239 | ||
35240 | virtual bool OnInitGui(); | |
35241 | ||
35242 | ||
35243 | virtual bool Yield(bool onlyIfNeeded = 0); | |
35244 | virtual void WakeUpIdle(); | |
35245 | ||
35246 | virtual bool Initialize(int& argc, wxChar **argv); | |
35247 | virtual void CleanUp(); | |
35248 | ||
35249 | static bool InitialzeVisual(); | |
35250 | ||
35251 | ||
35252 | ||
35253 | ||
35254 | ||
35255 | ||
35256 | ||
35257 | gint m_idleTag; | |
35258 | void RemoveIdleTag(); | |
35259 | ||
35260 | unsigned char *m_colorCube; | |
35261 | ||
35262 | ||
35263 | ||
35264 | void *m_glVisualInfo; | |
35265 | void *m_glFBCInfo; | |
35266 | ||
35267 | ||
35268 | GdkVisual *GetGdkVisual(); | |
35269 | ||
35270 | private: | |
35271 | ||
35272 | ||
35273 | ||
35274 | ||
35275 | ||
35276 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
35277 | private: static const wxEventTableEntry sm_eventTableEntries[]; protected: static const wxEventTable sm_eventTable; virtual const wxEventTable* GetEventTable() const; static wxEventHashTable sm_eventHashTable; virtual wxEventHashTable& GetEventHashTable() const; | |
35278 | }; | |
35279 | # 571 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/app.h" 2 | |
35280 | # 608 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/app.h" | |
35281 | extern void wxExit(); | |
35282 | ||
35283 | ||
35284 | extern bool wxYield(); | |
35285 | ||
35286 | ||
35287 | extern void wxWakeUpIdle(); | |
35288 | # 624 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/app.h" | |
35289 | class wxAppInitializer | |
35290 | { | |
35291 | public: | |
35292 | wxAppInitializer(wxAppInitializerFunction fn) | |
35293 | { wxApp::SetInitializerFunction(fn); } | |
35294 | }; | |
35295 | # 25 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
35296 | ||
35297 | ||
35298 | ||
35299 | ||
35300 | ||
35301 | ||
35302 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/panel.h" 1 | |
35303 | # 15 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/panel.h" | |
35304 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/panelg.h" 1 | |
35305 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/panelg.h" | |
35306 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/window.h" 1 | |
35307 | # 24 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/panelg.h" 2 | |
35308 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/containr.h" 1 | |
35309 | # 20 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/containr.h" | |
35310 | class wxFocusEvent; | |
35311 | class wxNavigationKeyEvent; | |
35312 | class wxWindow; | |
35313 | class wxWindowBase; | |
35314 | # 38 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/containr.h" | |
35315 | class wxControlContainer | |
35316 | { | |
35317 | public: | |
35318 | ||
35319 | wxControlContainer(wxWindow *winParent = __null); | |
35320 | void SetContainerWindow(wxWindow *winParent) { m_winParent = winParent; } | |
35321 | # 52 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/containr.h" | |
35322 | wxWindow *GetDefaultItem() const | |
35323 | { return m_winTmpDefault ? m_winTmpDefault : m_winDefault; } | |
35324 | ||
35325 | ||
35326 | wxWindow *SetDefaultItem(wxWindow *win) | |
35327 | { wxWindow *winOld = m_winDefault; m_winDefault = win; return winOld; } | |
35328 | ||
35329 | ||
35330 | ||
35331 | void SetTmpDefaultItem(wxWindow *win) { m_winTmpDefault = win; } | |
35332 | ||
35333 | ||
35334 | void HandleOnNavigationKey(wxNavigationKeyEvent& event); | |
35335 | void HandleOnFocus(wxFocusEvent& event); | |
35336 | void HandleOnWindowDestroy(wxWindowBase *child); | |
35337 | ||
35338 | ||
35339 | ||
35340 | bool DoSetFocus(); | |
35341 | ||
35342 | ||
35343 | bool AcceptsFocus() const; | |
35344 | ||
35345 | ||
35346 | ||
35347 | void SetLastFocus(wxWindow *win); | |
35348 | ||
35349 | protected: | |
35350 | ||
35351 | bool SetFocusToChild(); | |
35352 | ||
35353 | ||
35354 | wxWindow *m_winParent; | |
35355 | ||
35356 | ||
35357 | wxWindow *m_winLastFocused; | |
35358 | ||
35359 | ||
35360 | wxWindow *m_winDefault; | |
35361 | ||
35362 | ||
35363 | wxWindow *m_winTmpDefault; | |
35364 | ||
35365 | ||
35366 | bool m_inSetFocus; | |
35367 | ||
35368 | private: wxControlContainer(const wxControlContainer&); wxControlContainer& operator=(const wxControlContainer&); | |
35369 | }; | |
35370 | ||
35371 | ||
35372 | extern bool wxSetFocusToChild(wxWindow *win, wxWindow **child); | |
35373 | # 25 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/panelg.h" 2 | |
35374 | ||
35375 | class wxControlContainer; | |
35376 | ||
35377 | extern const wxChar* wxPanelNameStr; | |
35378 | ||
35379 | ||
35380 | ||
35381 | ||
35382 | ||
35383 | class wxPanel : public wxWindow | |
35384 | { | |
35385 | public: | |
35386 | wxPanel() { Init(); } | |
35387 | ||
35388 | ||
35389 | ||
35390 | wxPanel(wxWindow *parent, | |
35391 | int x, int y, int width, int height, | |
35392 | long style = 0x00080000 | wxBORDER_NONE, | |
35393 | const wxString& name = wxPanelNameStr) | |
35394 | { | |
35395 | Init(); | |
35396 | ||
35397 | Create(parent, wxID_ANY, wxPoint(x, y), wxSize(width, height), style, name); | |
35398 | } | |
35399 | ||
35400 | ||
35401 | wxPanel(wxWindow *parent, | |
35402 | wxWindowID winid = wxID_ANY, | |
35403 | const wxPoint& pos = wxDefaultPosition, | |
35404 | const wxSize& size = wxDefaultSize, | |
35405 | long style = 0x00080000 | wxBORDER_NONE, | |
35406 | const wxString& name = wxPanelNameStr) | |
35407 | { | |
35408 | Init(); | |
35409 | ||
35410 | Create(parent, winid, pos, size, style, name); | |
35411 | } | |
35412 | ||
35413 | ||
35414 | bool Create(wxWindow *parent, wxWindowID winid, | |
35415 | const wxPoint& pos = wxDefaultPosition, | |
35416 | const wxSize& size = wxDefaultSize, | |
35417 | long style = 0x00080000 | wxBORDER_NONE, | |
35418 | const wxString& name = wxPanelNameStr); | |
35419 | ||
35420 | virtual ~wxPanel(); | |
35421 | ||
35422 | ||
35423 | ||
35424 | ||
35425 | ||
35426 | void OnSize(wxSizeEvent& event); | |
35427 | ||
35428 | virtual void InitDialog(); | |
35429 | ||
35430 | ||
35431 | ||
35432 | ||
35433 | ||
35434 | ||
35435 | public: void OnNavigationKey(wxNavigationKeyEvent& event); void OnFocus(wxFocusEvent& event); virtual void OnChildFocus(wxChildFocusEvent& event); virtual void SetFocus(); virtual void SetFocusIgnoringChildren(); virtual void RemoveChild(wxWindowBase *child); virtual wxWindow *GetDefaultItem() const; virtual wxWindow *SetDefaultItem(wxWindow *child); virtual void SetTmpDefaultItem(wxWindow *win); virtual bool AcceptsFocus() const; protected: wxControlContainer m_container; | |
35436 | ||
35437 | protected: | |
35438 | ||
35439 | void Init(); | |
35440 | ||
35441 | private: | |
35442 | private: wxPanel(const wxPanel&); wxPanel& operator=(const wxPanel&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
35443 | private: static const wxEventTableEntry sm_eventTableEntries[]; protected: static const wxEventTable sm_eventTable; virtual const wxEventTable* GetEventTable() const; static wxEventHashTable sm_eventHashTable; virtual wxEventHashTable& GetEventHashTable() const; | |
35444 | }; | |
35445 | # 16 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/panel.h" 2 | |
35446 | # 32 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
35447 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/frame.h" 1 | |
35448 | # 33 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
35449 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dc.h" 1 | |
35450 | # 28 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dc.h" | |
35451 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/bitmap.h" 1 | |
35452 | # 29 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dc.h" 2 | |
35453 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/brush.h" 1 | |
35454 | # 20 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/brush.h" | |
35455 | class wxBrushBase: public wxGDIObject | |
35456 | { | |
35457 | public: | |
35458 | virtual ~wxBrushBase() { } | |
35459 | ||
35460 | virtual int GetStyle() const = 0; | |
35461 | ||
35462 | virtual bool IsHatch() const | |
35463 | { return (GetStyle()>=wxFIRST_HATCH) && (GetStyle()<=wxLAST_HATCH); } | |
35464 | }; | |
35465 | # 38 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/brush.h" | |
35466 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/brush.h" 1 | |
35467 | # 28 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/brush.h" | |
35468 | class wxBrush; | |
35469 | ||
35470 | ||
35471 | ||
35472 | ||
35473 | ||
35474 | class wxBrush: public wxBrushBase | |
35475 | { | |
35476 | public: | |
35477 | wxBrush() { } | |
35478 | ||
35479 | wxBrush( const wxColour &colour, int style = wxSOLID ); | |
35480 | wxBrush( const wxBitmap &stippleBitmap ); | |
35481 | ~wxBrush(); | |
35482 | ||
35483 | wxBrush( const wxBrush &brush ) | |
35484 | : wxBrushBase() | |
35485 | { Ref(brush); } | |
35486 | wxBrush& operator = ( const wxBrush& brush ) { Ref(brush); return *this; } | |
35487 | ||
35488 | bool Ok() const { return m_refData != __null; } | |
35489 | ||
35490 | bool operator == ( const wxBrush& brush ) const; | |
35491 | bool operator != (const wxBrush& brush) const { return !(*this == brush); } | |
35492 | ||
35493 | virtual int GetStyle() const; | |
35494 | wxColour &GetColour() const; | |
35495 | wxBitmap *GetStipple() const; | |
35496 | ||
35497 | void SetColour( const wxColour& col ); | |
35498 | void SetColour( unsigned char r, unsigned char g, unsigned char b ); | |
35499 | void SetStyle( int style ); | |
35500 | void SetStipple( const wxBitmap& stipple ); | |
35501 | ||
35502 | private: | |
35503 | ||
35504 | virtual wxObjectRefData *CreateRefData() const; | |
35505 | virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const; | |
35506 | ||
35507 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
35508 | }; | |
35509 | # 39 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/brush.h" 2 | |
35510 | # 30 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dc.h" 2 | |
35511 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/pen.h" 1 | |
35512 | # 22 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/pen.h" | |
35513 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/pen.h" 1 | |
35514 | # 28 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/pen.h" | |
35515 | class wxPen; | |
35516 | ||
35517 | ||
35518 | typedef gint8 wxGTKDash; | |
35519 | # 40 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/pen.h" | |
35520 | class wxPen: public wxGDIObject | |
35521 | { | |
35522 | public: | |
35523 | wxPen() { } | |
35524 | ||
35525 | wxPen( const wxColour &colour, int width = 1, int style = wxSOLID ); | |
35526 | ~wxPen(); | |
35527 | ||
35528 | wxPen( const wxPen& pen ) | |
35529 | : wxGDIObject() | |
35530 | { Ref(pen); } | |
35531 | wxPen& operator = ( const wxPen& pen ) { Ref(pen); return *this; } | |
35532 | ||
35533 | bool Ok() const { return m_refData != __null; } | |
35534 | ||
35535 | bool operator == ( const wxPen& pen ) const; | |
35536 | bool operator != (const wxPen& pen) const { return !(*this == pen); } | |
35537 | ||
35538 | void SetColour( const wxColour &colour ); | |
35539 | void SetColour( int red, int green, int blue ); | |
35540 | void SetCap( int capStyle ); | |
35541 | void SetJoin( int joinStyle ); | |
35542 | void SetStyle( int style ); | |
35543 | void SetWidth( int width ); | |
35544 | void SetDashes( int number_of_dashes, const wxDash *dash ); | |
35545 | ||
35546 | wxColour &GetColour() const; | |
35547 | int GetCap() const; | |
35548 | int GetJoin() const; | |
35549 | int GetStyle() const; | |
35550 | int GetWidth() const; | |
35551 | int GetDashes(wxDash **ptr) const; | |
35552 | int GetDashCount() const; | |
35553 | wxDash* GetDash() const; | |
35554 | ||
35555 | private: | |
35556 | ||
35557 | virtual wxObjectRefData *CreateRefData() const; | |
35558 | virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const; | |
35559 | ||
35560 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
35561 | }; | |
35562 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/pen.h" 2 | |
35563 | # 31 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dc.h" 2 | |
35564 | ||
35565 | ||
35566 | ||
35567 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/math.h" 1 | |
35568 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/math.h" | |
35569 | # 1 "/usr/include/math.h" 1 3 4 | |
35570 | ||
35571 | ||
35572 | ||
35573 | ||
35574 | ||
35575 | ||
35576 | ||
35577 | # 1 "/usr/include/gentoo-multilib/amd64/math.h" 1 3 4 | |
35578 | # 28 "/usr/include/gentoo-multilib/amd64/math.h" 3 4 | |
35579 | # 1 "/usr/include/features.h" 1 3 4 | |
35580 | # 29 "/usr/include/gentoo-multilib/amd64/math.h" 2 3 4 | |
35581 | ||
35582 | extern "C" { | |
35583 | ||
35584 | ||
35585 | ||
35586 | # 1 "/usr/include/bits/huge_val.h" 1 3 4 | |
35587 | ||
35588 | ||
35589 | ||
35590 | ||
35591 | ||
35592 | ||
35593 | ||
35594 | # 1 "/usr/include/gentoo-multilib/amd64/bits/huge_val.h" 1 3 4 | |
35595 | # 9 "/usr/include/bits/huge_val.h" 2 3 4 | |
35596 | # 35 "/usr/include/gentoo-multilib/amd64/math.h" 2 3 4 | |
35597 | ||
35598 | # 1 "/usr/include/bits/huge_valf.h" 1 3 4 | |
35599 | ||
35600 | ||
35601 | ||
35602 | ||
35603 | ||
35604 | ||
35605 | ||
35606 | # 1 "/usr/include/gentoo-multilib/amd64/bits/huge_valf.h" 1 3 4 | |
35607 | # 9 "/usr/include/bits/huge_valf.h" 2 3 4 | |
35608 | # 37 "/usr/include/gentoo-multilib/amd64/math.h" 2 3 4 | |
35609 | # 1 "/usr/include/bits/huge_vall.h" 1 3 4 | |
35610 | ||
35611 | ||
35612 | ||
35613 | ||
35614 | ||
35615 | ||
35616 | ||
35617 | # 1 "/usr/include/gentoo-multilib/amd64/bits/huge_vall.h" 1 3 4 | |
35618 | # 9 "/usr/include/bits/huge_vall.h" 2 3 4 | |
35619 | # 38 "/usr/include/gentoo-multilib/amd64/math.h" 2 3 4 | |
35620 | ||
35621 | ||
35622 | # 1 "/usr/include/bits/inf.h" 1 3 4 | |
35623 | ||
35624 | ||
35625 | ||
35626 | ||
35627 | ||
35628 | ||
35629 | ||
35630 | # 1 "/usr/include/gentoo-multilib/amd64/bits/inf.h" 1 3 4 | |
35631 | # 9 "/usr/include/bits/inf.h" 2 3 4 | |
35632 | # 41 "/usr/include/gentoo-multilib/amd64/math.h" 2 3 4 | |
35633 | ||
35634 | ||
35635 | # 1 "/usr/include/bits/nan.h" 1 3 4 | |
35636 | ||
35637 | ||
35638 | ||
35639 | ||
35640 | ||
35641 | ||
35642 | ||
35643 | # 1 "/usr/include/gentoo-multilib/amd64/bits/nan.h" 1 3 4 | |
35644 | # 9 "/usr/include/bits/nan.h" 2 3 4 | |
35645 | # 44 "/usr/include/gentoo-multilib/amd64/math.h" 2 3 4 | |
35646 | ||
35647 | ||
35648 | ||
35649 | # 1 "/usr/include/bits/mathdef.h" 1 3 4 | |
35650 | ||
35651 | ||
35652 | ||
35653 | ||
35654 | ||
35655 | ||
35656 | ||
35657 | # 1 "/usr/include/gentoo-multilib/amd64/bits/mathdef.h" 1 3 4 | |
35658 | # 26 "/usr/include/gentoo-multilib/amd64/bits/mathdef.h" 3 4 | |
35659 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
35660 | ||
35661 | ||
35662 | ||
35663 | ||
35664 | ||
35665 | ||
35666 | ||
35667 | # 1 "/usr/include/gentoo-multilib/amd64/bits/wordsize.h" 1 3 4 | |
35668 | # 9 "/usr/include/bits/wordsize.h" 2 3 4 | |
35669 | # 27 "/usr/include/gentoo-multilib/amd64/bits/mathdef.h" 2 3 4 | |
35670 | ||
35671 | ||
35672 | ||
35673 | ||
35674 | typedef float float_t; | |
35675 | typedef double double_t; | |
35676 | # 9 "/usr/include/bits/mathdef.h" 2 3 4 | |
35677 | # 48 "/usr/include/gentoo-multilib/amd64/math.h" 2 3 4 | |
35678 | # 71 "/usr/include/gentoo-multilib/amd64/math.h" 3 4 | |
35679 | # 1 "/usr/include/bits/mathcalls.h" 1 3 4 | |
35680 | ||
35681 | ||
35682 | ||
35683 | ||
35684 | ||
35685 | ||
35686 | ||
35687 | # 1 "/usr/include/gentoo-multilib/amd64/bits/mathcalls.h" 1 3 4 | |
35688 | # 53 "/usr/include/gentoo-multilib/amd64/bits/mathcalls.h" 3 4 | |
35689 | ||
35690 | ||
35691 | extern double acos (double __x) throw (); extern double __acos (double __x) throw (); | |
35692 | ||
35693 | extern double asin (double __x) throw (); extern double __asin (double __x) throw (); | |
35694 | ||
35695 | extern double atan (double __x) throw (); extern double __atan (double __x) throw (); | |
35696 | ||
35697 | extern double atan2 (double __y, double __x) throw (); extern double __atan2 (double __y, double __x) throw (); | |
35698 | ||
35699 | ||
35700 | extern double cos (double __x) throw (); extern double __cos (double __x) throw (); | |
35701 | ||
35702 | extern double sin (double __x) throw (); extern double __sin (double __x) throw (); | |
35703 | ||
35704 | extern double tan (double __x) throw (); extern double __tan (double __x) throw (); | |
35705 | ||
35706 | ||
35707 | ||
35708 | ||
35709 | extern double cosh (double __x) throw (); extern double __cosh (double __x) throw (); | |
35710 | ||
35711 | extern double sinh (double __x) throw (); extern double __sinh (double __x) throw (); | |
35712 | ||
35713 | extern double tanh (double __x) throw (); extern double __tanh (double __x) throw (); | |
35714 | ||
35715 | ||
35716 | ||
35717 | ||
35718 | extern void sincos (double __x, double *__sinx, double *__cosx) throw (); extern void __sincos (double __x, double *__sinx, double *__cosx) throw (); | |
35719 | ||
35720 | ||
35721 | ||
35722 | ||
35723 | ||
35724 | ||
35725 | extern double acosh (double __x) throw (); extern double __acosh (double __x) throw (); | |
35726 | ||
35727 | extern double asinh (double __x) throw (); extern double __asinh (double __x) throw (); | |
35728 | ||
35729 | extern double atanh (double __x) throw (); extern double __atanh (double __x) throw (); | |
35730 | ||
35731 | ||
35732 | ||
35733 | ||
35734 | ||
35735 | ||
35736 | ||
35737 | extern double exp (double __x) throw (); extern double __exp (double __x) throw (); | |
35738 | ||
35739 | ||
35740 | extern double frexp (double __x, int *__exponent) throw (); extern double __frexp (double __x, int *__exponent) throw (); | |
35741 | ||
35742 | ||
35743 | extern double ldexp (double __x, int __exponent) throw (); extern double __ldexp (double __x, int __exponent) throw (); | |
35744 | ||
35745 | ||
35746 | extern double log (double __x) throw (); extern double __log (double __x) throw (); | |
35747 | ||
35748 | ||
35749 | extern double log10 (double __x) throw (); extern double __log10 (double __x) throw (); | |
35750 | ||
35751 | ||
35752 | extern double modf (double __x, double *__iptr) throw (); extern double __modf (double __x, double *__iptr) throw (); | |
35753 | ||
35754 | ||
35755 | ||
35756 | ||
35757 | extern double exp10 (double __x) throw (); extern double __exp10 (double __x) throw (); | |
35758 | ||
35759 | extern double pow10 (double __x) throw (); extern double __pow10 (double __x) throw (); | |
35760 | ||
35761 | ||
35762 | ||
35763 | ||
35764 | ||
35765 | extern double expm1 (double __x) throw (); extern double __expm1 (double __x) throw (); | |
35766 | ||
35767 | ||
35768 | extern double log1p (double __x) throw (); extern double __log1p (double __x) throw (); | |
35769 | ||
35770 | ||
35771 | extern double logb (double __x) throw (); extern double __logb (double __x) throw (); | |
35772 | ||
35773 | ||
35774 | ||
35775 | ||
35776 | ||
35777 | ||
35778 | extern double exp2 (double __x) throw (); extern double __exp2 (double __x) throw (); | |
35779 | ||
35780 | ||
35781 | extern double log2 (double __x) throw (); extern double __log2 (double __x) throw (); | |
35782 | ||
35783 | ||
35784 | ||
35785 | ||
35786 | ||
35787 | ||
35788 | ||
35789 | ||
35790 | extern double pow (double __x, double __y) throw (); extern double __pow (double __x, double __y) throw (); | |
35791 | ||
35792 | ||
35793 | extern double sqrt (double __x) throw (); extern double __sqrt (double __x) throw (); | |
35794 | ||
35795 | ||
35796 | ||
35797 | ||
35798 | ||
35799 | extern double hypot (double __x, double __y) throw (); extern double __hypot (double __x, double __y) throw (); | |
35800 | ||
35801 | ||
35802 | ||
35803 | ||
35804 | ||
35805 | ||
35806 | extern double cbrt (double __x) throw (); extern double __cbrt (double __x) throw (); | |
35807 | ||
35808 | ||
35809 | ||
35810 | ||
35811 | ||
35812 | ||
35813 | ||
35814 | ||
35815 | extern double ceil (double __x) throw () __attribute__ ((__const__)); extern double __ceil (double __x) throw () __attribute__ ((__const__)); | |
35816 | ||
35817 | ||
35818 | extern double fabs (double __x) throw () __attribute__ ((__const__)); extern double __fabs (double __x) throw () __attribute__ ((__const__)); | |
35819 | ||
35820 | ||
35821 | extern double floor (double __x) throw () __attribute__ ((__const__)); extern double __floor (double __x) throw () __attribute__ ((__const__)); | |
35822 | ||
35823 | ||
35824 | extern double fmod (double __x, double __y) throw (); extern double __fmod (double __x, double __y) throw (); | |
35825 | ||
35826 | ||
35827 | ||
35828 | ||
35829 | extern int __isinf (double __value) throw () __attribute__ ((__const__)); | |
35830 | ||
35831 | ||
35832 | extern int __finite (double __value) throw () __attribute__ ((__const__)); | |
35833 | ||
35834 | ||
35835 | ||
35836 | ||
35837 | ||
35838 | extern int isinf (double __value) throw () __attribute__ ((__const__)); | |
35839 | ||
35840 | ||
35841 | extern int finite (double __value) throw () __attribute__ ((__const__)); | |
35842 | ||
35843 | ||
35844 | extern double drem (double __x, double __y) throw (); extern double __drem (double __x, double __y) throw (); | |
35845 | ||
35846 | ||
35847 | ||
35848 | extern double significand (double __x) throw (); extern double __significand (double __x) throw (); | |
35849 | ||
35850 | ||
35851 | ||
35852 | ||
35853 | ||
35854 | extern double copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double __copysign (double __x, double __y) throw () __attribute__ ((__const__)); | |
35855 | ||
35856 | ||
35857 | ||
35858 | ||
35859 | ||
35860 | ||
35861 | extern double nan (__const char *__tagb) throw () __attribute__ ((__const__)); extern double __nan (__const char *__tagb) throw () __attribute__ ((__const__)); | |
35862 | ||
35863 | ||
35864 | ||
35865 | ||
35866 | ||
35867 | extern int __isnan (double __value) throw () __attribute__ ((__const__)); | |
35868 | ||
35869 | ||
35870 | ||
35871 | extern int isnan (double __value) throw () __attribute__ ((__const__)); | |
35872 | ||
35873 | ||
35874 | extern double j0 (double) throw (); extern double __j0 (double) throw (); | |
35875 | extern double j1 (double) throw (); extern double __j1 (double) throw (); | |
35876 | extern double jn (int, double) throw (); extern double __jn (int, double) throw (); | |
35877 | extern double y0 (double) throw (); extern double __y0 (double) throw (); | |
35878 | extern double y1 (double) throw (); extern double __y1 (double) throw (); | |
35879 | extern double yn (int, double) throw (); extern double __yn (int, double) throw (); | |
35880 | ||
35881 | ||
35882 | ||
35883 | ||
35884 | ||
35885 | ||
35886 | extern double erf (double) throw (); extern double __erf (double) throw (); | |
35887 | extern double erfc (double) throw (); extern double __erfc (double) throw (); | |
35888 | extern double lgamma (double) throw (); extern double __lgamma (double) throw (); | |
35889 | ||
35890 | ||
35891 | ||
35892 | ||
35893 | ||
35894 | ||
35895 | extern double tgamma (double) throw (); extern double __tgamma (double) throw (); | |
35896 | ||
35897 | ||
35898 | ||
35899 | ||
35900 | ||
35901 | extern double gamma (double) throw (); extern double __gamma (double) throw (); | |
35902 | ||
35903 | ||
35904 | ||
35905 | ||
35906 | ||
35907 | ||
35908 | extern double lgamma_r (double, int *__signgamp) throw (); extern double __lgamma_r (double, int *__signgamp) throw (); | |
35909 | ||
35910 | ||
35911 | ||
35912 | ||
35913 | ||
35914 | ||
35915 | ||
35916 | extern double rint (double __x) throw (); extern double __rint (double __x) throw (); | |
35917 | ||
35918 | ||
35919 | extern double nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) throw () __attribute__ ((__const__)); | |
35920 | ||
35921 | extern double nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); | |
35922 | ||
35923 | ||
35924 | ||
35925 | extern double remainder (double __x, double __y) throw (); extern double __remainder (double __x, double __y) throw (); | |
35926 | ||
35927 | ||
35928 | ||
35929 | extern double scalbn (double __x, int __n) throw (); extern double __scalbn (double __x, int __n) throw (); | |
35930 | ||
35931 | ||
35932 | ||
35933 | extern int ilogb (double __x) throw (); extern int __ilogb (double __x) throw (); | |
35934 | ||
35935 | ||
35936 | ||
35937 | ||
35938 | extern double scalbln (double __x, long int __n) throw (); extern double __scalbln (double __x, long int __n) throw (); | |
35939 | ||
35940 | ||
35941 | ||
35942 | extern double nearbyint (double __x) throw (); extern double __nearbyint (double __x) throw (); | |
35943 | ||
35944 | ||
35945 | ||
35946 | extern double round (double __x) throw () __attribute__ ((__const__)); extern double __round (double __x) throw () __attribute__ ((__const__)); | |
35947 | ||
35948 | ||
35949 | ||
35950 | extern double trunc (double __x) throw () __attribute__ ((__const__)); extern double __trunc (double __x) throw () __attribute__ ((__const__)); | |
35951 | ||
35952 | ||
35953 | ||
35954 | ||
35955 | extern double remquo (double __x, double __y, int *__quo) throw (); extern double __remquo (double __x, double __y, int *__quo) throw (); | |
35956 | ||
35957 | ||
35958 | ||
35959 | ||
35960 | ||
35961 | ||
35962 | extern long int lrint (double __x) throw (); extern long int __lrint (double __x) throw (); | |
35963 | extern long long int llrint (double __x) throw (); extern long long int __llrint (double __x) throw (); | |
35964 | ||
35965 | ||
35966 | ||
35967 | extern long int lround (double __x) throw (); extern long int __lround (double __x) throw (); | |
35968 | extern long long int llround (double __x) throw (); extern long long int __llround (double __x) throw (); | |
35969 | ||
35970 | ||
35971 | ||
35972 | extern double fdim (double __x, double __y) throw (); extern double __fdim (double __x, double __y) throw (); | |
35973 | ||
35974 | ||
35975 | extern double fmax (double __x, double __y) throw (); extern double __fmax (double __x, double __y) throw (); | |
35976 | ||
35977 | ||
35978 | extern double fmin (double __x, double __y) throw (); extern double __fmin (double __x, double __y) throw (); | |
35979 | ||
35980 | ||
35981 | ||
35982 | extern int __fpclassify (double __value) throw () | |
35983 | __attribute__ ((__const__)); | |
35984 | ||
35985 | ||
35986 | extern int __signbit (double __value) throw () | |
35987 | __attribute__ ((__const__)); | |
35988 | ||
35989 | ||
35990 | ||
35991 | extern double fma (double __x, double __y, double __z) throw (); extern double __fma (double __x, double __y, double __z) throw (); | |
35992 | ||
35993 | ||
35994 | ||
35995 | ||
35996 | ||
35997 | ||
35998 | ||
35999 | ||
36000 | extern double scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw (); | |
36001 | # 9 "/usr/include/bits/mathcalls.h" 2 3 4 | |
36002 | # 72 "/usr/include/gentoo-multilib/amd64/math.h" 2 3 4 | |
36003 | # 94 "/usr/include/gentoo-multilib/amd64/math.h" 3 4 | |
36004 | # 1 "/usr/include/bits/mathcalls.h" 1 3 4 | |
36005 | ||
36006 | ||
36007 | ||
36008 | ||
36009 | ||
36010 | ||
36011 | ||
36012 | # 1 "/usr/include/gentoo-multilib/amd64/bits/mathcalls.h" 1 3 4 | |
36013 | # 53 "/usr/include/gentoo-multilib/amd64/bits/mathcalls.h" 3 4 | |
36014 | ||
36015 | ||
36016 | extern float acosf (float __x) throw (); extern float __acosf (float __x) throw (); | |
36017 | ||
36018 | extern float asinf (float __x) throw (); extern float __asinf (float __x) throw (); | |
36019 | ||
36020 | extern float atanf (float __x) throw (); extern float __atanf (float __x) throw (); | |
36021 | ||
36022 | extern float atan2f (float __y, float __x) throw (); extern float __atan2f (float __y, float __x) throw (); | |
36023 | ||
36024 | ||
36025 | extern float cosf (float __x) throw (); extern float __cosf (float __x) throw (); | |
36026 | ||
36027 | extern float sinf (float __x) throw (); extern float __sinf (float __x) throw (); | |
36028 | ||
36029 | extern float tanf (float __x) throw (); extern float __tanf (float __x) throw (); | |
36030 | ||
36031 | ||
36032 | ||
36033 | ||
36034 | extern float coshf (float __x) throw (); extern float __coshf (float __x) throw (); | |
36035 | ||
36036 | extern float sinhf (float __x) throw (); extern float __sinhf (float __x) throw (); | |
36037 | ||
36038 | extern float tanhf (float __x) throw (); extern float __tanhf (float __x) throw (); | |
36039 | ||
36040 | ||
36041 | ||
36042 | ||
36043 | extern void sincosf (float __x, float *__sinx, float *__cosx) throw (); extern void __sincosf (float __x, float *__sinx, float *__cosx) throw (); | |
36044 | ||
36045 | ||
36046 | ||
36047 | ||
36048 | ||
36049 | ||
36050 | extern float acoshf (float __x) throw (); extern float __acoshf (float __x) throw (); | |
36051 | ||
36052 | extern float asinhf (float __x) throw (); extern float __asinhf (float __x) throw (); | |
36053 | ||
36054 | extern float atanhf (float __x) throw (); extern float __atanhf (float __x) throw (); | |
36055 | ||
36056 | ||
36057 | ||
36058 | ||
36059 | ||
36060 | ||
36061 | ||
36062 | extern float expf (float __x) throw (); extern float __expf (float __x) throw (); | |
36063 | ||
36064 | ||
36065 | extern float frexpf (float __x, int *__exponent) throw (); extern float __frexpf (float __x, int *__exponent) throw (); | |
36066 | ||
36067 | ||
36068 | extern float ldexpf (float __x, int __exponent) throw (); extern float __ldexpf (float __x, int __exponent) throw (); | |
36069 | ||
36070 | ||
36071 | extern float logf (float __x) throw (); extern float __logf (float __x) throw (); | |
36072 | ||
36073 | ||
36074 | extern float log10f (float __x) throw (); extern float __log10f (float __x) throw (); | |
36075 | ||
36076 | ||
36077 | extern float modff (float __x, float *__iptr) throw (); extern float __modff (float __x, float *__iptr) throw (); | |
36078 | ||
36079 | ||
36080 | ||
36081 | ||
36082 | extern float exp10f (float __x) throw (); extern float __exp10f (float __x) throw (); | |
36083 | ||
36084 | extern float pow10f (float __x) throw (); extern float __pow10f (float __x) throw (); | |
36085 | ||
36086 | ||
36087 | ||
36088 | ||
36089 | ||
36090 | extern float expm1f (float __x) throw (); extern float __expm1f (float __x) throw (); | |
36091 | ||
36092 | ||
36093 | extern float log1pf (float __x) throw (); extern float __log1pf (float __x) throw (); | |
36094 | ||
36095 | ||
36096 | extern float logbf (float __x) throw (); extern float __logbf (float __x) throw (); | |
36097 | ||
36098 | ||
36099 | ||
36100 | ||
36101 | ||
36102 | ||
36103 | extern float exp2f (float __x) throw (); extern float __exp2f (float __x) throw (); | |
36104 | ||
36105 | ||
36106 | extern float log2f (float __x) throw (); extern float __log2f (float __x) throw (); | |
36107 | ||
36108 | ||
36109 | ||
36110 | ||
36111 | ||
36112 | ||
36113 | ||
36114 | ||
36115 | extern float powf (float __x, float __y) throw (); extern float __powf (float __x, float __y) throw (); | |
36116 | ||
36117 | ||
36118 | extern float sqrtf (float __x) throw (); extern float __sqrtf (float __x) throw (); | |
36119 | ||
36120 | ||
36121 | ||
36122 | ||
36123 | ||
36124 | extern float hypotf (float __x, float __y) throw (); extern float __hypotf (float __x, float __y) throw (); | |
36125 | ||
36126 | ||
36127 | ||
36128 | ||
36129 | ||
36130 | ||
36131 | extern float cbrtf (float __x) throw (); extern float __cbrtf (float __x) throw (); | |
36132 | ||
36133 | ||
36134 | ||
36135 | ||
36136 | ||
36137 | ||
36138 | ||
36139 | ||
36140 | extern float ceilf (float __x) throw () __attribute__ ((__const__)); extern float __ceilf (float __x) throw () __attribute__ ((__const__)); | |
36141 | ||
36142 | ||
36143 | extern float fabsf (float __x) throw () __attribute__ ((__const__)); extern float __fabsf (float __x) throw () __attribute__ ((__const__)); | |
36144 | ||
36145 | ||
36146 | extern float floorf (float __x) throw () __attribute__ ((__const__)); extern float __floorf (float __x) throw () __attribute__ ((__const__)); | |
36147 | ||
36148 | ||
36149 | extern float fmodf (float __x, float __y) throw (); extern float __fmodf (float __x, float __y) throw (); | |
36150 | ||
36151 | ||
36152 | ||
36153 | ||
36154 | extern int __isinff (float __value) throw () __attribute__ ((__const__)); | |
36155 | ||
36156 | ||
36157 | extern int __finitef (float __value) throw () __attribute__ ((__const__)); | |
36158 | ||
36159 | ||
36160 | ||
36161 | ||
36162 | ||
36163 | extern int isinff (float __value) throw () __attribute__ ((__const__)); | |
36164 | ||
36165 | ||
36166 | extern int finitef (float __value) throw () __attribute__ ((__const__)); | |
36167 | ||
36168 | ||
36169 | extern float dremf (float __x, float __y) throw (); extern float __dremf (float __x, float __y) throw (); | |
36170 | ||
36171 | ||
36172 | ||
36173 | extern float significandf (float __x) throw (); extern float __significandf (float __x) throw (); | |
36174 | ||
36175 | ||
36176 | ||
36177 | ||
36178 | ||
36179 | extern float copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) throw () __attribute__ ((__const__)); | |
36180 | ||
36181 | ||
36182 | ||
36183 | ||
36184 | ||
36185 | ||
36186 | extern float nanf (__const char *__tagb) throw () __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) throw () __attribute__ ((__const__)); | |
36187 | ||
36188 | ||
36189 | ||
36190 | ||
36191 | ||
36192 | extern int __isnanf (float __value) throw () __attribute__ ((__const__)); | |
36193 | ||
36194 | ||
36195 | ||
36196 | extern int isnanf (float __value) throw () __attribute__ ((__const__)); | |
36197 | ||
36198 | ||
36199 | extern float j0f (float) throw (); extern float __j0f (float) throw (); | |
36200 | extern float j1f (float) throw (); extern float __j1f (float) throw (); | |
36201 | extern float jnf (int, float) throw (); extern float __jnf (int, float) throw (); | |
36202 | extern float y0f (float) throw (); extern float __y0f (float) throw (); | |
36203 | extern float y1f (float) throw (); extern float __y1f (float) throw (); | |
36204 | extern float ynf (int, float) throw (); extern float __ynf (int, float) throw (); | |
36205 | ||
36206 | ||
36207 | ||
36208 | ||
36209 | ||
36210 | ||
36211 | extern float erff (float) throw (); extern float __erff (float) throw (); | |
36212 | extern float erfcf (float) throw (); extern float __erfcf (float) throw (); | |
36213 | extern float lgammaf (float) throw (); extern float __lgammaf (float) throw (); | |
36214 | ||
36215 | ||
36216 | ||
36217 | ||
36218 | ||
36219 | ||
36220 | extern float tgammaf (float) throw (); extern float __tgammaf (float) throw (); | |
36221 | ||
36222 | ||
36223 | ||
36224 | ||
36225 | ||
36226 | extern float gammaf (float) throw (); extern float __gammaf (float) throw (); | |
36227 | ||
36228 | ||
36229 | ||
36230 | ||
36231 | ||
36232 | ||
36233 | extern float lgammaf_r (float, int *__signgamp) throw (); extern float __lgammaf_r (float, int *__signgamp) throw (); | |
36234 | ||
36235 | ||
36236 | ||
36237 | ||
36238 | ||
36239 | ||
36240 | ||
36241 | extern float rintf (float __x) throw (); extern float __rintf (float __x) throw (); | |
36242 | ||
36243 | ||
36244 | extern float nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); | |
36245 | ||
36246 | extern float nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); | |
36247 | ||
36248 | ||
36249 | ||
36250 | extern float remainderf (float __x, float __y) throw (); extern float __remainderf (float __x, float __y) throw (); | |
36251 | ||
36252 | ||
36253 | ||
36254 | extern float scalbnf (float __x, int __n) throw (); extern float __scalbnf (float __x, int __n) throw (); | |
36255 | ||
36256 | ||
36257 | ||
36258 | extern int ilogbf (float __x) throw (); extern int __ilogbf (float __x) throw (); | |
36259 | ||
36260 | ||
36261 | ||
36262 | ||
36263 | extern float scalblnf (float __x, long int __n) throw (); extern float __scalblnf (float __x, long int __n) throw (); | |
36264 | ||
36265 | ||
36266 | ||
36267 | extern float nearbyintf (float __x) throw (); extern float __nearbyintf (float __x) throw (); | |
36268 | ||
36269 | ||
36270 | ||
36271 | extern float roundf (float __x) throw () __attribute__ ((__const__)); extern float __roundf (float __x) throw () __attribute__ ((__const__)); | |
36272 | ||
36273 | ||
36274 | ||
36275 | extern float truncf (float __x) throw () __attribute__ ((__const__)); extern float __truncf (float __x) throw () __attribute__ ((__const__)); | |
36276 | ||
36277 | ||
36278 | ||
36279 | ||
36280 | extern float remquof (float __x, float __y, int *__quo) throw (); extern float __remquof (float __x, float __y, int *__quo) throw (); | |
36281 | ||
36282 | ||
36283 | ||
36284 | ||
36285 | ||
36286 | ||
36287 | extern long int lrintf (float __x) throw (); extern long int __lrintf (float __x) throw (); | |
36288 | extern long long int llrintf (float __x) throw (); extern long long int __llrintf (float __x) throw (); | |
36289 | ||
36290 | ||
36291 | ||
36292 | extern long int lroundf (float __x) throw (); extern long int __lroundf (float __x) throw (); | |
36293 | extern long long int llroundf (float __x) throw (); extern long long int __llroundf (float __x) throw (); | |
36294 | ||
36295 | ||
36296 | ||
36297 | extern float fdimf (float __x, float __y) throw (); extern float __fdimf (float __x, float __y) throw (); | |
36298 | ||
36299 | ||
36300 | extern float fmaxf (float __x, float __y) throw (); extern float __fmaxf (float __x, float __y) throw (); | |
36301 | ||
36302 | ||
36303 | extern float fminf (float __x, float __y) throw (); extern float __fminf (float __x, float __y) throw (); | |
36304 | ||
36305 | ||
36306 | ||
36307 | extern int __fpclassifyf (float __value) throw () | |
36308 | __attribute__ ((__const__)); | |
36309 | ||
36310 | ||
36311 | extern int __signbitf (float __value) throw () | |
36312 | __attribute__ ((__const__)); | |
36313 | ||
36314 | ||
36315 | ||
36316 | extern float fmaf (float __x, float __y, float __z) throw (); extern float __fmaf (float __x, float __y, float __z) throw (); | |
36317 | ||
36318 | ||
36319 | ||
36320 | ||
36321 | ||
36322 | ||
36323 | ||
36324 | ||
36325 | extern float scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw (); | |
36326 | # 9 "/usr/include/bits/mathcalls.h" 2 3 4 | |
36327 | # 95 "/usr/include/gentoo-multilib/amd64/math.h" 2 3 4 | |
36328 | # 141 "/usr/include/gentoo-multilib/amd64/math.h" 3 4 | |
36329 | # 1 "/usr/include/bits/mathcalls.h" 1 3 4 | |
36330 | ||
36331 | ||
36332 | ||
36333 | ||
36334 | ||
36335 | ||
36336 | ||
36337 | # 1 "/usr/include/gentoo-multilib/amd64/bits/mathcalls.h" 1 3 4 | |
36338 | # 53 "/usr/include/gentoo-multilib/amd64/bits/mathcalls.h" 3 4 | |
36339 | ||
36340 | ||
36341 | extern long double acosl (long double __x) throw (); extern long double __acosl (long double __x) throw (); | |
36342 | ||
36343 | extern long double asinl (long double __x) throw (); extern long double __asinl (long double __x) throw (); | |
36344 | ||
36345 | extern long double atanl (long double __x) throw (); extern long double __atanl (long double __x) throw (); | |
36346 | ||
36347 | extern long double atan2l (long double __y, long double __x) throw (); extern long double __atan2l (long double __y, long double __x) throw (); | |
36348 | ||
36349 | ||
36350 | extern long double cosl (long double __x) throw (); extern long double __cosl (long double __x) throw (); | |
36351 | ||
36352 | extern long double sinl (long double __x) throw (); extern long double __sinl (long double __x) throw (); | |
36353 | ||
36354 | extern long double tanl (long double __x) throw (); extern long double __tanl (long double __x) throw (); | |
36355 | ||
36356 | ||
36357 | ||
36358 | ||
36359 | extern long double coshl (long double __x) throw (); extern long double __coshl (long double __x) throw (); | |
36360 | ||
36361 | extern long double sinhl (long double __x) throw (); extern long double __sinhl (long double __x) throw (); | |
36362 | ||
36363 | extern long double tanhl (long double __x) throw (); extern long double __tanhl (long double __x) throw (); | |
36364 | ||
36365 | ||
36366 | ||
36367 | ||
36368 | extern void sincosl (long double __x, long double *__sinx, long double *__cosx) throw (); extern void __sincosl (long double __x, long double *__sinx, long double *__cosx) throw (); | |
36369 | ||
36370 | ||
36371 | ||
36372 | ||
36373 | ||
36374 | ||
36375 | extern long double acoshl (long double __x) throw (); extern long double __acoshl (long double __x) throw (); | |
36376 | ||
36377 | extern long double asinhl (long double __x) throw (); extern long double __asinhl (long double __x) throw (); | |
36378 | ||
36379 | extern long double atanhl (long double __x) throw (); extern long double __atanhl (long double __x) throw (); | |
36380 | ||
36381 | ||
36382 | ||
36383 | ||
36384 | ||
36385 | ||
36386 | ||
36387 | extern long double expl (long double __x) throw (); extern long double __expl (long double __x) throw (); | |
36388 | ||
36389 | ||
36390 | extern long double frexpl (long double __x, int *__exponent) throw (); extern long double __frexpl (long double __x, int *__exponent) throw (); | |
36391 | ||
36392 | ||
36393 | extern long double ldexpl (long double __x, int __exponent) throw (); extern long double __ldexpl (long double __x, int __exponent) throw (); | |
36394 | ||
36395 | ||
36396 | extern long double logl (long double __x) throw (); extern long double __logl (long double __x) throw (); | |
36397 | ||
36398 | ||
36399 | extern long double log10l (long double __x) throw (); extern long double __log10l (long double __x) throw (); | |
36400 | ||
36401 | ||
36402 | extern long double modfl (long double __x, long double *__iptr) throw (); extern long double __modfl (long double __x, long double *__iptr) throw (); | |
36403 | ||
36404 | ||
36405 | ||
36406 | ||
36407 | extern long double exp10l (long double __x) throw (); extern long double __exp10l (long double __x) throw (); | |
36408 | ||
36409 | extern long double pow10l (long double __x) throw (); extern long double __pow10l (long double __x) throw (); | |
36410 | ||
36411 | ||
36412 | ||
36413 | ||
36414 | ||
36415 | extern long double expm1l (long double __x) throw (); extern long double __expm1l (long double __x) throw (); | |
36416 | ||
36417 | ||
36418 | extern long double log1pl (long double __x) throw (); extern long double __log1pl (long double __x) throw (); | |
36419 | ||
36420 | ||
36421 | extern long double logbl (long double __x) throw (); extern long double __logbl (long double __x) throw (); | |
36422 | ||
36423 | ||
36424 | ||
36425 | ||
36426 | ||
36427 | ||
36428 | extern long double exp2l (long double __x) throw (); extern long double __exp2l (long double __x) throw (); | |
36429 | ||
36430 | ||
36431 | extern long double log2l (long double __x) throw (); extern long double __log2l (long double __x) throw (); | |
36432 | ||
36433 | ||
36434 | ||
36435 | ||
36436 | ||
36437 | ||
36438 | ||
36439 | ||
36440 | extern long double powl (long double __x, long double __y) throw (); extern long double __powl (long double __x, long double __y) throw (); | |
36441 | ||
36442 | ||
36443 | extern long double sqrtl (long double __x) throw (); extern long double __sqrtl (long double __x) throw (); | |
36444 | ||
36445 | ||
36446 | ||
36447 | ||
36448 | ||
36449 | extern long double hypotl (long double __x, long double __y) throw (); extern long double __hypotl (long double __x, long double __y) throw (); | |
36450 | ||
36451 | ||
36452 | ||
36453 | ||
36454 | ||
36455 | ||
36456 | extern long double cbrtl (long double __x) throw (); extern long double __cbrtl (long double __x) throw (); | |
36457 | ||
36458 | ||
36459 | ||
36460 | ||
36461 | ||
36462 | ||
36463 | ||
36464 | ||
36465 | extern long double ceill (long double __x) throw () __attribute__ ((__const__)); extern long double __ceill (long double __x) throw () __attribute__ ((__const__)); | |
36466 | ||
36467 | ||
36468 | extern long double fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double __fabsl (long double __x) throw () __attribute__ ((__const__)); | |
36469 | ||
36470 | ||
36471 | extern long double floorl (long double __x) throw () __attribute__ ((__const__)); extern long double __floorl (long double __x) throw () __attribute__ ((__const__)); | |
36472 | ||
36473 | ||
36474 | extern long double fmodl (long double __x, long double __y) throw (); extern long double __fmodl (long double __x, long double __y) throw (); | |
36475 | ||
36476 | ||
36477 | ||
36478 | ||
36479 | extern int __isinfl (long double __value) throw () __attribute__ ((__const__)); | |
36480 | ||
36481 | ||
36482 | extern int __finitel (long double __value) throw () __attribute__ ((__const__)); | |
36483 | ||
36484 | ||
36485 | ||
36486 | ||
36487 | ||
36488 | extern int isinfl (long double __value) throw () __attribute__ ((__const__)); | |
36489 | ||
36490 | ||
36491 | extern int finitel (long double __value) throw () __attribute__ ((__const__)); | |
36492 | ||
36493 | ||
36494 | extern long double dreml (long double __x, long double __y) throw (); extern long double __dreml (long double __x, long double __y) throw (); | |
36495 | ||
36496 | ||
36497 | ||
36498 | extern long double significandl (long double __x) throw (); extern long double __significandl (long double __x) throw (); | |
36499 | ||
36500 | ||
36501 | ||
36502 | ||
36503 | ||
36504 | extern long double copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); | |
36505 | ||
36506 | ||
36507 | ||
36508 | ||
36509 | ||
36510 | ||
36511 | extern long double nanl (__const char *__tagb) throw () __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) throw () __attribute__ ((__const__)); | |
36512 | ||
36513 | ||
36514 | ||
36515 | ||
36516 | ||
36517 | extern int __isnanl (long double __value) throw () __attribute__ ((__const__)); | |
36518 | ||
36519 | ||
36520 | ||
36521 | extern int isnanl (long double __value) throw () __attribute__ ((__const__)); | |
36522 | ||
36523 | ||
36524 | extern long double j0l (long double) throw (); extern long double __j0l (long double) throw (); | |
36525 | extern long double j1l (long double) throw (); extern long double __j1l (long double) throw (); | |
36526 | extern long double jnl (int, long double) throw (); extern long double __jnl (int, long double) throw (); | |
36527 | extern long double y0l (long double) throw (); extern long double __y0l (long double) throw (); | |
36528 | extern long double y1l (long double) throw (); extern long double __y1l (long double) throw (); | |
36529 | extern long double ynl (int, long double) throw (); extern long double __ynl (int, long double) throw (); | |
36530 | ||
36531 | ||
36532 | ||
36533 | ||
36534 | ||
36535 | ||
36536 | extern long double erfl (long double) throw (); extern long double __erfl (long double) throw (); | |
36537 | extern long double erfcl (long double) throw (); extern long double __erfcl (long double) throw (); | |
36538 | extern long double lgammal (long double) throw (); extern long double __lgammal (long double) throw (); | |
36539 | ||
36540 | ||
36541 | ||
36542 | ||
36543 | ||
36544 | ||
36545 | extern long double tgammal (long double) throw (); extern long double __tgammal (long double) throw (); | |
36546 | ||
36547 | ||
36548 | ||
36549 | ||
36550 | ||
36551 | extern long double gammal (long double) throw (); extern long double __gammal (long double) throw (); | |
36552 | ||
36553 | ||
36554 | ||
36555 | ||
36556 | ||
36557 | ||
36558 | extern long double lgammal_r (long double, int *__signgamp) throw (); extern long double __lgammal_r (long double, int *__signgamp) throw (); | |
36559 | ||
36560 | ||
36561 | ||
36562 | ||
36563 | ||
36564 | ||
36565 | ||
36566 | extern long double rintl (long double __x) throw (); extern long double __rintl (long double __x) throw (); | |
36567 | ||
36568 | ||
36569 | extern long double nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); | |
36570 | ||
36571 | extern long double nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); | |
36572 | ||
36573 | ||
36574 | ||
36575 | extern long double remainderl (long double __x, long double __y) throw (); extern long double __remainderl (long double __x, long double __y) throw (); | |
36576 | ||
36577 | ||
36578 | ||
36579 | extern long double scalbnl (long double __x, int __n) throw (); extern long double __scalbnl (long double __x, int __n) throw (); | |
36580 | ||
36581 | ||
36582 | ||
36583 | extern int ilogbl (long double __x) throw (); extern int __ilogbl (long double __x) throw (); | |
36584 | ||
36585 | ||
36586 | ||
36587 | ||
36588 | extern long double scalblnl (long double __x, long int __n) throw (); extern long double __scalblnl (long double __x, long int __n) throw (); | |
36589 | ||
36590 | ||
36591 | ||
36592 | extern long double nearbyintl (long double __x) throw (); extern long double __nearbyintl (long double __x) throw (); | |
36593 | ||
36594 | ||
36595 | ||
36596 | extern long double roundl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundl (long double __x) throw () __attribute__ ((__const__)); | |
36597 | ||
36598 | ||
36599 | ||
36600 | extern long double truncl (long double __x) throw () __attribute__ ((__const__)); extern long double __truncl (long double __x) throw () __attribute__ ((__const__)); | |
36601 | ||
36602 | ||
36603 | ||
36604 | ||
36605 | extern long double remquol (long double __x, long double __y, int *__quo) throw (); extern long double __remquol (long double __x, long double __y, int *__quo) throw (); | |
36606 | ||
36607 | ||
36608 | ||
36609 | ||
36610 | ||
36611 | ||
36612 | extern long int lrintl (long double __x) throw (); extern long int __lrintl (long double __x) throw (); | |
36613 | extern long long int llrintl (long double __x) throw (); extern long long int __llrintl (long double __x) throw (); | |
36614 | ||
36615 | ||
36616 | ||
36617 | extern long int lroundl (long double __x) throw (); extern long int __lroundl (long double __x) throw (); | |
36618 | extern long long int llroundl (long double __x) throw (); extern long long int __llroundl (long double __x) throw (); | |
36619 | ||
36620 | ||
36621 | ||
36622 | extern long double fdiml (long double __x, long double __y) throw (); extern long double __fdiml (long double __x, long double __y) throw (); | |
36623 | ||
36624 | ||
36625 | extern long double fmaxl (long double __x, long double __y) throw (); extern long double __fmaxl (long double __x, long double __y) throw (); | |
36626 | ||
36627 | ||
36628 | extern long double fminl (long double __x, long double __y) throw (); extern long double __fminl (long double __x, long double __y) throw (); | |
36629 | ||
36630 | ||
36631 | ||
36632 | extern int __fpclassifyl (long double __value) throw () | |
36633 | __attribute__ ((__const__)); | |
36634 | ||
36635 | ||
36636 | extern int __signbitl (long double __value) throw () | |
36637 | __attribute__ ((__const__)); | |
36638 | ||
36639 | ||
36640 | ||
36641 | extern long double fmal (long double __x, long double __y, long double __z) throw (); extern long double __fmal (long double __x, long double __y, long double __z) throw (); | |
36642 | ||
36643 | ||
36644 | ||
36645 | ||
36646 | ||
36647 | ||
36648 | ||
36649 | ||
36650 | extern long double scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw (); | |
36651 | # 9 "/usr/include/bits/mathcalls.h" 2 3 4 | |
36652 | # 142 "/usr/include/gentoo-multilib/amd64/math.h" 2 3 4 | |
36653 | # 157 "/usr/include/gentoo-multilib/amd64/math.h" 3 4 | |
36654 | extern int signgam; | |
36655 | # 198 "/usr/include/gentoo-multilib/amd64/math.h" 3 4 | |
36656 | enum | |
36657 | { | |
36658 | FP_NAN, | |
36659 | ||
36660 | FP_INFINITE, | |
36661 | ||
36662 | FP_ZERO, | |
36663 | ||
36664 | FP_SUBNORMAL, | |
36665 | ||
36666 | FP_NORMAL | |
36667 | ||
36668 | }; | |
36669 | # 284 "/usr/include/gentoo-multilib/amd64/math.h" 3 4 | |
36670 | typedef enum | |
36671 | { | |
36672 | _IEEE_ = -1, | |
36673 | _SVID_, | |
36674 | _XOPEN_, | |
36675 | _POSIX_, | |
36676 | _ISOC_ | |
36677 | } _LIB_VERSION_TYPE; | |
36678 | ||
36679 | ||
36680 | ||
36681 | ||
36682 | extern _LIB_VERSION_TYPE _LIB_VERSION; | |
36683 | # 307 "/usr/include/gentoo-multilib/amd64/math.h" 3 4 | |
36684 | struct __exception | |
36685 | ||
36686 | ||
36687 | ||
36688 | { | |
36689 | int type; | |
36690 | char *name; | |
36691 | double arg1; | |
36692 | double arg2; | |
36693 | double retval; | |
36694 | }; | |
36695 | ||
36696 | ||
36697 | extern int matherr (struct __exception *__exc) throw (); | |
36698 | # 409 "/usr/include/gentoo-multilib/amd64/math.h" 3 4 | |
36699 | # 1 "/usr/include/bits/mathinline.h" 1 3 4 | |
36700 | ||
36701 | ||
36702 | ||
36703 | ||
36704 | ||
36705 | ||
36706 | ||
36707 | # 1 "/usr/include/gentoo-multilib/amd64/bits/mathinline.h" 1 3 4 | |
36708 | # 35 "/usr/include/gentoo-multilib/amd64/bits/mathinline.h" 3 4 | |
36709 | __inline int | |
36710 | __signbitf (float __x) throw () | |
36711 | { | |
36712 | __extension__ union { float __f; int __i; } __u = { __f: __x }; | |
36713 | return __u.__i < 0; | |
36714 | } | |
36715 | __inline int | |
36716 | __signbit (double __x) throw () | |
36717 | { | |
36718 | __extension__ union { double __d; int __i[2]; } __u = { __d: __x }; | |
36719 | return __u.__i[1] < 0; | |
36720 | } | |
36721 | __inline int | |
36722 | __signbitl (long double __x) throw () | |
36723 | { | |
36724 | __extension__ union { long double __l; int __i[3]; } __u = { __l: __x }; | |
36725 | return (__u.__i[2] & 0x8000) != 0; | |
36726 | } | |
36727 | # 9 "/usr/include/bits/mathinline.h" 2 3 4 | |
36728 | # 410 "/usr/include/gentoo-multilib/amd64/math.h" 2 3 4 | |
36729 | # 465 "/usr/include/gentoo-multilib/amd64/math.h" 3 4 | |
36730 | } | |
36731 | # 9 "/usr/include/math.h" 2 3 4 | |
36732 | # 24 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/math.h" 2 | |
36733 | # 102 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/math.h" | |
36734 | inline bool wxIsSameDouble(double x, double y) { return x == y; } | |
36735 | ||
36736 | ||
36737 | inline bool wxIsNullDouble(double x) { return wxIsSameDouble(x, 0.); } | |
36738 | # 35 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dc.h" 2 | |
36739 | ||
36740 | class wxDC; | |
36741 | class wxDCBase; | |
36742 | ||
36743 | class wxDrawObject | |
36744 | { | |
36745 | public: | |
36746 | ||
36747 | wxDrawObject() | |
36748 | : m_isBBoxValid(false) | |
36749 | , m_minX(0), m_minY(0), m_maxX(0), m_maxY(0) | |
36750 | { } | |
36751 | ||
36752 | virtual ~wxDrawObject() { } | |
36753 | ||
36754 | virtual void Draw(wxDCBase&) const { } | |
36755 | ||
36756 | virtual void CalcBoundingBox(wxCoord x, wxCoord y) | |
36757 | { | |
36758 | if ( m_isBBoxValid ) | |
36759 | { | |
36760 | if ( x < m_minX ) m_minX = x; | |
36761 | if ( y < m_minY ) m_minY = y; | |
36762 | if ( x > m_maxX ) m_maxX = x; | |
36763 | if ( y > m_maxY ) m_maxY = y; | |
36764 | } | |
36765 | else | |
36766 | { | |
36767 | m_isBBoxValid = true; | |
36768 | ||
36769 | m_minX = x; | |
36770 | m_minY = y; | |
36771 | m_maxX = x; | |
36772 | m_maxY = y; | |
36773 | } | |
36774 | } | |
36775 | ||
36776 | void ResetBoundingBox() | |
36777 | { | |
36778 | m_isBBoxValid = false; | |
36779 | ||
36780 | m_minX = m_maxX = m_minY = m_maxY = 0; | |
36781 | } | |
36782 | ||
36783 | ||
36784 | ||
36785 | wxCoord MinX() const { return m_minX; } | |
36786 | wxCoord MaxX() const { return m_maxX; } | |
36787 | wxCoord MinY() const { return m_minY; } | |
36788 | wxCoord MaxY() const { return m_maxY; } | |
36789 | ||
36790 | ||
36791 | virtual int GetType()=0; | |
36792 | ||
36793 | protected: | |
36794 | ||
36795 | bool m_isBBoxValid:1; | |
36796 | ||
36797 | wxCoord m_minX, m_minY, m_maxX, m_maxY; | |
36798 | }; | |
36799 | ||
36800 | ||
36801 | ||
36802 | ||
36803 | ||
36804 | extern int wxPageNumber; | |
36805 | ||
36806 | ||
36807 | ||
36808 | ||
36809 | ||
36810 | class wxDCBase : public wxObject | |
36811 | { | |
36812 | public: | |
36813 | wxDCBase() | |
36814 | : m_colour(wxColourDisplay()) | |
36815 | , m_ok(true) | |
36816 | , m_clipping(false) | |
36817 | , m_isInteractive(0) | |
36818 | , m_isBBoxValid(false) | |
36819 | , m_logicalOriginX(0), m_logicalOriginY(0) | |
36820 | , m_deviceOriginX(0), m_deviceOriginY(0) | |
36821 | , m_logicalScaleX(1.0), m_logicalScaleY(1.0) | |
36822 | , m_userScaleX(1.0), m_userScaleY(1.0) | |
36823 | , m_scaleX(1.0), m_scaleY(1.0) | |
36824 | , m_signX(1), m_signY(1) | |
36825 | , m_minX(0), m_minY(0), m_maxX(0), m_maxY(0) | |
36826 | , m_clipX1(0), m_clipY1(0), m_clipX2(0), m_clipY2(0) | |
36827 | , m_logicalFunction(wxCOPY) | |
36828 | , m_backgroundMode(wxTRANSPARENT) | |
36829 | , m_mappingMode(wxMM_TEXT) | |
36830 | , m_pen() | |
36831 | , m_brush() | |
36832 | , m_backgroundBrush(*wxTRANSPARENT_BRUSH) | |
36833 | , m_textForegroundColour(*wxBLACK) | |
36834 | , m_textBackgroundColour(*wxWHITE) | |
36835 | , m_font() | |
36836 | ||
36837 | , m_palette() | |
36838 | , m_hasCustomPalette(false) | |
36839 | ||
36840 | { | |
36841 | ResetBoundingBox(); | |
36842 | ResetClipping(); | |
36843 | } | |
36844 | ||
36845 | ~wxDCBase() { } | |
36846 | ||
36847 | virtual void BeginDrawing() { } | |
36848 | virtual void EndDrawing() { } | |
36849 | ||
36850 | ||
36851 | ||
36852 | ||
36853 | virtual void DrawObject(wxDrawObject* drawobject) | |
36854 | { | |
36855 | drawobject->Draw(*this); | |
36856 | CalcBoundingBox(drawobject->MinX(),drawobject->MinY()); | |
36857 | CalcBoundingBox(drawobject->MaxX(),drawobject->MaxY()); | |
36858 | } | |
36859 | ||
36860 | bool FloodFill(wxCoord x, wxCoord y, const wxColour& col, | |
36861 | int style = wxFLOOD_SURFACE) | |
36862 | { return DoFloodFill(x, y, col, style); } | |
36863 | bool FloodFill(const wxPoint& pt, const wxColour& col, | |
36864 | int style = wxFLOOD_SURFACE) | |
36865 | { return DoFloodFill(pt.x, pt.y, col, style); } | |
36866 | ||
36867 | bool GetPixel(wxCoord x, wxCoord y, wxColour *col) const | |
36868 | { return DoGetPixel(x, y, col); } | |
36869 | bool GetPixel(const wxPoint& pt, wxColour *col) const | |
36870 | { return DoGetPixel(pt.x, pt.y, col); } | |
36871 | ||
36872 | void DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2) | |
36873 | { DoDrawLine(x1, y1, x2, y2); } | |
36874 | void DrawLine(const wxPoint& pt1, const wxPoint& pt2) | |
36875 | { DoDrawLine(pt1.x, pt1.y, pt2.x, pt2.y); } | |
36876 | ||
36877 | void CrossHair(wxCoord x, wxCoord y) | |
36878 | { DoCrossHair(x, y); } | |
36879 | void CrossHair(const wxPoint& pt) | |
36880 | { DoCrossHair(pt.x, pt.y); } | |
36881 | ||
36882 | void DrawArc(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, | |
36883 | wxCoord xc, wxCoord yc) | |
36884 | { DoDrawArc(x1, y1, x2, y2, xc, yc); } | |
36885 | void DrawArc(const wxPoint& pt1, const wxPoint& pt2, const wxPoint& centre) | |
36886 | { DoDrawArc(pt1.x, pt1.y, pt2.x, pt2.y, centre.x, centre.y); } | |
36887 | ||
36888 | void DrawCheckMark(wxCoord x, wxCoord y, | |
36889 | wxCoord width, wxCoord height) | |
36890 | { DoDrawCheckMark(x, y, width, height); } | |
36891 | void DrawCheckMark(const wxRect& rect) | |
36892 | { DoDrawCheckMark(rect.x, rect.y, rect.width, rect.height); } | |
36893 | ||
36894 | void DrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h, | |
36895 | double sa, double ea) | |
36896 | { DoDrawEllipticArc(x, y, w, h, sa, ea); } | |
36897 | void DrawEllipticArc(const wxPoint& pt, const wxSize& sz, | |
36898 | double sa, double ea) | |
36899 | { DoDrawEllipticArc(pt.x, pt.y, sz.x, sz.y, sa, ea); } | |
36900 | ||
36901 | void DrawPoint(wxCoord x, wxCoord y) | |
36902 | { DoDrawPoint(x, y); } | |
36903 | void DrawPoint(const wxPoint& pt) | |
36904 | { DoDrawPoint(pt.x, pt.y); } | |
36905 | ||
36906 | void DrawLines(int n, wxPoint points[], | |
36907 | wxCoord xoffset = 0, wxCoord yoffset = 0) | |
36908 | { DoDrawLines(n, points, xoffset, yoffset); } | |
36909 | void DrawLines(const wxList *list, | |
36910 | wxCoord xoffset = 0, wxCoord yoffset = 0); | |
36911 | ||
36912 | void DrawPolygon(int n, wxPoint points[], | |
36913 | wxCoord xoffset = 0, wxCoord yoffset = 0, | |
36914 | int fillStyle = wxODDEVEN_RULE) | |
36915 | { DoDrawPolygon(n, points, xoffset, yoffset, fillStyle); } | |
36916 | ||
36917 | void DrawPolygon(const wxList *list, | |
36918 | wxCoord xoffset = 0, wxCoord yoffset = 0, | |
36919 | int fillStyle = wxODDEVEN_RULE); | |
36920 | ||
36921 | void DrawPolyPolygon(int n, int count[], wxPoint points[], | |
36922 | wxCoord xoffset = 0, wxCoord yoffset = 0, | |
36923 | int fillStyle = wxODDEVEN_RULE) | |
36924 | { DoDrawPolyPolygon(n, count, points, xoffset, yoffset, fillStyle); } | |
36925 | ||
36926 | void DrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height) | |
36927 | { DoDrawRectangle(x, y, width, height); } | |
36928 | void DrawRectangle(const wxPoint& pt, const wxSize& sz) | |
36929 | { DoDrawRectangle(pt.x, pt.y, sz.x, sz.y); } | |
36930 | void DrawRectangle(const wxRect& rect) | |
36931 | { DoDrawRectangle(rect.x, rect.y, rect.width, rect.height); } | |
36932 | ||
36933 | void DrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, | |
36934 | double radius) | |
36935 | { DoDrawRoundedRectangle(x, y, width, height, radius); } | |
36936 | void DrawRoundedRectangle(const wxPoint& pt, const wxSize& sz, | |
36937 | double radius) | |
36938 | { DoDrawRoundedRectangle(pt.x, pt.y, sz.x, sz.y, radius); } | |
36939 | void DrawRoundedRectangle(const wxRect& r, double radius) | |
36940 | { DoDrawRoundedRectangle(r.x, r.y, r.width, r.height, radius); } | |
36941 | ||
36942 | void DrawCircle(wxCoord x, wxCoord y, wxCoord radius) | |
36943 | { DoDrawEllipse(x - radius, y - radius, 2*radius, 2*radius); } | |
36944 | void DrawCircle(const wxPoint& pt, wxCoord radius) | |
36945 | { DrawCircle(pt.x, pt.y, radius); } | |
36946 | ||
36947 | void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height) | |
36948 | { DoDrawEllipse(x, y, width, height); } | |
36949 | void DrawEllipse(const wxPoint& pt, const wxSize& sz) | |
36950 | { DoDrawEllipse(pt.x, pt.y, sz.x, sz.y); } | |
36951 | void DrawEllipse(const wxRect& rect) | |
36952 | { DoDrawEllipse(rect.x, rect.y, rect.width, rect.height); } | |
36953 | ||
36954 | void DrawIcon(const wxIcon& icon, wxCoord x, wxCoord y) | |
36955 | { DoDrawIcon(icon, x, y); } | |
36956 | void DrawIcon(const wxIcon& icon, const wxPoint& pt) | |
36957 | { DoDrawIcon(icon, pt.x, pt.y); } | |
36958 | ||
36959 | void DrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, | |
36960 | bool useMask = false) | |
36961 | { DoDrawBitmap(bmp, x, y, useMask); } | |
36962 | void DrawBitmap(const wxBitmap &bmp, const wxPoint& pt, | |
36963 | bool useMask = false) | |
36964 | { DoDrawBitmap(bmp, pt.x, pt.y, useMask); } | |
36965 | ||
36966 | void DrawText(const wxString& text, wxCoord x, wxCoord y) | |
36967 | { DoDrawText(text, x, y); } | |
36968 | void DrawText(const wxString& text, const wxPoint& pt) | |
36969 | { DoDrawText(text, pt.x, pt.y); } | |
36970 | ||
36971 | void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle) | |
36972 | { DoDrawRotatedText(text, x, y, angle); } | |
36973 | void DrawRotatedText(const wxString& text, const wxPoint& pt, double angle) | |
36974 | { DoDrawRotatedText(text, pt.x, pt.y, angle); } | |
36975 | ||
36976 | ||
36977 | ||
36978 | ||
36979 | ||
36980 | virtual void DrawLabel(const wxString& text, | |
36981 | const wxBitmap& image, | |
36982 | const wxRect& rect, | |
36983 | int alignment = wxALIGN_LEFT | wxALIGN_TOP, | |
36984 | int indexAccel = -1, | |
36985 | wxRect *rectBounding = __null); | |
36986 | ||
36987 | void DrawLabel(const wxString& text, const wxRect& rect, | |
36988 | int alignment = wxALIGN_LEFT | wxALIGN_TOP, | |
36989 | int indexAccel = -1) | |
36990 | { DrawLabel(text, wxNullBitmap, rect, alignment, indexAccel); } | |
36991 | ||
36992 | bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, | |
36993 | wxDC *source, wxCoord xsrc, wxCoord ysrc, | |
36994 | int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord) | |
36995 | { | |
36996 | return DoBlit(xdest, ydest, width, height, | |
36997 | source, xsrc, ysrc, rop, useMask, xsrcMask, ysrcMask); | |
36998 | } | |
36999 | bool Blit(const wxPoint& destPt, const wxSize& sz, | |
37000 | wxDC *source, const wxPoint& srcPt, | |
37001 | int rop = wxCOPY, bool useMask = false, const wxPoint& srcPtMask = wxDefaultPosition) | |
37002 | { | |
37003 | return DoBlit(destPt.x, destPt.y, sz.x, sz.y, | |
37004 | source, srcPt.x, srcPt.y, rop, useMask, srcPtMask.x, srcPtMask.y); | |
37005 | } | |
37006 | ||
37007 | ||
37008 | ||
37009 | void DrawSpline(wxCoord x1, wxCoord y1, | |
37010 | wxCoord x2, wxCoord y2, | |
37011 | wxCoord x3, wxCoord y3); | |
37012 | void DrawSpline(int n, wxPoint points[]); | |
37013 | ||
37014 | void DrawSpline(wxList *points) { DoDrawSpline(points); } | |
37015 | # 364 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dc.h" | |
37016 | virtual void Clear() = 0; | |
37017 | ||
37018 | virtual bool StartDoc(const wxString& ) { return true; } | |
37019 | virtual void EndDoc() { } | |
37020 | ||
37021 | virtual void StartPage() { } | |
37022 | virtual void EndPage() { } | |
37023 | ||
37024 | ||
37025 | ||
37026 | ||
37027 | virtual void SetFont(const wxFont& font) = 0; | |
37028 | virtual void SetPen(const wxPen& pen) = 0; | |
37029 | virtual void SetBrush(const wxBrush& brush) = 0; | |
37030 | virtual void SetBackground(const wxBrush& brush) = 0; | |
37031 | virtual void SetBackgroundMode(int mode) = 0; | |
37032 | ||
37033 | virtual void SetPalette(const wxPalette& palette) = 0; | |
37034 | ||
37035 | ||
37036 | ||
37037 | ||
37038 | ||
37039 | void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height) | |
37040 | { DoSetClippingRegion(x, y, width, height); } | |
37041 | void SetClippingRegion(const wxPoint& pt, const wxSize& sz) | |
37042 | { DoSetClippingRegion(pt.x, pt.y, sz.x, sz.y); } | |
37043 | void SetClippingRegion(const wxRect& rect) | |
37044 | { DoSetClippingRegion(rect.x, rect.y, rect.width, rect.height); } | |
37045 | void SetClippingRegion(const wxRegion& region) | |
37046 | { DoSetClippingRegionAsRegion(region); } | |
37047 | ||
37048 | virtual void DestroyClippingRegion() { ResetClipping(); } | |
37049 | ||
37050 | void GetClippingBox(wxCoord *x, wxCoord *y, wxCoord *w, wxCoord *h) const | |
37051 | { DoGetClippingBox(x, y, w, h); } | |
37052 | void GetClippingBox(wxRect& rect) const | |
37053 | { | |
37054 | DoGetClippingBox(&rect.x, &rect.y, &rect.width, &rect.height); | |
37055 | } | |
37056 | ||
37057 | ||
37058 | ||
37059 | ||
37060 | virtual wxCoord GetCharHeight() const = 0; | |
37061 | virtual wxCoord GetCharWidth() const = 0; | |
37062 | ||
37063 | ||
37064 | void GetTextExtent(const wxString& string, | |
37065 | wxCoord *x, wxCoord *y, | |
37066 | wxCoord *descent = __null, | |
37067 | wxCoord *externalLeading = __null, | |
37068 | wxFont *theFont = __null) const | |
37069 | { DoGetTextExtent(string, x, y, descent, externalLeading, theFont); } | |
37070 | ||
37071 | ||
37072 | virtual void GetMultiLineTextExtent(const wxString& text, | |
37073 | wxCoord *width, | |
37074 | wxCoord *height, | |
37075 | wxCoord *heightLine = __null, | |
37076 | wxFont *font = __null); | |
37077 | ||
37078 | ||
37079 | bool GetPartialTextExtents(const wxString& text, wxArrayInt& widths) const | |
37080 | { return DoGetPartialTextExtents(text, widths); } | |
37081 | ||
37082 | ||
37083 | ||
37084 | ||
37085 | ||
37086 | ||
37087 | void GetSize(int *width, int *height) const | |
37088 | { DoGetSize(width, height); } | |
37089 | wxSize GetSize() const | |
37090 | { | |
37091 | int w, h; | |
37092 | DoGetSize(&w, &h); | |
37093 | ||
37094 | return wxSize(w, h); | |
37095 | } | |
37096 | ||
37097 | ||
37098 | void GetSizeMM(int* width, int* height) const | |
37099 | { DoGetSizeMM(width, height); } | |
37100 | wxSize GetSizeMM() const | |
37101 | { | |
37102 | int w, h; | |
37103 | DoGetSizeMM(&w, &h); | |
37104 | ||
37105 | return wxSize(w, h); | |
37106 | } | |
37107 | ||
37108 | ||
37109 | ||
37110 | ||
37111 | ||
37112 | ||
37113 | wxCoord DeviceToLogicalX(wxCoord x) const; | |
37114 | wxCoord DeviceToLogicalY(wxCoord y) const; | |
37115 | wxCoord DeviceToLogicalXRel(wxCoord x) const; | |
37116 | wxCoord DeviceToLogicalYRel(wxCoord y) const; | |
37117 | wxCoord LogicalToDeviceX(wxCoord x) const; | |
37118 | wxCoord LogicalToDeviceY(wxCoord y) const; | |
37119 | wxCoord LogicalToDeviceXRel(wxCoord x) const; | |
37120 | wxCoord LogicalToDeviceYRel(wxCoord y) const; | |
37121 | ||
37122 | ||
37123 | ||
37124 | ||
37125 | virtual bool CanDrawBitmap() const = 0; | |
37126 | virtual bool CanGetTextExtent() const = 0; | |
37127 | ||
37128 | ||
37129 | virtual int GetDepth() const = 0; | |
37130 | ||
37131 | ||
37132 | virtual wxSize GetPPI() const = 0; | |
37133 | ||
37134 | virtual bool Ok() const { return m_ok; } | |
37135 | ||
37136 | ||
37137 | ||
37138 | ||
37139 | int GetBackgroundMode() const { return m_backgroundMode; } | |
37140 | const wxBrush& GetBackground() const { return m_backgroundBrush; } | |
37141 | const wxBrush& GetBrush() const { return m_brush; } | |
37142 | const wxFont& GetFont() const { return m_font; } | |
37143 | const wxPen& GetPen() const { return m_pen; } | |
37144 | ||
37145 | const wxColour& GetTextForeground() const { return m_textForegroundColour; } | |
37146 | const wxColour& GetTextBackground() const { return m_textBackgroundColour; } | |
37147 | virtual void SetTextForeground(const wxColour& colour) | |
37148 | { m_textForegroundColour = colour; } | |
37149 | virtual void SetTextBackground(const wxColour& colour) | |
37150 | { m_textBackgroundColour = colour; } | |
37151 | ||
37152 | int GetMapMode() const { return m_mappingMode; } | |
37153 | virtual void SetMapMode(int mode) = 0; | |
37154 | ||
37155 | virtual void GetUserScale(double *x, double *y) const | |
37156 | { | |
37157 | if ( x ) *x = m_userScaleX; | |
37158 | if ( y ) *y = m_userScaleY; | |
37159 | } | |
37160 | virtual void SetUserScale(double x, double y) = 0; | |
37161 | ||
37162 | virtual void GetLogicalScale(double *x, double *y) | |
37163 | { | |
37164 | if ( x ) *x = m_logicalScaleX; | |
37165 | if ( y ) *y = m_logicalScaleY; | |
37166 | } | |
37167 | virtual void SetLogicalScale(double x, double y) | |
37168 | { | |
37169 | m_logicalScaleX = x; | |
37170 | m_logicalScaleY = y; | |
37171 | } | |
37172 | ||
37173 | void GetLogicalOrigin(wxCoord *x, wxCoord *y) const | |
37174 | { DoGetLogicalOrigin(x, y); } | |
37175 | wxPoint GetLogicalOrigin() const | |
37176 | { wxCoord x, y; DoGetLogicalOrigin(&x, &y); return wxPoint(x, y); } | |
37177 | virtual void SetLogicalOrigin(wxCoord x, wxCoord y) = 0; | |
37178 | ||
37179 | void GetDeviceOrigin(wxCoord *x, wxCoord *y) const | |
37180 | { DoGetDeviceOrigin(x, y); } | |
37181 | wxPoint GetDeviceOrigin() const | |
37182 | { wxCoord x, y; DoGetDeviceOrigin(&x, &y); return wxPoint(x, y); } | |
37183 | virtual void SetDeviceOrigin(wxCoord x, wxCoord y) = 0; | |
37184 | ||
37185 | virtual void ComputeScaleAndOrigin() {} | |
37186 | ||
37187 | virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp) = 0; | |
37188 | ||
37189 | int GetLogicalFunction() const { return m_logicalFunction; } | |
37190 | virtual void SetLogicalFunction(int function) = 0; | |
37191 | ||
37192 | ||
37193 | virtual void SetOptimization(bool ) { } | |
37194 | virtual bool GetOptimization() { return false; } | |
37195 | ||
37196 | ||
37197 | ||
37198 | ||
37199 | ||
37200 | virtual void CalcBoundingBox(wxCoord x, wxCoord y) | |
37201 | { | |
37202 | if ( m_isBBoxValid ) | |
37203 | { | |
37204 | if ( x < m_minX ) m_minX = x; | |
37205 | if ( y < m_minY ) m_minY = y; | |
37206 | if ( x > m_maxX ) m_maxX = x; | |
37207 | if ( y > m_maxY ) m_maxY = y; | |
37208 | } | |
37209 | else | |
37210 | { | |
37211 | m_isBBoxValid = true; | |
37212 | ||
37213 | m_minX = x; | |
37214 | m_minY = y; | |
37215 | m_maxX = x; | |
37216 | m_maxY = y; | |
37217 | } | |
37218 | } | |
37219 | ||
37220 | void ResetBoundingBox() | |
37221 | { | |
37222 | m_isBBoxValid = false; | |
37223 | ||
37224 | m_minX = m_maxX = m_minY = m_maxY = 0; | |
37225 | } | |
37226 | ||
37227 | ||
37228 | wxCoord MinX() const { return m_minX; } | |
37229 | wxCoord MaxX() const { return m_maxX; } | |
37230 | wxCoord MinY() const { return m_minY; } | |
37231 | wxCoord MaxY() const { return m_maxY; } | |
37232 | ||
37233 | ||
37234 | ||
37235 | ||
37236 | ||
37237 | void GetTextExtent(const wxString& string, | |
37238 | long *x, long *y, | |
37239 | long *descent = __null, | |
37240 | long *externalLeading = __null, | |
37241 | wxFont *theFont = __null) const | |
37242 | { | |
37243 | wxCoord x2, y2, descent2, externalLeading2; | |
37244 | DoGetTextExtent(string, &x2, &y2, | |
37245 | &descent2, &externalLeading2, | |
37246 | theFont); | |
37247 | if ( x ) | |
37248 | *x = x2; | |
37249 | if ( y ) | |
37250 | *y = y2; | |
37251 | if ( descent ) | |
37252 | *descent = descent2; | |
37253 | if ( externalLeading ) | |
37254 | *externalLeading = externalLeading2; | |
37255 | } | |
37256 | ||
37257 | void GetLogicalOrigin(long *x, long *y) const | |
37258 | { | |
37259 | wxCoord x2, y2; | |
37260 | DoGetLogicalOrigin(&x2, &y2); | |
37261 | if ( x ) | |
37262 | *x = x2; | |
37263 | if ( y ) | |
37264 | *y = y2; | |
37265 | } | |
37266 | ||
37267 | void GetDeviceOrigin(long *x, long *y) const | |
37268 | { | |
37269 | wxCoord x2, y2; | |
37270 | DoGetDeviceOrigin(&x2, &y2); | |
37271 | if ( x ) | |
37272 | *x = x2; | |
37273 | if ( y ) | |
37274 | *y = y2; | |
37275 | } | |
37276 | void GetClippingBox(long *x, long *y, long *w, long *h) const | |
37277 | { | |
37278 | wxCoord xx,yy,ww,hh; | |
37279 | DoGetClippingBox(&xx, &yy, &ww, &hh); | |
37280 | if (x) *x = xx; | |
37281 | if (y) *y = yy; | |
37282 | if (w) *w = ww; | |
37283 | if (h) *h = hh; | |
37284 | } | |
37285 | ||
37286 | ||
37287 | ||
37288 | virtual void ReservedDCFunc1() {} | |
37289 | virtual void ReservedDCFunc2() {} | |
37290 | virtual void ReservedDCFunc3() {} | |
37291 | virtual void ReservedDCFunc4() {} | |
37292 | virtual void ReservedDCFunc5() {} | |
37293 | virtual void ReservedDCFunc6() {} | |
37294 | virtual void ReservedDCFunc7() {} | |
37295 | virtual void ReservedDCFunc8() {} | |
37296 | virtual void ReservedDCFunc9() {} | |
37297 | ||
37298 | ||
37299 | protected: | |
37300 | ||
37301 | virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, | |
37302 | int style = wxFLOOD_SURFACE) = 0; | |
37303 | ||
37304 | virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const = 0; | |
37305 | ||
37306 | virtual void DoDrawPoint(wxCoord x, wxCoord y) = 0; | |
37307 | virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2) = 0; | |
37308 | ||
37309 | virtual void DoDrawArc(wxCoord x1, wxCoord y1, | |
37310 | wxCoord x2, wxCoord y2, | |
37311 | wxCoord xc, wxCoord yc) = 0; | |
37312 | virtual void DoDrawCheckMark(wxCoord x, wxCoord y, | |
37313 | wxCoord width, wxCoord height); | |
37314 | virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h, | |
37315 | double sa, double ea) = 0; | |
37316 | ||
37317 | virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height) = 0; | |
37318 | virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y, | |
37319 | wxCoord width, wxCoord height, | |
37320 | double radius) = 0; | |
37321 | virtual void DoDrawEllipse(wxCoord x, wxCoord y, | |
37322 | wxCoord width, wxCoord height) = 0; | |
37323 | ||
37324 | virtual void DoCrossHair(wxCoord x, wxCoord y) = 0; | |
37325 | ||
37326 | virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y) = 0; | |
37327 | virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, | |
37328 | bool useMask = false) = 0; | |
37329 | ||
37330 | virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y) = 0; | |
37331 | virtual void DoDrawRotatedText(const wxString& text, | |
37332 | wxCoord x, wxCoord y, double angle) = 0; | |
37333 | ||
37334 | virtual bool DoBlit(wxCoord xdest, wxCoord ydest, | |
37335 | wxCoord width, wxCoord height, | |
37336 | wxDC *source, wxCoord xsrc, wxCoord ysrc, | |
37337 | int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord) = 0; | |
37338 | ||
37339 | virtual void DoGetSize(int *width, int *height) const = 0; | |
37340 | virtual void DoGetSizeMM(int* width, int* height) const = 0; | |
37341 | ||
37342 | virtual void DoDrawLines(int n, wxPoint points[], | |
37343 | wxCoord xoffset, wxCoord yoffset) = 0; | |
37344 | virtual void DoDrawPolygon(int n, wxPoint points[], | |
37345 | wxCoord xoffset, wxCoord yoffset, | |
37346 | int fillStyle = wxODDEVEN_RULE) = 0; | |
37347 | virtual void DoDrawPolyPolygon(int n, int count[], wxPoint points[], | |
37348 | wxCoord xoffset, wxCoord yoffset, | |
37349 | int fillStyle); | |
37350 | ||
37351 | virtual void DoSetClippingRegionAsRegion(const wxRegion& region) = 0; | |
37352 | virtual void DoSetClippingRegion(wxCoord x, wxCoord y, | |
37353 | wxCoord width, wxCoord height) = 0; | |
37354 | ||
37355 | ||
37356 | ||
37357 | virtual void DoGetClippingRegion(wxCoord *x, wxCoord *y, | |
37358 | wxCoord *w, wxCoord *h) | |
37359 | { DoGetClippingBox(x, y, w, h); } | |
37360 | ||
37361 | ||
37362 | virtual void DoGetClippingBox(wxCoord *x, wxCoord *y, | |
37363 | wxCoord *w, wxCoord *h) const | |
37364 | { | |
37365 | if ( x ) | |
37366 | *x = m_clipX1; | |
37367 | if ( y ) | |
37368 | *y = m_clipY1; | |
37369 | if ( w ) | |
37370 | *w = m_clipX2 - m_clipX1; | |
37371 | if ( h ) | |
37372 | *h = m_clipY2 - m_clipY1; | |
37373 | } | |
37374 | ||
37375 | virtual void DoGetLogicalOrigin(wxCoord *x, wxCoord *y) const | |
37376 | { | |
37377 | if ( x ) *x = m_logicalOriginX; | |
37378 | if ( y ) *y = m_logicalOriginY; | |
37379 | } | |
37380 | ||
37381 | virtual void DoGetDeviceOrigin(wxCoord *x, wxCoord *y) const | |
37382 | { | |
37383 | if ( x ) *x = m_deviceOriginX; | |
37384 | if ( y ) *y = m_deviceOriginY; | |
37385 | } | |
37386 | ||
37387 | virtual void DoGetTextExtent(const wxString& string, | |
37388 | wxCoord *x, wxCoord *y, | |
37389 | wxCoord *descent = __null, | |
37390 | wxCoord *externalLeading = __null, | |
37391 | wxFont *theFont = __null) const = 0; | |
37392 | ||
37393 | virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const; | |
37394 | ||
37395 | ||
37396 | virtual void DoDrawSpline(wxList *points); | |
37397 | ||
37398 | ||
37399 | protected: | |
37400 | ||
37401 | void ResetClipping() | |
37402 | { | |
37403 | m_clipping = false; | |
37404 | ||
37405 | m_clipX1 = m_clipX2 = m_clipY1 = m_clipY2 = 0; | |
37406 | } | |
37407 | ||
37408 | ||
37409 | bool m_colour:1; | |
37410 | bool m_ok:1; | |
37411 | bool m_clipping:1; | |
37412 | bool m_isInteractive:1; | |
37413 | bool m_isBBoxValid:1; | |
37414 | ||
37415 | ||
37416 | ||
37417 | ||
37418 | ||
37419 | wxCoord m_logicalOriginX, m_logicalOriginY; | |
37420 | wxCoord m_deviceOriginX, m_deviceOriginY; | |
37421 | ||
37422 | double m_logicalScaleX, m_logicalScaleY; | |
37423 | double m_userScaleX, m_userScaleY; | |
37424 | double m_scaleX, m_scaleY; | |
37425 | ||
37426 | ||
37427 | int m_signX, m_signY; | |
37428 | ||
37429 | ||
37430 | wxCoord m_minX, m_minY, m_maxX, m_maxY; | |
37431 | wxCoord m_clipX1, m_clipY1, m_clipX2, m_clipY2; | |
37432 | ||
37433 | int m_logicalFunction; | |
37434 | int m_backgroundMode; | |
37435 | int m_mappingMode; | |
37436 | ||
37437 | ||
37438 | wxPen m_pen; | |
37439 | wxBrush m_brush; | |
37440 | wxBrush m_backgroundBrush; | |
37441 | wxColour m_textForegroundColour; | |
37442 | wxColour m_textBackgroundColour; | |
37443 | wxFont m_font; | |
37444 | ||
37445 | ||
37446 | wxPalette m_palette; | |
37447 | bool m_hasCustomPalette; | |
37448 | ||
37449 | ||
37450 | private: | |
37451 | private: wxDCBase(const wxDCBase&); wxDCBase& operator=(const wxDCBase&); | |
37452 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; | |
37453 | }; | |
37454 | # 814 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dc.h" | |
37455 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/dc.h" 1 | |
37456 | # 22 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/dc.h" | |
37457 | class wxDC; | |
37458 | # 43 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/dc.h" | |
37459 | class wxDC : public wxDCBase | |
37460 | { | |
37461 | public: | |
37462 | wxDC(); | |
37463 | ~wxDC() { } | |
37464 | ||
37465 | ||
37466 | void SetColourMap( const wxPalette& palette ) { SetPalette(palette); }; | |
37467 | ||
37468 | ||
37469 | ||
37470 | virtual wxSize GetPPI() const; | |
37471 | ||
37472 | virtual bool StartDoc( const wxString& ) { return true; } | |
37473 | virtual void EndDoc() { } | |
37474 | virtual void StartPage() { } | |
37475 | virtual void EndPage() { } | |
37476 | ||
37477 | virtual void SetMapMode( int mode ); | |
37478 | virtual void SetUserScale( double x, double y ); | |
37479 | virtual void SetLogicalScale( double x, double y ); | |
37480 | virtual void SetLogicalOrigin( wxCoord x, wxCoord y ); | |
37481 | virtual void SetDeviceOrigin( wxCoord x, wxCoord y ); | |
37482 | ||
37483 | virtual void SetAxisOrientation( bool xLeftRight, bool yBottomUp ); | |
37484 | ||
37485 | ||
37486 | ||
37487 | ||
37488 | virtual void ComputeScaleAndOrigin(); | |
37489 | ||
37490 | wxCoord XDEV2LOG(wxCoord x) const | |
37491 | { | |
37492 | wxCoord new_x = x - m_deviceOriginX; | |
37493 | if (new_x > 0) | |
37494 | return (wxCoord)((double)(new_x) / m_scaleX + 0.5) * m_signX + m_logicalOriginX; | |
37495 | else | |
37496 | return (wxCoord)((double)(new_x) / m_scaleX - 0.5) * m_signX + m_logicalOriginX; | |
37497 | } | |
37498 | wxCoord XDEV2LOGREL(wxCoord x) const | |
37499 | { | |
37500 | if (x > 0) | |
37501 | return (wxCoord)((double)(x) / m_scaleX + 0.5); | |
37502 | else | |
37503 | return (wxCoord)((double)(x) / m_scaleX - 0.5); | |
37504 | } | |
37505 | wxCoord YDEV2LOG(wxCoord y) const | |
37506 | { | |
37507 | wxCoord new_y = y - m_deviceOriginY; | |
37508 | if (new_y > 0) | |
37509 | return (wxCoord)((double)(new_y) / m_scaleY + 0.5) * m_signY + m_logicalOriginY; | |
37510 | else | |
37511 | return (wxCoord)((double)(new_y) / m_scaleY - 0.5) * m_signY + m_logicalOriginY; | |
37512 | } | |
37513 | wxCoord YDEV2LOGREL(wxCoord y) const | |
37514 | { | |
37515 | if (y > 0) | |
37516 | return (wxCoord)((double)(y) / m_scaleY + 0.5); | |
37517 | else | |
37518 | return (wxCoord)((double)(y) / m_scaleY - 0.5); | |
37519 | } | |
37520 | wxCoord XLOG2DEV(wxCoord x) const | |
37521 | { | |
37522 | wxCoord new_x = x - m_logicalOriginX; | |
37523 | if (new_x > 0) | |
37524 | return (wxCoord)((double)(new_x) * m_scaleX + 0.5) * m_signX + m_deviceOriginX; | |
37525 | else | |
37526 | return (wxCoord)((double)(new_x) * m_scaleX - 0.5) * m_signX + m_deviceOriginX; | |
37527 | } | |
37528 | wxCoord XLOG2DEVREL(wxCoord x) const | |
37529 | { | |
37530 | if (x > 0) | |
37531 | return (wxCoord)((double)(x) * m_scaleX + 0.5); | |
37532 | else | |
37533 | return (wxCoord)((double)(x) * m_scaleX - 0.5); | |
37534 | } | |
37535 | wxCoord YLOG2DEV(wxCoord y) const | |
37536 | { | |
37537 | wxCoord new_y = y - m_logicalOriginY; | |
37538 | if (new_y > 0) | |
37539 | return (wxCoord)((double)(new_y) * m_scaleY + 0.5) * m_signY + m_deviceOriginY; | |
37540 | else | |
37541 | return (wxCoord)((double)(new_y) * m_scaleY - 0.5) * m_signY + m_deviceOriginY; | |
37542 | } | |
37543 | wxCoord YLOG2DEVREL(wxCoord y) const | |
37544 | { | |
37545 | if (y > 0) | |
37546 | return (wxCoord)((double)(y) * m_scaleY + 0.5); | |
37547 | else | |
37548 | return (wxCoord)((double)(y) * m_scaleY - 0.5); | |
37549 | } | |
37550 | ||
37551 | protected: | |
37552 | ||
37553 | virtual void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height); | |
37554 | virtual void DoGetSizeMM(int* width, int* height) const; | |
37555 | ||
37556 | public: | |
37557 | ||
37558 | ||
37559 | ||
37560 | ||
37561 | double m_mm_to_pix_x, | |
37562 | m_mm_to_pix_y; | |
37563 | ||
37564 | bool m_needComputeScaleX, | |
37565 | m_needComputeScaleY; | |
37566 | ||
37567 | ||
37568 | private: | |
37569 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; | |
37570 | }; | |
37571 | # 815 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dc.h" 2 | |
37572 | # 832 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dc.h" | |
37573 | class wxDCTextColourChanger | |
37574 | { | |
37575 | public: | |
37576 | wxDCTextColourChanger(wxDC& dc) : m_dc(dc), m_colFgOld() { } | |
37577 | ||
37578 | ~wxDCTextColourChanger() | |
37579 | { | |
37580 | if ( m_colFgOld.Ok() ) | |
37581 | m_dc.SetTextForeground(m_colFgOld); | |
37582 | } | |
37583 | ||
37584 | void Set(const wxColour& col) | |
37585 | { | |
37586 | if ( !m_colFgOld.Ok() ) | |
37587 | m_colFgOld = m_dc.GetTextForeground(); | |
37588 | m_dc.SetTextForeground(col); | |
37589 | } | |
37590 | ||
37591 | private: | |
37592 | wxDC& m_dc; | |
37593 | ||
37594 | wxColour m_colFgOld; | |
37595 | ||
37596 | private: wxDCTextColourChanger(const wxDCTextColourChanger&); wxDCTextColourChanger& operator=(const wxDCTextColourChanger&); | |
37597 | }; | |
37598 | ||
37599 | ||
37600 | ||
37601 | ||
37602 | ||
37603 | ||
37604 | class wxDCClipper | |
37605 | { | |
37606 | public: | |
37607 | wxDCClipper(wxDC& dc, const wxRect& r) : m_dc(dc) | |
37608 | { dc.SetClippingRegion(r.x, r.y, r.width, r.height); } | |
37609 | wxDCClipper(wxDC& dc, wxCoord x, wxCoord y, wxCoord w, wxCoord h) : m_dc(dc) | |
37610 | { dc.SetClippingRegion(x, y, w, h); } | |
37611 | ||
37612 | ~wxDCClipper() { m_dc.DestroyClippingRegion(); } | |
37613 | ||
37614 | private: | |
37615 | wxDC& m_dc; | |
37616 | ||
37617 | private: wxDCClipper(const wxDCClipper&); wxDCClipper& operator=(const wxDCClipper&); | |
37618 | }; | |
37619 | # 34 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
37620 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dcclient.h" 1 | |
37621 | # 22 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dcclient.h" | |
37622 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/dcclient.h" 1 | |
37623 | # 17 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/dcclient.h" | |
37624 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dc.h" 1 | |
37625 | # 18 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/dcclient.h" 2 | |
37626 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/window.h" 1 | |
37627 | # 19 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/dcclient.h" 2 | |
37628 | ||
37629 | ||
37630 | ||
37631 | ||
37632 | ||
37633 | class wxWindowDC; | |
37634 | class wxPaintDC; | |
37635 | class wxClientDC; | |
37636 | ||
37637 | ||
37638 | ||
37639 | ||
37640 | ||
37641 | class wxWindowDC : public wxDC | |
37642 | { | |
37643 | public: | |
37644 | wxWindowDC(); | |
37645 | wxWindowDC( wxWindow *win ); | |
37646 | ||
37647 | virtual ~wxWindowDC(); | |
37648 | ||
37649 | virtual bool CanDrawBitmap() const { return true; } | |
37650 | virtual bool CanGetTextExtent() const { return true; } | |
37651 | ||
37652 | protected: | |
37653 | virtual void DoGetSize(int *width, int *height) const; | |
37654 | virtual bool DoFloodFill( wxCoord x, wxCoord y, const wxColour& col, int style=wxFLOOD_SURFACE ); | |
37655 | virtual bool DoGetPixel( wxCoord x1, wxCoord y1, wxColour *col ) const; | |
37656 | ||
37657 | virtual void DoDrawLine( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2 ); | |
37658 | virtual void DoCrossHair( wxCoord x, wxCoord y ); | |
37659 | virtual void DoDrawArc( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, | |
37660 | wxCoord xc, wxCoord yc ); | |
37661 | virtual void DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord width, wxCoord height, | |
37662 | double sa, double ea ); | |
37663 | virtual void DoDrawPoint( wxCoord x, wxCoord y ); | |
37664 | ||
37665 | virtual void DoDrawLines(int n, wxPoint points[], | |
37666 | wxCoord xoffset, wxCoord yoffset); | |
37667 | virtual void DoDrawPolygon(int n, wxPoint points[], | |
37668 | wxCoord xoffset, wxCoord yoffset, | |
37669 | int fillStyle = wxODDEVEN_RULE); | |
37670 | ||
37671 | virtual void DoDrawRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoord height ); | |
37672 | virtual void DoDrawRoundedRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20.0 ); | |
37673 | virtual void DoDrawEllipse( wxCoord x, wxCoord y, wxCoord width, wxCoord height ); | |
37674 | ||
37675 | virtual void DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y ); | |
37676 | virtual void DoDrawBitmap( const wxBitmap &bitmap, wxCoord x, wxCoord y, | |
37677 | bool useMask = false ); | |
37678 | ||
37679 | virtual bool DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, | |
37680 | wxDC *source, wxCoord xsrc, wxCoord ysrc, | |
37681 | int logical_func = wxCOPY, bool useMask = false, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1 ); | |
37682 | ||
37683 | virtual void DoDrawText( const wxString &text, wxCoord x, wxCoord y ); | |
37684 | virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, | |
37685 | double angle); | |
37686 | virtual void DoGetTextExtent( const wxString &string, | |
37687 | wxCoord *width, wxCoord *height, | |
37688 | wxCoord *descent = (wxCoord *) __null, | |
37689 | wxCoord *externalLeading = (wxCoord *) __null, | |
37690 | wxFont *theFont = (wxFont *) __null) const; | |
37691 | ||
37692 | public: | |
37693 | virtual wxCoord GetCharWidth() const; | |
37694 | virtual wxCoord GetCharHeight() const; | |
37695 | ||
37696 | virtual void Clear(); | |
37697 | ||
37698 | virtual void SetFont( const wxFont &font ); | |
37699 | virtual void SetPen( const wxPen &pen ); | |
37700 | virtual void SetBrush( const wxBrush &brush ); | |
37701 | virtual void SetBackground( const wxBrush &brush ); | |
37702 | virtual void SetLogicalFunction( int function ); | |
37703 | virtual void SetTextForeground( const wxColour &col ); | |
37704 | virtual void SetTextBackground( const wxColour &col ); | |
37705 | virtual void SetBackgroundMode( int mode ); | |
37706 | virtual void SetPalette( const wxPalette& palette ); | |
37707 | ||
37708 | virtual void DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height ); | |
37709 | virtual void DestroyClippingRegion(); | |
37710 | virtual void DoSetClippingRegionAsRegion( const wxRegion ®ion ); | |
37711 | ||
37712 | ||
37713 | virtual wxSize GetPPI() const; | |
37714 | virtual int GetDepth() const; | |
37715 | ||
37716 | ||
37717 | ||
37718 | ||
37719 | GdkWindow *m_window; | |
37720 | GdkGC *m_penGC; | |
37721 | GdkGC *m_brushGC; | |
37722 | GdkGC *m_textGC; | |
37723 | GdkGC *m_bgGC; | |
37724 | GdkColormap *m_cmap; | |
37725 | bool m_isMemDC; | |
37726 | bool m_isScreenDC; | |
37727 | wxWindow *m_owner; | |
37728 | wxRegion m_currentClippingRegion; | |
37729 | wxRegion m_paintClippingRegion; | |
37730 | ||
37731 | ||
37732 | ||
37733 | PangoContext *m_context; | |
37734 | PangoLayout *m_layout; | |
37735 | PangoFontDescription *m_fontdesc; | |
37736 | ||
37737 | ||
37738 | void SetUpDC(); | |
37739 | void Destroy(); | |
37740 | virtual void ComputeScaleAndOrigin(); | |
37741 | ||
37742 | GdkWindow *GetWindow() { return m_window; } | |
37743 | ||
37744 | private: | |
37745 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
37746 | }; | |
37747 | ||
37748 | ||
37749 | ||
37750 | ||
37751 | ||
37752 | class wxClientDC : public wxWindowDC | |
37753 | { | |
37754 | public: | |
37755 | wxClientDC() { } | |
37756 | wxClientDC( wxWindow *win ); | |
37757 | ||
37758 | protected: | |
37759 | virtual void DoGetSize(int *width, int *height) const; | |
37760 | ||
37761 | private: | |
37762 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
37763 | }; | |
37764 | ||
37765 | ||
37766 | ||
37767 | ||
37768 | ||
37769 | class wxPaintDC : public wxClientDC | |
37770 | { | |
37771 | public: | |
37772 | wxPaintDC() { } | |
37773 | wxPaintDC( wxWindow *win ); | |
37774 | ||
37775 | private: | |
37776 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
37777 | }; | |
37778 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dcclient.h" 2 | |
37779 | # 35 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
37780 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dcmemory.h" 1 | |
37781 | # 22 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dcmemory.h" | |
37782 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/dcmemory.h" 1 | |
37783 | # 19 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/dcmemory.h" | |
37784 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dcclient.h" 1 | |
37785 | # 20 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/dcmemory.h" 2 | |
37786 | ||
37787 | ||
37788 | ||
37789 | ||
37790 | ||
37791 | class wxMemoryDC; | |
37792 | ||
37793 | ||
37794 | ||
37795 | ||
37796 | ||
37797 | class wxMemoryDC : public wxWindowDC | |
37798 | { | |
37799 | public: | |
37800 | wxMemoryDC(); | |
37801 | wxMemoryDC( wxDC *dc ); | |
37802 | ~wxMemoryDC(); | |
37803 | virtual void SelectObject( const wxBitmap& bitmap ); | |
37804 | void DoGetSize( int *width, int *height ) const; | |
37805 | ||
37806 | ||
37807 | ||
37808 | ||
37809 | ||
37810 | virtual void SetPen( const wxPen &pen ); | |
37811 | virtual void SetBrush( const wxBrush &brush ); | |
37812 | virtual void SetBackground( const wxBrush &brush ); | |
37813 | virtual void SetTextForeground( const wxColour &col ); | |
37814 | virtual void SetTextBackground( const wxColour &col ); | |
37815 | ||
37816 | ||
37817 | wxBitmap m_selected; | |
37818 | ||
37819 | private: | |
37820 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
37821 | }; | |
37822 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dcmemory.h" 2 | |
37823 | # 36 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
37824 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dcprint.h" 1 | |
37825 | # 37 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
37826 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dcscreen.h" 1 | |
37827 | # 22 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dcscreen.h" | |
37828 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/dcscreen.h" 1 | |
37829 | # 19 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/dcscreen.h" | |
37830 | class wxScreenDC; | |
37831 | ||
37832 | ||
37833 | ||
37834 | ||
37835 | ||
37836 | class wxScreenDC : public wxPaintDC | |
37837 | { | |
37838 | public: | |
37839 | wxScreenDC(); | |
37840 | virtual ~wxScreenDC(); | |
37841 | ||
37842 | static bool StartDrawingOnTop( wxWindow *window ); | |
37843 | static bool StartDrawingOnTop( wxRect *rect = (wxRect *) __null ); | |
37844 | static bool EndDrawingOnTop(); | |
37845 | ||
37846 | ||
37847 | ||
37848 | static GdkWindow *sm_overlayWindow; | |
37849 | static int sm_overlayWindowX; | |
37850 | static int sm_overlayWindowY; | |
37851 | ||
37852 | protected: | |
37853 | virtual void DoGetSize(int *width, int *height) const; | |
37854 | ||
37855 | private: | |
37856 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
37857 | }; | |
37858 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dcscreen.h" 2 | |
37859 | # 38 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
37860 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/button.h" 1 | |
37861 | # 46 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/button.h" | |
37862 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/control.h" 1 | |
37863 | # 29 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/control.h" | |
37864 | extern const wxChar* wxControlNameStr; | |
37865 | ||
37866 | ||
37867 | ||
37868 | ||
37869 | ||
37870 | class wxControlBase : public wxWindow | |
37871 | { | |
37872 | public: | |
37873 | wxControlBase() { } | |
37874 | ||
37875 | virtual ~wxControlBase(); | |
37876 | ||
37877 | ||
37878 | bool Create(wxWindow *parent, wxWindowID id, | |
37879 | const wxPoint& pos = wxDefaultPosition, | |
37880 | const wxSize& size = wxDefaultSize, | |
37881 | long style = 0, | |
37882 | const wxValidator& validator = wxDefaultValidator, | |
37883 | const wxString& name = wxControlNameStr); | |
37884 | ||
37885 | ||
37886 | int GetAlignment() const { return m_windowStyle & wxALIGN_MASK; } | |
37887 | ||
37888 | ||
37889 | ||
37890 | ||
37891 | ||
37892 | virtual bool ShouldInheritColours() const { return true; } | |
37893 | ||
37894 | ||
37895 | ||
37896 | ||
37897 | ||
37898 | ||
37899 | virtual void Command(wxCommandEvent &event); | |
37900 | ||
37901 | virtual void SetLabel( const wxString &label ); | |
37902 | virtual bool SetFont(const wxFont& font); | |
37903 | ||
37904 | ||
37905 | ||
37906 | virtual void ReservedControlFunc1() {} | |
37907 | virtual void ReservedControlFunc2() {} | |
37908 | virtual void ReservedControlFunc3() {} | |
37909 | virtual void ReservedControlFunc4() {} | |
37910 | virtual void ReservedControlFunc5() {} | |
37911 | virtual void ReservedControlFunc6() {} | |
37912 | virtual void ReservedControlFunc7() {} | |
37913 | virtual void ReservedControlFunc8() {} | |
37914 | virtual void ReservedControlFunc9() {} | |
37915 | ||
37916 | ||
37917 | protected: | |
37918 | ||
37919 | ||
37920 | bool CreateControl(wxWindowBase *parent, | |
37921 | wxWindowID id, | |
37922 | const wxPoint& pos, | |
37923 | const wxSize& size, | |
37924 | long style, | |
37925 | const wxValidator& validator, | |
37926 | const wxString& name); | |
37927 | ||
37928 | ||
37929 | void InitCommandEvent(wxCommandEvent& event) const; | |
37930 | ||
37931 | ||
37932 | ||
37933 | ||
37934 | ||
37935 | ||
37936 | ||
37937 | virtual void SetInitialBestSize(const wxSize& size) | |
37938 | { | |
37939 | SetBestSize(size); | |
37940 | } | |
37941 | ||
37942 | private: wxControlBase(const wxControlBase&); wxControlBase& operator=(const wxControlBase&); | |
37943 | }; | |
37944 | # 123 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/control.h" | |
37945 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/control.h" 1 | |
37946 | # 26 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/control.h" | |
37947 | class wxControl; | |
37948 | ||
37949 | ||
37950 | ||
37951 | ||
37952 | ||
37953 | ||
37954 | extern "C" { | |
37955 | typedef GtkWidget* (*wxGtkWidgetNew_t)(void); | |
37956 | typedef GtkWidget* (*wxGtkWidgetNewFromStr_t)(const gchar*); | |
37957 | typedef GtkWidget* (*wxGtkWidgetNewFromAdj_t)(GtkAdjustment*); | |
37958 | } | |
37959 | ||
37960 | class wxControl : public wxControlBase | |
37961 | { | |
37962 | public: | |
37963 | wxControl(); | |
37964 | wxControl(wxWindow *parent, wxWindowID id, | |
37965 | const wxPoint& pos = wxDefaultPosition, | |
37966 | const wxSize& size = wxDefaultSize, long style = 0, | |
37967 | const wxValidator& validator = wxDefaultValidator, | |
37968 | const wxString& name = wxControlNameStr) | |
37969 | { | |
37970 | Create(parent, id, pos, size, style, validator, name); | |
37971 | } | |
37972 | ||
37973 | bool Create(wxWindow *parent, wxWindowID id, | |
37974 | const wxPoint& pos = wxDefaultPosition, | |
37975 | const wxSize& size = wxDefaultSize, long style = 0, | |
37976 | const wxValidator& validator = wxDefaultValidator, | |
37977 | const wxString& name = wxControlNameStr); | |
37978 | ||
37979 | ||
37980 | ||
37981 | virtual void SetLabel( const wxString &label ); | |
37982 | virtual wxString GetLabel() const; | |
37983 | ||
37984 | virtual wxVisualAttributes GetDefaultAttributes() const; | |
37985 | ||
37986 | protected: | |
37987 | virtual wxSize DoGetBestSize() const; | |
37988 | void PostCreation(const wxSize& size); | |
37989 | ||
37990 | ||
37991 | wxString PrepareLabelMnemonics( const wxString &label ) const; | |
37992 | ||
37993 | ||
37994 | ||
37995 | static wxVisualAttributes | |
37996 | GetDefaultAttributesFromGTKWidget(GtkWidget* widget, | |
37997 | bool useBase = false, | |
37998 | int state = -1); | |
37999 | static wxVisualAttributes | |
38000 | GetDefaultAttributesFromGTKWidget(wxGtkWidgetNew_t, | |
38001 | bool useBase = false, | |
38002 | int state = -1); | |
38003 | static wxVisualAttributes | |
38004 | GetDefaultAttributesFromGTKWidget(wxGtkWidgetNewFromStr_t, | |
38005 | bool useBase = false, | |
38006 | int state = -1); | |
38007 | ||
38008 | static wxVisualAttributes | |
38009 | GetDefaultAttributesFromGTKWidget(wxGtkWidgetNewFromAdj_t, | |
38010 | bool useBase = false, | |
38011 | int state = -1); | |
38012 | ||
38013 | ||
38014 | ||
38015 | virtual bool UseGTKStyleBase() const { return false; } | |
38016 | ||
38017 | wxString m_label; | |
38018 | char m_chAccel; | |
38019 | ||
38020 | private: | |
38021 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
38022 | }; | |
38023 | # 124 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/control.h" 2 | |
38024 | # 47 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/button.h" 2 | |
38025 | ||
38026 | class wxBitmap; | |
38027 | ||
38028 | extern const wxChar* wxButtonNameStr; | |
38029 | ||
38030 | ||
38031 | ||
38032 | ||
38033 | ||
38034 | class wxButtonBase : public wxControl | |
38035 | { | |
38036 | public: | |
38037 | wxButtonBase() { } | |
38038 | ||
38039 | ||
38040 | virtual void SetImageLabel(const wxBitmap& ) { } | |
38041 | ||
38042 | ||
38043 | virtual void SetImageMargins(wxCoord , wxCoord ) { } | |
38044 | ||
38045 | ||
38046 | ||
38047 | virtual void SetDefault() { } | |
38048 | ||
38049 | ||
38050 | ||
38051 | ||
38052 | virtual bool ShouldInheritColours() const { return false; } | |
38053 | ||
38054 | ||
38055 | static wxSize GetDefaultSize(); | |
38056 | ||
38057 | protected: | |
38058 | private: wxButtonBase(const wxButtonBase&); wxButtonBase& operator=(const wxButtonBase&); | |
38059 | }; | |
38060 | # 90 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/button.h" | |
38061 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/button.h" 1 | |
38062 | # 20 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/button.h" | |
38063 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/control.h" 1 | |
38064 | # 21 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/button.h" 2 | |
38065 | ||
38066 | ||
38067 | ||
38068 | ||
38069 | ||
38070 | class wxButton; | |
38071 | ||
38072 | ||
38073 | ||
38074 | ||
38075 | ||
38076 | extern const wxChar *wxButtonNameStr; | |
38077 | ||
38078 | ||
38079 | ||
38080 | ||
38081 | ||
38082 | class wxButton: public wxButtonBase | |
38083 | { | |
38084 | public: | |
38085 | wxButton(); | |
38086 | wxButton(wxWindow *parent, wxWindowID id, | |
38087 | const wxString& label = wxEmptyString, | |
38088 | const wxPoint& pos = wxDefaultPosition, | |
38089 | const wxSize& size = wxDefaultSize, long style = 0, | |
38090 | const wxValidator& validator = wxDefaultValidator, | |
38091 | const wxString& name = wxButtonNameStr) | |
38092 | { | |
38093 | Create(parent, id, label, pos, size, style, validator, name); | |
38094 | } | |
38095 | ||
38096 | virtual ~wxButton(); | |
38097 | ||
38098 | bool Create(wxWindow *parent, wxWindowID id, | |
38099 | const wxString& label = wxEmptyString, | |
38100 | const wxPoint& pos = wxDefaultPosition, | |
38101 | const wxSize& size = wxDefaultSize, long style = 0, | |
38102 | const wxValidator& validator = wxDefaultValidator, | |
38103 | const wxString& name = wxButtonNameStr); | |
38104 | ||
38105 | virtual void SetDefault(); | |
38106 | virtual void SetLabel( const wxString &label ); | |
38107 | virtual bool Enable( bool enable = 1 ); | |
38108 | ||
38109 | ||
38110 | ||
38111 | ||
38112 | void DoApplyWidgetStyle(GtkRcStyle *style); | |
38113 | bool IsOwnGtkWindow( GdkWindow *window ); | |
38114 | ||
38115 | ||
38116 | ||
38117 | virtual bool ShouldInheritColours() const { return false; } | |
38118 | ||
38119 | static wxVisualAttributes | |
38120 | GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); | |
38121 | ||
38122 | protected: | |
38123 | virtual wxSize DoGetBestSize() const; | |
38124 | ||
38125 | private: | |
38126 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
38127 | }; | |
38128 | # 91 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/button.h" 2 | |
38129 | # 39 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
38130 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/menu.h" 1 | |
38131 | # 32 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/menu.h" | |
38132 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/menuitem.h" 1 | |
38133 | # 29 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/menuitem.h" | |
38134 | class wxAcceleratorEntry; | |
38135 | class wxMenuItem; | |
38136 | class wxMenu; | |
38137 | ||
38138 | ||
38139 | ||
38140 | ||
38141 | ||
38142 | ||
38143 | class wxMenuItemBase : public wxObject | |
38144 | { | |
38145 | public: | |
38146 | ||
38147 | static wxMenuItem *New(wxMenu *parentMenu = (wxMenu *)__null, | |
38148 | int itemid = wxID_SEPARATOR, | |
38149 | const wxString& text = wxEmptyString, | |
38150 | const wxString& help = wxEmptyString, | |
38151 | wxItemKind kind = wxITEM_NORMAL, | |
38152 | wxMenu *subMenu = (wxMenu *)__null); | |
38153 | ||
38154 | ||
38155 | virtual ~wxMenuItemBase(); | |
38156 | ||
38157 | ||
38158 | wxMenu *GetMenu() const { return m_parentMenu; } | |
38159 | void SetMenu(wxMenu* menu) { m_parentMenu = menu; } | |
38160 | ||
38161 | ||
38162 | void SetId(int itemid) { m_id = itemid; } | |
38163 | int GetId() const { return m_id; } | |
38164 | bool IsSeparator() const { return m_id == wxID_SEPARATOR; } | |
38165 | ||
38166 | ||
38167 | ||
38168 | ||
38169 | ||
38170 | ||
38171 | ||
38172 | virtual void SetText(const wxString& str) { m_text = str; } | |
38173 | wxString GetLabel() const { return GetLabelFromText(m_text); } | |
38174 | const wxString& GetText() const { return m_text; } | |
38175 | ||
38176 | ||
38177 | static wxString GetLabelFromText(const wxString& text); | |
38178 | ||
38179 | ||
38180 | wxItemKind GetKind() const { return m_kind; } | |
38181 | void SetKind(wxItemKind kind) { m_kind = kind; } | |
38182 | ||
38183 | virtual void SetCheckable(bool checkable) { m_kind = checkable ? wxITEM_CHECK : wxITEM_NORMAL; } | |
38184 | bool IsCheckable() const | |
38185 | { return m_kind == wxITEM_CHECK || m_kind == wxITEM_RADIO; } | |
38186 | ||
38187 | bool IsSubMenu() const { return m_subMenu != __null; } | |
38188 | void SetSubMenu(wxMenu *menu) { m_subMenu = menu; } | |
38189 | wxMenu *GetSubMenu() const { return m_subMenu; } | |
38190 | ||
38191 | ||
38192 | virtual void Enable(bool enable = true) { m_isEnabled = enable; } | |
38193 | virtual bool IsEnabled() const { return m_isEnabled; } | |
38194 | ||
38195 | virtual void Check(bool check = true) { m_isChecked = check; } | |
38196 | virtual bool IsChecked() const { return m_isChecked; } | |
38197 | void Toggle() { Check(!m_isChecked); } | |
38198 | ||
38199 | ||
38200 | void SetHelp(const wxString& str) { m_help = str; } | |
38201 | const wxString& GetHelp() const { return m_help; } | |
38202 | ||
38203 | ||
38204 | ||
38205 | ||
38206 | static wxAcceleratorEntry *GetAccelFromString(const wxString& label); | |
38207 | ||
38208 | ||
38209 | virtual wxAcceleratorEntry *GetAccel() const; | |
38210 | ||
38211 | ||
38212 | ||
38213 | virtual void SetAccel(wxAcceleratorEntry *accel); | |
38214 | ||
38215 | ||
38216 | ||
38217 | void SetName(const wxString& str) { SetText(str); } | |
38218 | const wxString& GetName() const { return GetText(); } | |
38219 | ||
38220 | static wxMenuItem *New(wxMenu *parentMenu, | |
38221 | int itemid, | |
38222 | const wxString& text, | |
38223 | const wxString& help, | |
38224 | bool isCheckable, | |
38225 | wxMenu *subMenu = (wxMenu *)__null) | |
38226 | { | |
38227 | return New(parentMenu, itemid, text, help, | |
38228 | isCheckable ? wxITEM_CHECK : wxITEM_NORMAL, subMenu); | |
38229 | } | |
38230 | ||
38231 | protected: | |
38232 | int m_id; | |
38233 | wxMenu *m_parentMenu, | |
38234 | *m_subMenu; | |
38235 | wxString m_text, | |
38236 | m_help; | |
38237 | wxItemKind m_kind; | |
38238 | bool m_isChecked; | |
38239 | bool m_isEnabled; | |
38240 | ||
38241 | ||
38242 | wxMenuItemBase(wxMenu *parentMenu = (wxMenu *)__null, | |
38243 | int itemid = wxID_SEPARATOR, | |
38244 | const wxString& text = wxEmptyString, | |
38245 | const wxString& help = wxEmptyString, | |
38246 | wxItemKind kind = wxITEM_NORMAL, | |
38247 | wxMenu *subMenu = (wxMenu *)__null); | |
38248 | ||
38249 | private: | |
38250 | ||
38251 | ||
38252 | wxMenuItemBase(const wxMenuItemBase& item); | |
38253 | wxMenuItemBase& operator=(const wxMenuItemBase& item); | |
38254 | }; | |
38255 | # 167 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/menuitem.h" | |
38256 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/menuitem.h" 1 | |
38257 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/menuitem.h" | |
38258 | class wxMenuItem : public wxMenuItemBase | |
38259 | { | |
38260 | public: | |
38261 | wxMenuItem(wxMenu *parentMenu = (wxMenu *)__null, | |
38262 | int id = wxID_SEPARATOR, | |
38263 | const wxString& text = wxEmptyString, | |
38264 | const wxString& help = wxEmptyString, | |
38265 | wxItemKind kind = wxITEM_NORMAL, | |
38266 | wxMenu *subMenu = (wxMenu *)__null); | |
38267 | ~wxMenuItem(); | |
38268 | ||
38269 | ||
38270 | virtual void SetText( const wxString& str ); | |
38271 | virtual void Enable( bool enable = 1 ); | |
38272 | virtual void Check( bool check = 1 ); | |
38273 | virtual bool IsChecked() const; | |
38274 | virtual void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; } | |
38275 | virtual const wxBitmap& GetBitmap() const { return m_bitmap; } | |
38276 | ||
38277 | ||
38278 | virtual wxAcceleratorEntry *GetAccel() const; | |
38279 | ||
38280 | ||
38281 | ||
38282 | void SetMenuItem(GtkWidget *menuItem) { m_menuItem = menuItem; } | |
38283 | GtkWidget *GetMenuItem() const { return m_menuItem; } | |
38284 | GtkWidget *GetLabelWidget() const { return m_labelWidget; } | |
38285 | void SetLabelWidget(GtkWidget *labelWidget) { m_labelWidget = labelWidget; } | |
38286 | wxString GetFactoryPath() const; | |
38287 | ||
38288 | wxString GetHotKey() const { return m_hotKey; } | |
38289 | ||
38290 | ||
38291 | wxMenuItem(wxMenu *parentMenu, | |
38292 | int id, | |
38293 | const wxString& text, | |
38294 | const wxString& help, | |
38295 | bool isCheckable, | |
38296 | wxMenu *subMenu = (wxMenu *)__null); | |
38297 | ||
38298 | private: | |
38299 | ||
38300 | void Init(const wxString& text); | |
38301 | ||
38302 | ||
38303 | ||
38304 | void DoSetText(const wxString& text); | |
38305 | ||
38306 | wxString m_hotKey; | |
38307 | wxBitmap m_bitmap; | |
38308 | ||
38309 | GtkWidget *m_menuItem; | |
38310 | GtkWidget* m_labelWidget; | |
38311 | ||
38312 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
38313 | }; | |
38314 | # 168 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/menuitem.h" 2 | |
38315 | # 33 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/menu.h" 2 | |
38316 | ||
38317 | class wxMenu; | |
38318 | class wxMenuBarBase; | |
38319 | class wxMenuBar; | |
38320 | class wxMenuItem; | |
38321 | ||
38322 | ||
38323 | typedef wxMenu _WX_LIST_ITEM_TYPE_wxMenuList; typedef int (*wxSortFuncFor_wxMenuList)(const wxMenu **, const wxMenu **); class wxwxMenuListNode : public wxNodeBase { public: wxwxMenuListNode(wxListBase *list = (wxListBase *)__null, wxwxMenuListNode *previous = (wxwxMenuListNode *)__null, wxwxMenuListNode *next = (wxwxMenuListNode *)__null, wxMenu *data = (wxMenu *)__null, const wxListKey& key = wxDefaultListKey) : wxNodeBase(list, previous, next, data, key) { } wxwxMenuListNode *GetNext() const { return (wxwxMenuListNode *)wxNodeBase::GetNext(); } wxwxMenuListNode *GetPrevious() const { return (wxwxMenuListNode *)wxNodeBase::GetPrevious(); } wxMenu *GetData() const { return (wxMenu *)wxNodeBase::GetData(); } void SetData(wxMenu *data) { wxNodeBase::SetData(data); } protected: virtual void DeleteData(); private: wxwxMenuListNode(const wxwxMenuListNode&); wxwxMenuListNode& operator=(const wxwxMenuListNode&); }; class wxMenuList : public wxListBase { public: typedef wxwxMenuListNode Node; typedef Node* compatibility_iterator; wxMenuList(wxKeyType keyType = wxKEY_NONE) : wxListBase(keyType) { } wxMenuList(const wxMenuList& list) : wxListBase(list.GetKeyType()) { Assign(list); } wxMenuList(size_t count, wxMenu *elements[]) : wxListBase(count, (void **)elements) { } wxMenuList& operator=(const wxMenuList& list) { Assign(list); return *this; } wxwxMenuListNode *GetFirst() const { return (wxwxMenuListNode *)wxListBase::GetFirst(); } wxwxMenuListNode *GetLast() const { return (wxwxMenuListNode *)wxListBase::GetLast(); } wxwxMenuListNode *Item(size_t index) const { return (wxwxMenuListNode *)wxListBase::Item(index); } wxMenu *operator[](size_t index) const { wxwxMenuListNode *node = Item(index); return node ? (wxMenu*)(node->GetData()) : (wxMenu*)__null; } wxwxMenuListNode *Append(wxMenu *object) { return (wxwxMenuListNode *)wxListBase::Append(object); } wxwxMenuListNode *Insert(wxMenu *object) { return (wxwxMenuListNode *)Insert((wxwxMenuListNode*)__null, object); } wxwxMenuListNode *Insert(size_t pos, wxMenu *object) { return (wxwxMenuListNode *)wxListBase::Insert(pos, object); } wxwxMenuListNode *Insert(wxwxMenuListNode *prev, wxMenu *object) { return (wxwxMenuListNode *)wxListBase::Insert(prev, object); } wxwxMenuListNode *Append(long key, void *object) { return (wxwxMenuListNode *)wxListBase::Append(key, object); } wxwxMenuListNode *Append(const wxChar *key, void *object) { return (wxwxMenuListNode *)wxListBase::Append(key, object); } wxwxMenuListNode *DetachNode(wxwxMenuListNode *node) { return (wxwxMenuListNode *)wxListBase::DetachNode(node); } bool DeleteNode(wxwxMenuListNode *node) { return wxListBase::DeleteNode(node); } bool DeleteObject(wxMenu *object) { return wxListBase::DeleteObject(object); } void Erase(compatibility_iterator it) { DeleteNode(it); } wxwxMenuListNode *Find(const wxMenu *object) const { return (wxwxMenuListNode *)wxListBase::Find(object); } virtual wxwxMenuListNode *Find(const wxListKey& key) const { return (wxwxMenuListNode *)wxListBase::Find(key); } int IndexOf(wxMenu *object) const { return wxListBase::IndexOf(object); } void Sort(wxSortCompareFunction func) { wxListBase::Sort(func); } void Sort(wxSortFuncFor_wxMenuList func) { Sort((wxSortCompareFunction)func); } protected: virtual wxNodeBase *CreateNode(wxNodeBase *prev, wxNodeBase *next, void *data, const wxListKey& key = wxDefaultListKey) { return new wxwxMenuListNode(this, (wxwxMenuListNode *)prev, (wxwxMenuListNode *)next, (wxMenu *)data, key); } public: typedef size_t size_type; typedef int difference_type; typedef wxMenu* value_type; typedef wxMenu* base_value_type; typedef value_type& reference; typedef const value_type& const_reference; typedef base_value_type& base_reference; typedef const base_value_type& const_base_reference; class iterator { typedef wxMenuList list; public: typedef wxwxMenuListNode Node; typedef iterator itor; typedef wxMenu* value_type; typedef value_type* ptr_type; typedef value_type& reference; Node* m_node; Node* m_init; public: typedef reference reference_type; typedef ptr_type pointer_type; iterator(Node* node, Node* init) : m_node(node), m_init(init) {} iterator() : m_node(__null), m_init(__null) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetNext(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetNext(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetPrevious() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetPrevious() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class const_iterator { typedef wxMenuList list; public: typedef wxwxMenuListNode Node; typedef wxMenu* value_type; typedef const value_type& const_reference; typedef const_iterator itor; typedef value_type* ptr_type; Node* m_node; Node* m_init; public: typedef const_reference reference_type; typedef const ptr_type pointer_type; const_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } const_iterator() : m_node(__null), m_init(__null) { } const_iterator(const iterator& it) : m_node(it.m_node), m_init(it.m_init) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetNext(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetNext(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetPrevious() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetPrevious() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class reverse_iterator { typedef wxMenuList list; public: typedef wxwxMenuListNode Node; typedef wxMenu* value_type; typedef reverse_iterator itor; typedef value_type* ptr_type; typedef value_type& reference; Node* m_node; Node* m_init; public: typedef reference reference_type; typedef ptr_type pointer_type; reverse_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } reverse_iterator() : m_node(__null), m_init(__null) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetPrevious(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetPrevious(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetNext() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetNext() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class const_reverse_iterator { typedef wxMenuList list; public: typedef wxwxMenuListNode Node; typedef wxMenu* value_type; typedef const_reverse_iterator itor; typedef value_type* ptr_type; typedef const value_type& const_reference; Node* m_node; Node* m_init; public: typedef const_reference reference_type; typedef const ptr_type pointer_type; const_reverse_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } const_reverse_iterator() : m_node(__null), m_init(__null) { } const_reverse_iterator(const reverse_iterator& it) : m_node(it.m_node), m_init(it.m_init) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetPrevious(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetPrevious(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetNext() : m_init; return *this;} const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetNext() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; explicit wxMenuList(size_type n, const_reference v = value_type()) { assign(n, v); } wxMenuList(const const_iterator& first, const const_iterator& last) { assign(first, last); } iterator begin() { return iterator(GetFirst(), GetLast()); } const_iterator begin() const { return const_iterator(GetFirst(), GetLast()); } iterator end() { return iterator(__null, GetLast()); } const_iterator end() const { return const_iterator(__null, GetLast()); } reverse_iterator rbegin() { return reverse_iterator(GetLast(), GetFirst()); } const_reverse_iterator rbegin() const { return const_reverse_iterator(GetLast(), GetFirst()); } reverse_iterator rend() { return reverse_iterator(__null, GetFirst()); } const_reverse_iterator rend() const { return const_reverse_iterator(__null, GetFirst()); } void resize(size_type n, value_type v = value_type()) { while (n < size()) pop_back(); while (n > size()) push_back(v); } size_type size() const { return GetCount(); } size_type max_size() const { return 2147483647; } bool empty() const { return IsEmpty(); } reference front() { return *begin(); } const_reference front() const { return *begin(); } reference back() { iterator tmp = end(); return *--tmp; } const_reference back() const { const_iterator tmp = end(); return *--tmp; } void push_front(const_reference v = value_type()) { Insert(GetFirst(), (const_base_reference)v); } void pop_front() { DeleteNode(GetFirst()); } void push_back(const_reference v = value_type()) { Append((const_base_reference)v); } void pop_back() { DeleteNode(GetLast()); } void assign(const_iterator first, const const_iterator& last) { clear(); for(; first != last; ++first) Append((const_base_reference)*first); } void assign(size_type n, const_reference v = value_type()) { clear(); for(size_type i = 0; i < n; ++i) Append((const_base_reference)v); } iterator insert(const iterator& it, const_reference v = value_type()) { Insert(it.m_node, (const_base_reference)v); return iterator(it.m_node->GetPrevious(), GetLast()); } void insert(const iterator& it, size_type n, const_reference v = value_type()) { for(size_type i = 0; i < n; ++i) Insert(it.m_node, (const_base_reference)v); } void insert(const iterator& it, const_iterator first, const const_iterator& last) { for(; first != last; ++first) Insert(it.m_node, (const_base_reference)*first); } iterator erase(const iterator& it) { iterator next = iterator(it.m_node->GetNext(), GetLast()); DeleteNode(it.m_node); return next; } iterator erase(const iterator& first, const iterator& last) { iterator next = last; ++next; DeleteNodes(first.m_node, last.m_node); return next; } void clear() { Clear(); } void splice(const iterator& it, wxMenuList& l, const iterator& first, const iterator& last) { insert(it, first, last); l.erase(first, last); } void splice(const iterator& it, wxMenuList& l) { splice(it, l, l.begin(), l.end() ); } void splice(const iterator& it, wxMenuList& l, const iterator& first) { iterator tmp = first; ++tmp; if(it == first || it == tmp) return; insert(it, *first); l.erase(first); } void remove(const_reference v) { DeleteObject((const_base_reference)v); } void reverse() { Reverse(); } }; | |
38324 | typedef wxMenuItem _WX_LIST_ITEM_TYPE_wxMenuItemList; typedef int (*wxSortFuncFor_wxMenuItemList)(const wxMenuItem **, const wxMenuItem **); class wxwxMenuItemListNode : public wxNodeBase { public: wxwxMenuItemListNode(wxListBase *list = (wxListBase *)__null, wxwxMenuItemListNode *previous = (wxwxMenuItemListNode *)__null, wxwxMenuItemListNode *next = (wxwxMenuItemListNode *)__null, wxMenuItem *data = (wxMenuItem *)__null, const wxListKey& key = wxDefaultListKey) : wxNodeBase(list, previous, next, data, key) { } wxwxMenuItemListNode *GetNext() const { return (wxwxMenuItemListNode *)wxNodeBase::GetNext(); } wxwxMenuItemListNode *GetPrevious() const { return (wxwxMenuItemListNode *)wxNodeBase::GetPrevious(); } wxMenuItem *GetData() const { return (wxMenuItem *)wxNodeBase::GetData(); } void SetData(wxMenuItem *data) { wxNodeBase::SetData(data); } protected: virtual void DeleteData(); private: wxwxMenuItemListNode(const wxwxMenuItemListNode&); wxwxMenuItemListNode& operator=(const wxwxMenuItemListNode&); }; class wxMenuItemList : public wxListBase { public: typedef wxwxMenuItemListNode Node; typedef Node* compatibility_iterator; wxMenuItemList(wxKeyType keyType = wxKEY_NONE) : wxListBase(keyType) { } wxMenuItemList(const wxMenuItemList& list) : wxListBase(list.GetKeyType()) { Assign(list); } wxMenuItemList(size_t count, wxMenuItem *elements[]) : wxListBase(count, (void **)elements) { } wxMenuItemList& operator=(const wxMenuItemList& list) { Assign(list); return *this; } wxwxMenuItemListNode *GetFirst() const { return (wxwxMenuItemListNode *)wxListBase::GetFirst(); } wxwxMenuItemListNode *GetLast() const { return (wxwxMenuItemListNode *)wxListBase::GetLast(); } wxwxMenuItemListNode *Item(size_t index) const { return (wxwxMenuItemListNode *)wxListBase::Item(index); } wxMenuItem *operator[](size_t index) const { wxwxMenuItemListNode *node = Item(index); return node ? (wxMenuItem*)(node->GetData()) : (wxMenuItem*)__null; } wxwxMenuItemListNode *Append(wxMenuItem *object) { return (wxwxMenuItemListNode *)wxListBase::Append(object); } wxwxMenuItemListNode *Insert(wxMenuItem *object) { return (wxwxMenuItemListNode *)Insert((wxwxMenuItemListNode*)__null, object); } wxwxMenuItemListNode *Insert(size_t pos, wxMenuItem *object) { return (wxwxMenuItemListNode *)wxListBase::Insert(pos, object); } wxwxMenuItemListNode *Insert(wxwxMenuItemListNode *prev, wxMenuItem *object) { return (wxwxMenuItemListNode *)wxListBase::Insert(prev, object); } wxwxMenuItemListNode *Append(long key, void *object) { return (wxwxMenuItemListNode *)wxListBase::Append(key, object); } wxwxMenuItemListNode *Append(const wxChar *key, void *object) { return (wxwxMenuItemListNode *)wxListBase::Append(key, object); } wxwxMenuItemListNode *DetachNode(wxwxMenuItemListNode *node) { return (wxwxMenuItemListNode *)wxListBase::DetachNode(node); } bool DeleteNode(wxwxMenuItemListNode *node) { return wxListBase::DeleteNode(node); } bool DeleteObject(wxMenuItem *object) { return wxListBase::DeleteObject(object); } void Erase(compatibility_iterator it) { DeleteNode(it); } wxwxMenuItemListNode *Find(const wxMenuItem *object) const { return (wxwxMenuItemListNode *)wxListBase::Find(object); } virtual wxwxMenuItemListNode *Find(const wxListKey& key) const { return (wxwxMenuItemListNode *)wxListBase::Find(key); } int IndexOf(wxMenuItem *object) const { return wxListBase::IndexOf(object); } void Sort(wxSortCompareFunction func) { wxListBase::Sort(func); } void Sort(wxSortFuncFor_wxMenuItemList func) { Sort((wxSortCompareFunction)func); } protected: virtual wxNodeBase *CreateNode(wxNodeBase *prev, wxNodeBase *next, void *data, const wxListKey& key = wxDefaultListKey) { return new wxwxMenuItemListNode(this, (wxwxMenuItemListNode *)prev, (wxwxMenuItemListNode *)next, (wxMenuItem *)data, key); } public: typedef size_t size_type; typedef int difference_type; typedef wxMenuItem* value_type; typedef wxMenuItem* base_value_type; typedef value_type& reference; typedef const value_type& const_reference; typedef base_value_type& base_reference; typedef const base_value_type& const_base_reference; class iterator { typedef wxMenuItemList list; public: typedef wxwxMenuItemListNode Node; typedef iterator itor; typedef wxMenuItem* value_type; typedef value_type* ptr_type; typedef value_type& reference; Node* m_node; Node* m_init; public: typedef reference reference_type; typedef ptr_type pointer_type; iterator(Node* node, Node* init) : m_node(node), m_init(init) {} iterator() : m_node(__null), m_init(__null) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetNext(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetNext(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetPrevious() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetPrevious() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class const_iterator { typedef wxMenuItemList list; public: typedef wxwxMenuItemListNode Node; typedef wxMenuItem* value_type; typedef const value_type& const_reference; typedef const_iterator itor; typedef value_type* ptr_type; Node* m_node; Node* m_init; public: typedef const_reference reference_type; typedef const ptr_type pointer_type; const_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } const_iterator() : m_node(__null), m_init(__null) { } const_iterator(const iterator& it) : m_node(it.m_node), m_init(it.m_init) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetNext(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetNext(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetPrevious() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetPrevious() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class reverse_iterator { typedef wxMenuItemList list; public: typedef wxwxMenuItemListNode Node; typedef wxMenuItem* value_type; typedef reverse_iterator itor; typedef value_type* ptr_type; typedef value_type& reference; Node* m_node; Node* m_init; public: typedef reference reference_type; typedef ptr_type pointer_type; reverse_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } reverse_iterator() : m_node(__null), m_init(__null) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetPrevious(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetPrevious(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetNext() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetNext() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class const_reverse_iterator { typedef wxMenuItemList list; public: typedef wxwxMenuItemListNode Node; typedef wxMenuItem* value_type; typedef const_reverse_iterator itor; typedef value_type* ptr_type; typedef const value_type& const_reference; Node* m_node; Node* m_init; public: typedef const_reference reference_type; typedef const ptr_type pointer_type; const_reverse_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } const_reverse_iterator() : m_node(__null), m_init(__null) { } const_reverse_iterator(const reverse_iterator& it) : m_node(it.m_node), m_init(it.m_init) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetPrevious(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetPrevious(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetNext() : m_init; return *this;} const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetNext() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; explicit wxMenuItemList(size_type n, const_reference v = value_type()) { assign(n, v); } wxMenuItemList(const const_iterator& first, const const_iterator& last) { assign(first, last); } iterator begin() { return iterator(GetFirst(), GetLast()); } const_iterator begin() const { return const_iterator(GetFirst(), GetLast()); } iterator end() { return iterator(__null, GetLast()); } const_iterator end() const { return const_iterator(__null, GetLast()); } reverse_iterator rbegin() { return reverse_iterator(GetLast(), GetFirst()); } const_reverse_iterator rbegin() const { return const_reverse_iterator(GetLast(), GetFirst()); } reverse_iterator rend() { return reverse_iterator(__null, GetFirst()); } const_reverse_iterator rend() const { return const_reverse_iterator(__null, GetFirst()); } void resize(size_type n, value_type v = value_type()) { while (n < size()) pop_back(); while (n > size()) push_back(v); } size_type size() const { return GetCount(); } size_type max_size() const { return 2147483647; } bool empty() const { return IsEmpty(); } reference front() { return *begin(); } const_reference front() const { return *begin(); } reference back() { iterator tmp = end(); return *--tmp; } const_reference back() const { const_iterator tmp = end(); return *--tmp; } void push_front(const_reference v = value_type()) { Insert(GetFirst(), (const_base_reference)v); } void pop_front() { DeleteNode(GetFirst()); } void push_back(const_reference v = value_type()) { Append((const_base_reference)v); } void pop_back() { DeleteNode(GetLast()); } void assign(const_iterator first, const const_iterator& last) { clear(); for(; first != last; ++first) Append((const_base_reference)*first); } void assign(size_type n, const_reference v = value_type()) { clear(); for(size_type i = 0; i < n; ++i) Append((const_base_reference)v); } iterator insert(const iterator& it, const_reference v = value_type()) { Insert(it.m_node, (const_base_reference)v); return iterator(it.m_node->GetPrevious(), GetLast()); } void insert(const iterator& it, size_type n, const_reference v = value_type()) { for(size_type i = 0; i < n; ++i) Insert(it.m_node, (const_base_reference)v); } void insert(const iterator& it, const_iterator first, const const_iterator& last) { for(; first != last; ++first) Insert(it.m_node, (const_base_reference)*first); } iterator erase(const iterator& it) { iterator next = iterator(it.m_node->GetNext(), GetLast()); DeleteNode(it.m_node); return next; } iterator erase(const iterator& first, const iterator& last) { iterator next = last; ++next; DeleteNodes(first.m_node, last.m_node); return next; } void clear() { Clear(); } void splice(const iterator& it, wxMenuItemList& l, const iterator& first, const iterator& last) { insert(it, first, last); l.erase(first, last); } void splice(const iterator& it, wxMenuItemList& l) { splice(it, l, l.begin(), l.end() ); } void splice(const iterator& it, wxMenuItemList& l, const iterator& first) { iterator tmp = first; ++tmp; if(it == first || it == tmp) return; insert(it, *first); l.erase(first); } void remove(const_reference v) { DeleteObject((const_base_reference)v); } void reverse() { Reverse(); } }; | |
38325 | ||
38326 | ||
38327 | ||
38328 | ||
38329 | ||
38330 | class wxMenuBase : public wxEvtHandler | |
38331 | { | |
38332 | public: | |
38333 | ||
38334 | static wxMenu *New(const wxString& title = wxEmptyString, long style = 0); | |
38335 | ||
38336 | ||
38337 | wxMenuBase(const wxString& title, long style = 0) : m_title(title) | |
38338 | { Init(style); } | |
38339 | wxMenuBase(long style = 0) | |
38340 | { Init(style); } | |
38341 | ||
38342 | ||
38343 | virtual ~wxMenuBase(); | |
38344 | ||
38345 | ||
38346 | ||
38347 | ||
38348 | ||
38349 | wxMenuItem* Append(int itemid, | |
38350 | const wxString& text, | |
38351 | const wxString& help = wxEmptyString, | |
38352 | wxItemKind kind = wxITEM_NORMAL) | |
38353 | { | |
38354 | return DoAppend(wxMenuItem::New((wxMenu *)this, itemid, text, help, kind)); | |
38355 | } | |
38356 | ||
38357 | ||
38358 | wxMenuItem* AppendSeparator() { return Append(wxID_SEPARATOR, wxEmptyString); } | |
38359 | ||
38360 | ||
38361 | wxMenuItem* AppendCheckItem(int itemid, | |
38362 | const wxString& text, | |
38363 | const wxString& help = wxEmptyString) | |
38364 | { | |
38365 | return Append(itemid, text, help, wxITEM_CHECK); | |
38366 | } | |
38367 | ||
38368 | ||
38369 | wxMenuItem* AppendRadioItem(int itemid, | |
38370 | const wxString& text, | |
38371 | const wxString& help = wxEmptyString) | |
38372 | { | |
38373 | return Append(itemid, text, help, wxITEM_RADIO); | |
38374 | } | |
38375 | ||
38376 | ||
38377 | wxMenuItem* Append(int itemid, | |
38378 | const wxString& text, | |
38379 | wxMenu *submenu, | |
38380 | const wxString& help = wxEmptyString) | |
38381 | { | |
38382 | return DoAppend(wxMenuItem::New((wxMenu *)this, itemid, text, help, | |
38383 | wxITEM_NORMAL, submenu)); | |
38384 | } | |
38385 | ||
38386 | ||
38387 | wxMenuItem* Append(wxMenuItem *item) { return DoAppend(item); } | |
38388 | ||
38389 | ||
38390 | ||
38391 | virtual void Break() { } | |
38392 | ||
38393 | ||
38394 | wxMenuItem* Insert(size_t pos, wxMenuItem *item); | |
38395 | ||
38396 | ||
38397 | wxMenuItem* Insert(size_t pos, | |
38398 | int itemid, | |
38399 | const wxString& text, | |
38400 | const wxString& help = wxEmptyString, | |
38401 | wxItemKind kind = wxITEM_NORMAL) | |
38402 | { | |
38403 | return Insert(pos, wxMenuItem::New((wxMenu *)this, itemid, text, help, kind)); | |
38404 | } | |
38405 | ||
38406 | ||
38407 | wxMenuItem* InsertSeparator(size_t pos) | |
38408 | { | |
38409 | return Insert(pos, wxMenuItem::New((wxMenu *)this, wxID_SEPARATOR)); | |
38410 | } | |
38411 | ||
38412 | ||
38413 | wxMenuItem* InsertCheckItem(size_t pos, | |
38414 | int itemid, | |
38415 | const wxString& text, | |
38416 | const wxString& help = wxEmptyString) | |
38417 | { | |
38418 | return Insert(pos, itemid, text, help, wxITEM_CHECK); | |
38419 | } | |
38420 | ||
38421 | ||
38422 | wxMenuItem* InsertRadioItem(size_t pos, | |
38423 | int itemid, | |
38424 | const wxString& text, | |
38425 | const wxString& help = wxEmptyString) | |
38426 | { | |
38427 | return Insert(pos, itemid, text, help, wxITEM_RADIO); | |
38428 | } | |
38429 | ||
38430 | ||
38431 | wxMenuItem* Insert(size_t pos, | |
38432 | int itemid, | |
38433 | const wxString& text, | |
38434 | wxMenu *submenu, | |
38435 | const wxString& help = wxEmptyString) | |
38436 | { | |
38437 | return Insert(pos, wxMenuItem::New((wxMenu *)this, itemid, text, help, | |
38438 | wxITEM_NORMAL, submenu)); | |
38439 | } | |
38440 | ||
38441 | ||
38442 | wxMenuItem* Prepend(wxMenuItem *item) | |
38443 | { | |
38444 | return Insert(0u, item); | |
38445 | } | |
38446 | ||
38447 | ||
38448 | wxMenuItem* Prepend(int itemid, | |
38449 | const wxString& text, | |
38450 | const wxString& help = wxEmptyString, | |
38451 | wxItemKind kind = wxITEM_NORMAL) | |
38452 | { | |
38453 | return Insert(0u, itemid, text, help, kind); | |
38454 | } | |
38455 | ||
38456 | ||
38457 | wxMenuItem* PrependSeparator() | |
38458 | { | |
38459 | return InsertSeparator(0u); | |
38460 | } | |
38461 | ||
38462 | ||
38463 | wxMenuItem* PrependCheckItem(int itemid, | |
38464 | const wxString& text, | |
38465 | const wxString& help = wxEmptyString) | |
38466 | { | |
38467 | return InsertCheckItem(0u, itemid, text, help); | |
38468 | } | |
38469 | ||
38470 | ||
38471 | wxMenuItem* PrependRadioItem(int itemid, | |
38472 | const wxString& text, | |
38473 | const wxString& help = wxEmptyString) | |
38474 | { | |
38475 | return InsertRadioItem(0u, itemid, text, help); | |
38476 | } | |
38477 | ||
38478 | ||
38479 | wxMenuItem* Prepend(int itemid, | |
38480 | const wxString& text, | |
38481 | wxMenu *submenu, | |
38482 | const wxString& help = wxEmptyString) | |
38483 | { | |
38484 | return Insert(0u, itemid, text, submenu, help); | |
38485 | } | |
38486 | ||
38487 | ||
38488 | ||
38489 | ||
38490 | wxMenuItem *Remove(int itemid) { return Remove(FindChildItem(itemid)); } | |
38491 | wxMenuItem *Remove(wxMenuItem *item); | |
38492 | ||
38493 | ||
38494 | ||
38495 | bool Delete(int itemid) { return Delete(FindChildItem(itemid)); } | |
38496 | bool Delete(wxMenuItem *item); | |
38497 | ||
38498 | ||
38499 | bool Destroy(int itemid) { return Destroy(FindChildItem(itemid)); } | |
38500 | bool Destroy(wxMenuItem *item); | |
38501 | ||
38502 | ||
38503 | ||
38504 | ||
38505 | ||
38506 | size_t GetMenuItemCount() const { return m_items.GetCount(); } | |
38507 | ||
38508 | const wxMenuItemList& GetMenuItems() const { return m_items; } | |
38509 | wxMenuItemList& GetMenuItems() { return m_items; } | |
38510 | ||
38511 | ||
38512 | virtual int FindItem(const wxString& item) const; | |
38513 | wxMenuItem* FindItem(int itemid, wxMenu **menu = __null) const; | |
38514 | ||
38515 | ||
38516 | wxMenuItem* FindItemByPosition(size_t position) const; | |
38517 | ||
38518 | ||
38519 | void Enable(int itemid, bool enable); | |
38520 | bool IsEnabled(int itemid) const; | |
38521 | ||
38522 | void Check(int itemid, bool check); | |
38523 | bool IsChecked(int itemid) const; | |
38524 | ||
38525 | void SetLabel(int itemid, const wxString& label); | |
38526 | wxString GetLabel(int itemid) const; | |
38527 | ||
38528 | virtual void SetHelpString(int itemid, const wxString& helpString); | |
38529 | virtual wxString GetHelpString(int itemid) const; | |
38530 | ||
38531 | ||
38532 | ||
38533 | ||
38534 | ||
38535 | virtual void SetTitle(const wxString& title) { m_title = title; } | |
38536 | const wxString GetTitle() const { return m_title; } | |
38537 | ||
38538 | ||
38539 | void SetEventHandler(wxEvtHandler *handler) { m_eventHandler = handler; } | |
38540 | wxEvtHandler *GetEventHandler() const { return m_eventHandler; } | |
38541 | ||
38542 | ||
38543 | void SetInvokingWindow(wxWindow *win) { m_invokingWindow = win; } | |
38544 | wxWindow *GetInvokingWindow() const { return m_invokingWindow; } | |
38545 | ||
38546 | ||
38547 | long GetStyle() const { return m_style; } | |
38548 | ||
38549 | ||
38550 | ||
38551 | ||
38552 | ||
38553 | ||
38554 | ||
38555 | void UpdateUI(wxEvtHandler* source = (wxEvtHandler*)__null); | |
38556 | ||
38557 | ||
38558 | ||
38559 | wxMenuBar *GetMenuBar() const; | |
38560 | ||
38561 | ||
38562 | virtual void Attach(wxMenuBarBase *menubar); | |
38563 | virtual void Detach(); | |
38564 | ||
38565 | ||
38566 | bool IsAttached() const { return GetMenuBar() != __null; } | |
38567 | ||
38568 | ||
38569 | void SetParent(wxMenu *parent) { m_menuParent = parent; } | |
38570 | wxMenu *GetParent() const { return m_menuParent; } | |
38571 | ||
38572 | ||
38573 | ||
38574 | ||
38575 | ||
38576 | ||
38577 | ||
38578 | wxMenuItem *FindChildItem(int itemid, size_t *pos = __null) const; | |
38579 | ||
38580 | ||
38581 | ||
38582 | ||
38583 | ||
38584 | bool SendEvent(int itemid, int checked = -1); | |
38585 | ||
38586 | ||
38587 | ||
38588 | ||
38589 | ||
38590 | ||
38591 | void Append(int itemid, | |
38592 | const wxString& text, | |
38593 | const wxString& help, | |
38594 | bool isCheckable) | |
38595 | { | |
38596 | Append(itemid, text, help, isCheckable ? wxITEM_CHECK : wxITEM_NORMAL); | |
38597 | } | |
38598 | ||
38599 | void Insert(size_t pos, | |
38600 | int itemid, | |
38601 | const wxString& text, | |
38602 | const wxString& help, | |
38603 | bool isCheckable) | |
38604 | { | |
38605 | Insert(pos, itemid, text, help, isCheckable ? wxITEM_CHECK : wxITEM_NORMAL); | |
38606 | } | |
38607 | ||
38608 | void Prepend(int itemid, | |
38609 | const wxString& text, | |
38610 | const wxString& help, | |
38611 | bool isCheckable) | |
38612 | { | |
38613 | Insert(0u, itemid, text, help, isCheckable); | |
38614 | } | |
38615 | ||
38616 | static void LockAccels(bool locked) | |
38617 | { | |
38618 | ms_locked = locked; | |
38619 | } | |
38620 | ||
38621 | protected: | |
38622 | ||
38623 | ||
38624 | ||
38625 | virtual wxMenuItem* DoAppend(wxMenuItem *item); | |
38626 | virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item); | |
38627 | ||
38628 | virtual wxMenuItem *DoRemove(wxMenuItem *item); | |
38629 | virtual bool DoDelete(wxMenuItem *item); | |
38630 | virtual bool DoDestroy(wxMenuItem *item); | |
38631 | ||
38632 | ||
38633 | ||
38634 | ||
38635 | ||
38636 | void Init(long style); | |
38637 | ||
38638 | ||
38639 | void AddSubMenu(wxMenu *submenu); | |
38640 | ||
38641 | wxMenuBar *m_menuBar; | |
38642 | wxMenu *m_menuParent; | |
38643 | ||
38644 | wxString m_title; | |
38645 | wxMenuItemList m_items; | |
38646 | ||
38647 | wxWindow *m_invokingWindow; | |
38648 | ||
38649 | long m_style; | |
38650 | ||
38651 | wxEvtHandler *m_eventHandler; | |
38652 | ||
38653 | static bool ms_locked; | |
38654 | ||
38655 | private: wxMenuBase(const wxMenuBase&); wxMenuBase& operator=(const wxMenuBase&); | |
38656 | }; | |
38657 | ||
38658 | ||
38659 | ||
38660 | ||
38661 | ||
38662 | class wxMenuBarBase : public wxWindow | |
38663 | { | |
38664 | public: | |
38665 | ||
38666 | wxMenuBarBase(); | |
38667 | ||
38668 | ||
38669 | virtual ~wxMenuBarBase(); | |
38670 | ||
38671 | ||
38672 | ||
38673 | ||
38674 | ||
38675 | virtual bool Append(wxMenu *menu, const wxString& title); | |
38676 | ||
38677 | ||
38678 | ||
38679 | virtual bool Insert(size_t pos, wxMenu *menu, const wxString& title); | |
38680 | ||
38681 | ||
38682 | ||
38683 | ||
38684 | ||
38685 | size_t GetMenuCount() const { return m_menus.GetCount(); } | |
38686 | ||
38687 | ||
38688 | wxMenu *GetMenu(size_t pos) const; | |
38689 | ||
38690 | ||
38691 | ||
38692 | virtual wxMenu *Replace(size_t pos, wxMenu *menu, const wxString& title); | |
38693 | ||
38694 | ||
38695 | ||
38696 | virtual wxMenu *Remove(size_t pos); | |
38697 | ||
38698 | ||
38699 | virtual void EnableTop(size_t pos, bool enable) = 0; | |
38700 | ||
38701 | ||
38702 | virtual bool IsEnabledTop(size_t ) const { return true; } | |
38703 | ||
38704 | ||
38705 | virtual void SetLabelTop(size_t pos, const wxString& label) = 0; | |
38706 | virtual wxString GetLabelTop(size_t pos) const = 0; | |
38707 | ||
38708 | ||
38709 | ||
38710 | ||
38711 | ||
38712 | ||
38713 | virtual int FindMenuItem(const wxString& menu, const wxString& item) const; | |
38714 | ||
38715 | ||
38716 | ||
38717 | ||
38718 | virtual wxMenuItem* FindItem(int itemid, wxMenu **menu = __null) const; | |
38719 | ||
38720 | ||
38721 | int FindMenu(const wxString& title) const; | |
38722 | # 449 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/menu.h" | |
38723 | void Enable(int itemid, bool enable); | |
38724 | void Check(int itemid, bool check); | |
38725 | bool IsChecked(int itemid) const; | |
38726 | bool IsEnabled(int itemid) const; | |
38727 | virtual bool IsEnabled() const { return wxWindow::IsEnabled(); } | |
38728 | ||
38729 | void SetLabel(int itemid, const wxString &label); | |
38730 | wxString GetLabel(int itemid) const; | |
38731 | ||
38732 | void SetHelpString(int itemid, const wxString& helpString); | |
38733 | wxString GetHelpString(int itemid) const; | |
38734 | ||
38735 | ||
38736 | ||
38737 | ||
38738 | wxFrame *GetFrame() const { return m_menuBarFrame; } | |
38739 | ||
38740 | ||
38741 | bool IsAttached() const { return GetFrame() != __null; } | |
38742 | ||
38743 | ||
38744 | virtual void Attach(wxFrame *frame); | |
38745 | ||
38746 | ||
38747 | virtual void Detach(); | |
38748 | ||
38749 | ||
38750 | virtual bool Enable(bool enable = true) { return wxWindow::Enable(enable); } | |
38751 | virtual void SetLabel(const wxString& s) { wxWindow::SetLabel(s); } | |
38752 | virtual wxString GetLabel() const { return wxWindow::GetLabel(); } | |
38753 | ||
38754 | ||
38755 | virtual bool AcceptsFocusFromKeyboard() const { return false; } | |
38756 | ||
38757 | protected: | |
38758 | ||
38759 | wxMenuList m_menus; | |
38760 | ||
38761 | ||
38762 | wxFrame *m_menuBarFrame; | |
38763 | ||
38764 | private: wxMenuBarBase(const wxMenuBarBase&); wxMenuBarBase& operator=(const wxMenuBarBase&); | |
38765 | }; | |
38766 | # 509 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/menu.h" | |
38767 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/menu.h" 1 | |
38768 | # 21 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/menu.h" | |
38769 | class wxMenuBar : public wxMenuBarBase | |
38770 | { | |
38771 | public: | |
38772 | ||
38773 | wxMenuBar(); | |
38774 | wxMenuBar(long style); | |
38775 | wxMenuBar(size_t n, wxMenu *menus[], const wxString titles[], long style = 0); | |
38776 | virtual ~wxMenuBar(); | |
38777 | ||
38778 | ||
38779 | virtual bool Append( wxMenu *menu, const wxString &title ); | |
38780 | virtual bool Insert(size_t pos, wxMenu *menu, const wxString& title); | |
38781 | virtual wxMenu *Replace(size_t pos, wxMenu *menu, const wxString& title); | |
38782 | virtual wxMenu *Remove(size_t pos); | |
38783 | ||
38784 | virtual int FindMenuItem(const wxString& menuString, | |
38785 | const wxString& itemString) const; | |
38786 | virtual wxMenuItem* FindItem( int id, wxMenu **menu = __null ) const; | |
38787 | ||
38788 | virtual void EnableTop( size_t pos, bool flag ); | |
38789 | virtual void SetLabelTop( size_t pos, const wxString& label ); | |
38790 | virtual wxString GetLabelTop( size_t pos ) const; | |
38791 | ||
38792 | ||
38793 | void SetInvokingWindow( wxWindow *win ); | |
38794 | void UnsetInvokingWindow( wxWindow *win ); | |
38795 | ||
38796 | ||
38797 | bool GtkAppend(wxMenu *menu, const wxString& title, int pos=-1); | |
38798 | ||
38799 | ||
38800 | ||
38801 | ||
38802 | GtkWidget *m_menubar; | |
38803 | long m_style; | |
38804 | wxWindow *m_invokingWindow; | |
38805 | ||
38806 | private: | |
38807 | void Init(size_t n, wxMenu *menus[], const wxString titles[], long style); | |
38808 | ||
38809 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
38810 | }; | |
38811 | ||
38812 | ||
38813 | ||
38814 | ||
38815 | ||
38816 | class wxMenu : public wxMenuBase | |
38817 | { | |
38818 | public: | |
38819 | ||
38820 | wxMenu(const wxString& title, long style = 0) | |
38821 | : wxMenuBase(title, style) { Init(); } | |
38822 | ||
38823 | wxMenu(long style = 0) : wxMenuBase(style) { Init(); } | |
38824 | ||
38825 | virtual ~wxMenu(); | |
38826 | ||
38827 | ||
38828 | virtual wxMenuItem* DoAppend(wxMenuItem *item); | |
38829 | virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item); | |
38830 | virtual wxMenuItem* DoRemove(wxMenuItem *item); | |
38831 | ||
38832 | ||
38833 | ||
38834 | ||
38835 | int FindMenuIdByMenuItem( GtkWidget *menuItem ) const; | |
38836 | ||
38837 | ||
38838 | GtkWidget *m_menu; | |
38839 | GtkWidget *m_owner; | |
38840 | GtkAccelGroup *m_accel; | |
38841 | ||
38842 | private: | |
38843 | ||
38844 | void Init(); | |
38845 | ||
38846 | ||
38847 | bool GtkAppend(wxMenuItem *item, int pos=-1); | |
38848 | ||
38849 | GtkWidget *m_prevRadio; | |
38850 | ||
38851 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
38852 | }; | |
38853 | # 510 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/menu.h" 2 | |
38854 | # 40 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
38855 | ||
38856 | ||
38857 | ||
38858 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/icon.h" 1 | |
38859 | # 44 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
38860 | ||
38861 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dialog.h" 1 | |
38862 | # 20 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dialog.h" | |
38863 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/containr.h" 1 | |
38864 | # 21 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dialog.h" 2 | |
38865 | ||
38866 | ||
38867 | class wxSizer; | |
38868 | class wxStdDialogButtonSizer; | |
38869 | # 34 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dialog.h" | |
38870 | extern const wxChar* wxDialogNameStr; | |
38871 | ||
38872 | class wxDialogBase : public wxTopLevelWindow | |
38873 | { | |
38874 | public: | |
38875 | wxDialogBase() { Init(); } | |
38876 | virtual ~wxDialogBase() { } | |
38877 | ||
38878 | void Init(); | |
38879 | ||
38880 | ||
38881 | ||
38882 | void SetReturnCode(int returnCode) { m_returnCode = returnCode; } | |
38883 | int GetReturnCode() const { return m_returnCode; } | |
38884 | ||
38885 | ||
38886 | void SetAffirmativeId(int affirmativeId) { m_affirmativeId = affirmativeId; } | |
38887 | int GetAffirmativeId() const { return m_affirmativeId; } | |
38888 | ||
38889 | ||
38890 | ||
38891 | ||
38892 | int GetEscapeId() const { return wxID_ANY; } | |
38893 | ||
38894 | ||
38895 | ||
38896 | ||
38897 | ||
38898 | wxSizer *CreateTextSizer( const wxString &message ); | |
38899 | ||
38900 | ||
38901 | ||
38902 | ||
38903 | wxSizer *CreateButtonSizer( long flags ); | |
38904 | wxStdDialogButtonSizer *CreateStdDialogButtonSizer( long flags ); | |
38905 | ||
38906 | ||
38907 | protected: | |
38908 | ||
38909 | int m_returnCode; | |
38910 | ||
38911 | ||
38912 | int m_affirmativeId; | |
38913 | ||
38914 | private: wxDialogBase(const wxDialogBase&); wxDialogBase& operator=(const wxDialogBase&); | |
38915 | private: static const wxEventTableEntry sm_eventTableEntries[]; protected: static const wxEventTable sm_eventTable; virtual const wxEventTable* GetEventTable() const; static wxEventHashTable sm_eventHashTable; virtual wxEventHashTable& GetEventHashTable() const; | |
38916 | public: void OnNavigationKey(wxNavigationKeyEvent& event); void OnFocus(wxFocusEvent& event); virtual void OnChildFocus(wxChildFocusEvent& event); virtual void SetFocus(); virtual void SetFocusIgnoringChildren(); virtual void RemoveChild(wxWindowBase *child); virtual wxWindow *GetDefaultItem() const; virtual wxWindow *SetDefaultItem(wxWindow *child); virtual void SetTmpDefaultItem(wxWindow *win); virtual bool AcceptsFocus() const; protected: wxControlContainer m_container; | |
38917 | }; | |
38918 | # 94 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dialog.h" | |
38919 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/dialog.h" 1 | |
38920 | # 24 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/dialog.h" | |
38921 | class wxDialog; | |
38922 | ||
38923 | ||
38924 | ||
38925 | ||
38926 | ||
38927 | extern const wxChar *wxDialogNameStr; | |
38928 | ||
38929 | ||
38930 | ||
38931 | ||
38932 | ||
38933 | class wxDialog: public wxDialogBase | |
38934 | { | |
38935 | public: | |
38936 | wxDialog() { Init(); } | |
38937 | wxDialog( wxWindow *parent, wxWindowID id, | |
38938 | const wxString &title, | |
38939 | const wxPoint &pos = wxDefaultPosition, | |
38940 | const wxSize &size = wxDefaultSize, | |
38941 | long style = (0x20000000 | 0x0800 | 0x1000), | |
38942 | const wxString &name = wxDialogNameStr ); | |
38943 | bool Create( wxWindow *parent, wxWindowID id, | |
38944 | const wxString &title, | |
38945 | const wxPoint &pos = wxDefaultPosition, | |
38946 | const wxSize &size = wxDefaultSize, | |
38947 | long style = (0x20000000 | 0x0800 | 0x1000), | |
38948 | const wxString &name = wxDialogNameStr ); | |
38949 | ~wxDialog() {} | |
38950 | ||
38951 | void OnApply( wxCommandEvent &event ); | |
38952 | void OnCancel( wxCommandEvent &event ); | |
38953 | void OnOK( wxCommandEvent &event ); | |
38954 | void OnPaint( wxPaintEvent& event ); | |
38955 | void OnCloseWindow( wxCloseEvent& event ); | |
38956 | ||
38957 | ||
38958 | ||
38959 | ||
38960 | virtual bool Show( bool show = 1 ); | |
38961 | virtual int ShowModal(); | |
38962 | virtual void EndModal( int retCode ); | |
38963 | virtual bool IsModal() const; | |
38964 | void SetModal( bool modal ); | |
38965 | ||
38966 | ||
38967 | ||
38968 | ||
38969 | bool m_modalShowing; | |
38970 | ||
38971 | protected: | |
38972 | ||
38973 | void Init(); | |
38974 | ||
38975 | private: | |
38976 | private: static const wxEventTableEntry sm_eventTableEntries[]; protected: static const wxEventTable sm_eventTable; virtual const wxEventTable* GetEventTable() const; static wxEventHashTable sm_eventHashTable; virtual wxEventHashTable& GetEventHashTable() const; | |
38977 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
38978 | }; | |
38979 | # 95 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dialog.h" 2 | |
38980 | # 46 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
38981 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/timer.h" 1 | |
38982 | # 27 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/timer.h" | |
38983 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/stopwatch.h" 1 | |
38984 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/stopwatch.h" | |
38985 | class wxStopWatch | |
38986 | { | |
38987 | public: | |
38988 | ||
38989 | wxStopWatch() { m_pauseCount = 0; Start(); } | |
38990 | ||
38991 | ||
38992 | void Start(long t0 = 0); | |
38993 | ||
38994 | ||
38995 | void Pause() | |
38996 | { | |
38997 | if ( !m_pauseCount++ ) | |
38998 | m_pause = GetElapsedTime(); | |
38999 | } | |
39000 | ||
39001 | ||
39002 | void Resume() | |
39003 | { | |
39004 | ; | |
39005 | ||
39006 | ||
39007 | if ( !--m_pauseCount ) | |
39008 | Start(m_pause); | |
39009 | } | |
39010 | ||
39011 | ||
39012 | long Time() const; | |
39013 | ||
39014 | protected: | |
39015 | ||
39016 | long GetElapsedTime() const; | |
39017 | ||
39018 | private: | |
39019 | ||
39020 | wxLongLong m_t0; | |
39021 | ||
39022 | ||
39023 | long m_pause; | |
39024 | ||
39025 | ||
39026 | int m_pauseCount; | |
39027 | }; | |
39028 | ||
39029 | ||
39030 | ||
39031 | ||
39032 | ||
39033 | ||
39034 | ||
39035 | void wxStartTimer(); | |
39036 | ||
39037 | ||
39038 | ||
39039 | long wxGetElapsedTime(bool resetTimer = true); | |
39040 | # 86 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/stopwatch.h" | |
39041 | extern long wxGetLocalTime(); | |
39042 | ||
39043 | ||
39044 | extern long wxGetUTCTime(); | |
39045 | ||
39046 | ||
39047 | ||
39048 | extern wxLongLong wxGetLocalTimeMillis(); | |
39049 | # 28 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/timer.h" 2 | |
39050 | # 42 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/timer.h" | |
39051 | class wxTimerBase : public wxEvtHandler | |
39052 | { | |
39053 | public: | |
39054 | ||
39055 | ||
39056 | ||
39057 | ||
39058 | ||
39059 | wxTimerBase() { Init(); SetOwner(this); } | |
39060 | ||
39061 | ||
39062 | ||
39063 | ||
39064 | wxTimerBase(wxEvtHandler *owner, int timerid = wxID_ANY) | |
39065 | { Init(); SetOwner(owner, timerid); } | |
39066 | ||
39067 | ||
39068 | void SetOwner(wxEvtHandler *owner, int timerid = wxID_ANY) | |
39069 | { m_owner = owner; m_idTimer = timerid; } | |
39070 | wxEvtHandler* GetOwner() const { return m_owner; } | |
39071 | ||
39072 | virtual ~wxTimerBase(); | |
39073 | # 73 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/timer.h" | |
39074 | virtual bool Start(int milliseconds = -1, bool oneShot = false); | |
39075 | ||
39076 | ||
39077 | virtual void Stop() = 0; | |
39078 | ||
39079 | ||
39080 | ||
39081 | virtual void Notify(); | |
39082 | ||
39083 | ||
39084 | ||
39085 | ||
39086 | ||
39087 | virtual bool IsRunning() const = 0; | |
39088 | ||
39089 | ||
39090 | int GetInterval() const { return m_milli; } | |
39091 | ||
39092 | ||
39093 | bool IsOneShot() const { return m_oneShot; } | |
39094 | ||
39095 | ||
39096 | int GetId() const { return m_idTimer; } | |
39097 | ||
39098 | ||
39099 | protected: | |
39100 | ||
39101 | void Init() { m_oneShot = false; m_milli = 0; } | |
39102 | ||
39103 | wxEvtHandler *m_owner; | |
39104 | int m_idTimer; | |
39105 | ||
39106 | int m_milli; | |
39107 | bool m_oneShot; | |
39108 | ||
39109 | private: wxTimerBase(const wxTimerBase&); wxTimerBase& operator=(const wxTimerBase&); | |
39110 | }; | |
39111 | # 120 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/timer.h" | |
39112 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/timer.h" 1 | |
39113 | # 22 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/timer.h" | |
39114 | class wxTimer : public wxTimerBase | |
39115 | { | |
39116 | public: | |
39117 | wxTimer() { Init(); } | |
39118 | wxTimer(wxEvtHandler *owner, int id = -1) : wxTimerBase(owner, id) | |
39119 | { Init(); } | |
39120 | ~wxTimer(); | |
39121 | ||
39122 | virtual bool Start( int millisecs = -1, bool oneShot = 0 ); | |
39123 | virtual void Stop(); | |
39124 | ||
39125 | virtual bool IsRunning() const { return m_tag != -1; } | |
39126 | ||
39127 | protected: | |
39128 | void Init(); | |
39129 | ||
39130 | int m_tag; | |
39131 | ||
39132 | private: | |
39133 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; | |
39134 | }; | |
39135 | # 121 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/timer.h" 2 | |
39136 | # 135 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/timer.h" | |
39137 | class wxTimerRunner | |
39138 | { | |
39139 | public: | |
39140 | wxTimerRunner(wxTimer& timer) : m_timer(timer) { } | |
39141 | wxTimerRunner(wxTimer& timer, int milli, bool oneShot = false) | |
39142 | : m_timer(timer) | |
39143 | { | |
39144 | m_timer.Start(milli, oneShot); | |
39145 | } | |
39146 | ||
39147 | void Start(int milli, bool oneShot = false) | |
39148 | { | |
39149 | m_timer.Start(milli, oneShot); | |
39150 | } | |
39151 | ||
39152 | ~wxTimerRunner() | |
39153 | { | |
39154 | if ( m_timer.IsRunning() ) | |
39155 | { | |
39156 | m_timer.Stop(); | |
39157 | } | |
39158 | } | |
39159 | ||
39160 | private: | |
39161 | wxTimer& m_timer; | |
39162 | ||
39163 | private: wxTimerRunner(const wxTimerRunner&); wxTimerRunner& operator=(const wxTimerRunner&); | |
39164 | }; | |
39165 | ||
39166 | ||
39167 | ||
39168 | ||
39169 | ||
39170 | class wxTimerEvent : public wxEvent | |
39171 | { | |
39172 | public: | |
39173 | wxTimerEvent(int timerid = 0, int interval = 0) : wxEvent(timerid) | |
39174 | { | |
39175 | m_eventType = wxEVT_TIMER; | |
39176 | ||
39177 | m_interval = interval; | |
39178 | } | |
39179 | ||
39180 | ||
39181 | int GetInterval() const { return m_interval; } | |
39182 | ||
39183 | ||
39184 | virtual wxEvent *Clone() const { return new wxTimerEvent(*this); } | |
39185 | ||
39186 | private: | |
39187 | int m_interval; | |
39188 | ||
39189 | private: wxTimerEvent& operator=(const wxTimerEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
39190 | }; | |
39191 | ||
39192 | typedef void (wxEvtHandler::*wxTimerEventFunction)(wxTimerEvent&); | |
39193 | # 47 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
39194 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/settings.h" 1 | |
39195 | # 18 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/settings.h" | |
39196 | class wxWindow; | |
39197 | ||
39198 | ||
39199 | ||
39200 | ||
39201 | ||
39202 | enum wxSystemFont | |
39203 | { | |
39204 | wxSYS_OEM_FIXED_FONT = 10, | |
39205 | wxSYS_ANSI_FIXED_FONT, | |
39206 | wxSYS_ANSI_VAR_FONT, | |
39207 | wxSYS_SYSTEM_FONT, | |
39208 | wxSYS_DEVICE_DEFAULT_FONT, | |
39209 | wxSYS_DEFAULT_PALETTE, | |
39210 | wxSYS_SYSTEM_FIXED_FONT, | |
39211 | wxSYS_DEFAULT_GUI_FONT, | |
39212 | ||
39213 | ||
39214 | wxSYS_ICONTITLE_FONT = wxSYS_DEFAULT_GUI_FONT | |
39215 | }; | |
39216 | ||
39217 | ||
39218 | ||
39219 | ||
39220 | ||
39221 | enum wxSystemColour | |
39222 | { | |
39223 | wxSYS_COLOUR_SCROLLBAR, | |
39224 | wxSYS_COLOUR_BACKGROUND, | |
39225 | wxSYS_COLOUR_DESKTOP = wxSYS_COLOUR_BACKGROUND, | |
39226 | wxSYS_COLOUR_ACTIVECAPTION, | |
39227 | wxSYS_COLOUR_INACTIVECAPTION, | |
39228 | wxSYS_COLOUR_MENU, | |
39229 | wxSYS_COLOUR_WINDOW, | |
39230 | wxSYS_COLOUR_WINDOWFRAME, | |
39231 | wxSYS_COLOUR_MENUTEXT, | |
39232 | wxSYS_COLOUR_WINDOWTEXT, | |
39233 | wxSYS_COLOUR_CAPTIONTEXT, | |
39234 | wxSYS_COLOUR_ACTIVEBORDER, | |
39235 | wxSYS_COLOUR_INACTIVEBORDER, | |
39236 | wxSYS_COLOUR_APPWORKSPACE, | |
39237 | wxSYS_COLOUR_HIGHLIGHT, | |
39238 | wxSYS_COLOUR_HIGHLIGHTTEXT, | |
39239 | wxSYS_COLOUR_BTNFACE, | |
39240 | wxSYS_COLOUR_3DFACE = wxSYS_COLOUR_BTNFACE, | |
39241 | wxSYS_COLOUR_BTNSHADOW, | |
39242 | wxSYS_COLOUR_3DSHADOW = wxSYS_COLOUR_BTNSHADOW, | |
39243 | wxSYS_COLOUR_GRAYTEXT, | |
39244 | wxSYS_COLOUR_BTNTEXT, | |
39245 | wxSYS_COLOUR_INACTIVECAPTIONTEXT, | |
39246 | wxSYS_COLOUR_BTNHIGHLIGHT, | |
39247 | wxSYS_COLOUR_BTNHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT, | |
39248 | wxSYS_COLOUR_3DHIGHLIGHT = wxSYS_COLOUR_BTNHIGHLIGHT, | |
39249 | wxSYS_COLOUR_3DHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT, | |
39250 | wxSYS_COLOUR_3DDKSHADOW, | |
39251 | wxSYS_COLOUR_3DLIGHT, | |
39252 | wxSYS_COLOUR_INFOTEXT, | |
39253 | wxSYS_COLOUR_INFOBK, | |
39254 | wxSYS_COLOUR_LISTBOX, | |
39255 | wxSYS_COLOUR_HOTLIGHT, | |
39256 | wxSYS_COLOUR_GRADIENTACTIVECAPTION, | |
39257 | wxSYS_COLOUR_GRADIENTINACTIVECAPTION, | |
39258 | wxSYS_COLOUR_MENUHILIGHT, | |
39259 | wxSYS_COLOUR_MENUBAR, | |
39260 | ||
39261 | wxSYS_COLOUR_MAX | |
39262 | }; | |
39263 | ||
39264 | ||
39265 | ||
39266 | ||
39267 | ||
39268 | enum wxSystemMetric | |
39269 | { | |
39270 | wxSYS_MOUSE_BUTTONS = 1, | |
39271 | wxSYS_BORDER_X, | |
39272 | wxSYS_BORDER_Y, | |
39273 | wxSYS_CURSOR_X, | |
39274 | wxSYS_CURSOR_Y, | |
39275 | wxSYS_DCLICK_X, | |
39276 | wxSYS_DCLICK_Y, | |
39277 | wxSYS_DRAG_X, | |
39278 | wxSYS_DRAG_Y, | |
39279 | wxSYS_EDGE_X, | |
39280 | wxSYS_EDGE_Y, | |
39281 | wxSYS_HSCROLL_ARROW_X, | |
39282 | wxSYS_HSCROLL_ARROW_Y, | |
39283 | wxSYS_HTHUMB_X, | |
39284 | wxSYS_ICON_X, | |
39285 | wxSYS_ICON_Y, | |
39286 | wxSYS_ICONSPACING_X, | |
39287 | wxSYS_ICONSPACING_Y, | |
39288 | wxSYS_WINDOWMIN_X, | |
39289 | wxSYS_WINDOWMIN_Y, | |
39290 | wxSYS_SCREEN_X, | |
39291 | wxSYS_SCREEN_Y, | |
39292 | wxSYS_FRAMESIZE_X, | |
39293 | wxSYS_FRAMESIZE_Y, | |
39294 | wxSYS_SMALLICON_X, | |
39295 | wxSYS_SMALLICON_Y, | |
39296 | wxSYS_HSCROLL_Y, | |
39297 | wxSYS_VSCROLL_X, | |
39298 | wxSYS_VSCROLL_ARROW_X, | |
39299 | wxSYS_VSCROLL_ARROW_Y, | |
39300 | wxSYS_VTHUMB_Y, | |
39301 | wxSYS_CAPTION_Y, | |
39302 | wxSYS_MENU_Y, | |
39303 | wxSYS_NETWORK_PRESENT, | |
39304 | wxSYS_PENWINDOWS_PRESENT, | |
39305 | wxSYS_SHOW_SOUNDS, | |
39306 | wxSYS_SWAP_BUTTONS | |
39307 | }; | |
39308 | ||
39309 | ||
39310 | enum wxSystemFeature | |
39311 | { | |
39312 | wxSYS_CAN_DRAW_FRAME_DECORATIONS = 1, | |
39313 | wxSYS_CAN_ICONIZE_FRAME | |
39314 | }; | |
39315 | ||
39316 | ||
39317 | enum wxSystemScreenType | |
39318 | { | |
39319 | wxSYS_SCREEN_NONE = 0, | |
39320 | ||
39321 | wxSYS_SCREEN_TINY, | |
39322 | wxSYS_SCREEN_PDA, | |
39323 | wxSYS_SCREEN_SMALL, | |
39324 | wxSYS_SCREEN_DESKTOP | |
39325 | }; | |
39326 | # 160 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/settings.h" | |
39327 | class wxSystemSettingsNative | |
39328 | { | |
39329 | public: | |
39330 | ||
39331 | static wxColour GetColour(wxSystemColour index); | |
39332 | ||
39333 | ||
39334 | static wxFont GetFont(wxSystemFont index); | |
39335 | ||
39336 | ||
39337 | static int GetMetric(wxSystemMetric index, wxWindow * win = __null); | |
39338 | ||
39339 | ||
39340 | static bool HasFeature(wxSystemFeature index); | |
39341 | }; | |
39342 | ||
39343 | ||
39344 | ||
39345 | ||
39346 | ||
39347 | class wxSystemSettings : public wxSystemSettingsNative | |
39348 | { | |
39349 | public: | |
39350 | # 192 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/settings.h" | |
39351 | static wxSystemScreenType GetScreenType(); | |
39352 | ||
39353 | ||
39354 | static void SetScreenType( wxSystemScreenType screen ); | |
39355 | ||
39356 | ||
39357 | static wxSystemScreenType ms_screen; | |
39358 | ||
39359 | ||
39360 | ||
39361 | ||
39362 | static wxColour GetSystemColour(int index) __attribute__ ((deprecated)); | |
39363 | static wxFont GetSystemFont(int index) __attribute__ ((deprecated)); | |
39364 | static int GetSystemMetric(int index) __attribute__ ((deprecated)); | |
39365 | ||
39366 | }; | |
39367 | # 48 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
39368 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/msgdlg.h" 1 | |
39369 | # 19 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/msgdlg.h" | |
39370 | class wxMessageDialogBase | |
39371 | { | |
39372 | protected: | |
39373 | ||
39374 | void SetMessageDialogStyle(long style) | |
39375 | { | |
39376 | ; | |
39377 | ||
39378 | ||
39379 | ; | |
39380 | ||
39381 | ||
39382 | m_dialogStyle = style; | |
39383 | } | |
39384 | inline long GetMessageDialogStyle() const | |
39385 | { | |
39386 | return m_dialogStyle; | |
39387 | } | |
39388 | ||
39389 | private: | |
39390 | long m_dialogStyle; | |
39391 | }; | |
39392 | # 53 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/msgdlg.h" | |
39393 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/msgdlg.h" 1 | |
39394 | # 19 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/msgdlg.h" | |
39395 | # 1 "lib/wx/include/gtk2-ansi-release-2.6/wx/setup.h" 1 | |
39396 | # 20 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/msgdlg.h" 2 | |
39397 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dialog.h" 1 | |
39398 | # 21 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/msgdlg.h" 2 | |
39399 | ||
39400 | ||
39401 | ||
39402 | ||
39403 | extern const wxChar* wxMessageBoxCaptionStr; | |
39404 | ||
39405 | class wxMessageDialog: public wxDialog, public wxMessageDialogBase | |
39406 | { | |
39407 | public: | |
39408 | wxMessageDialog(wxWindow *parent, const wxString& message, | |
39409 | const wxString& caption = wxMessageBoxCaptionStr, | |
39410 | long style = 0x00000004|wxCENTRE, | |
39411 | const wxPoint& pos = wxDefaultPosition); | |
39412 | ~wxMessageDialog(); | |
39413 | ||
39414 | int ShowModal(); | |
39415 | virtual bool Show( bool = true ) { return false; }; | |
39416 | ||
39417 | protected: | |
39418 | ||
39419 | ||
39420 | virtual void DoSetSize(int , int , | |
39421 | int , int , | |
39422 | int = (0x0001|0x0002)) {} | |
39423 | virtual void DoMoveWindow(int , int , | |
39424 | int , int ) {} | |
39425 | ||
39426 | private: | |
39427 | wxString m_caption; | |
39428 | wxString m_message; | |
39429 | ||
39430 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
39431 | }; | |
39432 | # 54 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/msgdlg.h" 2 | |
39433 | # 68 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/msgdlg.h" | |
39434 | int wxMessageBox(const wxString& message, | |
39435 | const wxString& caption = wxMessageBoxCaptionStr, | |
39436 | long style = 0x00000004 | wxCENTRE, | |
39437 | wxWindow *parent = __null, | |
39438 | int x = wxDefaultCoord, int y = wxDefaultCoord); | |
39439 | # 49 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
39440 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/cmndata.h" 1 | |
39441 | # 21 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/cmndata.h" | |
39442 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/encinfo.h" 1 | |
39443 | # 35 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/encinfo.h" | |
39444 | struct wxNativeEncodingInfo | |
39445 | { | |
39446 | wxString facename; | |
39447 | ||
39448 | wxFontEncoding encoding; | |
39449 | # 67 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/encinfo.h" | |
39450 | bool FromString(const wxString& s); | |
39451 | wxString ToString() const; | |
39452 | }; | |
39453 | # 22 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/cmndata.h" 2 | |
39454 | # 30 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/cmndata.h" | |
39455 | class wxPrintNativeDataBase; | |
39456 | ||
39457 | ||
39458 | class wxColourData: public wxObject | |
39459 | { | |
39460 | public: | |
39461 | wxColourData(); | |
39462 | wxColourData(const wxColourData& data); | |
39463 | ~wxColourData(); | |
39464 | ||
39465 | void SetChooseFull(bool flag) { m_chooseFull = flag; } | |
39466 | bool GetChooseFull() const { return m_chooseFull; } | |
39467 | void SetColour(const wxColour& colour) { m_dataColour = colour; } | |
39468 | const wxColour& GetColour() const { return m_dataColour; } | |
39469 | wxColour& GetColour() { return m_dataColour; } | |
39470 | ||
39471 | ||
39472 | void SetCustomColour(int i, const wxColour& colour); | |
39473 | wxColour GetCustomColour(int i); | |
39474 | ||
39475 | void operator=(const wxColourData& data); | |
39476 | ||
39477 | public: | |
39478 | wxColour m_dataColour; | |
39479 | wxColour m_custColours[16]; | |
39480 | bool m_chooseFull; | |
39481 | ||
39482 | private: | |
39483 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
39484 | }; | |
39485 | ||
39486 | class wxFontData: public wxObject | |
39487 | { | |
39488 | public: | |
39489 | wxFontData(); | |
39490 | ~wxFontData(); | |
39491 | ||
39492 | wxFontData(const wxFontData& data) | |
39493 | : wxObject() | |
39494 | , m_fontColour(data.m_fontColour) | |
39495 | , m_showHelp(data.m_showHelp) | |
39496 | , m_allowSymbols(data.m_allowSymbols) | |
39497 | , m_enableEffects(data.m_enableEffects) | |
39498 | , m_initialFont(data.m_initialFont) | |
39499 | , m_chosenFont(data.m_chosenFont) | |
39500 | , m_minSize(data.m_minSize) | |
39501 | , m_maxSize(data.m_maxSize) | |
39502 | , m_encoding(data.m_encoding) | |
39503 | , m_encodingInfo(data.m_encodingInfo) | |
39504 | { | |
39505 | } | |
39506 | ||
39507 | wxFontData& operator=(const wxFontData& data) | |
39508 | { | |
39509 | wxObject::operator=(data); | |
39510 | m_fontColour = data.m_fontColour; | |
39511 | m_showHelp = data.m_showHelp; | |
39512 | m_allowSymbols = data.m_allowSymbols; | |
39513 | m_enableEffects = data.m_enableEffects; | |
39514 | m_initialFont = data.m_initialFont; | |
39515 | m_chosenFont = data.m_chosenFont; | |
39516 | m_minSize = data.m_minSize; | |
39517 | m_maxSize = data.m_maxSize; | |
39518 | m_encoding = data.m_encoding; | |
39519 | m_encodingInfo = data.m_encodingInfo; | |
39520 | return *this; | |
39521 | } | |
39522 | ||
39523 | void SetAllowSymbols(bool flag) { m_allowSymbols = flag; } | |
39524 | bool GetAllowSymbols() const { return m_allowSymbols; } | |
39525 | ||
39526 | void SetColour(const wxColour& colour) { m_fontColour = colour; } | |
39527 | wxColour &GetColour() { return m_fontColour; } | |
39528 | ||
39529 | void SetShowHelp(bool flag) { m_showHelp = flag; } | |
39530 | bool GetShowHelp() const { return m_showHelp; } | |
39531 | ||
39532 | void EnableEffects(bool flag) { m_enableEffects = flag; } | |
39533 | bool GetEnableEffects() const { return m_enableEffects; } | |
39534 | ||
39535 | void SetInitialFont(const wxFont& font) { m_initialFont = font; } | |
39536 | wxFont GetInitialFont() const { return m_initialFont; } | |
39537 | ||
39538 | void SetChosenFont(const wxFont& font) { m_chosenFont = font; } | |
39539 | wxFont GetChosenFont() const { return m_chosenFont; } | |
39540 | ||
39541 | void SetRange(int minRange, int maxRange) { m_minSize = minRange; m_maxSize = maxRange; } | |
39542 | ||
39543 | ||
39544 | ||
39545 | ||
39546 | wxFontEncoding GetEncoding() const { return m_encoding; } | |
39547 | void SetEncoding(wxFontEncoding encoding) { m_encoding = encoding; } | |
39548 | ||
39549 | wxNativeEncodingInfo& EncodingInfo() { return m_encodingInfo; } | |
39550 | ||
39551 | public: | |
39552 | wxColour m_fontColour; | |
39553 | bool m_showHelp; | |
39554 | bool m_allowSymbols; | |
39555 | bool m_enableEffects; | |
39556 | wxFont m_initialFont; | |
39557 | wxFont m_chosenFont; | |
39558 | int m_minSize; | |
39559 | int m_maxSize; | |
39560 | ||
39561 | private: | |
39562 | wxFontEncoding m_encoding; | |
39563 | wxNativeEncodingInfo m_encodingInfo; | |
39564 | ||
39565 | private: | |
39566 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
39567 | }; | |
39568 | ||
39569 | ||
39570 | ||
39571 | ||
39572 | ||
39573 | ||
39574 | ||
39575 | enum wxPrintBin | |
39576 | { | |
39577 | wxPRINTBIN_DEFAULT, | |
39578 | ||
39579 | wxPRINTBIN_ONLYONE, | |
39580 | wxPRINTBIN_LOWER, | |
39581 | wxPRINTBIN_MIDDLE, | |
39582 | wxPRINTBIN_MANUAL, | |
39583 | wxPRINTBIN_ENVELOPE, | |
39584 | wxPRINTBIN_ENVMANUAL, | |
39585 | wxPRINTBIN_AUTO, | |
39586 | wxPRINTBIN_TRACTOR, | |
39587 | wxPRINTBIN_SMALLFMT, | |
39588 | wxPRINTBIN_LARGEFMT, | |
39589 | wxPRINTBIN_LARGECAPACITY, | |
39590 | wxPRINTBIN_CASSETTE, | |
39591 | wxPRINTBIN_FORMSOURCE, | |
39592 | ||
39593 | wxPRINTBIN_USER | |
39594 | }; | |
39595 | ||
39596 | ||
39597 | class wxPrintData: public wxObject | |
39598 | { | |
39599 | public: | |
39600 | wxPrintData(); | |
39601 | wxPrintData(const wxPrintData& printData); | |
39602 | ~wxPrintData(); | |
39603 | ||
39604 | int GetNoCopies() const { return m_printNoCopies; } | |
39605 | bool GetCollate() const { return m_printCollate; } | |
39606 | int GetOrientation() const { return m_printOrientation; } | |
39607 | ||
39608 | ||
39609 | bool Ok() const ; | |
39610 | ||
39611 | const wxString& GetPrinterName() const { return m_printerName; } | |
39612 | bool GetColour() const { return m_colour; } | |
39613 | wxDuplexMode GetDuplex() const { return m_duplexMode; } | |
39614 | wxPaperSize GetPaperId() const { return m_paperId; } | |
39615 | const wxSize& GetPaperSize() const { return m_paperSize; } | |
39616 | ||
39617 | wxPrintQuality GetQuality() const { return m_printQuality; } | |
39618 | wxPrintBin GetBin() const { return m_bin; } | |
39619 | wxPrintMode GetPrintMode() const { return m_printMode; } | |
39620 | ||
39621 | void SetNoCopies(int v) { m_printNoCopies = v; } | |
39622 | void SetCollate(bool flag) { m_printCollate = flag; } | |
39623 | void SetOrientation(int orient) { m_printOrientation = orient; } | |
39624 | ||
39625 | void SetPrinterName(const wxString& name) { m_printerName = name; } | |
39626 | void SetColour(bool colour) { m_colour = colour; } | |
39627 | void SetDuplex(wxDuplexMode duplex) { m_duplexMode = duplex; } | |
39628 | void SetPaperId(wxPaperSize sizeId) { m_paperId = sizeId; } | |
39629 | void SetPaperSize(const wxSize& sz) { m_paperSize = sz; } | |
39630 | void SetQuality(wxPrintQuality quality) { m_printQuality = quality; } | |
39631 | void SetBin(wxPrintBin bin) { m_bin = bin; } | |
39632 | void SetPrintMode(wxPrintMode printMode) { m_printMode = printMode; } | |
39633 | ||
39634 | wxString GetFilename() const { return m_filename; } | |
39635 | void SetFilename( const wxString &filename ) { m_filename = filename; } | |
39636 | ||
39637 | void operator=(const wxPrintData& data); | |
39638 | ||
39639 | char* GetPrivData() const { return m_privData; } | |
39640 | int GetPrivDataLen() const { return m_privDataLen; } | |
39641 | void SetPrivData( char *privData, int len ); | |
39642 | ||
39643 | ||
39644 | ||
39645 | ||
39646 | wxString GetPrinterCommand() const; | |
39647 | wxString GetPrinterOptions() const; | |
39648 | wxString GetPreviewCommand() const; | |
39649 | wxString GetFontMetricPath() const; | |
39650 | double GetPrinterScaleX() const; | |
39651 | double GetPrinterScaleY() const; | |
39652 | long GetPrinterTranslateX() const; | |
39653 | long GetPrinterTranslateY() const; | |
39654 | ||
39655 | void SetPrinterCommand(const wxString& command); | |
39656 | void SetPrinterOptions(const wxString& options); | |
39657 | void SetPreviewCommand(const wxString& command); | |
39658 | void SetFontMetricPath(const wxString& path); | |
39659 | void SetPrinterScaleX(double x); | |
39660 | void SetPrinterScaleY(double y); | |
39661 | void SetPrinterScaling(double x, double y); | |
39662 | void SetPrinterTranslateX(long x); | |
39663 | void SetPrinterTranslateY(long y); | |
39664 | void SetPrinterTranslation(long x, long y); | |
39665 | ||
39666 | ||
39667 | ||
39668 | void ConvertToNative(); | |
39669 | void ConvertFromNative(); | |
39670 | ||
39671 | wxPrintNativeDataBase *GetNativeData() const { return m_nativeData; } | |
39672 | ||
39673 | private: | |
39674 | wxPrintBin m_bin; | |
39675 | wxPrintMode m_printMode; | |
39676 | ||
39677 | int m_printNoCopies; | |
39678 | int m_printOrientation; | |
39679 | bool m_printCollate; | |
39680 | ||
39681 | wxString m_printerName; | |
39682 | bool m_colour; | |
39683 | wxDuplexMode m_duplexMode; | |
39684 | wxPrintQuality m_printQuality; | |
39685 | wxPaperSize m_paperId; | |
39686 | wxSize m_paperSize; | |
39687 | ||
39688 | wxString m_filename; | |
39689 | ||
39690 | char* m_privData; | |
39691 | int m_privDataLen; | |
39692 | ||
39693 | wxPrintNativeDataBase *m_nativeData; | |
39694 | ||
39695 | private: | |
39696 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
39697 | }; | |
39698 | # 281 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/cmndata.h" | |
39699 | class wxPrintDialogData: public wxObject | |
39700 | { | |
39701 | public: | |
39702 | wxPrintDialogData(); | |
39703 | wxPrintDialogData(const wxPrintDialogData& dialogData); | |
39704 | wxPrintDialogData(const wxPrintData& printData); | |
39705 | ~wxPrintDialogData(); | |
39706 | ||
39707 | int GetFromPage() const { return m_printFromPage; }; | |
39708 | int GetToPage() const { return m_printToPage; }; | |
39709 | int GetMinPage() const { return m_printMinPage; }; | |
39710 | int GetMaxPage() const { return m_printMaxPage; }; | |
39711 | int GetNoCopies() const { return m_printNoCopies; }; | |
39712 | bool GetAllPages() const { return m_printAllPages; }; | |
39713 | bool GetSelection() const { return m_printSelection; }; | |
39714 | bool GetCollate() const { return m_printCollate; }; | |
39715 | bool GetPrintToFile() const { return m_printToFile; }; | |
39716 | ||
39717 | bool GetSetupDialog() const { return m_printSetupDialog; }; | |
39718 | ||
39719 | void SetFromPage(int v) { m_printFromPage = v; }; | |
39720 | void SetToPage(int v) { m_printToPage = v; }; | |
39721 | void SetMinPage(int v) { m_printMinPage = v; }; | |
39722 | void SetMaxPage(int v) { m_printMaxPage = v; }; | |
39723 | void SetNoCopies(int v) { m_printNoCopies = v; }; | |
39724 | void SetAllPages(bool flag) { m_printAllPages = flag; }; | |
39725 | void SetSelection(bool flag) { m_printSelection = flag; }; | |
39726 | void SetCollate(bool flag) { m_printCollate = flag; }; | |
39727 | void SetPrintToFile(bool flag) { m_printToFile = flag; }; | |
39728 | ||
39729 | void SetSetupDialog(bool flag) { m_printSetupDialog = flag; }; | |
39730 | ||
39731 | void EnablePrintToFile(bool flag) { m_printEnablePrintToFile = flag; }; | |
39732 | void EnableSelection(bool flag) { m_printEnableSelection = flag; }; | |
39733 | void EnablePageNumbers(bool flag) { m_printEnablePageNumbers = flag; }; | |
39734 | void EnableHelp(bool flag) { m_printEnableHelp = flag; }; | |
39735 | ||
39736 | bool GetEnablePrintToFile() const { return m_printEnablePrintToFile; }; | |
39737 | bool GetEnableSelection() const { return m_printEnableSelection; }; | |
39738 | bool GetEnablePageNumbers() const { return m_printEnablePageNumbers; }; | |
39739 | bool GetEnableHelp() const { return m_printEnableHelp; }; | |
39740 | ||
39741 | ||
39742 | bool Ok() const { return m_printData.Ok() ; } | |
39743 | ||
39744 | wxPrintData& GetPrintData() { return m_printData; } | |
39745 | void SetPrintData(const wxPrintData& printData) { m_printData = printData; } | |
39746 | ||
39747 | void operator=(const wxPrintDialogData& data); | |
39748 | void operator=(const wxPrintData& data); | |
39749 | ||
39750 | private: | |
39751 | int m_printFromPage; | |
39752 | int m_printToPage; | |
39753 | int m_printMinPage; | |
39754 | int m_printMaxPage; | |
39755 | int m_printNoCopies; | |
39756 | bool m_printAllPages; | |
39757 | bool m_printCollate; | |
39758 | bool m_printToFile; | |
39759 | bool m_printSelection; | |
39760 | bool m_printEnableSelection; | |
39761 | bool m_printEnablePageNumbers; | |
39762 | bool m_printEnableHelp; | |
39763 | bool m_printEnablePrintToFile; | |
39764 | ||
39765 | bool m_printSetupDialog; | |
39766 | ||
39767 | wxPrintData m_printData; | |
39768 | ||
39769 | private: | |
39770 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
39771 | }; | |
39772 | # 362 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/cmndata.h" | |
39773 | class wxPageSetupDialogData: public wxObject | |
39774 | { | |
39775 | public: | |
39776 | wxPageSetupDialogData(); | |
39777 | wxPageSetupDialogData(const wxPageSetupDialogData& dialogData); | |
39778 | wxPageSetupDialogData(const wxPrintData& printData); | |
39779 | ~wxPageSetupDialogData(); | |
39780 | ||
39781 | wxSize GetPaperSize() const { return m_paperSize; }; | |
39782 | wxPaperSize GetPaperId() const { return m_printData.GetPaperId(); }; | |
39783 | wxPoint GetMinMarginTopLeft() const { return m_minMarginTopLeft; }; | |
39784 | wxPoint GetMinMarginBottomRight() const { return m_minMarginBottomRight; }; | |
39785 | wxPoint GetMarginTopLeft() const { return m_marginTopLeft; }; | |
39786 | wxPoint GetMarginBottomRight() const { return m_marginBottomRight; }; | |
39787 | ||
39788 | bool GetDefaultMinMargins() const { return m_defaultMinMargins; }; | |
39789 | bool GetEnableMargins() const { return m_enableMargins; }; | |
39790 | bool GetEnableOrientation() const { return m_enableOrientation; }; | |
39791 | bool GetEnablePaper() const { return m_enablePaper; }; | |
39792 | bool GetEnablePrinter() const { return m_enablePrinter; }; | |
39793 | bool GetDefaultInfo() const { return m_getDefaultInfo; }; | |
39794 | bool GetEnableHelp() const { return m_enableHelp; }; | |
39795 | ||
39796 | ||
39797 | bool Ok() const { return m_printData.Ok() ; } | |
39798 | ||
39799 | ||
39800 | ||
39801 | void SetPaperSize(const wxSize& sz); | |
39802 | ||
39803 | void SetPaperId(wxPaperSize id) { m_printData.SetPaperId(id); }; | |
39804 | ||
39805 | ||
39806 | void SetPaperSize(wxPaperSize id); | |
39807 | ||
39808 | void SetMinMarginTopLeft(const wxPoint& pt) { m_minMarginTopLeft = pt; }; | |
39809 | void SetMinMarginBottomRight(const wxPoint& pt) { m_minMarginBottomRight = pt; }; | |
39810 | void SetMarginTopLeft(const wxPoint& pt) { m_marginTopLeft = pt; }; | |
39811 | void SetMarginBottomRight(const wxPoint& pt) { m_marginBottomRight = pt; }; | |
39812 | void SetDefaultMinMargins(bool flag) { m_defaultMinMargins = flag; }; | |
39813 | void SetDefaultInfo(bool flag) { m_getDefaultInfo = flag; }; | |
39814 | ||
39815 | void EnableMargins(bool flag) { m_enableMargins = flag; }; | |
39816 | void EnableOrientation(bool flag) { m_enableOrientation = flag; }; | |
39817 | void EnablePaper(bool flag) { m_enablePaper = flag; }; | |
39818 | void EnablePrinter(bool flag) { m_enablePrinter = flag; }; | |
39819 | void EnableHelp(bool flag) { m_enableHelp = flag; }; | |
39820 | ||
39821 | ||
39822 | ||
39823 | void CalculateIdFromPaperSize(); | |
39824 | ||
39825 | ||
39826 | void CalculatePaperSizeFromId(); | |
39827 | ||
39828 | wxPageSetupDialogData& operator=(const wxPageSetupDialogData& data); | |
39829 | wxPageSetupDialogData& operator=(const wxPrintData& data); | |
39830 | ||
39831 | wxPrintData& GetPrintData() { return m_printData; } | |
39832 | void SetPrintData(const wxPrintData& printData); | |
39833 | ||
39834 | private: | |
39835 | wxSize m_paperSize; | |
39836 | wxPoint m_minMarginTopLeft; | |
39837 | wxPoint m_minMarginBottomRight; | |
39838 | wxPoint m_marginTopLeft; | |
39839 | wxPoint m_marginBottomRight; | |
39840 | bool m_defaultMinMargins; | |
39841 | bool m_enableMargins; | |
39842 | bool m_enableOrientation; | |
39843 | bool m_enablePaper; | |
39844 | bool m_enablePrinter; | |
39845 | bool m_getDefaultInfo; | |
39846 | bool m_enableHelp; | |
39847 | wxPrintData m_printData; | |
39848 | ||
39849 | private: | |
39850 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
39851 | }; | |
39852 | # 50 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
39853 | ||
39854 | ||
39855 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/ctrlsub.h" 1 | |
39856 | # 36 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/ctrlsub.h" | |
39857 | class wxItemContainerImmutable | |
39858 | { | |
39859 | public: | |
39860 | wxItemContainerImmutable() { } | |
39861 | virtual ~wxItemContainerImmutable(); | |
39862 | ||
39863 | ||
39864 | ||
39865 | ||
39866 | virtual int GetCount() const = 0; | |
39867 | bool IsEmpty() const { return GetCount() == 0; } | |
39868 | ||
39869 | virtual wxString GetString(int n) const = 0; | |
39870 | wxArrayString GetStrings() const; | |
39871 | virtual void SetString(int n, const wxString& s) = 0; | |
39872 | virtual int FindString(const wxString& s) const = 0; | |
39873 | ||
39874 | ||
39875 | ||
39876 | ||
39877 | ||
39878 | virtual void SetSelection(int n) = 0; | |
39879 | virtual int GetSelection() const = 0; | |
39880 | ||
39881 | ||
39882 | bool SetStringSelection(const wxString& s); | |
39883 | ||
39884 | ||
39885 | wxString GetStringSelection() const; | |
39886 | ||
39887 | ||
39888 | ||
39889 | void Select(int n) { SetSelection(n); } | |
39890 | ||
39891 | ||
39892 | protected: | |
39893 | ||
39894 | ||
39895 | inline bool IsValid(int n) const { return n >= 0 && n < GetCount(); } | |
39896 | }; | |
39897 | ||
39898 | class wxItemContainer : public wxItemContainerImmutable | |
39899 | { | |
39900 | public: | |
39901 | wxItemContainer() { m_clientDataItemsType = wxClientData_None; } | |
39902 | virtual ~wxItemContainer(); | |
39903 | ||
39904 | ||
39905 | ||
39906 | ||
39907 | int Append(const wxString& item) | |
39908 | { return DoAppend(item); } | |
39909 | int Append(const wxString& item, void *clientData) | |
39910 | { int n = DoAppend(item); SetClientData(n, clientData); return n; } | |
39911 | int Append(const wxString& item, wxClientData *clientData) | |
39912 | { int n = DoAppend(item); SetClientObject(n, clientData); return n; } | |
39913 | ||
39914 | ||
39915 | void AppendString( const wxString& item) | |
39916 | { Append( item ); } | |
39917 | ||
39918 | ||
39919 | void Append(const wxArrayString& strings); | |
39920 | ||
39921 | int Insert(const wxString& item, int pos) | |
39922 | { return DoInsert(item, pos); } | |
39923 | int Insert(const wxString& item, int pos, void *clientData); | |
39924 | int Insert(const wxString& item, int pos, wxClientData *clientData); | |
39925 | ||
39926 | ||
39927 | ||
39928 | ||
39929 | virtual void Clear() = 0; | |
39930 | virtual void Delete(int n) = 0; | |
39931 | ||
39932 | ||
39933 | ||
39934 | ||
39935 | ||
39936 | void SetClientData(int n, void* clientData); | |
39937 | void* GetClientData(int n) const; | |
39938 | ||
39939 | void SetClientObject(int n, wxClientData* clientData); | |
39940 | wxClientData* GetClientObject(int n) const; | |
39941 | ||
39942 | bool HasClientObjectData() const | |
39943 | { return m_clientDataItemsType == wxClientData_Object; } | |
39944 | bool HasClientUntypedData() const | |
39945 | { return m_clientDataItemsType == wxClientData_Void; } | |
39946 | ||
39947 | ||
39948 | ||
39949 | ||
39950 | ||
39951 | ||
39952 | ||
39953 | protected: | |
39954 | virtual int DoAppend(const wxString& item) = 0; | |
39955 | virtual int DoInsert(const wxString& item, int pos) = 0; | |
39956 | ||
39957 | virtual void DoSetItemClientData(int n, void* clientData) = 0; | |
39958 | virtual void* DoGetItemClientData(int n) const = 0; | |
39959 | virtual void DoSetItemClientObject(int n, wxClientData* clientData) = 0; | |
39960 | virtual wxClientData* DoGetItemClientObject(int n) const = 0; | |
39961 | ||
39962 | ||
39963 | wxClientDataType m_clientDataItemsType; | |
39964 | }; | |
39965 | # 167 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/ctrlsub.h" | |
39966 | class wxControlWithItems : public wxControl, public wxItemContainer | |
39967 | { | |
39968 | public: | |
39969 | wxControlWithItems() { } | |
39970 | virtual ~wxControlWithItems(); | |
39971 | ||
39972 | ||
39973 | ||
39974 | ||
39975 | ||
39976 | ||
39977 | void SetClientData(void *data) { wxControl::SetClientData(data); } void *GetClientData() const { return wxControl::GetClientData(); } void SetClientObject(wxClientData *data) { wxControl::SetClientObject(data); } wxClientData *GetClientObject() const { return wxControl::GetClientObject(); } void SetClientData(int n, void* clientData) { wxItemContainer::SetClientData(n, clientData); } void* GetClientData(int n) const { return wxItemContainer::GetClientData(n); } void SetClientObject(int n, wxClientData* clientData) { wxItemContainer::SetClientObject(n, clientData); } wxClientData* GetClientObject(int n) const { return wxItemContainer::GetClientObject(n); } | |
39978 | ||
39979 | ||
39980 | ||
39981 | virtual bool ShouldInheritColours() const { return false; } | |
39982 | ||
39983 | protected: | |
39984 | ||
39985 | ||
39986 | ||
39987 | ||
39988 | ||
39989 | ||
39990 | ||
39991 | virtual void SetInitialBestSize(const wxSize& ) { } | |
39992 | ||
39993 | private: | |
39994 | private: wxControlWithItems(const wxControlWithItems&); wxControlWithItems& operator=(const wxControlWithItems&); | |
39995 | }; | |
39996 | # 53 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
39997 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/bmpbuttn.h" 1 | |
39998 | # 22 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/bmpbuttn.h" | |
39999 | extern const wxChar* wxButtonNameStr; | |
40000 | ||
40001 | ||
40002 | ||
40003 | ||
40004 | ||
40005 | ||
40006 | class wxBitmapButtonBase : public wxButton | |
40007 | { | |
40008 | public: | |
40009 | wxBitmapButtonBase() | |
40010 | : m_bmpNormal(), m_bmpSelected(), m_bmpFocus(), m_bmpDisabled() | |
40011 | , m_marginX(0), m_marginY(0) | |
40012 | { } | |
40013 | ||
40014 | ||
40015 | void SetBitmapLabel(const wxBitmap& bitmap) | |
40016 | { m_bmpNormal = bitmap; OnSetBitmap(); } | |
40017 | void SetBitmapSelected(const wxBitmap& sel) | |
40018 | { m_bmpSelected = sel; OnSetBitmap(); }; | |
40019 | void SetBitmapFocus(const wxBitmap& focus) | |
40020 | { m_bmpFocus = focus; OnSetBitmap(); }; | |
40021 | void SetBitmapDisabled(const wxBitmap& disabled) | |
40022 | { m_bmpDisabled = disabled; OnSetBitmap(); }; | |
40023 | void SetLabel(const wxBitmap& bitmap) | |
40024 | { SetBitmapLabel(bitmap); } | |
40025 | ||
40026 | ||
40027 | const wxBitmap& GetBitmapLabel() const { return m_bmpNormal; } | |
40028 | const wxBitmap& GetBitmapSelected() const { return m_bmpSelected; } | |
40029 | const wxBitmap& GetBitmapFocus() const { return m_bmpFocus; } | |
40030 | const wxBitmap& GetBitmapDisabled() const { return m_bmpDisabled; } | |
40031 | wxBitmap& GetBitmapLabel() { return m_bmpNormal; } | |
40032 | wxBitmap& GetBitmapSelected() { return m_bmpSelected; } | |
40033 | wxBitmap& GetBitmapFocus() { return m_bmpFocus; } | |
40034 | wxBitmap& GetBitmapDisabled() { return m_bmpDisabled; } | |
40035 | ||
40036 | ||
40037 | virtual void SetMargins(int x, int y) { m_marginX = x; m_marginY = y; } | |
40038 | int GetMarginX() const { return m_marginX; } | |
40039 | int GetMarginY() const { return m_marginY; } | |
40040 | ||
40041 | protected: | |
40042 | ||
40043 | virtual void OnSetBitmap() { InvalidateBestSize(); Refresh(); } | |
40044 | ||
40045 | ||
40046 | wxBitmap m_bmpNormal, | |
40047 | m_bmpSelected, | |
40048 | m_bmpFocus, | |
40049 | m_bmpDisabled; | |
40050 | ||
40051 | ||
40052 | int m_marginX, | |
40053 | m_marginY; | |
40054 | ||
40055 | private: | |
40056 | ||
40057 | void SetLabel(const wxString& rsLabel) | |
40058 | { wxWindowBase::SetLabel(rsLabel); } | |
40059 | ||
40060 | private: wxBitmapButtonBase(const wxBitmapButtonBase&); wxBitmapButtonBase& operator=(const wxBitmapButtonBase&); | |
40061 | }; | |
40062 | # 93 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/bmpbuttn.h" | |
40063 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/bmpbuttn.h" 1 | |
40064 | # 22 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/bmpbuttn.h" | |
40065 | class wxBitmapButton: public wxBitmapButtonBase | |
40066 | { | |
40067 | public: | |
40068 | wxBitmapButton() { Init(); } | |
40069 | ||
40070 | wxBitmapButton(wxWindow *parent, | |
40071 | wxWindowID id, | |
40072 | const wxBitmap& bitmap, | |
40073 | const wxPoint& pos = wxDefaultPosition, | |
40074 | const wxSize& size = wxDefaultSize, | |
40075 | long style = 0x0004, | |
40076 | const wxValidator& validator = wxDefaultValidator, | |
40077 | const wxString& name = wxButtonNameStr) | |
40078 | { | |
40079 | Init(); | |
40080 | ||
40081 | Create(parent, id, bitmap, pos, size, style, validator, name); | |
40082 | } | |
40083 | ||
40084 | bool Create(wxWindow *parent, | |
40085 | wxWindowID id, | |
40086 | const wxBitmap& bitmap, | |
40087 | const wxPoint& pos = wxDefaultPosition, | |
40088 | const wxSize& size = wxDefaultSize, | |
40089 | long style = 0x0004, | |
40090 | const wxValidator& validator = wxDefaultValidator, | |
40091 | const wxString& name = wxButtonNameStr); | |
40092 | ||
40093 | void SetLabel( const wxString &label ); | |
40094 | wxString GetLabel() const; | |
40095 | virtual void SetLabel( const wxBitmap& bitmap ) { SetBitmapLabel(bitmap); } | |
40096 | ||
40097 | virtual void SetDefault(); | |
40098 | virtual bool Enable(bool enable = 1); | |
40099 | ||
40100 | ||
40101 | ||
40102 | ||
40103 | void HasFocus(); | |
40104 | void NotFocus(); | |
40105 | void StartSelect(); | |
40106 | void EndSelect(); | |
40107 | void DoApplyWidgetStyle(GtkRcStyle *style); | |
40108 | ||
40109 | bool m_hasFocus:1; | |
40110 | bool m_isSelected:1; | |
40111 | ||
40112 | protected: | |
40113 | virtual void OnSetBitmap(); | |
40114 | virtual wxSize DoGetBestSize() const; | |
40115 | ||
40116 | void Init(); | |
40117 | ||
40118 | private: | |
40119 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
40120 | }; | |
40121 | # 94 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/bmpbuttn.h" 2 | |
40122 | # 54 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
40123 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/checkbox.h" 1 | |
40124 | # 44 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/checkbox.h" | |
40125 | enum wxCheckBoxState | |
40126 | { | |
40127 | wxCHK_UNCHECKED, | |
40128 | wxCHK_CHECKED, | |
40129 | wxCHK_UNDETERMINED | |
40130 | }; | |
40131 | ||
40132 | ||
40133 | extern const wxChar * wxCheckBoxNameStr; | |
40134 | ||
40135 | ||
40136 | ||
40137 | ||
40138 | ||
40139 | class wxCheckBoxBase : public wxControl | |
40140 | { | |
40141 | public: | |
40142 | wxCheckBoxBase() { } | |
40143 | ||
40144 | ||
40145 | virtual void SetValue(bool value) = 0; | |
40146 | virtual bool GetValue() const = 0; | |
40147 | ||
40148 | bool IsChecked() const | |
40149 | { | |
40150 | ; | |
40151 | ||
40152 | ||
40153 | return GetValue(); | |
40154 | } | |
40155 | ||
40156 | wxCheckBoxState Get3StateValue() const | |
40157 | { | |
40158 | wxCheckBoxState state = DoGet3StateValue(); | |
40159 | ||
40160 | if ( state == wxCHK_UNDETERMINED && !Is3State() ) | |
40161 | { | |
40162 | ||
40163 | ; | |
40164 | ||
40165 | ||
40166 | state = wxCHK_UNCHECKED; | |
40167 | } | |
40168 | ||
40169 | return state; | |
40170 | } | |
40171 | ||
40172 | void Set3StateValue(wxCheckBoxState state) | |
40173 | { | |
40174 | if ( state == wxCHK_UNDETERMINED && !Is3State() ) | |
40175 | { | |
40176 | ; | |
40177 | state = wxCHK_UNCHECKED; | |
40178 | } | |
40179 | ||
40180 | DoSet3StateValue(state); | |
40181 | } | |
40182 | ||
40183 | bool Is3State() const { return HasFlag(0x1000); } | |
40184 | ||
40185 | bool Is3rdStateAllowedForUser() const | |
40186 | { | |
40187 | return HasFlag(0x2000); | |
40188 | } | |
40189 | ||
40190 | virtual bool HasTransparentBackground() { return true; } | |
40191 | ||
40192 | protected: | |
40193 | virtual void DoSet3StateValue(wxCheckBoxState ) { ; } | |
40194 | ||
40195 | virtual wxCheckBoxState DoGet3StateValue() const | |
40196 | { | |
40197 | ; | |
40198 | return wxCHK_UNCHECKED; | |
40199 | } | |
40200 | ||
40201 | private: | |
40202 | private: wxCheckBoxBase(const wxCheckBoxBase&); wxCheckBoxBase& operator=(const wxCheckBoxBase&); | |
40203 | }; | |
40204 | # 131 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/checkbox.h" | |
40205 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/checkbox.h" 1 | |
40206 | # 21 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/checkbox.h" | |
40207 | class wxCheckBox : public wxCheckBoxBase | |
40208 | { | |
40209 | public: | |
40210 | wxCheckBox(); | |
40211 | wxCheckBox( wxWindow *parent, wxWindowID id, const wxString& label, | |
40212 | const wxPoint& pos = wxDefaultPosition, | |
40213 | const wxSize& size = wxDefaultSize, long style = 0, | |
40214 | const wxValidator& validator = wxDefaultValidator, | |
40215 | const wxString& name = wxCheckBoxNameStr) | |
40216 | { | |
40217 | Create(parent, id, label, pos, size, style, validator, name); | |
40218 | } | |
40219 | bool Create(wxWindow *parent, | |
40220 | wxWindowID id, | |
40221 | const wxString& label, | |
40222 | const wxPoint& pos = wxDefaultPosition, | |
40223 | const wxSize& size = wxDefaultSize, | |
40224 | long style = 0, | |
40225 | const wxValidator& validator = wxDefaultValidator, | |
40226 | const wxString& name = wxCheckBoxNameStr ); | |
40227 | ||
40228 | void SetValue( bool state ); | |
40229 | bool GetValue() const; | |
40230 | ||
40231 | virtual void SetLabel( const wxString& label ); | |
40232 | virtual bool Enable( bool enable = 1 ); | |
40233 | ||
40234 | static wxVisualAttributes | |
40235 | GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); | |
40236 | ||
40237 | ||
40238 | ||
40239 | ||
40240 | void DoApplyWidgetStyle(GtkRcStyle *style); | |
40241 | bool IsOwnGtkWindow( GdkWindow *window ); | |
40242 | void OnInternalIdle(); | |
40243 | ||
40244 | GtkWidget *m_widgetCheckbox; | |
40245 | GtkWidget *m_widgetLabel; | |
40246 | ||
40247 | bool m_blockEvent; | |
40248 | ||
40249 | protected: | |
40250 | virtual wxSize DoGetBestSize() const; | |
40251 | ||
40252 | ||
40253 | void DoSet3StateValue(wxCheckBoxState state); | |
40254 | wxCheckBoxState DoGet3StateValue() const; | |
40255 | ||
40256 | ||
40257 | private: | |
40258 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
40259 | }; | |
40260 | # 132 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/checkbox.h" 2 | |
40261 | # 55 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
40262 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/checklst.h" 1 | |
40263 | # 17 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/checklst.h" | |
40264 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/listbox.h" 1 | |
40265 | # 30 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/listbox.h" | |
40266 | class wxArrayInt; | |
40267 | class wxArrayString; | |
40268 | ||
40269 | ||
40270 | ||
40271 | ||
40272 | ||
40273 | extern const wxChar* wxListBoxNameStr; | |
40274 | ||
40275 | ||
40276 | ||
40277 | ||
40278 | ||
40279 | class wxListBoxBase : public wxControlWithItems | |
40280 | { | |
40281 | public: | |
40282 | wxListBoxBase() { } | |
40283 | virtual ~wxListBoxBase(); | |
40284 | ||
40285 | ||
40286 | ||
40287 | void Insert(const wxString& item, int pos) | |
40288 | { DoInsert(item, pos); } | |
40289 | void Insert(const wxString& item, int pos, void *clientData) | |
40290 | { DoInsert(item, pos); SetClientData(pos, clientData); } | |
40291 | void Insert(const wxString& item, int pos, wxClientData *clientData) | |
40292 | { DoInsert(item, pos); SetClientObject(pos, clientData); } | |
40293 | ||
40294 | void InsertItems(int nItems, const wxString *items, int pos); | |
40295 | void InsertItems(const wxArrayString& items, int pos) | |
40296 | { DoInsertItems(items, pos); } | |
40297 | ||
40298 | void Set(int n, const wxString* items, void **clientData = __null); | |
40299 | void Set(const wxArrayString& items, void **clientData = __null) | |
40300 | { DoSetItems(items, clientData); } | |
40301 | ||
40302 | ||
40303 | virtual bool IsSelected(int n) const = 0; | |
40304 | virtual void SetSelection(int n) { DoSetSelection(n, true); } | |
40305 | void SetSelection(int n, bool select) { DoSetSelection(n, select); } | |
40306 | void Deselect(int n) { DoSetSelection(n, false); } | |
40307 | void DeselectAll(int itemToLeaveSelected = -1); | |
40308 | ||
40309 | virtual bool SetStringSelection(const wxString& s, bool select); | |
40310 | virtual bool SetStringSelection(const wxString& s) | |
40311 | { | |
40312 | return SetStringSelection(s, true); | |
40313 | } | |
40314 | ||
40315 | ||
40316 | ||
40317 | virtual int GetSelections(wxArrayInt& aSelections) const = 0; | |
40318 | ||
40319 | ||
40320 | ||
40321 | void SetFirstItem(int n) { DoSetFirstItem(n); } | |
40322 | void SetFirstItem(const wxString& s); | |
40323 | ||
40324 | ||
40325 | ||
40326 | virtual void EnsureVisible(int n); | |
40327 | ||
40328 | ||
40329 | ||
40330 | void AppendAndEnsureVisible(const wxString& s); | |
40331 | ||
40332 | ||
40333 | bool HasMultipleSelection() const | |
40334 | { | |
40335 | return (m_windowStyle & 0x0040) || | |
40336 | (m_windowStyle & 0x0080); | |
40337 | } | |
40338 | ||
40339 | ||
40340 | bool IsSorted() const { return (m_windowStyle & 0x0010) != 0; } | |
40341 | ||
40342 | ||
40343 | ||
40344 | void Command(wxCommandEvent& event); | |
40345 | ||
40346 | ||
40347 | ||
40348 | bool Selected(int n) const { return IsSelected(n); } | |
40349 | ||
40350 | protected: | |
40351 | ||
40352 | ||
40353 | virtual int DoInsert(const wxString& item, int pos) | |
40354 | { InsertItems(1, &item, pos); return pos; } | |
40355 | ||
40356 | ||
40357 | virtual void DoInsertItems(const wxArrayString& items, int pos) = 0; | |
40358 | virtual void DoSetItems(const wxArrayString& items, void **clientData) = 0; | |
40359 | ||
40360 | virtual void DoSetFirstItem(int n) = 0; | |
40361 | ||
40362 | virtual void DoSetSelection(int n, bool select) = 0; | |
40363 | ||
40364 | ||
40365 | private: wxListBoxBase(const wxListBoxBase&); wxListBoxBase& operator=(const wxListBoxBase&); | |
40366 | }; | |
40367 | # 143 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/listbox.h" | |
40368 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/listbox.h" 1 | |
40369 | # 20 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/listbox.h" | |
40370 | class wxSortedArrayString; | |
40371 | ||
40372 | ||
40373 | ||
40374 | ||
40375 | ||
40376 | class wxListBox : public wxListBoxBase | |
40377 | { | |
40378 | public: | |
40379 | ||
40380 | wxListBox(); | |
40381 | wxListBox( wxWindow *parent, wxWindowID id, | |
40382 | const wxPoint& pos = wxDefaultPosition, | |
40383 | const wxSize& size = wxDefaultSize, | |
40384 | int n = 0, const wxString choices[] = (const wxString *) __null, | |
40385 | long style = 0, | |
40386 | const wxValidator& validator = wxDefaultValidator, | |
40387 | const wxString& name = wxListBoxNameStr ) | |
40388 | { | |
40389 | ||
40390 | m_hasCheckBoxes = 0; | |
40391 | ||
40392 | Create(parent, id, pos, size, n, choices, style, validator, name); | |
40393 | } | |
40394 | wxListBox( wxWindow *parent, wxWindowID id, | |
40395 | const wxPoint& pos, | |
40396 | const wxSize& size, | |
40397 | const wxArrayString& choices, | |
40398 | long style = 0, | |
40399 | const wxValidator& validator = wxDefaultValidator, | |
40400 | const wxString& name = wxListBoxNameStr ) | |
40401 | { | |
40402 | ||
40403 | m_hasCheckBoxes = 0; | |
40404 | ||
40405 | Create(parent, id, pos, size, choices, style, validator, name); | |
40406 | } | |
40407 | virtual ~wxListBox(); | |
40408 | ||
40409 | bool Create(wxWindow *parent, wxWindowID id, | |
40410 | const wxPoint& pos = wxDefaultPosition, | |
40411 | const wxSize& size = wxDefaultSize, | |
40412 | int n = 0, const wxString choices[] = (const wxString *) __null, | |
40413 | long style = 0, | |
40414 | const wxValidator& validator = wxDefaultValidator, | |
40415 | const wxString& name = wxListBoxNameStr); | |
40416 | bool Create(wxWindow *parent, wxWindowID id, | |
40417 | const wxPoint& pos, | |
40418 | const wxSize& size, | |
40419 | const wxArrayString& choices, | |
40420 | long style = 0, | |
40421 | const wxValidator& validator = wxDefaultValidator, | |
40422 | const wxString& name = wxListBoxNameStr); | |
40423 | ||
40424 | ||
40425 | virtual void Clear(); | |
40426 | virtual void Delete(int n); | |
40427 | ||
40428 | virtual int GetCount() const; | |
40429 | virtual wxString GetString(int n) const; | |
40430 | virtual void SetString(int n, const wxString& s); | |
40431 | virtual int FindString(const wxString& s) const; | |
40432 | ||
40433 | virtual bool IsSelected(int n) const; | |
40434 | virtual void DoSetSelection(int n, bool select); | |
40435 | virtual int GetSelection() const; | |
40436 | virtual int GetSelections(wxArrayInt& aSelections) const; | |
40437 | ||
40438 | virtual int DoAppend(const wxString& item); | |
40439 | virtual void DoInsertItems(const wxArrayString& items, int pos); | |
40440 | virtual void DoSetItems(const wxArrayString& items, void **clientData); | |
40441 | ||
40442 | virtual void DoSetFirstItem(int n); | |
40443 | ||
40444 | virtual void DoSetItemClientData(int n, void* clientData); | |
40445 | virtual void* DoGetItemClientData(int n) const; | |
40446 | virtual void DoSetItemClientObject(int n, wxClientData* clientData); | |
40447 | virtual wxClientData* DoGetItemClientObject(int n) const; | |
40448 | ||
40449 | static wxVisualAttributes | |
40450 | GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); | |
40451 | ||
40452 | ||
40453 | ||
40454 | void GtkAddItem( const wxString &item, int pos=-1 ); | |
40455 | int GtkGetIndex( GtkWidget *item ) const; | |
40456 | GtkWidget *GetConnectWidget(); | |
40457 | bool IsOwnGtkWindow( GdkWindow *window ); | |
40458 | void DoApplyWidgetStyle(GtkRcStyle *style); | |
40459 | void OnInternalIdle(); | |
40460 | ||
40461 | ||
40462 | void ApplyToolTip( GtkTooltips *tips, const wxChar *tip ); | |
40463 | ||
40464 | ||
40465 | GtkList *m_list; | |
40466 | wxList m_clientList; | |
40467 | ||
40468 | ||
40469 | bool m_hasCheckBoxes; | |
40470 | ||
40471 | ||
40472 | int m_prevSelection; | |
40473 | bool m_blockEvent; | |
40474 | ||
40475 | virtual void FixUpMouseEvent(GtkWidget *widget, wxCoord& x, wxCoord& y); | |
40476 | ||
40477 | protected: | |
40478 | virtual wxSize DoGetBestSize() const; | |
40479 | ||
40480 | ||
40481 | wxString GetRealLabel(struct _GList *item) const; | |
40482 | ||
40483 | ||
40484 | ||
40485 | virtual bool UseGTKStyleBase() const { return true; } | |
40486 | ||
40487 | private: | |
40488 | ||
40489 | ||
40490 | wxSortedArrayString *m_strings; | |
40491 | ||
40492 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
40493 | }; | |
40494 | # 144 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/listbox.h" 2 | |
40495 | # 18 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/checklst.h" 2 | |
40496 | ||
40497 | ||
40498 | ||
40499 | ||
40500 | ||
40501 | class wxCheckListBoxBase : public wxListBox | |
40502 | { | |
40503 | public: | |
40504 | wxCheckListBoxBase() { } | |
40505 | ||
40506 | ||
40507 | virtual bool IsChecked(size_t item) const = 0; | |
40508 | virtual void Check(size_t item, bool check = true) = 0; | |
40509 | ||
40510 | private: wxCheckListBoxBase(const wxCheckListBoxBase&); wxCheckListBoxBase& operator=(const wxCheckListBoxBase&); | |
40511 | }; | |
40512 | # 44 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/checklst.h" | |
40513 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/checklst.h" 1 | |
40514 | # 35 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/checklst.h" | |
40515 | class wxCheckListBox : public wxListBox | |
40516 | { | |
40517 | public: | |
40518 | wxCheckListBox(); | |
40519 | wxCheckListBox(wxWindow *parent, wxWindowID id, | |
40520 | const wxPoint& pos = wxDefaultPosition, | |
40521 | const wxSize& size = wxDefaultSize, | |
40522 | int nStrings = 0, | |
40523 | const wxString *choices = (const wxString *)__null, | |
40524 | long style = 0, | |
40525 | const wxValidator& validator = wxDefaultValidator, | |
40526 | const wxString& name = wxListBoxNameStr); | |
40527 | wxCheckListBox(wxWindow *parent, wxWindowID id, | |
40528 | const wxPoint& pos, | |
40529 | const wxSize& size, | |
40530 | const wxArrayString& choices, | |
40531 | long style = 0, | |
40532 | const wxValidator& validator = wxDefaultValidator, | |
40533 | const wxString& name = wxListBoxNameStr); | |
40534 | ||
40535 | bool IsChecked( int index ) const; | |
40536 | void Check( int index, bool check = 1 ); | |
40537 | ||
40538 | int GetItemHeight() const; | |
40539 | ||
40540 | private: | |
40541 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
40542 | }; | |
40543 | # 45 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/checklst.h" 2 | |
40544 | # 56 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
40545 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/choice.h" 1 | |
40546 | # 33 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/choice.h" | |
40547 | extern const wxChar* wxChoiceNameStr; | |
40548 | ||
40549 | ||
40550 | ||
40551 | ||
40552 | ||
40553 | class wxChoiceBase : public wxControlWithItems | |
40554 | { | |
40555 | public: | |
40556 | wxChoiceBase() { } | |
40557 | virtual ~wxChoiceBase(); | |
40558 | ||
40559 | ||
40560 | ||
40561 | ||
40562 | ||
40563 | virtual void SetColumns(int = 1 ) { } | |
40564 | virtual int GetColumns() const { return 1 ; } | |
40565 | ||
40566 | ||
40567 | void Command(wxCommandEvent& event); | |
40568 | ||
40569 | private: | |
40570 | private: wxChoiceBase(const wxChoiceBase&); wxChoiceBase& operator=(const wxChoiceBase&); | |
40571 | }; | |
40572 | # 72 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/choice.h" | |
40573 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/choice.h" 1 | |
40574 | # 17 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/choice.h" | |
40575 | class wxSortedArrayString; | |
40576 | class wxArrayString; | |
40577 | ||
40578 | ||
40579 | ||
40580 | ||
40581 | ||
40582 | class wxChoice : public wxChoiceBase | |
40583 | { | |
40584 | public: | |
40585 | wxChoice(); | |
40586 | wxChoice( wxWindow *parent, wxWindowID id, | |
40587 | const wxPoint& pos = wxDefaultPosition, | |
40588 | const wxSize& size = wxDefaultSize, | |
40589 | int n = 0, const wxString choices[] = (const wxString *) __null, | |
40590 | long style = 0, | |
40591 | const wxValidator& validator = wxDefaultValidator, | |
40592 | const wxString& name = wxChoiceNameStr ) | |
40593 | { | |
40594 | m_strings = (wxSortedArrayString *)__null; | |
40595 | ||
40596 | Create(parent, id, pos, size, n, choices, style, validator, name); | |
40597 | } | |
40598 | wxChoice( wxWindow *parent, wxWindowID id, | |
40599 | const wxPoint& pos, | |
40600 | const wxSize& size, | |
40601 | const wxArrayString& choices, | |
40602 | long style = 0, | |
40603 | const wxValidator& validator = wxDefaultValidator, | |
40604 | const wxString& name = wxChoiceNameStr ) | |
40605 | { | |
40606 | m_strings = (wxSortedArrayString *)__null; | |
40607 | ||
40608 | Create(parent, id, pos, size, choices, style, validator, name); | |
40609 | } | |
40610 | ~wxChoice(); | |
40611 | bool Create( wxWindow *parent, wxWindowID id, | |
40612 | const wxPoint& pos = wxDefaultPosition, | |
40613 | const wxSize& size = wxDefaultSize, | |
40614 | int n = 0, const wxString choices[] = (wxString *) __null, | |
40615 | long style = 0, | |
40616 | const wxValidator& validator = wxDefaultValidator, | |
40617 | const wxString& name = wxChoiceNameStr ); | |
40618 | bool Create( wxWindow *parent, wxWindowID id, | |
40619 | const wxPoint& pos, | |
40620 | const wxSize& size, | |
40621 | const wxArrayString& choices, | |
40622 | long style = 0, | |
40623 | const wxValidator& validator = wxDefaultValidator, | |
40624 | const wxString& name = wxChoiceNameStr ); | |
40625 | ||
40626 | ||
40627 | void Delete(int n); | |
40628 | void Clear(); | |
40629 | ||
40630 | int GetSelection() const; | |
40631 | ||
40632 | int GetCurrentSelection() const { return GetSelection(); } | |
40633 | ||
40634 | void SetSelection( int n ); | |
40635 | ||
40636 | virtual int GetCount() const; | |
40637 | int FindString( const wxString& string ) const; | |
40638 | wxString GetString( int n ) const; | |
40639 | void SetString( int n, const wxString& string ); | |
40640 | ||
40641 | static wxVisualAttributes | |
40642 | GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); | |
40643 | ||
40644 | protected: | |
40645 | wxList m_clientList; | |
40646 | ||
40647 | void DoApplyWidgetStyle(GtkRcStyle *style); | |
40648 | virtual int DoAppend(const wxString& item); | |
40649 | virtual int DoInsert(const wxString& item, int pos); | |
40650 | ||
40651 | virtual void DoSetItemClientData( int n, void* clientData ); | |
40652 | virtual void* DoGetItemClientData( int n ) const; | |
40653 | virtual void DoSetItemClientObject( int n, wxClientData* clientData ); | |
40654 | virtual wxClientData* DoGetItemClientObject( int n ) const; | |
40655 | ||
40656 | virtual wxSize DoGetBestSize() const; | |
40657 | ||
40658 | virtual bool IsOwnGtkWindow( GdkWindow *window ); | |
40659 | ||
40660 | private: | |
40661 | ||
40662 | int GtkAddHelper(GtkWidget *menu, int pos, const wxString& item); | |
40663 | ||
40664 | ||
40665 | ||
40666 | wxSortedArrayString *m_strings; | |
40667 | ||
40668 | public: | |
40669 | ||
40670 | ||
40671 | int m_selection_hack; | |
40672 | ||
40673 | private: | |
40674 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
40675 | }; | |
40676 | # 73 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/choice.h" 2 | |
40677 | # 57 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
40678 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/scrolbar.h" 1 | |
40679 | # 21 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/scrolbar.h" | |
40680 | extern const wxChar* wxScrollBarNameStr; | |
40681 | ||
40682 | ||
40683 | ||
40684 | ||
40685 | ||
40686 | class wxScrollBarBase : public wxControl | |
40687 | { | |
40688 | public: | |
40689 | wxScrollBarBase() { } | |
40690 | ||
40691 | ||
40692 | bool Create(wxWindow *parent, | |
40693 | wxWindowID id, | |
40694 | const wxPoint& pos = wxDefaultPosition, | |
40695 | const wxSize& size = wxDefaultSize, | |
40696 | long style = wxHORIZONTAL, | |
40697 | const wxValidator& validator = wxDefaultValidator, | |
40698 | const wxString& name = wxScrollBarNameStr); | |
40699 | ||
40700 | ||
40701 | virtual int GetThumbPosition() const = 0; | |
40702 | virtual int GetThumbSize() const = 0; | |
40703 | virtual int GetPageSize() const = 0; | |
40704 | virtual int GetRange() const = 0; | |
40705 | ||
40706 | bool IsVertical() const { return (m_windowStyle & wxVERTICAL) != 0; } | |
40707 | ||
40708 | ||
40709 | virtual void SetThumbPosition(int viewStart) = 0; | |
40710 | virtual void SetScrollbar(int position, int thumbSize, | |
40711 | int range, int pageSize, | |
40712 | bool refresh = true) = 0; | |
40713 | ||
40714 | private: | |
40715 | private: wxScrollBarBase(const wxScrollBarBase&); wxScrollBarBase& operator=(const wxScrollBarBase&); | |
40716 | }; | |
40717 | # 66 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/scrolbar.h" | |
40718 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/scrolbar.h" 1 | |
40719 | # 24 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/scrolbar.h" | |
40720 | class wxScrollBar; | |
40721 | ||
40722 | ||
40723 | ||
40724 | ||
40725 | ||
40726 | class wxScrollBar: public wxScrollBarBase | |
40727 | { | |
40728 | public: | |
40729 | wxScrollBar() | |
40730 | { m_adjust = (GtkAdjustment *) __null; m_oldPos = 0.0; } | |
40731 | inline wxScrollBar( wxWindow *parent, wxWindowID id, | |
40732 | const wxPoint& pos = wxDefaultPosition, | |
40733 | const wxSize& size = wxDefaultSize, | |
40734 | long style = wxHORIZONTAL, | |
40735 | const wxValidator& validator = wxDefaultValidator, | |
40736 | const wxString& name = wxScrollBarNameStr ) | |
40737 | { | |
40738 | Create( parent, id, pos, size, style, validator, name ); | |
40739 | } | |
40740 | bool Create( wxWindow *parent, wxWindowID id, | |
40741 | const wxPoint& pos = wxDefaultPosition, | |
40742 | const wxSize& size = wxDefaultSize, | |
40743 | long style = wxHORIZONTAL, | |
40744 | const wxValidator& validator = wxDefaultValidator, | |
40745 | const wxString& name = wxScrollBarNameStr ); | |
40746 | ~wxScrollBar(); | |
40747 | int GetThumbPosition() const; | |
40748 | int GetThumbSize() const; | |
40749 | int GetPageSize() const; | |
40750 | int GetRange() const; | |
40751 | virtual void SetThumbPosition( int viewStart ); | |
40752 | virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize, | |
40753 | bool refresh = 1 ); | |
40754 | ||
40755 | ||
40756 | ||
40757 | ||
40758 | int GetValue(void) const; | |
40759 | void SetValue( int viewStart ); | |
40760 | void GetValues( int *viewStart, int *viewLength, int *objectLength, int *pageLength) const; | |
40761 | int GetViewLength() const; | |
40762 | int GetObjectLength() const; | |
40763 | void SetPageSize( int pageLength ); | |
40764 | void SetObjectLength( int objectLength ); | |
40765 | void SetViewLength( int viewLength ); | |
40766 | ||
40767 | static wxVisualAttributes | |
40768 | GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); | |
40769 | ||
40770 | ||
40771 | ||
40772 | ||
40773 | bool IsOwnGtkWindow( GdkWindow *window ); | |
40774 | ||
40775 | GtkAdjustment *m_adjust; | |
40776 | float m_oldPos; | |
40777 | ||
40778 | protected: | |
40779 | virtual wxSize DoGetBestSize() const; | |
40780 | ||
40781 | private: | |
40782 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
40783 | }; | |
40784 | # 67 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/scrolbar.h" 2 | |
40785 | # 58 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
40786 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/stattext.h" 1 | |
40787 | # 21 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/stattext.h" | |
40788 | extern const wxChar* wxStaticTextNameStr; | |
40789 | ||
40790 | class wxStaticTextBase : public wxControl | |
40791 | { | |
40792 | public: | |
40793 | wxStaticTextBase() { } | |
40794 | # 39 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/stattext.h" | |
40795 | virtual bool AcceptsFocus() const { return false; } | |
40796 | virtual bool HasTransparentBackground() { return true; } | |
40797 | ||
40798 | private: | |
40799 | private: wxStaticTextBase(const wxStaticTextBase&); wxStaticTextBase& operator=(const wxStaticTextBase&); | |
40800 | }; | |
40801 | # 53 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/stattext.h" | |
40802 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/stattext.h" 1 | |
40803 | # 27 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/stattext.h" | |
40804 | class wxStaticText; | |
40805 | # 37 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/stattext.h" | |
40806 | class wxStaticText : public wxControl | |
40807 | { | |
40808 | public: | |
40809 | wxStaticText(); | |
40810 | wxStaticText(wxWindow *parent, | |
40811 | wxWindowID id, | |
40812 | const wxString &label, | |
40813 | const wxPoint &pos = wxDefaultPosition, | |
40814 | const wxSize &size = wxDefaultSize, | |
40815 | long style = 0, | |
40816 | const wxString &name = wxStaticTextNameStr ); | |
40817 | ||
40818 | bool Create(wxWindow *parent, | |
40819 | wxWindowID id, | |
40820 | const wxString &label, | |
40821 | const wxPoint &pos = wxDefaultPosition, | |
40822 | const wxSize &size = wxDefaultSize, | |
40823 | long style = 0, | |
40824 | const wxString &name = wxStaticTextNameStr ); | |
40825 | ||
40826 | wxString GetLabel() const; | |
40827 | void SetLabel( const wxString &label ); | |
40828 | ||
40829 | bool SetFont( const wxFont &font ); | |
40830 | bool SetForegroundColour( const wxColour& colour ); | |
40831 | ||
40832 | static wxVisualAttributes | |
40833 | GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); | |
40834 | ||
40835 | ||
40836 | void Wrap(int width); | |
40837 | ||
40838 | ||
40839 | ||
40840 | ||
40841 | protected: | |
40842 | virtual void DoSetSize(int x, int y, | |
40843 | int width, int height, | |
40844 | int sizeFlags = (0x0001|0x0002)); | |
40845 | ||
40846 | virtual wxSize DoGetBestSize() const; | |
40847 | ||
40848 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
40849 | }; | |
40850 | # 54 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/stattext.h" 2 | |
40851 | # 59 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
40852 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/statbmp.h" 1 | |
40853 | # 26 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/statbmp.h" | |
40854 | class wxIcon; | |
40855 | class wxBitmap; | |
40856 | ||
40857 | extern const wxChar* wxStaticBitmapNameStr; | |
40858 | ||
40859 | ||
40860 | class wxStaticBitmapBase : public wxControl | |
40861 | { | |
40862 | public: | |
40863 | wxStaticBitmapBase() { } | |
40864 | virtual ~wxStaticBitmapBase(); | |
40865 | ||
40866 | ||
40867 | virtual void SetIcon(const wxIcon& icon) = 0; | |
40868 | virtual void SetBitmap(const wxBitmap& bitmap) = 0; | |
40869 | virtual wxBitmap GetBitmap() const = 0; | |
40870 | ||
40871 | ||
40872 | virtual bool AcceptsFocus() const { return false; } | |
40873 | virtual bool HasTransparentBackground() { return true; } | |
40874 | ||
40875 | protected: | |
40876 | virtual wxSize DoGetBestSize() const; | |
40877 | ||
40878 | private: wxStaticBitmapBase(const wxStaticBitmapBase&); wxStaticBitmapBase& operator=(const wxStaticBitmapBase&); | |
40879 | }; | |
40880 | # 60 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/statbmp.h" | |
40881 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/statbmp.h" 1 | |
40882 | # 24 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/statbmp.h" | |
40883 | class wxStaticBitmap : public wxStaticBitmapBase | |
40884 | { | |
40885 | public: | |
40886 | wxStaticBitmap(); | |
40887 | wxStaticBitmap( wxWindow *parent, | |
40888 | wxWindowID id, | |
40889 | const wxBitmap& label, | |
40890 | const wxPoint& pos = wxDefaultPosition, | |
40891 | const wxSize& size = wxDefaultSize, | |
40892 | long style = 0, | |
40893 | const wxString& name = wxStaticBitmapNameStr ); | |
40894 | bool Create( wxWindow *parent, | |
40895 | wxWindowID id, | |
40896 | const wxBitmap& label, | |
40897 | const wxPoint& pos = wxDefaultPosition, | |
40898 | const wxSize& size = wxDefaultSize, | |
40899 | long style = 0, | |
40900 | const wxString& name = wxStaticBitmapNameStr); | |
40901 | ||
40902 | virtual void SetIcon(const wxIcon& icon) { SetBitmap( icon ); } | |
40903 | virtual void SetBitmap( const wxBitmap& bitmap ); | |
40904 | virtual wxBitmap GetBitmap() const { return m_bitmap; } | |
40905 | ||
40906 | ||
40907 | wxIcon GetIcon() const | |
40908 | { | |
40909 | ||
40910 | ||
40911 | return (const wxIcon &)m_bitmap; | |
40912 | } | |
40913 | ||
40914 | static wxVisualAttributes | |
40915 | GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); | |
40916 | ||
40917 | private: | |
40918 | wxBitmap m_bitmap; | |
40919 | ||
40920 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
40921 | }; | |
40922 | # 61 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/statbmp.h" 2 | |
40923 | # 60 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
40924 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/statbox.h" 1 | |
40925 | # 21 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/statbox.h" | |
40926 | extern const wxChar* wxStaticBoxNameStr; | |
40927 | ||
40928 | ||
40929 | ||
40930 | ||
40931 | ||
40932 | class wxStaticBoxBase : public wxControl | |
40933 | { | |
40934 | public: | |
40935 | wxStaticBoxBase() { } | |
40936 | ||
40937 | ||
40938 | virtual bool AcceptsFocus() const { return false; } | |
40939 | virtual bool HasTransparentBackground() { return true; } | |
40940 | ||
40941 | ||
40942 | ||
40943 | ||
40944 | ||
40945 | ||
40946 | virtual void GetBordersForSizer(int *borderTop, int *borderOther) const | |
40947 | { | |
40948 | const int BORDER = 5; | |
40949 | ||
40950 | *borderTop = GetLabel().empty() ? BORDER : GetCharHeight(); | |
40951 | *borderOther = BORDER; | |
40952 | } | |
40953 | ||
40954 | private: | |
40955 | private: wxStaticBoxBase(const wxStaticBoxBase&); wxStaticBoxBase& operator=(const wxStaticBoxBase&); | |
40956 | }; | |
40957 | # 60 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/statbox.h" | |
40958 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/statbox.h" 1 | |
40959 | # 22 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/statbox.h" | |
40960 | class wxStaticBox : public wxStaticBoxBase | |
40961 | { | |
40962 | public: | |
40963 | wxStaticBox(); | |
40964 | wxStaticBox( wxWindow *parent, | |
40965 | wxWindowID id, | |
40966 | const wxString &label, | |
40967 | const wxPoint &pos = wxDefaultPosition, | |
40968 | const wxSize &size = wxDefaultSize, | |
40969 | long style = 0, | |
40970 | const wxString &name = wxStaticBoxNameStr ); | |
40971 | bool Create( wxWindow *parent, | |
40972 | wxWindowID id, | |
40973 | const wxString &label, | |
40974 | const wxPoint &pos = wxDefaultPosition, | |
40975 | const wxSize &size = wxDefaultSize, | |
40976 | long style = 0, | |
40977 | const wxString &name = wxStaticBoxNameStr ); | |
40978 | ||
40979 | virtual void SetLabel( const wxString &label ); | |
40980 | ||
40981 | static wxVisualAttributes | |
40982 | GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); | |
40983 | ||
40984 | ||
40985 | ||
40986 | virtual bool IsTransparentForMouse() const { return 1; } | |
40987 | ||
40988 | protected: | |
40989 | void DoApplyWidgetStyle(GtkRcStyle *style); | |
40990 | ||
40991 | private: | |
40992 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
40993 | }; | |
40994 | # 61 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/statbox.h" 2 | |
40995 | # 61 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
40996 | ||
40997 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/radiobox.h" 1 | |
40998 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/radiobox.h" | |
40999 | extern const wxChar* wxRadioBoxNameStr; | |
41000 | ||
41001 | ||
41002 | ||
41003 | ||
41004 | ||
41005 | ||
41006 | ||
41007 | class wxRadioBoxBase : public wxItemContainerImmutable | |
41008 | { | |
41009 | public: | |
41010 | ||
41011 | virtual bool Enable(int n, bool enable = true) = 0; | |
41012 | virtual bool Show(int n, bool show = true) = 0; | |
41013 | ||
41014 | ||
41015 | virtual int GetColumnCount() const = 0; | |
41016 | virtual int GetRowCount() const = 0; | |
41017 | ||
41018 | ||
41019 | int GetNextItem(int item, wxDirection dir, long style) const; | |
41020 | ||
41021 | ||
41022 | ||
41023 | virtual int FindString(const wxString& s) const; | |
41024 | ||
41025 | ||
41026 | ||
41027 | ||
41028 | ||
41029 | int GetNumberOfRowsOrCols() const __attribute__ ((deprecated)); | |
41030 | void SetNumberOfRowsOrCols(int n) __attribute__ ((deprecated)); | |
41031 | # 63 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/radiobox.h" | |
41032 | }; | |
41033 | # 72 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/radiobox.h" | |
41034 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/radiobox.h" 1 | |
41035 | # 24 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/radiobox.h" | |
41036 | class wxRadioBox: public wxControl | |
41037 | { | |
41038 | public: | |
41039 | wxRadioBox() { Init(); } | |
41040 | wxRadioBox(wxWindow *parent, | |
41041 | wxWindowID id, | |
41042 | const wxString& title, | |
41043 | const wxPoint& pos = wxDefaultPosition, | |
41044 | const wxSize& size = wxDefaultSize, | |
41045 | int n = 0, | |
41046 | const wxString choices[] = (const wxString *) __null, | |
41047 | int majorDim = 1, | |
41048 | long style = wxHORIZONTAL, | |
41049 | const wxValidator& val = wxDefaultValidator, | |
41050 | const wxString& name = wxRadioBoxNameStr) | |
41051 | { | |
41052 | Init(); | |
41053 | ||
41054 | Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name ); | |
41055 | } | |
41056 | wxRadioBox(wxWindow *parent, | |
41057 | wxWindowID id, | |
41058 | const wxString& title, | |
41059 | const wxPoint& pos, | |
41060 | const wxSize& size, | |
41061 | const wxArrayString& choices, | |
41062 | int majorDim = 1, | |
41063 | long style = wxHORIZONTAL, | |
41064 | const wxValidator& val = wxDefaultValidator, | |
41065 | const wxString& name = wxRadioBoxNameStr) | |
41066 | { | |
41067 | Init(); | |
41068 | ||
41069 | Create( parent, id, title, pos, size, choices, majorDim, style, val, name ); | |
41070 | } | |
41071 | ||
41072 | virtual ~wxRadioBox(); | |
41073 | bool Create(wxWindow *parent, | |
41074 | wxWindowID id, | |
41075 | const wxString& title, | |
41076 | const wxPoint& pos = wxDefaultPosition, | |
41077 | const wxSize& size = wxDefaultSize, | |
41078 | int n = 0, | |
41079 | const wxString choices[] = (const wxString *) __null, | |
41080 | int majorDim = 0, | |
41081 | long style = wxHORIZONTAL, | |
41082 | const wxValidator& val = wxDefaultValidator, | |
41083 | const wxString& name = wxRadioBoxNameStr); | |
41084 | bool Create(wxWindow *parent, | |
41085 | wxWindowID id, | |
41086 | const wxString& title, | |
41087 | const wxPoint& pos, | |
41088 | const wxSize& size, | |
41089 | const wxArrayString& choices, | |
41090 | int majorDim = 0, | |
41091 | long style = wxHORIZONTAL, | |
41092 | const wxValidator& val = wxDefaultValidator, | |
41093 | const wxString& name = wxRadioBoxNameStr); | |
41094 | ||
41095 | int FindString( const wxString& s) const; | |
41096 | void SetSelection( int n ); | |
41097 | int GetSelection() const; | |
41098 | ||
41099 | wxString GetString( int n ) const; | |
41100 | void SetString( int n, const wxString& label ); | |
41101 | ||
41102 | virtual bool Show( int item, bool show = true ); | |
41103 | virtual bool Enable( int item, bool enable = true ); | |
41104 | ||
41105 | virtual wxString GetStringSelection() const; | |
41106 | virtual bool SetStringSelection( const wxString& s ); | |
41107 | ||
41108 | int GetCount() const; | |
41109 | # 106 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/radiobox.h" | |
41110 | virtual wxString GetLabel() const { return wxControl::GetLabel(); } | |
41111 | virtual void SetLabel( const wxString& label ); | |
41112 | virtual bool Show( bool show = true ); | |
41113 | virtual bool Enable( bool enable = true ); | |
41114 | ||
41115 | static wxVisualAttributes | |
41116 | GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); | |
41117 | ||
41118 | ||
41119 | ||
41120 | ||
41121 | void SetFocus(); | |
41122 | void GtkDisableEvents(); | |
41123 | void GtkEnableEvents(); | |
41124 | bool IsOwnGtkWindow( GdkWindow *window ); | |
41125 | void DoApplyWidgetStyle(GtkRcStyle *style); | |
41126 | ||
41127 | void ApplyToolTip( GtkTooltips *tips, const wxChar *tip ); | |
41128 | ||
41129 | ||
41130 | virtual void OnInternalIdle(); | |
41131 | ||
41132 | bool m_hasFocus, | |
41133 | m_lostFocus; | |
41134 | int m_majorDim; | |
41135 | wxList m_boxes; | |
41136 | ||
41137 | protected: | |
41138 | ||
41139 | void Init(); | |
41140 | ||
41141 | ||
41142 | ||
41143 | inline bool IsValid(int n) const { return n >= 0 && n < GetCount(); } | |
41144 | ||
41145 | private: | |
41146 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
41147 | }; | |
41148 | # 73 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/radiobox.h" 2 | |
41149 | # 63 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
41150 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/radiobut.h" 1 | |
41151 | # 36 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/radiobut.h" | |
41152 | extern const wxChar* wxRadioButtonNameStr; | |
41153 | # 45 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/radiobut.h" | |
41154 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/radiobut.h" 1 | |
41155 | # 22 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/radiobut.h" | |
41156 | class wxRadioButton: public wxControl | |
41157 | { | |
41158 | public: | |
41159 | wxRadioButton() { } | |
41160 | wxRadioButton( wxWindow *parent, | |
41161 | wxWindowID id, | |
41162 | const wxString& label, | |
41163 | const wxPoint& pos = wxDefaultPosition, | |
41164 | const wxSize& size = wxDefaultSize, | |
41165 | long style = 0, | |
41166 | const wxValidator& validator = wxDefaultValidator, | |
41167 | const wxString& name = wxRadioButtonNameStr ) | |
41168 | { | |
41169 | Create( parent, id, label, pos, size, style, validator, name ); | |
41170 | } | |
41171 | ||
41172 | bool Create( wxWindow *parent, | |
41173 | wxWindowID id, | |
41174 | const wxString& label, | |
41175 | const wxPoint& pos = wxDefaultPosition, | |
41176 | const wxSize& size = wxDefaultSize, | |
41177 | long style = 0, | |
41178 | const wxValidator& validator = wxDefaultValidator, | |
41179 | const wxString& name = wxRadioButtonNameStr ); | |
41180 | ||
41181 | virtual void SetLabel(const wxString& label); | |
41182 | virtual void SetValue(bool val); | |
41183 | virtual bool GetValue() const; | |
41184 | virtual bool Enable( bool enable = 1 ); | |
41185 | ||
41186 | static wxVisualAttributes | |
41187 | GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); | |
41188 | ||
41189 | ||
41190 | ||
41191 | virtual bool IsRadioButton() const { return 1; } | |
41192 | ||
41193 | GSList *m_radioButtonGroup; | |
41194 | void DoApplyWidgetStyle(GtkRcStyle *style); | |
41195 | bool IsOwnGtkWindow( GdkWindow *window ); | |
41196 | void OnInternalIdle(); | |
41197 | ||
41198 | bool m_blockEvent; | |
41199 | ||
41200 | protected: | |
41201 | virtual wxSize DoGetBestSize() const; | |
41202 | ||
41203 | private: | |
41204 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
41205 | }; | |
41206 | # 46 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/radiobut.h" 2 | |
41207 | # 64 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
41208 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/textctrl.h" 1 | |
41209 | # 40 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/textctrl.h" | |
41210 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/ioswrap.h" 1 | |
41211 | # 17 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/ioswrap.h" | |
41212 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/iostream" 1 3 | |
41213 | # 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/iostream" 3 | |
41214 | ||
41215 | # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/iostream" 3 | |
41216 | #pragma GCC visibility push(default) | |
41217 | ||
41218 | ||
41219 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 1 3 | |
41220 | # 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3 | |
41221 | ||
41222 | # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3 | |
41223 | #pragma GCC visibility push(default) | |
41224 | ||
41225 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ios" 1 3 | |
41226 | # 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ios" 3 | |
41227 | ||
41228 | # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ios" 3 | |
41229 | #pragma GCC visibility push(default) | |
41230 | ||
41231 | ||
41232 | ||
41233 | ||
41234 | ||
41235 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/localefwd.h" 1 3 | |
41236 | # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/localefwd.h" 3 | |
41237 | ||
41238 | # 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/localefwd.h" 3 | |
41239 | ||
41240 | ||
41241 | ||
41242 | ||
41243 | ||
41244 | ||
41245 | namespace std | |
41246 | { | |
41247 | ||
41248 | class locale; | |
41249 | ||
41250 | ||
41251 | template<typename _CharT> | |
41252 | inline bool | |
41253 | isspace(_CharT, const locale&); | |
41254 | ||
41255 | template<typename _CharT> | |
41256 | inline bool | |
41257 | isprint(_CharT, const locale&); | |
41258 | ||
41259 | template<typename _CharT> | |
41260 | inline bool | |
41261 | iscntrl(_CharT, const locale&); | |
41262 | ||
41263 | template<typename _CharT> | |
41264 | inline bool | |
41265 | isupper(_CharT, const locale&); | |
41266 | ||
41267 | template<typename _CharT> | |
41268 | inline bool | |
41269 | islower(_CharT, const locale&); | |
41270 | ||
41271 | template<typename _CharT> | |
41272 | inline bool | |
41273 | isalpha(_CharT, const locale&); | |
41274 | ||
41275 | template<typename _CharT> | |
41276 | inline bool | |
41277 | isdigit(_CharT, const locale&); | |
41278 | ||
41279 | template<typename _CharT> | |
41280 | inline bool | |
41281 | ispunct(_CharT, const locale&); | |
41282 | ||
41283 | template<typename _CharT> | |
41284 | inline bool | |
41285 | isxdigit(_CharT, const locale&); | |
41286 | ||
41287 | template<typename _CharT> | |
41288 | inline bool | |
41289 | isalnum(_CharT, const locale&); | |
41290 | ||
41291 | template<typename _CharT> | |
41292 | inline bool | |
41293 | isgraph(_CharT, const locale&); | |
41294 | ||
41295 | template<typename _CharT> | |
41296 | inline _CharT | |
41297 | toupper(_CharT, const locale&); | |
41298 | ||
41299 | template<typename _CharT> | |
41300 | inline _CharT | |
41301 | tolower(_CharT, const locale&); | |
41302 | ||
41303 | ||
41304 | class ctype_base; | |
41305 | template<typename _CharT> | |
41306 | class ctype; | |
41307 | template<> class ctype<char>; | |
41308 | ||
41309 | template<> class ctype<wchar_t>; | |
41310 | ||
41311 | template<typename _CharT> | |
41312 | class ctype_byname; | |
41313 | ||
41314 | ||
41315 | class codecvt_base; | |
41316 | class __enc_traits; | |
41317 | template<typename _InternT, typename _ExternT, typename _StateT> | |
41318 | class codecvt; | |
41319 | template<> class codecvt<char, char, mbstate_t>; | |
41320 | ||
41321 | template<> class codecvt<wchar_t, char, mbstate_t>; | |
41322 | ||
41323 | template<typename _InternT, typename _ExternT, typename _StateT> | |
41324 | class codecvt_byname; | |
41325 | ||
41326 | ||
41327 | template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > | |
41328 | class num_get; | |
41329 | template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > | |
41330 | class num_put; | |
41331 | template<typename _CharT> class numpunct; | |
41332 | template<typename _CharT> class numpunct_byname; | |
41333 | ||
41334 | ||
41335 | template<typename _CharT> | |
41336 | class collate; | |
41337 | template<typename _CharT> class | |
41338 | collate_byname; | |
41339 | ||
41340 | ||
41341 | class time_base; | |
41342 | template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > | |
41343 | class time_get; | |
41344 | template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > | |
41345 | class time_get_byname; | |
41346 | template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > | |
41347 | class time_put; | |
41348 | template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > | |
41349 | class time_put_byname; | |
41350 | ||
41351 | ||
41352 | class money_base; | |
41353 | template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > | |
41354 | class money_get; | |
41355 | template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > | |
41356 | class money_put; | |
41357 | template<typename _CharT, bool _Intl = false> | |
41358 | class moneypunct; | |
41359 | template<typename _CharT, bool _Intl = false> | |
41360 | class moneypunct_byname; | |
41361 | ||
41362 | ||
41363 | class messages_base; | |
41364 | template<typename _CharT> | |
41365 | class messages; | |
41366 | template<typename _CharT> | |
41367 | class messages_byname; | |
41368 | ||
41369 | template<typename _Facet> | |
41370 | bool | |
41371 | has_facet(const locale& __loc) throw(); | |
41372 | ||
41373 | template<typename _Facet> | |
41374 | const _Facet& | |
41375 | use_facet(const locale& __loc); | |
41376 | ||
41377 | template<typename _Facet> | |
41378 | inline const _Facet& | |
41379 | __check_facet(const _Facet* __f) | |
41380 | { | |
41381 | if (!__f) | |
41382 | __throw_bad_cast(); | |
41383 | return *__f; | |
41384 | } | |
41385 | } | |
41386 | # 50 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ios" 2 3 | |
41387 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 1 3 | |
41388 | # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3 | |
41389 | ||
41390 | # 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3 | |
41391 | ||
41392 | ||
41393 | ||
41394 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 1 3 | |
41395 | # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3 | |
41396 | ||
41397 | # 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3 | |
41398 | ||
41399 | ||
41400 | ||
41401 | ||
41402 | ||
41403 | ||
41404 | ||
41405 | namespace std | |
41406 | { | |
41407 | # 67 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3 | |
41408 | class locale | |
41409 | { | |
41410 | public: | |
41411 | ||
41412 | ||
41413 | typedef int category; | |
41414 | ||
41415 | ||
41416 | class facet; | |
41417 | class id; | |
41418 | class _Impl; | |
41419 | ||
41420 | friend class facet; | |
41421 | friend class _Impl; | |
41422 | ||
41423 | template<typename _Facet> | |
41424 | friend bool | |
41425 | has_facet(const locale&) throw(); | |
41426 | ||
41427 | template<typename _Facet> | |
41428 | friend const _Facet& | |
41429 | use_facet(const locale&); | |
41430 | ||
41431 | template<typename _Cache> | |
41432 | friend struct __use_cache; | |
41433 | # 105 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3 | |
41434 | static const category none = 0; | |
41435 | static const category ctype = 1L << 0; | |
41436 | static const category numeric = 1L << 1; | |
41437 | static const category collate = 1L << 2; | |
41438 | static const category time = 1L << 3; | |
41439 | static const category monetary = 1L << 4; | |
41440 | static const category messages = 1L << 5; | |
41441 | static const category all = (ctype | numeric | collate | | |
41442 | time | monetary | messages); | |
41443 | # 124 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3 | |
41444 | locale() throw(); | |
41445 | # 133 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3 | |
41446 | locale(const locale& __other) throw(); | |
41447 | # 143 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3 | |
41448 | explicit | |
41449 | locale(const char* __s); | |
41450 | # 158 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3 | |
41451 | locale(const locale& __base, const char* __s, category __cat); | |
41452 | # 171 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3 | |
41453 | locale(const locale& __base, const locale& __add, category __cat); | |
41454 | # 183 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3 | |
41455 | template<typename _Facet> | |
41456 | locale(const locale& __other, _Facet* __f); | |
41457 | ||
41458 | ||
41459 | ~locale() throw(); | |
41460 | # 197 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3 | |
41461 | const locale& | |
41462 | operator=(const locale& __other) throw(); | |
41463 | # 212 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3 | |
41464 | template<typename _Facet> | |
41465 | locale | |
41466 | combine(const locale& __other) const; | |
41467 | ||
41468 | ||
41469 | ||
41470 | ||
41471 | ||
41472 | ||
41473 | string | |
41474 | name() const; | |
41475 | # 231 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3 | |
41476 | bool | |
41477 | operator==(const locale& __other) const throw (); | |
41478 | ||
41479 | ||
41480 | ||
41481 | ||
41482 | ||
41483 | ||
41484 | ||
41485 | inline bool | |
41486 | operator!=(const locale& __other) const throw () | |
41487 | { return !(this->operator==(__other)); } | |
41488 | # 259 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3 | |
41489 | template<typename _Char, typename _Traits, typename _Alloc> | |
41490 | bool | |
41491 | operator()(const basic_string<_Char, _Traits, _Alloc>& __s1, | |
41492 | const basic_string<_Char, _Traits, _Alloc>& __s2) const; | |
41493 | # 275 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3 | |
41494 | static locale | |
41495 | global(const locale&); | |
41496 | ||
41497 | ||
41498 | ||
41499 | ||
41500 | static const locale& | |
41501 | classic(); | |
41502 | ||
41503 | private: | |
41504 | ||
41505 | _Impl* _M_impl; | |
41506 | ||
41507 | ||
41508 | static _Impl* _S_classic; | |
41509 | ||
41510 | ||
41511 | static _Impl* _S_global; | |
41512 | ||
41513 | ||
41514 | ||
41515 | ||
41516 | ||
41517 | static const char* const* const _S_categories; | |
41518 | # 310 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3 | |
41519 | enum { _S_categories_size = 6 + 6 }; | |
41520 | ||
41521 | ||
41522 | static __gthread_once_t _S_once; | |
41523 | ||
41524 | ||
41525 | explicit | |
41526 | locale(_Impl*) throw(); | |
41527 | ||
41528 | static void | |
41529 | _S_initialize(); | |
41530 | ||
41531 | static void | |
41532 | _S_initialize_once(); | |
41533 | ||
41534 | static category | |
41535 | _S_normalize_category(category); | |
41536 | ||
41537 | void | |
41538 | _M_coalesce(const locale& __base, const locale& __add, category __cat); | |
41539 | }; | |
41540 | # 343 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3 | |
41541 | class locale::facet | |
41542 | { | |
41543 | private: | |
41544 | friend class locale; | |
41545 | friend class locale::_Impl; | |
41546 | ||
41547 | mutable _Atomic_word _M_refcount; | |
41548 | ||
41549 | ||
41550 | static __c_locale _S_c_locale; | |
41551 | ||
41552 | ||
41553 | static const char _S_c_name[2]; | |
41554 | ||
41555 | ||
41556 | static __gthread_once_t _S_once; | |
41557 | ||
41558 | ||
41559 | static void | |
41560 | _S_initialize_once(); | |
41561 | ||
41562 | protected: | |
41563 | # 374 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3 | |
41564 | explicit | |
41565 | facet(size_t __refs = 0) throw() : _M_refcount(__refs ? 1 : 0) | |
41566 | { } | |
41567 | ||
41568 | ||
41569 | virtual | |
41570 | ~facet(); | |
41571 | ||
41572 | static void | |
41573 | _S_create_c_locale(__c_locale& __cloc, const char* __s, | |
41574 | __c_locale __old = 0); | |
41575 | ||
41576 | static __c_locale | |
41577 | _S_clone_c_locale(__c_locale& __cloc); | |
41578 | ||
41579 | static void | |
41580 | _S_destroy_c_locale(__c_locale& __cloc); | |
41581 | ||
41582 | ||
41583 | ||
41584 | static __c_locale | |
41585 | _S_get_c_locale(); | |
41586 | ||
41587 | static const char* | |
41588 | _S_get_c_name(); | |
41589 | ||
41590 | private: | |
41591 | inline void | |
41592 | _M_add_reference() const throw() | |
41593 | { __gnu_cxx::__atomic_add(&_M_refcount, 1); } | |
41594 | ||
41595 | inline void | |
41596 | _M_remove_reference() const throw() | |
41597 | { | |
41598 | if (__gnu_cxx::__exchange_and_add(&_M_refcount, -1) == 1) | |
41599 | { | |
41600 | try | |
41601 | { delete this; } | |
41602 | catch (...) | |
41603 | { } | |
41604 | } | |
41605 | } | |
41606 | ||
41607 | facet(const facet&); | |
41608 | ||
41609 | facet& | |
41610 | operator=(const facet&); | |
41611 | }; | |
41612 | # 434 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_classes.h" 3 | |
41613 | class locale::id | |
41614 | { | |
41615 | private: | |
41616 | friend class locale; | |
41617 | friend class locale::_Impl; | |
41618 | ||
41619 | template<typename _Facet> | |
41620 | friend const _Facet& | |
41621 | use_facet(const locale&); | |
41622 | ||
41623 | template<typename _Facet> | |
41624 | friend bool | |
41625 | has_facet(const locale&) throw (); | |
41626 | ||
41627 | ||
41628 | ||
41629 | ||
41630 | mutable size_t _M_index; | |
41631 | ||
41632 | ||
41633 | static _Atomic_word _S_refcount; | |
41634 | ||
41635 | void | |
41636 | operator=(const id&); | |
41637 | ||
41638 | id(const id&); | |
41639 | ||
41640 | public: | |
41641 | ||
41642 | ||
41643 | ||
41644 | id() { } | |
41645 | ||
41646 | size_t | |
41647 | _M_id() const; | |
41648 | }; | |
41649 | ||
41650 | ||
41651 | ||
41652 | class locale::_Impl | |
41653 | { | |
41654 | public: | |
41655 | ||
41656 | friend class locale; | |
41657 | friend class locale::facet; | |
41658 | ||
41659 | template<typename _Facet> | |
41660 | friend bool | |
41661 | has_facet(const locale&) throw(); | |
41662 | ||
41663 | template<typename _Facet> | |
41664 | friend const _Facet& | |
41665 | use_facet(const locale&); | |
41666 | ||
41667 | template<typename _Cache> | |
41668 | friend struct __use_cache; | |
41669 | ||
41670 | private: | |
41671 | ||
41672 | _Atomic_word _M_refcount; | |
41673 | const facet** _M_facets; | |
41674 | size_t _M_facets_size; | |
41675 | const facet** _M_caches; | |
41676 | char** _M_names; | |
41677 | static const locale::id* const _S_id_ctype[]; | |
41678 | static const locale::id* const _S_id_numeric[]; | |
41679 | static const locale::id* const _S_id_collate[]; | |
41680 | static const locale::id* const _S_id_time[]; | |
41681 | static const locale::id* const _S_id_monetary[]; | |
41682 | static const locale::id* const _S_id_messages[]; | |
41683 | static const locale::id* const* const _S_facet_categories[]; | |
41684 | ||
41685 | inline void | |
41686 | _M_add_reference() throw() | |
41687 | { __gnu_cxx::__atomic_add(&_M_refcount, 1); } | |
41688 | ||
41689 | inline void | |
41690 | _M_remove_reference() throw() | |
41691 | { | |
41692 | if (__gnu_cxx::__exchange_and_add(&_M_refcount, -1) == 1) | |
41693 | { | |
41694 | try | |
41695 | { delete this; } | |
41696 | catch(...) | |
41697 | { } | |
41698 | } | |
41699 | } | |
41700 | ||
41701 | _Impl(const _Impl&, size_t); | |
41702 | _Impl(const char*, size_t); | |
41703 | _Impl(size_t) throw(); | |
41704 | ||
41705 | ~_Impl() throw(); | |
41706 | ||
41707 | _Impl(const _Impl&); | |
41708 | ||
41709 | void | |
41710 | operator=(const _Impl&); | |
41711 | ||
41712 | inline bool | |
41713 | _M_check_same_name() | |
41714 | { | |
41715 | bool __ret = true; | |
41716 | if (_M_names[1]) | |
41717 | ||
41718 | for (size_t __i = 0; __ret && __i < _S_categories_size - 1; ++__i) | |
41719 | __ret = std::strcmp(_M_names[__i], _M_names[__i + 1]) == 0; | |
41720 | return __ret; | |
41721 | } | |
41722 | ||
41723 | void | |
41724 | _M_replace_categories(const _Impl*, category); | |
41725 | ||
41726 | void | |
41727 | _M_replace_category(const _Impl*, const locale::id* const*); | |
41728 | ||
41729 | void | |
41730 | _M_replace_facet(const _Impl*, const locale::id*); | |
41731 | ||
41732 | void | |
41733 | _M_install_facet(const locale::id*, const facet*); | |
41734 | ||
41735 | template<typename _Facet> | |
41736 | inline void | |
41737 | _M_init_facet(_Facet* __facet) | |
41738 | { _M_install_facet(&_Facet::id, __facet); } | |
41739 | ||
41740 | void | |
41741 | _M_install_cache(const facet*, size_t); | |
41742 | }; | |
41743 | ||
41744 | template<typename _Facet> | |
41745 | locale::locale(const locale& __other, _Facet* __f) | |
41746 | { | |
41747 | _M_impl = new _Impl(*__other._M_impl, 1); | |
41748 | ||
41749 | try | |
41750 | { _M_impl->_M_install_facet(&_Facet::id, __f); } | |
41751 | catch(...) | |
41752 | { | |
41753 | _M_impl->_M_remove_reference(); | |
41754 | throw; | |
41755 | } | |
41756 | delete [] _M_impl->_M_names[0]; | |
41757 | _M_impl->_M_names[0] = 0; | |
41758 | } | |
41759 | } | |
41760 | # 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 2 3 | |
41761 | ||
41762 | namespace std | |
41763 | { | |
41764 | ||
41765 | ||
41766 | ||
41767 | ||
41768 | enum _Ios_Fmtflags | |
41769 | { | |
41770 | _S_boolalpha = 1L << 0, | |
41771 | _S_dec = 1L << 1, | |
41772 | _S_fixed = 1L << 2, | |
41773 | _S_hex = 1L << 3, | |
41774 | _S_internal = 1L << 4, | |
41775 | _S_left = 1L << 5, | |
41776 | _S_oct = 1L << 6, | |
41777 | _S_right = 1L << 7, | |
41778 | _S_scientific = 1L << 8, | |
41779 | _S_showbase = 1L << 9, | |
41780 | _S_showpoint = 1L << 10, | |
41781 | _S_showpos = 1L << 11, | |
41782 | _S_skipws = 1L << 12, | |
41783 | _S_unitbuf = 1L << 13, | |
41784 | _S_uppercase = 1L << 14, | |
41785 | _S_adjustfield = _S_left | _S_right | _S_internal, | |
41786 | _S_basefield = _S_dec | _S_oct | _S_hex, | |
41787 | _S_floatfield = _S_scientific | _S_fixed, | |
41788 | _S_ios_fmtflags_end = 1L << 16 | |
41789 | }; | |
41790 | ||
41791 | inline _Ios_Fmtflags | |
41792 | operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) | |
41793 | { return _Ios_Fmtflags(static_cast<int>(__a) & static_cast<int>(__b)); } | |
41794 | ||
41795 | inline _Ios_Fmtflags | |
41796 | operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) | |
41797 | { return _Ios_Fmtflags(static_cast<int>(__a) | static_cast<int>(__b)); } | |
41798 | ||
41799 | inline _Ios_Fmtflags | |
41800 | operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) | |
41801 | { return _Ios_Fmtflags(static_cast<int>(__a) ^ static_cast<int>(__b)); } | |
41802 | ||
41803 | inline _Ios_Fmtflags& | |
41804 | operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) | |
41805 | { return __a = __a | __b; } | |
41806 | ||
41807 | inline _Ios_Fmtflags& | |
41808 | operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) | |
41809 | { return __a = __a & __b; } | |
41810 | ||
41811 | inline _Ios_Fmtflags& | |
41812 | operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) | |
41813 | { return __a = __a ^ __b; } | |
41814 | ||
41815 | inline _Ios_Fmtflags | |
41816 | operator~(_Ios_Fmtflags __a) | |
41817 | { return _Ios_Fmtflags(~static_cast<int>(__a)); } | |
41818 | ||
41819 | ||
41820 | enum _Ios_Openmode | |
41821 | { | |
41822 | _S_app = 1L << 0, | |
41823 | _S_ate = 1L << 1, | |
41824 | _S_bin = 1L << 2, | |
41825 | _S_in = 1L << 3, | |
41826 | _S_out = 1L << 4, | |
41827 | _S_trunc = 1L << 5, | |
41828 | _S_ios_openmode_end = 1L << 16 | |
41829 | }; | |
41830 | ||
41831 | inline _Ios_Openmode | |
41832 | operator&(_Ios_Openmode __a, _Ios_Openmode __b) | |
41833 | { return _Ios_Openmode(static_cast<int>(__a) & static_cast<int>(__b)); } | |
41834 | ||
41835 | inline _Ios_Openmode | |
41836 | operator|(_Ios_Openmode __a, _Ios_Openmode __b) | |
41837 | { return _Ios_Openmode(static_cast<int>(__a) | static_cast<int>(__b)); } | |
41838 | ||
41839 | inline _Ios_Openmode | |
41840 | operator^(_Ios_Openmode __a, _Ios_Openmode __b) | |
41841 | { return _Ios_Openmode(static_cast<int>(__a) ^ static_cast<int>(__b)); } | |
41842 | ||
41843 | inline _Ios_Openmode& | |
41844 | operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) | |
41845 | { return __a = __a | __b; } | |
41846 | ||
41847 | inline _Ios_Openmode& | |
41848 | operator&=(_Ios_Openmode& __a, _Ios_Openmode __b) | |
41849 | { return __a = __a & __b; } | |
41850 | ||
41851 | inline _Ios_Openmode& | |
41852 | operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) | |
41853 | { return __a = __a ^ __b; } | |
41854 | ||
41855 | inline _Ios_Openmode | |
41856 | operator~(_Ios_Openmode __a) | |
41857 | { return _Ios_Openmode(~static_cast<int>(__a)); } | |
41858 | ||
41859 | ||
41860 | enum _Ios_Iostate | |
41861 | { | |
41862 | _S_goodbit = 0, | |
41863 | _S_badbit = 1L << 0, | |
41864 | _S_eofbit = 1L << 1, | |
41865 | _S_failbit = 1L << 2, | |
41866 | _S_ios_iostate_end = 1L << 16 | |
41867 | }; | |
41868 | ||
41869 | inline _Ios_Iostate | |
41870 | operator&(_Ios_Iostate __a, _Ios_Iostate __b) | |
41871 | { return _Ios_Iostate(static_cast<int>(__a) & static_cast<int>(__b)); } | |
41872 | ||
41873 | inline _Ios_Iostate | |
41874 | operator|(_Ios_Iostate __a, _Ios_Iostate __b) | |
41875 | { return _Ios_Iostate(static_cast<int>(__a) | static_cast<int>(__b)); } | |
41876 | ||
41877 | inline _Ios_Iostate | |
41878 | operator^(_Ios_Iostate __a, _Ios_Iostate __b) | |
41879 | { return _Ios_Iostate(static_cast<int>(__a) ^ static_cast<int>(__b)); } | |
41880 | ||
41881 | inline _Ios_Iostate& | |
41882 | operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) | |
41883 | { return __a = __a | __b; } | |
41884 | ||
41885 | inline _Ios_Iostate& | |
41886 | operator&=(_Ios_Iostate& __a, _Ios_Iostate __b) | |
41887 | { return __a = __a & __b; } | |
41888 | ||
41889 | inline _Ios_Iostate& | |
41890 | operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) | |
41891 | { return __a = __a ^ __b; } | |
41892 | ||
41893 | inline _Ios_Iostate | |
41894 | operator~(_Ios_Iostate __a) | |
41895 | { return _Ios_Iostate(~static_cast<int>(__a)); } | |
41896 | ||
41897 | enum _Ios_Seekdir | |
41898 | { | |
41899 | _S_beg = 0, | |
41900 | _S_cur = 1, | |
41901 | _S_end = 2, | |
41902 | _S_ios_seekdir_end = 1L << 16 | |
41903 | }; | |
41904 | # 201 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3 | |
41905 | class ios_base | |
41906 | { | |
41907 | public: | |
41908 | ||
41909 | ||
41910 | ||
41911 | class failure : public exception | |
41912 | { | |
41913 | public: | |
41914 | ||
41915 | ||
41916 | explicit | |
41917 | failure(const string& __str) throw(); | |
41918 | ||
41919 | ||
41920 | ||
41921 | virtual | |
41922 | ~failure() throw(); | |
41923 | ||
41924 | virtual const char* | |
41925 | what() const throw(); | |
41926 | ||
41927 | private: | |
41928 | string _M_msg; | |
41929 | }; | |
41930 | # 253 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3 | |
41931 | typedef _Ios_Fmtflags fmtflags; | |
41932 | ||
41933 | ||
41934 | static const fmtflags boolalpha = _S_boolalpha; | |
41935 | ||
41936 | ||
41937 | static const fmtflags dec = _S_dec; | |
41938 | ||
41939 | ||
41940 | static const fmtflags fixed = _S_fixed; | |
41941 | ||
41942 | ||
41943 | static const fmtflags hex = _S_hex; | |
41944 | ||
41945 | ||
41946 | ||
41947 | ||
41948 | static const fmtflags internal = _S_internal; | |
41949 | ||
41950 | ||
41951 | ||
41952 | static const fmtflags left = _S_left; | |
41953 | ||
41954 | ||
41955 | static const fmtflags oct = _S_oct; | |
41956 | ||
41957 | ||
41958 | ||
41959 | static const fmtflags right = _S_right; | |
41960 | ||
41961 | ||
41962 | static const fmtflags scientific = _S_scientific; | |
41963 | ||
41964 | ||
41965 | ||
41966 | static const fmtflags showbase = _S_showbase; | |
41967 | ||
41968 | ||
41969 | ||
41970 | static const fmtflags showpoint = _S_showpoint; | |
41971 | ||
41972 | ||
41973 | static const fmtflags showpos = _S_showpos; | |
41974 | ||
41975 | ||
41976 | static const fmtflags skipws = _S_skipws; | |
41977 | ||
41978 | ||
41979 | static const fmtflags unitbuf = _S_unitbuf; | |
41980 | ||
41981 | ||
41982 | ||
41983 | static const fmtflags uppercase = _S_uppercase; | |
41984 | ||
41985 | ||
41986 | static const fmtflags adjustfield = _S_adjustfield; | |
41987 | ||
41988 | ||
41989 | static const fmtflags basefield = _S_basefield; | |
41990 | ||
41991 | ||
41992 | static const fmtflags floatfield = _S_floatfield; | |
41993 | # 328 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3 | |
41994 | typedef _Ios_Iostate iostate; | |
41995 | ||
41996 | ||
41997 | ||
41998 | static const iostate badbit = _S_badbit; | |
41999 | ||
42000 | ||
42001 | static const iostate eofbit = _S_eofbit; | |
42002 | ||
42003 | ||
42004 | ||
42005 | ||
42006 | static const iostate failbit = _S_failbit; | |
42007 | ||
42008 | ||
42009 | static const iostate goodbit = _S_goodbit; | |
42010 | # 359 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3 | |
42011 | typedef _Ios_Openmode openmode; | |
42012 | ||
42013 | ||
42014 | static const openmode app = _S_app; | |
42015 | ||
42016 | ||
42017 | static const openmode ate = _S_ate; | |
42018 | ||
42019 | ||
42020 | ||
42021 | ||
42022 | ||
42023 | static const openmode binary = _S_bin; | |
42024 | ||
42025 | ||
42026 | static const openmode in = _S_in; | |
42027 | ||
42028 | ||
42029 | static const openmode out = _S_out; | |
42030 | ||
42031 | ||
42032 | static const openmode trunc = _S_trunc; | |
42033 | # 392 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3 | |
42034 | typedef _Ios_Seekdir seekdir; | |
42035 | ||
42036 | ||
42037 | static const seekdir beg = _S_beg; | |
42038 | ||
42039 | ||
42040 | static const seekdir cur = _S_cur; | |
42041 | ||
42042 | ||
42043 | static const seekdir end = _S_end; | |
42044 | ||
42045 | ||
42046 | typedef int io_state; | |
42047 | typedef int open_mode; | |
42048 | typedef int seek_dir; | |
42049 | ||
42050 | typedef std::streampos streampos; | |
42051 | typedef std::streamoff streamoff; | |
42052 | # 418 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3 | |
42053 | enum event | |
42054 | { | |
42055 | erase_event, | |
42056 | imbue_event, | |
42057 | copyfmt_event | |
42058 | }; | |
42059 | # 435 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3 | |
42060 | typedef void (*event_callback) (event, ios_base&, int); | |
42061 | # 447 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3 | |
42062 | void | |
42063 | register_callback(event_callback __fn, int __index); | |
42064 | ||
42065 | protected: | |
42066 | ||
42067 | ||
42068 | ||
42069 | ||
42070 | ||
42071 | ||
42072 | streamsize _M_precision; | |
42073 | streamsize _M_width; | |
42074 | fmtflags _M_flags; | |
42075 | iostate _M_exception; | |
42076 | iostate _M_streambuf_state; | |
42077 | ||
42078 | ||
42079 | ||
42080 | ||
42081 | struct _Callback_list | |
42082 | { | |
42083 | ||
42084 | _Callback_list* _M_next; | |
42085 | ios_base::event_callback _M_fn; | |
42086 | int _M_index; | |
42087 | _Atomic_word _M_refcount; | |
42088 | ||
42089 | _Callback_list(ios_base::event_callback __fn, int __index, | |
42090 | _Callback_list* __cb) | |
42091 | : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { } | |
42092 | ||
42093 | void | |
42094 | _M_add_reference() { __gnu_cxx::__atomic_add(&_M_refcount, 1); } | |
42095 | ||
42096 | ||
42097 | int | |
42098 | _M_remove_reference() | |
42099 | { return __gnu_cxx::__exchange_and_add(&_M_refcount, -1); } | |
42100 | }; | |
42101 | ||
42102 | _Callback_list* _M_callbacks; | |
42103 | ||
42104 | void | |
42105 | _M_call_callbacks(event __ev) throw(); | |
42106 | ||
42107 | void | |
42108 | _M_dispose_callbacks(void); | |
42109 | ||
42110 | ||
42111 | struct _Words | |
42112 | { | |
42113 | void* _M_pword; | |
42114 | long _M_iword; | |
42115 | _Words() : _M_pword(0), _M_iword(0) { } | |
42116 | }; | |
42117 | ||
42118 | ||
42119 | _Words _M_word_zero; | |
42120 | ||
42121 | ||
42122 | ||
42123 | enum { _S_local_word_size = 8 }; | |
42124 | _Words _M_local_word[_S_local_word_size]; | |
42125 | ||
42126 | ||
42127 | int _M_word_size; | |
42128 | _Words* _M_word; | |
42129 | ||
42130 | _Words& | |
42131 | _M_grow_words(int __index, bool __iword); | |
42132 | ||
42133 | ||
42134 | locale _M_ios_locale; | |
42135 | ||
42136 | void | |
42137 | _M_init(); | |
42138 | ||
42139 | public: | |
42140 | ||
42141 | ||
42142 | ||
42143 | ||
42144 | ||
42145 | class Init | |
42146 | { | |
42147 | friend class ios_base; | |
42148 | public: | |
42149 | Init(); | |
42150 | ~Init(); | |
42151 | ||
42152 | private: | |
42153 | static _Atomic_word _S_refcount; | |
42154 | static bool _S_synced_with_stdio; | |
42155 | }; | |
42156 | ||
42157 | ||
42158 | ||
42159 | ||
42160 | ||
42161 | ||
42162 | inline fmtflags | |
42163 | flags() const { return _M_flags; } | |
42164 | # 557 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3 | |
42165 | inline fmtflags | |
42166 | flags(fmtflags __fmtfl) | |
42167 | { | |
42168 | fmtflags __old = _M_flags; | |
42169 | _M_flags = __fmtfl; | |
42170 | return __old; | |
42171 | } | |
42172 | # 573 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3 | |
42173 | inline fmtflags | |
42174 | setf(fmtflags __fmtfl) | |
42175 | { | |
42176 | fmtflags __old = _M_flags; | |
42177 | _M_flags |= __fmtfl; | |
42178 | return __old; | |
42179 | } | |
42180 | # 590 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3 | |
42181 | inline fmtflags | |
42182 | setf(fmtflags __fmtfl, fmtflags __mask) | |
42183 | { | |
42184 | fmtflags __old = _M_flags; | |
42185 | _M_flags &= ~__mask; | |
42186 | _M_flags |= (__fmtfl & __mask); | |
42187 | return __old; | |
42188 | } | |
42189 | ||
42190 | ||
42191 | ||
42192 | ||
42193 | ||
42194 | ||
42195 | ||
42196 | inline void | |
42197 | unsetf(fmtflags __mask) { _M_flags &= ~__mask; } | |
42198 | # 617 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3 | |
42199 | inline streamsize | |
42200 | precision() const { return _M_precision; } | |
42201 | ||
42202 | ||
42203 | ||
42204 | ||
42205 | ||
42206 | ||
42207 | inline streamsize | |
42208 | precision(streamsize __prec) | |
42209 | { | |
42210 | streamsize __old = _M_precision; | |
42211 | _M_precision = __prec; | |
42212 | return __old; | |
42213 | } | |
42214 | ||
42215 | ||
42216 | ||
42217 | ||
42218 | ||
42219 | ||
42220 | ||
42221 | inline streamsize | |
42222 | width() const { return _M_width; } | |
42223 | ||
42224 | ||
42225 | ||
42226 | ||
42227 | ||
42228 | ||
42229 | inline streamsize | |
42230 | width(streamsize __wide) | |
42231 | { | |
42232 | streamsize __old = _M_width; | |
42233 | _M_width = __wide; | |
42234 | return __old; | |
42235 | } | |
42236 | # 666 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3 | |
42237 | static bool | |
42238 | sync_with_stdio(bool __sync = true); | |
42239 | # 678 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3 | |
42240 | locale | |
42241 | imbue(const locale& __loc); | |
42242 | # 689 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3 | |
42243 | inline locale | |
42244 | getloc() const { return _M_ios_locale; } | |
42245 | # 699 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3 | |
42246 | inline const locale& | |
42247 | _M_getloc() const { return _M_ios_locale; } | |
42248 | # 717 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3 | |
42249 | static int | |
42250 | xalloc() throw(); | |
42251 | # 733 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3 | |
42252 | inline long& | |
42253 | iword(int __ix) | |
42254 | { | |
42255 | _Words& __word = (__ix < _M_word_size) | |
42256 | ? _M_word[__ix] : _M_grow_words(__ix, true); | |
42257 | return __word._M_iword; | |
42258 | } | |
42259 | # 754 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3 | |
42260 | inline void*& | |
42261 | pword(int __ix) | |
42262 | { | |
42263 | _Words& __word = (__ix < _M_word_size) | |
42264 | ? _M_word[__ix] : _M_grow_words(__ix, false); | |
42265 | return __word._M_pword; | |
42266 | } | |
42267 | # 771 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ios_base.h" 3 | |
42268 | virtual ~ios_base(); | |
42269 | ||
42270 | protected: | |
42271 | ios_base(); | |
42272 | ||
42273 | ||
42274 | ||
42275 | private: | |
42276 | ios_base(const ios_base&); | |
42277 | ||
42278 | ios_base& | |
42279 | operator=(const ios_base&); | |
42280 | }; | |
42281 | ||
42282 | ||
42283 | ||
42284 | inline ios_base& | |
42285 | boolalpha(ios_base& __base) | |
42286 | { | |
42287 | __base.setf(ios_base::boolalpha); | |
42288 | return __base; | |
42289 | } | |
42290 | ||
42291 | ||
42292 | inline ios_base& | |
42293 | noboolalpha(ios_base& __base) | |
42294 | { | |
42295 | __base.unsetf(ios_base::boolalpha); | |
42296 | return __base; | |
42297 | } | |
42298 | ||
42299 | ||
42300 | inline ios_base& | |
42301 | showbase(ios_base& __base) | |
42302 | { | |
42303 | __base.setf(ios_base::showbase); | |
42304 | return __base; | |
42305 | } | |
42306 | ||
42307 | ||
42308 | inline ios_base& | |
42309 | noshowbase(ios_base& __base) | |
42310 | { | |
42311 | __base.unsetf(ios_base::showbase); | |
42312 | return __base; | |
42313 | } | |
42314 | ||
42315 | ||
42316 | inline ios_base& | |
42317 | showpoint(ios_base& __base) | |
42318 | { | |
42319 | __base.setf(ios_base::showpoint); | |
42320 | return __base; | |
42321 | } | |
42322 | ||
42323 | ||
42324 | inline ios_base& | |
42325 | noshowpoint(ios_base& __base) | |
42326 | { | |
42327 | __base.unsetf(ios_base::showpoint); | |
42328 | return __base; | |
42329 | } | |
42330 | ||
42331 | ||
42332 | inline ios_base& | |
42333 | showpos(ios_base& __base) | |
42334 | { | |
42335 | __base.setf(ios_base::showpos); | |
42336 | return __base; | |
42337 | } | |
42338 | ||
42339 | ||
42340 | inline ios_base& | |
42341 | noshowpos(ios_base& __base) | |
42342 | { | |
42343 | __base.unsetf(ios_base::showpos); | |
42344 | return __base; | |
42345 | } | |
42346 | ||
42347 | ||
42348 | inline ios_base& | |
42349 | skipws(ios_base& __base) | |
42350 | { | |
42351 | __base.setf(ios_base::skipws); | |
42352 | return __base; | |
42353 | } | |
42354 | ||
42355 | ||
42356 | inline ios_base& | |
42357 | noskipws(ios_base& __base) | |
42358 | { | |
42359 | __base.unsetf(ios_base::skipws); | |
42360 | return __base; | |
42361 | } | |
42362 | ||
42363 | ||
42364 | inline ios_base& | |
42365 | uppercase(ios_base& __base) | |
42366 | { | |
42367 | __base.setf(ios_base::uppercase); | |
42368 | return __base; | |
42369 | } | |
42370 | ||
42371 | ||
42372 | inline ios_base& | |
42373 | nouppercase(ios_base& __base) | |
42374 | { | |
42375 | __base.unsetf(ios_base::uppercase); | |
42376 | return __base; | |
42377 | } | |
42378 | ||
42379 | ||
42380 | inline ios_base& | |
42381 | unitbuf(ios_base& __base) | |
42382 | { | |
42383 | __base.setf(ios_base::unitbuf); | |
42384 | return __base; | |
42385 | } | |
42386 | ||
42387 | ||
42388 | inline ios_base& | |
42389 | nounitbuf(ios_base& __base) | |
42390 | { | |
42391 | __base.unsetf(ios_base::unitbuf); | |
42392 | return __base; | |
42393 | } | |
42394 | ||
42395 | ||
42396 | ||
42397 | inline ios_base& | |
42398 | internal(ios_base& __base) | |
42399 | { | |
42400 | __base.setf(ios_base::internal, ios_base::adjustfield); | |
42401 | return __base; | |
42402 | } | |
42403 | ||
42404 | ||
42405 | inline ios_base& | |
42406 | left(ios_base& __base) | |
42407 | { | |
42408 | __base.setf(ios_base::left, ios_base::adjustfield); | |
42409 | return __base; | |
42410 | } | |
42411 | ||
42412 | ||
42413 | inline ios_base& | |
42414 | right(ios_base& __base) | |
42415 | { | |
42416 | __base.setf(ios_base::right, ios_base::adjustfield); | |
42417 | return __base; | |
42418 | } | |
42419 | ||
42420 | ||
42421 | ||
42422 | inline ios_base& | |
42423 | dec(ios_base& __base) | |
42424 | { | |
42425 | __base.setf(ios_base::dec, ios_base::basefield); | |
42426 | return __base; | |
42427 | } | |
42428 | ||
42429 | ||
42430 | inline ios_base& | |
42431 | hex(ios_base& __base) | |
42432 | { | |
42433 | __base.setf(ios_base::hex, ios_base::basefield); | |
42434 | return __base; | |
42435 | } | |
42436 | ||
42437 | ||
42438 | inline ios_base& | |
42439 | oct(ios_base& __base) | |
42440 | { | |
42441 | __base.setf(ios_base::oct, ios_base::basefield); | |
42442 | return __base; | |
42443 | } | |
42444 | ||
42445 | ||
42446 | ||
42447 | inline ios_base& | |
42448 | fixed(ios_base& __base) | |
42449 | { | |
42450 | __base.setf(ios_base::fixed, ios_base::floatfield); | |
42451 | return __base; | |
42452 | } | |
42453 | ||
42454 | ||
42455 | inline ios_base& | |
42456 | scientific(ios_base& __base) | |
42457 | { | |
42458 | __base.setf(ios_base::scientific, ios_base::floatfield); | |
42459 | return __base; | |
42460 | } | |
42461 | } | |
42462 | # 51 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ios" 2 3 | |
42463 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 1 3 | |
42464 | # 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42465 | ||
42466 | # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42467 | #pragma GCC visibility push(default) | |
42468 | ||
42469 | ||
42470 | ||
42471 | ||
42472 | ||
42473 | ||
42474 | namespace std | |
42475 | { | |
42476 | ||
42477 | ||
42478 | ||
42479 | ||
42480 | ||
42481 | template<typename _CharT, typename _Traits> | |
42482 | streamsize | |
42483 | __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin, | |
42484 | basic_streambuf<_CharT, _Traits>* __sbout); | |
42485 | # 122 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42486 | template<typename _CharT, typename _Traits> | |
42487 | class basic_streambuf | |
42488 | { | |
42489 | public: | |
42490 | ||
42491 | ||
42492 | ||
42493 | ||
42494 | ||
42495 | ||
42496 | typedef _CharT char_type; | |
42497 | typedef _Traits traits_type; | |
42498 | typedef typename traits_type::int_type int_type; | |
42499 | typedef typename traits_type::pos_type pos_type; | |
42500 | typedef typename traits_type::off_type off_type; | |
42501 | # 145 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42502 | typedef basic_streambuf<char_type, traits_type> __streambuf_type; | |
42503 | ||
42504 | ||
42505 | friend class basic_ios<char_type, traits_type>; | |
42506 | friend class basic_istream<char_type, traits_type>; | |
42507 | friend class basic_ostream<char_type, traits_type>; | |
42508 | friend class istreambuf_iterator<char_type, traits_type>; | |
42509 | friend class ostreambuf_iterator<char_type, traits_type>; | |
42510 | ||
42511 | friend streamsize | |
42512 | __copy_streambufs<>(__streambuf_type* __sbin, | |
42513 | __streambuf_type* __sbout); | |
42514 | ||
42515 | template<typename _CharT2, typename _Traits2> | |
42516 | friend basic_istream<_CharT2, _Traits2>& | |
42517 | operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*); | |
42518 | ||
42519 | template<typename _CharT2, typename _Traits2, typename _Alloc> | |
42520 | friend basic_istream<_CharT2, _Traits2>& | |
42521 | operator>>(basic_istream<_CharT2, _Traits2>&, | |
42522 | basic_string<_CharT2, _Traits2, _Alloc>&); | |
42523 | ||
42524 | template<typename _CharT2, typename _Traits2, typename _Alloc> | |
42525 | friend basic_istream<_CharT2, _Traits2>& | |
42526 | getline(basic_istream<_CharT2, _Traits2>&, | |
42527 | basic_string<_CharT2, _Traits2, _Alloc>&, _CharT2); | |
42528 | ||
42529 | protected: | |
42530 | # 183 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42531 | char_type* _M_in_beg; | |
42532 | char_type* _M_in_cur; | |
42533 | char_type* _M_in_end; | |
42534 | char_type* _M_out_beg; | |
42535 | char_type* _M_out_cur; | |
42536 | char_type* _M_out_end; | |
42537 | ||
42538 | ||
42539 | ||
42540 | ||
42541 | ||
42542 | ||
42543 | locale _M_buf_locale; | |
42544 | ||
42545 | public: | |
42546 | ||
42547 | virtual | |
42548 | ~basic_streambuf() | |
42549 | { } | |
42550 | # 211 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42551 | locale | |
42552 | pubimbue(const locale &__loc) | |
42553 | { | |
42554 | locale __tmp(this->getloc()); | |
42555 | this->imbue(__loc); | |
42556 | _M_buf_locale = __loc; | |
42557 | return __tmp; | |
42558 | } | |
42559 | # 228 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42560 | locale | |
42561 | getloc() const | |
42562 | { return _M_buf_locale; } | |
42563 | # 241 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42564 | __streambuf_type* | |
42565 | pubsetbuf(char_type* __s, streamsize __n) | |
42566 | { return this->setbuf(__s, __n); } | |
42567 | ||
42568 | pos_type | |
42569 | pubseekoff(off_type __off, ios_base::seekdir __way, | |
42570 | ios_base::openmode __mode = ios_base::in | ios_base::out) | |
42571 | { return this->seekoff(__off, __way, __mode); } | |
42572 | ||
42573 | pos_type | |
42574 | pubseekpos(pos_type __sp, | |
42575 | ios_base::openmode __mode = ios_base::in | ios_base::out) | |
42576 | { return this->seekpos(__sp, __mode); } | |
42577 | ||
42578 | int | |
42579 | pubsync() { return this->sync(); } | |
42580 | # 268 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42581 | streamsize | |
42582 | in_avail() | |
42583 | { | |
42584 | const streamsize __ret = this->egptr() - this->gptr(); | |
42585 | return __ret ? __ret : this->showmanyc(); | |
42586 | } | |
42587 | # 282 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42588 | int_type | |
42589 | snextc() | |
42590 | { | |
42591 | int_type __ret = traits_type::eof(); | |
42592 | if (__builtin_expect(!traits_type::eq_int_type(this->sbumpc(), | |
42593 | __ret), true)) | |
42594 | __ret = this->sgetc(); | |
42595 | return __ret; | |
42596 | } | |
42597 | # 300 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42598 | int_type | |
42599 | sbumpc() | |
42600 | { | |
42601 | int_type __ret; | |
42602 | if (__builtin_expect(this->gptr() < this->egptr(), true)) | |
42603 | { | |
42604 | __ret = traits_type::to_int_type(*this->gptr()); | |
42605 | this->gbump(1); | |
42606 | } | |
42607 | else | |
42608 | __ret = this->uflow(); | |
42609 | return __ret; | |
42610 | } | |
42611 | # 322 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42612 | int_type | |
42613 | sgetc() | |
42614 | { | |
42615 | int_type __ret; | |
42616 | if (__builtin_expect(this->gptr() < this->egptr(), true)) | |
42617 | __ret = traits_type::to_int_type(*this->gptr()); | |
42618 | else | |
42619 | __ret = this->underflow(); | |
42620 | return __ret; | |
42621 | } | |
42622 | # 341 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42623 | streamsize | |
42624 | sgetn(char_type* __s, streamsize __n) | |
42625 | { return this->xsgetn(__s, __n); } | |
42626 | # 355 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42627 | int_type | |
42628 | sputbackc(char_type __c) | |
42629 | { | |
42630 | int_type __ret; | |
42631 | const bool __testpos = this->eback() < this->gptr(); | |
42632 | if (__builtin_expect(!__testpos || | |
42633 | !traits_type::eq(__c, this->gptr()[-1]), false)) | |
42634 | __ret = this->pbackfail(traits_type::to_int_type(__c)); | |
42635 | else | |
42636 | { | |
42637 | this->gbump(-1); | |
42638 | __ret = traits_type::to_int_type(*this->gptr()); | |
42639 | } | |
42640 | return __ret; | |
42641 | } | |
42642 | # 380 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42643 | int_type | |
42644 | sungetc() | |
42645 | { | |
42646 | int_type __ret; | |
42647 | if (__builtin_expect(this->eback() < this->gptr(), true)) | |
42648 | { | |
42649 | this->gbump(-1); | |
42650 | __ret = traits_type::to_int_type(*this->gptr()); | |
42651 | } | |
42652 | else | |
42653 | __ret = this->pbackfail(); | |
42654 | return __ret; | |
42655 | } | |
42656 | # 407 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42657 | int_type | |
42658 | sputc(char_type __c) | |
42659 | { | |
42660 | int_type __ret; | |
42661 | if (__builtin_expect(this->pptr() < this->epptr(), true)) | |
42662 | { | |
42663 | *this->pptr() = __c; | |
42664 | this->pbump(1); | |
42665 | __ret = traits_type::to_int_type(__c); | |
42666 | } | |
42667 | else | |
42668 | __ret = this->overflow(traits_type::to_int_type(__c)); | |
42669 | return __ret; | |
42670 | } | |
42671 | # 433 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42672 | streamsize | |
42673 | sputn(const char_type* __s, streamsize __n) | |
42674 | { return this->xsputn(__s, __n); } | |
42675 | ||
42676 | protected: | |
42677 | # 447 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42678 | basic_streambuf() | |
42679 | : _M_in_beg(0), _M_in_cur(0), _M_in_end(0), | |
42680 | _M_out_beg(0), _M_out_cur(0), _M_out_end(0), | |
42681 | _M_buf_locale(locale()) | |
42682 | { } | |
42683 | # 465 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42684 | char_type* | |
42685 | eback() const { return _M_in_beg; } | |
42686 | ||
42687 | char_type* | |
42688 | gptr() const { return _M_in_cur; } | |
42689 | ||
42690 | char_type* | |
42691 | egptr() const { return _M_in_end; } | |
42692 | # 481 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42693 | void | |
42694 | gbump(int __n) { _M_in_cur += __n; } | |
42695 | # 492 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42696 | void | |
42697 | setg(char_type* __gbeg, char_type* __gnext, char_type* __gend) | |
42698 | { | |
42699 | _M_in_beg = __gbeg; | |
42700 | _M_in_cur = __gnext; | |
42701 | _M_in_end = __gend; | |
42702 | } | |
42703 | # 512 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42704 | char_type* | |
42705 | pbase() const { return _M_out_beg; } | |
42706 | ||
42707 | char_type* | |
42708 | pptr() const { return _M_out_cur; } | |
42709 | ||
42710 | char_type* | |
42711 | epptr() const { return _M_out_end; } | |
42712 | # 528 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42713 | void | |
42714 | pbump(int __n) { _M_out_cur += __n; } | |
42715 | # 538 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42716 | void | |
42717 | setp(char_type* __pbeg, char_type* __pend) | |
42718 | { | |
42719 | _M_out_beg = _M_out_cur = __pbeg; | |
42720 | _M_out_end = __pend; | |
42721 | } | |
42722 | # 559 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42723 | virtual void | |
42724 | imbue(const locale&) | |
42725 | { } | |
42726 | # 574 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42727 | virtual basic_streambuf<char_type,_Traits>* | |
42728 | setbuf(char_type*, streamsize) | |
42729 | { return this; } | |
42730 | # 585 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42731 | virtual pos_type | |
42732 | seekoff(off_type, ios_base::seekdir, | |
42733 | ios_base::openmode = ios_base::in | ios_base::out) | |
42734 | { return pos_type(off_type(-1)); } | |
42735 | # 597 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42736 | virtual pos_type | |
42737 | seekpos(pos_type, | |
42738 | ios_base::openmode = ios_base::in | ios_base::out) | |
42739 | { return pos_type(off_type(-1)); } | |
42740 | # 610 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42741 | virtual int | |
42742 | sync() { return 0; } | |
42743 | # 632 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42744 | virtual streamsize | |
42745 | showmanyc() { return 0; } | |
42746 | # 648 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42747 | virtual streamsize | |
42748 | xsgetn(char_type* __s, streamsize __n); | |
42749 | # 670 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42750 | virtual int_type | |
42751 | underflow() | |
42752 | { return traits_type::eof(); } | |
42753 | # 683 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42754 | virtual int_type | |
42755 | uflow() | |
42756 | { | |
42757 | int_type __ret = traits_type::eof(); | |
42758 | const bool __testeof = traits_type::eq_int_type(this->underflow(), | |
42759 | __ret); | |
42760 | if (!__testeof) | |
42761 | { | |
42762 | __ret = traits_type::to_int_type(*this->gptr()); | |
42763 | this->gbump(1); | |
42764 | } | |
42765 | return __ret; | |
42766 | } | |
42767 | # 707 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42768 | virtual int_type | |
42769 | pbackfail(int_type = traits_type::eof()) | |
42770 | { return traits_type::eof(); } | |
42771 | # 725 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42772 | virtual streamsize | |
42773 | xsputn(const char_type* __s, streamsize __n); | |
42774 | # 750 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42775 | virtual int_type | |
42776 | overflow(int_type = traits_type::eof()) | |
42777 | { return traits_type::eof(); } | |
42778 | # 779 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 3 | |
42779 | private: | |
42780 | ||
42781 | ||
42782 | basic_streambuf(const __streambuf_type& __sb) | |
42783 | : _M_in_beg(__sb._M_in_beg), _M_in_cur(__sb._M_in_cur), | |
42784 | _M_in_end(__sb._M_in_end), _M_out_beg(__sb._M_out_beg), | |
42785 | _M_out_cur(__sb._M_out_cur), _M_out_end(__sb._M_out_cur), | |
42786 | _M_buf_locale(__sb._M_buf_locale) | |
42787 | { } | |
42788 | ||
42789 | __streambuf_type& | |
42790 | operator=(const __streambuf_type&) { return *this; }; | |
42791 | }; | |
42792 | ||
42793 | ||
42794 | template<> | |
42795 | streamsize | |
42796 | __copy_streambufs(basic_streambuf<char>* __sbin, | |
42797 | basic_streambuf<char>* __sbout); | |
42798 | ||
42799 | template<> | |
42800 | streamsize | |
42801 | __copy_streambufs(basic_streambuf<wchar_t>* __sbin, | |
42802 | basic_streambuf<wchar_t>* __sbout); | |
42803 | ||
42804 | } | |
42805 | ||
42806 | ||
42807 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/streambuf.tcc" 1 3 | |
42808 | # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/streambuf.tcc" 3 | |
42809 | ||
42810 | # 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/streambuf.tcc" 3 | |
42811 | ||
42812 | namespace std | |
42813 | { | |
42814 | template<typename _CharT, typename _Traits> | |
42815 | streamsize | |
42816 | basic_streambuf<_CharT, _Traits>:: | |
42817 | xsgetn(char_type* __s, streamsize __n) | |
42818 | { | |
42819 | streamsize __ret = 0; | |
42820 | while (__ret < __n) | |
42821 | { | |
42822 | const streamsize __buf_len = this->egptr() - this->gptr(); | |
42823 | if (__buf_len) | |
42824 | { | |
42825 | const streamsize __remaining = __n - __ret; | |
42826 | const streamsize __len = std::min(__buf_len, __remaining); | |
42827 | traits_type::copy(__s, this->gptr(), __len); | |
42828 | __ret += __len; | |
42829 | __s += __len; | |
42830 | this->gbump(__len); | |
42831 | } | |
42832 | ||
42833 | if (__ret < __n) | |
42834 | { | |
42835 | const int_type __c = this->uflow(); | |
42836 | if (!traits_type::eq_int_type(__c, traits_type::eof())) | |
42837 | { | |
42838 | traits_type::assign(*__s++, traits_type::to_char_type(__c)); | |
42839 | ++__ret; | |
42840 | } | |
42841 | else | |
42842 | break; | |
42843 | } | |
42844 | } | |
42845 | return __ret; | |
42846 | } | |
42847 | ||
42848 | template<typename _CharT, typename _Traits> | |
42849 | streamsize | |
42850 | basic_streambuf<_CharT, _Traits>:: | |
42851 | xsputn(const char_type* __s, streamsize __n) | |
42852 | { | |
42853 | streamsize __ret = 0; | |
42854 | while (__ret < __n) | |
42855 | { | |
42856 | const streamsize __buf_len = this->epptr() - this->pptr(); | |
42857 | if (__buf_len) | |
42858 | { | |
42859 | const streamsize __remaining = __n - __ret; | |
42860 | const streamsize __len = std::min(__buf_len, __remaining); | |
42861 | traits_type::copy(this->pptr(), __s, __len); | |
42862 | __ret += __len; | |
42863 | __s += __len; | |
42864 | this->pbump(__len); | |
42865 | } | |
42866 | ||
42867 | if (__ret < __n) | |
42868 | { | |
42869 | int_type __c = this->overflow(traits_type::to_int_type(*__s)); | |
42870 | if (!traits_type::eq_int_type(__c, traits_type::eof())) | |
42871 | { | |
42872 | ++__ret; | |
42873 | ++__s; | |
42874 | } | |
42875 | else | |
42876 | break; | |
42877 | } | |
42878 | } | |
42879 | return __ret; | |
42880 | } | |
42881 | ||
42882 | ||
42883 | ||
42884 | ||
42885 | template<typename _CharT, typename _Traits> | |
42886 | streamsize | |
42887 | __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin, | |
42888 | basic_streambuf<_CharT, _Traits>* __sbout) | |
42889 | { | |
42890 | streamsize __ret = 0; | |
42891 | typename _Traits::int_type __c = __sbin->sgetc(); | |
42892 | while (!_Traits::eq_int_type(__c, _Traits::eof())) | |
42893 | { | |
42894 | __c = __sbout->sputc(_Traits::to_char_type(__c)); | |
42895 | if (_Traits::eq_int_type(__c, _Traits::eof())) | |
42896 | break; | |
42897 | ++__ret; | |
42898 | __c = __sbin->snextc(); | |
42899 | } | |
42900 | return __ret; | |
42901 | } | |
42902 | ||
42903 | ||
42904 | ||
42905 | ||
42906 | ||
42907 | extern template class basic_streambuf<char>; | |
42908 | extern template | |
42909 | streamsize | |
42910 | __copy_streambufs(basic_streambuf<char>*, basic_streambuf<char>*); | |
42911 | ||
42912 | ||
42913 | extern template class basic_streambuf<wchar_t>; | |
42914 | extern template | |
42915 | streamsize | |
42916 | __copy_streambufs(basic_streambuf<wchar_t>*, basic_streambuf<wchar_t>*); | |
42917 | ||
42918 | ||
42919 | } | |
42920 | # 808 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/streambuf" 2 3 | |
42921 | ||
42922 | ||
42923 | #pragma GCC visibility pop | |
42924 | # 52 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ios" 2 3 | |
42925 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 1 3 | |
42926 | # 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3 | |
42927 | ||
42928 | # 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3 | |
42929 | ||
42930 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/streambuf_iterator.h" 1 3 | |
42931 | # 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/streambuf_iterator.h" 3 | |
42932 | ||
42933 | # 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/streambuf_iterator.h" 3 | |
42934 | ||
42935 | ||
42936 | ||
42937 | ||
42938 | ||
42939 | ||
42940 | namespace std | |
42941 | { | |
42942 | ||
42943 | ||
42944 | template<typename _CharT, typename _Traits> | |
42945 | class istreambuf_iterator | |
42946 | : public iterator<input_iterator_tag, _CharT, typename _Traits::off_type, | |
42947 | _CharT*, _CharT&> | |
42948 | { | |
42949 | public: | |
42950 | ||
42951 | ||
42952 | ||
42953 | typedef _CharT char_type; | |
42954 | typedef _Traits traits_type; | |
42955 | typedef typename _Traits::int_type int_type; | |
42956 | typedef basic_streambuf<_CharT, _Traits> streambuf_type; | |
42957 | typedef basic_istream<_CharT, _Traits> istream_type; | |
42958 | ||
42959 | ||
42960 | private: | |
42961 | ||
42962 | ||
42963 | ||
42964 | ||
42965 | ||
42966 | ||
42967 | ||
42968 | mutable streambuf_type* _M_sbuf; | |
42969 | mutable int_type _M_c; | |
42970 | ||
42971 | public: | |
42972 | ||
42973 | istreambuf_iterator() throw() | |
42974 | : _M_sbuf(0), _M_c(traits_type::eof()) { } | |
42975 | ||
42976 | ||
42977 | istreambuf_iterator(istream_type& __s) throw() | |
42978 | : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { } | |
42979 | ||
42980 | ||
42981 | istreambuf_iterator(streambuf_type* __s) throw() | |
42982 | : _M_sbuf(__s), _M_c(traits_type::eof()) { } | |
42983 | ||
42984 | ||
42985 | ||
42986 | ||
42987 | char_type | |
42988 | operator*() const | |
42989 | { | |
42990 | ||
42991 | ||
42992 | ||
42993 | ||
42994 | ||
42995 | ||
42996 | ||
42997 | return traits_type::to_char_type(_M_get()); | |
42998 | } | |
42999 | ||
43000 | ||
43001 | istreambuf_iterator& | |
43002 | operator++() | |
43003 | { | |
43004 | ; | |
43005 | ||
43006 | ||
43007 | if (_M_sbuf) | |
43008 | { | |
43009 | _M_sbuf->sbumpc(); | |
43010 | _M_c = traits_type::eof(); | |
43011 | } | |
43012 | return *this; | |
43013 | } | |
43014 | ||
43015 | ||
43016 | istreambuf_iterator | |
43017 | operator++(int) | |
43018 | { | |
43019 | ; | |
43020 | ||
43021 | ||
43022 | ||
43023 | istreambuf_iterator __old = *this; | |
43024 | if (_M_sbuf) | |
43025 | { | |
43026 | __old._M_c = _M_sbuf->sbumpc(); | |
43027 | _M_c = traits_type::eof(); | |
43028 | } | |
43029 | return __old; | |
43030 | } | |
43031 | ||
43032 | ||
43033 | ||
43034 | ||
43035 | ||
43036 | bool | |
43037 | equal(const istreambuf_iterator& __b) const | |
43038 | { | |
43039 | const bool __thiseof = _M_at_eof(); | |
43040 | const bool __beof = __b._M_at_eof(); | |
43041 | return (__thiseof && __beof || (!__thiseof && !__beof)); | |
43042 | } | |
43043 | ||
43044 | private: | |
43045 | int_type | |
43046 | _M_get() const | |
43047 | { | |
43048 | const int_type __eof = traits_type::eof(); | |
43049 | int_type __ret = __eof; | |
43050 | if (_M_sbuf) | |
43051 | { | |
43052 | if (!traits_type::eq_int_type(_M_c, __eof)) | |
43053 | __ret = _M_c; | |
43054 | else if (!traits_type::eq_int_type((__ret = _M_sbuf->sgetc()), | |
43055 | __eof)) | |
43056 | _M_c = __ret; | |
43057 | else | |
43058 | _M_sbuf = 0; | |
43059 | } | |
43060 | return __ret; | |
43061 | } | |
43062 | ||
43063 | bool | |
43064 | _M_at_eof() const | |
43065 | { | |
43066 | const int_type __eof = traits_type::eof(); | |
43067 | return traits_type::eq_int_type(_M_get(), __eof); | |
43068 | } | |
43069 | }; | |
43070 | ||
43071 | template<typename _CharT, typename _Traits> | |
43072 | inline bool | |
43073 | operator==(const istreambuf_iterator<_CharT, _Traits>& __a, | |
43074 | const istreambuf_iterator<_CharT, _Traits>& __b) | |
43075 | { return __a.equal(__b); } | |
43076 | ||
43077 | template<typename _CharT, typename _Traits> | |
43078 | inline bool | |
43079 | operator!=(const istreambuf_iterator<_CharT, _Traits>& __a, | |
43080 | const istreambuf_iterator<_CharT, _Traits>& __b) | |
43081 | { return !__a.equal(__b); } | |
43082 | ||
43083 | ||
43084 | template<typename _CharT, typename _Traits> | |
43085 | class ostreambuf_iterator | |
43086 | : public iterator<output_iterator_tag, void, void, void, void> | |
43087 | { | |
43088 | public: | |
43089 | ||
43090 | ||
43091 | ||
43092 | typedef _CharT char_type; | |
43093 | typedef _Traits traits_type; | |
43094 | typedef basic_streambuf<_CharT, _Traits> streambuf_type; | |
43095 | typedef basic_ostream<_CharT, _Traits> ostream_type; | |
43096 | ||
43097 | ||
43098 | private: | |
43099 | streambuf_type* _M_sbuf; | |
43100 | bool _M_failed; | |
43101 | ||
43102 | public: | |
43103 | ||
43104 | ostreambuf_iterator(ostream_type& __s) throw () | |
43105 | : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { } | |
43106 | ||
43107 | ||
43108 | ostreambuf_iterator(streambuf_type* __s) throw () | |
43109 | : _M_sbuf(__s), _M_failed(!_M_sbuf) { } | |
43110 | ||
43111 | ||
43112 | ostreambuf_iterator& | |
43113 | operator=(_CharT __c) | |
43114 | { | |
43115 | if (!_M_failed && | |
43116 | _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof())) | |
43117 | _M_failed = true; | |
43118 | return *this; | |
43119 | } | |
43120 | ||
43121 | ||
43122 | ostreambuf_iterator& | |
43123 | operator*() | |
43124 | { return *this; } | |
43125 | ||
43126 | ||
43127 | ostreambuf_iterator& | |
43128 | operator++(int) | |
43129 | { return *this; } | |
43130 | ||
43131 | ||
43132 | ostreambuf_iterator& | |
43133 | operator++() | |
43134 | { return *this; } | |
43135 | ||
43136 | ||
43137 | bool | |
43138 | failed() const throw() | |
43139 | { return _M_failed; } | |
43140 | ||
43141 | ostreambuf_iterator& | |
43142 | _M_put(const _CharT* __ws, streamsize __len) | |
43143 | { | |
43144 | if (__builtin_expect(!_M_failed, true) | |
43145 | && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len, | |
43146 | false)) | |
43147 | _M_failed = true; | |
43148 | return *this; | |
43149 | } | |
43150 | }; | |
43151 | } | |
43152 | # 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 2 3 | |
43153 | ||
43154 | ||
43155 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 1 3 | |
43156 | # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43157 | ||
43158 | # 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43159 | ||
43160 | ||
43161 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cwctype" 1 3 | |
43162 | # 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cwctype" 3 | |
43163 | ||
43164 | # 49 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cwctype" 3 | |
43165 | #pragma GCC visibility push(default) | |
43166 | ||
43167 | ||
43168 | ||
43169 | ||
43170 | # 1 "/usr/include/wctype.h" 1 3 4 | |
43171 | ||
43172 | ||
43173 | ||
43174 | ||
43175 | ||
43176 | ||
43177 | ||
43178 | # 1 "/usr/include/gentoo-multilib/amd64/wctype.h" 1 3 4 | |
43179 | # 26 "/usr/include/gentoo-multilib/amd64/wctype.h" 3 4 | |
43180 | # 1 "/usr/include/features.h" 1 3 4 | |
43181 | # 27 "/usr/include/gentoo-multilib/amd64/wctype.h" 2 3 4 | |
43182 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
43183 | # 28 "/usr/include/gentoo-multilib/amd64/wctype.h" 2 3 4 | |
43184 | ||
43185 | ||
43186 | ||
43187 | ||
43188 | ||
43189 | ||
43190 | ||
43191 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 | |
43192 | # 36 "/usr/include/gentoo-multilib/amd64/wctype.h" 2 3 4 | |
43193 | # 45 "/usr/include/gentoo-multilib/amd64/wctype.h" 3 4 | |
43194 | ||
43195 | # 63 "/usr/include/gentoo-multilib/amd64/wctype.h" 3 4 | |
43196 | ||
43197 | ||
43198 | ||
43199 | typedef unsigned long int wctype_t; | |
43200 | ||
43201 | ||
43202 | ||
43203 | ||
43204 | ||
43205 | ||
43206 | ||
43207 | # 1 "/usr/include/endian.h" 1 3 4 | |
43208 | # 75 "/usr/include/gentoo-multilib/amd64/wctype.h" 2 3 4 | |
43209 | # 85 "/usr/include/gentoo-multilib/amd64/wctype.h" 3 4 | |
43210 | enum | |
43211 | { | |
43212 | __ISwupper = 0, | |
43213 | __ISwlower = 1, | |
43214 | __ISwalpha = 2, | |
43215 | __ISwdigit = 3, | |
43216 | __ISwxdigit = 4, | |
43217 | __ISwspace = 5, | |
43218 | __ISwprint = 6, | |
43219 | __ISwgraph = 7, | |
43220 | __ISwblank = 8, | |
43221 | __ISwcntrl = 9, | |
43222 | __ISwpunct = 10, | |
43223 | __ISwalnum = 11, | |
43224 | ||
43225 | _ISwupper = ((__ISwupper) < 8 ? (int) ((1UL << (__ISwupper)) << 24) : ((__ISwupper) < 16 ? (int) ((1UL << (__ISwupper)) << 8) : ((__ISwupper) < 24 ? (int) ((1UL << (__ISwupper)) >> 8) : (int) ((1UL << (__ISwupper)) >> 24)))), | |
43226 | _ISwlower = ((__ISwlower) < 8 ? (int) ((1UL << (__ISwlower)) << 24) : ((__ISwlower) < 16 ? (int) ((1UL << (__ISwlower)) << 8) : ((__ISwlower) < 24 ? (int) ((1UL << (__ISwlower)) >> 8) : (int) ((1UL << (__ISwlower)) >> 24)))), | |
43227 | _ISwalpha = ((__ISwalpha) < 8 ? (int) ((1UL << (__ISwalpha)) << 24) : ((__ISwalpha) < 16 ? (int) ((1UL << (__ISwalpha)) << 8) : ((__ISwalpha) < 24 ? (int) ((1UL << (__ISwalpha)) >> 8) : (int) ((1UL << (__ISwalpha)) >> 24)))), | |
43228 | _ISwdigit = ((__ISwdigit) < 8 ? (int) ((1UL << (__ISwdigit)) << 24) : ((__ISwdigit) < 16 ? (int) ((1UL << (__ISwdigit)) << 8) : ((__ISwdigit) < 24 ? (int) ((1UL << (__ISwdigit)) >> 8) : (int) ((1UL << (__ISwdigit)) >> 24)))), | |
43229 | _ISwxdigit = ((__ISwxdigit) < 8 ? (int) ((1UL << (__ISwxdigit)) << 24) : ((__ISwxdigit) < 16 ? (int) ((1UL << (__ISwxdigit)) << 8) : ((__ISwxdigit) < 24 ? (int) ((1UL << (__ISwxdigit)) >> 8) : (int) ((1UL << (__ISwxdigit)) >> 24)))), | |
43230 | _ISwspace = ((__ISwspace) < 8 ? (int) ((1UL << (__ISwspace)) << 24) : ((__ISwspace) < 16 ? (int) ((1UL << (__ISwspace)) << 8) : ((__ISwspace) < 24 ? (int) ((1UL << (__ISwspace)) >> 8) : (int) ((1UL << (__ISwspace)) >> 24)))), | |
43231 | _ISwprint = ((__ISwprint) < 8 ? (int) ((1UL << (__ISwprint)) << 24) : ((__ISwprint) < 16 ? (int) ((1UL << (__ISwprint)) << 8) : ((__ISwprint) < 24 ? (int) ((1UL << (__ISwprint)) >> 8) : (int) ((1UL << (__ISwprint)) >> 24)))), | |
43232 | _ISwgraph = ((__ISwgraph) < 8 ? (int) ((1UL << (__ISwgraph)) << 24) : ((__ISwgraph) < 16 ? (int) ((1UL << (__ISwgraph)) << 8) : ((__ISwgraph) < 24 ? (int) ((1UL << (__ISwgraph)) >> 8) : (int) ((1UL << (__ISwgraph)) >> 24)))), | |
43233 | _ISwblank = ((__ISwblank) < 8 ? (int) ((1UL << (__ISwblank)) << 24) : ((__ISwblank) < 16 ? (int) ((1UL << (__ISwblank)) << 8) : ((__ISwblank) < 24 ? (int) ((1UL << (__ISwblank)) >> 8) : (int) ((1UL << (__ISwblank)) >> 24)))), | |
43234 | _ISwcntrl = ((__ISwcntrl) < 8 ? (int) ((1UL << (__ISwcntrl)) << 24) : ((__ISwcntrl) < 16 ? (int) ((1UL << (__ISwcntrl)) << 8) : ((__ISwcntrl) < 24 ? (int) ((1UL << (__ISwcntrl)) >> 8) : (int) ((1UL << (__ISwcntrl)) >> 24)))), | |
43235 | _ISwpunct = ((__ISwpunct) < 8 ? (int) ((1UL << (__ISwpunct)) << 24) : ((__ISwpunct) < 16 ? (int) ((1UL << (__ISwpunct)) << 8) : ((__ISwpunct) < 24 ? (int) ((1UL << (__ISwpunct)) >> 8) : (int) ((1UL << (__ISwpunct)) >> 24)))), | |
43236 | _ISwalnum = ((__ISwalnum) < 8 ? (int) ((1UL << (__ISwalnum)) << 24) : ((__ISwalnum) < 16 ? (int) ((1UL << (__ISwalnum)) << 8) : ((__ISwalnum) < 24 ? (int) ((1UL << (__ISwalnum)) >> 8) : (int) ((1UL << (__ISwalnum)) >> 24)))) | |
43237 | }; | |
43238 | ||
43239 | ||
43240 | ||
43241 | extern "C" { | |
43242 | ||
43243 | ||
43244 | ||
43245 | ||
43246 | ||
43247 | ||
43248 | ||
43249 | ||
43250 | extern int iswalnum (wint_t __wc) throw (); | |
43251 | ||
43252 | ||
43253 | ||
43254 | ||
43255 | ||
43256 | extern int iswalpha (wint_t __wc) throw (); | |
43257 | ||
43258 | ||
43259 | extern int iswcntrl (wint_t __wc) throw (); | |
43260 | ||
43261 | ||
43262 | ||
43263 | extern int iswdigit (wint_t __wc) throw (); | |
43264 | ||
43265 | ||
43266 | ||
43267 | extern int iswgraph (wint_t __wc) throw (); | |
43268 | ||
43269 | ||
43270 | ||
43271 | ||
43272 | extern int iswlower (wint_t __wc) throw (); | |
43273 | ||
43274 | ||
43275 | extern int iswprint (wint_t __wc) throw (); | |
43276 | ||
43277 | ||
43278 | ||
43279 | ||
43280 | extern int iswpunct (wint_t __wc) throw (); | |
43281 | ||
43282 | ||
43283 | ||
43284 | ||
43285 | extern int iswspace (wint_t __wc) throw (); | |
43286 | ||
43287 | ||
43288 | ||
43289 | ||
43290 | extern int iswupper (wint_t __wc) throw (); | |
43291 | ||
43292 | ||
43293 | ||
43294 | ||
43295 | extern int iswxdigit (wint_t __wc) throw (); | |
43296 | ||
43297 | ||
43298 | ||
43299 | ||
43300 | ||
43301 | extern int iswblank (wint_t __wc) throw (); | |
43302 | # 185 "/usr/include/gentoo-multilib/amd64/wctype.h" 3 4 | |
43303 | extern wctype_t wctype (__const char *__property) throw (); | |
43304 | ||
43305 | ||
43306 | ||
43307 | extern int iswctype (wint_t __wc, wctype_t __desc) throw (); | |
43308 | ||
43309 | ||
43310 | ||
43311 | ||
43312 | ||
43313 | ||
43314 | ||
43315 | ||
43316 | ||
43317 | ||
43318 | typedef __const __int32_t *wctrans_t; | |
43319 | ||
43320 | ||
43321 | ||
43322 | ||
43323 | ||
43324 | ||
43325 | ||
43326 | extern wint_t towlower (wint_t __wc) throw (); | |
43327 | ||
43328 | ||
43329 | extern wint_t towupper (wint_t __wc) throw (); | |
43330 | ||
43331 | ||
43332 | } | |
43333 | # 227 "/usr/include/gentoo-multilib/amd64/wctype.h" 3 4 | |
43334 | extern "C" { | |
43335 | ||
43336 | ||
43337 | ||
43338 | ||
43339 | extern wctrans_t wctrans (__const char *__property) throw (); | |
43340 | ||
43341 | ||
43342 | extern wint_t towctrans (wint_t __wc, wctrans_t __desc) throw (); | |
43343 | ||
43344 | ||
43345 | ||
43346 | ||
43347 | # 1 "/usr/include/xlocale.h" 1 3 4 | |
43348 | # 241 "/usr/include/gentoo-multilib/amd64/wctype.h" 2 3 4 | |
43349 | ||
43350 | ||
43351 | ||
43352 | extern int iswalnum_l (wint_t __wc, __locale_t __locale) throw (); | |
43353 | ||
43354 | ||
43355 | ||
43356 | ||
43357 | ||
43358 | extern int iswalpha_l (wint_t __wc, __locale_t __locale) throw (); | |
43359 | ||
43360 | ||
43361 | extern int iswcntrl_l (wint_t __wc, __locale_t __locale) throw (); | |
43362 | ||
43363 | ||
43364 | ||
43365 | extern int iswdigit_l (wint_t __wc, __locale_t __locale) throw (); | |
43366 | ||
43367 | ||
43368 | ||
43369 | extern int iswgraph_l (wint_t __wc, __locale_t __locale) throw (); | |
43370 | ||
43371 | ||
43372 | ||
43373 | ||
43374 | extern int iswlower_l (wint_t __wc, __locale_t __locale) throw (); | |
43375 | ||
43376 | ||
43377 | extern int iswprint_l (wint_t __wc, __locale_t __locale) throw (); | |
43378 | ||
43379 | ||
43380 | ||
43381 | ||
43382 | extern int iswpunct_l (wint_t __wc, __locale_t __locale) throw (); | |
43383 | ||
43384 | ||
43385 | ||
43386 | ||
43387 | extern int iswspace_l (wint_t __wc, __locale_t __locale) throw (); | |
43388 | ||
43389 | ||
43390 | ||
43391 | ||
43392 | extern int iswupper_l (wint_t __wc, __locale_t __locale) throw (); | |
43393 | ||
43394 | ||
43395 | ||
43396 | ||
43397 | extern int iswxdigit_l (wint_t __wc, __locale_t __locale) throw (); | |
43398 | ||
43399 | ||
43400 | ||
43401 | ||
43402 | extern int iswblank_l (wint_t __wc, __locale_t __locale) throw (); | |
43403 | ||
43404 | ||
43405 | ||
43406 | extern wctype_t wctype_l (__const char *__property, __locale_t __locale) | |
43407 | throw (); | |
43408 | ||
43409 | ||
43410 | ||
43411 | extern int iswctype_l (wint_t __wc, wctype_t __desc, __locale_t __locale) | |
43412 | throw (); | |
43413 | ||
43414 | ||
43415 | ||
43416 | ||
43417 | ||
43418 | ||
43419 | ||
43420 | extern wint_t towlower_l (wint_t __wc, __locale_t __locale) throw (); | |
43421 | ||
43422 | ||
43423 | extern wint_t towupper_l (wint_t __wc, __locale_t __locale) throw (); | |
43424 | ||
43425 | ||
43426 | ||
43427 | extern wctrans_t wctrans_l (__const char *__property, __locale_t __locale) | |
43428 | throw (); | |
43429 | ||
43430 | ||
43431 | extern wint_t towctrans_l (wint_t __wc, wctrans_t __desc, | |
43432 | __locale_t __locale) throw (); | |
43433 | ||
43434 | ||
43435 | ||
43436 | } | |
43437 | # 9 "/usr/include/wctype.h" 2 3 4 | |
43438 | # 55 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cwctype" 2 3 | |
43439 | # 80 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/cwctype" 3 | |
43440 | namespace std | |
43441 | { | |
43442 | using ::wint_t; | |
43443 | ||
43444 | using ::wctype_t; | |
43445 | using ::wctrans_t; | |
43446 | ||
43447 | using ::iswalnum; | |
43448 | using ::iswalpha; | |
43449 | ||
43450 | using ::iswblank; | |
43451 | ||
43452 | using ::iswcntrl; | |
43453 | using ::iswctype; | |
43454 | using ::iswdigit; | |
43455 | using ::iswgraph; | |
43456 | using ::iswlower; | |
43457 | using ::iswprint; | |
43458 | using ::iswpunct; | |
43459 | using ::iswspace; | |
43460 | using ::iswupper; | |
43461 | using ::iswxdigit; | |
43462 | using ::towctrans; | |
43463 | using ::towlower; | |
43464 | using ::towupper; | |
43465 | using ::wctrans; | |
43466 | using ::wctype; | |
43467 | } | |
43468 | ||
43469 | ||
43470 | #pragma GCC visibility pop | |
43471 | # 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 2 3 | |
43472 | ||
43473 | ||
43474 | ||
43475 | ||
43476 | namespace std | |
43477 | { | |
43478 | # 63 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43479 | template<typename _Tv> | |
43480 | void | |
43481 | __convert_to_v(const char* __in, _Tv& __out, ios_base::iostate& __err, | |
43482 | const __c_locale& __cloc); | |
43483 | ||
43484 | ||
43485 | template<> | |
43486 | void | |
43487 | __convert_to_v(const char*, float&, ios_base::iostate&, | |
43488 | const __c_locale&); | |
43489 | ||
43490 | template<> | |
43491 | void | |
43492 | __convert_to_v(const char*, double&, ios_base::iostate&, | |
43493 | const __c_locale&); | |
43494 | ||
43495 | template<> | |
43496 | void | |
43497 | __convert_to_v(const char*, long double&, ios_base::iostate&, | |
43498 | const __c_locale&); | |
43499 | ||
43500 | ||
43501 | ||
43502 | template<typename _CharT, typename _Traits> | |
43503 | struct __pad | |
43504 | { | |
43505 | static void | |
43506 | _S_pad(ios_base& __io, _CharT __fill, _CharT* __news, | |
43507 | const _CharT* __olds, const streamsize __newlen, | |
43508 | const streamsize __oldlen, const bool __num); | |
43509 | }; | |
43510 | ||
43511 | ||
43512 | ||
43513 | ||
43514 | ||
43515 | ||
43516 | template<typename _CharT> | |
43517 | _CharT* | |
43518 | __add_grouping(_CharT* __s, _CharT __sep, | |
43519 | const char* __gbeg, size_t __gsize, | |
43520 | const _CharT* __first, const _CharT* __last); | |
43521 | ||
43522 | ||
43523 | ||
43524 | ||
43525 | template<typename _CharT> | |
43526 | inline | |
43527 | ostreambuf_iterator<_CharT> | |
43528 | __write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int __len) | |
43529 | { | |
43530 | __s._M_put(__ws, __len); | |
43531 | return __s; | |
43532 | } | |
43533 | ||
43534 | ||
43535 | template<typename _CharT, typename _OutIter> | |
43536 | inline | |
43537 | _OutIter | |
43538 | __write(_OutIter __s, const _CharT* __ws, int __len) | |
43539 | { | |
43540 | for (int __j = 0; __j < __len; __j++, ++__s) | |
43541 | *__s = __ws[__j]; | |
43542 | return __s; | |
43543 | } | |
43544 | ||
43545 | ||
43546 | ||
43547 | ||
43548 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/ctype_base.h" 1 3 | |
43549 | # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/ctype_base.h" 3 | |
43550 | struct ctype_base | |
43551 | { | |
43552 | ||
43553 | typedef const int* __to_type; | |
43554 | ||
43555 | ||
43556 | ||
43557 | typedef unsigned short mask; | |
43558 | static const mask upper = _ISupper; | |
43559 | static const mask lower = _ISlower; | |
43560 | static const mask alpha = _ISalpha; | |
43561 | static const mask digit = _ISdigit; | |
43562 | static const mask xdigit = _ISxdigit; | |
43563 | static const mask space = _ISspace; | |
43564 | static const mask print = _ISprint; | |
43565 | static const mask graph = _ISalpha | _ISdigit | _ISpunct; | |
43566 | static const mask cntrl = _IScntrl; | |
43567 | static const mask punct = _ISpunct; | |
43568 | static const mask alnum = _ISalpha | _ISdigit; | |
43569 | }; | |
43570 | # 133 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 2 3 | |
43571 | # 144 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43572 | template<typename _CharT> | |
43573 | class __ctype_abstract_base : public locale::facet, public ctype_base | |
43574 | { | |
43575 | public: | |
43576 | ||
43577 | ||
43578 | typedef _CharT char_type; | |
43579 | # 162 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43580 | bool | |
43581 | is(mask __m, char_type __c) const | |
43582 | { return this->do_is(__m, __c); } | |
43583 | # 179 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43584 | const char_type* | |
43585 | is(const char_type *__lo, const char_type *__hi, mask *__vec) const | |
43586 | { return this->do_is(__lo, __hi, __vec); } | |
43587 | # 195 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43588 | const char_type* | |
43589 | scan_is(mask __m, const char_type* __lo, const char_type* __hi) const | |
43590 | { return this->do_scan_is(__m, __lo, __hi); } | |
43591 | # 211 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43592 | const char_type* | |
43593 | scan_not(mask __m, const char_type* __lo, const char_type* __hi) const | |
43594 | { return this->do_scan_not(__m, __lo, __hi); } | |
43595 | # 225 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43596 | char_type | |
43597 | toupper(char_type __c) const | |
43598 | { return this->do_toupper(__c); } | |
43599 | # 240 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43600 | const char_type* | |
43601 | toupper(char_type *__lo, const char_type* __hi) const | |
43602 | { return this->do_toupper(__lo, __hi); } | |
43603 | # 254 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43604 | char_type | |
43605 | tolower(char_type __c) const | |
43606 | { return this->do_tolower(__c); } | |
43607 | # 269 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43608 | const char_type* | |
43609 | tolower(char_type* __lo, const char_type* __hi) const | |
43610 | { return this->do_tolower(__lo, __hi); } | |
43611 | # 286 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43612 | char_type | |
43613 | widen(char __c) const | |
43614 | { return this->do_widen(__c); } | |
43615 | # 305 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43616 | const char* | |
43617 | widen(const char* __lo, const char* __hi, char_type* __to) const | |
43618 | { return this->do_widen(__lo, __hi, __to); } | |
43619 | # 324 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43620 | char | |
43621 | narrow(char_type __c, char __dfault) const | |
43622 | { return this->do_narrow(__c, __dfault); } | |
43623 | # 346 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43624 | const char_type* | |
43625 | narrow(const char_type* __lo, const char_type* __hi, | |
43626 | char __dfault, char *__to) const | |
43627 | { return this->do_narrow(__lo, __hi, __dfault, __to); } | |
43628 | ||
43629 | protected: | |
43630 | explicit | |
43631 | __ctype_abstract_base(size_t __refs = 0): facet(__refs) { } | |
43632 | ||
43633 | virtual | |
43634 | ~__ctype_abstract_base() { } | |
43635 | # 371 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43636 | virtual bool | |
43637 | do_is(mask __m, char_type __c) const = 0; | |
43638 | # 390 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43639 | virtual const char_type* | |
43640 | do_is(const char_type* __lo, const char_type* __hi, | |
43641 | mask* __vec) const = 0; | |
43642 | # 409 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43643 | virtual const char_type* | |
43644 | do_scan_is(mask __m, const char_type* __lo, | |
43645 | const char_type* __hi) const = 0; | |
43646 | # 428 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43647 | virtual const char_type* | |
43648 | do_scan_not(mask __m, const char_type* __lo, | |
43649 | const char_type* __hi) const = 0; | |
43650 | # 446 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43651 | virtual char_type | |
43652 | do_toupper(char_type) const = 0; | |
43653 | # 463 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43654 | virtual const char_type* | |
43655 | do_toupper(char_type* __lo, const char_type* __hi) const = 0; | |
43656 | # 479 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43657 | virtual char_type | |
43658 | do_tolower(char_type) const = 0; | |
43659 | # 496 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43660 | virtual const char_type* | |
43661 | do_tolower(char_type* __lo, const char_type* __hi) const = 0; | |
43662 | # 515 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43663 | virtual char_type | |
43664 | do_widen(char) const = 0; | |
43665 | # 536 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43666 | virtual const char* | |
43667 | do_widen(const char* __lo, const char* __hi, | |
43668 | char_type* __dest) const = 0; | |
43669 | # 558 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43670 | virtual char | |
43671 | do_narrow(char_type, char __dfault) const = 0; | |
43672 | # 582 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43673 | virtual const char_type* | |
43674 | do_narrow(const char_type* __lo, const char_type* __hi, | |
43675 | char __dfault, char* __dest) const = 0; | |
43676 | }; | |
43677 | # 605 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43678 | template<typename _CharT> | |
43679 | class ctype : public __ctype_abstract_base<_CharT> | |
43680 | { | |
43681 | public: | |
43682 | ||
43683 | typedef _CharT char_type; | |
43684 | typedef typename __ctype_abstract_base<_CharT>::mask mask; | |
43685 | ||
43686 | ||
43687 | static locale::id id; | |
43688 | ||
43689 | explicit | |
43690 | ctype(size_t __refs = 0) : __ctype_abstract_base<_CharT>(__refs) { } | |
43691 | ||
43692 | protected: | |
43693 | virtual | |
43694 | ~ctype(); | |
43695 | ||
43696 | virtual bool | |
43697 | do_is(mask __m, char_type __c) const; | |
43698 | ||
43699 | virtual const char_type* | |
43700 | do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; | |
43701 | ||
43702 | virtual const char_type* | |
43703 | do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; | |
43704 | ||
43705 | virtual const char_type* | |
43706 | do_scan_not(mask __m, const char_type* __lo, | |
43707 | const char_type* __hi) const; | |
43708 | ||
43709 | virtual char_type | |
43710 | do_toupper(char_type __c) const; | |
43711 | ||
43712 | virtual const char_type* | |
43713 | do_toupper(char_type* __lo, const char_type* __hi) const; | |
43714 | ||
43715 | virtual char_type | |
43716 | do_tolower(char_type __c) const; | |
43717 | ||
43718 | virtual const char_type* | |
43719 | do_tolower(char_type* __lo, const char_type* __hi) const; | |
43720 | ||
43721 | virtual char_type | |
43722 | do_widen(char __c) const; | |
43723 | ||
43724 | virtual const char* | |
43725 | do_widen(const char* __lo, const char* __hi, char_type* __dest) const; | |
43726 | ||
43727 | virtual char | |
43728 | do_narrow(char_type, char __dfault) const; | |
43729 | ||
43730 | virtual const char_type* | |
43731 | do_narrow(const char_type* __lo, const char_type* __hi, | |
43732 | char __dfault, char* __dest) const; | |
43733 | }; | |
43734 | ||
43735 | template<typename _CharT> | |
43736 | locale::id ctype<_CharT>::id; | |
43737 | # 674 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43738 | template<> | |
43739 | class ctype<char> : public locale::facet, public ctype_base | |
43740 | { | |
43741 | public: | |
43742 | ||
43743 | ||
43744 | typedef char char_type; | |
43745 | ||
43746 | protected: | |
43747 | ||
43748 | __c_locale _M_c_locale_ctype; | |
43749 | bool _M_del; | |
43750 | __to_type _M_toupper; | |
43751 | __to_type _M_tolower; | |
43752 | const mask* _M_table; | |
43753 | mutable char _M_widen_ok; | |
43754 | mutable char _M_widen[1 + static_cast<unsigned char>(-1)]; | |
43755 | mutable char _M_narrow[1 + static_cast<unsigned char>(-1)]; | |
43756 | mutable char _M_narrow_ok; | |
43757 | ||
43758 | ||
43759 | public: | |
43760 | ||
43761 | static locale::id id; | |
43762 | ||
43763 | static const size_t table_size = 1 + static_cast<unsigned char>(-1); | |
43764 | # 711 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43765 | explicit | |
43766 | ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0); | |
43767 | # 724 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43768 | explicit | |
43769 | ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false, | |
43770 | size_t __refs = 0); | |
43771 | # 737 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43772 | inline bool | |
43773 | is(mask __m, char __c) const; | |
43774 | # 752 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43775 | inline const char* | |
43776 | is(const char* __lo, const char* __hi, mask* __vec) const; | |
43777 | # 766 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43778 | inline const char* | |
43779 | scan_is(mask __m, const char* __lo, const char* __hi) const; | |
43780 | # 780 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43781 | inline const char* | |
43782 | scan_not(mask __m, const char* __lo, const char* __hi) const; | |
43783 | # 795 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43784 | char_type | |
43785 | toupper(char_type __c) const | |
43786 | { return this->do_toupper(__c); } | |
43787 | # 812 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43788 | const char_type* | |
43789 | toupper(char_type *__lo, const char_type* __hi) const | |
43790 | { return this->do_toupper(__lo, __hi); } | |
43791 | # 828 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43792 | char_type | |
43793 | tolower(char_type __c) const | |
43794 | { return this->do_tolower(__c); } | |
43795 | # 845 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43796 | const char_type* | |
43797 | tolower(char_type* __lo, const char_type* __hi) const | |
43798 | { return this->do_tolower(__lo, __hi); } | |
43799 | # 865 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43800 | char_type | |
43801 | widen(char __c) const | |
43802 | { | |
43803 | if (_M_widen_ok) | |
43804 | return _M_widen[static_cast<unsigned char>(__c)]; | |
43805 | this->_M_widen_init(); | |
43806 | return this->do_widen(__c); | |
43807 | } | |
43808 | # 892 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43809 | const char* | |
43810 | widen(const char* __lo, const char* __hi, char_type* __to) const | |
43811 | { | |
43812 | if (_M_widen_ok == 1) | |
43813 | { | |
43814 | memcpy(__to, __lo, __hi - __lo); | |
43815 | return __hi; | |
43816 | } | |
43817 | if (!_M_widen_ok) | |
43818 | _M_widen_init(); | |
43819 | return this->do_widen(__lo, __hi, __to); | |
43820 | } | |
43821 | # 923 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43822 | char | |
43823 | narrow(char_type __c, char __dfault) const | |
43824 | { | |
43825 | if (_M_narrow[static_cast<unsigned char>(__c)]) | |
43826 | return _M_narrow[static_cast<unsigned char>(__c)]; | |
43827 | const char __t = do_narrow(__c, __dfault); | |
43828 | if (__t != __dfault) | |
43829 | _M_narrow[static_cast<unsigned char>(__c)] = __t; | |
43830 | return __t; | |
43831 | } | |
43832 | # 956 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43833 | const char_type* | |
43834 | narrow(const char_type* __lo, const char_type* __hi, | |
43835 | char __dfault, char *__to) const | |
43836 | { | |
43837 | if (__builtin_expect(_M_narrow_ok == 1, true)) | |
43838 | { | |
43839 | memcpy(__to, __lo, __hi - __lo); | |
43840 | return __hi; | |
43841 | } | |
43842 | if (!_M_narrow_ok) | |
43843 | _M_narrow_init(); | |
43844 | return this->do_narrow(__lo, __hi, __dfault, __to); | |
43845 | } | |
43846 | ||
43847 | protected: | |
43848 | ||
43849 | ||
43850 | const mask* | |
43851 | table() const throw() | |
43852 | { return _M_table; } | |
43853 | ||
43854 | ||
43855 | static const mask* | |
43856 | classic_table() throw(); | |
43857 | ||
43858 | ||
43859 | ||
43860 | ||
43861 | ||
43862 | ||
43863 | ||
43864 | virtual | |
43865 | ~ctype(); | |
43866 | # 1003 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43867 | virtual char_type | |
43868 | do_toupper(char_type) const; | |
43869 | # 1020 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43870 | virtual const char_type* | |
43871 | do_toupper(char_type* __lo, const char_type* __hi) const; | |
43872 | # 1036 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43873 | virtual char_type | |
43874 | do_tolower(char_type) const; | |
43875 | # 1053 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43876 | virtual const char_type* | |
43877 | do_tolower(char_type* __lo, const char_type* __hi) const; | |
43878 | # 1073 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43879 | virtual char_type | |
43880 | do_widen(char __c) const | |
43881 | { return __c; } | |
43882 | # 1096 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43883 | virtual const char* | |
43884 | do_widen(const char* __lo, const char* __hi, char_type* __dest) const | |
43885 | { | |
43886 | memcpy(__dest, __lo, __hi - __lo); | |
43887 | return __hi; | |
43888 | } | |
43889 | # 1122 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43890 | virtual char | |
43891 | do_narrow(char_type __c, char) const | |
43892 | { return __c; } | |
43893 | # 1148 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43894 | virtual const char_type* | |
43895 | do_narrow(const char_type* __lo, const char_type* __hi, | |
43896 | char, char* __dest) const | |
43897 | { | |
43898 | memcpy(__dest, __lo, __hi - __lo); | |
43899 | return __hi; | |
43900 | } | |
43901 | ||
43902 | private: | |
43903 | ||
43904 | void _M_widen_init() const | |
43905 | { | |
43906 | char __tmp[sizeof(_M_widen)]; | |
43907 | for (size_t __i = 0; __i < sizeof(_M_widen); ++__i) | |
43908 | __tmp[__i] = __i; | |
43909 | do_widen(__tmp, __tmp + sizeof(__tmp), _M_widen); | |
43910 | ||
43911 | _M_widen_ok = 1; | |
43912 | ||
43913 | if (memcmp(__tmp, _M_widen, sizeof(_M_widen))) | |
43914 | _M_widen_ok = 2; | |
43915 | } | |
43916 | ||
43917 | ||
43918 | ||
43919 | ||
43920 | void _M_narrow_init() const | |
43921 | { | |
43922 | char __tmp[sizeof(_M_narrow)]; | |
43923 | for (size_t __i = 0; __i < sizeof(_M_narrow); ++__i) | |
43924 | __tmp[__i] = __i; | |
43925 | do_narrow(__tmp, __tmp + sizeof(__tmp), 0, _M_narrow); | |
43926 | ||
43927 | _M_narrow_ok = 1; | |
43928 | if (memcmp(__tmp, _M_narrow, sizeof(_M_narrow))) | |
43929 | _M_narrow_ok = 2; | |
43930 | else | |
43931 | { | |
43932 | ||
43933 | ||
43934 | char __c; | |
43935 | do_narrow(__tmp, __tmp + 1, 1, &__c); | |
43936 | if (__c == 1) | |
43937 | _M_narrow_ok = 2; | |
43938 | } | |
43939 | } | |
43940 | }; | |
43941 | ||
43942 | template<> | |
43943 | const ctype<char>& | |
43944 | use_facet<ctype<char> >(const locale& __loc); | |
43945 | # 1212 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43946 | template<> | |
43947 | class ctype<wchar_t> : public __ctype_abstract_base<wchar_t> | |
43948 | { | |
43949 | public: | |
43950 | ||
43951 | ||
43952 | typedef wchar_t char_type; | |
43953 | typedef wctype_t __wmask_type; | |
43954 | ||
43955 | protected: | |
43956 | __c_locale _M_c_locale_ctype; | |
43957 | ||
43958 | ||
43959 | bool _M_narrow_ok; | |
43960 | char _M_narrow[128]; | |
43961 | wint_t _M_widen[1 + static_cast<unsigned char>(-1)]; | |
43962 | ||
43963 | ||
43964 | mask _M_bit[16]; | |
43965 | __wmask_type _M_wmask[16]; | |
43966 | ||
43967 | public: | |
43968 | ||
43969 | ||
43970 | static locale::id id; | |
43971 | # 1245 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43972 | explicit | |
43973 | ctype(size_t __refs = 0); | |
43974 | # 1256 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43975 | explicit | |
43976 | ctype(__c_locale __cloc, size_t __refs = 0); | |
43977 | ||
43978 | protected: | |
43979 | __wmask_type | |
43980 | _M_convert_to_wmask(const mask __m) const; | |
43981 | ||
43982 | ||
43983 | virtual | |
43984 | ~ctype(); | |
43985 | # 1280 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43986 | virtual bool | |
43987 | do_is(mask __m, char_type __c) const; | |
43988 | # 1299 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43989 | virtual const char_type* | |
43990 | do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; | |
43991 | # 1317 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43992 | virtual const char_type* | |
43993 | do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; | |
43994 | # 1335 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43995 | virtual const char_type* | |
43996 | do_scan_not(mask __m, const char_type* __lo, | |
43997 | const char_type* __hi) const; | |
43998 | # 1352 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
43999 | virtual char_type | |
44000 | do_toupper(char_type) const; | |
44001 | # 1369 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44002 | virtual const char_type* | |
44003 | do_toupper(char_type* __lo, const char_type* __hi) const; | |
44004 | # 1385 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44005 | virtual char_type | |
44006 | do_tolower(char_type) const; | |
44007 | # 1402 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44008 | virtual const char_type* | |
44009 | do_tolower(char_type* __lo, const char_type* __hi) const; | |
44010 | # 1422 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44011 | virtual char_type | |
44012 | do_widen(char) const; | |
44013 | # 1444 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44014 | virtual const char* | |
44015 | do_widen(const char* __lo, const char* __hi, char_type* __dest) const; | |
44016 | # 1467 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44017 | virtual char | |
44018 | do_narrow(char_type, char __dfault) const; | |
44019 | # 1493 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44020 | virtual const char_type* | |
44021 | do_narrow(const char_type* __lo, const char_type* __hi, | |
44022 | char __dfault, char* __dest) const; | |
44023 | ||
44024 | ||
44025 | void | |
44026 | _M_initialize_ctype(); | |
44027 | }; | |
44028 | ||
44029 | template<> | |
44030 | const ctype<wchar_t>& | |
44031 | use_facet<ctype<wchar_t> >(const locale& __loc); | |
44032 | ||
44033 | ||
44034 | ||
44035 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/ctype_inline.h" 1 3 | |
44036 | # 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/ctype_inline.h" 3 | |
44037 | bool | |
44038 | ctype<char>:: | |
44039 | is(mask __m, char __c) const | |
44040 | { return _M_table[static_cast<unsigned char>(__c)] & __m; } | |
44041 | ||
44042 | const char* | |
44043 | ctype<char>:: | |
44044 | is(const char* __low, const char* __high, mask* __vec) const | |
44045 | { | |
44046 | while (__low < __high) | |
44047 | *__vec++ = _M_table[static_cast<unsigned char>(*__low++)]; | |
44048 | return __high; | |
44049 | } | |
44050 | ||
44051 | const char* | |
44052 | ctype<char>:: | |
44053 | scan_is(mask __m, const char* __low, const char* __high) const | |
44054 | { | |
44055 | while (__low < __high | |
44056 | && !(_M_table[static_cast<unsigned char>(*__low)] & __m)) | |
44057 | ++__low; | |
44058 | return __low; | |
44059 | } | |
44060 | ||
44061 | const char* | |
44062 | ctype<char>:: | |
44063 | scan_not(mask __m, const char* __low, const char* __high) const | |
44064 | { | |
44065 | while (__low < __high | |
44066 | && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0) | |
44067 | ++__low; | |
44068 | return __low; | |
44069 | } | |
44070 | # 1509 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 2 3 | |
44071 | ||
44072 | ||
44073 | template<typename _CharT> | |
44074 | class ctype_byname : public ctype<_CharT> | |
44075 | { | |
44076 | public: | |
44077 | typedef _CharT char_type; | |
44078 | ||
44079 | explicit | |
44080 | ctype_byname(const char* __s, size_t __refs = 0); | |
44081 | ||
44082 | protected: | |
44083 | virtual | |
44084 | ~ctype_byname() { }; | |
44085 | }; | |
44086 | ||
44087 | ||
44088 | template<> | |
44089 | ctype_byname<char>::ctype_byname(const char*, size_t refs); | |
44090 | ||
44091 | template<> | |
44092 | ctype_byname<wchar_t>::ctype_byname(const char*, size_t refs); | |
44093 | ||
44094 | ||
44095 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/codecvt.h" 1 3 | |
44096 | # 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/codecvt.h" 3 | |
44097 | ||
44098 | # 46 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/codecvt.h" 3 | |
44099 | ||
44100 | ||
44101 | class codecvt_base | |
44102 | { | |
44103 | public: | |
44104 | enum result | |
44105 | { | |
44106 | ok, | |
44107 | partial, | |
44108 | error, | |
44109 | noconv | |
44110 | }; | |
44111 | }; | |
44112 | # 69 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/codecvt.h" 3 | |
44113 | template<typename _InternT, typename _ExternT, typename _StateT> | |
44114 | class __codecvt_abstract_base | |
44115 | : public locale::facet, public codecvt_base | |
44116 | { | |
44117 | public: | |
44118 | ||
44119 | typedef codecvt_base::result result; | |
44120 | typedef _InternT intern_type; | |
44121 | typedef _ExternT extern_type; | |
44122 | typedef _StateT state_type; | |
44123 | # 117 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/codecvt.h" 3 | |
44124 | result | |
44125 | out(state_type& __state, const intern_type* __from, | |
44126 | const intern_type* __from_end, const intern_type*& __from_next, | |
44127 | extern_type* __to, extern_type* __to_end, | |
44128 | extern_type*& __to_next) const | |
44129 | { | |
44130 | return this->do_out(__state, __from, __from_end, __from_next, | |
44131 | __to, __to_end, __to_next); | |
44132 | } | |
44133 | # 156 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/codecvt.h" 3 | |
44134 | result | |
44135 | unshift(state_type& __state, extern_type* __to, extern_type* __to_end, | |
44136 | extern_type*& __to_next) const | |
44137 | { return this->do_unshift(__state, __to,__to_end,__to_next); } | |
44138 | # 197 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/codecvt.h" 3 | |
44139 | result | |
44140 | in(state_type& __state, const extern_type* __from, | |
44141 | const extern_type* __from_end, const extern_type*& __from_next, | |
44142 | intern_type* __to, intern_type* __to_end, | |
44143 | intern_type*& __to_next) const | |
44144 | { | |
44145 | return this->do_in(__state, __from, __from_end, __from_next, | |
44146 | __to, __to_end, __to_next); | |
44147 | } | |
44148 | ||
44149 | int | |
44150 | encoding() const throw() | |
44151 | { return this->do_encoding(); } | |
44152 | ||
44153 | bool | |
44154 | always_noconv() const throw() | |
44155 | { return this->do_always_noconv(); } | |
44156 | ||
44157 | int | |
44158 | length(state_type& __state, const extern_type* __from, | |
44159 | const extern_type* __end, size_t __max) const | |
44160 | { return this->do_length(__state, __from, __end, __max); } | |
44161 | ||
44162 | int | |
44163 | max_length() const throw() | |
44164 | { return this->do_max_length(); } | |
44165 | ||
44166 | protected: | |
44167 | explicit | |
44168 | __codecvt_abstract_base(size_t __refs = 0) : locale::facet(__refs) { } | |
44169 | ||
44170 | virtual | |
44171 | ~__codecvt_abstract_base() { } | |
44172 | # 238 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/codecvt.h" 3 | |
44173 | virtual result | |
44174 | do_out(state_type& __state, const intern_type* __from, | |
44175 | const intern_type* __from_end, const intern_type*& __from_next, | |
44176 | extern_type* __to, extern_type* __to_end, | |
44177 | extern_type*& __to_next) const = 0; | |
44178 | ||
44179 | virtual result | |
44180 | do_unshift(state_type& __state, extern_type* __to, | |
44181 | extern_type* __to_end, extern_type*& __to_next) const = 0; | |
44182 | ||
44183 | virtual result | |
44184 | do_in(state_type& __state, const extern_type* __from, | |
44185 | const extern_type* __from_end, const extern_type*& __from_next, | |
44186 | intern_type* __to, intern_type* __to_end, | |
44187 | intern_type*& __to_next) const = 0; | |
44188 | ||
44189 | virtual int | |
44190 | do_encoding() const throw() = 0; | |
44191 | ||
44192 | virtual bool | |
44193 | do_always_noconv() const throw() = 0; | |
44194 | ||
44195 | virtual int | |
44196 | do_length(state_type&, const extern_type* __from, | |
44197 | const extern_type* __end, size_t __max) const = 0; | |
44198 | ||
44199 | virtual int | |
44200 | do_max_length() const throw() = 0; | |
44201 | }; | |
44202 | ||
44203 | ||
44204 | ||
44205 | template<typename _InternT, typename _ExternT, typename _StateT> | |
44206 | class codecvt | |
44207 | : public __codecvt_abstract_base<_InternT, _ExternT, _StateT> | |
44208 | { | |
44209 | public: | |
44210 | ||
44211 | typedef codecvt_base::result result; | |
44212 | typedef _InternT intern_type; | |
44213 | typedef _ExternT extern_type; | |
44214 | typedef _StateT state_type; | |
44215 | ||
44216 | protected: | |
44217 | __c_locale _M_c_locale_codecvt; | |
44218 | ||
44219 | public: | |
44220 | static locale::id id; | |
44221 | ||
44222 | explicit | |
44223 | codecvt(size_t __refs = 0) | |
44224 | : __codecvt_abstract_base<_InternT, _ExternT, _StateT> (__refs) { } | |
44225 | ||
44226 | explicit | |
44227 | codecvt(__c_locale __cloc, size_t __refs = 0); | |
44228 | ||
44229 | protected: | |
44230 | virtual | |
44231 | ~codecvt() { } | |
44232 | ||
44233 | virtual result | |
44234 | do_out(state_type& __state, const intern_type* __from, | |
44235 | const intern_type* __from_end, const intern_type*& __from_next, | |
44236 | extern_type* __to, extern_type* __to_end, | |
44237 | extern_type*& __to_next) const; | |
44238 | ||
44239 | virtual result | |
44240 | do_unshift(state_type& __state, extern_type* __to, | |
44241 | extern_type* __to_end, extern_type*& __to_next) const; | |
44242 | ||
44243 | virtual result | |
44244 | do_in(state_type& __state, const extern_type* __from, | |
44245 | const extern_type* __from_end, const extern_type*& __from_next, | |
44246 | intern_type* __to, intern_type* __to_end, | |
44247 | intern_type*& __to_next) const; | |
44248 | ||
44249 | virtual int | |
44250 | do_encoding() const throw(); | |
44251 | ||
44252 | virtual bool | |
44253 | do_always_noconv() const throw(); | |
44254 | ||
44255 | virtual int | |
44256 | do_length(state_type&, const extern_type* __from, | |
44257 | const extern_type* __end, size_t __max) const; | |
44258 | ||
44259 | virtual int | |
44260 | do_max_length() const throw(); | |
44261 | }; | |
44262 | ||
44263 | template<typename _InternT, typename _ExternT, typename _StateT> | |
44264 | locale::id codecvt<_InternT, _ExternT, _StateT>::id; | |
44265 | ||
44266 | ||
44267 | template<> | |
44268 | class codecvt<char, char, mbstate_t> | |
44269 | : public __codecvt_abstract_base<char, char, mbstate_t> | |
44270 | { | |
44271 | public: | |
44272 | ||
44273 | typedef char intern_type; | |
44274 | typedef char extern_type; | |
44275 | typedef mbstate_t state_type; | |
44276 | ||
44277 | protected: | |
44278 | __c_locale _M_c_locale_codecvt; | |
44279 | ||
44280 | public: | |
44281 | static locale::id id; | |
44282 | ||
44283 | explicit | |
44284 | codecvt(size_t __refs = 0); | |
44285 | ||
44286 | explicit | |
44287 | codecvt(__c_locale __cloc, size_t __refs = 0); | |
44288 | ||
44289 | protected: | |
44290 | virtual | |
44291 | ~codecvt(); | |
44292 | ||
44293 | virtual result | |
44294 | do_out(state_type& __state, const intern_type* __from, | |
44295 | const intern_type* __from_end, const intern_type*& __from_next, | |
44296 | extern_type* __to, extern_type* __to_end, | |
44297 | extern_type*& __to_next) const; | |
44298 | ||
44299 | virtual result | |
44300 | do_unshift(state_type& __state, extern_type* __to, | |
44301 | extern_type* __to_end, extern_type*& __to_next) const; | |
44302 | ||
44303 | virtual result | |
44304 | do_in(state_type& __state, const extern_type* __from, | |
44305 | const extern_type* __from_end, const extern_type*& __from_next, | |
44306 | intern_type* __to, intern_type* __to_end, | |
44307 | intern_type*& __to_next) const; | |
44308 | ||
44309 | virtual int | |
44310 | do_encoding() const throw(); | |
44311 | ||
44312 | virtual bool | |
44313 | do_always_noconv() const throw(); | |
44314 | ||
44315 | virtual int | |
44316 | do_length(state_type&, const extern_type* __from, | |
44317 | const extern_type* __end, size_t __max) const; | |
44318 | ||
44319 | virtual int | |
44320 | do_max_length() const throw(); | |
44321 | }; | |
44322 | ||
44323 | ||
44324 | ||
44325 | template<> | |
44326 | class codecvt<wchar_t, char, mbstate_t> | |
44327 | : public __codecvt_abstract_base<wchar_t, char, mbstate_t> | |
44328 | { | |
44329 | public: | |
44330 | ||
44331 | typedef wchar_t intern_type; | |
44332 | typedef char extern_type; | |
44333 | typedef mbstate_t state_type; | |
44334 | ||
44335 | protected: | |
44336 | __c_locale _M_c_locale_codecvt; | |
44337 | ||
44338 | public: | |
44339 | static locale::id id; | |
44340 | ||
44341 | explicit | |
44342 | codecvt(size_t __refs = 0); | |
44343 | ||
44344 | explicit | |
44345 | codecvt(__c_locale __cloc, size_t __refs = 0); | |
44346 | ||
44347 | protected: | |
44348 | virtual | |
44349 | ~codecvt(); | |
44350 | ||
44351 | virtual result | |
44352 | do_out(state_type& __state, const intern_type* __from, | |
44353 | const intern_type* __from_end, const intern_type*& __from_next, | |
44354 | extern_type* __to, extern_type* __to_end, | |
44355 | extern_type*& __to_next) const; | |
44356 | ||
44357 | virtual result | |
44358 | do_unshift(state_type& __state, | |
44359 | extern_type* __to, extern_type* __to_end, | |
44360 | extern_type*& __to_next) const; | |
44361 | ||
44362 | virtual result | |
44363 | do_in(state_type& __state, | |
44364 | const extern_type* __from, const extern_type* __from_end, | |
44365 | const extern_type*& __from_next, | |
44366 | intern_type* __to, intern_type* __to_end, | |
44367 | intern_type*& __to_next) const; | |
44368 | ||
44369 | virtual | |
44370 | int do_encoding() const throw(); | |
44371 | ||
44372 | virtual | |
44373 | bool do_always_noconv() const throw(); | |
44374 | ||
44375 | virtual | |
44376 | int do_length(state_type&, const extern_type* __from, | |
44377 | const extern_type* __end, size_t __max) const; | |
44378 | ||
44379 | virtual int | |
44380 | do_max_length() const throw(); | |
44381 | }; | |
44382 | ||
44383 | ||
44384 | ||
44385 | template<typename _InternT, typename _ExternT, typename _StateT> | |
44386 | class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT> | |
44387 | { | |
44388 | public: | |
44389 | explicit | |
44390 | codecvt_byname(const char* __s, size_t __refs = 0) | |
44391 | : codecvt<_InternT, _ExternT, _StateT>(__refs) | |
44392 | { | |
44393 | if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) | |
44394 | { | |
44395 | this->_S_destroy_c_locale(this->_M_c_locale_codecvt); | |
44396 | this->_S_create_c_locale(this->_M_c_locale_codecvt, __s); | |
44397 | } | |
44398 | } | |
44399 | ||
44400 | protected: | |
44401 | virtual | |
44402 | ~codecvt_byname() { } | |
44403 | }; | |
44404 | # 1534 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 2 3 | |
44405 | ||
44406 | ||
44407 | class __num_base | |
44408 | { | |
44409 | public: | |
44410 | ||
44411 | ||
44412 | enum | |
44413 | { | |
44414 | _S_ominus, | |
44415 | _S_oplus, | |
44416 | _S_ox, | |
44417 | _S_oX, | |
44418 | _S_odigits, | |
44419 | _S_odigits_end = _S_odigits + 16, | |
44420 | _S_oudigits = _S_odigits_end, | |
44421 | _S_oudigits_end = _S_oudigits + 16, | |
44422 | _S_oe = _S_odigits + 14, | |
44423 | _S_oE = _S_oudigits + 14, | |
44424 | _S_oend = _S_oudigits_end | |
44425 | }; | |
44426 | ||
44427 | ||
44428 | ||
44429 | ||
44430 | ||
44431 | ||
44432 | static const char* _S_atoms_out; | |
44433 | ||
44434 | ||
44435 | ||
44436 | static const char* _S_atoms_in; | |
44437 | ||
44438 | enum | |
44439 | { | |
44440 | _S_iminus, | |
44441 | _S_iplus, | |
44442 | _S_ix, | |
44443 | _S_iX, | |
44444 | _S_izero, | |
44445 | _S_ie = _S_izero + 14, | |
44446 | _S_iE = _S_izero + 20, | |
44447 | _S_iend = 26 | |
44448 | }; | |
44449 | ||
44450 | ||
44451 | ||
44452 | static void | |
44453 | _S_format_float(const ios_base& __io, char* __fptr, char __mod); | |
44454 | }; | |
44455 | ||
44456 | template<typename _CharT> | |
44457 | struct __numpunct_cache : public locale::facet | |
44458 | { | |
44459 | const char* _M_grouping; | |
44460 | size_t _M_grouping_size; | |
44461 | bool _M_use_grouping; | |
44462 | const _CharT* _M_truename; | |
44463 | size_t _M_truename_size; | |
44464 | const _CharT* _M_falsename; | |
44465 | size_t _M_falsename_size; | |
44466 | _CharT _M_decimal_point; | |
44467 | _CharT _M_thousands_sep; | |
44468 | ||
44469 | ||
44470 | ||
44471 | ||
44472 | ||
44473 | _CharT _M_atoms_out[__num_base::_S_oend]; | |
44474 | ||
44475 | ||
44476 | ||
44477 | ||
44478 | ||
44479 | _CharT _M_atoms_in[__num_base::_S_iend]; | |
44480 | ||
44481 | bool _M_allocated; | |
44482 | ||
44483 | __numpunct_cache(size_t __refs = 0) : facet(__refs), | |
44484 | _M_grouping(__null), _M_grouping_size(0), _M_use_grouping(false), | |
44485 | _M_truename(__null), _M_truename_size(0), _M_falsename(__null), | |
44486 | _M_falsename_size(0), _M_decimal_point(_CharT()), | |
44487 | _M_thousands_sep(_CharT()), _M_allocated(false) | |
44488 | { } | |
44489 | ||
44490 | ~__numpunct_cache(); | |
44491 | ||
44492 | void | |
44493 | _M_cache(const locale& __loc); | |
44494 | ||
44495 | private: | |
44496 | __numpunct_cache& | |
44497 | operator=(const __numpunct_cache&); | |
44498 | ||
44499 | explicit | |
44500 | __numpunct_cache(const __numpunct_cache&); | |
44501 | }; | |
44502 | ||
44503 | template<typename _CharT> | |
44504 | __numpunct_cache<_CharT>::~__numpunct_cache() | |
44505 | { | |
44506 | if (_M_allocated) | |
44507 | { | |
44508 | delete [] _M_grouping; | |
44509 | delete [] _M_truename; | |
44510 | delete [] _M_falsename; | |
44511 | } | |
44512 | } | |
44513 | # 1656 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44514 | template<typename _CharT> | |
44515 | class numpunct : public locale::facet | |
44516 | { | |
44517 | public: | |
44518 | ||
44519 | ||
44520 | ||
44521 | typedef _CharT char_type; | |
44522 | typedef basic_string<_CharT> string_type; | |
44523 | ||
44524 | typedef __numpunct_cache<_CharT> __cache_type; | |
44525 | ||
44526 | protected: | |
44527 | __cache_type* _M_data; | |
44528 | ||
44529 | public: | |
44530 | ||
44531 | static locale::id id; | |
44532 | ||
44533 | ||
44534 | ||
44535 | ||
44536 | ||
44537 | ||
44538 | explicit | |
44539 | numpunct(size_t __refs = 0) : facet(__refs), _M_data(__null) | |
44540 | { _M_initialize_numpunct(); } | |
44541 | # 1693 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44542 | explicit | |
44543 | numpunct(__cache_type* __cache, size_t __refs = 0) | |
44544 | : facet(__refs), _M_data(__cache) | |
44545 | { _M_initialize_numpunct(); } | |
44546 | # 1707 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44547 | explicit | |
44548 | numpunct(__c_locale __cloc, size_t __refs = 0) | |
44549 | : facet(__refs), _M_data(__null) | |
44550 | { _M_initialize_numpunct(__cloc); } | |
44551 | # 1721 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44552 | char_type | |
44553 | decimal_point() const | |
44554 | { return this->do_decimal_point(); } | |
44555 | # 1734 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44556 | char_type | |
44557 | thousands_sep() const | |
44558 | { return this->do_thousands_sep(); } | |
44559 | # 1765 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44560 | string | |
44561 | grouping() const | |
44562 | { return this->do_grouping(); } | |
44563 | # 1778 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44564 | string_type | |
44565 | truename() const | |
44566 | { return this->do_truename(); } | |
44567 | # 1791 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44568 | string_type | |
44569 | falsename() const | |
44570 | { return this->do_falsename(); } | |
44571 | ||
44572 | protected: | |
44573 | ||
44574 | virtual | |
44575 | ~numpunct(); | |
44576 | # 1808 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44577 | virtual char_type | |
44578 | do_decimal_point() const | |
44579 | { return _M_data->_M_decimal_point; } | |
44580 | # 1820 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44581 | virtual char_type | |
44582 | do_thousands_sep() const | |
44583 | { return _M_data->_M_thousands_sep; } | |
44584 | # 1833 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44585 | virtual string | |
44586 | do_grouping() const | |
44587 | { return _M_data->_M_grouping; } | |
44588 | # 1846 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44589 | virtual string_type | |
44590 | do_truename() const | |
44591 | { return _M_data->_M_truename; } | |
44592 | # 1859 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44593 | virtual string_type | |
44594 | do_falsename() const | |
44595 | { return _M_data->_M_falsename; } | |
44596 | ||
44597 | ||
44598 | void | |
44599 | _M_initialize_numpunct(__c_locale __cloc = __null); | |
44600 | }; | |
44601 | ||
44602 | template<typename _CharT> | |
44603 | locale::id numpunct<_CharT>::id; | |
44604 | ||
44605 | template<> | |
44606 | numpunct<char>::~numpunct(); | |
44607 | ||
44608 | template<> | |
44609 | void | |
44610 | numpunct<char>::_M_initialize_numpunct(__c_locale __cloc); | |
44611 | ||
44612 | ||
44613 | template<> | |
44614 | numpunct<wchar_t>::~numpunct(); | |
44615 | ||
44616 | template<> | |
44617 | void | |
44618 | numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc); | |
44619 | ||
44620 | ||
44621 | ||
44622 | template<typename _CharT> | |
44623 | class numpunct_byname : public numpunct<_CharT> | |
44624 | { | |
44625 | public: | |
44626 | typedef _CharT char_type; | |
44627 | typedef basic_string<_CharT> string_type; | |
44628 | ||
44629 | explicit | |
44630 | numpunct_byname(const char* __s, size_t __refs = 0) | |
44631 | : numpunct<_CharT>(__refs) | |
44632 | { | |
44633 | if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) | |
44634 | { | |
44635 | __c_locale __tmp; | |
44636 | this->_S_create_c_locale(__tmp, __s); | |
44637 | this->_M_initialize_numpunct(__tmp); | |
44638 | this->_S_destroy_c_locale(__tmp); | |
44639 | } | |
44640 | } | |
44641 | ||
44642 | protected: | |
44643 | virtual | |
44644 | ~numpunct_byname() { } | |
44645 | }; | |
44646 | # 1925 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44647 | template<typename _CharT, typename _InIter> | |
44648 | class num_get : public locale::facet | |
44649 | { | |
44650 | public: | |
44651 | ||
44652 | ||
44653 | ||
44654 | typedef _CharT char_type; | |
44655 | typedef _InIter iter_type; | |
44656 | ||
44657 | ||
44658 | ||
44659 | static locale::id id; | |
44660 | # 1946 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44661 | explicit | |
44662 | num_get(size_t __refs = 0) : facet(__refs) { } | |
44663 | # 1972 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44664 | iter_type | |
44665 | get(iter_type __in, iter_type __end, ios_base& __io, | |
44666 | ios_base::iostate& __err, bool& __v) const | |
44667 | { return this->do_get(__in, __end, __io, __err, __v); } | |
44668 | # 2008 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44669 | iter_type | |
44670 | get(iter_type __in, iter_type __end, ios_base& __io, | |
44671 | ios_base::iostate& __err, long& __v) const | |
44672 | { return this->do_get(__in, __end, __io, __err, __v); } | |
44673 | ||
44674 | iter_type | |
44675 | get(iter_type __in, iter_type __end, ios_base& __io, | |
44676 | ios_base::iostate& __err, unsigned short& __v) const | |
44677 | { return this->do_get(__in, __end, __io, __err, __v); } | |
44678 | ||
44679 | iter_type | |
44680 | get(iter_type __in, iter_type __end, ios_base& __io, | |
44681 | ios_base::iostate& __err, unsigned int& __v) const | |
44682 | { return this->do_get(__in, __end, __io, __err, __v); } | |
44683 | ||
44684 | iter_type | |
44685 | get(iter_type __in, iter_type __end, ios_base& __io, | |
44686 | ios_base::iostate& __err, unsigned long& __v) const | |
44687 | { return this->do_get(__in, __end, __io, __err, __v); } | |
44688 | ||
44689 | ||
44690 | iter_type | |
44691 | get(iter_type __in, iter_type __end, ios_base& __io, | |
44692 | ios_base::iostate& __err, long long& __v) const | |
44693 | { return this->do_get(__in, __end, __io, __err, __v); } | |
44694 | ||
44695 | iter_type | |
44696 | get(iter_type __in, iter_type __end, ios_base& __io, | |
44697 | ios_base::iostate& __err, unsigned long long& __v) const | |
44698 | { return this->do_get(__in, __end, __io, __err, __v); } | |
44699 | # 2067 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44700 | iter_type | |
44701 | get(iter_type __in, iter_type __end, ios_base& __io, | |
44702 | ios_base::iostate& __err, float& __v) const | |
44703 | { return this->do_get(__in, __end, __io, __err, __v); } | |
44704 | ||
44705 | iter_type | |
44706 | get(iter_type __in, iter_type __end, ios_base& __io, | |
44707 | ios_base::iostate& __err, double& __v) const | |
44708 | { return this->do_get(__in, __end, __io, __err, __v); } | |
44709 | ||
44710 | iter_type | |
44711 | get(iter_type __in, iter_type __end, ios_base& __io, | |
44712 | ios_base::iostate& __err, long double& __v) const | |
44713 | { return this->do_get(__in, __end, __io, __err, __v); } | |
44714 | # 2109 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44715 | iter_type | |
44716 | get(iter_type __in, iter_type __end, ios_base& __io, | |
44717 | ios_base::iostate& __err, void*& __v) const | |
44718 | { return this->do_get(__in, __end, __io, __err, __v); } | |
44719 | ||
44720 | protected: | |
44721 | ||
44722 | virtual ~num_get() { } | |
44723 | ||
44724 | iter_type | |
44725 | _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&, | |
44726 | string& __xtrc) const; | |
44727 | ||
44728 | template<typename _ValueT> | |
44729 | iter_type | |
44730 | _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&, | |
44731 | _ValueT& __v) const; | |
44732 | # 2142 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44733 | virtual iter_type | |
44734 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const; | |
44735 | ||
44736 | ||
44737 | virtual iter_type | |
44738 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, long&) const; | |
44739 | ||
44740 | virtual iter_type | |
44741 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
44742 | unsigned short&) const; | |
44743 | ||
44744 | virtual iter_type | |
44745 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
44746 | unsigned int&) const; | |
44747 | ||
44748 | virtual iter_type | |
44749 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
44750 | unsigned long&) const; | |
44751 | ||
44752 | ||
44753 | virtual iter_type | |
44754 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
44755 | long long&) const; | |
44756 | ||
44757 | virtual iter_type | |
44758 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
44759 | unsigned long long&) const; | |
44760 | ||
44761 | ||
44762 | virtual iter_type | |
44763 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
44764 | float&) const; | |
44765 | ||
44766 | virtual iter_type | |
44767 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
44768 | double&) const; | |
44769 | ||
44770 | virtual iter_type | |
44771 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
44772 | long double&) const; | |
44773 | ||
44774 | virtual iter_type | |
44775 | do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, | |
44776 | void*&) const; | |
44777 | ||
44778 | }; | |
44779 | ||
44780 | template<typename _CharT, typename _InIter> | |
44781 | locale::id num_get<_CharT, _InIter>::id; | |
44782 | # 2204 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44783 | template<typename _CharT, typename _OutIter> | |
44784 | class num_put : public locale::facet | |
44785 | { | |
44786 | public: | |
44787 | ||
44788 | ||
44789 | ||
44790 | typedef _CharT char_type; | |
44791 | typedef _OutIter iter_type; | |
44792 | ||
44793 | ||
44794 | ||
44795 | static locale::id id; | |
44796 | # 2225 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44797 | explicit | |
44798 | num_put(size_t __refs = 0) : facet(__refs) { } | |
44799 | # 2243 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44800 | iter_type | |
44801 | put(iter_type __s, ios_base& __f, char_type __fill, bool __v) const | |
44802 | { return this->do_put(__s, __f, __fill, __v); } | |
44803 | # 2285 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44804 | iter_type | |
44805 | put(iter_type __s, ios_base& __f, char_type __fill, long __v) const | |
44806 | { return this->do_put(__s, __f, __fill, __v); } | |
44807 | ||
44808 | iter_type | |
44809 | put(iter_type __s, ios_base& __f, char_type __fill, | |
44810 | unsigned long __v) const | |
44811 | { return this->do_put(__s, __f, __fill, __v); } | |
44812 | ||
44813 | ||
44814 | iter_type | |
44815 | put(iter_type __s, ios_base& __f, char_type __fill, long long __v) const | |
44816 | { return this->do_put(__s, __f, __fill, __v); } | |
44817 | ||
44818 | iter_type | |
44819 | put(iter_type __s, ios_base& __f, char_type __fill, | |
44820 | unsigned long long __v) const | |
44821 | { return this->do_put(__s, __f, __fill, __v); } | |
44822 | # 2348 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44823 | iter_type | |
44824 | put(iter_type __s, ios_base& __f, char_type __fill, double __v) const | |
44825 | { return this->do_put(__s, __f, __fill, __v); } | |
44826 | ||
44827 | iter_type | |
44828 | put(iter_type __s, ios_base& __f, char_type __fill, | |
44829 | long double __v) const | |
44830 | { return this->do_put(__s, __f, __fill, __v); } | |
44831 | # 2373 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44832 | iter_type | |
44833 | put(iter_type __s, ios_base& __f, char_type __fill, | |
44834 | const void* __v) const | |
44835 | { return this->do_put(__s, __f, __fill, __v); } | |
44836 | ||
44837 | protected: | |
44838 | template<typename _ValueT> | |
44839 | iter_type | |
44840 | _M_insert_float(iter_type, ios_base& __io, char_type __fill, | |
44841 | char __mod, _ValueT __v) const; | |
44842 | ||
44843 | void | |
44844 | _M_group_float(const char* __grouping, size_t __grouping_size, | |
44845 | char_type __sep, const char_type* __p, char_type* __new, | |
44846 | char_type* __cs, int& __len) const; | |
44847 | ||
44848 | template<typename _ValueT> | |
44849 | iter_type | |
44850 | _M_insert_int(iter_type, ios_base& __io, char_type __fill, | |
44851 | _ValueT __v) const; | |
44852 | ||
44853 | void | |
44854 | _M_group_int(const char* __grouping, size_t __grouping_size, | |
44855 | char_type __sep, ios_base& __io, char_type* __new, | |
44856 | char_type* __cs, int& __len) const; | |
44857 | ||
44858 | void | |
44859 | _M_pad(char_type __fill, streamsize __w, ios_base& __io, | |
44860 | char_type* __new, const char_type* __cs, int& __len) const; | |
44861 | ||
44862 | ||
44863 | virtual | |
44864 | ~num_put() { }; | |
44865 | # 2421 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44866 | virtual iter_type | |
44867 | do_put(iter_type, ios_base&, char_type __fill, bool __v) const; | |
44868 | ||
44869 | virtual iter_type | |
44870 | do_put(iter_type, ios_base&, char_type __fill, long __v) const; | |
44871 | ||
44872 | virtual iter_type | |
44873 | do_put(iter_type, ios_base&, char_type __fill, unsigned long) const; | |
44874 | ||
44875 | ||
44876 | virtual iter_type | |
44877 | do_put(iter_type, ios_base&, char_type __fill, long long __v) const; | |
44878 | ||
44879 | virtual iter_type | |
44880 | do_put(iter_type, ios_base&, char_type __fill, unsigned long long) const; | |
44881 | ||
44882 | ||
44883 | virtual iter_type | |
44884 | do_put(iter_type, ios_base&, char_type __fill, double __v) const; | |
44885 | ||
44886 | virtual iter_type | |
44887 | do_put(iter_type, ios_base&, char_type __fill, long double __v) const; | |
44888 | ||
44889 | virtual iter_type | |
44890 | do_put(iter_type, ios_base&, char_type __fill, const void* __v) const; | |
44891 | ||
44892 | }; | |
44893 | ||
44894 | template <typename _CharT, typename _OutIter> | |
44895 | locale::id num_put<_CharT, _OutIter>::id; | |
44896 | # 2465 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44897 | template<typename _CharT> | |
44898 | class collate : public locale::facet | |
44899 | { | |
44900 | public: | |
44901 | ||
44902 | ||
44903 | ||
44904 | typedef _CharT char_type; | |
44905 | typedef basic_string<_CharT> string_type; | |
44906 | ||
44907 | ||
44908 | protected: | |
44909 | ||
44910 | ||
44911 | __c_locale _M_c_locale_collate; | |
44912 | ||
44913 | public: | |
44914 | ||
44915 | static locale::id id; | |
44916 | # 2492 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44917 | explicit | |
44918 | collate(size_t __refs = 0) | |
44919 | : facet(__refs), _M_c_locale_collate(_S_get_c_locale()) | |
44920 | { } | |
44921 | # 2506 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44922 | explicit | |
44923 | collate(__c_locale __cloc, size_t __refs = 0) | |
44924 | : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc)) | |
44925 | { } | |
44926 | # 2523 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44927 | int | |
44928 | compare(const _CharT* __lo1, const _CharT* __hi1, | |
44929 | const _CharT* __lo2, const _CharT* __hi2) const | |
44930 | { return this->do_compare(__lo1, __hi1, __lo2, __hi2); } | |
44931 | # 2542 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44932 | string_type | |
44933 | transform(const _CharT* __lo, const _CharT* __hi) const | |
44934 | { return this->do_transform(__lo, __hi); } | |
44935 | # 2556 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44936 | long | |
44937 | hash(const _CharT* __lo, const _CharT* __hi) const | |
44938 | { return this->do_hash(__lo, __hi); } | |
44939 | ||
44940 | ||
44941 | int | |
44942 | _M_compare(const _CharT*, const _CharT*) const; | |
44943 | ||
44944 | size_t | |
44945 | _M_transform(_CharT*, const _CharT*, size_t) const; | |
44946 | ||
44947 | protected: | |
44948 | ||
44949 | virtual | |
44950 | ~collate() | |
44951 | { _S_destroy_c_locale(_M_c_locale_collate); } | |
44952 | # 2585 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44953 | virtual int | |
44954 | do_compare(const _CharT* __lo1, const _CharT* __hi1, | |
44955 | const _CharT* __lo2, const _CharT* __hi2) const; | |
44956 | # 2601 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44957 | virtual string_type | |
44958 | do_transform(const _CharT* __lo, const _CharT* __hi) const; | |
44959 | # 2614 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
44960 | virtual long | |
44961 | do_hash(const _CharT* __lo, const _CharT* __hi) const; | |
44962 | }; | |
44963 | ||
44964 | template<typename _CharT> | |
44965 | locale::id collate<_CharT>::id; | |
44966 | ||
44967 | ||
44968 | template<> | |
44969 | int | |
44970 | collate<char>::_M_compare(const char*, const char*) const; | |
44971 | ||
44972 | template<> | |
44973 | size_t | |
44974 | collate<char>::_M_transform(char*, const char*, size_t) const; | |
44975 | ||
44976 | ||
44977 | template<> | |
44978 | int | |
44979 | collate<wchar_t>::_M_compare(const wchar_t*, const wchar_t*) const; | |
44980 | ||
44981 | template<> | |
44982 | size_t | |
44983 | collate<wchar_t>::_M_transform(wchar_t*, const wchar_t*, size_t) const; | |
44984 | ||
44985 | ||
44986 | ||
44987 | template<typename _CharT> | |
44988 | class collate_byname : public collate<_CharT> | |
44989 | { | |
44990 | public: | |
44991 | ||
44992 | ||
44993 | typedef _CharT char_type; | |
44994 | typedef basic_string<_CharT> string_type; | |
44995 | ||
44996 | ||
44997 | explicit | |
44998 | collate_byname(const char* __s, size_t __refs = 0) | |
44999 | : collate<_CharT>(__refs) | |
45000 | { | |
45001 | if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) | |
45002 | { | |
45003 | this->_S_destroy_c_locale(this->_M_c_locale_collate); | |
45004 | this->_S_create_c_locale(this->_M_c_locale_collate, __s); | |
45005 | } | |
45006 | } | |
45007 | ||
45008 | protected: | |
45009 | virtual | |
45010 | ~collate_byname() { } | |
45011 | }; | |
45012 | # 2674 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45013 | class time_base | |
45014 | { | |
45015 | public: | |
45016 | enum dateorder { no_order, dmy, mdy, ymd, ydm }; | |
45017 | }; | |
45018 | ||
45019 | template<typename _CharT> | |
45020 | struct __timepunct_cache : public locale::facet | |
45021 | { | |
45022 | ||
45023 | static const _CharT* _S_timezones[14]; | |
45024 | ||
45025 | const _CharT* _M_date_format; | |
45026 | const _CharT* _M_date_era_format; | |
45027 | const _CharT* _M_time_format; | |
45028 | const _CharT* _M_time_era_format; | |
45029 | const _CharT* _M_date_time_format; | |
45030 | const _CharT* _M_date_time_era_format; | |
45031 | const _CharT* _M_am; | |
45032 | const _CharT* _M_pm; | |
45033 | const _CharT* _M_am_pm_format; | |
45034 | ||
45035 | ||
45036 | const _CharT* _M_day1; | |
45037 | const _CharT* _M_day2; | |
45038 | const _CharT* _M_day3; | |
45039 | const _CharT* _M_day4; | |
45040 | const _CharT* _M_day5; | |
45041 | const _CharT* _M_day6; | |
45042 | const _CharT* _M_day7; | |
45043 | ||
45044 | ||
45045 | const _CharT* _M_aday1; | |
45046 | const _CharT* _M_aday2; | |
45047 | const _CharT* _M_aday3; | |
45048 | const _CharT* _M_aday4; | |
45049 | const _CharT* _M_aday5; | |
45050 | const _CharT* _M_aday6; | |
45051 | const _CharT* _M_aday7; | |
45052 | ||
45053 | ||
45054 | const _CharT* _M_month01; | |
45055 | const _CharT* _M_month02; | |
45056 | const _CharT* _M_month03; | |
45057 | const _CharT* _M_month04; | |
45058 | const _CharT* _M_month05; | |
45059 | const _CharT* _M_month06; | |
45060 | const _CharT* _M_month07; | |
45061 | const _CharT* _M_month08; | |
45062 | const _CharT* _M_month09; | |
45063 | const _CharT* _M_month10; | |
45064 | const _CharT* _M_month11; | |
45065 | const _CharT* _M_month12; | |
45066 | ||
45067 | ||
45068 | const _CharT* _M_amonth01; | |
45069 | const _CharT* _M_amonth02; | |
45070 | const _CharT* _M_amonth03; | |
45071 | const _CharT* _M_amonth04; | |
45072 | const _CharT* _M_amonth05; | |
45073 | const _CharT* _M_amonth06; | |
45074 | const _CharT* _M_amonth07; | |
45075 | const _CharT* _M_amonth08; | |
45076 | const _CharT* _M_amonth09; | |
45077 | const _CharT* _M_amonth10; | |
45078 | const _CharT* _M_amonth11; | |
45079 | const _CharT* _M_amonth12; | |
45080 | ||
45081 | bool _M_allocated; | |
45082 | ||
45083 | __timepunct_cache(size_t __refs = 0) : facet(__refs), | |
45084 | _M_date_format(__null), _M_date_era_format(__null), _M_time_format(__null), | |
45085 | _M_time_era_format(__null), _M_date_time_format(__null), | |
45086 | _M_date_time_era_format(__null), _M_am(__null), _M_pm(__null), | |
45087 | _M_am_pm_format(__null), _M_day1(__null), _M_day2(__null), _M_day3(__null), | |
45088 | _M_day4(__null), _M_day5(__null), _M_day6(__null), _M_day7(__null), | |
45089 | _M_aday1(__null), _M_aday2(__null), _M_aday3(__null), _M_aday4(__null), | |
45090 | _M_aday5(__null), _M_aday6(__null), _M_aday7(__null), _M_month01(__null), | |
45091 | _M_month02(__null), _M_month03(__null), _M_month04(__null), _M_month05(__null), | |
45092 | _M_month06(__null), _M_month07(__null), _M_month08(__null), _M_month09(__null), | |
45093 | _M_month10(__null), _M_month11(__null), _M_month12(__null), _M_amonth01(__null), | |
45094 | _M_amonth02(__null), _M_amonth03(__null), _M_amonth04(__null), | |
45095 | _M_amonth05(__null), _M_amonth06(__null), _M_amonth07(__null), | |
45096 | _M_amonth08(__null), _M_amonth09(__null), _M_amonth10(__null), | |
45097 | _M_amonth11(__null), _M_amonth12(__null), _M_allocated(false) | |
45098 | { } | |
45099 | ||
45100 | ~__timepunct_cache(); | |
45101 | ||
45102 | void | |
45103 | _M_cache(const locale& __loc); | |
45104 | ||
45105 | private: | |
45106 | __timepunct_cache& | |
45107 | operator=(const __timepunct_cache&); | |
45108 | ||
45109 | explicit | |
45110 | __timepunct_cache(const __timepunct_cache&); | |
45111 | }; | |
45112 | ||
45113 | template<typename _CharT> | |
45114 | __timepunct_cache<_CharT>::~__timepunct_cache() | |
45115 | { | |
45116 | if (_M_allocated) | |
45117 | { | |
45118 | ||
45119 | } | |
45120 | } | |
45121 | ||
45122 | ||
45123 | template<> | |
45124 | const char* | |
45125 | __timepunct_cache<char>::_S_timezones[14]; | |
45126 | ||
45127 | ||
45128 | template<> | |
45129 | const wchar_t* | |
45130 | __timepunct_cache<wchar_t>::_S_timezones[14]; | |
45131 | ||
45132 | ||
45133 | ||
45134 | template<typename _CharT> | |
45135 | const _CharT* __timepunct_cache<_CharT>::_S_timezones[14]; | |
45136 | ||
45137 | template<typename _CharT> | |
45138 | class __timepunct : public locale::facet | |
45139 | { | |
45140 | public: | |
45141 | ||
45142 | typedef _CharT __char_type; | |
45143 | typedef basic_string<_CharT> __string_type; | |
45144 | typedef __timepunct_cache<_CharT> __cache_type; | |
45145 | ||
45146 | protected: | |
45147 | __cache_type* _M_data; | |
45148 | __c_locale _M_c_locale_timepunct; | |
45149 | const char* _M_name_timepunct; | |
45150 | ||
45151 | public: | |
45152 | ||
45153 | static locale::id id; | |
45154 | ||
45155 | explicit | |
45156 | __timepunct(size_t __refs = 0); | |
45157 | ||
45158 | explicit | |
45159 | __timepunct(__cache_type* __cache, size_t __refs = 0); | |
45160 | # 2832 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45161 | explicit | |
45162 | __timepunct(__c_locale __cloc, const char* __s, size_t __refs = 0); | |
45163 | ||
45164 | ||
45165 | ||
45166 | void | |
45167 | _M_put(_CharT* __s, size_t __maxlen, const _CharT* __format, | |
45168 | const tm* __tm) const; | |
45169 | ||
45170 | void | |
45171 | _M_date_formats(const _CharT** __date) const | |
45172 | { | |
45173 | ||
45174 | __date[0] = _M_data->_M_date_format; | |
45175 | __date[1] = _M_data->_M_date_era_format; | |
45176 | } | |
45177 | ||
45178 | void | |
45179 | _M_time_formats(const _CharT** __time) const | |
45180 | { | |
45181 | ||
45182 | __time[0] = _M_data->_M_time_format; | |
45183 | __time[1] = _M_data->_M_time_era_format; | |
45184 | } | |
45185 | ||
45186 | void | |
45187 | _M_date_time_formats(const _CharT** __dt) const | |
45188 | { | |
45189 | ||
45190 | __dt[0] = _M_data->_M_date_time_format; | |
45191 | __dt[1] = _M_data->_M_date_time_era_format; | |
45192 | } | |
45193 | ||
45194 | void | |
45195 | _M_am_pm_format(const _CharT* __ampm) const | |
45196 | { __ampm = _M_data->_M_am_pm_format; } | |
45197 | ||
45198 | void | |
45199 | _M_am_pm(const _CharT** __ampm) const | |
45200 | { | |
45201 | __ampm[0] = _M_data->_M_am; | |
45202 | __ampm[1] = _M_data->_M_pm; | |
45203 | } | |
45204 | ||
45205 | void | |
45206 | _M_days(const _CharT** __days) const | |
45207 | { | |
45208 | __days[0] = _M_data->_M_day1; | |
45209 | __days[1] = _M_data->_M_day2; | |
45210 | __days[2] = _M_data->_M_day3; | |
45211 | __days[3] = _M_data->_M_day4; | |
45212 | __days[4] = _M_data->_M_day5; | |
45213 | __days[5] = _M_data->_M_day6; | |
45214 | __days[6] = _M_data->_M_day7; | |
45215 | } | |
45216 | ||
45217 | void | |
45218 | _M_days_abbreviated(const _CharT** __days) const | |
45219 | { | |
45220 | __days[0] = _M_data->_M_aday1; | |
45221 | __days[1] = _M_data->_M_aday2; | |
45222 | __days[2] = _M_data->_M_aday3; | |
45223 | __days[3] = _M_data->_M_aday4; | |
45224 | __days[4] = _M_data->_M_aday5; | |
45225 | __days[5] = _M_data->_M_aday6; | |
45226 | __days[6] = _M_data->_M_aday7; | |
45227 | } | |
45228 | ||
45229 | void | |
45230 | _M_months(const _CharT** __months) const | |
45231 | { | |
45232 | __months[0] = _M_data->_M_month01; | |
45233 | __months[1] = _M_data->_M_month02; | |
45234 | __months[2] = _M_data->_M_month03; | |
45235 | __months[3] = _M_data->_M_month04; | |
45236 | __months[4] = _M_data->_M_month05; | |
45237 | __months[5] = _M_data->_M_month06; | |
45238 | __months[6] = _M_data->_M_month07; | |
45239 | __months[7] = _M_data->_M_month08; | |
45240 | __months[8] = _M_data->_M_month09; | |
45241 | __months[9] = _M_data->_M_month10; | |
45242 | __months[10] = _M_data->_M_month11; | |
45243 | __months[11] = _M_data->_M_month12; | |
45244 | } | |
45245 | ||
45246 | void | |
45247 | _M_months_abbreviated(const _CharT** __months) const | |
45248 | { | |
45249 | __months[0] = _M_data->_M_amonth01; | |
45250 | __months[1] = _M_data->_M_amonth02; | |
45251 | __months[2] = _M_data->_M_amonth03; | |
45252 | __months[3] = _M_data->_M_amonth04; | |
45253 | __months[4] = _M_data->_M_amonth05; | |
45254 | __months[5] = _M_data->_M_amonth06; | |
45255 | __months[6] = _M_data->_M_amonth07; | |
45256 | __months[7] = _M_data->_M_amonth08; | |
45257 | __months[8] = _M_data->_M_amonth09; | |
45258 | __months[9] = _M_data->_M_amonth10; | |
45259 | __months[10] = _M_data->_M_amonth11; | |
45260 | __months[11] = _M_data->_M_amonth12; | |
45261 | } | |
45262 | ||
45263 | protected: | |
45264 | virtual | |
45265 | ~__timepunct(); | |
45266 | ||
45267 | ||
45268 | void | |
45269 | _M_initialize_timepunct(__c_locale __cloc = __null); | |
45270 | }; | |
45271 | ||
45272 | template<typename _CharT> | |
45273 | locale::id __timepunct<_CharT>::id; | |
45274 | ||
45275 | ||
45276 | template<> | |
45277 | void | |
45278 | __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc); | |
45279 | ||
45280 | template<> | |
45281 | void | |
45282 | __timepunct<char>::_M_put(char*, size_t, const char*, const tm*) const; | |
45283 | ||
45284 | ||
45285 | template<> | |
45286 | void | |
45287 | __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc); | |
45288 | ||
45289 | template<> | |
45290 | void | |
45291 | __timepunct<wchar_t>::_M_put(wchar_t*, size_t, const wchar_t*, | |
45292 | const tm*) const; | |
45293 | ||
45294 | ||
45295 | ||
45296 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/time_members.h" 1 3 | |
45297 | # 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/time_members.h" 3 | |
45298 | template<typename _CharT> | |
45299 | __timepunct<_CharT>::__timepunct(size_t __refs) | |
45300 | : facet(__refs), _M_data(__null), _M_c_locale_timepunct(__null), | |
45301 | _M_name_timepunct(_S_get_c_name()) | |
45302 | { _M_initialize_timepunct(); } | |
45303 | ||
45304 | template<typename _CharT> | |
45305 | __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) | |
45306 | : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(__null), | |
45307 | _M_name_timepunct(_S_get_c_name()) | |
45308 | { _M_initialize_timepunct(); } | |
45309 | ||
45310 | template<typename _CharT> | |
45311 | __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, | |
45312 | size_t __refs) | |
45313 | : facet(__refs), _M_data(__null), _M_c_locale_timepunct(__null), | |
45314 | _M_name_timepunct(__null) | |
45315 | { | |
45316 | const size_t __len = std::strlen(__s) + 1; | |
45317 | char* __tmp = new char[__len]; | |
45318 | std::memcpy(__tmp, __s, __len); | |
45319 | _M_name_timepunct = __tmp; | |
45320 | ||
45321 | try | |
45322 | { _M_initialize_timepunct(__cloc); } | |
45323 | catch(...) | |
45324 | { | |
45325 | delete [] _M_name_timepunct; | |
45326 | throw; | |
45327 | } | |
45328 | } | |
45329 | ||
45330 | template<typename _CharT> | |
45331 | __timepunct<_CharT>::~__timepunct() | |
45332 | { | |
45333 | if (_M_name_timepunct != _S_get_c_name()) | |
45334 | delete [] _M_name_timepunct; | |
45335 | delete _M_data; | |
45336 | _S_destroy_c_locale(_M_c_locale_timepunct); | |
45337 | } | |
45338 | # 2968 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 2 3 | |
45339 | # 2981 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45340 | template<typename _CharT, typename _InIter> | |
45341 | class time_get : public locale::facet, public time_base | |
45342 | { | |
45343 | public: | |
45344 | ||
45345 | ||
45346 | ||
45347 | typedef _CharT char_type; | |
45348 | typedef _InIter iter_type; | |
45349 | ||
45350 | typedef basic_string<_CharT> __string_type; | |
45351 | ||
45352 | ||
45353 | static locale::id id; | |
45354 | # 3003 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45355 | explicit | |
45356 | time_get(size_t __refs = 0) | |
45357 | : facet (__refs) { } | |
45358 | # 3020 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45359 | dateorder | |
45360 | date_order() const | |
45361 | { return this->do_date_order(); } | |
45362 | # 3044 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45363 | iter_type | |
45364 | get_time(iter_type __beg, iter_type __end, ios_base& __io, | |
45365 | ios_base::iostate& __err, tm* __tm) const | |
45366 | { return this->do_get_time(__beg, __end, __io, __err, __tm); } | |
45367 | # 3069 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45368 | iter_type | |
45369 | get_date(iter_type __beg, iter_type __end, ios_base& __io, | |
45370 | ios_base::iostate& __err, tm* __tm) const | |
45371 | { return this->do_get_date(__beg, __end, __io, __err, __tm); } | |
45372 | # 3097 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45373 | iter_type | |
45374 | get_weekday(iter_type __beg, iter_type __end, ios_base& __io, | |
45375 | ios_base::iostate& __err, tm* __tm) const | |
45376 | { return this->do_get_weekday(__beg, __end, __io, __err, __tm); } | |
45377 | # 3126 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45378 | iter_type | |
45379 | get_monthname(iter_type __beg, iter_type __end, ios_base& __io, | |
45380 | ios_base::iostate& __err, tm* __tm) const | |
45381 | { return this->do_get_monthname(__beg, __end, __io, __err, __tm); } | |
45382 | # 3152 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45383 | iter_type | |
45384 | get_year(iter_type __beg, iter_type __end, ios_base& __io, | |
45385 | ios_base::iostate& __err, tm* __tm) const | |
45386 | { return this->do_get_year(__beg, __end, __io, __err, __tm); } | |
45387 | ||
45388 | protected: | |
45389 | ||
45390 | virtual | |
45391 | ~time_get() { } | |
45392 | # 3172 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45393 | virtual dateorder | |
45394 | do_date_order() const; | |
45395 | # 3190 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45396 | virtual iter_type | |
45397 | do_get_time(iter_type __beg, iter_type __end, ios_base& __io, | |
45398 | ios_base::iostate& __err, tm* __tm) const; | |
45399 | # 3209 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45400 | virtual iter_type | |
45401 | do_get_date(iter_type __beg, iter_type __end, ios_base& __io, | |
45402 | ios_base::iostate& __err, tm* __tm) const; | |
45403 | # 3228 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45404 | virtual iter_type | |
45405 | do_get_weekday(iter_type __beg, iter_type __end, ios_base&, | |
45406 | ios_base::iostate& __err, tm* __tm) const; | |
45407 | # 3247 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45408 | virtual iter_type | |
45409 | do_get_monthname(iter_type __beg, iter_type __end, ios_base&, | |
45410 | ios_base::iostate& __err, tm* __tm) const; | |
45411 | # 3266 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45412 | virtual iter_type | |
45413 | do_get_year(iter_type __beg, iter_type __end, ios_base& __io, | |
45414 | ios_base::iostate& __err, tm* __tm) const; | |
45415 | ||
45416 | ||
45417 | iter_type | |
45418 | _M_extract_num(iter_type __beg, iter_type __end, int& __member, | |
45419 | int __min, int __max, size_t __len, | |
45420 | ios_base& __io, ios_base::iostate& __err) const; | |
45421 | ||
45422 | ||
45423 | ||
45424 | iter_type | |
45425 | _M_extract_name(iter_type __beg, iter_type __end, int& __member, | |
45426 | const _CharT** __names, size_t __indexlen, | |
45427 | ios_base& __io, ios_base::iostate& __err) const; | |
45428 | ||
45429 | ||
45430 | iter_type | |
45431 | _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io, | |
45432 | ios_base::iostate& __err, tm* __tm, | |
45433 | const _CharT* __format) const; | |
45434 | }; | |
45435 | ||
45436 | template<typename _CharT, typename _InIter> | |
45437 | locale::id time_get<_CharT, _InIter>::id; | |
45438 | ||
45439 | ||
45440 | template<typename _CharT, typename _InIter> | |
45441 | class time_get_byname : public time_get<_CharT, _InIter> | |
45442 | { | |
45443 | public: | |
45444 | ||
45445 | typedef _CharT char_type; | |
45446 | typedef _InIter iter_type; | |
45447 | ||
45448 | explicit | |
45449 | time_get_byname(const char*, size_t __refs = 0) | |
45450 | : time_get<_CharT, _InIter>(__refs) { } | |
45451 | ||
45452 | protected: | |
45453 | virtual | |
45454 | ~time_get_byname() { } | |
45455 | }; | |
45456 | # 3322 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45457 | template<typename _CharT, typename _OutIter> | |
45458 | class time_put : public locale::facet | |
45459 | { | |
45460 | public: | |
45461 | ||
45462 | ||
45463 | ||
45464 | typedef _CharT char_type; | |
45465 | typedef _OutIter iter_type; | |
45466 | ||
45467 | ||
45468 | ||
45469 | static locale::id id; | |
45470 | # 3343 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45471 | explicit | |
45472 | time_put(size_t __refs = 0) | |
45473 | : facet(__refs) { } | |
45474 | # 3362 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45475 | iter_type | |
45476 | put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, | |
45477 | const _CharT* __beg, const _CharT* __end) const; | |
45478 | # 3382 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45479 | iter_type | |
45480 | put(iter_type __s, ios_base& __io, char_type __fill, | |
45481 | const tm* __tm, char __format, char __mod = 0) const | |
45482 | { return this->do_put(__s, __io, __fill, __tm, __format, __mod); } | |
45483 | ||
45484 | protected: | |
45485 | ||
45486 | virtual | |
45487 | ~time_put() | |
45488 | { } | |
45489 | # 3409 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45490 | virtual iter_type | |
45491 | do_put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, | |
45492 | char __format, char __mod) const; | |
45493 | }; | |
45494 | ||
45495 | template<typename _CharT, typename _OutIter> | |
45496 | locale::id time_put<_CharT, _OutIter>::id; | |
45497 | ||
45498 | ||
45499 | template<typename _CharT, typename _OutIter> | |
45500 | class time_put_byname : public time_put<_CharT, _OutIter> | |
45501 | { | |
45502 | public: | |
45503 | ||
45504 | typedef _CharT char_type; | |
45505 | typedef _OutIter iter_type; | |
45506 | ||
45507 | explicit | |
45508 | time_put_byname(const char*, size_t __refs = 0) | |
45509 | : time_put<_CharT, _OutIter>(__refs) | |
45510 | { }; | |
45511 | ||
45512 | protected: | |
45513 | virtual | |
45514 | ~time_put_byname() { } | |
45515 | }; | |
45516 | # 3447 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45517 | class money_base | |
45518 | { | |
45519 | public: | |
45520 | enum part { none, space, symbol, sign, value }; | |
45521 | struct pattern { char field[4]; }; | |
45522 | ||
45523 | static const pattern _S_default_pattern; | |
45524 | ||
45525 | enum | |
45526 | { | |
45527 | _S_minus, | |
45528 | _S_zero, | |
45529 | _S_end = 11 | |
45530 | }; | |
45531 | ||
45532 | ||
45533 | ||
45534 | static const char* _S_atoms; | |
45535 | ||
45536 | ||
45537 | ||
45538 | static pattern | |
45539 | _S_construct_pattern(char __precedes, char __space, char __posn); | |
45540 | }; | |
45541 | ||
45542 | template<typename _CharT, bool _Intl> | |
45543 | struct __moneypunct_cache : public locale::facet | |
45544 | { | |
45545 | const char* _M_grouping; | |
45546 | size_t _M_grouping_size; | |
45547 | bool _M_use_grouping; | |
45548 | _CharT _M_decimal_point; | |
45549 | _CharT _M_thousands_sep; | |
45550 | const _CharT* _M_curr_symbol; | |
45551 | size_t _M_curr_symbol_size; | |
45552 | const _CharT* _M_positive_sign; | |
45553 | size_t _M_positive_sign_size; | |
45554 | const _CharT* _M_negative_sign; | |
45555 | size_t _M_negative_sign_size; | |
45556 | int _M_frac_digits; | |
45557 | money_base::pattern _M_pos_format; | |
45558 | money_base::pattern _M_neg_format; | |
45559 | ||
45560 | ||
45561 | ||
45562 | ||
45563 | _CharT _M_atoms[money_base::_S_end]; | |
45564 | ||
45565 | bool _M_allocated; | |
45566 | ||
45567 | __moneypunct_cache(size_t __refs = 0) : facet(__refs), | |
45568 | _M_grouping(__null), _M_grouping_size(0), _M_use_grouping(false), | |
45569 | _M_decimal_point(_CharT()), _M_thousands_sep(_CharT()), | |
45570 | _M_curr_symbol(__null), _M_curr_symbol_size(0), | |
45571 | _M_positive_sign(__null), _M_positive_sign_size(0), | |
45572 | _M_negative_sign(__null), _M_negative_sign_size(0), | |
45573 | _M_frac_digits(0), | |
45574 | _M_pos_format(money_base::pattern()), | |
45575 | _M_neg_format(money_base::pattern()), _M_allocated(false) | |
45576 | { } | |
45577 | ||
45578 | ~__moneypunct_cache(); | |
45579 | ||
45580 | void | |
45581 | _M_cache(const locale& __loc); | |
45582 | ||
45583 | private: | |
45584 | __moneypunct_cache& | |
45585 | operator=(const __moneypunct_cache&); | |
45586 | ||
45587 | explicit | |
45588 | __moneypunct_cache(const __moneypunct_cache&); | |
45589 | }; | |
45590 | ||
45591 | template<typename _CharT, bool _Intl> | |
45592 | __moneypunct_cache<_CharT, _Intl>::~__moneypunct_cache() | |
45593 | { | |
45594 | if (_M_allocated) | |
45595 | { | |
45596 | delete [] _M_grouping; | |
45597 | delete [] _M_curr_symbol; | |
45598 | delete [] _M_positive_sign; | |
45599 | delete [] _M_negative_sign; | |
45600 | } | |
45601 | } | |
45602 | ||
45603 | ||
45604 | ||
45605 | ||
45606 | ||
45607 | ||
45608 | ||
45609 | template<typename _CharT, bool _Intl> | |
45610 | class moneypunct : public locale::facet, public money_base | |
45611 | { | |
45612 | public: | |
45613 | ||
45614 | ||
45615 | ||
45616 | typedef _CharT char_type; | |
45617 | typedef basic_string<_CharT> string_type; | |
45618 | ||
45619 | typedef __moneypunct_cache<_CharT, _Intl> __cache_type; | |
45620 | ||
45621 | private: | |
45622 | __cache_type* _M_data; | |
45623 | ||
45624 | public: | |
45625 | ||
45626 | ||
45627 | static const bool intl = _Intl; | |
45628 | ||
45629 | static locale::id id; | |
45630 | # 3568 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45631 | explicit | |
45632 | moneypunct(size_t __refs = 0) : facet(__refs), _M_data(__null) | |
45633 | { _M_initialize_moneypunct(); } | |
45634 | # 3580 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45635 | explicit | |
45636 | moneypunct(__cache_type* __cache, size_t __refs = 0) | |
45637 | : facet(__refs), _M_data(__cache) | |
45638 | { _M_initialize_moneypunct(); } | |
45639 | # 3595 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45640 | explicit | |
45641 | moneypunct(__c_locale __cloc, const char* __s, size_t __refs = 0) | |
45642 | : facet(__refs), _M_data(__null) | |
45643 | { _M_initialize_moneypunct(__cloc, __s); } | |
45644 | # 3609 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45645 | char_type | |
45646 | decimal_point() const | |
45647 | { return this->do_decimal_point(); } | |
45648 | # 3622 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45649 | char_type | |
45650 | thousands_sep() const | |
45651 | { return this->do_thousands_sep(); } | |
45652 | # 3651 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45653 | string | |
45654 | grouping() const | |
45655 | { return this->do_grouping(); } | |
45656 | # 3664 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45657 | string_type | |
45658 | curr_symbol() const | |
45659 | { return this->do_curr_symbol(); } | |
45660 | # 3681 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45661 | string_type | |
45662 | positive_sign() const | |
45663 | { return this->do_positive_sign(); } | |
45664 | # 3698 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45665 | string_type | |
45666 | negative_sign() const | |
45667 | { return this->do_negative_sign(); } | |
45668 | # 3714 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45669 | int | |
45670 | frac_digits() const | |
45671 | { return this->do_frac_digits(); } | |
45672 | # 3749 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45673 | pattern | |
45674 | pos_format() const | |
45675 | { return this->do_pos_format(); } | |
45676 | ||
45677 | pattern | |
45678 | neg_format() const | |
45679 | { return this->do_neg_format(); } | |
45680 | ||
45681 | ||
45682 | protected: | |
45683 | ||
45684 | virtual | |
45685 | ~moneypunct(); | |
45686 | # 3771 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45687 | virtual char_type | |
45688 | do_decimal_point() const | |
45689 | { return _M_data->_M_decimal_point; } | |
45690 | # 3783 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45691 | virtual char_type | |
45692 | do_thousands_sep() const | |
45693 | { return _M_data->_M_thousands_sep; } | |
45694 | # 3796 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45695 | virtual string | |
45696 | do_grouping() const | |
45697 | { return _M_data->_M_grouping; } | |
45698 | # 3809 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45699 | virtual string_type | |
45700 | do_curr_symbol() const | |
45701 | { return _M_data->_M_curr_symbol; } | |
45702 | # 3822 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45703 | virtual string_type | |
45704 | do_positive_sign() const | |
45705 | { return _M_data->_M_positive_sign; } | |
45706 | # 3835 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45707 | virtual string_type | |
45708 | do_negative_sign() const | |
45709 | { return _M_data->_M_negative_sign; } | |
45710 | # 3849 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45711 | virtual int | |
45712 | do_frac_digits() const | |
45713 | { return _M_data->_M_frac_digits; } | |
45714 | # 3863 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45715 | virtual pattern | |
45716 | do_pos_format() const | |
45717 | { return _M_data->_M_pos_format; } | |
45718 | # 3877 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45719 | virtual pattern | |
45720 | do_neg_format() const | |
45721 | { return _M_data->_M_neg_format; } | |
45722 | ||
45723 | ||
45724 | void | |
45725 | _M_initialize_moneypunct(__c_locale __cloc = __null, | |
45726 | const char* __name = __null); | |
45727 | }; | |
45728 | ||
45729 | template<typename _CharT, bool _Intl> | |
45730 | locale::id moneypunct<_CharT, _Intl>::id; | |
45731 | ||
45732 | template<typename _CharT, bool _Intl> | |
45733 | const bool moneypunct<_CharT, _Intl>::intl; | |
45734 | ||
45735 | template<> | |
45736 | moneypunct<char, true>::~moneypunct(); | |
45737 | ||
45738 | template<> | |
45739 | moneypunct<char, false>::~moneypunct(); | |
45740 | ||
45741 | template<> | |
45742 | void | |
45743 | moneypunct<char, true>::_M_initialize_moneypunct(__c_locale, const char*); | |
45744 | ||
45745 | template<> | |
45746 | void | |
45747 | moneypunct<char, false>::_M_initialize_moneypunct(__c_locale, const char*); | |
45748 | ||
45749 | ||
45750 | template<> | |
45751 | moneypunct<wchar_t, true>::~moneypunct(); | |
45752 | ||
45753 | template<> | |
45754 | moneypunct<wchar_t, false>::~moneypunct(); | |
45755 | ||
45756 | template<> | |
45757 | void | |
45758 | moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale, | |
45759 | const char*); | |
45760 | ||
45761 | template<> | |
45762 | void | |
45763 | moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale, | |
45764 | const char*); | |
45765 | ||
45766 | ||
45767 | ||
45768 | template<typename _CharT, bool _Intl> | |
45769 | class moneypunct_byname : public moneypunct<_CharT, _Intl> | |
45770 | { | |
45771 | public: | |
45772 | typedef _CharT char_type; | |
45773 | typedef basic_string<_CharT> string_type; | |
45774 | ||
45775 | static const bool intl = _Intl; | |
45776 | ||
45777 | explicit | |
45778 | moneypunct_byname(const char* __s, size_t __refs = 0) | |
45779 | : moneypunct<_CharT, _Intl>(__refs) | |
45780 | { | |
45781 | if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) | |
45782 | { | |
45783 | __c_locale __tmp; | |
45784 | this->_S_create_c_locale(__tmp, __s); | |
45785 | this->_M_initialize_moneypunct(__tmp); | |
45786 | this->_S_destroy_c_locale(__tmp); | |
45787 | } | |
45788 | } | |
45789 | ||
45790 | protected: | |
45791 | virtual | |
45792 | ~moneypunct_byname() { } | |
45793 | }; | |
45794 | ||
45795 | template<typename _CharT, bool _Intl> | |
45796 | const bool moneypunct_byname<_CharT, _Intl>::intl; | |
45797 | # 3968 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45798 | template<typename _CharT, typename _InIter> | |
45799 | class money_get : public locale::facet | |
45800 | { | |
45801 | public: | |
45802 | ||
45803 | ||
45804 | ||
45805 | typedef _CharT char_type; | |
45806 | typedef _InIter iter_type; | |
45807 | typedef basic_string<_CharT> string_type; | |
45808 | ||
45809 | ||
45810 | ||
45811 | static locale::id id; | |
45812 | # 3990 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45813 | explicit | |
45814 | money_get(size_t __refs = 0) : facet(__refs) { } | |
45815 | # 4020 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45816 | iter_type | |
45817 | get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, | |
45818 | ios_base::iostate& __err, long double& __units) const | |
45819 | { return this->do_get(__s, __end, __intl, __io, __err, __units); } | |
45820 | # 4050 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45821 | iter_type | |
45822 | get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, | |
45823 | ios_base::iostate& __err, string_type& __digits) const | |
45824 | { return this->do_get(__s, __end, __intl, __io, __err, __digits); } | |
45825 | ||
45826 | protected: | |
45827 | ||
45828 | virtual | |
45829 | ~money_get() { } | |
45830 | # 4067 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45831 | virtual iter_type | |
45832 | do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, | |
45833 | ios_base::iostate& __err, long double& __units) const; | |
45834 | # 4078 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45835 | virtual iter_type | |
45836 | do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, | |
45837 | ios_base::iostate& __err, string_type& __digits) const; | |
45838 | ||
45839 | template<bool _Intl> | |
45840 | iter_type | |
45841 | _M_extract(iter_type __s, iter_type __end, ios_base& __io, | |
45842 | ios_base::iostate& __err, string& __digits) const; | |
45843 | }; | |
45844 | ||
45845 | template<typename _CharT, typename _InIter> | |
45846 | locale::id money_get<_CharT, _InIter>::id; | |
45847 | # 4103 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45848 | template<typename _CharT, typename _OutIter> | |
45849 | class money_put : public locale::facet | |
45850 | { | |
45851 | public: | |
45852 | ||
45853 | ||
45854 | typedef _CharT char_type; | |
45855 | typedef _OutIter iter_type; | |
45856 | typedef basic_string<_CharT> string_type; | |
45857 | ||
45858 | ||
45859 | ||
45860 | static locale::id id; | |
45861 | # 4124 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45862 | explicit | |
45863 | money_put(size_t __refs = 0) : facet(__refs) { } | |
45864 | # 4144 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45865 | iter_type | |
45866 | put(iter_type __s, bool __intl, ios_base& __io, | |
45867 | char_type __fill, long double __units) const | |
45868 | { return this->do_put(__s, __intl, __io, __fill, __units); } | |
45869 | # 4166 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45870 | iter_type | |
45871 | put(iter_type __s, bool __intl, ios_base& __io, | |
45872 | char_type __fill, const string_type& __digits) const | |
45873 | { return this->do_put(__s, __intl, __io, __fill, __digits); } | |
45874 | ||
45875 | protected: | |
45876 | ||
45877 | virtual | |
45878 | ~money_put() { } | |
45879 | # 4194 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45880 | virtual iter_type | |
45881 | do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, | |
45882 | long double __units) const; | |
45883 | # 4216 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45884 | virtual iter_type | |
45885 | do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, | |
45886 | const string_type& __digits) const; | |
45887 | ||
45888 | template<bool _Intl> | |
45889 | iter_type | |
45890 | _M_insert(iter_type __s, ios_base& __io, char_type __fill, | |
45891 | const string_type& __digits) const; | |
45892 | }; | |
45893 | ||
45894 | template<typename _CharT, typename _OutIter> | |
45895 | locale::id money_put<_CharT, _OutIter>::id; | |
45896 | ||
45897 | ||
45898 | ||
45899 | ||
45900 | struct messages_base | |
45901 | { | |
45902 | typedef int catalog; | |
45903 | }; | |
45904 | # 4257 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45905 | template<typename _CharT> | |
45906 | class messages : public locale::facet, public messages_base | |
45907 | { | |
45908 | public: | |
45909 | ||
45910 | ||
45911 | ||
45912 | typedef _CharT char_type; | |
45913 | typedef basic_string<_CharT> string_type; | |
45914 | ||
45915 | ||
45916 | protected: | |
45917 | ||
45918 | ||
45919 | __c_locale _M_c_locale_messages; | |
45920 | const char* _M_name_messages; | |
45921 | ||
45922 | public: | |
45923 | ||
45924 | static locale::id id; | |
45925 | # 4285 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45926 | explicit | |
45927 | messages(size_t __refs = 0); | |
45928 | # 4299 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45929 | explicit | |
45930 | messages(__c_locale __cloc, const char* __s, size_t __refs = 0); | |
45931 | # 4312 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45932 | catalog | |
45933 | open(const basic_string<char>& __s, const locale& __loc) const | |
45934 | { return this->do_open(__s, __loc); } | |
45935 | # 4330 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45936 | catalog | |
45937 | open(const basic_string<char>&, const locale&, const char*) const; | |
45938 | # 4348 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45939 | string_type | |
45940 | get(catalog __c, int __set, int __msgid, const string_type& __s) const | |
45941 | { return this->do_get(__c, __set, __msgid, __s); } | |
45942 | # 4359 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45943 | void | |
45944 | close(catalog __c) const | |
45945 | { return this->do_close(__c); } | |
45946 | ||
45947 | protected: | |
45948 | ||
45949 | virtual | |
45950 | ~messages(); | |
45951 | # 4379 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45952 | virtual catalog | |
45953 | do_open(const basic_string<char>&, const locale&) const; | |
45954 | # 4398 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45955 | virtual string_type | |
45956 | do_get(catalog, int, int, const string_type& __dfault) const; | |
45957 | ||
45958 | ||
45959 | ||
45960 | ||
45961 | ||
45962 | ||
45963 | virtual void | |
45964 | do_close(catalog) const; | |
45965 | ||
45966 | ||
45967 | char* | |
45968 | _M_convert_to_char(const string_type& __msg) const | |
45969 | { | |
45970 | ||
45971 | return reinterpret_cast<char*>(const_cast<_CharT*>(__msg.c_str())); | |
45972 | } | |
45973 | ||
45974 | ||
45975 | string_type | |
45976 | _M_convert_from_char(char*) const | |
45977 | { | |
45978 | # 4455 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
45979 | return string_type(); | |
45980 | } | |
45981 | }; | |
45982 | ||
45983 | template<typename _CharT> | |
45984 | locale::id messages<_CharT>::id; | |
45985 | ||
45986 | ||
45987 | template<> | |
45988 | string | |
45989 | messages<char>::do_get(catalog, int, int, const string&) const; | |
45990 | ||
45991 | ||
45992 | template<> | |
45993 | wstring | |
45994 | messages<wchar_t>::do_get(catalog, int, int, const wstring&) const; | |
45995 | ||
45996 | ||
45997 | ||
45998 | template<typename _CharT> | |
45999 | class messages_byname : public messages<_CharT> | |
46000 | { | |
46001 | public: | |
46002 | typedef _CharT char_type; | |
46003 | typedef basic_string<_CharT> string_type; | |
46004 | ||
46005 | explicit | |
46006 | messages_byname(const char* __s, size_t __refs = 0); | |
46007 | ||
46008 | protected: | |
46009 | virtual | |
46010 | ~messages_byname() | |
46011 | { } | |
46012 | }; | |
46013 | ||
46014 | ||
46015 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/messages_members.h" 1 3 | |
46016 | # 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/messages_members.h" 3 | |
46017 | template<typename _CharT> | |
46018 | messages<_CharT>::messages(size_t __refs) | |
46019 | : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), | |
46020 | _M_name_messages(_S_get_c_name()) | |
46021 | { } | |
46022 | ||
46023 | template<typename _CharT> | |
46024 | messages<_CharT>::messages(__c_locale __cloc, const char* __s, | |
46025 | size_t __refs) | |
46026 | : facet(__refs), _M_c_locale_messages(__null), _M_name_messages(__null) | |
46027 | { | |
46028 | const size_t __len = std::strlen(__s) + 1; | |
46029 | char* __tmp = new char[__len]; | |
46030 | std::memcpy(__tmp, __s, __len); | |
46031 | _M_name_messages = __tmp; | |
46032 | ||
46033 | ||
46034 | _M_c_locale_messages = _S_clone_c_locale(__cloc); | |
46035 | } | |
46036 | ||
46037 | template<typename _CharT> | |
46038 | typename messages<_CharT>::catalog | |
46039 | messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc, | |
46040 | const char* __dir) const | |
46041 | { | |
46042 | bindtextdomain(__s.c_str(), __dir); | |
46043 | return this->do_open(__s, __loc); | |
46044 | } | |
46045 | ||
46046 | ||
46047 | template<typename _CharT> | |
46048 | messages<_CharT>::~messages() | |
46049 | { | |
46050 | if (_M_name_messages != _S_get_c_name()) | |
46051 | delete [] _M_name_messages; | |
46052 | _S_destroy_c_locale(_M_c_locale_messages); | |
46053 | } | |
46054 | ||
46055 | template<typename _CharT> | |
46056 | typename messages<_CharT>::catalog | |
46057 | messages<_CharT>::do_open(const basic_string<char>& __s, | |
46058 | const locale&) const | |
46059 | { | |
46060 | ||
46061 | ||
46062 | textdomain(__s.c_str()); | |
46063 | return 0; | |
46064 | } | |
46065 | ||
46066 | template<typename _CharT> | |
46067 | void | |
46068 | messages<_CharT>::do_close(catalog) const | |
46069 | { } | |
46070 | ||
46071 | ||
46072 | template<typename _CharT> | |
46073 | messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) | |
46074 | : messages<_CharT>(__refs) | |
46075 | { | |
46076 | if (this->_M_name_messages != locale::facet::_S_get_c_name()) | |
46077 | delete [] this->_M_name_messages; | |
46078 | char* __tmp = new char[std::strlen(__s) + 1]; | |
46079 | std::strcpy(__tmp, __s); | |
46080 | this->_M_name_messages = __tmp; | |
46081 | ||
46082 | if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) | |
46083 | { | |
46084 | this->_S_destroy_c_locale(this->_M_c_locale_messages); | |
46085 | this->_S_create_c_locale(this->_M_c_locale_messages, __s); | |
46086 | } | |
46087 | } | |
46088 | # 4492 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 2 3 | |
46089 | # 4500 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.h" 3 | |
46090 | template<typename _CharT> | |
46091 | inline bool | |
46092 | isspace(_CharT __c, const locale& __loc) | |
46093 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::space, __c); } | |
46094 | ||
46095 | ||
46096 | template<typename _CharT> | |
46097 | inline bool | |
46098 | isprint(_CharT __c, const locale& __loc) | |
46099 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::print, __c); } | |
46100 | ||
46101 | ||
46102 | template<typename _CharT> | |
46103 | inline bool | |
46104 | iscntrl(_CharT __c, const locale& __loc) | |
46105 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::cntrl, __c); } | |
46106 | ||
46107 | ||
46108 | template<typename _CharT> | |
46109 | inline bool | |
46110 | isupper(_CharT __c, const locale& __loc) | |
46111 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::upper, __c); } | |
46112 | ||
46113 | ||
46114 | template<typename _CharT> | |
46115 | inline bool | |
46116 | islower(_CharT __c, const locale& __loc) | |
46117 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::lower, __c); } | |
46118 | ||
46119 | ||
46120 | template<typename _CharT> | |
46121 | inline bool | |
46122 | isalpha(_CharT __c, const locale& __loc) | |
46123 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alpha, __c); } | |
46124 | ||
46125 | ||
46126 | template<typename _CharT> | |
46127 | inline bool | |
46128 | isdigit(_CharT __c, const locale& __loc) | |
46129 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::digit, __c); } | |
46130 | ||
46131 | ||
46132 | template<typename _CharT> | |
46133 | inline bool | |
46134 | ispunct(_CharT __c, const locale& __loc) | |
46135 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::punct, __c); } | |
46136 | ||
46137 | ||
46138 | template<typename _CharT> | |
46139 | inline bool | |
46140 | isxdigit(_CharT __c, const locale& __loc) | |
46141 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::xdigit, __c); } | |
46142 | ||
46143 | ||
46144 | template<typename _CharT> | |
46145 | inline bool | |
46146 | isalnum(_CharT __c, const locale& __loc) | |
46147 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alnum, __c); } | |
46148 | ||
46149 | ||
46150 | template<typename _CharT> | |
46151 | inline bool | |
46152 | isgraph(_CharT __c, const locale& __loc) | |
46153 | { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::graph, __c); } | |
46154 | ||
46155 | ||
46156 | template<typename _CharT> | |
46157 | inline _CharT | |
46158 | toupper(_CharT __c, const locale& __loc) | |
46159 | { return use_facet<ctype<_CharT> >(__loc).toupper(__c); } | |
46160 | ||
46161 | ||
46162 | template<typename _CharT> | |
46163 | inline _CharT | |
46164 | tolower(_CharT __c, const locale& __loc) | |
46165 | { return use_facet<ctype<_CharT> >(__loc).tolower(__c); } | |
46166 | } | |
46167 | # 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 2 3 | |
46168 | ||
46169 | namespace std | |
46170 | { | |
46171 | ||
46172 | ||
46173 | ||
46174 | ||
46175 | ||
46176 | ||
46177 | ||
46178 | template<typename _CharT, typename _Traits> | |
46179 | class basic_ios : public ios_base | |
46180 | { | |
46181 | public: | |
46182 | ||
46183 | ||
46184 | ||
46185 | ||
46186 | ||
46187 | ||
46188 | typedef _CharT char_type; | |
46189 | typedef typename _Traits::int_type int_type; | |
46190 | typedef typename _Traits::pos_type pos_type; | |
46191 | typedef typename _Traits::off_type off_type; | |
46192 | typedef _Traits traits_type; | |
46193 | # 78 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3 | |
46194 | typedef ctype<_CharT> __ctype_type; | |
46195 | typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > | |
46196 | __num_put_type; | |
46197 | typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > | |
46198 | __num_get_type; | |
46199 | ||
46200 | ||
46201 | ||
46202 | protected: | |
46203 | basic_ostream<_CharT, _Traits>* _M_tie; | |
46204 | mutable char_type _M_fill; | |
46205 | mutable bool _M_fill_init; | |
46206 | basic_streambuf<_CharT, _Traits>* _M_streambuf; | |
46207 | ||
46208 | ||
46209 | const __ctype_type* _M_ctype; | |
46210 | ||
46211 | const __num_put_type* _M_num_put; | |
46212 | ||
46213 | const __num_get_type* _M_num_get; | |
46214 | ||
46215 | public: | |
46216 | ||
46217 | ||
46218 | ||
46219 | ||
46220 | ||
46221 | ||
46222 | ||
46223 | operator void*() const | |
46224 | { return this->fail() ? 0 : const_cast<basic_ios*>(this); } | |
46225 | ||
46226 | bool | |
46227 | operator!() const | |
46228 | { return this->fail(); } | |
46229 | # 122 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3 | |
46230 | iostate | |
46231 | rdstate() const | |
46232 | { return _M_streambuf_state; } | |
46233 | # 133 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3 | |
46234 | void | |
46235 | clear(iostate __state = goodbit); | |
46236 | ||
46237 | ||
46238 | ||
46239 | ||
46240 | ||
46241 | ||
46242 | ||
46243 | void | |
46244 | setstate(iostate __state) | |
46245 | { this->clear(this->rdstate() | __state); } | |
46246 | ||
46247 | ||
46248 | ||
46249 | ||
46250 | void | |
46251 | _M_setstate(iostate __state) | |
46252 | { | |
46253 | ||
46254 | ||
46255 | _M_streambuf_state |= __state; | |
46256 | if (this->exceptions() & __state) | |
46257 | throw; | |
46258 | } | |
46259 | ||
46260 | ||
46261 | ||
46262 | ||
46263 | ||
46264 | ||
46265 | ||
46266 | bool | |
46267 | good() const | |
46268 | { return this->rdstate() == 0; } | |
46269 | ||
46270 | ||
46271 | ||
46272 | ||
46273 | ||
46274 | ||
46275 | ||
46276 | bool | |
46277 | eof() const | |
46278 | { return (this->rdstate() & eofbit) != 0; } | |
46279 | # 186 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3 | |
46280 | bool | |
46281 | fail() const | |
46282 | { return (this->rdstate() & (badbit | failbit)) != 0; } | |
46283 | ||
46284 | ||
46285 | ||
46286 | ||
46287 | ||
46288 | ||
46289 | ||
46290 | bool | |
46291 | bad() const | |
46292 | { return (this->rdstate() & badbit) != 0; } | |
46293 | # 207 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3 | |
46294 | iostate | |
46295 | exceptions() const | |
46296 | { return _M_exception; } | |
46297 | # 242 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3 | |
46298 | void | |
46299 | exceptions(iostate __except) | |
46300 | { | |
46301 | _M_exception = __except; | |
46302 | this->clear(_M_streambuf_state); | |
46303 | } | |
46304 | ||
46305 | ||
46306 | ||
46307 | ||
46308 | ||
46309 | ||
46310 | ||
46311 | explicit | |
46312 | basic_ios(basic_streambuf<_CharT, _Traits>* __sb) | |
46313 | : ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0), | |
46314 | _M_ctype(0), _M_num_put(0), _M_num_get(0) | |
46315 | { this->init(__sb); } | |
46316 | ||
46317 | ||
46318 | ||
46319 | ||
46320 | ||
46321 | ||
46322 | ||
46323 | virtual | |
46324 | ~basic_ios() { } | |
46325 | # 280 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3 | |
46326 | basic_ostream<_CharT, _Traits>* | |
46327 | tie() const | |
46328 | { return _M_tie; } | |
46329 | # 292 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3 | |
46330 | basic_ostream<_CharT, _Traits>* | |
46331 | tie(basic_ostream<_CharT, _Traits>* __tiestr) | |
46332 | { | |
46333 | basic_ostream<_CharT, _Traits>* __old = _M_tie; | |
46334 | _M_tie = __tiestr; | |
46335 | return __old; | |
46336 | } | |
46337 | ||
46338 | ||
46339 | ||
46340 | ||
46341 | ||
46342 | ||
46343 | ||
46344 | basic_streambuf<_CharT, _Traits>* | |
46345 | rdbuf() const | |
46346 | { return _M_streambuf; } | |
46347 | # 332 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3 | |
46348 | basic_streambuf<_CharT, _Traits>* | |
46349 | rdbuf(basic_streambuf<_CharT, _Traits>* __sb); | |
46350 | # 346 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3 | |
46351 | basic_ios& | |
46352 | copyfmt(const basic_ios& __rhs); | |
46353 | ||
46354 | ||
46355 | ||
46356 | ||
46357 | ||
46358 | ||
46359 | ||
46360 | char_type | |
46361 | fill() const | |
46362 | { | |
46363 | if (!_M_fill_init) | |
46364 | { | |
46365 | _M_fill = this->widen(' '); | |
46366 | _M_fill_init = true; | |
46367 | } | |
46368 | return _M_fill; | |
46369 | } | |
46370 | # 375 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3 | |
46371 | char_type | |
46372 | fill(char_type __ch) | |
46373 | { | |
46374 | char_type __old = this->fill(); | |
46375 | _M_fill = __ch; | |
46376 | return __old; | |
46377 | } | |
46378 | # 395 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3 | |
46379 | locale | |
46380 | imbue(const locale& __loc); | |
46381 | # 415 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3 | |
46382 | char | |
46383 | narrow(char_type __c, char __dfault) const; | |
46384 | # 433 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 3 | |
46385 | char_type | |
46386 | widen(char __c) const; | |
46387 | ||
46388 | protected: | |
46389 | ||
46390 | ||
46391 | ||
46392 | ||
46393 | ||
46394 | ||
46395 | ||
46396 | basic_ios() | |
46397 | : ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false), | |
46398 | _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0) | |
46399 | { } | |
46400 | ||
46401 | ||
46402 | ||
46403 | ||
46404 | ||
46405 | ||
46406 | ||
46407 | void | |
46408 | init(basic_streambuf<_CharT, _Traits>* __sb); | |
46409 | ||
46410 | void | |
46411 | _M_cache_locale(const locale& __loc); | |
46412 | }; | |
46413 | } | |
46414 | ||
46415 | ||
46416 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.tcc" 1 3 | |
46417 | # 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.tcc" 3 | |
46418 | ||
46419 | # 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.tcc" 3 | |
46420 | ||
46421 | namespace std | |
46422 | { | |
46423 | template<typename _CharT, typename _Traits> | |
46424 | void | |
46425 | basic_ios<_CharT, _Traits>::clear(iostate __state) | |
46426 | { | |
46427 | if (this->rdbuf()) | |
46428 | _M_streambuf_state = __state; | |
46429 | else | |
46430 | _M_streambuf_state = __state | badbit; | |
46431 | if (this->exceptions() & this->rdstate()) | |
46432 | __throw_ios_failure(("basic_ios::clear")); | |
46433 | } | |
46434 | ||
46435 | template<typename _CharT, typename _Traits> | |
46436 | basic_streambuf<_CharT, _Traits>* | |
46437 | basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __sb) | |
46438 | { | |
46439 | basic_streambuf<_CharT, _Traits>* __old = _M_streambuf; | |
46440 | _M_streambuf = __sb; | |
46441 | this->clear(); | |
46442 | return __old; | |
46443 | } | |
46444 | ||
46445 | template<typename _CharT, typename _Traits> | |
46446 | basic_ios<_CharT, _Traits>& | |
46447 | basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs) | |
46448 | { | |
46449 | ||
46450 | ||
46451 | if (this != &__rhs) | |
46452 | { | |
46453 | ||
46454 | ||
46455 | ||
46456 | ||
46457 | _Words* __words = (__rhs._M_word_size <= _S_local_word_size) ? | |
46458 | _M_local_word : new _Words[__rhs._M_word_size]; | |
46459 | ||
46460 | ||
46461 | _Callback_list* __cb = __rhs._M_callbacks; | |
46462 | if (__cb) | |
46463 | __cb->_M_add_reference(); | |
46464 | _M_call_callbacks(erase_event); | |
46465 | if (_M_word != _M_local_word) | |
46466 | { | |
46467 | delete [] _M_word; | |
46468 | _M_word = 0; | |
46469 | } | |
46470 | _M_dispose_callbacks(); | |
46471 | ||
46472 | ||
46473 | _M_callbacks = __cb; | |
46474 | for (int __i = 0; __i < __rhs._M_word_size; ++__i) | |
46475 | __words[__i] = __rhs._M_word[__i]; | |
46476 | _M_word = __words; | |
46477 | _M_word_size = __rhs._M_word_size; | |
46478 | ||
46479 | this->flags(__rhs.flags()); | |
46480 | this->width(__rhs.width()); | |
46481 | this->precision(__rhs.precision()); | |
46482 | this->tie(__rhs.tie()); | |
46483 | this->fill(__rhs.fill()); | |
46484 | _M_ios_locale = __rhs.getloc(); | |
46485 | _M_cache_locale(_M_ios_locale); | |
46486 | ||
46487 | _M_call_callbacks(copyfmt_event); | |
46488 | ||
46489 | ||
46490 | this->exceptions(__rhs.exceptions()); | |
46491 | } | |
46492 | return *this; | |
46493 | } | |
46494 | ||
46495 | template<typename _CharT, typename _Traits> | |
46496 | char | |
46497 | basic_ios<_CharT, _Traits>::narrow(char_type __c, char __dfault) const | |
46498 | { return __check_facet(_M_ctype).narrow(__c, __dfault); } | |
46499 | ||
46500 | template<typename _CharT, typename _Traits> | |
46501 | _CharT | |
46502 | basic_ios<_CharT, _Traits>::widen(char __c) const | |
46503 | { return __check_facet(_M_ctype).widen(__c); } | |
46504 | ||
46505 | ||
46506 | template<typename _CharT, typename _Traits> | |
46507 | locale | |
46508 | basic_ios<_CharT, _Traits>::imbue(const locale& __loc) | |
46509 | { | |
46510 | locale __old(this->getloc()); | |
46511 | ios_base::imbue(__loc); | |
46512 | _M_cache_locale(__loc); | |
46513 | if (this->rdbuf() != 0) | |
46514 | this->rdbuf()->pubimbue(__loc); | |
46515 | return __old; | |
46516 | } | |
46517 | ||
46518 | template<typename _CharT, typename _Traits> | |
46519 | void | |
46520 | basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb) | |
46521 | { | |
46522 | ||
46523 | ios_base::_M_init(); | |
46524 | ||
46525 | ||
46526 | _M_cache_locale(_M_ios_locale); | |
46527 | # 159 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.tcc" 3 | |
46528 | _M_fill = _CharT(); | |
46529 | _M_fill_init = false; | |
46530 | ||
46531 | _M_tie = 0; | |
46532 | _M_exception = goodbit; | |
46533 | _M_streambuf = __sb; | |
46534 | _M_streambuf_state = __sb ? goodbit : badbit; | |
46535 | } | |
46536 | ||
46537 | template<typename _CharT, typename _Traits> | |
46538 | void | |
46539 | basic_ios<_CharT, _Traits>::_M_cache_locale(const locale& __loc) | |
46540 | { | |
46541 | if (__builtin_expect(has_facet<__ctype_type>(__loc), true)) | |
46542 | _M_ctype = &use_facet<__ctype_type>(__loc); | |
46543 | else | |
46544 | _M_ctype = 0; | |
46545 | ||
46546 | if (__builtin_expect(has_facet<__num_put_type>(__loc), true)) | |
46547 | _M_num_put = &use_facet<__num_put_type>(__loc); | |
46548 | else | |
46549 | _M_num_put = 0; | |
46550 | ||
46551 | if (__builtin_expect(has_facet<__num_get_type>(__loc), true)) | |
46552 | _M_num_get = &use_facet<__num_get_type>(__loc); | |
46553 | else | |
46554 | _M_num_get = 0; | |
46555 | } | |
46556 | ||
46557 | ||
46558 | ||
46559 | ||
46560 | ||
46561 | extern template class basic_ios<char>; | |
46562 | ||
46563 | ||
46564 | extern template class basic_ios<wchar_t>; | |
46565 | ||
46566 | ||
46567 | } | |
46568 | # 465 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/basic_ios.h" 2 3 | |
46569 | # 53 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ios" 2 3 | |
46570 | ||
46571 | #pragma GCC visibility pop | |
46572 | # 46 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 2 3 | |
46573 | ||
46574 | namespace std | |
46575 | { | |
46576 | # 57 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3 | |
46577 | template<typename _CharT, typename _Traits> | |
46578 | class basic_ostream : virtual public basic_ios<_CharT, _Traits> | |
46579 | { | |
46580 | public: | |
46581 | ||
46582 | typedef _CharT char_type; | |
46583 | typedef typename _Traits::int_type int_type; | |
46584 | typedef typename _Traits::pos_type pos_type; | |
46585 | typedef typename _Traits::off_type off_type; | |
46586 | typedef _Traits traits_type; | |
46587 | ||
46588 | ||
46589 | typedef basic_streambuf<_CharT, _Traits> __streambuf_type; | |
46590 | typedef basic_ios<_CharT, _Traits> __ios_type; | |
46591 | typedef basic_ostream<_CharT, _Traits> __ostream_type; | |
46592 | typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > | |
46593 | __num_put_type; | |
46594 | typedef ctype<_CharT> __ctype_type; | |
46595 | ||
46596 | template<typename _CharT2, typename _Traits2> | |
46597 | friend basic_ostream<_CharT2, _Traits2>& | |
46598 | operator<<(basic_ostream<_CharT2, _Traits2>&, _CharT2); | |
46599 | ||
46600 | template<typename _Traits2> | |
46601 | friend basic_ostream<char, _Traits2>& | |
46602 | operator<<(basic_ostream<char, _Traits2>&, char); | |
46603 | ||
46604 | template<typename _CharT2, typename _Traits2> | |
46605 | friend basic_ostream<_CharT2, _Traits2>& | |
46606 | operator<<(basic_ostream<_CharT2, _Traits2>&, const _CharT2*); | |
46607 | ||
46608 | template<typename _Traits2> | |
46609 | friend basic_ostream<char, _Traits2>& | |
46610 | operator<<(basic_ostream<char, _Traits2>&, const char*); | |
46611 | ||
46612 | template<typename _CharT2, typename _Traits2> | |
46613 | friend basic_ostream<_CharT2, _Traits2>& | |
46614 | operator<<(basic_ostream<_CharT2, _Traits2>&, const char*); | |
46615 | # 104 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3 | |
46616 | explicit | |
46617 | basic_ostream(__streambuf_type* __sb) | |
46618 | { this->init(__sb); } | |
46619 | ||
46620 | ||
46621 | ||
46622 | ||
46623 | ||
46624 | ||
46625 | virtual | |
46626 | ~basic_ostream() { } | |
46627 | ||
46628 | ||
46629 | class sentry; | |
46630 | friend class sentry; | |
46631 | # 130 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3 | |
46632 | inline __ostream_type& | |
46633 | operator<<(__ostream_type& (*__pf)(__ostream_type&)); | |
46634 | ||
46635 | inline __ostream_type& | |
46636 | operator<<(__ios_type& (*__pf)(__ios_type&)); | |
46637 | ||
46638 | inline __ostream_type& | |
46639 | operator<<(ios_base& (*__pf) (ios_base&)); | |
46640 | # 167 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3 | |
46641 | __ostream_type& | |
46642 | operator<<(long __n); | |
46643 | ||
46644 | __ostream_type& | |
46645 | operator<<(unsigned long __n); | |
46646 | ||
46647 | __ostream_type& | |
46648 | operator<<(bool __n); | |
46649 | ||
46650 | __ostream_type& | |
46651 | operator<<(short __n); | |
46652 | ||
46653 | __ostream_type& | |
46654 | operator<<(unsigned short __n); | |
46655 | ||
46656 | __ostream_type& | |
46657 | operator<<(int __n); | |
46658 | ||
46659 | __ostream_type& | |
46660 | operator<<(unsigned int __n); | |
46661 | ||
46662 | ||
46663 | __ostream_type& | |
46664 | operator<<(long long __n); | |
46665 | ||
46666 | __ostream_type& | |
46667 | operator<<(unsigned long long __n); | |
46668 | ||
46669 | ||
46670 | __ostream_type& | |
46671 | operator<<(double __f); | |
46672 | ||
46673 | __ostream_type& | |
46674 | operator<<(float __f); | |
46675 | ||
46676 | __ostream_type& | |
46677 | operator<<(long double __f); | |
46678 | ||
46679 | __ostream_type& | |
46680 | operator<<(const void* __p); | |
46681 | # 229 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3 | |
46682 | __ostream_type& | |
46683 | operator<<(__streambuf_type* __sb); | |
46684 | # 262 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3 | |
46685 | __ostream_type& | |
46686 | put(char_type __c); | |
46687 | ||
46688 | ||
46689 | void | |
46690 | _M_write(const char_type* __s, streamsize __n) | |
46691 | { | |
46692 | streamsize __put = this->rdbuf()->sputn(__s, __n); | |
46693 | if (__put != __n) | |
46694 | this->setstate(ios_base::badbit); | |
46695 | } | |
46696 | # 290 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3 | |
46697 | __ostream_type& | |
46698 | write(const char_type* __s, streamsize __n); | |
46699 | # 303 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3 | |
46700 | __ostream_type& | |
46701 | flush(); | |
46702 | # 314 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3 | |
46703 | pos_type | |
46704 | tellp(); | |
46705 | # 325 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3 | |
46706 | __ostream_type& | |
46707 | seekp(pos_type); | |
46708 | # 337 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3 | |
46709 | __ostream_type& | |
46710 | seekp(off_type, ios_base::seekdir); | |
46711 | ||
46712 | protected: | |
46713 | explicit | |
46714 | basic_ostream() { } | |
46715 | }; | |
46716 | # 355 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3 | |
46717 | template <typename _CharT, typename _Traits> | |
46718 | class basic_ostream<_CharT, _Traits>::sentry | |
46719 | { | |
46720 | ||
46721 | bool _M_ok; | |
46722 | basic_ostream<_CharT,_Traits>& _M_os; | |
46723 | ||
46724 | public: | |
46725 | # 374 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3 | |
46726 | explicit | |
46727 | sentry(basic_ostream<_CharT,_Traits>& __os); | |
46728 | # 384 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3 | |
46729 | ~sentry() | |
46730 | { | |
46731 | ||
46732 | if (_M_os.flags() & ios_base::unitbuf && !uncaught_exception()) | |
46733 | { | |
46734 | ||
46735 | if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1) | |
46736 | _M_os.setstate(ios_base::badbit); | |
46737 | } | |
46738 | } | |
46739 | # 402 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3 | |
46740 | operator bool() const | |
46741 | { return _M_ok; } | |
46742 | }; | |
46743 | # 423 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3 | |
46744 | template<typename _CharT, typename _Traits> | |
46745 | basic_ostream<_CharT, _Traits>& | |
46746 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c); | |
46747 | ||
46748 | template<typename _CharT, typename _Traits> | |
46749 | basic_ostream<_CharT, _Traits>& | |
46750 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | |
46751 | { return (__out << __out.widen(__c)); } | |
46752 | ||
46753 | ||
46754 | template <class _Traits> | |
46755 | basic_ostream<char, _Traits>& | |
46756 | operator<<(basic_ostream<char, _Traits>& __out, char __c); | |
46757 | ||
46758 | ||
46759 | template<class _Traits> | |
46760 | basic_ostream<char, _Traits>& | |
46761 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | |
46762 | { return (__out << static_cast<char>(__c)); } | |
46763 | ||
46764 | template<class _Traits> | |
46765 | basic_ostream<char, _Traits>& | |
46766 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | |
46767 | { return (__out << static_cast<char>(__c)); } | |
46768 | # 463 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3 | |
46769 | template<typename _CharT, typename _Traits> | |
46770 | basic_ostream<_CharT, _Traits>& | |
46771 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s); | |
46772 | ||
46773 | template<typename _CharT, typename _Traits> | |
46774 | basic_ostream<_CharT, _Traits> & | |
46775 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s); | |
46776 | ||
46777 | ||
46778 | template<class _Traits> | |
46779 | basic_ostream<char, _Traits>& | |
46780 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s); | |
46781 | ||
46782 | ||
46783 | template<class _Traits> | |
46784 | basic_ostream<char, _Traits>& | |
46785 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | |
46786 | { return (__out << reinterpret_cast<const char*>(__s)); } | |
46787 | ||
46788 | template<class _Traits> | |
46789 | basic_ostream<char, _Traits> & | |
46790 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) | |
46791 | { return (__out << reinterpret_cast<const char*>(__s)); } | |
46792 | # 497 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 3 | |
46793 | template<typename _CharT, typename _Traits> | |
46794 | basic_ostream<_CharT, _Traits>& | |
46795 | endl(basic_ostream<_CharT, _Traits>& __os) | |
46796 | { return flush(__os.put(__os.widen('\n'))); } | |
46797 | ||
46798 | ||
46799 | ||
46800 | ||
46801 | ||
46802 | ||
46803 | ||
46804 | template<typename _CharT, typename _Traits> | |
46805 | basic_ostream<_CharT, _Traits>& | |
46806 | ends(basic_ostream<_CharT, _Traits>& __os) | |
46807 | { return __os.put(_CharT()); } | |
46808 | ||
46809 | ||
46810 | ||
46811 | ||
46812 | ||
46813 | ||
46814 | template<typename _CharT, typename _Traits> | |
46815 | basic_ostream<_CharT, _Traits>& | |
46816 | flush(basic_ostream<_CharT, _Traits>& __os) | |
46817 | { return __os.flush(); } | |
46818 | ||
46819 | } | |
46820 | ||
46821 | ||
46822 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ostream.tcc" 1 3 | |
46823 | # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ostream.tcc" 3 | |
46824 | ||
46825 | # 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ostream.tcc" 3 | |
46826 | ||
46827 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/locale" 1 3 | |
46828 | # 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/locale" 3 | |
46829 | ||
46830 | # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/locale" 3 | |
46831 | #pragma GCC visibility push(default) | |
46832 | ||
46833 | ||
46834 | ||
46835 | ||
46836 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc" 1 3 | |
46837 | # 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc" 3 | |
46838 | ||
46839 | # 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc" 3 | |
46840 | ||
46841 | ||
46842 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/typeinfo" 1 3 | |
46843 | # 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/typeinfo" 3 | |
46844 | #pragma GCC visibility push(default) | |
46845 | ||
46846 | extern "C++" { | |
46847 | ||
46848 | namespace __cxxabiv1 | |
46849 | { | |
46850 | class __class_type_info; | |
46851 | } | |
46852 | # 59 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/typeinfo" 3 | |
46853 | namespace std | |
46854 | { | |
46855 | ||
46856 | ||
46857 | ||
46858 | ||
46859 | ||
46860 | ||
46861 | class type_info | |
46862 | { | |
46863 | public: | |
46864 | ||
46865 | ||
46866 | ||
46867 | ||
46868 | virtual ~type_info(); | |
46869 | ||
46870 | private: | |
46871 | ||
46872 | type_info& operator=(const type_info&); | |
46873 | type_info(const type_info&); | |
46874 | ||
46875 | protected: | |
46876 | const char *__name; | |
46877 | ||
46878 | protected: | |
46879 | explicit type_info(const char *__n): __name(__n) { } | |
46880 | ||
46881 | public: | |
46882 | ||
46883 | ||
46884 | ||
46885 | const char* name() const | |
46886 | { return __name; } | |
46887 | # 105 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/typeinfo" 3 | |
46888 | bool before(const type_info& __arg) const | |
46889 | { return __name < __arg.__name; } | |
46890 | bool operator==(const type_info& __arg) const | |
46891 | { return __name == __arg.__name; } | |
46892 | ||
46893 | bool operator!=(const type_info& __arg) const | |
46894 | { return !operator==(__arg); } | |
46895 | ||
46896 | ||
46897 | public: | |
46898 | ||
46899 | virtual bool __is_pointer_p() const; | |
46900 | ||
46901 | virtual bool __is_function_p() const; | |
46902 | ||
46903 | ||
46904 | ||
46905 | ||
46906 | ||
46907 | ||
46908 | ||
46909 | virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj, | |
46910 | unsigned __outer) const; | |
46911 | ||
46912 | ||
46913 | virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target, | |
46914 | void **__obj_ptr) const; | |
46915 | }; | |
46916 | ||
46917 | ||
46918 | ||
46919 | ||
46920 | ||
46921 | ||
46922 | class bad_cast : public exception | |
46923 | { | |
46924 | public: | |
46925 | bad_cast() throw() { } | |
46926 | ||
46927 | ||
46928 | virtual ~bad_cast() throw(); | |
46929 | }; | |
46930 | ||
46931 | ||
46932 | class bad_typeid : public exception | |
46933 | { | |
46934 | public: | |
46935 | bad_typeid () throw() { } | |
46936 | ||
46937 | ||
46938 | virtual ~bad_typeid() throw(); | |
46939 | }; | |
46940 | } | |
46941 | ||
46942 | #pragma GCC visibility pop | |
46943 | ||
46944 | } | |
46945 | # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc" 2 3 | |
46946 | ||
46947 | ||
46948 | namespace std | |
46949 | { | |
46950 | template<typename _Facet> | |
46951 | locale | |
46952 | locale::combine(const locale& __other) const | |
46953 | { | |
46954 | _Impl* __tmp = new _Impl(*_M_impl, 1); | |
46955 | try | |
46956 | { | |
46957 | __tmp->_M_replace_facet(__other._M_impl, &_Facet::id); | |
46958 | } | |
46959 | catch(...) | |
46960 | { | |
46961 | __tmp->_M_remove_reference(); | |
46962 | throw; | |
46963 | } | |
46964 | return locale(__tmp); | |
46965 | } | |
46966 | ||
46967 | template<typename _CharT, typename _Traits, typename _Alloc> | |
46968 | bool | |
46969 | locale::operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1, | |
46970 | const basic_string<_CharT, _Traits, _Alloc>& __s2) const | |
46971 | { | |
46972 | typedef std::collate<_CharT> __collate_type; | |
46973 | const __collate_type& __collate = use_facet<__collate_type>(*this); | |
46974 | return (__collate.compare(__s1.data(), __s1.data() + __s1.length(), | |
46975 | __s2.data(), __s2.data() + __s2.length()) < 0); | |
46976 | } | |
46977 | # 86 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc" 3 | |
46978 | template<typename _Facet> | |
46979 | inline bool | |
46980 | has_facet(const locale& __loc) throw() | |
46981 | { | |
46982 | const size_t __i = _Facet::id._M_id(); | |
46983 | const locale::facet** __facets = __loc._M_impl->_M_facets; | |
46984 | return (__i < __loc._M_impl->_M_facets_size && __facets[__i]); | |
46985 | } | |
46986 | # 108 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc" 3 | |
46987 | template<typename _Facet> | |
46988 | inline const _Facet& | |
46989 | use_facet(const locale& __loc) | |
46990 | { | |
46991 | const size_t __i = _Facet::id._M_id(); | |
46992 | const locale::facet** __facets = __loc._M_impl->_M_facets; | |
46993 | if (!(__i < __loc._M_impl->_M_facets_size && __facets[__i])) | |
46994 | __throw_bad_cast(); | |
46995 | return static_cast<const _Facet&>(*__facets[__i]); | |
46996 | } | |
46997 | ||
46998 | ||
46999 | ||
47000 | template<typename _Facet> | |
47001 | struct __use_cache | |
47002 | { | |
47003 | const _Facet* | |
47004 | operator() (const locale& __loc) const; | |
47005 | }; | |
47006 | ||
47007 | ||
47008 | template<typename _CharT> | |
47009 | struct __use_cache<__numpunct_cache<_CharT> > | |
47010 | { | |
47011 | const __numpunct_cache<_CharT>* | |
47012 | operator() (const locale& __loc) const | |
47013 | { | |
47014 | const size_t __i = numpunct<_CharT>::id._M_id(); | |
47015 | const locale::facet** __caches = __loc._M_impl->_M_caches; | |
47016 | if (!__caches[__i]) | |
47017 | { | |
47018 | __numpunct_cache<_CharT>* __tmp = __null; | |
47019 | try | |
47020 | { | |
47021 | __tmp = new __numpunct_cache<_CharT>; | |
47022 | __tmp->_M_cache(__loc); | |
47023 | } | |
47024 | catch(...) | |
47025 | { | |
47026 | delete __tmp; | |
47027 | throw; | |
47028 | } | |
47029 | __loc._M_impl->_M_install_cache(__tmp, __i); | |
47030 | } | |
47031 | return static_cast<const __numpunct_cache<_CharT>*>(__caches[__i]); | |
47032 | } | |
47033 | }; | |
47034 | ||
47035 | template<typename _CharT, bool _Intl> | |
47036 | struct __use_cache<__moneypunct_cache<_CharT, _Intl> > | |
47037 | { | |
47038 | const __moneypunct_cache<_CharT, _Intl>* | |
47039 | operator() (const locale& __loc) const | |
47040 | { | |
47041 | const size_t __i = moneypunct<_CharT, _Intl>::id._M_id(); | |
47042 | const locale::facet** __caches = __loc._M_impl->_M_caches; | |
47043 | if (!__caches[__i]) | |
47044 | { | |
47045 | __moneypunct_cache<_CharT, _Intl>* __tmp = __null; | |
47046 | try | |
47047 | { | |
47048 | __tmp = new __moneypunct_cache<_CharT, _Intl>; | |
47049 | __tmp->_M_cache(__loc); | |
47050 | } | |
47051 | catch(...) | |
47052 | { | |
47053 | delete __tmp; | |
47054 | throw; | |
47055 | } | |
47056 | __loc._M_impl->_M_install_cache(__tmp, __i); | |
47057 | } | |
47058 | return static_cast< | |
47059 | const __moneypunct_cache<_CharT, _Intl>*>(__caches[__i]); | |
47060 | } | |
47061 | }; | |
47062 | ||
47063 | template<typename _CharT> | |
47064 | void | |
47065 | __numpunct_cache<_CharT>::_M_cache(const locale& __loc) | |
47066 | { | |
47067 | _M_allocated = true; | |
47068 | ||
47069 | const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc); | |
47070 | ||
47071 | _M_grouping_size = __np.grouping().size(); | |
47072 | char* __grouping = new char[_M_grouping_size]; | |
47073 | __np.grouping().copy(__grouping, _M_grouping_size); | |
47074 | _M_grouping = __grouping; | |
47075 | _M_use_grouping = (_M_grouping_size | |
47076 | && static_cast<signed char>(__np.grouping()[0]) > 0); | |
47077 | ||
47078 | _M_truename_size = __np.truename().size(); | |
47079 | _CharT* __truename = new _CharT[_M_truename_size]; | |
47080 | __np.truename().copy(__truename, _M_truename_size); | |
47081 | _M_truename = __truename; | |
47082 | ||
47083 | _M_falsename_size = __np.falsename().size(); | |
47084 | _CharT* __falsename = new _CharT[_M_falsename_size]; | |
47085 | __np.falsename().copy(__falsename, _M_falsename_size); | |
47086 | _M_falsename = __falsename; | |
47087 | ||
47088 | _M_decimal_point = __np.decimal_point(); | |
47089 | _M_thousands_sep = __np.thousands_sep(); | |
47090 | ||
47091 | const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__loc); | |
47092 | __ct.widen(__num_base::_S_atoms_out, | |
47093 | __num_base::_S_atoms_out + __num_base::_S_oend, _M_atoms_out); | |
47094 | __ct.widen(__num_base::_S_atoms_in, | |
47095 | __num_base::_S_atoms_in + __num_base::_S_iend, _M_atoms_in); | |
47096 | } | |
47097 | ||
47098 | template<typename _CharT, bool _Intl> | |
47099 | void | |
47100 | __moneypunct_cache<_CharT, _Intl>::_M_cache(const locale& __loc) | |
47101 | { | |
47102 | _M_allocated = true; | |
47103 | ||
47104 | const moneypunct<_CharT, _Intl>& __mp = | |
47105 | use_facet<moneypunct<_CharT, _Intl> >(__loc); | |
47106 | ||
47107 | _M_grouping_size = __mp.grouping().size(); | |
47108 | char* __grouping = new char[_M_grouping_size]; | |
47109 | __mp.grouping().copy(__grouping, _M_grouping_size); | |
47110 | _M_grouping = __grouping; | |
47111 | _M_use_grouping = (_M_grouping_size | |
47112 | && static_cast<signed char>(__mp.grouping()[0]) > 0); | |
47113 | ||
47114 | _M_decimal_point = __mp.decimal_point(); | |
47115 | _M_thousands_sep = __mp.thousands_sep(); | |
47116 | _M_frac_digits = __mp.frac_digits(); | |
47117 | ||
47118 | _M_curr_symbol_size = __mp.curr_symbol().size(); | |
47119 | _CharT* __curr_symbol = new _CharT[_M_curr_symbol_size]; | |
47120 | __mp.curr_symbol().copy(__curr_symbol, _M_curr_symbol_size); | |
47121 | _M_curr_symbol = __curr_symbol; | |
47122 | ||
47123 | _M_positive_sign_size = __mp.positive_sign().size(); | |
47124 | _CharT* __positive_sign = new _CharT[_M_positive_sign_size]; | |
47125 | __mp.positive_sign().copy(__positive_sign, _M_positive_sign_size); | |
47126 | _M_positive_sign = __positive_sign; | |
47127 | ||
47128 | _M_negative_sign_size = __mp.negative_sign().size(); | |
47129 | _CharT* __negative_sign = new _CharT[_M_negative_sign_size]; | |
47130 | __mp.negative_sign().copy(__negative_sign, _M_negative_sign_size); | |
47131 | _M_negative_sign = __negative_sign; | |
47132 | ||
47133 | _M_pos_format = __mp.pos_format(); | |
47134 | _M_neg_format = __mp.neg_format(); | |
47135 | ||
47136 | const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__loc); | |
47137 | __ct.widen(money_base::_S_atoms, | |
47138 | money_base::_S_atoms + money_base::_S_end, _M_atoms); | |
47139 | } | |
47140 | # 271 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc" 3 | |
47141 | static bool | |
47142 | __verify_grouping(const char* __grouping, size_t __grouping_size, | |
47143 | const string& __grouping_tmp); | |
47144 | ||
47145 | template<typename _CharT, typename _InIter> | |
47146 | _InIter | |
47147 | num_get<_CharT, _InIter>:: | |
47148 | _M_extract_float(_InIter __beg, _InIter __end, ios_base& __io, | |
47149 | ios_base::iostate& __err, string& __xtrc) const | |
47150 | { | |
47151 | typedef char_traits<_CharT> __traits_type; | |
47152 | typedef __numpunct_cache<_CharT> __cache_type; | |
47153 | __use_cache<__cache_type> __uc; | |
47154 | const locale& __loc = __io._M_getloc(); | |
47155 | const __cache_type* __lc = __uc(__loc); | |
47156 | const _CharT* __lit = __lc->_M_atoms_in; | |
47157 | char_type __c = char_type(); | |
47158 | ||
47159 | ||
47160 | bool __testeof = __beg == __end; | |
47161 | ||
47162 | ||
47163 | if (!__testeof) | |
47164 | { | |
47165 | __c = *__beg; | |
47166 | const bool __plus = __c == __lit[__num_base::_S_iplus]; | |
47167 | if ((__plus || __c == __lit[__num_base::_S_iminus]) | |
47168 | && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) | |
47169 | && !(__c == __lc->_M_decimal_point)) | |
47170 | { | |
47171 | __xtrc += __plus ? '+' : '-'; | |
47172 | if (++__beg != __end) | |
47173 | __c = *__beg; | |
47174 | else | |
47175 | __testeof = true; | |
47176 | } | |
47177 | } | |
47178 | ||
47179 | ||
47180 | bool __found_mantissa = false; | |
47181 | int __sep_pos = 0; | |
47182 | while (!__testeof) | |
47183 | { | |
47184 | if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep | |
47185 | || __c == __lc->_M_decimal_point) | |
47186 | break; | |
47187 | else if (__c == __lit[__num_base::_S_izero]) | |
47188 | { | |
47189 | if (!__found_mantissa) | |
47190 | { | |
47191 | __xtrc += '0'; | |
47192 | __found_mantissa = true; | |
47193 | } | |
47194 | ++__sep_pos; | |
47195 | ||
47196 | if (++__beg != __end) | |
47197 | __c = *__beg; | |
47198 | else | |
47199 | __testeof = true; | |
47200 | } | |
47201 | else | |
47202 | break; | |
47203 | } | |
47204 | ||
47205 | ||
47206 | bool __found_dec = false; | |
47207 | bool __found_sci = false; | |
47208 | string __found_grouping; | |
47209 | if (__lc->_M_use_grouping) | |
47210 | __found_grouping.reserve(32); | |
47211 | const char_type* __q; | |
47212 | const char_type* __lit_zero = __lit + __num_base::_S_izero; | |
47213 | while (!__testeof) | |
47214 | { | |
47215 | ||
47216 | ||
47217 | if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) | |
47218 | { | |
47219 | if (!__found_dec && !__found_sci) | |
47220 | { | |
47221 | ||
47222 | ||
47223 | if (__sep_pos) | |
47224 | { | |
47225 | __found_grouping += static_cast<char>(__sep_pos); | |
47226 | __sep_pos = 0; | |
47227 | } | |
47228 | else | |
47229 | { | |
47230 | ||
47231 | ||
47232 | __xtrc.clear(); | |
47233 | break; | |
47234 | } | |
47235 | } | |
47236 | else | |
47237 | break; | |
47238 | } | |
47239 | else if (__c == __lc->_M_decimal_point) | |
47240 | { | |
47241 | if (!__found_dec && !__found_sci) | |
47242 | { | |
47243 | ||
47244 | ||
47245 | ||
47246 | if (__found_grouping.size()) | |
47247 | __found_grouping += static_cast<char>(__sep_pos); | |
47248 | __xtrc += '.'; | |
47249 | __found_dec = true; | |
47250 | } | |
47251 | else | |
47252 | break; | |
47253 | } | |
47254 | else if ((__q = __traits_type::find(__lit_zero, 10, __c))) | |
47255 | { | |
47256 | __xtrc += __num_base::_S_atoms_in[__q - __lit]; | |
47257 | __found_mantissa = true; | |
47258 | ++__sep_pos; | |
47259 | } | |
47260 | else if ((__c == __lit[__num_base::_S_ie] | |
47261 | || __c == __lit[__num_base::_S_iE]) | |
47262 | && !__found_sci && __found_mantissa) | |
47263 | { | |
47264 | ||
47265 | if (__found_grouping.size() && !__found_dec) | |
47266 | __found_grouping += static_cast<char>(__sep_pos); | |
47267 | __xtrc += 'e'; | |
47268 | __found_sci = true; | |
47269 | ||
47270 | ||
47271 | if (++__beg != __end) | |
47272 | { | |
47273 | __c = *__beg; | |
47274 | const bool __plus = __c == __lit[__num_base::_S_iplus]; | |
47275 | if ((__plus || __c == __lit[__num_base::_S_iminus]) | |
47276 | && !(__lc->_M_use_grouping | |
47277 | && __c == __lc->_M_thousands_sep) | |
47278 | && !(__c == __lc->_M_decimal_point)) | |
47279 | __xtrc += __plus ? '+' : '-'; | |
47280 | else | |
47281 | continue; | |
47282 | } | |
47283 | else | |
47284 | { | |
47285 | __testeof = true; | |
47286 | break; | |
47287 | } | |
47288 | } | |
47289 | else | |
47290 | ||
47291 | break; | |
47292 | ||
47293 | if (++__beg != __end) | |
47294 | __c = *__beg; | |
47295 | else | |
47296 | __testeof = true; | |
47297 | } | |
47298 | ||
47299 | ||
47300 | ||
47301 | if (__found_grouping.size()) | |
47302 | { | |
47303 | ||
47304 | if (!__found_dec && !__found_sci) | |
47305 | __found_grouping += static_cast<char>(__sep_pos); | |
47306 | ||
47307 | if (!std::__verify_grouping(__lc->_M_grouping, | |
47308 | __lc->_M_grouping_size, | |
47309 | __found_grouping)) | |
47310 | __err |= ios_base::failbit; | |
47311 | } | |
47312 | ||
47313 | ||
47314 | if (__testeof) | |
47315 | __err |= ios_base::eofbit; | |
47316 | return __beg; | |
47317 | } | |
47318 | ||
47319 | template<typename _ValueT> | |
47320 | struct __to_unsigned_type | |
47321 | { typedef _ValueT __type; }; | |
47322 | ||
47323 | template<> | |
47324 | struct __to_unsigned_type<long> | |
47325 | { typedef unsigned long __type; }; | |
47326 | ||
47327 | ||
47328 | template<> | |
47329 | struct __to_unsigned_type<long long> | |
47330 | { typedef unsigned long long __type; }; | |
47331 | ||
47332 | ||
47333 | template<typename _CharT, typename _InIter> | |
47334 | template<typename _ValueT> | |
47335 | _InIter | |
47336 | num_get<_CharT, _InIter>:: | |
47337 | _M_extract_int(_InIter __beg, _InIter __end, ios_base& __io, | |
47338 | ios_base::iostate& __err, _ValueT& __v) const | |
47339 | { | |
47340 | typedef char_traits<_CharT> __traits_type; | |
47341 | typedef typename __to_unsigned_type<_ValueT>::__type __unsigned_type; | |
47342 | typedef __numpunct_cache<_CharT> __cache_type; | |
47343 | __use_cache<__cache_type> __uc; | |
47344 | const locale& __loc = __io._M_getloc(); | |
47345 | const __cache_type* __lc = __uc(__loc); | |
47346 | const _CharT* __lit = __lc->_M_atoms_in; | |
47347 | char_type __c = char_type(); | |
47348 | ||
47349 | ||
47350 | const ios_base::fmtflags __basefield = __io.flags() | |
47351 | & ios_base::basefield; | |
47352 | const bool __oct = __basefield == ios_base::oct; | |
47353 | int __base = __oct ? 8 : (__basefield == ios_base::hex ? 16 : 10); | |
47354 | ||
47355 | ||
47356 | bool __testeof = __beg == __end; | |
47357 | ||
47358 | ||
47359 | bool __negative = false; | |
47360 | if (!__testeof) | |
47361 | { | |
47362 | __c = *__beg; | |
47363 | if (numeric_limits<_ValueT>::is_signed) | |
47364 | __negative = __c == __lit[__num_base::_S_iminus]; | |
47365 | if ((__negative || __c == __lit[__num_base::_S_iplus]) | |
47366 | && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) | |
47367 | && !(__c == __lc->_M_decimal_point)) | |
47368 | { | |
47369 | if (++__beg != __end) | |
47370 | __c = *__beg; | |
47371 | else | |
47372 | __testeof = true; | |
47373 | } | |
47374 | } | |
47375 | ||
47376 | ||
47377 | ||
47378 | bool __found_zero = false; | |
47379 | int __sep_pos = 0; | |
47380 | while (!__testeof) | |
47381 | { | |
47382 | if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep | |
47383 | || __c == __lc->_M_decimal_point) | |
47384 | break; | |
47385 | else if (__c == __lit[__num_base::_S_izero] | |
47386 | && (!__found_zero || __base == 10)) | |
47387 | { | |
47388 | __found_zero = true; | |
47389 | ++__sep_pos; | |
47390 | if (__basefield == 0) | |
47391 | __base = 8; | |
47392 | if (__base == 8) | |
47393 | __sep_pos = 0; | |
47394 | } | |
47395 | else if (__found_zero | |
47396 | && (__c == __lit[__num_base::_S_ix] | |
47397 | || __c == __lit[__num_base::_S_iX])) | |
47398 | { | |
47399 | if (__basefield == 0) | |
47400 | __base = 16; | |
47401 | if (__base == 16) | |
47402 | { | |
47403 | __found_zero = false; | |
47404 | __sep_pos = 0; | |
47405 | } | |
47406 | else | |
47407 | break; | |
47408 | } | |
47409 | else | |
47410 | break; | |
47411 | ||
47412 | if (++__beg != __end) | |
47413 | { | |
47414 | __c = *__beg; | |
47415 | if (!__found_zero) | |
47416 | break; | |
47417 | } | |
47418 | else | |
47419 | __testeof = true; | |
47420 | } | |
47421 | ||
47422 | ||
47423 | ||
47424 | const size_t __len = (__base == 16 ? __num_base::_S_iend | |
47425 | - __num_base::_S_izero : __base); | |
47426 | ||
47427 | ||
47428 | string __found_grouping; | |
47429 | if (__lc->_M_use_grouping) | |
47430 | __found_grouping.reserve(32); | |
47431 | bool __testfail = false; | |
47432 | const __unsigned_type __max = __negative ? | |
47433 | -numeric_limits<_ValueT>::min() : numeric_limits<_ValueT>::max(); | |
47434 | const __unsigned_type __smax = __max / __base; | |
47435 | __unsigned_type __result = 0; | |
47436 | const char_type* __q; | |
47437 | const char_type* __lit_zero = __lit + __num_base::_S_izero; | |
47438 | while (!__testeof) | |
47439 | { | |
47440 | ||
47441 | ||
47442 | if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) | |
47443 | { | |
47444 | ||
47445 | ||
47446 | if (__sep_pos) | |
47447 | { | |
47448 | __found_grouping += static_cast<char>(__sep_pos); | |
47449 | __sep_pos = 0; | |
47450 | } | |
47451 | else | |
47452 | { | |
47453 | __testfail = true; | |
47454 | break; | |
47455 | } | |
47456 | } | |
47457 | else if (__c == __lc->_M_decimal_point) | |
47458 | break; | |
47459 | else if ((__q = __traits_type::find(__lit_zero, __len, __c))) | |
47460 | { | |
47461 | int __digit = __q - __lit_zero; | |
47462 | if (__digit > 15) | |
47463 | __digit -= 6; | |
47464 | if (__result > __smax) | |
47465 | __testfail = true; | |
47466 | else | |
47467 | { | |
47468 | __result *= __base; | |
47469 | __testfail |= __result > __max - __digit; | |
47470 | __result += __digit; | |
47471 | ++__sep_pos; | |
47472 | } | |
47473 | } | |
47474 | else | |
47475 | ||
47476 | break; | |
47477 | ||
47478 | if (++__beg != __end) | |
47479 | __c = *__beg; | |
47480 | else | |
47481 | __testeof = true; | |
47482 | } | |
47483 | ||
47484 | ||
47485 | ||
47486 | if (__found_grouping.size()) | |
47487 | { | |
47488 | ||
47489 | __found_grouping += static_cast<char>(__sep_pos); | |
47490 | ||
47491 | if (!std::__verify_grouping(__lc->_M_grouping, | |
47492 | __lc->_M_grouping_size, | |
47493 | __found_grouping)) | |
47494 | __err |= ios_base::failbit; | |
47495 | } | |
47496 | ||
47497 | if (!__testfail && (__sep_pos || __found_zero | |
47498 | || __found_grouping.size())) | |
47499 | __v = __negative ? -__result : __result; | |
47500 | else | |
47501 | __err |= ios_base::failbit; | |
47502 | ||
47503 | if (__testeof) | |
47504 | __err |= ios_base::eofbit; | |
47505 | return __beg; | |
47506 | } | |
47507 | ||
47508 | ||
47509 | ||
47510 | template<typename _CharT, typename _InIter> | |
47511 | _InIter | |
47512 | num_get<_CharT, _InIter>:: | |
47513 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
47514 | ios_base::iostate& __err, bool& __v) const | |
47515 | { | |
47516 | if (!(__io.flags() & ios_base::boolalpha)) | |
47517 | { | |
47518 | ||
47519 | ||
47520 | ||
47521 | long __l = -1; | |
47522 | __beg = _M_extract_int(__beg, __end, __io, __err, __l); | |
47523 | if (__l == 0 || __l == 1) | |
47524 | __v = __l; | |
47525 | else | |
47526 | __err |= ios_base::failbit; | |
47527 | } | |
47528 | else | |
47529 | { | |
47530 | ||
47531 | typedef __numpunct_cache<_CharT> __cache_type; | |
47532 | __use_cache<__cache_type> __uc; | |
47533 | const locale& __loc = __io._M_getloc(); | |
47534 | const __cache_type* __lc = __uc(__loc); | |
47535 | ||
47536 | bool __testf = true; | |
47537 | bool __testt = true; | |
47538 | size_t __n; | |
47539 | bool __testeof = __beg == __end; | |
47540 | for (__n = 0; !__testeof; ++__n) | |
47541 | { | |
47542 | const char_type __c = *__beg; | |
47543 | ||
47544 | if (__testf) | |
47545 | if (__n < __lc->_M_falsename_size) | |
47546 | __testf = __c == __lc->_M_falsename[__n]; | |
47547 | else | |
47548 | break; | |
47549 | ||
47550 | if (__testt) | |
47551 | if (__n < __lc->_M_truename_size) | |
47552 | __testt = __c == __lc->_M_truename[__n]; | |
47553 | else | |
47554 | break; | |
47555 | ||
47556 | if (!__testf && !__testt) | |
47557 | break; | |
47558 | ||
47559 | if (++__beg == __end) | |
47560 | __testeof = true; | |
47561 | } | |
47562 | if (__testf && __n == __lc->_M_falsename_size) | |
47563 | __v = 0; | |
47564 | else if (__testt && __n == __lc->_M_truename_size) | |
47565 | __v = 1; | |
47566 | else | |
47567 | __err |= ios_base::failbit; | |
47568 | ||
47569 | if (__testeof) | |
47570 | __err |= ios_base::eofbit; | |
47571 | } | |
47572 | return __beg; | |
47573 | } | |
47574 | ||
47575 | template<typename _CharT, typename _InIter> | |
47576 | _InIter | |
47577 | num_get<_CharT, _InIter>:: | |
47578 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
47579 | ios_base::iostate& __err, long& __v) const | |
47580 | { return _M_extract_int(__beg, __end, __io, __err, __v); } | |
47581 | ||
47582 | template<typename _CharT, typename _InIter> | |
47583 | _InIter | |
47584 | num_get<_CharT, _InIter>:: | |
47585 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
47586 | ios_base::iostate& __err, unsigned short& __v) const | |
47587 | { return _M_extract_int(__beg, __end, __io, __err, __v); } | |
47588 | ||
47589 | template<typename _CharT, typename _InIter> | |
47590 | _InIter | |
47591 | num_get<_CharT, _InIter>:: | |
47592 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
47593 | ios_base::iostate& __err, unsigned int& __v) const | |
47594 | { return _M_extract_int(__beg, __end, __io, __err, __v); } | |
47595 | ||
47596 | template<typename _CharT, typename _InIter> | |
47597 | _InIter | |
47598 | num_get<_CharT, _InIter>:: | |
47599 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
47600 | ios_base::iostate& __err, unsigned long& __v) const | |
47601 | { return _M_extract_int(__beg, __end, __io, __err, __v); } | |
47602 | ||
47603 | ||
47604 | template<typename _CharT, typename _InIter> | |
47605 | _InIter | |
47606 | num_get<_CharT, _InIter>:: | |
47607 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
47608 | ios_base::iostate& __err, long long& __v) const | |
47609 | { return _M_extract_int(__beg, __end, __io, __err, __v); } | |
47610 | ||
47611 | template<typename _CharT, typename _InIter> | |
47612 | _InIter | |
47613 | num_get<_CharT, _InIter>:: | |
47614 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
47615 | ios_base::iostate& __err, unsigned long long& __v) const | |
47616 | { return _M_extract_int(__beg, __end, __io, __err, __v); } | |
47617 | ||
47618 | ||
47619 | template<typename _CharT, typename _InIter> | |
47620 | _InIter | |
47621 | num_get<_CharT, _InIter>:: | |
47622 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
47623 | ios_base::iostate& __err, float& __v) const | |
47624 | { | |
47625 | string __xtrc; | |
47626 | __xtrc.reserve(32); | |
47627 | __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); | |
47628 | std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); | |
47629 | return __beg; | |
47630 | } | |
47631 | ||
47632 | template<typename _CharT, typename _InIter> | |
47633 | _InIter | |
47634 | num_get<_CharT, _InIter>:: | |
47635 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
47636 | ios_base::iostate& __err, double& __v) const | |
47637 | { | |
47638 | string __xtrc; | |
47639 | __xtrc.reserve(32); | |
47640 | __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); | |
47641 | std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); | |
47642 | return __beg; | |
47643 | } | |
47644 | ||
47645 | template<typename _CharT, typename _InIter> | |
47646 | _InIter | |
47647 | num_get<_CharT, _InIter>:: | |
47648 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
47649 | ios_base::iostate& __err, long double& __v) const | |
47650 | { | |
47651 | string __xtrc; | |
47652 | __xtrc.reserve(32); | |
47653 | __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); | |
47654 | std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); | |
47655 | return __beg; | |
47656 | } | |
47657 | ||
47658 | template<typename _CharT, typename _InIter> | |
47659 | _InIter | |
47660 | num_get<_CharT, _InIter>:: | |
47661 | do_get(iter_type __beg, iter_type __end, ios_base& __io, | |
47662 | ios_base::iostate& __err, void*& __v) const | |
47663 | { | |
47664 | ||
47665 | typedef ios_base::fmtflags fmtflags; | |
47666 | const fmtflags __fmt = __io.flags(); | |
47667 | __io.flags(__fmt & ~ios_base::basefield | ios_base::hex); | |
47668 | ||
47669 | unsigned long __ul; | |
47670 | __beg = _M_extract_int(__beg, __end, __io, __err, __ul); | |
47671 | ||
47672 | ||
47673 | __io.flags(__fmt); | |
47674 | ||
47675 | if (!(__err & ios_base::failbit)) | |
47676 | __v = reinterpret_cast<void*>(__ul); | |
47677 | return __beg; | |
47678 | } | |
47679 | ||
47680 | ||
47681 | ||
47682 | template<typename _CharT, typename _OutIter> | |
47683 | void | |
47684 | num_put<_CharT, _OutIter>:: | |
47685 | _M_pad(_CharT __fill, streamsize __w, ios_base& __io, | |
47686 | _CharT* __new, const _CharT* __cs, int& __len) const | |
47687 | { | |
47688 | ||
47689 | ||
47690 | __pad<_CharT, char_traits<_CharT> >::_S_pad(__io, __fill, __new, __cs, | |
47691 | __w, __len, true); | |
47692 | __len = static_cast<int>(__w); | |
47693 | } | |
47694 | ||
47695 | ||
47696 | ||
47697 | ||
47698 | template<typename _CharT> | |
47699 | inline int | |
47700 | __int_to_char(_CharT* __bufend, long __v, const _CharT* __lit, | |
47701 | ios_base::fmtflags __flags) | |
47702 | { | |
47703 | unsigned long __ul = __v; | |
47704 | const ios_base::fmtflags __basefield = __flags & ios_base::basefield; | |
47705 | if (__builtin_expect(__basefield != ios_base::oct | |
47706 | && __basefield != ios_base::hex, true)) | |
47707 | __ul = __v < 0 ? -__v : __ul; | |
47708 | return __int_to_char(__bufend, __ul, __lit, __flags, false); | |
47709 | } | |
47710 | ||
47711 | template<typename _CharT> | |
47712 | inline int | |
47713 | __int_to_char(_CharT* __bufend, unsigned long __v, const _CharT* __lit, | |
47714 | ios_base::fmtflags __flags) | |
47715 | { return __int_to_char(__bufend, __v, __lit, __flags, false); } | |
47716 | ||
47717 | ||
47718 | template<typename _CharT> | |
47719 | inline int | |
47720 | __int_to_char(_CharT* __bufend, long long __v, const _CharT* __lit, | |
47721 | ios_base::fmtflags __flags) | |
47722 | { | |
47723 | unsigned long long __ull = __v; | |
47724 | const ios_base::fmtflags __basefield = __flags & ios_base::basefield; | |
47725 | if (__builtin_expect(__basefield != ios_base::oct | |
47726 | && __basefield != ios_base::hex, true)) | |
47727 | __ull = __v < 0 ? -__v : __ull; | |
47728 | return __int_to_char(__bufend, __ull, __lit, __flags, false); | |
47729 | } | |
47730 | ||
47731 | template<typename _CharT> | |
47732 | inline int | |
47733 | __int_to_char(_CharT* __bufend, unsigned long long __v, | |
47734 | const _CharT* __lit, ios_base::fmtflags __flags) | |
47735 | { return __int_to_char(__bufend, __v, __lit, __flags, false); } | |
47736 | ||
47737 | ||
47738 | ||
47739 | template<typename _CharT, typename _ValueT> | |
47740 | int | |
47741 | __int_to_char(_CharT* __bufend, _ValueT __v, const _CharT* __lit, | |
47742 | ios_base::fmtflags __flags, bool) | |
47743 | { | |
47744 | const ios_base::fmtflags __basefield = __flags & ios_base::basefield; | |
47745 | _CharT* __buf = __bufend; | |
47746 | ||
47747 | if (__builtin_expect(__basefield != ios_base::oct | |
47748 | && __basefield != ios_base::hex, true)) | |
47749 | { | |
47750 | ||
47751 | do | |
47752 | { | |
47753 | *--__buf = __lit[(__v % 10) + __num_base::_S_odigits]; | |
47754 | __v /= 10; | |
47755 | } | |
47756 | while (__v != 0); | |
47757 | } | |
47758 | else if (__basefield == ios_base::oct) | |
47759 | { | |
47760 | ||
47761 | do | |
47762 | { | |
47763 | *--__buf = __lit[(__v & 0x7) + __num_base::_S_odigits]; | |
47764 | __v >>= 3; | |
47765 | } | |
47766 | while (__v != 0); | |
47767 | } | |
47768 | else | |
47769 | { | |
47770 | ||
47771 | const bool __uppercase = __flags & ios_base::uppercase; | |
47772 | const int __case_offset = __uppercase ? __num_base::_S_oudigits | |
47773 | : __num_base::_S_odigits; | |
47774 | do | |
47775 | { | |
47776 | *--__buf = __lit[(__v & 0xf) + __case_offset]; | |
47777 | __v >>= 4; | |
47778 | } | |
47779 | while (__v != 0); | |
47780 | } | |
47781 | return __bufend - __buf; | |
47782 | } | |
47783 | ||
47784 | template<typename _CharT, typename _OutIter> | |
47785 | void | |
47786 | num_put<_CharT, _OutIter>:: | |
47787 | _M_group_int(const char* __grouping, size_t __grouping_size, _CharT __sep, | |
47788 | ios_base&, _CharT* __new, _CharT* __cs, int& __len) const | |
47789 | { | |
47790 | _CharT* __p = std::__add_grouping(__new, __sep, __grouping, | |
47791 | __grouping_size, __cs, __cs + __len); | |
47792 | __len = __p - __new; | |
47793 | } | |
47794 | ||
47795 | template<typename _CharT, typename _OutIter> | |
47796 | template<typename _ValueT> | |
47797 | _OutIter | |
47798 | num_put<_CharT, _OutIter>:: | |
47799 | _M_insert_int(_OutIter __s, ios_base& __io, _CharT __fill, | |
47800 | _ValueT __v) const | |
47801 | { | |
47802 | typedef __numpunct_cache<_CharT> __cache_type; | |
47803 | __use_cache<__cache_type> __uc; | |
47804 | const locale& __loc = __io._M_getloc(); | |
47805 | const __cache_type* __lc = __uc(__loc); | |
47806 | const _CharT* __lit = __lc->_M_atoms_out; | |
47807 | const ios_base::fmtflags __flags = __io.flags(); | |
47808 | ||
47809 | ||
47810 | const int __ilen = 5 * sizeof(_ValueT); | |
47811 | _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
47812 | * __ilen)); | |
47813 | ||
47814 | ||
47815 | ||
47816 | int __len = __int_to_char(__cs + __ilen, __v, __lit, __flags); | |
47817 | __cs += __ilen - __len; | |
47818 | ||
47819 | ||
47820 | if (__lc->_M_use_grouping) | |
47821 | { | |
47822 | ||
47823 | ||
47824 | _CharT* __cs2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
47825 | * (__len + 1) | |
47826 | * 2)); | |
47827 | _M_group_int(__lc->_M_grouping, __lc->_M_grouping_size, | |
47828 | __lc->_M_thousands_sep, __io, __cs2 + 2, __cs, __len); | |
47829 | __cs = __cs2 + 2; | |
47830 | } | |
47831 | ||
47832 | ||
47833 | const ios_base::fmtflags __basefield = __flags & ios_base::basefield; | |
47834 | if (__builtin_expect(__basefield != ios_base::oct | |
47835 | && __basefield != ios_base::hex, true)) | |
47836 | { | |
47837 | ||
47838 | if (__v > 0) | |
47839 | { | |
47840 | if (__flags & ios_base::showpos | |
47841 | && numeric_limits<_ValueT>::is_signed) | |
47842 | *--__cs = __lit[__num_base::_S_oplus], ++__len; | |
47843 | } | |
47844 | else if (__v) | |
47845 | *--__cs = __lit[__num_base::_S_ominus], ++__len; | |
47846 | } | |
47847 | else if (__flags & ios_base::showbase && __v) | |
47848 | { | |
47849 | if (__basefield == ios_base::oct) | |
47850 | *--__cs = __lit[__num_base::_S_odigits], ++__len; | |
47851 | else | |
47852 | { | |
47853 | ||
47854 | const bool __uppercase = __flags & ios_base::uppercase; | |
47855 | *--__cs = __lit[__num_base::_S_ox + __uppercase]; | |
47856 | ||
47857 | *--__cs = __lit[__num_base::_S_odigits]; | |
47858 | __len += 2; | |
47859 | } | |
47860 | } | |
47861 | ||
47862 | ||
47863 | const streamsize __w = __io.width(); | |
47864 | if (__w > static_cast<streamsize>(__len)) | |
47865 | { | |
47866 | _CharT* __cs3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
47867 | * __w)); | |
47868 | _M_pad(__fill, __w, __io, __cs3, __cs, __len); | |
47869 | __cs = __cs3; | |
47870 | } | |
47871 | __io.width(0); | |
47872 | ||
47873 | ||
47874 | ||
47875 | return std::__write(__s, __cs, __len); | |
47876 | } | |
47877 | ||
47878 | template<typename _CharT, typename _OutIter> | |
47879 | void | |
47880 | num_put<_CharT, _OutIter>:: | |
47881 | _M_group_float(const char* __grouping, size_t __grouping_size, | |
47882 | _CharT __sep, const _CharT* __p, _CharT* __new, | |
47883 | _CharT* __cs, int& __len) const | |
47884 | { | |
47885 | ||
47886 | ||
47887 | ||
47888 | const int __declen = __p ? __p - __cs : __len; | |
47889 | _CharT* __p2 = std::__add_grouping(__new, __sep, __grouping, | |
47890 | __grouping_size, | |
47891 | __cs, __cs + __declen); | |
47892 | ||
47893 | ||
47894 | int __newlen = __p2 - __new; | |
47895 | if (__p) | |
47896 | { | |
47897 | char_traits<_CharT>::copy(__p2, __p, __len - __declen); | |
47898 | __newlen += __len - __declen; | |
47899 | } | |
47900 | __len = __newlen; | |
47901 | } | |
47902 | # 1043 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc" 3 | |
47903 | template<typename _CharT, typename _OutIter> | |
47904 | template<typename _ValueT> | |
47905 | _OutIter | |
47906 | num_put<_CharT, _OutIter>:: | |
47907 | _M_insert_float(_OutIter __s, ios_base& __io, _CharT __fill, char __mod, | |
47908 | _ValueT __v) const | |
47909 | { | |
47910 | typedef __numpunct_cache<_CharT> __cache_type; | |
47911 | __use_cache<__cache_type> __uc; | |
47912 | const locale& __loc = __io._M_getloc(); | |
47913 | const __cache_type* __lc = __uc(__loc); | |
47914 | ||
47915 | ||
47916 | streamsize __prec = __io.precision(); | |
47917 | if (__prec < static_cast<streamsize>(0)) | |
47918 | __prec = static_cast<streamsize>(6); | |
47919 | ||
47920 | const int __max_digits = numeric_limits<_ValueT>::digits10; | |
47921 | ||
47922 | ||
47923 | int __len; | |
47924 | ||
47925 | char __fbuf[16]; | |
47926 | ||
47927 | ||
47928 | ||
47929 | ||
47930 | int __cs_size = __max_digits * 3; | |
47931 | char* __cs = static_cast<char*>(__builtin_alloca(__cs_size)); | |
47932 | ||
47933 | __num_base::_S_format_float(__io, __fbuf, __mod); | |
47934 | __len = std::__convert_from_v(__cs, __cs_size, __fbuf, __v, | |
47935 | _S_get_c_locale(), __prec); | |
47936 | ||
47937 | ||
47938 | if (__len >= __cs_size) | |
47939 | { | |
47940 | __cs_size = __len + 1; | |
47941 | __cs = static_cast<char*>(__builtin_alloca(__cs_size)); | |
47942 | __len = std::__convert_from_v(__cs, __cs_size, __fbuf, __v, | |
47943 | _S_get_c_locale(), __prec); | |
47944 | } | |
47945 | # 1107 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc" 3 | |
47946 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
47947 | ||
47948 | _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
47949 | * __len)); | |
47950 | __ctype.widen(__cs, __cs + __len, __ws); | |
47951 | ||
47952 | ||
47953 | const _CharT __cdec = __ctype.widen('.'); | |
47954 | const _CharT __dec = __lc->_M_decimal_point; | |
47955 | const _CharT* __p = char_traits<_CharT>::find(__ws, __len, __cdec); | |
47956 | if (__p) | |
47957 | __ws[__p - __ws] = __dec; | |
47958 | ||
47959 | ||
47960 | ||
47961 | ||
47962 | if (__lc->_M_use_grouping | |
47963 | && (__p || __len < 3 || (__cs[1] <= '9' && __cs[2] <= '9' | |
47964 | && __cs[1] >= '0' && __cs[2] >= '0'))) | |
47965 | { | |
47966 | ||
47967 | ||
47968 | _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
47969 | * __len * 2)); | |
47970 | ||
47971 | streamsize __off = 0; | |
47972 | if (__cs[0] == '-' || __cs[0] == '+') | |
47973 | { | |
47974 | __off = 1; | |
47975 | __ws2[0] = __ws[0]; | |
47976 | __len -= 1; | |
47977 | } | |
47978 | ||
47979 | _M_group_float(__lc->_M_grouping, __lc->_M_grouping_size, | |
47980 | __lc->_M_thousands_sep, __p, __ws2 + __off, | |
47981 | __ws + __off, __len); | |
47982 | __len += __off; | |
47983 | ||
47984 | __ws = __ws2; | |
47985 | } | |
47986 | ||
47987 | ||
47988 | const streamsize __w = __io.width(); | |
47989 | if (__w > static_cast<streamsize>(__len)) | |
47990 | { | |
47991 | _CharT* __ws3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
47992 | * __w)); | |
47993 | _M_pad(__fill, __w, __io, __ws3, __ws, __len); | |
47994 | __ws = __ws3; | |
47995 | } | |
47996 | __io.width(0); | |
47997 | ||
47998 | ||
47999 | ||
48000 | return std::__write(__s, __ws, __len); | |
48001 | } | |
48002 | ||
48003 | template<typename _CharT, typename _OutIter> | |
48004 | _OutIter | |
48005 | num_put<_CharT, _OutIter>:: | |
48006 | do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const | |
48007 | { | |
48008 | const ios_base::fmtflags __flags = __io.flags(); | |
48009 | if ((__flags & ios_base::boolalpha) == 0) | |
48010 | { | |
48011 | const long __l = __v; | |
48012 | __s = _M_insert_int(__s, __io, __fill, __l); | |
48013 | } | |
48014 | else | |
48015 | { | |
48016 | typedef __numpunct_cache<_CharT> __cache_type; | |
48017 | __use_cache<__cache_type> __uc; | |
48018 | const locale& __loc = __io._M_getloc(); | |
48019 | const __cache_type* __lc = __uc(__loc); | |
48020 | ||
48021 | const _CharT* __name = __v ? __lc->_M_truename | |
48022 | : __lc->_M_falsename; | |
48023 | int __len = __v ? __lc->_M_truename_size | |
48024 | : __lc->_M_falsename_size; | |
48025 | ||
48026 | const streamsize __w = __io.width(); | |
48027 | if (__w > static_cast<streamsize>(__len)) | |
48028 | { | |
48029 | _CharT* __cs | |
48030 | = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
48031 | * __w)); | |
48032 | _M_pad(__fill, __w, __io, __cs, __name, __len); | |
48033 | __name = __cs; | |
48034 | } | |
48035 | __io.width(0); | |
48036 | __s = std::__write(__s, __name, __len); | |
48037 | } | |
48038 | return __s; | |
48039 | } | |
48040 | ||
48041 | template<typename _CharT, typename _OutIter> | |
48042 | _OutIter | |
48043 | num_put<_CharT, _OutIter>:: | |
48044 | do_put(iter_type __s, ios_base& __io, char_type __fill, long __v) const | |
48045 | { return _M_insert_int(__s, __io, __fill, __v); } | |
48046 | ||
48047 | template<typename _CharT, typename _OutIter> | |
48048 | _OutIter | |
48049 | num_put<_CharT, _OutIter>:: | |
48050 | do_put(iter_type __s, ios_base& __io, char_type __fill, | |
48051 | unsigned long __v) const | |
48052 | { return _M_insert_int(__s, __io, __fill, __v); } | |
48053 | ||
48054 | ||
48055 | template<typename _CharT, typename _OutIter> | |
48056 | _OutIter | |
48057 | num_put<_CharT, _OutIter>:: | |
48058 | do_put(iter_type __s, ios_base& __io, char_type __fill, long long __v) const | |
48059 | { return _M_insert_int(__s, __io, __fill, __v); } | |
48060 | ||
48061 | template<typename _CharT, typename _OutIter> | |
48062 | _OutIter | |
48063 | num_put<_CharT, _OutIter>:: | |
48064 | do_put(iter_type __s, ios_base& __io, char_type __fill, | |
48065 | unsigned long long __v) const | |
48066 | { return _M_insert_int(__s, __io, __fill, __v); } | |
48067 | ||
48068 | ||
48069 | template<typename _CharT, typename _OutIter> | |
48070 | _OutIter | |
48071 | num_put<_CharT, _OutIter>:: | |
48072 | do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const | |
48073 | { return _M_insert_float(__s, __io, __fill, char(), __v); } | |
48074 | ||
48075 | template<typename _CharT, typename _OutIter> | |
48076 | _OutIter | |
48077 | num_put<_CharT, _OutIter>:: | |
48078 | do_put(iter_type __s, ios_base& __io, char_type __fill, | |
48079 | long double __v) const | |
48080 | { return _M_insert_float(__s, __io, __fill, 'L', __v); } | |
48081 | ||
48082 | template<typename _CharT, typename _OutIter> | |
48083 | _OutIter | |
48084 | num_put<_CharT, _OutIter>:: | |
48085 | do_put(iter_type __s, ios_base& __io, char_type __fill, | |
48086 | const void* __v) const | |
48087 | { | |
48088 | const ios_base::fmtflags __flags = __io.flags(); | |
48089 | const ios_base::fmtflags __fmt = ~(ios_base::basefield | |
48090 | | ios_base::uppercase | |
48091 | | ios_base::internal); | |
48092 | __io.flags(__flags & __fmt | (ios_base::hex | ios_base::showbase)); | |
48093 | ||
48094 | __s = _M_insert_int(__s, __io, __fill, | |
48095 | reinterpret_cast<unsigned long>(__v)); | |
48096 | __io.flags(__flags); | |
48097 | return __s; | |
48098 | } | |
48099 | ||
48100 | template<typename _CharT, typename _InIter> | |
48101 | template<bool _Intl> | |
48102 | _InIter | |
48103 | money_get<_CharT, _InIter>:: | |
48104 | _M_extract(iter_type __beg, iter_type __end, ios_base& __io, | |
48105 | ios_base::iostate& __err, string& __units) const | |
48106 | { | |
48107 | typedef char_traits<_CharT> __traits_type; | |
48108 | typedef typename string_type::size_type size_type; | |
48109 | typedef money_base::part part; | |
48110 | typedef __moneypunct_cache<_CharT, _Intl> __cache_type; | |
48111 | ||
48112 | const locale& __loc = __io._M_getloc(); | |
48113 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
48114 | ||
48115 | __use_cache<__cache_type> __uc; | |
48116 | const __cache_type* __lc = __uc(__loc); | |
48117 | const char_type* __lit = __lc->_M_atoms; | |
48118 | ||
48119 | ||
48120 | bool __negative = false; | |
48121 | ||
48122 | size_type __sign_size = 0; | |
48123 | ||
48124 | const bool __mandatory_sign = (__lc->_M_positive_sign_size | |
48125 | && __lc->_M_negative_sign_size); | |
48126 | ||
48127 | string __grouping_tmp; | |
48128 | if (__lc->_M_use_grouping) | |
48129 | __grouping_tmp.reserve(32); | |
48130 | ||
48131 | int __last_pos = 0; | |
48132 | ||
48133 | int __n = 0; | |
48134 | ||
48135 | bool __testvalid = true; | |
48136 | ||
48137 | bool __testdecfound = false; | |
48138 | ||
48139 | ||
48140 | string __res; | |
48141 | __res.reserve(32); | |
48142 | ||
48143 | const char_type* __lit_zero = __lit + money_base::_S_zero; | |
48144 | const money_base::pattern __p = __lc->_M_neg_format; | |
48145 | for (int __i = 0; __i < 4 && __testvalid; ++__i) | |
48146 | { | |
48147 | const part __which = static_cast<part>(__p.field[__i]); | |
48148 | switch (__which) | |
48149 | { | |
48150 | case money_base::symbol: | |
48151 | ||
48152 | ||
48153 | ||
48154 | ||
48155 | if (__io.flags() & ios_base::showbase || __sign_size > 1 | |
48156 | || __i == 0 | |
48157 | || (__i == 1 && (__mandatory_sign | |
48158 | || (static_cast<part>(__p.field[0]) | |
48159 | == money_base::sign) | |
48160 | || (static_cast<part>(__p.field[2]) | |
48161 | == money_base::space))) | |
48162 | || (__i == 2 && ((static_cast<part>(__p.field[3]) | |
48163 | == money_base::value) | |
48164 | || __mandatory_sign | |
48165 | && (static_cast<part>(__p.field[3]) | |
48166 | == money_base::sign)))) | |
48167 | { | |
48168 | const size_type __len = __lc->_M_curr_symbol_size; | |
48169 | size_type __j = 0; | |
48170 | for (; __beg != __end && __j < __len | |
48171 | && *__beg == __lc->_M_curr_symbol[__j]; | |
48172 | ++__beg, ++__j); | |
48173 | if (__j != __len | |
48174 | && (__j || __io.flags() & ios_base::showbase)) | |
48175 | __testvalid = false; | |
48176 | } | |
48177 | break; | |
48178 | case money_base::sign: | |
48179 | ||
48180 | if (__lc->_M_positive_sign_size && __beg != __end | |
48181 | && *__beg == __lc->_M_positive_sign[0]) | |
48182 | { | |
48183 | __sign_size = __lc->_M_positive_sign_size; | |
48184 | ++__beg; | |
48185 | } | |
48186 | else if (__lc->_M_negative_sign_size && __beg != __end | |
48187 | && *__beg == __lc->_M_negative_sign[0]) | |
48188 | { | |
48189 | __negative = true; | |
48190 | __sign_size = __lc->_M_negative_sign_size; | |
48191 | ++__beg; | |
48192 | } | |
48193 | else if (__lc->_M_positive_sign_size | |
48194 | && !__lc->_M_negative_sign_size) | |
48195 | ||
48196 | ||
48197 | __negative = true; | |
48198 | else if (__mandatory_sign) | |
48199 | __testvalid = false; | |
48200 | break; | |
48201 | case money_base::value: | |
48202 | ||
48203 | ||
48204 | for (; __beg != __end; ++__beg) | |
48205 | { | |
48206 | const char_type __c = *__beg; | |
48207 | const char_type* __q = __traits_type::find(__lit_zero, | |
48208 | 10, __c); | |
48209 | if (__q != 0) | |
48210 | { | |
48211 | __res += money_base::_S_atoms[__q - __lit]; | |
48212 | ++__n; | |
48213 | } | |
48214 | else if (__c == __lc->_M_decimal_point | |
48215 | && !__testdecfound) | |
48216 | { | |
48217 | __last_pos = __n; | |
48218 | __n = 0; | |
48219 | __testdecfound = true; | |
48220 | } | |
48221 | else if (__lc->_M_use_grouping | |
48222 | && __c == __lc->_M_thousands_sep | |
48223 | && !__testdecfound) | |
48224 | { | |
48225 | if (__n) | |
48226 | { | |
48227 | ||
48228 | __grouping_tmp += static_cast<char>(__n); | |
48229 | __n = 0; | |
48230 | } | |
48231 | else | |
48232 | { | |
48233 | __testvalid = false; | |
48234 | break; | |
48235 | } | |
48236 | } | |
48237 | else | |
48238 | break; | |
48239 | } | |
48240 | if (__res.empty()) | |
48241 | __testvalid = false; | |
48242 | break; | |
48243 | case money_base::space: | |
48244 | ||
48245 | if (__beg != __end && __ctype.is(ctype_base::space, *__beg)) | |
48246 | ++__beg; | |
48247 | else | |
48248 | __testvalid = false; | |
48249 | case money_base::none: | |
48250 | ||
48251 | if (__i != 3) | |
48252 | for (; __beg != __end | |
48253 | && __ctype.is(ctype_base::space, *__beg); ++__beg); | |
48254 | break; | |
48255 | } | |
48256 | } | |
48257 | ||
48258 | ||
48259 | if (__sign_size > 1 && __testvalid) | |
48260 | { | |
48261 | const char_type* __sign = __negative ? __lc->_M_negative_sign | |
48262 | : __lc->_M_positive_sign; | |
48263 | size_type __i = 1; | |
48264 | for (; __beg != __end && __i < __sign_size | |
48265 | && *__beg == __sign[__i]; ++__beg, ++__i); | |
48266 | ||
48267 | if (__i != __sign_size) | |
48268 | __testvalid = false; | |
48269 | } | |
48270 | ||
48271 | if (__testvalid) | |
48272 | { | |
48273 | ||
48274 | if (__res.size() > 1) | |
48275 | { | |
48276 | const size_type __first = __res.find_first_not_of('0'); | |
48277 | const bool __only_zeros = __first == string::npos; | |
48278 | if (__first) | |
48279 | __res.erase(0, __only_zeros ? __res.size() - 1 : __first); | |
48280 | } | |
48281 | ||
48282 | ||
48283 | if (__negative && __res[0] != '0') | |
48284 | __res.insert(__res.begin(), '-'); | |
48285 | ||
48286 | ||
48287 | if (__grouping_tmp.size()) | |
48288 | { | |
48289 | ||
48290 | __grouping_tmp += static_cast<char>(__testdecfound ? __last_pos | |
48291 | : __n); | |
48292 | if (!std::__verify_grouping(__lc->_M_grouping, | |
48293 | __lc->_M_grouping_size, | |
48294 | __grouping_tmp)) | |
48295 | __err |= ios_base::failbit; | |
48296 | } | |
48297 | ||
48298 | ||
48299 | if (__testdecfound && __lc->_M_frac_digits > 0 | |
48300 | && __n != __lc->_M_frac_digits) | |
48301 | __testvalid = false; | |
48302 | } | |
48303 | ||
48304 | ||
48305 | if (!__testvalid) | |
48306 | __err |= ios_base::failbit; | |
48307 | else | |
48308 | __units.swap(__res); | |
48309 | ||
48310 | ||
48311 | if (__beg == __end) | |
48312 | __err |= ios_base::eofbit; | |
48313 | return __beg; | |
48314 | } | |
48315 | ||
48316 | template<typename _CharT, typename _InIter> | |
48317 | _InIter | |
48318 | money_get<_CharT, _InIter>:: | |
48319 | do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io, | |
48320 | ios_base::iostate& __err, long double& __units) const | |
48321 | { | |
48322 | string __str; | |
48323 | if (__intl) | |
48324 | __beg = _M_extract<true>(__beg, __end, __io, __err, __str); | |
48325 | else | |
48326 | __beg = _M_extract<false>(__beg, __end, __io, __err, __str); | |
48327 | std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale()); | |
48328 | return __beg; | |
48329 | } | |
48330 | ||
48331 | template<typename _CharT, typename _InIter> | |
48332 | _InIter | |
48333 | money_get<_CharT, _InIter>:: | |
48334 | do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io, | |
48335 | ios_base::iostate& __err, string_type& __units) const | |
48336 | { | |
48337 | typedef typename string::size_type size_type; | |
48338 | ||
48339 | const locale& __loc = __io._M_getloc(); | |
48340 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
48341 | ||
48342 | string __str; | |
48343 | const iter_type __ret = __intl ? _M_extract<true>(__beg, __end, __io, | |
48344 | __err, __str) | |
48345 | : _M_extract<false>(__beg, __end, __io, | |
48346 | __err, __str); | |
48347 | const size_type __len = __str.size(); | |
48348 | if (__len) | |
48349 | { | |
48350 | _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
48351 | * __len)); | |
48352 | __ctype.widen(__str.data(), __str.data() + __len, __ws); | |
48353 | __units.assign(__ws, __len); | |
48354 | } | |
48355 | ||
48356 | return __ret; | |
48357 | } | |
48358 | ||
48359 | template<typename _CharT, typename _OutIter> | |
48360 | template<bool _Intl> | |
48361 | _OutIter | |
48362 | money_put<_CharT, _OutIter>:: | |
48363 | _M_insert(iter_type __s, ios_base& __io, char_type __fill, | |
48364 | const string_type& __digits) const | |
48365 | { | |
48366 | typedef typename string_type::size_type size_type; | |
48367 | typedef money_base::part part; | |
48368 | typedef __moneypunct_cache<_CharT, _Intl> __cache_type; | |
48369 | ||
48370 | const locale& __loc = __io._M_getloc(); | |
48371 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
48372 | ||
48373 | __use_cache<__cache_type> __uc; | |
48374 | const __cache_type* __lc = __uc(__loc); | |
48375 | const char_type* __lit = __lc->_M_atoms; | |
48376 | ||
48377 | ||
48378 | ||
48379 | const char_type* __beg = __digits.data(); | |
48380 | ||
48381 | money_base::pattern __p; | |
48382 | const char_type* __sign; | |
48383 | size_type __sign_size; | |
48384 | if (!(*__beg == __lit[money_base::_S_minus])) | |
48385 | { | |
48386 | __p = __lc->_M_pos_format; | |
48387 | __sign = __lc->_M_positive_sign; | |
48388 | __sign_size = __lc->_M_positive_sign_size; | |
48389 | } | |
48390 | else | |
48391 | { | |
48392 | __p = __lc->_M_neg_format; | |
48393 | __sign = __lc->_M_negative_sign; | |
48394 | __sign_size = __lc->_M_negative_sign_size; | |
48395 | if (__digits.size()) | |
48396 | ++__beg; | |
48397 | } | |
48398 | ||
48399 | ||
48400 | size_type __len = __ctype.scan_not(ctype_base::digit, __beg, | |
48401 | __beg + __digits.size()) - __beg; | |
48402 | if (__len) | |
48403 | { | |
48404 | ||
48405 | ||
48406 | ||
48407 | string_type __value; | |
48408 | __value.reserve(2 * __len); | |
48409 | ||
48410 | ||
48411 | ||
48412 | int __paddec = __len - __lc->_M_frac_digits; | |
48413 | if (__paddec > 0) | |
48414 | { | |
48415 | if (__lc->_M_frac_digits < 0) | |
48416 | __paddec = __len; | |
48417 | if (__lc->_M_grouping_size) | |
48418 | { | |
48419 | _CharT* __ws = | |
48420 | static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
48421 | * 2 * __len)); | |
48422 | _CharT* __ws_end = | |
48423 | std::__add_grouping(__ws, __lc->_M_thousands_sep, | |
48424 | __lc->_M_grouping, | |
48425 | __lc->_M_grouping_size, | |
48426 | __beg, __beg + __paddec); | |
48427 | __value.assign(__ws, __ws_end - __ws); | |
48428 | } | |
48429 | else | |
48430 | __value.assign(__beg, __paddec); | |
48431 | } | |
48432 | ||
48433 | ||
48434 | if (__lc->_M_frac_digits > 0) | |
48435 | { | |
48436 | __value += __lc->_M_decimal_point; | |
48437 | if (__paddec >= 0) | |
48438 | __value.append(__beg + __paddec, __lc->_M_frac_digits); | |
48439 | else | |
48440 | { | |
48441 | ||
48442 | __value.append(-__paddec, __lit[money_base::_S_zero]); | |
48443 | __value.append(__beg, __len); | |
48444 | } | |
48445 | } | |
48446 | ||
48447 | ||
48448 | const ios_base::fmtflags __f = __io.flags() | |
48449 | & ios_base::adjustfield; | |
48450 | __len = __value.size() + __sign_size; | |
48451 | __len += ((__io.flags() & ios_base::showbase) | |
48452 | ? __lc->_M_curr_symbol_size : 0); | |
48453 | ||
48454 | string_type __res; | |
48455 | __res.reserve(2 * __len); | |
48456 | ||
48457 | const size_type __width = static_cast<size_type>(__io.width()); | |
48458 | const bool __testipad = (__f == ios_base::internal | |
48459 | && __len < __width); | |
48460 | ||
48461 | for (int __i = 0; __i < 4; ++__i) | |
48462 | { | |
48463 | const part __which = static_cast<part>(__p.field[__i]); | |
48464 | switch (__which) | |
48465 | { | |
48466 | case money_base::symbol: | |
48467 | if (__io.flags() & ios_base::showbase) | |
48468 | __res.append(__lc->_M_curr_symbol, | |
48469 | __lc->_M_curr_symbol_size); | |
48470 | break; | |
48471 | case money_base::sign: | |
48472 | ||
48473 | ||
48474 | ||
48475 | if (__sign_size) | |
48476 | __res += __sign[0]; | |
48477 | break; | |
48478 | case money_base::value: | |
48479 | __res += __value; | |
48480 | break; | |
48481 | case money_base::space: | |
48482 | ||
48483 | ||
48484 | ||
48485 | if (__testipad) | |
48486 | __res.append(__width - __len, __fill); | |
48487 | else | |
48488 | __res += __fill; | |
48489 | break; | |
48490 | case money_base::none: | |
48491 | if (__testipad) | |
48492 | __res.append(__width - __len, __fill); | |
48493 | break; | |
48494 | } | |
48495 | } | |
48496 | ||
48497 | ||
48498 | if (__sign_size > 1) | |
48499 | __res.append(__sign + 1, __sign_size - 1); | |
48500 | ||
48501 | ||
48502 | __len = __res.size(); | |
48503 | if (__width > __len) | |
48504 | { | |
48505 | if (__f == ios_base::left) | |
48506 | ||
48507 | __res.append(__width - __len, __fill); | |
48508 | else | |
48509 | ||
48510 | __res.insert(0, __width - __len, __fill); | |
48511 | __len = __width; | |
48512 | } | |
48513 | ||
48514 | ||
48515 | __s = std::__write(__s, __res.data(), __len); | |
48516 | } | |
48517 | __io.width(0); | |
48518 | return __s; | |
48519 | } | |
48520 | ||
48521 | template<typename _CharT, typename _OutIter> | |
48522 | _OutIter | |
48523 | money_put<_CharT, _OutIter>:: | |
48524 | do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, | |
48525 | long double __units) const | |
48526 | { | |
48527 | const locale __loc = __io.getloc(); | |
48528 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
48529 | ||
48530 | ||
48531 | int __cs_size = 64; | |
48532 | char* __cs = static_cast<char*>(__builtin_alloca(__cs_size)); | |
48533 | ||
48534 | ||
48535 | int __len = std::__convert_from_v(__cs, __cs_size, "%.*Lf", __units, | |
48536 | _S_get_c_locale(), 0); | |
48537 | ||
48538 | if (__len >= __cs_size) | |
48539 | { | |
48540 | __cs_size = __len + 1; | |
48541 | __cs = static_cast<char*>(__builtin_alloca(__cs_size)); | |
48542 | __len = std::__convert_from_v(__cs, __cs_size, "%.*Lf", __units, | |
48543 | _S_get_c_locale(), 0); | |
48544 | } | |
48545 | ||
48546 | ||
48547 | ||
48548 | ||
48549 | ||
48550 | ||
48551 | ||
48552 | _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
48553 | * __cs_size)); | |
48554 | __ctype.widen(__cs, __cs + __len, __ws); | |
48555 | const string_type __digits(__ws, __len); | |
48556 | return __intl ? _M_insert<true>(__s, __io, __fill, __digits) | |
48557 | : _M_insert<false>(__s, __io, __fill, __digits); | |
48558 | } | |
48559 | ||
48560 | template<typename _CharT, typename _OutIter> | |
48561 | _OutIter | |
48562 | money_put<_CharT, _OutIter>:: | |
48563 | do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, | |
48564 | const string_type& __digits) const | |
48565 | { return __intl ? _M_insert<true>(__s, __io, __fill, __digits) | |
48566 | : _M_insert<false>(__s, __io, __fill, __digits); } | |
48567 | ||
48568 | ||
48569 | ||
48570 | ||
48571 | ||
48572 | template<typename _CharT, typename _InIter> | |
48573 | time_base::dateorder | |
48574 | time_get<_CharT, _InIter>::do_date_order() const | |
48575 | { return time_base::no_order; } | |
48576 | ||
48577 | ||
48578 | ||
48579 | template<typename _CharT, typename _InIter> | |
48580 | _InIter | |
48581 | time_get<_CharT, _InIter>:: | |
48582 | _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io, | |
48583 | ios_base::iostate& __err, tm* __tm, | |
48584 | const _CharT* __format) const | |
48585 | { | |
48586 | const locale& __loc = __io._M_getloc(); | |
48587 | const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); | |
48588 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
48589 | const size_t __len = char_traits<_CharT>::length(__format); | |
48590 | ||
48591 | for (size_t __i = 0; __beg != __end && __i < __len && !__err; ++__i) | |
48592 | { | |
48593 | if (__ctype.narrow(__format[__i], 0) == '%') | |
48594 | { | |
48595 | ||
48596 | char __c = __ctype.narrow(__format[++__i], 0); | |
48597 | int __mem = 0; | |
48598 | if (__c == 'E' || __c == 'O') | |
48599 | __c = __ctype.narrow(__format[++__i], 0); | |
48600 | switch (__c) | |
48601 | { | |
48602 | const char* __cs; | |
48603 | _CharT __wcs[10]; | |
48604 | case 'a': | |
48605 | ||
48606 | const char_type* __days1[7]; | |
48607 | __tp._M_days_abbreviated(__days1); | |
48608 | __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days1, | |
48609 | 7, __io, __err); | |
48610 | break; | |
48611 | case 'A': | |
48612 | ||
48613 | const char_type* __days2[7]; | |
48614 | __tp._M_days(__days2); | |
48615 | __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days2, | |
48616 | 7, __io, __err); | |
48617 | break; | |
48618 | case 'h': | |
48619 | case 'b': | |
48620 | ||
48621 | const char_type* __months1[12]; | |
48622 | __tp._M_months_abbreviated(__months1); | |
48623 | __beg = _M_extract_name(__beg, __end, __tm->tm_mon, | |
48624 | __months1, 12, __io, __err); | |
48625 | break; | |
48626 | case 'B': | |
48627 | ||
48628 | const char_type* __months2[12]; | |
48629 | __tp._M_months(__months2); | |
48630 | __beg = _M_extract_name(__beg, __end, __tm->tm_mon, | |
48631 | __months2, 12, __io, __err); | |
48632 | break; | |
48633 | case 'c': | |
48634 | ||
48635 | const char_type* __dt[2]; | |
48636 | __tp._M_date_time_formats(__dt); | |
48637 | __beg = _M_extract_via_format(__beg, __end, __io, __err, | |
48638 | __tm, __dt[0]); | |
48639 | break; | |
48640 | case 'd': | |
48641 | ||
48642 | __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 1, 31, 2, | |
48643 | __io, __err); | |
48644 | break; | |
48645 | case 'e': | |
48646 | ||
48647 | ||
48648 | if (__ctype.is(ctype_base::space, *__beg)) | |
48649 | __beg = _M_extract_num(++__beg, __end, __tm->tm_mday, 1, 9, | |
48650 | 1, __io, __err); | |
48651 | else | |
48652 | __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 10, 31, | |
48653 | 2, __io, __err); | |
48654 | break; | |
48655 | case 'D': | |
48656 | ||
48657 | __cs = "%m/%d/%y"; | |
48658 | __ctype.widen(__cs, __cs + 9, __wcs); | |
48659 | __beg = _M_extract_via_format(__beg, __end, __io, __err, | |
48660 | __tm, __wcs); | |
48661 | break; | |
48662 | case 'H': | |
48663 | ||
48664 | __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 0, 23, 2, | |
48665 | __io, __err); | |
48666 | break; | |
48667 | case 'I': | |
48668 | ||
48669 | __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 1, 12, 2, | |
48670 | __io, __err); | |
48671 | break; | |
48672 | case 'm': | |
48673 | ||
48674 | __beg = _M_extract_num(__beg, __end, __mem, 1, 12, 2, | |
48675 | __io, __err); | |
48676 | if (!__err) | |
48677 | __tm->tm_mon = __mem - 1; | |
48678 | break; | |
48679 | case 'M': | |
48680 | ||
48681 | __beg = _M_extract_num(__beg, __end, __tm->tm_min, 0, 59, 2, | |
48682 | __io, __err); | |
48683 | break; | |
48684 | case 'n': | |
48685 | if (__ctype.narrow(*__beg, 0) == '\n') | |
48686 | ++__beg; | |
48687 | else | |
48688 | __err |= ios_base::failbit; | |
48689 | break; | |
48690 | case 'R': | |
48691 | ||
48692 | __cs = "%H:%M"; | |
48693 | __ctype.widen(__cs, __cs + 6, __wcs); | |
48694 | __beg = _M_extract_via_format(__beg, __end, __io, __err, | |
48695 | __tm, __wcs); | |
48696 | break; | |
48697 | case 'S': | |
48698 | ||
48699 | ||
48700 | ||
48701 | __beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 60, 2, | |
48702 | ||
48703 | ||
48704 | ||
48705 | __io, __err); | |
48706 | break; | |
48707 | case 't': | |
48708 | if (__ctype.narrow(*__beg, 0) == '\t') | |
48709 | ++__beg; | |
48710 | else | |
48711 | __err |= ios_base::failbit; | |
48712 | break; | |
48713 | case 'T': | |
48714 | ||
48715 | __cs = "%H:%M:%S"; | |
48716 | __ctype.widen(__cs, __cs + 9, __wcs); | |
48717 | __beg = _M_extract_via_format(__beg, __end, __io, __err, | |
48718 | __tm, __wcs); | |
48719 | break; | |
48720 | case 'x': | |
48721 | ||
48722 | const char_type* __dates[2]; | |
48723 | __tp._M_date_formats(__dates); | |
48724 | __beg = _M_extract_via_format(__beg, __end, __io, __err, | |
48725 | __tm, __dates[0]); | |
48726 | break; | |
48727 | case 'X': | |
48728 | ||
48729 | const char_type* __times[2]; | |
48730 | __tp._M_time_formats(__times); | |
48731 | __beg = _M_extract_via_format(__beg, __end, __io, __err, | |
48732 | __tm, __times[0]); | |
48733 | break; | |
48734 | case 'y': | |
48735 | case 'C': | |
48736 | ||
48737 | __beg = _M_extract_num(__beg, __end, __tm->tm_year, 0, 99, 2, | |
48738 | __io, __err); | |
48739 | break; | |
48740 | case 'Y': | |
48741 | ||
48742 | __beg = _M_extract_num(__beg, __end, __mem, 0, 9999, 4, | |
48743 | __io, __err); | |
48744 | if (!__err) | |
48745 | __tm->tm_year = __mem - 1900; | |
48746 | break; | |
48747 | case 'Z': | |
48748 | ||
48749 | if (__ctype.is(ctype_base::upper, *__beg)) | |
48750 | { | |
48751 | int __tmp; | |
48752 | __beg = _M_extract_name(__beg, __end, __tmp, | |
48753 | __timepunct_cache<_CharT>::_S_timezones, | |
48754 | 14, __io, __err); | |
48755 | ||
48756 | ||
48757 | if (__beg != __end && !__err && __tmp == 0 | |
48758 | && (*__beg == __ctype.widen('-') | |
48759 | || *__beg == __ctype.widen('+'))) | |
48760 | { | |
48761 | __beg = _M_extract_num(__beg, __end, __tmp, 0, 23, 2, | |
48762 | __io, __err); | |
48763 | __beg = _M_extract_num(__beg, __end, __tmp, 0, 59, 2, | |
48764 | __io, __err); | |
48765 | } | |
48766 | } | |
48767 | else | |
48768 | __err |= ios_base::failbit; | |
48769 | break; | |
48770 | default: | |
48771 | ||
48772 | __err |= ios_base::failbit; | |
48773 | } | |
48774 | } | |
48775 | else | |
48776 | { | |
48777 | ||
48778 | if (__format[__i] == *__beg) | |
48779 | ++__beg; | |
48780 | else | |
48781 | __err |= ios_base::failbit; | |
48782 | } | |
48783 | } | |
48784 | return __beg; | |
48785 | } | |
48786 | ||
48787 | template<typename _CharT, typename _InIter> | |
48788 | _InIter | |
48789 | time_get<_CharT, _InIter>:: | |
48790 | _M_extract_num(iter_type __beg, iter_type __end, int& __member, | |
48791 | int __min, int __max, size_t __len, | |
48792 | ios_base& __io, ios_base::iostate& __err) const | |
48793 | { | |
48794 | const locale& __loc = __io._M_getloc(); | |
48795 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
48796 | ||
48797 | ||
48798 | int __mult = __len == 2 ? 10 : (__len == 4 ? 1000 : 1); | |
48799 | ||
48800 | ++__min; | |
48801 | size_t __i = 0; | |
48802 | int __value = 0; | |
48803 | for (; __beg != __end && __i < __len; ++__beg, ++__i) | |
48804 | { | |
48805 | const char __c = __ctype.narrow(*__beg, '*'); | |
48806 | if (__c >= '0' && __c <= '9') | |
48807 | { | |
48808 | __value = __value * 10 + (__c - '0'); | |
48809 | const int __valuec = __value * __mult; | |
48810 | if (__valuec > __max || __valuec + __mult < __min) | |
48811 | break; | |
48812 | __mult /= 10; | |
48813 | } | |
48814 | else | |
48815 | break; | |
48816 | } | |
48817 | if (__i == __len) | |
48818 | __member = __value; | |
48819 | else | |
48820 | __err |= ios_base::failbit; | |
48821 | return __beg; | |
48822 | } | |
48823 | ||
48824 | ||
48825 | ||
48826 | template<typename _CharT, typename _InIter> | |
48827 | _InIter | |
48828 | time_get<_CharT, _InIter>:: | |
48829 | _M_extract_name(iter_type __beg, iter_type __end, int& __member, | |
48830 | const _CharT** __names, size_t __indexlen, | |
48831 | ios_base& __io, ios_base::iostate& __err) const | |
48832 | { | |
48833 | typedef char_traits<_CharT> __traits_type; | |
48834 | const locale& __loc = __io._M_getloc(); | |
48835 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
48836 | ||
48837 | int* __matches = static_cast<int*>(__builtin_alloca(sizeof(int) | |
48838 | * __indexlen)); | |
48839 | size_t __nmatches = 0; | |
48840 | size_t __pos = 0; | |
48841 | bool __testvalid = true; | |
48842 | const char_type* __name; | |
48843 | ||
48844 | ||
48845 | ||
48846 | ||
48847 | ||
48848 | if (__beg != __end) | |
48849 | { | |
48850 | const char_type __c = *__beg; | |
48851 | for (size_t __i1 = 0; __i1 < __indexlen; ++__i1) | |
48852 | if (__c == __names[__i1][0] | |
48853 | || __c == __ctype.toupper(__names[__i1][0])) | |
48854 | __matches[__nmatches++] = __i1; | |
48855 | } | |
48856 | ||
48857 | while (__nmatches > 1) | |
48858 | { | |
48859 | ||
48860 | size_t __minlen = __traits_type::length(__names[__matches[0]]); | |
48861 | for (size_t __i2 = 1; __i2 < __nmatches; ++__i2) | |
48862 | __minlen = std::min(__minlen, | |
48863 | __traits_type::length(__names[__matches[__i2]])); | |
48864 | ++__beg, ++__pos; | |
48865 | if (__pos < __minlen && __beg != __end) | |
48866 | for (size_t __i3 = 0; __i3 < __nmatches;) | |
48867 | { | |
48868 | __name = __names[__matches[__i3]]; | |
48869 | if (!(__name[__pos] == *__beg)) | |
48870 | __matches[__i3] = __matches[--__nmatches]; | |
48871 | else | |
48872 | ++__i3; | |
48873 | } | |
48874 | else | |
48875 | break; | |
48876 | } | |
48877 | ||
48878 | if (__nmatches == 1) | |
48879 | { | |
48880 | ||
48881 | ++__beg, ++__pos; | |
48882 | __name = __names[__matches[0]]; | |
48883 | const size_t __len = __traits_type::length(__name); | |
48884 | while (__pos < __len && __beg != __end && __name[__pos] == *__beg) | |
48885 | ++__beg, ++__pos; | |
48886 | ||
48887 | if (__len == __pos) | |
48888 | __member = __matches[0]; | |
48889 | else | |
48890 | __testvalid = false; | |
48891 | } | |
48892 | else | |
48893 | __testvalid = false; | |
48894 | if (!__testvalid) | |
48895 | __err |= ios_base::failbit; | |
48896 | return __beg; | |
48897 | } | |
48898 | ||
48899 | template<typename _CharT, typename _InIter> | |
48900 | _InIter | |
48901 | time_get<_CharT, _InIter>:: | |
48902 | do_get_time(iter_type __beg, iter_type __end, ios_base& __io, | |
48903 | ios_base::iostate& __err, tm* __tm) const | |
48904 | { | |
48905 | const locale& __loc = __io._M_getloc(); | |
48906 | const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); | |
48907 | const char_type* __times[2]; | |
48908 | __tp._M_time_formats(__times); | |
48909 | __beg = _M_extract_via_format(__beg, __end, __io, __err, | |
48910 | __tm, __times[0]); | |
48911 | if (__beg == __end) | |
48912 | __err |= ios_base::eofbit; | |
48913 | return __beg; | |
48914 | } | |
48915 | ||
48916 | template<typename _CharT, typename _InIter> | |
48917 | _InIter | |
48918 | time_get<_CharT, _InIter>:: | |
48919 | do_get_date(iter_type __beg, iter_type __end, ios_base& __io, | |
48920 | ios_base::iostate& __err, tm* __tm) const | |
48921 | { | |
48922 | const locale& __loc = __io._M_getloc(); | |
48923 | const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); | |
48924 | const char_type* __dates[2]; | |
48925 | __tp._M_date_formats(__dates); | |
48926 | __beg = _M_extract_via_format(__beg, __end, __io, __err, | |
48927 | __tm, __dates[0]); | |
48928 | if (__beg == __end) | |
48929 | __err |= ios_base::eofbit; | |
48930 | return __beg; | |
48931 | } | |
48932 | ||
48933 | template<typename _CharT, typename _InIter> | |
48934 | _InIter | |
48935 | time_get<_CharT, _InIter>:: | |
48936 | do_get_weekday(iter_type __beg, iter_type __end, ios_base& __io, | |
48937 | ios_base::iostate& __err, tm* __tm) const | |
48938 | { | |
48939 | typedef char_traits<_CharT> __traits_type; | |
48940 | const locale& __loc = __io._M_getloc(); | |
48941 | const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); | |
48942 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
48943 | const char_type* __days[7]; | |
48944 | __tp._M_days_abbreviated(__days); | |
48945 | int __tmpwday; | |
48946 | __beg = _M_extract_name(__beg, __end, __tmpwday, __days, 7, __io, __err); | |
48947 | ||
48948 | ||
48949 | ||
48950 | ||
48951 | ||
48952 | ||
48953 | ||
48954 | if (!__err && __beg != __end) | |
48955 | { | |
48956 | size_t __pos = __traits_type::length(__days[__tmpwday]); | |
48957 | __tp._M_days(__days); | |
48958 | const char_type* __name = __days[__tmpwday]; | |
48959 | if (__name[__pos] == *__beg) | |
48960 | { | |
48961 | ||
48962 | const size_t __len = __traits_type::length(__name); | |
48963 | while (__pos < __len && __beg != __end | |
48964 | && __name[__pos] == *__beg) | |
48965 | ++__beg, ++__pos; | |
48966 | if (__len != __pos) | |
48967 | __err |= ios_base::failbit; | |
48968 | } | |
48969 | } | |
48970 | if (!__err) | |
48971 | __tm->tm_wday = __tmpwday; | |
48972 | ||
48973 | if (__beg == __end) | |
48974 | __err |= ios_base::eofbit; | |
48975 | return __beg; | |
48976 | } | |
48977 | ||
48978 | template<typename _CharT, typename _InIter> | |
48979 | _InIter | |
48980 | time_get<_CharT, _InIter>:: | |
48981 | do_get_monthname(iter_type __beg, iter_type __end, | |
48982 | ios_base& __io, ios_base::iostate& __err, tm* __tm) const | |
48983 | { | |
48984 | typedef char_traits<_CharT> __traits_type; | |
48985 | const locale& __loc = __io._M_getloc(); | |
48986 | const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); | |
48987 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
48988 | const char_type* __months[12]; | |
48989 | __tp._M_months_abbreviated(__months); | |
48990 | int __tmpmon; | |
48991 | __beg = _M_extract_name(__beg, __end, __tmpmon, __months, 12, | |
48992 | __io, __err); | |
48993 | ||
48994 | ||
48995 | ||
48996 | ||
48997 | ||
48998 | ||
48999 | ||
49000 | if (!__err && __beg != __end) | |
49001 | { | |
49002 | size_t __pos = __traits_type::length(__months[__tmpmon]); | |
49003 | __tp._M_months(__months); | |
49004 | const char_type* __name = __months[__tmpmon]; | |
49005 | if (__name[__pos] == *__beg) | |
49006 | { | |
49007 | ||
49008 | const size_t __len = __traits_type::length(__name); | |
49009 | while (__pos < __len && __beg != __end | |
49010 | && __name[__pos] == *__beg) | |
49011 | ++__beg, ++__pos; | |
49012 | if (__len != __pos) | |
49013 | __err |= ios_base::failbit; | |
49014 | } | |
49015 | } | |
49016 | if (!__err) | |
49017 | __tm->tm_mon = __tmpmon; | |
49018 | ||
49019 | if (__beg == __end) | |
49020 | __err |= ios_base::eofbit; | |
49021 | return __beg; | |
49022 | } | |
49023 | ||
49024 | template<typename _CharT, typename _InIter> | |
49025 | _InIter | |
49026 | time_get<_CharT, _InIter>:: | |
49027 | do_get_year(iter_type __beg, iter_type __end, ios_base& __io, | |
49028 | ios_base::iostate& __err, tm* __tm) const | |
49029 | { | |
49030 | const locale& __loc = __io._M_getloc(); | |
49031 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
49032 | ||
49033 | size_t __i = 0; | |
49034 | int __value = 0; | |
49035 | for (; __beg != __end && __i < 4; ++__beg, ++__i) | |
49036 | { | |
49037 | const char __c = __ctype.narrow(*__beg, '*'); | |
49038 | if (__c >= '0' && __c <= '9') | |
49039 | __value = __value * 10 + (__c - '0'); | |
49040 | else | |
49041 | break; | |
49042 | } | |
49043 | if (__i == 2 || __i == 4) | |
49044 | __tm->tm_year = __i == 2 ? __value : __value - 1900; | |
49045 | else | |
49046 | __err |= ios_base::failbit; | |
49047 | if (__beg == __end) | |
49048 | __err |= ios_base::eofbit; | |
49049 | return __beg; | |
49050 | } | |
49051 | ||
49052 | template<typename _CharT, typename _OutIter> | |
49053 | _OutIter | |
49054 | time_put<_CharT, _OutIter>:: | |
49055 | put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, | |
49056 | const _CharT* __beg, const _CharT* __end) const | |
49057 | { | |
49058 | const locale& __loc = __io._M_getloc(); | |
49059 | ctype<_CharT> const& __ctype = use_facet<ctype<_CharT> >(__loc); | |
49060 | for (; __beg != __end; ++__beg) | |
49061 | if (__ctype.narrow(*__beg, 0) != '%') | |
49062 | { | |
49063 | *__s = *__beg; | |
49064 | ++__s; | |
49065 | } | |
49066 | else if (++__beg != __end) | |
49067 | { | |
49068 | char __format; | |
49069 | char __mod = 0; | |
49070 | const char __c = __ctype.narrow(*__beg, 0); | |
49071 | if (__c != 'E' && __c != 'O') | |
49072 | __format = __c; | |
49073 | else if (++__beg != __end) | |
49074 | { | |
49075 | __mod = __c; | |
49076 | __format = __ctype.narrow(*__beg, 0); | |
49077 | } | |
49078 | else | |
49079 | break; | |
49080 | __s = this->do_put(__s, __io, __fill, __tm, __format, __mod); | |
49081 | } | |
49082 | else | |
49083 | break; | |
49084 | return __s; | |
49085 | } | |
49086 | ||
49087 | template<typename _CharT, typename _OutIter> | |
49088 | _OutIter | |
49089 | time_put<_CharT, _OutIter>:: | |
49090 | do_put(iter_type __s, ios_base& __io, char_type, const tm* __tm, | |
49091 | char __format, char __mod) const | |
49092 | { | |
49093 | const locale& __loc = __io._M_getloc(); | |
49094 | ctype<_CharT> const& __ctype = use_facet<ctype<_CharT> >(__loc); | |
49095 | __timepunct<_CharT> const& __tp = use_facet<__timepunct<_CharT> >(__loc); | |
49096 | ||
49097 | ||
49098 | ||
49099 | const size_t __maxlen = 128; | |
49100 | char_type* __res = | |
49101 | static_cast<char_type*>(__builtin_alloca(sizeof(char_type) * __maxlen)); | |
49102 | ||
49103 | ||
49104 | ||
49105 | ||
49106 | ||
49107 | ||
49108 | char_type __fmt[4]; | |
49109 | __fmt[0] = __ctype.widen('%'); | |
49110 | if (!__mod) | |
49111 | { | |
49112 | __fmt[1] = __format; | |
49113 | __fmt[2] = char_type(); | |
49114 | } | |
49115 | else | |
49116 | { | |
49117 | __fmt[1] = __mod; | |
49118 | __fmt[2] = __format; | |
49119 | __fmt[3] = char_type(); | |
49120 | } | |
49121 | ||
49122 | __tp._M_put(__res, __maxlen, __fmt, __tm); | |
49123 | ||
49124 | ||
49125 | return std::__write(__s, __res, char_traits<char_type>::length(__res)); | |
49126 | } | |
49127 | ||
49128 | ||
49129 | template<typename _CharT> | |
49130 | int | |
49131 | collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const | |
49132 | { return 0; } | |
49133 | ||
49134 | ||
49135 | template<typename _CharT> | |
49136 | size_t | |
49137 | collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const | |
49138 | { return 0; } | |
49139 | ||
49140 | template<typename _CharT> | |
49141 | int | |
49142 | collate<_CharT>:: | |
49143 | do_compare(const _CharT* __lo1, const _CharT* __hi1, | |
49144 | const _CharT* __lo2, const _CharT* __hi2) const | |
49145 | { | |
49146 | ||
49147 | ||
49148 | const string_type __one(__lo1, __hi1); | |
49149 | const string_type __two(__lo2, __hi2); | |
49150 | ||
49151 | const _CharT* __p = __one.c_str(); | |
49152 | const _CharT* __pend = __one.data() + __one.length(); | |
49153 | const _CharT* __q = __two.c_str(); | |
49154 | const _CharT* __qend = __two.data() + __two.length(); | |
49155 | ||
49156 | ||
49157 | ||
49158 | ||
49159 | for (;;) | |
49160 | { | |
49161 | const int __res = _M_compare(__p, __q); | |
49162 | if (__res) | |
49163 | return __res; | |
49164 | ||
49165 | __p += char_traits<_CharT>::length(__p); | |
49166 | __q += char_traits<_CharT>::length(__q); | |
49167 | if (__p == __pend && __q == __qend) | |
49168 | return 0; | |
49169 | else if (__p == __pend) | |
49170 | return -1; | |
49171 | else if (__q == __qend) | |
49172 | return 1; | |
49173 | ||
49174 | __p++; | |
49175 | __q++; | |
49176 | } | |
49177 | } | |
49178 | ||
49179 | template<typename _CharT> | |
49180 | typename collate<_CharT>::string_type | |
49181 | collate<_CharT>:: | |
49182 | do_transform(const _CharT* __lo, const _CharT* __hi) const | |
49183 | { | |
49184 | ||
49185 | string_type __str(__lo, __hi); | |
49186 | ||
49187 | const _CharT* __p = __str.c_str(); | |
49188 | const _CharT* __pend = __str.data() + __str.length(); | |
49189 | ||
49190 | size_t __len = (__hi - __lo) * 2; | |
49191 | ||
49192 | string_type __ret; | |
49193 | ||
49194 | ||
49195 | ||
49196 | ||
49197 | for (;;) | |
49198 | { | |
49199 | ||
49200 | _CharT* __c = | |
49201 | static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __len)); | |
49202 | size_t __res = _M_transform(__c, __p, __len); | |
49203 | ||
49204 | ||
49205 | if (__res >= __len) | |
49206 | { | |
49207 | __len = __res + 1; | |
49208 | __c = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
49209 | * __len)); | |
49210 | __res = _M_transform(__c, __p, __len); | |
49211 | } | |
49212 | ||
49213 | __ret.append(__c, __res); | |
49214 | __p += char_traits<_CharT>::length(__p); | |
49215 | if (__p == __pend) | |
49216 | return __ret; | |
49217 | ||
49218 | __p++; | |
49219 | __ret.push_back(_CharT()); | |
49220 | } | |
49221 | } | |
49222 | ||
49223 | template<typename _CharT> | |
49224 | long | |
49225 | collate<_CharT>:: | |
49226 | do_hash(const _CharT* __lo, const _CharT* __hi) const | |
49227 | { | |
49228 | unsigned long __val = 0; | |
49229 | for (; __lo < __hi; ++__lo) | |
49230 | __val = *__lo + ((__val << 7) | | |
49231 | (__val >> (numeric_limits<unsigned long>::digits - 7))); | |
49232 | return static_cast<long>(__val); | |
49233 | } | |
49234 | # 2407 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc" 3 | |
49235 | template<typename _CharT, typename _Traits> | |
49236 | void | |
49237 | __pad<_CharT, _Traits>::_S_pad(ios_base& __io, _CharT __fill, | |
49238 | _CharT* __news, const _CharT* __olds, | |
49239 | const streamsize __newlen, | |
49240 | const streamsize __oldlen, const bool __num) | |
49241 | { | |
49242 | const size_t __plen = static_cast<size_t>(__newlen - __oldlen); | |
49243 | const ios_base::fmtflags __adjust = __io.flags() & ios_base::adjustfield; | |
49244 | ||
49245 | ||
49246 | if (__adjust == ios_base::left) | |
49247 | { | |
49248 | _Traits::copy(__news, const_cast<_CharT*>(__olds), __oldlen); | |
49249 | _Traits::assign(__news + __oldlen, __plen, __fill); | |
49250 | return; | |
49251 | } | |
49252 | ||
49253 | size_t __mod = 0; | |
49254 | if (__adjust == ios_base::internal && __num) | |
49255 | { | |
49256 | ||
49257 | ||
49258 | ||
49259 | const locale& __loc = __io._M_getloc(); | |
49260 | const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); | |
49261 | ||
49262 | const bool __testsign = (__ctype.widen('-') == __olds[0] | |
49263 | || __ctype.widen('+') == __olds[0]); | |
49264 | const bool __testhex = (__ctype.widen('0') == __olds[0] | |
49265 | && __oldlen > 1 | |
49266 | && (__ctype.widen('x') == __olds[1] | |
49267 | || __ctype.widen('X') == __olds[1])); | |
49268 | if (__testhex) | |
49269 | { | |
49270 | __news[0] = __olds[0]; | |
49271 | __news[1] = __olds[1]; | |
49272 | __mod = 2; | |
49273 | __news += 2; | |
49274 | } | |
49275 | else if (__testsign) | |
49276 | { | |
49277 | __news[0] = __olds[0]; | |
49278 | __mod = 1; | |
49279 | ++__news; | |
49280 | } | |
49281 | ||
49282 | } | |
49283 | _Traits::assign(__news, __plen, __fill); | |
49284 | _Traits::copy(__news + __plen, const_cast<_CharT*>(__olds + __mod), | |
49285 | __oldlen - __mod); | |
49286 | } | |
49287 | ||
49288 | bool | |
49289 | __verify_grouping(const char* __grouping, size_t __grouping_size, | |
49290 | const string& __grouping_tmp) | |
49291 | { | |
49292 | const size_t __n = __grouping_tmp.size() - 1; | |
49293 | const size_t __min = std::min(__n, size_t(__grouping_size - 1)); | |
49294 | size_t __i = __n; | |
49295 | bool __test = true; | |
49296 | ||
49297 | ||
49298 | ||
49299 | ||
49300 | for (size_t __j = 0; __j < __min && __test; --__i, ++__j) | |
49301 | __test = __grouping_tmp[__i] == __grouping[__j]; | |
49302 | for (; __i && __test; --__i) | |
49303 | __test = __grouping_tmp[__i] == __grouping[__min]; | |
49304 | ||
49305 | ||
49306 | ||
49307 | if (static_cast<signed char>(__grouping[__min]) > 0) | |
49308 | __test &= __grouping_tmp[0] <= __grouping[__min]; | |
49309 | return __test; | |
49310 | } | |
49311 | ||
49312 | template<typename _CharT> | |
49313 | _CharT* | |
49314 | __add_grouping(_CharT* __s, _CharT __sep, | |
49315 | const char* __gbeg, size_t __gsize, | |
49316 | const _CharT* __first, const _CharT* __last) | |
49317 | { | |
49318 | if (__last - __first > *__gbeg | |
49319 | && static_cast<signed char>(*__gbeg) > 0) | |
49320 | { | |
49321 | const bool __bump = __gsize != 1; | |
49322 | __s = std::__add_grouping(__s, __sep, __gbeg + __bump, | |
49323 | __gsize - __bump, __first, | |
49324 | __last - *__gbeg); | |
49325 | __first = __last - *__gbeg; | |
49326 | *__s++ = __sep; | |
49327 | } | |
49328 | do | |
49329 | *__s++ = *__first++; | |
49330 | while (__first != __last); | |
49331 | return __s; | |
49332 | } | |
49333 | ||
49334 | ||
49335 | ||
49336 | ||
49337 | ||
49338 | extern template class moneypunct<char, false>; | |
49339 | extern template class moneypunct<char, true>; | |
49340 | extern template class moneypunct_byname<char, false>; | |
49341 | extern template class moneypunct_byname<char, true>; | |
49342 | extern template class money_get<char>; | |
49343 | extern template class money_put<char>; | |
49344 | extern template class numpunct<char>; | |
49345 | extern template class numpunct_byname<char>; | |
49346 | extern template class num_get<char>; | |
49347 | extern template class num_put<char>; | |
49348 | extern template class __timepunct<char>; | |
49349 | extern template class time_put<char>; | |
49350 | extern template class time_put_byname<char>; | |
49351 | extern template class time_get<char>; | |
49352 | extern template class time_get_byname<char>; | |
49353 | extern template class messages<char>; | |
49354 | extern template class messages_byname<char>; | |
49355 | extern template class ctype_byname<char>; | |
49356 | extern template class codecvt_byname<char, char, mbstate_t>; | |
49357 | extern template class collate<char>; | |
49358 | extern template class collate_byname<char>; | |
49359 | ||
49360 | extern template | |
49361 | const codecvt<char, char, mbstate_t>& | |
49362 | use_facet<codecvt<char, char, mbstate_t> >(const locale&); | |
49363 | ||
49364 | extern template | |
49365 | const collate<char>& | |
49366 | use_facet<collate<char> >(const locale&); | |
49367 | ||
49368 | extern template | |
49369 | const numpunct<char>& | |
49370 | use_facet<numpunct<char> >(const locale&); | |
49371 | ||
49372 | extern template | |
49373 | const num_put<char>& | |
49374 | use_facet<num_put<char> >(const locale&); | |
49375 | ||
49376 | extern template | |
49377 | const num_get<char>& | |
49378 | use_facet<num_get<char> >(const locale&); | |
49379 | ||
49380 | extern template | |
49381 | const moneypunct<char, true>& | |
49382 | use_facet<moneypunct<char, true> >(const locale&); | |
49383 | ||
49384 | extern template | |
49385 | const moneypunct<char, false>& | |
49386 | use_facet<moneypunct<char, false> >(const locale&); | |
49387 | ||
49388 | extern template | |
49389 | const money_put<char>& | |
49390 | use_facet<money_put<char> >(const locale&); | |
49391 | ||
49392 | extern template | |
49393 | const money_get<char>& | |
49394 | use_facet<money_get<char> >(const locale&); | |
49395 | ||
49396 | extern template | |
49397 | const __timepunct<char>& | |
49398 | use_facet<__timepunct<char> >(const locale&); | |
49399 | ||
49400 | extern template | |
49401 | const time_put<char>& | |
49402 | use_facet<time_put<char> >(const locale&); | |
49403 | ||
49404 | extern template | |
49405 | const time_get<char>& | |
49406 | use_facet<time_get<char> >(const locale&); | |
49407 | ||
49408 | extern template | |
49409 | const messages<char>& | |
49410 | use_facet<messages<char> >(const locale&); | |
49411 | ||
49412 | extern template | |
49413 | bool | |
49414 | has_facet<ctype<char> >(const locale&); | |
49415 | ||
49416 | extern template | |
49417 | bool | |
49418 | has_facet<codecvt<char, char, mbstate_t> >(const locale&); | |
49419 | ||
49420 | extern template | |
49421 | bool | |
49422 | has_facet<collate<char> >(const locale&); | |
49423 | ||
49424 | extern template | |
49425 | bool | |
49426 | has_facet<numpunct<char> >(const locale&); | |
49427 | ||
49428 | extern template | |
49429 | bool | |
49430 | has_facet<num_put<char> >(const locale&); | |
49431 | ||
49432 | extern template | |
49433 | bool | |
49434 | has_facet<num_get<char> >(const locale&); | |
49435 | ||
49436 | extern template | |
49437 | bool | |
49438 | has_facet<moneypunct<char> >(const locale&); | |
49439 | ||
49440 | extern template | |
49441 | bool | |
49442 | has_facet<money_put<char> >(const locale&); | |
49443 | ||
49444 | extern template | |
49445 | bool | |
49446 | has_facet<money_get<char> >(const locale&); | |
49447 | ||
49448 | extern template | |
49449 | bool | |
49450 | has_facet<__timepunct<char> >(const locale&); | |
49451 | ||
49452 | extern template | |
49453 | bool | |
49454 | has_facet<time_put<char> >(const locale&); | |
49455 | ||
49456 | extern template | |
49457 | bool | |
49458 | has_facet<time_get<char> >(const locale&); | |
49459 | ||
49460 | extern template | |
49461 | bool | |
49462 | has_facet<messages<char> >(const locale&); | |
49463 | ||
49464 | ||
49465 | extern template class moneypunct<wchar_t, false>; | |
49466 | extern template class moneypunct<wchar_t, true>; | |
49467 | extern template class moneypunct_byname<wchar_t, false>; | |
49468 | extern template class moneypunct_byname<wchar_t, true>; | |
49469 | extern template class money_get<wchar_t>; | |
49470 | extern template class money_put<wchar_t>; | |
49471 | extern template class numpunct<wchar_t>; | |
49472 | extern template class numpunct_byname<wchar_t>; | |
49473 | extern template class num_get<wchar_t>; | |
49474 | extern template class num_put<wchar_t>; | |
49475 | extern template class __timepunct<wchar_t>; | |
49476 | extern template class time_put<wchar_t>; | |
49477 | extern template class time_put_byname<wchar_t>; | |
49478 | extern template class time_get<wchar_t>; | |
49479 | extern template class time_get_byname<wchar_t>; | |
49480 | extern template class messages<wchar_t>; | |
49481 | extern template class messages_byname<wchar_t>; | |
49482 | extern template class ctype_byname<wchar_t>; | |
49483 | extern template class codecvt_byname<wchar_t, char, mbstate_t>; | |
49484 | extern template class collate<wchar_t>; | |
49485 | extern template class collate_byname<wchar_t>; | |
49486 | ||
49487 | extern template | |
49488 | const codecvt<wchar_t, char, mbstate_t>& | |
49489 | use_facet<codecvt<wchar_t, char, mbstate_t> >(locale const&); | |
49490 | ||
49491 | extern template | |
49492 | const collate<wchar_t>& | |
49493 | use_facet<collate<wchar_t> >(const locale&); | |
49494 | ||
49495 | extern template | |
49496 | const numpunct<wchar_t>& | |
49497 | use_facet<numpunct<wchar_t> >(const locale&); | |
49498 | ||
49499 | extern template | |
49500 | const num_put<wchar_t>& | |
49501 | use_facet<num_put<wchar_t> >(const locale&); | |
49502 | ||
49503 | extern template | |
49504 | const num_get<wchar_t>& | |
49505 | use_facet<num_get<wchar_t> >(const locale&); | |
49506 | ||
49507 | extern template | |
49508 | const moneypunct<wchar_t, true>& | |
49509 | use_facet<moneypunct<wchar_t, true> >(const locale&); | |
49510 | ||
49511 | extern template | |
49512 | const moneypunct<wchar_t, false>& | |
49513 | use_facet<moneypunct<wchar_t, false> >(const locale&); | |
49514 | ||
49515 | extern template | |
49516 | const money_put<wchar_t>& | |
49517 | use_facet<money_put<wchar_t> >(const locale&); | |
49518 | ||
49519 | extern template | |
49520 | const money_get<wchar_t>& | |
49521 | use_facet<money_get<wchar_t> >(const locale&); | |
49522 | ||
49523 | extern template | |
49524 | const __timepunct<wchar_t>& | |
49525 | use_facet<__timepunct<wchar_t> >(const locale&); | |
49526 | ||
49527 | extern template | |
49528 | const time_put<wchar_t>& | |
49529 | use_facet<time_put<wchar_t> >(const locale&); | |
49530 | ||
49531 | extern template | |
49532 | const time_get<wchar_t>& | |
49533 | use_facet<time_get<wchar_t> >(const locale&); | |
49534 | ||
49535 | extern template | |
49536 | const messages<wchar_t>& | |
49537 | use_facet<messages<wchar_t> >(const locale&); | |
49538 | ||
49539 | extern template | |
49540 | bool | |
49541 | has_facet<ctype<wchar_t> >(const locale&); | |
49542 | ||
49543 | extern template | |
49544 | bool | |
49545 | has_facet<codecvt<wchar_t, char, mbstate_t> >(const locale&); | |
49546 | ||
49547 | extern template | |
49548 | bool | |
49549 | has_facet<collate<wchar_t> >(const locale&); | |
49550 | ||
49551 | extern template | |
49552 | bool | |
49553 | has_facet<numpunct<wchar_t> >(const locale&); | |
49554 | ||
49555 | extern template | |
49556 | bool | |
49557 | has_facet<num_put<wchar_t> >(const locale&); | |
49558 | ||
49559 | extern template | |
49560 | bool | |
49561 | has_facet<num_get<wchar_t> >(const locale&); | |
49562 | ||
49563 | extern template | |
49564 | bool | |
49565 | has_facet<moneypunct<wchar_t> >(const locale&); | |
49566 | ||
49567 | extern template | |
49568 | bool | |
49569 | has_facet<money_put<wchar_t> >(const locale&); | |
49570 | ||
49571 | extern template | |
49572 | bool | |
49573 | has_facet<money_get<wchar_t> >(const locale&); | |
49574 | ||
49575 | extern template | |
49576 | bool | |
49577 | has_facet<__timepunct<wchar_t> >(const locale&); | |
49578 | ||
49579 | extern template | |
49580 | bool | |
49581 | has_facet<time_put<wchar_t> >(const locale&); | |
49582 | ||
49583 | extern template | |
49584 | bool | |
49585 | has_facet<time_get<wchar_t> >(const locale&); | |
49586 | ||
49587 | extern template | |
49588 | bool | |
49589 | has_facet<messages<wchar_t> >(const locale&); | |
49590 | ||
49591 | ||
49592 | } | |
49593 | # 49 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/locale" 2 3 | |
49594 | ||
49595 | #pragma GCC visibility pop | |
49596 | # 46 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/ostream.tcc" 2 3 | |
49597 | ||
49598 | namespace std | |
49599 | { | |
49600 | template<typename _CharT, typename _Traits> | |
49601 | basic_ostream<_CharT, _Traits>::sentry:: | |
49602 | sentry(basic_ostream<_CharT, _Traits>& __os) | |
49603 | : _M_ok(false), _M_os(__os) | |
49604 | { | |
49605 | ||
49606 | if (__os.tie() && __os.good()) | |
49607 | __os.tie()->flush(); | |
49608 | ||
49609 | if (__os.good()) | |
49610 | _M_ok = true; | |
49611 | else | |
49612 | __os.setstate(ios_base::failbit); | |
49613 | } | |
49614 | ||
49615 | template<typename _CharT, typename _Traits> | |
49616 | basic_ostream<_CharT, _Traits>& | |
49617 | basic_ostream<_CharT, _Traits>:: | |
49618 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | |
49619 | { | |
49620 | ||
49621 | ||
49622 | ||
49623 | return __pf(*this); | |
49624 | } | |
49625 | ||
49626 | template<typename _CharT, typename _Traits> | |
49627 | basic_ostream<_CharT, _Traits>& | |
49628 | basic_ostream<_CharT, _Traits>:: | |
49629 | operator<<(__ios_type& (*__pf)(__ios_type&)) | |
49630 | { | |
49631 | ||
49632 | ||
49633 | ||
49634 | __pf(*this); | |
49635 | return *this; | |
49636 | } | |
49637 | ||
49638 | template<typename _CharT, typename _Traits> | |
49639 | basic_ostream<_CharT, _Traits>& | |
49640 | basic_ostream<_CharT, _Traits>:: | |
49641 | operator<<(ios_base& (*__pf)(ios_base&)) | |
49642 | { | |
49643 | ||
49644 | ||
49645 | ||
49646 | __pf(*this); | |
49647 | return *this; | |
49648 | } | |
49649 | ||
49650 | template<typename _CharT, typename _Traits> | |
49651 | basic_ostream<_CharT, _Traits>& | |
49652 | basic_ostream<_CharT, _Traits>:: | |
49653 | operator<<(bool __n) | |
49654 | { | |
49655 | sentry __cerb(*this); | |
49656 | if (__cerb) | |
49657 | { | |
49658 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
49659 | try | |
49660 | { | |
49661 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
49662 | if (__np.put(*this, *this, this->fill(), __n).failed()) | |
49663 | __err |= ios_base::badbit; | |
49664 | } | |
49665 | catch(...) | |
49666 | { this->_M_setstate(ios_base::badbit); } | |
49667 | if (__err) | |
49668 | this->setstate(__err); | |
49669 | } | |
49670 | return *this; | |
49671 | } | |
49672 | ||
49673 | template<typename _CharT, typename _Traits> | |
49674 | basic_ostream<_CharT, _Traits>& | |
49675 | basic_ostream<_CharT, _Traits>:: | |
49676 | operator<<(short __n) | |
49677 | { | |
49678 | sentry __cerb(*this); | |
49679 | if (__cerb) | |
49680 | { | |
49681 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
49682 | try | |
49683 | { | |
49684 | ||
49685 | ||
49686 | long __l; | |
49687 | const ios_base::fmtflags __fmt = (this->flags() | |
49688 | & ios_base::basefield); | |
49689 | if (__fmt == ios_base::oct || __fmt == ios_base::hex) | |
49690 | __l = static_cast<long>(static_cast<unsigned short>(__n)); | |
49691 | else | |
49692 | __l = static_cast<long>(__n); | |
49693 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
49694 | if (__np.put(*this, *this, this->fill(), __l).failed()) | |
49695 | __err |= ios_base::badbit; | |
49696 | } | |
49697 | catch(...) | |
49698 | { this->_M_setstate(ios_base::badbit); } | |
49699 | if (__err) | |
49700 | this->setstate(__err); | |
49701 | } | |
49702 | return *this; | |
49703 | } | |
49704 | ||
49705 | template<typename _CharT, typename _Traits> | |
49706 | basic_ostream<_CharT, _Traits>& | |
49707 | basic_ostream<_CharT, _Traits>:: | |
49708 | operator<<(unsigned short __n) | |
49709 | { | |
49710 | sentry __cerb(*this); | |
49711 | if (__cerb) | |
49712 | { | |
49713 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
49714 | try | |
49715 | { | |
49716 | ||
49717 | ||
49718 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
49719 | if (__np.put(*this, *this, this->fill(), | |
49720 | static_cast<unsigned long>(__n)).failed()) | |
49721 | __err |= ios_base::badbit; | |
49722 | } | |
49723 | catch(...) | |
49724 | { this->_M_setstate(ios_base::badbit); } | |
49725 | if (__err) | |
49726 | this->setstate(__err); | |
49727 | } | |
49728 | return *this; | |
49729 | } | |
49730 | ||
49731 | template<typename _CharT, typename _Traits> | |
49732 | basic_ostream<_CharT, _Traits>& | |
49733 | basic_ostream<_CharT, _Traits>:: | |
49734 | operator<<(int __n) | |
49735 | { | |
49736 | sentry __cerb(*this); | |
49737 | if (__cerb) | |
49738 | { | |
49739 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
49740 | try | |
49741 | { | |
49742 | ||
49743 | ||
49744 | long __l; | |
49745 | const ios_base::fmtflags __fmt = (this->flags() | |
49746 | & ios_base::basefield); | |
49747 | if (__fmt == ios_base::oct || __fmt == ios_base::hex) | |
49748 | __l = static_cast<long>(static_cast<unsigned int>(__n)); | |
49749 | else | |
49750 | __l = static_cast<long>(__n); | |
49751 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
49752 | if (__np.put(*this, *this, this->fill(), __l).failed()) | |
49753 | __err |= ios_base::badbit; | |
49754 | } | |
49755 | catch(...) | |
49756 | { this->_M_setstate(ios_base::badbit); } | |
49757 | if (__err) | |
49758 | this->setstate(__err); | |
49759 | } | |
49760 | return *this; | |
49761 | } | |
49762 | ||
49763 | template<typename _CharT, typename _Traits> | |
49764 | basic_ostream<_CharT, _Traits>& | |
49765 | basic_ostream<_CharT, _Traits>:: | |
49766 | operator<<(unsigned int __n) | |
49767 | { | |
49768 | sentry __cerb(*this); | |
49769 | if (__cerb) | |
49770 | { | |
49771 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
49772 | try | |
49773 | { | |
49774 | ||
49775 | ||
49776 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
49777 | if (__np.put(*this, *this, this->fill(), | |
49778 | static_cast<unsigned long>(__n)).failed()) | |
49779 | __err |= ios_base::badbit; | |
49780 | } | |
49781 | catch(...) | |
49782 | { this->_M_setstate(ios_base::badbit); } | |
49783 | if (__err) | |
49784 | this->setstate(__err); | |
49785 | } | |
49786 | return *this; | |
49787 | } | |
49788 | ||
49789 | template<typename _CharT, typename _Traits> | |
49790 | basic_ostream<_CharT, _Traits>& | |
49791 | basic_ostream<_CharT, _Traits>:: | |
49792 | operator<<(long __n) | |
49793 | { | |
49794 | sentry __cerb(*this); | |
49795 | if (__cerb) | |
49796 | { | |
49797 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
49798 | try | |
49799 | { | |
49800 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
49801 | if (__np.put(*this, *this, this->fill(), __n).failed()) | |
49802 | __err |= ios_base::badbit; | |
49803 | } | |
49804 | catch(...) | |
49805 | { this->_M_setstate(ios_base::badbit); } | |
49806 | if (__err) | |
49807 | this->setstate(__err); | |
49808 | } | |
49809 | return *this; | |
49810 | } | |
49811 | ||
49812 | template<typename _CharT, typename _Traits> | |
49813 | basic_ostream<_CharT, _Traits>& | |
49814 | basic_ostream<_CharT, _Traits>:: | |
49815 | operator<<(unsigned long __n) | |
49816 | { | |
49817 | sentry __cerb(*this); | |
49818 | if (__cerb) | |
49819 | { | |
49820 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
49821 | try | |
49822 | { | |
49823 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
49824 | if (__np.put(*this, *this, this->fill(), __n).failed()) | |
49825 | __err |= ios_base::badbit; | |
49826 | } | |
49827 | catch(...) | |
49828 | { this->_M_setstate(ios_base::badbit); } | |
49829 | if (__err) | |
49830 | this->setstate(__err); | |
49831 | } | |
49832 | return *this; | |
49833 | } | |
49834 | ||
49835 | ||
49836 | template<typename _CharT, typename _Traits> | |
49837 | basic_ostream<_CharT, _Traits>& | |
49838 | basic_ostream<_CharT, _Traits>:: | |
49839 | operator<<(long long __n) | |
49840 | { | |
49841 | sentry __cerb(*this); | |
49842 | if (__cerb) | |
49843 | { | |
49844 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
49845 | try | |
49846 | { | |
49847 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
49848 | if (__np.put(*this, *this, this->fill(), __n).failed()) | |
49849 | __err |= ios_base::badbit; | |
49850 | } | |
49851 | catch(...) | |
49852 | { this->_M_setstate(ios_base::badbit); } | |
49853 | if (__err) | |
49854 | this->setstate(__err); | |
49855 | } | |
49856 | return *this; | |
49857 | } | |
49858 | ||
49859 | template<typename _CharT, typename _Traits> | |
49860 | basic_ostream<_CharT, _Traits>& | |
49861 | basic_ostream<_CharT, _Traits>:: | |
49862 | operator<<(unsigned long long __n) | |
49863 | { | |
49864 | sentry __cerb(*this); | |
49865 | if (__cerb) | |
49866 | { | |
49867 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
49868 | try | |
49869 | { | |
49870 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
49871 | if (__np.put(*this, *this, this->fill(), __n).failed()) | |
49872 | __err |= ios_base::badbit; | |
49873 | } | |
49874 | catch(...) | |
49875 | { this->_M_setstate(ios_base::badbit); } | |
49876 | if (__err) | |
49877 | this->setstate(__err); | |
49878 | } | |
49879 | return *this; | |
49880 | } | |
49881 | ||
49882 | ||
49883 | template<typename _CharT, typename _Traits> | |
49884 | basic_ostream<_CharT, _Traits>& | |
49885 | basic_ostream<_CharT, _Traits>:: | |
49886 | operator<<(float __n) | |
49887 | { | |
49888 | sentry __cerb(*this); | |
49889 | if (__cerb) | |
49890 | { | |
49891 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
49892 | try | |
49893 | { | |
49894 | ||
49895 | ||
49896 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
49897 | if (__np.put(*this, *this, this->fill(), | |
49898 | static_cast<double>(__n)).failed()) | |
49899 | __err |= ios_base::badbit; | |
49900 | } | |
49901 | catch(...) | |
49902 | { this->_M_setstate(ios_base::badbit); } | |
49903 | if (__err) | |
49904 | this->setstate(__err); | |
49905 | } | |
49906 | return *this; | |
49907 | } | |
49908 | ||
49909 | template<typename _CharT, typename _Traits> | |
49910 | basic_ostream<_CharT, _Traits>& | |
49911 | basic_ostream<_CharT, _Traits>:: | |
49912 | operator<<(double __n) | |
49913 | { | |
49914 | sentry __cerb(*this); | |
49915 | if (__cerb) | |
49916 | { | |
49917 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
49918 | try | |
49919 | { | |
49920 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
49921 | if (__np.put(*this, *this, this->fill(), __n).failed()) | |
49922 | __err |= ios_base::badbit; | |
49923 | } | |
49924 | catch(...) | |
49925 | { this->_M_setstate(ios_base::badbit); } | |
49926 | if (__err) | |
49927 | this->setstate(__err); | |
49928 | } | |
49929 | return *this; | |
49930 | } | |
49931 | ||
49932 | template<typename _CharT, typename _Traits> | |
49933 | basic_ostream<_CharT, _Traits>& | |
49934 | basic_ostream<_CharT, _Traits>:: | |
49935 | operator<<(long double __n) | |
49936 | { | |
49937 | sentry __cerb(*this); | |
49938 | if (__cerb) | |
49939 | { | |
49940 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
49941 | try | |
49942 | { | |
49943 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
49944 | if (__np.put(*this, *this, this->fill(), __n).failed()) | |
49945 | __err |= ios_base::badbit; | |
49946 | } | |
49947 | catch(...) | |
49948 | { this->_M_setstate(ios_base::badbit); } | |
49949 | if (__err) | |
49950 | this->setstate(__err); | |
49951 | } | |
49952 | return *this; | |
49953 | } | |
49954 | ||
49955 | template<typename _CharT, typename _Traits> | |
49956 | basic_ostream<_CharT, _Traits>& | |
49957 | basic_ostream<_CharT, _Traits>:: | |
49958 | operator<<(const void* __n) | |
49959 | { | |
49960 | sentry __cerb(*this); | |
49961 | if (__cerb) | |
49962 | { | |
49963 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
49964 | try | |
49965 | { | |
49966 | const __num_put_type& __np = __check_facet(this->_M_num_put); | |
49967 | if (__np.put(*this, *this, this->fill(), __n).failed()) | |
49968 | __err |= ios_base::badbit; | |
49969 | } | |
49970 | catch(...) | |
49971 | { this->_M_setstate(ios_base::badbit); } | |
49972 | if (__err) | |
49973 | this->setstate(__err); | |
49974 | } | |
49975 | return *this; | |
49976 | } | |
49977 | ||
49978 | template<typename _CharT, typename _Traits> | |
49979 | basic_ostream<_CharT, _Traits>& | |
49980 | basic_ostream<_CharT, _Traits>:: | |
49981 | operator<<(__streambuf_type* __sbin) | |
49982 | { | |
49983 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
49984 | sentry __cerb(*this); | |
49985 | if (__cerb && __sbin) | |
49986 | { | |
49987 | try | |
49988 | { | |
49989 | if (!__copy_streambufs(__sbin, this->rdbuf())) | |
49990 | __err |= ios_base::failbit; | |
49991 | } | |
49992 | catch(...) | |
49993 | { this->_M_setstate(ios_base::failbit); } | |
49994 | } | |
49995 | else if (!__sbin) | |
49996 | __err |= ios_base::badbit; | |
49997 | if (__err) | |
49998 | this->setstate(__err); | |
49999 | return *this; | |
50000 | } | |
50001 | ||
50002 | template<typename _CharT, typename _Traits> | |
50003 | basic_ostream<_CharT, _Traits>& | |
50004 | basic_ostream<_CharT, _Traits>:: | |
50005 | put(char_type __c) | |
50006 | { | |
50007 | ||
50008 | ||
50009 | ||
50010 | ||
50011 | ||
50012 | ||
50013 | sentry __cerb(*this); | |
50014 | if (__cerb) | |
50015 | { | |
50016 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
50017 | try | |
50018 | { | |
50019 | const int_type __put = this->rdbuf()->sputc(__c); | |
50020 | if (traits_type::eq_int_type(__put, traits_type::eof())) | |
50021 | __err |= ios_base::badbit; | |
50022 | } | |
50023 | catch (...) | |
50024 | { this->_M_setstate(ios_base::badbit); } | |
50025 | if (__err) | |
50026 | this->setstate(__err); | |
50027 | } | |
50028 | return *this; | |
50029 | } | |
50030 | ||
50031 | template<typename _CharT, typename _Traits> | |
50032 | basic_ostream<_CharT, _Traits>& | |
50033 | basic_ostream<_CharT, _Traits>:: | |
50034 | write(const _CharT* __s, streamsize __n) | |
50035 | { | |
50036 | ||
50037 | ||
50038 | ||
50039 | ||
50040 | ||
50041 | ||
50042 | ||
50043 | sentry __cerb(*this); | |
50044 | if (__cerb) | |
50045 | { | |
50046 | try | |
50047 | { _M_write(__s, __n); } | |
50048 | catch (...) | |
50049 | { this->_M_setstate(ios_base::badbit); } | |
50050 | } | |
50051 | return *this; | |
50052 | } | |
50053 | ||
50054 | template<typename _CharT, typename _Traits> | |
50055 | basic_ostream<_CharT, _Traits>& | |
50056 | basic_ostream<_CharT, _Traits>:: | |
50057 | flush() | |
50058 | { | |
50059 | ||
50060 | ||
50061 | ||
50062 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
50063 | try | |
50064 | { | |
50065 | if (this->rdbuf() && this->rdbuf()->pubsync() == -1) | |
50066 | __err |= ios_base::badbit; | |
50067 | } | |
50068 | catch(...) | |
50069 | { this->_M_setstate(ios_base::badbit); } | |
50070 | if (__err) | |
50071 | this->setstate(__err); | |
50072 | return *this; | |
50073 | } | |
50074 | ||
50075 | template<typename _CharT, typename _Traits> | |
50076 | typename basic_ostream<_CharT, _Traits>::pos_type | |
50077 | basic_ostream<_CharT, _Traits>:: | |
50078 | tellp() | |
50079 | { | |
50080 | pos_type __ret = pos_type(-1); | |
50081 | try | |
50082 | { | |
50083 | if (!this->fail()) | |
50084 | __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out); | |
50085 | } | |
50086 | catch(...) | |
50087 | { this->_M_setstate(ios_base::badbit); } | |
50088 | return __ret; | |
50089 | } | |
50090 | ||
50091 | template<typename _CharT, typename _Traits> | |
50092 | basic_ostream<_CharT, _Traits>& | |
50093 | basic_ostream<_CharT, _Traits>:: | |
50094 | seekp(pos_type __pos) | |
50095 | { | |
50096 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
50097 | try | |
50098 | { | |
50099 | if (!this->fail()) | |
50100 | { | |
50101 | ||
50102 | ||
50103 | const pos_type __p = this->rdbuf()->pubseekpos(__pos, | |
50104 | ios_base::out); | |
50105 | ||
50106 | ||
50107 | if (__p == pos_type(off_type(-1))) | |
50108 | __err |= ios_base::failbit; | |
50109 | } | |
50110 | } | |
50111 | catch(...) | |
50112 | { this->_M_setstate(ios_base::badbit); } | |
50113 | if (__err) | |
50114 | this->setstate(__err); | |
50115 | return *this; | |
50116 | } | |
50117 | ||
50118 | template<typename _CharT, typename _Traits> | |
50119 | basic_ostream<_CharT, _Traits>& | |
50120 | basic_ostream<_CharT, _Traits>:: | |
50121 | seekp(off_type __off, ios_base::seekdir __dir) | |
50122 | { | |
50123 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
50124 | try | |
50125 | { | |
50126 | if (!this->fail()) | |
50127 | { | |
50128 | ||
50129 | ||
50130 | const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, | |
50131 | ios_base::out); | |
50132 | ||
50133 | ||
50134 | if (__p == pos_type(off_type(-1))) | |
50135 | __err |= ios_base::failbit; | |
50136 | } | |
50137 | } | |
50138 | catch(...) | |
50139 | { this->_M_setstate(ios_base::badbit); } | |
50140 | if (__err) | |
50141 | this->setstate(__err); | |
50142 | return *this; | |
50143 | } | |
50144 | ||
50145 | ||
50146 | template<typename _CharT, typename _Traits> | |
50147 | basic_ostream<_CharT, _Traits>& | |
50148 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | |
50149 | { | |
50150 | typedef basic_ostream<_CharT, _Traits> __ostream_type; | |
50151 | typename __ostream_type::sentry __cerb(__out); | |
50152 | if (__cerb) | |
50153 | { | |
50154 | try | |
50155 | { | |
50156 | const streamsize __w = __out.width(); | |
50157 | streamsize __len = 1; | |
50158 | _CharT* __cs = &__c; | |
50159 | if (__w > __len) | |
50160 | { | |
50161 | __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
50162 | * __w)); | |
50163 | __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs, | |
50164 | &__c, __w, __len, false); | |
50165 | __len = __w; | |
50166 | } | |
50167 | __out._M_write(__cs, __len); | |
50168 | __out.width(0); | |
50169 | } | |
50170 | catch(...) | |
50171 | { __out._M_setstate(ios_base::badbit); } | |
50172 | } | |
50173 | return __out; | |
50174 | } | |
50175 | ||
50176 | ||
50177 | template <class _Traits> | |
50178 | basic_ostream<char, _Traits>& | |
50179 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | |
50180 | { | |
50181 | typedef basic_ostream<char, _Traits> __ostream_type; | |
50182 | typename __ostream_type::sentry __cerb(__out); | |
50183 | if (__cerb) | |
50184 | { | |
50185 | try | |
50186 | { | |
50187 | const streamsize __w = __out.width(); | |
50188 | streamsize __len = 1; | |
50189 | char* __cs = &__c; | |
50190 | if (__w > __len) | |
50191 | { | |
50192 | __cs = static_cast<char*>(__builtin_alloca(__w)); | |
50193 | __pad<char, _Traits>::_S_pad(__out, __out.fill(), __cs, | |
50194 | &__c, __w, __len, false); | |
50195 | __len = __w; | |
50196 | } | |
50197 | __out._M_write(__cs, __len); | |
50198 | __out.width(0); | |
50199 | } | |
50200 | catch(...) | |
50201 | { __out._M_setstate(ios_base::badbit); } | |
50202 | } | |
50203 | return __out; | |
50204 | } | |
50205 | ||
50206 | template<typename _CharT, typename _Traits> | |
50207 | basic_ostream<_CharT, _Traits>& | |
50208 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | |
50209 | { | |
50210 | typedef basic_ostream<_CharT, _Traits> __ostream_type; | |
50211 | typename __ostream_type::sentry __cerb(__out); | |
50212 | if (__cerb && __s) | |
50213 | { | |
50214 | try | |
50215 | { | |
50216 | const streamsize __w = __out.width(); | |
50217 | streamsize __len = static_cast<streamsize>(_Traits::length(__s)); | |
50218 | if (__w > __len) | |
50219 | { | |
50220 | _CharT* __cs = (static_cast< | |
50221 | _CharT*>(__builtin_alloca(sizeof(_CharT) | |
50222 | * __w))); | |
50223 | __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs, | |
50224 | __s, __w, __len, false); | |
50225 | __s = __cs; | |
50226 | __len = __w; | |
50227 | } | |
50228 | __out._M_write(__s, __len); | |
50229 | __out.width(0); | |
50230 | } | |
50231 | catch(...) | |
50232 | { __out._M_setstate(ios_base::badbit); } | |
50233 | } | |
50234 | else if (!__s) | |
50235 | __out.setstate(ios_base::badbit); | |
50236 | return __out; | |
50237 | } | |
50238 | ||
50239 | template<typename _CharT, typename _Traits> | |
50240 | basic_ostream<_CharT, _Traits>& | |
50241 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | |
50242 | { | |
50243 | typedef basic_ostream<_CharT, _Traits> __ostream_type; | |
50244 | ||
50245 | ||
50246 | ||
50247 | typedef char_traits<char> __traits_type; | |
50248 | typename __ostream_type::sentry __cerb(__out); | |
50249 | if (__cerb && __s) | |
50250 | { | |
50251 | size_t __clen = __traits_type::length(__s); | |
50252 | _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) | |
50253 | * __clen)); | |
50254 | for (size_t __i = 0; __i < __clen; ++__i) | |
50255 | __ws[__i] = __out.widen(__s[__i]); | |
50256 | _CharT* __str = __ws; | |
50257 | ||
50258 | try | |
50259 | { | |
50260 | const streamsize __w = __out.width(); | |
50261 | streamsize __len = static_cast<streamsize>(__clen); | |
50262 | if (__w > __len) | |
50263 | { | |
50264 | _CharT* __cs = (static_cast< | |
50265 | _CharT*>(__builtin_alloca(sizeof(_CharT) | |
50266 | * __w))); | |
50267 | __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs, | |
50268 | __ws, __w, __len, false); | |
50269 | __str = __cs; | |
50270 | __len = __w; | |
50271 | } | |
50272 | __out._M_write(__str, __len); | |
50273 | __out.width(0); | |
50274 | } | |
50275 | catch(...) | |
50276 | { __out._M_setstate(ios_base::badbit); } | |
50277 | } | |
50278 | else if (!__s) | |
50279 | __out.setstate(ios_base::badbit); | |
50280 | return __out; | |
50281 | } | |
50282 | ||
50283 | ||
50284 | template<class _Traits> | |
50285 | basic_ostream<char, _Traits>& | |
50286 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | |
50287 | { | |
50288 | typedef basic_ostream<char, _Traits> __ostream_type; | |
50289 | typename __ostream_type::sentry __cerb(__out); | |
50290 | if (__cerb && __s) | |
50291 | { | |
50292 | try | |
50293 | { | |
50294 | const streamsize __w = __out.width(); | |
50295 | streamsize __len = static_cast<streamsize>(_Traits::length(__s)); | |
50296 | if (__w > __len) | |
50297 | { | |
50298 | char* __cs = static_cast<char*>(__builtin_alloca(__w)); | |
50299 | __pad<char, _Traits>::_S_pad(__out, __out.fill(), __cs, | |
50300 | __s, __w, __len, false); | |
50301 | __s = __cs; | |
50302 | __len = __w; | |
50303 | } | |
50304 | __out._M_write(__s, __len); | |
50305 | __out.width(0); | |
50306 | } | |
50307 | catch(...) | |
50308 | { __out._M_setstate(ios_base::badbit); } | |
50309 | } | |
50310 | else if (!__s) | |
50311 | __out.setstate(ios_base::badbit); | |
50312 | return __out; | |
50313 | } | |
50314 | ||
50315 | ||
50316 | template<typename _CharT, typename _Traits, typename _Alloc> | |
50317 | basic_ostream<_CharT, _Traits>& | |
50318 | operator<<(basic_ostream<_CharT, _Traits>& __out, | |
50319 | const basic_string<_CharT, _Traits, _Alloc>& __str) | |
50320 | { | |
50321 | typedef basic_ostream<_CharT, _Traits> __ostream_type; | |
50322 | typename __ostream_type::sentry __cerb(__out); | |
50323 | if (__cerb) | |
50324 | { | |
50325 | const streamsize __w = __out.width(); | |
50326 | streamsize __len = static_cast<streamsize>(__str.size()); | |
50327 | const _CharT* __s = __str.data(); | |
50328 | ||
50329 | ||
50330 | ||
50331 | if (__w > __len) | |
50332 | { | |
50333 | _CharT* __cs = (static_cast< | |
50334 | _CharT*>(__builtin_alloca(sizeof(_CharT) * __w))); | |
50335 | __pad<_CharT, _Traits>::_S_pad(__out, __out.fill(), __cs, __s, | |
50336 | __w, __len, false); | |
50337 | __s = __cs; | |
50338 | __len = __w; | |
50339 | } | |
50340 | __out._M_write(__s, __len); | |
50341 | __out.width(0); | |
50342 | } | |
50343 | return __out; | |
50344 | } | |
50345 | ||
50346 | ||
50347 | ||
50348 | ||
50349 | ||
50350 | extern template class basic_ostream<char>; | |
50351 | extern template ostream& endl(ostream&); | |
50352 | extern template ostream& ends(ostream&); | |
50353 | extern template ostream& flush(ostream&); | |
50354 | extern template ostream& operator<<(ostream&, char); | |
50355 | extern template ostream& operator<<(ostream&, unsigned char); | |
50356 | extern template ostream& operator<<(ostream&, signed char); | |
50357 | extern template ostream& operator<<(ostream&, const char*); | |
50358 | extern template ostream& operator<<(ostream&, const unsigned char*); | |
50359 | extern template ostream& operator<<(ostream&, const signed char*); | |
50360 | ||
50361 | ||
50362 | extern template class basic_ostream<wchar_t>; | |
50363 | extern template wostream& endl(wostream&); | |
50364 | extern template wostream& ends(wostream&); | |
50365 | extern template wostream& flush(wostream&); | |
50366 | extern template wostream& operator<<(wostream&, wchar_t); | |
50367 | extern template wostream& operator<<(wostream&, char); | |
50368 | extern template wostream& operator<<(wostream&, const wchar_t*); | |
50369 | extern template wostream& operator<<(wostream&, const char*); | |
50370 | ||
50371 | ||
50372 | } | |
50373 | # 527 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/ostream" 2 3 | |
50374 | ||
50375 | ||
50376 | #pragma GCC visibility pop | |
50377 | # 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/iostream" 2 3 | |
50378 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 1 3 | |
50379 | # 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50380 | ||
50381 | # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50382 | #pragma GCC visibility push(default) | |
50383 | ||
50384 | ||
50385 | ||
50386 | ||
50387 | namespace std | |
50388 | { | |
50389 | # 58 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50390 | template<typename _CharT, typename _Traits> | |
50391 | class basic_istream : virtual public basic_ios<_CharT, _Traits> | |
50392 | { | |
50393 | public: | |
50394 | ||
50395 | typedef _CharT char_type; | |
50396 | typedef typename _Traits::int_type int_type; | |
50397 | typedef typename _Traits::pos_type pos_type; | |
50398 | typedef typename _Traits::off_type off_type; | |
50399 | typedef _Traits traits_type; | |
50400 | ||
50401 | ||
50402 | typedef basic_streambuf<_CharT, _Traits> __streambuf_type; | |
50403 | typedef basic_ios<_CharT, _Traits> __ios_type; | |
50404 | typedef basic_istream<_CharT, _Traits> __istream_type; | |
50405 | typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > | |
50406 | __num_get_type; | |
50407 | typedef ctype<_CharT> __ctype_type; | |
50408 | ||
50409 | template<typename _CharT2, typename _Traits2> | |
50410 | friend basic_istream<_CharT2, _Traits2>& | |
50411 | operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2&); | |
50412 | ||
50413 | template<typename _CharT2, typename _Traits2> | |
50414 | friend basic_istream<_CharT2, _Traits2>& | |
50415 | operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*); | |
50416 | ||
50417 | protected: | |
50418 | ||
50419 | ||
50420 | ||
50421 | ||
50422 | ||
50423 | ||
50424 | ||
50425 | streamsize _M_gcount; | |
50426 | ||
50427 | public: | |
50428 | # 104 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50429 | explicit | |
50430 | basic_istream(__streambuf_type* __sb): _M_gcount(streamsize(0)) | |
50431 | { this->init(__sb); } | |
50432 | ||
50433 | ||
50434 | ||
50435 | ||
50436 | ||
50437 | ||
50438 | virtual | |
50439 | ~basic_istream() | |
50440 | { _M_gcount = streamsize(0); } | |
50441 | ||
50442 | ||
50443 | class sentry; | |
50444 | friend class sentry; | |
50445 | # 131 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50446 | inline __istream_type& | |
50447 | operator>>(__istream_type& (*__pf)(__istream_type&)); | |
50448 | ||
50449 | inline __istream_type& | |
50450 | operator>>(__ios_type& (*__pf)(__ios_type&)); | |
50451 | ||
50452 | inline __istream_type& | |
50453 | operator>>(ios_base& (*__pf)(ios_base&)); | |
50454 | # 169 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50455 | __istream_type& | |
50456 | operator>>(bool& __n); | |
50457 | ||
50458 | __istream_type& | |
50459 | operator>>(short& __n); | |
50460 | ||
50461 | __istream_type& | |
50462 | operator>>(unsigned short& __n); | |
50463 | ||
50464 | __istream_type& | |
50465 | operator>>(int& __n); | |
50466 | ||
50467 | __istream_type& | |
50468 | operator>>(unsigned int& __n); | |
50469 | ||
50470 | __istream_type& | |
50471 | operator>>(long& __n); | |
50472 | ||
50473 | __istream_type& | |
50474 | operator>>(unsigned long& __n); | |
50475 | ||
50476 | ||
50477 | __istream_type& | |
50478 | operator>>(long long& __n); | |
50479 | ||
50480 | __istream_type& | |
50481 | operator>>(unsigned long long& __n); | |
50482 | ||
50483 | ||
50484 | __istream_type& | |
50485 | operator>>(float& __f); | |
50486 | ||
50487 | __istream_type& | |
50488 | operator>>(double& __f); | |
50489 | ||
50490 | __istream_type& | |
50491 | operator>>(long double& __f); | |
50492 | ||
50493 | __istream_type& | |
50494 | operator>>(void*& __p); | |
50495 | # 230 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50496 | __istream_type& | |
50497 | operator>>(__streambuf_type* __sb); | |
50498 | # 240 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50499 | inline streamsize | |
50500 | gcount() const | |
50501 | { return _M_gcount; } | |
50502 | # 272 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50503 | int_type | |
50504 | get(); | |
50505 | # 286 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50506 | __istream_type& | |
50507 | get(char_type& __c); | |
50508 | # 313 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50509 | __istream_type& | |
50510 | get(char_type* __s, streamsize __n, char_type __delim); | |
50511 | # 324 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50512 | inline __istream_type& | |
50513 | get(char_type* __s, streamsize __n) | |
50514 | { return this->get(__s, __n, this->widen('\n')); } | |
50515 | # 347 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50516 | __istream_type& | |
50517 | get(__streambuf_type& __sb, char_type __delim); | |
50518 | # 357 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50519 | inline __istream_type& | |
50520 | get(__streambuf_type& __sb) | |
50521 | { return this->get(__sb, this->widen('\n')); } | |
50522 | # 386 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50523 | __istream_type& | |
50524 | getline(char_type* __s, streamsize __n, char_type __delim); | |
50525 | # 397 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50526 | inline __istream_type& | |
50527 | getline(char_type* __s, streamsize __n) | |
50528 | { return this->getline(__s, __n, this->widen('\n')); } | |
50529 | # 421 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50530 | __istream_type& | |
50531 | ignore(); | |
50532 | ||
50533 | __istream_type& | |
50534 | ignore(streamsize __n); | |
50535 | ||
50536 | __istream_type& | |
50537 | ignore(streamsize __n, int_type __delim); | |
50538 | # 438 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50539 | int_type | |
50540 | peek(); | |
50541 | # 456 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50542 | __istream_type& | |
50543 | read(char_type* __s, streamsize __n); | |
50544 | # 475 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50545 | streamsize | |
50546 | readsome(char_type* __s, streamsize __n); | |
50547 | # 491 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50548 | __istream_type& | |
50549 | putback(char_type __c); | |
50550 | # 506 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50551 | __istream_type& | |
50552 | unget(); | |
50553 | # 524 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50554 | int | |
50555 | sync(); | |
50556 | # 538 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50557 | pos_type | |
50558 | tellg(); | |
50559 | # 553 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50560 | __istream_type& | |
50561 | seekg(pos_type); | |
50562 | # 569 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50563 | __istream_type& | |
50564 | seekg(off_type, ios_base::seekdir); | |
50565 | ||
50566 | ||
50567 | protected: | |
50568 | explicit | |
50569 | basic_istream(): _M_gcount(streamsize(0)) { } | |
50570 | }; | |
50571 | ||
50572 | ||
50573 | template<> | |
50574 | basic_istream<char>& | |
50575 | basic_istream<char>:: | |
50576 | getline(char_type* __s, streamsize __n, char_type __delim); | |
50577 | ||
50578 | template<> | |
50579 | basic_istream<char>& | |
50580 | basic_istream<char>:: | |
50581 | ignore(streamsize __n); | |
50582 | ||
50583 | template<> | |
50584 | basic_istream<char>& | |
50585 | basic_istream<char>:: | |
50586 | ignore(streamsize __n, int_type __delim); | |
50587 | ||
50588 | ||
50589 | template<> | |
50590 | basic_istream<wchar_t>& | |
50591 | basic_istream<wchar_t>:: | |
50592 | getline(char_type* __s, streamsize __n, char_type __delim); | |
50593 | ||
50594 | template<> | |
50595 | basic_istream<wchar_t>& | |
50596 | basic_istream<wchar_t>:: | |
50597 | ignore(streamsize __n); | |
50598 | ||
50599 | template<> | |
50600 | basic_istream<wchar_t>& | |
50601 | basic_istream<wchar_t>:: | |
50602 | ignore(streamsize __n, int_type __delim); | |
50603 | # 622 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50604 | template<typename _CharT, typename _Traits> | |
50605 | class basic_istream<_CharT, _Traits>::sentry | |
50606 | { | |
50607 | public: | |
50608 | ||
50609 | typedef _Traits traits_type; | |
50610 | typedef basic_streambuf<_CharT, _Traits> __streambuf_type; | |
50611 | typedef basic_istream<_CharT, _Traits> __istream_type; | |
50612 | typedef typename __istream_type::__ctype_type __ctype_type; | |
50613 | typedef typename _Traits::int_type __int_type; | |
50614 | # 654 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50615 | explicit | |
50616 | sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false); | |
50617 | # 664 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50618 | operator bool() const { return _M_ok; } | |
50619 | ||
50620 | private: | |
50621 | bool _M_ok; | |
50622 | }; | |
50623 | # 683 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50624 | template<typename _CharT, typename _Traits> | |
50625 | basic_istream<_CharT, _Traits>& | |
50626 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c); | |
50627 | ||
50628 | template<class _Traits> | |
50629 | basic_istream<char, _Traits>& | |
50630 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | |
50631 | { return (__in >> reinterpret_cast<char&>(__c)); } | |
50632 | ||
50633 | template<class _Traits> | |
50634 | basic_istream<char, _Traits>& | |
50635 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | |
50636 | { return (__in >> reinterpret_cast<char&>(__c)); } | |
50637 | # 724 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50638 | template<typename _CharT, typename _Traits> | |
50639 | basic_istream<_CharT, _Traits>& | |
50640 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s); | |
50641 | ||
50642 | ||
50643 | template<> | |
50644 | basic_istream<char>& | |
50645 | operator>>(basic_istream<char>& __in, char* __s); | |
50646 | ||
50647 | template<class _Traits> | |
50648 | basic_istream<char, _Traits>& | |
50649 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | |
50650 | { return (__in >> reinterpret_cast<char*>(__s)); } | |
50651 | ||
50652 | template<class _Traits> | |
50653 | basic_istream<char, _Traits>& | |
50654 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | |
50655 | { return (__in >> reinterpret_cast<char*>(__s)); } | |
50656 | # 751 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50657 | template<typename _CharT, typename _Traits> | |
50658 | class basic_iostream | |
50659 | : public basic_istream<_CharT, _Traits>, | |
50660 | public basic_ostream<_CharT, _Traits> | |
50661 | { | |
50662 | public: | |
50663 | ||
50664 | ||
50665 | ||
50666 | typedef _CharT char_type; | |
50667 | typedef typename _Traits::int_type int_type; | |
50668 | typedef typename _Traits::pos_type pos_type; | |
50669 | typedef typename _Traits::off_type off_type; | |
50670 | typedef _Traits traits_type; | |
50671 | ||
50672 | ||
50673 | typedef basic_istream<_CharT, _Traits> __istream_type; | |
50674 | typedef basic_ostream<_CharT, _Traits> __ostream_type; | |
50675 | ||
50676 | ||
50677 | ||
50678 | ||
50679 | ||
50680 | ||
50681 | ||
50682 | explicit | |
50683 | basic_iostream(basic_streambuf<_CharT, _Traits>* __sb) | |
50684 | : __istream_type(), __ostream_type() | |
50685 | { this->init(__sb); } | |
50686 | ||
50687 | ||
50688 | ||
50689 | ||
50690 | virtual | |
50691 | ~basic_iostream() { } | |
50692 | ||
50693 | protected: | |
50694 | explicit | |
50695 | basic_iostream() : __istream_type(), __ostream_type() | |
50696 | { } | |
50697 | }; | |
50698 | # 814 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 3 | |
50699 | template<typename _CharT, typename _Traits> | |
50700 | basic_istream<_CharT, _Traits>& | |
50701 | ws(basic_istream<_CharT, _Traits>& __is); | |
50702 | } | |
50703 | ||
50704 | ||
50705 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/istream.tcc" 1 3 | |
50706 | # 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/istream.tcc" 3 | |
50707 | ||
50708 | # 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/istream.tcc" 3 | |
50709 | ||
50710 | ||
50711 | ||
50712 | ||
50713 | namespace std | |
50714 | { | |
50715 | template<typename _CharT, typename _Traits> | |
50716 | basic_istream<_CharT, _Traits>::sentry:: | |
50717 | sentry(basic_istream<_CharT, _Traits>& __in, bool __noskip) : _M_ok(false) | |
50718 | { | |
50719 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
50720 | if (__in.good()) | |
50721 | { | |
50722 | if (__in.tie()) | |
50723 | __in.tie()->flush(); | |
50724 | if (!__noskip && (__in.flags() & ios_base::skipws)) | |
50725 | { | |
50726 | const __int_type __eof = traits_type::eof(); | |
50727 | __streambuf_type* __sb = __in.rdbuf(); | |
50728 | __int_type __c = __sb->sgetc(); | |
50729 | ||
50730 | const __ctype_type& __ct = __check_facet(__in._M_ctype); | |
50731 | while (!traits_type::eq_int_type(__c, __eof) | |
50732 | && __ct.is(ctype_base::space, | |
50733 | traits_type::to_char_type(__c))) | |
50734 | __c = __sb->snextc(); | |
50735 | ||
50736 | ||
50737 | ||
50738 | ||
50739 | if (traits_type::eq_int_type(__c, __eof)) | |
50740 | __err |= ios_base::eofbit; | |
50741 | } | |
50742 | } | |
50743 | ||
50744 | if (__in.good() && __err == ios_base::goodbit) | |
50745 | _M_ok = true; | |
50746 | else | |
50747 | { | |
50748 | __err |= ios_base::failbit; | |
50749 | __in.setstate(__err); | |
50750 | } | |
50751 | } | |
50752 | ||
50753 | template<typename _CharT, typename _Traits> | |
50754 | basic_istream<_CharT, _Traits>& | |
50755 | basic_istream<_CharT, _Traits>:: | |
50756 | operator>>(__istream_type& (*__pf)(__istream_type&)) | |
50757 | { return __pf(*this); } | |
50758 | ||
50759 | template<typename _CharT, typename _Traits> | |
50760 | basic_istream<_CharT, _Traits>& | |
50761 | basic_istream<_CharT, _Traits>:: | |
50762 | operator>>(__ios_type& (*__pf)(__ios_type&)) | |
50763 | { | |
50764 | __pf(*this); | |
50765 | return *this; | |
50766 | } | |
50767 | ||
50768 | template<typename _CharT, typename _Traits> | |
50769 | basic_istream<_CharT, _Traits>& | |
50770 | basic_istream<_CharT, _Traits>:: | |
50771 | operator>>(ios_base& (*__pf)(ios_base&)) | |
50772 | { | |
50773 | __pf(*this); | |
50774 | return *this; | |
50775 | } | |
50776 | ||
50777 | template<typename _CharT, typename _Traits> | |
50778 | basic_istream<_CharT, _Traits>& | |
50779 | basic_istream<_CharT, _Traits>:: | |
50780 | operator>>(bool& __n) | |
50781 | { | |
50782 | sentry __cerb(*this, false); | |
50783 | if (__cerb) | |
50784 | { | |
50785 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
50786 | try | |
50787 | { | |
50788 | const __num_get_type& __ng = __check_facet(this->_M_num_get); | |
50789 | __ng.get(*this, 0, *this, __err, __n); | |
50790 | } | |
50791 | catch(...) | |
50792 | { this->_M_setstate(ios_base::badbit); } | |
50793 | if (__err) | |
50794 | this->setstate(__err); | |
50795 | } | |
50796 | return *this; | |
50797 | } | |
50798 | ||
50799 | template<typename _CharT, typename _Traits> | |
50800 | basic_istream<_CharT, _Traits>& | |
50801 | basic_istream<_CharT, _Traits>:: | |
50802 | operator>>(short& __n) | |
50803 | { | |
50804 | sentry __cerb(*this, false); | |
50805 | if (__cerb) | |
50806 | { | |
50807 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
50808 | try | |
50809 | { | |
50810 | long __l; | |
50811 | const __num_get_type& __ng = __check_facet(this->_M_num_get); | |
50812 | __ng.get(*this, 0, *this, __err, __l); | |
50813 | ||
50814 | ||
50815 | if (!(__err & ios_base::failbit) | |
50816 | && (numeric_limits<short>::min() <= __l | |
50817 | && __l <= numeric_limits<short>::max())) | |
50818 | __n = __l; | |
50819 | else | |
50820 | __err |= ios_base::failbit; | |
50821 | } | |
50822 | catch(...) | |
50823 | { this->_M_setstate(ios_base::badbit); } | |
50824 | if (__err) | |
50825 | this->setstate(__err); | |
50826 | } | |
50827 | return *this; | |
50828 | } | |
50829 | ||
50830 | template<typename _CharT, typename _Traits> | |
50831 | basic_istream<_CharT, _Traits>& | |
50832 | basic_istream<_CharT, _Traits>:: | |
50833 | operator>>(unsigned short& __n) | |
50834 | { | |
50835 | sentry __cerb(*this, false); | |
50836 | if (__cerb) | |
50837 | { | |
50838 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
50839 | try | |
50840 | { | |
50841 | const __num_get_type& __ng = __check_facet(this->_M_num_get); | |
50842 | __ng.get(*this, 0, *this, __err, __n); | |
50843 | } | |
50844 | catch(...) | |
50845 | { this->_M_setstate(ios_base::badbit); } | |
50846 | if (__err) | |
50847 | this->setstate(__err); | |
50848 | } | |
50849 | return *this; | |
50850 | } | |
50851 | ||
50852 | template<typename _CharT, typename _Traits> | |
50853 | basic_istream<_CharT, _Traits>& | |
50854 | basic_istream<_CharT, _Traits>:: | |
50855 | operator>>(int& __n) | |
50856 | { | |
50857 | sentry __cerb(*this, false); | |
50858 | if (__cerb) | |
50859 | { | |
50860 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
50861 | try | |
50862 | { | |
50863 | long __l; | |
50864 | const __num_get_type& __ng = __check_facet(this->_M_num_get); | |
50865 | __ng.get(*this, 0, *this, __err, __l); | |
50866 | ||
50867 | ||
50868 | if (!(__err & ios_base::failbit) | |
50869 | && (numeric_limits<int>::min() <= __l | |
50870 | && __l <= numeric_limits<int>::max())) | |
50871 | __n = __l; | |
50872 | else | |
50873 | __err |= ios_base::failbit; | |
50874 | } | |
50875 | catch(...) | |
50876 | { this->_M_setstate(ios_base::badbit); } | |
50877 | if (__err) | |
50878 | this->setstate(__err); | |
50879 | } | |
50880 | return *this; | |
50881 | } | |
50882 | ||
50883 | template<typename _CharT, typename _Traits> | |
50884 | basic_istream<_CharT, _Traits>& | |
50885 | basic_istream<_CharT, _Traits>:: | |
50886 | operator>>(unsigned int& __n) | |
50887 | { | |
50888 | sentry __cerb(*this, false); | |
50889 | if (__cerb) | |
50890 | { | |
50891 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
50892 | try | |
50893 | { | |
50894 | const __num_get_type& __ng = __check_facet(this->_M_num_get); | |
50895 | __ng.get(*this, 0, *this, __err, __n); | |
50896 | } | |
50897 | catch(...) | |
50898 | { this->_M_setstate(ios_base::badbit); } | |
50899 | if (__err) | |
50900 | this->setstate(__err); | |
50901 | } | |
50902 | return *this; | |
50903 | } | |
50904 | ||
50905 | template<typename _CharT, typename _Traits> | |
50906 | basic_istream<_CharT, _Traits>& | |
50907 | basic_istream<_CharT, _Traits>:: | |
50908 | operator>>(long& __n) | |
50909 | { | |
50910 | sentry __cerb(*this, false); | |
50911 | if (__cerb) | |
50912 | { | |
50913 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
50914 | try | |
50915 | { | |
50916 | const __num_get_type& __ng = __check_facet(this->_M_num_get); | |
50917 | __ng.get(*this, 0, *this, __err, __n); | |
50918 | } | |
50919 | catch(...) | |
50920 | { this->_M_setstate(ios_base::badbit); } | |
50921 | if (__err) | |
50922 | this->setstate(__err); | |
50923 | } | |
50924 | return *this; | |
50925 | } | |
50926 | ||
50927 | template<typename _CharT, typename _Traits> | |
50928 | basic_istream<_CharT, _Traits>& | |
50929 | basic_istream<_CharT, _Traits>:: | |
50930 | operator>>(unsigned long& __n) | |
50931 | { | |
50932 | sentry __cerb(*this, false); | |
50933 | if (__cerb) | |
50934 | { | |
50935 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
50936 | try | |
50937 | { | |
50938 | const __num_get_type& __ng = __check_facet(this->_M_num_get); | |
50939 | __ng.get(*this, 0, *this, __err, __n); | |
50940 | } | |
50941 | catch(...) | |
50942 | { this->_M_setstate(ios_base::badbit); } | |
50943 | if (__err) | |
50944 | this->setstate(__err); | |
50945 | } | |
50946 | return *this; | |
50947 | } | |
50948 | ||
50949 | ||
50950 | template<typename _CharT, typename _Traits> | |
50951 | basic_istream<_CharT, _Traits>& | |
50952 | basic_istream<_CharT, _Traits>:: | |
50953 | operator>>(long long& __n) | |
50954 | { | |
50955 | sentry __cerb(*this, false); | |
50956 | if (__cerb) | |
50957 | { | |
50958 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
50959 | try | |
50960 | { | |
50961 | const __num_get_type& __ng = __check_facet(this->_M_num_get); | |
50962 | __ng.get(*this, 0, *this, __err, __n); | |
50963 | } | |
50964 | catch(...) | |
50965 | { this->_M_setstate(ios_base::badbit); } | |
50966 | if (__err) | |
50967 | this->setstate(__err); | |
50968 | } | |
50969 | return *this; | |
50970 | } | |
50971 | ||
50972 | template<typename _CharT, typename _Traits> | |
50973 | basic_istream<_CharT, _Traits>& | |
50974 | basic_istream<_CharT, _Traits>:: | |
50975 | operator>>(unsigned long long& __n) | |
50976 | { | |
50977 | sentry __cerb(*this, false); | |
50978 | if (__cerb) | |
50979 | { | |
50980 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
50981 | try | |
50982 | { | |
50983 | const __num_get_type& __ng = __check_facet(this->_M_num_get); | |
50984 | __ng.get(*this, 0, *this, __err, __n); | |
50985 | } | |
50986 | catch(...) | |
50987 | { this->_M_setstate(ios_base::badbit); } | |
50988 | if (__err) | |
50989 | this->setstate(__err); | |
50990 | } | |
50991 | return *this; | |
50992 | } | |
50993 | ||
50994 | ||
50995 | template<typename _CharT, typename _Traits> | |
50996 | basic_istream<_CharT, _Traits>& | |
50997 | basic_istream<_CharT, _Traits>:: | |
50998 | operator>>(float& __n) | |
50999 | { | |
51000 | sentry __cerb(*this, false); | |
51001 | if (__cerb) | |
51002 | { | |
51003 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
51004 | try | |
51005 | { | |
51006 | const __num_get_type& __ng = __check_facet(this->_M_num_get); | |
51007 | __ng.get(*this, 0, *this, __err, __n); | |
51008 | } | |
51009 | catch(...) | |
51010 | { this->_M_setstate(ios_base::badbit); } | |
51011 | if (__err) | |
51012 | this->setstate(__err); | |
51013 | } | |
51014 | return *this; | |
51015 | } | |
51016 | ||
51017 | template<typename _CharT, typename _Traits> | |
51018 | basic_istream<_CharT, _Traits>& | |
51019 | basic_istream<_CharT, _Traits>:: | |
51020 | operator>>(double& __n) | |
51021 | { | |
51022 | sentry __cerb(*this, false); | |
51023 | if (__cerb) | |
51024 | { | |
51025 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
51026 | try | |
51027 | { | |
51028 | const __num_get_type& __ng = __check_facet(this->_M_num_get); | |
51029 | __ng.get(*this, 0, *this, __err, __n); | |
51030 | } | |
51031 | catch(...) | |
51032 | { this->_M_setstate(ios_base::badbit); } | |
51033 | if (__err) | |
51034 | this->setstate(__err); | |
51035 | } | |
51036 | return *this; | |
51037 | } | |
51038 | ||
51039 | template<typename _CharT, typename _Traits> | |
51040 | basic_istream<_CharT, _Traits>& | |
51041 | basic_istream<_CharT, _Traits>:: | |
51042 | operator>>(long double& __n) | |
51043 | { | |
51044 | sentry __cerb(*this, false); | |
51045 | if (__cerb) | |
51046 | { | |
51047 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
51048 | try | |
51049 | { | |
51050 | const __num_get_type& __ng = __check_facet(this->_M_num_get); | |
51051 | __ng.get(*this, 0, *this, __err, __n); | |
51052 | } | |
51053 | catch(...) | |
51054 | { this->_M_setstate(ios_base::badbit); } | |
51055 | if (__err) | |
51056 | this->setstate(__err); | |
51057 | } | |
51058 | return *this; | |
51059 | } | |
51060 | ||
51061 | template<typename _CharT, typename _Traits> | |
51062 | basic_istream<_CharT, _Traits>& | |
51063 | basic_istream<_CharT, _Traits>:: | |
51064 | operator>>(void*& __n) | |
51065 | { | |
51066 | sentry __cerb(*this, false); | |
51067 | if (__cerb) | |
51068 | { | |
51069 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
51070 | try | |
51071 | { | |
51072 | const __num_get_type& __ng = __check_facet(this->_M_num_get); | |
51073 | __ng.get(*this, 0, *this, __err, __n); | |
51074 | } | |
51075 | catch(...) | |
51076 | { this->_M_setstate(ios_base::badbit); } | |
51077 | if (__err) | |
51078 | this->setstate(__err); | |
51079 | } | |
51080 | return *this; | |
51081 | } | |
51082 | ||
51083 | template<typename _CharT, typename _Traits> | |
51084 | basic_istream<_CharT, _Traits>& | |
51085 | basic_istream<_CharT, _Traits>:: | |
51086 | operator>>(__streambuf_type* __sbout) | |
51087 | { | |
51088 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
51089 | sentry __cerb(*this, false); | |
51090 | if (__cerb && __sbout) | |
51091 | { | |
51092 | try | |
51093 | { | |
51094 | if (!__copy_streambufs(this->rdbuf(), __sbout)) | |
51095 | __err |= ios_base::failbit; | |
51096 | } | |
51097 | catch(...) | |
51098 | { this->_M_setstate(ios_base::failbit); } | |
51099 | } | |
51100 | else if (!__sbout) | |
51101 | __err |= ios_base::failbit; | |
51102 | if (__err) | |
51103 | this->setstate(__err); | |
51104 | return *this; | |
51105 | } | |
51106 | ||
51107 | template<typename _CharT, typename _Traits> | |
51108 | typename basic_istream<_CharT, _Traits>::int_type | |
51109 | basic_istream<_CharT, _Traits>:: | |
51110 | get(void) | |
51111 | { | |
51112 | const int_type __eof = traits_type::eof(); | |
51113 | int_type __c = __eof; | |
51114 | _M_gcount = 0; | |
51115 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
51116 | sentry __cerb(*this, true); | |
51117 | if (__cerb) | |
51118 | { | |
51119 | try | |
51120 | { | |
51121 | __c = this->rdbuf()->sbumpc(); | |
51122 | ||
51123 | if (!traits_type::eq_int_type(__c, __eof)) | |
51124 | _M_gcount = 1; | |
51125 | else | |
51126 | __err |= ios_base::eofbit; | |
51127 | } | |
51128 | catch(...) | |
51129 | { this->_M_setstate(ios_base::badbit); } | |
51130 | } | |
51131 | if (!_M_gcount) | |
51132 | __err |= ios_base::failbit; | |
51133 | if (__err) | |
51134 | this->setstate(__err); | |
51135 | return __c; | |
51136 | } | |
51137 | ||
51138 | template<typename _CharT, typename _Traits> | |
51139 | basic_istream<_CharT, _Traits>& | |
51140 | basic_istream<_CharT, _Traits>:: | |
51141 | get(char_type& __c) | |
51142 | { | |
51143 | _M_gcount = 0; | |
51144 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
51145 | sentry __cerb(*this, true); | |
51146 | if (__cerb) | |
51147 | { | |
51148 | try | |
51149 | { | |
51150 | const int_type __cb = this->rdbuf()->sbumpc(); | |
51151 | ||
51152 | if (!traits_type::eq_int_type(__cb, traits_type::eof())) | |
51153 | { | |
51154 | _M_gcount = 1; | |
51155 | __c = traits_type::to_char_type(__cb); | |
51156 | } | |
51157 | else | |
51158 | __err |= ios_base::eofbit; | |
51159 | } | |
51160 | catch(...) | |
51161 | { this->_M_setstate(ios_base::badbit); } | |
51162 | } | |
51163 | if (!_M_gcount) | |
51164 | __err |= ios_base::failbit; | |
51165 | if (__err) | |
51166 | this->setstate(__err); | |
51167 | return *this; | |
51168 | } | |
51169 | ||
51170 | template<typename _CharT, typename _Traits> | |
51171 | basic_istream<_CharT, _Traits>& | |
51172 | basic_istream<_CharT, _Traits>:: | |
51173 | get(char_type* __s, streamsize __n, char_type __delim) | |
51174 | { | |
51175 | _M_gcount = 0; | |
51176 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
51177 | sentry __cerb(*this, true); | |
51178 | if (__cerb) | |
51179 | { | |
51180 | try | |
51181 | { | |
51182 | const int_type __idelim = traits_type::to_int_type(__delim); | |
51183 | const int_type __eof = traits_type::eof(); | |
51184 | __streambuf_type* __sb = this->rdbuf(); | |
51185 | int_type __c = __sb->sgetc(); | |
51186 | ||
51187 | while (_M_gcount + 1 < __n | |
51188 | && !traits_type::eq_int_type(__c, __eof) | |
51189 | && !traits_type::eq_int_type(__c, __idelim)) | |
51190 | { | |
51191 | *__s++ = traits_type::to_char_type(__c); | |
51192 | ++_M_gcount; | |
51193 | __c = __sb->snextc(); | |
51194 | } | |
51195 | if (traits_type::eq_int_type(__c, __eof)) | |
51196 | __err |= ios_base::eofbit; | |
51197 | } | |
51198 | catch(...) | |
51199 | { this->_M_setstate(ios_base::badbit); } | |
51200 | } | |
51201 | ||
51202 | ||
51203 | if (__n > 0) | |
51204 | *__s = char_type(); | |
51205 | if (!_M_gcount) | |
51206 | __err |= ios_base::failbit; | |
51207 | if (__err) | |
51208 | this->setstate(__err); | |
51209 | return *this; | |
51210 | } | |
51211 | ||
51212 | template<typename _CharT, typename _Traits> | |
51213 | basic_istream<_CharT, _Traits>& | |
51214 | basic_istream<_CharT, _Traits>:: | |
51215 | get(__streambuf_type& __sb, char_type __delim) | |
51216 | { | |
51217 | _M_gcount = 0; | |
51218 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
51219 | sentry __cerb(*this, true); | |
51220 | if (__cerb) | |
51221 | { | |
51222 | try | |
51223 | { | |
51224 | const int_type __idelim = traits_type::to_int_type(__delim); | |
51225 | const int_type __eof = traits_type::eof(); | |
51226 | __streambuf_type* __this_sb = this->rdbuf(); | |
51227 | int_type __c = __this_sb->sgetc(); | |
51228 | char_type __c2 = traits_type::to_char_type(__c); | |
51229 | ||
51230 | while (!traits_type::eq_int_type(__c, __eof) | |
51231 | && !traits_type::eq_int_type(__c, __idelim) | |
51232 | && !traits_type::eq_int_type(__sb.sputc(__c2), __eof)) | |
51233 | { | |
51234 | ++_M_gcount; | |
51235 | __c = __this_sb->snextc(); | |
51236 | __c2 = traits_type::to_char_type(__c); | |
51237 | } | |
51238 | if (traits_type::eq_int_type(__c, __eof)) | |
51239 | __err |= ios_base::eofbit; | |
51240 | } | |
51241 | catch(...) | |
51242 | { this->_M_setstate(ios_base::badbit); } | |
51243 | } | |
51244 | if (!_M_gcount) | |
51245 | __err |= ios_base::failbit; | |
51246 | if (__err) | |
51247 | this->setstate(__err); | |
51248 | return *this; | |
51249 | } | |
51250 | ||
51251 | template<typename _CharT, typename _Traits> | |
51252 | basic_istream<_CharT, _Traits>& | |
51253 | basic_istream<_CharT, _Traits>:: | |
51254 | getline(char_type* __s, streamsize __n, char_type __delim) | |
51255 | { | |
51256 | _M_gcount = 0; | |
51257 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
51258 | sentry __cerb(*this, true); | |
51259 | if (__cerb) | |
51260 | { | |
51261 | try | |
51262 | { | |
51263 | const int_type __idelim = traits_type::to_int_type(__delim); | |
51264 | const int_type __eof = traits_type::eof(); | |
51265 | __streambuf_type* __sb = this->rdbuf(); | |
51266 | int_type __c = __sb->sgetc(); | |
51267 | ||
51268 | while (_M_gcount + 1 < __n | |
51269 | && !traits_type::eq_int_type(__c, __eof) | |
51270 | && !traits_type::eq_int_type(__c, __idelim)) | |
51271 | { | |
51272 | *__s++ = traits_type::to_char_type(__c); | |
51273 | __c = __sb->snextc(); | |
51274 | ++_M_gcount; | |
51275 | } | |
51276 | if (traits_type::eq_int_type(__c, __eof)) | |
51277 | __err |= ios_base::eofbit; | |
51278 | else | |
51279 | { | |
51280 | if (traits_type::eq_int_type(__c, __idelim)) | |
51281 | { | |
51282 | __sb->sbumpc(); | |
51283 | ++_M_gcount; | |
51284 | } | |
51285 | else | |
51286 | __err |= ios_base::failbit; | |
51287 | } | |
51288 | } | |
51289 | catch(...) | |
51290 | { this->_M_setstate(ios_base::badbit); } | |
51291 | } | |
51292 | ||
51293 | ||
51294 | if (__n > 0) | |
51295 | *__s = char_type(); | |
51296 | if (!_M_gcount) | |
51297 | __err |= ios_base::failbit; | |
51298 | if (__err) | |
51299 | this->setstate(__err); | |
51300 | return *this; | |
51301 | } | |
51302 | ||
51303 | ||
51304 | ||
51305 | ||
51306 | template<typename _CharT, typename _Traits> | |
51307 | basic_istream<_CharT, _Traits>& | |
51308 | basic_istream<_CharT, _Traits>:: | |
51309 | ignore(void) | |
51310 | { | |
51311 | _M_gcount = 0; | |
51312 | sentry __cerb(*this, true); | |
51313 | if (__cerb) | |
51314 | { | |
51315 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
51316 | try | |
51317 | { | |
51318 | const int_type __eof = traits_type::eof(); | |
51319 | __streambuf_type* __sb = this->rdbuf(); | |
51320 | ||
51321 | if (traits_type::eq_int_type(__sb->sbumpc(), __eof)) | |
51322 | __err |= ios_base::eofbit; | |
51323 | else | |
51324 | _M_gcount = 1; | |
51325 | } | |
51326 | catch(...) | |
51327 | { this->_M_setstate(ios_base::badbit); } | |
51328 | if (__err) | |
51329 | this->setstate(__err); | |
51330 | } | |
51331 | return *this; | |
51332 | } | |
51333 | ||
51334 | template<typename _CharT, typename _Traits> | |
51335 | basic_istream<_CharT, _Traits>& | |
51336 | basic_istream<_CharT, _Traits>:: | |
51337 | ignore(streamsize __n) | |
51338 | { | |
51339 | _M_gcount = 0; | |
51340 | sentry __cerb(*this, true); | |
51341 | if (__cerb && __n > 0) | |
51342 | { | |
51343 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
51344 | try | |
51345 | { | |
51346 | const int_type __eof = traits_type::eof(); | |
51347 | __streambuf_type* __sb = this->rdbuf(); | |
51348 | int_type __c = __sb->sgetc(); | |
51349 | # 692 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/istream.tcc" 3 | |
51350 | bool __large_ignore = false; | |
51351 | while (true) | |
51352 | { | |
51353 | while (_M_gcount < __n | |
51354 | && !traits_type::eq_int_type(__c, __eof)) | |
51355 | { | |
51356 | ++_M_gcount; | |
51357 | __c = __sb->snextc(); | |
51358 | } | |
51359 | if (__n == numeric_limits<streamsize>::max() | |
51360 | && !traits_type::eq_int_type(__c, __eof)) | |
51361 | { | |
51362 | _M_gcount = numeric_limits<streamsize>::min(); | |
51363 | __large_ignore = true; | |
51364 | } | |
51365 | else | |
51366 | break; | |
51367 | } | |
51368 | ||
51369 | if (__large_ignore) | |
51370 | _M_gcount = numeric_limits<streamsize>::max(); | |
51371 | ||
51372 | if (traits_type::eq_int_type(__c, __eof)) | |
51373 | __err |= ios_base::eofbit; | |
51374 | } | |
51375 | catch(...) | |
51376 | { this->_M_setstate(ios_base::badbit); } | |
51377 | if (__err) | |
51378 | this->setstate(__err); | |
51379 | } | |
51380 | return *this; | |
51381 | } | |
51382 | ||
51383 | template<typename _CharT, typename _Traits> | |
51384 | basic_istream<_CharT, _Traits>& | |
51385 | basic_istream<_CharT, _Traits>:: | |
51386 | ignore(streamsize __n, int_type __delim) | |
51387 | { | |
51388 | _M_gcount = 0; | |
51389 | sentry __cerb(*this, true); | |
51390 | if (__cerb && __n > 0) | |
51391 | { | |
51392 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
51393 | try | |
51394 | { | |
51395 | const int_type __eof = traits_type::eof(); | |
51396 | __streambuf_type* __sb = this->rdbuf(); | |
51397 | int_type __c = __sb->sgetc(); | |
51398 | ||
51399 | ||
51400 | bool __large_ignore = false; | |
51401 | while (true) | |
51402 | { | |
51403 | while (_M_gcount < __n | |
51404 | && !traits_type::eq_int_type(__c, __eof) | |
51405 | && !traits_type::eq_int_type(__c, __delim)) | |
51406 | { | |
51407 | ++_M_gcount; | |
51408 | __c = __sb->snextc(); | |
51409 | } | |
51410 | if (__n == numeric_limits<streamsize>::max() | |
51411 | && !traits_type::eq_int_type(__c, __eof) | |
51412 | && !traits_type::eq_int_type(__c, __delim)) | |
51413 | { | |
51414 | _M_gcount = numeric_limits<streamsize>::min(); | |
51415 | __large_ignore = true; | |
51416 | } | |
51417 | else | |
51418 | break; | |
51419 | } | |
51420 | ||
51421 | if (__large_ignore) | |
51422 | _M_gcount = numeric_limits<streamsize>::max(); | |
51423 | ||
51424 | if (traits_type::eq_int_type(__c, __eof)) | |
51425 | __err |= ios_base::eofbit; | |
51426 | else if (traits_type::eq_int_type(__c, __delim)) | |
51427 | { | |
51428 | if (_M_gcount < numeric_limits<streamsize>::max()) | |
51429 | ++_M_gcount; | |
51430 | __sb->sbumpc(); | |
51431 | } | |
51432 | } | |
51433 | catch(...) | |
51434 | { this->_M_setstate(ios_base::badbit); } | |
51435 | if (__err) | |
51436 | this->setstate(__err); | |
51437 | } | |
51438 | return *this; | |
51439 | } | |
51440 | ||
51441 | template<typename _CharT, typename _Traits> | |
51442 | typename basic_istream<_CharT, _Traits>::int_type | |
51443 | basic_istream<_CharT, _Traits>:: | |
51444 | peek(void) | |
51445 | { | |
51446 | int_type __c = traits_type::eof(); | |
51447 | _M_gcount = 0; | |
51448 | sentry __cerb(*this, true); | |
51449 | if (__cerb) | |
51450 | { | |
51451 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
51452 | try | |
51453 | { | |
51454 | __c = this->rdbuf()->sgetc(); | |
51455 | if (traits_type::eq_int_type(__c, traits_type::eof())) | |
51456 | __err |= ios_base::eofbit; | |
51457 | } | |
51458 | catch(...) | |
51459 | { this->_M_setstate(ios_base::badbit); } | |
51460 | if (__err) | |
51461 | this->setstate(__err); | |
51462 | } | |
51463 | return __c; | |
51464 | } | |
51465 | ||
51466 | template<typename _CharT, typename _Traits> | |
51467 | basic_istream<_CharT, _Traits>& | |
51468 | basic_istream<_CharT, _Traits>:: | |
51469 | read(char_type* __s, streamsize __n) | |
51470 | { | |
51471 | _M_gcount = 0; | |
51472 | sentry __cerb(*this, true); | |
51473 | if (__cerb) | |
51474 | { | |
51475 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
51476 | try | |
51477 | { | |
51478 | _M_gcount = this->rdbuf()->sgetn(__s, __n); | |
51479 | if (_M_gcount != __n) | |
51480 | __err |= (ios_base::eofbit | ios_base::failbit); | |
51481 | } | |
51482 | catch(...) | |
51483 | { this->_M_setstate(ios_base::badbit); } | |
51484 | if (__err) | |
51485 | this->setstate(__err); | |
51486 | } | |
51487 | return *this; | |
51488 | } | |
51489 | ||
51490 | template<typename _CharT, typename _Traits> | |
51491 | streamsize | |
51492 | basic_istream<_CharT, _Traits>:: | |
51493 | readsome(char_type* __s, streamsize __n) | |
51494 | { | |
51495 | _M_gcount = 0; | |
51496 | sentry __cerb(*this, true); | |
51497 | if (__cerb) | |
51498 | { | |
51499 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
51500 | try | |
51501 | { | |
51502 | ||
51503 | const streamsize __num = this->rdbuf()->in_avail(); | |
51504 | if (__num > 0) | |
51505 | _M_gcount = this->rdbuf()->sgetn(__s, std::min(__num, __n)); | |
51506 | else if (__num == -1) | |
51507 | __err |= ios_base::eofbit; | |
51508 | } | |
51509 | catch(...) | |
51510 | { this->_M_setstate(ios_base::badbit); } | |
51511 | if (__err) | |
51512 | this->setstate(__err); | |
51513 | } | |
51514 | return _M_gcount; | |
51515 | } | |
51516 | ||
51517 | template<typename _CharT, typename _Traits> | |
51518 | basic_istream<_CharT, _Traits>& | |
51519 | basic_istream<_CharT, _Traits>:: | |
51520 | putback(char_type __c) | |
51521 | { | |
51522 | ||
51523 | ||
51524 | _M_gcount = 0; | |
51525 | sentry __cerb(*this, true); | |
51526 | if (__cerb) | |
51527 | { | |
51528 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
51529 | try | |
51530 | { | |
51531 | const int_type __eof = traits_type::eof(); | |
51532 | __streambuf_type* __sb = this->rdbuf(); | |
51533 | if (!__sb | |
51534 | || traits_type::eq_int_type(__sb->sputbackc(__c), __eof)) | |
51535 | __err |= ios_base::badbit; | |
51536 | } | |
51537 | catch(...) | |
51538 | { this->_M_setstate(ios_base::badbit); } | |
51539 | if (__err) | |
51540 | this->setstate(__err); | |
51541 | } | |
51542 | return *this; | |
51543 | } | |
51544 | ||
51545 | template<typename _CharT, typename _Traits> | |
51546 | basic_istream<_CharT, _Traits>& | |
51547 | basic_istream<_CharT, _Traits>:: | |
51548 | unget(void) | |
51549 | { | |
51550 | ||
51551 | ||
51552 | _M_gcount = 0; | |
51553 | sentry __cerb(*this, true); | |
51554 | if (__cerb) | |
51555 | { | |
51556 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
51557 | try | |
51558 | { | |
51559 | const int_type __eof = traits_type::eof(); | |
51560 | __streambuf_type* __sb = this->rdbuf(); | |
51561 | if (!__sb | |
51562 | || traits_type::eq_int_type(__sb->sungetc(), __eof)) | |
51563 | __err |= ios_base::badbit; | |
51564 | } | |
51565 | catch(...) | |
51566 | { this->_M_setstate(ios_base::badbit); } | |
51567 | if (__err) | |
51568 | this->setstate(__err); | |
51569 | } | |
51570 | return *this; | |
51571 | } | |
51572 | ||
51573 | template<typename _CharT, typename _Traits> | |
51574 | int | |
51575 | basic_istream<_CharT, _Traits>:: | |
51576 | sync(void) | |
51577 | { | |
51578 | ||
51579 | ||
51580 | int __ret = -1; | |
51581 | sentry __cerb(*this, true); | |
51582 | if (__cerb) | |
51583 | { | |
51584 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
51585 | try | |
51586 | { | |
51587 | __streambuf_type* __sb = this->rdbuf(); | |
51588 | if (__sb) | |
51589 | { | |
51590 | if (__sb->pubsync() == -1) | |
51591 | __err |= ios_base::badbit; | |
51592 | else | |
51593 | __ret = 0; | |
51594 | } | |
51595 | } | |
51596 | catch(...) | |
51597 | { this->_M_setstate(ios_base::badbit); } | |
51598 | if (__err) | |
51599 | this->setstate(__err); | |
51600 | } | |
51601 | return __ret; | |
51602 | } | |
51603 | ||
51604 | template<typename _CharT, typename _Traits> | |
51605 | typename basic_istream<_CharT, _Traits>::pos_type | |
51606 | basic_istream<_CharT, _Traits>:: | |
51607 | tellg(void) | |
51608 | { | |
51609 | ||
51610 | ||
51611 | pos_type __ret = pos_type(-1); | |
51612 | try | |
51613 | { | |
51614 | if (!this->fail()) | |
51615 | __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::in); | |
51616 | } | |
51617 | catch(...) | |
51618 | { this->_M_setstate(ios_base::badbit); } | |
51619 | return __ret; | |
51620 | } | |
51621 | ||
51622 | template<typename _CharT, typename _Traits> | |
51623 | basic_istream<_CharT, _Traits>& | |
51624 | basic_istream<_CharT, _Traits>:: | |
51625 | seekg(pos_type __pos) | |
51626 | { | |
51627 | ||
51628 | ||
51629 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
51630 | try | |
51631 | { | |
51632 | if (!this->fail()) | |
51633 | { | |
51634 | ||
51635 | const pos_type __p = this->rdbuf()->pubseekpos(__pos, | |
51636 | ios_base::in); | |
51637 | ||
51638 | ||
51639 | if (__p == pos_type(off_type(-1))) | |
51640 | __err |= ios_base::failbit; | |
51641 | } | |
51642 | } | |
51643 | catch(...) | |
51644 | { this->_M_setstate(ios_base::badbit); } | |
51645 | if (__err) | |
51646 | this->setstate(__err); | |
51647 | return *this; | |
51648 | } | |
51649 | ||
51650 | template<typename _CharT, typename _Traits> | |
51651 | basic_istream<_CharT, _Traits>& | |
51652 | basic_istream<_CharT, _Traits>:: | |
51653 | seekg(off_type __off, ios_base::seekdir __dir) | |
51654 | { | |
51655 | ||
51656 | ||
51657 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
51658 | try | |
51659 | { | |
51660 | if (!this->fail()) | |
51661 | { | |
51662 | ||
51663 | const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, | |
51664 | ios_base::in); | |
51665 | ||
51666 | ||
51667 | if (__p == pos_type(off_type(-1))) | |
51668 | __err |= ios_base::failbit; | |
51669 | } | |
51670 | } | |
51671 | catch(...) | |
51672 | { this->_M_setstate(ios_base::badbit); } | |
51673 | if (__err) | |
51674 | this->setstate(__err); | |
51675 | return *this; | |
51676 | } | |
51677 | ||
51678 | ||
51679 | template<typename _CharT, typename _Traits> | |
51680 | basic_istream<_CharT, _Traits>& | |
51681 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | |
51682 | { | |
51683 | typedef basic_istream<_CharT, _Traits> __istream_type; | |
51684 | typedef typename __istream_type::int_type __int_type; | |
51685 | ||
51686 | typename __istream_type::sentry __cerb(__in, false); | |
51687 | if (__cerb) | |
51688 | { | |
51689 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
51690 | try | |
51691 | { | |
51692 | const __int_type __cb = __in.rdbuf()->sbumpc(); | |
51693 | if (!_Traits::eq_int_type(__cb, _Traits::eof())) | |
51694 | __c = _Traits::to_char_type(__cb); | |
51695 | else | |
51696 | __err |= (ios_base::eofbit | ios_base::failbit); | |
51697 | } | |
51698 | catch(...) | |
51699 | { __in._M_setstate(ios_base::badbit); } | |
51700 | if (__err) | |
51701 | __in.setstate(__err); | |
51702 | } | |
51703 | return __in; | |
51704 | } | |
51705 | ||
51706 | template<typename _CharT, typename _Traits> | |
51707 | basic_istream<_CharT, _Traits>& | |
51708 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | |
51709 | { | |
51710 | typedef basic_istream<_CharT, _Traits> __istream_type; | |
51711 | typedef typename __istream_type::__streambuf_type __streambuf_type; | |
51712 | typedef typename _Traits::int_type int_type; | |
51713 | typedef _CharT char_type; | |
51714 | typedef ctype<_CharT> __ctype_type; | |
51715 | ||
51716 | streamsize __extracted = 0; | |
51717 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
51718 | typename __istream_type::sentry __cerb(__in, false); | |
51719 | if (__cerb) | |
51720 | { | |
51721 | try | |
51722 | { | |
51723 | ||
51724 | streamsize __num = __in.width(); | |
51725 | if (__num <= 0) | |
51726 | __num = numeric_limits<streamsize>::max(); | |
51727 | ||
51728 | const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); | |
51729 | ||
51730 | const int_type __eof = _Traits::eof(); | |
51731 | __streambuf_type* __sb = __in.rdbuf(); | |
51732 | int_type __c = __sb->sgetc(); | |
51733 | ||
51734 | while (__extracted < __num - 1 | |
51735 | && !_Traits::eq_int_type(__c, __eof) | |
51736 | && !__ct.is(ctype_base::space, | |
51737 | _Traits::to_char_type(__c))) | |
51738 | { | |
51739 | *__s++ = _Traits::to_char_type(__c); | |
51740 | ++__extracted; | |
51741 | __c = __sb->snextc(); | |
51742 | } | |
51743 | if (_Traits::eq_int_type(__c, __eof)) | |
51744 | __err |= ios_base::eofbit; | |
51745 | ||
51746 | ||
51747 | ||
51748 | *__s = char_type(); | |
51749 | __in.width(0); | |
51750 | } | |
51751 | catch(...) | |
51752 | { __in._M_setstate(ios_base::badbit); } | |
51753 | } | |
51754 | if (!__extracted) | |
51755 | __err |= ios_base::failbit; | |
51756 | if (__err) | |
51757 | __in.setstate(__err); | |
51758 | return __in; | |
51759 | } | |
51760 | ||
51761 | ||
51762 | template<typename _CharT, typename _Traits> | |
51763 | basic_istream<_CharT,_Traits>& | |
51764 | ws(basic_istream<_CharT,_Traits>& __in) | |
51765 | { | |
51766 | typedef basic_istream<_CharT, _Traits> __istream_type; | |
51767 | typedef typename __istream_type::__streambuf_type __streambuf_type; | |
51768 | typedef typename __istream_type::__ctype_type __ctype_type; | |
51769 | typedef typename __istream_type::int_type __int_type; | |
51770 | ||
51771 | const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); | |
51772 | const __int_type __eof = _Traits::eof(); | |
51773 | __streambuf_type* __sb = __in.rdbuf(); | |
51774 | __int_type __c = __sb->sgetc(); | |
51775 | ||
51776 | while (!_Traits::eq_int_type(__c, __eof) | |
51777 | && __ct.is(ctype_base::space, _Traits::to_char_type(__c))) | |
51778 | __c = __sb->snextc(); | |
51779 | ||
51780 | if (_Traits::eq_int_type(__c, __eof)) | |
51781 | __in.setstate(ios_base::eofbit); | |
51782 | return __in; | |
51783 | } | |
51784 | ||
51785 | ||
51786 | template<typename _CharT, typename _Traits, typename _Alloc> | |
51787 | basic_istream<_CharT, _Traits>& | |
51788 | operator>>(basic_istream<_CharT, _Traits>& __in, | |
51789 | basic_string<_CharT, _Traits, _Alloc>& __str) | |
51790 | { | |
51791 | typedef basic_istream<_CharT, _Traits> __istream_type; | |
51792 | typedef typename __istream_type::int_type __int_type; | |
51793 | typedef typename __istream_type::__streambuf_type __streambuf_type; | |
51794 | typedef typename __istream_type::__ctype_type __ctype_type; | |
51795 | typedef basic_string<_CharT, _Traits, _Alloc> __string_type; | |
51796 | typedef typename __string_type::size_type __size_type; | |
51797 | ||
51798 | __size_type __extracted = 0; | |
51799 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
51800 | typename __istream_type::sentry __cerb(__in, false); | |
51801 | if (__cerb) | |
51802 | { | |
51803 | try | |
51804 | { | |
51805 | ||
51806 | __str.erase(); | |
51807 | _CharT __buf[128]; | |
51808 | __size_type __len = 0; | |
51809 | const streamsize __w = __in.width(); | |
51810 | const __size_type __n = __w > 0 ? static_cast<__size_type>(__w) | |
51811 | : __str.max_size(); | |
51812 | const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); | |
51813 | const __int_type __eof = _Traits::eof(); | |
51814 | __streambuf_type* __sb = __in.rdbuf(); | |
51815 | __int_type __c = __sb->sgetc(); | |
51816 | ||
51817 | while (__extracted < __n | |
51818 | && !_Traits::eq_int_type(__c, __eof) | |
51819 | && !__ct.is(ctype_base::space, _Traits::to_char_type(__c))) | |
51820 | { | |
51821 | if (__len == sizeof(__buf) / sizeof(_CharT)) | |
51822 | { | |
51823 | __str.append(__buf, sizeof(__buf) / sizeof(_CharT)); | |
51824 | __len = 0; | |
51825 | } | |
51826 | __buf[__len++] = _Traits::to_char_type(__c); | |
51827 | ++__extracted; | |
51828 | __c = __sb->snextc(); | |
51829 | } | |
51830 | __str.append(__buf, __len); | |
51831 | ||
51832 | if (_Traits::eq_int_type(__c, __eof)) | |
51833 | __err |= ios_base::eofbit; | |
51834 | __in.width(0); | |
51835 | } | |
51836 | catch(...) | |
51837 | { | |
51838 | ||
51839 | ||
51840 | ||
51841 | __in._M_setstate(ios_base::badbit); | |
51842 | } | |
51843 | } | |
51844 | ||
51845 | if (!__extracted) | |
51846 | __err |= ios_base::failbit; | |
51847 | if (__err) | |
51848 | __in.setstate(__err); | |
51849 | return __in; | |
51850 | } | |
51851 | ||
51852 | template<typename _CharT, typename _Traits, typename _Alloc> | |
51853 | basic_istream<_CharT, _Traits>& | |
51854 | getline(basic_istream<_CharT, _Traits>& __in, | |
51855 | basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) | |
51856 | { | |
51857 | typedef basic_istream<_CharT, _Traits> __istream_type; | |
51858 | typedef typename __istream_type::int_type __int_type; | |
51859 | typedef typename __istream_type::__streambuf_type __streambuf_type; | |
51860 | typedef typename __istream_type::__ctype_type __ctype_type; | |
51861 | typedef basic_string<_CharT, _Traits, _Alloc> __string_type; | |
51862 | typedef typename __string_type::size_type __size_type; | |
51863 | ||
51864 | __size_type __extracted = 0; | |
51865 | const __size_type __n = __str.max_size(); | |
51866 | ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); | |
51867 | typename __istream_type::sentry __cerb(__in, true); | |
51868 | if (__cerb) | |
51869 | { | |
51870 | try | |
51871 | { | |
51872 | __str.erase(); | |
51873 | const __int_type __idelim = _Traits::to_int_type(__delim); | |
51874 | const __int_type __eof = _Traits::eof(); | |
51875 | __streambuf_type* __sb = __in.rdbuf(); | |
51876 | __int_type __c = __sb->sgetc(); | |
51877 | ||
51878 | while (__extracted < __n | |
51879 | && !_Traits::eq_int_type(__c, __eof) | |
51880 | && !_Traits::eq_int_type(__c, __idelim)) | |
51881 | { | |
51882 | __str += _Traits::to_char_type(__c); | |
51883 | ++__extracted; | |
51884 | __c = __sb->snextc(); | |
51885 | } | |
51886 | ||
51887 | if (_Traits::eq_int_type(__c, __eof)) | |
51888 | __err |= ios_base::eofbit; | |
51889 | else if (_Traits::eq_int_type(__c, __idelim)) | |
51890 | { | |
51891 | ++__extracted; | |
51892 | __sb->sbumpc(); | |
51893 | } | |
51894 | else | |
51895 | __err |= ios_base::failbit; | |
51896 | } | |
51897 | catch(...) | |
51898 | { | |
51899 | ||
51900 | ||
51901 | ||
51902 | __in._M_setstate(ios_base::badbit); | |
51903 | } | |
51904 | } | |
51905 | if (!__extracted) | |
51906 | __err |= ios_base::failbit; | |
51907 | if (__err) | |
51908 | __in.setstate(__err); | |
51909 | return __in; | |
51910 | } | |
51911 | ||
51912 | template<class _CharT, class _Traits, class _Alloc> | |
51913 | inline basic_istream<_CharT,_Traits>& | |
51914 | getline(basic_istream<_CharT, _Traits>& __in, | |
51915 | basic_string<_CharT,_Traits,_Alloc>& __str) | |
51916 | { return getline(__in, __str, __in.widen('\n')); } | |
51917 | ||
51918 | ||
51919 | ||
51920 | ||
51921 | ||
51922 | extern template class basic_istream<char>; | |
51923 | extern template istream& ws(istream&); | |
51924 | extern template istream& operator>>(istream&, char&); | |
51925 | extern template istream& operator>>(istream&, char*); | |
51926 | extern template istream& operator>>(istream&, unsigned char&); | |
51927 | extern template istream& operator>>(istream&, signed char&); | |
51928 | extern template istream& operator>>(istream&, unsigned char*); | |
51929 | extern template istream& operator>>(istream&, signed char*); | |
51930 | ||
51931 | extern template class basic_iostream<char>; | |
51932 | ||
51933 | ||
51934 | extern template class basic_istream<wchar_t>; | |
51935 | extern template wistream& ws(wistream&); | |
51936 | extern template wistream& operator>>(wistream&, wchar_t&); | |
51937 | extern template wistream& operator>>(wistream&, wchar_t*); | |
51938 | ||
51939 | extern template class basic_iostream<wchar_t>; | |
51940 | ||
51941 | ||
51942 | } | |
51943 | # 821 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/istream" 2 3 | |
51944 | ||
51945 | ||
51946 | #pragma GCC visibility pop | |
51947 | # 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/iostream" 2 3 | |
51948 | ||
51949 | namespace std | |
51950 | { | |
51951 | # 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/iostream" 3 | |
51952 | extern istream cin; | |
51953 | extern ostream cout; | |
51954 | extern ostream cerr; | |
51955 | extern ostream clog; | |
51956 | ||
51957 | ||
51958 | extern wistream wcin; | |
51959 | extern wostream wcout; | |
51960 | extern wostream wcerr; | |
51961 | extern wostream wclog; | |
51962 | ||
51963 | ||
51964 | ||
51965 | ||
51966 | static ios_base::Init __ioinit; | |
51967 | } | |
51968 | ||
51969 | #pragma GCC visibility pop | |
51970 | # 18 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/ioswrap.h" 2 | |
51971 | # 41 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/textctrl.h" 2 | |
51972 | # 51 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/textctrl.h" | |
51973 | class wxTextCtrl; | |
51974 | class wxTextCtrlBase; | |
51975 | ||
51976 | ||
51977 | ||
51978 | ||
51979 | ||
51980 | ||
51981 | typedef long wxTextPos; | |
51982 | ||
51983 | ||
51984 | ||
51985 | typedef long wxTextCoord; | |
51986 | ||
51987 | ||
51988 | ||
51989 | ||
51990 | ||
51991 | extern const wxChar* wxTextCtrlNameStr; | |
51992 | ||
51993 | ||
51994 | ||
51995 | const wxTextCoord wxOutOfRangeTextCoord = -1; | |
51996 | const wxTextCoord wxInvalidTextCoord = -2; | |
51997 | # 142 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/textctrl.h" | |
51998 | enum wxTextCtrlHitTestResult | |
51999 | { | |
52000 | wxTE_HT_UNKNOWN = -2, | |
52001 | wxTE_HT_BEFORE, | |
52002 | wxTE_HT_ON_TEXT, | |
52003 | wxTE_HT_BELOW, | |
52004 | wxTE_HT_BEYOND | |
52005 | }; | |
52006 | # 158 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/textctrl.h" | |
52007 | enum wxTextAttrAlignment | |
52008 | { | |
52009 | wxTEXT_ALIGNMENT_DEFAULT, | |
52010 | wxTEXT_ALIGNMENT_LEFT, | |
52011 | wxTEXT_ALIGNMENT_CENTRE, | |
52012 | wxTEXT_ALIGNMENT_CENTER = wxTEXT_ALIGNMENT_CENTRE, | |
52013 | wxTEXT_ALIGNMENT_RIGHT, | |
52014 | wxTEXT_ALIGNMENT_JUSTIFIED | |
52015 | }; | |
52016 | # 189 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/textctrl.h" | |
52017 | class wxTextAttr | |
52018 | { | |
52019 | public: | |
52020 | ||
52021 | wxTextAttr() { Init(); } | |
52022 | wxTextAttr(const wxColour& colText, | |
52023 | const wxColour& colBack = wxNullColour, | |
52024 | const wxFont& font = wxNullFont, | |
52025 | wxTextAttrAlignment alignment = wxTEXT_ALIGNMENT_DEFAULT); | |
52026 | ||
52027 | ||
52028 | void Init(); | |
52029 | ||
52030 | ||
52031 | void operator= (const wxTextAttr& attr); | |
52032 | ||
52033 | ||
52034 | void SetTextColour(const wxColour& colText) { m_colText = colText; m_flags |= 0x0001; } | |
52035 | void SetBackgroundColour(const wxColour& colBack) { m_colBack = colBack; m_flags |= 0x0002; } | |
52036 | void SetFont(const wxFont& font, long flags = ( 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 )) { m_font = font; m_flags |= flags; } | |
52037 | void SetAlignment(wxTextAttrAlignment alignment) { m_textAlignment = alignment; m_flags |= 0x0080; } | |
52038 | void SetTabs(const wxArrayInt& tabs) { m_tabs = tabs; m_flags |= 0x0400; } | |
52039 | void SetLeftIndent(int indent, int subIndent = 0) { m_leftIndent = indent; m_leftSubIndent = subIndent; m_flags |= 0x0100; } | |
52040 | void SetRightIndent(int indent) { m_rightIndent = indent; m_flags |= 0x0200; } | |
52041 | void SetFlags(long flags) { m_flags = flags; } | |
52042 | ||
52043 | ||
52044 | bool HasTextColour() const { return m_colText.Ok() && HasFlag(0x0001) ; } | |
52045 | bool HasBackgroundColour() const { return m_colBack.Ok() && HasFlag(0x0002) ; } | |
52046 | bool HasFont() const { return m_font.Ok() && HasFlag(( 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 )) ; } | |
52047 | bool HasAlignment() const { return (m_textAlignment != wxTEXT_ALIGNMENT_DEFAULT) || ((m_flags & 0x0080) != 0) ; } | |
52048 | bool HasTabs() const { return (m_flags & 0x0400) != 0 ; } | |
52049 | bool HasLeftIndent() const { return (m_flags & 0x0100) != 0 ; } | |
52050 | bool HasRightIndent() const { return (m_flags & 0x0200) != 0 ; } | |
52051 | bool HasFlag(long flag) const { return (m_flags & flag) != 0; } | |
52052 | ||
52053 | const wxColour& GetTextColour() const { return m_colText; } | |
52054 | const wxColour& GetBackgroundColour() const { return m_colBack; } | |
52055 | const wxFont& GetFont() const { return m_font; } | |
52056 | wxTextAttrAlignment GetAlignment() const { return m_textAlignment; } | |
52057 | const wxArrayInt& GetTabs() const { return m_tabs; } | |
52058 | long GetLeftIndent() const { return m_leftIndent; } | |
52059 | long GetLeftSubIndent() const { return m_leftSubIndent; } | |
52060 | long GetRightIndent() const { return m_rightIndent; } | |
52061 | long GetFlags() const { return m_flags; } | |
52062 | ||
52063 | ||
52064 | bool IsDefault() const | |
52065 | { | |
52066 | return !HasTextColour() && !HasBackgroundColour() && !HasFont() && !HasAlignment() && | |
52067 | !HasTabs() && !HasLeftIndent() && !HasRightIndent() ; | |
52068 | } | |
52069 | ||
52070 | ||
52071 | ||
52072 | ||
52073 | static wxTextAttr Combine(const wxTextAttr& attr, | |
52074 | const wxTextAttr& attrDef, | |
52075 | const wxTextCtrlBase *text); | |
52076 | ||
52077 | private: | |
52078 | long m_flags; | |
52079 | wxColour m_colText, | |
52080 | m_colBack; | |
52081 | wxFont m_font; | |
52082 | wxTextAttrAlignment m_textAlignment; | |
52083 | wxArrayInt m_tabs; | |
52084 | int m_leftIndent; | |
52085 | int m_leftSubIndent; | |
52086 | ||
52087 | ||
52088 | int m_rightIndent; | |
52089 | }; | |
52090 | ||
52091 | ||
52092 | ||
52093 | ||
52094 | ||
52095 | ||
52096 | class wxTextCtrlBase : public wxControl | |
52097 | ||
52098 | , public std:: streambuf | |
52099 | ||
52100 | ||
52101 | { | |
52102 | public: | |
52103 | ||
52104 | ||
52105 | ||
52106 | wxTextCtrlBase(){} | |
52107 | ~wxTextCtrlBase(){} | |
52108 | ||
52109 | ||
52110 | ||
52111 | ||
52112 | virtual wxString GetValue() const = 0; | |
52113 | virtual void SetValue(const wxString& value) = 0; | |
52114 | ||
52115 | virtual wxString GetRange(long from, long to) const; | |
52116 | ||
52117 | virtual int GetLineLength(long lineNo) const = 0; | |
52118 | virtual wxString GetLineText(long lineNo) const = 0; | |
52119 | virtual int GetNumberOfLines() const = 0; | |
52120 | ||
52121 | virtual bool IsModified() const = 0; | |
52122 | virtual bool IsEditable() const = 0; | |
52123 | ||
52124 | ||
52125 | bool IsSingleLine() const { return !HasFlag(0x0020); } | |
52126 | bool IsMultiLine() const { return !IsSingleLine(); } | |
52127 | ||
52128 | ||
52129 | virtual void GetSelection(long* from, long* to) const = 0; | |
52130 | ||
52131 | virtual wxString GetStringSelection() const; | |
52132 | ||
52133 | ||
52134 | ||
52135 | ||
52136 | ||
52137 | virtual void Clear() = 0; | |
52138 | virtual void Replace(long from, long to, const wxString& value) = 0; | |
52139 | virtual void Remove(long from, long to) = 0; | |
52140 | ||
52141 | ||
52142 | virtual bool LoadFile(const wxString& file); | |
52143 | virtual bool SaveFile(const wxString& file = wxEmptyString); | |
52144 | ||
52145 | ||
52146 | virtual void MarkDirty() = 0; | |
52147 | virtual void DiscardEdits() = 0; | |
52148 | ||
52149 | ||
52150 | ||
52151 | virtual void SetMaxLength(unsigned long ) { } | |
52152 | ||
52153 | ||
52154 | ||
52155 | virtual void WriteText(const wxString& text) = 0; | |
52156 | virtual void AppendText(const wxString& text) = 0; | |
52157 | ||
52158 | ||
52159 | ||
52160 | virtual bool EmulateKeyPress(const wxKeyEvent& event); | |
52161 | ||
52162 | ||
52163 | ||
52164 | ||
52165 | virtual bool SetStyle(long start, long end, const wxTextAttr& style); | |
52166 | virtual bool GetStyle(long position, wxTextAttr& style); | |
52167 | virtual bool SetDefaultStyle(const wxTextAttr& style); | |
52168 | virtual const wxTextAttr& GetDefaultStyle() const; | |
52169 | ||
52170 | ||
52171 | ||
52172 | ||
52173 | virtual long XYToPosition(long x, long y) const = 0; | |
52174 | virtual bool PositionToXY(long pos, long *x, long *y) const = 0; | |
52175 | ||
52176 | virtual void ShowPosition(long pos) = 0; | |
52177 | ||
52178 | ||
52179 | ||
52180 | ||
52181 | ||
52182 | virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long *pos) const; | |
52183 | virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, | |
52184 | wxTextCoord *col, | |
52185 | wxTextCoord *row) const; | |
52186 | ||
52187 | ||
52188 | virtual void Copy() = 0; | |
52189 | virtual void Cut() = 0; | |
52190 | virtual void Paste() = 0; | |
52191 | ||
52192 | virtual bool CanCopy() const; | |
52193 | virtual bool CanCut() const; | |
52194 | virtual bool CanPaste() const; | |
52195 | ||
52196 | ||
52197 | virtual void Undo() = 0; | |
52198 | virtual void Redo() = 0; | |
52199 | ||
52200 | virtual bool CanUndo() const = 0; | |
52201 | virtual bool CanRedo() const = 0; | |
52202 | ||
52203 | ||
52204 | virtual void SetInsertionPoint(long pos) = 0; | |
52205 | virtual void SetInsertionPointEnd() = 0; | |
52206 | virtual long GetInsertionPoint() const = 0; | |
52207 | virtual wxTextPos GetLastPosition() const = 0; | |
52208 | ||
52209 | virtual void SetSelection(long from, long to) = 0; | |
52210 | virtual void SelectAll(); | |
52211 | virtual void SetEditable(bool editable) = 0; | |
52212 | ||
52213 | ||
52214 | ||
52215 | int overflow(int i); | |
52216 | ||
52217 | ||
52218 | ||
52219 | ||
52220 | wxTextCtrl& operator<<(const wxString& s); | |
52221 | wxTextCtrl& operator<<(int i); | |
52222 | wxTextCtrl& operator<<(long i); | |
52223 | wxTextCtrl& operator<<(float f); | |
52224 | wxTextCtrl& operator<<(double d); | |
52225 | wxTextCtrl& operator<<(const wxChar c); | |
52226 | ||
52227 | ||
52228 | virtual void DoUpdateWindowUI(wxUpdateUIEvent& event); | |
52229 | ||
52230 | virtual bool ShouldInheritColours() const { return false; } | |
52231 | ||
52232 | protected: | |
52233 | ||
52234 | ||
52235 | wxString m_filename; | |
52236 | ||
52237 | ||
52238 | wxTextAttr m_defaultStyle; | |
52239 | ||
52240 | private: wxTextCtrlBase(const wxTextCtrlBase&); wxTextCtrlBase& operator=(const wxTextCtrlBase&); | |
52241 | }; | |
52242 | # 430 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/textctrl.h" | |
52243 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/textctrl.h" 1 | |
52244 | # 22 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/textctrl.h" | |
52245 | class wxTextCtrl: public wxTextCtrlBase | |
52246 | { | |
52247 | public: | |
52248 | wxTextCtrl() { Init(); } | |
52249 | wxTextCtrl(wxWindow *parent, | |
52250 | wxWindowID id, | |
52251 | const wxString &value = wxEmptyString, | |
52252 | const wxPoint &pos = wxDefaultPosition, | |
52253 | const wxSize &size = wxDefaultSize, | |
52254 | long style = 0, | |
52255 | const wxValidator& validator = wxDefaultValidator, | |
52256 | const wxString &name = wxTextCtrlNameStr); | |
52257 | ||
52258 | ~wxTextCtrl(); | |
52259 | ||
52260 | bool Create(wxWindow *parent, | |
52261 | wxWindowID id, | |
52262 | const wxString &value = wxEmptyString, | |
52263 | const wxPoint &pos = wxDefaultPosition, | |
52264 | const wxSize &size = wxDefaultSize, | |
52265 | long style = 0, | |
52266 | const wxValidator& validator = wxDefaultValidator, | |
52267 | const wxString &name = wxTextCtrlNameStr); | |
52268 | ||
52269 | ||
52270 | ||
52271 | ||
52272 | virtual wxString GetValue() const; | |
52273 | virtual void SetValue(const wxString& value); | |
52274 | ||
52275 | virtual int GetLineLength(long lineNo) const; | |
52276 | virtual wxString GetLineText(long lineNo) const; | |
52277 | virtual int GetNumberOfLines() const; | |
52278 | ||
52279 | virtual bool IsModified() const; | |
52280 | virtual bool IsEditable() const; | |
52281 | ||
52282 | ||
52283 | virtual void GetSelection(long* from, long* to) const; | |
52284 | ||
52285 | ||
52286 | ||
52287 | ||
52288 | ||
52289 | virtual void Clear(); | |
52290 | virtual void Replace(long from, long to, const wxString& value); | |
52291 | virtual void Remove(long from, long to); | |
52292 | ||
52293 | ||
52294 | virtual void MarkDirty(); | |
52295 | virtual void DiscardEdits(); | |
52296 | ||
52297 | virtual void SetMaxLength(unsigned long len); | |
52298 | ||
52299 | ||
52300 | ||
52301 | virtual void WriteText(const wxString& text); | |
52302 | virtual void AppendText(const wxString& text); | |
52303 | ||
52304 | ||
52305 | ||
52306 | virtual bool SetStyle(long start, long end, const wxTextAttr& style); | |
52307 | ||
52308 | ||
52309 | ||
52310 | ||
52311 | virtual long XYToPosition(long x, long y) const; | |
52312 | virtual bool PositionToXY(long pos, long *x, long *y) const; | |
52313 | ||
52314 | virtual void ShowPosition(long pos); | |
52315 | ||
52316 | ||
52317 | virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long *pos) const; | |
52318 | virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, | |
52319 | wxTextCoord *col, | |
52320 | wxTextCoord *row) const | |
52321 | { | |
52322 | return wxTextCtrlBase::HitTest(pt, col, row); | |
52323 | } | |
52324 | ||
52325 | ||
52326 | ||
52327 | virtual void Copy(); | |
52328 | virtual void Cut(); | |
52329 | virtual void Paste(); | |
52330 | ||
52331 | ||
52332 | virtual void Undo(); | |
52333 | virtual void Redo(); | |
52334 | ||
52335 | virtual bool CanUndo() const; | |
52336 | virtual bool CanRedo() const; | |
52337 | ||
52338 | ||
52339 | virtual void SetInsertionPoint(long pos); | |
52340 | virtual void SetInsertionPointEnd(); | |
52341 | virtual long GetInsertionPoint() const; | |
52342 | virtual wxTextPos GetLastPosition() const; | |
52343 | ||
52344 | virtual void SetSelection(long from, long to); | |
52345 | virtual void SetEditable(bool editable); | |
52346 | ||
52347 | virtual bool Enable( bool enable = true ); | |
52348 | ||
52349 | ||
52350 | void OnDropFiles( wxDropFilesEvent &event ); | |
52351 | void OnChar( wxKeyEvent &event ); | |
52352 | ||
52353 | void OnCut(wxCommandEvent& event); | |
52354 | void OnCopy(wxCommandEvent& event); | |
52355 | void OnPaste(wxCommandEvent& event); | |
52356 | void OnUndo(wxCommandEvent& event); | |
52357 | void OnRedo(wxCommandEvent& event); | |
52358 | ||
52359 | void OnUpdateCut(wxUpdateUIEvent& event); | |
52360 | void OnUpdateCopy(wxUpdateUIEvent& event); | |
52361 | void OnUpdatePaste(wxUpdateUIEvent& event); | |
52362 | void OnUpdateUndo(wxUpdateUIEvent& event); | |
52363 | void OnUpdateRedo(wxUpdateUIEvent& event); | |
52364 | ||
52365 | bool SetFont(const wxFont& font); | |
52366 | bool SetForegroundColour(const wxColour& colour); | |
52367 | bool SetBackgroundColour(const wxColour& colour); | |
52368 | ||
52369 | GtkWidget* GetConnectWidget(); | |
52370 | bool IsOwnGtkWindow( GdkWindow *window ); | |
52371 | void DoApplyWidgetStyle(GtkRcStyle *style); | |
52372 | void CalculateScrollbar(); | |
52373 | void OnInternalIdle(); | |
52374 | ||
52375 | ||
52376 | void SetUpdateFont(bool ) { } | |
52377 | ||
52378 | ||
52379 | ||
52380 | ||
52381 | ||
52382 | void SetModified() { m_modified = true; } | |
52383 | ||
52384 | ||
52385 | ||
52386 | virtual void Freeze(); | |
52387 | virtual void Thaw(); | |
52388 | ||
52389 | ||
52390 | virtual bool ScrollLines(int lines); | |
52391 | virtual bool ScrollPages(int pages); | |
52392 | ||
52393 | ||
52394 | ||
52395 | ||
52396 | ||
52397 | ||
52398 | virtual void OnParentEnable( bool enable ) ; | |
52399 | ||
52400 | ||
52401 | void IgnoreNextTextUpdate(); | |
52402 | ||
52403 | ||
52404 | bool IgnoreTextUpdate(); | |
52405 | ||
52406 | static wxVisualAttributes | |
52407 | GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); | |
52408 | ||
52409 | protected: | |
52410 | virtual wxSize DoGetBestSize() const; | |
52411 | ||
52412 | ||
52413 | void Init(); | |
52414 | ||
52415 | ||
52416 | GtkAdjustment *GetVAdj() const; | |
52417 | ||
52418 | ||
52419 | ||
52420 | bool DoScroll(GtkAdjustment *adj, int diff); | |
52421 | ||
52422 | ||
52423 | ||
52424 | virtual bool UseGTKStyleBase() const { return true; } | |
52425 | ||
52426 | ||
52427 | ||
52428 | bool IsFrozen() const { return m_frozenness > 0; } | |
52429 | ||
52430 | ||
52431 | private: | |
52432 | ||
52433 | void ChangeFontGlobally(); | |
52434 | ||
52435 | GtkWidget *m_text; | |
52436 | GtkWidget *m_vScrollbar; | |
52437 | ||
52438 | bool m_modified:1; | |
52439 | bool m_vScrollbarVisible:1; | |
52440 | ||
52441 | ||
52442 | ||
52443 | bool m_ignoreNextUpdate:1; | |
52444 | ||
52445 | ||
52446 | ||
52447 | ||
52448 | GtkTextBuffer *m_buffer; | |
52449 | ||
52450 | ||
52451 | unsigned int m_frozenness; | |
52452 | ||
52453 | ||
52454 | void OnUrlMouseEvent(wxMouseEvent&); | |
52455 | GdkCursor *m_gdkHandCursor; | |
52456 | GdkCursor *m_gdkXTermCursor; | |
52457 | ||
52458 | ||
52459 | private: static const wxEventTableEntry sm_eventTableEntries[]; protected: static const wxEventTable sm_eventTable; virtual const wxEventTable* GetEventTable() const; static wxEventHashTable sm_eventHashTable; virtual wxEventHashTable& GetEventHashTable() const; | |
52460 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
52461 | }; | |
52462 | # 431 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/textctrl.h" 2 | |
52463 | # 445 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/textctrl.h" | |
52464 | ||
52465 | extern const wxEventType wxEVT_COMMAND_TEXT_UPDATED; | |
52466 | extern const wxEventType wxEVT_COMMAND_TEXT_ENTER; | |
52467 | extern const wxEventType wxEVT_COMMAND_TEXT_URL; | |
52468 | extern const wxEventType wxEVT_COMMAND_TEXT_MAXLEN; | |
52469 | ||
52470 | ||
52471 | ||
52472 | ||
52473 | class wxTextUrlEvent : public wxCommandEvent | |
52474 | { | |
52475 | public: | |
52476 | wxTextUrlEvent(int winid, const wxMouseEvent& evtMouse, | |
52477 | long start, long end) | |
52478 | : wxCommandEvent(wxEVT_COMMAND_TEXT_URL, winid) | |
52479 | , m_evtMouse(evtMouse), m_start(start), m_end(end) | |
52480 | { } | |
52481 | ||
52482 | ||
52483 | const wxMouseEvent& GetMouseEvent() const { return m_evtMouse; } | |
52484 | ||
52485 | ||
52486 | long GetURLStart() const { return m_start; } | |
52487 | ||
52488 | ||
52489 | long GetURLEnd() const { return m_end; } | |
52490 | ||
52491 | protected: | |
52492 | ||
52493 | wxMouseEvent m_evtMouse; | |
52494 | ||
52495 | ||
52496 | long m_start, | |
52497 | m_end; | |
52498 | ||
52499 | private: | |
52500 | private: wxTextUrlEvent(const wxTextUrlEvent&); wxTextUrlEvent& operator=(const wxTextUrlEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
52501 | ||
52502 | public: | |
52503 | ||
52504 | wxTextUrlEvent() : m_evtMouse(), m_start(0), m_end(0) { } | |
52505 | }; | |
52506 | ||
52507 | typedef void (wxEvtHandler::*wxTextUrlEventFunction)(wxTextUrlEvent&); | |
52508 | # 512 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/textctrl.h" | |
52509 | class wxStreamToTextRedirector | |
52510 | { | |
52511 | private: | |
52512 | void Init(wxTextCtrl *text) | |
52513 | { | |
52514 | m_sbufOld = m_ostr.rdbuf(); | |
52515 | m_ostr.rdbuf(text); | |
52516 | } | |
52517 | ||
52518 | public: | |
52519 | wxStreamToTextRedirector(wxTextCtrl *text) | |
52520 | : m_ostr(std:: cout) | |
52521 | { | |
52522 | Init(text); | |
52523 | } | |
52524 | ||
52525 | wxStreamToTextRedirector(wxTextCtrl *text, std:: ostream *ostr) | |
52526 | : m_ostr(*ostr) | |
52527 | { | |
52528 | Init(text); | |
52529 | } | |
52530 | ||
52531 | ~wxStreamToTextRedirector() | |
52532 | { | |
52533 | m_ostr.rdbuf(m_sbufOld); | |
52534 | } | |
52535 | ||
52536 | private: | |
52537 | ||
52538 | std:: ostream& m_ostr; | |
52539 | ||
52540 | ||
52541 | std:: streambuf *m_sbufOld; | |
52542 | }; | |
52543 | # 65 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
52544 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/slider.h" 1 | |
52545 | # 47 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/slider.h" | |
52546 | extern const wxChar* wxSliderNameStr; | |
52547 | ||
52548 | ||
52549 | ||
52550 | ||
52551 | ||
52552 | class wxSliderBase : public wxControl | |
52553 | { | |
52554 | public: | |
52555 | # 67 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/slider.h" | |
52556 | wxSliderBase() { } | |
52557 | ||
52558 | ||
52559 | virtual int GetValue() const = 0; | |
52560 | virtual void SetValue(int value) = 0; | |
52561 | ||
52562 | ||
52563 | virtual void SetRange(int minValue, int maxValue) = 0; | |
52564 | virtual int GetMin() const = 0; | |
52565 | virtual int GetMax() const = 0; | |
52566 | void SetMin( int minValue ) { SetRange( minValue , GetMax() ) ; } | |
52567 | void SetMax( int maxValue ) { SetRange( GetMin() , maxValue ) ; } | |
52568 | ||
52569 | ||
52570 | ||
52571 | ||
52572 | virtual void SetLineSize(int lineSize) = 0; | |
52573 | virtual void SetPageSize(int pageSize) = 0; | |
52574 | virtual int GetLineSize() const = 0; | |
52575 | virtual int GetPageSize() const = 0; | |
52576 | ||
52577 | ||
52578 | virtual void SetThumbLength(int lenPixels) = 0; | |
52579 | virtual int GetThumbLength() const = 0; | |
52580 | ||
52581 | ||
52582 | ||
52583 | ||
52584 | virtual void SetTickFreq(int , int ) { } | |
52585 | virtual int GetTickFreq() const { return 0; } | |
52586 | virtual void ClearTicks() { } | |
52587 | virtual void SetTick(int ) { } | |
52588 | ||
52589 | virtual void ClearSel() { } | |
52590 | virtual int GetSelEnd() const { return GetMin(); } | |
52591 | virtual int GetSelStart() const { return GetMax(); } | |
52592 | virtual void SetSelection(int , int ) { } | |
52593 | ||
52594 | protected: | |
52595 | ||
52596 | ||
52597 | virtual int ValueInvertOrNot(int value) const | |
52598 | { | |
52599 | if (HasFlag(0x1000)) | |
52600 | return (GetMax() + GetMin()) - value; | |
52601 | else | |
52602 | return value; | |
52603 | } | |
52604 | ||
52605 | private: | |
52606 | private: wxSliderBase(const wxSliderBase&); wxSliderBase& operator=(const wxSliderBase&); | |
52607 | }; | |
52608 | # 134 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/slider.h" | |
52609 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/slider.h" 1 | |
52610 | # 21 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/slider.h" | |
52611 | class wxSlider : public wxSliderBase | |
52612 | { | |
52613 | public: | |
52614 | wxSlider() { } | |
52615 | wxSlider(wxWindow *parent, | |
52616 | wxWindowID id, | |
52617 | int value, int minValue, int maxValue, | |
52618 | const wxPoint& pos = wxDefaultPosition, | |
52619 | const wxSize& size = wxDefaultSize, | |
52620 | long style = wxHORIZONTAL, | |
52621 | const wxValidator& validator = wxDefaultValidator, | |
52622 | const wxString& name = wxSliderNameStr) | |
52623 | { | |
52624 | Create( parent, id, value, minValue, maxValue, | |
52625 | pos, size, style, validator, name ); | |
52626 | } | |
52627 | ||
52628 | bool Create(wxWindow *parent, | |
52629 | wxWindowID id, | |
52630 | int value, int minValue, int maxValue, | |
52631 | const wxPoint& pos = wxDefaultPosition, | |
52632 | const wxSize& size = wxDefaultSize, | |
52633 | long style = wxHORIZONTAL, | |
52634 | const wxValidator& validator = wxDefaultValidator, | |
52635 | const wxString& name = wxSliderNameStr); | |
52636 | ||
52637 | ||
52638 | virtual int GetValue() const; | |
52639 | virtual void SetValue(int value); | |
52640 | ||
52641 | virtual void SetRange(int minValue, int maxValue); | |
52642 | virtual int GetMin() const; | |
52643 | virtual int GetMax() const; | |
52644 | ||
52645 | virtual void SetLineSize(int lineSize); | |
52646 | virtual void SetPageSize(int pageSize); | |
52647 | virtual int GetLineSize() const; | |
52648 | virtual int GetPageSize() const; | |
52649 | ||
52650 | virtual void SetThumbLength(int lenPixels); | |
52651 | virtual int GetThumbLength() const; | |
52652 | ||
52653 | static wxVisualAttributes | |
52654 | GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); | |
52655 | ||
52656 | ||
52657 | bool IsOwnGtkWindow( GdkWindow *window ); | |
52658 | void GtkDisableEvents(); | |
52659 | void GtkEnableEvents(); | |
52660 | ||
52661 | GtkAdjustment *m_adjust; | |
52662 | float m_oldPos; | |
52663 | ||
52664 | private: | |
52665 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
52666 | }; | |
52667 | # 135 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/slider.h" 2 | |
52668 | # 66 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
52669 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gauge.h" 1 | |
52670 | # 39 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gauge.h" | |
52671 | extern const wxChar* wxGaugeNameStr; | |
52672 | ||
52673 | ||
52674 | ||
52675 | ||
52676 | ||
52677 | class wxGaugeBase : public wxControl | |
52678 | { | |
52679 | public: | |
52680 | wxGaugeBase() { m_rangeMax = m_gaugePos = 0; } | |
52681 | virtual ~wxGaugeBase(); | |
52682 | ||
52683 | bool Create(wxWindow *parent, | |
52684 | wxWindowID id, | |
52685 | int range, | |
52686 | const wxPoint& pos = wxDefaultPosition, | |
52687 | const wxSize& size = wxDefaultSize, | |
52688 | long style = wxHORIZONTAL, | |
52689 | const wxValidator& validator = wxDefaultValidator, | |
52690 | const wxString& name = wxGaugeNameStr); | |
52691 | ||
52692 | ||
52693 | virtual void SetRange(int range); | |
52694 | virtual int GetRange() const; | |
52695 | ||
52696 | ||
52697 | virtual void SetValue(int pos); | |
52698 | virtual int GetValue() const; | |
52699 | ||
52700 | ||
52701 | bool IsVertical() const { return HasFlag(wxVERTICAL); } | |
52702 | ||
52703 | ||
52704 | ||
52705 | virtual void SetShadowWidth(int w); | |
52706 | virtual int GetShadowWidth() const; | |
52707 | ||
52708 | virtual void SetBezelFace(int w); | |
52709 | virtual int GetBezelFace() const; | |
52710 | ||
52711 | ||
52712 | virtual bool AcceptsFocus() const { return false; } | |
52713 | ||
52714 | protected: | |
52715 | ||
52716 | int m_rangeMax; | |
52717 | ||
52718 | ||
52719 | int m_gaugePos; | |
52720 | ||
52721 | private: wxGaugeBase(const wxGaugeBase&); wxGaugeBase& operator=(const wxGaugeBase&); | |
52722 | }; | |
52723 | # 104 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gauge.h" | |
52724 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/gauge.h" 1 | |
52725 | # 30 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/gauge.h" | |
52726 | class wxGauge; | |
52727 | ||
52728 | ||
52729 | ||
52730 | ||
52731 | ||
52732 | extern const wxChar* wxGaugeNameStr; | |
52733 | ||
52734 | ||
52735 | ||
52736 | ||
52737 | ||
52738 | class wxGauge: public wxControl | |
52739 | { | |
52740 | public: | |
52741 | wxGauge() { Init(); } | |
52742 | ||
52743 | wxGauge( wxWindow *parent, | |
52744 | wxWindowID id, | |
52745 | int range, | |
52746 | const wxPoint& pos = wxDefaultPosition, | |
52747 | const wxSize& size = wxDefaultSize, | |
52748 | long style = wxHORIZONTAL, | |
52749 | const wxValidator& validator = wxDefaultValidator, | |
52750 | const wxString& name = wxGaugeNameStr ) | |
52751 | { | |
52752 | Init(); | |
52753 | ||
52754 | Create(parent, id, range, pos, size, style, validator, name); | |
52755 | } | |
52756 | ||
52757 | bool Create( wxWindow *parent, | |
52758 | wxWindowID id, int range, | |
52759 | const wxPoint& pos = wxDefaultPosition, | |
52760 | const wxSize& size = wxDefaultSize, | |
52761 | long style = wxHORIZONTAL, | |
52762 | const wxValidator& validator = wxDefaultValidator, | |
52763 | const wxString& name = wxGaugeNameStr ); | |
52764 | ||
52765 | void SetShadowWidth( int ) { } | |
52766 | void SetBezelFace( int ) { } | |
52767 | void SetRange( int r ); | |
52768 | void SetValue( int pos ); | |
52769 | int GetShadowWidth() const { return 0; }; | |
52770 | int GetBezelFace() const { return 0; }; | |
52771 | int GetRange() const; | |
52772 | int GetValue() const; | |
52773 | ||
52774 | bool IsVertical() const { return HasFlag(wxVERTICAL); } | |
52775 | ||
52776 | static wxVisualAttributes | |
52777 | GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); | |
52778 | ||
52779 | ||
52780 | ||
52781 | ||
52782 | ||
52783 | int m_rangeMax, | |
52784 | m_gaugePos; | |
52785 | ||
52786 | ||
52787 | ||
52788 | ||
52789 | ||
52790 | ||
52791 | protected: | |
52792 | ||
52793 | void Init() { m_rangeMax = m_gaugePos = 0; } | |
52794 | ||
52795 | ||
52796 | void DoSetGauge(); | |
52797 | ||
52798 | virtual wxSize DoGetBestSize() const; | |
52799 | ||
52800 | virtual wxVisualAttributes GetDefaultAttributes() const; | |
52801 | ||
52802 | private: | |
52803 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
52804 | }; | |
52805 | # 105 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gauge.h" 2 | |
52806 | # 67 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
52807 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/scrolwin.h" 1 | |
52808 | # 17 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/scrolwin.h" | |
52809 | class wxScrollHelperEvtHandler; | |
52810 | class wxTimer; | |
52811 | # 216 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/scrolwin.h" | |
52812 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/scrolwin.h" 1 | |
52813 | # 24 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/scrolwin.h" | |
52814 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/panel.h" 1 | |
52815 | # 25 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/scrolwin.h" 2 | |
52816 | ||
52817 | extern const wxChar* wxPanelNameStr; | |
52818 | # 37 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/scrolwin.h" | |
52819 | class wxScrolledWindow : public wxPanel | |
52820 | { | |
52821 | public: | |
52822 | wxScrolledWindow() | |
52823 | { Init(); } | |
52824 | ||
52825 | wxScrolledWindow(wxWindow *parent, | |
52826 | wxWindowID id = -1, | |
52827 | const wxPoint& pos = wxDefaultPosition, | |
52828 | const wxSize& size = wxDefaultSize, | |
52829 | long style = (0x40000000 | 0x80000000), | |
52830 | const wxString& name = wxPanelNameStr) | |
52831 | { Create(parent, id, pos, size, style, name); } | |
52832 | ||
52833 | void Init(); | |
52834 | ||
52835 | bool Create(wxWindow *parent, | |
52836 | wxWindowID id, | |
52837 | const wxPoint& pos = wxDefaultPosition, | |
52838 | const wxSize& size = wxDefaultSize, | |
52839 | long style = (0x40000000 | 0x80000000), | |
52840 | const wxString& name = wxPanelNameStr); | |
52841 | ||
52842 | ||
52843 | ||
52844 | ||
52845 | ||
52846 | ||
52847 | virtual void SetTargetWindow( wxWindow *target, bool pushEventHandler = 0 ); | |
52848 | virtual wxWindow *GetTargetWindow() const; | |
52849 | ||
52850 | ||
52851 | virtual void DoSetVirtualSize( int x, int y ); | |
52852 | ||
52853 | ||
52854 | ||
52855 | virtual wxSize GetBestVirtualSize() const; | |
52856 | ||
52857 | ||
52858 | ||
52859 | virtual wxSize DoGetBestSize() const; | |
52860 | ||
52861 | ||
52862 | void SetScrollRate( int xstep, int ystep ); | |
52863 | ||
52864 | ||
52865 | ||
52866 | ||
52867 | ||
52868 | ||
52869 | virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY, | |
52870 | int noUnitsX, int noUnitsY, | |
52871 | int xPos = 0, int yPos = 0, | |
52872 | bool noRefresh = 0 ); | |
52873 | ||
52874 | ||
52875 | virtual void Scroll(int x_pos, int y_pos); | |
52876 | ||
52877 | int GetScrollPageSize(int orient) const; | |
52878 | void SetScrollPageSize(int orient, int pageSize); | |
52879 | ||
52880 | virtual void GetScrollPixelsPerUnit(int *x_unit, int *y_unit) const; | |
52881 | ||
52882 | ||
52883 | ||
52884 | ||
52885 | ||
52886 | ||
52887 | ||
52888 | virtual void EnableScrolling(bool x_scrolling, bool y_scrolling); | |
52889 | ||
52890 | ||
52891 | virtual void GetViewStart(int *x, int *y) const; | |
52892 | ||
52893 | ||
52894 | void CalcScrolledPosition(int x, int y, int *xx, int *yy) const | |
52895 | { DoCalcScrolledPosition(x, y, xx, yy); } | |
52896 | wxPoint CalcScrolledPosition(const wxPoint& pt) const | |
52897 | { | |
52898 | wxPoint p2; | |
52899 | DoCalcScrolledPosition(pt.x, pt.y, &p2.x, &p2.y); | |
52900 | return p2; | |
52901 | } | |
52902 | ||
52903 | void CalcUnscrolledPosition(int x, int y, int *xx, int *yy) const | |
52904 | { DoCalcUnscrolledPosition(x, y, xx, yy); } | |
52905 | wxPoint CalcUnscrolledPosition(const wxPoint& pt) const | |
52906 | { | |
52907 | wxPoint p2; | |
52908 | DoCalcUnscrolledPosition(pt.x, pt.y, &p2.x, &p2.y); | |
52909 | return p2; | |
52910 | } | |
52911 | ||
52912 | virtual void DoCalcScrolledPosition(int x, int y, int *xx, int *yy) const; | |
52913 | virtual void DoCalcUnscrolledPosition(int x, int y, int *xx, int *yy) const; | |
52914 | ||
52915 | ||
52916 | virtual void OnDraw(wxDC& ) {} | |
52917 | ||
52918 | ||
52919 | ||
52920 | void PrepareDC(wxDC& dc) { DoPrepareDC(dc); } | |
52921 | ||
52922 | ||
52923 | virtual bool Layout(); | |
52924 | ||
52925 | ||
52926 | virtual void AdjustScrollbars(); | |
52927 | ||
52928 | ||
52929 | void SetScale(double xs, double ys) { m_scaleX = xs; m_scaleY = ys; } | |
52930 | double GetScaleX() const { return m_scaleX; } | |
52931 | double GetScaleY() const { return m_scaleY; } | |
52932 | ||
52933 | ||
52934 | void OnScroll(wxScrollWinEvent& event); | |
52935 | void OnSize(wxSizeEvent& event); | |
52936 | void OnPaint(wxPaintEvent& event); | |
52937 | void OnChar(wxKeyEvent& event); | |
52938 | ||
52939 | ||
52940 | virtual int CalcScrollInc(wxScrollWinEvent& event); | |
52941 | ||
52942 | virtual void SetScrollPos( int orient, int pos, bool refresh = 1 ); | |
52943 | ||
52944 | ||
52945 | ||
52946 | ||
52947 | ||
52948 | ||
52949 | virtual void DoPrepareDC(wxDC& dc); | |
52950 | ||
52951 | protected: | |
52952 | wxWindow *m_targetWindow; | |
52953 | int m_xScrollPixelsPerLine; | |
52954 | int m_yScrollPixelsPerLine; | |
52955 | bool m_xScrollingEnabled; | |
52956 | bool m_yScrollingEnabled; | |
52957 | ||
52958 | ||
52959 | ||
52960 | ||
52961 | int m_xScrollPosition; | |
52962 | int m_yScrollPosition; | |
52963 | int m_xScrollLinesPerPage; | |
52964 | int m_yScrollLinesPerPage; | |
52965 | ||
52966 | double m_scaleY,m_scaleX; | |
52967 | ||
52968 | private: | |
52969 | void DoScroll(int orient, int pos, int* posOld, int pixelsPerLine); | |
52970 | void DoAdjustScrollbars(GtkAdjustment* adj, | |
52971 | int pixelsPerLine, | |
52972 | int winSize, | |
52973 | int virtSize, | |
52974 | int *linesPerPage); | |
52975 | ||
52976 | private: static const wxEventTableEntry sm_eventTableEntries[]; protected: static const wxEventTable sm_eventTable; virtual const wxEventTable* GetEventTable() const; static wxEventHashTable sm_eventHashTable; virtual wxEventHashTable& GetEventHashTable() const; | |
52977 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
52978 | }; | |
52979 | # 217 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/scrolwin.h" 2 | |
52980 | # 68 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
52981 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dirdlg.h" 1 | |
52982 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dirdlg.h" | |
52983 | extern const wxChar* wxDirDialogNameStr; | |
52984 | extern const wxChar* wxDirDialogDefaultFolderStr; | |
52985 | extern const wxChar* wxDirSelectorPromptStr; | |
52986 | # 94 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dirdlg.h" | |
52987 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/dirdlgg.h" 1 | |
52988 | # 22 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/dirdlgg.h" | |
52989 | class wxGenericDirCtrl; | |
52990 | class wxTextCtrl; | |
52991 | class wxTreeEvent; | |
52992 | ||
52993 | ||
52994 | extern const wxChar* wxDirDialogNameStr; | |
52995 | extern const wxChar* wxDirSelectorPromptStr; | |
52996 | # 40 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/dirdlgg.h" | |
52997 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dialog.h" 1 | |
52998 | # 41 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/dirdlgg.h" 2 | |
52999 | ||
53000 | ||
53001 | ||
53002 | ||
53003 | ||
53004 | class wxGenericDirDialog : public wxDialog | |
53005 | { | |
53006 | public: | |
53007 | wxGenericDirDialog() : wxDialog() { } | |
53008 | ||
53009 | wxGenericDirDialog(wxWindow* parent, | |
53010 | const wxString& title = wxDirSelectorPromptStr, | |
53011 | const wxString& defaultPath = wxEmptyString, | |
53012 | long style = ((0x20000000 | 0x0800 | 0x1000) | 0x0040 | 0x0080), | |
53013 | const wxPoint& pos = wxDefaultPosition, | |
53014 | const wxSize& sz = wxSize(450, 550), | |
53015 | const wxString& name = wxDirDialogNameStr); | |
53016 | ||
53017 | ||
53018 | void SetMessage(const wxString& message) { m_message = message; } | |
53019 | void SetPath(const wxString& path); | |
53020 | void SetStyle(long style) { m_dialogStyle = style; } | |
53021 | ||
53022 | wxString GetMessage() const { return m_message; } | |
53023 | wxString GetPath() const; | |
53024 | long GetStyle() const { return m_dialogStyle; } | |
53025 | ||
53026 | ||
53027 | virtual int ShowModal(); | |
53028 | ||
53029 | ||
53030 | wxTextCtrl* GetInputCtrl() const { return m_input; } | |
53031 | ||
53032 | protected: | |
53033 | ||
53034 | void OnCloseWindow(wxCloseEvent& event); | |
53035 | void OnOK(wxCommandEvent& event); | |
53036 | void OnTreeSelected(wxTreeEvent &event); | |
53037 | void OnTreeKeyDown(wxTreeEvent &event); | |
53038 | void OnNew(wxCommandEvent& event); | |
53039 | void OnGoHome(wxCommandEvent& event); | |
53040 | void OnShowHidden(wxCommandEvent& event); | |
53041 | ||
53042 | wxString m_message; | |
53043 | long m_dialogStyle; | |
53044 | wxString m_path; | |
53045 | wxGenericDirCtrl* m_dirCtrl; | |
53046 | wxTextCtrl* m_input; | |
53047 | ||
53048 | private: static const wxEventTableEntry sm_eventTableEntries[]; protected: static const wxEventTable sm_eventTable; virtual const wxEventTable* GetEventTable() const; static wxEventHashTable sm_eventHashTable; virtual wxEventHashTable& GetEventHashTable() const; | |
53049 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
53050 | }; | |
53051 | # 95 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dirdlg.h" 2 | |
53052 | # 103 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dirdlg.h" | |
53053 | wxString | |
53054 | wxDirSelector(const wxString& message = wxDirSelectorPromptStr, | |
53055 | const wxString& defaultPath = wxEmptyString, | |
53056 | long style = ((0x20000000 | 0x0800 | 0x1000) | 0x0040 | 0x0080), | |
53057 | const wxPoint& pos = wxDefaultPosition, | |
53058 | wxWindow *parent = __null); | |
53059 | # 69 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
53060 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/toolbar.h" 1 | |
53061 | # 21 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/toolbar.h" | |
53062 | enum | |
53063 | { | |
53064 | ||
53065 | wxTB_HORIZONTAL = wxHORIZONTAL, | |
53066 | ||
53067 | ||
53068 | wxTB_VERTICAL = wxVERTICAL, | |
53069 | ||
53070 | ||
53071 | wxTB_3DBUTTONS = 0x0010, | |
53072 | ||
53073 | ||
53074 | wxTB_FLAT = 0x0020, | |
53075 | ||
53076 | ||
53077 | wxTB_DOCKABLE = 0x0040, | |
53078 | ||
53079 | ||
53080 | wxTB_NOICONS = 0x0080, | |
53081 | ||
53082 | ||
53083 | wxTB_TEXT = 0x0100, | |
53084 | ||
53085 | ||
53086 | wxTB_NODIVIDER = 0x0200, | |
53087 | ||
53088 | ||
53089 | wxTB_NOALIGN = 0x0400, | |
53090 | ||
53091 | ||
53092 | wxTB_HORZ_LAYOUT = 0x0800, | |
53093 | wxTB_HORZ_TEXT = wxTB_HORZ_LAYOUT | wxTB_TEXT | |
53094 | }; | |
53095 | ||
53096 | ||
53097 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/tbarbase.h" 1 | |
53098 | # 31 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/tbarbase.h" | |
53099 | class wxToolBarBase; | |
53100 | class wxToolBarToolBase; | |
53101 | class wxImage; | |
53102 | ||
53103 | ||
53104 | ||
53105 | ||
53106 | ||
53107 | extern const wxChar* wxToolBarNameStr; | |
53108 | extern const wxSize wxDefaultSize; | |
53109 | extern const wxPoint wxDefaultPosition; | |
53110 | ||
53111 | enum wxToolBarToolStyle | |
53112 | { | |
53113 | wxTOOL_STYLE_BUTTON = 1, | |
53114 | wxTOOL_STYLE_SEPARATOR = 2, | |
53115 | wxTOOL_STYLE_CONTROL | |
53116 | }; | |
53117 | # 61 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/tbarbase.h" | |
53118 | class wxToolBarToolBase : public wxObject | |
53119 | { | |
53120 | public: | |
53121 | ||
53122 | ||
53123 | ||
53124 | wxToolBarToolBase(wxToolBarBase *tbar = (wxToolBarBase *)__null, | |
53125 | int toolid = wxID_SEPARATOR, | |
53126 | const wxString& label = wxEmptyString, | |
53127 | const wxBitmap& bmpNormal = wxNullBitmap, | |
53128 | const wxBitmap& bmpDisabled = wxNullBitmap, | |
53129 | wxItemKind kind = wxITEM_NORMAL, | |
53130 | wxObject *clientData = (wxObject *) __null, | |
53131 | const wxString& shortHelpString = wxEmptyString, | |
53132 | const wxString& longHelpString = wxEmptyString) | |
53133 | : m_label(label), | |
53134 | m_shortHelpString(shortHelpString), | |
53135 | m_longHelpString(longHelpString) | |
53136 | { | |
53137 | m_tbar = tbar; | |
53138 | m_id = toolid; | |
53139 | if (m_id == wxID_ANY) | |
53140 | m_id = wxNewId(); | |
53141 | m_clientData = clientData; | |
53142 | ||
53143 | m_bmpNormal = bmpNormal; | |
53144 | m_bmpDisabled = bmpDisabled; | |
53145 | ||
53146 | m_kind = kind; | |
53147 | ||
53148 | m_enabled = true; | |
53149 | m_toggled = false; | |
53150 | ||
53151 | m_toolStyle = toolid == wxID_SEPARATOR ? wxTOOL_STYLE_SEPARATOR | |
53152 | : wxTOOL_STYLE_BUTTON; | |
53153 | } | |
53154 | ||
53155 | wxToolBarToolBase(wxToolBarBase *tbar, wxControl *control) | |
53156 | { | |
53157 | m_tbar = tbar; | |
53158 | m_control = control; | |
53159 | m_id = control->GetId(); | |
53160 | ||
53161 | m_kind = wxITEM_MAX; | |
53162 | ||
53163 | m_enabled = true; | |
53164 | m_toggled = false; | |
53165 | ||
53166 | m_toolStyle = wxTOOL_STYLE_CONTROL; | |
53167 | } | |
53168 | ||
53169 | ~wxToolBarToolBase(){} | |
53170 | ||
53171 | ||
53172 | ||
53173 | ||
53174 | ||
53175 | int GetId() const { return m_id; } | |
53176 | ||
53177 | wxControl *GetControl() const | |
53178 | { | |
53179 | ; | |
53180 | ||
53181 | return m_control; | |
53182 | } | |
53183 | ||
53184 | wxToolBarBase *GetToolBar() const { return m_tbar; } | |
53185 | ||
53186 | ||
53187 | bool IsButton() const { return m_toolStyle == wxTOOL_STYLE_BUTTON; } | |
53188 | bool IsControl() const { return m_toolStyle == wxTOOL_STYLE_CONTROL; } | |
53189 | bool IsSeparator() const { return m_toolStyle == wxTOOL_STYLE_SEPARATOR; } | |
53190 | int GetStyle() const { return m_toolStyle; } | |
53191 | wxItemKind GetKind() const | |
53192 | { | |
53193 | ; | |
53194 | ||
53195 | return m_kind; | |
53196 | } | |
53197 | ||
53198 | ||
53199 | bool IsEnabled() const { return m_enabled; } | |
53200 | bool IsToggled() const { return m_toggled; } | |
53201 | bool CanBeToggled() const | |
53202 | { return m_kind == wxITEM_CHECK || m_kind == wxITEM_RADIO; } | |
53203 | ||
53204 | ||
53205 | const wxBitmap& GetNormalBitmap() const { return m_bmpNormal; } | |
53206 | const wxBitmap& GetDisabledBitmap() const { return m_bmpDisabled; } | |
53207 | ||
53208 | const wxBitmap& GetBitmap() const | |
53209 | { return IsEnabled() ? GetNormalBitmap() : GetDisabledBitmap(); } | |
53210 | ||
53211 | const wxString& GetLabel() const { return m_label; } | |
53212 | ||
53213 | const wxString& GetShortHelp() const { return m_shortHelpString; } | |
53214 | const wxString& GetLongHelp() const { return m_longHelpString; } | |
53215 | ||
53216 | wxObject *GetClientData() const | |
53217 | { | |
53218 | if ( m_toolStyle == wxTOOL_STYLE_CONTROL ) | |
53219 | { | |
53220 | return (wxObject*)m_control->GetClientData(); | |
53221 | } | |
53222 | else | |
53223 | { | |
53224 | return m_clientData; | |
53225 | } | |
53226 | } | |
53227 | ||
53228 | ||
53229 | bool Enable(bool enable); | |
53230 | bool Toggle(bool toggle); | |
53231 | bool SetToggle(bool toggle); | |
53232 | bool SetShortHelp(const wxString& help); | |
53233 | bool SetLongHelp(const wxString& help); | |
53234 | ||
53235 | void Toggle() { Toggle(!IsToggled()); } | |
53236 | ||
53237 | void SetNormalBitmap(const wxBitmap& bmp) { m_bmpNormal = bmp; } | |
53238 | void SetDisabledBitmap(const wxBitmap& bmp) { m_bmpDisabled = bmp; } | |
53239 | ||
53240 | virtual void SetLabel(const wxString& label) { m_label = label; } | |
53241 | ||
53242 | void SetClientData(wxObject *clientData) | |
53243 | { | |
53244 | if ( m_toolStyle == wxTOOL_STYLE_CONTROL ) | |
53245 | { | |
53246 | m_control->SetClientData(clientData); | |
53247 | } | |
53248 | else | |
53249 | { | |
53250 | m_clientData = clientData; | |
53251 | } | |
53252 | } | |
53253 | ||
53254 | ||
53255 | virtual void Detach() { m_tbar = (wxToolBarBase *)__null; } | |
53256 | virtual void Attach(wxToolBarBase *tbar) { m_tbar = tbar; } | |
53257 | # 210 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/tbarbase.h" | |
53258 | protected: | |
53259 | wxToolBarBase *m_tbar; | |
53260 | ||
53261 | ||
53262 | int m_toolStyle; | |
53263 | int m_id; | |
53264 | wxItemKind m_kind; | |
53265 | ||
53266 | ||
53267 | union | |
53268 | { | |
53269 | wxObject *m_clientData; | |
53270 | wxControl *m_control; | |
53271 | }; | |
53272 | ||
53273 | ||
53274 | bool m_toggled; | |
53275 | bool m_enabled; | |
53276 | ||
53277 | ||
53278 | wxBitmap m_bmpNormal; | |
53279 | wxBitmap m_bmpDisabled; | |
53280 | ||
53281 | ||
53282 | wxString m_label; | |
53283 | ||
53284 | ||
53285 | wxString m_shortHelpString; | |
53286 | wxString m_longHelpString; | |
53287 | ||
53288 | private: wxToolBarToolBase(const wxToolBarToolBase&); wxToolBarToolBase& operator=(const wxToolBarToolBase&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
53289 | }; | |
53290 | ||
53291 | ||
53292 | typedef wxToolBarToolBase _WX_LIST_ITEM_TYPE_wxToolBarToolsList; typedef int (*wxSortFuncFor_wxToolBarToolsList)(const wxToolBarToolBase **, const wxToolBarToolBase **); class wxwxToolBarToolsListNode : public wxNodeBase { public: wxwxToolBarToolsListNode(wxListBase *list = (wxListBase *)__null, wxwxToolBarToolsListNode *previous = (wxwxToolBarToolsListNode *)__null, wxwxToolBarToolsListNode *next = (wxwxToolBarToolsListNode *)__null, wxToolBarToolBase *data = (wxToolBarToolBase *)__null, const wxListKey& key = wxDefaultListKey) : wxNodeBase(list, previous, next, data, key) { } wxwxToolBarToolsListNode *GetNext() const { return (wxwxToolBarToolsListNode *)wxNodeBase::GetNext(); } wxwxToolBarToolsListNode *GetPrevious() const { return (wxwxToolBarToolsListNode *)wxNodeBase::GetPrevious(); } wxToolBarToolBase *GetData() const { return (wxToolBarToolBase *)wxNodeBase::GetData(); } void SetData(wxToolBarToolBase *data) { wxNodeBase::SetData(data); } protected: virtual void DeleteData(); private: wxwxToolBarToolsListNode(const wxwxToolBarToolsListNode&); wxwxToolBarToolsListNode& operator=(const wxwxToolBarToolsListNode&); }; class wxToolBarToolsList : public wxListBase { public: typedef wxwxToolBarToolsListNode Node; typedef Node* compatibility_iterator; wxToolBarToolsList(wxKeyType keyType = wxKEY_NONE) : wxListBase(keyType) { } wxToolBarToolsList(const wxToolBarToolsList& list) : wxListBase(list.GetKeyType()) { Assign(list); } wxToolBarToolsList(size_t count, wxToolBarToolBase *elements[]) : wxListBase(count, (void **)elements) { } wxToolBarToolsList& operator=(const wxToolBarToolsList& list) { Assign(list); return *this; } wxwxToolBarToolsListNode *GetFirst() const { return (wxwxToolBarToolsListNode *)wxListBase::GetFirst(); } wxwxToolBarToolsListNode *GetLast() const { return (wxwxToolBarToolsListNode *)wxListBase::GetLast(); } wxwxToolBarToolsListNode *Item(size_t index) const { return (wxwxToolBarToolsListNode *)wxListBase::Item(index); } wxToolBarToolBase *operator[](size_t index) const { wxwxToolBarToolsListNode *node = Item(index); return node ? (wxToolBarToolBase*)(node->GetData()) : (wxToolBarToolBase*)__null; } wxwxToolBarToolsListNode *Append(wxToolBarToolBase *object) { return (wxwxToolBarToolsListNode *)wxListBase::Append(object); } wxwxToolBarToolsListNode *Insert(wxToolBarToolBase *object) { return (wxwxToolBarToolsListNode *)Insert((wxwxToolBarToolsListNode*)__null, object); } wxwxToolBarToolsListNode *Insert(size_t pos, wxToolBarToolBase *object) { return (wxwxToolBarToolsListNode *)wxListBase::Insert(pos, object); } wxwxToolBarToolsListNode *Insert(wxwxToolBarToolsListNode *prev, wxToolBarToolBase *object) { return (wxwxToolBarToolsListNode *)wxListBase::Insert(prev, object); } wxwxToolBarToolsListNode *Append(long key, void *object) { return (wxwxToolBarToolsListNode *)wxListBase::Append(key, object); } wxwxToolBarToolsListNode *Append(const wxChar *key, void *object) { return (wxwxToolBarToolsListNode *)wxListBase::Append(key, object); } wxwxToolBarToolsListNode *DetachNode(wxwxToolBarToolsListNode *node) { return (wxwxToolBarToolsListNode *)wxListBase::DetachNode(node); } bool DeleteNode(wxwxToolBarToolsListNode *node) { return wxListBase::DeleteNode(node); } bool DeleteObject(wxToolBarToolBase *object) { return wxListBase::DeleteObject(object); } void Erase(compatibility_iterator it) { DeleteNode(it); } wxwxToolBarToolsListNode *Find(const wxToolBarToolBase *object) const { return (wxwxToolBarToolsListNode *)wxListBase::Find(object); } virtual wxwxToolBarToolsListNode *Find(const wxListKey& key) const { return (wxwxToolBarToolsListNode *)wxListBase::Find(key); } int IndexOf(wxToolBarToolBase *object) const { return wxListBase::IndexOf(object); } void Sort(wxSortCompareFunction func) { wxListBase::Sort(func); } void Sort(wxSortFuncFor_wxToolBarToolsList func) { Sort((wxSortCompareFunction)func); } protected: virtual wxNodeBase *CreateNode(wxNodeBase *prev, wxNodeBase *next, void *data, const wxListKey& key = wxDefaultListKey) { return new wxwxToolBarToolsListNode(this, (wxwxToolBarToolsListNode *)prev, (wxwxToolBarToolsListNode *)next, (wxToolBarToolBase *)data, key); } public: typedef size_t size_type; typedef int difference_type; typedef wxToolBarToolBase* value_type; typedef wxToolBarToolBase* base_value_type; typedef value_type& reference; typedef const value_type& const_reference; typedef base_value_type& base_reference; typedef const base_value_type& const_base_reference; class iterator { typedef wxToolBarToolsList list; public: typedef wxwxToolBarToolsListNode Node; typedef iterator itor; typedef wxToolBarToolBase* value_type; typedef value_type* ptr_type; typedef value_type& reference; Node* m_node; Node* m_init; public: typedef reference reference_type; typedef ptr_type pointer_type; iterator(Node* node, Node* init) : m_node(node), m_init(init) {} iterator() : m_node(__null), m_init(__null) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetNext(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetNext(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetPrevious() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetPrevious() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class const_iterator { typedef wxToolBarToolsList list; public: typedef wxwxToolBarToolsListNode Node; typedef wxToolBarToolBase* value_type; typedef const value_type& const_reference; typedef const_iterator itor; typedef value_type* ptr_type; Node* m_node; Node* m_init; public: typedef const_reference reference_type; typedef const ptr_type pointer_type; const_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } const_iterator() : m_node(__null), m_init(__null) { } const_iterator(const iterator& it) : m_node(it.m_node), m_init(it.m_init) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetNext(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetNext(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetPrevious() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetPrevious() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class reverse_iterator { typedef wxToolBarToolsList list; public: typedef wxwxToolBarToolsListNode Node; typedef wxToolBarToolBase* value_type; typedef reverse_iterator itor; typedef value_type* ptr_type; typedef value_type& reference; Node* m_node; Node* m_init; public: typedef reference reference_type; typedef ptr_type pointer_type; reverse_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } reverse_iterator() : m_node(__null), m_init(__null) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetPrevious(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetPrevious(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetNext() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetNext() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class const_reverse_iterator { typedef wxToolBarToolsList list; public: typedef wxwxToolBarToolsListNode Node; typedef wxToolBarToolBase* value_type; typedef const_reverse_iterator itor; typedef value_type* ptr_type; typedef const value_type& const_reference; Node* m_node; Node* m_init; public: typedef const_reference reference_type; typedef const ptr_type pointer_type; const_reverse_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } const_reverse_iterator() : m_node(__null), m_init(__null) { } const_reverse_iterator(const reverse_iterator& it) : m_node(it.m_node), m_init(it.m_init) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetPrevious(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetPrevious(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetNext() : m_init; return *this;} const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetNext() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; explicit wxToolBarToolsList(size_type n, const_reference v = value_type()) { assign(n, v); } wxToolBarToolsList(const const_iterator& first, const const_iterator& last) { assign(first, last); } iterator begin() { return iterator(GetFirst(), GetLast()); } const_iterator begin() const { return const_iterator(GetFirst(), GetLast()); } iterator end() { return iterator(__null, GetLast()); } const_iterator end() const { return const_iterator(__null, GetLast()); } reverse_iterator rbegin() { return reverse_iterator(GetLast(), GetFirst()); } const_reverse_iterator rbegin() const { return const_reverse_iterator(GetLast(), GetFirst()); } reverse_iterator rend() { return reverse_iterator(__null, GetFirst()); } const_reverse_iterator rend() const { return const_reverse_iterator(__null, GetFirst()); } void resize(size_type n, value_type v = value_type()) { while (n < size()) pop_back(); while (n > size()) push_back(v); } size_type size() const { return GetCount(); } size_type max_size() const { return 2147483647; } bool empty() const { return IsEmpty(); } reference front() { return *begin(); } const_reference front() const { return *begin(); } reference back() { iterator tmp = end(); return *--tmp; } const_reference back() const { const_iterator tmp = end(); return *--tmp; } void push_front(const_reference v = value_type()) { Insert(GetFirst(), (const_base_reference)v); } void pop_front() { DeleteNode(GetFirst()); } void push_back(const_reference v = value_type()) { Append((const_base_reference)v); } void pop_back() { DeleteNode(GetLast()); } void assign(const_iterator first, const const_iterator& last) { clear(); for(; first != last; ++first) Append((const_base_reference)*first); } void assign(size_type n, const_reference v = value_type()) { clear(); for(size_type i = 0; i < n; ++i) Append((const_base_reference)v); } iterator insert(const iterator& it, const_reference v = value_type()) { Insert(it.m_node, (const_base_reference)v); return iterator(it.m_node->GetPrevious(), GetLast()); } void insert(const iterator& it, size_type n, const_reference v = value_type()) { for(size_type i = 0; i < n; ++i) Insert(it.m_node, (const_base_reference)v); } void insert(const iterator& it, const_iterator first, const const_iterator& last) { for(; first != last; ++first) Insert(it.m_node, (const_base_reference)*first); } iterator erase(const iterator& it) { iterator next = iterator(it.m_node->GetNext(), GetLast()); DeleteNode(it.m_node); return next; } iterator erase(const iterator& first, const iterator& last) { iterator next = last; ++next; DeleteNodes(first.m_node, last.m_node); return next; } void clear() { Clear(); } void splice(const iterator& it, wxToolBarToolsList& l, const iterator& first, const iterator& last) { insert(it, first, last); l.erase(first, last); } void splice(const iterator& it, wxToolBarToolsList& l) { splice(it, l, l.begin(), l.end() ); } void splice(const iterator& it, wxToolBarToolsList& l, const iterator& first) { iterator tmp = first; ++tmp; if(it == first || it == tmp) return; insert(it, *first); l.erase(first); } void remove(const_reference v) { DeleteObject((const_base_reference)v); } void reverse() { Reverse(); } }; | |
53293 | ||
53294 | ||
53295 | ||
53296 | ||
53297 | ||
53298 | class wxToolBarBase : public wxControl | |
53299 | { | |
53300 | public: | |
53301 | wxToolBarBase(); | |
53302 | virtual ~wxToolBarBase(); | |
53303 | # 263 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/tbarbase.h" | |
53304 | wxToolBarToolBase *AddTool(int toolid, | |
53305 | const wxString& label, | |
53306 | const wxBitmap& bitmap, | |
53307 | const wxBitmap& bmpDisabled, | |
53308 | wxItemKind kind = wxITEM_NORMAL, | |
53309 | const wxString& shortHelp = wxEmptyString, | |
53310 | const wxString& longHelp = wxEmptyString, | |
53311 | wxObject *data = __null) | |
53312 | { | |
53313 | return DoAddTool(toolid, label, bitmap, bmpDisabled, kind, | |
53314 | shortHelp, longHelp, data); | |
53315 | } | |
53316 | ||
53317 | ||
53318 | wxToolBarToolBase *AddTool(int toolid, | |
53319 | const wxString& label, | |
53320 | const wxBitmap& bitmap, | |
53321 | const wxString& shortHelp = wxEmptyString, | |
53322 | wxItemKind kind = wxITEM_NORMAL) | |
53323 | { | |
53324 | return AddTool(toolid, label, bitmap, wxNullBitmap, kind, shortHelp); | |
53325 | } | |
53326 | ||
53327 | ||
53328 | wxToolBarToolBase *AddCheckTool(int toolid, | |
53329 | const wxString& label, | |
53330 | const wxBitmap& bitmap, | |
53331 | const wxBitmap& bmpDisabled = wxNullBitmap, | |
53332 | const wxString& shortHelp = wxEmptyString, | |
53333 | const wxString& longHelp = wxEmptyString, | |
53334 | wxObject *data = __null) | |
53335 | { | |
53336 | return AddTool(toolid, label, bitmap, bmpDisabled, wxITEM_CHECK, | |
53337 | shortHelp, longHelp, data); | |
53338 | } | |
53339 | ||
53340 | ||
53341 | ||
53342 | wxToolBarToolBase *AddRadioTool(int toolid, | |
53343 | const wxString& label, | |
53344 | const wxBitmap& bitmap, | |
53345 | const wxBitmap& bmpDisabled = wxNullBitmap, | |
53346 | const wxString& shortHelp = wxEmptyString, | |
53347 | const wxString& longHelp = wxEmptyString, | |
53348 | wxObject *data = __null) | |
53349 | { | |
53350 | return AddTool(toolid, label, bitmap, bmpDisabled, wxITEM_RADIO, | |
53351 | shortHelp, longHelp, data); | |
53352 | } | |
53353 | ||
53354 | ||
53355 | ||
53356 | ||
53357 | virtual wxToolBarToolBase *InsertTool | |
53358 | ( | |
53359 | size_t pos, | |
53360 | int toolid, | |
53361 | const wxString& label, | |
53362 | const wxBitmap& bitmap, | |
53363 | const wxBitmap& bmpDisabled = wxNullBitmap, | |
53364 | wxItemKind kind = wxITEM_NORMAL, | |
53365 | const wxString& shortHelp = wxEmptyString, | |
53366 | const wxString& longHelp = wxEmptyString, | |
53367 | wxObject *clientData = __null | |
53368 | ); | |
53369 | ||
53370 | virtual wxToolBarToolBase *AddTool (wxToolBarToolBase *tool); | |
53371 | virtual wxToolBarToolBase *InsertTool (size_t pos, wxToolBarToolBase *tool); | |
53372 | ||
53373 | ||
53374 | ||
53375 | ||
53376 | ||
53377 | ||
53378 | virtual wxToolBarToolBase *AddControl(wxControl *control); | |
53379 | virtual wxToolBarToolBase *InsertControl(size_t pos, wxControl *control); | |
53380 | ||
53381 | ||
53382 | virtual wxControl *FindControl( int toolid ); | |
53383 | ||
53384 | ||
53385 | virtual wxToolBarToolBase *AddSeparator(); | |
53386 | virtual wxToolBarToolBase *InsertSeparator(size_t pos); | |
53387 | ||
53388 | ||
53389 | ||
53390 | virtual wxToolBarToolBase *RemoveTool(int toolid); | |
53391 | ||
53392 | ||
53393 | virtual bool DeleteToolByPos(size_t pos); | |
53394 | virtual bool DeleteTool(int toolid); | |
53395 | ||
53396 | ||
53397 | virtual void ClearTools(); | |
53398 | ||
53399 | ||
53400 | ||
53401 | virtual bool Realize(); | |
53402 | ||
53403 | ||
53404 | ||
53405 | ||
53406 | virtual void EnableTool(int toolid, bool enable); | |
53407 | virtual void ToggleTool(int toolid, bool toggle); | |
53408 | ||
53409 | ||
53410 | virtual void SetToggle(int toolid, bool toggle); | |
53411 | ||
53412 | ||
53413 | virtual wxObject *GetToolClientData(int toolid) const; | |
53414 | virtual void SetToolClientData(int toolid, wxObject *clientData); | |
53415 | ||
53416 | ||
53417 | virtual int GetToolPos(int id) const; | |
53418 | ||
53419 | ||
53420 | virtual bool GetToolState(int toolid) const; | |
53421 | ||
53422 | virtual bool GetToolEnabled(int toolid) const; | |
53423 | ||
53424 | virtual void SetToolShortHelp(int toolid, const wxString& helpString); | |
53425 | virtual wxString GetToolShortHelp(int toolid) const; | |
53426 | virtual void SetToolLongHelp(int toolid, const wxString& helpString); | |
53427 | virtual wxString GetToolLongHelp(int toolid) const; | |
53428 | ||
53429 | ||
53430 | ||
53431 | ||
53432 | virtual void SetMargins(int x, int y); | |
53433 | void SetMargins(const wxSize& size) | |
53434 | { SetMargins((int) size.x, (int) size.y); } | |
53435 | virtual void SetToolPacking(int packing) | |
53436 | { m_toolPacking = packing; } | |
53437 | virtual void SetToolSeparation(int separation) | |
53438 | { m_toolSeparation = separation; } | |
53439 | ||
53440 | virtual wxSize GetToolMargins() const { return wxSize(m_xMargin, m_yMargin); } | |
53441 | virtual int GetToolPacking() const { return m_toolPacking; } | |
53442 | virtual int GetToolSeparation() const { return m_toolSeparation; } | |
53443 | ||
53444 | ||
53445 | ||
53446 | ||
53447 | ||
53448 | virtual void SetRows(int nRows); | |
53449 | ||
53450 | ||
53451 | void SetMaxRowsCols(int rows, int cols) | |
53452 | { m_maxRows = rows; m_maxCols = cols; } | |
53453 | int GetMaxRows() const { return m_maxRows; } | |
53454 | int GetMaxCols() const { return m_maxCols; } | |
53455 | ||
53456 | ||
53457 | ||
53458 | virtual void SetToolBitmapSize(const wxSize& size) | |
53459 | { m_defaultWidth = size.x; m_defaultHeight = size.y; }; | |
53460 | virtual wxSize GetToolBitmapSize() const | |
53461 | { return wxSize(m_defaultWidth, m_defaultHeight); } | |
53462 | ||
53463 | ||
53464 | ||
53465 | virtual wxSize GetToolSize() const | |
53466 | { return GetToolBitmapSize(); } ; | |
53467 | ||
53468 | ||
53469 | ||
53470 | virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, | |
53471 | wxCoord y) const = 0; | |
53472 | ||
53473 | ||
53474 | wxToolBarToolBase *FindById(int toolid) const; | |
53475 | ||
53476 | ||
53477 | bool IsVertical() const { return HasFlag(wxTB_VERTICAL); } | |
53478 | ||
53479 | ||
53480 | ||
53481 | ||
53482 | ||
53483 | ||
53484 | wxToolBarToolBase *AddTool(int toolid, | |
53485 | const wxBitmap& bitmap, | |
53486 | const wxBitmap& bmpDisabled, | |
53487 | bool toggle = false, | |
53488 | wxObject *clientData = __null, | |
53489 | const wxString& shortHelpString = wxEmptyString, | |
53490 | const wxString& longHelpString = wxEmptyString) | |
53491 | { | |
53492 | return AddTool(toolid, wxEmptyString, | |
53493 | bitmap, bmpDisabled, | |
53494 | toggle ? wxITEM_CHECK : wxITEM_NORMAL, | |
53495 | shortHelpString, longHelpString, clientData); | |
53496 | } | |
53497 | ||
53498 | wxToolBarToolBase *AddTool(int toolid, | |
53499 | const wxBitmap& bitmap, | |
53500 | const wxString& shortHelpString = wxEmptyString, | |
53501 | const wxString& longHelpString = wxEmptyString) | |
53502 | { | |
53503 | return AddTool(toolid, wxEmptyString, | |
53504 | bitmap, wxNullBitmap, wxITEM_NORMAL, | |
53505 | shortHelpString, longHelpString, __null); | |
53506 | } | |
53507 | ||
53508 | wxToolBarToolBase *AddTool(int toolid, | |
53509 | const wxBitmap& bitmap, | |
53510 | const wxBitmap& bmpDisabled, | |
53511 | bool toggle, | |
53512 | wxCoord xPos, | |
53513 | wxCoord yPos = wxDefaultCoord, | |
53514 | wxObject *clientData = __null, | |
53515 | const wxString& shortHelp = wxEmptyString, | |
53516 | const wxString& longHelp = wxEmptyString) | |
53517 | { | |
53518 | return DoAddTool(toolid, wxEmptyString, bitmap, bmpDisabled, | |
53519 | toggle ? wxITEM_CHECK : wxITEM_NORMAL, | |
53520 | shortHelp, longHelp, clientData, xPos, yPos); | |
53521 | } | |
53522 | ||
53523 | wxToolBarToolBase *InsertTool(size_t pos, | |
53524 | int toolid, | |
53525 | const wxBitmap& bitmap, | |
53526 | const wxBitmap& bmpDisabled = wxNullBitmap, | |
53527 | bool toggle = false, | |
53528 | wxObject *clientData = __null, | |
53529 | const wxString& shortHelp = wxEmptyString, | |
53530 | const wxString& longHelp = wxEmptyString) | |
53531 | { | |
53532 | return InsertTool(pos, toolid, wxEmptyString, bitmap, bmpDisabled, | |
53533 | toggle ? wxITEM_CHECK : wxITEM_NORMAL, | |
53534 | shortHelp, longHelp, clientData); | |
53535 | } | |
53536 | ||
53537 | ||
53538 | ||
53539 | ||
53540 | ||
53541 | ||
53542 | ||
53543 | virtual bool OnLeftClick(int toolid, bool toggleDown); | |
53544 | ||
53545 | ||
53546 | virtual void OnRightClick(int toolid, long x, long y); | |
53547 | ||
53548 | ||
53549 | ||
53550 | virtual void OnMouseEnter(int toolid); | |
53551 | ||
53552 | ||
53553 | ||
53554 | ||
53555 | ||
53556 | wxSize GetMargins() const { return GetToolMargins(); } | |
53557 | ||
53558 | ||
53559 | ||
53560 | ||
53561 | size_t GetToolsCount() const { return m_tools.GetCount(); } | |
53562 | ||
53563 | ||
53564 | virtual void UpdateWindowUI(long flags = wxUPDATE_UI_NONE) ; | |
53565 | ||
53566 | ||
53567 | virtual bool AcceptsFocus() const { return false; } | |
53568 | ||
53569 | protected: | |
53570 | ||
53571 | ||
53572 | ||
53573 | ||
53574 | ||
53575 | virtual wxToolBarToolBase *DoAddTool | |
53576 | ( | |
53577 | int toolid, | |
53578 | const wxString& label, | |
53579 | const wxBitmap& bitmap, | |
53580 | const wxBitmap& bmpDisabled, | |
53581 | wxItemKind kind, | |
53582 | const wxString& shortHelp = wxEmptyString, | |
53583 | const wxString& longHelp = wxEmptyString, | |
53584 | wxObject *clientData = __null, | |
53585 | wxCoord xPos = wxDefaultCoord, | |
53586 | wxCoord yPos = wxDefaultCoord | |
53587 | ); | |
53588 | ||
53589 | ||
53590 | ||
53591 | virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool) = 0; | |
53592 | ||
53593 | ||
53594 | ||
53595 | virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool) = 0; | |
53596 | ||
53597 | ||
53598 | virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable) = 0; | |
53599 | ||
53600 | ||
53601 | virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle) = 0; | |
53602 | ||
53603 | ||
53604 | virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle) = 0; | |
53605 | ||
53606 | ||
53607 | virtual wxToolBarToolBase *CreateTool(int toolid, | |
53608 | const wxString& label, | |
53609 | const wxBitmap& bmpNormal, | |
53610 | const wxBitmap& bmpDisabled, | |
53611 | wxItemKind kind, | |
53612 | wxObject *clientData, | |
53613 | const wxString& shortHelp, | |
53614 | const wxString& longHelp) = 0; | |
53615 | ||
53616 | virtual wxToolBarToolBase *CreateTool(wxControl *control) = 0; | |
53617 | ||
53618 | ||
53619 | ||
53620 | ||
53621 | ||
53622 | void UnToggleRadioGroup(wxToolBarToolBase *tool); | |
53623 | ||
53624 | ||
53625 | wxToolBarToolsList m_tools; | |
53626 | ||
53627 | ||
53628 | int m_xMargin; | |
53629 | int m_yMargin; | |
53630 | ||
53631 | ||
53632 | int m_maxRows; | |
53633 | int m_maxCols; | |
53634 | ||
53635 | ||
53636 | int m_toolPacking, | |
53637 | m_toolSeparation; | |
53638 | ||
53639 | ||
53640 | wxCoord m_defaultWidth, m_defaultHeight; | |
53641 | ||
53642 | private: | |
53643 | private: static const wxEventTableEntry sm_eventTableEntries[]; protected: static const wxEventTable sm_eventTable; virtual const wxEventTable* GetEventTable() const; static wxEventHashTable sm_eventHashTable; virtual wxEventHashTable& GetEventHashTable() const; | |
53644 | private: wxToolBarBase(const wxToolBarBase&); wxToolBarBase& operator=(const wxToolBarBase&); | |
53645 | }; | |
53646 | ||
53647 | ||
53648 | bool wxCreateGreyedImage(const wxImage& in, wxImage& out) ; | |
53649 | # 57 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/toolbar.h" 2 | |
53650 | # 71 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/toolbar.h" | |
53651 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/tbargtk.h" 1 | |
53652 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/tbargtk.h" | |
53653 | class wxToolBar : public wxToolBarBase | |
53654 | { | |
53655 | public: | |
53656 | ||
53657 | wxToolBar() { Init(); } | |
53658 | wxToolBar( wxWindow *parent, | |
53659 | wxWindowID id, | |
53660 | const wxPoint& pos = wxDefaultPosition, | |
53661 | const wxSize& size = wxDefaultSize, | |
53662 | long style = 0, | |
53663 | const wxString& name = wxToolBarNameStr ) | |
53664 | { | |
53665 | Init(); | |
53666 | ||
53667 | Create(parent, id, pos, size, style, name); | |
53668 | } | |
53669 | ||
53670 | bool Create( wxWindow *parent, | |
53671 | wxWindowID id, | |
53672 | const wxPoint& pos = wxDefaultPosition, | |
53673 | const wxSize& size = wxDefaultSize, | |
53674 | long style = 0, | |
53675 | const wxString& name = wxToolBarNameStr ); | |
53676 | ||
53677 | virtual ~wxToolBar(); | |
53678 | ||
53679 | ||
53680 | virtual void SetMargins(int x, int y); | |
53681 | virtual void SetToolSeparation(int separation); | |
53682 | ||
53683 | virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const; | |
53684 | ||
53685 | virtual void SetToolShortHelp(int id, const wxString& helpString); | |
53686 | ||
53687 | virtual void SetWindowStyleFlag( long style ); | |
53688 | ||
53689 | static wxVisualAttributes | |
53690 | GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); | |
53691 | ||
53692 | ||
53693 | ||
53694 | ||
53695 | GtkToolbar *m_toolbar; | |
53696 | ||
53697 | bool m_blockEvent; | |
53698 | ||
53699 | void OnInternalIdle(); | |
53700 | ||
53701 | protected: | |
53702 | ||
53703 | void Init(); | |
53704 | ||
53705 | ||
53706 | void GtkSetStyle(); | |
53707 | ||
53708 | ||
53709 | virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool); | |
53710 | virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool); | |
53711 | ||
53712 | virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable); | |
53713 | virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle); | |
53714 | virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle); | |
53715 | ||
53716 | virtual wxToolBarToolBase *CreateTool(int id, | |
53717 | const wxString& label, | |
53718 | const wxBitmap& bitmap1, | |
53719 | const wxBitmap& bitmap2, | |
53720 | wxItemKind kind, | |
53721 | wxObject *clientData, | |
53722 | const wxString& shortHelpString, | |
53723 | const wxString& longHelpString); | |
53724 | virtual wxToolBarToolBase *CreateTool(wxControl *control); | |
53725 | ||
53726 | private: | |
53727 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
53728 | }; | |
53729 | # 72 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/toolbar.h" 2 | |
53730 | # 70 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
53731 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/combobox.h" 1 | |
53732 | # 19 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/combobox.h" | |
53733 | extern const wxChar* wxComboBoxNameStr; | |
53734 | # 28 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/combobox.h" | |
53735 | class wxComboBoxBase : public wxItemContainer | |
53736 | { | |
53737 | public: | |
53738 | ||
53739 | virtual wxString GetValue() const = 0; | |
53740 | virtual void SetValue(const wxString& value) = 0; | |
53741 | ||
53742 | virtual void Copy() = 0; | |
53743 | virtual void Cut() = 0; | |
53744 | virtual void Paste() = 0; | |
53745 | virtual void SetInsertionPoint(long pos) = 0; | |
53746 | virtual long GetInsertionPoint() const = 0; | |
53747 | virtual wxTextPos GetLastPosition() const = 0; | |
53748 | virtual void Replace(long from, long to, const wxString& value) = 0; | |
53749 | virtual void SetSelection(long from, long to) = 0; | |
53750 | virtual void SetEditable(bool editable) = 0; | |
53751 | ||
53752 | virtual void SetInsertionPointEnd() | |
53753 | { SetInsertionPoint(GetLastPosition()); } | |
53754 | virtual void Remove(long from, long to) | |
53755 | { Replace(from, to, wxEmptyString); } | |
53756 | ||
53757 | virtual bool IsEditable() const = 0; | |
53758 | ||
53759 | virtual void Undo() = 0; | |
53760 | virtual void Redo() = 0; | |
53761 | virtual void SelectAll() = 0; | |
53762 | ||
53763 | virtual bool CanCopy() const = 0; | |
53764 | virtual bool CanCut() const = 0; | |
53765 | virtual bool CanPaste() const = 0; | |
53766 | virtual bool CanUndo() const = 0; | |
53767 | virtual bool CanRedo() const = 0; | |
53768 | ||
53769 | ||
53770 | ||
53771 | ||
53772 | virtual void SetSelection(int n) = 0; | |
53773 | }; | |
53774 | # 79 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/combobox.h" | |
53775 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/combobox.h" 1 | |
53776 | # 29 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/combobox.h" | |
53777 | class wxComboBox; | |
53778 | ||
53779 | ||
53780 | ||
53781 | ||
53782 | ||
53783 | extern const wxChar* wxComboBoxNameStr; | |
53784 | extern const wxChar* wxEmptyString; | |
53785 | ||
53786 | ||
53787 | ||
53788 | ||
53789 | ||
53790 | class wxComboBox : public wxControl, public wxComboBoxBase | |
53791 | { | |
53792 | public: | |
53793 | inline wxComboBox() {} | |
53794 | inline wxComboBox(wxWindow *parent, wxWindowID id, | |
53795 | const wxString& value = wxEmptyString, | |
53796 | const wxPoint& pos = wxDefaultPosition, | |
53797 | const wxSize& size = wxDefaultSize, | |
53798 | int n = 0, const wxString choices[] = (const wxString *) __null, | |
53799 | long style = 0, | |
53800 | const wxValidator& validator = wxDefaultValidator, | |
53801 | const wxString& name = wxComboBoxNameStr) | |
53802 | { | |
53803 | Create(parent, id, value, pos, size, n, choices, style, validator, name); | |
53804 | } | |
53805 | inline wxComboBox(wxWindow *parent, wxWindowID id, | |
53806 | const wxString& value, | |
53807 | const wxPoint& pos, | |
53808 | const wxSize& size, | |
53809 | const wxArrayString& choices, | |
53810 | long style = 0, | |
53811 | const wxValidator& validator = wxDefaultValidator, | |
53812 | const wxString& name = wxComboBoxNameStr) | |
53813 | { | |
53814 | Create(parent, id, value, pos, size, choices, style, validator, name); | |
53815 | } | |
53816 | ||
53817 | ~wxComboBox(); | |
53818 | ||
53819 | bool Create(wxWindow *parent, wxWindowID id, | |
53820 | const wxString& value = wxEmptyString, | |
53821 | const wxPoint& pos = wxDefaultPosition, | |
53822 | const wxSize& size = wxDefaultSize, | |
53823 | int n = 0, const wxString choices[] = (const wxString *) __null, | |
53824 | long style = 0, | |
53825 | const wxValidator& validator = wxDefaultValidator, | |
53826 | const wxString& name = wxComboBoxNameStr); | |
53827 | bool Create(wxWindow *parent, wxWindowID id, | |
53828 | const wxString& value, | |
53829 | const wxPoint& pos, | |
53830 | const wxSize& size, | |
53831 | const wxArrayString& choices, | |
53832 | long style = 0, | |
53833 | const wxValidator& validator = wxDefaultValidator, | |
53834 | const wxString& name = wxComboBoxNameStr); | |
53835 | ||
53836 | void Clear(); | |
53837 | void Delete( int n ); | |
53838 | ||
53839 | virtual int FindString( const wxString &item ) const; | |
53840 | int GetSelection() const; | |
53841 | ||
53842 | int GetCurrentSelection() const; | |
53843 | ||
53844 | wxString GetString( int n ) const; | |
53845 | wxString GetStringSelection() const; | |
53846 | int GetCount() const; | |
53847 | int Number() const { return GetCount(); } | |
53848 | void SetSelection( int n ); | |
53849 | void SetString(int n, const wxString &text); | |
53850 | ||
53851 | wxString GetValue() const; | |
53852 | void SetValue(const wxString& value); | |
53853 | ||
53854 | void Copy(); | |
53855 | void Cut(); | |
53856 | void Paste(); | |
53857 | bool CanCopy() const; | |
53858 | bool CanCut() const; | |
53859 | bool CanPaste() const; | |
53860 | void SetInsertionPoint( long pos ); | |
53861 | void SetInsertionPointEnd() { SetInsertionPoint( -1 ); } | |
53862 | long GetInsertionPoint() const; | |
53863 | virtual wxTextPos GetLastPosition() const; | |
53864 | void Remove(long from, long to) { Replace(from, to, wxEmptyString); } | |
53865 | void Replace( long from, long to, const wxString& value ); | |
53866 | void SetSelection( long from, long to ); | |
53867 | void GetSelection( long* from, long* to ) const; | |
53868 | void SetEditable( bool editable ); | |
53869 | void Undo() ; | |
53870 | void Redo() ; | |
53871 | bool CanUndo() const; | |
53872 | bool CanRedo() const; | |
53873 | void SelectAll(); | |
53874 | bool IsEditable() const ; | |
53875 | bool HasSelection() const ; | |
53876 | ||
53877 | ||
53878 | ||
53879 | virtual void SetFocus(); | |
53880 | ||
53881 | void OnSize( wxSizeEvent &event ); | |
53882 | void OnChar( wxKeyEvent &event ); | |
53883 | ||
53884 | ||
53885 | void OnCut(wxCommandEvent& event); | |
53886 | void OnCopy(wxCommandEvent& event); | |
53887 | void OnPaste(wxCommandEvent& event); | |
53888 | void OnUndo(wxCommandEvent& event); | |
53889 | void OnRedo(wxCommandEvent& event); | |
53890 | void OnDelete(wxCommandEvent& event); | |
53891 | void OnSelectAll(wxCommandEvent& event); | |
53892 | ||
53893 | void OnUpdateCut(wxUpdateUIEvent& event); | |
53894 | void OnUpdateCopy(wxUpdateUIEvent& event); | |
53895 | void OnUpdatePaste(wxUpdateUIEvent& event); | |
53896 | void OnUpdateUndo(wxUpdateUIEvent& event); | |
53897 | void OnUpdateRedo(wxUpdateUIEvent& event); | |
53898 | void OnUpdateDelete(wxUpdateUIEvent& event); | |
53899 | void OnUpdateSelectAll(wxUpdateUIEvent& event); | |
53900 | ||
53901 | bool m_ignoreNextUpdate:1; | |
53902 | wxList m_clientDataList; | |
53903 | wxList m_clientObjectList; | |
53904 | int m_prevSelection; | |
53905 | ||
53906 | void DisableEvents(); | |
53907 | void EnableEvents(); | |
53908 | GtkWidget* GetConnectWidget(); | |
53909 | bool IsOwnGtkWindow( GdkWindow *window ); | |
53910 | void DoApplyWidgetStyle(GtkRcStyle *style); | |
53911 | ||
53912 | void SetClientData(void *data) { wxControl::SetClientData(data); } void *GetClientData() const { return wxControl::GetClientData(); } void SetClientObject(wxClientData *data) { wxControl::SetClientObject(data); } wxClientData *GetClientObject() const { return wxControl::GetClientObject(); } void SetClientData(int n, void* clientData) { wxItemContainer::SetClientData(n, clientData); } void* GetClientData(int n) const { return wxItemContainer::GetClientData(n); } void SetClientObject(int n, wxClientData* clientData) { wxItemContainer::SetClientObject(n, clientData); } wxClientData* GetClientObject(int n) const { return wxItemContainer::GetClientObject(n); } | |
53913 | ||
53914 | static wxVisualAttributes | |
53915 | GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); | |
53916 | ||
53917 | protected: | |
53918 | virtual int DoAppend(const wxString& item); | |
53919 | virtual int DoInsert(const wxString& item, int pos); | |
53920 | ||
53921 | virtual void DoSetItemClientData( int n, void* clientData ); | |
53922 | virtual void* DoGetItemClientData( int n ) const; | |
53923 | virtual void DoSetItemClientObject( int n, wxClientData* clientData ); | |
53924 | virtual wxClientData* DoGetItemClientObject( int n ) const; | |
53925 | ||
53926 | virtual wxSize DoGetBestSize() const; | |
53927 | ||
53928 | ||
53929 | ||
53930 | virtual bool UseGTKStyleBase() const { return true; } | |
53931 | ||
53932 | private: | |
53933 | private: wxComboBox(const wxComboBox&); wxComboBox& operator=(const wxComboBox&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
53934 | private: static const wxEventTableEntry sm_eventTableEntries[]; protected: static const wxEventTable sm_eventTable; virtual const wxEventTable* GetEventTable() const; static wxEventHashTable sm_eventHashTable; virtual wxEventHashTable& GetEventHashTable() const; | |
53935 | }; | |
53936 | # 80 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/combobox.h" 2 | |
53937 | # 71 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
53938 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/layout.h" 1 | |
53939 | # 37 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/layout.h" | |
53940 | class wxWindowBase; | |
53941 | class wxLayoutConstraints; | |
53942 | ||
53943 | ||
53944 | ||
53945 | ||
53946 | ||
53947 | ||
53948 | ||
53949 | enum wxEdge | |
53950 | { | |
53951 | wxLeft, wxTop, wxRight, wxBottom, wxWidth, wxHeight, | |
53952 | wxCentre, wxCenter = wxCentre, wxCentreX, wxCentreY | |
53953 | }; | |
53954 | ||
53955 | enum wxRelationship | |
53956 | { | |
53957 | wxUnconstrained = 0, | |
53958 | wxAsIs, | |
53959 | wxPercentOf, | |
53960 | wxAbove, | |
53961 | wxBelow, | |
53962 | wxLeftOf, | |
53963 | wxRightOf, | |
53964 | wxSameAs, | |
53965 | wxAbsolute | |
53966 | }; | |
53967 | ||
53968 | ||
53969 | ||
53970 | ||
53971 | ||
53972 | class wxIndividualLayoutConstraint : public wxObject | |
53973 | { | |
53974 | public: | |
53975 | wxIndividualLayoutConstraint(); | |
53976 | ||
53977 | ||
53978 | ||
53979 | ~wxIndividualLayoutConstraint(){} | |
53980 | ||
53981 | void Set(wxRelationship rel, wxWindowBase *otherW, wxEdge otherE, int val = 0, int marg = 0); | |
53982 | ||
53983 | ||
53984 | ||
53985 | ||
53986 | void LeftOf(wxWindowBase *sibling, int marg = 0); | |
53987 | void RightOf(wxWindowBase *sibling, int marg = 0); | |
53988 | void Above(wxWindowBase *sibling, int marg = 0); | |
53989 | void Below(wxWindowBase *sibling, int marg = 0); | |
53990 | ||
53991 | ||
53992 | ||
53993 | ||
53994 | void SameAs(wxWindowBase *otherW, wxEdge edge, int marg = 0); | |
53995 | ||
53996 | ||
53997 | void PercentOf(wxWindowBase *otherW, wxEdge wh, int per); | |
53998 | ||
53999 | ||
54000 | ||
54001 | ||
54002 | void Absolute(int val); | |
54003 | ||
54004 | ||
54005 | ||
54006 | ||
54007 | void Unconstrained() { relationship = wxUnconstrained; } | |
54008 | ||
54009 | ||
54010 | ||
54011 | ||
54012 | void AsIs() { relationship = wxAsIs; } | |
54013 | ||
54014 | ||
54015 | ||
54016 | ||
54017 | wxWindowBase *GetOtherWindow() { return otherWin; } | |
54018 | wxEdge GetMyEdge() const { return myEdge; } | |
54019 | void SetEdge(wxEdge which) { myEdge = which; } | |
54020 | void SetValue(int v) { value = v; } | |
54021 | int GetMargin() { return margin; } | |
54022 | void SetMargin(int m) { margin = m; } | |
54023 | int GetValue() const { return value; } | |
54024 | int GetPercent() const { return percent; } | |
54025 | int GetOtherEdge() const { return otherEdge; } | |
54026 | bool GetDone() const { return done; } | |
54027 | void SetDone(bool d) { done = d; } | |
54028 | wxRelationship GetRelationship() { return relationship; } | |
54029 | void SetRelationship(wxRelationship r) { relationship = r; } | |
54030 | ||
54031 | ||
54032 | bool ResetIfWin(wxWindowBase *otherW); | |
54033 | ||
54034 | ||
54035 | bool SatisfyConstraint(wxLayoutConstraints *constraints, wxWindowBase *win); | |
54036 | ||
54037 | ||
54038 | ||
54039 | int GetEdge(wxEdge which, wxWindowBase *thisWin, wxWindowBase *other) const; | |
54040 | ||
54041 | protected: | |
54042 | ||
54043 | friend class wxIndividualLayoutConstraint_Serialize; | |
54044 | ||
54045 | ||
54046 | wxWindowBase *otherWin; | |
54047 | ||
54048 | wxEdge myEdge; | |
54049 | wxRelationship relationship; | |
54050 | int margin; | |
54051 | int value; | |
54052 | int percent; | |
54053 | wxEdge otherEdge; | |
54054 | bool done; | |
54055 | ||
54056 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
54057 | }; | |
54058 | ||
54059 | ||
54060 | ||
54061 | ||
54062 | ||
54063 | class wxLayoutConstraints : public wxObject | |
54064 | { | |
54065 | public: | |
54066 | ||
54067 | wxIndividualLayoutConstraint left; | |
54068 | wxIndividualLayoutConstraint top; | |
54069 | wxIndividualLayoutConstraint right; | |
54070 | wxIndividualLayoutConstraint bottom; | |
54071 | ||
54072 | wxIndividualLayoutConstraint width; | |
54073 | wxIndividualLayoutConstraint height; | |
54074 | ||
54075 | wxIndividualLayoutConstraint centreX; | |
54076 | wxIndividualLayoutConstraint centreY; | |
54077 | ||
54078 | wxLayoutConstraints(); | |
54079 | ||
54080 | ||
54081 | ||
54082 | ~wxLayoutConstraints(){} | |
54083 | ||
54084 | bool SatisfyConstraints(wxWindowBase *win, int *noChanges); | |
54085 | bool AreSatisfied() const | |
54086 | { | |
54087 | return left.GetDone() && top.GetDone() && | |
54088 | width.GetDone() && height.GetDone(); | |
54089 | } | |
54090 | ||
54091 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
54092 | }; | |
54093 | # 72 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
54094 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/sizer.h" 1 | |
54095 | # 25 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/sizer.h" | |
54096 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/bookctrl.h" 1 | |
54097 | # 30 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/bookctrl.h" | |
54098 | typedef wxWindow * _wxArraywxArrayPages; struct wxAssert_wxArrayPages { unsigned int TypeTooBigToBeStoredInwxBaseArrayPtrVoid: sizeof(_wxArraywxArrayPages) <= sizeof(wxBaseArrayPtrVoid::base_type); }; typedef int ( *CMPFUNC_wxArraywxArrayPages)(_wxArraywxArrayPages *pItem1, _wxArraywxArrayPages *pItem2); class wxArrayPages : public wxBaseArrayPtrVoid { public: wxArrayPages() { } ~wxArrayPages() { } wxArrayPages& operator=(const wxArrayPages& src) { wxBaseArrayPtrVoid* temp = (wxBaseArrayPtrVoid*) this; (*temp) = ((const wxBaseArrayPtrVoid&)src); return *this; } _wxArraywxArrayPages& operator[](size_t uiIndex) const { return (_wxArraywxArrayPages&)(wxBaseArrayPtrVoid::operator[](uiIndex)); } _wxArraywxArrayPages& Item(size_t uiIndex) const { return (_wxArraywxArrayPages&)(wxBaseArrayPtrVoid::operator[](uiIndex)); } _wxArraywxArrayPages& Last() const { return (_wxArraywxArrayPages&)(wxBaseArrayPtrVoid::operator[](Count() - 1)); } int Index(_wxArraywxArrayPages lItem, bool bFromEnd = false) const { return wxBaseArrayPtrVoid::Index((base_type)lItem, bFromEnd); } void Add(_wxArraywxArrayPages lItem, size_t nInsert = 1) { wxBaseArrayPtrVoid::Add((base_type)lItem, nInsert); } void Insert(_wxArraywxArrayPages lItem, size_t uiIndex, size_t nInsert = 1) { wxBaseArrayPtrVoid::Insert((base_type)lItem, uiIndex, nInsert) ; } void RemoveAt(size_t uiIndex, size_t nRemove = 1) { wxBaseArrayPtrVoid::RemoveAt(uiIndex, nRemove); } void Remove(_wxArraywxArrayPages lItem) { int iIndex = Index(lItem); if (!(iIndex != (-1))) {; return; }; wxBaseArrayPtrVoid::RemoveAt((size_t)iIndex); } void Sort(CMPFUNC_wxArraywxArrayPages fCmp) { wxBaseArrayPtrVoid::Sort((CMPFUNC)fCmp); } private: typedef wxBaseArrayPtrVoid::iterator biterator; typedef wxBaseArrayPtrVoid::const_iterator bconst_iterator; typedef wxBaseArrayPtrVoid::value_type bvalue_type; typedef wxBaseArrayPtrVoid::const_reference bconst_reference; public: typedef _wxArraywxArrayPages value_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type* iterator; typedef const value_type* const_iterator; typedef value_type& reference; typedef const value_type& const_reference; typedef wxBaseArrayPtrVoid::difference_type difference_type; typedef wxBaseArrayPtrVoid::size_type size_type; class reverse_iterator { typedef _wxArraywxArrayPages value_type; typedef value_type& reference; typedef value_type* pointer; typedef reverse_iterator itor; friend inline itor operator+(int o, const itor& it) { return it.m_ptr - o; } friend inline itor operator+(const itor& it, int o) { return it.m_ptr - o; } friend inline itor operator-(const itor& it, int o) { return it.m_ptr + o; } friend inline difference_type operator-(const itor& i1, const itor& i2) { return i1.m_ptr - i2.m_ptr; } public: pointer m_ptr; reverse_iterator() : m_ptr(__null) { } reverse_iterator(pointer ptr) : m_ptr(ptr) { } reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { } reference operator*() const { return *m_ptr; } itor& operator++() { --m_ptr; return *this; } const itor operator++(int) { reverse_iterator tmp = *this; --m_ptr; return tmp; } itor& operator--() { ++m_ptr; return *this; } const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; } bool operator ==(const itor& it) { return m_ptr == it.m_ptr; } bool operator !=(const itor& it) { return m_ptr != it.m_ptr; } }; class const_reverse_iterator { typedef _wxArraywxArrayPages value_type; typedef const value_type& reference; typedef const value_type* pointer; typedef const_reverse_iterator itor; friend inline itor operator+(int o, const itor& it) { return it.m_ptr - o; } friend inline itor operator+(const itor& it, int o) { return it.m_ptr - o; } friend inline itor operator-(const itor& it, int o) { return it.m_ptr + o; } friend inline difference_type operator-(const itor& i1, const itor& i2) { return i1.m_ptr - i2.m_ptr; } public: pointer m_ptr; const_reverse_iterator() : m_ptr(__null) { } const_reverse_iterator(pointer ptr) : m_ptr(ptr) { } const_reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { } const_reverse_iterator(const reverse_iterator& it) : m_ptr(it.m_ptr) { } reference operator*() const { return *m_ptr; } itor& operator++() { --m_ptr; return *this; } const itor operator++(int) { itor tmp = *this; --m_ptr; return tmp; } itor& operator--() { ++m_ptr; return *this; } const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; } bool operator ==(const itor& it) { return m_ptr == it.m_ptr; } bool operator !=(const itor& it) { return m_ptr != it.m_ptr; } }; wxArrayPages(size_type n, const_reference v) { assign(n, v); } wxArrayPages(const_iterator first, const_iterator last) { assign(first, last); } void assign(const_iterator first, const_iterator last) { wxBaseArrayPtrVoid::assign((bconst_iterator)first, (bconst_iterator)last); } void assign(size_type n, const_reference v) { wxBaseArrayPtrVoid::assign(n, (bconst_reference)v); } reference back() { return *(end() - 1); } const_reference back() const { return *(end() - 1); } iterator begin() { return (iterator)wxBaseArrayPtrVoid::begin(); } const_iterator begin() const { return (const_iterator)wxBaseArrayPtrVoid::begin(); } size_type capacity() const { return wxBaseArrayPtrVoid::capacity(); } iterator end() { return (iterator)wxBaseArrayPtrVoid::end(); } const_iterator end() const { return (const_iterator)wxBaseArrayPtrVoid::end(); } iterator erase(iterator first, iterator last) { return (iterator)wxBaseArrayPtrVoid::erase((biterator)first, (biterator)last); } iterator erase(iterator it) { return (iterator)wxBaseArrayPtrVoid::erase((biterator)it); } reference front() { return *begin(); } const_reference front() const { return *begin(); } void insert(iterator it, size_type n, const_reference v) { wxBaseArrayPtrVoid::insert((biterator)it, n, (bconst_reference)v); } iterator insert(iterator it, const_reference v = value_type()) { return (iterator)wxBaseArrayPtrVoid::insert((biterator)it, (bconst_reference)v); } void insert(iterator it, const_iterator first, const_iterator last) { wxBaseArrayPtrVoid::insert((biterator)it, (bconst_iterator)first, (bconst_iterator)last); } void pop_back() { wxBaseArrayPtrVoid::pop_back(); } void push_back(const_reference v) { wxBaseArrayPtrVoid::push_back((bconst_reference)v); } reverse_iterator rbegin() { return reverse_iterator(end() - 1); } const_reverse_iterator rbegin() const; reverse_iterator rend() { return reverse_iterator(begin() - 1); } const_reverse_iterator rend() const; void reserve(size_type n) { wxBaseArrayPtrVoid::reserve(n); }; void resize(size_type n, value_type v = value_type()); }; | |
54099 | ||
54100 | class wxImageList; | |
54101 | ||
54102 | ||
54103 | ||
54104 | ||
54105 | ||
54106 | class wxBookCtrlBase : public wxControl | |
54107 | { | |
54108 | public: | |
54109 | ||
54110 | ||
54111 | ||
54112 | wxBookCtrlBase() | |
54113 | { | |
54114 | Init(); | |
54115 | } | |
54116 | ||
54117 | wxBookCtrlBase(wxWindow *parent, | |
54118 | wxWindowID winid, | |
54119 | const wxPoint& pos = wxDefaultPosition, | |
54120 | const wxSize& size = wxDefaultSize, | |
54121 | long style = 0, | |
54122 | const wxString& name = wxEmptyString) | |
54123 | { | |
54124 | Init(); | |
54125 | ||
54126 | (void)Create(parent, winid, pos, size, style, name); | |
54127 | } | |
54128 | ||
54129 | ||
54130 | bool Create(wxWindow *parent, | |
54131 | wxWindowID winid, | |
54132 | const wxPoint& pos = wxDefaultPosition, | |
54133 | const wxSize& size = wxDefaultSize, | |
54134 | long style = 0, | |
54135 | const wxString& name = wxEmptyString); | |
54136 | ||
54137 | ||
54138 | virtual ~wxBookCtrlBase(); | |
54139 | ||
54140 | ||
54141 | ||
54142 | ||
54143 | ||
54144 | ||
54145 | virtual size_t GetPageCount() const { return m_pages.size(); } | |
54146 | ||
54147 | ||
54148 | virtual wxWindow *GetPage(size_t n) { return m_pages[n]; } | |
54149 | ||
54150 | ||
54151 | wxWindow *GetCurrentPage() const | |
54152 | { | |
54153 | int n = GetSelection(); | |
54154 | return n == (-1) ? __null | |
54155 | : const_cast<wxBookCtrlBase *>(this)->GetPage(n); | |
54156 | } | |
54157 | ||
54158 | ||
54159 | virtual int GetSelection() const = 0; | |
54160 | ||
54161 | ||
54162 | virtual bool SetPageText(size_t n, const wxString& strText) = 0; | |
54163 | virtual wxString GetPageText(size_t n) const = 0; | |
54164 | ||
54165 | ||
54166 | ||
54167 | ||
54168 | ||
54169 | ||
54170 | ||
54171 | virtual void SetImageList(wxImageList *imageList); | |
54172 | ||
54173 | ||
54174 | void AssignImageList(wxImageList *imageList); | |
54175 | ||
54176 | ||
54177 | wxImageList* GetImageList() const { return m_imageList; } | |
54178 | ||
54179 | ||
54180 | virtual int GetPageImage(size_t n) const = 0; | |
54181 | virtual bool SetPageImage(size_t n, int imageId) = 0; | |
54182 | ||
54183 | ||
54184 | ||
54185 | ||
54186 | ||
54187 | ||
54188 | virtual void SetPageSize(const wxSize& size); | |
54189 | ||
54190 | ||
54191 | virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const = 0; | |
54192 | ||
54193 | ||
54194 | ||
54195 | ||
54196 | ||
54197 | ||
54198 | virtual bool DeletePage(size_t n); | |
54199 | ||
54200 | ||
54201 | virtual bool RemovePage(size_t n) | |
54202 | { | |
54203 | InvalidateBestSize(); | |
54204 | return DoRemovePage(n) != __null; | |
54205 | } | |
54206 | ||
54207 | ||
54208 | virtual bool DeleteAllPages() | |
54209 | { | |
54210 | InvalidateBestSize(); | |
54211 | { size_t count = (m_pages).size(); for ( size_t n = 0; n < count; n++ ) { delete (m_pages)[n]; } (m_pages).clear(); }; | |
54212 | return true; | |
54213 | } | |
54214 | ||
54215 | ||
54216 | virtual bool AddPage(wxWindow *page, | |
54217 | const wxString& text, | |
54218 | bool bSelect = false, | |
54219 | int imageId = -1) | |
54220 | { | |
54221 | InvalidateBestSize(); | |
54222 | return InsertPage(GetPageCount(), page, text, bSelect, imageId); | |
54223 | } | |
54224 | ||
54225 | ||
54226 | virtual bool InsertPage(size_t n, | |
54227 | wxWindow *page, | |
54228 | const wxString& text, | |
54229 | bool bSelect = false, | |
54230 | int imageId = -1) = 0; | |
54231 | ||
54232 | ||
54233 | ||
54234 | ||
54235 | ||
54236 | virtual int SetSelection(size_t n) = 0; | |
54237 | ||
54238 | ||
54239 | ||
54240 | void AdvanceSelection(bool forward = true) | |
54241 | { | |
54242 | int nPage = GetNextPage(forward); | |
54243 | if ( nPage != -1 ) | |
54244 | { | |
54245 | ||
54246 | SetSelection((size_t)nPage); | |
54247 | } | |
54248 | } | |
54249 | ||
54250 | protected: | |
54251 | ||
54252 | virtual wxWindow *DoRemovePage(size_t page) = 0; | |
54253 | ||
54254 | ||
54255 | virtual wxSize DoGetBestSize() const; | |
54256 | ||
54257 | ||
54258 | int GetNextPage(bool forward) const; | |
54259 | ||
54260 | ||
54261 | void Init(); | |
54262 | ||
54263 | ||
54264 | virtual void SetInitialBestSize(const wxSize& ) { } | |
54265 | ||
54266 | ||
54267 | wxArrayPages m_pages; | |
54268 | ||
54269 | ||
54270 | wxImageList *m_imageList; | |
54271 | ||
54272 | ||
54273 | bool m_ownsImageList; | |
54274 | ||
54275 | ||
54276 | private: wxBookCtrlBase(const wxBookCtrlBase&); wxBookCtrlBase& operator=(const wxBookCtrlBase&); | |
54277 | }; | |
54278 | ||
54279 | ||
54280 | ||
54281 | ||
54282 | ||
54283 | class wxBookCtrlBaseEvent : public wxNotifyEvent | |
54284 | { | |
54285 | public: | |
54286 | wxBookCtrlBaseEvent(wxEventType commandType = wxEVT_NULL, int winid = 0, | |
54287 | int nSel = -1, int nOldSel = -1) | |
54288 | : wxNotifyEvent(commandType, winid) | |
54289 | { | |
54290 | m_nSel = nSel; | |
54291 | m_nOldSel = nOldSel; | |
54292 | } | |
54293 | ||
54294 | ||
54295 | ||
54296 | int GetSelection() const { return m_nSel; } | |
54297 | void SetSelection(int nSel) { m_nSel = nSel; } | |
54298 | ||
54299 | int GetOldSelection() const { return m_nOldSel; } | |
54300 | void SetOldSelection(int nOldSel) { m_nOldSel = nOldSel; } | |
54301 | ||
54302 | private: | |
54303 | int m_nSel, | |
54304 | m_nOldSel; | |
54305 | }; | |
54306 | ||
54307 | ||
54308 | ||
54309 | ||
54310 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/notebook.h" 1 | |
54311 | # 27 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/notebook.h" | |
54312 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/bookctrl.h" 1 | |
54313 | # 28 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/notebook.h" 2 | |
54314 | ||
54315 | ||
54316 | ||
54317 | ||
54318 | ||
54319 | ||
54320 | enum | |
54321 | { | |
54322 | wxNB_HITTEST_NOWHERE = 1, | |
54323 | wxNB_HITTEST_ONICON = 2, | |
54324 | wxNB_HITTEST_ONLABEL = 4, | |
54325 | wxNB_HITTEST_ONITEM = wxNB_HITTEST_ONICON | wxNB_HITTEST_ONLABEL | |
54326 | }; | |
54327 | ||
54328 | typedef wxWindow wxNotebookPage; | |
54329 | ||
54330 | extern const wxChar* wxNotebookNameStr; | |
54331 | # 54 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/notebook.h" | |
54332 | class wxNotebookBase : public wxBookCtrlBase | |
54333 | { | |
54334 | public: | |
54335 | ||
54336 | ||
54337 | ||
54338 | wxNotebookBase() { } | |
54339 | ||
54340 | wxNotebookBase(wxWindow *parent, | |
54341 | wxWindowID winid, | |
54342 | const wxPoint& pos = wxDefaultPosition, | |
54343 | const wxSize& size = wxDefaultSize, | |
54344 | long style = 0, | |
54345 | const wxString& name = wxNotebookNameStr) ; | |
54346 | ||
54347 | ||
54348 | ||
54349 | ||
54350 | ||
54351 | ||
54352 | virtual int GetRowCount() const { return 1; } | |
54353 | ||
54354 | ||
54355 | virtual void SetPadding(const wxSize& padding) = 0; | |
54356 | ||
54357 | ||
54358 | virtual void SetTabSize(const wxSize& sz) = 0; | |
54359 | ||
54360 | ||
54361 | ||
54362 | virtual int HitTest(const wxPoint& , | |
54363 | long * = __null) const | |
54364 | { | |
54365 | return (-1); | |
54366 | } | |
54367 | ||
54368 | ||
54369 | ||
54370 | virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const; | |
54371 | ||
54372 | ||
54373 | virtual wxColour GetThemeBackgroundColour() const { return wxNullColour; } | |
54374 | ||
54375 | ||
54376 | ||
54377 | ||
54378 | virtual void ReservedNotebookFunc1() {} | |
54379 | virtual void ReservedNotebookFunc2() {} | |
54380 | virtual void ReservedNotebookFunc3() {} | |
54381 | virtual void ReservedNotebookFunc4() {} | |
54382 | virtual void ReservedNotebookFunc5() {} | |
54383 | ||
54384 | ||
54385 | protected: | |
54386 | private: wxNotebookBase(const wxNotebookBase&); wxNotebookBase& operator=(const wxNotebookBase&); | |
54387 | }; | |
54388 | ||
54389 | ||
54390 | ||
54391 | ||
54392 | ||
54393 | class wxNotebookEvent : public wxBookCtrlBaseEvent | |
54394 | { | |
54395 | public: | |
54396 | wxNotebookEvent(wxEventType commandType = wxEVT_NULL, int winid = 0, | |
54397 | int nSel = -1, int nOldSel = -1) | |
54398 | : wxBookCtrlBaseEvent(commandType, winid, nSel, nOldSel) | |
54399 | { | |
54400 | } | |
54401 | ||
54402 | private: | |
54403 | private: wxNotebookEvent(const wxNotebookEvent&); wxNotebookEvent& operator=(const wxNotebookEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
54404 | }; | |
54405 | ||
54406 | ||
54407 | extern const wxEventType wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED; | |
54408 | extern const wxEventType wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING; | |
54409 | ||
54410 | ||
54411 | typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&); | |
54412 | # 155 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/notebook.h" | |
54413 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/notebook.h" 1 | |
54414 | # 22 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/notebook.h" | |
54415 | class wxGtkNotebookPage; | |
54416 | ||
54417 | ||
54418 | typedef wxGtkNotebookPage _WX_LIST_ITEM_TYPE_wxGtkNotebookPagesList; typedef int (*wxSortFuncFor_wxGtkNotebookPagesList)(const wxGtkNotebookPage **, const wxGtkNotebookPage **); class wxwxGtkNotebookPagesListNode : public wxNodeBase { public: wxwxGtkNotebookPagesListNode(wxListBase *list = (wxListBase *)__null, wxwxGtkNotebookPagesListNode *previous = (wxwxGtkNotebookPagesListNode *)__null, wxwxGtkNotebookPagesListNode *next = (wxwxGtkNotebookPagesListNode *)__null, wxGtkNotebookPage *data = (wxGtkNotebookPage *)__null, const wxListKey& key = wxDefaultListKey) : wxNodeBase(list, previous, next, data, key) { } wxwxGtkNotebookPagesListNode *GetNext() const { return (wxwxGtkNotebookPagesListNode *)wxNodeBase::GetNext(); } wxwxGtkNotebookPagesListNode *GetPrevious() const { return (wxwxGtkNotebookPagesListNode *)wxNodeBase::GetPrevious(); } wxGtkNotebookPage *GetData() const { return (wxGtkNotebookPage *)wxNodeBase::GetData(); } void SetData(wxGtkNotebookPage *data) { wxNodeBase::SetData(data); } protected: virtual void DeleteData(); private: wxwxGtkNotebookPagesListNode(const wxwxGtkNotebookPagesListNode&); wxwxGtkNotebookPagesListNode& operator=(const wxwxGtkNotebookPagesListNode&); }; class wxGtkNotebookPagesList : public wxListBase { public: typedef wxwxGtkNotebookPagesListNode Node; typedef Node* compatibility_iterator; wxGtkNotebookPagesList(wxKeyType keyType = wxKEY_NONE) : wxListBase(keyType) { } wxGtkNotebookPagesList(const wxGtkNotebookPagesList& list) : wxListBase(list.GetKeyType()) { Assign(list); } wxGtkNotebookPagesList(size_t count, wxGtkNotebookPage *elements[]) : wxListBase(count, (void **)elements) { } wxGtkNotebookPagesList& operator=(const wxGtkNotebookPagesList& list) { Assign(list); return *this; } wxwxGtkNotebookPagesListNode *GetFirst() const { return (wxwxGtkNotebookPagesListNode *)wxListBase::GetFirst(); } wxwxGtkNotebookPagesListNode *GetLast() const { return (wxwxGtkNotebookPagesListNode *)wxListBase::GetLast(); } wxwxGtkNotebookPagesListNode *Item(size_t index) const { return (wxwxGtkNotebookPagesListNode *)wxListBase::Item(index); } wxGtkNotebookPage *operator[](size_t index) const { wxwxGtkNotebookPagesListNode *node = Item(index); return node ? (wxGtkNotebookPage*)(node->GetData()) : (wxGtkNotebookPage*)__null; } wxwxGtkNotebookPagesListNode *Append(wxGtkNotebookPage *object) { return (wxwxGtkNotebookPagesListNode *)wxListBase::Append(object); } wxwxGtkNotebookPagesListNode *Insert(wxGtkNotebookPage *object) { return (wxwxGtkNotebookPagesListNode *)Insert((wxwxGtkNotebookPagesListNode*)__null, object); } wxwxGtkNotebookPagesListNode *Insert(size_t pos, wxGtkNotebookPage *object) { return (wxwxGtkNotebookPagesListNode *)wxListBase::Insert(pos, object); } wxwxGtkNotebookPagesListNode *Insert(wxwxGtkNotebookPagesListNode *prev, wxGtkNotebookPage *object) { return (wxwxGtkNotebookPagesListNode *)wxListBase::Insert(prev, object); } wxwxGtkNotebookPagesListNode *Append(long key, void *object) { return (wxwxGtkNotebookPagesListNode *)wxListBase::Append(key, object); } wxwxGtkNotebookPagesListNode *Append(const wxChar *key, void *object) { return (wxwxGtkNotebookPagesListNode *)wxListBase::Append(key, object); } wxwxGtkNotebookPagesListNode *DetachNode(wxwxGtkNotebookPagesListNode *node) { return (wxwxGtkNotebookPagesListNode *)wxListBase::DetachNode(node); } bool DeleteNode(wxwxGtkNotebookPagesListNode *node) { return wxListBase::DeleteNode(node); } bool DeleteObject(wxGtkNotebookPage *object) { return wxListBase::DeleteObject(object); } void Erase(compatibility_iterator it) { DeleteNode(it); } wxwxGtkNotebookPagesListNode *Find(const wxGtkNotebookPage *object) const { return (wxwxGtkNotebookPagesListNode *)wxListBase::Find(object); } virtual wxwxGtkNotebookPagesListNode *Find(const wxListKey& key) const { return (wxwxGtkNotebookPagesListNode *)wxListBase::Find(key); } int IndexOf(wxGtkNotebookPage *object) const { return wxListBase::IndexOf(object); } void Sort(wxSortCompareFunction func) { wxListBase::Sort(func); } void Sort(wxSortFuncFor_wxGtkNotebookPagesList func) { Sort((wxSortCompareFunction)func); } protected: virtual wxNodeBase *CreateNode(wxNodeBase *prev, wxNodeBase *next, void *data, const wxListKey& key = wxDefaultListKey) { return new wxwxGtkNotebookPagesListNode(this, (wxwxGtkNotebookPagesListNode *)prev, (wxwxGtkNotebookPagesListNode *)next, (wxGtkNotebookPage *)data, key); } public: typedef size_t size_type; typedef int difference_type; typedef wxGtkNotebookPage* value_type; typedef wxGtkNotebookPage* base_value_type; typedef value_type& reference; typedef const value_type& const_reference; typedef base_value_type& base_reference; typedef const base_value_type& const_base_reference; class iterator { typedef wxGtkNotebookPagesList list; public: typedef wxwxGtkNotebookPagesListNode Node; typedef iterator itor; typedef wxGtkNotebookPage* value_type; typedef value_type* ptr_type; typedef value_type& reference; Node* m_node; Node* m_init; public: typedef reference reference_type; typedef ptr_type pointer_type; iterator(Node* node, Node* init) : m_node(node), m_init(init) {} iterator() : m_node(__null), m_init(__null) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetNext(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetNext(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetPrevious() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetPrevious() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class const_iterator { typedef wxGtkNotebookPagesList list; public: typedef wxwxGtkNotebookPagesListNode Node; typedef wxGtkNotebookPage* value_type; typedef const value_type& const_reference; typedef const_iterator itor; typedef value_type* ptr_type; Node* m_node; Node* m_init; public: typedef const_reference reference_type; typedef const ptr_type pointer_type; const_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } const_iterator() : m_node(__null), m_init(__null) { } const_iterator(const iterator& it) : m_node(it.m_node), m_init(it.m_init) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetNext(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetNext(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetPrevious() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetPrevious() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class reverse_iterator { typedef wxGtkNotebookPagesList list; public: typedef wxwxGtkNotebookPagesListNode Node; typedef wxGtkNotebookPage* value_type; typedef reverse_iterator itor; typedef value_type* ptr_type; typedef value_type& reference; Node* m_node; Node* m_init; public: typedef reference reference_type; typedef ptr_type pointer_type; reverse_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } reverse_iterator() : m_node(__null), m_init(__null) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetPrevious(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetPrevious(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetNext() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetNext() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class const_reverse_iterator { typedef wxGtkNotebookPagesList list; public: typedef wxwxGtkNotebookPagesListNode Node; typedef wxGtkNotebookPage* value_type; typedef const_reverse_iterator itor; typedef value_type* ptr_type; typedef const value_type& const_reference; Node* m_node; Node* m_init; public: typedef const_reference reference_type; typedef const ptr_type pointer_type; const_reverse_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } const_reverse_iterator() : m_node(__null), m_init(__null) { } const_reverse_iterator(const reverse_iterator& it) : m_node(it.m_node), m_init(it.m_init) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetPrevious(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetPrevious(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetNext() : m_init; return *this;} const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetNext() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; explicit wxGtkNotebookPagesList(size_type n, const_reference v = value_type()) { assign(n, v); } wxGtkNotebookPagesList(const const_iterator& first, const const_iterator& last) { assign(first, last); } iterator begin() { return iterator(GetFirst(), GetLast()); } const_iterator begin() const { return const_iterator(GetFirst(), GetLast()); } iterator end() { return iterator(__null, GetLast()); } const_iterator end() const { return const_iterator(__null, GetLast()); } reverse_iterator rbegin() { return reverse_iterator(GetLast(), GetFirst()); } const_reverse_iterator rbegin() const { return const_reverse_iterator(GetLast(), GetFirst()); } reverse_iterator rend() { return reverse_iterator(__null, GetFirst()); } const_reverse_iterator rend() const { return const_reverse_iterator(__null, GetFirst()); } void resize(size_type n, value_type v = value_type()) { while (n < size()) pop_back(); while (n > size()) push_back(v); } size_type size() const { return GetCount(); } size_type max_size() const { return 2147483647; } bool empty() const { return IsEmpty(); } reference front() { return *begin(); } const_reference front() const { return *begin(); } reference back() { iterator tmp = end(); return *--tmp; } const_reference back() const { const_iterator tmp = end(); return *--tmp; } void push_front(const_reference v = value_type()) { Insert(GetFirst(), (const_base_reference)v); } void pop_front() { DeleteNode(GetFirst()); } void push_back(const_reference v = value_type()) { Append((const_base_reference)v); } void pop_back() { DeleteNode(GetLast()); } void assign(const_iterator first, const const_iterator& last) { clear(); for(; first != last; ++first) Append((const_base_reference)*first); } void assign(size_type n, const_reference v = value_type()) { clear(); for(size_type i = 0; i < n; ++i) Append((const_base_reference)v); } iterator insert(const iterator& it, const_reference v = value_type()) { Insert(it.m_node, (const_base_reference)v); return iterator(it.m_node->GetPrevious(), GetLast()); } void insert(const iterator& it, size_type n, const_reference v = value_type()) { for(size_type i = 0; i < n; ++i) Insert(it.m_node, (const_base_reference)v); } void insert(const iterator& it, const_iterator first, const const_iterator& last) { for(; first != last; ++first) Insert(it.m_node, (const_base_reference)*first); } iterator erase(const iterator& it) { iterator next = iterator(it.m_node->GetNext(), GetLast()); DeleteNode(it.m_node); return next; } iterator erase(const iterator& first, const iterator& last) { iterator next = last; ++next; DeleteNodes(first.m_node, last.m_node); return next; } void clear() { Clear(); } void splice(const iterator& it, wxGtkNotebookPagesList& l, const iterator& first, const iterator& last) { insert(it, first, last); l.erase(first, last); } void splice(const iterator& it, wxGtkNotebookPagesList& l) { splice(it, l, l.begin(), l.end() ); } void splice(const iterator& it, wxGtkNotebookPagesList& l, const iterator& first) { iterator tmp = first; ++tmp; if(it == first || it == tmp) return; insert(it, *first); l.erase(first); } void remove(const_reference v) { DeleteObject((const_base_reference)v); } void reverse() { Reverse(); } }; | |
54419 | ||
54420 | ||
54421 | ||
54422 | ||
54423 | ||
54424 | class wxNotebook : public wxNotebookBase | |
54425 | { | |
54426 | public: | |
54427 | ||
54428 | wxNotebook(); | |
54429 | ||
54430 | wxNotebook(wxWindow *parent, | |
54431 | wxWindowID id, | |
54432 | const wxPoint& pos = wxDefaultPosition, | |
54433 | const wxSize& size = wxDefaultSize, | |
54434 | long style = 0, | |
54435 | const wxString& name = wxNotebookNameStr); | |
54436 | ||
54437 | bool Create(wxWindow *parent, | |
54438 | wxWindowID id, | |
54439 | const wxPoint& pos = wxDefaultPosition, | |
54440 | const wxSize& size = wxDefaultSize, | |
54441 | long style = 0, | |
54442 | const wxString& name = wxNotebookNameStr); | |
54443 | ||
54444 | virtual ~wxNotebook(); | |
54445 | ||
54446 | ||
54447 | ||
54448 | ||
54449 | ||
54450 | ||
54451 | ||
54452 | int SetSelection(size_t nPage); | |
54453 | ||
54454 | int GetSelection() const; | |
54455 | ||
54456 | ||
54457 | bool SetPageText(size_t nPage, const wxString& strText); | |
54458 | wxString GetPageText(size_t nPage) const; | |
54459 | ||
54460 | ||
54461 | int GetPageImage(size_t nPage) const; | |
54462 | bool SetPageImage(size_t nPage, int nImage); | |
54463 | ||
54464 | ||
54465 | ||
54466 | void SetPageSize(const wxSize& size); | |
54467 | ||
54468 | void SetPadding(const wxSize& padding); | |
54469 | ||
54470 | void SetTabSize(const wxSize& sz); | |
54471 | ||
54472 | virtual int HitTest(const wxPoint& pt, long *flags = __null) const; | |
54473 | ||
54474 | ||
54475 | ||
54476 | ||
54477 | bool DeleteAllPages(); | |
54478 | ||
54479 | ||
54480 | ||
54481 | ||
54482 | bool InsertPage( size_t position, | |
54483 | wxNotebookPage *win, | |
54484 | const wxString& strText, | |
54485 | bool bSelect = false, | |
54486 | int imageId = -1 ); | |
54487 | ||
54488 | ||
54489 | ||
54490 | void OnNavigationKey(wxNavigationKeyEvent& event); | |
54491 | ||
54492 | ||
54493 | static wxVisualAttributes | |
54494 | GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); | |
54495 | ||
54496 | ||
54497 | ||
54498 | ||
54499 | ||
54500 | void SetConstraintSizes(bool recurse); | |
54501 | bool DoPhase(int phase); | |
54502 | ||
54503 | ||
54504 | ||
54505 | void DoApplyWidgetStyle(GtkRcStyle *style); | |
54506 | ||
54507 | ||
54508 | bool IsOwnGtkWindow( GdkWindow *window ); | |
54509 | ||
54510 | ||
54511 | void Init(); | |
54512 | ||
54513 | ||
54514 | wxGtkNotebookPage* GetNotebookPage(int page) const; | |
54515 | ||
54516 | ||
54517 | wxGtkNotebookPagesList m_pagesData; | |
54518 | ||
54519 | ||
54520 | ||
54521 | int m_selection; | |
54522 | ||
54523 | ||
54524 | bool m_inSwitchPage; | |
54525 | ||
54526 | protected: | |
54527 | ||
54528 | virtual wxNotebookPage *DoRemovePage(size_t nPage); | |
54529 | ||
54530 | private: | |
54531 | ||
54532 | int m_padding; | |
54533 | ||
54534 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
54535 | private: static const wxEventTableEntry sm_eventTableEntries[]; protected: static const wxEventTable sm_eventTable; virtual const wxEventTable* GetEventTable() const; static wxEventHashTable sm_eventHashTable; virtual wxEventHashTable& GetEventHashTable() const; | |
54536 | }; | |
54537 | # 156 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/notebook.h" 2 | |
54538 | # 243 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/bookctrl.h" 2 | |
54539 | # 26 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/sizer.h" 2 | |
54540 | ||
54541 | ||
54542 | ||
54543 | ||
54544 | ||
54545 | class wxSizerItem; | |
54546 | class wxSizer; | |
54547 | class wxBoxSizer; | |
54548 | ||
54549 | ||
54550 | ||
54551 | ||
54552 | ||
54553 | ||
54554 | class wxSizerFlags | |
54555 | { | |
54556 | public: | |
54557 | ||
54558 | ||
54559 | wxSizerFlags(int proportion = 0) : m_proportion(proportion) | |
54560 | { | |
54561 | m_flags = 0; | |
54562 | m_borderInPixels = 0; | |
54563 | } | |
54564 | ||
54565 | ||
54566 | ||
54567 | ||
54568 | wxSizerFlags& Proportion(int proportion) | |
54569 | { | |
54570 | m_proportion = proportion; | |
54571 | return *this; | |
54572 | } | |
54573 | ||
54574 | wxSizerFlags& Align(int alignment) | |
54575 | { | |
54576 | m_flags &= wxALL; | |
54577 | m_flags |= alignment; | |
54578 | ||
54579 | return *this; | |
54580 | } | |
54581 | ||
54582 | ||
54583 | wxSizerFlags& Expand() { return Align(wxEXPAND); } | |
54584 | wxSizerFlags& Centre() { return Align(wxCENTRE); } | |
54585 | wxSizerFlags& Center() { return Centre(); } | |
54586 | wxSizerFlags& Left() { return Align(wxALIGN_LEFT); } | |
54587 | wxSizerFlags& Right() { return Align(wxALIGN_RIGHT); } | |
54588 | ||
54589 | ||
54590 | wxSizerFlags& Border(int direction, int borderInPixels) | |
54591 | { | |
54592 | m_flags &= ~wxALL; | |
54593 | m_flags |= direction; | |
54594 | ||
54595 | m_borderInPixels = borderInPixels; | |
54596 | ||
54597 | return *this; | |
54598 | } | |
54599 | ||
54600 | wxSizerFlags& Border(int direction = wxALL) | |
54601 | { | |
54602 | ||
54603 | return Border(direction, 5); | |
54604 | } | |
54605 | ||
54606 | ||
54607 | ||
54608 | int GetProportion() const { return m_proportion; } | |
54609 | int GetFlags() const { return m_flags; } | |
54610 | int GetBorderInPixels() const { return m_borderInPixels; } | |
54611 | ||
54612 | private: | |
54613 | int m_proportion; | |
54614 | int m_flags; | |
54615 | int m_borderInPixels; | |
54616 | }; | |
54617 | ||
54618 | ||
54619 | ||
54620 | ||
54621 | ||
54622 | ||
54623 | class wxSizerSpacer | |
54624 | { | |
54625 | public: | |
54626 | wxSizerSpacer(const wxSize& size) : m_size(size), m_isShown(true) { } | |
54627 | ||
54628 | void SetSize(const wxSize& size) { m_size = size; } | |
54629 | const wxSize& GetSize() const { return m_size; } | |
54630 | ||
54631 | void Show(bool show) { m_isShown = show; } | |
54632 | bool IsShown() const { return m_isShown; } | |
54633 | ||
54634 | private: | |
54635 | ||
54636 | wxSize m_size; | |
54637 | ||
54638 | ||
54639 | bool m_isShown; | |
54640 | }; | |
54641 | ||
54642 | ||
54643 | ||
54644 | ||
54645 | ||
54646 | class wxSizerItem : public wxObject | |
54647 | { | |
54648 | public: | |
54649 | ||
54650 | wxSizerItem( wxWindow *window, | |
54651 | int proportion, | |
54652 | int flag, | |
54653 | int border, | |
54654 | wxObject* userData ); | |
54655 | ||
54656 | ||
54657 | wxSizerItem(wxWindow *window, const wxSizerFlags& flags) | |
54658 | { | |
54659 | Init(flags); | |
54660 | ||
54661 | SetWindow(window); | |
54662 | } | |
54663 | ||
54664 | ||
54665 | wxSizerItem( wxSizer *sizer, | |
54666 | int proportion, | |
54667 | int flag, | |
54668 | int border, | |
54669 | wxObject* userData ); | |
54670 | ||
54671 | ||
54672 | wxSizerItem(wxSizer *sizer, const wxSizerFlags& flags) | |
54673 | { | |
54674 | Init(flags); | |
54675 | ||
54676 | SetSizer(sizer); | |
54677 | } | |
54678 | ||
54679 | ||
54680 | wxSizerItem( int width, | |
54681 | int height, | |
54682 | int proportion, | |
54683 | int flag, | |
54684 | int border, | |
54685 | wxObject* userData); | |
54686 | ||
54687 | ||
54688 | wxSizerItem(int width, int height, const wxSizerFlags& flags) | |
54689 | { | |
54690 | Init(flags); | |
54691 | ||
54692 | SetSpacer(width, height); | |
54693 | } | |
54694 | ||
54695 | wxSizerItem(); | |
54696 | virtual ~wxSizerItem(); | |
54697 | ||
54698 | virtual void DeleteWindows(); | |
54699 | ||
54700 | ||
54701 | void DetachSizer() { m_sizer = __null; } | |
54702 | ||
54703 | virtual wxSize GetSize() const; | |
54704 | virtual wxSize CalcMin(); | |
54705 | virtual void SetDimension( wxPoint pos, wxSize size ); | |
54706 | ||
54707 | wxSize GetMinSize() const | |
54708 | { return m_minSize; } | |
54709 | wxSize GetMinSizeWithBorder() const; | |
54710 | ||
54711 | void SetMinSize(const wxSize& size) | |
54712 | { | |
54713 | if ( IsWindow() ) | |
54714 | m_window->SetMinSize(size); | |
54715 | m_minSize = size; | |
54716 | } | |
54717 | void SetMinSize( int x, int y ) | |
54718 | { SetMinSize(wxSize(x, y)); } | |
54719 | void SetInitSize( int x, int y ) | |
54720 | { SetMinSize(wxSize(x, y)); } | |
54721 | ||
54722 | ||
54723 | ||
54724 | void SetRatio(int width, int height) | |
54725 | { m_ratio = (width && height) ? ((float) width / (float) height) : 1; } | |
54726 | void SetRatio(const wxSize& size) | |
54727 | { SetRatio(size.x, size.y); } | |
54728 | void SetRatio(float ratio) | |
54729 | { m_ratio = ratio; } | |
54730 | float GetRatio() const | |
54731 | { return m_ratio; } | |
54732 | ||
54733 | virtual wxRect GetRect() { return m_rect; } | |
54734 | ||
54735 | bool IsWindow() const { return m_kind == Item_Window; } | |
54736 | bool IsSizer() const { return m_kind == Item_Sizer; } | |
54737 | bool IsSpacer() const { return m_kind == Item_Spacer; } | |
54738 | ||
54739 | ||
54740 | void SetOption( int option ) __attribute__ ((deprecated)); | |
54741 | int GetOption() const __attribute__ ((deprecated)); | |
54742 | ||
54743 | void SetProportion( int proportion ) | |
54744 | { m_proportion = proportion; } | |
54745 | int GetProportion() const | |
54746 | { return m_proportion; } | |
54747 | void SetFlag( int flag ) | |
54748 | { m_flag = flag; } | |
54749 | int GetFlag() const | |
54750 | { return m_flag; } | |
54751 | void SetBorder( int border ) | |
54752 | { m_border = border; } | |
54753 | int GetBorder() const | |
54754 | { return m_border; } | |
54755 | ||
54756 | wxWindow *GetWindow() const | |
54757 | { return m_kind == Item_Window ? m_window : __null; } | |
54758 | wxSizer *GetSizer() const | |
54759 | { return m_kind == Item_Sizer ? m_sizer : __null; } | |
54760 | wxSize GetSpacer() const; | |
54761 | ||
54762 | void Show(bool show); | |
54763 | bool IsShown() const; | |
54764 | ||
54765 | ||
54766 | void SetUserData(wxObject* userData) | |
54767 | { delete m_userData; m_userData = userData; } | |
54768 | ||
54769 | wxObject* GetUserData() const | |
54770 | { return m_userData; } | |
54771 | wxPoint GetPosition() const | |
54772 | { return m_pos; } | |
54773 | ||
54774 | ||
54775 | ||
54776 | void SetWindow(wxWindow *window); | |
54777 | void SetSizer(wxSizer *sizer); | |
54778 | void SetSpacer(const wxSize& size); | |
54779 | void SetSpacer(int width, int height) { SetSpacer(wxSize(width, height)); } | |
54780 | ||
54781 | protected: | |
54782 | ||
54783 | void Init() { m_userData = __null; } | |
54784 | ||
54785 | ||
54786 | void Init(const wxSizerFlags& flags); | |
54787 | ||
54788 | enum | |
54789 | { | |
54790 | Item_None, | |
54791 | Item_Window, | |
54792 | Item_Sizer, | |
54793 | Item_Spacer, | |
54794 | Item_Max | |
54795 | } m_kind; | |
54796 | union | |
54797 | { | |
54798 | wxWindow *m_window; | |
54799 | wxSizer *m_sizer; | |
54800 | wxSizerSpacer *m_spacer; | |
54801 | }; | |
54802 | ||
54803 | wxPoint m_pos; | |
54804 | wxSize m_minSize; | |
54805 | int m_proportion; | |
54806 | int m_border; | |
54807 | int m_flag; | |
54808 | ||
54809 | ||
54810 | wxRect m_rect; | |
54811 | ||
54812 | ||
54813 | ||
54814 | ||
54815 | float m_ratio; | |
54816 | ||
54817 | wxObject *m_userData; | |
54818 | ||
54819 | private: | |
54820 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
54821 | private: wxSizerItem(const wxSizerItem&); wxSizerItem& operator=(const wxSizerItem&); | |
54822 | }; | |
54823 | ||
54824 | typedef wxSizerItem _WX_LIST_ITEM_TYPE_wxSizerItemList; typedef int (*wxSortFuncFor_wxSizerItemList)(const wxSizerItem **, const wxSizerItem **); class wxwxSizerItemListNode : public wxNodeBase { public: wxwxSizerItemListNode(wxListBase *list = (wxListBase *)__null, wxwxSizerItemListNode *previous = (wxwxSizerItemListNode *)__null, wxwxSizerItemListNode *next = (wxwxSizerItemListNode *)__null, wxSizerItem *data = (wxSizerItem *)__null, const wxListKey& key = wxDefaultListKey) : wxNodeBase(list, previous, next, data, key) { } wxwxSizerItemListNode *GetNext() const { return (wxwxSizerItemListNode *)wxNodeBase::GetNext(); } wxwxSizerItemListNode *GetPrevious() const { return (wxwxSizerItemListNode *)wxNodeBase::GetPrevious(); } wxSizerItem *GetData() const { return (wxSizerItem *)wxNodeBase::GetData(); } void SetData(wxSizerItem *data) { wxNodeBase::SetData(data); } protected: virtual void DeleteData(); private: wxwxSizerItemListNode(const wxwxSizerItemListNode&); wxwxSizerItemListNode& operator=(const wxwxSizerItemListNode&); }; class wxSizerItemList : public wxListBase { public: typedef wxwxSizerItemListNode Node; typedef Node* compatibility_iterator; wxSizerItemList(wxKeyType keyType = wxKEY_NONE) : wxListBase(keyType) { } wxSizerItemList(const wxSizerItemList& list) : wxListBase(list.GetKeyType()) { Assign(list); } wxSizerItemList(size_t count, wxSizerItem *elements[]) : wxListBase(count, (void **)elements) { } wxSizerItemList& operator=(const wxSizerItemList& list) { Assign(list); return *this; } wxwxSizerItemListNode *GetFirst() const { return (wxwxSizerItemListNode *)wxListBase::GetFirst(); } wxwxSizerItemListNode *GetLast() const { return (wxwxSizerItemListNode *)wxListBase::GetLast(); } wxwxSizerItemListNode *Item(size_t index) const { return (wxwxSizerItemListNode *)wxListBase::Item(index); } wxSizerItem *operator[](size_t index) const { wxwxSizerItemListNode *node = Item(index); return node ? (wxSizerItem*)(node->GetData()) : (wxSizerItem*)__null; } wxwxSizerItemListNode *Append(wxSizerItem *object) { return (wxwxSizerItemListNode *)wxListBase::Append(object); } wxwxSizerItemListNode *Insert(wxSizerItem *object) { return (wxwxSizerItemListNode *)Insert((wxwxSizerItemListNode*)__null, object); } wxwxSizerItemListNode *Insert(size_t pos, wxSizerItem *object) { return (wxwxSizerItemListNode *)wxListBase::Insert(pos, object); } wxwxSizerItemListNode *Insert(wxwxSizerItemListNode *prev, wxSizerItem *object) { return (wxwxSizerItemListNode *)wxListBase::Insert(prev, object); } wxwxSizerItemListNode *Append(long key, void *object) { return (wxwxSizerItemListNode *)wxListBase::Append(key, object); } wxwxSizerItemListNode *Append(const wxChar *key, void *object) { return (wxwxSizerItemListNode *)wxListBase::Append(key, object); } wxwxSizerItemListNode *DetachNode(wxwxSizerItemListNode *node) { return (wxwxSizerItemListNode *)wxListBase::DetachNode(node); } bool DeleteNode(wxwxSizerItemListNode *node) { return wxListBase::DeleteNode(node); } bool DeleteObject(wxSizerItem *object) { return wxListBase::DeleteObject(object); } void Erase(compatibility_iterator it) { DeleteNode(it); } wxwxSizerItemListNode *Find(const wxSizerItem *object) const { return (wxwxSizerItemListNode *)wxListBase::Find(object); } virtual wxwxSizerItemListNode *Find(const wxListKey& key) const { return (wxwxSizerItemListNode *)wxListBase::Find(key); } int IndexOf(wxSizerItem *object) const { return wxListBase::IndexOf(object); } void Sort(wxSortCompareFunction func) { wxListBase::Sort(func); } void Sort(wxSortFuncFor_wxSizerItemList func) { Sort((wxSortCompareFunction)func); } protected: virtual wxNodeBase *CreateNode(wxNodeBase *prev, wxNodeBase *next, void *data, const wxListKey& key = wxDefaultListKey) { return new wxwxSizerItemListNode(this, (wxwxSizerItemListNode *)prev, (wxwxSizerItemListNode *)next, (wxSizerItem *)data, key); } public: typedef size_t size_type; typedef int difference_type; typedef wxSizerItem* value_type; typedef wxSizerItem* base_value_type; typedef value_type& reference; typedef const value_type& const_reference; typedef base_value_type& base_reference; typedef const base_value_type& const_base_reference; class iterator { typedef wxSizerItemList list; public: typedef wxwxSizerItemListNode Node; typedef iterator itor; typedef wxSizerItem* value_type; typedef value_type* ptr_type; typedef value_type& reference; Node* m_node; Node* m_init; public: typedef reference reference_type; typedef ptr_type pointer_type; iterator(Node* node, Node* init) : m_node(node), m_init(init) {} iterator() : m_node(__null), m_init(__null) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetNext(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetNext(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetPrevious() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetPrevious() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class const_iterator { typedef wxSizerItemList list; public: typedef wxwxSizerItemListNode Node; typedef wxSizerItem* value_type; typedef const value_type& const_reference; typedef const_iterator itor; typedef value_type* ptr_type; Node* m_node; Node* m_init; public: typedef const_reference reference_type; typedef const ptr_type pointer_type; const_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } const_iterator() : m_node(__null), m_init(__null) { } const_iterator(const iterator& it) : m_node(it.m_node), m_init(it.m_init) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetNext(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetNext(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetPrevious() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetPrevious() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class reverse_iterator { typedef wxSizerItemList list; public: typedef wxwxSizerItemListNode Node; typedef wxSizerItem* value_type; typedef reverse_iterator itor; typedef value_type* ptr_type; typedef value_type& reference; Node* m_node; Node* m_init; public: typedef reference reference_type; typedef ptr_type pointer_type; reverse_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } reverse_iterator() : m_node(__null), m_init(__null) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetPrevious(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetPrevious(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetNext() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetNext() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class const_reverse_iterator { typedef wxSizerItemList list; public: typedef wxwxSizerItemListNode Node; typedef wxSizerItem* value_type; typedef const_reverse_iterator itor; typedef value_type* ptr_type; typedef const value_type& const_reference; Node* m_node; Node* m_init; public: typedef const_reference reference_type; typedef const ptr_type pointer_type; const_reverse_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } const_reverse_iterator() : m_node(__null), m_init(__null) { } const_reverse_iterator(const reverse_iterator& it) : m_node(it.m_node), m_init(it.m_init) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetPrevious(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetPrevious(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetNext() : m_init; return *this;} const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetNext() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; explicit wxSizerItemList(size_type n, const_reference v = value_type()) { assign(n, v); } wxSizerItemList(const const_iterator& first, const const_iterator& last) { assign(first, last); } iterator begin() { return iterator(GetFirst(), GetLast()); } const_iterator begin() const { return const_iterator(GetFirst(), GetLast()); } iterator end() { return iterator(__null, GetLast()); } const_iterator end() const { return const_iterator(__null, GetLast()); } reverse_iterator rbegin() { return reverse_iterator(GetLast(), GetFirst()); } const_reverse_iterator rbegin() const { return const_reverse_iterator(GetLast(), GetFirst()); } reverse_iterator rend() { return reverse_iterator(__null, GetFirst()); } const_reverse_iterator rend() const { return const_reverse_iterator(__null, GetFirst()); } void resize(size_type n, value_type v = value_type()) { while (n < size()) pop_back(); while (n > size()) push_back(v); } size_type size() const { return GetCount(); } size_type max_size() const { return 2147483647; } bool empty() const { return IsEmpty(); } reference front() { return *begin(); } const_reference front() const { return *begin(); } reference back() { iterator tmp = end(); return *--tmp; } const_reference back() const { const_iterator tmp = end(); return *--tmp; } void push_front(const_reference v = value_type()) { Insert(GetFirst(), (const_base_reference)v); } void pop_front() { DeleteNode(GetFirst()); } void push_back(const_reference v = value_type()) { Append((const_base_reference)v); } void pop_back() { DeleteNode(GetLast()); } void assign(const_iterator first, const const_iterator& last) { clear(); for(; first != last; ++first) Append((const_base_reference)*first); } void assign(size_type n, const_reference v = value_type()) { clear(); for(size_type i = 0; i < n; ++i) Append((const_base_reference)v); } iterator insert(const iterator& it, const_reference v = value_type()) { Insert(it.m_node, (const_base_reference)v); return iterator(it.m_node->GetPrevious(), GetLast()); } void insert(const iterator& it, size_type n, const_reference v = value_type()) { for(size_type i = 0; i < n; ++i) Insert(it.m_node, (const_base_reference)v); } void insert(const iterator& it, const_iterator first, const const_iterator& last) { for(; first != last; ++first) Insert(it.m_node, (const_base_reference)*first); } iterator erase(const iterator& it) { iterator next = iterator(it.m_node->GetNext(), GetLast()); DeleteNode(it.m_node); return next; } iterator erase(const iterator& first, const iterator& last) { iterator next = last; ++next; DeleteNodes(first.m_node, last.m_node); return next; } void clear() { Clear(); } void splice(const iterator& it, wxSizerItemList& l, const iterator& first, const iterator& last) { insert(it, first, last); l.erase(first, last); } void splice(const iterator& it, wxSizerItemList& l) { splice(it, l, l.begin(), l.end() ); } void splice(const iterator& it, wxSizerItemList& l, const iterator& first) { iterator tmp = first; ++tmp; if(it == first || it == tmp) return; insert(it, *first); l.erase(first); } void remove(const_reference v) { DeleteObject((const_base_reference)v); } void reverse() { Reverse(); } }; | |
54825 | ||
54826 | ||
54827 | ||
54828 | ||
54829 | ||
54830 | ||
54831 | class wxSizer: public wxObject, public wxClientDataContainer | |
54832 | { | |
54833 | public: | |
54834 | wxSizer(); | |
54835 | ~wxSizer(); | |
54836 | ||
54837 | ||
54838 | ||
54839 | inline wxSizerItem* Add( wxWindow *window, | |
54840 | int proportion = 0, | |
54841 | int flag = 0, | |
54842 | int border = 0, | |
54843 | wxObject* userData = __null ); | |
54844 | inline wxSizerItem* Add( wxSizer *sizer, | |
54845 | int proportion = 0, | |
54846 | int flag = 0, | |
54847 | int border = 0, | |
54848 | wxObject* userData = __null ); | |
54849 | inline wxSizerItem* Add( int width, | |
54850 | int height, | |
54851 | int proportion = 0, | |
54852 | int flag = 0, | |
54853 | int border = 0, | |
54854 | wxObject* userData = __null ); | |
54855 | inline wxSizerItem* Add( wxWindow *window, const wxSizerFlags& flags ); | |
54856 | inline wxSizerItem* Add( wxSizer *sizer, const wxSizerFlags& flags ); | |
54857 | inline wxSizerItem* Add( wxSizerItem *item ); | |
54858 | ||
54859 | inline wxSizerItem* AddSpacer(int size); | |
54860 | inline wxSizerItem* AddStretchSpacer(int prop = 1); | |
54861 | ||
54862 | inline wxSizerItem* Insert( size_t index, | |
54863 | wxWindow *window, | |
54864 | int proportion = 0, | |
54865 | int flag = 0, | |
54866 | int border = 0, | |
54867 | wxObject* userData = __null ); | |
54868 | inline wxSizerItem* Insert( size_t index, | |
54869 | wxSizer *sizer, | |
54870 | int proportion = 0, | |
54871 | int flag = 0, | |
54872 | int border = 0, | |
54873 | wxObject* userData = __null ); | |
54874 | inline wxSizerItem* Insert( size_t index, | |
54875 | int width, | |
54876 | int height, | |
54877 | int proportion = 0, | |
54878 | int flag = 0, | |
54879 | int border = 0, | |
54880 | wxObject* userData = __null ); | |
54881 | inline wxSizerItem* Insert( size_t index, | |
54882 | wxWindow *window, | |
54883 | const wxSizerFlags& flags ); | |
54884 | inline wxSizerItem* Insert( size_t index, | |
54885 | wxSizer *sizer, | |
54886 | const wxSizerFlags& flags ); | |
54887 | virtual wxSizerItem* Insert( size_t index, wxSizerItem *item ); | |
54888 | ||
54889 | inline wxSizerItem* InsertSpacer(size_t index, int size); | |
54890 | inline wxSizerItem* InsertStretchSpacer(size_t index, int prop = 1); | |
54891 | ||
54892 | inline wxSizerItem* Prepend( wxWindow *window, | |
54893 | int proportion = 0, | |
54894 | int flag = 0, | |
54895 | int border = 0, | |
54896 | wxObject* userData = __null ); | |
54897 | inline wxSizerItem* Prepend( wxSizer *sizer, | |
54898 | int proportion = 0, | |
54899 | int flag = 0, | |
54900 | int border = 0, | |
54901 | wxObject* userData = __null ); | |
54902 | inline wxSizerItem* Prepend( int width, | |
54903 | int height, | |
54904 | int proportion = 0, | |
54905 | int flag = 0, | |
54906 | int border = 0, | |
54907 | wxObject* userData = __null ); | |
54908 | inline wxSizerItem* Prepend( wxWindow *window, const wxSizerFlags& flags ); | |
54909 | inline wxSizerItem* Prepend( wxSizer *sizer, const wxSizerFlags& flags ); | |
54910 | inline wxSizerItem* Prepend( wxSizerItem *item ); | |
54911 | ||
54912 | inline wxSizerItem* PrependSpacer(int size); | |
54913 | inline wxSizerItem* PrependStretchSpacer(int prop = 1); | |
54914 | ||
54915 | ||
54916 | ||
54917 | ||
54918 | virtual bool Remove( wxWindow *window ) __attribute__ ((deprecated)); | |
54919 | virtual bool Remove( wxSizer *sizer ); | |
54920 | virtual bool Remove( int index ); | |
54921 | ||
54922 | virtual bool Detach( wxWindow *window ); | |
54923 | virtual bool Detach( wxSizer *sizer ); | |
54924 | virtual bool Detach( int index ); | |
54925 | ||
54926 | virtual void Clear( bool delete_windows = false ); | |
54927 | virtual void DeleteWindows(); | |
54928 | ||
54929 | void SetMinSize( int width, int height ) | |
54930 | { DoSetMinSize( width, height ); } | |
54931 | void SetMinSize( wxSize size ) | |
54932 | { DoSetMinSize( size.x, size.y ); } | |
54933 | ||
54934 | ||
54935 | bool SetItemMinSize( wxWindow *window, int width, int height ) | |
54936 | { return DoSetItemMinSize( window, width, height ); } | |
54937 | bool SetItemMinSize( wxWindow *window, wxSize size ) | |
54938 | { return DoSetItemMinSize( window, size.x, size.y ); } | |
54939 | ||
54940 | ||
54941 | bool SetItemMinSize( wxSizer *sizer, int width, int height ) | |
54942 | { return DoSetItemMinSize( sizer, width, height ); } | |
54943 | bool SetItemMinSize( wxSizer *sizer, wxSize size ) | |
54944 | { return DoSetItemMinSize( sizer, size.x, size.y ); } | |
54945 | ||
54946 | bool SetItemMinSize( size_t index, int width, int height ) | |
54947 | { return DoSetItemMinSize( index, width, height ); } | |
54948 | bool SetItemMinSize( size_t index, wxSize size ) | |
54949 | { return DoSetItemMinSize( index, size.x, size.y ); } | |
54950 | ||
54951 | wxSize GetSize() const | |
54952 | { return m_size; } | |
54953 | wxPoint GetPosition() const | |
54954 | { return m_position; } | |
54955 | ||
54956 | ||
54957 | wxSize GetMinSize(); | |
54958 | ||
54959 | virtual void RecalcSizes() = 0; | |
54960 | virtual wxSize CalcMin() = 0; | |
54961 | ||
54962 | virtual void Layout(); | |
54963 | ||
54964 | wxSize Fit( wxWindow *window ); | |
54965 | void FitInside( wxWindow *window ); | |
54966 | void SetSizeHints( wxWindow *window ); | |
54967 | void SetVirtualSizeHints( wxWindow *window ); | |
54968 | ||
54969 | wxSizerItemList& GetChildren() | |
54970 | { return m_children; } | |
54971 | ||
54972 | void SetDimension( int x, int y, int width, int height ); | |
54973 | ||
54974 | wxSizerItem* GetItem( wxWindow *window, bool recursive = false ); | |
54975 | wxSizerItem* GetItem( wxSizer *sizer, bool recursive = false ); | |
54976 | wxSizerItem* GetItem( size_t index ); | |
54977 | ||
54978 | ||
54979 | ||
54980 | bool Show( wxWindow *window, bool show = true, bool recursive = false ); | |
54981 | bool Show( wxSizer *sizer, bool show = true, bool recursive = false ); | |
54982 | bool Show( size_t index, bool show = true ); | |
54983 | ||
54984 | bool Hide( wxSizer *sizer, bool recursive = false ) | |
54985 | { return Show( sizer, false, recursive ); } | |
54986 | bool Hide( wxWindow *window, bool recursive = false ) | |
54987 | { return Show( window, false, recursive ); } | |
54988 | bool Hide( size_t index ) | |
54989 | { return Show( index, false ); } | |
54990 | ||
54991 | bool IsShown( wxWindow *window ) const; | |
54992 | bool IsShown( wxSizer *sizer ) const; | |
54993 | bool IsShown( size_t index ) const; | |
54994 | ||
54995 | ||
54996 | virtual void ShowItems (bool show); | |
54997 | ||
54998 | void Show(bool show) | |
54999 | { m_isShown = show; | |
55000 | ShowItems(show); | |
55001 | } | |
55002 | bool IsShown() const { return m_isShown; } | |
55003 | ||
55004 | protected: | |
55005 | wxSize m_size; | |
55006 | wxSize m_minSize; | |
55007 | wxPoint m_position; | |
55008 | wxSizerItemList m_children; | |
55009 | bool m_isShown; | |
55010 | ||
55011 | wxSize GetMaxWindowSize( wxWindow *window ) const; | |
55012 | wxSize GetMinWindowSize( wxWindow *window ); | |
55013 | wxSize GetMaxClientSize( wxWindow *window ) const; | |
55014 | wxSize GetMinClientSize( wxWindow *window ); | |
55015 | wxSize FitSize( wxWindow *window ); | |
55016 | wxSize VirtualFitSize( wxWindow *window ); | |
55017 | ||
55018 | virtual void DoSetMinSize( int width, int height ); | |
55019 | virtual bool DoSetItemMinSize( wxWindow *window, int width, int height ); | |
55020 | virtual bool DoSetItemMinSize( wxSizer *sizer, int width, int height ); | |
55021 | virtual bool DoSetItemMinSize( size_t index, int width, int height ); | |
55022 | ||
55023 | private: | |
55024 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
55025 | }; | |
55026 | ||
55027 | ||
55028 | ||
55029 | ||
55030 | ||
55031 | class wxGridSizer: public wxSizer | |
55032 | { | |
55033 | public: | |
55034 | wxGridSizer( int rows, int cols, int vgap, int hgap ); | |
55035 | wxGridSizer( int cols, int vgap = 0, int hgap = 0 ); | |
55036 | ||
55037 | virtual void RecalcSizes(); | |
55038 | virtual wxSize CalcMin(); | |
55039 | ||
55040 | void SetCols( int cols ) { m_cols = cols; } | |
55041 | void SetRows( int rows ) { m_rows = rows; } | |
55042 | void SetVGap( int gap ) { m_vgap = gap; } | |
55043 | void SetHGap( int gap ) { m_hgap = gap; } | |
55044 | int GetCols() const { return m_cols; } | |
55045 | int GetRows() const { return m_rows; } | |
55046 | int GetVGap() const { return m_vgap; } | |
55047 | int GetHGap() const { return m_hgap; } | |
55048 | ||
55049 | protected: | |
55050 | int m_rows; | |
55051 | int m_cols; | |
55052 | int m_vgap; | |
55053 | int m_hgap; | |
55054 | ||
55055 | ||
55056 | int CalcRowsCols(int& rows, int& cols) const; | |
55057 | ||
55058 | void SetItemBounds( wxSizerItem *item, int x, int y, int w, int h ); | |
55059 | ||
55060 | private: | |
55061 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
55062 | }; | |
55063 | ||
55064 | ||
55065 | ||
55066 | ||
55067 | ||
55068 | ||
55069 | ||
55070 | enum wxFlexSizerGrowMode | |
55071 | { | |
55072 | ||
55073 | wxFLEX_GROWMODE_NONE, | |
55074 | ||
55075 | ||
55076 | wxFLEX_GROWMODE_SPECIFIED, | |
55077 | ||
55078 | ||
55079 | wxFLEX_GROWMODE_ALL | |
55080 | }; | |
55081 | ||
55082 | class wxFlexGridSizer: public wxGridSizer | |
55083 | { | |
55084 | public: | |
55085 | ||
55086 | wxFlexGridSizer( int rows, int cols, int vgap, int hgap ); | |
55087 | wxFlexGridSizer( int cols, int vgap = 0, int hgap = 0 ); | |
55088 | virtual ~wxFlexGridSizer(); | |
55089 | ||
55090 | ||
55091 | ||
55092 | ||
55093 | void AddGrowableRow( size_t idx, int proportion = 0 ); | |
55094 | void RemoveGrowableRow( size_t idx ); | |
55095 | void AddGrowableCol( size_t idx, int proportion = 0 ); | |
55096 | void RemoveGrowableCol( size_t idx ); | |
55097 | ||
55098 | ||
55099 | ||
55100 | ||
55101 | ||
55102 | ||
55103 | void SetFlexibleDirection(int direction) { m_flexDirection = direction; } | |
55104 | int GetFlexibleDirection() const { return m_flexDirection; } | |
55105 | ||
55106 | ||
55107 | ||
55108 | void SetNonFlexibleGrowMode(wxFlexSizerGrowMode mode) { m_growMode = mode; } | |
55109 | wxFlexSizerGrowMode GetNonFlexibleGrowMode() const { return m_growMode; } | |
55110 | ||
55111 | ||
55112 | const wxArrayInt& GetRowHeights() const { return m_rowHeights; } | |
55113 | const wxArrayInt& GetColWidths() const { return m_colWidths; } | |
55114 | ||
55115 | ||
55116 | virtual void RecalcSizes(); | |
55117 | virtual wxSize CalcMin(); | |
55118 | ||
55119 | protected: | |
55120 | void AdjustForFlexDirection(); | |
55121 | void AdjustForGrowables(const wxSize& sz, const wxSize& minsz, | |
55122 | int nrows, int ncols); | |
55123 | ||
55124 | ||
55125 | wxArrayInt m_rowHeights, | |
55126 | m_colWidths; | |
55127 | ||
55128 | ||
55129 | wxArrayInt m_growableRows, | |
55130 | m_growableCols; | |
55131 | ||
55132 | ||
55133 | wxArrayInt m_growableRowsProportions, | |
55134 | m_growableColsProportions; | |
55135 | ||
55136 | ||
55137 | ||
55138 | int m_flexDirection; | |
55139 | wxFlexSizerGrowMode m_growMode; | |
55140 | ||
55141 | ||
55142 | wxSize m_calculatedMinSize; | |
55143 | ||
55144 | private: | |
55145 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
55146 | private: wxFlexGridSizer(const wxFlexGridSizer&); wxFlexGridSizer& operator=(const wxFlexGridSizer&); | |
55147 | }; | |
55148 | ||
55149 | ||
55150 | ||
55151 | ||
55152 | ||
55153 | class wxBoxSizer: public wxSizer | |
55154 | { | |
55155 | public: | |
55156 | wxBoxSizer( int orient ); | |
55157 | ||
55158 | void RecalcSizes(); | |
55159 | wxSize CalcMin(); | |
55160 | ||
55161 | int GetOrientation() const | |
55162 | { return m_orient; } | |
55163 | ||
55164 | void SetOrientation(int orient) | |
55165 | { m_orient = orient; } | |
55166 | ||
55167 | protected: | |
55168 | int m_orient; | |
55169 | int m_stretchable; | |
55170 | int m_minWidth; | |
55171 | int m_minHeight; | |
55172 | int m_fixedWidth; | |
55173 | int m_fixedHeight; | |
55174 | ||
55175 | private: | |
55176 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
55177 | }; | |
55178 | ||
55179 | ||
55180 | ||
55181 | ||
55182 | ||
55183 | ||
55184 | ||
55185 | class wxStaticBox; | |
55186 | ||
55187 | class wxStaticBoxSizer: public wxBoxSizer | |
55188 | { | |
55189 | public: | |
55190 | wxStaticBoxSizer(wxStaticBox *box, int orient); | |
55191 | wxStaticBoxSizer(int orient, wxWindow *win, const wxString& label = wxEmptyString); | |
55192 | ||
55193 | void RecalcSizes(); | |
55194 | wxSize CalcMin(); | |
55195 | ||
55196 | wxStaticBox *GetStaticBox() const | |
55197 | { return m_staticBox; } | |
55198 | ||
55199 | ||
55200 | virtual void ShowItems (bool show); | |
55201 | ||
55202 | protected: | |
55203 | wxStaticBox *m_staticBox; | |
55204 | ||
55205 | private: | |
55206 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
55207 | private: wxStaticBoxSizer(const wxStaticBoxSizer&); wxStaticBoxSizer& operator=(const wxStaticBoxSizer&); | |
55208 | }; | |
55209 | ||
55210 | ||
55211 | ||
55212 | ||
55213 | ||
55214 | class wxStdDialogButtonSizer: public wxBoxSizer | |
55215 | { | |
55216 | public: | |
55217 | ||
55218 | ||
55219 | ||
55220 | wxStdDialogButtonSizer(); | |
55221 | ||
55222 | ||
55223 | ||
55224 | void AddButton(wxButton *button); | |
55225 | ||
55226 | ||
55227 | void SetAffirmativeButton( wxButton *button ); | |
55228 | void SetNegativeButton( wxButton *button ); | |
55229 | void SetCancelButton( wxButton *button ); | |
55230 | # 724 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/sizer.h" | |
55231 | void Realize(); | |
55232 | ||
55233 | wxButton *GetAffirmativeButton() const { return m_buttonAffirmative; } | |
55234 | wxButton *GetApplyButton() const { return m_buttonApply; } | |
55235 | wxButton *GetNegativeButton() const { return m_buttonNegative; } | |
55236 | wxButton *GetCancelButton() const { return m_buttonCancel; } | |
55237 | wxButton *GetHelpButton() const { return m_buttonHelp; } | |
55238 | ||
55239 | protected: | |
55240 | wxButton *m_buttonAffirmative; | |
55241 | wxButton *m_buttonApply; | |
55242 | wxButton *m_buttonNegative; | |
55243 | wxButton *m_buttonCancel; | |
55244 | wxButton *m_buttonHelp; | |
55245 | ||
55246 | private: | |
55247 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
55248 | private: wxStdDialogButtonSizer(const wxStdDialogButtonSizer&); wxStdDialogButtonSizer& operator=(const wxStdDialogButtonSizer&); | |
55249 | }; | |
55250 | # 758 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/sizer.h" | |
55251 | class wxBookCtrlBase; | |
55252 | ||
55253 | class wxBookCtrlSizer : public wxSizer | |
55254 | { | |
55255 | public: | |
55256 | wxBookCtrlSizer(wxBookCtrlBase *bookctrl) __attribute__ ((deprecated)); | |
55257 | ||
55258 | wxBookCtrlBase *GetControl() const { return m_bookctrl; } | |
55259 | ||
55260 | virtual void RecalcSizes(); | |
55261 | virtual wxSize CalcMin(); | |
55262 | ||
55263 | protected: | |
55264 | ||
55265 | ||
55266 | wxBookCtrlSizer() {} | |
55267 | ||
55268 | wxBookCtrlBase *m_bookctrl; | |
55269 | ||
55270 | private: | |
55271 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
55272 | private: wxBookCtrlSizer(const wxBookCtrlSizer&); wxBookCtrlSizer& operator=(const wxBookCtrlSizer&); | |
55273 | }; | |
55274 | ||
55275 | ||
55276 | ||
55277 | ||
55278 | ||
55279 | ||
55280 | class wxNotebook; | |
55281 | ||
55282 | class wxNotebookSizer : public wxBookCtrlSizer | |
55283 | { | |
55284 | public: | |
55285 | wxNotebookSizer(wxNotebook *nb) __attribute__ ((deprecated)); | |
55286 | ||
55287 | wxNotebook *GetNotebook() const { return (wxNotebook *)m_bookctrl; } | |
55288 | ||
55289 | private: | |
55290 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
55291 | private: wxNotebookSizer(const wxNotebookSizer&); wxNotebookSizer& operator=(const wxNotebookSizer&); | |
55292 | }; | |
55293 | # 811 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/sizer.h" | |
55294 | inline wxSizerItem* | |
55295 | wxSizer::Add( wxWindow *window, int proportion, int flag, int border, wxObject* userData ) | |
55296 | { | |
55297 | return Add( new wxSizerItem( window, proportion, flag, border, userData ) ); | |
55298 | } | |
55299 | ||
55300 | inline wxSizerItem* | |
55301 | wxSizer::Add( wxSizer *sizer, int proportion, int flag, int border, wxObject* userData ) | |
55302 | { | |
55303 | return Add( new wxSizerItem( sizer, proportion, flag, border, userData ) ); | |
55304 | } | |
55305 | ||
55306 | inline wxSizerItem* | |
55307 | wxSizer::Add( int width, int height, int proportion, int flag, int border, wxObject* userData ) | |
55308 | { | |
55309 | return Add( new wxSizerItem( width, height, proportion, flag, border, userData ) ); | |
55310 | } | |
55311 | ||
55312 | inline wxSizerItem* | |
55313 | wxSizer::Add( wxWindow *window, const wxSizerFlags& flags ) | |
55314 | { | |
55315 | return Add( new wxSizerItem(window, flags) ); | |
55316 | } | |
55317 | ||
55318 | inline wxSizerItem* | |
55319 | wxSizer::Add( wxSizer *sizer, const wxSizerFlags& flags ) | |
55320 | { | |
55321 | return Add( new wxSizerItem(sizer, flags) ); | |
55322 | } | |
55323 | ||
55324 | inline wxSizerItem* | |
55325 | wxSizer::Add( wxSizerItem *item ) | |
55326 | { | |
55327 | return Insert( m_children.GetCount(), item ); | |
55328 | } | |
55329 | ||
55330 | inline wxSizerItem* | |
55331 | wxSizer::AddSpacer(int size) | |
55332 | { | |
55333 | return Add(size, size); | |
55334 | } | |
55335 | ||
55336 | inline wxSizerItem* | |
55337 | wxSizer::AddStretchSpacer(int prop) | |
55338 | { | |
55339 | return Add(0, 0, prop); | |
55340 | } | |
55341 | ||
55342 | inline wxSizerItem* | |
55343 | wxSizer::Prepend( wxWindow *window, int proportion, int flag, int border, wxObject* userData ) | |
55344 | { | |
55345 | return Prepend( new wxSizerItem( window, proportion, flag, border, userData ) ); | |
55346 | } | |
55347 | ||
55348 | inline wxSizerItem* | |
55349 | wxSizer::Prepend( wxSizer *sizer, int proportion, int flag, int border, wxObject* userData ) | |
55350 | { | |
55351 | return Prepend( new wxSizerItem( sizer, proportion, flag, border, userData ) ); | |
55352 | } | |
55353 | ||
55354 | inline wxSizerItem* | |
55355 | wxSizer::Prepend( int width, int height, int proportion, int flag, int border, wxObject* userData ) | |
55356 | { | |
55357 | return Prepend( new wxSizerItem( width, height, proportion, flag, border, userData ) ); | |
55358 | } | |
55359 | ||
55360 | inline wxSizerItem* | |
55361 | wxSizer::Prepend( wxSizerItem *item ) | |
55362 | { | |
55363 | return Insert( 0, item ); | |
55364 | } | |
55365 | ||
55366 | inline wxSizerItem* | |
55367 | wxSizer::PrependSpacer(int size) | |
55368 | { | |
55369 | return Prepend(size, size); | |
55370 | } | |
55371 | ||
55372 | inline wxSizerItem* | |
55373 | wxSizer::PrependStretchSpacer(int prop) | |
55374 | { | |
55375 | return Prepend(0, 0, prop); | |
55376 | } | |
55377 | ||
55378 | inline wxSizerItem* | |
55379 | wxSizer::Prepend( wxWindow *window, const wxSizerFlags& flags ) | |
55380 | { | |
55381 | return Prepend( new wxSizerItem(window, flags) ); | |
55382 | } | |
55383 | ||
55384 | inline wxSizerItem* | |
55385 | wxSizer::Prepend( wxSizer *sizer, const wxSizerFlags& flags ) | |
55386 | { | |
55387 | return Prepend( new wxSizerItem(sizer, flags) ); | |
55388 | } | |
55389 | ||
55390 | inline wxSizerItem* | |
55391 | wxSizer::Insert( size_t index, | |
55392 | wxWindow *window, | |
55393 | int proportion, | |
55394 | int flag, | |
55395 | int border, | |
55396 | wxObject* userData ) | |
55397 | { | |
55398 | return Insert( index, new wxSizerItem( window, proportion, flag, border, userData ) ); | |
55399 | } | |
55400 | ||
55401 | inline wxSizerItem* | |
55402 | wxSizer::Insert( size_t index, | |
55403 | wxSizer *sizer, | |
55404 | int proportion, | |
55405 | int flag, | |
55406 | int border, | |
55407 | wxObject* userData ) | |
55408 | { | |
55409 | return Insert( index, new wxSizerItem( sizer, proportion, flag, border, userData ) ); | |
55410 | } | |
55411 | ||
55412 | inline wxSizerItem* | |
55413 | wxSizer::Insert( size_t index, | |
55414 | int width, | |
55415 | int height, | |
55416 | int proportion, | |
55417 | int flag, | |
55418 | int border, | |
55419 | wxObject* userData ) | |
55420 | { | |
55421 | return Insert( index, new wxSizerItem( width, height, proportion, flag, border, userData ) ); | |
55422 | } | |
55423 | ||
55424 | inline wxSizerItem* | |
55425 | wxSizer::Insert( size_t index, wxWindow *window, const wxSizerFlags& flags ) | |
55426 | { | |
55427 | return Insert( index, new wxSizerItem(window, flags) ); | |
55428 | } | |
55429 | ||
55430 | inline wxSizerItem* | |
55431 | wxSizer::Insert( size_t index, wxSizer *sizer, const wxSizerFlags& flags ) | |
55432 | { | |
55433 | return Insert( index, new wxSizerItem(sizer, flags) ); | |
55434 | } | |
55435 | ||
55436 | inline wxSizerItem* | |
55437 | wxSizer::InsertSpacer(size_t index, int size) | |
55438 | { | |
55439 | return Insert(index, size, size); | |
55440 | } | |
55441 | ||
55442 | inline wxSizerItem* | |
55443 | wxSizer::InsertStretchSpacer(size_t index, int prop) | |
55444 | { | |
55445 | return Insert(index, 0, 0, prop); | |
55446 | } | |
55447 | # 73 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
55448 | ||
55449 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/mdi.h" 1 | |
55450 | # 26 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/mdi.h" | |
55451 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/mdi.h" 1 | |
55452 | # 24 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/mdi.h" | |
55453 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/toolbar.h" 1 | |
55454 | # 25 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/mdi.h" 2 | |
55455 | ||
55456 | ||
55457 | ||
55458 | ||
55459 | ||
55460 | class wxMDIParentFrame; | |
55461 | class wxMDIClientWindow; | |
55462 | class wxMDIChildFrame; | |
55463 | ||
55464 | ||
55465 | ||
55466 | ||
55467 | ||
55468 | extern const wxChar* wxFrameNameStr; | |
55469 | extern const wxChar* wxStatusLineNameStr; | |
55470 | ||
55471 | ||
55472 | ||
55473 | ||
55474 | ||
55475 | class wxMDIParentFrame: public wxFrame | |
55476 | { | |
55477 | public: | |
55478 | wxMDIParentFrame() { Init(); } | |
55479 | wxMDIParentFrame(wxWindow *parent, | |
55480 | wxWindowID id, | |
55481 | const wxString& title, | |
55482 | const wxPoint& pos = wxDefaultPosition, | |
55483 | const wxSize& size = wxDefaultSize, | |
55484 | long style = (0x0800 | 0x0040 | 0x0400 | 0x0200 | 0x1000 | 0x20000000 | 0x00400000) | 0x80000000 | 0x40000000, | |
55485 | const wxString& name = wxFrameNameStr) | |
55486 | { | |
55487 | Init(); | |
55488 | ||
55489 | (void)Create(parent, id, title, pos, size, style, name); | |
55490 | } | |
55491 | ||
55492 | ~wxMDIParentFrame(); | |
55493 | bool Create( wxWindow *parent, | |
55494 | wxWindowID id, | |
55495 | const wxString& title, | |
55496 | const wxPoint& pos = wxDefaultPosition, | |
55497 | const wxSize& size = wxDefaultSize, | |
55498 | long style = (0x0800 | 0x0040 | 0x0400 | 0x0200 | 0x1000 | 0x20000000 | 0x00400000) | 0x80000000 | 0x40000000, | |
55499 | const wxString& name = wxFrameNameStr ); | |
55500 | ||
55501 | wxMDIChildFrame *GetActiveChild() const; | |
55502 | ||
55503 | wxMDIClientWindow *GetClientWindow() const; | |
55504 | virtual wxMDIClientWindow *OnCreateClient(); | |
55505 | ||
55506 | virtual void Cascade() {} | |
55507 | virtual void Tile(wxOrientation = wxHORIZONTAL) {} | |
55508 | virtual void ArrangeIcons() {} | |
55509 | virtual void ActivateNext(); | |
55510 | virtual void ActivatePrevious(); | |
55511 | ||
55512 | ||
55513 | ||
55514 | wxMDIClientWindow *m_clientWindow; | |
55515 | bool m_justInserted; | |
55516 | ||
55517 | virtual void GtkOnSize( int x, int y, int width, int height ); | |
55518 | virtual void OnInternalIdle(); | |
55519 | ||
55520 | protected: | |
55521 | void Init(); | |
55522 | ||
55523 | virtual void DoGetClientSize(int *width, int *height) const; | |
55524 | ||
55525 | private: | |
55526 | friend class wxMDIChildFrame; | |
55527 | ||
55528 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
55529 | }; | |
55530 | ||
55531 | ||
55532 | ||
55533 | ||
55534 | ||
55535 | class wxMDIChildFrame: public wxFrame | |
55536 | { | |
55537 | public: | |
55538 | wxMDIChildFrame(); | |
55539 | wxMDIChildFrame( wxMDIParentFrame *parent, | |
55540 | wxWindowID id, | |
55541 | const wxString& title, | |
55542 | const wxPoint& pos = wxDefaultPosition, | |
55543 | const wxSize& size = wxDefaultSize, | |
55544 | long style = (0x0800 | 0x0040 | 0x0400 | 0x0200 | 0x1000 | 0x20000000 | 0x00400000), | |
55545 | const wxString& name = wxFrameNameStr ); | |
55546 | ||
55547 | virtual ~wxMDIChildFrame(); | |
55548 | bool Create( wxMDIParentFrame *parent, | |
55549 | wxWindowID id, | |
55550 | const wxString& title, | |
55551 | const wxPoint& pos = wxDefaultPosition, | |
55552 | const wxSize& size = wxDefaultSize, | |
55553 | long style = (0x0800 | 0x0040 | 0x0400 | 0x0200 | 0x1000 | 0x20000000 | 0x00400000), | |
55554 | const wxString& name = wxFrameNameStr ); | |
55555 | ||
55556 | virtual void SetMenuBar( wxMenuBar *menu_bar ); | |
55557 | virtual wxMenuBar *GetMenuBar() const; | |
55558 | ||
55559 | virtual void AddChild( wxWindowBase *child ); | |
55560 | ||
55561 | virtual void Activate(); | |
55562 | ||
55563 | ||
55564 | ||
55565 | virtual wxStatusBar* CreateStatusBar( int = 1, | |
55566 | long = 1, | |
55567 | wxWindowID = 1, | |
55568 | const wxString& = wxEmptyString) | |
55569 | { return (wxStatusBar*)__null; } | |
55570 | ||
55571 | virtual wxStatusBar *GetStatusBar() const { return (wxStatusBar*)__null; } | |
55572 | virtual void SetStatusText( const wxString &, int =0 ) {} | |
55573 | virtual void SetStatusWidths( int , const int [] ) {} | |
55574 | ||
55575 | ||
55576 | ||
55577 | virtual void DoSetSizeHints( int , | |
55578 | int , | |
55579 | int = -1, | |
55580 | int = -1, | |
55581 | int = -1, | |
55582 | int = -1) {} | |
55583 | ||
55584 | ||
55585 | ||
55586 | virtual wxToolBar* CreateToolBar( long , | |
55587 | wxWindowID , | |
55588 | const wxString& ) | |
55589 | { return (wxToolBar*)__null; } | |
55590 | virtual wxToolBar *GetToolBar() const { return (wxToolBar*)__null; } | |
55591 | ||
55592 | ||
55593 | ||
55594 | virtual void SetIcon(const wxIcon& icon) | |
55595 | { wxTopLevelWindowBase::SetIcon(icon); } | |
55596 | virtual void SetIcons(const wxIconBundle& icons ) | |
55597 | { wxTopLevelWindowBase::SetIcons(icons); } | |
55598 | ||
55599 | ||
55600 | void SetTitle( const wxString &title ); | |
55601 | wxString GetTitle() const { return m_title; } | |
55602 | ||
55603 | ||
55604 | virtual void Maximize( bool = true ) { } | |
55605 | virtual bool IsMaximized() const { return true; } | |
55606 | virtual void Iconize(bool = true) { } | |
55607 | virtual bool IsIconized() const { return false; } | |
55608 | virtual void Restore() {} | |
55609 | ||
55610 | virtual bool IsTopLevel() const { return false; } | |
55611 | ||
55612 | void OnActivate( wxActivateEvent& event ); | |
55613 | void OnMenuHighlight( wxMenuEvent& event ); | |
55614 | ||
55615 | ||
55616 | ||
55617 | wxMenuBar *m_menuBar; | |
55618 | GtkNotebookPage *m_page; | |
55619 | bool m_justInserted; | |
55620 | ||
55621 | protected: | |
55622 | ||
55623 | virtual void DoSetSize(int x, int y, | |
55624 | int width, int height, | |
55625 | int sizeFlags = (0x0001|0x0002)); | |
55626 | virtual void DoSetClientSize(int width, int height); | |
55627 | virtual void DoGetClientSize( int *width, int *height ) const; | |
55628 | ||
55629 | private: | |
55630 | private: static const wxEventTableEntry sm_eventTableEntries[]; protected: static const wxEventTable sm_eventTable; virtual const wxEventTable* GetEventTable() const; static wxEventHashTable sm_eventHashTable; virtual wxEventHashTable& GetEventHashTable() const; | |
55631 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
55632 | }; | |
55633 | ||
55634 | ||
55635 | ||
55636 | ||
55637 | ||
55638 | class wxMDIClientWindow: public wxWindow | |
55639 | { | |
55640 | public: | |
55641 | wxMDIClientWindow(); | |
55642 | wxMDIClientWindow( wxMDIParentFrame *parent, long style = 0 ); | |
55643 | ~wxMDIClientWindow(); | |
55644 | virtual bool CreateClient( wxMDIParentFrame *parent, long style = 0x80000000 | 0x40000000 ); | |
55645 | ||
55646 | private: | |
55647 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
55648 | }; | |
55649 | # 27 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/mdi.h" 2 | |
55650 | # 75 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
55651 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/statusbr.h" 1 | |
55652 | # 26 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/statusbr.h" | |
55653 | typedef wxString _WX_LIST_ITEM_TYPE_wxListString; typedef int (*wxSortFuncFor_wxListString)(const wxString **, const wxString **); class wxwxListStringNode : public wxNodeBase { public: wxwxListStringNode(wxListBase *list = (wxListBase *)__null, wxwxListStringNode *previous = (wxwxListStringNode *)__null, wxwxListStringNode *next = (wxwxListStringNode *)__null, wxString *data = (wxString *)__null, const wxListKey& key = wxDefaultListKey) : wxNodeBase(list, previous, next, data, key) { } wxwxListStringNode *GetNext() const { return (wxwxListStringNode *)wxNodeBase::GetNext(); } wxwxListStringNode *GetPrevious() const { return (wxwxListStringNode *)wxNodeBase::GetPrevious(); } wxString *GetData() const { return (wxString *)wxNodeBase::GetData(); } void SetData(wxString *data) { wxNodeBase::SetData(data); } protected: virtual void DeleteData(); private: wxwxListStringNode(const wxwxListStringNode&); wxwxListStringNode& operator=(const wxwxListStringNode&); }; class wxListString : public wxListBase { public: typedef wxwxListStringNode Node; typedef Node* compatibility_iterator; wxListString(wxKeyType keyType = wxKEY_NONE) : wxListBase(keyType) { } wxListString(const wxListString& list) : wxListBase(list.GetKeyType()) { Assign(list); } wxListString(size_t count, wxString *elements[]) : wxListBase(count, (void **)elements) { } wxListString& operator=(const wxListString& list) { Assign(list); return *this; } wxwxListStringNode *GetFirst() const { return (wxwxListStringNode *)wxListBase::GetFirst(); } wxwxListStringNode *GetLast() const { return (wxwxListStringNode *)wxListBase::GetLast(); } wxwxListStringNode *Item(size_t index) const { return (wxwxListStringNode *)wxListBase::Item(index); } wxString *operator[](size_t index) const { wxwxListStringNode *node = Item(index); return node ? (wxString*)(node->GetData()) : (wxString*)__null; } wxwxListStringNode *Append(wxString *object) { return (wxwxListStringNode *)wxListBase::Append(object); } wxwxListStringNode *Insert(wxString *object) { return (wxwxListStringNode *)Insert((wxwxListStringNode*)__null, object); } wxwxListStringNode *Insert(size_t pos, wxString *object) { return (wxwxListStringNode *)wxListBase::Insert(pos, object); } wxwxListStringNode *Insert(wxwxListStringNode *prev, wxString *object) { return (wxwxListStringNode *)wxListBase::Insert(prev, object); } wxwxListStringNode *Append(long key, void *object) { return (wxwxListStringNode *)wxListBase::Append(key, object); } wxwxListStringNode *Append(const wxChar *key, void *object) { return (wxwxListStringNode *)wxListBase::Append(key, object); } wxwxListStringNode *DetachNode(wxwxListStringNode *node) { return (wxwxListStringNode *)wxListBase::DetachNode(node); } bool DeleteNode(wxwxListStringNode *node) { return wxListBase::DeleteNode(node); } bool DeleteObject(wxString *object) { return wxListBase::DeleteObject(object); } void Erase(compatibility_iterator it) { DeleteNode(it); } wxwxListStringNode *Find(const wxString *object) const { return (wxwxListStringNode *)wxListBase::Find(object); } virtual wxwxListStringNode *Find(const wxListKey& key) const { return (wxwxListStringNode *)wxListBase::Find(key); } int IndexOf(wxString *object) const { return wxListBase::IndexOf(object); } void Sort(wxSortCompareFunction func) { wxListBase::Sort(func); } void Sort(wxSortFuncFor_wxListString func) { Sort((wxSortCompareFunction)func); } protected: virtual wxNodeBase *CreateNode(wxNodeBase *prev, wxNodeBase *next, void *data, const wxListKey& key = wxDefaultListKey) { return new wxwxListStringNode(this, (wxwxListStringNode *)prev, (wxwxListStringNode *)next, (wxString *)data, key); } public: typedef size_t size_type; typedef int difference_type; typedef wxString* value_type; typedef wxString* base_value_type; typedef value_type& reference; typedef const value_type& const_reference; typedef base_value_type& base_reference; typedef const base_value_type& const_base_reference; class iterator { typedef wxListString list; public: typedef wxwxListStringNode Node; typedef iterator itor; typedef wxString* value_type; typedef value_type* ptr_type; typedef value_type& reference; Node* m_node; Node* m_init; public: typedef reference reference_type; typedef ptr_type pointer_type; iterator(Node* node, Node* init) : m_node(node), m_init(init) {} iterator() : m_node(__null), m_init(__null) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetNext(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetNext(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetPrevious() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetPrevious() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class const_iterator { typedef wxListString list; public: typedef wxwxListStringNode Node; typedef wxString* value_type; typedef const value_type& const_reference; typedef const_iterator itor; typedef value_type* ptr_type; Node* m_node; Node* m_init; public: typedef const_reference reference_type; typedef const ptr_type pointer_type; const_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } const_iterator() : m_node(__null), m_init(__null) { } const_iterator(const iterator& it) : m_node(it.m_node), m_init(it.m_init) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetNext(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetNext(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetPrevious() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetPrevious() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class reverse_iterator { typedef wxListString list; public: typedef wxwxListStringNode Node; typedef wxString* value_type; typedef reverse_iterator itor; typedef value_type* ptr_type; typedef value_type& reference; Node* m_node; Node* m_init; public: typedef reference reference_type; typedef ptr_type pointer_type; reverse_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } reverse_iterator() : m_node(__null), m_init(__null) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetPrevious(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetPrevious(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetNext() : m_init; return *this; } const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetNext() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; class const_reverse_iterator { typedef wxListString list; public: typedef wxwxListStringNode Node; typedef wxString* value_type; typedef const_reverse_iterator itor; typedef value_type* ptr_type; typedef const value_type& const_reference; Node* m_node; Node* m_init; public: typedef const_reference reference_type; typedef const ptr_type pointer_type; const_reverse_iterator(Node* node, Node* init) : m_node(node), m_init(init) { } const_reverse_iterator() : m_node(__null), m_init(__null) { } const_reverse_iterator(const reverse_iterator& it) : m_node(it.m_node), m_init(it.m_init) { } reference_type operator*() const { return *(pointer_type)m_node->GetDataPtr(); } itor& operator++() { m_node = m_node->GetPrevious(); return *this; } const itor operator++(int) { itor tmp = *this; m_node = m_node->GetPrevious(); return tmp; } itor& operator--() { m_node = m_node ? m_node->GetNext() : m_init; return *this;} const itor operator--(int) { itor tmp = *this; m_node = m_node ? m_node->GetNext() : m_init; return tmp; } bool operator!=(const itor& it) const { return it.m_node != m_node; } bool operator==(const itor& it) const { return it.m_node == m_node; } }; explicit wxListString(size_type n, const_reference v = value_type()) { assign(n, v); } wxListString(const const_iterator& first, const const_iterator& last) { assign(first, last); } iterator begin() { return iterator(GetFirst(), GetLast()); } const_iterator begin() const { return const_iterator(GetFirst(), GetLast()); } iterator end() { return iterator(__null, GetLast()); } const_iterator end() const { return const_iterator(__null, GetLast()); } reverse_iterator rbegin() { return reverse_iterator(GetLast(), GetFirst()); } const_reverse_iterator rbegin() const { return const_reverse_iterator(GetLast(), GetFirst()); } reverse_iterator rend() { return reverse_iterator(__null, GetFirst()); } const_reverse_iterator rend() const { return const_reverse_iterator(__null, GetFirst()); } void resize(size_type n, value_type v = value_type()) { while (n < size()) pop_back(); while (n > size()) push_back(v); } size_type size() const { return GetCount(); } size_type max_size() const { return 2147483647; } bool empty() const { return IsEmpty(); } reference front() { return *begin(); } const_reference front() const { return *begin(); } reference back() { iterator tmp = end(); return *--tmp; } const_reference back() const { const_iterator tmp = end(); return *--tmp; } void push_front(const_reference v = value_type()) { Insert(GetFirst(), (const_base_reference)v); } void pop_front() { DeleteNode(GetFirst()); } void push_back(const_reference v = value_type()) { Append((const_base_reference)v); } void pop_back() { DeleteNode(GetLast()); } void assign(const_iterator first, const const_iterator& last) { clear(); for(; first != last; ++first) Append((const_base_reference)*first); } void assign(size_type n, const_reference v = value_type()) { clear(); for(size_type i = 0; i < n; ++i) Append((const_base_reference)v); } iterator insert(const iterator& it, const_reference v = value_type()) { Insert(it.m_node, (const_base_reference)v); return iterator(it.m_node->GetPrevious(), GetLast()); } void insert(const iterator& it, size_type n, const_reference v = value_type()) { for(size_type i = 0; i < n; ++i) Insert(it.m_node, (const_base_reference)v); } void insert(const iterator& it, const_iterator first, const const_iterator& last) { for(; first != last; ++first) Insert(it.m_node, (const_base_reference)*first); } iterator erase(const iterator& it) { iterator next = iterator(it.m_node->GetNext(), GetLast()); DeleteNode(it.m_node); return next; } iterator erase(const iterator& first, const iterator& last) { iterator next = last; ++next; DeleteNodes(first.m_node, last.m_node); return next; } void clear() { Clear(); } void splice(const iterator& it, wxListString& l, const iterator& first, const iterator& last) { insert(it, first, last); l.erase(first, last); } void splice(const iterator& it, wxListString& l) { splice(it, l, l.begin(), l.end() ); } void splice(const iterator& it, wxListString& l, const iterator& first) { iterator tmp = first; ++tmp; if(it == first || it == tmp) return; insert(it, *first); l.erase(first); } void remove(const_reference v) { DeleteObject((const_base_reference)v); } void reverse() { Reverse(); } }; | |
55654 | # 41 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/statusbr.h" | |
55655 | class wxStatusBarBase : public wxWindow | |
55656 | { | |
55657 | public: | |
55658 | wxStatusBarBase(); | |
55659 | ||
55660 | virtual ~wxStatusBarBase(); | |
55661 | ||
55662 | ||
55663 | ||
55664 | ||
55665 | ||
55666 | ||
55667 | virtual void SetFieldsCount(int number = 1, const int *widths = __null); | |
55668 | int GetFieldsCount() const { return m_nFields; } | |
55669 | ||
55670 | ||
55671 | ||
55672 | ||
55673 | virtual void SetStatusText(const wxString& text, int number = 0) = 0; | |
55674 | virtual wxString GetStatusText(int number = 0) const = 0; | |
55675 | ||
55676 | void PushStatusText(const wxString& text, int number = 0); | |
55677 | void PopStatusText(int number = 0); | |
55678 | # 74 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/statusbr.h" | |
55679 | virtual void SetStatusWidths(int n, const int widths[]); | |
55680 | # 83 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/statusbr.h" | |
55681 | virtual void SetStatusStyles(int n, const int styles[]); | |
55682 | ||
55683 | ||
55684 | ||
55685 | ||
55686 | ||
55687 | virtual bool GetFieldRect(int i, wxRect& rect) const = 0; | |
55688 | ||
55689 | ||
55690 | virtual void SetMinHeight(int height) = 0; | |
55691 | ||
55692 | ||
55693 | virtual int GetBorderX() const = 0; | |
55694 | virtual int GetBorderY() const = 0; | |
55695 | ||
55696 | ||
55697 | virtual bool AcceptsFocus() const { return false; } | |
55698 | ||
55699 | protected: | |
55700 | ||
55701 | void InitWidths(); | |
55702 | ||
55703 | ||
55704 | void FreeWidths(); | |
55705 | ||
55706 | ||
55707 | void ReinitWidths() { FreeWidths(); InitWidths(); } | |
55708 | ||
55709 | ||
55710 | void InitStyles(); | |
55711 | void FreeStyles(); | |
55712 | void ReinitStyles() { FreeStyles(); InitStyles(); } | |
55713 | ||
55714 | ||
55715 | void InitStacks(); | |
55716 | void FreeStacks(); | |
55717 | void ReinitStacks() { FreeStacks(); InitStacks(); } | |
55718 | ||
55719 | ||
55720 | wxArrayInt CalculateAbsWidths(wxCoord widthTotal) const; | |
55721 | ||
55722 | ||
55723 | wxListString *GetStatusStack(int i) const; | |
55724 | wxListString *GetOrCreateStatusStack(int i); | |
55725 | ||
55726 | ||
55727 | int m_nFields; | |
55728 | ||
55729 | ||
55730 | ||
55731 | int *m_statusWidths; | |
55732 | ||
55733 | ||
55734 | int *m_statusStyles; | |
55735 | ||
55736 | ||
55737 | ||
55738 | wxListString **m_statusTextStacks; | |
55739 | ||
55740 | private: wxStatusBarBase(const wxStatusBarBase&); wxStatusBarBase& operator=(const wxStatusBarBase&); | |
55741 | }; | |
55742 | # 169 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/statusbr.h" | |
55743 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/statusbr.h" 1 | |
55744 | # 19 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/statusbr.h" | |
55745 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/pen.h" 1 | |
55746 | # 20 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/statusbr.h" 2 | |
55747 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/font.h" 1 | |
55748 | # 21 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/statusbr.h" 2 | |
55749 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/statusbr.h" 1 | |
55750 | # 22 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/statusbr.h" 2 | |
55751 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/arrstr.h" 1 | |
55752 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/statusbr.h" 2 | |
55753 | ||
55754 | extern const wxChar* wxPanelNameStr; | |
55755 | ||
55756 | class wxStatusBar : public wxStatusBarBase | |
55757 | { | |
55758 | public: | |
55759 | wxStatusBar() { Init(); } | |
55760 | wxStatusBar(wxWindow *parent, | |
55761 | wxWindowID winid, | |
55762 | const wxPoint& pos = wxDefaultPosition, | |
55763 | const wxSize& size = wxDefaultSize, | |
55764 | long style = 0x00010000, | |
55765 | const wxString& name = wxPanelNameStr) | |
55766 | { | |
55767 | Init(); | |
55768 | ||
55769 | Create(parent, winid, pos, size, style, name); | |
55770 | } | |
55771 | wxStatusBar(wxWindow *parent, | |
55772 | wxWindowID winid, | |
55773 | long style, | |
55774 | const wxString& name = wxPanelNameStr) | |
55775 | { | |
55776 | Init(); | |
55777 | ||
55778 | Create(parent, winid, style, name); | |
55779 | } | |
55780 | ||
55781 | virtual ~wxStatusBar(); | |
55782 | ||
55783 | bool Create(wxWindow *parent, wxWindowID winid, | |
55784 | const wxPoint& = wxDefaultPosition, | |
55785 | const wxSize& = wxDefaultSize, | |
55786 | long style = 0x00010000, | |
55787 | const wxString& name = wxPanelNameStr) | |
55788 | { | |
55789 | return Create(parent, winid, style, name); | |
55790 | } | |
55791 | ||
55792 | bool Create(wxWindow *parent, wxWindowID winid, | |
55793 | long style, | |
55794 | const wxString& name = wxPanelNameStr); | |
55795 | ||
55796 | ||
55797 | virtual void SetFieldsCount(int number = 1, | |
55798 | const int *widths = (const int *) __null); | |
55799 | ||
55800 | ||
55801 | virtual void SetStatusText(const wxString& text, int number = 0); | |
55802 | virtual wxString GetStatusText(int number = 0) const; | |
55803 | ||
55804 | ||
55805 | virtual void SetStatusWidths(int n, const int widths_field[]); | |
55806 | ||
55807 | ||
55808 | virtual bool GetFieldRect(int i, wxRect& rect) const; | |
55809 | ||
55810 | ||
55811 | virtual void SetMinHeight(int height); | |
55812 | ||
55813 | virtual int GetBorderX() const { return m_borderX; } | |
55814 | virtual int GetBorderY() const { return m_borderY; } | |
55815 | ||
55816 | ||
55817 | ||
55818 | ||
55819 | virtual void DrawFieldText(wxDC& dc, int i); | |
55820 | virtual void DrawField(wxDC& dc, int i); | |
55821 | ||
55822 | void SetBorderX(int x); | |
55823 | void SetBorderY(int y); | |
55824 | ||
55825 | void OnPaint(wxPaintEvent& event); | |
55826 | ||
55827 | void OnLeftDown(wxMouseEvent& event); | |
55828 | void OnRightDown(wxMouseEvent& event); | |
55829 | ||
55830 | virtual void InitColours(); | |
55831 | ||
55832 | ||
55833 | void OnSysColourChanged(wxSysColourChangedEvent& event); | |
55834 | ||
55835 | protected: | |
55836 | ||
55837 | void Init(); | |
55838 | ||
55839 | wxArrayString m_statusStrings; | |
55840 | ||
55841 | ||
55842 | int m_lastClientWidth; | |
55843 | ||
55844 | wxArrayInt m_widthsAbs; | |
55845 | ||
55846 | int m_borderX; | |
55847 | int m_borderY; | |
55848 | wxPen m_mediumShadowPen; | |
55849 | wxPen m_hilightPen; | |
55850 | ||
55851 | virtual wxSize DoGetBestSize() const; | |
55852 | ||
55853 | private: | |
55854 | private: static const wxEventTableEntry sm_eventTableEntries[]; protected: static const wxEventTable sm_eventTable; virtual const wxEventTable* GetEventTable() const; static wxEventHashTable sm_eventHashTable; virtual wxEventHashTable& GetEventHashTable() const; | |
55855 | private: wxStatusBar(const wxStatusBar&); wxStatusBar& operator=(const wxStatusBar&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
55856 | }; | |
55857 | # 170 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/statusbr.h" 2 | |
55858 | # 76 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
55859 | ||
55860 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/choicdlg.h" 1 | |
55861 | # 17 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/choicdlg.h" | |
55862 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/choicdgg.h" 1 | |
55863 | # 19 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/choicdgg.h" | |
55864 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dynarray.h" 1 | |
55865 | # 20 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/choicdgg.h" 2 | |
55866 | ||
55867 | ||
55868 | class wxListBox; | |
55869 | # 43 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/choicdgg.h" | |
55870 | class wxAnyChoiceDialog : public wxDialog | |
55871 | { | |
55872 | public: | |
55873 | wxAnyChoiceDialog() { } | |
55874 | ||
55875 | wxAnyChoiceDialog(wxWindow *parent, | |
55876 | const wxString& message, | |
55877 | const wxString& caption, | |
55878 | int n, const wxString *choices, | |
55879 | long styleDlg = ((0x20000000 | 0x0800 | 0x1000) | 0x0040 | 0x00000004 | 0x00000010 | wxCENTRE), | |
55880 | const wxPoint& pos = wxDefaultPosition, | |
55881 | long styleLbox = 0x0400) | |
55882 | { | |
55883 | (void)Create(parent, message, caption, n, choices, | |
55884 | styleDlg, pos, styleLbox); | |
55885 | } | |
55886 | wxAnyChoiceDialog(wxWindow *parent, | |
55887 | const wxString& message, | |
55888 | const wxString& caption, | |
55889 | const wxArrayString& choices, | |
55890 | long styleDlg = ((0x20000000 | 0x0800 | 0x1000) | 0x0040 | 0x00000004 | 0x00000010 | wxCENTRE), | |
55891 | const wxPoint& pos = wxDefaultPosition, | |
55892 | long styleLbox = 0x0400) | |
55893 | { | |
55894 | (void)Create(parent, message, caption, choices, | |
55895 | styleDlg, pos, styleLbox); | |
55896 | } | |
55897 | ||
55898 | bool Create(wxWindow *parent, | |
55899 | const wxString& message, | |
55900 | const wxString& caption, | |
55901 | int n, const wxString *choices, | |
55902 | long styleDlg = ((0x20000000 | 0x0800 | 0x1000) | 0x0040 | 0x00000004 | 0x00000010 | wxCENTRE), | |
55903 | const wxPoint& pos = wxDefaultPosition, | |
55904 | long styleLbox = 0x0400); | |
55905 | bool Create(wxWindow *parent, | |
55906 | const wxString& message, | |
55907 | const wxString& caption, | |
55908 | const wxArrayString& choices, | |
55909 | long styleDlg = ((0x20000000 | 0x0800 | 0x1000) | 0x0040 | 0x00000004 | 0x00000010 | wxCENTRE), | |
55910 | const wxPoint& pos = wxDefaultPosition, | |
55911 | long styleLbox = 0x0400); | |
55912 | ||
55913 | protected: | |
55914 | wxListBox *m_listbox; | |
55915 | ||
55916 | private: wxAnyChoiceDialog(const wxAnyChoiceDialog&); wxAnyChoiceDialog& operator=(const wxAnyChoiceDialog&); | |
55917 | }; | |
55918 | ||
55919 | ||
55920 | ||
55921 | ||
55922 | ||
55923 | class wxSingleChoiceDialog : public wxAnyChoiceDialog | |
55924 | { | |
55925 | public: | |
55926 | wxSingleChoiceDialog() | |
55927 | { | |
55928 | m_selection = -1; | |
55929 | } | |
55930 | ||
55931 | wxSingleChoiceDialog(wxWindow *parent, | |
55932 | const wxString& message, | |
55933 | const wxString& caption, | |
55934 | int n, | |
55935 | const wxString *choices, | |
55936 | char **clientData = (char **)__null, | |
55937 | long style = ((0x20000000 | 0x0800 | 0x1000) | 0x0040 | 0x00000004 | 0x00000010 | wxCENTRE), | |
55938 | const wxPoint& pos = wxDefaultPosition); | |
55939 | wxSingleChoiceDialog(wxWindow *parent, | |
55940 | const wxString& message, | |
55941 | const wxString& caption, | |
55942 | const wxArrayString& choices, | |
55943 | char **clientData = (char **)__null, | |
55944 | long style = ((0x20000000 | 0x0800 | 0x1000) | 0x0040 | 0x00000004 | 0x00000010 | wxCENTRE), | |
55945 | const wxPoint& pos = wxDefaultPosition); | |
55946 | ||
55947 | bool Create(wxWindow *parent, | |
55948 | const wxString& message, | |
55949 | const wxString& caption, | |
55950 | int n, | |
55951 | const wxString *choices, | |
55952 | char **clientData = (char **)__null, | |
55953 | long style = ((0x20000000 | 0x0800 | 0x1000) | 0x0040 | 0x00000004 | 0x00000010 | wxCENTRE), | |
55954 | const wxPoint& pos = wxDefaultPosition); | |
55955 | bool Create(wxWindow *parent, | |
55956 | const wxString& message, | |
55957 | const wxString& caption, | |
55958 | const wxArrayString& choices, | |
55959 | char **clientData = (char **)__null, | |
55960 | long style = ((0x20000000 | 0x0800 | 0x1000) | 0x0040 | 0x00000004 | 0x00000010 | wxCENTRE), | |
55961 | const wxPoint& pos = wxDefaultPosition); | |
55962 | ||
55963 | void SetSelection(int sel); | |
55964 | int GetSelection() const { return m_selection; } | |
55965 | wxString GetStringSelection() const { return m_stringSelection; } | |
55966 | ||
55967 | ||
55968 | char *GetSelectionClientData() const { return (char *)m_clientData; } | |
55969 | ||
55970 | ||
55971 | void OnOK(wxCommandEvent& event); | |
55972 | void OnListBoxDClick(wxCommandEvent& event); | |
55973 | ||
55974 | protected: | |
55975 | int m_selection; | |
55976 | wxString m_stringSelection; | |
55977 | ||
55978 | private: | |
55979 | private: wxSingleChoiceDialog(const wxSingleChoiceDialog&); wxSingleChoiceDialog& operator=(const wxSingleChoiceDialog&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
55980 | private: static const wxEventTableEntry sm_eventTableEntries[]; protected: static const wxEventTable sm_eventTable; virtual const wxEventTable* GetEventTable() const; static wxEventHashTable sm_eventHashTable; virtual wxEventHashTable& GetEventHashTable() const; | |
55981 | }; | |
55982 | ||
55983 | ||
55984 | ||
55985 | ||
55986 | ||
55987 | class wxMultiChoiceDialog : public wxAnyChoiceDialog | |
55988 | { | |
55989 | public: | |
55990 | wxMultiChoiceDialog() { } | |
55991 | ||
55992 | wxMultiChoiceDialog(wxWindow *parent, | |
55993 | const wxString& message, | |
55994 | const wxString& caption, | |
55995 | int n, | |
55996 | const wxString *choices, | |
55997 | long style = ((0x20000000 | 0x0800 | 0x1000) | 0x0040 | 0x00000004 | 0x00000010 | wxCENTRE), | |
55998 | const wxPoint& pos = wxDefaultPosition) | |
55999 | { | |
56000 | (void)Create(parent, message, caption, n, choices, style, pos); | |
56001 | } | |
56002 | wxMultiChoiceDialog(wxWindow *parent, | |
56003 | const wxString& message, | |
56004 | const wxString& caption, | |
56005 | const wxArrayString& choices, | |
56006 | long style = ((0x20000000 | 0x0800 | 0x1000) | 0x0040 | 0x00000004 | 0x00000010 | wxCENTRE), | |
56007 | const wxPoint& pos = wxDefaultPosition) | |
56008 | { | |
56009 | (void)Create(parent, message, caption, choices, style, pos); | |
56010 | } | |
56011 | ||
56012 | bool Create(wxWindow *parent, | |
56013 | const wxString& message, | |
56014 | const wxString& caption, | |
56015 | int n, | |
56016 | const wxString *choices, | |
56017 | long style = ((0x20000000 | 0x0800 | 0x1000) | 0x0040 | 0x00000004 | 0x00000010 | wxCENTRE), | |
56018 | const wxPoint& pos = wxDefaultPosition); | |
56019 | bool Create(wxWindow *parent, | |
56020 | const wxString& message, | |
56021 | const wxString& caption, | |
56022 | const wxArrayString& choices, | |
56023 | long style = ((0x20000000 | 0x0800 | 0x1000) | 0x0040 | 0x00000004 | 0x00000010 | wxCENTRE), | |
56024 | const wxPoint& pos = wxDefaultPosition); | |
56025 | ||
56026 | void SetSelections(const wxArrayInt& selections); | |
56027 | wxArrayInt GetSelections() const { return m_selections; } | |
56028 | ||
56029 | ||
56030 | virtual bool TransferDataFromWindow(); | |
56031 | ||
56032 | protected: | |
56033 | wxArrayInt m_selections; | |
56034 | ||
56035 | private: | |
56036 | private: wxMultiChoiceDialog(const wxMultiChoiceDialog&); wxMultiChoiceDialog& operator=(const wxMultiChoiceDialog&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
56037 | }; | |
56038 | ||
56039 | ||
56040 | ||
56041 | ||
56042 | ||
56043 | ||
56044 | wxString wxGetSingleChoice(const wxString& message, | |
56045 | const wxString& caption, | |
56046 | const wxArrayString& choices, | |
56047 | wxWindow *parent = (wxWindow *) __null, | |
56048 | int x = wxDefaultCoord, | |
56049 | int y = wxDefaultCoord, | |
56050 | bool centre = true, | |
56051 | int width = 200, | |
56052 | int height = 150); | |
56053 | ||
56054 | wxString wxGetSingleChoice(const wxString& message, | |
56055 | const wxString& caption, | |
56056 | int n, const wxString *choices, | |
56057 | wxWindow *parent = (wxWindow *) __null, | |
56058 | int x = wxDefaultCoord, | |
56059 | int y = wxDefaultCoord, | |
56060 | bool centre = true, | |
56061 | int width = 200, | |
56062 | int height = 150); | |
56063 | ||
56064 | ||
56065 | ||
56066 | int wxGetSingleChoiceIndex(const wxString& message, | |
56067 | const wxString& caption, | |
56068 | const wxArrayString& choices, | |
56069 | wxWindow *parent = (wxWindow *) __null, | |
56070 | int x = wxDefaultCoord, | |
56071 | int y = wxDefaultCoord, | |
56072 | bool centre = true, | |
56073 | int width = 200, | |
56074 | int height = 150); | |
56075 | ||
56076 | int wxGetSingleChoiceIndex(const wxString& message, | |
56077 | const wxString& caption, | |
56078 | int n, const wxString *choices, | |
56079 | wxWindow *parent = (wxWindow *) __null, | |
56080 | int x = wxDefaultCoord, | |
56081 | int y = wxDefaultCoord, | |
56082 | bool centre = true, | |
56083 | int width = 200, | |
56084 | int height = 150); | |
56085 | ||
56086 | ||
56087 | void* wxGetSingleChoiceData(const wxString& message, | |
56088 | const wxString& caption, | |
56089 | const wxArrayString& choices, | |
56090 | void **client_data, | |
56091 | wxWindow *parent = (wxWindow *) __null, | |
56092 | int x = wxDefaultCoord, | |
56093 | int y = wxDefaultCoord, | |
56094 | bool centre = true, | |
56095 | int width = 200, | |
56096 | int height = 150); | |
56097 | ||
56098 | void* wxGetSingleChoiceData(const wxString& message, | |
56099 | const wxString& caption, | |
56100 | int n, const wxString *choices, | |
56101 | void **client_data, | |
56102 | wxWindow *parent = (wxWindow *) __null, | |
56103 | int x = wxDefaultCoord, | |
56104 | int y = wxDefaultCoord, | |
56105 | bool centre = true, | |
56106 | int width = 200, | |
56107 | int height = 150); | |
56108 | ||
56109 | ||
56110 | ||
56111 | ||
56112 | size_t wxGetMultipleChoices(wxArrayInt& selections, | |
56113 | const wxString& message, | |
56114 | const wxString& caption, | |
56115 | int n, const wxString *choices, | |
56116 | wxWindow *parent = (wxWindow *) __null, | |
56117 | int x = wxDefaultCoord, | |
56118 | int y = wxDefaultCoord, | |
56119 | bool centre = true, | |
56120 | int width = 200, | |
56121 | int height = 150); | |
56122 | ||
56123 | size_t wxGetMultipleChoices(wxArrayInt& selections, | |
56124 | const wxString& message, | |
56125 | const wxString& caption, | |
56126 | const wxArrayString& choices, | |
56127 | wxWindow *parent = (wxWindow *) __null, | |
56128 | int x = wxDefaultCoord, | |
56129 | int y = wxDefaultCoord, | |
56130 | bool centre = true, | |
56131 | int width = 200, | |
56132 | int height = 150); | |
56133 | # 18 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/choicdlg.h" 2 | |
56134 | # 78 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
56135 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/textdlg.h" 1 | |
56136 | # 15 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/textdlg.h" | |
56137 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/textdlgg.h" 1 | |
56138 | # 26 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/textdlgg.h" | |
56139 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/valtext.h" 1 | |
56140 | # 36 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/valtext.h" | |
56141 | class wxTextValidator: public wxValidator | |
56142 | { | |
56143 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
56144 | public: | |
56145 | ||
56146 | wxTextValidator(long style = 0x0000, wxString *val = 0); | |
56147 | wxTextValidator(const wxTextValidator& val); | |
56148 | ||
56149 | ~wxTextValidator(){} | |
56150 | ||
56151 | ||
56152 | ||
56153 | ||
56154 | ||
56155 | virtual wxObject *Clone() const { return new wxTextValidator(*this); } | |
56156 | bool Copy(const wxTextValidator& val); | |
56157 | ||
56158 | ||
56159 | ||
56160 | virtual bool Validate(wxWindow *parent); | |
56161 | ||
56162 | ||
56163 | virtual bool TransferToWindow(); | |
56164 | ||
56165 | ||
56166 | virtual bool TransferFromWindow(); | |
56167 | ||
56168 | ||
56169 | inline long GetStyle() const { return m_validatorStyle; } | |
56170 | inline void SetStyle(long style) { m_validatorStyle = style; } | |
56171 | ||
56172 | ||
56173 | void SetIncludeList(const wxStringList& list) __attribute__ ((deprecated)); | |
56174 | wxStringList& GetIncludeList() __attribute__ ((deprecated)); | |
56175 | ||
56176 | void SetExcludeList(const wxStringList& list) __attribute__ ((deprecated)); | |
56177 | wxStringList& GetExcludeList() __attribute__ ((deprecated)); | |
56178 | ||
56179 | bool IsInCharIncludeList(const wxString& val) __attribute__ ((deprecated)); | |
56180 | bool IsNotInCharExcludeList(const wxString& val) __attribute__ ((deprecated)); | |
56181 | ||
56182 | ||
56183 | void SetIncludes(const wxArrayString& includes) { m_includes = includes; } | |
56184 | inline wxArrayString& GetIncludes() { return m_includes; } | |
56185 | ||
56186 | void SetExcludes(const wxArrayString& excludes) { m_excludes = excludes; } | |
56187 | inline wxArrayString& GetExcludes() { return m_excludes; } | |
56188 | ||
56189 | bool IsInCharIncludes(const wxString& val); | |
56190 | bool IsNotInCharExcludes(const wxString& val); | |
56191 | ||
56192 | ||
56193 | void OnChar(wxKeyEvent& event); | |
56194 | ||
56195 | ||
56196 | private: static const wxEventTableEntry sm_eventTableEntries[]; protected: static const wxEventTable sm_eventTable; virtual const wxEventTable* GetEventTable() const; static wxEventHashTable sm_eventHashTable; virtual wxEventHashTable& GetEventHashTable() const; | |
56197 | ||
56198 | protected: | |
56199 | long m_validatorStyle; | |
56200 | wxString * m_stringValue; | |
56201 | ||
56202 | wxStringList m_includeList; | |
56203 | wxStringList m_excludeList; | |
56204 | ||
56205 | wxArrayString m_includes; | |
56206 | wxArrayString m_excludes; | |
56207 | ||
56208 | bool CheckValidator() const | |
56209 | { | |
56210 | if (!(m_validatorWindow)) {; return false; }; | |
56211 | ||
56212 | if (!(m_validatorWindow->IsKindOf((&wxTextCtrl::ms_classInfo)))) {; return false; }; | |
56213 | ||
56214 | ||
56215 | return true; | |
56216 | } | |
56217 | ||
56218 | private: | |
56219 | ||
56220 | ||
56221 | ||
56222 | ||
56223 | ||
56224 | wxTextValidator& operator=(const wxTextValidator&); | |
56225 | }; | |
56226 | # 27 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/textdlgg.h" 2 | |
56227 | ||
56228 | ||
56229 | class wxTextCtrl; | |
56230 | ||
56231 | extern const wxChar* wxGetTextFromUserPromptStr; | |
56232 | extern const wxChar* wxGetPasswordFromUserPromptStr; | |
56233 | ||
56234 | ||
56235 | ||
56236 | ||
56237 | ||
56238 | ||
56239 | ||
56240 | class wxTextEntryDialog : public wxDialog | |
56241 | { | |
56242 | public: | |
56243 | wxTextEntryDialog(wxWindow *parent, | |
56244 | const wxString& message, | |
56245 | const wxString& caption = wxGetTextFromUserPromptStr, | |
56246 | const wxString& value = wxEmptyString, | |
56247 | long style = (0x00000004 | 0x00000010 | wxCENTRE | 0x00000001), | |
56248 | const wxPoint& pos = wxDefaultPosition); | |
56249 | ||
56250 | void SetValue(const wxString& val); | |
56251 | wxString GetValue() const { return m_value; } | |
56252 | ||
56253 | ||
56254 | void SetTextValidator( wxTextValidator& validator ); | |
56255 | void SetTextValidator( long style = 0x0000 ); | |
56256 | wxTextValidator* GetTextValidator() { return (wxTextValidator*)m_textctrl->GetValidator(); } | |
56257 | ||
56258 | ||
56259 | ||
56260 | ||
56261 | void OnOK(wxCommandEvent& event); | |
56262 | ||
56263 | protected: | |
56264 | wxTextCtrl *m_textctrl; | |
56265 | wxString m_value; | |
56266 | long m_dialogStyle; | |
56267 | ||
56268 | private: | |
56269 | private: static const wxEventTableEntry sm_eventTableEntries[]; protected: static const wxEventTable sm_eventTable; virtual const wxEventTable* GetEventTable() const; static wxEventHashTable sm_eventHashTable; virtual wxEventHashTable& GetEventHashTable() const; | |
56270 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
56271 | private: wxTextEntryDialog(const wxTextEntryDialog&); wxTextEntryDialog& operator=(const wxTextEntryDialog&); | |
56272 | }; | |
56273 | ||
56274 | ||
56275 | ||
56276 | ||
56277 | ||
56278 | class wxPasswordEntryDialog : public wxTextEntryDialog | |
56279 | { | |
56280 | public: | |
56281 | wxPasswordEntryDialog(wxWindow *parent, | |
56282 | const wxString& message, | |
56283 | const wxString& caption = wxGetPasswordFromUserPromptStr, | |
56284 | const wxString& value = wxEmptyString, | |
56285 | long style = (0x00000004 | 0x00000010 | wxCENTRE | 0x00000001), | |
56286 | const wxPoint& pos = wxDefaultPosition); | |
56287 | private: | |
56288 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
56289 | private: wxPasswordEntryDialog(const wxPasswordEntryDialog&); wxPasswordEntryDialog& operator=(const wxPasswordEntryDialog&); | |
56290 | }; | |
56291 | ||
56292 | ||
56293 | ||
56294 | ||
56295 | ||
56296 | wxString | |
56297 | wxGetTextFromUser(const wxString& message, | |
56298 | const wxString& caption = wxGetTextFromUserPromptStr, | |
56299 | const wxString& default_value = wxEmptyString, | |
56300 | wxWindow *parent = (wxWindow *) __null, | |
56301 | wxCoord x = wxDefaultCoord, | |
56302 | wxCoord y = wxDefaultCoord, | |
56303 | bool centre = true); | |
56304 | ||
56305 | wxString | |
56306 | wxGetPasswordFromUser(const wxString& message, | |
56307 | const wxString& caption = wxGetPasswordFromUserPromptStr, | |
56308 | const wxString& default_value = wxEmptyString, | |
56309 | wxWindow *parent = (wxWindow *) __null, | |
56310 | wxCoord x = wxDefaultCoord, | |
56311 | wxCoord y = wxDefaultCoord, | |
56312 | bool centre = true); | |
56313 | # 16 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/textdlg.h" 2 | |
56314 | ||
56315 | ||
56316 | ||
56317 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/numdlg.h" 1 | |
56318 | # 17 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/numdlg.h" | |
56319 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/numdlgg.h" 1 | |
56320 | # 26 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/numdlgg.h" | |
56321 | class wxSpinCtrl; | |
56322 | # 35 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/numdlgg.h" | |
56323 | class wxNumberEntryDialog : public wxDialog | |
56324 | { | |
56325 | public: | |
56326 | wxNumberEntryDialog(wxWindow *parent, | |
56327 | const wxString& message, | |
56328 | const wxString& prompt, | |
56329 | const wxString& caption, | |
56330 | long value, long min, long max, | |
56331 | const wxPoint& pos = wxDefaultPosition); | |
56332 | ||
56333 | long GetValue() const { return m_value; } | |
56334 | ||
56335 | ||
56336 | void OnOK(wxCommandEvent& event); | |
56337 | void OnCancel(wxCommandEvent& event); | |
56338 | ||
56339 | protected: | |
56340 | ||
56341 | ||
56342 | wxSpinCtrl *m_spinctrl; | |
56343 | ||
56344 | ||
56345 | ||
56346 | ||
56347 | long m_value, m_min, m_max; | |
56348 | ||
56349 | private: | |
56350 | private: static const wxEventTableEntry sm_eventTableEntries[]; protected: static const wxEventTable sm_eventTable; virtual const wxEventTable* GetEventTable() const; static wxEventHashTable sm_eventHashTable; virtual wxEventHashTable& GetEventHashTable() const; | |
56351 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
56352 | private: wxNumberEntryDialog(const wxNumberEntryDialog&); wxNumberEntryDialog& operator=(const wxNumberEntryDialog&); | |
56353 | }; | |
56354 | ||
56355 | ||
56356 | ||
56357 | ||
56358 | ||
56359 | long | |
56360 | wxGetNumberFromUser(const wxString& message, | |
56361 | const wxString& prompt, | |
56362 | const wxString& caption, | |
56363 | long value = 0, | |
56364 | long min = 0, | |
56365 | long max = 100, | |
56366 | wxWindow *parent = (wxWindow *)__null, | |
56367 | const wxPoint& pos = wxDefaultPosition); | |
56368 | # 18 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/numdlg.h" 2 | |
56369 | # 20 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/textdlg.h" 2 | |
56370 | # 79 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
56371 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/filedlg.h" 1 | |
56372 | # 30 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/filedlg.h" | |
56373 | enum | |
56374 | { | |
56375 | wxOPEN = 0x0001, | |
56376 | wxSAVE = 0x0002, | |
56377 | wxOVERWRITE_PROMPT = 0x0004, | |
56378 | ||
56379 | wxHIDE_READONLY = 0x0008, | |
56380 | ||
56381 | wxFILE_MUST_EXIST = 0x0010, | |
56382 | wxMULTIPLE = 0x0020, | |
56383 | wxCHANGE_DIR = 0x0040 | |
56384 | }; | |
56385 | ||
56386 | extern const wxChar* wxFileSelectorPromptStr; | |
56387 | extern const wxChar* wxFileSelectorDefaultWildcardStr; | |
56388 | ||
56389 | ||
56390 | ||
56391 | ||
56392 | ||
56393 | class wxFileDialogBase: public wxDialog | |
56394 | { | |
56395 | public: | |
56396 | wxFileDialogBase () { Init(); } | |
56397 | ||
56398 | wxFileDialogBase(wxWindow *parent, | |
56399 | const wxString& message = wxFileSelectorPromptStr, | |
56400 | const wxString& defaultDir = wxEmptyString, | |
56401 | const wxString& defaultFile = wxEmptyString, | |
56402 | const wxString& wildCard = wxFileSelectorDefaultWildcardStr, | |
56403 | long style = 0, | |
56404 | const wxPoint& pos = wxDefaultPosition) : wxDialog() | |
56405 | { | |
56406 | Init(); | |
56407 | Create(parent, message, defaultDir, defaultFile, wildCard, style, pos); | |
56408 | } | |
56409 | ||
56410 | bool Create(wxWindow *parent, | |
56411 | const wxString& message = wxFileSelectorPromptStr, | |
56412 | const wxString& defaultDir = wxEmptyString, | |
56413 | const wxString& defaultFile = wxEmptyString, | |
56414 | const wxString& wildCard = wxFileSelectorDefaultWildcardStr, | |
56415 | long style = 0, | |
56416 | const wxPoint& pos = wxDefaultPosition); | |
56417 | ||
56418 | virtual void SetMessage(const wxString& message) { m_message = message; } | |
56419 | virtual void SetPath(const wxString& path) { m_path = path; } | |
56420 | virtual void SetDirectory(const wxString& dir) { m_dir = dir; } | |
56421 | virtual void SetFilename(const wxString& name) { m_fileName = name; } | |
56422 | virtual void SetWildcard(const wxString& wildCard) { m_wildCard = wildCard; } | |
56423 | virtual void SetStyle(long style) { m_dialogStyle = style; } | |
56424 | virtual void SetFilterIndex(int filterIndex) { m_filterIndex = filterIndex; } | |
56425 | ||
56426 | virtual wxString GetMessage() const { return m_message; } | |
56427 | virtual wxString GetPath() const { return m_path; } | |
56428 | virtual void GetPaths(wxArrayString& paths) const { paths.Empty(); paths.Add(m_path); } | |
56429 | virtual wxString GetDirectory() const { return m_dir; } | |
56430 | virtual wxString GetFilename() const { return m_fileName; } | |
56431 | virtual void GetFilenames(wxArrayString& files) const { files.Empty(); files.Add(m_fileName); } | |
56432 | virtual wxString GetWildcard() const { return m_wildCard; } | |
56433 | virtual long GetStyle() const { return m_dialogStyle; } | |
56434 | virtual int GetFilterIndex() const { return m_filterIndex; } | |
56435 | # 101 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/filedlg.h" | |
56436 | static int ParseWildcard(const wxString& wildCard, wxArrayString& descriptions, wxArrayString& filters) __attribute__ ((deprecated)); | |
56437 | # 110 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/filedlg.h" | |
56438 | static wxString AppendExtension(const wxString &filePath, | |
56439 | const wxString &extensionList); | |
56440 | ||
56441 | protected: | |
56442 | wxString m_message; | |
56443 | long m_dialogStyle; | |
56444 | wxWindow *m_parent; | |
56445 | wxString m_dir; | |
56446 | wxString m_path; | |
56447 | wxString m_fileName; | |
56448 | wxString m_wildCard; | |
56449 | int m_filterIndex; | |
56450 | ||
56451 | private: | |
56452 | void Init(); | |
56453 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
56454 | private: wxFileDialogBase(const wxFileDialogBase&); wxFileDialogBase& operator=(const wxFileDialogBase&); | |
56455 | }; | |
56456 | ||
56457 | ||
56458 | ||
56459 | ||
56460 | ||
56461 | ||
56462 | wxString | |
56463 | wxFileSelector(const wxChar *message = wxFileSelectorPromptStr, | |
56464 | const wxChar *default_path = __null, | |
56465 | const wxChar *default_filename = __null, | |
56466 | const wxChar *default_extension = __null, | |
56467 | const wxChar *wildcard = wxFileSelectorDefaultWildcardStr, | |
56468 | int flags = 0, | |
56469 | wxWindow *parent = __null, | |
56470 | int x = wxDefaultCoord, int y = wxDefaultCoord); | |
56471 | ||
56472 | ||
56473 | wxString | |
56474 | wxFileSelectorEx(const wxChar *message = wxFileSelectorPromptStr, | |
56475 | const wxChar *default_path = __null, | |
56476 | const wxChar *default_filename = __null, | |
56477 | int *indexDefaultExtension = __null, | |
56478 | const wxChar *wildcard = wxFileSelectorDefaultWildcardStr, | |
56479 | int flags = 0, | |
56480 | wxWindow *parent = __null, | |
56481 | int x = wxDefaultCoord, int y = wxDefaultCoord); | |
56482 | ||
56483 | ||
56484 | wxString | |
56485 | wxLoadFileSelector(const wxChar *what, | |
56486 | const wxChar *extension, | |
56487 | const wxChar *default_name = (const wxChar *)__null, | |
56488 | wxWindow *parent = (wxWindow *) __null); | |
56489 | ||
56490 | ||
56491 | wxString | |
56492 | wxSaveFileSelector(const wxChar *what, | |
56493 | const wxChar *extension, | |
56494 | const wxChar *default_name = (const wxChar *) __null, | |
56495 | wxWindow *parent = (wxWindow *) __null); | |
56496 | # 177 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/filedlg.h" | |
56497 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/filedlg.h" 1 | |
56498 | # 18 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/filedlg.h" | |
56499 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/filedlgg.h" 1 | |
56500 | # 19 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/filedlgg.h" | |
56501 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/listctrl.h" 1 | |
56502 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/listctrl.h" | |
56503 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/listbase.h" 1 | |
56504 | # 34 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/listbase.h" | |
56505 | typedef int ( *wxListCtrlCompare)(long item1, long item2, long sortData); | |
56506 | # 112 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/listbase.h" | |
56507 | enum | |
56508 | { | |
56509 | wxLIST_NEXT_ABOVE, | |
56510 | wxLIST_NEXT_ALL, | |
56511 | wxLIST_NEXT_BELOW, | |
56512 | wxLIST_NEXT_LEFT, | |
56513 | wxLIST_NEXT_RIGHT | |
56514 | }; | |
56515 | ||
56516 | ||
56517 | enum | |
56518 | { | |
56519 | wxLIST_ALIGN_DEFAULT, | |
56520 | wxLIST_ALIGN_LEFT, | |
56521 | wxLIST_ALIGN_TOP, | |
56522 | wxLIST_ALIGN_SNAP_TO_GRID | |
56523 | }; | |
56524 | ||
56525 | ||
56526 | enum wxListColumnFormat | |
56527 | { | |
56528 | wxLIST_FORMAT_LEFT, | |
56529 | wxLIST_FORMAT_RIGHT, | |
56530 | wxLIST_FORMAT_CENTRE, | |
56531 | wxLIST_FORMAT_CENTER = wxLIST_FORMAT_CENTRE | |
56532 | }; | |
56533 | ||
56534 | ||
56535 | enum | |
56536 | { | |
56537 | wxLIST_AUTOSIZE = -1, | |
56538 | wxLIST_AUTOSIZE_USEHEADER = -2 | |
56539 | }; | |
56540 | ||
56541 | ||
56542 | enum | |
56543 | { | |
56544 | wxLIST_RECT_BOUNDS, | |
56545 | wxLIST_RECT_ICON, | |
56546 | wxLIST_RECT_LABEL | |
56547 | }; | |
56548 | ||
56549 | ||
56550 | enum | |
56551 | { | |
56552 | wxLIST_FIND_UP, | |
56553 | wxLIST_FIND_DOWN, | |
56554 | wxLIST_FIND_LEFT, | |
56555 | wxLIST_FIND_RIGHT | |
56556 | }; | |
56557 | ||
56558 | ||
56559 | ||
56560 | ||
56561 | ||
56562 | class wxListItemAttr | |
56563 | { | |
56564 | public: | |
56565 | ||
56566 | wxListItemAttr() { } | |
56567 | wxListItemAttr(const wxColour& colText, | |
56568 | const wxColour& colBack, | |
56569 | const wxFont& font) | |
56570 | : m_colText(colText), m_colBack(colBack), m_font(font) { } | |
56571 | ||
56572 | ||
56573 | void SetTextColour(const wxColour& colText) { m_colText = colText; } | |
56574 | void SetBackgroundColour(const wxColour& colBack) { m_colBack = colBack; } | |
56575 | void SetFont(const wxFont& font) { m_font = font; } | |
56576 | ||
56577 | ||
56578 | bool HasTextColour() const { return m_colText.Ok(); } | |
56579 | bool HasBackgroundColour() const { return m_colBack.Ok(); } | |
56580 | bool HasFont() const { return m_font.Ok(); } | |
56581 | ||
56582 | const wxColour& GetTextColour() const { return m_colText; } | |
56583 | const wxColour& GetBackgroundColour() const { return m_colBack; } | |
56584 | const wxFont& GetFont() const { return m_font; } | |
56585 | ||
56586 | private: | |
56587 | wxColour m_colText, | |
56588 | m_colBack; | |
56589 | wxFont m_font; | |
56590 | }; | |
56591 | ||
56592 | ||
56593 | ||
56594 | ||
56595 | ||
56596 | class wxListItem : public wxObject | |
56597 | { | |
56598 | public: | |
56599 | wxListItem() { Init(); m_attr = __null; } | |
56600 | wxListItem(const wxListItem& item) | |
56601 | : wxObject(), | |
56602 | m_mask(item.m_mask), | |
56603 | m_itemId(item.m_itemId), | |
56604 | m_col(item.m_col), | |
56605 | m_state(item.m_state), | |
56606 | m_stateMask(item.m_stateMask), | |
56607 | m_text(item.m_text), | |
56608 | m_image(item.m_image), | |
56609 | m_data(item.m_data), | |
56610 | m_format(item.m_format), | |
56611 | m_width(item.m_width), | |
56612 | m_attr(__null) | |
56613 | { | |
56614 | ||
56615 | if( item.HasAttributes() ) | |
56616 | m_attr = new wxListItemAttr(*item.GetAttributes()); | |
56617 | } | |
56618 | virtual ~wxListItem() { delete m_attr; } | |
56619 | ||
56620 | ||
56621 | void Clear() { Init(); m_text.clear(); ClearAttributes(); } | |
56622 | void ClearAttributes() { if ( m_attr ) { delete m_attr; m_attr = __null; } } | |
56623 | ||
56624 | ||
56625 | void SetMask(long mask) | |
56626 | { m_mask = mask; } | |
56627 | void SetId(long id) | |
56628 | { m_itemId = id; } | |
56629 | void SetColumn(int col) | |
56630 | { m_col = col; } | |
56631 | void SetState(long state) | |
56632 | { m_mask |= 0x0001; m_state = state; m_stateMask |= state; } | |
56633 | void SetStateMask(long stateMask) | |
56634 | { m_stateMask = stateMask; } | |
56635 | void SetText(const wxString& text) | |
56636 | { m_mask |= 0x0002; m_text = text; } | |
56637 | void SetImage(int image) | |
56638 | { m_mask |= 0x0004; m_image = image; } | |
56639 | void SetData(long data) | |
56640 | { m_mask |= 0x0008; m_data = data; } | |
56641 | void SetData(void *data) | |
56642 | { m_mask |= 0x0008; m_data = wxPtrToUInt(data); } | |
56643 | ||
56644 | void SetWidth(int width) | |
56645 | { m_mask |= 0x0020; m_width = width; } | |
56646 | void SetAlign(wxListColumnFormat align) | |
56647 | { m_mask |= 0x0040; m_format = align; } | |
56648 | ||
56649 | void SetTextColour(const wxColour& colText) | |
56650 | { Attributes().SetTextColour(colText); } | |
56651 | void SetBackgroundColour(const wxColour& colBack) | |
56652 | { Attributes().SetBackgroundColour(colBack); } | |
56653 | void SetFont(const wxFont& font) | |
56654 | { Attributes().SetFont(font); } | |
56655 | ||
56656 | ||
56657 | long GetMask() const { return m_mask; } | |
56658 | long GetId() const { return m_itemId; } | |
56659 | int GetColumn() const { return m_col; } | |
56660 | long GetState() const { return m_state & m_stateMask; } | |
56661 | const wxString& GetText() const { return m_text; } | |
56662 | int GetImage() const { return m_image; } | |
56663 | wxUIntPtr GetData() const { return m_data; } | |
56664 | ||
56665 | int GetWidth() const { return m_width; } | |
56666 | wxListColumnFormat GetAlign() const { return (wxListColumnFormat)m_format; } | |
56667 | ||
56668 | wxListItemAttr *GetAttributes() const { return m_attr; } | |
56669 | bool HasAttributes() const { return m_attr != __null; } | |
56670 | ||
56671 | wxColour GetTextColour() const | |
56672 | { return HasAttributes() ? m_attr->GetTextColour() : wxNullColour; } | |
56673 | wxColour GetBackgroundColour() const | |
56674 | { return HasAttributes() ? m_attr->GetBackgroundColour() | |
56675 | : wxNullColour; } | |
56676 | wxFont GetFont() const | |
56677 | { return HasAttributes() ? m_attr->GetFont() : wxNullFont; } | |
56678 | ||
56679 | ||
56680 | ||
56681 | operator long() const { return m_itemId; } | |
56682 | ||
56683 | ||
56684 | ||
56685 | long m_mask; | |
56686 | long m_itemId; | |
56687 | int m_col; | |
56688 | long m_state; | |
56689 | long m_stateMask; | |
56690 | wxString m_text; | |
56691 | int m_image; | |
56692 | wxUIntPtr m_data; | |
56693 | ||
56694 | ||
56695 | int m_format; | |
56696 | int m_width; | |
56697 | ||
56698 | ||
56699 | ||
56700 | ||
56701 | ||
56702 | protected: | |
56703 | ||
56704 | wxListItemAttr& Attributes() | |
56705 | { | |
56706 | if ( !m_attr ) | |
56707 | m_attr = new wxListItemAttr; | |
56708 | ||
56709 | return *m_attr; | |
56710 | } | |
56711 | ||
56712 | void Init() | |
56713 | { | |
56714 | m_mask = 0; | |
56715 | m_itemId = 0; | |
56716 | m_col = 0; | |
56717 | m_state = 0; | |
56718 | m_stateMask = 0; | |
56719 | m_image = 0; | |
56720 | m_data = 0; | |
56721 | ||
56722 | m_format = wxLIST_FORMAT_CENTRE; | |
56723 | m_width = 0; | |
56724 | } | |
56725 | ||
56726 | wxListItemAttr *m_attr; | |
56727 | ||
56728 | private: | |
56729 | ||
56730 | wxListItem& operator=(const wxListItem& item); | |
56731 | ||
56732 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
56733 | }; | |
56734 | ||
56735 | ||
56736 | ||
56737 | ||
56738 | ||
56739 | class wxListEvent : public wxNotifyEvent | |
56740 | { | |
56741 | public: | |
56742 | wxListEvent(wxEventType commandType = wxEVT_NULL, int winid = 0) | |
56743 | : wxNotifyEvent(commandType, winid) | |
56744 | , m_code(0) | |
56745 | , m_oldItemIndex(0) | |
56746 | , m_itemIndex(0) | |
56747 | , m_col(0) | |
56748 | , m_pointDrag() | |
56749 | , m_item() | |
56750 | , m_editCancelled(false) | |
56751 | { } | |
56752 | ||
56753 | wxListEvent(const wxListEvent& event) | |
56754 | : wxNotifyEvent(event) | |
56755 | , m_code(event.m_code) | |
56756 | , m_oldItemIndex(event.m_oldItemIndex) | |
56757 | , m_itemIndex(event.m_itemIndex) | |
56758 | , m_col(event.m_col) | |
56759 | , m_pointDrag(event.m_pointDrag) | |
56760 | , m_item(event.m_item) | |
56761 | , m_editCancelled(event.m_editCancelled) | |
56762 | { } | |
56763 | ||
56764 | int GetKeyCode() const { return m_code; } | |
56765 | long GetIndex() const { return m_itemIndex; } | |
56766 | int GetColumn() const { return m_col; } | |
56767 | wxPoint GetPoint() const { return m_pointDrag; } | |
56768 | const wxString& GetLabel() const { return m_item.m_text; } | |
56769 | const wxString& GetText() const { return m_item.m_text; } | |
56770 | int GetImage() const { return m_item.m_image; } | |
56771 | long GetData() const { return static_cast<long>(m_item.m_data); } | |
56772 | long GetMask() const { return m_item.m_mask; } | |
56773 | const wxListItem& GetItem() const { return m_item; } | |
56774 | ||
56775 | ||
56776 | long GetCacheFrom() const { return m_oldItemIndex; } | |
56777 | long GetCacheTo() const { return m_itemIndex; } | |
56778 | ||
56779 | ||
56780 | bool IsEditCancelled() const { return m_editCancelled; } | |
56781 | void SetEditCanceled(bool editCancelled) { m_editCancelled = editCancelled; } | |
56782 | # 397 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/listbase.h" | |
56783 | virtual wxEvent *Clone() const { return new wxListEvent(*this); } | |
56784 | ||
56785 | ||
56786 | int m_code; | |
56787 | long m_oldItemIndex; | |
56788 | long m_itemIndex; | |
56789 | int m_col; | |
56790 | wxPoint m_pointDrag; | |
56791 | ||
56792 | wxListItem m_item; | |
56793 | ||
56794 | protected: | |
56795 | bool m_editCancelled; | |
56796 | ||
56797 | private: | |
56798 | private: wxListEvent& operator=(const wxListEvent&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
56799 | }; | |
56800 | ||
56801 | ||
56802 | ||
56803 | ||
56804 | ||
56805 | ||
56806 | extern const wxEventType wxEVT_COMMAND_LIST_BEGIN_DRAG; | |
56807 | extern const wxEventType wxEVT_COMMAND_LIST_BEGIN_RDRAG; | |
56808 | extern const wxEventType wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT; | |
56809 | extern const wxEventType wxEVT_COMMAND_LIST_END_LABEL_EDIT; | |
56810 | extern const wxEventType wxEVT_COMMAND_LIST_DELETE_ITEM; | |
56811 | extern const wxEventType wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS; | |
56812 | ||
56813 | extern const wxEventType wxEVT_COMMAND_LIST_GET_INFO; | |
56814 | extern const wxEventType wxEVT_COMMAND_LIST_SET_INFO; | |
56815 | ||
56816 | extern const wxEventType wxEVT_COMMAND_LIST_ITEM_SELECTED; | |
56817 | extern const wxEventType wxEVT_COMMAND_LIST_ITEM_DESELECTED; | |
56818 | extern const wxEventType wxEVT_COMMAND_LIST_KEY_DOWN; | |
56819 | extern const wxEventType wxEVT_COMMAND_LIST_INSERT_ITEM; | |
56820 | extern const wxEventType wxEVT_COMMAND_LIST_COL_CLICK; | |
56821 | extern const wxEventType wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK; | |
56822 | extern const wxEventType wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK; | |
56823 | extern const wxEventType wxEVT_COMMAND_LIST_ITEM_ACTIVATED; | |
56824 | extern const wxEventType wxEVT_COMMAND_LIST_CACHE_HINT; | |
56825 | extern const wxEventType wxEVT_COMMAND_LIST_COL_RIGHT_CLICK; | |
56826 | extern const wxEventType wxEVT_COMMAND_LIST_COL_BEGIN_DRAG; | |
56827 | extern const wxEventType wxEVT_COMMAND_LIST_COL_DRAGGING; | |
56828 | extern const wxEventType wxEVT_COMMAND_LIST_COL_END_DRAG; | |
56829 | extern const wxEventType wxEVT_COMMAND_LIST_ITEM_FOCUSED; | |
56830 | ||
56831 | ||
56832 | typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&); | |
56833 | # 24 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/listctrl.h" 2 | |
56834 | ||
56835 | ||
56836 | ||
56837 | ||
56838 | ||
56839 | extern const wxChar* wxListCtrlNameStr; | |
56840 | # 38 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/listctrl.h" | |
56841 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/listctrl.h" 1 | |
56842 | # 23 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/listctrl.h" | |
56843 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/imaglist.h" 1 | |
56844 | # 19 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/imaglist.h" | |
56845 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/list.h" 1 | |
56846 | # 20 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/imaglist.h" 2 | |
56847 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/icon.h" 1 | |
56848 | # 21 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/imaglist.h" 2 | |
56849 | ||
56850 | class wxDC; | |
56851 | class wxBitmap; | |
56852 | class wxColour; | |
56853 | # 49 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/imaglist.h" | |
56854 | enum { | |
56855 | wxIMAGE_LIST_NORMAL, | |
56856 | wxIMAGE_LIST_SMALL, | |
56857 | wxIMAGE_LIST_STATE | |
56858 | }; | |
56859 | ||
56860 | ||
56861 | ||
56862 | class wxGenericImageList: public wxObject | |
56863 | { | |
56864 | public: | |
56865 | wxGenericImageList() { m_width = m_height = 0; } | |
56866 | wxGenericImageList( int width, int height, bool mask = true, int initialCount = 1 ); | |
56867 | ~wxGenericImageList(); | |
56868 | bool Create( int width, int height, bool mask = true, int initialCount = 1 ); | |
56869 | bool Create(); | |
56870 | ||
56871 | virtual int GetImageCount() const; | |
56872 | virtual bool GetSize( int index, int &width, int &height ) const; | |
56873 | ||
56874 | int Add( const wxBitmap& bitmap ); | |
56875 | int Add( const wxBitmap& bitmap, const wxBitmap& mask ); | |
56876 | int Add( const wxBitmap& bitmap, const wxColour& maskColour ); | |
56877 | wxBitmap GetBitmap(int index) const; | |
56878 | wxIcon GetIcon(int index) const; | |
56879 | bool Replace( int index, const wxBitmap &bitmap ); | |
56880 | bool Remove( int index ); | |
56881 | bool RemoveAll(); | |
56882 | ||
56883 | virtual bool Draw(int index, wxDC& dc, int x, int y, | |
56884 | int flags = 0x0001, | |
56885 | bool solidBackground = false); | |
56886 | ||
56887 | ||
56888 | const wxBitmap *GetBitmapPtr(int index) const; | |
56889 | private: | |
56890 | wxList m_images; | |
56891 | ||
56892 | int m_width; | |
56893 | int m_height; | |
56894 | ||
56895 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
56896 | }; | |
56897 | ||
56898 | ||
56899 | ||
56900 | ||
56901 | ||
56902 | ||
56903 | ||
56904 | class wxImageList: public wxGenericImageList | |
56905 | { | |
56906 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
56907 | ||
56908 | public: | |
56909 | wxImageList() {} | |
56910 | ||
56911 | wxImageList( int width, int height, bool mask = true, int initialCount = 1 ) | |
56912 | : wxGenericImageList(width, height, mask, initialCount) | |
56913 | { | |
56914 | } | |
56915 | }; | |
56916 | # 24 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/listctrl.h" 2 | |
56917 | ||
56918 | ||
56919 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/control.h" 1 | |
56920 | # 27 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/listctrl.h" 2 | |
56921 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/timer.h" 1 | |
56922 | # 28 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/listctrl.h" 2 | |
56923 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/dcclient.h" 1 | |
56924 | # 29 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/listctrl.h" 2 | |
56925 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/scrolwin.h" 1 | |
56926 | # 30 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/listctrl.h" 2 | |
56927 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/settings.h" 1 | |
56928 | # 31 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/listctrl.h" 2 | |
56929 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/listbase.h" 1 | |
56930 | # 32 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/listctrl.h" 2 | |
56931 | ||
56932 | ||
56933 | class wxDropTarget; | |
56934 | ||
56935 | ||
56936 | ||
56937 | ||
56938 | ||
56939 | ||
56940 | class wxListItem; | |
56941 | class wxListEvent; | |
56942 | ||
56943 | ||
56944 | class wxListCtrl; | |
56945 | # 55 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/listctrl.h" | |
56946 | class wxListHeaderData; | |
56947 | class wxListItemData; | |
56948 | class wxListLineData; | |
56949 | ||
56950 | class wxListHeaderWindow; | |
56951 | class wxListMainWindow; | |
56952 | ||
56953 | class wxListRenameTimer; | |
56954 | class wxListTextCtrl; | |
56955 | ||
56956 | ||
56957 | ||
56958 | ||
56959 | ||
56960 | class wxGenericListCtrl: public wxControl | |
56961 | { | |
56962 | public: | |
56963 | wxGenericListCtrl(); | |
56964 | wxGenericListCtrl( wxWindow *parent, | |
56965 | wxWindowID winid = wxID_ANY, | |
56966 | const wxPoint &pos = wxDefaultPosition, | |
56967 | const wxSize &size = wxDefaultSize, | |
56968 | long style = 0x0004, | |
56969 | const wxValidator& validator = wxDefaultValidator, | |
56970 | const wxString &name = wxListCtrlNameStr) | |
56971 | { | |
56972 | Create(parent, winid, pos, size, style, validator, name); | |
56973 | } | |
56974 | ~wxGenericListCtrl(); | |
56975 | ||
56976 | bool Create( wxWindow *parent, | |
56977 | wxWindowID winid = wxID_ANY, | |
56978 | const wxPoint &pos = wxDefaultPosition, | |
56979 | const wxSize &size = wxDefaultSize, | |
56980 | long style = 0x0004, | |
56981 | const wxValidator& validator = wxDefaultValidator, | |
56982 | const wxString &name = wxListCtrlNameStr); | |
56983 | ||
56984 | bool GetColumn( int col, wxListItem& item ) const; | |
56985 | bool SetColumn( int col, wxListItem& item ); | |
56986 | int GetColumnWidth( int col ) const; | |
56987 | bool SetColumnWidth( int col, int width); | |
56988 | int GetCountPerPage() const; | |
56989 | wxRect GetViewRect() const; | |
56990 | ||
56991 | bool GetItem( wxListItem& info ) const; | |
56992 | bool SetItem( wxListItem& info ) ; | |
56993 | long SetItem( long index, int col, const wxString& label, int imageId = -1 ); | |
56994 | int GetItemState( long item, long stateMask ) const; | |
56995 | bool SetItemState( long item, long state, long stateMask); | |
56996 | bool SetItemImage( long item, int image, int selImage = -1 ); | |
56997 | ||
56998 | bool SetItemColumnImage( long item, long column, int image ); | |
56999 | ||
57000 | wxString GetItemText( long item ) const; | |
57001 | void SetItemText( long item, const wxString& str ); | |
57002 | wxUIntPtr GetItemData( long item ) const; | |
57003 | bool SetItemData( long item, long data ); | |
57004 | bool GetItemRect( long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS ) const; | |
57005 | bool GetItemPosition( long item, wxPoint& pos ) const; | |
57006 | bool SetItemPosition( long item, const wxPoint& pos ); | |
57007 | int GetItemCount() const; | |
57008 | int GetColumnCount() const; | |
57009 | void SetItemSpacing( int spacing, bool isSmall = false ); | |
57010 | wxSize GetItemSpacing() const; | |
57011 | void SetItemTextColour( long item, const wxColour& col); | |
57012 | wxColour GetItemTextColour( long item ) const; | |
57013 | void SetItemBackgroundColour( long item, const wxColour &col); | |
57014 | wxColour GetItemBackgroundColour( long item ) const; | |
57015 | ||
57016 | void SetItemFont( long item, const wxFont &f); | |
57017 | wxFont GetItemFont( long item ) const; | |
57018 | ||
57019 | int GetSelectedItemCount() const; | |
57020 | wxColour GetTextColour() const; | |
57021 | void SetTextColour(const wxColour& col); | |
57022 | long GetTopItem() const; | |
57023 | ||
57024 | void SetSingleStyle( long style, bool add = true ) ; | |
57025 | void SetWindowStyleFlag( long style ); | |
57026 | void RecreateWindow() {} | |
57027 | long GetNextItem( long item, int geometry = wxLIST_NEXT_ALL, int state = 0x0000 ) const; | |
57028 | wxImageList *GetImageList( int which ) const; | |
57029 | void SetImageList( wxImageList *imageList, int which ); | |
57030 | void AssignImageList( wxImageList *imageList, int which ); | |
57031 | bool Arrange( int flag = wxLIST_ALIGN_DEFAULT ); | |
57032 | ||
57033 | void ClearAll(); | |
57034 | bool DeleteItem( long item ); | |
57035 | bool DeleteAllItems(); | |
57036 | bool DeleteAllColumns(); | |
57037 | bool DeleteColumn( int col ); | |
57038 | ||
57039 | void SetItemCount(long count); | |
57040 | ||
57041 | void EditLabel( long item ) { Edit(item); } | |
57042 | void Edit( long item ); | |
57043 | ||
57044 | bool EnsureVisible( long item ); | |
57045 | long FindItem( long start, const wxString& str, bool partial = false ); | |
57046 | long FindItem( long start, wxUIntPtr data ); | |
57047 | long FindItem( long start, const wxPoint& pt, int direction ); | |
57048 | long HitTest( const wxPoint& point, int& flags); | |
57049 | long InsertItem(wxListItem& info); | |
57050 | long InsertItem( long index, const wxString& label ); | |
57051 | long InsertItem( long index, int imageIndex ); | |
57052 | long InsertItem( long index, const wxString& label, int imageIndex ); | |
57053 | long InsertColumn( long col, wxListItem& info ); | |
57054 | long InsertColumn( long col, const wxString& heading, | |
57055 | int format = wxLIST_FORMAT_LEFT, int width = -1 ); | |
57056 | bool ScrollList( int dx, int dy ); | |
57057 | bool SortItems( wxListCtrlCompare fn, long data ); | |
57058 | bool Update( long item ); | |
57059 | ||
57060 | ||
57061 | bool InReportView() const { return HasFlag(0x0020); } | |
57062 | ||
57063 | ||
57064 | bool IsVirtual() const { return HasFlag(0x0200); } | |
57065 | ||
57066 | ||
57067 | bool HasHeader() const | |
57068 | { return InReportView() && !HasFlag(0x0800); } | |
57069 | ||
57070 | ||
57071 | void RefreshItem(long item); | |
57072 | void RefreshItems(long itemFrom, long itemTo); | |
57073 | ||
57074 | ||
57075 | int GetItemSpacing( bool isSmall ) const __attribute__ ((deprecated)); | |
57076 | ||
57077 | ||
57078 | virtual wxVisualAttributes GetDefaultAttributes() const | |
57079 | { | |
57080 | return GetClassDefaultAttributes(GetWindowVariant()); | |
57081 | } | |
57082 | ||
57083 | static wxVisualAttributes | |
57084 | GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); | |
57085 | ||
57086 | ||
57087 | ||
57088 | ||
57089 | void OnInternalIdle( ); | |
57090 | void OnSize( wxSizeEvent &event ); | |
57091 | ||
57092 | ||
57093 | virtual void Refresh(bool eraseBackground = true, | |
57094 | const wxRect *rect = __null); | |
57095 | ||
57096 | virtual void Freeze(); | |
57097 | virtual void Thaw(); | |
57098 | ||
57099 | virtual bool SetBackgroundColour( const wxColour &colour ); | |
57100 | virtual bool SetForegroundColour( const wxColour &colour ); | |
57101 | virtual wxColour GetBackgroundColour() const; | |
57102 | virtual wxColour GetForegroundColour() const; | |
57103 | virtual bool SetFont( const wxFont &font ); | |
57104 | virtual bool SetCursor( const wxCursor &cursor ); | |
57105 | ||
57106 | ||
57107 | virtual void SetDropTarget( wxDropTarget *dropTarget ); | |
57108 | virtual wxDropTarget *GetDropTarget() const; | |
57109 | ||
57110 | ||
57111 | virtual bool DoPopupMenu( wxMenu *menu, int x, int y ); | |
57112 | ||
57113 | virtual bool ShouldInheritColours() const { return false; } | |
57114 | virtual void SetFocus(); | |
57115 | ||
57116 | virtual wxSize DoGetBestSize() const; | |
57117 | ||
57118 | ||
57119 | ||
57120 | ||
57121 | wxImageList *m_imageListNormal; | |
57122 | wxImageList *m_imageListSmall; | |
57123 | wxImageList *m_imageListState; | |
57124 | bool m_ownsImageListNormal, | |
57125 | m_ownsImageListSmall, | |
57126 | m_ownsImageListState; | |
57127 | wxListHeaderWindow *m_headerWin; | |
57128 | wxListMainWindow *m_mainWin; | |
57129 | wxCoord m_headerHeight; | |
57130 | ||
57131 | protected: | |
57132 | ||
57133 | virtual wxString OnGetItemText(long item, long column) const; | |
57134 | ||
57135 | ||
57136 | virtual int OnGetItemImage(long item) const; | |
57137 | ||
57138 | ||
57139 | virtual wxListItemAttr *OnGetItemAttr(long item) const; | |
57140 | ||
57141 | ||
57142 | friend class wxListMainWindow; | |
57143 | ||
57144 | ||
57145 | ||
57146 | ||
57147 | virtual void DoClientToScreen( int *x, int *y ) const; | |
57148 | virtual void DoScreenToClient( int *x, int *y ) const; | |
57149 | ||
57150 | ||
57151 | private: | |
57152 | ||
57153 | virtual void Update() { wxWindow::Update(); } | |
57154 | ||
57155 | ||
57156 | void CreateHeaderWindow(); | |
57157 | ||
57158 | ||
57159 | void CalculateAndSetHeaderHeight(); | |
57160 | ||
57161 | ||
57162 | ||
57163 | void ResizeReportView(bool showHeader); | |
57164 | ||
57165 | private: static const wxEventTableEntry sm_eventTableEntries[]; protected: static const wxEventTable sm_eventTable; virtual const wxEventTable* GetEventTable() const; static wxEventHashTable sm_eventHashTable; virtual wxEventHashTable& GetEventHashTable() const; | |
57166 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
57167 | }; | |
57168 | ||
57169 | ||
57170 | ||
57171 | ||
57172 | ||
57173 | ||
57174 | ||
57175 | class wxListCtrl: public wxGenericListCtrl | |
57176 | { | |
57177 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
57178 | ||
57179 | public: | |
57180 | wxListCtrl() {} | |
57181 | ||
57182 | wxListCtrl(wxWindow *parent, wxWindowID winid = wxID_ANY, | |
57183 | const wxPoint& pos = wxDefaultPosition, | |
57184 | const wxSize& size = wxDefaultSize, | |
57185 | long style = 0x0004, | |
57186 | const wxValidator &validator = wxDefaultValidator, | |
57187 | const wxString &name = wxListCtrlNameStr) | |
57188 | : wxGenericListCtrl(parent, winid, pos, size, style, validator, name) | |
57189 | { | |
57190 | } | |
57191 | }; | |
57192 | # 39 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/listctrl.h" 2 | |
57193 | ||
57194 | ||
57195 | ||
57196 | ||
57197 | ||
57198 | ||
57199 | class wxListView : public wxListCtrl | |
57200 | { | |
57201 | public: | |
57202 | wxListView() { } | |
57203 | wxListView( wxWindow *parent, | |
57204 | wxWindowID winid = wxID_ANY, | |
57205 | const wxPoint& pos = wxDefaultPosition, | |
57206 | const wxSize& size = wxDefaultSize, | |
57207 | long style = 0x0020, | |
57208 | const wxValidator& validator = wxDefaultValidator, | |
57209 | const wxString &name = wxListCtrlNameStr) | |
57210 | { | |
57211 | Create(parent, winid, pos, size, style, validator, name); | |
57212 | } | |
57213 | ||
57214 | ||
57215 | ||
57216 | ||
57217 | ||
57218 | void Select(long n, bool on = true) | |
57219 | { | |
57220 | SetItemState(n, on ? 0x0004 : 0, 0x0004); | |
57221 | } | |
57222 | ||
57223 | ||
57224 | void Focus(long index) | |
57225 | { | |
57226 | SetItemState(index, 0x0002, 0x0002); | |
57227 | EnsureVisible(index); | |
57228 | } | |
57229 | ||
57230 | ||
57231 | long GetFocusedItem() const | |
57232 | { | |
57233 | return GetNextItem(-1, wxLIST_NEXT_ALL, 0x0002); | |
57234 | } | |
57235 | ||
57236 | ||
57237 | long GetNextSelected(long item) const | |
57238 | { return GetNextItem(item, wxLIST_NEXT_ALL, 0x0004); } | |
57239 | long GetFirstSelected() const | |
57240 | { return GetNextSelected(-1); } | |
57241 | ||
57242 | ||
57243 | bool IsSelected(long index) | |
57244 | { return GetItemState(index, 0x0004) != 0; } | |
57245 | ||
57246 | ||
57247 | ||
57248 | ||
57249 | void SetColumnImage(int col, int image) | |
57250 | { | |
57251 | wxListItem item; | |
57252 | item.SetMask(0x0004); | |
57253 | item.SetImage(image); | |
57254 | SetColumn(col, item); | |
57255 | } | |
57256 | ||
57257 | void ClearColumnImage(int col) { SetColumnImage(col, -1); } | |
57258 | ||
57259 | private: | |
57260 | private: wxListView(const wxListView&); wxListView& operator=(const wxListView&); public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
57261 | }; | |
57262 | # 20 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/filedlgg.h" 2 | |
57263 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/datetime.h" 1 | |
57264 | # 25 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/datetime.h" | |
57265 | # 1 "/usr/include/time.h" 1 3 4 | |
57266 | # 26 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/datetime.h" 2 | |
57267 | ||
57268 | ||
57269 | ||
57270 | ||
57271 | # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/limits.h" 1 3 4 | |
57272 | # 31 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/datetime.h" 2 | |
57273 | ||
57274 | ||
57275 | ||
57276 | class wxDateTime; | |
57277 | class wxTimeSpan; | |
57278 | class wxDateSpan; | |
57279 | # 111 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/datetime.h" | |
57280 | class wxDateTime; | |
57281 | ||
57282 | extern const wxChar* wxDefaultDateTimeFormat; | |
57283 | extern const wxChar* wxDefaultTimeSpanFormat; | |
57284 | extern const wxDateTime wxDefaultDateTime; | |
57285 | ||
57286 | ||
57287 | ||
57288 | ||
57289 | ||
57290 | ||
57291 | ||
57292 | class wxDateTime | |
57293 | { | |
57294 | public: | |
57295 | # 134 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/datetime.h" | |
57296 | typedef unsigned short wxDateTime_t; | |
57297 | ||
57298 | ||
57299 | ||
57300 | ||
57301 | ||
57302 | enum TZ | |
57303 | { | |
57304 | ||
57305 | Local, | |
57306 | ||
57307 | ||
57308 | ||
57309 | ||
57310 | ||
57311 | ||
57312 | GMT_12, GMT_11, GMT_10, GMT_9, GMT_8, GMT_7, | |
57313 | GMT_6, GMT_5, GMT_4, GMT_3, GMT_2, GMT_1, | |
57314 | GMT0, | |
57315 | GMT1, GMT2, GMT3, GMT4, GMT5, GMT6, | |
57316 | GMT7, GMT8, GMT9, GMT10, GMT11, GMT12, | |
57317 | ||
57318 | ||
57319 | ||
57320 | ||
57321 | ||
57322 | ||
57323 | WET = GMT0, | |
57324 | WEST = GMT1, | |
57325 | CET = GMT1, | |
57326 | CEST = GMT2, | |
57327 | EET = GMT2, | |
57328 | EEST = GMT3, | |
57329 | MSK = GMT3, | |
57330 | MSD = GMT4, | |
57331 | ||
57332 | ||
57333 | AST = GMT_4, | |
57334 | ADT = GMT_3, | |
57335 | EST = GMT_5, | |
57336 | EDT = GMT_4, | |
57337 | CST = GMT_6, | |
57338 | CDT = GMT_5, | |
57339 | MST = GMT_7, | |
57340 | MDT = GMT_6, | |
57341 | PST = GMT_8, | |
57342 | PDT = GMT_7, | |
57343 | HST = GMT_10, | |
57344 | AKST = GMT_9, | |
57345 | AKDT = GMT_8, | |
57346 | ||
57347 | ||
57348 | ||
57349 | A_WST = GMT8, | |
57350 | A_CST = GMT12 + 1, | |
57351 | A_EST = GMT10, | |
57352 | A_ESST = GMT11, | |
57353 | ||
57354 | ||
57355 | ||
57356 | ||
57357 | ||
57358 | UTC = GMT0 | |
57359 | }; | |
57360 | ||
57361 | ||
57362 | ||
57363 | ||
57364 | ||
57365 | enum Calendar | |
57366 | { | |
57367 | Gregorian, | |
57368 | Julian | |
57369 | ||
57370 | ||
57371 | }; | |
57372 | # 220 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/datetime.h" | |
57373 | enum GregorianAdoption | |
57374 | { | |
57375 | Gr_Unknown, | |
57376 | Gr_Standard, | |
57377 | ||
57378 | Gr_Alaska, | |
57379 | Gr_Albania, | |
57380 | ||
57381 | Gr_Austria = Gr_Unknown, | |
57382 | Gr_Austria_Brixen, | |
57383 | Gr_Austria_Salzburg = Gr_Austria_Brixen, | |
57384 | Gr_Austria_Tyrol = Gr_Austria_Brixen, | |
57385 | Gr_Austria_Carinthia, | |
57386 | Gr_Austria_Styria = Gr_Austria_Carinthia, | |
57387 | ||
57388 | Gr_Belgium, | |
57389 | ||
57390 | Gr_Bulgaria = Gr_Unknown, | |
57391 | Gr_Bulgaria_1, | |
57392 | Gr_Bulgaria_2, | |
57393 | Gr_Bulgaria_3, | |
57394 | ||
57395 | Gr_Canada = Gr_Unknown, | |
57396 | ||
57397 | ||
57398 | Gr_China = Gr_Unknown, | |
57399 | Gr_China_1, | |
57400 | Gr_China_2, | |
57401 | ||
57402 | Gr_Czechoslovakia, | |
57403 | Gr_Denmark, | |
57404 | Gr_Egypt, | |
57405 | Gr_Estonia, | |
57406 | Gr_Finland, | |
57407 | ||
57408 | Gr_France, | |
57409 | Gr_France_Alsace, | |
57410 | Gr_France_Lorraine, | |
57411 | Gr_France_Strasbourg, | |
57412 | ||
57413 | Gr_Germany = Gr_Unknown, | |
57414 | Gr_Germany_Catholic, | |
57415 | Gr_Germany_Prussia, | |
57416 | Gr_Germany_Protestant, | |
57417 | ||
57418 | Gr_GreatBritain, | |
57419 | ||
57420 | Gr_Greece, | |
57421 | Gr_Hungary, | |
57422 | Gr_Ireland = Gr_GreatBritain, | |
57423 | Gr_Italy = Gr_Standard, | |
57424 | ||
57425 | Gr_Japan = Gr_Unknown, | |
57426 | Gr_Japan_1, | |
57427 | Gr_Japan_2, | |
57428 | Gr_Japan_3, | |
57429 | ||
57430 | Gr_Latvia, | |
57431 | Gr_Lithuania, | |
57432 | Gr_Luxemburg, | |
57433 | Gr_Netherlands = Gr_Belgium, | |
57434 | ||
57435 | ||
57436 | ||
57437 | ||
57438 | ||
57439 | ||
57440 | Gr_Netherlands_Groningen, | |
57441 | Gr_Netherlands_Gelderland, | |
57442 | Gr_Netherlands_Utrecht, | |
57443 | Gr_Netherlands_Friesland, | |
57444 | ||
57445 | Gr_Norway = Gr_Denmark, | |
57446 | Gr_Poland = Gr_Standard, | |
57447 | Gr_Portugal = Gr_Standard, | |
57448 | Gr_Romania, | |
57449 | Gr_Russia, | |
57450 | Gr_Scotland = Gr_GreatBritain, | |
57451 | Gr_Spain = Gr_Standard, | |
57452 | # 317 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/datetime.h" | |
57453 | Gr_Sweden = Gr_Finland, | |
57454 | ||
57455 | Gr_Switzerland = Gr_Unknown, | |
57456 | Gr_Switzerland_Catholic, | |
57457 | Gr_Switzerland_Protestant, | |
57458 | ||
57459 | Gr_Turkey, | |
57460 | Gr_USA = Gr_GreatBritain, | |
57461 | Gr_Wales = Gr_GreatBritain, | |
57462 | Gr_Yugoslavia | |
57463 | }; | |
57464 | # 340 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/datetime.h" | |
57465 | enum Country | |
57466 | { | |
57467 | Country_Unknown, | |
57468 | Country_Default, | |
57469 | ||
57470 | ||
57471 | ||
57472 | ||
57473 | ||
57474 | ||
57475 | ||
57476 | Country_WesternEurope_Start, | |
57477 | Country_EEC = Country_WesternEurope_Start, | |
57478 | France, | |
57479 | Germany, | |
57480 | UK, | |
57481 | Country_WesternEurope_End = UK, | |
57482 | ||
57483 | Russia, | |
57484 | USA | |
57485 | }; | |
57486 | ||
57487 | enum Month | |
57488 | { | |
57489 | Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec, Inv_Month | |
57490 | }; | |
57491 | ||
57492 | ||
57493 | enum WeekDay | |
57494 | { | |
57495 | Sun, Mon, Tue, Wed, Thu, Fri, Sat, Inv_WeekDay | |
57496 | }; | |
57497 | ||
57498 | ||
57499 | enum Year | |
57500 | { | |
57501 | Inv_Year = (-32767 - 1) | |
57502 | }; | |
57503 | ||
57504 | ||
57505 | enum NameFlags | |
57506 | { | |
57507 | Name_Full = 0x01, | |
57508 | Name_Abbr = 0x02 | |
57509 | }; | |
57510 | ||
57511 | ||
57512 | enum WeekFlags | |
57513 | { | |
57514 | Default_First, | |
57515 | Monday_First, | |
57516 | Sunday_First | |
57517 | }; | |
57518 | ||
57519 | ||
57520 | ||
57521 | ||
57522 | ||
57523 | ||
57524 | class TimeZone | |
57525 | { | |
57526 | public: | |
57527 | TimeZone(TZ tz); | |
57528 | TimeZone(wxDateTime_t offset = 0) { m_offset = offset; } | |
57529 | ||
57530 | long GetOffset() const { return m_offset; } | |
57531 | ||
57532 | private: | |
57533 | ||
57534 | long m_offset; | |
57535 | }; | |
57536 | # 419 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/datetime.h" | |
57537 | struct Tm | |
57538 | { | |
57539 | wxDateTime_t msec, sec, min, hour, mday; | |
57540 | Month mon; | |
57541 | int year; | |
57542 | ||
57543 | ||
57544 | Tm(); | |
57545 | ||
57546 | ||
57547 | Tm(const struct tm& tm, const TimeZone& tz); | |
57548 | ||
57549 | ||
57550 | bool IsValid() const; | |
57551 | ||
57552 | ||
57553 | WeekDay GetWeekDay() | |
57554 | { | |
57555 | if ( wday == Inv_WeekDay ) | |
57556 | ComputeWeekDay(); | |
57557 | ||
57558 | return (WeekDay)wday; | |
57559 | } | |
57560 | ||
57561 | ||
57562 | void AddMonths(int monDiff); | |
57563 | ||
57564 | ||
57565 | void AddDays(int dayDiff); | |
57566 | ||
57567 | private: | |
57568 | ||
57569 | void ComputeWeekDay(); | |
57570 | ||
57571 | ||
57572 | TimeZone m_tz; | |
57573 | ||
57574 | ||
57575 | ||
57576 | wxDateTime_t wday, yday; | |
57577 | }; | |
57578 | ||
57579 | ||
57580 | ||
57581 | ||
57582 | ||
57583 | static void SetCountry(Country country); | |
57584 | ||
57585 | static Country GetCountry(); | |
57586 | ||
57587 | ||
57588 | ||
57589 | static bool IsWestEuropeanCountry(Country country = Country_Default); | |
57590 | ||
57591 | ||
57592 | static int GetCurrentYear(Calendar cal = Gregorian); | |
57593 | ||
57594 | ||
57595 | ||
57596 | ||
57597 | ||
57598 | static int ConvertYearToBC(int year); | |
57599 | ||
57600 | ||
57601 | static Month GetCurrentMonth(Calendar cal = Gregorian); | |
57602 | ||
57603 | ||
57604 | static bool IsLeapYear(int year = Inv_Year, Calendar cal = Gregorian); | |
57605 | ||
57606 | ||
57607 | static int GetCentury(int year = Inv_Year); | |
57608 | ||
57609 | ||
57610 | ||
57611 | static wxDateTime_t GetNumberOfDays(int year, Calendar cal = Gregorian); | |
57612 | ||
57613 | ||
57614 | ||
57615 | static wxDateTime_t GetNumberOfDays(Month month, | |
57616 | int year = Inv_Year, | |
57617 | Calendar cal = Gregorian); | |
57618 | ||
57619 | ||
57620 | ||
57621 | static wxString GetMonthName(Month month, | |
57622 | NameFlags flags = Name_Full); | |
57623 | ||
57624 | ||
57625 | ||
57626 | static wxString GetWeekDayName(WeekDay weekday, | |
57627 | NameFlags flags = Name_Full); | |
57628 | ||
57629 | ||
57630 | static void GetAmPmStrings(wxString *am, wxString *pm); | |
57631 | ||
57632 | ||
57633 | static bool IsDSTApplicable(int year = Inv_Year, | |
57634 | Country country = Country_Default); | |
57635 | ||
57636 | ||
57637 | ||
57638 | ||
57639 | static wxDateTime GetBeginDST(int year = Inv_Year, | |
57640 | Country country = Country_Default); | |
57641 | ||
57642 | ||
57643 | ||
57644 | static wxDateTime GetEndDST(int year = Inv_Year, | |
57645 | Country country = Country_Default); | |
57646 | ||
57647 | ||
57648 | static inline wxDateTime Now(); | |
57649 | ||
57650 | ||
57651 | ||
57652 | static wxDateTime UNow(); | |
57653 | ||
57654 | ||
57655 | ||
57656 | static inline wxDateTime Today(); | |
57657 | ||
57658 | ||
57659 | ||
57660 | ||
57661 | ||
57662 | ||
57663 | ||
57664 | wxDateTime() { m_time = wxLongLong((long)(9223372036854775807L * 2UL + 1UL), (9223372036854775807L * 2UL + 1UL)); } | |
57665 | ||
57666 | ||
57667 | ||
57668 | ||
57669 | inline wxDateTime(time_t timet); | |
57670 | ||
57671 | ||
57672 | inline wxDateTime(const struct tm& tm); | |
57673 | ||
57674 | inline wxDateTime(const Tm& tm); | |
57675 | ||
57676 | ||
57677 | inline wxDateTime(double jdn); | |
57678 | ||
57679 | ||
57680 | inline wxDateTime(wxDateTime_t hour, | |
57681 | wxDateTime_t minute = 0, | |
57682 | wxDateTime_t second = 0, | |
57683 | wxDateTime_t millisec = 0); | |
57684 | ||
57685 | inline wxDateTime(wxDateTime_t day, | |
57686 | Month month, | |
57687 | int year = Inv_Year, | |
57688 | wxDateTime_t hour = 0, | |
57689 | wxDateTime_t minute = 0, | |
57690 | wxDateTime_t second = 0, | |
57691 | wxDateTime_t millisec = 0); | |
57692 | # 585 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/datetime.h" | |
57693 | inline wxDateTime& SetToCurrent(); | |
57694 | ||
57695 | ||
57696 | ||
57697 | ||
57698 | inline wxDateTime& Set(time_t timet); | |
57699 | ||
57700 | ||
57701 | ||
57702 | wxDateTime& Set(const struct tm& tm); | |
57703 | ||
57704 | ||
57705 | inline wxDateTime& Set(const Tm& tm); | |
57706 | ||
57707 | ||
57708 | wxDateTime& Set(double jdn); | |
57709 | ||
57710 | ||
57711 | wxDateTime& Set(wxDateTime_t hour, | |
57712 | wxDateTime_t minute = 0, | |
57713 | wxDateTime_t second = 0, | |
57714 | wxDateTime_t millisec = 0); | |
57715 | ||
57716 | ||
57717 | ||
57718 | wxDateTime& Set(wxDateTime_t day, | |
57719 | Month month, | |
57720 | int year = Inv_Year, | |
57721 | wxDateTime_t hour = 0, | |
57722 | wxDateTime_t minute = 0, | |
57723 | wxDateTime_t second = 0, | |
57724 | wxDateTime_t millisec = 0); | |
57725 | ||
57726 | ||
57727 | wxDateTime& ResetTime(); | |
57728 | ||
57729 | ||
57730 | ||
57731 | ||
57732 | ||
57733 | wxDateTime& SetYear(int year); | |
57734 | ||
57735 | wxDateTime& SetMonth(Month month); | |
57736 | ||
57737 | wxDateTime& SetDay(wxDateTime_t day); | |
57738 | ||
57739 | wxDateTime& SetHour(wxDateTime_t hour); | |
57740 | ||
57741 | wxDateTime& SetMinute(wxDateTime_t minute); | |
57742 | ||
57743 | wxDateTime& SetSecond(wxDateTime_t second); | |
57744 | ||
57745 | wxDateTime& SetMillisecond(wxDateTime_t millisecond); | |
57746 | ||
57747 | ||
57748 | wxDateTime& operator=(time_t timet) { return Set(timet); } | |
57749 | ||
57750 | ||
57751 | wxDateTime& operator=(const struct tm& tm) { return Set(tm); } | |
57752 | ||
57753 | ||
57754 | wxDateTime& operator=(const Tm& tm) { return Set(tm); } | |
57755 | # 656 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/datetime.h" | |
57756 | wxDateTime& SetToWeekDayInSameWeek(WeekDay weekday, | |
57757 | WeekFlags flags = Monday_First); | |
57758 | inline wxDateTime GetWeekDayInSameWeek(WeekDay weekday, | |
57759 | WeekFlags flags = Monday_First) const; | |
57760 | ||
57761 | ||
57762 | wxDateTime& SetToNextWeekDay(WeekDay weekday); | |
57763 | inline wxDateTime GetNextWeekDay(WeekDay weekday) const; | |
57764 | ||
57765 | ||
57766 | wxDateTime& SetToPrevWeekDay(WeekDay weekday); | |
57767 | inline wxDateTime GetPrevWeekDay(WeekDay weekday) const; | |
57768 | ||
57769 | ||
57770 | ||
57771 | ||
57772 | ||
57773 | bool SetToWeekDay(WeekDay weekday, | |
57774 | int n = 1, | |
57775 | Month month = Inv_Month, | |
57776 | int year = Inv_Year); | |
57777 | inline wxDateTime GetWeekDay(WeekDay weekday, | |
57778 | int n = 1, | |
57779 | Month month = Inv_Month, | |
57780 | int year = Inv_Year) const; | |
57781 | ||
57782 | ||
57783 | inline bool SetToLastWeekDay(WeekDay weekday, | |
57784 | Month month = Inv_Month, | |
57785 | int year = Inv_Year); | |
57786 | inline wxDateTime GetLastWeekDay(WeekDay weekday, | |
57787 | Month month = Inv_Month, | |
57788 | int year = Inv_Year); | |
57789 | ||
57790 | ||
57791 | ||
57792 | ||
57793 | ||
57794 | ||
57795 | ||
57796 | bool SetToTheWeek(wxDateTime_t numWeek, WeekDay weekday = Mon, WeekFlags flags = Monday_First) __attribute__ ((deprecated)); | |
57797 | ||
57798 | ||
57799 | wxDateTime GetWeek(wxDateTime_t numWeek, WeekDay weekday = Mon, WeekFlags flags = Monday_First) const __attribute__ ((deprecated)); | |
57800 | ||
57801 | ||
57802 | ||
57803 | ||
57804 | ||
57805 | static wxDateTime SetToWeekOfYear(int year, | |
57806 | wxDateTime_t numWeek, | |
57807 | WeekDay weekday = Mon); | |
57808 | ||
57809 | ||
57810 | ||
57811 | wxDateTime& SetToLastMonthDay(Month month = Inv_Month, | |
57812 | int year = Inv_Year); | |
57813 | inline wxDateTime GetLastMonthDay(Month month = Inv_Month, | |
57814 | int year = Inv_Year) const; | |
57815 | ||
57816 | ||
57817 | wxDateTime& SetToYearDay(wxDateTime_t yday); | |
57818 | inline wxDateTime GetYearDay(wxDateTime_t yday) const; | |
57819 | # 744 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/datetime.h" | |
57820 | double GetJulianDayNumber() const; | |
57821 | double GetJDN() const { return GetJulianDayNumber(); } | |
57822 | ||
57823 | ||
57824 | ||
57825 | ||
57826 | double GetModifiedJulianDayNumber() const { return GetJDN() - 2400000.5; } | |
57827 | double GetMJD() const { return GetModifiedJulianDayNumber(); } | |
57828 | ||
57829 | ||
57830 | double GetRataDie() const; | |
57831 | # 773 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/datetime.h" | |
57832 | inline wxDateTime ToTimezone(const TimeZone& tz, bool noDST = false) const; | |
57833 | wxDateTime& MakeTimezone(const TimeZone& tz, bool noDST = false); | |
57834 | ||
57835 | ||
57836 | ||
57837 | ||
57838 | inline wxDateTime FromTimezone(const TimeZone& tz, bool noDST = false) const; | |
57839 | wxDateTime& MakeFromTimezone(const TimeZone& tz, bool noDST = false); | |
57840 | ||
57841 | ||
57842 | ||
57843 | wxDateTime ToUTC(bool noDST = false) const { return ToTimezone(UTC, noDST); } | |
57844 | wxDateTime& MakeUTC(bool noDST = false) { return MakeTimezone(UTC, noDST); } | |
57845 | ||
57846 | wxDateTime ToGMT(bool noDST = false) const { return ToUTC(noDST); } | |
57847 | wxDateTime& MakeGMT(bool noDST = false) { return MakeUTC(noDST); } | |
57848 | ||
57849 | ||
57850 | wxDateTime FromUTC(bool noDST = false) const | |
57851 | { return FromTimezone(UTC, noDST); } | |
57852 | wxDateTime& MakeFromUTC(bool noDST = false) | |
57853 | { return MakeFromTimezone(UTC, noDST); } | |
57854 | ||
57855 | ||
57856 | ||
57857 | ||
57858 | ||
57859 | ||
57860 | ||
57861 | int IsDST(Country country = Country_Default) const; | |
57862 | # 813 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/datetime.h" | |
57863 | inline bool IsValid() const { return m_time != wxDefaultDateTime.m_time; } | |
57864 | ||
57865 | ||
57866 | ||
57867 | ||
57868 | ||
57869 | ||
57870 | Tm GetTm(const TimeZone& tz = Local) const; | |
57871 | ||
57872 | ||
57873 | ||
57874 | inline time_t GetTicks() const; | |
57875 | ||
57876 | ||
57877 | int GetYear(const TimeZone& tz = Local) const | |
57878 | { return GetTm(tz).year; } | |
57879 | ||
57880 | Month GetMonth(const TimeZone& tz = Local) const | |
57881 | { return (Month)GetTm(tz).mon; } | |
57882 | ||
57883 | wxDateTime_t GetDay(const TimeZone& tz = Local) const | |
57884 | { return GetTm(tz).mday; } | |
57885 | ||
57886 | WeekDay GetWeekDay(const TimeZone& tz = Local) const | |
57887 | { return GetTm(tz).GetWeekDay(); } | |
57888 | ||
57889 | wxDateTime_t GetHour(const TimeZone& tz = Local) const | |
57890 | { return GetTm(tz).hour; } | |
57891 | ||
57892 | wxDateTime_t GetMinute(const TimeZone& tz = Local) const | |
57893 | { return GetTm(tz).min; } | |
57894 | ||
57895 | wxDateTime_t GetSecond(const TimeZone& tz = Local) const | |
57896 | { return GetTm(tz).sec; } | |
57897 | ||
57898 | wxDateTime_t GetMillisecond(const TimeZone& tz = Local) const | |
57899 | { return GetTm(tz).msec; } | |
57900 | ||
57901 | ||
57902 | wxDateTime_t GetDayOfYear(const TimeZone& tz = Local) const; | |
57903 | ||
57904 | ||
57905 | wxDateTime_t GetWeekOfYear(WeekFlags flags = Monday_First, | |
57906 | const TimeZone& tz = Local) const; | |
57907 | ||
57908 | ||
57909 | wxDateTime_t GetWeekOfMonth(WeekFlags flags = Monday_First, | |
57910 | const TimeZone& tz = Local) const; | |
57911 | ||
57912 | ||
57913 | ||
57914 | bool IsWorkDay(Country country = Country_Default) const; | |
57915 | ||
57916 | ||
57917 | ||
57918 | ||
57919 | ||
57920 | ||
57921 | ||
57922 | bool IsGregorianDate(GregorianAdoption country = Gr_Standard) const; | |
57923 | ||
57924 | ||
57925 | ||
57926 | ||
57927 | ||
57928 | wxDateTime& SetFromDOS(unsigned long ddt); | |
57929 | ||
57930 | ||
57931 | unsigned long GetAsDOS() const; | |
57932 | ||
57933 | ||
57934 | ||
57935 | ||
57936 | ||
57937 | inline bool IsEqualTo(const wxDateTime& datetime) const; | |
57938 | ||
57939 | ||
57940 | inline bool IsEarlierThan(const wxDateTime& datetime) const; | |
57941 | ||
57942 | ||
57943 | inline bool IsLaterThan(const wxDateTime& datetime) const; | |
57944 | ||
57945 | ||
57946 | inline bool IsStrictlyBetween(const wxDateTime& t1, | |
57947 | const wxDateTime& t2) const; | |
57948 | ||
57949 | ||
57950 | inline bool IsBetween(const wxDateTime& t1, const wxDateTime& t2) const; | |
57951 | ||
57952 | ||
57953 | inline bool IsSameDate(const wxDateTime& dt) const; | |
57954 | ||
57955 | ||
57956 | inline bool IsSameTime(const wxDateTime& dt) const; | |
57957 | ||
57958 | ||
57959 | inline bool IsEqualUpTo(const wxDateTime& dt, const wxTimeSpan& ts) const; | |
57960 | ||
57961 | inline bool operator<(const wxDateTime& dt) const | |
57962 | { | |
57963 | ; | |
57964 | return GetValue() < dt.GetValue(); | |
57965 | } | |
57966 | ||
57967 | inline bool operator<=(const wxDateTime& dt) const | |
57968 | { | |
57969 | ; | |
57970 | return GetValue() <= dt.GetValue(); | |
57971 | } | |
57972 | ||
57973 | inline bool operator>(const wxDateTime& dt) const | |
57974 | { | |
57975 | ; | |
57976 | return GetValue() > dt.GetValue(); | |
57977 | } | |
57978 | ||
57979 | inline bool operator>=(const wxDateTime& dt) const | |
57980 | { | |
57981 | ; | |
57982 | return GetValue() >= dt.GetValue(); | |
57983 | } | |
57984 | ||
57985 | inline bool operator==(const wxDateTime& dt) const | |
57986 | { | |
57987 | ; | |
57988 | return GetValue() == dt.GetValue(); | |
57989 | } | |
57990 | ||
57991 | inline bool operator!=(const wxDateTime& dt) const | |
57992 | { | |
57993 | ; | |
57994 | return GetValue() != dt.GetValue(); | |
57995 | } | |
57996 | ||
57997 | ||
57998 | ||
57999 | ||
58000 | ||
58001 | inline wxDateTime Add(const wxTimeSpan& diff) const; | |
58002 | ||
58003 | inline wxDateTime& Add(const wxTimeSpan& diff); | |
58004 | ||
58005 | inline wxDateTime& operator+=(const wxTimeSpan& diff); | |
58006 | inline wxDateTime operator+(const wxTimeSpan& ts) const | |
58007 | { | |
58008 | wxDateTime dt(*this); | |
58009 | dt.Add(ts); | |
58010 | return dt; | |
58011 | } | |
58012 | ||
58013 | ||
58014 | inline wxDateTime Subtract(const wxTimeSpan& diff) const; | |
58015 | ||
58016 | inline wxDateTime& Subtract(const wxTimeSpan& diff); | |
58017 | ||
58018 | inline wxDateTime& operator-=(const wxTimeSpan& diff); | |
58019 | inline wxDateTime operator-(const wxTimeSpan& ts) const | |
58020 | { | |
58021 | wxDateTime dt(*this); | |
58022 | dt.Subtract(ts); | |
58023 | return dt; | |
58024 | } | |
58025 | ||
58026 | ||
58027 | inline wxDateTime Add(const wxDateSpan& diff) const; | |
58028 | ||
58029 | wxDateTime& Add(const wxDateSpan& diff); | |
58030 | ||
58031 | inline wxDateTime& operator+=(const wxDateSpan& diff); | |
58032 | inline wxDateTime operator+(const wxDateSpan& ds) const | |
58033 | { | |
58034 | wxDateTime dt(*this); | |
58035 | dt.Add(ds); | |
58036 | return dt; | |
58037 | } | |
58038 | ||
58039 | ||
58040 | inline wxDateTime Subtract(const wxDateSpan& diff) const; | |
58041 | ||
58042 | inline wxDateTime& Subtract(const wxDateSpan& diff); | |
58043 | ||
58044 | inline wxDateTime& operator-=(const wxDateSpan& diff); | |
58045 | inline wxDateTime operator-(const wxDateSpan& ds) const | |
58046 | { | |
58047 | wxDateTime dt(*this); | |
58048 | dt.Subtract(ds); | |
58049 | return dt; | |
58050 | } | |
58051 | ||
58052 | ||
58053 | inline wxTimeSpan Subtract(const wxDateTime& dt) const; | |
58054 | inline wxTimeSpan operator-(const wxDateTime& dt2) const; | |
58055 | # 1013 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/datetime.h" | |
58056 | const wxChar *ParseRfc822Date(const wxChar* date); | |
58057 | ||
58058 | ||
58059 | ||
58060 | ||
58061 | const wxChar *ParseFormat(const wxChar *date, | |
58062 | const wxChar *format = wxDefaultDateTimeFormat, | |
58063 | const wxDateTime& dateDef = wxDefaultDateTime); | |
58064 | ||
58065 | ||
58066 | const wxChar *ParseDateTime(const wxChar *datetime); | |
58067 | ||
58068 | ||
58069 | const wxChar *ParseDate(const wxChar *date); | |
58070 | ||
58071 | const wxChar *ParseTime(const wxChar *time); | |
58072 | ||
58073 | ||
58074 | ||
58075 | ||
58076 | ||
58077 | wxString Format(const wxChar *format = wxDefaultDateTimeFormat, | |
58078 | const TimeZone& tz = Local) const; | |
58079 | ||
58080 | wxString FormatDate() const { return Format("%x"); } | |
58081 | ||
58082 | wxString FormatTime() const { return Format("%X"); } | |
58083 | ||
58084 | ||
58085 | wxString FormatISODate() const { return Format("%Y-%m-%d"); } | |
58086 | ||
58087 | ||
58088 | wxString FormatISOTime() const { return Format("%H:%M:%S"); } | |
58089 | ||
58090 | ||
58091 | ||
58092 | ||
58093 | ||
58094 | wxDateTime(const wxLongLong& time) { m_time = time; } | |
58095 | ||
58096 | ||
58097 | inline wxLongLong GetValue() const; | |
58098 | ||
58099 | ||
58100 | static time_t GetTimeNow() { return time((time_t *)__null); } | |
58101 | ||
58102 | ||
58103 | static struct tm *GetTmNow() | |
58104 | { | |
58105 | time_t t = GetTimeNow(); | |
58106 | return localtime(&t); | |
58107 | } | |
58108 | ||
58109 | private: | |
58110 | ||
58111 | ||
58112 | ||
58113 | static Country ms_country; | |
58114 | ||
58115 | ||
58116 | ||
58117 | ||
58118 | static const long TIME_T_FACTOR; | |
58119 | ||
58120 | ||
58121 | ||
58122 | inline bool IsInStdRange() const; | |
58123 | ||
58124 | ||
58125 | ||
58126 | ||
58127 | wxLongLong m_time; | |
58128 | }; | |
58129 | ||
58130 | ||
58131 | ||
58132 | ||
58133 | ||
58134 | ||
58135 | ||
58136 | class wxTimeSpan | |
58137 | { | |
58138 | public: | |
58139 | ||
58140 | ||
58141 | ||
58142 | ||
58143 | static wxTimeSpan Seconds(long sec) { return wxTimeSpan(0, 0, sec); } | |
58144 | static wxTimeSpan Second() { return Seconds(1); } | |
58145 | ||
58146 | ||
58147 | static wxTimeSpan Minutes(long min) { return wxTimeSpan(0, min, 0 ); } | |
58148 | static wxTimeSpan Minute() { return Minutes(1); } | |
58149 | ||
58150 | ||
58151 | static wxTimeSpan Hours(long hours) { return wxTimeSpan(hours, 0, 0); } | |
58152 | static wxTimeSpan Hour() { return Hours(1); } | |
58153 | ||
58154 | ||
58155 | static wxTimeSpan Days(long days) { return Hours(24 * days); } | |
58156 | static wxTimeSpan Day() { return Days(1); } | |
58157 | ||
58158 | ||
58159 | static wxTimeSpan Weeks(long days) { return Days(7 * days); } | |
58160 | static wxTimeSpan Week() { return Weeks(1); } | |
58161 | ||
58162 | ||
58163 | wxTimeSpan() { } | |
58164 | ||
58165 | ||
58166 | ||
58167 | ||
58168 | inline wxTimeSpan(long hours, | |
58169 | long minutes = 0, | |
58170 | long seconds = 0, | |
58171 | long milliseconds = 0); | |
58172 | # 1138 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/datetime.h" | |
58173 | inline wxTimeSpan Add(const wxTimeSpan& diff) const; | |
58174 | ||
58175 | inline wxTimeSpan& Add(const wxTimeSpan& diff); | |
58176 | ||
58177 | wxTimeSpan& operator+=(const wxTimeSpan& diff) { return Add(diff); } | |
58178 | inline wxTimeSpan operator+(const wxTimeSpan& ts) const | |
58179 | { | |
58180 | return wxTimeSpan(GetValue() + ts.GetValue()); | |
58181 | } | |
58182 | ||
58183 | ||
58184 | inline wxTimeSpan Subtract(const wxTimeSpan& diff) const; | |
58185 | ||
58186 | inline wxTimeSpan& Subtract(const wxTimeSpan& diff); | |
58187 | ||
58188 | wxTimeSpan& operator-=(const wxTimeSpan& diff) { return Subtract(diff); } | |
58189 | inline wxTimeSpan operator-(const wxTimeSpan& ts) | |
58190 | { | |
58191 | return wxTimeSpan(GetValue() - ts.GetValue()); | |
58192 | } | |
58193 | ||
58194 | ||
58195 | inline wxTimeSpan Multiply(int n) const; | |
58196 | ||
58197 | inline wxTimeSpan& Multiply(int n); | |
58198 | ||
58199 | wxTimeSpan& operator*=(int n) { return Multiply(n); } | |
58200 | inline wxTimeSpan operator*(int n) const | |
58201 | { | |
58202 | return wxTimeSpan(*this).Multiply(n); | |
58203 | } | |
58204 | ||
58205 | ||
58206 | wxTimeSpan Negate() const { return wxTimeSpan(-GetValue()); } | |
58207 | ||
58208 | wxTimeSpan& Neg() { m_diff = -GetValue(); return *this; } | |
58209 | ||
58210 | wxTimeSpan& operator-() { return Neg(); } | |
58211 | ||
58212 | ||
58213 | ||
58214 | inline wxTimeSpan Abs() const; | |
58215 | # 1188 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/datetime.h" | |
58216 | bool IsNull() const { return m_diff == 0l; } | |
58217 | ||
58218 | bool operator!() const { return !IsNull(); } | |
58219 | ||
58220 | ||
58221 | bool IsPositive() const { return m_diff > 0l; } | |
58222 | ||
58223 | ||
58224 | bool IsNegative() const { return m_diff < 0l; } | |
58225 | ||
58226 | ||
58227 | inline bool IsEqualTo(const wxTimeSpan& ts) const; | |
58228 | ||
58229 | ||
58230 | ||
58231 | inline bool IsLongerThan(const wxTimeSpan& ts) const; | |
58232 | ||
58233 | ||
58234 | ||
58235 | bool IsShorterThan(const wxTimeSpan& t) const { return !IsLongerThan(t); } | |
58236 | ||
58237 | inline bool operator<(const wxTimeSpan &ts) const | |
58238 | { | |
58239 | return GetValue() < ts.GetValue(); | |
58240 | } | |
58241 | ||
58242 | inline bool operator<=(const wxTimeSpan &ts) const | |
58243 | { | |
58244 | return GetValue() <= ts.GetValue(); | |
58245 | } | |
58246 | ||
58247 | inline bool operator>(const wxTimeSpan &ts) const | |
58248 | { | |
58249 | return GetValue() > ts.GetValue(); | |
58250 | } | |
58251 | ||
58252 | inline bool operator>=(const wxTimeSpan &ts) const | |
58253 | { | |
58254 | return GetValue() >= ts.GetValue(); | |
58255 | } | |
58256 | ||
58257 | inline bool operator==(const wxTimeSpan &ts) const | |
58258 | { | |
58259 | return GetValue() == ts.GetValue(); | |
58260 | } | |
58261 | ||
58262 | inline bool operator!=(const wxTimeSpan &ts) const | |
58263 | { | |
58264 | return GetValue() != ts.GetValue(); | |
58265 | } | |
58266 | ||
58267 | ||
58268 | ||
58269 | ||
58270 | ||
58271 | inline int GetWeeks() const; | |
58272 | ||
58273 | inline int GetDays() const; | |
58274 | ||
58275 | inline int GetHours() const; | |
58276 | ||
58277 | inline int GetMinutes() const; | |
58278 | ||
58279 | inline wxLongLong GetSeconds() const; | |
58280 | ||
58281 | wxLongLong GetMilliseconds() const { return m_diff; } | |
58282 | # 1264 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/datetime.h" | |
58283 | wxString Format(const wxChar *format = wxDefaultTimeSpanFormat) const; | |
58284 | ||
58285 | ||
58286 | ||
58287 | ||
58288 | ||
58289 | wxTimeSpan(const wxLongLong& diff) { m_diff = diff; } | |
58290 | ||
58291 | ||
58292 | wxLongLong GetValue() const { return m_diff; } | |
58293 | ||
58294 | private: | |
58295 | ||
58296 | wxLongLong m_diff; | |
58297 | }; | |
58298 | # 1315 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/datetime.h" | |
58299 | class wxDateSpan | |
58300 | { | |
58301 | public: | |
58302 | ||
58303 | ||
58304 | ||
58305 | ||
58306 | wxDateSpan(int years = 0, int months = 0, int weeks = 0, int days = 0) | |
58307 | { | |
58308 | m_years = years; | |
58309 | m_months = months; | |
58310 | m_weeks = weeks; | |
58311 | m_days = days; | |
58312 | } | |
58313 | ||
58314 | ||
58315 | static wxDateSpan Days(int days) { return wxDateSpan(0, 0, 0, days); } | |
58316 | static wxDateSpan Day() { return Days(1); } | |
58317 | ||
58318 | ||
58319 | static wxDateSpan Weeks(int weeks) { return wxDateSpan(0, 0, weeks, 0); } | |
58320 | static wxDateSpan Week() { return Weeks(1); } | |
58321 | ||
58322 | ||
58323 | static wxDateSpan Months(int mon) { return wxDateSpan(0, mon, 0, 0); } | |
58324 | static wxDateSpan Month() { return Months(1); } | |
58325 | ||
58326 | ||
58327 | static wxDateSpan Years(int years) { return wxDateSpan(years, 0, 0, 0); } | |
58328 | static wxDateSpan Year() { return Years(1); } | |
58329 | # 1354 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/datetime.h" | |
58330 | wxDateSpan& SetYears(int n) { m_years = n; return *this; } | |
58331 | ||
58332 | wxDateSpan& SetMonths(int n) { m_months = n; return *this; } | |
58333 | ||
58334 | wxDateSpan& SetWeeks(int n) { m_weeks = n; return *this; } | |
58335 | ||
58336 | wxDateSpan& SetDays(int n) { m_days = n; return *this; } | |
58337 | ||
58338 | ||
58339 | int GetYears() const { return m_years; } | |
58340 | ||
58341 | int GetMonths() const { return m_months; } | |
58342 | ||
58343 | int GetWeeks() const { return m_weeks; } | |
58344 | ||
58345 | int GetDays() const { return m_days; } | |
58346 | ||
58347 | int GetTotalDays() const { return 7*m_weeks + m_days; } | |
58348 | ||
58349 | ||
58350 | ||
58351 | ||
58352 | ||
58353 | inline wxDateSpan Add(const wxDateSpan& other) const; | |
58354 | ||
58355 | inline wxDateSpan& Add(const wxDateSpan& other); | |
58356 | ||
58357 | inline wxDateSpan& operator+=(const wxDateSpan& other); | |
58358 | inline wxDateSpan operator+(const wxDateSpan& ds) const | |
58359 | { | |
58360 | return wxDateSpan(GetYears() + ds.GetYears(), | |
58361 | GetMonths() + ds.GetMonths(), | |
58362 | GetWeeks() + ds.GetWeeks(), | |
58363 | GetDays() + ds.GetDays()); | |
58364 | } | |
58365 | ||
58366 | ||
58367 | inline wxDateSpan Subtract(const wxDateSpan& other) const; | |
58368 | ||
58369 | inline wxDateSpan& Subtract(const wxDateSpan& other); | |
58370 | ||
58371 | inline wxDateSpan& operator-=(const wxDateSpan& other); | |
58372 | inline wxDateSpan operator-(const wxDateSpan& ds) const | |
58373 | { | |
58374 | return wxDateSpan(GetYears() - ds.GetYears(), | |
58375 | GetMonths() - ds.GetMonths(), | |
58376 | GetWeeks() - ds.GetWeeks(), | |
58377 | GetDays() - ds.GetDays()); | |
58378 | } | |
58379 | ||
58380 | ||
58381 | inline wxDateSpan Negate() const; | |
58382 | ||
58383 | inline wxDateSpan& Neg(); | |
58384 | ||
58385 | wxDateSpan& operator-() { return Neg(); } | |
58386 | ||
58387 | ||
58388 | inline wxDateSpan Multiply(int factor) const; | |
58389 | ||
58390 | inline wxDateSpan& Multiply(int factor); | |
58391 | ||
58392 | inline wxDateSpan& operator*=(int factor) { return Multiply(factor); } | |
58393 | inline wxDateSpan operator*(int n) const | |
58394 | { | |
58395 | return wxDateSpan(*this).Multiply(n); | |
58396 | } | |
58397 | ||
58398 | ||
58399 | inline bool operator==(const wxDateSpan& ds) const | |
58400 | { | |
58401 | return GetYears() == ds.GetYears() && | |
58402 | GetMonths() == ds.GetMonths() && | |
58403 | GetTotalDays() == ds.GetTotalDays(); | |
58404 | } | |
58405 | ||
58406 | inline bool operator!=(const wxDateSpan& ds) const | |
58407 | { | |
58408 | return !(*this == ds); | |
58409 | } | |
58410 | ||
58411 | private: | |
58412 | int m_years, | |
58413 | m_months, | |
58414 | m_weeks, | |
58415 | m_days; | |
58416 | }; | |
58417 | ||
58418 | ||
58419 | ||
58420 | ||
58421 | ||
58422 | typedef wxDateTime _wxObjArraywxDateTimeArray; typedef int ( *CMPFUNC_wxObjArraywxDateTimeArray)(_wxObjArraywxDateTimeArray **pItem1, _wxObjArraywxDateTimeArray **pItem2); class wxDateTimeArray : protected wxArrayPtrVoid { typedef int ( *CMPFUNCwxArrayPtrVoid)(void **pItem1, void **pItem2); typedef wxArrayPtrVoid base_array; public: wxDateTimeArray() { } wxDateTimeArray(const wxDateTimeArray& src); wxDateTimeArray& operator=(const wxDateTimeArray& src); ~wxDateTimeArray(); void Alloc(size_t count) { reserve(count); } size_t GetCount() const { return base_array::size(); } size_t size() const { return base_array::size(); } bool IsEmpty() const { return base_array::empty(); } bool empty() const { return base_array::empty(); } size_t Count() const { return base_array::size(); } void Shrink() { wxArrayPtrVoid::Shrink(); } _wxObjArraywxDateTimeArray& operator[](size_t uiIndex) const { return *(_wxObjArraywxDateTimeArray*)wxArrayPtrVoid::operator[](uiIndex); } _wxObjArraywxDateTimeArray& Item(size_t uiIndex) const { return *(_wxObjArraywxDateTimeArray*)wxArrayPtrVoid::operator[](uiIndex); } _wxObjArraywxDateTimeArray& Last() const { return *(_wxObjArraywxDateTimeArray*)(wxArrayPtrVoid::operator[](size() - 1)); } int Index(const _wxObjArraywxDateTimeArray& lItem, bool bFromEnd = false) const; void Add(const _wxObjArraywxDateTimeArray& lItem, size_t nInsert = 1); void Add(const _wxObjArraywxDateTimeArray* pItem) { wxArrayPtrVoid::push_back((_wxObjArraywxDateTimeArray*)pItem); } void push_back(const _wxObjArraywxDateTimeArray* pItem) { wxArrayPtrVoid::push_back((_wxObjArraywxDateTimeArray*)pItem); } void push_back(const _wxObjArraywxDateTimeArray& lItem) { Add(lItem); } void Insert(const _wxObjArraywxDateTimeArray& lItem, size_t uiIndex, size_t nInsert = 1); void Insert(const _wxObjArraywxDateTimeArray* pItem, size_t uiIndex) { wxArrayPtrVoid::insert(begin() + uiIndex, (_wxObjArraywxDateTimeArray*)pItem); } void Empty() { DoEmpty(); wxArrayPtrVoid::clear(); } void Clear() { DoEmpty(); wxArrayPtrVoid::clear(); } _wxObjArraywxDateTimeArray* Detach(size_t uiIndex) { _wxObjArraywxDateTimeArray* p = (_wxObjArraywxDateTimeArray*)wxArrayPtrVoid::operator[](uiIndex); wxArrayPtrVoid::erase(begin() + uiIndex); return p; } void RemoveAt(size_t uiIndex, size_t nRemove = 1); void Sort(CMPFUNC_wxObjArraywxDateTimeArray fCmp) { wxArrayPtrVoid::Sort((CMPFUNCwxArrayPtrVoid)fCmp); } private: void DoEmpty(); void DoCopy(const wxDateTimeArray& src); }; | |
58423 | # 1457 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/datetime.h" | |
58424 | class wxDateTimeHolidayAuthority; | |
58425 | typedef wxDateTimeHolidayAuthority * _wxArraywxHolidayAuthoritiesArray; struct wxAssert_wxHolidayAuthoritiesArray { unsigned int TypeTooBigToBeStoredInwxBaseArrayPtrVoid: sizeof(_wxArraywxHolidayAuthoritiesArray) <= sizeof(wxBaseArrayPtrVoid::base_type); }; typedef int ( *CMPFUNC_wxArraywxHolidayAuthoritiesArray)(_wxArraywxHolidayAuthoritiesArray *pItem1, _wxArraywxHolidayAuthoritiesArray *pItem2); class wxHolidayAuthoritiesArray : public wxBaseArrayPtrVoid { public: wxHolidayAuthoritiesArray() { } ~wxHolidayAuthoritiesArray() { } wxHolidayAuthoritiesArray& operator=(const wxHolidayAuthoritiesArray& src) { wxBaseArrayPtrVoid* temp = (wxBaseArrayPtrVoid*) this; (*temp) = ((const wxBaseArrayPtrVoid&)src); return *this; } _wxArraywxHolidayAuthoritiesArray& operator[](size_t uiIndex) const { return (_wxArraywxHolidayAuthoritiesArray&)(wxBaseArrayPtrVoid::operator[](uiIndex)); } _wxArraywxHolidayAuthoritiesArray& Item(size_t uiIndex) const { return (_wxArraywxHolidayAuthoritiesArray&)(wxBaseArrayPtrVoid::operator[](uiIndex)); } _wxArraywxHolidayAuthoritiesArray& Last() const { return (_wxArraywxHolidayAuthoritiesArray&)(wxBaseArrayPtrVoid::operator[](Count() - 1)); } int Index(_wxArraywxHolidayAuthoritiesArray lItem, bool bFromEnd = false) const { return wxBaseArrayPtrVoid::Index((base_type)lItem, bFromEnd); } void Add(_wxArraywxHolidayAuthoritiesArray lItem, size_t nInsert = 1) { wxBaseArrayPtrVoid::Add((base_type)lItem, nInsert); } void Insert(_wxArraywxHolidayAuthoritiesArray lItem, size_t uiIndex, size_t nInsert = 1) { wxBaseArrayPtrVoid::Insert((base_type)lItem, uiIndex, nInsert) ; } void RemoveAt(size_t uiIndex, size_t nRemove = 1) { wxBaseArrayPtrVoid::RemoveAt(uiIndex, nRemove); } void Remove(_wxArraywxHolidayAuthoritiesArray lItem) { int iIndex = Index(lItem); if (!(iIndex != (-1))) {; return; }; wxBaseArrayPtrVoid::RemoveAt((size_t)iIndex); } void Sort(CMPFUNC_wxArraywxHolidayAuthoritiesArray fCmp) { wxBaseArrayPtrVoid::Sort((CMPFUNC)fCmp); } private: typedef wxBaseArrayPtrVoid::iterator biterator; typedef wxBaseArrayPtrVoid::const_iterator bconst_iterator; typedef wxBaseArrayPtrVoid::value_type bvalue_type; typedef wxBaseArrayPtrVoid::const_reference bconst_reference; public: typedef _wxArraywxHolidayAuthoritiesArray value_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type* iterator; typedef const value_type* const_iterator; typedef value_type& reference; typedef const value_type& const_reference; typedef wxBaseArrayPtrVoid::difference_type difference_type; typedef wxBaseArrayPtrVoid::size_type size_type; class reverse_iterator { typedef _wxArraywxHolidayAuthoritiesArray value_type; typedef value_type& reference; typedef value_type* pointer; typedef reverse_iterator itor; friend inline itor operator+(int o, const itor& it) { return it.m_ptr - o; } friend inline itor operator+(const itor& it, int o) { return it.m_ptr - o; } friend inline itor operator-(const itor& it, int o) { return it.m_ptr + o; } friend inline difference_type operator-(const itor& i1, const itor& i2) { return i1.m_ptr - i2.m_ptr; } public: pointer m_ptr; reverse_iterator() : m_ptr(__null) { } reverse_iterator(pointer ptr) : m_ptr(ptr) { } reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { } reference operator*() const { return *m_ptr; } itor& operator++() { --m_ptr; return *this; } const itor operator++(int) { reverse_iterator tmp = *this; --m_ptr; return tmp; } itor& operator--() { ++m_ptr; return *this; } const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; } bool operator ==(const itor& it) { return m_ptr == it.m_ptr; } bool operator !=(const itor& it) { return m_ptr != it.m_ptr; } }; class const_reverse_iterator { typedef _wxArraywxHolidayAuthoritiesArray value_type; typedef const value_type& reference; typedef const value_type* pointer; typedef const_reverse_iterator itor; friend inline itor operator+(int o, const itor& it) { return it.m_ptr - o; } friend inline itor operator+(const itor& it, int o) { return it.m_ptr - o; } friend inline itor operator-(const itor& it, int o) { return it.m_ptr + o; } friend inline difference_type operator-(const itor& i1, const itor& i2) { return i1.m_ptr - i2.m_ptr; } public: pointer m_ptr; const_reverse_iterator() : m_ptr(__null) { } const_reverse_iterator(pointer ptr) : m_ptr(ptr) { } const_reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { } const_reverse_iterator(const reverse_iterator& it) : m_ptr(it.m_ptr) { } reference operator*() const { return *m_ptr; } itor& operator++() { --m_ptr; return *this; } const itor operator++(int) { itor tmp = *this; --m_ptr; return tmp; } itor& operator--() { ++m_ptr; return *this; } const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; } bool operator ==(const itor& it) { return m_ptr == it.m_ptr; } bool operator !=(const itor& it) { return m_ptr != it.m_ptr; } }; wxHolidayAuthoritiesArray(size_type n, const_reference v) { assign(n, v); } wxHolidayAuthoritiesArray(const_iterator first, const_iterator last) { assign(first, last); } void assign(const_iterator first, const_iterator last) { wxBaseArrayPtrVoid::assign((bconst_iterator)first, (bconst_iterator)last); } void assign(size_type n, const_reference v) { wxBaseArrayPtrVoid::assign(n, (bconst_reference)v); } reference back() { return *(end() - 1); } const_reference back() const { return *(end() - 1); } iterator begin() { return (iterator)wxBaseArrayPtrVoid::begin(); } const_iterator begin() const { return (const_iterator)wxBaseArrayPtrVoid::begin(); } size_type capacity() const { return wxBaseArrayPtrVoid::capacity(); } iterator end() { return (iterator)wxBaseArrayPtrVoid::end(); } const_iterator end() const { return (const_iterator)wxBaseArrayPtrVoid::end(); } iterator erase(iterator first, iterator last) { return (iterator)wxBaseArrayPtrVoid::erase((biterator)first, (biterator)last); } iterator erase(iterator it) { return (iterator)wxBaseArrayPtrVoid::erase((biterator)it); } reference front() { return *begin(); } const_reference front() const { return *begin(); } void insert(iterator it, size_type n, const_reference v) { wxBaseArrayPtrVoid::insert((biterator)it, n, (bconst_reference)v); } iterator insert(iterator it, const_reference v = value_type()) { return (iterator)wxBaseArrayPtrVoid::insert((biterator)it, (bconst_reference)v); } void insert(iterator it, const_iterator first, const_iterator last) { wxBaseArrayPtrVoid::insert((biterator)it, (bconst_iterator)first, (bconst_iterator)last); } void pop_back() { wxBaseArrayPtrVoid::pop_back(); } void push_back(const_reference v) { wxBaseArrayPtrVoid::push_back((bconst_reference)v); } reverse_iterator rbegin() { return reverse_iterator(end() - 1); } const_reverse_iterator rbegin() const; reverse_iterator rend() { return reverse_iterator(begin() - 1); } const_reverse_iterator rend() const; void reserve(size_type n) { wxBaseArrayPtrVoid::reserve(n); }; void resize(size_type n, value_type v = value_type()); }; | |
58426 | ||
58427 | ||
58428 | ||
58429 | class wxDateTimeHolidaysModule; | |
58430 | class wxDateTimeHolidayAuthority | |
58431 | { | |
58432 | friend class wxDateTimeHolidaysModule; | |
58433 | public: | |
58434 | ||
58435 | static bool IsHoliday(const wxDateTime& dt); | |
58436 | ||
58437 | ||
58438 | ||
58439 | static size_t GetHolidaysInRange(const wxDateTime& dtStart, | |
58440 | const wxDateTime& dtEnd, | |
58441 | wxDateTimeArray& holidays); | |
58442 | ||
58443 | ||
58444 | static void ClearAllAuthorities(); | |
58445 | ||
58446 | ||
58447 | ||
58448 | static void AddAuthority(wxDateTimeHolidayAuthority *auth); | |
58449 | ||
58450 | ||
58451 | virtual ~wxDateTimeHolidayAuthority(); | |
58452 | ||
58453 | protected: | |
58454 | ||
58455 | virtual bool DoIsHoliday(const wxDateTime& dt) const = 0; | |
58456 | # 1498 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/datetime.h" | |
58457 | virtual size_t DoGetHolidaysInRange(const wxDateTime& dtStart, | |
58458 | const wxDateTime& dtEnd, | |
58459 | wxDateTimeArray& holidays) const = 0; | |
58460 | ||
58461 | private: | |
58462 | ||
58463 | static wxHolidayAuthoritiesArray ms_authorities; | |
58464 | }; | |
58465 | ||
58466 | ||
58467 | class wxDateTimeWorkDays : public wxDateTimeHolidayAuthority | |
58468 | { | |
58469 | protected: | |
58470 | virtual bool DoIsHoliday(const wxDateTime& dt) const; | |
58471 | virtual size_t DoGetHolidaysInRange(const wxDateTime& dtStart, | |
58472 | const wxDateTime& dtEnd, | |
58473 | wxDateTimeArray& holidays) const; | |
58474 | }; | |
58475 | # 1540 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/datetime.h" | |
58476 | inline bool wxDateTime::IsInStdRange() const | |
58477 | { | |
58478 | return m_time >= 0l && (m_time / TIME_T_FACTOR) < 9223372036854775807L; | |
58479 | } | |
58480 | ||
58481 | ||
58482 | inline wxDateTime wxDateTime::Now() | |
58483 | { | |
58484 | return wxDateTime(*GetTmNow()); | |
58485 | } | |
58486 | ||
58487 | ||
58488 | inline wxDateTime wxDateTime::Today() | |
58489 | { | |
58490 | wxDateTime dt(Now()); | |
58491 | dt.ResetTime(); | |
58492 | ||
58493 | return dt; | |
58494 | } | |
58495 | ||
58496 | ||
58497 | inline wxDateTime& wxDateTime::Set(time_t timet) | |
58498 | { | |
58499 | ||
58500 | m_time = timet - 0 ; | |
58501 | m_time *= TIME_T_FACTOR; | |
58502 | ||
58503 | return *this; | |
58504 | } | |
58505 | ||
58506 | ||
58507 | inline wxDateTime& wxDateTime::SetToCurrent() | |
58508 | { | |
58509 | *this = Now(); | |
58510 | return *this; | |
58511 | } | |
58512 | ||
58513 | ||
58514 | inline wxDateTime::wxDateTime(time_t timet) | |
58515 | { | |
58516 | Set(timet); | |
58517 | } | |
58518 | ||
58519 | ||
58520 | inline wxDateTime::wxDateTime(const struct tm& tm) | |
58521 | { | |
58522 | Set(tm); | |
58523 | } | |
58524 | ||
58525 | inline wxDateTime::wxDateTime(const Tm& tm) | |
58526 | { | |
58527 | Set(tm); | |
58528 | } | |
58529 | ||
58530 | inline wxDateTime::wxDateTime(double jdn) | |
58531 | { | |
58532 | Set(jdn); | |
58533 | } | |
58534 | ||
58535 | inline wxDateTime& wxDateTime::Set(const Tm& tm) | |
58536 | { | |
58537 | ; | |
58538 | ||
58539 | return Set(tm.mday, (Month)tm.mon, tm.year, | |
58540 | tm.hour, tm.min, tm.sec, tm.msec); | |
58541 | } | |
58542 | ||
58543 | inline wxDateTime::wxDateTime(wxDateTime_t hour, | |
58544 | wxDateTime_t minute, | |
58545 | wxDateTime_t second, | |
58546 | wxDateTime_t millisec) | |
58547 | { | |
58548 | Set(hour, minute, second, millisec); | |
58549 | } | |
58550 | ||
58551 | inline wxDateTime::wxDateTime(wxDateTime_t day, | |
58552 | Month month, | |
58553 | int year, | |
58554 | wxDateTime_t hour, | |
58555 | wxDateTime_t minute, | |
58556 | wxDateTime_t second, | |
58557 | wxDateTime_t millisec) | |
58558 | { | |
58559 | Set(day, month, year, hour, minute, second, millisec); | |
58560 | } | |
58561 | ||
58562 | ||
58563 | ||
58564 | ||
58565 | ||
58566 | inline wxLongLong wxDateTime::GetValue() const | |
58567 | { | |
58568 | ; | |
58569 | ||
58570 | return m_time; | |
58571 | } | |
58572 | ||
58573 | inline time_t wxDateTime::GetTicks() const | |
58574 | { | |
58575 | ; | |
58576 | if ( !IsInStdRange() ) | |
58577 | { | |
58578 | return (time_t)-1; | |
58579 | } | |
58580 | ||
58581 | return (time_t)((m_time / (long)TIME_T_FACTOR).GetLo())+0 ; | |
58582 | } | |
58583 | ||
58584 | inline bool wxDateTime::SetToLastWeekDay(WeekDay weekday, | |
58585 | Month month, | |
58586 | int year) | |
58587 | { | |
58588 | return SetToWeekDay(weekday, -1, month, year); | |
58589 | } | |
58590 | ||
58591 | inline wxDateTime | |
58592 | wxDateTime::GetWeekDayInSameWeek(WeekDay weekday, | |
58593 | WeekFlags ) const | |
58594 | { | |
58595 | return wxDateTime(*this).SetToWeekDayInSameWeek(weekday); | |
58596 | } | |
58597 | ||
58598 | inline wxDateTime wxDateTime::GetNextWeekDay(WeekDay weekday) const | |
58599 | { | |
58600 | return wxDateTime(*this).SetToNextWeekDay(weekday); | |
58601 | } | |
58602 | ||
58603 | inline wxDateTime wxDateTime::GetPrevWeekDay(WeekDay weekday) const | |
58604 | { | |
58605 | return wxDateTime(*this).SetToPrevWeekDay(weekday); | |
58606 | } | |
58607 | ||
58608 | inline wxDateTime wxDateTime::GetWeekDay(WeekDay weekday, | |
58609 | int n, | |
58610 | Month month, | |
58611 | int year) const | |
58612 | { | |
58613 | wxDateTime dt(*this); | |
58614 | ||
58615 | return dt.SetToWeekDay(weekday, n, month, year) ? dt : wxDefaultDateTime; | |
58616 | } | |
58617 | ||
58618 | inline wxDateTime wxDateTime::GetLastWeekDay(WeekDay weekday, | |
58619 | Month month, | |
58620 | int year) | |
58621 | { | |
58622 | wxDateTime dt(*this); | |
58623 | ||
58624 | return dt.SetToLastWeekDay(weekday, month, year) ? dt : wxDefaultDateTime; | |
58625 | } | |
58626 | ||
58627 | inline wxDateTime wxDateTime::GetLastMonthDay(Month month, int year) const | |
58628 | { | |
58629 | return wxDateTime(*this).SetToLastMonthDay(month, year); | |
58630 | } | |
58631 | ||
58632 | inline wxDateTime wxDateTime::GetYearDay(wxDateTime_t yday) const | |
58633 | { | |
58634 | return wxDateTime(*this).SetToYearDay(yday); | |
58635 | } | |
58636 | ||
58637 | ||
58638 | ||
58639 | ||
58640 | ||
58641 | inline bool wxDateTime::IsEqualTo(const wxDateTime& datetime) const | |
58642 | { | |
58643 | ; | |
58644 | ||
58645 | return m_time == datetime.m_time; | |
58646 | } | |
58647 | ||
58648 | inline bool wxDateTime::IsEarlierThan(const wxDateTime& datetime) const | |
58649 | { | |
58650 | ; | |
58651 | ||
58652 | return m_time < datetime.m_time; | |
58653 | } | |
58654 | ||
58655 | inline bool wxDateTime::IsLaterThan(const wxDateTime& datetime) const | |
58656 | { | |
58657 | ; | |
58658 | ||
58659 | return m_time > datetime.m_time; | |
58660 | } | |
58661 | ||
58662 | inline bool wxDateTime::IsStrictlyBetween(const wxDateTime& t1, | |
58663 | const wxDateTime& t2) const | |
58664 | { | |
58665 | ||
58666 | return IsLaterThan(t1) && IsEarlierThan(t2); | |
58667 | } | |
58668 | ||
58669 | inline bool wxDateTime::IsBetween(const wxDateTime& t1, | |
58670 | const wxDateTime& t2) const | |
58671 | { | |
58672 | ||
58673 | return IsEqualTo(t1) || IsEqualTo(t2) || IsStrictlyBetween(t1, t2); | |
58674 | } | |
58675 | ||
58676 | inline bool wxDateTime::IsSameDate(const wxDateTime& dt) const | |
58677 | { | |
58678 | Tm tm1 = GetTm(), | |
58679 | tm2 = dt.GetTm(); | |
58680 | ||
58681 | return tm1.year == tm2.year && | |
58682 | tm1.mon == tm2.mon && | |
58683 | tm1.mday == tm2.mday; | |
58684 | } | |
58685 | ||
58686 | inline bool wxDateTime::IsSameTime(const wxDateTime& dt) const | |
58687 | { | |
58688 | ||
58689 | ||
58690 | ||
58691 | ||
58692 | ||
58693 | Tm tm1 = GetTm(), | |
58694 | tm2 = dt.GetTm(); | |
58695 | ||
58696 | return tm1.hour == tm2.hour && | |
58697 | tm1.min == tm2.min && | |
58698 | tm1.sec == tm2.sec && | |
58699 | tm1.msec == tm2.msec; | |
58700 | } | |
58701 | ||
58702 | inline bool wxDateTime::IsEqualUpTo(const wxDateTime& dt, | |
58703 | const wxTimeSpan& ts) const | |
58704 | { | |
58705 | return IsBetween(dt.Subtract(ts), dt.Add(ts)); | |
58706 | } | |
58707 | ||
58708 | ||
58709 | ||
58710 | ||
58711 | ||
58712 | inline wxDateTime wxDateTime::Add(const wxTimeSpan& diff) const | |
58713 | { | |
58714 | ; | |
58715 | ||
58716 | return wxDateTime(m_time + diff.GetValue()); | |
58717 | } | |
58718 | ||
58719 | inline wxDateTime& wxDateTime::Add(const wxTimeSpan& diff) | |
58720 | { | |
58721 | ; | |
58722 | ||
58723 | m_time += diff.GetValue(); | |
58724 | ||
58725 | return *this; | |
58726 | } | |
58727 | ||
58728 | inline wxDateTime& wxDateTime::operator+=(const wxTimeSpan& diff) | |
58729 | { | |
58730 | return Add(diff); | |
58731 | } | |
58732 | ||
58733 | inline wxDateTime wxDateTime::Subtract(const wxTimeSpan& diff) const | |
58734 | { | |
58735 | ; | |
58736 | ||
58737 | return wxDateTime(m_time - diff.GetValue()); | |
58738 | } | |
58739 | ||
58740 | inline wxDateTime& wxDateTime::Subtract(const wxTimeSpan& diff) | |
58741 | { | |
58742 | ; | |
58743 | ||
58744 | m_time -= diff.GetValue(); | |
58745 | ||
58746 | return *this; | |
58747 | } | |
58748 | ||
58749 | inline wxDateTime& wxDateTime::operator-=(const wxTimeSpan& diff) | |
58750 | { | |
58751 | return Subtract(diff); | |
58752 | } | |
58753 | ||
58754 | inline wxTimeSpan wxDateTime::Subtract(const wxDateTime& datetime) const | |
58755 | { | |
58756 | ; | |
58757 | ||
58758 | return wxTimeSpan(GetValue() - datetime.GetValue()); | |
58759 | } | |
58760 | ||
58761 | inline wxTimeSpan wxDateTime::operator-(const wxDateTime& dt2) const | |
58762 | { | |
58763 | return this->Subtract(dt2); | |
58764 | } | |
58765 | ||
58766 | inline wxDateTime wxDateTime::Add(const wxDateSpan& diff) const | |
58767 | { | |
58768 | return wxDateTime(*this).Add(diff); | |
58769 | } | |
58770 | ||
58771 | inline wxDateTime& wxDateTime::Subtract(const wxDateSpan& diff) | |
58772 | { | |
58773 | return Add(diff.Negate()); | |
58774 | } | |
58775 | ||
58776 | inline wxDateTime wxDateTime::Subtract(const wxDateSpan& diff) const | |
58777 | { | |
58778 | return wxDateTime(*this).Subtract(diff); | |
58779 | } | |
58780 | ||
58781 | inline wxDateTime& wxDateTime::operator-=(const wxDateSpan& diff) | |
58782 | { | |
58783 | return Subtract(diff); | |
58784 | } | |
58785 | ||
58786 | inline wxDateTime& wxDateTime::operator+=(const wxDateSpan& diff) | |
58787 | { | |
58788 | return Add(diff); | |
58789 | } | |
58790 | ||
58791 | ||
58792 | ||
58793 | ||
58794 | ||
58795 | inline wxDateTime | |
58796 | wxDateTime::ToTimezone(const wxDateTime::TimeZone& tz, bool noDST) const | |
58797 | { | |
58798 | return wxDateTime(*this).MakeTimezone(tz, noDST); | |
58799 | } | |
58800 | ||
58801 | ||
58802 | ||
58803 | inline wxDateTime | |
58804 | wxDateTime::FromTimezone(const wxDateTime::TimeZone& tz, bool noDST) const | |
58805 | { | |
58806 | return wxDateTime(*this).MakeFromTimezone(tz, noDST); | |
58807 | } | |
58808 | ||
58809 | ||
58810 | ||
58811 | ||
58812 | ||
58813 | ||
58814 | ||
58815 | inline wxTimeSpan::wxTimeSpan(long hours, | |
58816 | long minutes, | |
58817 | long seconds, | |
58818 | long milliseconds) | |
58819 | { | |
58820 | ||
58821 | m_diff = hours; | |
58822 | m_diff *= 60l; | |
58823 | m_diff += minutes; | |
58824 | m_diff *= 60l; | |
58825 | m_diff += seconds; | |
58826 | m_diff *= 1000l; | |
58827 | m_diff += milliseconds; | |
58828 | } | |
58829 | ||
58830 | ||
58831 | ||
58832 | ||
58833 | ||
58834 | inline wxLongLong wxTimeSpan::GetSeconds() const | |
58835 | { | |
58836 | return m_diff / 1000l; | |
58837 | } | |
58838 | ||
58839 | inline int wxTimeSpan::GetMinutes() const | |
58840 | { | |
58841 | return (GetSeconds() / 60l).GetLo(); | |
58842 | } | |
58843 | ||
58844 | inline int wxTimeSpan::GetHours() const | |
58845 | { | |
58846 | return GetMinutes() / 60; | |
58847 | } | |
58848 | ||
58849 | inline int wxTimeSpan::GetDays() const | |
58850 | { | |
58851 | return GetHours() / 24; | |
58852 | } | |
58853 | ||
58854 | inline int wxTimeSpan::GetWeeks() const | |
58855 | { | |
58856 | return GetDays() / 7; | |
58857 | } | |
58858 | ||
58859 | ||
58860 | ||
58861 | ||
58862 | ||
58863 | inline wxTimeSpan wxTimeSpan::Add(const wxTimeSpan& diff) const | |
58864 | { | |
58865 | return wxTimeSpan(m_diff + diff.GetValue()); | |
58866 | } | |
58867 | ||
58868 | inline wxTimeSpan& wxTimeSpan::Add(const wxTimeSpan& diff) | |
58869 | { | |
58870 | m_diff += diff.GetValue(); | |
58871 | ||
58872 | return *this; | |
58873 | } | |
58874 | ||
58875 | inline wxTimeSpan wxTimeSpan::Subtract(const wxTimeSpan& diff) const | |
58876 | { | |
58877 | return wxTimeSpan(m_diff - diff.GetValue()); | |
58878 | } | |
58879 | ||
58880 | inline wxTimeSpan& wxTimeSpan::Subtract(const wxTimeSpan& diff) | |
58881 | { | |
58882 | m_diff -= diff.GetValue(); | |
58883 | ||
58884 | return *this; | |
58885 | } | |
58886 | ||
58887 | inline wxTimeSpan& wxTimeSpan::Multiply(int n) | |
58888 | { | |
58889 | m_diff *= (long)n; | |
58890 | ||
58891 | return *this; | |
58892 | } | |
58893 | ||
58894 | inline wxTimeSpan wxTimeSpan::Multiply(int n) const | |
58895 | { | |
58896 | return wxTimeSpan(m_diff * (long)n); | |
58897 | } | |
58898 | ||
58899 | inline wxTimeSpan wxTimeSpan::Abs() const | |
58900 | { | |
58901 | return wxTimeSpan(GetValue().Abs()); | |
58902 | } | |
58903 | ||
58904 | inline bool wxTimeSpan::IsEqualTo(const wxTimeSpan& ts) const | |
58905 | { | |
58906 | return GetValue() == ts.GetValue(); | |
58907 | } | |
58908 | ||
58909 | inline bool wxTimeSpan::IsLongerThan(const wxTimeSpan& ts) const | |
58910 | { | |
58911 | return GetValue().Abs() > ts.GetValue().Abs(); | |
58912 | } | |
58913 | ||
58914 | ||
58915 | ||
58916 | ||
58917 | ||
58918 | inline wxDateSpan& wxDateSpan::operator+=(const wxDateSpan& other) | |
58919 | { | |
58920 | m_years += other.m_years; | |
58921 | m_months += other.m_months; | |
58922 | m_weeks += other.m_weeks; | |
58923 | m_days += other.m_days; | |
58924 | ||
58925 | return *this; | |
58926 | } | |
58927 | ||
58928 | inline wxDateSpan& wxDateSpan::Add(const wxDateSpan& other) | |
58929 | { | |
58930 | return *this += other; | |
58931 | } | |
58932 | ||
58933 | inline wxDateSpan wxDateSpan::Add(const wxDateSpan& other) const | |
58934 | { | |
58935 | wxDateSpan ds(*this); | |
58936 | ds.Add(other); | |
58937 | return ds; | |
58938 | } | |
58939 | ||
58940 | inline wxDateSpan& wxDateSpan::Multiply(int factor) | |
58941 | { | |
58942 | m_years *= factor; | |
58943 | m_months *= factor; | |
58944 | m_weeks *= factor; | |
58945 | m_days *= factor; | |
58946 | ||
58947 | return *this; | |
58948 | } | |
58949 | ||
58950 | inline wxDateSpan wxDateSpan::Multiply(int factor) const | |
58951 | { | |
58952 | wxDateSpan ds(*this); | |
58953 | ds.Multiply(factor); | |
58954 | return ds; | |
58955 | } | |
58956 | ||
58957 | inline wxDateSpan wxDateSpan::Negate() const | |
58958 | { | |
58959 | return wxDateSpan(-m_years, -m_months, -m_weeks, -m_days); | |
58960 | } | |
58961 | ||
58962 | inline wxDateSpan& wxDateSpan::Neg() | |
58963 | { | |
58964 | m_years = -m_years; | |
58965 | m_months = -m_months; | |
58966 | m_weeks = -m_weeks; | |
58967 | m_days = -m_days; | |
58968 | ||
58969 | return *this; | |
58970 | } | |
58971 | ||
58972 | inline wxDateSpan& wxDateSpan::operator-=(const wxDateSpan& other) | |
58973 | { | |
58974 | return *this += other.Negate(); | |
58975 | } | |
58976 | ||
58977 | inline wxDateSpan& wxDateSpan::Subtract(const wxDateSpan& other) | |
58978 | { | |
58979 | return *this -= other; | |
58980 | } | |
58981 | ||
58982 | inline wxDateSpan wxDateSpan::Subtract(const wxDateSpan& other) const | |
58983 | { | |
58984 | wxDateSpan ds(*this); | |
58985 | ds.Subtract(other); | |
58986 | return ds; | |
58987 | } | |
58988 | # 2065 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/datetime.h" | |
58989 | wxTimeSpan operator*(int n, const wxTimeSpan& ts); | |
58990 | ||
58991 | ||
58992 | ||
58993 | ||
58994 | ||
58995 | wxDateSpan operator*(int n, const wxDateSpan& ds); | |
58996 | # 2083 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/datetime.h" | |
58997 | void wxNextMonth(wxDateTime::Month& m); | |
58998 | void wxPrevMonth(wxDateTime::Month& m); | |
58999 | void wxNextWDay(wxDateTime::WeekDay& wd); | |
59000 | void wxPrevWDay(wxDateTime::WeekDay& wd); | |
59001 | # 21 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/filedlgg.h" 2 | |
59002 | ||
59003 | ||
59004 | ||
59005 | ||
59006 | ||
59007 | class wxBitmapButton; | |
59008 | class wxCheckBox; | |
59009 | class wxChoice; | |
59010 | class wxFileData; | |
59011 | class wxFileCtrl; | |
59012 | class wxGenericFileDialog; | |
59013 | class wxListEvent; | |
59014 | class wxListItem; | |
59015 | class wxStaticText; | |
59016 | class wxTextCtrl; | |
59017 | # 45 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/filedlgg.h" | |
59018 | class wxGenericFileDialog: public wxFileDialogBase | |
59019 | { | |
59020 | public: | |
59021 | wxGenericFileDialog() : wxFileDialogBase() { Init(); } | |
59022 | ||
59023 | wxGenericFileDialog(wxWindow *parent, | |
59024 | const wxString& message = wxFileSelectorPromptStr, | |
59025 | const wxString& defaultDir = wxEmptyString, | |
59026 | const wxString& defaultFile = wxEmptyString, | |
59027 | const wxString& wildCard = wxFileSelectorDefaultWildcardStr, | |
59028 | long style = 0, | |
59029 | const wxPoint& pos = wxDefaultPosition, | |
59030 | bool bypassGenericImpl = false ); | |
59031 | ||
59032 | bool Create( wxWindow *parent, | |
59033 | const wxString& message = wxFileSelectorPromptStr, | |
59034 | const wxString& defaultDir = wxEmptyString, | |
59035 | const wxString& defaultFile = wxEmptyString, | |
59036 | const wxString& wildCard = wxFileSelectorDefaultWildcardStr, | |
59037 | long style = 0, | |
59038 | const wxPoint& pos = wxDefaultPosition, | |
59039 | bool bypassGenericImpl = false ); | |
59040 | ||
59041 | virtual ~wxGenericFileDialog(); | |
59042 | ||
59043 | virtual void SetMessage(const wxString& message) { SetTitle(message); } | |
59044 | virtual void SetPath(const wxString& path); | |
59045 | virtual void SetFilterIndex(int filterIndex); | |
59046 | virtual void SetWildcard(const wxString& wildCard); | |
59047 | ||
59048 | ||
59049 | virtual void GetPaths(wxArrayString& paths) const; | |
59050 | virtual void GetFilenames(wxArrayString& files) const; | |
59051 | ||
59052 | ||
59053 | ||
59054 | ||
59055 | virtual int ShowModal(); | |
59056 | virtual bool Show( bool show = true ); | |
59057 | ||
59058 | void OnSelected( wxListEvent &event ); | |
59059 | void OnActivated( wxListEvent &event ); | |
59060 | void OnList( wxCommandEvent &event ); | |
59061 | void OnReport( wxCommandEvent &event ); | |
59062 | void OnUp( wxCommandEvent &event ); | |
59063 | void OnHome( wxCommandEvent &event ); | |
59064 | void OnListOk( wxCommandEvent &event ); | |
59065 | void OnNew( wxCommandEvent &event ); | |
59066 | void OnChoiceFilter( wxCommandEvent &event ); | |
59067 | void OnTextEnter( wxCommandEvent &event ); | |
59068 | void OnTextChange( wxCommandEvent &event ); | |
59069 | void OnCheck( wxCommandEvent &event ); | |
59070 | ||
59071 | virtual void HandleAction( const wxString &fn ); | |
59072 | ||
59073 | virtual void UpdateControls(); | |
59074 | ||
59075 | private: | |
59076 | ||
59077 | bool m_bypassGenericImpl; | |
59078 | ||
59079 | protected: | |
59080 | ||
59081 | void DoSetFilterIndex(int filterindex); | |
59082 | ||
59083 | wxString m_filterExtension; | |
59084 | wxChoice *m_choice; | |
59085 | wxTextCtrl *m_text; | |
59086 | wxFileCtrl *m_list; | |
59087 | wxCheckBox *m_check; | |
59088 | wxStaticText *m_static; | |
59089 | wxBitmapButton *m_upDirButton; | |
59090 | wxBitmapButton *m_newDirButton; | |
59091 | ||
59092 | private: | |
59093 | void Init(); | |
59094 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
59095 | private: static const wxEventTableEntry sm_eventTableEntries[]; protected: static const wxEventTable sm_eventTable; virtual const wxEventTable* GetEventTable() const; static wxEventHashTable sm_eventHashTable; virtual wxEventHashTable& GetEventHashTable() const; | |
59096 | ||
59097 | ||
59098 | static long ms_lastViewStyle; | |
59099 | static bool ms_lastShowHidden; | |
59100 | }; | |
59101 | # 157 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/generic/filedlgg.h" | |
59102 | class wxFileData | |
59103 | { | |
59104 | public: | |
59105 | enum fileType | |
59106 | { | |
59107 | is_file = 0x0000, | |
59108 | is_dir = 0x0001, | |
59109 | is_link = 0x0002, | |
59110 | is_exe = 0x0004, | |
59111 | is_drive = 0x0008 | |
59112 | }; | |
59113 | ||
59114 | wxFileData() { Init(); } | |
59115 | ||
59116 | wxFileData( const wxFileData& fileData ) { Copy(fileData); } | |
59117 | ||
59118 | wxFileData( const wxString &filePath, const wxString &fileName, | |
59119 | fileType type, int image_id ); | |
59120 | ||
59121 | ||
59122 | void Copy( const wxFileData &other ); | |
59123 | ||
59124 | ||
59125 | void ReadData(); | |
59126 | ||
59127 | ||
59128 | wxString GetFileName() const { return m_fileName; } | |
59129 | ||
59130 | wxString GetFilePath() const { return m_filePath; } | |
59131 | ||
59132 | void SetNewName( const wxString &filePath, const wxString &fileName ); | |
59133 | ||
59134 | ||
59135 | long GetSize() const { return m_size; } | |
59136 | ||
59137 | wxString GetFileType() const; | |
59138 | ||
59139 | wxDateTime GetDateTime() const { return m_dateTime; } | |
59140 | ||
59141 | wxString GetModificationTime() const; | |
59142 | ||
59143 | wxString GetPermissions() const { return m_permissions; } | |
59144 | ||
59145 | int GetImageId() const { return m_image; } | |
59146 | ||
59147 | bool IsFile() const { return !IsDir() && !IsLink() && !IsDrive(); } | |
59148 | bool IsDir() const { return (m_type & is_dir ) != 0; } | |
59149 | bool IsLink() const { return (m_type & is_link ) != 0; } | |
59150 | bool IsExe() const { return (m_type & is_exe ) != 0; } | |
59151 | bool IsDrive() const { return (m_type & is_drive) != 0; } | |
59152 | ||
59153 | ||
59154 | int GetType() const { return m_type; } | |
59155 | ||
59156 | ||
59157 | enum fileListFieldType | |
59158 | { | |
59159 | FileList_Name, | |
59160 | FileList_Size, | |
59161 | FileList_Type, | |
59162 | FileList_Time, | |
59163 | ||
59164 | FileList_Perm, | |
59165 | ||
59166 | FileList_Max | |
59167 | }; | |
59168 | ||
59169 | ||
59170 | wxString GetEntry( fileListFieldType num ) const; | |
59171 | ||
59172 | ||
59173 | wxString GetHint() const; | |
59174 | ||
59175 | void MakeItem( wxListItem &item ); | |
59176 | ||
59177 | ||
59178 | wxFileData& operator = (const wxFileData& fd) { Copy(fd); return *this; } | |
59179 | ||
59180 | protected: | |
59181 | wxString m_fileName; | |
59182 | wxString m_filePath; | |
59183 | long m_size; | |
59184 | wxDateTime m_dateTime; | |
59185 | wxString m_permissions; | |
59186 | int m_type; | |
59187 | int m_image; | |
59188 | ||
59189 | private: | |
59190 | void Init(); | |
59191 | }; | |
59192 | ||
59193 | ||
59194 | ||
59195 | ||
59196 | ||
59197 | class wxFileCtrl : public wxListCtrl | |
59198 | { | |
59199 | public: | |
59200 | wxFileCtrl(); | |
59201 | wxFileCtrl( wxWindow *win, | |
59202 | wxWindowID id, | |
59203 | const wxString &wild, | |
59204 | bool showHidden, | |
59205 | const wxPoint &pos = wxDefaultPosition, | |
59206 | const wxSize &size = wxDefaultSize, | |
59207 | long style = 0x0010, | |
59208 | const wxValidator &validator = wxDefaultValidator, | |
59209 | const wxString &name = "filelist" ); | |
59210 | virtual ~wxFileCtrl(); | |
59211 | ||
59212 | virtual void ChangeToListMode(); | |
59213 | virtual void ChangeToReportMode(); | |
59214 | virtual void ChangeToSmallIconMode(); | |
59215 | virtual void ShowHidden( bool show = true ); | |
59216 | bool GetShowHidden() const { return m_showHidden; } | |
59217 | ||
59218 | virtual long Add( wxFileData *fd, wxListItem &item ); | |
59219 | virtual void UpdateItem(const wxListItem &item); | |
59220 | virtual void UpdateFiles(); | |
59221 | virtual void MakeDir(); | |
59222 | virtual void GoToParentDir(); | |
59223 | virtual void GoToHomeDir(); | |
59224 | virtual void GoToDir( const wxString &dir ); | |
59225 | virtual void SetWild( const wxString &wild ); | |
59226 | wxString GetWild() const { return m_wild; } | |
59227 | wxString GetDir() const { return m_dirName; } | |
59228 | ||
59229 | void OnListDeleteItem( wxListEvent &event ); | |
59230 | void OnListDeleteAllItems( wxListEvent &event ); | |
59231 | void OnListEndLabelEdit( wxListEvent &event ); | |
59232 | void OnListColClick( wxListEvent &event ); | |
59233 | ||
59234 | virtual void SortItems(wxFileData::fileListFieldType field, bool foward); | |
59235 | bool GetSortDirection() const { return m_sort_foward; } | |
59236 | wxFileData::fileListFieldType GetSortField() const { return m_sort_field; } | |
59237 | ||
59238 | protected: | |
59239 | void FreeItemData(wxListItem& item); | |
59240 | void FreeAllItemsData(); | |
59241 | ||
59242 | wxString m_dirName; | |
59243 | bool m_showHidden; | |
59244 | wxString m_wild; | |
59245 | ||
59246 | bool m_sort_foward; | |
59247 | wxFileData::fileListFieldType m_sort_field; | |
59248 | ||
59249 | private: | |
59250 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
59251 | private: static const wxEventTableEntry sm_eventTableEntries[]; protected: static const wxEventTable sm_eventTable; virtual const wxEventTable* GetEventTable() const; static wxEventHashTable sm_eventHashTable; virtual wxEventHashTable& GetEventHashTable() const; | |
59252 | }; | |
59253 | # 19 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/gtk/filedlg.h" 2 | |
59254 | ||
59255 | ||
59256 | ||
59257 | ||
59258 | ||
59259 | class wxFileDialog: public wxGenericFileDialog | |
59260 | { | |
59261 | public: | |
59262 | wxFileDialog() { } | |
59263 | ||
59264 | wxFileDialog(wxWindow *parent, | |
59265 | const wxString& message = wxFileSelectorPromptStr, | |
59266 | const wxString& defaultDir = wxEmptyString, | |
59267 | const wxString& defaultFile = wxEmptyString, | |
59268 | const wxString& wildCard = wxFileSelectorDefaultWildcardStr, | |
59269 | long style = 0, | |
59270 | const wxPoint& pos = wxDefaultPosition); | |
59271 | ||
59272 | virtual ~wxFileDialog(); | |
59273 | ||
59274 | virtual wxString GetPath() const; | |
59275 | virtual void GetPaths(wxArrayString& paths) const; | |
59276 | virtual wxString GetDirectory() const; | |
59277 | virtual wxString GetFilename() const; | |
59278 | virtual void GetFilenames(wxArrayString& files) const; | |
59279 | virtual int GetFilterIndex() const; | |
59280 | ||
59281 | virtual void SetMessage(const wxString& message); | |
59282 | virtual void SetPath(const wxString& path); | |
59283 | virtual void SetDirectory(const wxString& dir); | |
59284 | virtual void SetFilename(const wxString& name); | |
59285 | virtual void SetWildcard(const wxString& wildCard); | |
59286 | virtual void SetFilterIndex(int filterIndex); | |
59287 | ||
59288 | virtual int ShowModal(); | |
59289 | virtual bool Show( bool show = true ); | |
59290 | ||
59291 | ||
59292 | bool m_destroyed_by_delete; | |
59293 | ||
59294 | ||
59295 | ||
59296 | virtual void DoSetSize(int x, int y, | |
59297 | int width, int height, | |
59298 | int sizeFlags = (0x0001|0x0002)); | |
59299 | ||
59300 | ||
59301 | private: | |
59302 | public: static wxClassInfo ms_classInfo; virtual wxClassInfo *GetClassInfo() const; static wxObject* wxCreateObject(); | |
59303 | private: static const wxEventTableEntry sm_eventTableEntries[]; protected: static const wxEventTable sm_eventTable; virtual const wxEventTable* GetEventTable() const; static wxEventHashTable sm_eventHashTable; virtual wxEventHashTable& GetEventHashTable() const; | |
59304 | void OnFakeOk( wxCommandEvent &event ); | |
59305 | }; | |
59306 | # 178 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/filedlg.h" 2 | |
59307 | # 80 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
59308 | ||
59309 | ||
59310 | ||
59311 | ||
59312 | ||
59313 | # 1 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/valtext.h" 1 | |
59314 | # 86 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wx.h" 2 | |
59315 | # 55 "/var/tmp/portage/x11-libs/wxGTK-2.6.3.3/work/wxPython-src-2.6.3.3/include/wx/wxprec.h" 2 |