]> git.wh0rd.org - ICEs.git/blob - PR31899/enblend.ii.0
more
[ICEs.git] / PR31899 / enblend.ii.0
1 // /usr/libexec/gcc/powerpc-unknown-linux-gnu/4.2.0/cc1plus -quiet -I. -I. -I.. -I../include -MD enblend-enblend.d -MF .deps/enblend-enblend.Tpo -MP -MT enblend-enblend.o -MQ enblend-enblend.o -D_GNU_SOURCE -D__unix__ -D__gnu_linux__ -D__linux__ -Dunix -D__unix -Dlinux -D__linux -Asystem=linux -Asystem=unix -Asystem=posix -DHAVE_CONFIG_H -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DENBLEND_CACHE_IMAGES -DNDEBUG enblend.cc -msecure-plt -quiet -dumpbase enblend.cc -mcpu=970 -auxbase-strip enblend-enblend.o -g -g -O3 -O2 -Wall -ffast-math -o - -frandom-seed=0
2 # 1 "enblend.cc"
3 # 1 "/var/tmp/portage/media-gfx/enblend-3.0/work/enblend-3.0/src//"
4 # 1 "<built-in>"
5 # 1 "<command-line>"
6 # 1 "enblend.cc"
7 # 21 "enblend.cc"
8 # 1 "../config.h" 1
9 # 22 "enblend.cc" 2
10 # 30 "enblend.cc"
11 # 1 "float_cast.h" 1
12 # 63 "float_cast.h"
13 # 1 "/usr/include/math.h" 1 3 4
14 # 28 "/usr/include/math.h" 3 4
15 # 1 "/usr/include/features.h" 1 3 4
16 # 322 "/usr/include/features.h" 3 4
17 # 1 "/usr/include/sys/cdefs.h" 1 3 4
18 # 324 "/usr/include/sys/cdefs.h" 3 4
19 # 1 "/usr/include/bits/wordsize.h" 1 3 4
20 # 325 "/usr/include/sys/cdefs.h" 2 3 4
21 # 323 "/usr/include/features.h" 2 3 4
22 # 345 "/usr/include/features.h" 3 4
23 # 1 "/usr/include/gnu/stubs.h" 1 3 4
24
25
26
27 # 1 "/usr/include/bits/wordsize.h" 1 3 4
28 # 5 "/usr/include/gnu/stubs.h" 2 3 4
29
30
31 # 1 "/usr/include/gnu/stubs-32.h" 1 3 4
32 # 8 "/usr/include/gnu/stubs.h" 2 3 4
33 # 346 "/usr/include/features.h" 2 3 4
34 # 29 "/usr/include/math.h" 2 3 4
35
36 extern "C" {
37
38
39
40 # 1 "/usr/include/bits/huge_val.h" 1 3 4
41 # 35 "/usr/include/math.h" 2 3 4
42
43 # 1 "/usr/include/bits/huge_valf.h" 1 3 4
44 # 37 "/usr/include/math.h" 2 3 4
45 # 1 "/usr/include/bits/huge_vall.h" 1 3 4
46 # 38 "/usr/include/math.h" 2 3 4
47
48
49 # 1 "/usr/include/bits/inf.h" 1 3 4
50 # 41 "/usr/include/math.h" 2 3 4
51
52
53 # 1 "/usr/include/bits/nan.h" 1 3 4
54 # 44 "/usr/include/math.h" 2 3 4
55
56
57
58 # 1 "/usr/include/bits/mathdef.h" 1 3 4
59 # 38 "/usr/include/bits/mathdef.h" 3 4
60 typedef float float_t;
61
62 typedef double double_t;
63 # 48 "/usr/include/math.h" 2 3 4
64 # 71 "/usr/include/math.h" 3 4
65 # 1 "/usr/include/bits/mathcalls.h" 1 3 4
66 # 53 "/usr/include/bits/mathcalls.h" 3 4
67
68
69 extern double acos (double __x) throw (); extern double __acos (double __x) throw ();
70
71 extern double asin (double __x) throw (); extern double __asin (double __x) throw ();
72
73 extern double atan (double __x) throw (); extern double __atan (double __x) throw ();
74
75 extern double atan2 (double __y, double __x) throw (); extern double __atan2 (double __y, double __x) throw ();
76
77
78 extern double cos (double __x) throw (); extern double __cos (double __x) throw ();
79
80 extern double sin (double __x) throw (); extern double __sin (double __x) throw ();
81
82 extern double tan (double __x) throw (); extern double __tan (double __x) throw ();
83
84
85
86
87 extern double cosh (double __x) throw (); extern double __cosh (double __x) throw ();
88
89 extern double sinh (double __x) throw (); extern double __sinh (double __x) throw ();
90
91 extern double tanh (double __x) throw (); extern double __tanh (double __x) throw ();
92
93
94
95
96 extern void sincos (double __x, double *__sinx, double *__cosx) throw (); extern void __sincos (double __x, double *__sinx, double *__cosx) throw ();
97
98
99
100
101
102
103 extern double acosh (double __x) throw (); extern double __acosh (double __x) throw ();
104
105 extern double asinh (double __x) throw (); extern double __asinh (double __x) throw ();
106
107 extern double atanh (double __x) throw (); extern double __atanh (double __x) throw ();
108
109
110
111
112
113
114
115 extern double exp (double __x) throw (); extern double __exp (double __x) throw ();
116
117
118 extern double frexp (double __x, int *__exponent) throw (); extern double __frexp (double __x, int *__exponent) throw ();
119
120
121 extern double ldexp (double __x, int __exponent) throw (); extern double __ldexp (double __x, int __exponent) throw ();
122
123
124 extern double log (double __x) throw (); extern double __log (double __x) throw ();
125
126
127 extern double log10 (double __x) throw (); extern double __log10 (double __x) throw ();
128
129
130 extern double modf (double __x, double *__iptr) throw (); extern double __modf (double __x, double *__iptr) throw ();
131
132
133
134
135 extern double exp10 (double __x) throw (); extern double __exp10 (double __x) throw ();
136
137 extern double pow10 (double __x) throw (); extern double __pow10 (double __x) throw ();
138
139
140
141
142
143 extern double expm1 (double __x) throw (); extern double __expm1 (double __x) throw ();
144
145
146 extern double log1p (double __x) throw (); extern double __log1p (double __x) throw ();
147
148
149 extern double logb (double __x) throw (); extern double __logb (double __x) throw ();
150
151
152
153
154
155
156 extern double exp2 (double __x) throw (); extern double __exp2 (double __x) throw ();
157
158
159 extern double log2 (double __x) throw (); extern double __log2 (double __x) throw ();
160
161
162
163
164
165
166
167
168 extern double pow (double __x, double __y) throw (); extern double __pow (double __x, double __y) throw ();
169
170
171 extern double sqrt (double __x) throw (); extern double __sqrt (double __x) throw ();
172
173
174
175
176
177 extern double hypot (double __x, double __y) throw (); extern double __hypot (double __x, double __y) throw ();
178
179
180
181
182
183
184 extern double cbrt (double __x) throw (); extern double __cbrt (double __x) throw ();
185
186
187
188
189
190
191
192
193 extern double ceil (double __x) throw () __attribute__ ((__const__)); extern double __ceil (double __x) throw () __attribute__ ((__const__));
194
195
196 extern double fabs (double __x) throw () __attribute__ ((__const__)); extern double __fabs (double __x) throw () __attribute__ ((__const__));
197
198
199 extern double floor (double __x) throw () __attribute__ ((__const__)); extern double __floor (double __x) throw () __attribute__ ((__const__));
200
201
202 extern double fmod (double __x, double __y) throw (); extern double __fmod (double __x, double __y) throw ();
203
204
205
206
207 extern int __isinf (double __value) throw () __attribute__ ((__const__));
208
209
210 extern int __finite (double __value) throw () __attribute__ ((__const__));
211
212
213
214
215
216 extern int isinf (double __value) throw () __attribute__ ((__const__));
217
218
219 extern int finite (double __value) throw () __attribute__ ((__const__));
220
221
222 extern double drem (double __x, double __y) throw (); extern double __drem (double __x, double __y) throw ();
223
224
225
226 extern double significand (double __x) throw (); extern double __significand (double __x) throw ();
227
228
229
230
231
232 extern double copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double __copysign (double __x, double __y) throw () __attribute__ ((__const__));
233
234
235
236
237
238
239 extern double nan (__const char *__tagb) throw () __attribute__ ((__const__)); extern double __nan (__const char *__tagb) throw () __attribute__ ((__const__));
240
241
242
243
244
245 extern int __isnan (double __value) throw () __attribute__ ((__const__));
246
247
248
249 extern int isnan (double __value) throw () __attribute__ ((__const__));
250
251
252 extern double j0 (double) throw (); extern double __j0 (double) throw ();
253 extern double j1 (double) throw (); extern double __j1 (double) throw ();
254 extern double jn (int, double) throw (); extern double __jn (int, double) throw ();
255 extern double y0 (double) throw (); extern double __y0 (double) throw ();
256 extern double y1 (double) throw (); extern double __y1 (double) throw ();
257 extern double yn (int, double) throw (); extern double __yn (int, double) throw ();
258
259
260
261
262
263
264 extern double erf (double) throw (); extern double __erf (double) throw ();
265 extern double erfc (double) throw (); extern double __erfc (double) throw ();
266 extern double lgamma (double) throw (); extern double __lgamma (double) throw ();
267
268
269
270
271
272
273 extern double tgamma (double) throw (); extern double __tgamma (double) throw ();
274
275
276
277
278
279 extern double gamma (double) throw (); extern double __gamma (double) throw ();
280
281
282
283
284
285
286 extern double lgamma_r (double, int *__signgamp) throw (); extern double __lgamma_r (double, int *__signgamp) throw ();
287
288
289
290
291
292
293
294 extern double rint (double __x) throw (); extern double __rint (double __x) throw ();
295
296
297 extern double nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) throw () __attribute__ ((__const__));
298
299 extern double nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) throw () __attribute__ ((__const__));
300
301
302
303 extern double remainder (double __x, double __y) throw (); extern double __remainder (double __x, double __y) throw ();
304
305
306
307 extern double scalbn (double __x, int __n) throw (); extern double __scalbn (double __x, int __n) throw ();
308
309
310
311 extern int ilogb (double __x) throw (); extern int __ilogb (double __x) throw ();
312
313
314
315
316 extern double scalbln (double __x, long int __n) throw (); extern double __scalbln (double __x, long int __n) throw ();
317
318
319
320 extern double nearbyint (double __x) throw (); extern double __nearbyint (double __x) throw ();
321
322
323
324 extern double round (double __x) throw () __attribute__ ((__const__)); extern double __round (double __x) throw () __attribute__ ((__const__));
325
326
327
328 extern double trunc (double __x) throw () __attribute__ ((__const__)); extern double __trunc (double __x) throw () __attribute__ ((__const__));
329
330
331
332
333 extern double remquo (double __x, double __y, int *__quo) throw (); extern double __remquo (double __x, double __y, int *__quo) throw ();
334
335
336
337
338
339
340 extern long int lrint (double __x) throw (); extern long int __lrint (double __x) throw ();
341 extern long long int llrint (double __x) throw (); extern long long int __llrint (double __x) throw ();
342
343
344
345 extern long int lround (double __x) throw (); extern long int __lround (double __x) throw ();
346 extern long long int llround (double __x) throw (); extern long long int __llround (double __x) throw ();
347
348
349
350 extern double fdim (double __x, double __y) throw (); extern double __fdim (double __x, double __y) throw ();
351
352
353 extern double fmax (double __x, double __y) throw (); extern double __fmax (double __x, double __y) throw ();
354
355
356 extern double fmin (double __x, double __y) throw (); extern double __fmin (double __x, double __y) throw ();
357
358
359
360 extern int __fpclassify (double __value) throw ()
361 __attribute__ ((__const__));
362
363
364 extern int __signbit (double __value) throw ()
365 __attribute__ ((__const__));
366
367
368
369 extern double fma (double __x, double __y, double __z) throw (); extern double __fma (double __x, double __y, double __z) throw ();
370
371
372
373
374
375
376
377
378 extern double scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw ();
379 # 72 "/usr/include/math.h" 2 3 4
380 # 94 "/usr/include/math.h" 3 4
381 # 1 "/usr/include/bits/mathcalls.h" 1 3 4
382 # 53 "/usr/include/bits/mathcalls.h" 3 4
383
384
385 extern float acosf (float __x) throw (); extern float __acosf (float __x) throw ();
386
387 extern float asinf (float __x) throw (); extern float __asinf (float __x) throw ();
388
389 extern float atanf (float __x) throw (); extern float __atanf (float __x) throw ();
390
391 extern float atan2f (float __y, float __x) throw (); extern float __atan2f (float __y, float __x) throw ();
392
393
394 extern float cosf (float __x) throw (); extern float __cosf (float __x) throw ();
395
396 extern float sinf (float __x) throw (); extern float __sinf (float __x) throw ();
397
398 extern float tanf (float __x) throw (); extern float __tanf (float __x) throw ();
399
400
401
402
403 extern float coshf (float __x) throw (); extern float __coshf (float __x) throw ();
404
405 extern float sinhf (float __x) throw (); extern float __sinhf (float __x) throw ();
406
407 extern float tanhf (float __x) throw (); extern float __tanhf (float __x) throw ();
408
409
410
411
412 extern void sincosf (float __x, float *__sinx, float *__cosx) throw (); extern void __sincosf (float __x, float *__sinx, float *__cosx) throw ();
413
414
415
416
417
418
419 extern float acoshf (float __x) throw (); extern float __acoshf (float __x) throw ();
420
421 extern float asinhf (float __x) throw (); extern float __asinhf (float __x) throw ();
422
423 extern float atanhf (float __x) throw (); extern float __atanhf (float __x) throw ();
424
425
426
427
428
429
430
431 extern float expf (float __x) throw (); extern float __expf (float __x) throw ();
432
433
434 extern float frexpf (float __x, int *__exponent) throw (); extern float __frexpf (float __x, int *__exponent) throw ();
435
436
437 extern float ldexpf (float __x, int __exponent) throw (); extern float __ldexpf (float __x, int __exponent) throw ();
438
439
440 extern float logf (float __x) throw (); extern float __logf (float __x) throw ();
441
442
443 extern float log10f (float __x) throw (); extern float __log10f (float __x) throw ();
444
445
446 extern float modff (float __x, float *__iptr) throw (); extern float __modff (float __x, float *__iptr) throw ();
447
448
449
450
451 extern float exp10f (float __x) throw (); extern float __exp10f (float __x) throw ();
452
453 extern float pow10f (float __x) throw (); extern float __pow10f (float __x) throw ();
454
455
456
457
458
459 extern float expm1f (float __x) throw (); extern float __expm1f (float __x) throw ();
460
461
462 extern float log1pf (float __x) throw (); extern float __log1pf (float __x) throw ();
463
464
465 extern float logbf (float __x) throw (); extern float __logbf (float __x) throw ();
466
467
468
469
470
471
472 extern float exp2f (float __x) throw (); extern float __exp2f (float __x) throw ();
473
474
475 extern float log2f (float __x) throw (); extern float __log2f (float __x) throw ();
476
477
478
479
480
481
482
483
484 extern float powf (float __x, float __y) throw (); extern float __powf (float __x, float __y) throw ();
485
486
487 extern float sqrtf (float __x) throw (); extern float __sqrtf (float __x) throw ();
488
489
490
491
492
493 extern float hypotf (float __x, float __y) throw (); extern float __hypotf (float __x, float __y) throw ();
494
495
496
497
498
499
500 extern float cbrtf (float __x) throw (); extern float __cbrtf (float __x) throw ();
501
502
503
504
505
506
507
508
509 extern float ceilf (float __x) throw () __attribute__ ((__const__)); extern float __ceilf (float __x) throw () __attribute__ ((__const__));
510
511
512 extern float fabsf (float __x) throw () __attribute__ ((__const__)); extern float __fabsf (float __x) throw () __attribute__ ((__const__));
513
514
515 extern float floorf (float __x) throw () __attribute__ ((__const__)); extern float __floorf (float __x) throw () __attribute__ ((__const__));
516
517
518 extern float fmodf (float __x, float __y) throw (); extern float __fmodf (float __x, float __y) throw ();
519
520
521
522
523 extern int __isinff (float __value) throw () __attribute__ ((__const__));
524
525
526 extern int __finitef (float __value) throw () __attribute__ ((__const__));
527
528
529
530
531
532 extern int isinff (float __value) throw () __attribute__ ((__const__));
533
534
535 extern int finitef (float __value) throw () __attribute__ ((__const__));
536
537
538 extern float dremf (float __x, float __y) throw (); extern float __dremf (float __x, float __y) throw ();
539
540
541
542 extern float significandf (float __x) throw (); extern float __significandf (float __x) throw ();
543
544
545
546
547
548 extern float copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) throw () __attribute__ ((__const__));
549
550
551
552
553
554
555 extern float nanf (__const char *__tagb) throw () __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) throw () __attribute__ ((__const__));
556
557
558
559
560
561 extern int __isnanf (float __value) throw () __attribute__ ((__const__));
562
563
564
565 extern int isnanf (float __value) throw () __attribute__ ((__const__));
566
567
568 extern float j0f (float) throw (); extern float __j0f (float) throw ();
569 extern float j1f (float) throw (); extern float __j1f (float) throw ();
570 extern float jnf (int, float) throw (); extern float __jnf (int, float) throw ();
571 extern float y0f (float) throw (); extern float __y0f (float) throw ();
572 extern float y1f (float) throw (); extern float __y1f (float) throw ();
573 extern float ynf (int, float) throw (); extern float __ynf (int, float) throw ();
574
575
576
577
578
579
580 extern float erff (float) throw (); extern float __erff (float) throw ();
581 extern float erfcf (float) throw (); extern float __erfcf (float) throw ();
582 extern float lgammaf (float) throw (); extern float __lgammaf (float) throw ();
583
584
585
586
587
588
589 extern float tgammaf (float) throw (); extern float __tgammaf (float) throw ();
590
591
592
593
594
595 extern float gammaf (float) throw (); extern float __gammaf (float) throw ();
596
597
598
599
600
601
602 extern float lgammaf_r (float, int *__signgamp) throw (); extern float __lgammaf_r (float, int *__signgamp) throw ();
603
604
605
606
607
608
609
610 extern float rintf (float __x) throw (); extern float __rintf (float __x) throw ();
611
612
613 extern float nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) throw () __attribute__ ((__const__));
614
615 extern float nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__));
616
617
618
619 extern float remainderf (float __x, float __y) throw (); extern float __remainderf (float __x, float __y) throw ();
620
621
622
623 extern float scalbnf (float __x, int __n) throw (); extern float __scalbnf (float __x, int __n) throw ();
624
625
626
627 extern int ilogbf (float __x) throw (); extern int __ilogbf (float __x) throw ();
628
629
630
631
632 extern float scalblnf (float __x, long int __n) throw (); extern float __scalblnf (float __x, long int __n) throw ();
633
634
635
636 extern float nearbyintf (float __x) throw (); extern float __nearbyintf (float __x) throw ();
637
638
639
640 extern float roundf (float __x) throw () __attribute__ ((__const__)); extern float __roundf (float __x) throw () __attribute__ ((__const__));
641
642
643
644 extern float truncf (float __x) throw () __attribute__ ((__const__)); extern float __truncf (float __x) throw () __attribute__ ((__const__));
645
646
647
648
649 extern float remquof (float __x, float __y, int *__quo) throw (); extern float __remquof (float __x, float __y, int *__quo) throw ();
650
651
652
653
654
655
656 extern long int lrintf (float __x) throw (); extern long int __lrintf (float __x) throw ();
657 extern long long int llrintf (float __x) throw (); extern long long int __llrintf (float __x) throw ();
658
659
660
661 extern long int lroundf (float __x) throw (); extern long int __lroundf (float __x) throw ();
662 extern long long int llroundf (float __x) throw (); extern long long int __llroundf (float __x) throw ();
663
664
665
666 extern float fdimf (float __x, float __y) throw (); extern float __fdimf (float __x, float __y) throw ();
667
668
669 extern float fmaxf (float __x, float __y) throw (); extern float __fmaxf (float __x, float __y) throw ();
670
671
672 extern float fminf (float __x, float __y) throw (); extern float __fminf (float __x, float __y) throw ();
673
674
675
676 extern int __fpclassifyf (float __value) throw ()
677 __attribute__ ((__const__));
678
679
680 extern int __signbitf (float __value) throw ()
681 __attribute__ ((__const__));
682
683
684
685 extern float fmaf (float __x, float __y, float __z) throw (); extern float __fmaf (float __x, float __y, float __z) throw ();
686
687
688
689
690
691
692
693
694 extern float scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw ();
695 # 95 "/usr/include/math.h" 2 3 4
696 # 141 "/usr/include/math.h" 3 4
697 # 1 "/usr/include/bits/mathcalls.h" 1 3 4
698 # 53 "/usr/include/bits/mathcalls.h" 3 4
699
700
701 extern long double acosl (long double __x) throw (); extern long double __acosl (long double __x) throw ();
702
703 extern long double asinl (long double __x) throw (); extern long double __asinl (long double __x) throw ();
704
705 extern long double atanl (long double __x) throw (); extern long double __atanl (long double __x) throw ();
706
707 extern long double atan2l (long double __y, long double __x) throw (); extern long double __atan2l (long double __y, long double __x) throw ();
708
709
710 extern long double cosl (long double __x) throw (); extern long double __cosl (long double __x) throw ();
711
712 extern long double sinl (long double __x) throw (); extern long double __sinl (long double __x) throw ();
713
714 extern long double tanl (long double __x) throw (); extern long double __tanl (long double __x) throw ();
715
716
717
718
719 extern long double coshl (long double __x) throw (); extern long double __coshl (long double __x) throw ();
720
721 extern long double sinhl (long double __x) throw (); extern long double __sinhl (long double __x) throw ();
722
723 extern long double tanhl (long double __x) throw (); extern long double __tanhl (long double __x) throw ();
724
725
726
727
728 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 ();
729
730
731
732
733
734
735 extern long double acoshl (long double __x) throw (); extern long double __acoshl (long double __x) throw ();
736
737 extern long double asinhl (long double __x) throw (); extern long double __asinhl (long double __x) throw ();
738
739 extern long double atanhl (long double __x) throw (); extern long double __atanhl (long double __x) throw ();
740
741
742
743
744
745
746
747 extern long double expl (long double __x) throw (); extern long double __expl (long double __x) throw ();
748
749
750 extern long double frexpl (long double __x, int *__exponent) throw (); extern long double __frexpl (long double __x, int *__exponent) throw ();
751
752
753 extern long double ldexpl (long double __x, int __exponent) throw (); extern long double __ldexpl (long double __x, int __exponent) throw ();
754
755
756 extern long double logl (long double __x) throw (); extern long double __logl (long double __x) throw ();
757
758
759 extern long double log10l (long double __x) throw (); extern long double __log10l (long double __x) throw ();
760
761
762 extern long double modfl (long double __x, long double *__iptr) throw (); extern long double __modfl (long double __x, long double *__iptr) throw ();
763
764
765
766
767 extern long double exp10l (long double __x) throw (); extern long double __exp10l (long double __x) throw ();
768
769 extern long double pow10l (long double __x) throw (); extern long double __pow10l (long double __x) throw ();
770
771
772
773
774
775 extern long double expm1l (long double __x) throw (); extern long double __expm1l (long double __x) throw ();
776
777
778 extern long double log1pl (long double __x) throw (); extern long double __log1pl (long double __x) throw ();
779
780
781 extern long double logbl (long double __x) throw (); extern long double __logbl (long double __x) throw ();
782
783
784
785
786
787
788 extern long double exp2l (long double __x) throw (); extern long double __exp2l (long double __x) throw ();
789
790
791 extern long double log2l (long double __x) throw (); extern long double __log2l (long double __x) throw ();
792
793
794
795
796
797
798
799
800 extern long double powl (long double __x, long double __y) throw (); extern long double __powl (long double __x, long double __y) throw ();
801
802
803 extern long double sqrtl (long double __x) throw (); extern long double __sqrtl (long double __x) throw ();
804
805
806
807
808
809 extern long double hypotl (long double __x, long double __y) throw (); extern long double __hypotl (long double __x, long double __y) throw ();
810
811
812
813
814
815
816 extern long double cbrtl (long double __x) throw (); extern long double __cbrtl (long double __x) throw ();
817
818
819
820
821
822
823
824
825 extern long double ceill (long double __x) throw () __attribute__ ((__const__)); extern long double __ceill (long double __x) throw () __attribute__ ((__const__));
826
827
828 extern long double fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double __fabsl (long double __x) throw () __attribute__ ((__const__));
829
830
831 extern long double floorl (long double __x) throw () __attribute__ ((__const__)); extern long double __floorl (long double __x) throw () __attribute__ ((__const__));
832
833
834 extern long double fmodl (long double __x, long double __y) throw (); extern long double __fmodl (long double __x, long double __y) throw ();
835
836
837
838
839 extern int __isinfl (long double __value) throw () __attribute__ ((__const__));
840
841
842 extern int __finitel (long double __value) throw () __attribute__ ((__const__));
843
844
845
846
847
848 extern int isinfl (long double __value) throw () __attribute__ ((__const__));
849
850
851 extern int finitel (long double __value) throw () __attribute__ ((__const__));
852
853
854 extern long double dreml (long double __x, long double __y) throw (); extern long double __dreml (long double __x, long double __y) throw ();
855
856
857
858 extern long double significandl (long double __x) throw (); extern long double __significandl (long double __x) throw ();
859
860
861
862
863
864 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__));
865
866
867
868
869
870
871 extern long double nanl (__const char *__tagb) throw () __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) throw () __attribute__ ((__const__));
872
873
874
875
876
877 extern int __isnanl (long double __value) throw () __attribute__ ((__const__));
878
879
880
881 extern int isnanl (long double __value) throw () __attribute__ ((__const__));
882
883
884 extern long double j0l (long double) throw (); extern long double __j0l (long double) throw ();
885 extern long double j1l (long double) throw (); extern long double __j1l (long double) throw ();
886 extern long double jnl (int, long double) throw (); extern long double __jnl (int, long double) throw ();
887 extern long double y0l (long double) throw (); extern long double __y0l (long double) throw ();
888 extern long double y1l (long double) throw (); extern long double __y1l (long double) throw ();
889 extern long double ynl (int, long double) throw (); extern long double __ynl (int, long double) throw ();
890
891
892
893
894
895
896 extern long double erfl (long double) throw (); extern long double __erfl (long double) throw ();
897 extern long double erfcl (long double) throw (); extern long double __erfcl (long double) throw ();
898 extern long double lgammal (long double) throw (); extern long double __lgammal (long double) throw ();
899
900
901
902
903
904
905 extern long double tgammal (long double) throw (); extern long double __tgammal (long double) throw ();
906
907
908
909
910
911 extern long double gammal (long double) throw (); extern long double __gammal (long double) throw ();
912
913
914
915
916
917
918 extern long double lgammal_r (long double, int *__signgamp) throw (); extern long double __lgammal_r (long double, int *__signgamp) throw ();
919
920
921
922
923
924
925
926 extern long double rintl (long double __x) throw (); extern long double __rintl (long double __x) throw ();
927
928
929 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__));
930
931 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__));
932
933
934
935 extern long double remainderl (long double __x, long double __y) throw (); extern long double __remainderl (long double __x, long double __y) throw ();
936
937
938
939 extern long double scalbnl (long double __x, int __n) throw (); extern long double __scalbnl (long double __x, int __n) throw ();
940
941
942
943 extern int ilogbl (long double __x) throw (); extern int __ilogbl (long double __x) throw ();
944
945
946
947
948 extern long double scalblnl (long double __x, long int __n) throw (); extern long double __scalblnl (long double __x, long int __n) throw ();
949
950
951
952 extern long double nearbyintl (long double __x) throw (); extern long double __nearbyintl (long double __x) throw ();
953
954
955
956 extern long double roundl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundl (long double __x) throw () __attribute__ ((__const__));
957
958
959
960 extern long double truncl (long double __x) throw () __attribute__ ((__const__)); extern long double __truncl (long double __x) throw () __attribute__ ((__const__));
961
962
963
964
965 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 ();
966
967
968
969
970
971
972 extern long int lrintl (long double __x) throw (); extern long int __lrintl (long double __x) throw ();
973 extern long long int llrintl (long double __x) throw (); extern long long int __llrintl (long double __x) throw ();
974
975
976
977 extern long int lroundl (long double __x) throw (); extern long int __lroundl (long double __x) throw ();
978 extern long long int llroundl (long double __x) throw (); extern long long int __llroundl (long double __x) throw ();
979
980
981
982 extern long double fdiml (long double __x, long double __y) throw (); extern long double __fdiml (long double __x, long double __y) throw ();
983
984
985 extern long double fmaxl (long double __x, long double __y) throw (); extern long double __fmaxl (long double __x, long double __y) throw ();
986
987
988 extern long double fminl (long double __x, long double __y) throw (); extern long double __fminl (long double __x, long double __y) throw ();
989
990
991
992 extern int __fpclassifyl (long double __value) throw ()
993 __attribute__ ((__const__));
994
995
996 extern int __signbitl (long double __value) throw ()
997 __attribute__ ((__const__));
998
999
1000
1001 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 ();
1002
1003
1004
1005
1006
1007
1008
1009
1010 extern long double scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw ();
1011 # 142 "/usr/include/math.h" 2 3 4
1012 # 157 "/usr/include/math.h" 3 4
1013 extern int signgam;
1014 # 198 "/usr/include/math.h" 3 4
1015 enum
1016 {
1017 FP_NAN,
1018
1019 FP_INFINITE,
1020
1021 FP_ZERO,
1022
1023 FP_SUBNORMAL,
1024
1025 FP_NORMAL
1026
1027 };
1028 # 284 "/usr/include/math.h" 3 4
1029 typedef enum
1030 {
1031 _IEEE_ = -1,
1032 _SVID_,
1033 _XOPEN_,
1034 _POSIX_,
1035 _ISOC_
1036 } _LIB_VERSION_TYPE;
1037
1038
1039
1040
1041 extern _LIB_VERSION_TYPE _LIB_VERSION;
1042 # 307 "/usr/include/math.h" 3 4
1043 struct __exception
1044
1045
1046
1047 {
1048 int type;
1049 char *name;
1050 double arg1;
1051 double arg2;
1052 double retval;
1053 };
1054
1055
1056 extern int matherr (struct __exception *__exc) throw ();
1057 # 409 "/usr/include/math.h" 3 4
1058 # 1 "/usr/include/bits/mathinline.h" 1 3 4
1059 # 63 "/usr/include/bits/mathinline.h" 3 4
1060 __inline int
1061 __signbitf (float __x) throw ()
1062 {
1063 __extension__ union { float __f; int __i; } __u = { __f: __x };
1064 return __u.__i < 0;
1065 }
1066 __inline int
1067 __signbit (double __x) throw ()
1068 {
1069 __extension__ union { double __d; int __i[2]; } __u = { __d: __x };
1070 return __u.__i[0] < 0;
1071 }
1072 # 83 "/usr/include/bits/mathinline.h" 3 4
1073 __inline long int lrint (double __x) throw ();
1074 __inline long int
1075 lrint (double __x) throw ()
1076 {
1077 union {
1078 double __d;
1079 int __ll[2];
1080 } __u;
1081 __asm__ ("fctiw %0,%1" : "=f"(__u.__d) : "f"(__x));
1082 return __u.__ll[1];
1083 }
1084
1085 __inline long int lrintf (float __x) throw ();
1086 __inline long int
1087 lrintf (float __x) throw ()
1088 {
1089 union {
1090 double __d;
1091 int __ll[2];
1092 } __u;
1093 __asm__ ("fctiw %0,%1" : "=f"(__u.__d) : "f"(__x));
1094 return __u.__ll[1];
1095 }
1096
1097
1098 __inline double fdim (double __x, double __y) throw ();
1099 __inline double
1100 fdim (double __x, double __y) throw ()
1101 {
1102 return __x <= __y ? 0 : __x - __y;
1103 }
1104
1105 __inline float fdimf (float __x, float __y) throw ();
1106 __inline float
1107 fdimf (float __x, float __y) throw ()
1108 {
1109 return __x <= __y ? 0 : __x - __y;
1110 }
1111 # 410 "/usr/include/math.h" 2 3 4
1112 # 465 "/usr/include/math.h" 3 4
1113 }
1114 # 64 "float_cast.h" 2
1115 # 31 "enblend.cc" 2
1116 # 47 "enblend.cc"
1117 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/algorithm" 1 3
1118 # 63 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/algorithm" 3
1119
1120 # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/algorithm" 3
1121
1122 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 1 3
1123 # 65 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3
1124 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++config.h" 1 3
1125 # 41 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++config.h" 3
1126 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/os_defines.h" 1 3
1127 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++config.h" 2 3
1128
1129
1130 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/cpu_defines.h" 1 3
1131 # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++config.h" 2 3
1132 # 149 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++config.h" 3
1133 namespace std __attribute__ ((__visibility__ ("default"))) {
1134
1135
1136
1137
1138 namespace __gnu_cxx_ldbl128 { }
1139 using namespace __gnu_cxx_ldbl128 __attribute__((__strong__));
1140
1141
1142
1143
1144
1145 }
1146 # 66 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 2 3
1147 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstring" 1 3
1148 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstring" 3
1149
1150 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstring" 3
1151
1152
1153 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstddef" 1 3
1154 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstddef" 3
1155
1156 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstddef" 3
1157
1158
1159 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4
1160 # 152 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 3 4
1161 typedef int ptrdiff_t;
1162 # 214 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 3 4
1163 typedef unsigned int size_t;
1164 # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstddef" 2 3
1165
1166 namespace std __attribute__ ((__visibility__ ("default"))) {
1167
1168 using ::ptrdiff_t;
1169 using ::size_t;
1170
1171 }
1172 # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstring" 2 3
1173 # 1 "/usr/include/string.h" 1 3 4
1174 # 28 "/usr/include/string.h" 3 4
1175 extern "C" {
1176
1177
1178
1179
1180 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4
1181 # 34 "/usr/include/string.h" 2 3 4
1182
1183
1184
1185
1186 extern void *memcpy (void *__restrict __dest,
1187 __const void *__restrict __src, size_t __n)
1188 throw () __attribute__ ((__nonnull__ (1, 2)));
1189
1190
1191 extern void *memmove (void *__dest, __const void *__src, size_t __n)
1192 throw () __attribute__ ((__nonnull__ (1, 2)));
1193
1194
1195
1196
1197
1198
1199 extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
1200 int __c, size_t __n)
1201 throw () __attribute__ ((__nonnull__ (1, 2)));
1202
1203
1204
1205
1206
1207 extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
1208
1209
1210 extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
1211 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1212
1213
1214 extern void *memchr (__const void *__s, int __c, size_t __n)
1215 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1216
1217
1218
1219
1220
1221 extern void *rawmemchr (__const void *__s, int __c)
1222 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1223
1224
1225 extern void *memrchr (__const void *__s, int __c, size_t __n)
1226 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1227
1228
1229
1230
1231
1232 extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
1233 throw () __attribute__ ((__nonnull__ (1, 2)));
1234
1235 extern char *strncpy (char *__restrict __dest,
1236 __const char *__restrict __src, size_t __n)
1237 throw () __attribute__ ((__nonnull__ (1, 2)));
1238
1239
1240 extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
1241 throw () __attribute__ ((__nonnull__ (1, 2)));
1242
1243 extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
1244 size_t __n) throw () __attribute__ ((__nonnull__ (1, 2)));
1245
1246
1247 extern int strcmp (__const char *__s1, __const char *__s2)
1248 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1249
1250 extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
1251 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1252
1253
1254 extern int strcoll (__const char *__s1, __const char *__s2)
1255 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1256
1257 extern size_t strxfrm (char *__restrict __dest,
1258 __const char *__restrict __src, size_t __n)
1259 throw () __attribute__ ((__nonnull__ (2)));
1260
1261
1262
1263
1264
1265
1266 # 1 "/usr/include/xlocale.h" 1 3 4
1267 # 28 "/usr/include/xlocale.h" 3 4
1268 typedef struct __locale_struct
1269 {
1270
1271 struct locale_data *__locales[13];
1272
1273
1274 const unsigned short int *__ctype_b;
1275 const int *__ctype_tolower;
1276 const int *__ctype_toupper;
1277
1278
1279 const char *__names[13];
1280 } *__locale_t;
1281 # 119 "/usr/include/string.h" 2 3 4
1282
1283
1284 extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l)
1285 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
1286
1287 extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n,
1288 __locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4)));
1289
1290
1291
1292
1293 extern char *strdup (__const char *__s)
1294 throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
1295
1296
1297
1298
1299
1300
1301 extern char *strndup (__const char *__string, size_t __n)
1302 throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
1303 # 165 "/usr/include/string.h" 3 4
1304
1305
1306 extern char *strchr (__const char *__s, int __c)
1307 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1308
1309 extern char *strrchr (__const char *__s, int __c)
1310 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1311
1312
1313
1314
1315
1316 extern char *strchrnul (__const char *__s, int __c)
1317 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1318
1319
1320
1321
1322
1323 extern size_t strcspn (__const char *__s, __const char *__reject)
1324 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1325
1326
1327 extern size_t strspn (__const char *__s, __const char *__accept)
1328 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1329
1330 extern char *strpbrk (__const char *__s, __const char *__accept)
1331 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1332
1333 extern char *strstr (__const char *__haystack, __const char *__needle)
1334 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1335
1336
1337
1338 extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
1339 throw () __attribute__ ((__nonnull__ (2)));
1340
1341
1342
1343
1344 extern char *__strtok_r (char *__restrict __s,
1345 __const char *__restrict __delim,
1346 char **__restrict __save_ptr)
1347 throw () __attribute__ ((__nonnull__ (2, 3)));
1348
1349 extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
1350 char **__restrict __save_ptr)
1351 throw () __attribute__ ((__nonnull__ (2, 3)));
1352
1353
1354
1355
1356 extern char *strcasestr (__const char *__haystack, __const char *__needle)
1357 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1358
1359
1360
1361
1362
1363
1364 extern void *memmem (__const void *__haystack, size_t __haystacklen,
1365 __const void *__needle, size_t __needlelen)
1366 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3)));
1367
1368
1369
1370 extern void *__mempcpy (void *__restrict __dest,
1371 __const void *__restrict __src, size_t __n)
1372 throw () __attribute__ ((__nonnull__ (1, 2)));
1373 extern void *mempcpy (void *__restrict __dest,
1374 __const void *__restrict __src, size_t __n)
1375 throw () __attribute__ ((__nonnull__ (1, 2)));
1376
1377
1378
1379
1380
1381 extern size_t strlen (__const char *__s)
1382 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1383
1384
1385
1386
1387
1388 extern size_t strnlen (__const char *__string, size_t __maxlen)
1389 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1390
1391
1392
1393
1394
1395 extern char *strerror (int __errnum) throw ();
1396
1397 # 281 "/usr/include/string.h" 3 4
1398 extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)
1399 throw () __attribute__ ((__nonnull__ (2)));
1400
1401
1402
1403
1404
1405 extern char *strerror_l (int __errnum, __locale_t __l) throw ();
1406
1407
1408
1409
1410
1411 extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
1412
1413
1414
1415 extern void bcopy (__const void *__src, void *__dest, size_t __n)
1416 throw () __attribute__ ((__nonnull__ (1, 2)));
1417
1418
1419 extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
1420
1421
1422 extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
1423 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1424
1425
1426 extern char *index (__const char *__s, int __c)
1427 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1428
1429
1430 extern char *rindex (__const char *__s, int __c)
1431 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1432
1433
1434
1435 extern int ffs (int __i) throw () __attribute__ ((__const__));
1436
1437
1438
1439
1440 extern int ffsl (long int __l) throw () __attribute__ ((__const__));
1441
1442 __extension__ extern int ffsll (long long int __ll)
1443 throw () __attribute__ ((__const__));
1444
1445
1446
1447
1448 extern int strcasecmp (__const char *__s1, __const char *__s2)
1449 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1450
1451
1452 extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
1453 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1454
1455
1456
1457
1458
1459 extern int strcasecmp_l (__const char *__s1, __const char *__s2,
1460 __locale_t __loc)
1461 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
1462
1463 extern int strncasecmp_l (__const char *__s1, __const char *__s2,
1464 size_t __n, __locale_t __loc)
1465 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4)));
1466
1467
1468
1469
1470
1471 extern char *strsep (char **__restrict __stringp,
1472 __const char *__restrict __delim)
1473 throw () __attribute__ ((__nonnull__ (1, 2)));
1474
1475
1476
1477
1478 extern int strverscmp (__const char *__s1, __const char *__s2)
1479 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1480
1481
1482 extern char *strsignal (int __sig) throw ();
1483
1484
1485 extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src)
1486 throw () __attribute__ ((__nonnull__ (1, 2)));
1487 extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src)
1488 throw () __attribute__ ((__nonnull__ (1, 2)));
1489
1490
1491
1492 extern char *__stpncpy (char *__restrict __dest,
1493 __const char *__restrict __src, size_t __n)
1494 throw () __attribute__ ((__nonnull__ (1, 2)));
1495 extern char *stpncpy (char *__restrict __dest,
1496 __const char *__restrict __src, size_t __n)
1497 throw () __attribute__ ((__nonnull__ (1, 2)));
1498
1499
1500 extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1)));
1501
1502
1503 extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
1504
1505
1506
1507
1508
1509
1510 extern char *basename (__const char *__filename) throw () __attribute__ ((__nonnull__ (1)));
1511 # 432 "/usr/include/string.h" 3 4
1512 }
1513 # 53 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstring" 2 3
1514 # 78 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstring" 3
1515 namespace std __attribute__ ((__visibility__ ("default"))) {
1516
1517 using ::memcpy;
1518 using ::memmove;
1519 using ::strcpy;
1520 using ::strncpy;
1521 using ::strcat;
1522 using ::strncat;
1523 using ::memcmp;
1524 using ::strcmp;
1525 using ::strcoll;
1526 using ::strncmp;
1527 using ::strxfrm;
1528 using ::strcspn;
1529 using ::strspn;
1530 using ::strtok;
1531 using ::memset;
1532 using ::strerror;
1533 using ::strlen;
1534
1535 using ::memchr;
1536
1537 inline void*
1538 memchr(void* __p, int __c, size_t __n)
1539 { return memchr(const_cast<const void*>(__p), __c, __n); }
1540
1541 using ::strchr;
1542
1543 inline char*
1544 strchr(char* __s1, int __n)
1545 { return __builtin_strchr(const_cast<const char*>(__s1), __n); }
1546
1547 using ::strpbrk;
1548
1549 inline char*
1550 strpbrk(char* __s1, const char* __s2)
1551 { return __builtin_strpbrk(const_cast<const char*>(__s1), __s2); }
1552
1553 using ::strrchr;
1554
1555 inline char*
1556 strrchr(char* __s1, int __n)
1557 { return __builtin_strrchr(const_cast<const char*>(__s1), __n); }
1558
1559 using ::strstr;
1560
1561 inline char*
1562 strstr(char* __s1, const char* __s2)
1563 { return __builtin_strstr(const_cast<const char*>(__s1), __s2); }
1564
1565 }
1566 # 67 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 2 3
1567 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/climits" 1 3
1568 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/climits" 3
1569
1570 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/climits" 3
1571
1572 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/limits.h" 1 3 4
1573 # 11 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/limits.h" 3 4
1574 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/syslimits.h" 1 3 4
1575
1576
1577
1578
1579
1580
1581 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/limits.h" 1 3 4
1582 # 122 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/limits.h" 3 4
1583 # 1 "/usr/include/limits.h" 1 3 4
1584 # 145 "/usr/include/limits.h" 3 4
1585 # 1 "/usr/include/bits/posix1_lim.h" 1 3 4
1586 # 153 "/usr/include/bits/posix1_lim.h" 3 4
1587 # 1 "/usr/include/bits/local_lim.h" 1 3 4
1588 # 36 "/usr/include/bits/local_lim.h" 3 4
1589 # 1 "/usr/include/linux/limits.h" 1 3 4
1590 # 37 "/usr/include/bits/local_lim.h" 2 3 4
1591 # 154 "/usr/include/bits/posix1_lim.h" 2 3 4
1592 # 146 "/usr/include/limits.h" 2 3 4
1593
1594
1595
1596 # 1 "/usr/include/bits/posix2_lim.h" 1 3 4
1597 # 150 "/usr/include/limits.h" 2 3 4
1598
1599
1600
1601 # 1 "/usr/include/bits/xopen_lim.h" 1 3 4
1602 # 34 "/usr/include/bits/xopen_lim.h" 3 4
1603 # 1 "/usr/include/bits/stdio_lim.h" 1 3 4
1604 # 35 "/usr/include/bits/xopen_lim.h" 2 3 4
1605 # 154 "/usr/include/limits.h" 2 3 4
1606 # 123 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/limits.h" 2 3 4
1607 # 8 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/syslimits.h" 2 3 4
1608 # 12 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/limits.h" 2 3 4
1609 # 51 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/climits" 2 3
1610 # 68 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 2 3
1611 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdlib" 1 3
1612 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdlib" 3
1613
1614 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdlib" 3
1615 # 72 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdlib" 3
1616 # 1 "/usr/include/stdlib.h" 1 3 4
1617 # 33 "/usr/include/stdlib.h" 3 4
1618 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4
1619 # 34 "/usr/include/stdlib.h" 2 3 4
1620
1621 extern "C" {
1622
1623
1624
1625
1626
1627
1628 # 1 "/usr/include/bits/waitflags.h" 1 3 4
1629 # 43 "/usr/include/stdlib.h" 2 3 4
1630 # 1 "/usr/include/bits/waitstatus.h" 1 3 4
1631 # 65 "/usr/include/bits/waitstatus.h" 3 4
1632 # 1 "/usr/include/endian.h" 1 3 4
1633 # 37 "/usr/include/endian.h" 3 4
1634 # 1 "/usr/include/bits/endian.h" 1 3 4
1635 # 38 "/usr/include/endian.h" 2 3 4
1636 # 66 "/usr/include/bits/waitstatus.h" 2 3 4
1637
1638 union wait
1639 {
1640 int w_status;
1641 struct
1642 {
1643
1644
1645
1646
1647
1648
1649
1650 unsigned int:16;
1651 unsigned int __w_retcode:8;
1652 unsigned int __w_coredump:1;
1653 unsigned int __w_termsig:7;
1654
1655 } __wait_terminated;
1656 struct
1657 {
1658
1659
1660
1661
1662
1663
1664 unsigned int:16;
1665 unsigned int __w_stopsig:8;
1666 unsigned int __w_stopval:8;
1667
1668 } __wait_stopped;
1669 };
1670 # 44 "/usr/include/stdlib.h" 2 3 4
1671 # 96 "/usr/include/stdlib.h" 3 4
1672
1673
1674 typedef struct
1675 {
1676 int quot;
1677 int rem;
1678 } div_t;
1679
1680
1681
1682 typedef struct
1683 {
1684 long int quot;
1685 long int rem;
1686 } ldiv_t;
1687
1688
1689
1690
1691
1692
1693
1694 __extension__ typedef struct
1695 {
1696 long long int quot;
1697 long long int rem;
1698 } lldiv_t;
1699
1700
1701 # 140 "/usr/include/stdlib.h" 3 4
1702 extern size_t __ctype_get_mb_cur_max (void) throw () ;
1703
1704
1705
1706
1707 extern double atof (__const char *__nptr)
1708 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
1709
1710 extern int atoi (__const char *__nptr)
1711 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
1712
1713 extern long int atol (__const char *__nptr)
1714 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
1715
1716
1717
1718
1719
1720 __extension__ extern long long int atoll (__const char *__nptr)
1721 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
1722
1723
1724
1725
1726
1727 extern double strtod (__const char *__restrict __nptr,
1728 char **__restrict __endptr)
1729 throw () __attribute__ ((__nonnull__ (1))) ;
1730
1731
1732
1733
1734
1735 extern float strtof (__const char *__restrict __nptr,
1736 char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) ;
1737
1738 extern long double strtold (__const char *__restrict __nptr,
1739 char **__restrict __endptr)
1740 throw () __attribute__ ((__nonnull__ (1))) ;
1741
1742
1743
1744
1745
1746 extern long int strtol (__const char *__restrict __nptr,
1747 char **__restrict __endptr, int __base)
1748 throw () __attribute__ ((__nonnull__ (1))) ;
1749
1750 extern unsigned long int strtoul (__const char *__restrict __nptr,
1751 char **__restrict __endptr, int __base)
1752 throw () __attribute__ ((__nonnull__ (1))) ;
1753
1754
1755
1756
1757 __extension__
1758 extern long long int strtoq (__const char *__restrict __nptr,
1759 char **__restrict __endptr, int __base)
1760 throw () __attribute__ ((__nonnull__ (1))) ;
1761
1762 __extension__
1763 extern unsigned long long int strtouq (__const char *__restrict __nptr,
1764 char **__restrict __endptr, int __base)
1765 throw () __attribute__ ((__nonnull__ (1))) ;
1766
1767
1768
1769
1770
1771 __extension__
1772 extern long long int strtoll (__const char *__restrict __nptr,
1773 char **__restrict __endptr, int __base)
1774 throw () __attribute__ ((__nonnull__ (1))) ;
1775
1776 __extension__
1777 extern unsigned long long int strtoull (__const char *__restrict __nptr,
1778 char **__restrict __endptr, int __base)
1779 throw () __attribute__ ((__nonnull__ (1))) ;
1780
1781 # 240 "/usr/include/stdlib.h" 3 4
1782 extern long int strtol_l (__const char *__restrict __nptr,
1783 char **__restrict __endptr, int __base,
1784 __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ;
1785
1786 extern unsigned long int strtoul_l (__const char *__restrict __nptr,
1787 char **__restrict __endptr,
1788 int __base, __locale_t __loc)
1789 throw () __attribute__ ((__nonnull__ (1, 4))) ;
1790
1791 __extension__
1792 extern long long int strtoll_l (__const char *__restrict __nptr,
1793 char **__restrict __endptr, int __base,
1794 __locale_t __loc)
1795 throw () __attribute__ ((__nonnull__ (1, 4))) ;
1796
1797 __extension__
1798 extern unsigned long long int strtoull_l (__const char *__restrict __nptr,
1799 char **__restrict __endptr,
1800 int __base, __locale_t __loc)
1801 throw () __attribute__ ((__nonnull__ (1, 4))) ;
1802
1803 extern double strtod_l (__const char *__restrict __nptr,
1804 char **__restrict __endptr, __locale_t __loc)
1805 throw () __attribute__ ((__nonnull__ (1, 3))) ;
1806
1807 extern float strtof_l (__const char *__restrict __nptr,
1808 char **__restrict __endptr, __locale_t __loc)
1809 throw () __attribute__ ((__nonnull__ (1, 3))) ;
1810
1811 extern long double strtold_l (__const char *__restrict __nptr,
1812 char **__restrict __endptr,
1813 __locale_t __loc)
1814 throw () __attribute__ ((__nonnull__ (1, 3))) ;
1815
1816
1817
1818
1819
1820
1821 extern double __strtod_internal (__const char *__restrict __nptr,
1822 char **__restrict __endptr, int __group)
1823 throw () __attribute__ ((__nonnull__ (1))) ;
1824 extern float __strtof_internal (__const char *__restrict __nptr,
1825 char **__restrict __endptr, int __group)
1826 throw () __attribute__ ((__nonnull__ (1))) ;
1827 extern long double __strtold_internal (__const char *__restrict __nptr,
1828 char **__restrict __endptr,
1829 int __group)
1830 throw () __attribute__ ((__nonnull__ (1))) ;
1831
1832 extern long int __strtol_internal (__const char *__restrict __nptr,
1833 char **__restrict __endptr,
1834 int __base, int __group)
1835 throw () __attribute__ ((__nonnull__ (1))) ;
1836
1837
1838
1839 extern unsigned long int __strtoul_internal (__const char *__restrict __nptr,
1840 char **__restrict __endptr,
1841 int __base, int __group)
1842 throw () __attribute__ ((__nonnull__ (1))) ;
1843
1844
1845
1846
1847 __extension__
1848 extern long long int __strtoll_internal (__const char *__restrict __nptr,
1849 char **__restrict __endptr,
1850 int __base, int __group)
1851 throw () __attribute__ ((__nonnull__ (1))) ;
1852
1853
1854
1855 __extension__
1856 extern unsigned long long int __strtoull_internal (__const char *
1857 __restrict __nptr,
1858 char **__restrict __endptr,
1859 int __base, int __group)
1860 throw () __attribute__ ((__nonnull__ (1))) ;
1861
1862
1863
1864
1865
1866
1867
1868
1869 extern __inline double
1870 strtod (__const char *__restrict __nptr, char **__restrict __endptr) throw ()
1871 {
1872 return __strtod_internal (__nptr, __endptr, 0);
1873 }
1874 extern __inline long int
1875 strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw ()
1876
1877 {
1878 return __strtol_internal (__nptr, __endptr, __base, 0);
1879 }
1880 extern __inline unsigned long int
1881 strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw ()
1882
1883 {
1884 return __strtoul_internal (__nptr, __endptr, __base, 0);
1885 }
1886
1887
1888
1889
1890 extern __inline float
1891 strtof (__const char *__restrict __nptr, char **__restrict __endptr) throw ()
1892 {
1893 return __strtof_internal (__nptr, __endptr, 0);
1894 }
1895
1896 extern __inline long double
1897 strtold (__const char *__restrict __nptr, char **__restrict __endptr) throw ()
1898 {
1899 return __strtold_internal (__nptr, __endptr, 0);
1900 }
1901
1902
1903
1904
1905
1906 __extension__ extern __inline long long int
1907 strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw ()
1908
1909 {
1910 return __strtoll_internal (__nptr, __endptr, __base, 0);
1911 }
1912 __extension__ extern __inline unsigned long long int
1913 strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw ()
1914
1915 {
1916 return __strtoull_internal (__nptr, __endptr, __base, 0);
1917 }
1918
1919
1920
1921
1922 __extension__ extern __inline long long int
1923 strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw ()
1924
1925 {
1926 return __strtoll_internal (__nptr, __endptr, __base, 0);
1927 }
1928 __extension__ extern __inline unsigned long long int
1929 strtoull (__const char * __restrict __nptr, char **__restrict __endptr, int __base) throw ()
1930
1931 {
1932 return __strtoull_internal (__nptr, __endptr, __base, 0);
1933 }
1934
1935
1936
1937
1938 extern __inline double
1939 atof (__const char *__nptr) throw ()
1940 {
1941 return strtod (__nptr, (char **) __null);
1942 }
1943 extern __inline int
1944 atoi (__const char *__nptr) throw ()
1945 {
1946 return (int) strtol (__nptr, (char **) __null, 10);
1947 }
1948 extern __inline long int
1949 atol (__const char *__nptr) throw ()
1950 {
1951 return strtol (__nptr, (char **) __null, 10);
1952 }
1953
1954
1955
1956
1957 __extension__ extern __inline long long int
1958 atoll (__const char *__nptr) throw ()
1959 {
1960 return strtoll (__nptr, (char **) __null, 10);
1961 }
1962
1963 # 429 "/usr/include/stdlib.h" 3 4
1964 extern char *l64a (long int __n) throw () ;
1965
1966
1967 extern long int a64l (__const char *__s)
1968 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
1969
1970
1971
1972
1973 # 1 "/usr/include/sys/types.h" 1 3 4
1974 # 29 "/usr/include/sys/types.h" 3 4
1975 extern "C" {
1976
1977 # 1 "/usr/include/bits/types.h" 1 3 4
1978 # 28 "/usr/include/bits/types.h" 3 4
1979 # 1 "/usr/include/bits/wordsize.h" 1 3 4
1980 # 29 "/usr/include/bits/types.h" 2 3 4
1981
1982
1983 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4
1984 # 32 "/usr/include/bits/types.h" 2 3 4
1985
1986
1987 typedef unsigned char __u_char;
1988 typedef unsigned short int __u_short;
1989 typedef unsigned int __u_int;
1990 typedef unsigned long int __u_long;
1991
1992
1993 typedef signed char __int8_t;
1994 typedef unsigned char __uint8_t;
1995 typedef signed short int __int16_t;
1996 typedef unsigned short int __uint16_t;
1997 typedef signed int __int32_t;
1998 typedef unsigned int __uint32_t;
1999
2000
2001
2002
2003 __extension__ typedef signed long long int __int64_t;
2004 __extension__ typedef unsigned long long int __uint64_t;
2005
2006
2007
2008
2009
2010
2011
2012 __extension__ typedef long long int __quad_t;
2013 __extension__ typedef unsigned long long int __u_quad_t;
2014 # 134 "/usr/include/bits/types.h" 3 4
2015 # 1 "/usr/include/bits/typesizes.h" 1 3 4
2016 # 135 "/usr/include/bits/types.h" 2 3 4
2017
2018
2019 __extension__ typedef __u_quad_t __dev_t;
2020 __extension__ typedef unsigned int __uid_t;
2021 __extension__ typedef unsigned int __gid_t;
2022 __extension__ typedef unsigned long int __ino_t;
2023 __extension__ typedef __u_quad_t __ino64_t;
2024 __extension__ typedef unsigned int __mode_t;
2025 __extension__ typedef unsigned int __nlink_t;
2026 __extension__ typedef long int __off_t;
2027 __extension__ typedef __quad_t __off64_t;
2028 __extension__ typedef int __pid_t;
2029 __extension__ typedef struct { int __val[2]; } __fsid_t;
2030 __extension__ typedef long int __clock_t;
2031 __extension__ typedef unsigned long int __rlim_t;
2032 __extension__ typedef __u_quad_t __rlim64_t;
2033 __extension__ typedef unsigned int __id_t;
2034 __extension__ typedef long int __time_t;
2035 __extension__ typedef unsigned int __useconds_t;
2036 __extension__ typedef long int __suseconds_t;
2037
2038 __extension__ typedef int __daddr_t;
2039 __extension__ typedef long int __swblk_t;
2040 __extension__ typedef int __key_t;
2041
2042
2043 __extension__ typedef int __clockid_t;
2044
2045
2046 __extension__ typedef void * __timer_t;
2047
2048
2049 __extension__ typedef long int __blksize_t;
2050
2051
2052
2053
2054 __extension__ typedef long int __blkcnt_t;
2055 __extension__ typedef __quad_t __blkcnt64_t;
2056
2057
2058 __extension__ typedef unsigned long int __fsblkcnt_t;
2059 __extension__ typedef __u_quad_t __fsblkcnt64_t;
2060
2061
2062 __extension__ typedef unsigned long int __fsfilcnt_t;
2063 __extension__ typedef __u_quad_t __fsfilcnt64_t;
2064
2065 __extension__ typedef int __ssize_t;
2066
2067
2068
2069 typedef __off64_t __loff_t;
2070 typedef __quad_t *__qaddr_t;
2071 typedef char *__caddr_t;
2072
2073
2074 __extension__ typedef int __intptr_t;
2075
2076
2077 __extension__ typedef unsigned int __socklen_t;
2078 # 32 "/usr/include/sys/types.h" 2 3 4
2079
2080
2081
2082 typedef __u_char u_char;
2083 typedef __u_short u_short;
2084 typedef __u_int u_int;
2085 typedef __u_long u_long;
2086 typedef __quad_t quad_t;
2087 typedef __u_quad_t u_quad_t;
2088 typedef __fsid_t fsid_t;
2089
2090
2091
2092
2093 typedef __loff_t loff_t;
2094
2095
2096
2097
2098
2099 typedef __ino64_t ino_t;
2100
2101
2102
2103
2104 typedef __ino64_t ino64_t;
2105
2106
2107
2108
2109 typedef __dev_t dev_t;
2110
2111
2112
2113
2114 typedef __gid_t gid_t;
2115
2116
2117
2118
2119 typedef __mode_t mode_t;
2120
2121
2122
2123
2124 typedef __nlink_t nlink_t;
2125
2126
2127
2128
2129 typedef __uid_t uid_t;
2130
2131
2132
2133
2134
2135
2136
2137 typedef __off64_t off_t;
2138
2139
2140
2141
2142 typedef __off64_t off64_t;
2143
2144
2145
2146
2147 typedef __pid_t pid_t;
2148
2149
2150
2151
2152 typedef __id_t id_t;
2153
2154
2155
2156
2157 typedef __ssize_t ssize_t;
2158
2159
2160
2161
2162
2163 typedef __daddr_t daddr_t;
2164 typedef __caddr_t caddr_t;
2165
2166
2167
2168
2169
2170 typedef __key_t key_t;
2171 # 133 "/usr/include/sys/types.h" 3 4
2172 # 1 "/usr/include/time.h" 1 3 4
2173 # 59 "/usr/include/time.h" 3 4
2174
2175
2176 typedef __clock_t clock_t;
2177
2178
2179
2180 # 75 "/usr/include/time.h" 3 4
2181
2182
2183 typedef __time_t time_t;
2184
2185
2186
2187 # 93 "/usr/include/time.h" 3 4
2188 typedef __clockid_t clockid_t;
2189 # 105 "/usr/include/time.h" 3 4
2190 typedef __timer_t timer_t;
2191 # 134 "/usr/include/sys/types.h" 2 3 4
2192
2193
2194
2195 typedef __useconds_t useconds_t;
2196
2197
2198
2199 typedef __suseconds_t suseconds_t;
2200
2201
2202
2203
2204
2205 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4
2206 # 148 "/usr/include/sys/types.h" 2 3 4
2207
2208
2209
2210 typedef unsigned long int ulong;
2211 typedef unsigned short int ushort;
2212 typedef unsigned int uint;
2213 # 195 "/usr/include/sys/types.h" 3 4
2214 typedef int int8_t __attribute__ ((__mode__ (__QI__)));
2215 typedef int int16_t __attribute__ ((__mode__ (__HI__)));
2216 typedef int int32_t __attribute__ ((__mode__ (__SI__)));
2217 typedef int int64_t __attribute__ ((__mode__ (__DI__)));
2218
2219
2220 typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
2221 typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
2222 typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
2223 typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
2224
2225 typedef int register_t __attribute__ ((__mode__ (__word__)));
2226 # 220 "/usr/include/sys/types.h" 3 4
2227 # 1 "/usr/include/sys/select.h" 1 3 4
2228 # 31 "/usr/include/sys/select.h" 3 4
2229 # 1 "/usr/include/bits/select.h" 1 3 4
2230 # 32 "/usr/include/sys/select.h" 2 3 4
2231
2232
2233 # 1 "/usr/include/bits/sigset.h" 1 3 4
2234 # 24 "/usr/include/bits/sigset.h" 3 4
2235 typedef int __sig_atomic_t;
2236
2237
2238
2239
2240 typedef struct
2241 {
2242 unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
2243 } __sigset_t;
2244 # 35 "/usr/include/sys/select.h" 2 3 4
2245
2246
2247
2248 typedef __sigset_t sigset_t;
2249
2250
2251
2252
2253
2254 # 1 "/usr/include/time.h" 1 3 4
2255 # 121 "/usr/include/time.h" 3 4
2256 struct timespec
2257 {
2258 __time_t tv_sec;
2259 long int tv_nsec;
2260 };
2261 # 45 "/usr/include/sys/select.h" 2 3 4
2262
2263 # 1 "/usr/include/bits/time.h" 1 3 4
2264 # 69 "/usr/include/bits/time.h" 3 4
2265 struct timeval
2266 {
2267 __time_t tv_sec;
2268 __suseconds_t tv_usec;
2269 };
2270 # 47 "/usr/include/sys/select.h" 2 3 4
2271 # 55 "/usr/include/sys/select.h" 3 4
2272 typedef long int __fd_mask;
2273 # 67 "/usr/include/sys/select.h" 3 4
2274 typedef struct
2275 {
2276
2277
2278
2279 __fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))];
2280
2281
2282
2283
2284
2285 } fd_set;
2286
2287
2288
2289
2290
2291
2292 typedef __fd_mask fd_mask;
2293 # 99 "/usr/include/sys/select.h" 3 4
2294 extern "C" {
2295 # 109 "/usr/include/sys/select.h" 3 4
2296 extern int select (int __nfds, fd_set *__restrict __readfds,
2297 fd_set *__restrict __writefds,
2298 fd_set *__restrict __exceptfds,
2299 struct timeval *__restrict __timeout);
2300 # 121 "/usr/include/sys/select.h" 3 4
2301 extern int pselect (int __nfds, fd_set *__restrict __readfds,
2302 fd_set *__restrict __writefds,
2303 fd_set *__restrict __exceptfds,
2304 const struct timespec *__restrict __timeout,
2305 const __sigset_t *__restrict __sigmask);
2306
2307
2308 }
2309 # 221 "/usr/include/sys/types.h" 2 3 4
2310
2311
2312 # 1 "/usr/include/sys/sysmacros.h" 1 3 4
2313 # 30 "/usr/include/sys/sysmacros.h" 3 4
2314 __extension__
2315 extern __inline unsigned int gnu_dev_major (unsigned long long int __dev)
2316 throw ();
2317 __extension__
2318 extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev)
2319 throw ();
2320 __extension__
2321 extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major,
2322 unsigned int __minor)
2323 throw ();
2324
2325
2326 __extension__ extern __inline unsigned int
2327 gnu_dev_major (unsigned long long int __dev) throw ()
2328 {
2329 return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
2330 }
2331
2332 __extension__ extern __inline unsigned int
2333 gnu_dev_minor (unsigned long long int __dev) throw ()
2334 {
2335 return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
2336 }
2337
2338 __extension__ extern __inline unsigned long long int
2339 gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw ()
2340 {
2341 return ((__minor & 0xff) | ((__major & 0xfff) << 8)
2342 | (((unsigned long long int) (__minor & ~0xff)) << 12)
2343 | (((unsigned long long int) (__major & ~0xfff)) << 32));
2344 }
2345 # 224 "/usr/include/sys/types.h" 2 3 4
2346
2347
2348
2349
2350 typedef __blksize_t blksize_t;
2351 # 248 "/usr/include/sys/types.h" 3 4
2352 typedef __blkcnt64_t blkcnt_t;
2353
2354
2355
2356 typedef __fsblkcnt64_t fsblkcnt_t;
2357
2358
2359
2360 typedef __fsfilcnt64_t fsfilcnt_t;
2361
2362
2363
2364
2365
2366 typedef __blkcnt64_t blkcnt64_t;
2367 typedef __fsblkcnt64_t fsblkcnt64_t;
2368 typedef __fsfilcnt64_t fsfilcnt64_t;
2369
2370
2371
2372
2373
2374 # 1 "/usr/include/bits/pthreadtypes.h" 1 3 4
2375 # 24 "/usr/include/bits/pthreadtypes.h" 3 4
2376 # 1 "/usr/include/bits/wordsize.h" 1 3 4
2377 # 25 "/usr/include/bits/pthreadtypes.h" 2 3 4
2378 # 51 "/usr/include/bits/pthreadtypes.h" 3 4
2379 typedef unsigned long int pthread_t;
2380
2381
2382 typedef union
2383 {
2384 char __size[36];
2385 long int __align;
2386 } pthread_attr_t;
2387 # 68 "/usr/include/bits/pthreadtypes.h" 3 4
2388 typedef struct __pthread_internal_slist
2389 {
2390 struct __pthread_internal_slist *__next;
2391 } __pthread_slist_t;
2392
2393
2394
2395
2396
2397 typedef union
2398 {
2399 struct __pthread_mutex_s
2400 {
2401 int __lock;
2402 unsigned int __count;
2403 int __owner;
2404
2405
2406
2407
2408
2409 int __kind;
2410
2411
2412
2413
2414
2415 unsigned int __nusers;
2416 __extension__ union
2417 {
2418 int __spins;
2419 __pthread_slist_t __list;
2420 };
2421
2422 } __data;
2423 char __size[24];
2424 long int __align;
2425 } pthread_mutex_t;
2426
2427 typedef union
2428 {
2429 char __size[4];
2430 int __align;
2431 } pthread_mutexattr_t;
2432
2433
2434
2435
2436 typedef union
2437 {
2438 struct
2439 {
2440 int __lock;
2441 unsigned int __futex;
2442 __extension__ unsigned long long int __total_seq;
2443 __extension__ unsigned long long int __wakeup_seq;
2444 __extension__ unsigned long long int __woken_seq;
2445 void *__mutex;
2446 unsigned int __nwaiters;
2447 unsigned int __broadcast_seq;
2448 } __data;
2449 char __size[48];
2450 __extension__ long long int __align;
2451 } pthread_cond_t;
2452
2453 typedef union
2454 {
2455 char __size[4];
2456 int __align;
2457 } pthread_condattr_t;
2458
2459
2460
2461 typedef unsigned int pthread_key_t;
2462
2463
2464
2465 typedef int pthread_once_t;
2466
2467
2468
2469
2470
2471 typedef union
2472 {
2473 # 171 "/usr/include/bits/pthreadtypes.h" 3 4
2474 struct
2475 {
2476 int __lock;
2477 unsigned int __nr_readers;
2478 unsigned int __readers_wakeup;
2479 unsigned int __writer_wakeup;
2480 unsigned int __nr_readers_queued;
2481 unsigned int __nr_writers_queued;
2482
2483
2484 unsigned int __flags;
2485 int __writer;
2486 } __data;
2487
2488 char __size[32];
2489 long int __align;
2490 } pthread_rwlock_t;
2491
2492 typedef union
2493 {
2494 char __size[8];
2495 long int __align;
2496 } pthread_rwlockattr_t;
2497
2498
2499
2500
2501
2502 typedef volatile int pthread_spinlock_t;
2503
2504
2505
2506
2507 typedef union
2508 {
2509 char __size[20];
2510 long int __align;
2511 } pthread_barrier_t;
2512
2513 typedef union
2514 {
2515 char __size[4];
2516 int __align;
2517 } pthread_barrierattr_t;
2518 # 271 "/usr/include/sys/types.h" 2 3 4
2519
2520
2521 }
2522 # 439 "/usr/include/stdlib.h" 2 3 4
2523
2524
2525
2526
2527
2528
2529 extern long int random (void) throw ();
2530
2531
2532 extern void srandom (unsigned int __seed) throw ();
2533
2534
2535
2536
2537
2538 extern char *initstate (unsigned int __seed, char *__statebuf,
2539 size_t __statelen) throw () __attribute__ ((__nonnull__ (2)));
2540
2541
2542
2543 extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1)));
2544
2545
2546
2547
2548
2549
2550
2551 struct random_data
2552 {
2553 int32_t *fptr;
2554 int32_t *rptr;
2555 int32_t *state;
2556 int rand_type;
2557 int rand_deg;
2558 int rand_sep;
2559 int32_t *end_ptr;
2560 };
2561
2562 extern int random_r (struct random_data *__restrict __buf,
2563 int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
2564
2565 extern int srandom_r (unsigned int __seed, struct random_data *__buf)
2566 throw () __attribute__ ((__nonnull__ (2)));
2567
2568 extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
2569 size_t __statelen,
2570 struct random_data *__restrict __buf)
2571 throw () __attribute__ ((__nonnull__ (2, 4)));
2572
2573 extern int setstate_r (char *__restrict __statebuf,
2574 struct random_data *__restrict __buf)
2575 throw () __attribute__ ((__nonnull__ (1, 2)));
2576
2577
2578
2579
2580
2581
2582 extern int rand (void) throw ();
2583
2584 extern void srand (unsigned int __seed) throw ();
2585
2586
2587
2588
2589 extern int rand_r (unsigned int *__seed) throw ();
2590
2591
2592
2593
2594
2595
2596
2597 extern double drand48 (void) throw ();
2598 extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1)));
2599
2600
2601 extern long int lrand48 (void) throw ();
2602 extern long int nrand48 (unsigned short int __xsubi[3])
2603 throw () __attribute__ ((__nonnull__ (1)));
2604
2605
2606 extern long int mrand48 (void) throw ();
2607 extern long int jrand48 (unsigned short int __xsubi[3])
2608 throw () __attribute__ ((__nonnull__ (1)));
2609
2610
2611 extern void srand48 (long int __seedval) throw ();
2612 extern unsigned short int *seed48 (unsigned short int __seed16v[3])
2613 throw () __attribute__ ((__nonnull__ (1)));
2614 extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1)));
2615
2616
2617
2618
2619
2620 struct drand48_data
2621 {
2622 unsigned short int __x[3];
2623 unsigned short int __old_x[3];
2624 unsigned short int __c;
2625 unsigned short int __init;
2626 unsigned long long int __a;
2627 };
2628
2629
2630 extern int drand48_r (struct drand48_data *__restrict __buffer,
2631 double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
2632 extern int erand48_r (unsigned short int __xsubi[3],
2633 struct drand48_data *__restrict __buffer,
2634 double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
2635
2636
2637 extern int lrand48_r (struct drand48_data *__restrict __buffer,
2638 long int *__restrict __result)
2639 throw () __attribute__ ((__nonnull__ (1, 2)));
2640 extern int nrand48_r (unsigned short int __xsubi[3],
2641 struct drand48_data *__restrict __buffer,
2642 long int *__restrict __result)
2643 throw () __attribute__ ((__nonnull__ (1, 2)));
2644
2645
2646 extern int mrand48_r (struct drand48_data *__restrict __buffer,
2647 long int *__restrict __result)
2648 throw () __attribute__ ((__nonnull__ (1, 2)));
2649 extern int jrand48_r (unsigned short int __xsubi[3],
2650 struct drand48_data *__restrict __buffer,
2651 long int *__restrict __result)
2652 throw () __attribute__ ((__nonnull__ (1, 2)));
2653
2654
2655 extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
2656 throw () __attribute__ ((__nonnull__ (2)));
2657
2658 extern int seed48_r (unsigned short int __seed16v[3],
2659 struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2)));
2660
2661 extern int lcong48_r (unsigned short int __param[7],
2662 struct drand48_data *__buffer)
2663 throw () __attribute__ ((__nonnull__ (1, 2)));
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673 extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) ;
2674
2675 extern void *calloc (size_t __nmemb, size_t __size)
2676 throw () __attribute__ ((__malloc__)) ;
2677
2678
2679
2680
2681
2682
2683
2684 extern void *realloc (void *__ptr, size_t __size)
2685 throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
2686
2687 extern void free (void *__ptr) throw ();
2688
2689
2690
2691
2692 extern void cfree (void *__ptr) throw ();
2693
2694
2695
2696 # 1 "/usr/include/alloca.h" 1 3 4
2697 # 25 "/usr/include/alloca.h" 3 4
2698 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4
2699 # 26 "/usr/include/alloca.h" 2 3 4
2700
2701 extern "C" {
2702
2703
2704
2705
2706
2707 extern void *alloca (size_t __size) throw ();
2708
2709
2710
2711
2712
2713 }
2714 # 613 "/usr/include/stdlib.h" 2 3 4
2715
2716
2717
2718
2719 extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) ;
2720
2721
2722
2723
2724 extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
2725 throw () __attribute__ ((__nonnull__ (1))) ;
2726
2727
2728
2729
2730 extern void abort (void) throw () __attribute__ ((__noreturn__));
2731
2732
2733
2734 extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1)));
2735
2736
2737
2738
2739
2740 extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
2741 throw () __attribute__ ((__nonnull__ (1)));
2742
2743
2744
2745
2746
2747
2748 extern void exit (int __status) throw () __attribute__ ((__noreturn__));
2749
2750
2751
2752
2753
2754
2755 extern void _Exit (int __status) throw () __attribute__ ((__noreturn__));
2756
2757
2758
2759
2760
2761
2762 extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) ;
2763
2764
2765
2766
2767 extern char *__secure_getenv (__const char *__name)
2768 throw () __attribute__ ((__nonnull__ (1))) ;
2769
2770
2771
2772
2773
2774 extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1)));
2775
2776
2777
2778
2779
2780 extern int setenv (__const char *__name, __const char *__value, int __replace)
2781 throw () __attribute__ ((__nonnull__ (2)));
2782
2783
2784 extern int unsetenv (__const char *__name) throw ();
2785
2786
2787
2788
2789
2790
2791 extern int clearenv (void) throw ();
2792 # 698 "/usr/include/stdlib.h" 3 4
2793 extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ;
2794 # 712 "/usr/include/stdlib.h" 3 4
2795 extern int mkstemp (char *__template) __asm__ ("" "mkstemp64")
2796 __attribute__ ((__nonnull__ (1))) ;
2797
2798
2799
2800
2801
2802 extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ;
2803 # 729 "/usr/include/stdlib.h" 3 4
2804 extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ;
2805
2806
2807
2808
2809
2810
2811
2812
2813 extern int system (__const char *__command) ;
2814
2815
2816
2817
2818
2819
2820 extern char *canonicalize_file_name (__const char *__name)
2821 throw () __attribute__ ((__nonnull__ (1))) ;
2822 # 755 "/usr/include/stdlib.h" 3 4
2823 extern char *realpath (__const char *__restrict __name,
2824 char *__restrict __resolved) throw () ;
2825
2826
2827
2828
2829
2830
2831 typedef int (*__compar_fn_t) (__const void *, __const void *);
2832
2833
2834 typedef __compar_fn_t comparison_fn_t;
2835
2836
2837
2838
2839
2840
2841 extern void *bsearch (__const void *__key, __const void *__base,
2842 size_t __nmemb, size_t __size, __compar_fn_t __compar)
2843 __attribute__ ((__nonnull__ (1, 2, 5))) ;
2844
2845
2846
2847 extern void qsort (void *__base, size_t __nmemb, size_t __size,
2848 __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
2849
2850
2851
2852 extern int abs (int __x) throw () __attribute__ ((__const__)) ;
2853 extern long int labs (long int __x) throw () __attribute__ ((__const__)) ;
2854
2855
2856
2857 __extension__ extern long long int llabs (long long int __x)
2858 throw () __attribute__ ((__const__)) ;
2859
2860
2861
2862
2863
2864
2865
2866 extern div_t div (int __numer, int __denom)
2867 throw () __attribute__ ((__const__)) ;
2868 extern ldiv_t ldiv (long int __numer, long int __denom)
2869 throw () __attribute__ ((__const__)) ;
2870
2871
2872
2873
2874 __extension__ extern lldiv_t lldiv (long long int __numer,
2875 long long int __denom)
2876 throw () __attribute__ ((__const__)) ;
2877
2878 # 820 "/usr/include/stdlib.h" 3 4
2879 extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
2880 int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ;
2881
2882
2883
2884
2885 extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
2886 int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ;
2887
2888
2889
2890
2891 extern char *gcvt (double __value, int __ndigit, char *__buf)
2892 throw () __attribute__ ((__nonnull__ (3))) ;
2893
2894
2895
2896
2897 extern char *qecvt (long double __value, int __ndigit,
2898 int *__restrict __decpt, int *__restrict __sign)
2899 throw () __attribute__ ((__nonnull__ (3, 4))) ;
2900 extern char *qfcvt (long double __value, int __ndigit,
2901 int *__restrict __decpt, int *__restrict __sign)
2902 throw () __attribute__ ((__nonnull__ (3, 4))) ;
2903 extern char *qgcvt (long double __value, int __ndigit, char *__buf)
2904 throw () __attribute__ ((__nonnull__ (3))) ;
2905
2906
2907
2908
2909 extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
2910 int *__restrict __sign, char *__restrict __buf,
2911 size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5)));
2912 extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
2913 int *__restrict __sign, char *__restrict __buf,
2914 size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5)));
2915
2916 extern int qecvt_r (long double __value, int __ndigit,
2917 int *__restrict __decpt, int *__restrict __sign,
2918 char *__restrict __buf, size_t __len)
2919 throw () __attribute__ ((__nonnull__ (3, 4, 5)));
2920 extern int qfcvt_r (long double __value, int __ndigit,
2921 int *__restrict __decpt, int *__restrict __sign,
2922 char *__restrict __buf, size_t __len)
2923 throw () __attribute__ ((__nonnull__ (3, 4, 5)));
2924
2925
2926
2927
2928
2929
2930
2931 extern int mblen (__const char *__s, size_t __n) throw () ;
2932
2933
2934 extern int mbtowc (wchar_t *__restrict __pwc,
2935 __const char *__restrict __s, size_t __n) throw () ;
2936
2937
2938 extern int wctomb (char *__s, wchar_t __wchar) throw () ;
2939
2940
2941
2942 extern size_t mbstowcs (wchar_t *__restrict __pwcs,
2943 __const char *__restrict __s, size_t __n) throw ();
2944
2945 extern size_t wcstombs (char *__restrict __s,
2946 __const wchar_t *__restrict __pwcs, size_t __n)
2947 throw ();
2948
2949
2950
2951
2952
2953
2954
2955
2956 extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))) ;
2957 # 908 "/usr/include/stdlib.h" 3 4
2958 extern int getsubopt (char **__restrict __optionp,
2959 char *__const *__restrict __tokens,
2960 char **__restrict __valuep)
2961 throw () __attribute__ ((__nonnull__ (1, 2, 3))) ;
2962
2963
2964
2965
2966
2967 extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1)));
2968
2969
2970
2971
2972
2973
2974
2975 extern int posix_openpt (int __oflag) ;
2976
2977
2978
2979
2980
2981
2982
2983 extern int grantpt (int __fd) throw ();
2984
2985
2986
2987 extern int unlockpt (int __fd) throw ();
2988
2989
2990
2991
2992 extern char *ptsname (int __fd) throw () ;
2993
2994
2995
2996
2997
2998
2999 extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
3000 throw () __attribute__ ((__nonnull__ (2)));
3001
3002
3003 extern int getpt (void);
3004
3005
3006
3007
3008
3009
3010 extern int getloadavg (double __loadavg[], int __nelem)
3011 throw () __attribute__ ((__nonnull__ (1)));
3012 # 976 "/usr/include/stdlib.h" 3 4
3013 }
3014 # 73 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdlib" 2 3
3015 # 104 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdlib" 3
3016 namespace std __attribute__ ((__visibility__ ("default"))) {
3017
3018 using ::div_t;
3019 using ::ldiv_t;
3020
3021 using ::abort;
3022 using ::abs;
3023 using ::atexit;
3024 using ::atof;
3025 using ::atoi;
3026 using ::atol;
3027 using ::bsearch;
3028 using ::calloc;
3029 using ::div;
3030 using ::exit;
3031 using ::free;
3032 using ::getenv;
3033 using ::labs;
3034 using ::ldiv;
3035 using ::malloc;
3036
3037 using ::mblen;
3038 using ::mbstowcs;
3039 using ::mbtowc;
3040
3041 using ::qsort;
3042 using ::rand;
3043 using ::realloc;
3044 using ::srand;
3045 using ::strtod;
3046 using ::strtol;
3047 using ::strtoul;
3048 using ::system;
3049
3050 using ::wcstombs;
3051 using ::wctomb;
3052
3053
3054 inline long
3055 abs(long __i) { return labs(__i); }
3056
3057 inline ldiv_t
3058 div(long __i, long __j) { return ldiv(__i, __j); }
3059
3060 }
3061 # 161 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdlib" 3
3062 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
3063
3064
3065 using ::lldiv_t;
3066
3067
3068
3069
3070
3071 using ::_Exit;
3072
3073
3074 inline long long
3075 abs(long long __x) { return __x >= 0 ? __x : -__x; }
3076
3077
3078 using ::llabs;
3079
3080 inline lldiv_t
3081 div(long long __n, long long __d)
3082 { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
3083
3084 using ::lldiv;
3085 # 194 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdlib" 3
3086 using ::atoll;
3087 using ::strtoll;
3088 using ::strtoull;
3089
3090 using ::strtof;
3091 using ::strtold;
3092
3093 }
3094
3095 namespace std __attribute__ ((__visibility__ ("default"))) {
3096
3097
3098 using ::__gnu_cxx::lldiv_t;
3099
3100 using ::__gnu_cxx::_Exit;
3101 using ::__gnu_cxx::abs;
3102
3103 using ::__gnu_cxx::llabs;
3104 using ::__gnu_cxx::div;
3105 using ::__gnu_cxx::lldiv;
3106
3107 using ::__gnu_cxx::atoll;
3108 using ::__gnu_cxx::strtof;
3109 using ::__gnu_cxx::strtoll;
3110 using ::__gnu_cxx::strtoull;
3111 using ::__gnu_cxx::strtold;
3112
3113 }
3114 # 69 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 2 3
3115
3116 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iosfwd" 1 3
3117 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iosfwd" 3
3118
3119 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iosfwd" 3
3120
3121
3122 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 1 3
3123 # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 3
3124
3125 # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 3
3126
3127
3128 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdio" 1 3
3129 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdio" 3
3130
3131 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdio" 3
3132
3133
3134
3135
3136 # 1 "/usr/include/stdio.h" 1 3 4
3137 # 30 "/usr/include/stdio.h" 3 4
3138 extern "C" {
3139
3140
3141
3142 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4
3143 # 35 "/usr/include/stdio.h" 2 3 4
3144 # 45 "/usr/include/stdio.h" 3 4
3145 struct _IO_FILE;
3146
3147
3148
3149 typedef struct _IO_FILE FILE;
3150
3151
3152
3153
3154
3155 # 65 "/usr/include/stdio.h" 3 4
3156 typedef struct _IO_FILE __FILE;
3157 # 75 "/usr/include/stdio.h" 3 4
3158 # 1 "/usr/include/libio.h" 1 3 4
3159 # 32 "/usr/include/libio.h" 3 4
3160 # 1 "/usr/include/_G_config.h" 1 3 4
3161 # 14 "/usr/include/_G_config.h" 3 4
3162 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4
3163 # 355 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 3 4
3164 typedef unsigned int wint_t;
3165 # 15 "/usr/include/_G_config.h" 2 3 4
3166 # 24 "/usr/include/_G_config.h" 3 4
3167 # 1 "/usr/include/wchar.h" 1 3 4
3168 # 48 "/usr/include/wchar.h" 3 4
3169 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4
3170 # 49 "/usr/include/wchar.h" 2 3 4
3171
3172 # 1 "/usr/include/bits/wchar.h" 1 3 4
3173 # 51 "/usr/include/wchar.h" 2 3 4
3174 # 76 "/usr/include/wchar.h" 3 4
3175 typedef struct
3176 {
3177 int __count;
3178 union
3179 {
3180 wint_t __wch;
3181 char __wchb[4];
3182 } __value;
3183 } __mbstate_t;
3184 # 25 "/usr/include/_G_config.h" 2 3 4
3185
3186 typedef struct
3187 {
3188 __off_t __pos;
3189 __mbstate_t __state;
3190 } _G_fpos_t;
3191 typedef struct
3192 {
3193 __off64_t __pos;
3194 __mbstate_t __state;
3195 } _G_fpos64_t;
3196 # 44 "/usr/include/_G_config.h" 3 4
3197 # 1 "/usr/include/gconv.h" 1 3 4
3198 # 28 "/usr/include/gconv.h" 3 4
3199 # 1 "/usr/include/wchar.h" 1 3 4
3200 # 48 "/usr/include/wchar.h" 3 4
3201 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4
3202 # 49 "/usr/include/wchar.h" 2 3 4
3203 # 29 "/usr/include/gconv.h" 2 3 4
3204
3205
3206 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4
3207 # 32 "/usr/include/gconv.h" 2 3 4
3208
3209
3210
3211
3212
3213 enum
3214 {
3215 __GCONV_OK = 0,
3216 __GCONV_NOCONV,
3217 __GCONV_NODB,
3218 __GCONV_NOMEM,
3219
3220 __GCONV_EMPTY_INPUT,
3221 __GCONV_FULL_OUTPUT,
3222 __GCONV_ILLEGAL_INPUT,
3223 __GCONV_INCOMPLETE_INPUT,
3224
3225 __GCONV_ILLEGAL_DESCRIPTOR,
3226 __GCONV_INTERNAL_ERROR
3227 };
3228
3229
3230
3231 enum
3232 {
3233 __GCONV_IS_LAST = 0x0001,
3234 __GCONV_IGNORE_ERRORS = 0x0002
3235 };
3236
3237
3238
3239 struct __gconv_step;
3240 struct __gconv_step_data;
3241 struct __gconv_loaded_object;
3242 struct __gconv_trans_data;
3243
3244
3245
3246 typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *,
3247 __const unsigned char **, __const unsigned char *,
3248 unsigned char **, size_t *, int, int);
3249
3250
3251 typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char);
3252
3253
3254 typedef int (*__gconv_init_fct) (struct __gconv_step *);
3255 typedef void (*__gconv_end_fct) (struct __gconv_step *);
3256
3257
3258
3259 typedef int (*__gconv_trans_fct) (struct __gconv_step *,
3260 struct __gconv_step_data *, void *,
3261 __const unsigned char *,
3262 __const unsigned char **,
3263 __const unsigned char *, unsigned char **,
3264 size_t *);
3265
3266
3267 typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *,
3268 __const unsigned char *,
3269 unsigned char *, unsigned char *);
3270
3271
3272 typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***,
3273 size_t *);
3274
3275
3276 typedef int (*__gconv_trans_init_fct) (void **, const char *);
3277 typedef void (*__gconv_trans_end_fct) (void *);
3278
3279 struct __gconv_trans_data
3280 {
3281
3282 __gconv_trans_fct __trans_fct;
3283 __gconv_trans_context_fct __trans_context_fct;
3284 __gconv_trans_end_fct __trans_end_fct;
3285 void *__data;
3286 struct __gconv_trans_data *__next;
3287 };
3288
3289
3290
3291 struct __gconv_step
3292 {
3293 struct __gconv_loaded_object *__shlib_handle;
3294 __const char *__modname;
3295
3296 int __counter;
3297
3298 char *__from_name;
3299 char *__to_name;
3300
3301 __gconv_fct __fct;
3302 __gconv_btowc_fct __btowc_fct;
3303 __gconv_init_fct __init_fct;
3304 __gconv_end_fct __end_fct;
3305
3306
3307
3308 int __min_needed_from;
3309 int __max_needed_from;
3310 int __min_needed_to;
3311 int __max_needed_to;
3312
3313
3314 int __stateful;
3315
3316 void *__data;
3317 };
3318
3319
3320
3321 struct __gconv_step_data
3322 {
3323 unsigned char *__outbuf;
3324 unsigned char *__outbufend;
3325
3326
3327
3328 int __flags;
3329
3330
3331
3332 int __invocation_counter;
3333
3334
3335
3336 int __internal_use;
3337
3338 __mbstate_t *__statep;
3339 __mbstate_t __state;
3340
3341
3342
3343 struct __gconv_trans_data *__trans;
3344 };
3345
3346
3347
3348 typedef struct __gconv_info
3349 {
3350 size_t __nsteps;
3351 struct __gconv_step *__steps;
3352 __extension__ struct __gconv_step_data __data [];
3353 } *__gconv_t;
3354 # 45 "/usr/include/_G_config.h" 2 3 4
3355 typedef union
3356 {
3357 struct __gconv_info __cd;
3358 struct
3359 {
3360 struct __gconv_info __cd;
3361 struct __gconv_step_data __data;
3362 } __combined;
3363 } _G_iconv_t;
3364
3365 typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
3366 typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
3367 typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
3368 typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
3369 # 33 "/usr/include/libio.h" 2 3 4
3370 # 53 "/usr/include/libio.h" 3 4
3371 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stdarg.h" 1 3 4
3372 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stdarg.h" 3 4
3373 typedef __builtin_va_list __gnuc_va_list;
3374 # 54 "/usr/include/libio.h" 2 3 4
3375 # 167 "/usr/include/libio.h" 3 4
3376 struct _IO_jump_t; struct _IO_FILE;
3377 # 177 "/usr/include/libio.h" 3 4
3378 typedef void _IO_lock_t;
3379
3380
3381
3382
3383
3384 struct _IO_marker {
3385 struct _IO_marker *_next;
3386 struct _IO_FILE *_sbuf;
3387
3388
3389
3390 int _pos;
3391 # 200 "/usr/include/libio.h" 3 4
3392 };
3393
3394
3395 enum __codecvt_result
3396 {
3397 __codecvt_ok,
3398 __codecvt_partial,
3399 __codecvt_error,
3400 __codecvt_noconv
3401 };
3402 # 268 "/usr/include/libio.h" 3 4
3403 struct _IO_FILE {
3404 int _flags;
3405
3406
3407
3408
3409 char* _IO_read_ptr;
3410 char* _IO_read_end;
3411 char* _IO_read_base;
3412 char* _IO_write_base;
3413 char* _IO_write_ptr;
3414 char* _IO_write_end;
3415 char* _IO_buf_base;
3416 char* _IO_buf_end;
3417
3418 char *_IO_save_base;
3419 char *_IO_backup_base;
3420 char *_IO_save_end;
3421
3422 struct _IO_marker *_markers;
3423
3424 struct _IO_FILE *_chain;
3425
3426 int _fileno;
3427
3428
3429
3430 int _flags2;
3431
3432 __off_t _old_offset;
3433
3434
3435
3436 unsigned short _cur_column;
3437 signed char _vtable_offset;
3438 char _shortbuf[1];
3439
3440
3441
3442 _IO_lock_t *_lock;
3443 # 316 "/usr/include/libio.h" 3 4
3444 __off64_t _offset;
3445 # 325 "/usr/include/libio.h" 3 4
3446 void *__pad1;
3447 void *__pad2;
3448 void *__pad3;
3449 void *__pad4;
3450 size_t __pad5;
3451
3452 int _mode;
3453
3454 char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
3455
3456 };
3457
3458
3459
3460
3461
3462 struct _IO_FILE_plus;
3463
3464 extern struct _IO_FILE_plus _IO_2_1_stdin_;
3465 extern struct _IO_FILE_plus _IO_2_1_stdout_;
3466 extern struct _IO_FILE_plus _IO_2_1_stderr_;
3467 # 361 "/usr/include/libio.h" 3 4
3468 typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
3469
3470
3471
3472
3473
3474
3475
3476 typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
3477 size_t __n);
3478
3479
3480
3481
3482
3483
3484
3485 typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
3486
3487
3488 typedef int __io_close_fn (void *__cookie);
3489
3490
3491
3492
3493 typedef __io_read_fn cookie_read_function_t;
3494 typedef __io_write_fn cookie_write_function_t;
3495 typedef __io_seek_fn cookie_seek_function_t;
3496 typedef __io_close_fn cookie_close_function_t;
3497
3498
3499 typedef struct
3500 {
3501 __io_read_fn *read;
3502 __io_write_fn *write;
3503 __io_seek_fn *seek;
3504 __io_close_fn *close;
3505 } _IO_cookie_io_functions_t;
3506 typedef _IO_cookie_io_functions_t cookie_io_functions_t;
3507
3508 struct _IO_cookie_file;
3509
3510
3511 extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write,
3512 void *__cookie, _IO_cookie_io_functions_t __fns);
3513
3514
3515
3516
3517 extern "C" {
3518
3519
3520 extern int __underflow (_IO_FILE *);
3521 extern int __uflow (_IO_FILE *);
3522 extern int __overflow (_IO_FILE *, int);
3523 extern wint_t __wunderflow (_IO_FILE *);
3524 extern wint_t __wuflow (_IO_FILE *);
3525 extern wint_t __woverflow (_IO_FILE *, wint_t);
3526 # 451 "/usr/include/libio.h" 3 4
3527 extern int _IO_getc (_IO_FILE *__fp);
3528 extern int _IO_putc (int __c, _IO_FILE *__fp);
3529 extern int _IO_feof (_IO_FILE *__fp) throw ();
3530 extern int _IO_ferror (_IO_FILE *__fp) throw ();
3531
3532 extern int _IO_peekc_locked (_IO_FILE *__fp);
3533
3534
3535
3536
3537
3538 extern void _IO_flockfile (_IO_FILE *) throw ();
3539 extern void _IO_funlockfile (_IO_FILE *) throw ();
3540 extern int _IO_ftrylockfile (_IO_FILE *) throw ();
3541 # 481 "/usr/include/libio.h" 3 4
3542 extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
3543 __gnuc_va_list, int *__restrict);
3544 extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
3545 __gnuc_va_list);
3546 extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t);
3547 extern size_t _IO_sgetn (_IO_FILE *, void *, size_t);
3548
3549 extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int);
3550 extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int);
3551
3552 extern void _IO_free_backup_area (_IO_FILE *) throw ();
3553 # 543 "/usr/include/libio.h" 3 4
3554 }
3555 # 76 "/usr/include/stdio.h" 2 3 4
3556
3557
3558
3559
3560 typedef __gnuc_va_list va_list;
3561 # 89 "/usr/include/stdio.h" 3 4
3562
3563
3564
3565
3566 typedef _G_fpos64_t fpos_t;
3567
3568
3569
3570 typedef _G_fpos64_t fpos64_t;
3571 # 141 "/usr/include/stdio.h" 3 4
3572 # 1 "/usr/include/bits/stdio_lim.h" 1 3 4
3573 # 142 "/usr/include/stdio.h" 2 3 4
3574
3575
3576
3577 extern struct _IO_FILE *stdin;
3578 extern struct _IO_FILE *stdout;
3579 extern struct _IO_FILE *stderr;
3580
3581
3582
3583
3584
3585
3586
3587 extern int remove (__const char *__filename) throw ();
3588
3589 extern int rename (__const char *__old, __const char *__new) throw ();
3590
3591
3592
3593
3594 extern int renameat (int __oldfd, __const char *__old, int __newfd,
3595 __const char *__new) throw ();
3596
3597
3598
3599 # 175 "/usr/include/stdio.h" 3 4
3600 extern FILE *tmpfile (void) __asm__ ("" "tmpfile64") ;
3601
3602
3603
3604
3605
3606
3607 extern FILE *tmpfile64 (void) ;
3608
3609
3610
3611 extern char *tmpnam (char *__s) throw () ;
3612
3613
3614
3615
3616
3617 extern char *tmpnam_r (char *__s) throw () ;
3618 # 204 "/usr/include/stdio.h" 3 4
3619 extern char *tempnam (__const char *__dir, __const char *__pfx)
3620 throw () __attribute__ ((__malloc__)) ;
3621
3622
3623
3624
3625
3626
3627
3628
3629 extern int fclose (FILE *__stream);
3630
3631
3632
3633
3634 extern int fflush (FILE *__stream);
3635
3636 # 229 "/usr/include/stdio.h" 3 4
3637 extern int fflush_unlocked (FILE *__stream);
3638 # 239 "/usr/include/stdio.h" 3 4
3639 extern int fcloseall (void);
3640
3641
3642
3643
3644 # 260 "/usr/include/stdio.h" 3 4
3645 extern FILE *fopen (__const char *__restrict __filename, __const char *__restrict __modes) __asm__ ("" "fopen64")
3646
3647 ;
3648 extern FILE *freopen (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream) __asm__ ("" "freopen64")
3649
3650
3651 ;
3652
3653
3654
3655
3656
3657
3658
3659 extern FILE *fopen64 (__const char *__restrict __filename,
3660 __const char *__restrict __modes) ;
3661 extern FILE *freopen64 (__const char *__restrict __filename,
3662 __const char *__restrict __modes,
3663 FILE *__restrict __stream) ;
3664
3665
3666
3667
3668 extern FILE *fdopen (int __fd, __const char *__modes) throw () ;
3669
3670
3671
3672
3673
3674 extern FILE *fopencookie (void *__restrict __magic_cookie,
3675 __const char *__restrict __modes,
3676 _IO_cookie_io_functions_t __io_funcs) throw () ;
3677
3678
3679 extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes)
3680 throw () ;
3681
3682
3683
3684
3685 extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () ;
3686
3687
3688
3689
3690
3691
3692 extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw ();
3693
3694
3695
3696 extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
3697 int __modes, size_t __n) throw ();
3698
3699
3700
3701
3702
3703 extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
3704 size_t __size) throw ();
3705
3706
3707 extern void setlinebuf (FILE *__stream) throw ();
3708
3709
3710
3711
3712
3713
3714
3715
3716 extern int fprintf (FILE *__restrict __stream,
3717 __const char *__restrict __format, ...);
3718
3719
3720
3721
3722 extern int printf (__const char *__restrict __format, ...);
3723
3724 extern int sprintf (char *__restrict __s,
3725 __const char *__restrict __format, ...) throw ();
3726
3727
3728
3729
3730
3731 extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
3732 __gnuc_va_list __arg);
3733
3734
3735
3736
3737 extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);
3738
3739 extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
3740 __gnuc_va_list __arg) throw ();
3741
3742
3743
3744
3745
3746 extern int snprintf (char *__restrict __s, size_t __maxlen,
3747 __const char *__restrict __format, ...)
3748 throw () __attribute__ ((__format__ (__printf__, 3, 4)));
3749
3750 extern int vsnprintf (char *__restrict __s, size_t __maxlen,
3751 __const char *__restrict __format, __gnuc_va_list __arg)
3752 throw () __attribute__ ((__format__ (__printf__, 3, 0)));
3753
3754
3755
3756
3757
3758
3759 extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f,
3760 __gnuc_va_list __arg)
3761 throw () __attribute__ ((__format__ (__printf__, 2, 0))) ;
3762 extern int __asprintf (char **__restrict __ptr,
3763 __const char *__restrict __fmt, ...)
3764 throw () __attribute__ ((__format__ (__printf__, 2, 3))) ;
3765 extern int asprintf (char **__restrict __ptr,
3766 __const char *__restrict __fmt, ...)
3767 throw () __attribute__ ((__format__ (__printf__, 2, 3))) ;
3768
3769
3770
3771
3772
3773
3774
3775 extern int vdprintf (int __fd, __const char *__restrict __fmt,
3776 __gnuc_va_list __arg)
3777 __attribute__ ((__format__ (__printf__, 2, 0)));
3778 extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
3779 __attribute__ ((__format__ (__printf__, 2, 3)));
3780
3781
3782
3783
3784
3785
3786
3787
3788 extern int fscanf (FILE *__restrict __stream,
3789 __const char *__restrict __format, ...) ;
3790
3791
3792
3793
3794 extern int scanf (__const char *__restrict __format, ...) ;
3795
3796 extern int sscanf (__const char *__restrict __s,
3797 __const char *__restrict __format, ...) throw ();
3798
3799
3800
3801
3802
3803
3804
3805
3806 extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
3807 __gnuc_va_list __arg)
3808 __attribute__ ((__format__ (__scanf__, 2, 0))) ;
3809
3810
3811
3812
3813
3814 extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg)
3815 __attribute__ ((__format__ (__scanf__, 1, 0))) ;
3816
3817
3818 extern int vsscanf (__const char *__restrict __s,
3819 __const char *__restrict __format, __gnuc_va_list __arg)
3820 throw () __attribute__ ((__format__ (__scanf__, 2, 0)));
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830 extern int fgetc (FILE *__stream);
3831 extern int getc (FILE *__stream);
3832
3833
3834
3835
3836
3837 extern int getchar (void);
3838
3839 # 464 "/usr/include/stdio.h" 3 4
3840 extern int getc_unlocked (FILE *__stream);
3841 extern int getchar_unlocked (void);
3842 # 475 "/usr/include/stdio.h" 3 4
3843 extern int fgetc_unlocked (FILE *__stream);
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855 extern int fputc (int __c, FILE *__stream);
3856 extern int putc (int __c, FILE *__stream);
3857
3858
3859
3860
3861
3862 extern int putchar (int __c);
3863
3864 # 508 "/usr/include/stdio.h" 3 4
3865 extern int fputc_unlocked (int __c, FILE *__stream);
3866
3867
3868
3869
3870
3871
3872
3873 extern int putc_unlocked (int __c, FILE *__stream);
3874 extern int putchar_unlocked (int __c);
3875
3876
3877
3878
3879
3880
3881 extern int getw (FILE *__stream);
3882
3883
3884 extern int putw (int __w, FILE *__stream);
3885
3886
3887
3888
3889
3890
3891
3892
3893 extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
3894 ;
3895
3896
3897
3898
3899
3900
3901 extern char *gets (char *__s) ;
3902
3903 # 554 "/usr/include/stdio.h" 3 4
3904 extern char *fgets_unlocked (char *__restrict __s, int __n,
3905 FILE *__restrict __stream) ;
3906 # 570 "/usr/include/stdio.h" 3 4
3907 extern __ssize_t __getdelim (char **__restrict __lineptr,
3908 size_t *__restrict __n, int __delimiter,
3909 FILE *__restrict __stream) ;
3910 extern __ssize_t getdelim (char **__restrict __lineptr,
3911 size_t *__restrict __n, int __delimiter,
3912 FILE *__restrict __stream) ;
3913
3914
3915
3916
3917
3918
3919
3920 extern __ssize_t getline (char **__restrict __lineptr,
3921 size_t *__restrict __n,
3922 FILE *__restrict __stream) ;
3923
3924
3925
3926
3927
3928
3929
3930
3931 extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);
3932
3933
3934
3935
3936
3937 extern int puts (__const char *__s);
3938
3939
3940
3941
3942
3943
3944 extern int ungetc (int __c, FILE *__stream);
3945
3946
3947
3948
3949
3950
3951 extern size_t fread (void *__restrict __ptr, size_t __size,
3952 size_t __n, FILE *__restrict __stream) ;
3953
3954
3955
3956
3957 extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
3958 size_t __n, FILE *__restrict __s) ;
3959
3960 # 631 "/usr/include/stdio.h" 3 4
3961 extern int fputs_unlocked (__const char *__restrict __s,
3962 FILE *__restrict __stream);
3963 # 642 "/usr/include/stdio.h" 3 4
3964 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
3965 size_t __n, FILE *__restrict __stream) ;
3966 extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
3967 size_t __n, FILE *__restrict __stream) ;
3968
3969
3970
3971
3972
3973
3974
3975
3976 extern int fseek (FILE *__stream, long int __off, int __whence);
3977
3978
3979
3980
3981 extern long int ftell (FILE *__stream) ;
3982
3983
3984
3985
3986 extern void rewind (FILE *__stream);
3987
3988 # 686 "/usr/include/stdio.h" 3 4
3989 extern int fseeko (FILE *__stream, __off64_t __off, int __whence) __asm__ ("" "fseeko64");
3990
3991
3992 extern __off64_t ftello (FILE *__stream) __asm__ ("" "ftello64");
3993
3994
3995
3996
3997
3998
3999
4000
4001 # 711 "/usr/include/stdio.h" 3 4
4002 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos) __asm__ ("" "fgetpos64");
4003
4004 extern int fsetpos (FILE *__stream, __const fpos_t *__pos) __asm__ ("" "fsetpos64");
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014 extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
4015 extern __off64_t ftello64 (FILE *__stream) ;
4016 extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
4017 extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos);
4018
4019
4020
4021
4022 extern void clearerr (FILE *__stream) throw ();
4023
4024 extern int feof (FILE *__stream) throw () ;
4025
4026 extern int ferror (FILE *__stream) throw () ;
4027
4028
4029
4030
4031 extern void clearerr_unlocked (FILE *__stream) throw ();
4032 extern int feof_unlocked (FILE *__stream) throw () ;
4033 extern int ferror_unlocked (FILE *__stream) throw () ;
4034
4035
4036
4037
4038
4039
4040
4041
4042 extern void perror (__const char *__s);
4043
4044
4045
4046
4047
4048
4049 # 1 "/usr/include/bits/sys_errlist.h" 1 3 4
4050 # 27 "/usr/include/bits/sys_errlist.h" 3 4
4051 extern int sys_nerr;
4052 extern __const char *__const sys_errlist[];
4053
4054
4055 extern int _sys_nerr;
4056 extern __const char *__const _sys_errlist[];
4057 # 759 "/usr/include/stdio.h" 2 3 4
4058
4059
4060
4061
4062 extern int fileno (FILE *__stream) throw () ;
4063
4064
4065
4066
4067 extern int fileno_unlocked (FILE *__stream) throw () ;
4068 # 778 "/usr/include/stdio.h" 3 4
4069 extern FILE *popen (__const char *__command, __const char *__modes) ;
4070
4071
4072
4073
4074
4075 extern int pclose (FILE *__stream);
4076
4077
4078
4079
4080
4081 extern char *ctermid (char *__s) throw ();
4082
4083
4084
4085
4086
4087 extern char *cuserid (char *__s);
4088
4089
4090
4091
4092 struct obstack;
4093
4094
4095 extern int obstack_printf (struct obstack *__restrict __obstack,
4096 __const char *__restrict __format, ...)
4097 throw () __attribute__ ((__format__ (__printf__, 2, 3)));
4098 extern int obstack_vprintf (struct obstack *__restrict __obstack,
4099 __const char *__restrict __format,
4100 __gnuc_va_list __args)
4101 throw () __attribute__ ((__format__ (__printf__, 2, 0)));
4102
4103
4104
4105
4106
4107
4108
4109 extern void flockfile (FILE *__stream) throw ();
4110
4111
4112
4113 extern int ftrylockfile (FILE *__stream) throw () ;
4114
4115
4116 extern void funlockfile (FILE *__stream) throw ();
4117 # 839 "/usr/include/stdio.h" 3 4
4118 # 1 "/usr/include/bits/stdio.h" 1 3 4
4119 # 33 "/usr/include/bits/stdio.h" 3 4
4120 inline int
4121 vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg)
4122 {
4123 return vfprintf (stdout, __fmt, __arg);
4124 }
4125
4126
4127 inline int
4128 getchar (void)
4129 {
4130 return _IO_getc (stdin);
4131 }
4132
4133
4134
4135
4136 inline int
4137 fgetc_unlocked (FILE *__fp)
4138 {
4139 return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
4140 }
4141
4142
4143
4144
4145
4146 inline int
4147 getc_unlocked (FILE *__fp)
4148 {
4149 return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
4150 }
4151
4152
4153 inline int
4154 getchar_unlocked (void)
4155 {
4156 return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++);
4157 }
4158
4159
4160
4161
4162 inline int
4163 putchar (int __c)
4164 {
4165 return _IO_putc (__c, stdout);
4166 }
4167
4168
4169
4170
4171 inline int
4172 fputc_unlocked (int __c, FILE *__stream)
4173 {
4174 return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
4175 }
4176
4177
4178
4179
4180
4181 inline int
4182 putc_unlocked (int __c, FILE *__stream)
4183 {
4184 return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
4185 }
4186
4187
4188 inline int
4189 putchar_unlocked (int __c)
4190 {
4191 return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c)));
4192 }
4193
4194
4195
4196
4197
4198 inline __ssize_t
4199 getline (char **__lineptr, size_t *__n, FILE *__stream)
4200 {
4201 return __getdelim (__lineptr, __n, '\n', __stream);
4202 }
4203
4204
4205
4206
4207
4208 inline int
4209 feof_unlocked (FILE *__stream) throw ()
4210 {
4211 return (((__stream)->_flags & 0x10) != 0);
4212 }
4213
4214
4215 inline int
4216 ferror_unlocked (FILE *__stream) throw ()
4217 {
4218 return (((__stream)->_flags & 0x20) != 0);
4219 }
4220 # 840 "/usr/include/stdio.h" 2 3 4
4221 # 848 "/usr/include/stdio.h" 3 4
4222 }
4223 # 54 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdio" 2 3
4224 # 98 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdio" 3
4225 namespace std __attribute__ ((__visibility__ ("default"))) {
4226
4227 using ::FILE;
4228 using ::fpos_t;
4229
4230 using ::clearerr;
4231 using ::fclose;
4232 using ::feof;
4233 using ::ferror;
4234 using ::fflush;
4235 using ::fgetc;
4236 using ::fgetpos;
4237 using ::fgets;
4238 using ::fopen;
4239 using ::fprintf;
4240 using ::fputc;
4241 using ::fputs;
4242 using ::fread;
4243 using ::freopen;
4244 using ::fscanf;
4245 using ::fseek;
4246 using ::fsetpos;
4247 using ::ftell;
4248 using ::fwrite;
4249 using ::getc;
4250 using ::getchar;
4251 using ::gets;
4252 using ::perror;
4253 using ::printf;
4254 using ::putc;
4255 using ::putchar;
4256 using ::puts;
4257 using ::remove;
4258 using ::rename;
4259 using ::rewind;
4260 using ::scanf;
4261 using ::setbuf;
4262 using ::setvbuf;
4263 using ::sprintf;
4264 using ::sscanf;
4265 using ::tmpfile;
4266 using ::tmpnam;
4267 using ::ungetc;
4268 using ::vfprintf;
4269 using ::vprintf;
4270 using ::vsprintf;
4271
4272 }
4273 # 155 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdio" 3
4274 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
4275 # 170 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdio" 3
4276 using ::snprintf;
4277 using ::vfscanf;
4278 using ::vscanf;
4279 using ::vsnprintf;
4280 using ::vsscanf;
4281
4282
4283 }
4284
4285 namespace std __attribute__ ((__visibility__ ("default"))) {
4286
4287 using ::__gnu_cxx::snprintf;
4288 using ::__gnu_cxx::vfscanf;
4289 using ::__gnu_cxx::vscanf;
4290 using ::__gnu_cxx::vsnprintf;
4291 using ::__gnu_cxx::vsscanf;
4292
4293 }
4294 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 2 3
4295 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/clocale" 1 3
4296 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/clocale" 3
4297
4298 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/clocale" 3
4299
4300
4301 # 1 "/usr/include/locale.h" 1 3 4
4302 # 29 "/usr/include/locale.h" 3 4
4303 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4
4304 # 30 "/usr/include/locale.h" 2 3 4
4305 # 1 "/usr/include/bits/locale.h" 1 3 4
4306 # 27 "/usr/include/bits/locale.h" 3 4
4307 enum
4308 {
4309 __LC_CTYPE = 0,
4310 __LC_NUMERIC = 1,
4311 __LC_TIME = 2,
4312 __LC_COLLATE = 3,
4313 __LC_MONETARY = 4,
4314 __LC_MESSAGES = 5,
4315 __LC_ALL = 6,
4316 __LC_PAPER = 7,
4317 __LC_NAME = 8,
4318 __LC_ADDRESS = 9,
4319 __LC_TELEPHONE = 10,
4320 __LC_MEASUREMENT = 11,
4321 __LC_IDENTIFICATION = 12
4322 };
4323 # 31 "/usr/include/locale.h" 2 3 4
4324
4325 extern "C" {
4326 # 51 "/usr/include/locale.h" 3 4
4327
4328
4329
4330 struct lconv
4331 {
4332
4333
4334 char *decimal_point;
4335 char *thousands_sep;
4336
4337
4338
4339
4340
4341 char *grouping;
4342
4343
4344
4345
4346
4347 char *int_curr_symbol;
4348 char *currency_symbol;
4349 char *mon_decimal_point;
4350 char *mon_thousands_sep;
4351 char *mon_grouping;
4352 char *positive_sign;
4353 char *negative_sign;
4354 char int_frac_digits;
4355 char frac_digits;
4356
4357 char p_cs_precedes;
4358
4359 char p_sep_by_space;
4360
4361 char n_cs_precedes;
4362
4363 char n_sep_by_space;
4364
4365
4366
4367
4368
4369
4370 char p_sign_posn;
4371 char n_sign_posn;
4372
4373
4374 char int_p_cs_precedes;
4375
4376 char int_p_sep_by_space;
4377
4378 char int_n_cs_precedes;
4379
4380 char int_n_sep_by_space;
4381
4382
4383
4384
4385
4386
4387 char int_p_sign_posn;
4388 char int_n_sign_posn;
4389 # 121 "/usr/include/locale.h" 3 4
4390 };
4391
4392
4393
4394 extern char *setlocale (int __category, __const char *__locale) throw ();
4395
4396
4397 extern struct lconv *localeconv (void) throw ();
4398
4399
4400 # 148 "/usr/include/locale.h" 3 4
4401 typedef __locale_t locale_t;
4402
4403
4404
4405
4406
4407 extern __locale_t newlocale (int __category_mask, __const char *__locale,
4408 __locale_t __base) throw ();
4409 # 189 "/usr/include/locale.h" 3 4
4410 extern __locale_t duplocale (__locale_t __dataset) throw ();
4411
4412
4413
4414 extern void freelocale (__locale_t __dataset) throw ();
4415
4416
4417
4418
4419
4420
4421 extern __locale_t uselocale (__locale_t __dataset) throw ();
4422
4423
4424
4425
4426
4427
4428
4429 }
4430 # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/clocale" 2 3
4431
4432
4433
4434
4435
4436 namespace std __attribute__ ((__visibility__ ("default"))) {
4437
4438 using ::lconv;
4439 using ::setlocale;
4440 using ::localeconv;
4441
4442 }
4443 # 50 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 2 3
4444 # 1 "/usr/include/langinfo.h" 1 3 4
4445 # 24 "/usr/include/langinfo.h" 3 4
4446 # 1 "/usr/include/nl_types.h" 1 3 4
4447 # 31 "/usr/include/nl_types.h" 3 4
4448 extern "C" {
4449
4450
4451 typedef void *nl_catd;
4452
4453
4454 typedef int nl_item;
4455
4456
4457
4458
4459
4460 extern nl_catd catopen (__const char *__cat_name, int __flag) __attribute__ ((__nonnull__ (1)));
4461
4462
4463
4464 extern char *catgets (nl_catd __catalog, int __set, int __number,
4465 __const char *__string) throw () __attribute__ ((__nonnull__ (1)));
4466
4467
4468 extern int catclose (nl_catd __catalog) throw () __attribute__ ((__nonnull__ (1)));
4469
4470 }
4471 # 25 "/usr/include/langinfo.h" 2 3 4
4472
4473 # 1 "/usr/include/bits/locale.h" 1 3 4
4474 # 27 "/usr/include/langinfo.h" 2 3 4
4475
4476
4477 extern "C" {
4478 # 42 "/usr/include/langinfo.h" 3 4
4479 enum
4480 {
4481
4482
4483
4484 ABDAY_1 = (((__LC_TIME) << 16) | (0)),
4485
4486 ABDAY_2,
4487
4488 ABDAY_3,
4489
4490 ABDAY_4,
4491
4492 ABDAY_5,
4493
4494 ABDAY_6,
4495
4496 ABDAY_7,
4497
4498
4499
4500 DAY_1,
4501
4502 DAY_2,
4503
4504 DAY_3,
4505
4506 DAY_4,
4507
4508 DAY_5,
4509
4510 DAY_6,
4511
4512 DAY_7,
4513
4514
4515
4516 ABMON_1,
4517
4518 ABMON_2,
4519
4520 ABMON_3,
4521
4522 ABMON_4,
4523
4524 ABMON_5,
4525
4526 ABMON_6,
4527
4528 ABMON_7,
4529
4530 ABMON_8,
4531
4532 ABMON_9,
4533
4534 ABMON_10,
4535
4536 ABMON_11,
4537
4538 ABMON_12,
4539
4540
4541
4542 MON_1,
4543
4544 MON_2,
4545
4546 MON_3,
4547
4548 MON_4,
4549
4550 MON_5,
4551
4552 MON_6,
4553
4554 MON_7,
4555
4556 MON_8,
4557
4558 MON_9,
4559
4560 MON_10,
4561
4562 MON_11,
4563
4564 MON_12,
4565
4566
4567 AM_STR,
4568
4569 PM_STR,
4570
4571
4572 D_T_FMT,
4573
4574 D_FMT,
4575
4576 T_FMT,
4577
4578 T_FMT_AMPM,
4579
4580
4581 ERA,
4582
4583 __ERA_YEAR,
4584
4585
4586
4587 ERA_D_FMT,
4588
4589 ALT_DIGITS,
4590
4591 ERA_D_T_FMT,
4592
4593 ERA_T_FMT,
4594
4595
4596 _NL_TIME_ERA_NUM_ENTRIES,
4597 _NL_TIME_ERA_ENTRIES,
4598
4599 _NL_WABDAY_1,
4600 _NL_WABDAY_2,
4601 _NL_WABDAY_3,
4602 _NL_WABDAY_4,
4603 _NL_WABDAY_5,
4604 _NL_WABDAY_6,
4605 _NL_WABDAY_7,
4606
4607
4608 _NL_WDAY_1,
4609 _NL_WDAY_2,
4610 _NL_WDAY_3,
4611 _NL_WDAY_4,
4612 _NL_WDAY_5,
4613 _NL_WDAY_6,
4614 _NL_WDAY_7,
4615
4616
4617 _NL_WABMON_1,
4618 _NL_WABMON_2,
4619 _NL_WABMON_3,
4620 _NL_WABMON_4,
4621 _NL_WABMON_5,
4622 _NL_WABMON_6,
4623 _NL_WABMON_7,
4624 _NL_WABMON_8,
4625 _NL_WABMON_9,
4626 _NL_WABMON_10,
4627 _NL_WABMON_11,
4628 _NL_WABMON_12,
4629
4630
4631 _NL_WMON_1,
4632 _NL_WMON_2,
4633 _NL_WMON_3,
4634 _NL_WMON_4,
4635 _NL_WMON_5,
4636 _NL_WMON_6,
4637 _NL_WMON_7,
4638 _NL_WMON_8,
4639 _NL_WMON_9,
4640 _NL_WMON_10,
4641 _NL_WMON_11,
4642 _NL_WMON_12,
4643
4644 _NL_WAM_STR,
4645 _NL_WPM_STR,
4646
4647 _NL_WD_T_FMT,
4648 _NL_WD_FMT,
4649 _NL_WT_FMT,
4650 _NL_WT_FMT_AMPM,
4651
4652 _NL_WERA_YEAR,
4653 _NL_WERA_D_FMT,
4654 _NL_WALT_DIGITS,
4655 _NL_WERA_D_T_FMT,
4656 _NL_WERA_T_FMT,
4657
4658 _NL_TIME_WEEK_NDAYS,
4659 _NL_TIME_WEEK_1STDAY,
4660 _NL_TIME_WEEK_1STWEEK,
4661 _NL_TIME_FIRST_WEEKDAY,
4662 _NL_TIME_FIRST_WORKDAY,
4663 _NL_TIME_CAL_DIRECTION,
4664 _NL_TIME_TIMEZONE,
4665
4666 _DATE_FMT,
4667
4668 _NL_W_DATE_FMT,
4669
4670 _NL_TIME_CODESET,
4671
4672 _NL_NUM_LC_TIME,
4673
4674
4675
4676
4677 _NL_COLLATE_NRULES = (((__LC_COLLATE) << 16) | (0)),
4678 _NL_COLLATE_RULESETS,
4679 _NL_COLLATE_TABLEMB,
4680 _NL_COLLATE_WEIGHTMB,
4681 _NL_COLLATE_EXTRAMB,
4682 _NL_COLLATE_INDIRECTMB,
4683 _NL_COLLATE_GAP1,
4684 _NL_COLLATE_GAP2,
4685 _NL_COLLATE_GAP3,
4686 _NL_COLLATE_TABLEWC,
4687 _NL_COLLATE_WEIGHTWC,
4688 _NL_COLLATE_EXTRAWC,
4689 _NL_COLLATE_INDIRECTWC,
4690 _NL_COLLATE_SYMB_HASH_SIZEMB,
4691 _NL_COLLATE_SYMB_TABLEMB,
4692 _NL_COLLATE_SYMB_EXTRAMB,
4693 _NL_COLLATE_COLLSEQMB,
4694 _NL_COLLATE_COLLSEQWC,
4695 _NL_COLLATE_CODESET,
4696 _NL_NUM_LC_COLLATE,
4697
4698
4699
4700
4701 _NL_CTYPE_CLASS = (((__LC_CTYPE) << 16) | (0)),
4702 _NL_CTYPE_TOUPPER,
4703 _NL_CTYPE_GAP1,
4704 _NL_CTYPE_TOLOWER,
4705 _NL_CTYPE_GAP2,
4706 _NL_CTYPE_CLASS32,
4707 _NL_CTYPE_GAP3,
4708 _NL_CTYPE_GAP4,
4709 _NL_CTYPE_GAP5,
4710 _NL_CTYPE_GAP6,
4711 _NL_CTYPE_CLASS_NAMES,
4712 _NL_CTYPE_MAP_NAMES,
4713 _NL_CTYPE_WIDTH,
4714 _NL_CTYPE_MB_CUR_MAX,
4715 _NL_CTYPE_CODESET_NAME,
4716 CODESET = _NL_CTYPE_CODESET_NAME,
4717
4718 _NL_CTYPE_TOUPPER32,
4719 _NL_CTYPE_TOLOWER32,
4720 _NL_CTYPE_CLASS_OFFSET,
4721 _NL_CTYPE_MAP_OFFSET,
4722 _NL_CTYPE_INDIGITS_MB_LEN,
4723 _NL_CTYPE_INDIGITS0_MB,
4724 _NL_CTYPE_INDIGITS1_MB,
4725 _NL_CTYPE_INDIGITS2_MB,
4726 _NL_CTYPE_INDIGITS3_MB,
4727 _NL_CTYPE_INDIGITS4_MB,
4728 _NL_CTYPE_INDIGITS5_MB,
4729 _NL_CTYPE_INDIGITS6_MB,
4730 _NL_CTYPE_INDIGITS7_MB,
4731 _NL_CTYPE_INDIGITS8_MB,
4732 _NL_CTYPE_INDIGITS9_MB,
4733 _NL_CTYPE_INDIGITS_WC_LEN,
4734 _NL_CTYPE_INDIGITS0_WC,
4735 _NL_CTYPE_INDIGITS1_WC,
4736 _NL_CTYPE_INDIGITS2_WC,
4737 _NL_CTYPE_INDIGITS3_WC,
4738 _NL_CTYPE_INDIGITS4_WC,
4739 _NL_CTYPE_INDIGITS5_WC,
4740 _NL_CTYPE_INDIGITS6_WC,
4741 _NL_CTYPE_INDIGITS7_WC,
4742 _NL_CTYPE_INDIGITS8_WC,
4743 _NL_CTYPE_INDIGITS9_WC,
4744 _NL_CTYPE_OUTDIGIT0_MB,
4745 _NL_CTYPE_OUTDIGIT1_MB,
4746 _NL_CTYPE_OUTDIGIT2_MB,
4747 _NL_CTYPE_OUTDIGIT3_MB,
4748 _NL_CTYPE_OUTDIGIT4_MB,
4749 _NL_CTYPE_OUTDIGIT5_MB,
4750 _NL_CTYPE_OUTDIGIT6_MB,
4751 _NL_CTYPE_OUTDIGIT7_MB,
4752 _NL_CTYPE_OUTDIGIT8_MB,
4753 _NL_CTYPE_OUTDIGIT9_MB,
4754 _NL_CTYPE_OUTDIGIT0_WC,
4755 _NL_CTYPE_OUTDIGIT1_WC,
4756 _NL_CTYPE_OUTDIGIT2_WC,
4757 _NL_CTYPE_OUTDIGIT3_WC,
4758 _NL_CTYPE_OUTDIGIT4_WC,
4759 _NL_CTYPE_OUTDIGIT5_WC,
4760 _NL_CTYPE_OUTDIGIT6_WC,
4761 _NL_CTYPE_OUTDIGIT7_WC,
4762 _NL_CTYPE_OUTDIGIT8_WC,
4763 _NL_CTYPE_OUTDIGIT9_WC,
4764 _NL_CTYPE_TRANSLIT_TAB_SIZE,
4765 _NL_CTYPE_TRANSLIT_FROM_IDX,
4766 _NL_CTYPE_TRANSLIT_FROM_TBL,
4767 _NL_CTYPE_TRANSLIT_TO_IDX,
4768 _NL_CTYPE_TRANSLIT_TO_TBL,
4769 _NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN,
4770 _NL_CTYPE_TRANSLIT_DEFAULT_MISSING,
4771 _NL_CTYPE_TRANSLIT_IGNORE_LEN,
4772 _NL_CTYPE_TRANSLIT_IGNORE,
4773 _NL_CTYPE_MAP_TO_NONASCII,
4774 _NL_CTYPE_EXTRA_MAP_1,
4775 _NL_CTYPE_EXTRA_MAP_2,
4776 _NL_CTYPE_EXTRA_MAP_3,
4777 _NL_CTYPE_EXTRA_MAP_4,
4778 _NL_CTYPE_EXTRA_MAP_5,
4779 _NL_CTYPE_EXTRA_MAP_6,
4780 _NL_CTYPE_EXTRA_MAP_7,
4781 _NL_CTYPE_EXTRA_MAP_8,
4782 _NL_CTYPE_EXTRA_MAP_9,
4783 _NL_CTYPE_EXTRA_MAP_10,
4784 _NL_CTYPE_EXTRA_MAP_11,
4785 _NL_CTYPE_EXTRA_MAP_12,
4786 _NL_CTYPE_EXTRA_MAP_13,
4787 _NL_CTYPE_EXTRA_MAP_14,
4788 _NL_NUM_LC_CTYPE,
4789
4790
4791
4792
4793 __INT_CURR_SYMBOL = (((__LC_MONETARY) << 16) | (0)),
4794
4795
4796
4797 __CURRENCY_SYMBOL,
4798
4799
4800
4801 __MON_DECIMAL_POINT,
4802
4803
4804
4805 __MON_THOUSANDS_SEP,
4806
4807
4808
4809 __MON_GROUPING,
4810
4811
4812
4813 __POSITIVE_SIGN,
4814
4815
4816
4817 __NEGATIVE_SIGN,
4818
4819
4820
4821 __INT_FRAC_DIGITS,
4822
4823
4824
4825 __FRAC_DIGITS,
4826
4827
4828
4829 __P_CS_PRECEDES,
4830
4831
4832
4833 __P_SEP_BY_SPACE,
4834
4835
4836
4837 __N_CS_PRECEDES,
4838
4839
4840
4841 __N_SEP_BY_SPACE,
4842
4843
4844
4845 __P_SIGN_POSN,
4846
4847
4848
4849 __N_SIGN_POSN,
4850
4851
4852
4853 _NL_MONETARY_CRNCYSTR,
4854
4855 __INT_P_CS_PRECEDES,
4856
4857
4858
4859 __INT_P_SEP_BY_SPACE,
4860
4861
4862
4863 __INT_N_CS_PRECEDES,
4864
4865
4866
4867 __INT_N_SEP_BY_SPACE,
4868
4869
4870
4871 __INT_P_SIGN_POSN,
4872
4873
4874
4875 __INT_N_SIGN_POSN,
4876
4877
4878
4879 _NL_MONETARY_DUO_INT_CURR_SYMBOL,
4880 _NL_MONETARY_DUO_CURRENCY_SYMBOL,
4881 _NL_MONETARY_DUO_INT_FRAC_DIGITS,
4882 _NL_MONETARY_DUO_FRAC_DIGITS,
4883 _NL_MONETARY_DUO_P_CS_PRECEDES,
4884 _NL_MONETARY_DUO_P_SEP_BY_SPACE,
4885 _NL_MONETARY_DUO_N_CS_PRECEDES,
4886 _NL_MONETARY_DUO_N_SEP_BY_SPACE,
4887 _NL_MONETARY_DUO_INT_P_CS_PRECEDES,
4888 _NL_MONETARY_DUO_INT_P_SEP_BY_SPACE,
4889 _NL_MONETARY_DUO_INT_N_CS_PRECEDES,
4890 _NL_MONETARY_DUO_INT_N_SEP_BY_SPACE,
4891 _NL_MONETARY_DUO_P_SIGN_POSN,
4892 _NL_MONETARY_DUO_N_SIGN_POSN,
4893 _NL_MONETARY_DUO_INT_P_SIGN_POSN,
4894 _NL_MONETARY_DUO_INT_N_SIGN_POSN,
4895 _NL_MONETARY_UNO_VALID_FROM,
4896 _NL_MONETARY_UNO_VALID_TO,
4897 _NL_MONETARY_DUO_VALID_FROM,
4898 _NL_MONETARY_DUO_VALID_TO,
4899 _NL_MONETARY_CONVERSION_RATE,
4900 _NL_MONETARY_DECIMAL_POINT_WC,
4901 _NL_MONETARY_THOUSANDS_SEP_WC,
4902 _NL_MONETARY_CODESET,
4903 _NL_NUM_LC_MONETARY,
4904
4905
4906
4907 __DECIMAL_POINT = (((__LC_NUMERIC) << 16) | (0)),
4908
4909
4910
4911 RADIXCHAR = __DECIMAL_POINT,
4912
4913 __THOUSANDS_SEP,
4914
4915
4916
4917 THOUSEP = __THOUSANDS_SEP,
4918
4919 __GROUPING,
4920
4921
4922
4923 _NL_NUMERIC_DECIMAL_POINT_WC,
4924 _NL_NUMERIC_THOUSANDS_SEP_WC,
4925 _NL_NUMERIC_CODESET,
4926 _NL_NUM_LC_NUMERIC,
4927
4928 __YESEXPR = (((__LC_MESSAGES) << 16) | (0)),
4929
4930 __NOEXPR,
4931
4932 __YESSTR,
4933
4934
4935
4936 __NOSTR,
4937
4938
4939
4940 _NL_MESSAGES_CODESET,
4941 _NL_NUM_LC_MESSAGES,
4942
4943 _NL_PAPER_HEIGHT = (((__LC_PAPER) << 16) | (0)),
4944 _NL_PAPER_WIDTH,
4945 _NL_PAPER_CODESET,
4946 _NL_NUM_LC_PAPER,
4947
4948 _NL_NAME_NAME_FMT = (((__LC_NAME) << 16) | (0)),
4949 _NL_NAME_NAME_GEN,
4950 _NL_NAME_NAME_MR,
4951 _NL_NAME_NAME_MRS,
4952 _NL_NAME_NAME_MISS,
4953 _NL_NAME_NAME_MS,
4954 _NL_NAME_CODESET,
4955 _NL_NUM_LC_NAME,
4956
4957 _NL_ADDRESS_POSTAL_FMT = (((__LC_ADDRESS) << 16) | (0)),
4958 _NL_ADDRESS_COUNTRY_NAME,
4959 _NL_ADDRESS_COUNTRY_POST,
4960 _NL_ADDRESS_COUNTRY_AB2,
4961 _NL_ADDRESS_COUNTRY_AB3,
4962 _NL_ADDRESS_COUNTRY_CAR,
4963 _NL_ADDRESS_COUNTRY_NUM,
4964 _NL_ADDRESS_COUNTRY_ISBN,
4965 _NL_ADDRESS_LANG_NAME,
4966 _NL_ADDRESS_LANG_AB,
4967 _NL_ADDRESS_LANG_TERM,
4968 _NL_ADDRESS_LANG_LIB,
4969 _NL_ADDRESS_CODESET,
4970 _NL_NUM_LC_ADDRESS,
4971
4972 _NL_TELEPHONE_TEL_INT_FMT = (((__LC_TELEPHONE) << 16) | (0)),
4973 _NL_TELEPHONE_TEL_DOM_FMT,
4974 _NL_TELEPHONE_INT_SELECT,
4975 _NL_TELEPHONE_INT_PREFIX,
4976 _NL_TELEPHONE_CODESET,
4977 _NL_NUM_LC_TELEPHONE,
4978
4979 _NL_MEASUREMENT_MEASUREMENT = (((__LC_MEASUREMENT) << 16) | (0)),
4980 _NL_MEASUREMENT_CODESET,
4981 _NL_NUM_LC_MEASUREMENT,
4982
4983 _NL_IDENTIFICATION_TITLE = (((__LC_IDENTIFICATION) << 16) | (0)),
4984 _NL_IDENTIFICATION_SOURCE,
4985 _NL_IDENTIFICATION_ADDRESS,
4986 _NL_IDENTIFICATION_CONTACT,
4987 _NL_IDENTIFICATION_EMAIL,
4988 _NL_IDENTIFICATION_TEL,
4989 _NL_IDENTIFICATION_FAX,
4990 _NL_IDENTIFICATION_LANGUAGE,
4991 _NL_IDENTIFICATION_TERRITORY,
4992 _NL_IDENTIFICATION_AUDIENCE,
4993 _NL_IDENTIFICATION_APPLICATION,
4994 _NL_IDENTIFICATION_ABBREVIATION,
4995 _NL_IDENTIFICATION_REVISION,
4996 _NL_IDENTIFICATION_DATE,
4997 _NL_IDENTIFICATION_CATEGORY,
4998 _NL_IDENTIFICATION_CODESET,
4999 _NL_NUM_LC_IDENTIFICATION,
5000
5001
5002 _NL_NUM
5003 };
5004 # 582 "/usr/include/langinfo.h" 3 4
5005 extern char *nl_langinfo (nl_item __item) throw ();
5006 # 593 "/usr/include/langinfo.h" 3 4
5007 extern char *nl_langinfo_l (nl_item __item, __locale_t l);
5008
5009
5010 }
5011 # 51 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 2 3
5012 # 1 "/usr/include/iconv.h" 1 3 4
5013 # 24 "/usr/include/iconv.h" 3 4
5014 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4
5015 # 25 "/usr/include/iconv.h" 2 3 4
5016
5017
5018 extern "C" {
5019
5020
5021 typedef void *iconv_t;
5022
5023
5024
5025
5026
5027
5028
5029 extern iconv_t iconv_open (__const char *__tocode, __const char *__fromcode);
5030
5031
5032
5033
5034 extern size_t iconv (iconv_t __cd, char **__restrict __inbuf,
5035 size_t *__restrict __inbytesleft,
5036 char **__restrict __outbuf,
5037 size_t *__restrict __outbytesleft);
5038
5039
5040
5041
5042
5043 extern int iconv_close (iconv_t __cd);
5044
5045 }
5046 # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 2 3
5047 # 1 "/usr/include/libintl.h" 1 3 4
5048 # 35 "/usr/include/libintl.h" 3 4
5049 extern "C" {
5050
5051
5052
5053
5054 extern char *gettext (__const char *__msgid)
5055 throw () __attribute__ ((__format_arg__ (1)));
5056
5057
5058
5059 extern char *dgettext (__const char *__domainname, __const char *__msgid)
5060 throw () __attribute__ ((__format_arg__ (2)));
5061 extern char *__dgettext (__const char *__domainname, __const char *__msgid)
5062 throw () __attribute__ ((__format_arg__ (2)));
5063
5064
5065
5066 extern char *dcgettext (__const char *__domainname,
5067 __const char *__msgid, int __category)
5068 throw () __attribute__ ((__format_arg__ (2)));
5069 extern char *__dcgettext (__const char *__domainname,
5070 __const char *__msgid, int __category)
5071 throw () __attribute__ ((__format_arg__ (2)));
5072
5073
5074
5075
5076 extern char *ngettext (__const char *__msgid1, __const char *__msgid2,
5077 unsigned long int __n)
5078 throw () __attribute__ ((__format_arg__ (1))) __attribute__ ((__format_arg__ (2)));
5079
5080
5081
5082 extern char *dngettext (__const char *__domainname, __const char *__msgid1,
5083 __const char *__msgid2, unsigned long int __n)
5084 throw () __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3)));
5085
5086
5087
5088 extern char *dcngettext (__const char *__domainname, __const char *__msgid1,
5089 __const char *__msgid2, unsigned long int __n,
5090 int __category)
5091 throw () __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3)));
5092
5093
5094
5095
5096
5097 extern char *textdomain (__const char *__domainname) throw ();
5098
5099
5100
5101 extern char *bindtextdomain (__const char *__domainname,
5102 __const char *__dirname) throw ();
5103
5104
5105
5106 extern char *bind_textdomain_codeset (__const char *__domainname,
5107 __const char *__codeset) throw ();
5108 # 122 "/usr/include/libintl.h" 3 4
5109 }
5110 # 53 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 2 3
5111 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdarg" 1 3
5112 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdarg" 3
5113
5114 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdarg" 3
5115
5116
5117 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stdarg.h" 1 3 4
5118 # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdarg" 2 3
5119
5120
5121
5122
5123
5124
5125 namespace std __attribute__ ((__visibility__ ("default"))) {
5126
5127 using ::va_list;
5128
5129 }
5130 # 54 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 2 3
5131
5132
5133
5134
5135
5136
5137 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
5138
5139 extern "C" __typeof(uselocale) __uselocale;
5140
5141 }
5142
5143
5144 namespace std __attribute__ ((__visibility__ ("default"))) {
5145
5146 typedef __locale_t __c_locale;
5147
5148
5149
5150
5151
5152 inline int
5153 __convert_from_v(const __c_locale& __cloc __attribute__ ((__unused__)),
5154 char* __out,
5155 const int __size __attribute__ ((__unused__)),
5156 const char* __fmt, ...)
5157 {
5158
5159 __c_locale __old = __gnu_cxx::__uselocale(__cloc);
5160
5161
5162
5163
5164
5165
5166
5167 va_list __args;
5168 __builtin_va_start(__args,__fmt);
5169
5170
5171 const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
5172
5173
5174
5175
5176 __builtin_va_end(__args);
5177
5178
5179 __gnu_cxx::__uselocale(__old);
5180
5181
5182
5183
5184 return __ret;
5185 }
5186
5187 }
5188 # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iosfwd" 2 3
5189 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++io.h" 1 3
5190 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++io.h" 3
5191 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr.h" 1 3
5192 # 33 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr.h" 3
5193 #pragma GCC visibility push(default)
5194 # 114 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr.h" 3
5195 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr-default.h" 1 3
5196 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr-default.h" 3
5197 # 1 "/usr/include/pthread.h" 1 3 4
5198 # 24 "/usr/include/pthread.h" 3 4
5199 # 1 "/usr/include/sched.h" 1 3 4
5200 # 29 "/usr/include/sched.h" 3 4
5201 # 1 "/usr/include/time.h" 1 3 4
5202 # 30 "/usr/include/sched.h" 2 3 4
5203
5204
5205 # 1 "/usr/include/bits/sched.h" 1 3 4
5206 # 66 "/usr/include/bits/sched.h" 3 4
5207 struct sched_param
5208 {
5209 int __sched_priority;
5210 };
5211
5212 extern "C" {
5213
5214
5215
5216 extern int clone (int (*__fn) (void *__arg), void *__child_stack,
5217 int __flags, void *__arg, ...) throw ();
5218
5219
5220 extern int unshare (int __flags) throw ();
5221
5222
5223 extern int sched_getcpu (void) throw ();
5224
5225
5226 }
5227
5228
5229
5230
5231
5232
5233
5234 struct __sched_param
5235 {
5236 int __sched_priority;
5237 };
5238 # 108 "/usr/include/bits/sched.h" 3 4
5239 typedef unsigned long int __cpu_mask;
5240
5241
5242
5243
5244
5245
5246 typedef struct
5247 {
5248 __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))];
5249 } cpu_set_t;
5250 # 134 "/usr/include/bits/sched.h" 3 4
5251 extern int __sched_cpucount (size_t __setsize, cpu_set_t *__setp) throw ();
5252 # 33 "/usr/include/sched.h" 2 3 4
5253
5254
5255
5256
5257 extern "C" {
5258
5259
5260 extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param)
5261 throw ();
5262
5263
5264 extern int sched_getparam (__pid_t __pid, struct sched_param *__param) throw ();
5265
5266
5267 extern int sched_setscheduler (__pid_t __pid, int __policy,
5268 __const struct sched_param *__param) throw ();
5269
5270
5271 extern int sched_getscheduler (__pid_t __pid) throw ();
5272
5273
5274 extern int sched_yield (void) throw ();
5275
5276
5277 extern int sched_get_priority_max (int __algorithm) throw ();
5278
5279
5280 extern int sched_get_priority_min (int __algorithm) throw ();
5281
5282
5283 extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) throw ();
5284 # 77 "/usr/include/sched.h" 3 4
5285 extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize,
5286 __const cpu_set_t *__cpuset) throw ();
5287
5288
5289 extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize,
5290 cpu_set_t *__cpuset) throw ();
5291
5292
5293 }
5294 # 25 "/usr/include/pthread.h" 2 3 4
5295 # 1 "/usr/include/time.h" 1 3 4
5296 # 31 "/usr/include/time.h" 3 4
5297 extern "C" {
5298
5299
5300
5301
5302
5303
5304
5305 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4
5306 # 40 "/usr/include/time.h" 2 3 4
5307
5308
5309
5310 # 1 "/usr/include/bits/time.h" 1 3 4
5311 # 44 "/usr/include/time.h" 2 3 4
5312 # 132 "/usr/include/time.h" 3 4
5313
5314
5315 struct tm
5316 {
5317 int tm_sec;
5318 int tm_min;
5319 int tm_hour;
5320 int tm_mday;
5321 int tm_mon;
5322 int tm_year;
5323 int tm_wday;
5324 int tm_yday;
5325 int tm_isdst;
5326
5327
5328 long int tm_gmtoff;
5329 __const char *tm_zone;
5330
5331
5332
5333
5334 };
5335
5336
5337
5338
5339
5340
5341
5342
5343 struct itimerspec
5344 {
5345 struct timespec it_interval;
5346 struct timespec it_value;
5347 };
5348
5349
5350 struct sigevent;
5351 # 181 "/usr/include/time.h" 3 4
5352
5353
5354
5355 extern clock_t clock (void) throw ();
5356
5357
5358 extern time_t time (time_t *__timer) throw ();
5359
5360
5361 extern double difftime (time_t __time1, time_t __time0)
5362 throw () __attribute__ ((__const__));
5363
5364
5365 extern time_t mktime (struct tm *__tp) throw ();
5366
5367
5368
5369
5370
5371 extern size_t strftime (char *__restrict __s, size_t __maxsize,
5372 __const char *__restrict __format,
5373 __const struct tm *__restrict __tp) throw ();
5374
5375
5376
5377
5378
5379 extern char *strptime (__const char *__restrict __s,
5380 __const char *__restrict __fmt, struct tm *__tp)
5381 throw ();
5382
5383
5384
5385
5386
5387
5388
5389 extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
5390 __const char *__restrict __format,
5391 __const struct tm *__restrict __tp,
5392 __locale_t __loc) throw ();
5393
5394 extern char *strptime_l (__const char *__restrict __s,
5395 __const char *__restrict __fmt, struct tm *__tp,
5396 __locale_t __loc) throw ();
5397
5398
5399
5400
5401
5402
5403 extern struct tm *gmtime (__const time_t *__timer) throw ();
5404
5405
5406
5407 extern struct tm *localtime (__const time_t *__timer) throw ();
5408
5409
5410
5411
5412
5413 extern struct tm *gmtime_r (__const time_t *__restrict __timer,
5414 struct tm *__restrict __tp) throw ();
5415
5416
5417
5418 extern struct tm *localtime_r (__const time_t *__restrict __timer,
5419 struct tm *__restrict __tp) throw ();
5420
5421
5422
5423
5424
5425 extern char *asctime (__const struct tm *__tp) throw ();
5426
5427
5428 extern char *ctime (__const time_t *__timer) throw ();
5429
5430
5431
5432
5433
5434
5435
5436 extern char *asctime_r (__const struct tm *__restrict __tp,
5437 char *__restrict __buf) throw ();
5438
5439
5440 extern char *ctime_r (__const time_t *__restrict __timer,
5441 char *__restrict __buf) throw ();
5442
5443
5444
5445
5446 extern char *__tzname[2];
5447 extern int __daylight;
5448 extern long int __timezone;
5449
5450
5451
5452
5453 extern char *tzname[2];
5454
5455
5456
5457 extern void tzset (void) throw ();
5458
5459
5460
5461 extern int daylight;
5462 extern long int timezone;
5463
5464
5465
5466
5467
5468 extern int stime (__const time_t *__when) throw ();
5469 # 312 "/usr/include/time.h" 3 4
5470 extern time_t timegm (struct tm *__tp) throw ();
5471
5472
5473 extern time_t timelocal (struct tm *__tp) throw ();
5474
5475
5476 extern int dysize (int __year) throw () __attribute__ ((__const__));
5477 # 327 "/usr/include/time.h" 3 4
5478 extern int nanosleep (__const struct timespec *__requested_time,
5479 struct timespec *__remaining);
5480
5481
5482
5483 extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw ();
5484
5485
5486 extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw ();
5487
5488
5489 extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp)
5490 throw ();
5491
5492
5493
5494
5495
5496
5497 extern int clock_nanosleep (clockid_t __clock_id, int __flags,
5498 __const struct timespec *__req,
5499 struct timespec *__rem);
5500
5501
5502 extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw ();
5503
5504
5505
5506
5507 extern int timer_create (clockid_t __clock_id,
5508 struct sigevent *__restrict __evp,
5509 timer_t *__restrict __timerid) throw ();
5510
5511
5512 extern int timer_delete (timer_t __timerid) throw ();
5513
5514
5515 extern int timer_settime (timer_t __timerid, int __flags,
5516 __const struct itimerspec *__restrict __value,
5517 struct itimerspec *__restrict __ovalue) throw ();
5518
5519
5520 extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
5521 throw ();
5522
5523
5524 extern int timer_getoverrun (timer_t __timerid) throw ();
5525 # 389 "/usr/include/time.h" 3 4
5526 extern int getdate_err;
5527 # 398 "/usr/include/time.h" 3 4
5528 extern struct tm *getdate (__const char *__string);
5529 # 412 "/usr/include/time.h" 3 4
5530 extern int getdate_r (__const char *__restrict __string,
5531 struct tm *__restrict __resbufp);
5532
5533
5534 }
5535 # 26 "/usr/include/pthread.h" 2 3 4
5536
5537
5538 # 1 "/usr/include/signal.h" 1 3 4
5539 # 31 "/usr/include/signal.h" 3 4
5540 extern "C" {
5541
5542 # 1 "/usr/include/bits/sigset.h" 1 3 4
5543 # 34 "/usr/include/signal.h" 2 3 4
5544 # 400 "/usr/include/signal.h" 3 4
5545 }
5546 # 29 "/usr/include/pthread.h" 2 3 4
5547
5548 # 1 "/usr/include/bits/setjmp.h" 1 3 4
5549 # 33 "/usr/include/bits/setjmp.h" 3 4
5550 # 1 "/usr/include/bits/wordsize.h" 1 3 4
5551 # 34 "/usr/include/bits/setjmp.h" 2 3 4
5552 # 48 "/usr/include/bits/setjmp.h" 3 4
5553 typedef long int __jmp_buf[64 + (12 * 4)] __attribute__ ((__aligned__ (16)));
5554 # 31 "/usr/include/pthread.h" 2 3 4
5555 # 1 "/usr/include/bits/wordsize.h" 1 3 4
5556 # 32 "/usr/include/pthread.h" 2 3 4
5557
5558
5559
5560 enum
5561 {
5562 PTHREAD_CREATE_JOINABLE,
5563
5564 PTHREAD_CREATE_DETACHED
5565
5566 };
5567
5568
5569
5570 enum
5571 {
5572 PTHREAD_MUTEX_TIMED_NP,
5573 PTHREAD_MUTEX_RECURSIVE_NP,
5574 PTHREAD_MUTEX_ERRORCHECK_NP,
5575 PTHREAD_MUTEX_ADAPTIVE_NP
5576
5577 ,
5578 PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
5579 PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
5580 PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
5581 PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
5582
5583
5584
5585 , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP
5586
5587 };
5588
5589
5590
5591
5592 enum
5593 {
5594 PTHREAD_MUTEX_STALLED_NP,
5595 PTHREAD_MUTEX_ROBUST_NP
5596 };
5597
5598
5599
5600
5601
5602 enum
5603 {
5604 PTHREAD_PRIO_NONE,
5605 PTHREAD_PRIO_INHERIT,
5606 PTHREAD_PRIO_PROTECT
5607 };
5608 # 114 "/usr/include/pthread.h" 3 4
5609 enum
5610 {
5611 PTHREAD_RWLOCK_PREFER_READER_NP,
5612 PTHREAD_RWLOCK_PREFER_WRITER_NP,
5613 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
5614 PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
5615 };
5616 # 144 "/usr/include/pthread.h" 3 4
5617 enum
5618 {
5619 PTHREAD_INHERIT_SCHED,
5620
5621 PTHREAD_EXPLICIT_SCHED
5622
5623 };
5624
5625
5626
5627 enum
5628 {
5629 PTHREAD_SCOPE_SYSTEM,
5630
5631 PTHREAD_SCOPE_PROCESS
5632
5633 };
5634
5635
5636
5637 enum
5638 {
5639 PTHREAD_PROCESS_PRIVATE,
5640
5641 PTHREAD_PROCESS_SHARED
5642
5643 };
5644 # 179 "/usr/include/pthread.h" 3 4
5645 struct _pthread_cleanup_buffer
5646 {
5647 void (*__routine) (void *);
5648 void *__arg;
5649 int __canceltype;
5650 struct _pthread_cleanup_buffer *__prev;
5651 };
5652
5653
5654 enum
5655 {
5656 PTHREAD_CANCEL_ENABLE,
5657
5658 PTHREAD_CANCEL_DISABLE
5659
5660 };
5661 enum
5662 {
5663 PTHREAD_CANCEL_DEFERRED,
5664
5665 PTHREAD_CANCEL_ASYNCHRONOUS
5666
5667 };
5668 # 217 "/usr/include/pthread.h" 3 4
5669 extern "C" {
5670
5671
5672
5673
5674 extern int pthread_create (pthread_t *__restrict __newthread,
5675 __const pthread_attr_t *__restrict __attr,
5676 void *(*__start_routine) (void *),
5677 void *__restrict __arg) throw () __attribute__ ((__nonnull__ (1, 3)));
5678
5679
5680
5681
5682
5683 extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));
5684
5685
5686
5687
5688
5689
5690
5691 extern int pthread_join (pthread_t __th, void **__thread_return);
5692
5693
5694
5695
5696 extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) throw ();
5697
5698
5699
5700
5701
5702
5703
5704 extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return,
5705 __const struct timespec *__abstime);
5706
5707
5708
5709
5710
5711
5712 extern int pthread_detach (pthread_t __th) throw ();
5713
5714
5715
5716 extern pthread_t pthread_self (void) throw () __attribute__ ((__const__));
5717
5718
5719 extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) throw ();
5720
5721
5722
5723
5724
5725
5726
5727 extern int pthread_attr_init (pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (1)));
5728
5729
5730 extern int pthread_attr_destroy (pthread_attr_t *__attr)
5731 throw () __attribute__ ((__nonnull__ (1)));
5732
5733
5734 extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr,
5735 int *__detachstate)
5736 throw () __attribute__ ((__nonnull__ (1, 2)));
5737
5738
5739 extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
5740 int __detachstate)
5741 throw () __attribute__ ((__nonnull__ (1)));
5742
5743
5744
5745 extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr,
5746 size_t *__guardsize)
5747 throw () __attribute__ ((__nonnull__ (1, 2)));
5748
5749
5750 extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
5751 size_t __guardsize)
5752 throw () __attribute__ ((__nonnull__ (1)));
5753
5754
5755
5756 extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict
5757 __attr,
5758 struct sched_param *__restrict __param)
5759 throw () __attribute__ ((__nonnull__ (1, 2)));
5760
5761
5762 extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
5763 __const struct sched_param *__restrict
5764 __param) throw () __attribute__ ((__nonnull__ (1, 2)));
5765
5766
5767 extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict
5768 __attr, int *__restrict __policy)
5769 throw () __attribute__ ((__nonnull__ (1, 2)));
5770
5771
5772 extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
5773 throw () __attribute__ ((__nonnull__ (1)));
5774
5775
5776 extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict
5777 __attr, int *__restrict __inherit)
5778 throw () __attribute__ ((__nonnull__ (1, 2)));
5779
5780
5781 extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
5782 int __inherit)
5783 throw () __attribute__ ((__nonnull__ (1)));
5784
5785
5786
5787 extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr,
5788 int *__restrict __scope)
5789 throw () __attribute__ ((__nonnull__ (1, 2)));
5790
5791
5792 extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
5793 throw () __attribute__ ((__nonnull__ (1)));
5794
5795
5796 extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
5797 __attr, void **__restrict __stackaddr)
5798 throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__));
5799
5800
5801
5802
5803
5804 extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
5805 void *__stackaddr)
5806 throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__));
5807
5808
5809 extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
5810 __attr, size_t *__restrict __stacksize)
5811 throw () __attribute__ ((__nonnull__ (1, 2)));
5812
5813
5814
5815
5816 extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
5817 size_t __stacksize)
5818 throw () __attribute__ ((__nonnull__ (1)));
5819
5820
5821
5822 extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr,
5823 void **__restrict __stackaddr,
5824 size_t *__restrict __stacksize)
5825 throw () __attribute__ ((__nonnull__ (1, 2, 3)));
5826
5827
5828
5829
5830 extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
5831 size_t __stacksize) throw () __attribute__ ((__nonnull__ (1)));
5832
5833
5834
5835
5836
5837 extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr,
5838 size_t __cpusetsize,
5839 __const cpu_set_t *__cpuset)
5840 throw () __attribute__ ((__nonnull__ (1, 3)));
5841
5842
5843
5844 extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr,
5845 size_t __cpusetsize,
5846 cpu_set_t *__cpuset)
5847 throw () __attribute__ ((__nonnull__ (1, 3)));
5848
5849
5850
5851
5852
5853 extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr)
5854 throw () __attribute__ ((__nonnull__ (2)));
5855
5856
5857
5858
5859
5860
5861
5862 extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
5863 __const struct sched_param *__param)
5864 throw () __attribute__ ((__nonnull__ (3)));
5865
5866
5867 extern int pthread_getschedparam (pthread_t __target_thread,
5868 int *__restrict __policy,
5869 struct sched_param *__restrict __param)
5870 throw () __attribute__ ((__nonnull__ (2, 3)));
5871
5872
5873 extern int pthread_setschedprio (pthread_t __target_thread, int __prio)
5874 throw ();
5875
5876
5877
5878
5879 extern int pthread_getconcurrency (void) throw ();
5880
5881
5882 extern int pthread_setconcurrency (int __level) throw ();
5883
5884
5885
5886
5887
5888
5889
5890 extern int pthread_yield (void) throw ();
5891
5892
5893
5894
5895 extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize,
5896 __const cpu_set_t *__cpuset)
5897 throw () __attribute__ ((__nonnull__ (3)));
5898
5899
5900 extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize,
5901 cpu_set_t *__cpuset)
5902 throw () __attribute__ ((__nonnull__ (3)));
5903 # 463 "/usr/include/pthread.h" 3 4
5904 extern int pthread_once (pthread_once_t *__once_control,
5905 void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2)));
5906 # 475 "/usr/include/pthread.h" 3 4
5907 extern int pthread_setcancelstate (int __state, int *__oldstate);
5908
5909
5910
5911 extern int pthread_setcanceltype (int __type, int *__oldtype);
5912
5913
5914 extern int pthread_cancel (pthread_t __th);
5915
5916
5917
5918
5919 extern void pthread_testcancel (void);
5920
5921
5922
5923
5924 typedef struct
5925 {
5926 struct
5927 {
5928 __jmp_buf __cancel_jmp_buf;
5929 int __mask_was_saved;
5930 } __cancel_jmp_buf[1];
5931 void *__pad[4];
5932 } __pthread_unwind_buf_t __attribute__ ((__aligned__));
5933 # 509 "/usr/include/pthread.h" 3 4
5934 struct __pthread_cleanup_frame
5935 {
5936 void (*__cancel_routine) (void *);
5937 void *__cancel_arg;
5938 int __do_it;
5939 int __cancel_type;
5940 };
5941
5942
5943
5944
5945 class __pthread_cleanup_class
5946 {
5947 void (*__cancel_routine) (void *);
5948 void *__cancel_arg;
5949 int __do_it;
5950 int __cancel_type;
5951
5952 public:
5953 __pthread_cleanup_class (void (*__fct) (void *), void *__arg)
5954 : __cancel_routine (__fct), __cancel_arg (__arg), __do_it (1) { }
5955 ~__pthread_cleanup_class () { if (__do_it) __cancel_routine (__cancel_arg); }
5956 void __setdoit (int __newval) { __do_it = __newval; }
5957 void __defer () { pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED,
5958 &__cancel_type); }
5959 void __restore () const { pthread_setcanceltype (__cancel_type, 0); }
5960 };
5961 # 709 "/usr/include/pthread.h" 3 4
5962 struct __jmp_buf_tag;
5963 extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) throw ();
5964
5965
5966
5967
5968
5969 extern int pthread_mutex_init (pthread_mutex_t *__mutex,
5970 __const pthread_mutexattr_t *__mutexattr)
5971 throw () __attribute__ ((__nonnull__ (1)));
5972
5973
5974 extern int pthread_mutex_destroy (pthread_mutex_t *__mutex)
5975 throw () __attribute__ ((__nonnull__ (1)));
5976
5977
5978 extern int pthread_mutex_trylock (pthread_mutex_t *__mutex)
5979 throw () __attribute__ ((__nonnull__ (1)));
5980
5981
5982 extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
5983 throw () __attribute__ ((__nonnull__ (1)));
5984
5985
5986
5987 extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
5988 __const struct timespec *__restrict
5989 __abstime) throw () __attribute__ ((__nonnull__ (1, 2)));
5990
5991
5992
5993 extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
5994 throw () __attribute__ ((__nonnull__ (1)));
5995
5996
5997
5998
5999 extern int pthread_mutex_getprioceiling (__const pthread_mutex_t *
6000 __restrict __mutex,
6001 int *__restrict __prioceiling)
6002 throw () __attribute__ ((__nonnull__ (1, 2)));
6003
6004
6005
6006 extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
6007 int __prioceiling,
6008 int *__restrict __old_ceiling)
6009 throw () __attribute__ ((__nonnull__ (1, 3)));
6010
6011
6012
6013
6014
6015 extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex)
6016 throw () __attribute__ ((__nonnull__ (1)));
6017
6018
6019
6020
6021
6022
6023
6024 extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr)
6025 throw () __attribute__ ((__nonnull__ (1)));
6026
6027
6028 extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr)
6029 throw () __attribute__ ((__nonnull__ (1)));
6030
6031
6032 extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *
6033 __restrict __attr,
6034 int *__restrict __pshared)
6035 throw () __attribute__ ((__nonnull__ (1, 2)));
6036
6037
6038 extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
6039 int __pshared)
6040 throw () __attribute__ ((__nonnull__ (1)));
6041
6042
6043
6044 extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict
6045 __attr, int *__restrict __kind)
6046 throw () __attribute__ ((__nonnull__ (1, 2)));
6047
6048
6049
6050
6051 extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
6052 throw () __attribute__ ((__nonnull__ (1)));
6053
6054
6055 extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t *
6056 __restrict __attr,
6057 int *__restrict __protocol)
6058 throw () __attribute__ ((__nonnull__ (1, 2)));
6059
6060
6061
6062 extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,
6063 int __protocol)
6064 throw () __attribute__ ((__nonnull__ (1)));
6065
6066
6067 extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t *
6068 __restrict __attr,
6069 int *__restrict __prioceiling)
6070 throw () __attribute__ ((__nonnull__ (1, 2)));
6071
6072
6073 extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,
6074 int __prioceiling)
6075 throw () __attribute__ ((__nonnull__ (1)));
6076
6077
6078
6079
6080 extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr,
6081 int *__robustness)
6082 throw () __attribute__ ((__nonnull__ (1, 2)));
6083
6084
6085 extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr,
6086 int __robustness)
6087 throw () __attribute__ ((__nonnull__ (1)));
6088 # 843 "/usr/include/pthread.h" 3 4
6089 extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
6090 __const pthread_rwlockattr_t *__restrict
6091 __attr) throw () __attribute__ ((__nonnull__ (1)));
6092
6093
6094 extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
6095 throw () __attribute__ ((__nonnull__ (1)));
6096
6097
6098 extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock)
6099 throw () __attribute__ ((__nonnull__ (1)));
6100
6101
6102 extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
6103 throw () __attribute__ ((__nonnull__ (1)));
6104
6105
6106
6107 extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
6108 __const struct timespec *__restrict
6109 __abstime) throw () __attribute__ ((__nonnull__ (1, 2)));
6110
6111
6112
6113 extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)
6114 throw () __attribute__ ((__nonnull__ (1)));
6115
6116
6117 extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
6118 throw () __attribute__ ((__nonnull__ (1)));
6119
6120
6121
6122 extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
6123 __const struct timespec *__restrict
6124 __abstime) throw () __attribute__ ((__nonnull__ (1, 2)));
6125
6126
6127
6128 extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)
6129 throw () __attribute__ ((__nonnull__ (1)));
6130
6131
6132
6133
6134
6135 extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr)
6136 throw () __attribute__ ((__nonnull__ (1)));
6137
6138
6139 extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr)
6140 throw () __attribute__ ((__nonnull__ (1)));
6141
6142
6143 extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *
6144 __restrict __attr,
6145 int *__restrict __pshared)
6146 throw () __attribute__ ((__nonnull__ (1, 2)));
6147
6148
6149 extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
6150 int __pshared)
6151 throw () __attribute__ ((__nonnull__ (1)));
6152
6153
6154 extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t *
6155 __restrict __attr,
6156 int *__restrict __pref)
6157 throw () __attribute__ ((__nonnull__ (1, 2)));
6158
6159
6160 extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,
6161 int __pref) throw () __attribute__ ((__nonnull__ (1)));
6162
6163
6164
6165
6166
6167
6168
6169 extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
6170 __const pthread_condattr_t *__restrict
6171 __cond_attr) throw () __attribute__ ((__nonnull__ (1)));
6172
6173
6174 extern int pthread_cond_destroy (pthread_cond_t *__cond)
6175 throw () __attribute__ ((__nonnull__ (1)));
6176
6177
6178 extern int pthread_cond_signal (pthread_cond_t *__cond)
6179 throw () __attribute__ ((__nonnull__ (1)));
6180
6181
6182 extern int pthread_cond_broadcast (pthread_cond_t *__cond)
6183 throw () __attribute__ ((__nonnull__ (1)));
6184
6185
6186
6187
6188
6189
6190 extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
6191 pthread_mutex_t *__restrict __mutex)
6192 __attribute__ ((__nonnull__ (1, 2)));
6193 # 955 "/usr/include/pthread.h" 3 4
6194 extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
6195 pthread_mutex_t *__restrict __mutex,
6196 __const struct timespec *__restrict
6197 __abstime) __attribute__ ((__nonnull__ (1, 2, 3)));
6198
6199
6200
6201
6202 extern int pthread_condattr_init (pthread_condattr_t *__attr)
6203 throw () __attribute__ ((__nonnull__ (1)));
6204
6205
6206 extern int pthread_condattr_destroy (pthread_condattr_t *__attr)
6207 throw () __attribute__ ((__nonnull__ (1)));
6208
6209
6210 extern int pthread_condattr_getpshared (__const pthread_condattr_t *
6211 __restrict __attr,
6212 int *__restrict __pshared)
6213 throw () __attribute__ ((__nonnull__ (1, 2)));
6214
6215
6216 extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
6217 int __pshared) throw () __attribute__ ((__nonnull__ (1)));
6218
6219
6220
6221 extern int pthread_condattr_getclock (__const pthread_condattr_t *
6222 __restrict __attr,
6223 __clockid_t *__restrict __clock_id)
6224 throw () __attribute__ ((__nonnull__ (1, 2)));
6225
6226
6227 extern int pthread_condattr_setclock (pthread_condattr_t *__attr,
6228 __clockid_t __clock_id)
6229 throw () __attribute__ ((__nonnull__ (1)));
6230 # 999 "/usr/include/pthread.h" 3 4
6231 extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
6232 throw () __attribute__ ((__nonnull__ (1)));
6233
6234
6235 extern int pthread_spin_destroy (pthread_spinlock_t *__lock)
6236 throw () __attribute__ ((__nonnull__ (1)));
6237
6238
6239 extern int pthread_spin_lock (pthread_spinlock_t *__lock)
6240 throw () __attribute__ ((__nonnull__ (1)));
6241
6242
6243 extern int pthread_spin_trylock (pthread_spinlock_t *__lock)
6244 throw () __attribute__ ((__nonnull__ (1)));
6245
6246
6247 extern int pthread_spin_unlock (pthread_spinlock_t *__lock)
6248 throw () __attribute__ ((__nonnull__ (1)));
6249
6250
6251
6252
6253
6254
6255 extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
6256 __const pthread_barrierattr_t *__restrict
6257 __attr, unsigned int __count)
6258 throw () __attribute__ ((__nonnull__ (1)));
6259
6260
6261 extern int pthread_barrier_destroy (pthread_barrier_t *__barrier)
6262 throw () __attribute__ ((__nonnull__ (1)));
6263
6264
6265 extern int pthread_barrier_wait (pthread_barrier_t *__barrier)
6266 throw () __attribute__ ((__nonnull__ (1)));
6267
6268
6269
6270 extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr)
6271 throw () __attribute__ ((__nonnull__ (1)));
6272
6273
6274 extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr)
6275 throw () __attribute__ ((__nonnull__ (1)));
6276
6277
6278 extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
6279 __restrict __attr,
6280 int *__restrict __pshared)
6281 throw () __attribute__ ((__nonnull__ (1, 2)));
6282
6283
6284 extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
6285 int __pshared)
6286 throw () __attribute__ ((__nonnull__ (1)));
6287 # 1066 "/usr/include/pthread.h" 3 4
6288 extern int pthread_key_create (pthread_key_t *__key,
6289 void (*__destr_function) (void *))
6290 throw () __attribute__ ((__nonnull__ (1)));
6291
6292
6293 extern int pthread_key_delete (pthread_key_t __key) throw ();
6294
6295
6296 extern void *pthread_getspecific (pthread_key_t __key) throw ();
6297
6298
6299 extern int pthread_setspecific (pthread_key_t __key,
6300 __const void *__pointer) throw () ;
6301
6302
6303
6304
6305 extern int pthread_getcpuclockid (pthread_t __thread_id,
6306 __clockid_t *__clock_id)
6307 throw () __attribute__ ((__nonnull__ (2)));
6308 # 1100 "/usr/include/pthread.h" 3 4
6309 extern int pthread_atfork (void (*__prepare) (void),
6310 void (*__parent) (void),
6311 void (*__child) (void)) throw ();
6312
6313
6314
6315
6316 extern __inline int
6317 pthread_equal (pthread_t __thread1, pthread_t __thread2) throw ()
6318 {
6319 return __thread1 == __thread2;
6320 }
6321
6322
6323 }
6324 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr-default.h" 2 3
6325 # 1 "/usr/include/unistd.h" 1 3 4
6326 # 28 "/usr/include/unistd.h" 3 4
6327 extern "C" {
6328 # 173 "/usr/include/unistd.h" 3 4
6329 # 1 "/usr/include/bits/posix_opt.h" 1 3 4
6330 # 174 "/usr/include/unistd.h" 2 3 4
6331
6332
6333
6334 # 1 "/usr/include/bits/environments.h" 1 3 4
6335 # 23 "/usr/include/bits/environments.h" 3 4
6336 # 1 "/usr/include/bits/wordsize.h" 1 3 4
6337 # 24 "/usr/include/bits/environments.h" 2 3 4
6338 # 178 "/usr/include/unistd.h" 2 3 4
6339 # 197 "/usr/include/unistd.h" 3 4
6340 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4
6341 # 198 "/usr/include/unistd.h" 2 3 4
6342 # 238 "/usr/include/unistd.h" 3 4
6343 typedef __intptr_t intptr_t;
6344
6345
6346
6347
6348
6349
6350 typedef __socklen_t socklen_t;
6351 # 258 "/usr/include/unistd.h" 3 4
6352 extern int access (__const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1)));
6353
6354
6355
6356
6357 extern int euidaccess (__const char *__name, int __type)
6358 throw () __attribute__ ((__nonnull__ (1)));
6359
6360
6361 extern int eaccess (__const char *__name, int __type)
6362 throw () __attribute__ ((__nonnull__ (1)));
6363
6364
6365
6366
6367
6368
6369 extern int faccessat (int __fd, __const char *__file, int __type, int __flag)
6370 throw () __attribute__ ((__nonnull__ (2))) ;
6371 # 304 "/usr/include/unistd.h" 3 4
6372 extern __off64_t lseek (int __fd, __off64_t __offset, int __whence) throw () __asm__ ("" "lseek64");
6373
6374
6375
6376
6377
6378
6379
6380 extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)
6381 throw ();
6382
6383
6384
6385
6386
6387
6388 extern int close (int __fd);
6389
6390
6391
6392
6393
6394
6395 extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ;
6396
6397
6398
6399
6400
6401 extern ssize_t write (int __fd, __const void *__buf, size_t __n) ;
6402 # 355 "/usr/include/unistd.h" 3 4
6403 extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64") ;
6404
6405
6406 extern ssize_t pwrite (int __fd, __const void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pwrite64") ;
6407 # 371 "/usr/include/unistd.h" 3 4
6408 extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes,
6409 __off64_t __offset) ;
6410
6411
6412 extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n,
6413 __off64_t __offset) ;
6414
6415
6416
6417
6418
6419
6420
6421 extern int pipe (int __pipedes[2]) throw () ;
6422 # 393 "/usr/include/unistd.h" 3 4
6423 extern unsigned int alarm (unsigned int __seconds) throw ();
6424 # 405 "/usr/include/unistd.h" 3 4
6425 extern unsigned int sleep (unsigned int __seconds);
6426
6427
6428
6429
6430
6431
6432 extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
6433 throw ();
6434
6435
6436
6437
6438
6439
6440 extern int usleep (__useconds_t __useconds);
6441 # 429 "/usr/include/unistd.h" 3 4
6442 extern int pause (void);
6443
6444
6445
6446 extern int chown (__const char *__file, __uid_t __owner, __gid_t __group)
6447 throw () __attribute__ ((__nonnull__ (1))) ;
6448
6449
6450
6451 extern int fchown (int __fd, __uid_t __owner, __gid_t __group) throw () ;
6452
6453
6454
6455
6456 extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group)
6457 throw () __attribute__ ((__nonnull__ (1))) ;
6458
6459
6460
6461
6462
6463
6464 extern int fchownat (int __fd, __const char *__file, __uid_t __owner,
6465 __gid_t __group, int __flag)
6466 throw () __attribute__ ((__nonnull__ (2))) ;
6467
6468
6469
6470 extern int chdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) ;
6471
6472
6473
6474 extern int fchdir (int __fd) throw () ;
6475 # 471 "/usr/include/unistd.h" 3 4
6476 extern char *getcwd (char *__buf, size_t __size) throw () ;
6477
6478
6479
6480
6481
6482 extern char *get_current_dir_name (void) throw ();
6483
6484
6485
6486
6487
6488
6489 extern char *getwd (char *__buf)
6490 throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) ;
6491
6492
6493
6494
6495 extern int dup (int __fd) throw () ;
6496
6497
6498 extern int dup2 (int __fd, int __fd2) throw ();
6499
6500
6501 extern char **__environ;
6502
6503 extern char **environ;
6504
6505
6506
6507
6508
6509 extern int execve (__const char *__path, char *__const __argv[],
6510 char *__const __envp[]) throw () __attribute__ ((__nonnull__ (1)));
6511
6512
6513
6514
6515 extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[])
6516 throw ();
6517
6518
6519
6520
6521 extern int execv (__const char *__path, char *__const __argv[])
6522 throw () __attribute__ ((__nonnull__ (1)));
6523
6524
6525
6526 extern int execle (__const char *__path, __const char *__arg, ...)
6527 throw () __attribute__ ((__nonnull__ (1)));
6528
6529
6530
6531 extern int execl (__const char *__path, __const char *__arg, ...)
6532 throw () __attribute__ ((__nonnull__ (1)));
6533
6534
6535
6536 extern int execvp (__const char *__file, char *__const __argv[])
6537 throw () __attribute__ ((__nonnull__ (1)));
6538
6539
6540
6541
6542 extern int execlp (__const char *__file, __const char *__arg, ...)
6543 throw () __attribute__ ((__nonnull__ (1)));
6544
6545
6546
6547
6548 extern int nice (int __inc) throw () ;
6549
6550
6551
6552
6553 extern void _exit (int __status) __attribute__ ((__noreturn__));
6554
6555
6556
6557
6558
6559 # 1 "/usr/include/bits/confname.h" 1 3 4
6560 # 26 "/usr/include/bits/confname.h" 3 4
6561 enum
6562 {
6563 _PC_LINK_MAX,
6564
6565 _PC_MAX_CANON,
6566
6567 _PC_MAX_INPUT,
6568
6569 _PC_NAME_MAX,
6570
6571 _PC_PATH_MAX,
6572
6573 _PC_PIPE_BUF,
6574
6575 _PC_CHOWN_RESTRICTED,
6576
6577 _PC_NO_TRUNC,
6578
6579 _PC_VDISABLE,
6580
6581 _PC_SYNC_IO,
6582
6583 _PC_ASYNC_IO,
6584
6585 _PC_PRIO_IO,
6586
6587 _PC_SOCK_MAXBUF,
6588
6589 _PC_FILESIZEBITS,
6590
6591 _PC_REC_INCR_XFER_SIZE,
6592
6593 _PC_REC_MAX_XFER_SIZE,
6594
6595 _PC_REC_MIN_XFER_SIZE,
6596
6597 _PC_REC_XFER_ALIGN,
6598
6599 _PC_ALLOC_SIZE_MIN,
6600
6601 _PC_SYMLINK_MAX,
6602
6603 _PC_2_SYMLINKS
6604
6605 };
6606
6607
6608 enum
6609 {
6610 _SC_ARG_MAX,
6611
6612 _SC_CHILD_MAX,
6613
6614 _SC_CLK_TCK,
6615
6616 _SC_NGROUPS_MAX,
6617
6618 _SC_OPEN_MAX,
6619
6620 _SC_STREAM_MAX,
6621
6622 _SC_TZNAME_MAX,
6623
6624 _SC_JOB_CONTROL,
6625
6626 _SC_SAVED_IDS,
6627
6628 _SC_REALTIME_SIGNALS,
6629
6630 _SC_PRIORITY_SCHEDULING,
6631
6632 _SC_TIMERS,
6633
6634 _SC_ASYNCHRONOUS_IO,
6635
6636 _SC_PRIORITIZED_IO,
6637
6638 _SC_SYNCHRONIZED_IO,
6639
6640 _SC_FSYNC,
6641
6642 _SC_MAPPED_FILES,
6643
6644 _SC_MEMLOCK,
6645
6646 _SC_MEMLOCK_RANGE,
6647
6648 _SC_MEMORY_PROTECTION,
6649
6650 _SC_MESSAGE_PASSING,
6651
6652 _SC_SEMAPHORES,
6653
6654 _SC_SHARED_MEMORY_OBJECTS,
6655
6656 _SC_AIO_LISTIO_MAX,
6657
6658 _SC_AIO_MAX,
6659
6660 _SC_AIO_PRIO_DELTA_MAX,
6661
6662 _SC_DELAYTIMER_MAX,
6663
6664 _SC_MQ_OPEN_MAX,
6665
6666 _SC_MQ_PRIO_MAX,
6667
6668 _SC_VERSION,
6669
6670 _SC_PAGESIZE,
6671
6672
6673 _SC_RTSIG_MAX,
6674
6675 _SC_SEM_NSEMS_MAX,
6676
6677 _SC_SEM_VALUE_MAX,
6678
6679 _SC_SIGQUEUE_MAX,
6680
6681 _SC_TIMER_MAX,
6682
6683
6684
6685
6686 _SC_BC_BASE_MAX,
6687
6688 _SC_BC_DIM_MAX,
6689
6690 _SC_BC_SCALE_MAX,
6691
6692 _SC_BC_STRING_MAX,
6693
6694 _SC_COLL_WEIGHTS_MAX,
6695
6696 _SC_EQUIV_CLASS_MAX,
6697
6698 _SC_EXPR_NEST_MAX,
6699
6700 _SC_LINE_MAX,
6701
6702 _SC_RE_DUP_MAX,
6703
6704 _SC_CHARCLASS_NAME_MAX,
6705
6706
6707 _SC_2_VERSION,
6708
6709 _SC_2_C_BIND,
6710
6711 _SC_2_C_DEV,
6712
6713 _SC_2_FORT_DEV,
6714
6715 _SC_2_FORT_RUN,
6716
6717 _SC_2_SW_DEV,
6718
6719 _SC_2_LOCALEDEF,
6720
6721
6722 _SC_PII,
6723
6724 _SC_PII_XTI,
6725
6726 _SC_PII_SOCKET,
6727
6728 _SC_PII_INTERNET,
6729
6730 _SC_PII_OSI,
6731
6732 _SC_POLL,
6733
6734 _SC_SELECT,
6735
6736 _SC_UIO_MAXIOV,
6737
6738 _SC_IOV_MAX = _SC_UIO_MAXIOV,
6739
6740 _SC_PII_INTERNET_STREAM,
6741
6742 _SC_PII_INTERNET_DGRAM,
6743
6744 _SC_PII_OSI_COTS,
6745
6746 _SC_PII_OSI_CLTS,
6747
6748 _SC_PII_OSI_M,
6749
6750 _SC_T_IOV_MAX,
6751
6752
6753
6754 _SC_THREADS,
6755
6756 _SC_THREAD_SAFE_FUNCTIONS,
6757
6758 _SC_GETGR_R_SIZE_MAX,
6759
6760 _SC_GETPW_R_SIZE_MAX,
6761
6762 _SC_LOGIN_NAME_MAX,
6763
6764 _SC_TTY_NAME_MAX,
6765
6766 _SC_THREAD_DESTRUCTOR_ITERATIONS,
6767
6768 _SC_THREAD_KEYS_MAX,
6769
6770 _SC_THREAD_STACK_MIN,
6771
6772 _SC_THREAD_THREADS_MAX,
6773
6774 _SC_THREAD_ATTR_STACKADDR,
6775
6776 _SC_THREAD_ATTR_STACKSIZE,
6777
6778 _SC_THREAD_PRIORITY_SCHEDULING,
6779
6780 _SC_THREAD_PRIO_INHERIT,
6781
6782 _SC_THREAD_PRIO_PROTECT,
6783
6784 _SC_THREAD_PROCESS_SHARED,
6785
6786
6787 _SC_NPROCESSORS_CONF,
6788
6789 _SC_NPROCESSORS_ONLN,
6790
6791 _SC_PHYS_PAGES,
6792
6793 _SC_AVPHYS_PAGES,
6794
6795 _SC_ATEXIT_MAX,
6796
6797 _SC_PASS_MAX,
6798
6799
6800 _SC_XOPEN_VERSION,
6801
6802 _SC_XOPEN_XCU_VERSION,
6803
6804 _SC_XOPEN_UNIX,
6805
6806 _SC_XOPEN_CRYPT,
6807
6808 _SC_XOPEN_ENH_I18N,
6809
6810 _SC_XOPEN_SHM,
6811
6812
6813 _SC_2_CHAR_TERM,
6814
6815 _SC_2_C_VERSION,
6816
6817 _SC_2_UPE,
6818
6819
6820 _SC_XOPEN_XPG2,
6821
6822 _SC_XOPEN_XPG3,
6823
6824 _SC_XOPEN_XPG4,
6825
6826
6827 _SC_CHAR_BIT,
6828
6829 _SC_CHAR_MAX,
6830
6831 _SC_CHAR_MIN,
6832
6833 _SC_INT_MAX,
6834
6835 _SC_INT_MIN,
6836
6837 _SC_LONG_BIT,
6838
6839 _SC_WORD_BIT,
6840
6841 _SC_MB_LEN_MAX,
6842
6843 _SC_NZERO,
6844
6845 _SC_SSIZE_MAX,
6846
6847 _SC_SCHAR_MAX,
6848
6849 _SC_SCHAR_MIN,
6850
6851 _SC_SHRT_MAX,
6852
6853 _SC_SHRT_MIN,
6854
6855 _SC_UCHAR_MAX,
6856
6857 _SC_UINT_MAX,
6858
6859 _SC_ULONG_MAX,
6860
6861 _SC_USHRT_MAX,
6862
6863
6864 _SC_NL_ARGMAX,
6865
6866 _SC_NL_LANGMAX,
6867
6868 _SC_NL_MSGMAX,
6869
6870 _SC_NL_NMAX,
6871
6872 _SC_NL_SETMAX,
6873
6874 _SC_NL_TEXTMAX,
6875
6876
6877 _SC_XBS5_ILP32_OFF32,
6878
6879 _SC_XBS5_ILP32_OFFBIG,
6880
6881 _SC_XBS5_LP64_OFF64,
6882
6883 _SC_XBS5_LPBIG_OFFBIG,
6884
6885
6886 _SC_XOPEN_LEGACY,
6887
6888 _SC_XOPEN_REALTIME,
6889
6890 _SC_XOPEN_REALTIME_THREADS,
6891
6892
6893 _SC_ADVISORY_INFO,
6894
6895 _SC_BARRIERS,
6896
6897 _SC_BASE,
6898
6899 _SC_C_LANG_SUPPORT,
6900
6901 _SC_C_LANG_SUPPORT_R,
6902
6903 _SC_CLOCK_SELECTION,
6904
6905 _SC_CPUTIME,
6906
6907 _SC_THREAD_CPUTIME,
6908
6909 _SC_DEVICE_IO,
6910
6911 _SC_DEVICE_SPECIFIC,
6912
6913 _SC_DEVICE_SPECIFIC_R,
6914
6915 _SC_FD_MGMT,
6916
6917 _SC_FIFO,
6918
6919 _SC_PIPE,
6920
6921 _SC_FILE_ATTRIBUTES,
6922
6923 _SC_FILE_LOCKING,
6924
6925 _SC_FILE_SYSTEM,
6926
6927 _SC_MONOTONIC_CLOCK,
6928
6929 _SC_MULTI_PROCESS,
6930
6931 _SC_SINGLE_PROCESS,
6932
6933 _SC_NETWORKING,
6934
6935 _SC_READER_WRITER_LOCKS,
6936
6937 _SC_SPIN_LOCKS,
6938
6939 _SC_REGEXP,
6940
6941 _SC_REGEX_VERSION,
6942
6943 _SC_SHELL,
6944
6945 _SC_SIGNALS,
6946
6947 _SC_SPAWN,
6948
6949 _SC_SPORADIC_SERVER,
6950
6951 _SC_THREAD_SPORADIC_SERVER,
6952
6953 _SC_SYSTEM_DATABASE,
6954
6955 _SC_SYSTEM_DATABASE_R,
6956
6957 _SC_TIMEOUTS,
6958
6959 _SC_TYPED_MEMORY_OBJECTS,
6960
6961 _SC_USER_GROUPS,
6962
6963 _SC_USER_GROUPS_R,
6964
6965 _SC_2_PBS,
6966
6967 _SC_2_PBS_ACCOUNTING,
6968
6969 _SC_2_PBS_LOCATE,
6970
6971 _SC_2_PBS_MESSAGE,
6972
6973 _SC_2_PBS_TRACK,
6974
6975 _SC_SYMLOOP_MAX,
6976
6977 _SC_STREAMS,
6978
6979 _SC_2_PBS_CHECKPOINT,
6980
6981
6982 _SC_V6_ILP32_OFF32,
6983
6984 _SC_V6_ILP32_OFFBIG,
6985
6986 _SC_V6_LP64_OFF64,
6987
6988 _SC_V6_LPBIG_OFFBIG,
6989
6990
6991 _SC_HOST_NAME_MAX,
6992
6993 _SC_TRACE,
6994
6995 _SC_TRACE_EVENT_FILTER,
6996
6997 _SC_TRACE_INHERIT,
6998
6999 _SC_TRACE_LOG,
7000
7001
7002 _SC_LEVEL1_ICACHE_SIZE,
7003
7004 _SC_LEVEL1_ICACHE_ASSOC,
7005
7006 _SC_LEVEL1_ICACHE_LINESIZE,
7007
7008 _SC_LEVEL1_DCACHE_SIZE,
7009
7010 _SC_LEVEL1_DCACHE_ASSOC,
7011
7012 _SC_LEVEL1_DCACHE_LINESIZE,
7013
7014 _SC_LEVEL2_CACHE_SIZE,
7015
7016 _SC_LEVEL2_CACHE_ASSOC,
7017
7018 _SC_LEVEL2_CACHE_LINESIZE,
7019
7020 _SC_LEVEL3_CACHE_SIZE,
7021
7022 _SC_LEVEL3_CACHE_ASSOC,
7023
7024 _SC_LEVEL3_CACHE_LINESIZE,
7025
7026 _SC_LEVEL4_CACHE_SIZE,
7027
7028 _SC_LEVEL4_CACHE_ASSOC,
7029
7030 _SC_LEVEL4_CACHE_LINESIZE,
7031
7032
7033
7034 _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,
7035
7036 _SC_RAW_SOCKETS
7037
7038 };
7039
7040
7041 enum
7042 {
7043 _CS_PATH,
7044
7045
7046 _CS_V6_WIDTH_RESTRICTED_ENVS,
7047
7048
7049 _CS_GNU_LIBC_VERSION,
7050
7051 _CS_GNU_LIBPTHREAD_VERSION,
7052
7053
7054 _CS_LFS_CFLAGS = 1000,
7055
7056 _CS_LFS_LDFLAGS,
7057
7058 _CS_LFS_LIBS,
7059
7060 _CS_LFS_LINTFLAGS,
7061
7062 _CS_LFS64_CFLAGS,
7063
7064 _CS_LFS64_LDFLAGS,
7065
7066 _CS_LFS64_LIBS,
7067
7068 _CS_LFS64_LINTFLAGS,
7069
7070
7071 _CS_XBS5_ILP32_OFF32_CFLAGS = 1100,
7072
7073 _CS_XBS5_ILP32_OFF32_LDFLAGS,
7074
7075 _CS_XBS5_ILP32_OFF32_LIBS,
7076
7077 _CS_XBS5_ILP32_OFF32_LINTFLAGS,
7078
7079 _CS_XBS5_ILP32_OFFBIG_CFLAGS,
7080
7081 _CS_XBS5_ILP32_OFFBIG_LDFLAGS,
7082
7083 _CS_XBS5_ILP32_OFFBIG_LIBS,
7084
7085 _CS_XBS5_ILP32_OFFBIG_LINTFLAGS,
7086
7087 _CS_XBS5_LP64_OFF64_CFLAGS,
7088
7089 _CS_XBS5_LP64_OFF64_LDFLAGS,
7090
7091 _CS_XBS5_LP64_OFF64_LIBS,
7092
7093 _CS_XBS5_LP64_OFF64_LINTFLAGS,
7094
7095 _CS_XBS5_LPBIG_OFFBIG_CFLAGS,
7096
7097 _CS_XBS5_LPBIG_OFFBIG_LDFLAGS,
7098
7099 _CS_XBS5_LPBIG_OFFBIG_LIBS,
7100
7101 _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS,
7102
7103
7104 _CS_POSIX_V6_ILP32_OFF32_CFLAGS,
7105
7106 _CS_POSIX_V6_ILP32_OFF32_LDFLAGS,
7107
7108 _CS_POSIX_V6_ILP32_OFF32_LIBS,
7109
7110 _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS,
7111
7112 _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,
7113
7114 _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,
7115
7116 _CS_POSIX_V6_ILP32_OFFBIG_LIBS,
7117
7118 _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS,
7119
7120 _CS_POSIX_V6_LP64_OFF64_CFLAGS,
7121
7122 _CS_POSIX_V6_LP64_OFF64_LDFLAGS,
7123
7124 _CS_POSIX_V6_LP64_OFF64_LIBS,
7125
7126 _CS_POSIX_V6_LP64_OFF64_LINTFLAGS,
7127
7128 _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,
7129
7130 _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,
7131
7132 _CS_POSIX_V6_LPBIG_OFFBIG_LIBS,
7133
7134 _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
7135
7136 };
7137 # 555 "/usr/include/unistd.h" 2 3 4
7138
7139
7140 extern long int pathconf (__const char *__path, int __name)
7141 throw () __attribute__ ((__nonnull__ (1)));
7142
7143
7144 extern long int fpathconf (int __fd, int __name) throw ();
7145
7146
7147 extern long int sysconf (int __name) throw ();
7148
7149
7150
7151 extern size_t confstr (int __name, char *__buf, size_t __len) throw ();
7152
7153
7154
7155
7156 extern __pid_t getpid (void) throw ();
7157
7158
7159 extern __pid_t getppid (void) throw ();
7160
7161
7162
7163
7164 extern __pid_t getpgrp (void) throw ();
7165 # 591 "/usr/include/unistd.h" 3 4
7166 extern __pid_t __getpgid (__pid_t __pid) throw ();
7167
7168 extern __pid_t getpgid (__pid_t __pid) throw ();
7169
7170
7171
7172
7173
7174
7175 extern int setpgid (__pid_t __pid, __pid_t __pgid) throw ();
7176 # 617 "/usr/include/unistd.h" 3 4
7177 extern int setpgrp (void) throw ();
7178 # 634 "/usr/include/unistd.h" 3 4
7179 extern __pid_t setsid (void) throw ();
7180
7181
7182
7183 extern __pid_t getsid (__pid_t __pid) throw ();
7184
7185
7186
7187 extern __uid_t getuid (void) throw ();
7188
7189
7190 extern __uid_t geteuid (void) throw ();
7191
7192
7193 extern __gid_t getgid (void) throw ();
7194
7195
7196 extern __gid_t getegid (void) throw ();
7197
7198
7199
7200
7201 extern int getgroups (int __size, __gid_t __list[]) throw () ;
7202
7203
7204
7205 extern int group_member (__gid_t __gid) throw ();
7206
7207
7208
7209
7210
7211
7212 extern int setuid (__uid_t __uid) throw ();
7213
7214
7215
7216
7217 extern int setreuid (__uid_t __ruid, __uid_t __euid) throw ();
7218
7219
7220
7221
7222 extern int seteuid (__uid_t __uid) throw ();
7223
7224
7225
7226
7227
7228
7229 extern int setgid (__gid_t __gid) throw ();
7230
7231
7232
7233
7234 extern int setregid (__gid_t __rgid, __gid_t __egid) throw ();
7235
7236
7237
7238
7239 extern int setegid (__gid_t __gid) throw ();
7240
7241
7242
7243
7244
7245 extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid)
7246 throw ();
7247
7248
7249
7250 extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid)
7251 throw ();
7252
7253
7254
7255 extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid)
7256 throw ();
7257
7258
7259
7260 extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid)
7261 throw ();
7262
7263
7264
7265
7266
7267
7268 extern __pid_t fork (void) throw ();
7269
7270
7271
7272
7273
7274
7275 extern __pid_t vfork (void) throw ();
7276
7277
7278
7279
7280
7281 extern char *ttyname (int __fd) throw ();
7282
7283
7284
7285 extern int ttyname_r (int __fd, char *__buf, size_t __buflen)
7286 throw () __attribute__ ((__nonnull__ (2))) ;
7287
7288
7289
7290 extern int isatty (int __fd) throw ();
7291
7292
7293
7294
7295
7296 extern int ttyslot (void) throw ();
7297
7298
7299
7300
7301 extern int link (__const char *__from, __const char *__to)
7302 throw () __attribute__ ((__nonnull__ (1, 2))) ;
7303
7304
7305
7306
7307 extern int linkat (int __fromfd, __const char *__from, int __tofd,
7308 __const char *__to, int __flags)
7309 throw () __attribute__ ((__nonnull__ (2, 4))) ;
7310
7311
7312
7313
7314 extern int symlink (__const char *__from, __const char *__to)
7315 throw () __attribute__ ((__nonnull__ (1, 2))) ;
7316
7317
7318
7319
7320 extern ssize_t readlink (__const char *__restrict __path,
7321 char *__restrict __buf, size_t __len)
7322 throw () __attribute__ ((__nonnull__ (1, 2))) ;
7323
7324
7325
7326
7327 extern int symlinkat (__const char *__from, int __tofd,
7328 __const char *__to) throw () __attribute__ ((__nonnull__ (1, 3))) ;
7329
7330
7331 extern ssize_t readlinkat (int __fd, __const char *__restrict __path,
7332 char *__restrict __buf, size_t __len)
7333 throw () __attribute__ ((__nonnull__ (2, 3))) ;
7334
7335
7336
7337 extern int unlink (__const char *__name) throw () __attribute__ ((__nonnull__ (1)));
7338
7339
7340
7341 extern int unlinkat (int __fd, __const char *__name, int __flag)
7342 throw () __attribute__ ((__nonnull__ (2)));
7343
7344
7345
7346 extern int rmdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1)));
7347
7348
7349
7350 extern __pid_t tcgetpgrp (int __fd) throw ();
7351
7352
7353 extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) throw ();
7354
7355
7356
7357
7358
7359
7360 extern char *getlogin (void);
7361
7362
7363
7364
7365
7366
7367
7368 extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1)));
7369
7370
7371
7372
7373 extern int setlogin (__const char *__name) throw () __attribute__ ((__nonnull__ (1)));
7374 # 837 "/usr/include/unistd.h" 3 4
7375 # 1 "/usr/include/getopt.h" 1 3 4
7376 # 50 "/usr/include/getopt.h" 3 4
7377 extern "C" {
7378 # 59 "/usr/include/getopt.h" 3 4
7379 extern char *optarg;
7380 # 73 "/usr/include/getopt.h" 3 4
7381 extern int optind;
7382
7383
7384
7385
7386 extern int opterr;
7387
7388
7389
7390 extern int optopt;
7391 # 152 "/usr/include/getopt.h" 3 4
7392 extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
7393 throw ();
7394 # 171 "/usr/include/getopt.h" 3 4
7395 }
7396 # 838 "/usr/include/unistd.h" 2 3 4
7397
7398
7399
7400
7401
7402
7403
7404 extern int gethostname (char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1)));
7405
7406
7407
7408
7409
7410
7411 extern int sethostname (__const char *__name, size_t __len)
7412 throw () __attribute__ ((__nonnull__ (1))) ;
7413
7414
7415
7416 extern int sethostid (long int __id) throw () ;
7417
7418
7419
7420
7421
7422 extern int getdomainname (char *__name, size_t __len)
7423 throw () __attribute__ ((__nonnull__ (1))) ;
7424 extern int setdomainname (__const char *__name, size_t __len)
7425 throw () __attribute__ ((__nonnull__ (1))) ;
7426
7427
7428
7429
7430
7431 extern int vhangup (void) throw ();
7432
7433
7434 extern int revoke (__const char *__file) throw () __attribute__ ((__nonnull__ (1))) ;
7435
7436
7437
7438
7439
7440
7441
7442 extern int profil (unsigned short int *__sample_buffer, size_t __size,
7443 size_t __offset, unsigned int __scale)
7444 throw () __attribute__ ((__nonnull__ (1)));
7445
7446
7447
7448
7449
7450 extern int acct (__const char *__name) throw ();
7451
7452
7453
7454 extern char *getusershell (void) throw ();
7455 extern void endusershell (void) throw ();
7456 extern void setusershell (void) throw ();
7457
7458
7459
7460
7461
7462 extern int daemon (int __nochdir, int __noclose) throw () ;
7463
7464
7465
7466
7467
7468
7469 extern int chroot (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) ;
7470
7471
7472
7473 extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1)));
7474 # 923 "/usr/include/unistd.h" 3 4
7475 extern int fsync (int __fd);
7476
7477
7478
7479
7480
7481
7482 extern long int gethostid (void);
7483
7484
7485 extern void sync (void) throw ();
7486
7487
7488
7489
7490 extern int getpagesize (void) throw () __attribute__ ((__const__));
7491
7492
7493
7494
7495 extern int getdtablesize (void) throw ();
7496 # 952 "/usr/include/unistd.h" 3 4
7497 extern int truncate (__const char *__file, __off64_t __length) throw () __asm__ ("" "truncate64") __attribute__ ((__nonnull__ (1))) ;
7498
7499
7500
7501
7502
7503
7504
7505 extern int truncate64 (__const char *__file, __off64_t __length)
7506 throw () __attribute__ ((__nonnull__ (1))) ;
7507 # 973 "/usr/include/unistd.h" 3 4
7508 extern int ftruncate (int __fd, __off64_t __length) throw () __asm__ ("" "ftruncate64") ;
7509
7510
7511
7512
7513
7514
7515 extern int ftruncate64 (int __fd, __off64_t __length) throw () ;
7516 # 990 "/usr/include/unistd.h" 3 4
7517 extern int brk (void *__addr) throw () ;
7518
7519
7520
7521
7522
7523 extern void *sbrk (intptr_t __delta) throw ();
7524 # 1011 "/usr/include/unistd.h" 3 4
7525 extern long int syscall (long int __sysno, ...) throw ();
7526 # 1037 "/usr/include/unistd.h" 3 4
7527 extern int lockf (int __fd, int __cmd, __off64_t __len) __asm__ ("" "lockf64") ;
7528
7529
7530
7531
7532
7533
7534 extern int lockf64 (int __fd, int __cmd, __off64_t __len) ;
7535 # 1065 "/usr/include/unistd.h" 3 4
7536 extern int fdatasync (int __fildes);
7537
7538
7539
7540
7541
7542
7543
7544 extern char *crypt (__const char *__key, __const char *__salt)
7545 throw () __attribute__ ((__nonnull__ (1, 2)));
7546
7547
7548
7549 extern void encrypt (char *__block, int __edflag) throw () __attribute__ ((__nonnull__ (1)));
7550
7551
7552
7553
7554
7555
7556 extern void swab (__const void *__restrict __from, void *__restrict __to,
7557 ssize_t __n) throw () __attribute__ ((__nonnull__ (1, 2)));
7558
7559
7560
7561
7562
7563
7564
7565 extern char *ctermid (char *__s) throw ();
7566 # 1103 "/usr/include/unistd.h" 3 4
7567 }
7568 # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr-default.h" 2 3
7569
7570 typedef pthread_key_t __gthread_key_t;
7571 typedef pthread_once_t __gthread_once_t;
7572 typedef pthread_mutex_t __gthread_mutex_t;
7573 typedef pthread_mutex_t __gthread_recursive_mutex_t;
7574 # 88 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr-default.h" 3
7575 static __typeof(pthread_once) __gthrw_pthread_once __attribute__ ((__weakref__("pthread_once")));
7576 static __typeof(pthread_getspecific) __gthrw_pthread_getspecific __attribute__ ((__weakref__("pthread_getspecific")));
7577 static __typeof(pthread_setspecific) __gthrw_pthread_setspecific __attribute__ ((__weakref__("pthread_setspecific")));
7578 static __typeof(pthread_create) __gthrw_pthread_create __attribute__ ((__weakref__("pthread_create")));
7579 static __typeof(pthread_cancel) __gthrw_pthread_cancel __attribute__ ((__weakref__("pthread_cancel")));
7580 static __typeof(pthread_mutex_lock) __gthrw_pthread_mutex_lock __attribute__ ((__weakref__("pthread_mutex_lock")));
7581 static __typeof(pthread_mutex_trylock) __gthrw_pthread_mutex_trylock __attribute__ ((__weakref__("pthread_mutex_trylock")));
7582 static __typeof(pthread_mutex_unlock) __gthrw_pthread_mutex_unlock __attribute__ ((__weakref__("pthread_mutex_unlock")));
7583 static __typeof(pthread_mutex_init) __gthrw_pthread_mutex_init __attribute__ ((__weakref__("pthread_mutex_init")));
7584
7585
7586 static __typeof(pthread_key_create) __gthrw_pthread_key_create __attribute__ ((__weakref__("pthread_key_create")));
7587 static __typeof(pthread_key_delete) __gthrw_pthread_key_delete __attribute__ ((__weakref__("pthread_key_delete")));
7588 static __typeof(pthread_mutexattr_init) __gthrw_pthread_mutexattr_init __attribute__ ((__weakref__("pthread_mutexattr_init")));
7589 static __typeof(pthread_mutexattr_settype) __gthrw_pthread_mutexattr_settype __attribute__ ((__weakref__("pthread_mutexattr_settype")));
7590 static __typeof(pthread_mutexattr_destroy) __gthrw_pthread_mutexattr_destroy __attribute__ ((__weakref__("pthread_mutexattr_destroy")));
7591 # 198 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr-default.h" 3
7592 static inline int
7593 __gthread_active_p (void)
7594 {
7595 static void *const __gthread_active_ptr
7596 = __extension__ (void *) &__gthrw_pthread_cancel;
7597 return __gthread_active_ptr != 0;
7598 }
7599 # 567 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr-default.h" 3
7600 static inline int
7601 __gthread_once (__gthread_once_t *once, void (*func) (void))
7602 {
7603 if (__gthread_active_p ())
7604 return __gthrw_pthread_once (once, func);
7605 else
7606 return -1;
7607 }
7608
7609 static inline int
7610 __gthread_key_create (__gthread_key_t *key, void (*dtor) (void *))
7611 {
7612 return __gthrw_pthread_key_create (key, dtor);
7613 }
7614
7615 static inline int
7616 __gthread_key_delete (__gthread_key_t key)
7617 {
7618 return __gthrw_pthread_key_delete (key);
7619 }
7620
7621 static inline void *
7622 __gthread_getspecific (__gthread_key_t key)
7623 {
7624 return __gthrw_pthread_getspecific (key);
7625 }
7626
7627 static inline int
7628 __gthread_setspecific (__gthread_key_t key, const void *ptr)
7629 {
7630 return __gthrw_pthread_setspecific (key, ptr);
7631 }
7632
7633 static inline int
7634 __gthread_mutex_lock (__gthread_mutex_t *mutex)
7635 {
7636 if (__gthread_active_p ())
7637 return __gthrw_pthread_mutex_lock (mutex);
7638 else
7639 return 0;
7640 }
7641
7642 static inline int
7643 __gthread_mutex_trylock (__gthread_mutex_t *mutex)
7644 {
7645 if (__gthread_active_p ())
7646 return __gthrw_pthread_mutex_trylock (mutex);
7647 else
7648 return 0;
7649 }
7650
7651 static inline int
7652 __gthread_mutex_unlock (__gthread_mutex_t *mutex)
7653 {
7654 if (__gthread_active_p ())
7655 return __gthrw_pthread_mutex_unlock (mutex);
7656 else
7657 return 0;
7658 }
7659 # 649 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr-default.h" 3
7660 static inline int
7661 __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex)
7662 {
7663 return __gthread_mutex_lock (mutex);
7664 }
7665
7666 static inline int
7667 __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex)
7668 {
7669 return __gthread_mutex_trylock (mutex);
7670 }
7671
7672 static inline int
7673 __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex)
7674 {
7675 return __gthread_mutex_unlock (mutex);
7676 }
7677 # 115 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr.h" 2 3
7678
7679
7680
7681
7682
7683
7684
7685 #pragma GCC visibility pop
7686 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++io.h" 2 3
7687
7688 namespace std __attribute__ ((__visibility__ ("default"))) {
7689
7690 typedef __gthread_mutex_t __c_lock;
7691
7692
7693 typedef FILE __c_file;
7694
7695 }
7696 # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iosfwd" 2 3
7697 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cctype" 1 3
7698 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cctype" 3
7699
7700 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cctype" 3
7701
7702
7703 # 1 "/usr/include/ctype.h" 1 3 4
7704 # 30 "/usr/include/ctype.h" 3 4
7705 extern "C" {
7706 # 48 "/usr/include/ctype.h" 3 4
7707 enum
7708 {
7709 _ISupper = (1 << (0)),
7710 _ISlower = (1 << (1)),
7711 _ISalpha = (1 << (2)),
7712 _ISdigit = (1 << (3)),
7713 _ISxdigit = (1 << (4)),
7714 _ISspace = (1 << (5)),
7715 _ISprint = (1 << (6)),
7716 _ISgraph = (1 << (7)),
7717 _ISblank = (1 << (8)),
7718 _IScntrl = (1 << (9)),
7719 _ISpunct = (1 << (10)),
7720 _ISalnum = (1 << (11))
7721 };
7722 # 81 "/usr/include/ctype.h" 3 4
7723 extern __const unsigned short int **__ctype_b_loc (void)
7724 __attribute__ ((__const));
7725 extern __const __int32_t **__ctype_tolower_loc (void)
7726 __attribute__ ((__const));
7727 extern __const __int32_t **__ctype_toupper_loc (void)
7728 __attribute__ ((__const));
7729 # 96 "/usr/include/ctype.h" 3 4
7730
7731
7732
7733
7734
7735
7736 extern int isalnum (int) throw ();
7737 extern int isalpha (int) throw ();
7738 extern int iscntrl (int) throw ();
7739 extern int isdigit (int) throw ();
7740 extern int islower (int) throw ();
7741 extern int isgraph (int) throw ();
7742 extern int isprint (int) throw ();
7743 extern int ispunct (int) throw ();
7744 extern int isspace (int) throw ();
7745 extern int isupper (int) throw ();
7746 extern int isxdigit (int) throw ();
7747
7748
7749
7750 extern int tolower (int __c) throw ();
7751
7752
7753 extern int toupper (int __c) throw ();
7754
7755
7756
7757
7758
7759
7760
7761
7762 extern int isblank (int) throw ();
7763
7764
7765
7766
7767
7768
7769 extern int isctype (int __c, int __mask) throw ();
7770
7771
7772
7773
7774
7775
7776 extern int isascii (int __c) throw ();
7777
7778
7779
7780 extern int toascii (int __c) throw ();
7781
7782
7783
7784 extern int _toupper (int) throw ();
7785 extern int _tolower (int) throw ();
7786 # 247 "/usr/include/ctype.h" 3 4
7787 extern int isalnum_l (int, __locale_t) throw ();
7788 extern int isalpha_l (int, __locale_t) throw ();
7789 extern int iscntrl_l (int, __locale_t) throw ();
7790 extern int isdigit_l (int, __locale_t) throw ();
7791 extern int islower_l (int, __locale_t) throw ();
7792 extern int isgraph_l (int, __locale_t) throw ();
7793 extern int isprint_l (int, __locale_t) throw ();
7794 extern int ispunct_l (int, __locale_t) throw ();
7795 extern int isspace_l (int, __locale_t) throw ();
7796 extern int isupper_l (int, __locale_t) throw ();
7797 extern int isxdigit_l (int, __locale_t) throw ();
7798
7799 extern int isblank_l (int, __locale_t) throw ();
7800
7801
7802
7803 extern int __tolower_l (int __c, __locale_t __l) throw ();
7804 extern int tolower_l (int __c, __locale_t __l) throw ();
7805
7806
7807 extern int __toupper_l (int __c, __locale_t __l) throw ();
7808 extern int toupper_l (int __c, __locale_t __l) throw ();
7809 # 323 "/usr/include/ctype.h" 3 4
7810 }
7811 # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cctype" 2 3
7812 # 68 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cctype" 3
7813 namespace std __attribute__ ((__visibility__ ("default"))) {
7814
7815 using ::isalnum;
7816 using ::isalpha;
7817 using ::iscntrl;
7818 using ::isdigit;
7819 using ::isgraph;
7820 using ::islower;
7821 using ::isprint;
7822 using ::ispunct;
7823 using ::isspace;
7824 using ::isupper;
7825 using ::isxdigit;
7826 using ::tolower;
7827 using ::toupper;
7828
7829 }
7830 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iosfwd" 2 3
7831 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stringfwd.h" 1 3
7832 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stringfwd.h" 3
7833
7834 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stringfwd.h" 3
7835
7836
7837
7838 namespace std __attribute__ ((__visibility__ ("default"))) {
7839
7840 template<typename _Alloc>
7841 class allocator;
7842
7843 template<class _CharT>
7844 struct char_traits;
7845
7846 template<typename _CharT, typename _Traits = char_traits<_CharT>,
7847 typename _Alloc = allocator<_CharT> >
7848 class basic_string;
7849
7850 template<> struct char_traits<char>;
7851
7852 typedef basic_string<char> string;
7853
7854
7855 template<> struct char_traits<wchar_t>;
7856
7857 typedef basic_string<wchar_t> wstring;
7858
7859
7860 }
7861 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iosfwd" 2 3
7862 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/postypes.h" 1 3
7863 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/postypes.h" 3
7864
7865 # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/postypes.h" 3
7866
7867 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cwchar" 1 3
7868 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cwchar" 3
7869
7870 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cwchar" 3
7871
7872
7873
7874 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ctime" 1 3
7875 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ctime" 3
7876
7877 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ctime" 3
7878 # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ctime" 3
7879 namespace std __attribute__ ((__visibility__ ("default"))) {
7880
7881 using ::clock_t;
7882 using ::time_t;
7883 using ::tm;
7884
7885 using ::clock;
7886 using ::difftime;
7887 using ::mktime;
7888 using ::time;
7889 using ::asctime;
7890 using ::ctime;
7891 using ::gmtime;
7892 using ::localtime;
7893 using ::strftime;
7894
7895 }
7896 # 53 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cwchar" 2 3
7897
7898
7899 # 1 "/usr/include/wchar.h" 1 3 4
7900 # 48 "/usr/include/wchar.h" 3 4
7901 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4
7902 # 49 "/usr/include/wchar.h" 2 3 4
7903 # 93 "/usr/include/wchar.h" 3 4
7904
7905
7906 typedef __mbstate_t mbstate_t;
7907
7908
7909
7910 # 118 "/usr/include/wchar.h" 3 4
7911 extern "C" {
7912
7913
7914
7915
7916 struct tm;
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926 extern wchar_t *wcscpy (wchar_t *__restrict __dest,
7927 __const wchar_t *__restrict __src) throw ();
7928
7929 extern wchar_t *wcsncpy (wchar_t *__restrict __dest,
7930 __const wchar_t *__restrict __src, size_t __n)
7931 throw ();
7932
7933
7934 extern wchar_t *wcscat (wchar_t *__restrict __dest,
7935 __const wchar_t *__restrict __src) throw ();
7936
7937 extern wchar_t *wcsncat (wchar_t *__restrict __dest,
7938 __const wchar_t *__restrict __src, size_t __n)
7939 throw ();
7940
7941
7942 extern int wcscmp (__const wchar_t *__s1, __const wchar_t *__s2)
7943 throw () __attribute__ ((__pure__));
7944
7945 extern int wcsncmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n)
7946 throw () __attribute__ ((__pure__));
7947
7948
7949
7950
7951 extern int wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) throw ();
7952
7953
7954 extern int wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2,
7955 size_t __n) throw ();
7956
7957
7958
7959
7960
7961 extern int wcscasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2,
7962 __locale_t __loc) throw ();
7963
7964 extern int wcsncasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2,
7965 size_t __n, __locale_t __loc) throw ();
7966
7967
7968
7969
7970
7971 extern int wcscoll (__const wchar_t *__s1, __const wchar_t *__s2) throw ();
7972
7973
7974
7975 extern size_t wcsxfrm (wchar_t *__restrict __s1,
7976 __const wchar_t *__restrict __s2, size_t __n) throw ();
7977
7978
7979
7980
7981
7982
7983
7984
7985 extern int wcscoll_l (__const wchar_t *__s1, __const wchar_t *__s2,
7986 __locale_t __loc) throw ();
7987
7988
7989
7990
7991 extern size_t wcsxfrm_l (wchar_t *__s1, __const wchar_t *__s2,
7992 size_t __n, __locale_t __loc) throw ();
7993
7994
7995 extern wchar_t *wcsdup (__const wchar_t *__s) throw () __attribute__ ((__malloc__));
7996
7997
7998
7999
8000 extern wchar_t *wcschr (__const wchar_t *__wcs, wchar_t __wc)
8001 throw () __attribute__ ((__pure__));
8002
8003 extern wchar_t *wcsrchr (__const wchar_t *__wcs, wchar_t __wc)
8004 throw () __attribute__ ((__pure__));
8005
8006
8007
8008
8009
8010 extern wchar_t *wcschrnul (__const wchar_t *__s, wchar_t __wc)
8011 throw () __attribute__ ((__pure__));
8012
8013
8014
8015
8016
8017 extern size_t wcscspn (__const wchar_t *__wcs, __const wchar_t *__reject)
8018 throw () __attribute__ ((__pure__));
8019
8020
8021 extern size_t wcsspn (__const wchar_t *__wcs, __const wchar_t *__accept)
8022 throw () __attribute__ ((__pure__));
8023
8024 extern wchar_t *wcspbrk (__const wchar_t *__wcs, __const wchar_t *__accept)
8025 throw () __attribute__ ((__pure__));
8026
8027 extern wchar_t *wcsstr (__const wchar_t *__haystack, __const wchar_t *__needle)
8028 throw () __attribute__ ((__pure__));
8029
8030
8031 extern wchar_t *wcstok (wchar_t *__restrict __s,
8032 __const wchar_t *__restrict __delim,
8033 wchar_t **__restrict __ptr) throw ();
8034
8035
8036 extern size_t wcslen (__const wchar_t *__s) throw () __attribute__ ((__pure__));
8037
8038
8039
8040
8041 extern wchar_t *wcswcs (__const wchar_t *__haystack, __const wchar_t *__needle)
8042 throw () __attribute__ ((__pure__));
8043
8044
8045
8046
8047 extern size_t wcsnlen (__const wchar_t *__s, size_t __maxlen)
8048 throw () __attribute__ ((__pure__));
8049
8050
8051
8052
8053
8054 extern wchar_t *wmemchr (__const wchar_t *__s, wchar_t __c, size_t __n)
8055 throw () __attribute__ ((__pure__));
8056
8057
8058 extern int wmemcmp (__const wchar_t *__restrict __s1,
8059 __const wchar_t *__restrict __s2, size_t __n)
8060 throw () __attribute__ ((__pure__));
8061
8062
8063 extern wchar_t *wmemcpy (wchar_t *__restrict __s1,
8064 __const wchar_t *__restrict __s2, size_t __n) throw ();
8065
8066
8067
8068 extern wchar_t *wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n)
8069 throw ();
8070
8071
8072 extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw ();
8073
8074
8075
8076
8077
8078 extern wchar_t *wmempcpy (wchar_t *__restrict __s1,
8079 __const wchar_t *__restrict __s2, size_t __n)
8080 throw ();
8081
8082
8083
8084
8085
8086
8087 extern wint_t btowc (int __c) throw ();
8088
8089
8090
8091 extern int wctob (wint_t __c) throw ();
8092
8093
8094
8095 extern int mbsinit (__const mbstate_t *__ps) throw () __attribute__ ((__pure__));
8096
8097
8098
8099 extern size_t mbrtowc (wchar_t *__restrict __pwc,
8100 __const char *__restrict __s, size_t __n,
8101 mbstate_t *__p) throw ();
8102
8103
8104 extern size_t wcrtomb (char *__restrict __s, wchar_t __wc,
8105 mbstate_t *__restrict __ps) throw ();
8106
8107
8108 extern size_t __mbrlen (__const char *__restrict __s, size_t __n,
8109 mbstate_t *__restrict __ps) throw ();
8110 extern size_t mbrlen (__const char *__restrict __s, size_t __n,
8111 mbstate_t *__restrict __ps) throw ();
8112
8113 # 341 "/usr/include/wchar.h" 3 4
8114 extern __inline size_t
8115 mbrlen (__const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) throw ()
8116
8117 { return (__ps != __null
8118 ? mbrtowc (__null, __s, __n, __ps) : __mbrlen (__s, __n, __null)); }
8119
8120
8121
8122
8123
8124 extern size_t mbsrtowcs (wchar_t *__restrict __dst,
8125 __const char **__restrict __src, size_t __len,
8126 mbstate_t *__restrict __ps) throw ();
8127
8128
8129
8130 extern size_t wcsrtombs (char *__restrict __dst,
8131 __const wchar_t **__restrict __src, size_t __len,
8132 mbstate_t *__restrict __ps) throw ();
8133
8134
8135
8136
8137
8138
8139 extern size_t mbsnrtowcs (wchar_t *__restrict __dst,
8140 __const char **__restrict __src, size_t __nmc,
8141 size_t __len, mbstate_t *__restrict __ps) throw ();
8142
8143
8144
8145 extern size_t wcsnrtombs (char *__restrict __dst,
8146 __const wchar_t **__restrict __src,
8147 size_t __nwc, size_t __len,
8148 mbstate_t *__restrict __ps) throw ();
8149
8150
8151
8152
8153
8154
8155 extern int wcwidth (wchar_t __c) throw ();
8156
8157
8158
8159 extern int wcswidth (__const wchar_t *__s, size_t __n) throw ();
8160
8161
8162
8163
8164
8165
8166 extern double wcstod (__const wchar_t *__restrict __nptr,
8167 wchar_t **__restrict __endptr) throw ();
8168
8169
8170
8171 extern float wcstof (__const wchar_t *__restrict __nptr,
8172 wchar_t **__restrict __endptr) throw ();
8173 extern long double wcstold (__const wchar_t *__restrict __nptr,
8174 wchar_t **__restrict __endptr) throw ();
8175
8176
8177
8178
8179
8180 extern long int wcstol (__const wchar_t *__restrict __nptr,
8181 wchar_t **__restrict __endptr, int __base) throw ();
8182
8183
8184
8185 extern unsigned long int wcstoul (__const wchar_t *__restrict __nptr,
8186 wchar_t **__restrict __endptr, int __base)
8187 throw ();
8188
8189
8190
8191
8192 __extension__
8193 extern long long int wcstoll (__const wchar_t *__restrict __nptr,
8194 wchar_t **__restrict __endptr, int __base)
8195 throw ();
8196
8197
8198
8199 __extension__
8200 extern unsigned long long int wcstoull (__const wchar_t *__restrict __nptr,
8201 wchar_t **__restrict __endptr,
8202 int __base) throw ();
8203
8204
8205
8206
8207
8208
8209 __extension__
8210 extern long long int wcstoq (__const wchar_t *__restrict __nptr,
8211 wchar_t **__restrict __endptr, int __base)
8212 throw ();
8213
8214
8215
8216 __extension__
8217 extern unsigned long long int wcstouq (__const wchar_t *__restrict __nptr,
8218 wchar_t **__restrict __endptr,
8219 int __base) throw ();
8220 # 467 "/usr/include/wchar.h" 3 4
8221 extern long int wcstol_l (__const wchar_t *__restrict __nptr,
8222 wchar_t **__restrict __endptr, int __base,
8223 __locale_t __loc) throw ();
8224
8225 extern unsigned long int wcstoul_l (__const wchar_t *__restrict __nptr,
8226 wchar_t **__restrict __endptr,
8227 int __base, __locale_t __loc) throw ();
8228
8229 __extension__
8230 extern long long int wcstoll_l (__const wchar_t *__restrict __nptr,
8231 wchar_t **__restrict __endptr,
8232 int __base, __locale_t __loc) throw ();
8233
8234 __extension__
8235 extern unsigned long long int wcstoull_l (__const wchar_t *__restrict __nptr,
8236 wchar_t **__restrict __endptr,
8237 int __base, __locale_t __loc)
8238 throw ();
8239
8240 extern double wcstod_l (__const wchar_t *__restrict __nptr,
8241 wchar_t **__restrict __endptr, __locale_t __loc)
8242 throw ();
8243
8244 extern float wcstof_l (__const wchar_t *__restrict __nptr,
8245 wchar_t **__restrict __endptr, __locale_t __loc)
8246 throw ();
8247
8248 extern long double wcstold_l (__const wchar_t *__restrict __nptr,
8249 wchar_t **__restrict __endptr,
8250 __locale_t __loc) throw ();
8251
8252
8253
8254
8255
8256 extern double __wcstod_internal (__const wchar_t *__restrict __nptr,
8257 wchar_t **__restrict __endptr, int __group)
8258 throw ();
8259 extern float __wcstof_internal (__const wchar_t *__restrict __nptr,
8260 wchar_t **__restrict __endptr, int __group)
8261 throw ();
8262 extern long double __wcstold_internal (__const wchar_t *__restrict __nptr,
8263 wchar_t **__restrict __endptr,
8264 int __group) throw ();
8265
8266
8267
8268 extern long int __wcstol_internal (__const wchar_t *__restrict __nptr,
8269 wchar_t **__restrict __endptr,
8270 int __base, int __group) throw ();
8271
8272
8273
8274
8275 extern unsigned long int __wcstoul_internal (__const wchar_t *__restrict __npt,
8276 wchar_t **__restrict __endptr,
8277 int __base, int __group) throw ();
8278
8279
8280
8281
8282 __extension__
8283 extern long long int __wcstoll_internal (__const wchar_t *__restrict __nptr,
8284 wchar_t **__restrict __endptr,
8285 int __base, int __group) throw ();
8286
8287
8288
8289
8290 __extension__
8291 extern unsigned long long int __wcstoull_internal (__const wchar_t *
8292 __restrict __nptr,
8293 wchar_t **
8294 __restrict __endptr,
8295 int __base,
8296 int __group) throw ();
8297
8298
8299
8300
8301
8302
8303
8304
8305 extern __inline double
8306 wcstod (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw ()
8307
8308 { return __wcstod_internal (__nptr, __endptr, 0); }
8309 extern __inline long int
8310 wcstol (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw ()
8311
8312 { return __wcstol_internal (__nptr, __endptr, __base, 0); }
8313 extern __inline unsigned long int
8314 wcstoul (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw ()
8315
8316 { return __wcstoul_internal (__nptr, __endptr, __base, 0); }
8317
8318
8319
8320 extern __inline float
8321 wcstof (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw ()
8322
8323 { return __wcstof_internal (__nptr, __endptr, 0); }
8324
8325 extern __inline long double
8326 wcstold (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw ()
8327
8328 { return __wcstold_internal (__nptr, __endptr, 0); }
8329
8330 __extension__
8331 extern __inline long long int
8332 wcstoq (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw ()
8333
8334 { return __wcstoll_internal (__nptr, __endptr, __base, 0); }
8335 __extension__
8336 extern __inline unsigned long long int
8337 wcstouq (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw ()
8338
8339 { return __wcstoull_internal (__nptr, __endptr, __base, 0); }
8340
8341
8342
8343
8344
8345
8346
8347 extern wchar_t *wcpcpy (wchar_t *__dest, __const wchar_t *__src) throw ();
8348
8349
8350
8351 extern wchar_t *wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n)
8352 throw ();
8353 # 607 "/usr/include/wchar.h" 3 4
8354 extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) throw ();
8355
8356
8357
8358
8359
8360
8361 extern int fwide (__FILE *__fp, int __mode) throw ();
8362
8363
8364
8365
8366
8367
8368 extern int fwprintf (__FILE *__restrict __stream,
8369 __const wchar_t *__restrict __format, ...)
8370 ;
8371
8372
8373
8374
8375 extern int wprintf (__const wchar_t *__restrict __format, ...)
8376 ;
8377
8378 extern int swprintf (wchar_t *__restrict __s, size_t __n,
8379 __const wchar_t *__restrict __format, ...)
8380 throw () ;
8381
8382
8383
8384
8385
8386 extern int vfwprintf (__FILE *__restrict __s,
8387 __const wchar_t *__restrict __format,
8388 __gnuc_va_list __arg)
8389 ;
8390
8391
8392
8393
8394 extern int vwprintf (__const wchar_t *__restrict __format,
8395 __gnuc_va_list __arg)
8396 ;
8397
8398
8399 extern int vswprintf (wchar_t *__restrict __s, size_t __n,
8400 __const wchar_t *__restrict __format,
8401 __gnuc_va_list __arg)
8402 throw () ;
8403
8404
8405
8406
8407
8408
8409 extern int fwscanf (__FILE *__restrict __stream,
8410 __const wchar_t *__restrict __format, ...)
8411 ;
8412
8413
8414
8415
8416 extern int wscanf (__const wchar_t *__restrict __format, ...)
8417 ;
8418
8419 extern int swscanf (__const wchar_t *__restrict __s,
8420 __const wchar_t *__restrict __format, ...)
8421 throw () ;
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433 extern int vfwscanf (__FILE *__restrict __s,
8434 __const wchar_t *__restrict __format,
8435 __gnuc_va_list __arg)
8436 ;
8437
8438
8439
8440
8441 extern int vwscanf (__const wchar_t *__restrict __format,
8442 __gnuc_va_list __arg)
8443 ;
8444
8445 extern int vswscanf (__const wchar_t *__restrict __s,
8446 __const wchar_t *__restrict __format,
8447 __gnuc_va_list __arg)
8448 throw () ;
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459 extern wint_t fgetwc (__FILE *__stream);
8460 extern wint_t getwc (__FILE *__stream);
8461
8462
8463
8464
8465
8466 extern wint_t getwchar (void);
8467
8468
8469
8470
8471
8472
8473 extern wint_t fputwc (wchar_t __wc, __FILE *__stream);
8474 extern wint_t putwc (wchar_t __wc, __FILE *__stream);
8475
8476
8477
8478
8479
8480 extern wint_t putwchar (wchar_t __wc);
8481
8482
8483
8484
8485
8486
8487
8488 extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n,
8489 __FILE *__restrict __stream);
8490
8491
8492
8493
8494
8495 extern int fputws (__const wchar_t *__restrict __ws,
8496 __FILE *__restrict __stream);
8497
8498
8499
8500
8501
8502
8503 extern wint_t ungetwc (wint_t __wc, __FILE *__stream);
8504
8505 # 768 "/usr/include/wchar.h" 3 4
8506 extern wint_t getwc_unlocked (__FILE *__stream);
8507 extern wint_t getwchar_unlocked (void);
8508
8509
8510
8511
8512
8513
8514
8515 extern wint_t fgetwc_unlocked (__FILE *__stream);
8516
8517
8518
8519
8520
8521
8522
8523 extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream);
8524 # 794 "/usr/include/wchar.h" 3 4
8525 extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream);
8526 extern wint_t putwchar_unlocked (wchar_t __wc);
8527 # 804 "/usr/include/wchar.h" 3 4
8528 extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n,
8529 __FILE *__restrict __stream);
8530
8531
8532
8533
8534
8535
8536
8537 extern int fputws_unlocked (__const wchar_t *__restrict __ws,
8538 __FILE *__restrict __stream);
8539
8540
8541
8542
8543
8544
8545
8546 extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize,
8547 __const wchar_t *__restrict __format,
8548 __const struct tm *__restrict __tp) throw ();
8549
8550
8551
8552
8553
8554
8555
8556 extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize,
8557 __const wchar_t *__restrict __format,
8558 __const struct tm *__restrict __tp,
8559 __locale_t __loc) throw ();
8560 # 858 "/usr/include/wchar.h" 3 4
8561 }
8562 # 56 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cwchar" 2 3
8563 # 70 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cwchar" 3
8564 namespace std __attribute__ ((__visibility__ ("default"))) {
8565
8566 using ::mbstate_t;
8567
8568 }
8569 # 144 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cwchar" 3
8570 namespace std __attribute__ ((__visibility__ ("default"))) {
8571
8572 using ::wint_t;
8573
8574 using ::btowc;
8575 using ::fgetwc;
8576 using ::fgetws;
8577 using ::fputwc;
8578 using ::fputws;
8579 using ::fwide;
8580 using ::fwprintf;
8581 using ::fwscanf;
8582 using ::getwc;
8583 using ::getwchar;
8584 using ::mbrlen;
8585 using ::mbrtowc;
8586 using ::mbsinit;
8587 using ::mbsrtowcs;
8588 using ::putwc;
8589 using ::putwchar;
8590 using ::swprintf;
8591 using ::swscanf;
8592 using ::ungetwc;
8593 using ::vfwprintf;
8594
8595 using ::vfwscanf;
8596
8597 using ::vswprintf;
8598
8599 using ::vswscanf;
8600
8601 using ::vwprintf;
8602
8603 using ::vwscanf;
8604
8605 using ::wcrtomb;
8606 using ::wcscat;
8607 using ::wcscmp;
8608 using ::wcscoll;
8609 using ::wcscpy;
8610 using ::wcscspn;
8611
8612
8613
8614 using ::wcslen;
8615 using ::wcsncat;
8616 using ::wcsncmp;
8617 using ::wcsncpy;
8618 using ::wcsrtombs;
8619 using ::wcsspn;
8620 using ::wcstod;
8621
8622 using ::wcstof;
8623
8624 using ::wcstok;
8625 using ::wcstol;
8626 using ::wcstoul;
8627 using ::wcsxfrm;
8628 using ::wctob;
8629 using ::wmemcmp;
8630 using ::wmemcpy;
8631 using ::wmemmove;
8632 using ::wmemset;
8633 using ::wprintf;
8634 using ::wscanf;
8635
8636 using ::wcschr;
8637
8638 inline wchar_t*
8639 wcschr(wchar_t* __p, wchar_t __c)
8640 { return wcschr(const_cast<const wchar_t*>(__p), __c); }
8641
8642 using ::wcspbrk;
8643
8644 inline wchar_t*
8645 wcspbrk(wchar_t* __s1, const wchar_t* __s2)
8646 { return wcspbrk(const_cast<const wchar_t*>(__s1), __s2); }
8647
8648 using ::wcsrchr;
8649
8650 inline wchar_t*
8651 wcsrchr(wchar_t* __p, wchar_t __c)
8652 { return wcsrchr(const_cast<const wchar_t*>(__p), __c); }
8653
8654 using ::wcsstr;
8655
8656 inline wchar_t*
8657 wcsstr(wchar_t* __s1, const wchar_t* __s2)
8658 { return wcsstr(const_cast<const wchar_t*>(__s1), __s2); }
8659
8660 using ::wmemchr;
8661
8662 inline wchar_t*
8663 wmemchr(wchar_t* __p, wchar_t __c, size_t __n)
8664 { return wmemchr(const_cast<const wchar_t*>(__p), __c, __n); }
8665
8666 }
8667
8668
8669
8670
8671
8672
8673
8674 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
8675
8676
8677
8678
8679
8680
8681 using ::wcstold;
8682 # 264 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cwchar" 3
8683 using ::wcstoll;
8684 using ::wcstoull;
8685
8686
8687 }
8688
8689 namespace std __attribute__ ((__visibility__ ("default"))) {
8690
8691 using ::__gnu_cxx::wcstold;
8692 using ::__gnu_cxx::wcstoll;
8693 using ::__gnu_cxx::wcstoull;
8694
8695 }
8696 # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/postypes.h" 2 3
8697
8698
8699 # 1 "/usr/include/stdint.h" 1 3 4
8700 # 28 "/usr/include/stdint.h" 3 4
8701 # 1 "/usr/include/bits/wordsize.h" 1 3 4
8702 # 29 "/usr/include/stdint.h" 2 3 4
8703 # 49 "/usr/include/stdint.h" 3 4
8704 typedef unsigned char uint8_t;
8705 typedef unsigned short int uint16_t;
8706
8707 typedef unsigned int uint32_t;
8708
8709
8710
8711
8712
8713 __extension__
8714 typedef unsigned long long int uint64_t;
8715
8716
8717
8718
8719
8720
8721 typedef signed char int_least8_t;
8722 typedef short int int_least16_t;
8723 typedef int int_least32_t;
8724
8725
8726
8727 __extension__
8728 typedef long long int int_least64_t;
8729
8730
8731
8732 typedef unsigned char uint_least8_t;
8733 typedef unsigned short int uint_least16_t;
8734 typedef unsigned int uint_least32_t;
8735
8736
8737
8738 __extension__
8739 typedef unsigned long long int uint_least64_t;
8740
8741
8742
8743
8744
8745
8746 typedef signed char int_fast8_t;
8747
8748
8749
8750
8751
8752 typedef int int_fast16_t;
8753 typedef int int_fast32_t;
8754 __extension__
8755 typedef long long int int_fast64_t;
8756
8757
8758
8759 typedef unsigned char uint_fast8_t;
8760
8761
8762
8763
8764
8765 typedef unsigned int uint_fast16_t;
8766 typedef unsigned int uint_fast32_t;
8767 __extension__
8768 typedef unsigned long long int uint_fast64_t;
8769 # 129 "/usr/include/stdint.h" 3 4
8770 typedef unsigned int uintptr_t;
8771 # 138 "/usr/include/stdint.h" 3 4
8772 __extension__
8773 typedef long long int intmax_t;
8774 __extension__
8775 typedef unsigned long long int uintmax_t;
8776 # 50 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/postypes.h" 2 3
8777
8778
8779 namespace std __attribute__ ((__visibility__ ("default"))) {
8780 # 72 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/postypes.h" 3
8781 typedef int64_t streamoff;
8782
8783
8784
8785
8786
8787 typedef ptrdiff_t streamsize;
8788
8789 template<typename _StateT>
8790 class fpos;
8791 # 94 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/postypes.h" 3
8792 template<typename _StateT>
8793 class fpos
8794 {
8795 private:
8796 streamoff _M_off;
8797 _StateT _M_state;
8798
8799 public:
8800
8801
8802
8803
8804 fpos()
8805 : _M_off(0), _M_state() { }
8806 # 116 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/postypes.h" 3
8807 fpos(streamoff __off)
8808 : _M_off(__off), _M_state() { }
8809
8810
8811 operator streamoff() const { return _M_off; }
8812
8813
8814 void
8815 state(_StateT __st)
8816 { _M_state = __st; }
8817
8818
8819 _StateT
8820 state() const
8821 { return _M_state; }
8822
8823
8824
8825
8826
8827 fpos&
8828 operator+=(streamoff __off)
8829 {
8830 _M_off += __off;
8831 return *this;
8832 }
8833
8834
8835
8836
8837
8838 fpos&
8839 operator-=(streamoff __off)
8840 {
8841 _M_off -= __off;
8842 return *this;
8843 }
8844
8845
8846
8847
8848
8849
8850
8851 fpos
8852 operator+(streamoff __off) const
8853 {
8854 fpos __pos(*this);
8855 __pos += __off;
8856 return __pos;
8857 }
8858
8859
8860
8861
8862
8863
8864
8865 fpos
8866 operator-(streamoff __off) const
8867 {
8868 fpos __pos(*this);
8869 __pos -= __off;
8870 return __pos;
8871 }
8872
8873
8874
8875
8876
8877
8878 streamoff
8879 operator-(const fpos& __other) const
8880 { return _M_off - __other._M_off; }
8881 };
8882
8883
8884
8885
8886
8887
8888 template<typename _StateT>
8889 inline bool
8890 operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
8891 { return streamoff(__lhs) == streamoff(__rhs); }
8892
8893 template<typename _StateT>
8894 inline bool
8895 operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
8896 { return streamoff(__lhs) != streamoff(__rhs); }
8897
8898
8899
8900
8901
8902 typedef fpos<mbstate_t> streampos;
8903
8904 typedef fpos<mbstate_t> wstreampos;
8905
8906 }
8907 # 50 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iosfwd" 2 3
8908 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/functexcept.h" 1 3
8909 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/functexcept.h" 3
8910 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/exception_defines.h" 1 3
8911 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/functexcept.h" 2 3
8912
8913 namespace std __attribute__ ((__visibility__ ("default"))) {
8914
8915
8916 void
8917 __throw_bad_exception(void) __attribute__((__noreturn__));
8918
8919
8920 void
8921 __throw_bad_alloc(void) __attribute__((__noreturn__));
8922
8923
8924 void
8925 __throw_bad_cast(void) __attribute__((__noreturn__));
8926
8927 void
8928 __throw_bad_typeid(void) __attribute__((__noreturn__));
8929
8930
8931 void
8932 __throw_logic_error(const char*) __attribute__((__noreturn__));
8933
8934 void
8935 __throw_domain_error(const char*) __attribute__((__noreturn__));
8936
8937 void
8938 __throw_invalid_argument(const char*) __attribute__((__noreturn__));
8939
8940 void
8941 __throw_length_error(const char*) __attribute__((__noreturn__));
8942
8943 void
8944 __throw_out_of_range(const char*) __attribute__((__noreturn__));
8945
8946 void
8947 __throw_runtime_error(const char*) __attribute__((__noreturn__));
8948
8949 void
8950 __throw_range_error(const char*) __attribute__((__noreturn__));
8951
8952 void
8953 __throw_overflow_error(const char*) __attribute__((__noreturn__));
8954
8955 void
8956 __throw_underflow_error(const char*) __attribute__((__noreturn__));
8957
8958
8959 void
8960 __throw_ios_failure(const char*) __attribute__((__noreturn__));
8961
8962 }
8963 # 51 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iosfwd" 2 3
8964
8965 namespace std __attribute__ ((__visibility__ ("default"))) {
8966
8967 template<typename _CharT, typename _Traits = char_traits<_CharT> >
8968 class basic_ios;
8969
8970 template<typename _CharT, typename _Traits = char_traits<_CharT> >
8971 class basic_streambuf;
8972
8973 template<typename _CharT, typename _Traits = char_traits<_CharT> >
8974 class basic_istream;
8975
8976 template<typename _CharT, typename _Traits = char_traits<_CharT> >
8977 class basic_ostream;
8978
8979 template<typename _CharT, typename _Traits = char_traits<_CharT> >
8980 class basic_iostream;
8981
8982 template<typename _CharT, typename _Traits = char_traits<_CharT>,
8983 typename _Alloc = allocator<_CharT> >
8984 class basic_stringbuf;
8985
8986 template<typename _CharT, typename _Traits = char_traits<_CharT>,
8987 typename _Alloc = allocator<_CharT> >
8988 class basic_istringstream;
8989
8990 template<typename _CharT, typename _Traits = char_traits<_CharT>,
8991 typename _Alloc = allocator<_CharT> >
8992 class basic_ostringstream;
8993
8994 template<typename _CharT, typename _Traits = char_traits<_CharT>,
8995 typename _Alloc = allocator<_CharT> >
8996 class basic_stringstream;
8997
8998 template<typename _CharT, typename _Traits = char_traits<_CharT> >
8999 class basic_filebuf;
9000
9001 template<typename _CharT, typename _Traits = char_traits<_CharT> >
9002 class basic_ifstream;
9003
9004 template<typename _CharT, typename _Traits = char_traits<_CharT> >
9005 class basic_ofstream;
9006
9007 template<typename _CharT, typename _Traits = char_traits<_CharT> >
9008 class basic_fstream;
9009
9010 template<typename _CharT, typename _Traits = char_traits<_CharT> >
9011 class istreambuf_iterator;
9012
9013 template<typename _CharT, typename _Traits = char_traits<_CharT> >
9014 class ostreambuf_iterator;
9015
9016
9017
9018 class ios_base;
9019 # 135 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iosfwd" 3
9020 typedef basic_ios<char> ios;
9021 typedef basic_streambuf<char> streambuf;
9022 typedef basic_istream<char> istream;
9023 typedef basic_ostream<char> ostream;
9024 typedef basic_iostream<char> iostream;
9025 typedef basic_stringbuf<char> stringbuf;
9026 typedef basic_istringstream<char> istringstream;
9027 typedef basic_ostringstream<char> ostringstream;
9028 typedef basic_stringstream<char> stringstream;
9029 typedef basic_filebuf<char> filebuf;
9030 typedef basic_ifstream<char> ifstream;
9031 typedef basic_ofstream<char> ofstream;
9032 typedef basic_fstream<char> fstream;
9033
9034
9035 typedef basic_ios<wchar_t> wios;
9036 typedef basic_streambuf<wchar_t> wstreambuf;
9037 typedef basic_istream<wchar_t> wistream;
9038 typedef basic_ostream<wchar_t> wostream;
9039 typedef basic_iostream<wchar_t> wiostream;
9040 typedef basic_stringbuf<wchar_t> wstringbuf;
9041 typedef basic_istringstream<wchar_t> wistringstream;
9042 typedef basic_ostringstream<wchar_t> wostringstream;
9043 typedef basic_stringstream<wchar_t> wstringstream;
9044 typedef basic_filebuf<wchar_t> wfilebuf;
9045 typedef basic_ifstream<wchar_t> wifstream;
9046 typedef basic_ofstream<wchar_t> wofstream;
9047 typedef basic_fstream<wchar_t> wfstream;
9048
9049
9050
9051 }
9052 # 71 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 2 3
9053 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_pair.h" 1 3
9054 # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_pair.h" 3
9055 namespace std __attribute__ ((__visibility__ ("default"))) {
9056
9057
9058 template<class _T1, class _T2>
9059 struct pair
9060 {
9061 typedef _T1 first_type;
9062 typedef _T2 second_type;
9063
9064 _T1 first;
9065 _T2 second;
9066
9067
9068
9069
9070
9071 pair()
9072 : first(), second() { }
9073
9074
9075 pair(const _T1& __a, const _T2& __b)
9076 : first(__a), second(__b) { }
9077
9078
9079 template<class _U1, class _U2>
9080 pair(const pair<_U1, _U2>& __p)
9081 : first(__p.first), second(__p.second) { }
9082 };
9083
9084
9085 template<class _T1, class _T2>
9086 inline bool
9087 operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
9088 { return __x.first == __y.first && __x.second == __y.second; }
9089
9090
9091 template<class _T1, class _T2>
9092 inline bool
9093 operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
9094 { return __x.first < __y.first
9095 || (!(__y.first < __x.first) && __x.second < __y.second); }
9096
9097
9098 template<class _T1, class _T2>
9099 inline bool
9100 operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
9101 { return !(__x == __y); }
9102
9103
9104 template<class _T1, class _T2>
9105 inline bool
9106 operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
9107 { return __y < __x; }
9108
9109
9110 template<class _T1, class _T2>
9111 inline bool
9112 operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
9113 { return !(__y < __x); }
9114
9115
9116 template<class _T1, class _T2>
9117 inline bool
9118 operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
9119 { return !(__x < __y); }
9120 # 142 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_pair.h" 3
9121 template<class _T1, class _T2>
9122 inline pair<_T1, _T2>
9123 make_pair(_T1 __x, _T2 __y)
9124 { return pair<_T1, _T2>(__x, __y); }
9125
9126 }
9127 # 72 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 2 3
9128 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/cpp_type_traits.h" 1 3
9129 # 41 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/cpp_type_traits.h" 3
9130
9131 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/cpp_type_traits.h" 3
9132 # 74 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/cpp_type_traits.h" 3
9133 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
9134
9135 template<typename _Iterator, typename _Container>
9136 class __normal_iterator;
9137
9138 }
9139
9140 namespace std __attribute__ ((__visibility__ ("default"))) {
9141
9142 namespace __detail
9143 {
9144
9145
9146 typedef char __one;
9147 typedef char __two[2];
9148
9149 template<typename _Tp>
9150 __one __test_type(int _Tp::*);
9151 template<typename _Tp>
9152 __two& __test_type(...);
9153 }
9154
9155
9156 struct __true_type { };
9157 struct __false_type { };
9158
9159 template<bool>
9160 struct __truth_type
9161 { typedef __false_type __type; };
9162
9163 template<>
9164 struct __truth_type<true>
9165 { typedef __true_type __type; };
9166
9167
9168
9169 template<class _Sp, class _Tp>
9170 struct __traitor
9171 {
9172 enum { __value = bool(_Sp::__value) || bool(_Tp::__value) };
9173 typedef typename __truth_type<__value>::__type __type;
9174 };
9175
9176
9177 template<typename, typename>
9178 struct __are_same
9179 {
9180 enum { __value = 0 };
9181 typedef __false_type __type;
9182 };
9183
9184 template<typename _Tp>
9185 struct __are_same<_Tp, _Tp>
9186 {
9187 enum { __value = 1 };
9188 typedef __true_type __type;
9189 };
9190
9191
9192 template<typename _Tp>
9193 struct __is_void
9194 {
9195 enum { __value = 0 };
9196 typedef __false_type __type;
9197 };
9198
9199 template<>
9200 struct __is_void<void>
9201 {
9202 enum { __value = 1 };
9203 typedef __true_type __type;
9204 };
9205
9206
9207
9208
9209 template<typename _Tp>
9210 struct __is_integer
9211 {
9212 enum { __value = 0 };
9213 typedef __false_type __type;
9214 };
9215
9216
9217
9218
9219 template<>
9220 struct __is_integer<bool>
9221 {
9222 enum { __value = 1 };
9223 typedef __true_type __type;
9224 };
9225
9226 template<>
9227 struct __is_integer<char>
9228 {
9229 enum { __value = 1 };
9230 typedef __true_type __type;
9231 };
9232
9233 template<>
9234 struct __is_integer<signed char>
9235 {
9236 enum { __value = 1 };
9237 typedef __true_type __type;
9238 };
9239
9240 template<>
9241 struct __is_integer<unsigned char>
9242 {
9243 enum { __value = 1 };
9244 typedef __true_type __type;
9245 };
9246
9247
9248 template<>
9249 struct __is_integer<wchar_t>
9250 {
9251 enum { __value = 1 };
9252 typedef __true_type __type;
9253 };
9254
9255
9256 template<>
9257 struct __is_integer<short>
9258 {
9259 enum { __value = 1 };
9260 typedef __true_type __type;
9261 };
9262
9263 template<>
9264 struct __is_integer<unsigned short>
9265 {
9266 enum { __value = 1 };
9267 typedef __true_type __type;
9268 };
9269
9270 template<>
9271 struct __is_integer<int>
9272 {
9273 enum { __value = 1 };
9274 typedef __true_type __type;
9275 };
9276
9277 template<>
9278 struct __is_integer<unsigned int>
9279 {
9280 enum { __value = 1 };
9281 typedef __true_type __type;
9282 };
9283
9284 template<>
9285 struct __is_integer<long>
9286 {
9287 enum { __value = 1 };
9288 typedef __true_type __type;
9289 };
9290
9291 template<>
9292 struct __is_integer<unsigned long>
9293 {
9294 enum { __value = 1 };
9295 typedef __true_type __type;
9296 };
9297
9298 template<>
9299 struct __is_integer<long long>
9300 {
9301 enum { __value = 1 };
9302 typedef __true_type __type;
9303 };
9304
9305 template<>
9306 struct __is_integer<unsigned long long>
9307 {
9308 enum { __value = 1 };
9309 typedef __true_type __type;
9310 };
9311
9312
9313
9314
9315 template<typename _Tp>
9316 struct __is_floating
9317 {
9318 enum { __value = 0 };
9319 typedef __false_type __type;
9320 };
9321
9322
9323 template<>
9324 struct __is_floating<float>
9325 {
9326 enum { __value = 1 };
9327 typedef __true_type __type;
9328 };
9329
9330 template<>
9331 struct __is_floating<double>
9332 {
9333 enum { __value = 1 };
9334 typedef __true_type __type;
9335 };
9336
9337 template<>
9338 struct __is_floating<long double>
9339 {
9340 enum { __value = 1 };
9341 typedef __true_type __type;
9342 };
9343
9344
9345
9346
9347 template<typename _Tp>
9348 struct __is_pointer
9349 {
9350 enum { __value = 0 };
9351 typedef __false_type __type;
9352 };
9353
9354 template<typename _Tp>
9355 struct __is_pointer<_Tp*>
9356 {
9357 enum { __value = 1 };
9358 typedef __true_type __type;
9359 };
9360
9361
9362
9363
9364 template<typename _Tp>
9365 struct __is_normal_iterator
9366 {
9367 enum { __value = 0 };
9368 typedef __false_type __type;
9369 };
9370
9371 template<typename _Iterator, typename _Container>
9372 struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator,
9373 _Container> >
9374 {
9375 enum { __value = 1 };
9376 typedef __true_type __type;
9377 };
9378
9379
9380
9381
9382 template<typename _Tp>
9383 struct __is_arithmetic
9384 : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> >
9385 { };
9386
9387
9388
9389
9390 template<typename _Tp>
9391 struct __is_fundamental
9392 : public __traitor<__is_void<_Tp>, __is_arithmetic<_Tp> >
9393 { };
9394
9395
9396
9397
9398 template<typename _Tp>
9399 struct __is_scalar
9400 : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> >
9401 { };
9402
9403
9404 template<typename _Tp>
9405 struct __is_pod
9406 {
9407 enum
9408 {
9409 __value = (sizeof(__detail::__test_type<_Tp>(0))
9410 != sizeof(__detail::__one))
9411 };
9412 };
9413
9414
9415
9416
9417 template<typename _Tp>
9418 struct __is_empty
9419 {
9420 private:
9421 template<typename>
9422 struct __first { };
9423 template<typename _Up>
9424 struct __second
9425 : public _Up { };
9426
9427 public:
9428 enum
9429 {
9430 __value = sizeof(__first<_Tp>) == sizeof(__second<_Tp>)
9431 };
9432 };
9433
9434
9435
9436
9437 template<typename _Tp>
9438 struct __is_char
9439 {
9440 enum { __value = 0 };
9441 typedef __false_type __type;
9442 };
9443
9444 template<>
9445 struct __is_char<char>
9446 {
9447 enum { __value = 1 };
9448 typedef __true_type __type;
9449 };
9450
9451
9452 template<>
9453 struct __is_char<wchar_t>
9454 {
9455 enum { __value = 1 };
9456 typedef __true_type __type;
9457 };
9458
9459
9460 }
9461 # 73 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 2 3
9462 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/type_traits.h" 1 3
9463 # 38 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/type_traits.h" 3
9464
9465 # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/type_traits.h" 3
9466
9467
9468 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/utility" 1 3
9469 # 63 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/utility" 3
9470
9471 # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/utility" 3
9472
9473
9474 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_relops.h" 1 3
9475 # 74 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_relops.h" 3
9476 namespace std __attribute__ ((__visibility__ ("default"))) {
9477
9478 namespace rel_ops
9479 {
9480 # 90 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_relops.h" 3
9481 template <class _Tp>
9482 inline bool
9483 operator!=(const _Tp& __x, const _Tp& __y)
9484 { return !(__x == __y); }
9485 # 103 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_relops.h" 3
9486 template <class _Tp>
9487 inline bool
9488 operator>(const _Tp& __x, const _Tp& __y)
9489 { return __y < __x; }
9490 # 116 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_relops.h" 3
9491 template <class _Tp>
9492 inline bool
9493 operator<=(const _Tp& __x, const _Tp& __y)
9494 { return !(__y < __x); }
9495 # 129 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_relops.h" 3
9496 template <class _Tp>
9497 inline bool
9498 operator>=(const _Tp& __x, const _Tp& __y)
9499 { return !(__x < __y); }
9500
9501 }
9502
9503 }
9504 # 67 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/utility" 2 3
9505 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/type_traits.h" 2 3
9506
9507
9508 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
9509
9510
9511 template<bool, typename>
9512 struct __enable_if
9513 { };
9514
9515 template<typename _Tp>
9516 struct __enable_if<true, _Tp>
9517 { typedef _Tp __type; };
9518
9519
9520
9521 template<bool _Cond, typename _Iftrue, typename _Iffalse>
9522 struct __conditional_type
9523 { typedef _Iftrue __type; };
9524
9525 template<typename _Iftrue, typename _Iffalse>
9526 struct __conditional_type<false, _Iftrue, _Iffalse>
9527 { typedef _Iffalse __type; };
9528
9529
9530
9531 template<typename _Tp>
9532 struct __add_unsigned
9533 {
9534 private:
9535 typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type;
9536
9537 public:
9538 typedef typename __if_type::__type __type;
9539 };
9540
9541 template<>
9542 struct __add_unsigned<char>
9543 { typedef unsigned char __type; };
9544
9545 template<>
9546 struct __add_unsigned<signed char>
9547 { typedef unsigned char __type; };
9548
9549 template<>
9550 struct __add_unsigned<short>
9551 { typedef unsigned short __type; };
9552
9553 template<>
9554 struct __add_unsigned<int>
9555 { typedef unsigned int __type; };
9556
9557 template<>
9558 struct __add_unsigned<long>
9559 { typedef unsigned long __type; };
9560
9561 template<>
9562 struct __add_unsigned<long long>
9563 { typedef unsigned long long __type; };
9564
9565
9566 template<>
9567 struct __add_unsigned<bool>;
9568
9569 template<>
9570 struct __add_unsigned<wchar_t>;
9571
9572
9573
9574 template<typename _Tp>
9575 struct __remove_unsigned
9576 {
9577 private:
9578 typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type;
9579
9580 public:
9581 typedef typename __if_type::__type __type;
9582 };
9583
9584 template<>
9585 struct __remove_unsigned<char>
9586 { typedef signed char __type; };
9587
9588 template<>
9589 struct __remove_unsigned<unsigned char>
9590 { typedef signed char __type; };
9591
9592 template<>
9593 struct __remove_unsigned<unsigned short>
9594 { typedef short __type; };
9595
9596 template<>
9597 struct __remove_unsigned<unsigned int>
9598 { typedef int __type; };
9599
9600 template<>
9601 struct __remove_unsigned<unsigned long>
9602 { typedef long __type; };
9603
9604 template<>
9605 struct __remove_unsigned<unsigned long long>
9606 { typedef long long __type; };
9607
9608
9609 template<>
9610 struct __remove_unsigned<bool>;
9611
9612 template<>
9613 struct __remove_unsigned<wchar_t>;
9614
9615 }
9616 # 74 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 2 3
9617 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator_base_types.h" 1 3
9618 # 67 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator_base_types.h" 3
9619
9620 # 68 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator_base_types.h" 3
9621
9622 namespace std __attribute__ ((__visibility__ ("default"))) {
9623 # 80 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator_base_types.h" 3
9624 struct input_iterator_tag {};
9625
9626 struct output_iterator_tag {};
9627
9628 struct forward_iterator_tag : public input_iterator_tag {};
9629
9630
9631 struct bidirectional_iterator_tag : public forward_iterator_tag {};
9632
9633
9634 struct random_access_iterator_tag : public bidirectional_iterator_tag {};
9635 # 104 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator_base_types.h" 3
9636 template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t,
9637 typename _Pointer = _Tp*, typename _Reference = _Tp&>
9638 struct iterator
9639 {
9640
9641 typedef _Category iterator_category;
9642
9643 typedef _Tp value_type;
9644
9645 typedef _Distance difference_type;
9646
9647 typedef _Pointer pointer;
9648
9649 typedef _Reference reference;
9650 };
9651
9652
9653
9654
9655
9656
9657
9658 template<typename _Iterator>
9659 struct iterator_traits
9660 {
9661 typedef typename _Iterator::iterator_category iterator_category;
9662 typedef typename _Iterator::value_type value_type;
9663 typedef typename _Iterator::difference_type difference_type;
9664 typedef typename _Iterator::pointer pointer;
9665 typedef typename _Iterator::reference reference;
9666 };
9667
9668 template<typename _Tp>
9669 struct iterator_traits<_Tp*>
9670 {
9671 typedef random_access_iterator_tag iterator_category;
9672 typedef _Tp value_type;
9673 typedef ptrdiff_t difference_type;
9674 typedef _Tp* pointer;
9675 typedef _Tp& reference;
9676 };
9677
9678 template<typename _Tp>
9679 struct iterator_traits<const _Tp*>
9680 {
9681 typedef random_access_iterator_tag iterator_category;
9682 typedef _Tp value_type;
9683 typedef ptrdiff_t difference_type;
9684 typedef const _Tp* pointer;
9685 typedef const _Tp& reference;
9686 };
9687
9688
9689
9690
9691
9692
9693
9694 template<typename _Iter>
9695 inline typename iterator_traits<_Iter>::iterator_category
9696 __iterator_category(const _Iter&)
9697 { return typename iterator_traits<_Iter>::iterator_category(); }
9698
9699 }
9700 # 75 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 2 3
9701 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator_base_funcs.h" 1 3
9702 # 68 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator_base_funcs.h" 3
9703
9704 # 69 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator_base_funcs.h" 3
9705 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/concept_check.h" 1 3
9706 # 38 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/concept_check.h" 3
9707
9708 # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/concept_check.h" 3
9709 # 70 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator_base_funcs.h" 2 3
9710
9711 namespace std __attribute__ ((__visibility__ ("default"))) {
9712
9713 template<typename _InputIterator>
9714 inline typename iterator_traits<_InputIterator>::difference_type
9715 __distance(_InputIterator __first, _InputIterator __last,
9716 input_iterator_tag)
9717 {
9718
9719
9720
9721 typename iterator_traits<_InputIterator>::difference_type __n = 0;
9722 while (__first != __last)
9723 {
9724 ++__first;
9725 ++__n;
9726 }
9727 return __n;
9728 }
9729
9730 template<typename _RandomAccessIterator>
9731 inline typename iterator_traits<_RandomAccessIterator>::difference_type
9732 __distance(_RandomAccessIterator __first, _RandomAccessIterator __last,
9733 random_access_iterator_tag)
9734 {
9735
9736
9737
9738 return __last - __first;
9739 }
9740 # 113 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator_base_funcs.h" 3
9741 template<typename _InputIterator>
9742 inline typename iterator_traits<_InputIterator>::difference_type
9743 distance(_InputIterator __first, _InputIterator __last)
9744 {
9745
9746 return std::__distance(__first, __last,
9747 std::__iterator_category(__first));
9748 }
9749
9750 template<typename _InputIterator, typename _Distance>
9751 inline void
9752 __advance(_InputIterator& __i, _Distance __n, input_iterator_tag)
9753 {
9754
9755
9756 while (__n--)
9757 ++__i;
9758 }
9759
9760 template<typename _BidirectionalIterator, typename _Distance>
9761 inline void
9762 __advance(_BidirectionalIterator& __i, _Distance __n,
9763 bidirectional_iterator_tag)
9764 {
9765
9766
9767
9768 if (__n > 0)
9769 while (__n--)
9770 ++__i;
9771 else
9772 while (__n++)
9773 --__i;
9774 }
9775
9776 template<typename _RandomAccessIterator, typename _Distance>
9777 inline void
9778 __advance(_RandomAccessIterator& __i, _Distance __n,
9779 random_access_iterator_tag)
9780 {
9781
9782
9783
9784 __i += __n;
9785 }
9786 # 171 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator_base_funcs.h" 3
9787 template<typename _InputIterator, typename _Distance>
9788 inline void
9789 advance(_InputIterator& __i, _Distance __n)
9790 {
9791
9792 typename iterator_traits<_InputIterator>::difference_type __d = __n;
9793 std::__advance(__i, __d, std::__iterator_category(__i));
9794 }
9795
9796 }
9797 # 76 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 2 3
9798 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 1 3
9799 # 72 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3
9800 namespace std __attribute__ ((__visibility__ ("default"))) {
9801 # 93 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3
9802 template<typename _Iterator>
9803 class reverse_iterator
9804 : public iterator<typename iterator_traits<_Iterator>::iterator_category,
9805 typename iterator_traits<_Iterator>::value_type,
9806 typename iterator_traits<_Iterator>::difference_type,
9807 typename iterator_traits<_Iterator>::pointer,
9808 typename iterator_traits<_Iterator>::reference>
9809 {
9810 protected:
9811 _Iterator current;
9812
9813 public:
9814 typedef _Iterator iterator_type;
9815 typedef typename iterator_traits<_Iterator>::difference_type
9816 difference_type;
9817 typedef typename iterator_traits<_Iterator>::reference reference;
9818 typedef typename iterator_traits<_Iterator>::pointer pointer;
9819
9820 public:
9821
9822
9823
9824
9825
9826
9827 reverse_iterator() : current() { }
9828
9829
9830
9831
9832 explicit
9833 reverse_iterator(iterator_type __x) : current(__x) { }
9834
9835
9836
9837
9838 reverse_iterator(const reverse_iterator& __x)
9839 : current(__x.current) { }
9840
9841
9842
9843
9844
9845 template<typename _Iter>
9846 reverse_iterator(const reverse_iterator<_Iter>& __x)
9847 : current(__x.base()) { }
9848
9849
9850
9851
9852 iterator_type
9853 base() const
9854 { return current; }
9855
9856
9857
9858
9859
9860
9861 reference
9862 operator*() const
9863 {
9864 _Iterator __tmp = current;
9865 return *--__tmp;
9866 }
9867
9868
9869
9870
9871
9872
9873 pointer
9874 operator->() const
9875 { return &(operator*()); }
9876
9877
9878
9879
9880
9881
9882 reverse_iterator&
9883 operator++()
9884 {
9885 --current;
9886 return *this;
9887 }
9888
9889
9890
9891
9892
9893
9894 reverse_iterator
9895 operator++(int)
9896 {
9897 reverse_iterator __tmp = *this;
9898 --current;
9899 return __tmp;
9900 }
9901
9902
9903
9904
9905
9906
9907 reverse_iterator&
9908 operator--()
9909 {
9910 ++current;
9911 return *this;
9912 }
9913
9914
9915
9916
9917
9918
9919 reverse_iterator
9920 operator--(int)
9921 {
9922 reverse_iterator __tmp = *this;
9923 ++current;
9924 return __tmp;
9925 }
9926
9927
9928
9929
9930
9931
9932 reverse_iterator
9933 operator+(difference_type __n) const
9934 { return reverse_iterator(current - __n); }
9935
9936
9937
9938
9939
9940
9941 reverse_iterator&
9942 operator+=(difference_type __n)
9943 {
9944 current -= __n;
9945 return *this;
9946 }
9947
9948
9949
9950
9951
9952
9953 reverse_iterator
9954 operator-(difference_type __n) const
9955 { return reverse_iterator(current + __n); }
9956
9957
9958
9959
9960
9961
9962 reverse_iterator&
9963 operator-=(difference_type __n)
9964 {
9965 current += __n;
9966 return *this;
9967 }
9968
9969
9970
9971
9972
9973
9974 reference
9975 operator[](difference_type __n) const
9976 { return *(*this + __n); }
9977 };
9978 # 280 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3
9979 template<typename _Iterator>
9980 inline bool
9981 operator==(const reverse_iterator<_Iterator>& __x,
9982 const reverse_iterator<_Iterator>& __y)
9983 { return __x.base() == __y.base(); }
9984
9985 template<typename _Iterator>
9986 inline bool
9987 operator<(const reverse_iterator<_Iterator>& __x,
9988 const reverse_iterator<_Iterator>& __y)
9989 { return __y.base() < __x.base(); }
9990
9991 template<typename _Iterator>
9992 inline bool
9993 operator!=(const reverse_iterator<_Iterator>& __x,
9994 const reverse_iterator<_Iterator>& __y)
9995 { return !(__x == __y); }
9996
9997 template<typename _Iterator>
9998 inline bool
9999 operator>(const reverse_iterator<_Iterator>& __x,
10000 const reverse_iterator<_Iterator>& __y)
10001 { return __y < __x; }
10002
10003 template<typename _Iterator>
10004 inline bool
10005 operator<=(const reverse_iterator<_Iterator>& __x,
10006 const reverse_iterator<_Iterator>& __y)
10007 { return !(__y < __x); }
10008
10009 template<typename _Iterator>
10010 inline bool
10011 operator>=(const reverse_iterator<_Iterator>& __x,
10012 const reverse_iterator<_Iterator>& __y)
10013 { return !(__x < __y); }
10014
10015 template<typename _Iterator>
10016 inline typename reverse_iterator<_Iterator>::difference_type
10017 operator-(const reverse_iterator<_Iterator>& __x,
10018 const reverse_iterator<_Iterator>& __y)
10019 { return __y.base() - __x.base(); }
10020
10021 template<typename _Iterator>
10022 inline reverse_iterator<_Iterator>
10023 operator+(typename reverse_iterator<_Iterator>::difference_type __n,
10024 const reverse_iterator<_Iterator>& __x)
10025 { return reverse_iterator<_Iterator>(__x.base() - __n); }
10026
10027
10028
10029 template<typename _IteratorL, typename _IteratorR>
10030 inline bool
10031 operator==(const reverse_iterator<_IteratorL>& __x,
10032 const reverse_iterator<_IteratorR>& __y)
10033 { return __x.base() == __y.base(); }
10034
10035 template<typename _IteratorL, typename _IteratorR>
10036 inline bool
10037 operator<(const reverse_iterator<_IteratorL>& __x,
10038 const reverse_iterator<_IteratorR>& __y)
10039 { return __y.base() < __x.base(); }
10040
10041 template<typename _IteratorL, typename _IteratorR>
10042 inline bool
10043 operator!=(const reverse_iterator<_IteratorL>& __x,
10044 const reverse_iterator<_IteratorR>& __y)
10045 { return !(__x == __y); }
10046
10047 template<typename _IteratorL, typename _IteratorR>
10048 inline bool
10049 operator>(const reverse_iterator<_IteratorL>& __x,
10050 const reverse_iterator<_IteratorR>& __y)
10051 { return __y < __x; }
10052
10053 template<typename _IteratorL, typename _IteratorR>
10054 inline bool
10055 operator<=(const reverse_iterator<_IteratorL>& __x,
10056 const reverse_iterator<_IteratorR>& __y)
10057 { return !(__y < __x); }
10058
10059 template<typename _IteratorL, typename _IteratorR>
10060 inline bool
10061 operator>=(const reverse_iterator<_IteratorL>& __x,
10062 const reverse_iterator<_IteratorR>& __y)
10063 { return !(__x < __y); }
10064
10065 template<typename _IteratorL, typename _IteratorR>
10066 inline typename reverse_iterator<_IteratorL>::difference_type
10067 operator-(const reverse_iterator<_IteratorL>& __x,
10068 const reverse_iterator<_IteratorR>& __y)
10069 { return __y.base() - __x.base(); }
10070 # 384 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3
10071 template<typename _Container>
10072 class back_insert_iterator
10073 : public iterator<output_iterator_tag, void, void, void, void>
10074 {
10075 protected:
10076 _Container* container;
10077
10078 public:
10079
10080 typedef _Container container_type;
10081
10082
10083 explicit
10084 back_insert_iterator(_Container& __x) : container(&__x) { }
10085 # 410 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3
10086 back_insert_iterator&
10087 operator=(typename _Container::const_reference __value)
10088 {
10089 container->push_back(__value);
10090 return *this;
10091 }
10092
10093
10094 back_insert_iterator&
10095 operator*()
10096 { return *this; }
10097
10098
10099 back_insert_iterator&
10100 operator++()
10101 { return *this; }
10102
10103
10104 back_insert_iterator
10105 operator++(int)
10106 { return *this; }
10107 };
10108 # 444 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3
10109 template<typename _Container>
10110 inline back_insert_iterator<_Container>
10111 back_inserter(_Container& __x)
10112 { return back_insert_iterator<_Container>(__x); }
10113 # 459 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3
10114 template<typename _Container>
10115 class front_insert_iterator
10116 : public iterator<output_iterator_tag, void, void, void, void>
10117 {
10118 protected:
10119 _Container* container;
10120
10121 public:
10122
10123 typedef _Container container_type;
10124
10125
10126 explicit front_insert_iterator(_Container& __x) : container(&__x) { }
10127 # 484 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3
10128 front_insert_iterator&
10129 operator=(typename _Container::const_reference __value)
10130 {
10131 container->push_front(__value);
10132 return *this;
10133 }
10134
10135
10136 front_insert_iterator&
10137 operator*()
10138 { return *this; }
10139
10140
10141 front_insert_iterator&
10142 operator++()
10143 { return *this; }
10144
10145
10146 front_insert_iterator
10147 operator++(int)
10148 { return *this; }
10149 };
10150 # 518 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3
10151 template<typename _Container>
10152 inline front_insert_iterator<_Container>
10153 front_inserter(_Container& __x)
10154 { return front_insert_iterator<_Container>(__x); }
10155 # 537 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3
10156 template<typename _Container>
10157 class insert_iterator
10158 : public iterator<output_iterator_tag, void, void, void, void>
10159 {
10160 protected:
10161 _Container* container;
10162 typename _Container::iterator iter;
10163
10164 public:
10165
10166 typedef _Container container_type;
10167
10168
10169
10170
10171
10172 insert_iterator(_Container& __x, typename _Container::iterator __i)
10173 : container(&__x), iter(__i) {}
10174 # 579 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3
10175 insert_iterator&
10176 operator=(const typename _Container::const_reference __value)
10177 {
10178 iter = container->insert(iter, __value);
10179 ++iter;
10180 return *this;
10181 }
10182
10183
10184 insert_iterator&
10185 operator*()
10186 { return *this; }
10187
10188
10189 insert_iterator&
10190 operator++()
10191 { return *this; }
10192
10193
10194 insert_iterator&
10195 operator++(int)
10196 { return *this; }
10197 };
10198 # 614 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3
10199 template<typename _Container, typename _Iterator>
10200 inline insert_iterator<_Container>
10201 inserter(_Container& __x, _Iterator __i)
10202 {
10203 return insert_iterator<_Container>(__x,
10204 typename _Container::iterator(__i));
10205 }
10206
10207 }
10208
10209 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
10210 # 633 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3
10211 using std::iterator_traits;
10212 using std::iterator;
10213 template<typename _Iterator, typename _Container>
10214 class __normal_iterator
10215 {
10216 protected:
10217 _Iterator _M_current;
10218
10219 public:
10220 typedef typename iterator_traits<_Iterator>::iterator_category
10221 iterator_category;
10222 typedef typename iterator_traits<_Iterator>::value_type value_type;
10223 typedef typename iterator_traits<_Iterator>::difference_type
10224 difference_type;
10225 typedef typename iterator_traits<_Iterator>::reference reference;
10226 typedef typename iterator_traits<_Iterator>::pointer pointer;
10227
10228 __normal_iterator() : _M_current(_Iterator()) { }
10229
10230 explicit
10231 __normal_iterator(const _Iterator& __i) : _M_current(__i) { }
10232
10233
10234 template<typename _Iter>
10235 __normal_iterator(const __normal_iterator<_Iter,
10236 typename __enable_if<
10237 (std::__are_same<_Iter, typename _Container::pointer>::__value),
10238 _Container>::__type>& __i)
10239 : _M_current(__i.base()) { }
10240
10241
10242 reference
10243 operator*() const
10244 { return *_M_current; }
10245
10246 pointer
10247 operator->() const
10248 { return _M_current; }
10249
10250 __normal_iterator&
10251 operator++()
10252 {
10253 ++_M_current;
10254 return *this;
10255 }
10256
10257 __normal_iterator
10258 operator++(int)
10259 { return __normal_iterator(_M_current++); }
10260
10261
10262 __normal_iterator&
10263 operator--()
10264 {
10265 --_M_current;
10266 return *this;
10267 }
10268
10269 __normal_iterator
10270 operator--(int)
10271 { return __normal_iterator(_M_current--); }
10272
10273
10274 reference
10275 operator[](const difference_type& __n) const
10276 { return _M_current[__n]; }
10277
10278 __normal_iterator&
10279 operator+=(const difference_type& __n)
10280 { _M_current += __n; return *this; }
10281
10282 __normal_iterator
10283 operator+(const difference_type& __n) const
10284 { return __normal_iterator(_M_current + __n); }
10285
10286 __normal_iterator&
10287 operator-=(const difference_type& __n)
10288 { _M_current -= __n; return *this; }
10289
10290 __normal_iterator
10291 operator-(const difference_type& __n) const
10292 { return __normal_iterator(_M_current - __n); }
10293
10294 const _Iterator&
10295 base() const
10296 { return _M_current; }
10297 };
10298 # 730 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3
10299 template<typename _IteratorL, typename _IteratorR, typename _Container>
10300 inline bool
10301 operator==(const __normal_iterator<_IteratorL, _Container>& __lhs,
10302 const __normal_iterator<_IteratorR, _Container>& __rhs)
10303 { return __lhs.base() == __rhs.base(); }
10304
10305 template<typename _Iterator, typename _Container>
10306 inline bool
10307 operator==(const __normal_iterator<_Iterator, _Container>& __lhs,
10308 const __normal_iterator<_Iterator, _Container>& __rhs)
10309 { return __lhs.base() == __rhs.base(); }
10310
10311 template<typename _IteratorL, typename _IteratorR, typename _Container>
10312 inline bool
10313 operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs,
10314 const __normal_iterator<_IteratorR, _Container>& __rhs)
10315 { return __lhs.base() != __rhs.base(); }
10316
10317 template<typename _Iterator, typename _Container>
10318 inline bool
10319 operator!=(const __normal_iterator<_Iterator, _Container>& __lhs,
10320 const __normal_iterator<_Iterator, _Container>& __rhs)
10321 { return __lhs.base() != __rhs.base(); }
10322
10323
10324 template<typename _IteratorL, typename _IteratorR, typename _Container>
10325 inline bool
10326 operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
10327 const __normal_iterator<_IteratorR, _Container>& __rhs)
10328 { return __lhs.base() < __rhs.base(); }
10329
10330 template<typename _Iterator, typename _Container>
10331 inline bool
10332 operator<(const __normal_iterator<_Iterator, _Container>& __lhs,
10333 const __normal_iterator<_Iterator, _Container>& __rhs)
10334 { return __lhs.base() < __rhs.base(); }
10335
10336 template<typename _IteratorL, typename _IteratorR, typename _Container>
10337 inline bool
10338 operator>(const __normal_iterator<_IteratorL, _Container>& __lhs,
10339 const __normal_iterator<_IteratorR, _Container>& __rhs)
10340 { return __lhs.base() > __rhs.base(); }
10341
10342 template<typename _Iterator, typename _Container>
10343 inline bool
10344 operator>(const __normal_iterator<_Iterator, _Container>& __lhs,
10345 const __normal_iterator<_Iterator, _Container>& __rhs)
10346 { return __lhs.base() > __rhs.base(); }
10347
10348 template<typename _IteratorL, typename _IteratorR, typename _Container>
10349 inline bool
10350 operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs,
10351 const __normal_iterator<_IteratorR, _Container>& __rhs)
10352 { return __lhs.base() <= __rhs.base(); }
10353
10354 template<typename _Iterator, typename _Container>
10355 inline bool
10356 operator<=(const __normal_iterator<_Iterator, _Container>& __lhs,
10357 const __normal_iterator<_Iterator, _Container>& __rhs)
10358 { return __lhs.base() <= __rhs.base(); }
10359
10360 template<typename _IteratorL, typename _IteratorR, typename _Container>
10361 inline bool
10362 operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs,
10363 const __normal_iterator<_IteratorR, _Container>& __rhs)
10364 { return __lhs.base() >= __rhs.base(); }
10365
10366 template<typename _Iterator, typename _Container>
10367 inline bool
10368 operator>=(const __normal_iterator<_Iterator, _Container>& __lhs,
10369 const __normal_iterator<_Iterator, _Container>& __rhs)
10370 { return __lhs.base() >= __rhs.base(); }
10371
10372
10373
10374
10375
10376 template<typename _IteratorL, typename _IteratorR, typename _Container>
10377 inline typename __normal_iterator<_IteratorL, _Container>::difference_type
10378 operator-(const __normal_iterator<_IteratorL, _Container>& __lhs,
10379 const __normal_iterator<_IteratorR, _Container>& __rhs)
10380 { return __lhs.base() - __rhs.base(); }
10381
10382 template<typename _Iterator, typename _Container>
10383 inline typename __normal_iterator<_Iterator, _Container>::difference_type
10384 operator-(const __normal_iterator<_Iterator, _Container>& __lhs,
10385 const __normal_iterator<_Iterator, _Container>& __rhs)
10386 { return __lhs.base() - __rhs.base(); }
10387
10388 template<typename _Iterator, typename _Container>
10389 inline __normal_iterator<_Iterator, _Container>
10390 operator+(typename __normal_iterator<_Iterator, _Container>::difference_type
10391 __n, const __normal_iterator<_Iterator, _Container>& __i)
10392 { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); }
10393
10394 }
10395 # 77 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 2 3
10396
10397 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/debug/debug.h" 1 3
10398 # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/debug/debug.h" 3
10399 namespace std
10400 {
10401 namespace __debug { }
10402 }
10403
10404 namespace __gnu_cxx
10405 {
10406 namespace __debug { };
10407 }
10408
10409 namespace __gnu_debug
10410 {
10411 using namespace std::__debug;
10412 using namespace __gnu_cxx::__debug;
10413 }
10414 # 79 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 2 3
10415
10416 namespace std __attribute__ ((__visibility__ ("default"))) {
10417 # 91 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3
10418 template<typename _Tp>
10419 inline void
10420 swap(_Tp& __a, _Tp& __b)
10421 {
10422
10423
10424
10425 _Tp __tmp = __a;
10426 __a = __b;
10427 __b = __tmp;
10428 }
10429
10430
10431
10432
10433 template<bool _BoolType>
10434 struct __iter_swap
10435 {
10436 template<typename _ForwardIterator1, typename _ForwardIterator2>
10437 static void
10438 iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
10439 {
10440 typedef typename iterator_traits<_ForwardIterator1>::value_type
10441 _ValueType1;
10442 _ValueType1 __tmp = *__a;
10443 *__a = *__b;
10444 *__b = __tmp;
10445 }
10446 };
10447
10448 template<>
10449 struct __iter_swap<true>
10450 {
10451 template<typename _ForwardIterator1, typename _ForwardIterator2>
10452 static void
10453 iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
10454 {
10455 swap(*__a, *__b);
10456 }
10457 };
10458 # 141 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3
10459 template<typename _ForwardIterator1, typename _ForwardIterator2>
10460 inline void
10461 iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
10462 {
10463 typedef typename iterator_traits<_ForwardIterator1>::value_type
10464 _ValueType1;
10465 typedef typename iterator_traits<_ForwardIterator2>::value_type
10466 _ValueType2;
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478 typedef typename iterator_traits<_ForwardIterator1>::reference
10479 _ReferenceType1;
10480 typedef typename iterator_traits<_ForwardIterator2>::reference
10481 _ReferenceType2;
10482 std::__iter_swap<__are_same<_ValueType1, _ValueType2>::__value &&
10483 __are_same<_ValueType1 &, _ReferenceType1>::__value &&
10484 __are_same<_ValueType2 &, _ReferenceType2>::__value>::
10485 iter_swap(__a, __b);
10486 }
10487 # 180 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3
10488 template<typename _Tp>
10489 inline const _Tp&
10490 min(const _Tp& __a, const _Tp& __b)
10491 {
10492
10493
10494
10495 if (__b < __a)
10496 return __b;
10497 return __a;
10498 }
10499 # 202 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3
10500 template<typename _Tp>
10501 inline const _Tp&
10502 max(const _Tp& __a, const _Tp& __b)
10503 {
10504
10505
10506
10507 if (__a < __b)
10508 return __b;
10509 return __a;
10510 }
10511 # 224 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3
10512 template<typename _Tp, typename _Compare>
10513 inline const _Tp&
10514 min(const _Tp& __a, const _Tp& __b, _Compare __comp)
10515 {
10516
10517 if (__comp(__b, __a))
10518 return __b;
10519 return __a;
10520 }
10521 # 244 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3
10522 template<typename _Tp, typename _Compare>
10523 inline const _Tp&
10524 max(const _Tp& __a, const _Tp& __b, _Compare __comp)
10525 {
10526
10527 if (__comp(__a, __b))
10528 return __b;
10529 return __a;
10530 }
10531
10532
10533
10534
10535
10536
10537
10538 template<bool, typename>
10539 struct __copy
10540 {
10541 template<typename _II, typename _OI>
10542 static _OI
10543 copy(_II __first, _II __last, _OI __result)
10544 {
10545 for (; __first != __last; ++__result, ++__first)
10546 *__result = *__first;
10547 return __result;
10548 }
10549 };
10550
10551 template<bool _BoolType>
10552 struct __copy<_BoolType, random_access_iterator_tag>
10553 {
10554 template<typename _II, typename _OI>
10555 static _OI
10556 copy(_II __first, _II __last, _OI __result)
10557 {
10558 typedef typename iterator_traits<_II>::difference_type _Distance;
10559 for(_Distance __n = __last - __first; __n > 0; --__n)
10560 {
10561 *__result = *__first;
10562 ++__first;
10563 ++__result;
10564 }
10565 return __result;
10566 }
10567 };
10568
10569 template<>
10570 struct __copy<true, random_access_iterator_tag>
10571 {
10572 template<typename _Tp>
10573 static _Tp*
10574 copy(const _Tp* __first, const _Tp* __last, _Tp* __result)
10575 {
10576 std::memmove(__result, __first, sizeof(_Tp) * (__last - __first));
10577 return __result + (__last - __first);
10578 }
10579 };
10580
10581 template<typename _II, typename _OI>
10582 inline _OI
10583 __copy_aux(_II __first, _II __last, _OI __result)
10584 {
10585 typedef typename iterator_traits<_II>::value_type _ValueTypeI;
10586 typedef typename iterator_traits<_OI>::value_type _ValueTypeO;
10587 typedef typename iterator_traits<_II>::iterator_category _Category;
10588 const bool __simple = (__is_scalar<_ValueTypeI>::__value
10589 && __is_pointer<_II>::__value
10590 && __is_pointer<_OI>::__value
10591 && __are_same<_ValueTypeI, _ValueTypeO>::__value);
10592
10593 return std::__copy<__simple, _Category>::copy(__first, __last, __result);
10594 }
10595
10596
10597 template<typename _CharT>
10598 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
10599 ostreambuf_iterator<_CharT> >::__type
10600 __copy_aux(_CharT*, _CharT*, ostreambuf_iterator<_CharT>);
10601
10602 template<typename _CharT>
10603 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
10604 ostreambuf_iterator<_CharT> >::__type
10605 __copy_aux(const _CharT*, const _CharT*, ostreambuf_iterator<_CharT>);
10606
10607 template<typename _CharT>
10608 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, _CharT*>::__type
10609 __copy_aux(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>,
10610 _CharT*);
10611
10612 template<bool, bool>
10613 struct __copy_normal
10614 {
10615 template<typename _II, typename _OI>
10616 static _OI
10617 __copy_n(_II __first, _II __last, _OI __result)
10618 { return std::__copy_aux(__first, __last, __result); }
10619 };
10620
10621 template<>
10622 struct __copy_normal<true, false>
10623 {
10624 template<typename _II, typename _OI>
10625 static _OI
10626 __copy_n(_II __first, _II __last, _OI __result)
10627 { return std::__copy_aux(__first.base(), __last.base(), __result); }
10628 };
10629
10630 template<>
10631 struct __copy_normal<false, true>
10632 {
10633 template<typename _II, typename _OI>
10634 static _OI
10635 __copy_n(_II __first, _II __last, _OI __result)
10636 { return _OI(std::__copy_aux(__first, __last, __result.base())); }
10637 };
10638
10639 template<>
10640 struct __copy_normal<true, true>
10641 {
10642 template<typename _II, typename _OI>
10643 static _OI
10644 __copy_n(_II __first, _II __last, _OI __result)
10645 { return _OI(std::__copy_aux(__first.base(), __last.base(),
10646 __result.base())); }
10647 };
10648 # 387 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3
10649 template<typename _InputIterator, typename _OutputIterator>
10650 inline _OutputIterator
10651 copy(_InputIterator __first, _InputIterator __last,
10652 _OutputIterator __result)
10653 {
10654
10655
10656
10657
10658 ;
10659
10660 const bool __in = __is_normal_iterator<_InputIterator>::__value;
10661 const bool __out = __is_normal_iterator<_OutputIterator>::__value;
10662 return std::__copy_normal<__in, __out>::__copy_n(__first, __last,
10663 __result);
10664 }
10665
10666
10667 template<typename _CharT>
10668 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
10669 ostreambuf_iterator<_CharT> >::__type
10670 copy(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>,
10671 ostreambuf_iterator<_CharT>);
10672
10673 template<bool, typename>
10674 struct __copy_backward
10675 {
10676 template<typename _BI1, typename _BI2>
10677 static _BI2
10678 __copy_b(_BI1 __first, _BI1 __last, _BI2 __result)
10679 {
10680 while (__first != __last)
10681 *--__result = *--__last;
10682 return __result;
10683 }
10684 };
10685
10686 template<bool _BoolType>
10687 struct __copy_backward<_BoolType, random_access_iterator_tag>
10688 {
10689 template<typename _BI1, typename _BI2>
10690 static _BI2
10691 __copy_b(_BI1 __first, _BI1 __last, _BI2 __result)
10692 {
10693 typename iterator_traits<_BI1>::difference_type __n;
10694 for (__n = __last - __first; __n > 0; --__n)
10695 *--__result = *--__last;
10696 return __result;
10697 }
10698 };
10699
10700 template<>
10701 struct __copy_backward<true, random_access_iterator_tag>
10702 {
10703 template<typename _Tp>
10704 static _Tp*
10705 __copy_b(const _Tp* __first, const _Tp* __last, _Tp* __result)
10706 {
10707 const ptrdiff_t _Num = __last - __first;
10708 std::memmove(__result - _Num, __first, sizeof(_Tp) * _Num);
10709 return __result - _Num;
10710 }
10711 };
10712
10713 template<typename _BI1, typename _BI2>
10714 inline _BI2
10715 __copy_backward_aux(_BI1 __first, _BI1 __last, _BI2 __result)
10716 {
10717 typedef typename iterator_traits<_BI1>::value_type _ValueType1;
10718 typedef typename iterator_traits<_BI2>::value_type _ValueType2;
10719 typedef typename iterator_traits<_BI1>::iterator_category _Category;
10720 const bool __simple = (__is_scalar<_ValueType1>::__value
10721 && __is_pointer<_BI1>::__value
10722 && __is_pointer<_BI2>::__value
10723 && __are_same<_ValueType1, _ValueType2>::__value);
10724
10725 return std::__copy_backward<__simple, _Category>::__copy_b(__first,
10726 __last,
10727 __result);
10728 }
10729
10730 template<bool, bool>
10731 struct __copy_backward_normal
10732 {
10733 template<typename _BI1, typename _BI2>
10734 static _BI2
10735 __copy_b_n(_BI1 __first, _BI1 __last, _BI2 __result)
10736 { return std::__copy_backward_aux(__first, __last, __result); }
10737 };
10738
10739 template<>
10740 struct __copy_backward_normal<true, false>
10741 {
10742 template<typename _BI1, typename _BI2>
10743 static _BI2
10744 __copy_b_n(_BI1 __first, _BI1 __last, _BI2 __result)
10745 { return std::__copy_backward_aux(__first.base(), __last.base(),
10746 __result); }
10747 };
10748
10749 template<>
10750 struct __copy_backward_normal<false, true>
10751 {
10752 template<typename _BI1, typename _BI2>
10753 static _BI2
10754 __copy_b_n(_BI1 __first, _BI1 __last, _BI2 __result)
10755 { return _BI2(std::__copy_backward_aux(__first, __last,
10756 __result.base())); }
10757 };
10758
10759 template<>
10760 struct __copy_backward_normal<true, true>
10761 {
10762 template<typename _BI1, typename _BI2>
10763 static _BI2
10764 __copy_b_n(_BI1 __first, _BI1 __last, _BI2 __result)
10765 { return _BI2(std::__copy_backward_aux(__first.base(), __last.base(),
10766 __result.base())); }
10767 };
10768 # 524 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3
10769 template <typename _BI1, typename _BI2>
10770 inline _BI2
10771 copy_backward(_BI1 __first, _BI1 __last, _BI2 __result)
10772 {
10773
10774
10775
10776
10777
10778
10779 ;
10780
10781 const bool __bi1 = __is_normal_iterator<_BI1>::__value;
10782 const bool __bi2 = __is_normal_iterator<_BI2>::__value;
10783 return std::__copy_backward_normal<__bi1, __bi2>::__copy_b_n(__first,
10784 __last,
10785 __result);
10786 }
10787
10788 template<bool>
10789 struct __fill
10790 {
10791 template<typename _ForwardIterator, typename _Tp>
10792 static void
10793 fill(_ForwardIterator __first, _ForwardIterator __last,
10794 const _Tp& __value)
10795 {
10796 for (; __first != __last; ++__first)
10797 *__first = __value;
10798 }
10799 };
10800
10801 template<>
10802 struct __fill<true>
10803 {
10804 template<typename _ForwardIterator, typename _Tp>
10805 static void
10806 fill(_ForwardIterator __first, _ForwardIterator __last,
10807 const _Tp& __value)
10808 {
10809 const _Tp __tmp = __value;
10810 for (; __first != __last; ++__first)
10811 *__first = __tmp;
10812 }
10813 };
10814 # 581 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3
10815 template<typename _ForwardIterator, typename _Tp>
10816 void
10817 fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
10818 {
10819
10820
10821
10822 ;
10823
10824 const bool __scalar = __is_scalar<_Tp>::__value;
10825 std::__fill<__scalar>::fill(__first, __last, __value);
10826 }
10827
10828
10829 inline void
10830 fill(unsigned char* __first, unsigned char* __last, const unsigned char& __c)
10831 {
10832 ;
10833 const unsigned char __tmp = __c;
10834 std::memset(__first, __tmp, __last - __first);
10835 }
10836
10837 inline void
10838 fill(signed char* __first, signed char* __last, const signed char& __c)
10839 {
10840 ;
10841 const signed char __tmp = __c;
10842 std::memset(__first, static_cast<unsigned char>(__tmp), __last - __first);
10843 }
10844
10845 inline void
10846 fill(char* __first, char* __last, const char& __c)
10847 {
10848 ;
10849 const char __tmp = __c;
10850 std::memset(__first, static_cast<unsigned char>(__tmp), __last - __first);
10851 }
10852
10853 template<bool>
10854 struct __fill_n
10855 {
10856 template<typename _OutputIterator, typename _Size, typename _Tp>
10857 static _OutputIterator
10858 fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
10859 {
10860 for (; __n > 0; --__n, ++__first)
10861 *__first = __value;
10862 return __first;
10863 }
10864 };
10865
10866 template<>
10867 struct __fill_n<true>
10868 {
10869 template<typename _OutputIterator, typename _Size, typename _Tp>
10870 static _OutputIterator
10871 fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
10872 {
10873 const _Tp __tmp = __value;
10874 for (; __n > 0; --__n, ++__first)
10875 *__first = __tmp;
10876 return __first;
10877 }
10878 };
10879 # 657 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3
10880 template<typename _OutputIterator, typename _Size, typename _Tp>
10881 _OutputIterator
10882 fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
10883 {
10884
10885
10886
10887 const bool __scalar = __is_scalar<_Tp>::__value;
10888 return std::__fill_n<__scalar>::fill_n(__first, __n, __value);
10889 }
10890
10891 template<typename _Size>
10892 inline unsigned char*
10893 fill_n(unsigned char* __first, _Size __n, const unsigned char& __c)
10894 {
10895 std::fill(__first, __first + __n, __c);
10896 return __first + __n;
10897 }
10898
10899 template<typename _Size>
10900 inline signed char*
10901 fill_n(signed char* __first, _Size __n, const signed char& __c)
10902 {
10903 std::fill(__first, __first + __n, __c);
10904 return __first + __n;
10905 }
10906
10907 template<typename _Size>
10908 inline char*
10909 fill_n(char* __first, _Size __n, const char& __c)
10910 {
10911 std::fill(__first, __first + __n, __c);
10912 return __first + __n;
10913 }
10914 # 704 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3
10915 template<typename _InputIterator1, typename _InputIterator2>
10916 pair<_InputIterator1, _InputIterator2>
10917 mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
10918 _InputIterator2 __first2)
10919 {
10920
10921
10922
10923
10924
10925
10926 ;
10927
10928 while (__first1 != __last1 && *__first1 == *__first2)
10929 {
10930 ++__first1;
10931 ++__first2;
10932 }
10933 return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
10934 }
10935 # 739 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3
10936 template<typename _InputIterator1, typename _InputIterator2,
10937 typename _BinaryPredicate>
10938 pair<_InputIterator1, _InputIterator2>
10939 mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
10940 _InputIterator2 __first2, _BinaryPredicate __binary_pred)
10941 {
10942
10943
10944
10945 ;
10946
10947 while (__first1 != __last1 && __binary_pred(*__first1, *__first2))
10948 {
10949 ++__first1;
10950 ++__first2;
10951 }
10952 return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
10953 }
10954 # 769 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3
10955 template<typename _InputIterator1, typename _InputIterator2>
10956 inline bool
10957 equal(_InputIterator1 __first1, _InputIterator1 __last1,
10958 _InputIterator2 __first2)
10959 {
10960
10961
10962
10963
10964
10965
10966 ;
10967
10968 for (; __first1 != __last1; ++__first1, ++__first2)
10969 if (!(*__first1 == *__first2))
10970 return false;
10971 return true;
10972 }
10973 # 801 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3
10974 template<typename _InputIterator1, typename _InputIterator2,
10975 typename _BinaryPredicate>
10976 inline bool
10977 equal(_InputIterator1 __first1, _InputIterator1 __last1,
10978 _InputIterator2 __first2,
10979 _BinaryPredicate __binary_pred)
10980 {
10981
10982
10983
10984 ;
10985
10986 for (; __first1 != __last1; ++__first1, ++__first2)
10987 if (!__binary_pred(*__first1, *__first2))
10988 return false;
10989 return true;
10990 }
10991 # 833 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3
10992 template<typename _InputIterator1, typename _InputIterator2>
10993 bool
10994 lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
10995 _InputIterator2 __first2, _InputIterator2 __last2)
10996 {
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006 ;
11007 ;
11008
11009 for (; __first1 != __last1 && __first2 != __last2;
11010 ++__first1, ++__first2)
11011 {
11012 if (*__first1 < *__first2)
11013 return true;
11014 if (*__first2 < *__first1)
11015 return false;
11016 }
11017 return __first1 == __last1 && __first2 != __last2;
11018 }
11019 # 873 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3
11020 template<typename _InputIterator1, typename _InputIterator2,
11021 typename _Compare>
11022 bool
11023 lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
11024 _InputIterator2 __first2, _InputIterator2 __last2,
11025 _Compare __comp)
11026 {
11027
11028
11029
11030 ;
11031 ;
11032
11033 for (; __first1 != __last1 && __first2 != __last2;
11034 ++__first1, ++__first2)
11035 {
11036 if (__comp(*__first1, *__first2))
11037 return true;
11038 if (__comp(*__first2, *__first1))
11039 return false;
11040 }
11041 return __first1 == __last1 && __first2 != __last2;
11042 }
11043
11044 inline bool
11045 lexicographical_compare(const unsigned char* __first1,
11046 const unsigned char* __last1,
11047 const unsigned char* __first2,
11048 const unsigned char* __last2)
11049 {
11050 ;
11051 ;
11052
11053 const size_t __len1 = __last1 - __first1;
11054 const size_t __len2 = __last2 - __first2;
11055 const int __result = std::memcmp(__first1, __first2,
11056 std::min(__len1, __len2));
11057 return __result != 0 ? __result < 0 : __len1 < __len2;
11058 }
11059
11060 inline bool
11061 lexicographical_compare(const char* __first1, const char* __last1,
11062 const char* __first2, const char* __last2)
11063 {
11064 ;
11065 ;
11066
11067
11068
11069
11070
11071
11072
11073 return std::lexicographical_compare((const unsigned char*) __first1,
11074 (const unsigned char*) __last1,
11075 (const unsigned char*) __first2,
11076 (const unsigned char*) __last2);
11077
11078 }
11079
11080 }
11081 # 66 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/algorithm" 2 3
11082 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_construct.h" 1 3
11083 # 65 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_construct.h" 3
11084 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/new" 1 3
11085 # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/new" 3
11086 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/exception" 1 3
11087 # 40 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/exception" 3
11088 #pragma GCC visibility push(default)
11089
11090
11091
11092 extern "C++" {
11093
11094 namespace std
11095 {
11096 # 56 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/exception" 3
11097 class exception
11098 {
11099 public:
11100 exception() throw() { }
11101 virtual ~exception() throw();
11102
11103
11104 virtual const char* what() const throw();
11105 };
11106
11107
11108
11109 class bad_exception : public exception
11110 {
11111 public:
11112 bad_exception() throw() { }
11113
11114
11115 virtual ~bad_exception() throw();
11116
11117 virtual const char* what() const throw();
11118 };
11119
11120
11121 typedef void (*terminate_handler) ();
11122
11123 typedef void (*unexpected_handler) ();
11124
11125
11126 terminate_handler set_terminate(terminate_handler) throw();
11127
11128
11129 void terminate() __attribute__ ((__noreturn__));
11130
11131
11132 unexpected_handler set_unexpected(unexpected_handler) throw();
11133
11134
11135 void unexpected() __attribute__ ((__noreturn__));
11136 # 106 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/exception" 3
11137 bool uncaught_exception() throw();
11138 }
11139
11140 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
11141 # 121 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/exception" 3
11142 void __verbose_terminate_handler ();
11143
11144 }
11145
11146 }
11147
11148 #pragma GCC visibility pop
11149 # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/new" 2 3
11150
11151 #pragma GCC visibility push(default)
11152
11153 extern "C++" {
11154
11155 namespace std
11156 {
11157
11158
11159
11160
11161
11162 class bad_alloc : public exception
11163 {
11164 public:
11165 bad_alloc() throw() { }
11166
11167
11168 virtual ~bad_alloc() throw();
11169
11170 virtual const char* what() const throw();
11171 };
11172
11173 struct nothrow_t { };
11174 extern const nothrow_t nothrow;
11175
11176
11177 typedef void (*new_handler)();
11178
11179 new_handler set_new_handler(new_handler) throw();
11180 }
11181 # 89 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/new" 3
11182 void* operator new(std::size_t) throw (std::bad_alloc);
11183 void* operator new[](std::size_t) throw (std::bad_alloc);
11184 void operator delete(void*) throw();
11185 void operator delete[](void*) throw();
11186 void* operator new(std::size_t, const std::nothrow_t&) throw();
11187 void* operator new[](std::size_t, const std::nothrow_t&) throw();
11188 void operator delete(void*, const std::nothrow_t&) throw();
11189 void operator delete[](void*, const std::nothrow_t&) throw();
11190
11191
11192 inline void* operator new(std::size_t, void* __p) throw() { return __p; }
11193 inline void* operator new[](std::size_t, void* __p) throw() { return __p; }
11194
11195
11196 inline void operator delete (void*, void*) throw() { }
11197 inline void operator delete[](void*, void*) throw() { }
11198
11199 }
11200
11201 #pragma GCC visibility pop
11202 # 66 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_construct.h" 2 3
11203
11204 namespace std __attribute__ ((__visibility__ ("default"))) {
11205
11206
11207
11208
11209
11210
11211
11212 template<typename _T1, typename _T2>
11213 inline void
11214 _Construct(_T1* __p, const _T2& __value)
11215 {
11216
11217
11218 ::new(static_cast<void*>(__p)) _T1(__value);
11219 }
11220
11221
11222
11223
11224
11225
11226
11227 template<typename _T1>
11228 inline void
11229 _Construct(_T1* __p)
11230 {
11231
11232
11233 ::new(static_cast<void*>(__p)) _T1();
11234 }
11235
11236
11237
11238
11239
11240
11241 template<typename _Tp>
11242 inline void
11243 _Destroy(_Tp* __pointer)
11244 { __pointer->~_Tp(); }
11245 # 116 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_construct.h" 3
11246 template<typename _ForwardIterator>
11247 inline void
11248 __destroy_aux(_ForwardIterator __first, _ForwardIterator __last,
11249 __false_type)
11250 {
11251 for (; __first != __last; ++__first)
11252 std::_Destroy(&*__first);
11253 }
11254 # 134 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_construct.h" 3
11255 template<typename _ForwardIterator>
11256 inline void
11257 __destroy_aux(_ForwardIterator, _ForwardIterator, __true_type)
11258 { }
11259 # 146 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_construct.h" 3
11260 template<typename _ForwardIterator>
11261 inline void
11262 _Destroy(_ForwardIterator __first, _ForwardIterator __last)
11263 {
11264 typedef typename iterator_traits<_ForwardIterator>::value_type
11265 _Value_type;
11266 typedef typename std::__is_scalar<_Value_type>::__type
11267 _Has_trivial_destructor;
11268
11269 std::__destroy_aux(__first, __last, _Has_trivial_destructor());
11270 }
11271 # 166 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_construct.h" 3
11272 template <typename _Tp> class allocator;
11273
11274 template<typename _ForwardIterator, typename _Allocator>
11275 void
11276 _Destroy(_ForwardIterator __first, _ForwardIterator __last,
11277 _Allocator __alloc)
11278 {
11279 for (; __first != __last; ++__first)
11280 __alloc.destroy(&*__first);
11281 }
11282
11283 template<typename _ForwardIterator, typename _Tp>
11284 inline void
11285 _Destroy(_ForwardIterator __first, _ForwardIterator __last,
11286 allocator<_Tp>)
11287 {
11288 _Destroy(__first, __last);
11289 }
11290
11291 }
11292 # 67 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/algorithm" 2 3
11293 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_uninitialized.h" 1 3
11294 # 67 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_uninitialized.h" 3
11295 namespace std __attribute__ ((__visibility__ ("default"))) {
11296
11297
11298 template<typename _InputIterator, typename _ForwardIterator>
11299 inline _ForwardIterator
11300 __uninitialized_copy_aux(_InputIterator __first, _InputIterator __last,
11301 _ForwardIterator __result,
11302 __true_type)
11303 { return std::copy(__first, __last, __result); }
11304
11305 template<typename _InputIterator, typename _ForwardIterator>
11306 inline _ForwardIterator
11307 __uninitialized_copy_aux(_InputIterator __first, _InputIterator __last,
11308 _ForwardIterator __result,
11309 __false_type)
11310 {
11311 _ForwardIterator __cur = __result;
11312 try
11313 {
11314 for (; __first != __last; ++__first, ++__cur)
11315 std::_Construct(&*__cur, *__first);
11316 return __cur;
11317 }
11318 catch(...)
11319 {
11320 std::_Destroy(__result, __cur);
11321 throw;
11322 }
11323 }
11324 # 106 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_uninitialized.h" 3
11325 template<typename _InputIterator, typename _ForwardIterator>
11326 inline _ForwardIterator
11327 uninitialized_copy(_InputIterator __first, _InputIterator __last,
11328 _ForwardIterator __result)
11329 {
11330 typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
11331 typedef typename std::__is_scalar<_ValueType>::__type _Is_POD;
11332 return std::__uninitialized_copy_aux(__first, __last, __result,
11333 _Is_POD());
11334 }
11335
11336 inline char*
11337 uninitialized_copy(const char* __first, const char* __last, char* __result)
11338 {
11339 std::memmove(__result, __first, __last - __first);
11340 return __result + (__last - __first);
11341 }
11342
11343 inline wchar_t*
11344 uninitialized_copy(const wchar_t* __first, const wchar_t* __last,
11345 wchar_t* __result)
11346 {
11347 std::memmove(__result, __first, sizeof(wchar_t) * (__last - __first));
11348 return __result + (__last - __first);
11349 }
11350
11351
11352
11353 template<typename _ForwardIterator, typename _Tp>
11354 inline void
11355 __uninitialized_fill_aux(_ForwardIterator __first,
11356 _ForwardIterator __last,
11357 const _Tp& __x, __true_type)
11358 { std::fill(__first, __last, __x); }
11359
11360 template<typename _ForwardIterator, typename _Tp>
11361 void
11362 __uninitialized_fill_aux(_ForwardIterator __first, _ForwardIterator __last,
11363 const _Tp& __x, __false_type)
11364 {
11365 _ForwardIterator __cur = __first;
11366 try
11367 {
11368 for (; __cur != __last; ++__cur)
11369 std::_Construct(&*__cur, __x);
11370 }
11371 catch(...)
11372 {
11373 std::_Destroy(__first, __cur);
11374 throw;
11375 }
11376 }
11377 # 168 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_uninitialized.h" 3
11378 template<typename _ForwardIterator, typename _Tp>
11379 inline void
11380 uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last,
11381 const _Tp& __x)
11382 {
11383 typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
11384 typedef typename std::__is_scalar<_ValueType>::__type _Is_POD;
11385 std::__uninitialized_fill_aux(__first, __last, __x, _Is_POD());
11386 }
11387
11388
11389
11390 template<typename _ForwardIterator, typename _Size, typename _Tp>
11391 inline void
11392 __uninitialized_fill_n_aux(_ForwardIterator __first, _Size __n,
11393 const _Tp& __x, __true_type)
11394 { std::fill_n(__first, __n, __x); }
11395
11396 template<typename _ForwardIterator, typename _Size, typename _Tp>
11397 void
11398 __uninitialized_fill_n_aux(_ForwardIterator __first, _Size __n,
11399 const _Tp& __x, __false_type)
11400 {
11401 _ForwardIterator __cur = __first;
11402 try
11403 {
11404 for (; __n > 0; --__n, ++__cur)
11405 std::_Construct(&*__cur, __x);
11406 }
11407 catch(...)
11408 {
11409 std::_Destroy(__first, __cur);
11410 throw;
11411 }
11412 }
11413 # 213 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_uninitialized.h" 3
11414 template<typename _ForwardIterator, typename _Size, typename _Tp>
11415 inline void
11416 uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x)
11417 {
11418 typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
11419 typedef typename std::__is_scalar<_ValueType>::__type _Is_POD;
11420 std::__uninitialized_fill_n_aux(__first, __n, __x, _Is_POD());
11421 }
11422
11423
11424
11425
11426
11427
11428
11429 template<typename _InputIterator, typename _ForwardIterator,
11430 typename _Allocator>
11431 _ForwardIterator
11432 __uninitialized_copy_a(_InputIterator __first, _InputIterator __last,
11433 _ForwardIterator __result,
11434 _Allocator __alloc)
11435 {
11436 _ForwardIterator __cur = __result;
11437 try
11438 {
11439 for (; __first != __last; ++__first, ++__cur)
11440 __alloc.construct(&*__cur, *__first);
11441 return __cur;
11442 }
11443 catch(...)
11444 {
11445 std::_Destroy(__result, __cur, __alloc);
11446 throw;
11447 }
11448 }
11449
11450 template<typename _InputIterator, typename _ForwardIterator, typename _Tp>
11451 inline _ForwardIterator
11452 __uninitialized_copy_a(_InputIterator __first, _InputIterator __last,
11453 _ForwardIterator __result,
11454 allocator<_Tp>)
11455 { return std::uninitialized_copy(__first, __last, __result); }
11456
11457 template<typename _ForwardIterator, typename _Tp, typename _Allocator>
11458 void
11459 __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last,
11460 const _Tp& __x, _Allocator __alloc)
11461 {
11462 _ForwardIterator __cur = __first;
11463 try
11464 {
11465 for (; __cur != __last; ++__cur)
11466 __alloc.construct(&*__cur, __x);
11467 }
11468 catch(...)
11469 {
11470 std::_Destroy(__first, __cur, __alloc);
11471 throw;
11472 }
11473 }
11474
11475 template<typename _ForwardIterator, typename _Tp, typename _Tp2>
11476 inline void
11477 __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last,
11478 const _Tp& __x, allocator<_Tp2>)
11479 { std::uninitialized_fill(__first, __last, __x); }
11480
11481 template<typename _ForwardIterator, typename _Size, typename _Tp,
11482 typename _Allocator>
11483 void
11484 __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n,
11485 const _Tp& __x,
11486 _Allocator __alloc)
11487 {
11488 _ForwardIterator __cur = __first;
11489 try
11490 {
11491 for (; __n > 0; --__n, ++__cur)
11492 __alloc.construct(&*__cur, __x);
11493 }
11494 catch(...)
11495 {
11496 std::_Destroy(__first, __cur, __alloc);
11497 throw;
11498 }
11499 }
11500
11501 template<typename _ForwardIterator, typename _Size, typename _Tp,
11502 typename _Tp2>
11503 inline void
11504 __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n,
11505 const _Tp& __x,
11506 allocator<_Tp2>)
11507 { std::uninitialized_fill_n(__first, __n, __x); }
11508 # 318 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_uninitialized.h" 3
11509 template<typename _InputIterator1, typename _InputIterator2,
11510 typename _ForwardIterator, typename _Allocator>
11511 inline _ForwardIterator
11512 __uninitialized_copy_copy(_InputIterator1 __first1,
11513 _InputIterator1 __last1,
11514 _InputIterator2 __first2,
11515 _InputIterator2 __last2,
11516 _ForwardIterator __result,
11517 _Allocator __alloc)
11518 {
11519 _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1,
11520 __result,
11521 __alloc);
11522 try
11523 {
11524 return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc);
11525 }
11526 catch(...)
11527 {
11528 std::_Destroy(__result, __mid, __alloc);
11529 throw;
11530 }
11531 }
11532
11533
11534
11535
11536 template<typename _ForwardIterator, typename _Tp, typename _InputIterator,
11537 typename _Allocator>
11538 inline _ForwardIterator
11539 __uninitialized_fill_copy(_ForwardIterator __result, _ForwardIterator __mid,
11540 const _Tp& __x, _InputIterator __first,
11541 _InputIterator __last,
11542 _Allocator __alloc)
11543 {
11544 std::__uninitialized_fill_a(__result, __mid, __x, __alloc);
11545 try
11546 {
11547 return std::__uninitialized_copy_a(__first, __last, __mid, __alloc);
11548 }
11549 catch(...)
11550 {
11551 std::_Destroy(__result, __mid, __alloc);
11552 throw;
11553 }
11554 }
11555
11556
11557
11558
11559 template<typename _InputIterator, typename _ForwardIterator, typename _Tp,
11560 typename _Allocator>
11561 inline void
11562 __uninitialized_copy_fill(_InputIterator __first1, _InputIterator __last1,
11563 _ForwardIterator __first2,
11564 _ForwardIterator __last2, const _Tp& __x,
11565 _Allocator __alloc)
11566 {
11567 _ForwardIterator __mid2 = std::__uninitialized_copy_a(__first1, __last1,
11568 __first2,
11569 __alloc);
11570 try
11571 {
11572 std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc);
11573 }
11574 catch(...)
11575 {
11576 std::_Destroy(__first2, __mid2, __alloc);
11577 throw;
11578 }
11579 }
11580
11581 }
11582 # 68 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/algorithm" 2 3
11583 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 1 3
11584 # 65 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
11585 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_heap.h" 1 3
11586 # 65 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_heap.h" 3
11587 namespace std __attribute__ ((__visibility__ ("default"))) {
11588
11589
11590
11591
11592 template<typename _RandomAccessIterator, typename _Distance>
11593 bool
11594 __is_heap(_RandomAccessIterator __first, _Distance __n)
11595 {
11596 _Distance __parent = 0;
11597 for (_Distance __child = 1; __child < __n; ++__child)
11598 {
11599 if (__first[__parent] < __first[__child])
11600 return false;
11601 if ((__child & 1) == 0)
11602 ++__parent;
11603 }
11604 return true;
11605 }
11606
11607 template<typename _RandomAccessIterator, typename _Distance,
11608 typename _StrictWeakOrdering>
11609 bool
11610 __is_heap(_RandomAccessIterator __first, _StrictWeakOrdering __comp,
11611 _Distance __n)
11612 {
11613 _Distance __parent = 0;
11614 for (_Distance __child = 1; __child < __n; ++__child)
11615 {
11616 if (__comp(__first[__parent], __first[__child]))
11617 return false;
11618 if ((__child & 1) == 0)
11619 ++__parent;
11620 }
11621 return true;
11622 }
11623
11624 template<typename _RandomAccessIterator>
11625 bool
11626 __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
11627 { return std::__is_heap(__first, std::distance(__first, __last)); }
11628
11629 template<typename _RandomAccessIterator, typename _StrictWeakOrdering>
11630 bool
11631 __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
11632 _StrictWeakOrdering __comp)
11633 { return std::__is_heap(__first, __comp, std::distance(__first, __last)); }
11634
11635
11636
11637 template<typename _RandomAccessIterator, typename _Distance, typename _Tp>
11638 void
11639 __push_heap(_RandomAccessIterator __first,
11640 _Distance __holeIndex, _Distance __topIndex, _Tp __value)
11641 {
11642 _Distance __parent = (__holeIndex - 1) / 2;
11643 while (__holeIndex > __topIndex && *(__first + __parent) < __value)
11644 {
11645 *(__first + __holeIndex) = *(__first + __parent);
11646 __holeIndex = __parent;
11647 __parent = (__holeIndex - 1) / 2;
11648 }
11649 *(__first + __holeIndex) = __value;
11650 }
11651 # 139 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_heap.h" 3
11652 template<typename _RandomAccessIterator>
11653 inline void
11654 push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
11655 {
11656 typedef typename iterator_traits<_RandomAccessIterator>::value_type
11657 _ValueType;
11658 typedef typename iterator_traits<_RandomAccessIterator>::difference_type
11659 _DistanceType;
11660
11661
11662
11663
11664
11665 ;
11666
11667
11668 std::__push_heap(__first, _DistanceType((__last - __first) - 1),
11669 _DistanceType(0), _ValueType(*(__last - 1)));
11670 }
11671
11672 template<typename _RandomAccessIterator, typename _Distance, typename _Tp,
11673 typename _Compare>
11674 void
11675 __push_heap(_RandomAccessIterator __first, _Distance __holeIndex,
11676 _Distance __topIndex, _Tp __value, _Compare __comp)
11677 {
11678 _Distance __parent = (__holeIndex - 1) / 2;
11679 while (__holeIndex > __topIndex
11680 && __comp(*(__first + __parent), __value))
11681 {
11682 *(__first + __holeIndex) = *(__first + __parent);
11683 __holeIndex = __parent;
11684 __parent = (__holeIndex - 1) / 2;
11685 }
11686 *(__first + __holeIndex) = __value;
11687 }
11688 # 187 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_heap.h" 3
11689 template<typename _RandomAccessIterator, typename _Compare>
11690 inline void
11691 push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
11692 _Compare __comp)
11693 {
11694 typedef typename iterator_traits<_RandomAccessIterator>::value_type
11695 _ValueType;
11696 typedef typename iterator_traits<_RandomAccessIterator>::difference_type
11697 _DistanceType;
11698
11699
11700
11701
11702 ;
11703 ;
11704
11705 std::__push_heap(__first, _DistanceType((__last - __first) - 1),
11706 _DistanceType(0), _ValueType(*(__last - 1)), __comp);
11707 }
11708
11709 template<typename _RandomAccessIterator, typename _Distance, typename _Tp>
11710 void
11711 __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
11712 _Distance __len, _Tp __value)
11713 {
11714 const _Distance __topIndex = __holeIndex;
11715 _Distance __secondChild = 2 * __holeIndex + 2;
11716 while (__secondChild < __len)
11717 {
11718 if (*(__first + __secondChild) < *(__first + (__secondChild - 1)))
11719 __secondChild--;
11720 *(__first + __holeIndex) = *(__first + __secondChild);
11721 __holeIndex = __secondChild;
11722 __secondChild = 2 * (__secondChild + 1);
11723 }
11724 if (__secondChild == __len)
11725 {
11726 *(__first + __holeIndex) = *(__first + (__secondChild - 1));
11727 __holeIndex = __secondChild - 1;
11728 }
11729 std::__push_heap(__first, __holeIndex, __topIndex, __value);
11730 }
11731
11732 template<typename _RandomAccessIterator, typename _Tp>
11733 inline void
11734 __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
11735 _RandomAccessIterator __result, _Tp __value)
11736 {
11737 typedef typename iterator_traits<_RandomAccessIterator>::difference_type
11738 _Distance;
11739 *__result = *__first;
11740 std::__adjust_heap(__first, _Distance(0), _Distance(__last - __first),
11741 __value);
11742 }
11743 # 251 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_heap.h" 3
11744 template<typename _RandomAccessIterator>
11745 inline void
11746 pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
11747 {
11748 typedef typename iterator_traits<_RandomAccessIterator>::value_type
11749 _ValueType;
11750
11751
11752
11753
11754
11755 ;
11756 ;
11757
11758 std::__pop_heap(__first, __last - 1, __last - 1,
11759 _ValueType(*(__last - 1)));
11760 }
11761
11762 template<typename _RandomAccessIterator, typename _Distance,
11763 typename _Tp, typename _Compare>
11764 void
11765 __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
11766 _Distance __len, _Tp __value, _Compare __comp)
11767 {
11768 const _Distance __topIndex = __holeIndex;
11769 _Distance __secondChild = 2 * __holeIndex + 2;
11770 while (__secondChild < __len)
11771 {
11772 if (__comp(*(__first + __secondChild),
11773 *(__first + (__secondChild - 1))))
11774 __secondChild--;
11775 *(__first + __holeIndex) = *(__first + __secondChild);
11776 __holeIndex = __secondChild;
11777 __secondChild = 2 * (__secondChild + 1);
11778 }
11779 if (__secondChild == __len)
11780 {
11781 *(__first + __holeIndex) = *(__first + (__secondChild - 1));
11782 __holeIndex = __secondChild - 1;
11783 }
11784 std::__push_heap(__first, __holeIndex, __topIndex, __value, __comp);
11785 }
11786
11787 template<typename _RandomAccessIterator, typename _Tp, typename _Compare>
11788 inline void
11789 __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
11790 _RandomAccessIterator __result, _Tp __value, _Compare __comp)
11791 {
11792 typedef typename iterator_traits<_RandomAccessIterator>::difference_type
11793 _Distance;
11794 *__result = *__first;
11795 std::__adjust_heap(__first, _Distance(0), _Distance(__last - __first),
11796 __value, __comp);
11797 }
11798 # 317 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_heap.h" 3
11799 template<typename _RandomAccessIterator, typename _Compare>
11800 inline void
11801 pop_heap(_RandomAccessIterator __first,
11802 _RandomAccessIterator __last, _Compare __comp)
11803 {
11804
11805
11806
11807 ;
11808 ;
11809
11810 typedef typename iterator_traits<_RandomAccessIterator>::value_type
11811 _ValueType;
11812 std::__pop_heap(__first, __last - 1, __last - 1,
11813 _ValueType(*(__last - 1)), __comp);
11814 }
11815 # 342 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_heap.h" 3
11816 template<typename _RandomAccessIterator>
11817 void
11818 make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
11819 {
11820 typedef typename iterator_traits<_RandomAccessIterator>::value_type
11821 _ValueType;
11822 typedef typename iterator_traits<_RandomAccessIterator>::difference_type
11823 _DistanceType;
11824
11825
11826
11827
11828
11829 ;
11830
11831 if (__last - __first < 2)
11832 return;
11833
11834 const _DistanceType __len = __last - __first;
11835 _DistanceType __parent = (__len - 2) / 2;
11836 while (true)
11837 {
11838 std::__adjust_heap(__first, __parent, __len,
11839 _ValueType(*(__first + __parent)));
11840 if (__parent == 0)
11841 return;
11842 __parent--;
11843 }
11844 }
11845 # 382 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_heap.h" 3
11846 template<typename _RandomAccessIterator, typename _Compare>
11847 inline void
11848 make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
11849 _Compare __comp)
11850 {
11851 typedef typename iterator_traits<_RandomAccessIterator>::value_type
11852 _ValueType;
11853 typedef typename iterator_traits<_RandomAccessIterator>::difference_type
11854 _DistanceType;
11855
11856
11857
11858
11859 ;
11860
11861 if (__last - __first < 2)
11862 return;
11863
11864 const _DistanceType __len = __last - __first;
11865 _DistanceType __parent = (__len - 2) / 2;
11866 while (true)
11867 {
11868 std::__adjust_heap(__first, __parent, __len,
11869 _ValueType(*(__first + __parent)), __comp);
11870 if (__parent == 0)
11871 return;
11872 __parent--;
11873 }
11874 }
11875 # 420 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_heap.h" 3
11876 template<typename _RandomAccessIterator>
11877 void
11878 sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
11879 {
11880
11881
11882
11883
11884
11885 ;
11886
11887
11888 while (__last - __first > 1)
11889 std::pop_heap(__first, _RandomAccessIterator(__last--));
11890 }
11891 # 446 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_heap.h" 3
11892 template<typename _RandomAccessIterator, typename _Compare>
11893 void
11894 sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
11895 _Compare __comp)
11896 {
11897
11898
11899
11900 ;
11901 ;
11902
11903 while (__last - __first > 1)
11904 std::pop_heap(__first, _RandomAccessIterator(__last--), __comp);
11905 }
11906
11907 }
11908 # 66 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 2 3
11909 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_tempbuf.h" 1 3
11910 # 65 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_tempbuf.h" 3
11911 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 1 3
11912 # 51 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3
11913
11914 # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3
11915
11916
11917 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/allocator.h" 1 3
11918 # 53 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/allocator.h" 3
11919 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++allocator.h" 1 3
11920 # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++allocator.h" 3
11921 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/new_allocator.h" 1 3
11922 # 40 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/new_allocator.h" 3
11923 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
11924
11925 using std::size_t;
11926 using std::ptrdiff_t;
11927 # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/new_allocator.h" 3
11928 template<typename _Tp>
11929 class new_allocator
11930 {
11931 public:
11932 typedef size_t size_type;
11933 typedef ptrdiff_t difference_type;
11934 typedef _Tp* pointer;
11935 typedef const _Tp* const_pointer;
11936 typedef _Tp& reference;
11937 typedef const _Tp& const_reference;
11938 typedef _Tp value_type;
11939
11940 template<typename _Tp1>
11941 struct rebind
11942 { typedef new_allocator<_Tp1> other; };
11943
11944 new_allocator() throw() { }
11945
11946 new_allocator(const new_allocator&) throw() { }
11947
11948 template<typename _Tp1>
11949 new_allocator(const new_allocator<_Tp1>&) throw() { }
11950
11951 ~new_allocator() throw() { }
11952
11953 pointer
11954 address(reference __x) const { return &__x; }
11955
11956 const_pointer
11957 address(const_reference __x) const { return &__x; }
11958
11959
11960
11961 pointer
11962 allocate(size_type __n, const void* = 0)
11963 {
11964 if (__builtin_expect(__n > this->max_size(), false))
11965 std::__throw_bad_alloc();
11966
11967 return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp)));
11968 }
11969
11970
11971 void
11972 deallocate(pointer __p, size_type)
11973 { ::operator delete(__p); }
11974
11975 size_type
11976 max_size() const throw()
11977 { return size_t(-1) / sizeof(_Tp); }
11978
11979
11980
11981 void
11982 construct(pointer __p, const _Tp& __val)
11983 { ::new(__p) _Tp(__val); }
11984
11985 void
11986 destroy(pointer __p) { __p->~_Tp(); }
11987 };
11988
11989 template<typename _Tp>
11990 inline bool
11991 operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&)
11992 { return true; }
11993
11994 template<typename _Tp>
11995 inline bool
11996 operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&)
11997 { return false; }
11998
11999 }
12000 # 40 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++allocator.h" 2 3
12001 # 54 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/allocator.h" 2 3
12002
12003
12004
12005 namespace std __attribute__ ((__visibility__ ("default"))) {
12006
12007 template<typename _Tp>
12008 class allocator;
12009
12010
12011 template<>
12012 class allocator<void>
12013 {
12014 public:
12015 typedef size_t size_type;
12016 typedef ptrdiff_t difference_type;
12017 typedef void* pointer;
12018 typedef const void* const_pointer;
12019 typedef void value_type;
12020
12021 template<typename _Tp1>
12022 struct rebind
12023 { typedef allocator<_Tp1> other; };
12024 };
12025
12026
12027
12028
12029
12030
12031
12032 template<typename _Tp>
12033 class allocator: public __gnu_cxx::new_allocator<_Tp>
12034 {
12035 public:
12036 typedef size_t size_type;
12037 typedef ptrdiff_t difference_type;
12038 typedef _Tp* pointer;
12039 typedef const _Tp* const_pointer;
12040 typedef _Tp& reference;
12041 typedef const _Tp& const_reference;
12042 typedef _Tp value_type;
12043
12044 template<typename _Tp1>
12045 struct rebind
12046 { typedef allocator<_Tp1> other; };
12047
12048 allocator() throw() { }
12049
12050 allocator(const allocator& __a) throw()
12051 : __gnu_cxx::new_allocator<_Tp>(__a) { }
12052
12053 template<typename _Tp1>
12054 allocator(const allocator<_Tp1>&) throw() { }
12055
12056 ~allocator() throw() { }
12057
12058
12059 };
12060
12061 template<typename _T1, typename _T2>
12062 inline bool
12063 operator==(const allocator<_T1>&, const allocator<_T2>&)
12064 { return true; }
12065
12066 template<typename _T1, typename _T2>
12067 inline bool
12068 operator!=(const allocator<_T1>&, const allocator<_T2>&)
12069 { return false; }
12070
12071
12072
12073
12074
12075 extern template class allocator<char>;
12076 extern template class allocator<wchar_t>;
12077
12078
12079
12080
12081
12082
12083 template<typename _Alloc, bool = std::__is_empty<_Alloc>::__value>
12084 struct __alloc_swap
12085 { static void _S_do_it(_Alloc&, _Alloc&) { } };
12086
12087 template<typename _Alloc>
12088 struct __alloc_swap<_Alloc, false>
12089 {
12090 static void
12091 _S_do_it(_Alloc& __one, _Alloc& __two)
12092 {
12093
12094 if (__one != __two)
12095 swap(__one, __two);
12096 }
12097 };
12098
12099 }
12100 # 55 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 2 3
12101
12102
12103
12104 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_raw_storage_iter.h" 1 3
12105 # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_raw_storage_iter.h" 3
12106 namespace std __attribute__ ((__visibility__ ("default"))) {
12107
12108
12109
12110
12111
12112 template <class _ForwardIterator, class _Tp>
12113 class raw_storage_iterator
12114 : public iterator<output_iterator_tag, void, void, void, void>
12115 {
12116 protected:
12117 _ForwardIterator _M_iter;
12118
12119 public:
12120 explicit
12121 raw_storage_iterator(_ForwardIterator __x)
12122 : _M_iter(__x) {}
12123
12124 raw_storage_iterator&
12125 operator*() { return *this; }
12126
12127 raw_storage_iterator&
12128 operator=(const _Tp& __element)
12129 {
12130 std::_Construct(&*_M_iter, __element);
12131 return *this;
12132 }
12133
12134 raw_storage_iterator<_ForwardIterator, _Tp>&
12135 operator++()
12136 {
12137 ++_M_iter;
12138 return *this;
12139 }
12140
12141 raw_storage_iterator<_ForwardIterator, _Tp>
12142 operator++(int)
12143 {
12144 raw_storage_iterator<_ForwardIterator, _Tp> __tmp = *this;
12145 ++_M_iter;
12146 return __tmp;
12147 }
12148 };
12149
12150 }
12151 # 59 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 2 3
12152
12153 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/limits" 1 3
12154 # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/limits" 3
12155
12156 # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/limits" 3
12157 # 150 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/limits" 3
12158 namespace std __attribute__ ((__visibility__ ("default"))) {
12159
12160
12161
12162
12163
12164
12165 enum float_round_style
12166 {
12167 round_indeterminate = -1,
12168 round_toward_zero = 0,
12169 round_to_nearest = 1,
12170 round_toward_infinity = 2,
12171 round_toward_neg_infinity = 3
12172 };
12173
12174
12175
12176
12177
12178
12179
12180 enum float_denorm_style
12181 {
12182
12183 denorm_indeterminate = -1,
12184
12185 denorm_absent = 0,
12186
12187 denorm_present = 1
12188 };
12189 # 192 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/limits" 3
12190 struct __numeric_limits_base
12191 {
12192
12193
12194 static const bool is_specialized = false;
12195
12196
12197
12198
12199 static const int digits = 0;
12200
12201 static const int digits10 = 0;
12202
12203 static const bool is_signed = false;
12204
12205
12206
12207
12208
12209 static const bool is_integer = false;
12210
12211
12212
12213
12214 static const bool is_exact = false;
12215
12216
12217 static const int radix = 0;
12218
12219
12220
12221 static const int min_exponent = 0;
12222
12223
12224 static const int min_exponent10 = 0;
12225
12226
12227
12228 static const int max_exponent = 0;
12229
12230
12231 static const int max_exponent10 = 0;
12232
12233
12234 static const bool has_infinity = false;
12235
12236
12237 static const bool has_quiet_NaN = false;
12238
12239
12240 static const bool has_signaling_NaN = false;
12241
12242 static const float_denorm_style has_denorm = denorm_absent;
12243
12244
12245 static const bool has_denorm_loss = false;
12246
12247
12248
12249 static const bool is_iec559 = false;
12250
12251
12252
12253 static const bool is_bounded = false;
12254
12255
12256
12257
12258 static const bool is_modulo = false;
12259
12260
12261 static const bool traps = false;
12262
12263 static const bool tinyness_before = false;
12264
12265
12266
12267 static const float_round_style round_style = round_toward_zero;
12268 };
12269 # 285 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/limits" 3
12270 template<typename _Tp>
12271 struct numeric_limits : public __numeric_limits_base
12272 {
12273
12274
12275 static _Tp min() throw() { return static_cast<_Tp>(0); }
12276
12277 static _Tp max() throw() { return static_cast<_Tp>(0); }
12278
12279
12280 static _Tp epsilon() throw() { return static_cast<_Tp>(0); }
12281
12282 static _Tp round_error() throw() { return static_cast<_Tp>(0); }
12283
12284 static _Tp infinity() throw() { return static_cast<_Tp>(0); }
12285
12286 static _Tp quiet_NaN() throw() { return static_cast<_Tp>(0); }
12287
12288
12289 static _Tp signaling_NaN() throw() { return static_cast<_Tp>(0); }
12290
12291
12292
12293 static _Tp denorm_min() throw() { return static_cast<_Tp>(0); }
12294 };
12295
12296
12297
12298
12299
12300 template<>
12301 struct numeric_limits<bool>
12302 {
12303 static const bool is_specialized = true;
12304
12305 static bool min() throw()
12306 { return false; }
12307 static bool max() throw()
12308 { return true; }
12309
12310 static const int digits = 1;
12311 static const int digits10 = 0;
12312 static const bool is_signed = false;
12313 static const bool is_integer = true;
12314 static const bool is_exact = true;
12315 static const int radix = 2;
12316 static bool epsilon() throw()
12317 { return false; }
12318 static bool round_error() throw()
12319 { return false; }
12320
12321 static const int min_exponent = 0;
12322 static const int min_exponent10 = 0;
12323 static const int max_exponent = 0;
12324 static const int max_exponent10 = 0;
12325
12326 static const bool has_infinity = false;
12327 static const bool has_quiet_NaN = false;
12328 static const bool has_signaling_NaN = false;
12329 static const float_denorm_style has_denorm = denorm_absent;
12330 static const bool has_denorm_loss = false;
12331
12332 static bool infinity() throw()
12333 { return false; }
12334 static bool quiet_NaN() throw()
12335 { return false; }
12336 static bool signaling_NaN() throw()
12337 { return false; }
12338 static bool denorm_min() throw()
12339 { return false; }
12340
12341 static const bool is_iec559 = false;
12342 static const bool is_bounded = true;
12343 static const bool is_modulo = false;
12344
12345
12346
12347
12348 static const bool traps = false;
12349 static const bool tinyness_before = false;
12350 static const float_round_style round_style = round_toward_zero;
12351 };
12352
12353
12354 template<>
12355 struct numeric_limits<char>
12356 {
12357 static const bool is_specialized = true;
12358
12359 static char min() throw()
12360 { return (((char)(-1) < 0) ? (char)1 << (sizeof(char) * 8 - ((char)(-1) < 0)) : (char)0); }
12361 static char max() throw()
12362 { return (((char)(-1) < 0) ? ((char)1 << (sizeof(char) * 8 - ((char)(-1) < 0))) - 1 : ~(char)0); }
12363
12364 static const int digits = (sizeof(char) * 8 - ((char)(-1) < 0));
12365 static const int digits10 = ((sizeof(char) * 8 - ((char)(-1) < 0)) * 643 / 2136);
12366 static const bool is_signed = ((char)(-1) < 0);
12367 static const bool is_integer = true;
12368 static const bool is_exact = true;
12369 static const int radix = 2;
12370 static char epsilon() throw()
12371 { return 0; }
12372 static char round_error() throw()
12373 { return 0; }
12374
12375 static const int min_exponent = 0;
12376 static const int min_exponent10 = 0;
12377 static const int max_exponent = 0;
12378 static const int max_exponent10 = 0;
12379
12380 static const bool has_infinity = false;
12381 static const bool has_quiet_NaN = false;
12382 static const bool has_signaling_NaN = false;
12383 static const float_denorm_style has_denorm = denorm_absent;
12384 static const bool has_denorm_loss = false;
12385
12386 static char infinity() throw()
12387 { return char(); }
12388 static char quiet_NaN() throw()
12389 { return char(); }
12390 static char signaling_NaN() throw()
12391 { return char(); }
12392 static char denorm_min() throw()
12393 { return static_cast<char>(0); }
12394
12395 static const bool is_iec559 = false;
12396 static const bool is_bounded = true;
12397 static const bool is_modulo = true;
12398
12399 static const bool traps = false;
12400 static const bool tinyness_before = false;
12401 static const float_round_style round_style = round_toward_zero;
12402 };
12403
12404
12405 template<>
12406 struct numeric_limits<signed char>
12407 {
12408 static const bool is_specialized = true;
12409
12410 static signed char min() throw()
12411 { return -127 - 1; }
12412 static signed char max() throw()
12413 { return 127; }
12414
12415 static const int digits = (sizeof(signed char) * 8 - ((signed char)(-1) < 0));
12416 static const int digits10 = ((sizeof(signed char) * 8 - ((signed char)(-1) < 0)) * 643 / 2136);
12417 static const bool is_signed = true;
12418 static const bool is_integer = true;
12419 static const bool is_exact = true;
12420 static const int radix = 2;
12421 static signed char epsilon() throw()
12422 { return 0; }
12423 static signed char round_error() throw()
12424 { return 0; }
12425
12426 static const int min_exponent = 0;
12427 static const int min_exponent10 = 0;
12428 static const int max_exponent = 0;
12429 static const int max_exponent10 = 0;
12430
12431 static const bool has_infinity = false;
12432 static const bool has_quiet_NaN = false;
12433 static const bool has_signaling_NaN = false;
12434 static const float_denorm_style has_denorm = denorm_absent;
12435 static const bool has_denorm_loss = false;
12436
12437 static signed char infinity() throw()
12438 { return static_cast<signed char>(0); }
12439 static signed char quiet_NaN() throw()
12440 { return static_cast<signed char>(0); }
12441 static signed char signaling_NaN() throw()
12442 { return static_cast<signed char>(0); }
12443 static signed char denorm_min() throw()
12444 { return static_cast<signed char>(0); }
12445
12446 static const bool is_iec559 = false;
12447 static const bool is_bounded = true;
12448 static const bool is_modulo = true;
12449
12450 static const bool traps = false;
12451 static const bool tinyness_before = false;
12452 static const float_round_style round_style = round_toward_zero;
12453 };
12454
12455
12456 template<>
12457 struct numeric_limits<unsigned char>
12458 {
12459 static const bool is_specialized = true;
12460
12461 static unsigned char min() throw()
12462 { return 0; }
12463 static unsigned char max() throw()
12464 { return 127 * 2U + 1; }
12465
12466 static const int digits = (sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0));
12467 static const int digits10 = ((sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)) * 643 / 2136);
12468 static const bool is_signed = false;
12469 static const bool is_integer = true;
12470 static const bool is_exact = true;
12471 static const int radix = 2;
12472 static unsigned char epsilon() throw()
12473 { return 0; }
12474 static unsigned char round_error() throw()
12475 { return 0; }
12476
12477 static const int min_exponent = 0;
12478 static const int min_exponent10 = 0;
12479 static const int max_exponent = 0;
12480 static const int max_exponent10 = 0;
12481
12482 static const bool has_infinity = false;
12483 static const bool has_quiet_NaN = false;
12484 static const bool has_signaling_NaN = false;
12485 static const float_denorm_style has_denorm = denorm_absent;
12486 static const bool has_denorm_loss = false;
12487
12488 static unsigned char infinity() throw()
12489 { return static_cast<unsigned char>(0); }
12490 static unsigned char quiet_NaN() throw()
12491 { return static_cast<unsigned char>(0); }
12492 static unsigned char signaling_NaN() throw()
12493 { return static_cast<unsigned char>(0); }
12494 static unsigned char denorm_min() throw()
12495 { return static_cast<unsigned char>(0); }
12496
12497 static const bool is_iec559 = false;
12498 static const bool is_bounded = true;
12499 static const bool is_modulo = true;
12500
12501 static const bool traps = false;
12502 static const bool tinyness_before = false;
12503 static const float_round_style round_style = round_toward_zero;
12504 };
12505
12506
12507 template<>
12508 struct numeric_limits<wchar_t>
12509 {
12510 static const bool is_specialized = true;
12511
12512 static wchar_t min() throw()
12513 { return (((wchar_t)(-1) < 0) ? (wchar_t)1 << (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) : (wchar_t)0); }
12514 static wchar_t max() throw()
12515 { return (((wchar_t)(-1) < 0) ? ((wchar_t)1 << (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0))) - 1 : ~(wchar_t)0); }
12516
12517 static const int digits = (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0));
12518 static const int digits10 = ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) * 643 / 2136);
12519 static const bool is_signed = ((wchar_t)(-1) < 0);
12520 static const bool is_integer = true;
12521 static const bool is_exact = true;
12522 static const int radix = 2;
12523 static wchar_t epsilon() throw()
12524 { return 0; }
12525 static wchar_t round_error() throw()
12526 { return 0; }
12527
12528 static const int min_exponent = 0;
12529 static const int min_exponent10 = 0;
12530 static const int max_exponent = 0;
12531 static const int max_exponent10 = 0;
12532
12533 static const bool has_infinity = false;
12534 static const bool has_quiet_NaN = false;
12535 static const bool has_signaling_NaN = false;
12536 static const float_denorm_style has_denorm = denorm_absent;
12537 static const bool has_denorm_loss = false;
12538
12539 static wchar_t infinity() throw()
12540 { return wchar_t(); }
12541 static wchar_t quiet_NaN() throw()
12542 { return wchar_t(); }
12543 static wchar_t signaling_NaN() throw()
12544 { return wchar_t(); }
12545 static wchar_t denorm_min() throw()
12546 { return wchar_t(); }
12547
12548 static const bool is_iec559 = false;
12549 static const bool is_bounded = true;
12550 static const bool is_modulo = true;
12551
12552 static const bool traps = false;
12553 static const bool tinyness_before = false;
12554 static const float_round_style round_style = round_toward_zero;
12555 };
12556
12557
12558 template<>
12559 struct numeric_limits<short>
12560 {
12561 static const bool is_specialized = true;
12562
12563 static short min() throw()
12564 { return -32767 - 1; }
12565 static short max() throw()
12566 { return 32767; }
12567
12568 static const int digits = (sizeof(short) * 8 - ((short)(-1) < 0));
12569 static const int digits10 = ((sizeof(short) * 8 - ((short)(-1) < 0)) * 643 / 2136);
12570 static const bool is_signed = true;
12571 static const bool is_integer = true;
12572 static const bool is_exact = true;
12573 static const int radix = 2;
12574 static short epsilon() throw()
12575 { return 0; }
12576 static short round_error() throw()
12577 { return 0; }
12578
12579 static const int min_exponent = 0;
12580 static const int min_exponent10 = 0;
12581 static const int max_exponent = 0;
12582 static const int max_exponent10 = 0;
12583
12584 static const bool has_infinity = false;
12585 static const bool has_quiet_NaN = false;
12586 static const bool has_signaling_NaN = false;
12587 static const float_denorm_style has_denorm = denorm_absent;
12588 static const bool has_denorm_loss = false;
12589
12590 static short infinity() throw()
12591 { return short(); }
12592 static short quiet_NaN() throw()
12593 { return short(); }
12594 static short signaling_NaN() throw()
12595 { return short(); }
12596 static short denorm_min() throw()
12597 { return short(); }
12598
12599 static const bool is_iec559 = false;
12600 static const bool is_bounded = true;
12601 static const bool is_modulo = true;
12602
12603 static const bool traps = false;
12604 static const bool tinyness_before = false;
12605 static const float_round_style round_style = round_toward_zero;
12606 };
12607
12608
12609 template<>
12610 struct numeric_limits<unsigned short>
12611 {
12612 static const bool is_specialized = true;
12613
12614 static unsigned short min() throw()
12615 { return 0; }
12616 static unsigned short max() throw()
12617 { return 32767 * 2U + 1; }
12618
12619 static const int digits = (sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0));
12620 static const int digits10 = ((sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)) * 643 / 2136);
12621 static const bool is_signed = false;
12622 static const bool is_integer = true;
12623 static const bool is_exact = true;
12624 static const int radix = 2;
12625 static unsigned short epsilon() throw()
12626 { return 0; }
12627 static unsigned short round_error() throw()
12628 { return 0; }
12629
12630 static const int min_exponent = 0;
12631 static const int min_exponent10 = 0;
12632 static const int max_exponent = 0;
12633 static const int max_exponent10 = 0;
12634
12635 static const bool has_infinity = false;
12636 static const bool has_quiet_NaN = false;
12637 static const bool has_signaling_NaN = false;
12638 static const float_denorm_style has_denorm = denorm_absent;
12639 static const bool has_denorm_loss = false;
12640
12641 static unsigned short infinity() throw()
12642 { return static_cast<unsigned short>(0); }
12643 static unsigned short quiet_NaN() throw()
12644 { return static_cast<unsigned short>(0); }
12645 static unsigned short signaling_NaN() throw()
12646 { return static_cast<unsigned short>(0); }
12647 static unsigned short denorm_min() throw()
12648 { return static_cast<unsigned short>(0); }
12649
12650 static const bool is_iec559 = false;
12651 static const bool is_bounded = true;
12652 static const bool is_modulo = true;
12653
12654 static const bool traps = false;
12655 static const bool tinyness_before = false;
12656 static const float_round_style round_style = round_toward_zero;
12657 };
12658
12659
12660 template<>
12661 struct numeric_limits<int>
12662 {
12663 static const bool is_specialized = true;
12664
12665 static int min() throw()
12666 { return -2147483647 - 1; }
12667 static int max() throw()
12668 { return 2147483647; }
12669
12670 static const int digits = (sizeof(int) * 8 - ((int)(-1) < 0));
12671 static const int digits10 = ((sizeof(int) * 8 - ((int)(-1) < 0)) * 643 / 2136);
12672 static const bool is_signed = true;
12673 static const bool is_integer = true;
12674 static const bool is_exact = true;
12675 static const int radix = 2;
12676 static int epsilon() throw()
12677 { return 0; }
12678 static int round_error() throw()
12679 { return 0; }
12680
12681 static const int min_exponent = 0;
12682 static const int min_exponent10 = 0;
12683 static const int max_exponent = 0;
12684 static const int max_exponent10 = 0;
12685
12686 static const bool has_infinity = false;
12687 static const bool has_quiet_NaN = false;
12688 static const bool has_signaling_NaN = false;
12689 static const float_denorm_style has_denorm = denorm_absent;
12690 static const bool has_denorm_loss = false;
12691
12692 static int infinity() throw()
12693 { return static_cast<int>(0); }
12694 static int quiet_NaN() throw()
12695 { return static_cast<int>(0); }
12696 static int signaling_NaN() throw()
12697 { return static_cast<int>(0); }
12698 static int denorm_min() throw()
12699 { return static_cast<int>(0); }
12700
12701 static const bool is_iec559 = false;
12702 static const bool is_bounded = true;
12703 static const bool is_modulo = true;
12704
12705 static const bool traps = false;
12706 static const bool tinyness_before = false;
12707 static const float_round_style round_style = round_toward_zero;
12708 };
12709
12710
12711 template<>
12712 struct numeric_limits<unsigned int>
12713 {
12714 static const bool is_specialized = true;
12715
12716 static unsigned int min() throw()
12717 { return 0; }
12718 static unsigned int max() throw()
12719 { return 2147483647 * 2U + 1; }
12720
12721 static const int digits = (sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0));
12722 static const int digits10 = ((sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)) * 643 / 2136);
12723 static const bool is_signed = false;
12724 static const bool is_integer = true;
12725 static const bool is_exact = true;
12726 static const int radix = 2;
12727 static unsigned int epsilon() throw()
12728 { return 0; }
12729 static unsigned int round_error() throw()
12730 { return 0; }
12731
12732 static const int min_exponent = 0;
12733 static const int min_exponent10 = 0;
12734 static const int max_exponent = 0;
12735 static const int max_exponent10 = 0;
12736
12737 static const bool has_infinity = false;
12738 static const bool has_quiet_NaN = false;
12739 static const bool has_signaling_NaN = false;
12740 static const float_denorm_style has_denorm = denorm_absent;
12741 static const bool has_denorm_loss = false;
12742
12743 static unsigned int infinity() throw()
12744 { return static_cast<unsigned int>(0); }
12745 static unsigned int quiet_NaN() throw()
12746 { return static_cast<unsigned int>(0); }
12747 static unsigned int signaling_NaN() throw()
12748 { return static_cast<unsigned int>(0); }
12749 static unsigned int denorm_min() throw()
12750 { return static_cast<unsigned int>(0); }
12751
12752 static const bool is_iec559 = false;
12753 static const bool is_bounded = true;
12754 static const bool is_modulo = true;
12755
12756 static const bool traps = false;
12757 static const bool tinyness_before = false;
12758 static const float_round_style round_style = round_toward_zero;
12759 };
12760
12761
12762 template<>
12763 struct numeric_limits<long>
12764 {
12765 static const bool is_specialized = true;
12766
12767 static long min() throw()
12768 { return -2147483647L - 1; }
12769 static long max() throw()
12770 { return 2147483647L; }
12771
12772 static const int digits = (sizeof(long) * 8 - ((long)(-1) < 0));
12773 static const int digits10 = ((sizeof(long) * 8 - ((long)(-1) < 0)) * 643 / 2136);
12774 static const bool is_signed = true;
12775 static const bool is_integer = true;
12776 static const bool is_exact = true;
12777 static const int radix = 2;
12778 static long epsilon() throw()
12779 { return 0; }
12780 static long round_error() throw()
12781 { return 0; }
12782
12783 static const int min_exponent = 0;
12784 static const int min_exponent10 = 0;
12785 static const int max_exponent = 0;
12786 static const int max_exponent10 = 0;
12787
12788 static const bool has_infinity = false;
12789 static const bool has_quiet_NaN = false;
12790 static const bool has_signaling_NaN = false;
12791 static const float_denorm_style has_denorm = denorm_absent;
12792 static const bool has_denorm_loss = false;
12793
12794 static long infinity() throw()
12795 { return static_cast<long>(0); }
12796 static long quiet_NaN() throw()
12797 { return static_cast<long>(0); }
12798 static long signaling_NaN() throw()
12799 { return static_cast<long>(0); }
12800 static long denorm_min() throw()
12801 { return static_cast<long>(0); }
12802
12803 static const bool is_iec559 = false;
12804 static const bool is_bounded = true;
12805 static const bool is_modulo = true;
12806
12807 static const bool traps = false;
12808 static const bool tinyness_before = false;
12809 static const float_round_style round_style = round_toward_zero;
12810 };
12811
12812
12813 template<>
12814 struct numeric_limits<unsigned long>
12815 {
12816 static const bool is_specialized = true;
12817
12818 static unsigned long min() throw()
12819 { return 0; }
12820 static unsigned long max() throw()
12821 { return 2147483647L * 2UL + 1; }
12822
12823 static const int digits = (sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0));
12824 static const int digits10 = ((sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)) * 643 / 2136);
12825 static const bool is_signed = false;
12826 static const bool is_integer = true;
12827 static const bool is_exact = true;
12828 static const int radix = 2;
12829 static unsigned long epsilon() throw()
12830 { return 0; }
12831 static unsigned long round_error() throw()
12832 { return 0; }
12833
12834 static const int min_exponent = 0;
12835 static const int min_exponent10 = 0;
12836 static const int max_exponent = 0;
12837 static const int max_exponent10 = 0;
12838
12839 static const bool has_infinity = false;
12840 static const bool has_quiet_NaN = false;
12841 static const bool has_signaling_NaN = false;
12842 static const float_denorm_style has_denorm = denorm_absent;
12843 static const bool has_denorm_loss = false;
12844
12845 static unsigned long infinity() throw()
12846 { return static_cast<unsigned long>(0); }
12847 static unsigned long quiet_NaN() throw()
12848 { return static_cast<unsigned long>(0); }
12849 static unsigned long signaling_NaN() throw()
12850 { return static_cast<unsigned long>(0); }
12851 static unsigned long denorm_min() throw()
12852 { return static_cast<unsigned long>(0); }
12853
12854 static const bool is_iec559 = false;
12855 static const bool is_bounded = true;
12856 static const bool is_modulo = true;
12857
12858 static const bool traps = false;
12859 static const bool tinyness_before = false;
12860 static const float_round_style round_style = round_toward_zero;
12861 };
12862
12863
12864 template<>
12865 struct numeric_limits<long long>
12866 {
12867 static const bool is_specialized = true;
12868
12869 static long long min() throw()
12870 { return -9223372036854775807LL - 1; }
12871 static long long max() throw()
12872 { return 9223372036854775807LL; }
12873
12874 static const int digits = (sizeof(long long) * 8 - ((long long)(-1) < 0));
12875 static const int digits10 = ((sizeof(long long) * 8 - ((long long)(-1) < 0)) * 643 / 2136);
12876 static const bool is_signed = true;
12877 static const bool is_integer = true;
12878 static const bool is_exact = true;
12879 static const int radix = 2;
12880 static long long epsilon() throw()
12881 { return 0; }
12882 static long long round_error() throw()
12883 { return 0; }
12884
12885 static const int min_exponent = 0;
12886 static const int min_exponent10 = 0;
12887 static const int max_exponent = 0;
12888 static const int max_exponent10 = 0;
12889
12890 static const bool has_infinity = false;
12891 static const bool has_quiet_NaN = false;
12892 static const bool has_signaling_NaN = false;
12893 static const float_denorm_style has_denorm = denorm_absent;
12894 static const bool has_denorm_loss = false;
12895
12896 static long long infinity() throw()
12897 { return static_cast<long long>(0); }
12898 static long long quiet_NaN() throw()
12899 { return static_cast<long long>(0); }
12900 static long long signaling_NaN() throw()
12901 { return static_cast<long long>(0); }
12902 static long long denorm_min() throw()
12903 { return static_cast<long long>(0); }
12904
12905 static const bool is_iec559 = false;
12906 static const bool is_bounded = true;
12907 static const bool is_modulo = true;
12908
12909 static const bool traps = false;
12910 static const bool tinyness_before = false;
12911 static const float_round_style round_style = round_toward_zero;
12912 };
12913
12914
12915 template<>
12916 struct numeric_limits<unsigned long long>
12917 {
12918 static const bool is_specialized = true;
12919
12920 static unsigned long long min() throw()
12921 { return 0; }
12922 static unsigned long long max() throw()
12923 { return 9223372036854775807LL * 2ULL + 1; }
12924
12925 static const int digits = (sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0));
12926 static const int digits10 = ((sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)) * 643 / 2136);
12927 static const bool is_signed = false;
12928 static const bool is_integer = true;
12929 static const bool is_exact = true;
12930 static const int radix = 2;
12931 static unsigned long long epsilon() throw()
12932 { return 0; }
12933 static unsigned long long round_error() throw()
12934 { return 0; }
12935
12936 static const int min_exponent = 0;
12937 static const int min_exponent10 = 0;
12938 static const int max_exponent = 0;
12939 static const int max_exponent10 = 0;
12940
12941 static const bool has_infinity = false;
12942 static const bool has_quiet_NaN = false;
12943 static const bool has_signaling_NaN = false;
12944 static const float_denorm_style has_denorm = denorm_absent;
12945 static const bool has_denorm_loss = false;
12946
12947 static unsigned long long infinity() throw()
12948 { return static_cast<unsigned long long>(0); }
12949 static unsigned long long quiet_NaN() throw()
12950 { return static_cast<unsigned long long>(0); }
12951 static unsigned long long signaling_NaN() throw()
12952 { return static_cast<unsigned long long>(0); }
12953 static unsigned long long denorm_min() throw()
12954 { return static_cast<unsigned long long>(0); }
12955
12956 static const bool is_iec559 = false;
12957 static const bool is_bounded = true;
12958 static const bool is_modulo = true;
12959
12960 static const bool traps = false;
12961 static const bool tinyness_before = false;
12962 static const float_round_style round_style = round_toward_zero;
12963 };
12964
12965
12966 template<>
12967 struct numeric_limits<float>
12968 {
12969 static const bool is_specialized = true;
12970
12971 static float min() throw()
12972 { return 1.17549435e-38F; }
12973 static float max() throw()
12974 { return 3.40282347e+38F; }
12975
12976 static const int digits = 24;
12977 static const int digits10 = 6;
12978 static const bool is_signed = true;
12979 static const bool is_integer = false;
12980 static const bool is_exact = false;
12981 static const int radix = 2;
12982 static float epsilon() throw()
12983 { return 1.19209290e-7F; }
12984 static float round_error() throw()
12985 { return 0.5F; }
12986
12987 static const int min_exponent = (-125);
12988 static const int min_exponent10 = (-37);
12989 static const int max_exponent = 128;
12990 static const int max_exponent10 = 38;
12991
12992 static const bool has_infinity = 1;
12993 static const bool has_quiet_NaN = 1;
12994 static const bool has_signaling_NaN = has_quiet_NaN;
12995 static const float_denorm_style has_denorm
12996 = bool(1) ? denorm_present : denorm_absent;
12997 static const bool has_denorm_loss = false;
12998
12999 static float infinity() throw()
13000 { return __builtin_huge_valf (); }
13001 static float quiet_NaN() throw()
13002 { return __builtin_nanf (""); }
13003 static float signaling_NaN() throw()
13004 { return __builtin_nansf (""); }
13005 static float denorm_min() throw()
13006 { return 1.40129846e-45F; }
13007
13008 static const bool is_iec559
13009 = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
13010 static const bool is_bounded = true;
13011 static const bool is_modulo = false;
13012
13013 static const bool traps = false;
13014 static const bool tinyness_before = false;
13015 static const float_round_style round_style = round_to_nearest;
13016 };
13017
13018
13019
13020
13021
13022
13023 template<>
13024 struct numeric_limits<double>
13025 {
13026 static const bool is_specialized = true;
13027
13028 static double min() throw()
13029 { return 2.2250738585072014e-308; }
13030 static double max() throw()
13031 { return 1.7976931348623157e+308; }
13032
13033 static const int digits = 53;
13034 static const int digits10 = 15;
13035 static const bool is_signed = true;
13036 static const bool is_integer = false;
13037 static const bool is_exact = false;
13038 static const int radix = 2;
13039 static double epsilon() throw()
13040 { return 2.2204460492503131e-16; }
13041 static double round_error() throw()
13042 { return 0.5; }
13043
13044 static const int min_exponent = (-1021);
13045 static const int min_exponent10 = (-307);
13046 static const int max_exponent = 1024;
13047 static const int max_exponent10 = 308;
13048
13049 static const bool has_infinity = 1;
13050 static const bool has_quiet_NaN = 1;
13051 static const bool has_signaling_NaN = has_quiet_NaN;
13052 static const float_denorm_style has_denorm
13053 = bool(1) ? denorm_present : denorm_absent;
13054 static const bool has_denorm_loss = false;
13055
13056 static double infinity() throw()
13057 { return __builtin_huge_val(); }
13058 static double quiet_NaN() throw()
13059 { return __builtin_nan (""); }
13060 static double signaling_NaN() throw()
13061 { return __builtin_nans (""); }
13062 static double denorm_min() throw()
13063 { return 4.9406564584124654e-324; }
13064
13065 static const bool is_iec559
13066 = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
13067 static const bool is_bounded = true;
13068 static const bool is_modulo = false;
13069
13070 static const bool traps = false;
13071 static const bool tinyness_before = false;
13072 static const float_round_style round_style = round_to_nearest;
13073 };
13074
13075
13076
13077
13078
13079
13080 template<>
13081 struct numeric_limits<long double>
13082 {
13083 static const bool is_specialized = true;
13084
13085 static long double min() throw()
13086 { return 2.00416836000897277799610805135016e-292L; }
13087 static long double max() throw()
13088 { return 1.79769313486231580793728971405301e+308L; }
13089
13090 static const int digits = 106;
13091 static const int digits10 = 31;
13092 static const bool is_signed = true;
13093 static const bool is_integer = false;
13094 static const bool is_exact = false;
13095 static const int radix = 2;
13096 static long double epsilon() throw()
13097 { return 4.94065645841246544176568792868221e-324L; }
13098 static long double round_error() throw()
13099 { return 0.5L; }
13100
13101 static const int min_exponent = (-968);
13102 static const int min_exponent10 = (-291);
13103 static const int max_exponent = 1024;
13104 static const int max_exponent10 = 308;
13105
13106 static const bool has_infinity = 1;
13107 static const bool has_quiet_NaN = 1;
13108 static const bool has_signaling_NaN = has_quiet_NaN;
13109 static const float_denorm_style has_denorm
13110 = bool(1) ? denorm_present : denorm_absent;
13111 static const bool has_denorm_loss
13112 = false;
13113
13114 static long double infinity() throw()
13115 { return __builtin_huge_vall (); }
13116 static long double quiet_NaN() throw()
13117 { return __builtin_nanl (""); }
13118 static long double signaling_NaN() throw()
13119 { return __builtin_nansl (""); }
13120 static long double denorm_min() throw()
13121 { return 4.94065645841246544176568792868221e-324L; }
13122
13123 static const bool is_iec559
13124 = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
13125 static const bool is_bounded = true;
13126 static const bool is_modulo = false;
13127
13128 static const bool traps = false;
13129 static const bool tinyness_before = false;
13130 static const float_round_style round_style = round_to_nearest;
13131 };
13132
13133
13134
13135
13136
13137 }
13138 # 61 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 2 3
13139
13140 namespace std __attribute__ ((__visibility__ ("default"))) {
13141 # 72 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3
13142 template<typename _Tp>
13143 pair<_Tp*, ptrdiff_t>
13144 __get_temporary_buffer(ptrdiff_t __len, _Tp*)
13145 {
13146 const ptrdiff_t __max = numeric_limits<ptrdiff_t>::max() / sizeof(_Tp);
13147 if (__len > __max)
13148 __len = __max;
13149
13150 while (__len > 0)
13151 {
13152 _Tp* __tmp = static_cast<_Tp*>(::operator new(__len * sizeof(_Tp),
13153 nothrow));
13154 if (__tmp != 0)
13155 return pair<_Tp*, ptrdiff_t>(__tmp, __len);
13156 __len /= 2;
13157 }
13158 return pair<_Tp*, ptrdiff_t>(static_cast<_Tp*>(0), 0);
13159 }
13160 # 108 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3
13161 template<typename _Tp>
13162 inline pair<_Tp*, ptrdiff_t>
13163 get_temporary_buffer(ptrdiff_t __len)
13164 { return std::__get_temporary_buffer(__len, static_cast<_Tp*>(0)); }
13165 # 120 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3
13166 template<typename _Tp>
13167 void
13168 return_temporary_buffer(_Tp* __p)
13169 { ::operator delete(__p, nothrow); }
13170 # 132 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3
13171 template<typename _Tp1>
13172 struct auto_ptr_ref
13173 {
13174 _Tp1* _M_ptr;
13175
13176 explicit
13177 auto_ptr_ref(_Tp1* __p): _M_ptr(__p) { }
13178 };
13179 # 173 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3
13180 template<typename _Tp>
13181 class auto_ptr
13182 {
13183 private:
13184 _Tp* _M_ptr;
13185
13186 public:
13187
13188 typedef _Tp element_type;
13189
13190
13191
13192
13193
13194
13195
13196 explicit
13197 auto_ptr(element_type* __p = 0) throw() : _M_ptr(__p) { }
13198 # 199 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3
13199 auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) { }
13200 # 211 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3
13201 template<typename _Tp1>
13202 auto_ptr(auto_ptr<_Tp1>& __a) throw() : _M_ptr(__a.release()) { }
13203 # 222 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3
13204 auto_ptr&
13205 operator=(auto_ptr& __a) throw()
13206 {
13207 reset(__a.release());
13208 return *this;
13209 }
13210 # 239 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3
13211 template<typename _Tp1>
13212 auto_ptr&
13213 operator=(auto_ptr<_Tp1>& __a) throw()
13214 {
13215 reset(__a.release());
13216 return *this;
13217 }
13218 # 259 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3
13219 ~auto_ptr() { delete _M_ptr; }
13220 # 269 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3
13221 element_type&
13222 operator*() const throw()
13223 {
13224 ;
13225 return *_M_ptr;
13226 }
13227
13228
13229
13230
13231
13232
13233
13234 element_type*
13235 operator->() const throw()
13236 {
13237 ;
13238 return _M_ptr;
13239 }
13240 # 299 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3
13241 element_type*
13242 get() const throw() { return _M_ptr; }
13243 # 313 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3
13244 element_type*
13245 release() throw()
13246 {
13247 element_type* __tmp = _M_ptr;
13248 _M_ptr = 0;
13249 return __tmp;
13250 }
13251 # 328 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3
13252 void
13253 reset(element_type* __p = 0) throw()
13254 {
13255 if (__p != _M_ptr)
13256 {
13257 delete _M_ptr;
13258 _M_ptr = __p;
13259 }
13260 }
13261 # 349 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3
13262 auto_ptr(auto_ptr_ref<element_type> __ref) throw()
13263 : _M_ptr(__ref._M_ptr) { }
13264
13265 auto_ptr&
13266 operator=(auto_ptr_ref<element_type> __ref) throw()
13267 {
13268 if (__ref._M_ptr != this->get())
13269 {
13270 delete _M_ptr;
13271 _M_ptr = __ref._M_ptr;
13272 }
13273 return *this;
13274 }
13275
13276 template<typename _Tp1>
13277 operator auto_ptr_ref<_Tp1>() throw()
13278 { return auto_ptr_ref<_Tp1>(this->release()); }
13279
13280 template<typename _Tp1>
13281 operator auto_ptr<_Tp1>() throw()
13282 { return auto_ptr<_Tp1>(this->release()); }
13283 };
13284
13285 }
13286 # 66 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_tempbuf.h" 2 3
13287
13288 namespace std __attribute__ ((__visibility__ ("default"))) {
13289 # 76 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_tempbuf.h" 3
13290 template<typename _ForwardIterator, typename _Tp>
13291 class _Temporary_buffer
13292 {
13293
13294
13295
13296 public:
13297 typedef _Tp value_type;
13298 typedef value_type* pointer;
13299 typedef pointer iterator;
13300 typedef ptrdiff_t size_type;
13301
13302 protected:
13303 size_type _M_original_len;
13304 size_type _M_len;
13305 pointer _M_buffer;
13306
13307 void
13308 _M_initialize_buffer(const _Tp&, __true_type) { }
13309
13310 void
13311 _M_initialize_buffer(const _Tp& __val, __false_type)
13312 { std::uninitialized_fill_n(_M_buffer, _M_len, __val); }
13313
13314 public:
13315
13316 size_type
13317 size() const
13318 { return _M_len; }
13319
13320
13321 size_type
13322 requested_size() const
13323 { return _M_original_len; }
13324
13325
13326 iterator
13327 begin()
13328 { return _M_buffer; }
13329
13330
13331 iterator
13332 end()
13333 { return _M_buffer + _M_len; }
13334
13335
13336
13337
13338
13339 _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last);
13340
13341 ~_Temporary_buffer()
13342 {
13343 std::_Destroy(_M_buffer, _M_buffer + _M_len);
13344 std::return_temporary_buffer(_M_buffer);
13345 }
13346
13347 private:
13348
13349 _Temporary_buffer(const _Temporary_buffer&);
13350
13351 void
13352 operator=(const _Temporary_buffer&);
13353 };
13354
13355
13356 template<typename _ForwardIterator, typename _Tp>
13357 _Temporary_buffer<_ForwardIterator, _Tp>::
13358 _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last)
13359 : _M_original_len(std::distance(__first, __last)),
13360 _M_len(0), _M_buffer(0)
13361 {
13362
13363 typedef typename std::__is_scalar<_Tp>::__type _Trivial;
13364
13365 try
13366 {
13367 pair<pointer, size_type> __p(get_temporary_buffer<
13368 value_type>(_M_original_len));
13369 _M_buffer = __p.first;
13370 _M_len = __p.second;
13371 if (_M_len > 0)
13372 _M_initialize_buffer(*__first, _Trivial());
13373 }
13374 catch(...)
13375 {
13376 std::return_temporary_buffer(_M_buffer);
13377 _M_buffer = 0;
13378 _M_len = 0;
13379 throw;
13380 }
13381 }
13382
13383 }
13384 # 67 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 2 3
13385
13386
13387
13388
13389 namespace std __attribute__ ((__visibility__ ("default"))) {
13390 # 85 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
13391 template<typename _Tp>
13392 inline const _Tp&
13393 __median(const _Tp& __a, const _Tp& __b, const _Tp& __c)
13394 {
13395
13396
13397 if (__a < __b)
13398 if (__b < __c)
13399 return __b;
13400 else if (__a < __c)
13401 return __c;
13402 else
13403 return __a;
13404 else if (__a < __c)
13405 return __a;
13406 else if (__b < __c)
13407 return __c;
13408 else
13409 return __b;
13410 }
13411 # 119 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
13412 template<typename _Tp, typename _Compare>
13413 inline const _Tp&
13414 __median(const _Tp& __a, const _Tp& __b, const _Tp& __c, _Compare __comp)
13415 {
13416
13417
13418 if (__comp(__a, __b))
13419 if (__comp(__b, __c))
13420 return __b;
13421 else if (__comp(__a, __c))
13422 return __c;
13423 else
13424 return __a;
13425 else if (__comp(__a, __c))
13426 return __a;
13427 else if (__comp(__b, __c))
13428 return __c;
13429 else
13430 return __b;
13431 }
13432 # 151 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
13433 template<typename _InputIterator, typename _Function>
13434 _Function
13435 for_each(_InputIterator __first, _InputIterator __last, _Function __f)
13436 {
13437
13438
13439 ;
13440 for ( ; __first != __last; ++__first)
13441 __f(*__first);
13442 return __f;
13443 }
13444
13445
13446
13447
13448
13449
13450 template<typename _InputIterator, typename _Tp>
13451 inline _InputIterator
13452 __find(_InputIterator __first, _InputIterator __last,
13453 const _Tp& __val, input_iterator_tag)
13454 {
13455 while (__first != __last && !(*__first == __val))
13456 ++__first;
13457 return __first;
13458 }
13459
13460
13461
13462
13463
13464
13465 template<typename _InputIterator, typename _Predicate>
13466 inline _InputIterator
13467 __find_if(_InputIterator __first, _InputIterator __last,
13468 _Predicate __pred, input_iterator_tag)
13469 {
13470 while (__first != __last && !__pred(*__first))
13471 ++__first;
13472 return __first;
13473 }
13474
13475
13476
13477
13478
13479
13480 template<typename _RandomAccessIterator, typename _Tp>
13481 _RandomAccessIterator
13482 __find(_RandomAccessIterator __first, _RandomAccessIterator __last,
13483 const _Tp& __val, random_access_iterator_tag)
13484 {
13485 typename iterator_traits<_RandomAccessIterator>::difference_type
13486 __trip_count = (__last - __first) >> 2;
13487
13488 for ( ; __trip_count > 0 ; --__trip_count)
13489 {
13490 if (*__first == __val)
13491 return __first;
13492 ++__first;
13493
13494 if (*__first == __val)
13495 return __first;
13496 ++__first;
13497
13498 if (*__first == __val)
13499 return __first;
13500 ++__first;
13501
13502 if (*__first == __val)
13503 return __first;
13504 ++__first;
13505 }
13506
13507 switch (__last - __first)
13508 {
13509 case 3:
13510 if (*__first == __val)
13511 return __first;
13512 ++__first;
13513 case 2:
13514 if (*__first == __val)
13515 return __first;
13516 ++__first;
13517 case 1:
13518 if (*__first == __val)
13519 return __first;
13520 ++__first;
13521 case 0:
13522 default:
13523 return __last;
13524 }
13525 }
13526
13527
13528
13529
13530
13531
13532 template<typename _RandomAccessIterator, typename _Predicate>
13533 _RandomAccessIterator
13534 __find_if(_RandomAccessIterator __first, _RandomAccessIterator __last,
13535 _Predicate __pred, random_access_iterator_tag)
13536 {
13537 typename iterator_traits<_RandomAccessIterator>::difference_type
13538 __trip_count = (__last - __first) >> 2;
13539
13540 for ( ; __trip_count > 0 ; --__trip_count)
13541 {
13542 if (__pred(*__first))
13543 return __first;
13544 ++__first;
13545
13546 if (__pred(*__first))
13547 return __first;
13548 ++__first;
13549
13550 if (__pred(*__first))
13551 return __first;
13552 ++__first;
13553
13554 if (__pred(*__first))
13555 return __first;
13556 ++__first;
13557 }
13558
13559 switch (__last - __first)
13560 {
13561 case 3:
13562 if (__pred(*__first))
13563 return __first;
13564 ++__first;
13565 case 2:
13566 if (__pred(*__first))
13567 return __first;
13568 ++__first;
13569 case 1:
13570 if (__pred(*__first))
13571 return __first;
13572 ++__first;
13573 case 0:
13574 default:
13575 return __last;
13576 }
13577 }
13578
13579
13580
13581
13582
13583
13584 template<typename _CharT>
13585 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
13586 istreambuf_iterator<_CharT> >::__type
13587 find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>,
13588 const _CharT&);
13589 # 316 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
13590 template<typename _InputIterator, typename _Tp>
13591 inline _InputIterator
13592 find(_InputIterator __first, _InputIterator __last,
13593 const _Tp& __val)
13594 {
13595
13596
13597
13598
13599 ;
13600 return std::__find(__first, __last, __val,
13601 std::__iterator_category(__first));
13602 }
13603 # 338 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
13604 template<typename _InputIterator, typename _Predicate>
13605 inline _InputIterator
13606 find_if(_InputIterator __first, _InputIterator __last,
13607 _Predicate __pred)
13608 {
13609
13610
13611
13612
13613 ;
13614 return std::__find_if(__first, __last, __pred,
13615 std::__iterator_category(__first));
13616 }
13617 # 360 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
13618 template<typename _ForwardIterator>
13619 _ForwardIterator
13620 adjacent_find(_ForwardIterator __first, _ForwardIterator __last)
13621 {
13622
13623
13624
13625
13626 ;
13627 if (__first == __last)
13628 return __last;
13629 _ForwardIterator __next = __first;
13630 while(++__next != __last)
13631 {
13632 if (*__first == *__next)
13633 return __first;
13634 __first = __next;
13635 }
13636 return __last;
13637 }
13638 # 391 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
13639 template<typename _ForwardIterator, typename _BinaryPredicate>
13640 _ForwardIterator
13641 adjacent_find(_ForwardIterator __first, _ForwardIterator __last,
13642 _BinaryPredicate __binary_pred)
13643 {
13644
13645
13646
13647
13648
13649 ;
13650 if (__first == __last)
13651 return __last;
13652 _ForwardIterator __next = __first;
13653 while(++__next != __last)
13654 {
13655 if (__binary_pred(*__first, *__next))
13656 return __first;
13657 __first = __next;
13658 }
13659 return __last;
13660 }
13661 # 422 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
13662 template<typename _InputIterator, typename _Tp>
13663 typename iterator_traits<_InputIterator>::difference_type
13664 count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
13665 {
13666
13667
13668
13669
13670 ;
13671 typename iterator_traits<_InputIterator>::difference_type __n = 0;
13672 for ( ; __first != __last; ++__first)
13673 if (*__first == __value)
13674 ++__n;
13675 return __n;
13676 }
13677 # 446 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
13678 template<typename _InputIterator, typename _Predicate>
13679 typename iterator_traits<_InputIterator>::difference_type
13680 count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred)
13681 {
13682
13683
13684
13685
13686 ;
13687 typename iterator_traits<_InputIterator>::difference_type __n = 0;
13688 for ( ; __first != __last; ++__first)
13689 if (__pred(*__first))
13690 ++__n;
13691 return __n;
13692 }
13693 # 485 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
13694 template<typename _ForwardIterator1, typename _ForwardIterator2>
13695 _ForwardIterator1
13696 search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
13697 _ForwardIterator2 __first2, _ForwardIterator2 __last2)
13698 {
13699
13700
13701
13702
13703
13704
13705 ;
13706 ;
13707
13708 if (__first1 == __last1 || __first2 == __last2)
13709 return __first1;
13710
13711
13712 _ForwardIterator2 __tmp(__first2);
13713 ++__tmp;
13714 if (__tmp == __last2)
13715 return std::find(__first1, __last1, *__first2);
13716
13717
13718 _ForwardIterator2 __p1, __p;
13719 __p1 = __first2; ++__p1;
13720 _ForwardIterator1 __current = __first1;
13721
13722 while (__first1 != __last1)
13723 {
13724 __first1 = std::find(__first1, __last1, *__first2);
13725 if (__first1 == __last1)
13726 return __last1;
13727
13728 __p = __p1;
13729 __current = __first1;
13730 if (++__current == __last1)
13731 return __last1;
13732
13733 while (*__current == *__p)
13734 {
13735 if (++__p == __last2)
13736 return __first1;
13737 if (++__current == __last1)
13738 return __last1;
13739 }
13740 ++__first1;
13741 }
13742 return __first1;
13743 }
13744 # 556 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
13745 template<typename _ForwardIterator1, typename _ForwardIterator2,
13746 typename _BinaryPredicate>
13747 _ForwardIterator1
13748 search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
13749 _ForwardIterator2 __first2, _ForwardIterator2 __last2,
13750 _BinaryPredicate __predicate)
13751 {
13752
13753
13754
13755
13756
13757
13758 ;
13759 ;
13760
13761
13762 if (__first1 == __last1 || __first2 == __last2)
13763 return __first1;
13764
13765
13766 _ForwardIterator2 __tmp(__first2);
13767 ++__tmp;
13768 if (__tmp == __last2)
13769 {
13770 while (__first1 != __last1 && !__predicate(*__first1, *__first2))
13771 ++__first1;
13772 return __first1;
13773 }
13774
13775
13776 _ForwardIterator2 __p1, __p;
13777 __p1 = __first2; ++__p1;
13778 _ForwardIterator1 __current = __first1;
13779
13780 while (__first1 != __last1)
13781 {
13782 while (__first1 != __last1)
13783 {
13784 if (__predicate(*__first1, *__first2))
13785 break;
13786 ++__first1;
13787 }
13788 while (__first1 != __last1 && !__predicate(*__first1, *__first2))
13789 ++__first1;
13790 if (__first1 == __last1)
13791 return __last1;
13792
13793 __p = __p1;
13794 __current = __first1;
13795 if (++__current == __last1)
13796 return __last1;
13797
13798 while (__predicate(*__current, *__p))
13799 {
13800 if (++__p == __last2)
13801 return __first1;
13802 if (++__current == __last1)
13803 return __last1;
13804 }
13805 ++__first1;
13806 }
13807 return __first1;
13808 }
13809 # 628 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
13810 template<typename _ForwardIterator, typename _Integer, typename _Tp>
13811 _ForwardIterator
13812 __search_n(_ForwardIterator __first, _ForwardIterator __last,
13813 _Integer __count, const _Tp& __val,
13814 std::forward_iterator_tag)
13815 {
13816 __first = std::find(__first, __last, __val);
13817 while (__first != __last)
13818 {
13819 typename iterator_traits<_ForwardIterator>::difference_type
13820 __n = __count;
13821 _ForwardIterator __i = __first;
13822 ++__i;
13823 while (__i != __last && __n != 1 && *__i == __val)
13824 {
13825 ++__i;
13826 --__n;
13827 }
13828 if (__n == 1)
13829 return __first;
13830 if (__i == __last)
13831 return __last;
13832 __first = std::find(++__i, __last, __val);
13833 }
13834 return __last;
13835 }
13836 # 662 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
13837 template<typename _RandomAccessIter, typename _Integer, typename _Tp>
13838 _RandomAccessIter
13839 __search_n(_RandomAccessIter __first, _RandomAccessIter __last,
13840 _Integer __count, const _Tp& __val,
13841 std::random_access_iterator_tag)
13842 {
13843
13844 typedef typename std::iterator_traits<_RandomAccessIter>::difference_type
13845 _DistanceType;
13846
13847 _DistanceType __tailSize = __last - __first;
13848 const _DistanceType __pattSize = __count;
13849
13850 if (__tailSize < __pattSize)
13851 return __last;
13852
13853 const _DistanceType __skipOffset = __pattSize - 1;
13854 _RandomAccessIter __lookAhead = __first + __skipOffset;
13855 __tailSize -= __pattSize;
13856
13857 while (1)
13858 {
13859
13860
13861 while (!(*__lookAhead == __val))
13862 {
13863 if (__tailSize < __pattSize)
13864 return __last;
13865 __lookAhead += __pattSize;
13866 __tailSize -= __pattSize;
13867 }
13868 _DistanceType __remainder = __skipOffset;
13869 for (_RandomAccessIter __backTrack = __lookAhead - 1;
13870 *__backTrack == __val; --__backTrack)
13871 {
13872 if (--__remainder == 0)
13873 return (__lookAhead - __skipOffset);
13874 }
13875 if (__remainder > __tailSize)
13876 return __last;
13877 __lookAhead += __remainder;
13878 __tailSize -= __remainder;
13879 }
13880 }
13881 # 720 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
13882 template<typename _ForwardIterator, typename _Integer, typename _Tp>
13883 _ForwardIterator
13884 search_n(_ForwardIterator __first, _ForwardIterator __last,
13885 _Integer __count, const _Tp& __val)
13886 {
13887
13888
13889
13890
13891 ;
13892
13893 if (__count <= 0)
13894 return __first;
13895 if (__count == 1)
13896 return std::find(__first, __last, __val);
13897 return std::__search_n(__first, __last, __count, __val,
13898 std::__iterator_category(__first));
13899 }
13900 # 747 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
13901 template<typename _ForwardIterator, typename _Integer, typename _Tp,
13902 typename _BinaryPredicate>
13903 _ForwardIterator
13904 __search_n(_ForwardIterator __first, _ForwardIterator __last,
13905 _Integer __count, const _Tp& __val,
13906 _BinaryPredicate __binary_pred, std::forward_iterator_tag)
13907 {
13908 while (__first != __last && !__binary_pred(*__first, __val))
13909 ++__first;
13910
13911 while (__first != __last)
13912 {
13913 typename iterator_traits<_ForwardIterator>::difference_type
13914 __n = __count;
13915 _ForwardIterator __i = __first;
13916 ++__i;
13917 while (__i != __last && __n != 1 && __binary_pred(*__i, __val))
13918 {
13919 ++__i;
13920 --__n;
13921 }
13922 if (__n == 1)
13923 return __first;
13924 if (__i == __last)
13925 return __last;
13926 __first = ++__i;
13927 while (__first != __last && !__binary_pred(*__first, __val))
13928 ++__first;
13929 }
13930 return __last;
13931 }
13932 # 787 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
13933 template<typename _RandomAccessIter, typename _Integer, typename _Tp,
13934 typename _BinaryPredicate>
13935 _RandomAccessIter
13936 __search_n(_RandomAccessIter __first, _RandomAccessIter __last,
13937 _Integer __count, const _Tp& __val,
13938 _BinaryPredicate __binary_pred, std::random_access_iterator_tag)
13939 {
13940
13941 typedef typename std::iterator_traits<_RandomAccessIter>::difference_type
13942 _DistanceType;
13943
13944 _DistanceType __tailSize = __last - __first;
13945 const _DistanceType __pattSize = __count;
13946
13947 if (__tailSize < __pattSize)
13948 return __last;
13949
13950 const _DistanceType __skipOffset = __pattSize - 1;
13951 _RandomAccessIter __lookAhead = __first + __skipOffset;
13952 __tailSize -= __pattSize;
13953
13954 while (1)
13955 {
13956
13957
13958 while (!__binary_pred(*__lookAhead, __val))
13959 {
13960 if (__tailSize < __pattSize)
13961 return __last;
13962 __lookAhead += __pattSize;
13963 __tailSize -= __pattSize;
13964 }
13965 _DistanceType __remainder = __skipOffset;
13966 for (_RandomAccessIter __backTrack = __lookAhead - 1;
13967 __binary_pred(*__backTrack, __val); --__backTrack)
13968 {
13969 if (--__remainder == 0)
13970 return (__lookAhead - __skipOffset);
13971 }
13972 if (__remainder > __tailSize)
13973 return __last;
13974 __lookAhead += __remainder;
13975 __tailSize -= __remainder;
13976 }
13977 }
13978 # 848 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
13979 template<typename _ForwardIterator, typename _Integer, typename _Tp,
13980 typename _BinaryPredicate>
13981 _ForwardIterator
13982 search_n(_ForwardIterator __first, _ForwardIterator __last,
13983 _Integer __count, const _Tp& __val,
13984 _BinaryPredicate __binary_pred)
13985 {
13986
13987
13988
13989
13990 ;
13991
13992 if (__count <= 0)
13993 return __first;
13994 if (__count == 1)
13995 {
13996 while (__first != __last && !__binary_pred(*__first, __val))
13997 ++__first;
13998 return __first;
13999 }
14000 return std::__search_n(__first, __last, __count, __val, __binary_pred,
14001 std::__iterator_category(__first));
14002 }
14003 # 884 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14004 template<typename _ForwardIterator1, typename _ForwardIterator2>
14005 _ForwardIterator2
14006 swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
14007 _ForwardIterator2 __first2)
14008 {
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020 ;
14021
14022 for ( ; __first1 != __last1; ++__first1, ++__first2)
14023 std::iter_swap(__first1, __first2);
14024 return __first2;
14025 }
14026 # 922 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14027 template<typename _InputIterator, typename _OutputIterator,
14028 typename _UnaryOperation>
14029 _OutputIterator
14030 transform(_InputIterator __first, _InputIterator __last,
14031 _OutputIterator __result, _UnaryOperation __unary_op)
14032 {
14033
14034
14035
14036
14037
14038 ;
14039
14040 for ( ; __first != __last; ++__first, ++__result)
14041 *__result = __unary_op(*__first);
14042 return __result;
14043 }
14044 # 957 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14045 template<typename _InputIterator1, typename _InputIterator2,
14046 typename _OutputIterator, typename _BinaryOperation>
14047 _OutputIterator
14048 transform(_InputIterator1 __first1, _InputIterator1 __last1,
14049 _InputIterator2 __first2, _OutputIterator __result,
14050 _BinaryOperation __binary_op)
14051 {
14052
14053
14054
14055
14056
14057
14058 ;
14059
14060 for ( ; __first1 != __last1; ++__first1, ++__first2, ++__result)
14061 *__result = __binary_op(*__first1, *__first2);
14062 return __result;
14063 }
14064 # 989 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14065 template<typename _ForwardIterator, typename _Tp>
14066 void
14067 replace(_ForwardIterator __first, _ForwardIterator __last,
14068 const _Tp& __old_value, const _Tp& __new_value)
14069 {
14070
14071
14072
14073
14074
14075
14076
14077 ;
14078
14079 for ( ; __first != __last; ++__first)
14080 if (*__first == __old_value)
14081 *__first = __new_value;
14082 }
14083 # 1020 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14084 template<typename _ForwardIterator, typename _Predicate, typename _Tp>
14085 void
14086 replace_if(_ForwardIterator __first, _ForwardIterator __last,
14087 _Predicate __pred, const _Tp& __new_value)
14088 {
14089
14090
14091
14092
14093
14094
14095
14096 ;
14097
14098 for ( ; __first != __last; ++__first)
14099 if (__pred(*__first))
14100 *__first = __new_value;
14101 }
14102 # 1053 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14103 template<typename _InputIterator, typename _OutputIterator, typename _Tp>
14104 _OutputIterator
14105 replace_copy(_InputIterator __first, _InputIterator __last,
14106 _OutputIterator __result,
14107 const _Tp& __old_value, const _Tp& __new_value)
14108 {
14109
14110
14111
14112
14113
14114
14115 ;
14116
14117 for ( ; __first != __last; ++__first, ++__result)
14118 if (*__first == __old_value)
14119 *__result = __new_value;
14120 else
14121 *__result = *__first;
14122 return __result;
14123 }
14124 # 1089 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14125 template<typename _InputIterator, typename _OutputIterator,
14126 typename _Predicate, typename _Tp>
14127 _OutputIterator
14128 replace_copy_if(_InputIterator __first, _InputIterator __last,
14129 _OutputIterator __result,
14130 _Predicate __pred, const _Tp& __new_value)
14131 {
14132
14133
14134
14135
14136
14137
14138 ;
14139
14140 for ( ; __first != __last; ++__first, ++__result)
14141 if (__pred(*__first))
14142 *__result = __new_value;
14143 else
14144 *__result = *__first;
14145 return __result;
14146 }
14147 # 1123 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14148 template<typename _ForwardIterator, typename _Generator>
14149 void
14150 generate(_ForwardIterator __first, _ForwardIterator __last,
14151 _Generator __gen)
14152 {
14153
14154
14155
14156
14157 ;
14158
14159 for ( ; __first != __last; ++__first)
14160 *__first = __gen();
14161 }
14162 # 1149 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14163 template<typename _OutputIterator, typename _Size, typename _Generator>
14164 _OutputIterator
14165 generate_n(_OutputIterator __first, _Size __n, _Generator __gen)
14166 {
14167
14168
14169
14170
14171
14172 for ( ; __n > 0; --__n, ++__first)
14173 *__first = __gen();
14174 return __first;
14175 }
14176 # 1176 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14177 template<typename _InputIterator, typename _OutputIterator, typename _Tp>
14178 _OutputIterator
14179 remove_copy(_InputIterator __first, _InputIterator __last,
14180 _OutputIterator __result, const _Tp& __value)
14181 {
14182
14183
14184
14185
14186
14187
14188 ;
14189
14190 for ( ; __first != __last; ++__first)
14191 if (!(*__first == __value))
14192 {
14193 *__result = *__first;
14194 ++__result;
14195 }
14196 return __result;
14197 }
14198 # 1212 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14199 template<typename _InputIterator, typename _OutputIterator,
14200 typename _Predicate>
14201 _OutputIterator
14202 remove_copy_if(_InputIterator __first, _InputIterator __last,
14203 _OutputIterator __result, _Predicate __pred)
14204 {
14205
14206
14207
14208
14209
14210
14211 ;
14212
14213 for ( ; __first != __last; ++__first)
14214 if (!__pred(*__first))
14215 {
14216 *__result = *__first;
14217 ++__result;
14218 }
14219 return __result;
14220 }
14221 # 1251 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14222 template<typename _ForwardIterator, typename _Tp>
14223 _ForwardIterator
14224 remove(_ForwardIterator __first, _ForwardIterator __last,
14225 const _Tp& __value)
14226 {
14227
14228
14229
14230
14231
14232 ;
14233
14234 __first = std::find(__first, __last, __value);
14235 _ForwardIterator __i = __first;
14236 return __first == __last ? __first
14237 : std::remove_copy(++__i, __last,
14238 __first, __value);
14239 }
14240 # 1286 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14241 template<typename _ForwardIterator, typename _Predicate>
14242 _ForwardIterator
14243 remove_if(_ForwardIterator __first, _ForwardIterator __last,
14244 _Predicate __pred)
14245 {
14246
14247
14248
14249
14250
14251 ;
14252
14253 __first = std::find_if(__first, __last, __pred);
14254 _ForwardIterator __i = __first;
14255 return __first == __last ? __first
14256 : std::remove_copy_if(++__i, __last,
14257 __first, __pred);
14258 }
14259 # 1312 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14260 template<typename _ForwardIterator, typename _OutputIterator>
14261 _OutputIterator
14262 __unique_copy(_ForwardIterator __first, _ForwardIterator __last,
14263 _OutputIterator __result,
14264 forward_iterator_tag, output_iterator_tag)
14265 {
14266
14267 _ForwardIterator __next = __first;
14268 *__result = *__first;
14269 while (++__next != __last)
14270 if (!(*__first == *__next))
14271 {
14272 __first = __next;
14273 *++__result = *__first;
14274 }
14275 return ++__result;
14276 }
14277 # 1337 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14278 template<typename _InputIterator, typename _OutputIterator>
14279 _OutputIterator
14280 __unique_copy(_InputIterator __first, _InputIterator __last,
14281 _OutputIterator __result,
14282 input_iterator_tag, output_iterator_tag)
14283 {
14284
14285 typename iterator_traits<_InputIterator>::value_type __value = *__first;
14286 *__result = __value;
14287 while (++__first != __last)
14288 if (!(__value == *__first))
14289 {
14290 __value = *__first;
14291 *++__result = __value;
14292 }
14293 return ++__result;
14294 }
14295 # 1362 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14296 template<typename _InputIterator, typename _ForwardIterator>
14297 _ForwardIterator
14298 __unique_copy(_InputIterator __first, _InputIterator __last,
14299 _ForwardIterator __result,
14300 input_iterator_tag, forward_iterator_tag)
14301 {
14302
14303 *__result = *__first;
14304 while (++__first != __last)
14305 if (!(*__result == *__first))
14306 *++__result = *__first;
14307 return ++__result;
14308 }
14309 # 1384 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14310 template<typename _ForwardIterator, typename _OutputIterator,
14311 typename _BinaryPredicate>
14312 _OutputIterator
14313 __unique_copy(_ForwardIterator __first, _ForwardIterator __last,
14314 _OutputIterator __result, _BinaryPredicate __binary_pred,
14315 forward_iterator_tag, output_iterator_tag)
14316 {
14317
14318
14319
14320
14321
14322 _ForwardIterator __next = __first;
14323 *__result = *__first;
14324 while (++__next != __last)
14325 if (!__binary_pred(*__first, *__next))
14326 {
14327 __first = __next;
14328 *++__result = *__first;
14329 }
14330 return ++__result;
14331 }
14332 # 1415 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14333 template<typename _InputIterator, typename _OutputIterator,
14334 typename _BinaryPredicate>
14335 _OutputIterator
14336 __unique_copy(_InputIterator __first, _InputIterator __last,
14337 _OutputIterator __result, _BinaryPredicate __binary_pred,
14338 input_iterator_tag, output_iterator_tag)
14339 {
14340
14341
14342
14343
14344
14345 typename iterator_traits<_InputIterator>::value_type __value = *__first;
14346 *__result = __value;
14347 while (++__first != __last)
14348 if (!__binary_pred(__value, *__first))
14349 {
14350 __value = *__first;
14351 *++__result = __value;
14352 }
14353 return ++__result;
14354 }
14355 # 1446 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14356 template<typename _InputIterator, typename _ForwardIterator,
14357 typename _BinaryPredicate>
14358 _ForwardIterator
14359 __unique_copy(_InputIterator __first, _InputIterator __last,
14360 _ForwardIterator __result, _BinaryPredicate __binary_pred,
14361 input_iterator_tag, forward_iterator_tag)
14362 {
14363
14364
14365
14366
14367
14368 *__result = *__first;
14369 while (++__first != __last)
14370 if (!__binary_pred(*__result, *__first))
14371 *++__result = *__first;
14372 return ++__result;
14373 }
14374 # 1487 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14375 template<typename _InputIterator, typename _OutputIterator>
14376 inline _OutputIterator
14377 unique_copy(_InputIterator __first, _InputIterator __last,
14378 _OutputIterator __result)
14379 {
14380
14381
14382
14383
14384
14385
14386 ;
14387
14388 if (__first == __last)
14389 return __result;
14390 return std::__unique_copy(__first, __last, __result,
14391 std::__iterator_category(__first),
14392 std::__iterator_category(__result));
14393 }
14394 # 1527 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14395 template<typename _InputIterator, typename _OutputIterator,
14396 typename _BinaryPredicate>
14397 inline _OutputIterator
14398 unique_copy(_InputIterator __first, _InputIterator __last,
14399 _OutputIterator __result,
14400 _BinaryPredicate __binary_pred)
14401 {
14402
14403
14404
14405
14406 ;
14407
14408 if (__first == __last)
14409 return __result;
14410 return std::__unique_copy(__first, __last, __result, __binary_pred,
14411 std::__iterator_category(__first),
14412 std::__iterator_category(__result));
14413 }
14414 # 1560 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14415 template<typename _ForwardIterator>
14416 _ForwardIterator
14417 unique(_ForwardIterator __first, _ForwardIterator __last)
14418 {
14419
14420
14421
14422
14423
14424 ;
14425
14426
14427 __first = std::adjacent_find(__first, __last);
14428 if (__first == __last)
14429 return __last;
14430
14431
14432 _ForwardIterator __dest = __first;
14433 ++__first;
14434 while (++__first != __last)
14435 if (!(*__dest == *__first))
14436 *++__dest = *__first;
14437 return ++__dest;
14438 }
14439 # 1599 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14440 template<typename _ForwardIterator, typename _BinaryPredicate>
14441 _ForwardIterator
14442 unique(_ForwardIterator __first, _ForwardIterator __last,
14443 _BinaryPredicate __binary_pred)
14444 {
14445
14446
14447
14448
14449
14450
14451 ;
14452
14453
14454 __first = std::adjacent_find(__first, __last, __binary_pred);
14455 if (__first == __last)
14456 return __last;
14457
14458
14459 _ForwardIterator __dest = __first;
14460 ++__first;
14461 while (++__first != __last)
14462 if (!__binary_pred(*__dest, *__first))
14463 *++__dest = *__first;
14464 return ++__dest;
14465 }
14466 # 1633 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14467 template<typename _BidirectionalIterator>
14468 void
14469 __reverse(_BidirectionalIterator __first, _BidirectionalIterator __last,
14470 bidirectional_iterator_tag)
14471 {
14472 while (true)
14473 if (__first == __last || __first == --__last)
14474 return;
14475 else
14476 {
14477 std::iter_swap(__first, __last);
14478 ++__first;
14479 }
14480 }
14481 # 1655 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14482 template<typename _RandomAccessIterator>
14483 void
14484 __reverse(_RandomAccessIterator __first, _RandomAccessIterator __last,
14485 random_access_iterator_tag)
14486 {
14487 if (__first == __last)
14488 return;
14489 --__last;
14490 while (__first < __last)
14491 {
14492 std::iter_swap(__first, __last);
14493 ++__first;
14494 --__last;
14495 }
14496 }
14497 # 1682 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14498 template<typename _BidirectionalIterator>
14499 inline void
14500 reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
14501 {
14502
14503
14504
14505 ;
14506 std::__reverse(__first, __last, std::__iterator_category(__first));
14507 }
14508 # 1708 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14509 template<typename _BidirectionalIterator, typename _OutputIterator>
14510 _OutputIterator
14511 reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last,
14512 _OutputIterator __result)
14513 {
14514
14515
14516
14517
14518
14519 ;
14520
14521 while (__first != __last)
14522 {
14523 --__last;
14524 *__result = *__last;
14525 ++__result;
14526 }
14527 return __result;
14528 }
14529 # 1736 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14530 template<typename _EuclideanRingElement>
14531 _EuclideanRingElement
14532 __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
14533 {
14534 while (__n != 0)
14535 {
14536 _EuclideanRingElement __t = __m % __n;
14537 __m = __n;
14538 __n = __t;
14539 }
14540 return __m;
14541 }
14542
14543
14544
14545
14546
14547
14548 template<typename _ForwardIterator>
14549 void
14550 __rotate(_ForwardIterator __first,
14551 _ForwardIterator __middle,
14552 _ForwardIterator __last,
14553 forward_iterator_tag)
14554 {
14555 if (__first == __middle || __last == __middle)
14556 return;
14557
14558 _ForwardIterator __first2 = __middle;
14559 do
14560 {
14561 swap(*__first, *__first2);
14562 ++__first;
14563 ++__first2;
14564 if (__first == __middle)
14565 __middle = __first2;
14566 }
14567 while (__first2 != __last);
14568
14569 __first2 = __middle;
14570
14571 while (__first2 != __last)
14572 {
14573 swap(*__first, *__first2);
14574 ++__first;
14575 ++__first2;
14576 if (__first == __middle)
14577 __middle = __first2;
14578 else if (__first2 == __last)
14579 __first2 = __middle;
14580 }
14581 }
14582
14583
14584
14585
14586
14587
14588 template<typename _BidirectionalIterator>
14589 void
14590 __rotate(_BidirectionalIterator __first,
14591 _BidirectionalIterator __middle,
14592 _BidirectionalIterator __last,
14593 bidirectional_iterator_tag)
14594 {
14595
14596
14597
14598
14599 if (__first == __middle || __last == __middle)
14600 return;
14601
14602 std::__reverse(__first, __middle, bidirectional_iterator_tag());
14603 std::__reverse(__middle, __last, bidirectional_iterator_tag());
14604
14605 while (__first != __middle && __middle != __last)
14606 {
14607 swap(*__first, *--__last);
14608 ++__first;
14609 }
14610
14611 if (__first == __middle)
14612 std::__reverse(__middle, __last, bidirectional_iterator_tag());
14613 else
14614 std::__reverse(__first, __middle, bidirectional_iterator_tag());
14615 }
14616
14617
14618
14619
14620
14621
14622 template<typename _RandomAccessIterator>
14623 void
14624 __rotate(_RandomAccessIterator __first,
14625 _RandomAccessIterator __middle,
14626 _RandomAccessIterator __last,
14627 random_access_iterator_tag)
14628 {
14629
14630
14631
14632
14633 if (__first == __middle || __last == __middle)
14634 return;
14635
14636 typedef typename iterator_traits<_RandomAccessIterator>::difference_type
14637 _Distance;
14638 typedef typename iterator_traits<_RandomAccessIterator>::value_type
14639 _ValueType;
14640
14641 const _Distance __n = __last - __first;
14642 const _Distance __k = __middle - __first;
14643 const _Distance __l = __n - __k;
14644
14645 if (__k == __l)
14646 {
14647 std::swap_ranges(__first, __middle, __middle);
14648 return;
14649 }
14650
14651 const _Distance __d = __gcd(__n, __k);
14652
14653 for (_Distance __i = 0; __i < __d; __i++)
14654 {
14655 _ValueType __tmp = *__first;
14656 _RandomAccessIterator __p = __first;
14657
14658 if (__k < __l)
14659 {
14660 for (_Distance __j = 0; __j < __l / __d; __j++)
14661 {
14662 if (__p > __first + __l)
14663 {
14664 *__p = *(__p - __l);
14665 __p -= __l;
14666 }
14667
14668 *__p = *(__p + __k);
14669 __p += __k;
14670 }
14671 }
14672 else
14673 {
14674 for (_Distance __j = 0; __j < __k / __d - 1; __j ++)
14675 {
14676 if (__p < __last - __k)
14677 {
14678 *__p = *(__p + __k);
14679 __p += __k;
14680 }
14681 *__p = * (__p - __l);
14682 __p -= __l;
14683 }
14684 }
14685
14686 *__p = __tmp;
14687 ++__first;
14688 }
14689 }
14690 # 1915 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14691 template<typename _ForwardIterator>
14692 inline void
14693 rotate(_ForwardIterator __first, _ForwardIterator __middle,
14694 _ForwardIterator __last)
14695 {
14696
14697
14698
14699 ;
14700 ;
14701
14702 typedef typename iterator_traits<_ForwardIterator>::iterator_category
14703 _IterType;
14704 std::__rotate(__first, __middle, __last, _IterType());
14705 }
14706 # 1948 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14707 template<typename _ForwardIterator, typename _OutputIterator>
14708 _OutputIterator
14709 rotate_copy(_ForwardIterator __first, _ForwardIterator __middle,
14710 _ForwardIterator __last, _OutputIterator __result)
14711 {
14712
14713
14714
14715
14716 ;
14717 ;
14718
14719 return std::copy(__first, __middle,
14720 std::copy(__middle, __last, __result));
14721 }
14722 # 1974 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14723 template<typename _RandomAccessIterator>
14724 inline void
14725 random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
14726 {
14727
14728
14729
14730 ;
14731
14732 if (__first != __last)
14733 for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
14734 std::iter_swap(__i, __first + (std::rand() % ((__i - __first) + 1)));
14735 }
14736 # 2001 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14737 template<typename _RandomAccessIterator, typename _RandomNumberGenerator>
14738 void
14739 random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
14740 _RandomNumberGenerator& __rand)
14741 {
14742
14743
14744
14745 ;
14746
14747 if (__first == __last)
14748 return;
14749 for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
14750 std::iter_swap(__i, __first + __rand((__i - __first) + 1));
14751 }
14752
14753
14754
14755
14756
14757
14758
14759 template<typename _ForwardIterator, typename _Predicate>
14760 _ForwardIterator
14761 __partition(_ForwardIterator __first, _ForwardIterator __last,
14762 _Predicate __pred,
14763 forward_iterator_tag)
14764 {
14765 if (__first == __last)
14766 return __first;
14767
14768 while (__pred(*__first))
14769 if (++__first == __last)
14770 return __first;
14771
14772 _ForwardIterator __next = __first;
14773
14774 while (++__next != __last)
14775 if (__pred(*__next))
14776 {
14777 swap(*__first, *__next);
14778 ++__first;
14779 }
14780
14781 return __first;
14782 }
14783
14784
14785
14786
14787
14788
14789 template<typename _BidirectionalIterator, typename _Predicate>
14790 _BidirectionalIterator
14791 __partition(_BidirectionalIterator __first, _BidirectionalIterator __last,
14792 _Predicate __pred,
14793 bidirectional_iterator_tag)
14794 {
14795 while (true)
14796 {
14797 while (true)
14798 if (__first == __last)
14799 return __first;
14800 else if (__pred(*__first))
14801 ++__first;
14802 else
14803 break;
14804 --__last;
14805 while (true)
14806 if (__first == __last)
14807 return __first;
14808 else if (!__pred(*__last))
14809 --__last;
14810 else
14811 break;
14812 std::iter_swap(__first, __last);
14813 ++__first;
14814 }
14815 }
14816 # 2095 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14817 template<typename _ForwardIterator, typename _Predicate>
14818 inline _ForwardIterator
14819 partition(_ForwardIterator __first, _ForwardIterator __last,
14820 _Predicate __pred)
14821 {
14822
14823
14824
14825
14826
14827 ;
14828
14829 return std::__partition(__first, __last, __pred,
14830 std::__iterator_category(__first));
14831 }
14832
14833
14834
14835
14836
14837
14838
14839 template<typename _ForwardIterator, typename _Predicate, typename _Distance>
14840 _ForwardIterator
14841 __inplace_stable_partition(_ForwardIterator __first,
14842 _ForwardIterator __last,
14843 _Predicate __pred, _Distance __len)
14844 {
14845 if (__len == 1)
14846 return __pred(*__first) ? __last : __first;
14847 _ForwardIterator __middle = __first;
14848 std::advance(__middle, __len / 2);
14849 _ForwardIterator __begin = std::__inplace_stable_partition(__first,
14850 __middle,
14851 __pred,
14852 __len / 2);
14853 _ForwardIterator __end = std::__inplace_stable_partition(__middle, __last,
14854 __pred,
14855 __len
14856 - __len / 2);
14857 std::rotate(__begin, __middle, __end);
14858 std::advance(__begin, std::distance(__middle, __end));
14859 return __begin;
14860 }
14861
14862
14863
14864
14865
14866
14867 template<typename _ForwardIterator, typename _Pointer, typename _Predicate,
14868 typename _Distance>
14869 _ForwardIterator
14870 __stable_partition_adaptive(_ForwardIterator __first,
14871 _ForwardIterator __last,
14872 _Predicate __pred, _Distance __len,
14873 _Pointer __buffer,
14874 _Distance __buffer_size)
14875 {
14876 if (__len <= __buffer_size)
14877 {
14878 _ForwardIterator __result1 = __first;
14879 _Pointer __result2 = __buffer;
14880 for ( ; __first != __last ; ++__first)
14881 if (__pred(*__first))
14882 {
14883 *__result1 = *__first;
14884 ++__result1;
14885 }
14886 else
14887 {
14888 *__result2 = *__first;
14889 ++__result2;
14890 }
14891 std::copy(__buffer, __result2, __result1);
14892 return __result1;
14893 }
14894 else
14895 {
14896 _ForwardIterator __middle = __first;
14897 std::advance(__middle, __len / 2);
14898 _ForwardIterator __begin =
14899 std::__stable_partition_adaptive(__first, __middle, __pred,
14900 __len / 2, __buffer,
14901 __buffer_size);
14902 _ForwardIterator __end =
14903 std::__stable_partition_adaptive(__middle, __last, __pred,
14904 __len - __len / 2,
14905 __buffer, __buffer_size);
14906 std::rotate(__begin, __middle, __end);
14907 std::advance(__begin, std::distance(__middle, __end));
14908 return __begin;
14909 }
14910 }
14911 # 2206 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
14912 template<typename _ForwardIterator, typename _Predicate>
14913 _ForwardIterator
14914 stable_partition(_ForwardIterator __first, _ForwardIterator __last,
14915 _Predicate __pred)
14916 {
14917
14918
14919
14920
14921
14922 ;
14923
14924 if (__first == __last)
14925 return __first;
14926 else
14927 {
14928 typedef typename iterator_traits<_ForwardIterator>::value_type
14929 _ValueType;
14930 typedef typename iterator_traits<_ForwardIterator>::difference_type
14931 _DistanceType;
14932
14933 _Temporary_buffer<_ForwardIterator, _ValueType> __buf(__first,
14934 __last);
14935 if (__buf.size() > 0)
14936 return
14937 std::__stable_partition_adaptive(__first, __last, __pred,
14938 _DistanceType(__buf.requested_size()),
14939 __buf.begin(), __buf.size());
14940 else
14941 return
14942 std::__inplace_stable_partition(__first, __last, __pred,
14943 _DistanceType(__buf.requested_size()));
14944 }
14945 }
14946
14947
14948
14949
14950
14951
14952 template<typename _RandomAccessIterator, typename _Tp>
14953 _RandomAccessIterator
14954 __unguarded_partition(_RandomAccessIterator __first,
14955 _RandomAccessIterator __last, _Tp __pivot)
14956 {
14957 while (true)
14958 {
14959 while (*__first < __pivot)
14960 ++__first;
14961 --__last;
14962 while (__pivot < *__last)
14963 --__last;
14964 if (!(__first < __last))
14965 return __first;
14966 std::iter_swap(__first, __last);
14967 ++__first;
14968 }
14969 }
14970
14971
14972
14973
14974
14975
14976 template<typename _RandomAccessIterator, typename _Tp, typename _Compare>
14977 _RandomAccessIterator
14978 __unguarded_partition(_RandomAccessIterator __first,
14979 _RandomAccessIterator __last,
14980 _Tp __pivot, _Compare __comp)
14981 {
14982 while (true)
14983 {
14984 while (__comp(*__first, __pivot))
14985 ++__first;
14986 --__last;
14987 while (__comp(__pivot, *__last))
14988 --__last;
14989 if (!(__first < __last))
14990 return __first;
14991 std::iter_swap(__first, __last);
14992 ++__first;
14993 }
14994 }
14995
14996
14997
14998
14999
15000
15001
15002 enum { _S_threshold = 16 };
15003
15004
15005
15006
15007
15008
15009 template<typename _RandomAccessIterator, typename _Tp>
15010 void
15011 __unguarded_linear_insert(_RandomAccessIterator __last, _Tp __val)
15012 {
15013 _RandomAccessIterator __next = __last;
15014 --__next;
15015 while (__val < *__next)
15016 {
15017 *__last = *__next;
15018 __last = __next;
15019 --__next;
15020 }
15021 *__last = __val;
15022 }
15023
15024
15025
15026
15027
15028
15029 template<typename _RandomAccessIterator, typename _Tp, typename _Compare>
15030 void
15031 __unguarded_linear_insert(_RandomAccessIterator __last, _Tp __val,
15032 _Compare __comp)
15033 {
15034 _RandomAccessIterator __next = __last;
15035 --__next;
15036 while (__comp(__val, *__next))
15037 {
15038 *__last = *__next;
15039 __last = __next;
15040 --__next;
15041 }
15042 *__last = __val;
15043 }
15044
15045
15046
15047
15048
15049
15050 template<typename _RandomAccessIterator>
15051 void
15052 __insertion_sort(_RandomAccessIterator __first,
15053 _RandomAccessIterator __last)
15054 {
15055 if (__first == __last)
15056 return;
15057
15058 for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
15059 {
15060 typename iterator_traits<_RandomAccessIterator>::value_type
15061 __val = *__i;
15062 if (__val < *__first)
15063 {
15064 std::copy_backward(__first, __i, __i + 1);
15065 *__first = __val;
15066 }
15067 else
15068 std::__unguarded_linear_insert(__i, __val);
15069 }
15070 }
15071
15072
15073
15074
15075
15076
15077 template<typename _RandomAccessIterator, typename _Compare>
15078 void
15079 __insertion_sort(_RandomAccessIterator __first,
15080 _RandomAccessIterator __last, _Compare __comp)
15081 {
15082 if (__first == __last) return;
15083
15084 for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
15085 {
15086 typename iterator_traits<_RandomAccessIterator>::value_type
15087 __val = *__i;
15088 if (__comp(__val, *__first))
15089 {
15090 std::copy_backward(__first, __i, __i + 1);
15091 *__first = __val;
15092 }
15093 else
15094 std::__unguarded_linear_insert(__i, __val, __comp);
15095 }
15096 }
15097
15098
15099
15100
15101
15102
15103 template<typename _RandomAccessIterator>
15104 inline void
15105 __unguarded_insertion_sort(_RandomAccessIterator __first,
15106 _RandomAccessIterator __last)
15107 {
15108 typedef typename iterator_traits<_RandomAccessIterator>::value_type
15109 _ValueType;
15110
15111 for (_RandomAccessIterator __i = __first; __i != __last; ++__i)
15112 std::__unguarded_linear_insert(__i, _ValueType(*__i));
15113 }
15114
15115
15116
15117
15118
15119
15120 template<typename _RandomAccessIterator, typename _Compare>
15121 inline void
15122 __unguarded_insertion_sort(_RandomAccessIterator __first,
15123 _RandomAccessIterator __last, _Compare __comp)
15124 {
15125 typedef typename iterator_traits<_RandomAccessIterator>::value_type
15126 _ValueType;
15127
15128 for (_RandomAccessIterator __i = __first; __i != __last; ++__i)
15129 std::__unguarded_linear_insert(__i, _ValueType(*__i), __comp);
15130 }
15131
15132
15133
15134
15135
15136
15137 template<typename _RandomAccessIterator>
15138 void
15139 __final_insertion_sort(_RandomAccessIterator __first,
15140 _RandomAccessIterator __last)
15141 {
15142 if (__last - __first > int(_S_threshold))
15143 {
15144 std::__insertion_sort(__first, __first + int(_S_threshold));
15145 std::__unguarded_insertion_sort(__first + int(_S_threshold), __last);
15146 }
15147 else
15148 std::__insertion_sort(__first, __last);
15149 }
15150
15151
15152
15153
15154
15155
15156 template<typename _RandomAccessIterator, typename _Compare>
15157 void
15158 __final_insertion_sort(_RandomAccessIterator __first,
15159 _RandomAccessIterator __last, _Compare __comp)
15160 {
15161 if (__last - __first > int(_S_threshold))
15162 {
15163 std::__insertion_sort(__first, __first + int(_S_threshold), __comp);
15164 std::__unguarded_insertion_sort(__first + int(_S_threshold), __last,
15165 __comp);
15166 }
15167 else
15168 std::__insertion_sort(__first, __last, __comp);
15169 }
15170
15171
15172
15173
15174
15175
15176 template<typename _RandomAccessIterator>
15177 void
15178 __heap_select(_RandomAccessIterator __first,
15179 _RandomAccessIterator __middle,
15180 _RandomAccessIterator __last)
15181 {
15182 typedef typename iterator_traits<_RandomAccessIterator>::value_type
15183 _ValueType;
15184
15185 std::make_heap(__first, __middle);
15186 for (_RandomAccessIterator __i = __middle; __i < __last; ++__i)
15187 if (*__i < *__first)
15188 std::__pop_heap(__first, __middle, __i, _ValueType(*__i));
15189 }
15190
15191
15192
15193
15194
15195
15196 template<typename _RandomAccessIterator, typename _Compare>
15197 void
15198 __heap_select(_RandomAccessIterator __first,
15199 _RandomAccessIterator __middle,
15200 _RandomAccessIterator __last, _Compare __comp)
15201 {
15202 typedef typename iterator_traits<_RandomAccessIterator>::value_type
15203 _ValueType;
15204
15205 std::make_heap(__first, __middle, __comp);
15206 for (_RandomAccessIterator __i = __middle; __i < __last; ++__i)
15207 if (__comp(*__i, *__first))
15208 std::__pop_heap(__first, __middle, __i, _ValueType(*__i), __comp);
15209 }
15210
15211
15212
15213
15214
15215
15216 template<typename _Size>
15217 inline _Size
15218 __lg(_Size __n)
15219 {
15220 _Size __k;
15221 for (__k = 0; __n != 1; __n >>= 1)
15222 ++__k;
15223 return __k;
15224 }
15225 # 2535 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
15226 template<typename _RandomAccessIterator>
15227 inline void
15228 partial_sort(_RandomAccessIterator __first,
15229 _RandomAccessIterator __middle,
15230 _RandomAccessIterator __last)
15231 {
15232 typedef typename iterator_traits<_RandomAccessIterator>::value_type
15233 _ValueType;
15234
15235
15236
15237
15238
15239 ;
15240 ;
15241
15242 std::__heap_select(__first, __middle, __last);
15243 std::sort_heap(__first, __middle);
15244 }
15245 # 2573 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
15246 template<typename _RandomAccessIterator, typename _Compare>
15247 inline void
15248 partial_sort(_RandomAccessIterator __first,
15249 _RandomAccessIterator __middle,
15250 _RandomAccessIterator __last,
15251 _Compare __comp)
15252 {
15253 typedef typename iterator_traits<_RandomAccessIterator>::value_type
15254 _ValueType;
15255
15256
15257
15258
15259
15260
15261 ;
15262 ;
15263
15264 std::__heap_select(__first, __middle, __last, __comp);
15265 std::sort_heap(__first, __middle, __comp);
15266 }
15267 # 2612 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
15268 template<typename _InputIterator, typename _RandomAccessIterator>
15269 _RandomAccessIterator
15270 partial_sort_copy(_InputIterator __first, _InputIterator __last,
15271 _RandomAccessIterator __result_first,
15272 _RandomAccessIterator __result_last)
15273 {
15274 typedef typename iterator_traits<_InputIterator>::value_type
15275 _InputValueType;
15276 typedef typename iterator_traits<_RandomAccessIterator>::value_type
15277 _OutputValueType;
15278 typedef typename iterator_traits<_RandomAccessIterator>::difference_type
15279 _DistanceType;
15280
15281
15282
15283
15284
15285
15286
15287
15288 ;
15289 ;
15290
15291 if (__result_first == __result_last)
15292 return __result_last;
15293 _RandomAccessIterator __result_real_last = __result_first;
15294 while(__first != __last && __result_real_last != __result_last)
15295 {
15296 *__result_real_last = *__first;
15297 ++__result_real_last;
15298 ++__first;
15299 }
15300 std::make_heap(__result_first, __result_real_last);
15301 while (__first != __last)
15302 {
15303 if (*__first < *__result_first)
15304 std::__adjust_heap(__result_first, _DistanceType(0),
15305 _DistanceType(__result_real_last
15306 - __result_first),
15307 _InputValueType(*__first));
15308 ++__first;
15309 }
15310 std::sort_heap(__result_first, __result_real_last);
15311 return __result_real_last;
15312 }
15313 # 2677 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
15314 template<typename _InputIterator, typename _RandomAccessIterator, typename _Compare>
15315 _RandomAccessIterator
15316 partial_sort_copy(_InputIterator __first, _InputIterator __last,
15317 _RandomAccessIterator __result_first,
15318 _RandomAccessIterator __result_last,
15319 _Compare __comp)
15320 {
15321 typedef typename iterator_traits<_InputIterator>::value_type
15322 _InputValueType;
15323 typedef typename iterator_traits<_RandomAccessIterator>::value_type
15324 _OutputValueType;
15325 typedef typename iterator_traits<_RandomAccessIterator>::difference_type
15326 _DistanceType;
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338 ;
15339 ;
15340
15341 if (__result_first == __result_last)
15342 return __result_last;
15343 _RandomAccessIterator __result_real_last = __result_first;
15344 while(__first != __last && __result_real_last != __result_last)
15345 {
15346 *__result_real_last = *__first;
15347 ++__result_real_last;
15348 ++__first;
15349 }
15350 std::make_heap(__result_first, __result_real_last, __comp);
15351 while (__first != __last)
15352 {
15353 if (__comp(*__first, *__result_first))
15354 std::__adjust_heap(__result_first, _DistanceType(0),
15355 _DistanceType(__result_real_last
15356 - __result_first),
15357 _InputValueType(*__first),
15358 __comp);
15359 ++__first;
15360 }
15361 std::sort_heap(__result_first, __result_real_last, __comp);
15362 return __result_real_last;
15363 }
15364
15365
15366
15367
15368
15369
15370 template<typename _RandomAccessIterator, typename _Size>
15371 void
15372 __introsort_loop(_RandomAccessIterator __first,
15373 _RandomAccessIterator __last,
15374 _Size __depth_limit)
15375 {
15376 typedef typename iterator_traits<_RandomAccessIterator>::value_type
15377 _ValueType;
15378
15379 while (__last - __first > int(_S_threshold))
15380 {
15381 if (__depth_limit == 0)
15382 {
15383 std::partial_sort(__first, __last, __last);
15384 return;
15385 }
15386 --__depth_limit;
15387 _RandomAccessIterator __cut =
15388 std::__unguarded_partition(__first, __last,
15389 _ValueType(std::__median(*__first,
15390 *(__first
15391 + (__last
15392 - __first)
15393 / 2),
15394 *(__last
15395 - 1))));
15396 std::__introsort_loop(__cut, __last, __depth_limit);
15397 __last = __cut;
15398 }
15399 }
15400
15401
15402
15403
15404
15405
15406 template<typename _RandomAccessIterator, typename _Size, typename _Compare>
15407 void
15408 __introsort_loop(_RandomAccessIterator __first,
15409 _RandomAccessIterator __last,
15410 _Size __depth_limit, _Compare __comp)
15411 {
15412 typedef typename iterator_traits<_RandomAccessIterator>::value_type
15413 _ValueType;
15414
15415 while (__last - __first > int(_S_threshold))
15416 {
15417 if (__depth_limit == 0)
15418 {
15419 std::partial_sort(__first, __last, __last, __comp);
15420 return;
15421 }
15422 --__depth_limit;
15423 _RandomAccessIterator __cut =
15424 std::__unguarded_partition(__first, __last,
15425 _ValueType(std::__median(*__first,
15426 *(__first
15427 + (__last
15428 - __first)
15429 / 2),
15430 *(__last - 1),
15431 __comp)),
15432 __comp);
15433 std::__introsort_loop(__cut, __last, __depth_limit, __comp);
15434 __last = __cut;
15435 }
15436 }
15437 # 2814 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
15438 template<typename _RandomAccessIterator>
15439 inline void
15440 sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
15441 {
15442 typedef typename iterator_traits<_RandomAccessIterator>::value_type
15443 _ValueType;
15444
15445
15446
15447
15448
15449 ;
15450
15451 if (__first != __last)
15452 {
15453 std::__introsort_loop(__first, __last,
15454 std::__lg(__last - __first) * 2);
15455 std::__final_insertion_sort(__first, __last);
15456 }
15457 }
15458 # 2849 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
15459 template<typename _RandomAccessIterator, typename _Compare>
15460 inline void
15461 sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
15462 _Compare __comp)
15463 {
15464 typedef typename iterator_traits<_RandomAccessIterator>::value_type
15465 _ValueType;
15466
15467
15468
15469
15470
15471
15472 ;
15473
15474 if (__first != __last)
15475 {
15476 std::__introsort_loop(__first, __last,
15477 std::__lg(__last - __first) * 2, __comp);
15478 std::__final_insertion_sort(__first, __last, __comp);
15479 }
15480 }
15481 # 2882 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
15482 template<typename _ForwardIterator, typename _Tp>
15483 _ForwardIterator
15484 lower_bound(_ForwardIterator __first, _ForwardIterator __last,
15485 const _Tp& __val)
15486 {
15487 typedef typename iterator_traits<_ForwardIterator>::value_type
15488 _ValueType;
15489 typedef typename iterator_traits<_ForwardIterator>::difference_type
15490 _DistanceType;
15491
15492
15493
15494
15495 ;
15496
15497 _DistanceType __len = std::distance(__first, __last);
15498 _DistanceType __half;
15499 _ForwardIterator __middle;
15500
15501 while (__len > 0)
15502 {
15503 __half = __len >> 1;
15504 __middle = __first;
15505 std::advance(__middle, __half);
15506 if (*__middle < __val)
15507 {
15508 __first = __middle;
15509 ++__first;
15510 __len = __len - __half - 1;
15511 }
15512 else
15513 __len = __half;
15514 }
15515 return __first;
15516 }
15517 # 2932 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
15518 template<typename _ForwardIterator, typename _Tp, typename _Compare>
15519 _ForwardIterator
15520 lower_bound(_ForwardIterator __first, _ForwardIterator __last,
15521 const _Tp& __val, _Compare __comp)
15522 {
15523 typedef typename iterator_traits<_ForwardIterator>::value_type
15524 _ValueType;
15525 typedef typename iterator_traits<_ForwardIterator>::difference_type
15526 _DistanceType;
15527
15528
15529
15530
15531
15532 ;
15533
15534 _DistanceType __len = std::distance(__first, __last);
15535 _DistanceType __half;
15536 _ForwardIterator __middle;
15537
15538 while (__len > 0)
15539 {
15540 __half = __len >> 1;
15541 __middle = __first;
15542 std::advance(__middle, __half);
15543 if (__comp(*__middle, __val))
15544 {
15545 __first = __middle;
15546 ++__first;
15547 __len = __len - __half - 1;
15548 }
15549 else
15550 __len = __half;
15551 }
15552 return __first;
15553 }
15554 # 2979 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
15555 template<typename _ForwardIterator, typename _Tp>
15556 _ForwardIterator
15557 upper_bound(_ForwardIterator __first, _ForwardIterator __last,
15558 const _Tp& __val)
15559 {
15560 typedef typename iterator_traits<_ForwardIterator>::value_type
15561 _ValueType;
15562 typedef typename iterator_traits<_ForwardIterator>::difference_type
15563 _DistanceType;
15564
15565
15566
15567
15568 ;
15569
15570 _DistanceType __len = std::distance(__first, __last);
15571 _DistanceType __half;
15572 _ForwardIterator __middle;
15573
15574 while (__len > 0)
15575 {
15576 __half = __len >> 1;
15577 __middle = __first;
15578 std::advance(__middle, __half);
15579 if (__val < *__middle)
15580 __len = __half;
15581 else
15582 {
15583 __first = __middle;
15584 ++__first;
15585 __len = __len - __half - 1;
15586 }
15587 }
15588 return __first;
15589 }
15590 # 3029 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
15591 template<typename _ForwardIterator, typename _Tp, typename _Compare>
15592 _ForwardIterator
15593 upper_bound(_ForwardIterator __first, _ForwardIterator __last,
15594 const _Tp& __val, _Compare __comp)
15595 {
15596 typedef typename iterator_traits<_ForwardIterator>::value_type
15597 _ValueType;
15598 typedef typename iterator_traits<_ForwardIterator>::difference_type
15599 _DistanceType;
15600
15601
15602
15603
15604
15605 ;
15606
15607 _DistanceType __len = std::distance(__first, __last);
15608 _DistanceType __half;
15609 _ForwardIterator __middle;
15610
15611 while (__len > 0)
15612 {
15613 __half = __len >> 1;
15614 __middle = __first;
15615 std::advance(__middle, __half);
15616 if (__comp(__val, *__middle))
15617 __len = __half;
15618 else
15619 {
15620 __first = __middle;
15621 ++__first;
15622 __len = __len - __half - 1;
15623 }
15624 }
15625 return __first;
15626 }
15627
15628
15629
15630
15631
15632
15633 template<typename _BidirectionalIterator, typename _Distance>
15634 void
15635 __merge_without_buffer(_BidirectionalIterator __first,
15636 _BidirectionalIterator __middle,
15637 _BidirectionalIterator __last,
15638 _Distance __len1, _Distance __len2)
15639 {
15640 if (__len1 == 0 || __len2 == 0)
15641 return;
15642 if (__len1 + __len2 == 2)
15643 {
15644 if (*__middle < *__first)
15645 std::iter_swap(__first, __middle);
15646 return;
15647 }
15648 _BidirectionalIterator __first_cut = __first;
15649 _BidirectionalIterator __second_cut = __middle;
15650 _Distance __len11 = 0;
15651 _Distance __len22 = 0;
15652 if (__len1 > __len2)
15653 {
15654 __len11 = __len1 / 2;
15655 std::advance(__first_cut, __len11);
15656 __second_cut = std::lower_bound(__middle, __last, *__first_cut);
15657 __len22 = std::distance(__middle, __second_cut);
15658 }
15659 else
15660 {
15661 __len22 = __len2 / 2;
15662 std::advance(__second_cut, __len22);
15663 __first_cut = std::upper_bound(__first, __middle, *__second_cut);
15664 __len11 = std::distance(__first, __first_cut);
15665 }
15666 std::rotate(__first_cut, __middle, __second_cut);
15667 _BidirectionalIterator __new_middle = __first_cut;
15668 std::advance(__new_middle, std::distance(__middle, __second_cut));
15669 std::__merge_without_buffer(__first, __first_cut, __new_middle,
15670 __len11, __len22);
15671 std::__merge_without_buffer(__new_middle, __second_cut, __last,
15672 __len1 - __len11, __len2 - __len22);
15673 }
15674
15675
15676
15677
15678
15679
15680 template<typename _BidirectionalIterator, typename _Distance,
15681 typename _Compare>
15682 void
15683 __merge_without_buffer(_BidirectionalIterator __first,
15684 _BidirectionalIterator __middle,
15685 _BidirectionalIterator __last,
15686 _Distance __len1, _Distance __len2,
15687 _Compare __comp)
15688 {
15689 if (__len1 == 0 || __len2 == 0)
15690 return;
15691 if (__len1 + __len2 == 2)
15692 {
15693 if (__comp(*__middle, *__first))
15694 std::iter_swap(__first, __middle);
15695 return;
15696 }
15697 _BidirectionalIterator __first_cut = __first;
15698 _BidirectionalIterator __second_cut = __middle;
15699 _Distance __len11 = 0;
15700 _Distance __len22 = 0;
15701 if (__len1 > __len2)
15702 {
15703 __len11 = __len1 / 2;
15704 std::advance(__first_cut, __len11);
15705 __second_cut = std::lower_bound(__middle, __last, *__first_cut,
15706 __comp);
15707 __len22 = std::distance(__middle, __second_cut);
15708 }
15709 else
15710 {
15711 __len22 = __len2 / 2;
15712 std::advance(__second_cut, __len22);
15713 __first_cut = std::upper_bound(__first, __middle, *__second_cut,
15714 __comp);
15715 __len11 = std::distance(__first, __first_cut);
15716 }
15717 std::rotate(__first_cut, __middle, __second_cut);
15718 _BidirectionalIterator __new_middle = __first_cut;
15719 std::advance(__new_middle, std::distance(__middle, __second_cut));
15720 std::__merge_without_buffer(__first, __first_cut, __new_middle,
15721 __len11, __len22, __comp);
15722 std::__merge_without_buffer(__new_middle, __second_cut, __last,
15723 __len1 - __len11, __len2 - __len22, __comp);
15724 }
15725
15726
15727
15728
15729
15730
15731 template<typename _RandomAccessIterator>
15732 void
15733 __inplace_stable_sort(_RandomAccessIterator __first,
15734 _RandomAccessIterator __last)
15735 {
15736 if (__last - __first < 15)
15737 {
15738 std::__insertion_sort(__first, __last);
15739 return;
15740 }
15741 _RandomAccessIterator __middle = __first + (__last - __first) / 2;
15742 std::__inplace_stable_sort(__first, __middle);
15743 std::__inplace_stable_sort(__middle, __last);
15744 std::__merge_without_buffer(__first, __middle, __last,
15745 __middle - __first,
15746 __last - __middle);
15747 }
15748
15749
15750
15751
15752
15753
15754 template<typename _RandomAccessIterator, typename _Compare>
15755 void
15756 __inplace_stable_sort(_RandomAccessIterator __first,
15757 _RandomAccessIterator __last, _Compare __comp)
15758 {
15759 if (__last - __first < 15)
15760 {
15761 std::__insertion_sort(__first, __last, __comp);
15762 return;
15763 }
15764 _RandomAccessIterator __middle = __first + (__last - __first) / 2;
15765 std::__inplace_stable_sort(__first, __middle, __comp);
15766 std::__inplace_stable_sort(__middle, __last, __comp);
15767 std::__merge_without_buffer(__first, __middle, __last,
15768 __middle - __first,
15769 __last - __middle,
15770 __comp);
15771 }
15772 # 3227 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
15773 template<typename _InputIterator1, typename _InputIterator2,
15774 typename _OutputIterator>
15775 _OutputIterator
15776 merge(_InputIterator1 __first1, _InputIterator1 __last1,
15777 _InputIterator2 __first2, _InputIterator2 __last2,
15778 _OutputIterator __result)
15779 {
15780 typedef typename iterator_traits<_InputIterator1>::value_type
15781 _ValueType1;
15782 typedef typename iterator_traits<_InputIterator2>::value_type
15783 _ValueType2;
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793 ;
15794 ;
15795
15796 while (__first1 != __last1 && __first2 != __last2)
15797 {
15798 if (*__first2 < *__first1)
15799 {
15800 *__result = *__first2;
15801 ++__first2;
15802 }
15803 else
15804 {
15805 *__result = *__first1;
15806 ++__first1;
15807 }
15808 ++__result;
15809 }
15810 return std::copy(__first2, __last2, std::copy(__first1, __last1,
15811 __result));
15812 }
15813 # 3288 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
15814 template<typename _InputIterator1, typename _InputIterator2,
15815 typename _OutputIterator, typename _Compare>
15816 _OutputIterator
15817 merge(_InputIterator1 __first1, _InputIterator1 __last1,
15818 _InputIterator2 __first2, _InputIterator2 __last2,
15819 _OutputIterator __result, _Compare __comp)
15820 {
15821 typedef typename iterator_traits<_InputIterator1>::value_type
15822 _ValueType1;
15823 typedef typename iterator_traits<_InputIterator2>::value_type
15824 _ValueType2;
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835 ;
15836 ;
15837
15838 while (__first1 != __last1 && __first2 != __last2)
15839 {
15840 if (__comp(*__first2, *__first1))
15841 {
15842 *__result = *__first2;
15843 ++__first2;
15844 }
15845 else
15846 {
15847 *__result = *__first1;
15848 ++__first1;
15849 }
15850 ++__result;
15851 }
15852 return std::copy(__first2, __last2, std::copy(__first1, __last1,
15853 __result));
15854 }
15855
15856 template<typename _RandomAccessIterator1, typename _RandomAccessIterator2,
15857 typename _Distance>
15858 void
15859 __merge_sort_loop(_RandomAccessIterator1 __first,
15860 _RandomAccessIterator1 __last,
15861 _RandomAccessIterator2 __result,
15862 _Distance __step_size)
15863 {
15864 const _Distance __two_step = 2 * __step_size;
15865
15866 while (__last - __first >= __two_step)
15867 {
15868 __result = std::merge(__first, __first + __step_size,
15869 __first + __step_size, __first + __two_step,
15870 __result);
15871 __first += __two_step;
15872 }
15873
15874 __step_size = std::min(_Distance(__last - __first), __step_size);
15875 std::merge(__first, __first + __step_size, __first + __step_size, __last,
15876 __result);
15877 }
15878
15879 template<typename _RandomAccessIterator1, typename _RandomAccessIterator2,
15880 typename _Distance, typename _Compare>
15881 void
15882 __merge_sort_loop(_RandomAccessIterator1 __first,
15883 _RandomAccessIterator1 __last,
15884 _RandomAccessIterator2 __result, _Distance __step_size,
15885 _Compare __comp)
15886 {
15887 const _Distance __two_step = 2 * __step_size;
15888
15889 while (__last - __first >= __two_step)
15890 {
15891 __result = std::merge(__first, __first + __step_size,
15892 __first + __step_size, __first + __two_step,
15893 __result,
15894 __comp);
15895 __first += __two_step;
15896 }
15897 __step_size = std::min(_Distance(__last - __first), __step_size);
15898
15899 std::merge(__first, __first + __step_size,
15900 __first + __step_size, __last,
15901 __result,
15902 __comp);
15903 }
15904
15905 enum { _S_chunk_size = 7 };
15906
15907 template<typename _RandomAccessIterator, typename _Distance>
15908 void
15909 __chunk_insertion_sort(_RandomAccessIterator __first,
15910 _RandomAccessIterator __last,
15911 _Distance __chunk_size)
15912 {
15913 while (__last - __first >= __chunk_size)
15914 {
15915 std::__insertion_sort(__first, __first + __chunk_size);
15916 __first += __chunk_size;
15917 }
15918 std::__insertion_sort(__first, __last);
15919 }
15920
15921 template<typename _RandomAccessIterator, typename _Distance, typename _Compare>
15922 void
15923 __chunk_insertion_sort(_RandomAccessIterator __first,
15924 _RandomAccessIterator __last,
15925 _Distance __chunk_size, _Compare __comp)
15926 {
15927 while (__last - __first >= __chunk_size)
15928 {
15929 std::__insertion_sort(__first, __first + __chunk_size, __comp);
15930 __first += __chunk_size;
15931 }
15932 std::__insertion_sort(__first, __last, __comp);
15933 }
15934
15935 template<typename _RandomAccessIterator, typename _Pointer>
15936 void
15937 __merge_sort_with_buffer(_RandomAccessIterator __first,
15938 _RandomAccessIterator __last,
15939 _Pointer __buffer)
15940 {
15941 typedef typename iterator_traits<_RandomAccessIterator>::difference_type
15942 _Distance;
15943
15944 const _Distance __len = __last - __first;
15945 const _Pointer __buffer_last = __buffer + __len;
15946
15947 _Distance __step_size = _S_chunk_size;
15948 std::__chunk_insertion_sort(__first, __last, __step_size);
15949
15950 while (__step_size < __len)
15951 {
15952 std::__merge_sort_loop(__first, __last, __buffer, __step_size);
15953 __step_size *= 2;
15954 std::__merge_sort_loop(__buffer, __buffer_last, __first, __step_size);
15955 __step_size *= 2;
15956 }
15957 }
15958
15959 template<typename _RandomAccessIterator, typename _Pointer, typename _Compare>
15960 void
15961 __merge_sort_with_buffer(_RandomAccessIterator __first,
15962 _RandomAccessIterator __last,
15963 _Pointer __buffer, _Compare __comp)
15964 {
15965 typedef typename iterator_traits<_RandomAccessIterator>::difference_type
15966 _Distance;
15967
15968 const _Distance __len = __last - __first;
15969 const _Pointer __buffer_last = __buffer + __len;
15970
15971 _Distance __step_size = _S_chunk_size;
15972 std::__chunk_insertion_sort(__first, __last, __step_size, __comp);
15973
15974 while (__step_size < __len)
15975 {
15976 std::__merge_sort_loop(__first, __last, __buffer,
15977 __step_size, __comp);
15978 __step_size *= 2;
15979 std::__merge_sort_loop(__buffer, __buffer_last, __first,
15980 __step_size, __comp);
15981 __step_size *= 2;
15982 }
15983 }
15984
15985
15986
15987
15988
15989
15990 template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
15991 typename _BidirectionalIterator3>
15992 _BidirectionalIterator3
15993 __merge_backward(_BidirectionalIterator1 __first1,
15994 _BidirectionalIterator1 __last1,
15995 _BidirectionalIterator2 __first2,
15996 _BidirectionalIterator2 __last2,
15997 _BidirectionalIterator3 __result)
15998 {
15999 if (__first1 == __last1)
16000 return std::copy_backward(__first2, __last2, __result);
16001 if (__first2 == __last2)
16002 return std::copy_backward(__first1, __last1, __result);
16003 --__last1;
16004 --__last2;
16005 while (true)
16006 {
16007 if (*__last2 < *__last1)
16008 {
16009 *--__result = *__last1;
16010 if (__first1 == __last1)
16011 return std::copy_backward(__first2, ++__last2, __result);
16012 --__last1;
16013 }
16014 else
16015 {
16016 *--__result = *__last2;
16017 if (__first2 == __last2)
16018 return std::copy_backward(__first1, ++__last1, __result);
16019 --__last2;
16020 }
16021 }
16022 }
16023
16024
16025
16026
16027
16028
16029 template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
16030 typename _BidirectionalIterator3, typename _Compare>
16031 _BidirectionalIterator3
16032 __merge_backward(_BidirectionalIterator1 __first1,
16033 _BidirectionalIterator1 __last1,
16034 _BidirectionalIterator2 __first2,
16035 _BidirectionalIterator2 __last2,
16036 _BidirectionalIterator3 __result,
16037 _Compare __comp)
16038 {
16039 if (__first1 == __last1)
16040 return std::copy_backward(__first2, __last2, __result);
16041 if (__first2 == __last2)
16042 return std::copy_backward(__first1, __last1, __result);
16043 --__last1;
16044 --__last2;
16045 while (true)
16046 {
16047 if (__comp(*__last2, *__last1))
16048 {
16049 *--__result = *__last1;
16050 if (__first1 == __last1)
16051 return std::copy_backward(__first2, ++__last2, __result);
16052 --__last1;
16053 }
16054 else
16055 {
16056 *--__result = *__last2;
16057 if (__first2 == __last2)
16058 return std::copy_backward(__first1, ++__last1, __result);
16059 --__last2;
16060 }
16061 }
16062 }
16063
16064
16065
16066
16067
16068
16069 template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
16070 typename _Distance>
16071 _BidirectionalIterator1
16072 __rotate_adaptive(_BidirectionalIterator1 __first,
16073 _BidirectionalIterator1 __middle,
16074 _BidirectionalIterator1 __last,
16075 _Distance __len1, _Distance __len2,
16076 _BidirectionalIterator2 __buffer,
16077 _Distance __buffer_size)
16078 {
16079 _BidirectionalIterator2 __buffer_end;
16080 if (__len1 > __len2 && __len2 <= __buffer_size)
16081 {
16082 __buffer_end = std::copy(__middle, __last, __buffer);
16083 std::copy_backward(__first, __middle, __last);
16084 return std::copy(__buffer, __buffer_end, __first);
16085 }
16086 else if (__len1 <= __buffer_size)
16087 {
16088 __buffer_end = std::copy(__first, __middle, __buffer);
16089 std::copy(__middle, __last, __first);
16090 return std::copy_backward(__buffer, __buffer_end, __last);
16091 }
16092 else
16093 {
16094 std::rotate(__first, __middle, __last);
16095 std::advance(__first, std::distance(__middle, __last));
16096 return __first;
16097 }
16098 }
16099
16100
16101
16102
16103
16104
16105 template<typename _BidirectionalIterator, typename _Distance,
16106 typename _Pointer>
16107 void
16108 __merge_adaptive(_BidirectionalIterator __first,
16109 _BidirectionalIterator __middle,
16110 _BidirectionalIterator __last,
16111 _Distance __len1, _Distance __len2,
16112 _Pointer __buffer, _Distance __buffer_size)
16113 {
16114 if (__len1 <= __len2 && __len1 <= __buffer_size)
16115 {
16116 _Pointer __buffer_end = std::copy(__first, __middle, __buffer);
16117 std::merge(__buffer, __buffer_end, __middle, __last, __first);
16118 }
16119 else if (__len2 <= __buffer_size)
16120 {
16121 _Pointer __buffer_end = std::copy(__middle, __last, __buffer);
16122 std::__merge_backward(__first, __middle, __buffer,
16123 __buffer_end, __last);
16124 }
16125 else
16126 {
16127 _BidirectionalIterator __first_cut = __first;
16128 _BidirectionalIterator __second_cut = __middle;
16129 _Distance __len11 = 0;
16130 _Distance __len22 = 0;
16131 if (__len1 > __len2)
16132 {
16133 __len11 = __len1 / 2;
16134 std::advance(__first_cut, __len11);
16135 __second_cut = std::lower_bound(__middle, __last,
16136 *__first_cut);
16137 __len22 = std::distance(__middle, __second_cut);
16138 }
16139 else
16140 {
16141 __len22 = __len2 / 2;
16142 std::advance(__second_cut, __len22);
16143 __first_cut = std::upper_bound(__first, __middle,
16144 *__second_cut);
16145 __len11 = std::distance(__first, __first_cut);
16146 }
16147 _BidirectionalIterator __new_middle =
16148 std::__rotate_adaptive(__first_cut, __middle, __second_cut,
16149 __len1 - __len11, __len22, __buffer,
16150 __buffer_size);
16151 std::__merge_adaptive(__first, __first_cut, __new_middle, __len11,
16152 __len22, __buffer, __buffer_size);
16153 std::__merge_adaptive(__new_middle, __second_cut, __last,
16154 __len1 - __len11,
16155 __len2 - __len22, __buffer, __buffer_size);
16156 }
16157 }
16158
16159
16160
16161
16162
16163
16164 template<typename _BidirectionalIterator, typename _Distance, typename _Pointer,
16165 typename _Compare>
16166 void
16167 __merge_adaptive(_BidirectionalIterator __first,
16168 _BidirectionalIterator __middle,
16169 _BidirectionalIterator __last,
16170 _Distance __len1, _Distance __len2,
16171 _Pointer __buffer, _Distance __buffer_size,
16172 _Compare __comp)
16173 {
16174 if (__len1 <= __len2 && __len1 <= __buffer_size)
16175 {
16176 _Pointer __buffer_end = std::copy(__first, __middle, __buffer);
16177 std::merge(__buffer, __buffer_end, __middle, __last, __first, __comp);
16178 }
16179 else if (__len2 <= __buffer_size)
16180 {
16181 _Pointer __buffer_end = std::copy(__middle, __last, __buffer);
16182 std::__merge_backward(__first, __middle, __buffer, __buffer_end,
16183 __last, __comp);
16184 }
16185 else
16186 {
16187 _BidirectionalIterator __first_cut = __first;
16188 _BidirectionalIterator __second_cut = __middle;
16189 _Distance __len11 = 0;
16190 _Distance __len22 = 0;
16191 if (__len1 > __len2)
16192 {
16193 __len11 = __len1 / 2;
16194 std::advance(__first_cut, __len11);
16195 __second_cut = std::lower_bound(__middle, __last, *__first_cut,
16196 __comp);
16197 __len22 = std::distance(__middle, __second_cut);
16198 }
16199 else
16200 {
16201 __len22 = __len2 / 2;
16202 std::advance(__second_cut, __len22);
16203 __first_cut = std::upper_bound(__first, __middle, *__second_cut,
16204 __comp);
16205 __len11 = std::distance(__first, __first_cut);
16206 }
16207 _BidirectionalIterator __new_middle =
16208 std::__rotate_adaptive(__first_cut, __middle, __second_cut,
16209 __len1 - __len11, __len22, __buffer,
16210 __buffer_size);
16211 std::__merge_adaptive(__first, __first_cut, __new_middle, __len11,
16212 __len22, __buffer, __buffer_size, __comp);
16213 std::__merge_adaptive(__new_middle, __second_cut, __last,
16214 __len1 - __len11,
16215 __len2 - __len22, __buffer,
16216 __buffer_size, __comp);
16217 }
16218 }
16219 # 3711 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
16220 template<typename _BidirectionalIterator>
16221 void
16222 inplace_merge(_BidirectionalIterator __first,
16223 _BidirectionalIterator __middle,
16224 _BidirectionalIterator __last)
16225 {
16226 typedef typename iterator_traits<_BidirectionalIterator>::value_type
16227 _ValueType;
16228 typedef typename iterator_traits<_BidirectionalIterator>::difference_type
16229 _DistanceType;
16230
16231
16232
16233
16234
16235 ;
16236 ;
16237
16238 if (__first == __middle || __middle == __last)
16239 return;
16240
16241 _DistanceType __len1 = std::distance(__first, __middle);
16242 _DistanceType __len2 = std::distance(__middle, __last);
16243
16244 _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first,
16245 __last);
16246 if (__buf.begin() == 0)
16247 std::__merge_without_buffer(__first, __middle, __last, __len1, __len2);
16248 else
16249 std::__merge_adaptive(__first, __middle, __last, __len1, __len2,
16250 __buf.begin(), _DistanceType(__buf.size()));
16251 }
16252 # 3765 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
16253 template<typename _BidirectionalIterator, typename _Compare>
16254 void
16255 inplace_merge(_BidirectionalIterator __first,
16256 _BidirectionalIterator __middle,
16257 _BidirectionalIterator __last,
16258 _Compare __comp)
16259 {
16260 typedef typename iterator_traits<_BidirectionalIterator>::value_type
16261 _ValueType;
16262 typedef typename iterator_traits<_BidirectionalIterator>::difference_type
16263 _DistanceType;
16264
16265
16266
16267
16268
16269
16270 ;
16271 ;
16272
16273 if (__first == __middle || __middle == __last)
16274 return;
16275
16276 const _DistanceType __len1 = std::distance(__first, __middle);
16277 const _DistanceType __len2 = std::distance(__middle, __last);
16278
16279 _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first,
16280 __last);
16281 if (__buf.begin() == 0)
16282 std::__merge_without_buffer(__first, __middle, __last, __len1,
16283 __len2, __comp);
16284 else
16285 std::__merge_adaptive(__first, __middle, __last, __len1, __len2,
16286 __buf.begin(), _DistanceType(__buf.size()),
16287 __comp);
16288 }
16289
16290 template<typename _RandomAccessIterator, typename _Pointer,
16291 typename _Distance>
16292 void
16293 __stable_sort_adaptive(_RandomAccessIterator __first,
16294 _RandomAccessIterator __last,
16295 _Pointer __buffer, _Distance __buffer_size)
16296 {
16297 const _Distance __len = (__last - __first + 1) / 2;
16298 const _RandomAccessIterator __middle = __first + __len;
16299 if (__len > __buffer_size)
16300 {
16301 std::__stable_sort_adaptive(__first, __middle,
16302 __buffer, __buffer_size);
16303 std::__stable_sort_adaptive(__middle, __last,
16304 __buffer, __buffer_size);
16305 }
16306 else
16307 {
16308 std::__merge_sort_with_buffer(__first, __middle, __buffer);
16309 std::__merge_sort_with_buffer(__middle, __last, __buffer);
16310 }
16311 std::__merge_adaptive(__first, __middle, __last,
16312 _Distance(__middle - __first),
16313 _Distance(__last - __middle),
16314 __buffer, __buffer_size);
16315 }
16316
16317 template<typename _RandomAccessIterator, typename _Pointer,
16318 typename _Distance, typename _Compare>
16319 void
16320 __stable_sort_adaptive(_RandomAccessIterator __first,
16321 _RandomAccessIterator __last,
16322 _Pointer __buffer, _Distance __buffer_size,
16323 _Compare __comp)
16324 {
16325 const _Distance __len = (__last - __first + 1) / 2;
16326 const _RandomAccessIterator __middle = __first + __len;
16327 if (__len > __buffer_size)
16328 {
16329 std::__stable_sort_adaptive(__first, __middle, __buffer,
16330 __buffer_size, __comp);
16331 std::__stable_sort_adaptive(__middle, __last, __buffer,
16332 __buffer_size, __comp);
16333 }
16334 else
16335 {
16336 std::__merge_sort_with_buffer(__first, __middle, __buffer, __comp);
16337 std::__merge_sort_with_buffer(__middle, __last, __buffer, __comp);
16338 }
16339 std::__merge_adaptive(__first, __middle, __last,
16340 _Distance(__middle - __first),
16341 _Distance(__last - __middle),
16342 __buffer, __buffer_size,
16343 __comp);
16344 }
16345 # 3874 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
16346 template<typename _RandomAccessIterator>
16347 inline void
16348 stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
16349 {
16350 typedef typename iterator_traits<_RandomAccessIterator>::value_type
16351 _ValueType;
16352 typedef typename iterator_traits<_RandomAccessIterator>::difference_type
16353 _DistanceType;
16354
16355
16356
16357
16358
16359 ;
16360
16361 _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first,
16362 __last);
16363 if (__buf.begin() == 0)
16364 std::__inplace_stable_sort(__first, __last);
16365 else
16366 std::__stable_sort_adaptive(__first, __last, __buf.begin(),
16367 _DistanceType(__buf.size()));
16368 }
16369 # 3915 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
16370 template<typename _RandomAccessIterator, typename _Compare>
16371 inline void
16372 stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
16373 _Compare __comp)
16374 {
16375 typedef typename iterator_traits<_RandomAccessIterator>::value_type
16376 _ValueType;
16377 typedef typename iterator_traits<_RandomAccessIterator>::difference_type
16378 _DistanceType;
16379
16380
16381
16382
16383
16384
16385
16386 ;
16387
16388 _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first,
16389 __last);
16390 if (__buf.begin() == 0)
16391 std::__inplace_stable_sort(__first, __last, __comp);
16392 else
16393 std::__stable_sort_adaptive(__first, __last, __buf.begin(),
16394 _DistanceType(__buf.size()), __comp);
16395 }
16396
16397
16398 template<typename _RandomAccessIterator, typename _Size>
16399 void
16400 __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth,
16401 _RandomAccessIterator __last, _Size __depth_limit)
16402 {
16403 typedef typename iterator_traits<_RandomAccessIterator>::value_type
16404 _ValueType;
16405
16406 while (__last - __first > 3)
16407 {
16408 if (__depth_limit == 0)
16409 {
16410 std::__heap_select(__first, __nth + 1, __last);
16411
16412 std::iter_swap(__first, __nth);
16413 return;
16414 }
16415 --__depth_limit;
16416 _RandomAccessIterator __cut =
16417 std::__unguarded_partition(__first, __last,
16418 _ValueType(std::__median(*__first,
16419 *(__first
16420 + (__last
16421 - __first)
16422 / 2),
16423 *(__last
16424 - 1))));
16425 if (__cut <= __nth)
16426 __first = __cut;
16427 else
16428 __last = __cut;
16429 }
16430 std::__insertion_sort(__first, __last);
16431 }
16432
16433 template<typename _RandomAccessIterator, typename _Size, typename _Compare>
16434 void
16435 __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth,
16436 _RandomAccessIterator __last, _Size __depth_limit,
16437 _Compare __comp)
16438 {
16439 typedef typename iterator_traits<_RandomAccessIterator>::value_type
16440 _ValueType;
16441
16442 while (__last - __first > 3)
16443 {
16444 if (__depth_limit == 0)
16445 {
16446 std::__heap_select(__first, __nth + 1, __last, __comp);
16447
16448 std::iter_swap(__first, __nth);
16449 return;
16450 }
16451 --__depth_limit;
16452 _RandomAccessIterator __cut =
16453 std::__unguarded_partition(__first, __last,
16454 _ValueType(std::__median(*__first,
16455 *(__first
16456 + (__last
16457 - __first)
16458 / 2),
16459 *(__last - 1),
16460 __comp)),
16461 __comp);
16462 if (__cut <= __nth)
16463 __first = __cut;
16464 else
16465 __last = __cut;
16466 }
16467 std::__insertion_sort(__first, __last, __comp);
16468 }
16469 # 4030 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
16470 template<typename _RandomAccessIterator>
16471 inline void
16472 nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth,
16473 _RandomAccessIterator __last)
16474 {
16475 typedef typename iterator_traits<_RandomAccessIterator>::value_type
16476 _ValueType;
16477
16478
16479
16480
16481
16482 ;
16483 ;
16484
16485 if (__first == __last || __nth == __last)
16486 return;
16487
16488 std::__introselect(__first, __nth, __last,
16489 std::__lg(__last - __first) * 2);
16490 }
16491 # 4068 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
16492 template<typename _RandomAccessIterator, typename _Compare>
16493 inline void
16494 nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth,
16495 _RandomAccessIterator __last, _Compare __comp)
16496 {
16497 typedef typename iterator_traits<_RandomAccessIterator>::value_type
16498 _ValueType;
16499
16500
16501
16502
16503
16504
16505 ;
16506 ;
16507
16508 if (__first == __last || __nth == __last)
16509 return;
16510
16511 std::__introselect(__first, __nth, __last,
16512 std::__lg(__last - __first) * 2, __comp);
16513 }
16514 # 4107 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
16515 template<typename _ForwardIterator, typename _Tp>
16516 pair<_ForwardIterator, _ForwardIterator>
16517 equal_range(_ForwardIterator __first, _ForwardIterator __last,
16518 const _Tp& __val)
16519 {
16520 typedef typename iterator_traits<_ForwardIterator>::value_type
16521 _ValueType;
16522 typedef typename iterator_traits<_ForwardIterator>::difference_type
16523 _DistanceType;
16524
16525
16526
16527
16528
16529 ;
16530
16531 _DistanceType __len = std::distance(__first, __last);
16532 _DistanceType __half;
16533 _ForwardIterator __middle, __left, __right;
16534
16535 while (__len > 0)
16536 {
16537 __half = __len >> 1;
16538 __middle = __first;
16539 std::advance(__middle, __half);
16540 if (*__middle < __val)
16541 {
16542 __first = __middle;
16543 ++__first;
16544 __len = __len - __half - 1;
16545 }
16546 else if (__val < *__middle)
16547 __len = __half;
16548 else
16549 {
16550 __left = std::lower_bound(__first, __middle, __val);
16551 std::advance(__first, __len);
16552 __right = std::upper_bound(++__middle, __first, __val);
16553 return pair<_ForwardIterator, _ForwardIterator>(__left, __right);
16554 }
16555 }
16556 return pair<_ForwardIterator, _ForwardIterator>(__first, __first);
16557 }
16558 # 4168 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
16559 template<typename _ForwardIterator, typename _Tp, typename _Compare>
16560 pair<_ForwardIterator, _ForwardIterator>
16561 equal_range(_ForwardIterator __first, _ForwardIterator __last,
16562 const _Tp& __val,
16563 _Compare __comp)
16564 {
16565 typedef typename iterator_traits<_ForwardIterator>::value_type
16566 _ValueType;
16567 typedef typename iterator_traits<_ForwardIterator>::difference_type
16568 _DistanceType;
16569
16570
16571
16572
16573
16574
16575
16576 ;
16577
16578 _DistanceType __len = std::distance(__first, __last);
16579 _DistanceType __half;
16580 _ForwardIterator __middle, __left, __right;
16581
16582 while (__len > 0)
16583 {
16584 __half = __len >> 1;
16585 __middle = __first;
16586 std::advance(__middle, __half);
16587 if (__comp(*__middle, __val))
16588 {
16589 __first = __middle;
16590 ++__first;
16591 __len = __len - __half - 1;
16592 }
16593 else if (__comp(__val, *__middle))
16594 __len = __half;
16595 else
16596 {
16597 __left = std::lower_bound(__first, __middle, __val, __comp);
16598 std::advance(__first, __len);
16599 __right = std::upper_bound(++__middle, __first, __val, __comp);
16600 return pair<_ForwardIterator, _ForwardIterator>(__left, __right);
16601 }
16602 }
16603 return pair<_ForwardIterator, _ForwardIterator>(__first, __first);
16604 }
16605 # 4226 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
16606 template<typename _ForwardIterator, typename _Tp>
16607 bool
16608 binary_search(_ForwardIterator __first, _ForwardIterator __last,
16609 const _Tp& __val)
16610 {
16611 typedef typename iterator_traits<_ForwardIterator>::value_type
16612 _ValueType;
16613
16614
16615
16616
16617 ;
16618
16619 _ForwardIterator __i = std::lower_bound(__first, __last, __val);
16620 return __i != __last && !(__val < *__i);
16621 }
16622 # 4258 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
16623 template<typename _ForwardIterator, typename _Tp, typename _Compare>
16624 bool
16625 binary_search(_ForwardIterator __first, _ForwardIterator __last,
16626 const _Tp& __val, _Compare __comp)
16627 {
16628 typedef typename iterator_traits<_ForwardIterator>::value_type
16629 _ValueType;
16630
16631
16632
16633
16634
16635 ;
16636
16637 _ForwardIterator __i = std::lower_bound(__first, __last, __val, __comp);
16638 return __i != __last && !__comp(__val, *__i);
16639 }
16640 # 4297 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
16641 template<typename _InputIterator1, typename _InputIterator2>
16642 bool
16643 includes(_InputIterator1 __first1, _InputIterator1 __last1,
16644 _InputIterator2 __first2, _InputIterator2 __last2)
16645 {
16646 typedef typename iterator_traits<_InputIterator1>::value_type
16647 _ValueType1;
16648 typedef typename iterator_traits<_InputIterator2>::value_type
16649 _ValueType2;
16650
16651
16652
16653
16654
16655
16656 ;
16657 ;
16658
16659 while (__first1 != __last1 && __first2 != __last2)
16660 if (*__first2 < *__first1)
16661 return false;
16662 else if(*__first1 < *__first2)
16663 ++__first1;
16664 else
16665 ++__first1, ++__first2;
16666
16667 return __first2 == __last2;
16668 }
16669 # 4345 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
16670 template<typename _InputIterator1, typename _InputIterator2,
16671 typename _Compare>
16672 bool
16673 includes(_InputIterator1 __first1, _InputIterator1 __last1,
16674 _InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp)
16675 {
16676 typedef typename iterator_traits<_InputIterator1>::value_type
16677 _ValueType1;
16678 typedef typename iterator_traits<_InputIterator2>::value_type
16679 _ValueType2;
16680
16681
16682
16683
16684
16685
16686
16687
16688 ;
16689 ;
16690
16691 while (__first1 != __last1 && __first2 != __last2)
16692 if (__comp(*__first2, *__first1))
16693 return false;
16694 else if(__comp(*__first1, *__first2))
16695 ++__first1;
16696 else
16697 ++__first1, ++__first2;
16698
16699 return __first2 == __last2;
16700 }
16701 # 4394 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
16702 template<typename _InputIterator1, typename _InputIterator2,
16703 typename _OutputIterator>
16704 _OutputIterator
16705 set_union(_InputIterator1 __first1, _InputIterator1 __last1,
16706 _InputIterator2 __first2, _InputIterator2 __last2,
16707 _OutputIterator __result)
16708 {
16709 typedef typename iterator_traits<_InputIterator1>::value_type
16710 _ValueType1;
16711 typedef typename iterator_traits<_InputIterator2>::value_type
16712 _ValueType2;
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723 ;
16724 ;
16725
16726 while (__first1 != __last1 && __first2 != __last2)
16727 {
16728 if (*__first1 < *__first2)
16729 {
16730 *__result = *__first1;
16731 ++__first1;
16732 }
16733 else if (*__first2 < *__first1)
16734 {
16735 *__result = *__first2;
16736 ++__first2;
16737 }
16738 else
16739 {
16740 *__result = *__first1;
16741 ++__first1;
16742 ++__first2;
16743 }
16744 ++__result;
16745 }
16746 return std::copy(__first2, __last2, std::copy(__first1, __last1,
16747 __result));
16748 }
16749 # 4460 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
16750 template<typename _InputIterator1, typename _InputIterator2,
16751 typename _OutputIterator, typename _Compare>
16752 _OutputIterator
16753 set_union(_InputIterator1 __first1, _InputIterator1 __last1,
16754 _InputIterator2 __first2, _InputIterator2 __last2,
16755 _OutputIterator __result, _Compare __comp)
16756 {
16757 typedef typename iterator_traits<_InputIterator1>::value_type
16758 _ValueType1;
16759 typedef typename iterator_traits<_InputIterator2>::value_type
16760 _ValueType2;
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773 ;
16774 ;
16775
16776 while (__first1 != __last1 && __first2 != __last2)
16777 {
16778 if (__comp(*__first1, *__first2))
16779 {
16780 *__result = *__first1;
16781 ++__first1;
16782 }
16783 else if (__comp(*__first2, *__first1))
16784 {
16785 *__result = *__first2;
16786 ++__first2;
16787 }
16788 else
16789 {
16790 *__result = *__first1;
16791 ++__first1;
16792 ++__first2;
16793 }
16794 ++__result;
16795 }
16796 return std::copy(__first2, __last2, std::copy(__first1, __last1,
16797 __result));
16798 }
16799 # 4526 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
16800 template<typename _InputIterator1, typename _InputIterator2,
16801 typename _OutputIterator>
16802 _OutputIterator
16803 set_intersection(_InputIterator1 __first1, _InputIterator1 __last1,
16804 _InputIterator2 __first2, _InputIterator2 __last2,
16805 _OutputIterator __result)
16806 {
16807 typedef typename iterator_traits<_InputIterator1>::value_type
16808 _ValueType1;
16809 typedef typename iterator_traits<_InputIterator2>::value_type
16810 _ValueType2;
16811
16812
16813
16814
16815
16816
16817
16818
16819 ;
16820 ;
16821
16822 while (__first1 != __last1 && __first2 != __last2)
16823 if (*__first1 < *__first2)
16824 ++__first1;
16825 else if (*__first2 < *__first1)
16826 ++__first2;
16827 else
16828 {
16829 *__result = *__first1;
16830 ++__first1;
16831 ++__first2;
16832 ++__result;
16833 }
16834 return __result;
16835 }
16836 # 4582 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
16837 template<typename _InputIterator1, typename _InputIterator2,
16838 typename _OutputIterator, typename _Compare>
16839 _OutputIterator
16840 set_intersection(_InputIterator1 __first1, _InputIterator1 __last1,
16841 _InputIterator2 __first2, _InputIterator2 __last2,
16842 _OutputIterator __result, _Compare __comp)
16843 {
16844 typedef typename iterator_traits<_InputIterator1>::value_type
16845 _ValueType1;
16846 typedef typename iterator_traits<_InputIterator2>::value_type
16847 _ValueType2;
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858 ;
16859 ;
16860
16861 while (__first1 != __last1 && __first2 != __last2)
16862 if (__comp(*__first1, *__first2))
16863 ++__first1;
16864 else if (__comp(*__first2, *__first1))
16865 ++__first2;
16866 else
16867 {
16868 *__result = *__first1;
16869 ++__first1;
16870 ++__first2;
16871 ++__result;
16872 }
16873 return __result;
16874 }
16875 # 4639 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
16876 template<typename _InputIterator1, typename _InputIterator2,
16877 typename _OutputIterator>
16878 _OutputIterator
16879 set_difference(_InputIterator1 __first1, _InputIterator1 __last1,
16880 _InputIterator2 __first2, _InputIterator2 __last2,
16881 _OutputIterator __result)
16882 {
16883 typedef typename iterator_traits<_InputIterator1>::value_type
16884 _ValueType1;
16885 typedef typename iterator_traits<_InputIterator2>::value_type
16886 _ValueType2;
16887
16888
16889
16890
16891
16892
16893
16894
16895 ;
16896 ;
16897
16898 while (__first1 != __last1 && __first2 != __last2)
16899 if (*__first1 < *__first2)
16900 {
16901 *__result = *__first1;
16902 ++__first1;
16903 ++__result;
16904 }
16905 else if (*__first2 < *__first1)
16906 ++__first2;
16907 else
16908 {
16909 ++__first1;
16910 ++__first2;
16911 }
16912 return std::copy(__first1, __last1, __result);
16913 }
16914 # 4699 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
16915 template<typename _InputIterator1, typename _InputIterator2,
16916 typename _OutputIterator, typename _Compare>
16917 _OutputIterator
16918 set_difference(_InputIterator1 __first1, _InputIterator1 __last1,
16919 _InputIterator2 __first2, _InputIterator2 __last2,
16920 _OutputIterator __result, _Compare __comp)
16921 {
16922 typedef typename iterator_traits<_InputIterator1>::value_type
16923 _ValueType1;
16924 typedef typename iterator_traits<_InputIterator2>::value_type
16925 _ValueType2;
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936 ;
16937 ;
16938
16939 while (__first1 != __last1 && __first2 != __last2)
16940 if (__comp(*__first1, *__first2))
16941 {
16942 *__result = *__first1;
16943 ++__first1;
16944 ++__result;
16945 }
16946 else if (__comp(*__first2, *__first1))
16947 ++__first2;
16948 else
16949 {
16950 ++__first1;
16951 ++__first2;
16952 }
16953 return std::copy(__first1, __last1, __result);
16954 }
16955 # 4756 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
16956 template<typename _InputIterator1, typename _InputIterator2,
16957 typename _OutputIterator>
16958 _OutputIterator
16959 set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1,
16960 _InputIterator2 __first2, _InputIterator2 __last2,
16961 _OutputIterator __result)
16962 {
16963 typedef typename iterator_traits<_InputIterator1>::value_type
16964 _ValueType1;
16965 typedef typename iterator_traits<_InputIterator2>::value_type
16966 _ValueType2;
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976
16977 ;
16978 ;
16979
16980 while (__first1 != __last1 && __first2 != __last2)
16981 if (*__first1 < *__first2)
16982 {
16983 *__result = *__first1;
16984 ++__first1;
16985 ++__result;
16986 }
16987 else if (*__first2 < *__first1)
16988 {
16989 *__result = *__first2;
16990 ++__first2;
16991 ++__result;
16992 }
16993 else
16994 {
16995 ++__first1;
16996 ++__first2;
16997 }
16998 return std::copy(__first2, __last2, std::copy(__first1,
16999 __last1, __result));
17000 }
17001 # 4821 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
17002 template<typename _InputIterator1, typename _InputIterator2,
17003 typename _OutputIterator, typename _Compare>
17004 _OutputIterator
17005 set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1,
17006 _InputIterator2 __first2, _InputIterator2 __last2,
17007 _OutputIterator __result,
17008 _Compare __comp)
17009 {
17010 typedef typename iterator_traits<_InputIterator1>::value_type
17011 _ValueType1;
17012 typedef typename iterator_traits<_InputIterator2>::value_type
17013 _ValueType2;
17014
17015
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025
17026 ;
17027 ;
17028
17029 while (__first1 != __last1 && __first2 != __last2)
17030 if (__comp(*__first1, *__first2))
17031 {
17032 *__result = *__first1;
17033 ++__first1;
17034 ++__result;
17035 }
17036 else if (__comp(*__first2, *__first1))
17037 {
17038 *__result = *__first2;
17039 ++__first2;
17040 ++__result;
17041 }
17042 else
17043 {
17044 ++__first1;
17045 ++__first2;
17046 }
17047 return std::copy(__first2, __last2, std::copy(__first1,
17048 __last1, __result));
17049 }
17050 # 4879 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
17051 template<typename _ForwardIterator>
17052 _ForwardIterator
17053 max_element(_ForwardIterator __first, _ForwardIterator __last)
17054 {
17055
17056
17057
17058
17059 ;
17060
17061 if (__first == __last)
17062 return __first;
17063 _ForwardIterator __result = __first;
17064 while (++__first != __last)
17065 if (*__result < *__first)
17066 __result = __first;
17067 return __result;
17068 }
17069 # 4906 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
17070 template<typename _ForwardIterator, typename _Compare>
17071 _ForwardIterator
17072 max_element(_ForwardIterator __first, _ForwardIterator __last,
17073 _Compare __comp)
17074 {
17075
17076
17077
17078
17079
17080 ;
17081
17082 if (__first == __last) return __first;
17083 _ForwardIterator __result = __first;
17084 while (++__first != __last)
17085 if (__comp(*__result, *__first)) __result = __first;
17086 return __result;
17087 }
17088
17089
17090
17091
17092
17093
17094
17095 template<typename _ForwardIterator>
17096 _ForwardIterator
17097 min_element(_ForwardIterator __first, _ForwardIterator __last)
17098 {
17099
17100
17101
17102
17103 ;
17104
17105 if (__first == __last)
17106 return __first;
17107 _ForwardIterator __result = __first;
17108 while (++__first != __last)
17109 if (*__first < *__result)
17110 __result = __first;
17111 return __result;
17112 }
17113 # 4958 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
17114 template<typename _ForwardIterator, typename _Compare>
17115 _ForwardIterator
17116 min_element(_ForwardIterator __first, _ForwardIterator __last,
17117 _Compare __comp)
17118 {
17119
17120
17121
17122
17123
17124 ;
17125
17126 if (__first == __last)
17127 return __first;
17128 _ForwardIterator __result = __first;
17129 while (++__first != __last)
17130 if (__comp(*__first, *__result))
17131 __result = __first;
17132 return __result;
17133 }
17134 # 4993 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
17135 template<typename _BidirectionalIterator>
17136 bool
17137 next_permutation(_BidirectionalIterator __first,
17138 _BidirectionalIterator __last)
17139 {
17140
17141
17142
17143
17144
17145 ;
17146
17147 if (__first == __last)
17148 return false;
17149 _BidirectionalIterator __i = __first;
17150 ++__i;
17151 if (__i == __last)
17152 return false;
17153 __i = __last;
17154 --__i;
17155
17156 for(;;)
17157 {
17158 _BidirectionalIterator __ii = __i;
17159 --__i;
17160 if (*__i < *__ii)
17161 {
17162 _BidirectionalIterator __j = __last;
17163 while (!(*__i < *--__j))
17164 {}
17165 std::iter_swap(__i, __j);
17166 std::reverse(__ii, __last);
17167 return true;
17168 }
17169 if (__i == __first)
17170 {
17171 std::reverse(__first, __last);
17172 return false;
17173 }
17174 }
17175 }
17176 # 5049 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
17177 template<typename _BidirectionalIterator, typename _Compare>
17178 bool
17179 next_permutation(_BidirectionalIterator __first,
17180 _BidirectionalIterator __last, _Compare __comp)
17181 {
17182
17183
17184
17185
17186
17187
17188 ;
17189
17190 if (__first == __last)
17191 return false;
17192 _BidirectionalIterator __i = __first;
17193 ++__i;
17194 if (__i == __last)
17195 return false;
17196 __i = __last;
17197 --__i;
17198
17199 for(;;)
17200 {
17201 _BidirectionalIterator __ii = __i;
17202 --__i;
17203 if (__comp(*__i, *__ii))
17204 {
17205 _BidirectionalIterator __j = __last;
17206 while (!__comp(*__i, *--__j))
17207 {}
17208 std::iter_swap(__i, __j);
17209 std::reverse(__ii, __last);
17210 return true;
17211 }
17212 if (__i == __first)
17213 {
17214 std::reverse(__first, __last);
17215 return false;
17216 }
17217 }
17218 }
17219 # 5104 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
17220 template<typename _BidirectionalIterator>
17221 bool
17222 prev_permutation(_BidirectionalIterator __first,
17223 _BidirectionalIterator __last)
17224 {
17225
17226
17227
17228
17229
17230 ;
17231
17232 if (__first == __last)
17233 return false;
17234 _BidirectionalIterator __i = __first;
17235 ++__i;
17236 if (__i == __last)
17237 return false;
17238 __i = __last;
17239 --__i;
17240
17241 for(;;)
17242 {
17243 _BidirectionalIterator __ii = __i;
17244 --__i;
17245 if (*__ii < *__i)
17246 {
17247 _BidirectionalIterator __j = __last;
17248 while (!(*--__j < *__i))
17249 {}
17250 std::iter_swap(__i, __j);
17251 std::reverse(__ii, __last);
17252 return true;
17253 }
17254 if (__i == __first)
17255 {
17256 std::reverse(__first, __last);
17257 return false;
17258 }
17259 }
17260 }
17261 # 5160 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
17262 template<typename _BidirectionalIterator, typename _Compare>
17263 bool
17264 prev_permutation(_BidirectionalIterator __first,
17265 _BidirectionalIterator __last, _Compare __comp)
17266 {
17267
17268
17269
17270
17271
17272
17273 ;
17274
17275 if (__first == __last)
17276 return false;
17277 _BidirectionalIterator __i = __first;
17278 ++__i;
17279 if (__i == __last)
17280 return false;
17281 __i = __last;
17282 --__i;
17283
17284 for(;;)
17285 {
17286 _BidirectionalIterator __ii = __i;
17287 --__i;
17288 if (__comp(*__ii, *__i))
17289 {
17290 _BidirectionalIterator __j = __last;
17291 while (!__comp(*--__j, *__i))
17292 {}
17293 std::iter_swap(__i, __j);
17294 std::reverse(__ii, __last);
17295 return true;
17296 }
17297 if (__i == __first)
17298 {
17299 std::reverse(__first, __last);
17300 return false;
17301 }
17302 }
17303 }
17304 # 5219 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
17305 template<typename _InputIterator, typename _ForwardIterator>
17306 _InputIterator
17307 find_first_of(_InputIterator __first1, _InputIterator __last1,
17308 _ForwardIterator __first2, _ForwardIterator __last2)
17309 {
17310
17311
17312
17313
17314
17315
17316 ;
17317 ;
17318
17319 for ( ; __first1 != __last1; ++__first1)
17320 for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter)
17321 if (*__first1 == *__iter)
17322 return __first1;
17323 return __last1;
17324 }
17325 # 5255 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
17326 template<typename _InputIterator, typename _ForwardIterator,
17327 typename _BinaryPredicate>
17328 _InputIterator
17329 find_first_of(_InputIterator __first1, _InputIterator __last1,
17330 _ForwardIterator __first2, _ForwardIterator __last2,
17331 _BinaryPredicate __comp)
17332 {
17333
17334
17335
17336
17337
17338
17339 ;
17340 ;
17341
17342 for ( ; __first1 != __last1; ++__first1)
17343 for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter)
17344 if (__comp(*__first1, *__iter))
17345 return __first1;
17346 return __last1;
17347 }
17348 # 5285 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
17349 template<typename _ForwardIterator1, typename _ForwardIterator2>
17350 _ForwardIterator1
17351 __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
17352 _ForwardIterator2 __first2, _ForwardIterator2 __last2,
17353 forward_iterator_tag, forward_iterator_tag)
17354 {
17355 if (__first2 == __last2)
17356 return __last1;
17357 else
17358 {
17359 _ForwardIterator1 __result = __last1;
17360 while (1)
17361 {
17362 _ForwardIterator1 __new_result
17363 = std::search(__first1, __last1, __first2, __last2);
17364 if (__new_result == __last1)
17365 return __result;
17366 else
17367 {
17368 __result = __new_result;
17369 __first1 = __new_result;
17370 ++__first1;
17371 }
17372 }
17373 }
17374 }
17375
17376 template<typename _ForwardIterator1, typename _ForwardIterator2,
17377 typename _BinaryPredicate>
17378 _ForwardIterator1
17379 __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
17380 _ForwardIterator2 __first2, _ForwardIterator2 __last2,
17381 forward_iterator_tag, forward_iterator_tag,
17382 _BinaryPredicate __comp)
17383 {
17384 if (__first2 == __last2)
17385 return __last1;
17386 else
17387 {
17388 _ForwardIterator1 __result = __last1;
17389 while (1)
17390 {
17391 _ForwardIterator1 __new_result
17392 = std::search(__first1, __last1, __first2, __last2, __comp);
17393 if (__new_result == __last1)
17394 return __result;
17395 else
17396 {
17397 __result = __new_result;
17398 __first1 = __new_result;
17399 ++__first1;
17400 }
17401 }
17402 }
17403 }
17404
17405
17406 template<typename _BidirectionalIterator1, typename _BidirectionalIterator2>
17407 _BidirectionalIterator1
17408 __find_end(_BidirectionalIterator1 __first1,
17409 _BidirectionalIterator1 __last1,
17410 _BidirectionalIterator2 __first2,
17411 _BidirectionalIterator2 __last2,
17412 bidirectional_iterator_tag, bidirectional_iterator_tag)
17413 {
17414
17415
17416
17417
17418
17419
17420 typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1;
17421 typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2;
17422
17423 _RevIterator1 __rlast1(__first1);
17424 _RevIterator2 __rlast2(__first2);
17425 _RevIterator1 __rresult = std::search(_RevIterator1(__last1), __rlast1,
17426 _RevIterator2(__last2), __rlast2);
17427
17428 if (__rresult == __rlast1)
17429 return __last1;
17430 else
17431 {
17432 _BidirectionalIterator1 __result = __rresult.base();
17433 std::advance(__result, -std::distance(__first2, __last2));
17434 return __result;
17435 }
17436 }
17437
17438 template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
17439 typename _BinaryPredicate>
17440 _BidirectionalIterator1
17441 __find_end(_BidirectionalIterator1 __first1,
17442 _BidirectionalIterator1 __last1,
17443 _BidirectionalIterator2 __first2,
17444 _BidirectionalIterator2 __last2,
17445 bidirectional_iterator_tag, bidirectional_iterator_tag,
17446 _BinaryPredicate __comp)
17447 {
17448
17449
17450
17451
17452
17453
17454 typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1;
17455 typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2;
17456
17457 _RevIterator1 __rlast1(__first1);
17458 _RevIterator2 __rlast2(__first2);
17459 _RevIterator1 __rresult = std::search(_RevIterator1(__last1), __rlast1,
17460 _RevIterator2(__last2), __rlast2,
17461 __comp);
17462
17463 if (__rresult == __rlast1)
17464 return __last1;
17465 else
17466 {
17467 _BidirectionalIterator1 __result = __rresult.base();
17468 std::advance(__result, -std::distance(__first2, __last2));
17469 return __result;
17470 }
17471 }
17472 # 5435 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
17473 template<typename _ForwardIterator1, typename _ForwardIterator2>
17474 inline _ForwardIterator1
17475 find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
17476 _ForwardIterator2 __first2, _ForwardIterator2 __last2)
17477 {
17478
17479
17480
17481
17482
17483
17484 ;
17485 ;
17486
17487 return std::__find_end(__first1, __last1, __first2, __last2,
17488 std::__iterator_category(__first1),
17489 std::__iterator_category(__first2));
17490 }
17491 # 5480 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3
17492 template<typename _ForwardIterator1, typename _ForwardIterator2,
17493 typename _BinaryPredicate>
17494 inline _ForwardIterator1
17495 find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
17496 _ForwardIterator2 __first2, _ForwardIterator2 __last2,
17497 _BinaryPredicate __comp)
17498 {
17499
17500
17501
17502
17503
17504
17505 ;
17506 ;
17507
17508 return std::__find_end(__first1, __last1, __first2, __last2,
17509 std::__iterator_category(__first1),
17510 std::__iterator_category(__first2),
17511 __comp);
17512 }
17513
17514 }
17515 # 69 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/algorithm" 2 3
17516 # 48 "enblend.cc" 2
17517 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iostream" 1 3
17518 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iostream" 3
17519
17520 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iostream" 3
17521
17522
17523 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 1 3
17524 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3
17525
17526 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3
17527
17528 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ios" 1 3
17529 # 41 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ios" 3
17530
17531 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ios" 3
17532
17533
17534
17535 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/char_traits.h" 1 3
17536 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/char_traits.h" 3
17537
17538 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/char_traits.h" 3
17539
17540
17541
17542
17543
17544 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
17545 # 61 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/char_traits.h" 3
17546 template <class _CharT>
17547 struct _Char_types
17548 {
17549 typedef unsigned long int_type;
17550 typedef std::streampos pos_type;
17551 typedef std::streamoff off_type;
17552 typedef std::mbstate_t state_type;
17553 };
17554 # 86 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/char_traits.h" 3
17555 template<typename _CharT>
17556 struct char_traits
17557 {
17558 typedef _CharT char_type;
17559 typedef typename _Char_types<_CharT>::int_type int_type;
17560 typedef typename _Char_types<_CharT>::pos_type pos_type;
17561 typedef typename _Char_types<_CharT>::off_type off_type;
17562 typedef typename _Char_types<_CharT>::state_type state_type;
17563
17564 static void
17565 assign(char_type& __c1, const char_type& __c2)
17566 { __c1 = __c2; }
17567
17568 static bool
17569 eq(const char_type& __c1, const char_type& __c2)
17570 { return __c1 == __c2; }
17571
17572 static bool
17573 lt(const char_type& __c1, const char_type& __c2)
17574 { return __c1 < __c2; }
17575
17576 static int
17577 compare(const char_type* __s1, const char_type* __s2, std::size_t __n);
17578
17579 static std::size_t
17580 length(const char_type* __s);
17581
17582 static const char_type*
17583 find(const char_type* __s, std::size_t __n, const char_type& __a);
17584
17585 static char_type*
17586 move(char_type* __s1, const char_type* __s2, std::size_t __n);
17587
17588 static char_type*
17589 copy(char_type* __s1, const char_type* __s2, std::size_t __n);
17590
17591 static char_type*
17592 assign(char_type* __s, std::size_t __n, char_type __a);
17593
17594 static char_type
17595 to_char_type(const int_type& __c)
17596 { return static_cast<char_type>(__c); }
17597
17598 static int_type
17599 to_int_type(const char_type& __c)
17600 { return static_cast<int_type>(__c); }
17601
17602 static bool
17603 eq_int_type(const int_type& __c1, const int_type& __c2)
17604 { return __c1 == __c2; }
17605
17606 static int_type
17607 eof()
17608 { return static_cast<int_type>((-1)); }
17609
17610 static int_type
17611 not_eof(const int_type& __c)
17612 { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); }
17613 };
17614
17615 template<typename _CharT>
17616 int
17617 char_traits<_CharT>::
17618 compare(const char_type* __s1, const char_type* __s2, std::size_t __n)
17619 {
17620 for (std::size_t __i = 0; __i < __n; ++__i)
17621 if (lt(__s1[__i], __s2[__i]))
17622 return -1;
17623 else if (lt(__s2[__i], __s1[__i]))
17624 return 1;
17625 return 0;
17626 }
17627
17628 template<typename _CharT>
17629 std::size_t
17630 char_traits<_CharT>::
17631 length(const char_type* __p)
17632 {
17633 std::size_t __i = 0;
17634 while (!eq(__p[__i], char_type()))
17635 ++__i;
17636 return __i;
17637 }
17638
17639 template<typename _CharT>
17640 const typename char_traits<_CharT>::char_type*
17641 char_traits<_CharT>::
17642 find(const char_type* __s, std::size_t __n, const char_type& __a)
17643 {
17644 for (std::size_t __i = 0; __i < __n; ++__i)
17645 if (eq(__s[__i], __a))
17646 return __s + __i;
17647 return 0;
17648 }
17649
17650 template<typename _CharT>
17651 typename char_traits<_CharT>::char_type*
17652 char_traits<_CharT>::
17653 move(char_type* __s1, const char_type* __s2, std::size_t __n)
17654 {
17655 return static_cast<_CharT*>(std::memmove(__s1, __s2,
17656 __n * sizeof(char_type)));
17657 }
17658
17659 template<typename _CharT>
17660 typename char_traits<_CharT>::char_type*
17661 char_traits<_CharT>::
17662 copy(char_type* __s1, const char_type* __s2, std::size_t __n)
17663 {
17664 std::copy(__s2, __s2 + __n, __s1);
17665 return __s1;
17666 }
17667
17668 template<typename _CharT>
17669 typename char_traits<_CharT>::char_type*
17670 char_traits<_CharT>::
17671 assign(char_type* __s, std::size_t __n, char_type __a)
17672 {
17673 std::fill_n(__s, __n, __a);
17674 return __s;
17675 }
17676
17677 }
17678
17679 namespace std __attribute__ ((__visibility__ ("default"))) {
17680 # 225 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/char_traits.h" 3
17681 template<class _CharT>
17682 struct char_traits : public __gnu_cxx::char_traits<_CharT>
17683 { };
17684
17685
17686
17687 template<>
17688 struct char_traits<char>
17689 {
17690 typedef char char_type;
17691 typedef int int_type;
17692 typedef streampos pos_type;
17693 typedef streamoff off_type;
17694 typedef mbstate_t state_type;
17695
17696 static void
17697 assign(char_type& __c1, const char_type& __c2)
17698 { __c1 = __c2; }
17699
17700 static bool
17701 eq(const char_type& __c1, const char_type& __c2)
17702 { return __c1 == __c2; }
17703
17704 static bool
17705 lt(const char_type& __c1, const char_type& __c2)
17706 { return __c1 < __c2; }
17707
17708 static int
17709 compare(const char_type* __s1, const char_type* __s2, size_t __n)
17710 { return memcmp(__s1, __s2, __n); }
17711
17712 static size_t
17713 length(const char_type* __s)
17714 { return strlen(__s); }
17715
17716 static const char_type*
17717 find(const char_type* __s, size_t __n, const char_type& __a)
17718 { return static_cast<const char_type*>(memchr(__s, __a, __n)); }
17719
17720 static char_type*
17721 move(char_type* __s1, const char_type* __s2, size_t __n)
17722 { return static_cast<char_type*>(memmove(__s1, __s2, __n)); }
17723
17724 static char_type*
17725 copy(char_type* __s1, const char_type* __s2, size_t __n)
17726 { return static_cast<char_type*>(memcpy(__s1, __s2, __n)); }
17727
17728 static char_type*
17729 assign(char_type* __s, size_t __n, char_type __a)
17730 { return static_cast<char_type*>(memset(__s, __a, __n)); }
17731
17732 static char_type
17733 to_char_type(const int_type& __c)
17734 { return static_cast<char_type>(__c); }
17735
17736
17737
17738 static int_type
17739 to_int_type(const char_type& __c)
17740 { return static_cast<int_type>(static_cast<unsigned char>(__c)); }
17741
17742 static bool
17743 eq_int_type(const int_type& __c1, const int_type& __c2)
17744 { return __c1 == __c2; }
17745
17746 static int_type
17747 eof() { return static_cast<int_type>((-1)); }
17748
17749 static int_type
17750 not_eof(const int_type& __c)
17751 { return (__c == eof()) ? 0 : __c; }
17752 };
17753
17754
17755
17756
17757 template<>
17758 struct char_traits<wchar_t>
17759 {
17760 typedef wchar_t char_type;
17761 typedef wint_t int_type;
17762 typedef streamoff off_type;
17763 typedef wstreampos pos_type;
17764 typedef mbstate_t state_type;
17765
17766 static void
17767 assign(char_type& __c1, const char_type& __c2)
17768 { __c1 = __c2; }
17769
17770 static bool
17771 eq(const char_type& __c1, const char_type& __c2)
17772 { return __c1 == __c2; }
17773
17774 static bool
17775 lt(const char_type& __c1, const char_type& __c2)
17776 { return __c1 < __c2; }
17777
17778 static int
17779 compare(const char_type* __s1, const char_type* __s2, size_t __n)
17780 { return wmemcmp(__s1, __s2, __n); }
17781
17782 static size_t
17783 length(const char_type* __s)
17784 { return wcslen(__s); }
17785
17786 static const char_type*
17787 find(const char_type* __s, size_t __n, const char_type& __a)
17788 { return wmemchr(__s, __a, __n); }
17789
17790 static char_type*
17791 move(char_type* __s1, const char_type* __s2, size_t __n)
17792 { return wmemmove(__s1, __s2, __n); }
17793
17794 static char_type*
17795 copy(char_type* __s1, const char_type* __s2, size_t __n)
17796 { return wmemcpy(__s1, __s2, __n); }
17797
17798 static char_type*
17799 assign(char_type* __s, size_t __n, char_type __a)
17800 { return wmemset(__s, __a, __n); }
17801
17802 static char_type
17803 to_char_type(const int_type& __c) { return char_type(__c); }
17804
17805 static int_type
17806 to_int_type(const char_type& __c) { return int_type(__c); }
17807
17808 static bool
17809 eq_int_type(const int_type& __c1, const int_type& __c2)
17810 { return __c1 == __c2; }
17811
17812 static int_type
17813 eof() { return static_cast<int_type>((0xffffffffu)); }
17814
17815 static int_type
17816 not_eof(const int_type& __c)
17817 { return eq_int_type(__c, eof()) ? 0 : __c; }
17818 };
17819
17820
17821 }
17822 # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ios" 2 3
17823
17824 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/localefwd.h" 1 3
17825 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/localefwd.h" 3
17826
17827 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/localefwd.h" 3
17828
17829
17830
17831
17832
17833
17834 namespace std __attribute__ ((__visibility__ ("default"))) {
17835
17836
17837 class locale;
17838
17839
17840 template<typename _CharT>
17841 inline bool
17842 isspace(_CharT, const locale&);
17843
17844 template<typename _CharT>
17845 inline bool
17846 isprint(_CharT, const locale&);
17847
17848 template<typename _CharT>
17849 inline bool
17850 iscntrl(_CharT, const locale&);
17851
17852 template<typename _CharT>
17853 inline bool
17854 isupper(_CharT, const locale&);
17855
17856 template<typename _CharT>
17857 inline bool
17858 islower(_CharT, const locale&);
17859
17860 template<typename _CharT>
17861 inline bool
17862 isalpha(_CharT, const locale&);
17863
17864 template<typename _CharT>
17865 inline bool
17866 isdigit(_CharT, const locale&);
17867
17868 template<typename _CharT>
17869 inline bool
17870 ispunct(_CharT, const locale&);
17871
17872 template<typename _CharT>
17873 inline bool
17874 isxdigit(_CharT, const locale&);
17875
17876 template<typename _CharT>
17877 inline bool
17878 isalnum(_CharT, const locale&);
17879
17880 template<typename _CharT>
17881 inline bool
17882 isgraph(_CharT, const locale&);
17883
17884 template<typename _CharT>
17885 inline _CharT
17886 toupper(_CharT, const locale&);
17887
17888 template<typename _CharT>
17889 inline _CharT
17890 tolower(_CharT, const locale&);
17891
17892
17893 class ctype_base;
17894 template<typename _CharT>
17895 class ctype;
17896 template<> class ctype<char>;
17897
17898 template<> class ctype<wchar_t>;
17899
17900 template<typename _CharT>
17901 class ctype_byname;
17902
17903
17904 class codecvt_base;
17905 class __enc_traits;
17906 template<typename _InternT, typename _ExternT, typename _StateT>
17907 class codecvt;
17908 template<> class codecvt<char, char, mbstate_t>;
17909
17910 template<> class codecvt<wchar_t, char, mbstate_t>;
17911
17912 template<typename _InternT, typename _ExternT, typename _StateT>
17913 class codecvt_byname;
17914
17915
17916 namespace __gnu_cxx_ldbl128 {
17917 template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
17918 class num_get;
17919 template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
17920 class num_put;
17921 }
17922 template<typename _CharT> class numpunct;
17923 template<typename _CharT> class numpunct_byname;
17924
17925
17926 template<typename _CharT>
17927 class collate;
17928 template<typename _CharT> class
17929 collate_byname;
17930
17931
17932 class time_base;
17933 template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
17934 class time_get;
17935 template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
17936 class time_get_byname;
17937 template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
17938 class time_put;
17939 template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
17940 class time_put_byname;
17941
17942
17943 class money_base;
17944 namespace __gnu_cxx_ldbl128 {
17945 template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
17946 class money_get;
17947 template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
17948 class money_put;
17949 }
17950 template<typename _CharT, bool _Intl = false>
17951 class moneypunct;
17952 template<typename _CharT, bool _Intl = false>
17953 class moneypunct_byname;
17954
17955
17956 class messages_base;
17957 template<typename _CharT>
17958 class messages;
17959 template<typename _CharT>
17960 class messages_byname;
17961
17962 template<typename _Facet>
17963 bool
17964 has_facet(const locale& __loc) throw();
17965
17966 template<typename _Facet>
17967 const _Facet&
17968 use_facet(const locale& __loc);
17969
17970 template<typename _Facet>
17971 inline const _Facet&
17972 __check_facet(const _Facet* __f)
17973 {
17974 if (!__f)
17975 __throw_bad_cast();
17976 return *__f;
17977 }
17978
17979 }
17980 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ios" 2 3
17981 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 1 3
17982 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3
17983
17984 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3
17985
17986 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/atomicity.h" 1 3
17987 # 40 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/atomicity.h" 3
17988 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/atomic_word.h" 1 3
17989 # 33 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/atomic_word.h" 3
17990 typedef int _Atomic_word;
17991 # 41 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/atomicity.h" 2 3
17992
17993 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
17994
17995
17996
17997
17998
17999
18000 static inline _Atomic_word
18001 __exchange_and_add(volatile _Atomic_word* __mem, int __val)
18002 { return __sync_fetch_and_add(__mem, __val); }
18003
18004 static inline void
18005 __atomic_add(volatile _Atomic_word* __mem, int __val)
18006 { __sync_fetch_and_add(__mem, __val); }
18007 # 66 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/atomicity.h" 3
18008 static inline _Atomic_word
18009 __exchange_and_add_single(_Atomic_word* __mem, int __val)
18010 {
18011 _Atomic_word __result = *__mem;
18012 *__mem += __val;
18013 return __result;
18014 }
18015
18016 static inline void
18017 __atomic_add_single(_Atomic_word* __mem, int __val)
18018 { *__mem += __val; }
18019
18020 static inline _Atomic_word
18021 __attribute__ ((__unused__))
18022 __exchange_and_add_dispatch(_Atomic_word* __mem, int __val)
18023 {
18024
18025 if (__gthread_active_p())
18026 return __exchange_and_add(__mem, __val);
18027 else
18028 return __exchange_and_add_single(__mem, __val);
18029
18030
18031
18032 }
18033
18034 static inline void
18035 __attribute__ ((__unused__))
18036 __atomic_add_dispatch(_Atomic_word* __mem, int __val)
18037 {
18038
18039 if (__gthread_active_p())
18040 __atomic_add(__mem, __val);
18041 else
18042 __atomic_add_single(__mem, __val);
18043
18044
18045
18046 }
18047
18048 }
18049 # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 2 3
18050
18051 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 1 3
18052 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3
18053
18054 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3
18055
18056
18057
18058 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/string" 1 3
18059 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/string" 3
18060
18061 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/string" 3
18062
18063
18064
18065
18066
18067
18068
18069 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ostream_insert.h" 1 3
18070 # 38 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ostream_insert.h" 3
18071
18072 # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ostream_insert.h" 3
18073
18074
18075
18076 namespace std __attribute__ ((__visibility__ ("default"))) {
18077
18078 template<typename _CharT, typename _Traits>
18079 inline void
18080 __ostream_write(basic_ostream<_CharT, _Traits>& __out,
18081 const _CharT* __s, streamsize __n)
18082 {
18083 typedef basic_ostream<_CharT, _Traits> __ostream_type;
18084 typedef typename __ostream_type::ios_base __ios_base;
18085
18086 const streamsize __put = __out.rdbuf()->sputn(__s, __n);
18087 if (__put != __n)
18088 __out.setstate(__ios_base::badbit);
18089 }
18090
18091 template<typename _CharT, typename _Traits>
18092 inline void
18093 __ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n)
18094 {
18095 typedef basic_ostream<_CharT, _Traits> __ostream_type;
18096 typedef typename __ostream_type::ios_base __ios_base;
18097
18098 const _CharT __c = __out.fill();
18099 for (; __n > 0; --__n)
18100 {
18101 const typename _Traits::int_type __put = __out.rdbuf()->sputc(__c);
18102 if (_Traits::eq_int_type(__put, _Traits::eof()))
18103 {
18104 __out.setstate(__ios_base::badbit);
18105 break;
18106 }
18107 }
18108 }
18109
18110 template<typename _CharT, typename _Traits>
18111 basic_ostream<_CharT, _Traits>&
18112 __ostream_insert(basic_ostream<_CharT, _Traits>& __out,
18113 const _CharT* __s, streamsize __n)
18114 {
18115 typedef basic_ostream<_CharT, _Traits> __ostream_type;
18116 typedef typename __ostream_type::ios_base __ios_base;
18117
18118 typename __ostream_type::sentry __cerb(__out);
18119 if (__cerb)
18120 {
18121 try
18122 {
18123 const streamsize __w = __out.width();
18124 if (__w > __n)
18125 {
18126 const bool __left = ((__out.flags()
18127 & __ios_base::adjustfield)
18128 == __ios_base::left);
18129 if (!__left)
18130 __ostream_fill(__out, __w - __n);
18131 if (__out.good())
18132 __ostream_write(__out, __s, __n);
18133 if (__left && __out.good())
18134 __ostream_fill(__out, __w - __n);
18135 }
18136 else
18137 __ostream_write(__out, __s, __n);
18138 __out.width(0);
18139 }
18140 catch(...)
18141 { __out._M_setstate(__ios_base::badbit); }
18142 }
18143 return __out;
18144 }
18145
18146 }
18147 # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/string" 2 3
18148
18149 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_function.h" 1 3
18150 # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_function.h" 3
18151 namespace std __attribute__ ((__visibility__ ("default"))) {
18152 # 101 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_function.h" 3
18153 template <class _Arg, class _Result>
18154 struct unary_function
18155 {
18156 typedef _Arg argument_type;
18157
18158
18159 typedef _Result result_type;
18160 };
18161
18162
18163
18164
18165 template <class _Arg1, class _Arg2, class _Result>
18166 struct binary_function
18167 {
18168 typedef _Arg1 first_argument_type;
18169
18170
18171 typedef _Arg2 second_argument_type;
18172 typedef _Result result_type;
18173 };
18174 # 133 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_function.h" 3
18175 template <class _Tp>
18176 struct plus : public binary_function<_Tp, _Tp, _Tp>
18177 {
18178 _Tp
18179 operator()(const _Tp& __x, const _Tp& __y) const
18180 { return __x + __y; }
18181 };
18182
18183
18184 template <class _Tp>
18185 struct minus : public binary_function<_Tp, _Tp, _Tp>
18186 {
18187 _Tp
18188 operator()(const _Tp& __x, const _Tp& __y) const
18189 { return __x - __y; }
18190 };
18191
18192
18193 template <class _Tp>
18194 struct multiplies : public binary_function<_Tp, _Tp, _Tp>
18195 {
18196 _Tp
18197 operator()(const _Tp& __x, const _Tp& __y) const
18198 { return __x * __y; }
18199 };
18200
18201
18202 template <class _Tp>
18203 struct divides : public binary_function<_Tp, _Tp, _Tp>
18204 {
18205 _Tp
18206 operator()(const _Tp& __x, const _Tp& __y) const
18207 { return __x / __y; }
18208 };
18209
18210
18211 template <class _Tp>
18212 struct modulus : public binary_function<_Tp, _Tp, _Tp>
18213 {
18214 _Tp
18215 operator()(const _Tp& __x, const _Tp& __y) const
18216 { return __x % __y; }
18217 };
18218
18219
18220 template <class _Tp>
18221 struct negate : public unary_function<_Tp, _Tp>
18222 {
18223 _Tp
18224 operator()(const _Tp& __x) const
18225 { return -__x; }
18226 };
18227 # 195 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_function.h" 3
18228 template <class _Tp>
18229 struct equal_to : public binary_function<_Tp, _Tp, bool>
18230 {
18231 bool
18232 operator()(const _Tp& __x, const _Tp& __y) const
18233 { return __x == __y; }
18234 };
18235
18236
18237 template <class _Tp>
18238 struct not_equal_to : public binary_function<_Tp, _Tp, bool>
18239 {
18240 bool
18241 operator()(const _Tp& __x, const _Tp& __y) const
18242 { return __x != __y; }
18243 };
18244
18245
18246 template <class _Tp>
18247 struct greater : public binary_function<_Tp, _Tp, bool>
18248 {
18249 bool
18250 operator()(const _Tp& __x, const _Tp& __y) const
18251 { return __x > __y; }
18252 };
18253
18254
18255 template <class _Tp>
18256 struct less : public binary_function<_Tp, _Tp, bool>
18257 {
18258 bool
18259 operator()(const _Tp& __x, const _Tp& __y) const
18260 { return __x < __y; }
18261 };
18262
18263
18264 template <class _Tp>
18265 struct greater_equal : public binary_function<_Tp, _Tp, bool>
18266 {
18267 bool
18268 operator()(const _Tp& __x, const _Tp& __y) const
18269 { return __x >= __y; }
18270 };
18271
18272
18273 template <class _Tp>
18274 struct less_equal : public binary_function<_Tp, _Tp, bool>
18275 {
18276 bool
18277 operator()(const _Tp& __x, const _Tp& __y) const
18278 { return __x <= __y; }
18279 };
18280 # 256 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_function.h" 3
18281 template <class _Tp>
18282 struct logical_and : public binary_function<_Tp, _Tp, bool>
18283 {
18284 bool
18285 operator()(const _Tp& __x, const _Tp& __y) const
18286 { return __x && __y; }
18287 };
18288
18289
18290 template <class _Tp>
18291 struct logical_or : public binary_function<_Tp, _Tp, bool>
18292 {
18293 bool
18294 operator()(const _Tp& __x, const _Tp& __y) const
18295 { return __x || __y; }
18296 };
18297
18298
18299 template <class _Tp>
18300 struct logical_not : public unary_function<_Tp, bool>
18301 {
18302 bool
18303 operator()(const _Tp& __x) const
18304 { return !__x; }
18305 };
18306 # 311 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_function.h" 3
18307 template <class _Predicate>
18308 class unary_negate
18309 : public unary_function<typename _Predicate::argument_type, bool>
18310 {
18311 protected:
18312 _Predicate _M_pred;
18313 public:
18314 explicit
18315 unary_negate(const _Predicate& __x) : _M_pred(__x) {}
18316
18317 bool
18318 operator()(const typename _Predicate::argument_type& __x) const
18319 { return !_M_pred(__x); }
18320 };
18321
18322
18323 template <class _Predicate>
18324 inline unary_negate<_Predicate>
18325 not1(const _Predicate& __pred)
18326 { return unary_negate<_Predicate>(__pred); }
18327
18328
18329 template <class _Predicate>
18330 class binary_negate
18331 : public binary_function<typename _Predicate::first_argument_type,
18332 typename _Predicate::second_argument_type,
18333 bool>
18334 {
18335 protected:
18336 _Predicate _M_pred;
18337 public:
18338 explicit
18339 binary_negate(const _Predicate& __x)
18340 : _M_pred(__x) { }
18341
18342 bool
18343 operator()(const typename _Predicate::first_argument_type& __x,
18344 const typename _Predicate::second_argument_type& __y) const
18345 { return !_M_pred(__x, __y); }
18346 };
18347
18348
18349 template <class _Predicate>
18350 inline binary_negate<_Predicate>
18351 not2(const _Predicate& __pred)
18352 { return binary_negate<_Predicate>(__pred); }
18353 # 391 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_function.h" 3
18354 template <class _Operation>
18355 class binder1st
18356 : public unary_function<typename _Operation::second_argument_type,
18357 typename _Operation::result_type>
18358 {
18359 protected:
18360 _Operation op;
18361 typename _Operation::first_argument_type value;
18362 public:
18363 binder1st(const _Operation& __x,
18364 const typename _Operation::first_argument_type& __y)
18365 : op(__x), value(__y) {}
18366
18367 typename _Operation::result_type
18368 operator()(const typename _Operation::second_argument_type& __x) const
18369 { return op(value, __x); }
18370
18371
18372
18373 typename _Operation::result_type
18374 operator()(typename _Operation::second_argument_type& __x) const
18375 { return op(value, __x); }
18376 };
18377
18378
18379 template <class _Operation, class _Tp>
18380 inline binder1st<_Operation>
18381 bind1st(const _Operation& __fn, const _Tp& __x)
18382 {
18383 typedef typename _Operation::first_argument_type _Arg1_type;
18384 return binder1st<_Operation>(__fn, _Arg1_type(__x));
18385 }
18386
18387
18388 template <class _Operation>
18389 class binder2nd
18390 : public unary_function<typename _Operation::first_argument_type,
18391 typename _Operation::result_type>
18392 {
18393 protected:
18394 _Operation op;
18395 typename _Operation::second_argument_type value;
18396 public:
18397 binder2nd(const _Operation& __x,
18398 const typename _Operation::second_argument_type& __y)
18399 : op(__x), value(__y) {}
18400
18401 typename _Operation::result_type
18402 operator()(const typename _Operation::first_argument_type& __x) const
18403 { return op(__x, value); }
18404
18405
18406
18407 typename _Operation::result_type
18408 operator()(typename _Operation::first_argument_type& __x) const
18409 { return op(__x, value); }
18410 };
18411
18412
18413 template <class _Operation, class _Tp>
18414 inline binder2nd<_Operation>
18415 bind2nd(const _Operation& __fn, const _Tp& __x)
18416 {
18417 typedef typename _Operation::second_argument_type _Arg2_type;
18418 return binder2nd<_Operation>(__fn, _Arg2_type(__x));
18419 }
18420 # 480 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_function.h" 3
18421 template <class _Arg, class _Result>
18422 class pointer_to_unary_function : public unary_function<_Arg, _Result>
18423 {
18424 protected:
18425 _Result (*_M_ptr)(_Arg);
18426 public:
18427 pointer_to_unary_function() {}
18428
18429 explicit
18430 pointer_to_unary_function(_Result (*__x)(_Arg))
18431 : _M_ptr(__x) {}
18432
18433 _Result
18434 operator()(_Arg __x) const
18435 { return _M_ptr(__x); }
18436 };
18437
18438
18439 template <class _Arg, class _Result>
18440 inline pointer_to_unary_function<_Arg, _Result>
18441 ptr_fun(_Result (*__x)(_Arg))
18442 { return pointer_to_unary_function<_Arg, _Result>(__x); }
18443
18444
18445 template <class _Arg1, class _Arg2, class _Result>
18446 class pointer_to_binary_function
18447 : public binary_function<_Arg1, _Arg2, _Result>
18448 {
18449 protected:
18450 _Result (*_M_ptr)(_Arg1, _Arg2);
18451 public:
18452 pointer_to_binary_function() {}
18453
18454 explicit
18455 pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2))
18456 : _M_ptr(__x) {}
18457
18458 _Result
18459 operator()(_Arg1 __x, _Arg2 __y) const
18460 { return _M_ptr(__x, __y); }
18461 };
18462
18463
18464 template <class _Arg1, class _Arg2, class _Result>
18465 inline pointer_to_binary_function<_Arg1, _Arg2, _Result>
18466 ptr_fun(_Result (*__x)(_Arg1, _Arg2))
18467 { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); }
18468
18469
18470 template <class _Tp>
18471 struct _Identity : public unary_function<_Tp,_Tp>
18472 {
18473 _Tp&
18474 operator()(_Tp& __x) const
18475 { return __x; }
18476
18477 const _Tp&
18478 operator()(const _Tp& __x) const
18479 { return __x; }
18480 };
18481
18482 template <class _Pair>
18483 struct _Select1st : public unary_function<_Pair,
18484 typename _Pair::first_type>
18485 {
18486 typename _Pair::first_type&
18487 operator()(_Pair& __x) const
18488 { return __x.first; }
18489
18490 const typename _Pair::first_type&
18491 operator()(const _Pair& __x) const
18492 { return __x.first; }
18493 };
18494
18495 template <class _Pair>
18496 struct _Select2nd : public unary_function<_Pair,
18497 typename _Pair::second_type>
18498 {
18499 typename _Pair::second_type&
18500 operator()(_Pair& __x) const
18501 { return __x.second; }
18502
18503 const typename _Pair::second_type&
18504 operator()(const _Pair& __x) const
18505 { return __x.second; }
18506 };
18507 # 582 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_function.h" 3
18508 template <class _Ret, class _Tp>
18509 class mem_fun_t : public unary_function<_Tp*, _Ret>
18510 {
18511 public:
18512 explicit
18513 mem_fun_t(_Ret (_Tp::*__pf)())
18514 : _M_f(__pf) {}
18515
18516 _Ret
18517 operator()(_Tp* __p) const
18518 { return (__p->*_M_f)(); }
18519 private:
18520 _Ret (_Tp::*_M_f)();
18521 };
18522
18523
18524 template <class _Ret, class _Tp>
18525 class const_mem_fun_t : public unary_function<const _Tp*, _Ret>
18526 {
18527 public:
18528 explicit
18529 const_mem_fun_t(_Ret (_Tp::*__pf)() const)
18530 : _M_f(__pf) {}
18531
18532 _Ret
18533 operator()(const _Tp* __p) const
18534 { return (__p->*_M_f)(); }
18535 private:
18536 _Ret (_Tp::*_M_f)() const;
18537 };
18538
18539
18540 template <class _Ret, class _Tp>
18541 class mem_fun_ref_t : public unary_function<_Tp, _Ret>
18542 {
18543 public:
18544 explicit
18545 mem_fun_ref_t(_Ret (_Tp::*__pf)())
18546 : _M_f(__pf) {}
18547
18548 _Ret
18549 operator()(_Tp& __r) const
18550 { return (__r.*_M_f)(); }
18551 private:
18552 _Ret (_Tp::*_M_f)();
18553 };
18554
18555
18556 template <class _Ret, class _Tp>
18557 class const_mem_fun_ref_t : public unary_function<_Tp, _Ret>
18558 {
18559 public:
18560 explicit
18561 const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const)
18562 : _M_f(__pf) {}
18563
18564 _Ret
18565 operator()(const _Tp& __r) const
18566 { return (__r.*_M_f)(); }
18567 private:
18568 _Ret (_Tp::*_M_f)() const;
18569 };
18570
18571
18572 template <class _Ret, class _Tp, class _Arg>
18573 class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret>
18574 {
18575 public:
18576 explicit
18577 mem_fun1_t(_Ret (_Tp::*__pf)(_Arg))
18578 : _M_f(__pf) {}
18579
18580 _Ret
18581 operator()(_Tp* __p, _Arg __x) const
18582 { return (__p->*_M_f)(__x); }
18583 private:
18584 _Ret (_Tp::*_M_f)(_Arg);
18585 };
18586
18587
18588 template <class _Ret, class _Tp, class _Arg>
18589 class const_mem_fun1_t : public binary_function<const _Tp*, _Arg, _Ret>
18590 {
18591 public:
18592 explicit
18593 const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const)
18594 : _M_f(__pf) {}
18595
18596 _Ret
18597 operator()(const _Tp* __p, _Arg __x) const
18598 { return (__p->*_M_f)(__x); }
18599 private:
18600 _Ret (_Tp::*_M_f)(_Arg) const;
18601 };
18602
18603
18604 template <class _Ret, class _Tp, class _Arg>
18605 class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret>
18606 {
18607 public:
18608 explicit
18609 mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg))
18610 : _M_f(__pf) {}
18611
18612 _Ret
18613 operator()(_Tp& __r, _Arg __x) const
18614 { return (__r.*_M_f)(__x); }
18615 private:
18616 _Ret (_Tp::*_M_f)(_Arg);
18617 };
18618
18619
18620 template <class _Ret, class _Tp, class _Arg>
18621 class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret>
18622 {
18623 public:
18624 explicit
18625 const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const)
18626 : _M_f(__pf) {}
18627
18628 _Ret
18629 operator()(const _Tp& __r, _Arg __x) const
18630 { return (__r.*_M_f)(__x); }
18631 private:
18632 _Ret (_Tp::*_M_f)(_Arg) const;
18633 };
18634
18635
18636
18637 template <class _Ret, class _Tp>
18638 inline mem_fun_t<_Ret, _Tp>
18639 mem_fun(_Ret (_Tp::*__f)())
18640 { return mem_fun_t<_Ret, _Tp>(__f); }
18641
18642 template <class _Ret, class _Tp>
18643 inline const_mem_fun_t<_Ret, _Tp>
18644 mem_fun(_Ret (_Tp::*__f)() const)
18645 { return const_mem_fun_t<_Ret, _Tp>(__f); }
18646
18647 template <class _Ret, class _Tp>
18648 inline mem_fun_ref_t<_Ret, _Tp>
18649 mem_fun_ref(_Ret (_Tp::*__f)())
18650 { return mem_fun_ref_t<_Ret, _Tp>(__f); }
18651
18652 template <class _Ret, class _Tp>
18653 inline const_mem_fun_ref_t<_Ret, _Tp>
18654 mem_fun_ref(_Ret (_Tp::*__f)() const)
18655 { return const_mem_fun_ref_t<_Ret, _Tp>(__f); }
18656
18657 template <class _Ret, class _Tp, class _Arg>
18658 inline mem_fun1_t<_Ret, _Tp, _Arg>
18659 mem_fun(_Ret (_Tp::*__f)(_Arg))
18660 { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
18661
18662 template <class _Ret, class _Tp, class _Arg>
18663 inline const_mem_fun1_t<_Ret, _Tp, _Arg>
18664 mem_fun(_Ret (_Tp::*__f)(_Arg) const)
18665 { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
18666
18667 template <class _Ret, class _Tp, class _Arg>
18668 inline mem_fun1_ref_t<_Ret, _Tp, _Arg>
18669 mem_fun_ref(_Ret (_Tp::*__f)(_Arg))
18670 { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
18671
18672 template <class _Ret, class _Tp, class _Arg>
18673 inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg>
18674 mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const)
18675 { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
18676
18677
18678
18679 }
18680 # 54 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/string" 2 3
18681 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 1 3
18682 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
18683
18684 # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
18685
18686
18687
18688
18689 namespace std __attribute__ ((__visibility__ ("default"))) {
18690 # 110 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
18691 template<typename _CharT, typename _Traits, typename _Alloc>
18692 class basic_string
18693 {
18694 typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type;
18695
18696
18697 public:
18698 typedef _Traits traits_type;
18699 typedef typename _Traits::char_type value_type;
18700 typedef _Alloc allocator_type;
18701 typedef typename _CharT_alloc_type::size_type size_type;
18702 typedef typename _CharT_alloc_type::difference_type difference_type;
18703 typedef typename _CharT_alloc_type::reference reference;
18704 typedef typename _CharT_alloc_type::const_reference const_reference;
18705 typedef typename _CharT_alloc_type::pointer pointer;
18706 typedef typename _CharT_alloc_type::const_pointer const_pointer;
18707 typedef __gnu_cxx::__normal_iterator<pointer, basic_string> iterator;
18708 typedef __gnu_cxx::__normal_iterator<const_pointer, basic_string>
18709 const_iterator;
18710 typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
18711 typedef std::reverse_iterator<iterator> reverse_iterator;
18712
18713 private:
18714 # 147 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
18715 struct _Rep_base
18716 {
18717 size_type _M_length;
18718 size_type _M_capacity;
18719 _Atomic_word _M_refcount;
18720 };
18721
18722 struct _Rep : _Rep_base
18723 {
18724
18725 typedef typename _Alloc::template rebind<char>::other _Raw_bytes_alloc;
18726 # 172 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
18727 static const size_type _S_max_size;
18728 static const _CharT _S_terminal;
18729
18730
18731
18732 static size_type _S_empty_rep_storage[];
18733
18734 static _Rep&
18735 _S_empty_rep()
18736 {
18737
18738
18739
18740 void* __p = reinterpret_cast<void*>(&_S_empty_rep_storage);
18741 return *reinterpret_cast<_Rep*>(__p);
18742 }
18743
18744 bool
18745 _M_is_leaked() const
18746 { return this->_M_refcount < 0; }
18747
18748 bool
18749 _M_is_shared() const
18750 { return this->_M_refcount > 0; }
18751
18752 void
18753 _M_set_leaked()
18754 { this->_M_refcount = -1; }
18755
18756 void
18757 _M_set_sharable()
18758 { this->_M_refcount = 0; }
18759
18760 void
18761 _M_set_length_and_sharable(size_type __n)
18762 {
18763 this->_M_set_sharable();
18764 this->_M_length = __n;
18765 traits_type::assign(this->_M_refdata()[__n], _S_terminal);
18766
18767
18768 }
18769
18770 _CharT*
18771 _M_refdata() throw()
18772 { return reinterpret_cast<_CharT*>(this + 1); }
18773
18774 _CharT*
18775 _M_grab(const _Alloc& __alloc1, const _Alloc& __alloc2)
18776 {
18777 return (!_M_is_leaked() && __alloc1 == __alloc2)
18778 ? _M_refcopy() : _M_clone(__alloc1);
18779 }
18780
18781
18782 static _Rep*
18783 _S_create(size_type, size_type, const _Alloc&);
18784
18785 void
18786 _M_dispose(const _Alloc& __a)
18787 {
18788
18789 if (__builtin_expect(this != &_S_empty_rep(), false))
18790
18791 if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount,
18792 -1) <= 0)
18793 _M_destroy(__a);
18794 }
18795
18796 void
18797 _M_destroy(const _Alloc&) throw();
18798
18799 _CharT*
18800 _M_refcopy() throw()
18801 {
18802
18803 if (__builtin_expect(this != &_S_empty_rep(), false))
18804
18805 __gnu_cxx::__atomic_add_dispatch(&this->_M_refcount, 1);
18806 return _M_refdata();
18807 }
18808
18809 _CharT*
18810 _M_clone(const _Alloc&, size_type __res = 0);
18811 };
18812
18813
18814 struct _Alloc_hider : _Alloc
18815 {
18816 _Alloc_hider(_CharT* __dat, const _Alloc& __a)
18817 : _Alloc(__a), _M_p(__dat) { }
18818
18819 _CharT* _M_p;
18820 };
18821
18822 public:
18823
18824
18825
18826
18827 static const size_type npos = static_cast<size_type>(-1);
18828
18829 private:
18830
18831 mutable _Alloc_hider _M_dataplus;
18832
18833 _CharT*
18834 _M_data() const
18835 { return _M_dataplus._M_p; }
18836
18837 _CharT*
18838 _M_data(_CharT* __p)
18839 { return (_M_dataplus._M_p = __p); }
18840
18841 _Rep*
18842 _M_rep() const
18843 { return &((reinterpret_cast<_Rep*> (_M_data()))[-1]); }
18844
18845
18846
18847 iterator
18848 _M_ibegin() const
18849 { return iterator(_M_data()); }
18850
18851 iterator
18852 _M_iend() const
18853 { return iterator(_M_data() + this->size()); }
18854
18855 void
18856 _M_leak()
18857 {
18858 if (!_M_rep()->_M_is_leaked())
18859 _M_leak_hard();
18860 }
18861
18862 size_type
18863 _M_check(size_type __pos, const char* __s) const
18864 {
18865 if (__pos > this->size())
18866 __throw_out_of_range((__s));
18867 return __pos;
18868 }
18869
18870 void
18871 _M_check_length(size_type __n1, size_type __n2, const char* __s) const
18872 {
18873 if (this->max_size() - (this->size() - __n1) < __n2)
18874 __throw_length_error((__s));
18875 }
18876
18877
18878 size_type
18879 _M_limit(size_type __pos, size_type __off) const
18880 {
18881 const bool __testoff = __off < this->size() - __pos;
18882 return __testoff ? __off : this->size() - __pos;
18883 }
18884
18885
18886 bool
18887 _M_disjunct(const _CharT* __s) const
18888 {
18889 return (less<const _CharT*>()(__s, _M_data())
18890 || less<const _CharT*>()(_M_data() + this->size(), __s));
18891 }
18892
18893
18894
18895 static void
18896 _M_copy(_CharT* __d, const _CharT* __s, size_type __n)
18897 {
18898 if (__n == 1)
18899 traits_type::assign(*__d, *__s);
18900 else
18901 traits_type::copy(__d, __s, __n);
18902 }
18903
18904 static void
18905 _M_move(_CharT* __d, const _CharT* __s, size_type __n)
18906 {
18907 if (__n == 1)
18908 traits_type::assign(*__d, *__s);
18909 else
18910 traits_type::move(__d, __s, __n);
18911 }
18912
18913 static void
18914 _M_assign(_CharT* __d, size_type __n, _CharT __c)
18915 {
18916 if (__n == 1)
18917 traits_type::assign(*__d, __c);
18918 else
18919 traits_type::assign(__d, __n, __c);
18920 }
18921
18922
18923
18924 template<class _Iterator>
18925 static void
18926 _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2)
18927 {
18928 for (; __k1 != __k2; ++__k1, ++__p)
18929 traits_type::assign(*__p, *__k1);
18930 }
18931
18932 static void
18933 _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2)
18934 { _S_copy_chars(__p, __k1.base(), __k2.base()); }
18935
18936 static void
18937 _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2)
18938 { _S_copy_chars(__p, __k1.base(), __k2.base()); }
18939
18940 static void
18941 _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2)
18942 { _M_copy(__p, __k1, __k2 - __k1); }
18943
18944 static void
18945 _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2)
18946 { _M_copy(__p, __k1, __k2 - __k1); }
18947
18948 void
18949 _M_mutate(size_type __pos, size_type __len1, size_type __len2);
18950
18951 void
18952 _M_leak_hard();
18953
18954 static _Rep&
18955 _S_empty_rep()
18956 { return _Rep::_S_empty_rep(); }
18957
18958 public:
18959
18960
18961
18962
18963
18964
18965
18966 inline
18967 basic_string();
18968
18969
18970
18971
18972 explicit
18973 basic_string(const _Alloc& __a);
18974
18975
18976
18977
18978
18979
18980 basic_string(const basic_string& __str);
18981
18982
18983
18984
18985
18986
18987 basic_string(const basic_string& __str, size_type __pos,
18988 size_type __n = npos);
18989
18990
18991
18992
18993
18994
18995
18996 basic_string(const basic_string& __str, size_type __pos,
18997 size_type __n, const _Alloc& __a);
18998 # 453 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
18999 basic_string(const _CharT* __s, size_type __n,
19000 const _Alloc& __a = _Alloc());
19001
19002
19003
19004
19005
19006 basic_string(const _CharT* __s, const _Alloc& __a = _Alloc());
19007
19008
19009
19010
19011
19012
19013 basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc());
19014
19015
19016
19017
19018
19019
19020
19021 template<class _InputIterator>
19022 basic_string(_InputIterator __beg, _InputIterator __end,
19023 const _Alloc& __a = _Alloc());
19024
19025
19026
19027
19028 ~basic_string()
19029 { _M_rep()->_M_dispose(this->get_allocator()); }
19030
19031
19032
19033
19034
19035 basic_string&
19036 operator=(const basic_string& __str)
19037 { return this->assign(__str); }
19038
19039
19040
19041
19042
19043 basic_string&
19044 operator=(const _CharT* __s)
19045 { return this->assign(__s); }
19046 # 508 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19047 basic_string&
19048 operator=(_CharT __c)
19049 {
19050 this->assign(1, __c);
19051 return *this;
19052 }
19053
19054
19055
19056
19057
19058
19059 iterator
19060 begin()
19061 {
19062 _M_leak();
19063 return iterator(_M_data());
19064 }
19065
19066
19067
19068
19069
19070 const_iterator
19071 begin() const
19072 { return const_iterator(_M_data()); }
19073
19074
19075
19076
19077
19078 iterator
19079 end()
19080 {
19081 _M_leak();
19082 return iterator(_M_data() + this->size());
19083 }
19084
19085
19086
19087
19088
19089 const_iterator
19090 end() const
19091 { return const_iterator(_M_data() + this->size()); }
19092
19093
19094
19095
19096
19097
19098 reverse_iterator
19099 rbegin()
19100 { return reverse_iterator(this->end()); }
19101
19102
19103
19104
19105
19106
19107 const_reverse_iterator
19108 rbegin() const
19109 { return const_reverse_iterator(this->end()); }
19110
19111
19112
19113
19114
19115
19116 reverse_iterator
19117 rend()
19118 { return reverse_iterator(this->begin()); }
19119
19120
19121
19122
19123
19124
19125 const_reverse_iterator
19126 rend() const
19127 { return const_reverse_iterator(this->begin()); }
19128
19129 public:
19130
19131
19132
19133 size_type
19134 size() const
19135 { return _M_rep()->_M_length; }
19136
19137
19138
19139 size_type
19140 length() const
19141 { return _M_rep()->_M_length; }
19142
19143
19144 size_type
19145 max_size() const
19146 { return _Rep::_S_max_size; }
19147 # 619 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19148 void
19149 resize(size_type __n, _CharT __c);
19150 # 632 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19151 void
19152 resize(size_type __n)
19153 { this->resize(__n, _CharT()); }
19154
19155
19156
19157
19158
19159 size_type
19160 capacity() const
19161 { return _M_rep()->_M_capacity; }
19162 # 661 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19163 void
19164 reserve(size_type __res_arg = 0);
19165
19166
19167
19168
19169 void
19170 clear()
19171 { _M_mutate(0, this->size(), 0); }
19172
19173
19174
19175
19176 bool
19177 empty() const
19178 { return this->size() == 0; }
19179 # 689 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19180 const_reference
19181 operator[] (size_type __pos) const
19182 {
19183 ;
19184 return _M_data()[__pos];
19185 }
19186 # 706 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19187 reference
19188 operator[](size_type __pos)
19189 {
19190
19191 ;
19192
19193 ;
19194 _M_leak();
19195 return _M_data()[__pos];
19196 }
19197 # 727 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19198 const_reference
19199 at(size_type __n) const
19200 {
19201 if (__n >= this->size())
19202 __throw_out_of_range(("basic_string::at"));
19203 return _M_data()[__n];
19204 }
19205 # 746 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19206 reference
19207 at(size_type __n)
19208 {
19209 if (__n >= size())
19210 __throw_out_of_range(("basic_string::at"));
19211 _M_leak();
19212 return _M_data()[__n];
19213 }
19214
19215
19216
19217
19218
19219
19220
19221 basic_string&
19222 operator+=(const basic_string& __str)
19223 { return this->append(__str); }
19224
19225
19226
19227
19228
19229
19230 basic_string&
19231 operator+=(const _CharT* __s)
19232 { return this->append(__s); }
19233
19234
19235
19236
19237
19238
19239 basic_string&
19240 operator+=(_CharT __c)
19241 {
19242 this->push_back(__c);
19243 return *this;
19244 }
19245
19246
19247
19248
19249
19250
19251 basic_string&
19252 append(const basic_string& __str);
19253 # 806 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19254 basic_string&
19255 append(const basic_string& __str, size_type __pos, size_type __n);
19256
19257
19258
19259
19260
19261
19262
19263 basic_string&
19264 append(const _CharT* __s, size_type __n);
19265
19266
19267
19268
19269
19270
19271 basic_string&
19272 append(const _CharT* __s)
19273 {
19274 ;
19275 return this->append(__s, traits_type::length(__s));
19276 }
19277 # 838 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19278 basic_string&
19279 append(size_type __n, _CharT __c);
19280 # 849 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19281 template<class _InputIterator>
19282 basic_string&
19283 append(_InputIterator __first, _InputIterator __last)
19284 { return this->replace(_M_iend(), _M_iend(), __first, __last); }
19285
19286
19287
19288
19289
19290 void
19291 push_back(_CharT __c)
19292 {
19293 const size_type __len = 1 + this->size();
19294 if (__len > this->capacity() || _M_rep()->_M_is_shared())
19295 this->reserve(__len);
19296 traits_type::assign(_M_data()[this->size()], __c);
19297 _M_rep()->_M_set_length_and_sharable(__len);
19298 }
19299
19300
19301
19302
19303
19304
19305 basic_string&
19306 assign(const basic_string& __str);
19307 # 888 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19308 basic_string&
19309 assign(const basic_string& __str, size_type __pos, size_type __n)
19310 { return this->assign(__str._M_data()
19311 + __str._M_check(__pos, "basic_string::assign"),
19312 __str._M_limit(__pos, __n)); }
19313 # 904 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19314 basic_string&
19315 assign(const _CharT* __s, size_type __n);
19316 # 916 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19317 basic_string&
19318 assign(const _CharT* __s)
19319 {
19320 ;
19321 return this->assign(__s, traits_type::length(__s));
19322 }
19323 # 932 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19324 basic_string&
19325 assign(size_type __n, _CharT __c)
19326 { return _M_replace_aux(size_type(0), this->size(), __n, __c); }
19327 # 944 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19328 template<class _InputIterator>
19329 basic_string&
19330 assign(_InputIterator __first, _InputIterator __last)
19331 { return this->replace(_M_ibegin(), _M_iend(), __first, __last); }
19332 # 961 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19333 void
19334 insert(iterator __p, size_type __n, _CharT __c)
19335 { this->replace(__p, __p, __n, __c); }
19336 # 976 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19337 template<class _InputIterator>
19338 void
19339 insert(iterator __p, _InputIterator __beg, _InputIterator __end)
19340 { this->replace(__p, __p, __beg, __end); }
19341 # 992 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19342 basic_string&
19343 insert(size_type __pos1, const basic_string& __str)
19344 { return this->insert(__pos1, __str, size_type(0), __str.size()); }
19345 # 1014 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19346 basic_string&
19347 insert(size_type __pos1, const basic_string& __str,
19348 size_type __pos2, size_type __n)
19349 { return this->insert(__pos1, __str._M_data()
19350 + __str._M_check(__pos2, "basic_string::insert"),
19351 __str._M_limit(__pos2, __n)); }
19352 # 1037 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19353 basic_string&
19354 insert(size_type __pos, const _CharT* __s, size_type __n);
19355 # 1055 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19356 basic_string&
19357 insert(size_type __pos, const _CharT* __s)
19358 {
19359 ;
19360 return this->insert(__pos, __s, traits_type::length(__s));
19361 }
19362 # 1078 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19363 basic_string&
19364 insert(size_type __pos, size_type __n, _CharT __c)
19365 { return _M_replace_aux(_M_check(__pos, "basic_string::insert"),
19366 size_type(0), __n, __c); }
19367 # 1095 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19368 iterator
19369 insert(iterator __p, _CharT __c)
19370 {
19371 ;
19372 const size_type __pos = __p - _M_ibegin();
19373 _M_replace_aux(__pos, size_type(0), size_type(1), __c);
19374 _M_rep()->_M_set_leaked();
19375 return iterator(_M_data() + __pos);
19376 }
19377 # 1119 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19378 basic_string&
19379 erase(size_type __pos = 0, size_type __n = npos)
19380 {
19381 _M_mutate(_M_check(__pos, "basic_string::erase"),
19382 _M_limit(__pos, __n), size_type(0));
19383 return *this;
19384 }
19385 # 1135 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19386 iterator
19387 erase(iterator __position)
19388 {
19389 ;
19390
19391 const size_type __pos = __position - _M_ibegin();
19392 _M_mutate(__pos, size_type(1), size_type(0));
19393 _M_rep()->_M_set_leaked();
19394 return iterator(_M_data() + __pos);
19395 }
19396 # 1155 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19397 iterator
19398 erase(iterator __first, iterator __last)
19399 {
19400 ;
19401
19402 const size_type __pos = __first - _M_ibegin();
19403 _M_mutate(__pos, __last - __first, size_type(0));
19404 _M_rep()->_M_set_leaked();
19405 return iterator(_M_data() + __pos);
19406 }
19407 # 1182 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19408 basic_string&
19409 replace(size_type __pos, size_type __n, const basic_string& __str)
19410 { return this->replace(__pos, __n, __str._M_data(), __str.size()); }
19411 # 1204 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19412 basic_string&
19413 replace(size_type __pos1, size_type __n1, const basic_string& __str,
19414 size_type __pos2, size_type __n2)
19415 { return this->replace(__pos1, __n1, __str._M_data()
19416 + __str._M_check(__pos2, "basic_string::replace"),
19417 __str._M_limit(__pos2, __n2)); }
19418 # 1228 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19419 basic_string&
19420 replace(size_type __pos, size_type __n1, const _CharT* __s,
19421 size_type __n2);
19422 # 1247 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19423 basic_string&
19424 replace(size_type __pos, size_type __n1, const _CharT* __s)
19425 {
19426 ;
19427 return this->replace(__pos, __n1, __s, traits_type::length(__s));
19428 }
19429 # 1270 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19430 basic_string&
19431 replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)
19432 { return _M_replace_aux(_M_check(__pos, "basic_string::replace"),
19433 _M_limit(__pos, __n1), __n2, __c); }
19434 # 1288 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19435 basic_string&
19436 replace(iterator __i1, iterator __i2, const basic_string& __str)
19437 { return this->replace(__i1, __i2, __str._M_data(), __str.size()); }
19438 # 1306 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19439 basic_string&
19440 replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n)
19441 {
19442 ;
19443
19444 return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n);
19445 }
19446 # 1327 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19447 basic_string&
19448 replace(iterator __i1, iterator __i2, const _CharT* __s)
19449 {
19450 ;
19451 return this->replace(__i1, __i2, __s, traits_type::length(__s));
19452 }
19453 # 1348 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19454 basic_string&
19455 replace(iterator __i1, iterator __i2, size_type __n, _CharT __c)
19456 {
19457 ;
19458
19459 return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __c);
19460 }
19461 # 1370 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19462 template<class _InputIterator>
19463 basic_string&
19464 replace(iterator __i1, iterator __i2,
19465 _InputIterator __k1, _InputIterator __k2)
19466 {
19467 ;
19468
19469 ;
19470 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
19471 return _M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral());
19472 }
19473
19474
19475
19476 basic_string&
19477 replace(iterator __i1, iterator __i2, _CharT* __k1, _CharT* __k2)
19478 {
19479 ;
19480
19481 ;
19482 return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
19483 __k1, __k2 - __k1);
19484 }
19485
19486 basic_string&
19487 replace(iterator __i1, iterator __i2,
19488 const _CharT* __k1, const _CharT* __k2)
19489 {
19490 ;
19491
19492 ;
19493 return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
19494 __k1, __k2 - __k1);
19495 }
19496
19497 basic_string&
19498 replace(iterator __i1, iterator __i2, iterator __k1, iterator __k2)
19499 {
19500 ;
19501
19502 ;
19503 return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
19504 __k1.base(), __k2 - __k1);
19505 }
19506
19507 basic_string&
19508 replace(iterator __i1, iterator __i2,
19509 const_iterator __k1, const_iterator __k2)
19510 {
19511 ;
19512
19513 ;
19514 return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
19515 __k1.base(), __k2 - __k1);
19516 }
19517
19518 private:
19519 template<class _Integer>
19520 basic_string&
19521 _M_replace_dispatch(iterator __i1, iterator __i2, _Integer __n,
19522 _Integer __val, __true_type)
19523 { return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __val); }
19524
19525 template<class _InputIterator>
19526 basic_string&
19527 _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1,
19528 _InputIterator __k2, __false_type);
19529
19530 basic_string&
19531 _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2,
19532 _CharT __c);
19533
19534 basic_string&
19535 _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s,
19536 size_type __n2);
19537
19538
19539
19540 template<class _InIterator>
19541 static _CharT*
19542 _S_construct_aux(_InIterator __beg, _InIterator __end,
19543 const _Alloc& __a, __false_type)
19544 {
19545 typedef typename iterator_traits<_InIterator>::iterator_category _Tag;
19546 return _S_construct(__beg, __end, __a, _Tag());
19547 }
19548
19549 template<class _InIterator>
19550 static _CharT*
19551 _S_construct_aux(_InIterator __beg, _InIterator __end,
19552 const _Alloc& __a, __true_type)
19553 { return _S_construct(static_cast<size_type>(__beg),
19554 static_cast<value_type>(__end), __a); }
19555
19556 template<class _InIterator>
19557 static _CharT*
19558 _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a)
19559 {
19560 typedef typename std::__is_integer<_InIterator>::__type _Integral;
19561 return _S_construct_aux(__beg, __end, __a, _Integral());
19562 }
19563
19564
19565 template<class _InIterator>
19566 static _CharT*
19567 _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
19568 input_iterator_tag);
19569
19570
19571
19572 template<class _FwdIterator>
19573 static _CharT*
19574 _S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a,
19575 forward_iterator_tag);
19576
19577 static _CharT*
19578 _S_construct(size_type __req, _CharT __c, const _Alloc& __a);
19579
19580 public:
19581 # 1501 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19582 size_type
19583 copy(_CharT* __s, size_type __n, size_type __pos = 0) const;
19584 # 1511 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19585 void
19586 swap(basic_string& __s);
19587 # 1521 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19588 const _CharT*
19589 c_str() const
19590 { return _M_data(); }
19591
19592
19593
19594
19595
19596
19597
19598 const _CharT*
19599 data() const
19600 { return _M_data(); }
19601
19602
19603
19604
19605 allocator_type
19606 get_allocator() const
19607 { return _M_dataplus; }
19608 # 1553 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19609 size_type
19610 find(const _CharT* __s, size_type __pos, size_type __n) const;
19611 # 1566 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19612 size_type
19613 find(const basic_string& __str, size_type __pos = 0) const
19614 { return this->find(__str.data(), __pos, __str.size()); }
19615 # 1580 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19616 size_type
19617 find(const _CharT* __s, size_type __pos = 0) const
19618 {
19619 ;
19620 return this->find(__s, __pos, traits_type::length(__s));
19621 }
19622 # 1597 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19623 size_type
19624 find(_CharT __c, size_type __pos = 0) const;
19625 # 1610 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19626 size_type
19627 rfind(const basic_string& __str, size_type __pos = npos) const
19628 { return this->rfind(__str.data(), __pos, __str.size()); }
19629 # 1625 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19630 size_type
19631 rfind(const _CharT* __s, size_type __pos, size_type __n) const;
19632 # 1638 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19633 size_type
19634 rfind(const _CharT* __s, size_type __pos = npos) const
19635 {
19636 ;
19637 return this->rfind(__s, __pos, traits_type::length(__s));
19638 }
19639 # 1655 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19640 size_type
19641 rfind(_CharT __c, size_type __pos = npos) const;
19642 # 1668 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19643 size_type
19644 find_first_of(const basic_string& __str, size_type __pos = 0) const
19645 { return this->find_first_of(__str.data(), __pos, __str.size()); }
19646 # 1683 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19647 size_type
19648 find_first_of(const _CharT* __s, size_type __pos, size_type __n) const;
19649 # 1696 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19650 size_type
19651 find_first_of(const _CharT* __s, size_type __pos = 0) const
19652 {
19653 ;
19654 return this->find_first_of(__s, __pos, traits_type::length(__s));
19655 }
19656 # 1715 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19657 size_type
19658 find_first_of(_CharT __c, size_type __pos = 0) const
19659 { return this->find(__c, __pos); }
19660 # 1729 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19661 size_type
19662 find_last_of(const basic_string& __str, size_type __pos = npos) const
19663 { return this->find_last_of(__str.data(), __pos, __str.size()); }
19664 # 1744 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19665 size_type
19666 find_last_of(const _CharT* __s, size_type __pos, size_type __n) const;
19667 # 1757 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19668 size_type
19669 find_last_of(const _CharT* __s, size_type __pos = npos) const
19670 {
19671 ;
19672 return this->find_last_of(__s, __pos, traits_type::length(__s));
19673 }
19674 # 1776 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19675 size_type
19676 find_last_of(_CharT __c, size_type __pos = npos) const
19677 { return this->rfind(__c, __pos); }
19678 # 1790 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19679 size_type
19680 find_first_not_of(const basic_string& __str, size_type __pos = 0) const
19681 { return this->find_first_not_of(__str.data(), __pos, __str.size()); }
19682 # 1805 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19683 size_type
19684 find_first_not_of(const _CharT* __s, size_type __pos,
19685 size_type __n) const;
19686 # 1819 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19687 size_type
19688 find_first_not_of(const _CharT* __s, size_type __pos = 0) const
19689 {
19690 ;
19691 return this->find_first_not_of(__s, __pos, traits_type::length(__s));
19692 }
19693 # 1836 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19694 size_type
19695 find_first_not_of(_CharT __c, size_type __pos = 0) const;
19696 # 1849 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19697 size_type
19698 find_last_not_of(const basic_string& __str, size_type __pos = npos) const
19699 { return this->find_last_not_of(__str.data(), __pos, __str.size()); }
19700 # 1865 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19701 size_type
19702 find_last_not_of(const _CharT* __s, size_type __pos,
19703 size_type __n) const;
19704 # 1878 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19705 size_type
19706 find_last_not_of(const _CharT* __s, size_type __pos = npos) const
19707 {
19708 ;
19709 return this->find_last_not_of(__s, __pos, traits_type::length(__s));
19710 }
19711 # 1895 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19712 size_type
19713 find_last_not_of(_CharT __c, size_type __pos = npos) const;
19714 # 1910 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19715 basic_string
19716 substr(size_type __pos = 0, size_type __n = npos) const
19717 { return basic_string(*this,
19718 _M_check(__pos, "basic_string::substr"), __n); }
19719 # 1928 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19720 int
19721 compare(const basic_string& __str) const
19722 {
19723 const size_type __size = this->size();
19724 const size_type __osize = __str.size();
19725 const size_type __len = std::min(__size, __osize);
19726
19727 int __r = traits_type::compare(_M_data(), __str.data(), __len);
19728 if (!__r)
19729 __r = __size - __osize;
19730 return __r;
19731 }
19732 # 1958 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19733 int
19734 compare(size_type __pos, size_type __n, const basic_string& __str) const;
19735 # 1982 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19736 int
19737 compare(size_type __pos1, size_type __n1, const basic_string& __str,
19738 size_type __pos2, size_type __n2) const;
19739 # 2000 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19740 int
19741 compare(const _CharT* __s) const;
19742 # 2023 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19743 int
19744 compare(size_type __pos, size_type __n1, const _CharT* __s) const;
19745 # 2048 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19746 int
19747 compare(size_type __pos, size_type __n1, const _CharT* __s,
19748 size_type __n2) const;
19749 };
19750
19751 template<typename _CharT, typename _Traits, typename _Alloc>
19752 inline basic_string<_CharT, _Traits, _Alloc>::
19753 basic_string()
19754
19755 : _M_dataplus(_S_empty_rep()._M_refdata(), _Alloc()) { }
19756 # 2069 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19757 template<typename _CharT, typename _Traits, typename _Alloc>
19758 basic_string<_CharT, _Traits, _Alloc>
19759 operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
19760 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
19761 {
19762 basic_string<_CharT, _Traits, _Alloc> __str(__lhs);
19763 __str.append(__rhs);
19764 return __str;
19765 }
19766
19767
19768
19769
19770
19771
19772
19773 template<typename _CharT, typename _Traits, typename _Alloc>
19774 basic_string<_CharT,_Traits,_Alloc>
19775 operator+(const _CharT* __lhs,
19776 const basic_string<_CharT,_Traits,_Alloc>& __rhs);
19777
19778
19779
19780
19781
19782
19783
19784 template<typename _CharT, typename _Traits, typename _Alloc>
19785 basic_string<_CharT,_Traits,_Alloc>
19786 operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs);
19787
19788
19789
19790
19791
19792
19793
19794 template<typename _CharT, typename _Traits, typename _Alloc>
19795 inline basic_string<_CharT, _Traits, _Alloc>
19796 operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
19797 const _CharT* __rhs)
19798 {
19799 basic_string<_CharT, _Traits, _Alloc> __str(__lhs);
19800 __str.append(__rhs);
19801 return __str;
19802 }
19803
19804
19805
19806
19807
19808
19809
19810 template<typename _CharT, typename _Traits, typename _Alloc>
19811 inline basic_string<_CharT, _Traits, _Alloc>
19812 operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
19813 {
19814 typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
19815 typedef typename __string_type::size_type __size_type;
19816 __string_type __str(__lhs);
19817 __str.append(__size_type(1), __rhs);
19818 return __str;
19819 }
19820 # 2140 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19821 template<typename _CharT, typename _Traits, typename _Alloc>
19822 inline bool
19823 operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
19824 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
19825 { return __lhs.compare(__rhs) == 0; }
19826
19827
19828
19829
19830
19831
19832
19833 template<typename _CharT, typename _Traits, typename _Alloc>
19834 inline bool
19835 operator==(const _CharT* __lhs,
19836 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
19837 { return __rhs.compare(__lhs) == 0; }
19838
19839
19840
19841
19842
19843
19844
19845 template<typename _CharT, typename _Traits, typename _Alloc>
19846 inline bool
19847 operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
19848 const _CharT* __rhs)
19849 { return __lhs.compare(__rhs) == 0; }
19850 # 2177 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19851 template<typename _CharT, typename _Traits, typename _Alloc>
19852 inline bool
19853 operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
19854 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
19855 { return __rhs.compare(__lhs) != 0; }
19856
19857
19858
19859
19860
19861
19862
19863 template<typename _CharT, typename _Traits, typename _Alloc>
19864 inline bool
19865 operator!=(const _CharT* __lhs,
19866 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
19867 { return __rhs.compare(__lhs) != 0; }
19868
19869
19870
19871
19872
19873
19874
19875 template<typename _CharT, typename _Traits, typename _Alloc>
19876 inline bool
19877 operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
19878 const _CharT* __rhs)
19879 { return __lhs.compare(__rhs) != 0; }
19880 # 2214 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19881 template<typename _CharT, typename _Traits, typename _Alloc>
19882 inline bool
19883 operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
19884 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
19885 { return __lhs.compare(__rhs) < 0; }
19886
19887
19888
19889
19890
19891
19892
19893 template<typename _CharT, typename _Traits, typename _Alloc>
19894 inline bool
19895 operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
19896 const _CharT* __rhs)
19897 { return __lhs.compare(__rhs) < 0; }
19898
19899
19900
19901
19902
19903
19904
19905 template<typename _CharT, typename _Traits, typename _Alloc>
19906 inline bool
19907 operator<(const _CharT* __lhs,
19908 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
19909 { return __rhs.compare(__lhs) > 0; }
19910 # 2251 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19911 template<typename _CharT, typename _Traits, typename _Alloc>
19912 inline bool
19913 operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
19914 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
19915 { return __lhs.compare(__rhs) > 0; }
19916
19917
19918
19919
19920
19921
19922
19923 template<typename _CharT, typename _Traits, typename _Alloc>
19924 inline bool
19925 operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
19926 const _CharT* __rhs)
19927 { return __lhs.compare(__rhs) > 0; }
19928
19929
19930
19931
19932
19933
19934
19935 template<typename _CharT, typename _Traits, typename _Alloc>
19936 inline bool
19937 operator>(const _CharT* __lhs,
19938 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
19939 { return __rhs.compare(__lhs) < 0; }
19940 # 2288 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19941 template<typename _CharT, typename _Traits, typename _Alloc>
19942 inline bool
19943 operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
19944 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
19945 { return __lhs.compare(__rhs) <= 0; }
19946
19947
19948
19949
19950
19951
19952
19953 template<typename _CharT, typename _Traits, typename _Alloc>
19954 inline bool
19955 operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
19956 const _CharT* __rhs)
19957 { return __lhs.compare(__rhs) <= 0; }
19958
19959
19960
19961
19962
19963
19964
19965 template<typename _CharT, typename _Traits, typename _Alloc>
19966 inline bool
19967 operator<=(const _CharT* __lhs,
19968 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
19969 { return __rhs.compare(__lhs) >= 0; }
19970 # 2325 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
19971 template<typename _CharT, typename _Traits, typename _Alloc>
19972 inline bool
19973 operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
19974 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
19975 { return __lhs.compare(__rhs) >= 0; }
19976
19977
19978
19979
19980
19981
19982
19983 template<typename _CharT, typename _Traits, typename _Alloc>
19984 inline bool
19985 operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
19986 const _CharT* __rhs)
19987 { return __lhs.compare(__rhs) >= 0; }
19988
19989
19990
19991
19992
19993
19994
19995 template<typename _CharT, typename _Traits, typename _Alloc>
19996 inline bool
19997 operator>=(const _CharT* __lhs,
19998 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
19999 { return __rhs.compare(__lhs) <= 0; }
20000 # 2362 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
20001 template<typename _CharT, typename _Traits, typename _Alloc>
20002 inline void
20003 swap(basic_string<_CharT, _Traits, _Alloc>& __lhs,
20004 basic_string<_CharT, _Traits, _Alloc>& __rhs)
20005 { __lhs.swap(__rhs); }
20006 # 2379 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
20007 template<typename _CharT, typename _Traits, typename _Alloc>
20008 basic_istream<_CharT, _Traits>&
20009 operator>>(basic_istream<_CharT, _Traits>& __is,
20010 basic_string<_CharT, _Traits, _Alloc>& __str);
20011
20012 template<>
20013 basic_istream<char>&
20014 operator>>(basic_istream<char>& __is, basic_string<char>& __str);
20015 # 2397 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
20016 template<typename _CharT, typename _Traits, typename _Alloc>
20017 inline basic_ostream<_CharT, _Traits>&
20018 operator<<(basic_ostream<_CharT, _Traits>& __os,
20019 const basic_string<_CharT, _Traits, _Alloc>& __str)
20020 {
20021
20022
20023 return __ostream_insert(__os, __str.data(), __str.size());
20024 }
20025 # 2420 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
20026 template<typename _CharT, typename _Traits, typename _Alloc>
20027 basic_istream<_CharT, _Traits>&
20028 getline(basic_istream<_CharT, _Traits>& __is,
20029 basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim);
20030 # 2437 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3
20031 template<typename _CharT, typename _Traits, typename _Alloc>
20032 inline basic_istream<_CharT, _Traits>&
20033 getline(basic_istream<_CharT, _Traits>& __is,
20034 basic_string<_CharT, _Traits, _Alloc>& __str)
20035 { return getline(__is, __str, __is.widen('\n')); }
20036
20037 template<>
20038 basic_istream<char>&
20039 getline(basic_istream<char>& __in, basic_string<char>& __str,
20040 char __delim);
20041
20042
20043 template<>
20044 basic_istream<wchar_t>&
20045 getline(basic_istream<wchar_t>& __in, basic_string<wchar_t>& __str,
20046 wchar_t __delim);
20047
20048
20049 }
20050 # 55 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/string" 2 3
20051
20052
20053
20054 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.tcc" 1 3
20055 # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.tcc" 3
20056
20057 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.tcc" 3
20058
20059 namespace std __attribute__ ((__visibility__ ("default"))) {
20060
20061 template<typename _Type>
20062 inline bool
20063 __is_null_pointer(_Type* __ptr)
20064 { return __ptr == 0; }
20065
20066 template<typename _Type>
20067 inline bool
20068 __is_null_pointer(_Type)
20069 { return false; }
20070
20071 template<typename _CharT, typename _Traits, typename _Alloc>
20072 const typename basic_string<_CharT, _Traits, _Alloc>::size_type
20073 basic_string<_CharT, _Traits, _Alloc>::
20074 _Rep::_S_max_size = (((npos - sizeof(_Rep_base))/sizeof(_CharT)) - 1) / 4;
20075
20076 template<typename _CharT, typename _Traits, typename _Alloc>
20077 const _CharT
20078 basic_string<_CharT, _Traits, _Alloc>::
20079 _Rep::_S_terminal = _CharT();
20080
20081 template<typename _CharT, typename _Traits, typename _Alloc>
20082 const typename basic_string<_CharT, _Traits, _Alloc>::size_type
20083 basic_string<_CharT, _Traits, _Alloc>::npos;
20084
20085
20086
20087 template<typename _CharT, typename _Traits, typename _Alloc>
20088 typename basic_string<_CharT, _Traits, _Alloc>::size_type
20089 basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_empty_rep_storage[
20090 (sizeof(_Rep_base) + sizeof(_CharT) + sizeof(size_type) - 1) /
20091 sizeof(size_type)];
20092
20093
20094
20095
20096
20097 template<typename _CharT, typename _Traits, typename _Alloc>
20098 template<typename _InIterator>
20099 _CharT*
20100 basic_string<_CharT, _Traits, _Alloc>::
20101 _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
20102 input_iterator_tag)
20103 {
20104
20105 if (__beg == __end && __a == _Alloc())
20106 return _S_empty_rep()._M_refdata();
20107
20108
20109 _CharT __buf[128];
20110 size_type __len = 0;
20111 while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT))
20112 {
20113 __buf[__len++] = *__beg;
20114 ++__beg;
20115 }
20116 _Rep* __r = _Rep::_S_create(__len, size_type(0), __a);
20117 _M_copy(__r->_M_refdata(), __buf, __len);
20118 try
20119 {
20120 while (__beg != __end)
20121 {
20122 if (__len == __r->_M_capacity)
20123 {
20124
20125 _Rep* __another = _Rep::_S_create(__len + 1, __len, __a);
20126 _M_copy(__another->_M_refdata(), __r->_M_refdata(), __len);
20127 __r->_M_destroy(__a);
20128 __r = __another;
20129 }
20130 __r->_M_refdata()[__len++] = *__beg;
20131 ++__beg;
20132 }
20133 }
20134 catch(...)
20135 {
20136 __r->_M_destroy(__a);
20137 throw;
20138 }
20139 __r->_M_set_length_and_sharable(__len);
20140 return __r->_M_refdata();
20141 }
20142
20143 template<typename _CharT, typename _Traits, typename _Alloc>
20144 template <typename _InIterator>
20145 _CharT*
20146 basic_string<_CharT, _Traits, _Alloc>::
20147 _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
20148 forward_iterator_tag)
20149 {
20150
20151 if (__beg == __end && __a == _Alloc())
20152 return _S_empty_rep()._M_refdata();
20153
20154
20155 if (__builtin_expect(__is_null_pointer(__beg) && __beg != __end, 0))
20156 __throw_logic_error(("basic_string::_S_construct NULL not valid"));
20157
20158 const size_type __dnew = static_cast<size_type>(std::distance(__beg,
20159 __end));
20160
20161 _Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a);
20162 try
20163 { _S_copy_chars(__r->_M_refdata(), __beg, __end); }
20164 catch(...)
20165 {
20166 __r->_M_destroy(__a);
20167 throw;
20168 }
20169 __r->_M_set_length_and_sharable(__dnew);
20170 return __r->_M_refdata();
20171 }
20172
20173 template<typename _CharT, typename _Traits, typename _Alloc>
20174 _CharT*
20175 basic_string<_CharT, _Traits, _Alloc>::
20176 _S_construct(size_type __n, _CharT __c, const _Alloc& __a)
20177 {
20178
20179 if (__n == 0 && __a == _Alloc())
20180 return _S_empty_rep()._M_refdata();
20181
20182
20183 _Rep* __r = _Rep::_S_create(__n, size_type(0), __a);
20184 if (__n)
20185 _M_assign(__r->_M_refdata(), __n, __c);
20186
20187 __r->_M_set_length_and_sharable(__n);
20188 return __r->_M_refdata();
20189 }
20190
20191 template<typename _CharT, typename _Traits, typename _Alloc>
20192 basic_string<_CharT, _Traits, _Alloc>::
20193 basic_string(const basic_string& __str)
20194 : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(__str.get_allocator()),
20195 __str.get_allocator()),
20196 __str.get_allocator())
20197 { }
20198
20199 template<typename _CharT, typename _Traits, typename _Alloc>
20200 basic_string<_CharT, _Traits, _Alloc>::
20201 basic_string(const _Alloc& __a)
20202 : _M_dataplus(_S_construct(size_type(), _CharT(), __a), __a)
20203 { }
20204
20205 template<typename _CharT, typename _Traits, typename _Alloc>
20206 basic_string<_CharT, _Traits, _Alloc>::
20207 basic_string(const basic_string& __str, size_type __pos, size_type __n)
20208 : _M_dataplus(_S_construct(__str._M_data()
20209 + __str._M_check(__pos,
20210 "basic_string::basic_string"),
20211 __str._M_data() + __str._M_limit(__pos, __n)
20212 + __pos, _Alloc()), _Alloc())
20213 { }
20214
20215 template<typename _CharT, typename _Traits, typename _Alloc>
20216 basic_string<_CharT, _Traits, _Alloc>::
20217 basic_string(const basic_string& __str, size_type __pos,
20218 size_type __n, const _Alloc& __a)
20219 : _M_dataplus(_S_construct(__str._M_data()
20220 + __str._M_check(__pos,
20221 "basic_string::basic_string"),
20222 __str._M_data() + __str._M_limit(__pos, __n)
20223 + __pos, __a), __a)
20224 { }
20225
20226
20227 template<typename _CharT, typename _Traits, typename _Alloc>
20228 basic_string<_CharT, _Traits, _Alloc>::
20229 basic_string(const _CharT* __s, size_type __n, const _Alloc& __a)
20230 : _M_dataplus(_S_construct(__s, __s + __n, __a), __a)
20231 { }
20232
20233
20234 template<typename _CharT, typename _Traits, typename _Alloc>
20235 basic_string<_CharT, _Traits, _Alloc>::
20236 basic_string(const _CharT* __s, const _Alloc& __a)
20237 : _M_dataplus(_S_construct(__s, __s ? __s + traits_type::length(__s) :
20238 __s + npos, __a), __a)
20239 { }
20240
20241 template<typename _CharT, typename _Traits, typename _Alloc>
20242 basic_string<_CharT, _Traits, _Alloc>::
20243 basic_string(size_type __n, _CharT __c, const _Alloc& __a)
20244 : _M_dataplus(_S_construct(__n, __c, __a), __a)
20245 { }
20246
20247
20248 template<typename _CharT, typename _Traits, typename _Alloc>
20249 template<typename _InputIterator>
20250 basic_string<_CharT, _Traits, _Alloc>::
20251 basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a)
20252 : _M_dataplus(_S_construct(__beg, __end, __a), __a)
20253 { }
20254
20255 template<typename _CharT, typename _Traits, typename _Alloc>
20256 basic_string<_CharT, _Traits, _Alloc>&
20257 basic_string<_CharT, _Traits, _Alloc>::
20258 assign(const basic_string& __str)
20259 {
20260 if (_M_rep() != __str._M_rep())
20261 {
20262
20263 const allocator_type __a = this->get_allocator();
20264 _CharT* __tmp = __str._M_rep()->_M_grab(__a, __str.get_allocator());
20265 _M_rep()->_M_dispose(__a);
20266 _M_data(__tmp);
20267 }
20268 return *this;
20269 }
20270
20271 template<typename _CharT, typename _Traits, typename _Alloc>
20272 basic_string<_CharT, _Traits, _Alloc>&
20273 basic_string<_CharT, _Traits, _Alloc>::
20274 assign(const _CharT* __s, size_type __n)
20275 {
20276 ;
20277 _M_check_length(this->size(), __n, "basic_string::assign");
20278 if (_M_disjunct(__s) || _M_rep()->_M_is_shared())
20279 return _M_replace_safe(size_type(0), this->size(), __s, __n);
20280 else
20281 {
20282
20283 const size_type __pos = __s - _M_data();
20284 if (__pos >= __n)
20285 _M_copy(_M_data(), __s, __n);
20286 else if (__pos)
20287 _M_move(_M_data(), __s, __n);
20288 _M_rep()->_M_set_length_and_sharable(__n);
20289 return *this;
20290 }
20291 }
20292
20293 template<typename _CharT, typename _Traits, typename _Alloc>
20294 basic_string<_CharT, _Traits, _Alloc>&
20295 basic_string<_CharT, _Traits, _Alloc>::
20296 append(size_type __n, _CharT __c)
20297 {
20298 if (__n)
20299 {
20300 _M_check_length(size_type(0), __n, "basic_string::append");
20301 const size_type __len = __n + this->size();
20302 if (__len > this->capacity() || _M_rep()->_M_is_shared())
20303 this->reserve(__len);
20304 _M_assign(_M_data() + this->size(), __n, __c);
20305 _M_rep()->_M_set_length_and_sharable(__len);
20306 }
20307 return *this;
20308 }
20309
20310 template<typename _CharT, typename _Traits, typename _Alloc>
20311 basic_string<_CharT, _Traits, _Alloc>&
20312 basic_string<_CharT, _Traits, _Alloc>::
20313 append(const _CharT* __s, size_type __n)
20314 {
20315 ;
20316 if (__n)
20317 {
20318 _M_check_length(size_type(0), __n, "basic_string::append");
20319 const size_type __len = __n + this->size();
20320 if (__len > this->capacity() || _M_rep()->_M_is_shared())
20321 {
20322 if (_M_disjunct(__s))
20323 this->reserve(__len);
20324 else
20325 {
20326 const size_type __off = __s - _M_data();
20327 this->reserve(__len);
20328 __s = _M_data() + __off;
20329 }
20330 }
20331 _M_copy(_M_data() + this->size(), __s, __n);
20332 _M_rep()->_M_set_length_and_sharable(__len);
20333 }
20334 return *this;
20335 }
20336
20337 template<typename _CharT, typename _Traits, typename _Alloc>
20338 basic_string<_CharT, _Traits, _Alloc>&
20339 basic_string<_CharT, _Traits, _Alloc>::
20340 append(const basic_string& __str)
20341 {
20342 const size_type __size = __str.size();
20343 if (__size)
20344 {
20345 const size_type __len = __size + this->size();
20346 if (__len > this->capacity() || _M_rep()->_M_is_shared())
20347 this->reserve(__len);
20348 _M_copy(_M_data() + this->size(), __str._M_data(), __size);
20349 _M_rep()->_M_set_length_and_sharable(__len);
20350 }
20351 return *this;
20352 }
20353
20354 template<typename _CharT, typename _Traits, typename _Alloc>
20355 basic_string<_CharT, _Traits, _Alloc>&
20356 basic_string<_CharT, _Traits, _Alloc>::
20357 append(const basic_string& __str, size_type __pos, size_type __n)
20358 {
20359 __str._M_check(__pos, "basic_string::append");
20360 __n = __str._M_limit(__pos, __n);
20361 if (__n)
20362 {
20363 const size_type __len = __n + this->size();
20364 if (__len > this->capacity() || _M_rep()->_M_is_shared())
20365 this->reserve(__len);
20366 _M_copy(_M_data() + this->size(), __str._M_data() + __pos, __n);
20367 _M_rep()->_M_set_length_and_sharable(__len);
20368 }
20369 return *this;
20370 }
20371
20372 template<typename _CharT, typename _Traits, typename _Alloc>
20373 basic_string<_CharT, _Traits, _Alloc>&
20374 basic_string<_CharT, _Traits, _Alloc>::
20375 insert(size_type __pos, const _CharT* __s, size_type __n)
20376 {
20377 ;
20378 _M_check(__pos, "basic_string::insert");
20379 _M_check_length(size_type(0), __n, "basic_string::insert");
20380 if (_M_disjunct(__s) || _M_rep()->_M_is_shared())
20381 return _M_replace_safe(__pos, size_type(0), __s, __n);
20382 else
20383 {
20384
20385 const size_type __off = __s - _M_data();
20386 _M_mutate(__pos, 0, __n);
20387 __s = _M_data() + __off;
20388 _CharT* __p = _M_data() + __pos;
20389 if (__s + __n <= __p)
20390 _M_copy(__p, __s, __n);
20391 else if (__s >= __p)
20392 _M_copy(__p, __s + __n, __n);
20393 else
20394 {
20395 const size_type __nleft = __p - __s;
20396 _M_copy(__p, __s, __nleft);
20397 _M_copy(__p + __nleft, __p + __n, __n - __nleft);
20398 }
20399 return *this;
20400 }
20401 }
20402
20403 template<typename _CharT, typename _Traits, typename _Alloc>
20404 basic_string<_CharT, _Traits, _Alloc>&
20405 basic_string<_CharT, _Traits, _Alloc>::
20406 replace(size_type __pos, size_type __n1, const _CharT* __s,
20407 size_type __n2)
20408 {
20409 ;
20410 _M_check(__pos, "basic_string::replace");
20411 __n1 = _M_limit(__pos, __n1);
20412 _M_check_length(__n1, __n2, "basic_string::replace");
20413 bool __left;
20414 if (_M_disjunct(__s) || _M_rep()->_M_is_shared())
20415 return _M_replace_safe(__pos, __n1, __s, __n2);
20416 else if ((__left = __s + __n2 <= _M_data() + __pos)
20417 || _M_data() + __pos + __n1 <= __s)
20418 {
20419
20420 size_type __off = __s - _M_data();
20421 __left ? __off : (__off += __n2 - __n1);
20422 _M_mutate(__pos, __n1, __n2);
20423 _M_copy(_M_data() + __pos, _M_data() + __off, __n2);
20424 return *this;
20425 }
20426 else
20427 {
20428
20429 const basic_string __tmp(__s, __n2);
20430 return _M_replace_safe(__pos, __n1, __tmp._M_data(), __n2);
20431 }
20432 }
20433
20434 template<typename _CharT, typename _Traits, typename _Alloc>
20435 void
20436 basic_string<_CharT, _Traits, _Alloc>::_Rep::
20437 _M_destroy(const _Alloc& __a) throw ()
20438 {
20439 const size_type __size = sizeof(_Rep_base) +
20440 (this->_M_capacity + 1) * sizeof(_CharT);
20441 _Raw_bytes_alloc(__a).deallocate(reinterpret_cast<char*>(this), __size);
20442 }
20443
20444 template<typename _CharT, typename _Traits, typename _Alloc>
20445 void
20446 basic_string<_CharT, _Traits, _Alloc>::
20447 _M_leak_hard()
20448 {
20449
20450 if (_M_rep() == &_S_empty_rep())
20451 return;
20452
20453 if (_M_rep()->_M_is_shared())
20454 _M_mutate(0, 0, 0);
20455 _M_rep()->_M_set_leaked();
20456 }
20457
20458 template<typename _CharT, typename _Traits, typename _Alloc>
20459 void
20460 basic_string<_CharT, _Traits, _Alloc>::
20461 _M_mutate(size_type __pos, size_type __len1, size_type __len2)
20462 {
20463 const size_type __old_size = this->size();
20464 const size_type __new_size = __old_size + __len2 - __len1;
20465 const size_type __how_much = __old_size - __pos - __len1;
20466
20467 if (__new_size > this->capacity() || _M_rep()->_M_is_shared())
20468 {
20469
20470 const allocator_type __a = get_allocator();
20471 _Rep* __r = _Rep::_S_create(__new_size, this->capacity(), __a);
20472
20473 if (__pos)
20474 _M_copy(__r->_M_refdata(), _M_data(), __pos);
20475 if (__how_much)
20476 _M_copy(__r->_M_refdata() + __pos + __len2,
20477 _M_data() + __pos + __len1, __how_much);
20478
20479 _M_rep()->_M_dispose(__a);
20480 _M_data(__r->_M_refdata());
20481 }
20482 else if (__how_much && __len1 != __len2)
20483 {
20484
20485 _M_move(_M_data() + __pos + __len2,
20486 _M_data() + __pos + __len1, __how_much);
20487 }
20488 _M_rep()->_M_set_length_and_sharable(__new_size);
20489 }
20490
20491 template<typename _CharT, typename _Traits, typename _Alloc>
20492 void
20493 basic_string<_CharT, _Traits, _Alloc>::
20494 reserve(size_type __res)
20495 {
20496 if (__res != this->capacity() || _M_rep()->_M_is_shared())
20497 {
20498
20499 if (__res < this->size())
20500 __res = this->size();
20501 const allocator_type __a = get_allocator();
20502 _CharT* __tmp = _M_rep()->_M_clone(__a, __res - this->size());
20503 _M_rep()->_M_dispose(__a);
20504 _M_data(__tmp);
20505 }
20506 }
20507
20508 template<typename _CharT, typename _Traits, typename _Alloc>
20509 void
20510 basic_string<_CharT, _Traits, _Alloc>::
20511 swap(basic_string& __s)
20512 {
20513 if (_M_rep()->_M_is_leaked())
20514 _M_rep()->_M_set_sharable();
20515 if (__s._M_rep()->_M_is_leaked())
20516 __s._M_rep()->_M_set_sharable();
20517 if (this->get_allocator() == __s.get_allocator())
20518 {
20519 _CharT* __tmp = _M_data();
20520 _M_data(__s._M_data());
20521 __s._M_data(__tmp);
20522 }
20523
20524 else
20525 {
20526 const basic_string __tmp1(_M_ibegin(), _M_iend(),
20527 __s.get_allocator());
20528 const basic_string __tmp2(__s._M_ibegin(), __s._M_iend(),
20529 this->get_allocator());
20530 *this = __tmp2;
20531 __s = __tmp1;
20532 }
20533 }
20534
20535 template<typename _CharT, typename _Traits, typename _Alloc>
20536 typename basic_string<_CharT, _Traits, _Alloc>::_Rep*
20537 basic_string<_CharT, _Traits, _Alloc>::_Rep::
20538 _S_create(size_type __capacity, size_type __old_capacity,
20539 const _Alloc& __alloc)
20540 {
20541
20542
20543 if (__capacity > _S_max_size)
20544 __throw_length_error(("basic_string::_S_create"));
20545 # 559 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.tcc" 3
20546 const size_type __pagesize = 4096;
20547 const size_type __malloc_header_size = 4 * sizeof(void*);
20548
20549
20550
20551
20552
20553
20554
20555 if (__capacity > __old_capacity && __capacity < 2 * __old_capacity)
20556 __capacity = 2 * __old_capacity;
20557
20558
20559
20560
20561 size_type __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep);
20562
20563 const size_type __adj_size = __size + __malloc_header_size;
20564 if (__adj_size > __pagesize && __capacity > __old_capacity)
20565 {
20566 const size_type __extra = __pagesize - __adj_size % __pagesize;
20567 __capacity += __extra / sizeof(_CharT);
20568
20569 if (__capacity > _S_max_size)
20570 __capacity = _S_max_size;
20571 __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep);
20572 }
20573
20574
20575
20576 void* __place = _Raw_bytes_alloc(__alloc).allocate(__size);
20577 _Rep *__p = new (__place) _Rep;
20578 __p->_M_capacity = __capacity;
20579
20580
20581
20582
20583
20584
20585
20586 __p->_M_set_sharable();
20587 return __p;
20588 }
20589
20590 template<typename _CharT, typename _Traits, typename _Alloc>
20591 _CharT*
20592 basic_string<_CharT, _Traits, _Alloc>::_Rep::
20593 _M_clone(const _Alloc& __alloc, size_type __res)
20594 {
20595
20596 const size_type __requested_cap = this->_M_length + __res;
20597 _Rep* __r = _Rep::_S_create(__requested_cap, this->_M_capacity,
20598 __alloc);
20599 if (this->_M_length)
20600 _M_copy(__r->_M_refdata(), _M_refdata(), this->_M_length);
20601
20602 __r->_M_set_length_and_sharable(this->_M_length);
20603 return __r->_M_refdata();
20604 }
20605
20606 template<typename _CharT, typename _Traits, typename _Alloc>
20607 void
20608 basic_string<_CharT, _Traits, _Alloc>::
20609 resize(size_type __n, _CharT __c)
20610 {
20611 const size_type __size = this->size();
20612 _M_check_length(__size, __n, "basic_string::resize");
20613 if (__size < __n)
20614 this->append(__n - __size, __c);
20615 else if (__n < __size)
20616 this->erase(__n);
20617
20618 }
20619
20620 template<typename _CharT, typename _Traits, typename _Alloc>
20621 template<typename _InputIterator>
20622 basic_string<_CharT, _Traits, _Alloc>&
20623 basic_string<_CharT, _Traits, _Alloc>::
20624 _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1,
20625 _InputIterator __k2, __false_type)
20626 {
20627 const basic_string __s(__k1, __k2);
20628 const size_type __n1 = __i2 - __i1;
20629 _M_check_length(__n1, __s.size(), "basic_string::_M_replace_dispatch");
20630 return _M_replace_safe(__i1 - _M_ibegin(), __n1, __s._M_data(),
20631 __s.size());
20632 }
20633
20634 template<typename _CharT, typename _Traits, typename _Alloc>
20635 basic_string<_CharT, _Traits, _Alloc>&
20636 basic_string<_CharT, _Traits, _Alloc>::
20637 _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2,
20638 _CharT __c)
20639 {
20640 _M_check_length(__n1, __n2, "basic_string::_M_replace_aux");
20641 _M_mutate(__pos1, __n1, __n2);
20642 if (__n2)
20643 _M_assign(_M_data() + __pos1, __n2, __c);
20644 return *this;
20645 }
20646
20647 template<typename _CharT, typename _Traits, typename _Alloc>
20648 basic_string<_CharT, _Traits, _Alloc>&
20649 basic_string<_CharT, _Traits, _Alloc>::
20650 _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s,
20651 size_type __n2)
20652 {
20653 _M_mutate(__pos1, __n1, __n2);
20654 if (__n2)
20655 _M_copy(_M_data() + __pos1, __s, __n2);
20656 return *this;
20657 }
20658
20659 template<typename _CharT, typename _Traits, typename _Alloc>
20660 basic_string<_CharT, _Traits, _Alloc>
20661 operator+(const _CharT* __lhs,
20662 const basic_string<_CharT, _Traits, _Alloc>& __rhs)
20663 {
20664 ;
20665 typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
20666 typedef typename __string_type::size_type __size_type;
20667 const __size_type __len = _Traits::length(__lhs);
20668 __string_type __str;
20669 __str.reserve(__len + __rhs.size());
20670 __str.append(__lhs, __len);
20671 __str.append(__rhs);
20672 return __str;
20673 }
20674
20675 template<typename _CharT, typename _Traits, typename _Alloc>
20676 basic_string<_CharT, _Traits, _Alloc>
20677 operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs)
20678 {
20679 typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
20680 typedef typename __string_type::size_type __size_type;
20681 __string_type __str;
20682 const __size_type __len = __rhs.size();
20683 __str.reserve(__len + 1);
20684 __str.append(__size_type(1), __lhs);
20685 __str.append(__rhs);
20686 return __str;
20687 }
20688
20689 template<typename _CharT, typename _Traits, typename _Alloc>
20690 typename basic_string<_CharT, _Traits, _Alloc>::size_type
20691 basic_string<_CharT, _Traits, _Alloc>::
20692 copy(_CharT* __s, size_type __n, size_type __pos) const
20693 {
20694 _M_check(__pos, "basic_string::copy");
20695 __n = _M_limit(__pos, __n);
20696 ;
20697 if (__n)
20698 _M_copy(__s, _M_data() + __pos, __n);
20699
20700 return __n;
20701 }
20702
20703 template<typename _CharT, typename _Traits, typename _Alloc>
20704 typename basic_string<_CharT, _Traits, _Alloc>::size_type
20705 basic_string<_CharT, _Traits, _Alloc>::
20706 find(const _CharT* __s, size_type __pos, size_type __n) const
20707 {
20708 ;
20709 const size_type __size = this->size();
20710 const _CharT* __data = _M_data();
20711
20712 if (__n == 0)
20713 return __pos <= __size ? __pos : npos;
20714
20715 if (__n <= __size)
20716 {
20717 for (; __pos <= __size - __n; ++__pos)
20718 if (traits_type::eq(__data[__pos], __s[0])
20719 && traits_type::compare(__data + __pos + 1,
20720 __s + 1, __n - 1) == 0)
20721 return __pos;
20722 }
20723 return npos;
20724 }
20725
20726 template<typename _CharT, typename _Traits, typename _Alloc>
20727 typename basic_string<_CharT, _Traits, _Alloc>::size_type
20728 basic_string<_CharT, _Traits, _Alloc>::
20729 find(_CharT __c, size_type __pos) const
20730 {
20731 size_type __ret = npos;
20732 const size_type __size = this->size();
20733 if (__pos < __size)
20734 {
20735 const _CharT* __data = _M_data();
20736 const size_type __n = __size - __pos;
20737 const _CharT* __p = traits_type::find(__data + __pos, __n, __c);
20738 if (__p)
20739 __ret = __p - __data;
20740 }
20741 return __ret;
20742 }
20743
20744 template<typename _CharT, typename _Traits, typename _Alloc>
20745 typename basic_string<_CharT, _Traits, _Alloc>::size_type
20746 basic_string<_CharT, _Traits, _Alloc>::
20747 rfind(const _CharT* __s, size_type __pos, size_type __n) const
20748 {
20749 ;
20750 const size_type __size = this->size();
20751 if (__n <= __size)
20752 {
20753 __pos = std::min(size_type(__size - __n), __pos);
20754 const _CharT* __data = _M_data();
20755 do
20756 {
20757 if (traits_type::compare(__data + __pos, __s, __n) == 0)
20758 return __pos;
20759 }
20760 while (__pos-- > 0);
20761 }
20762 return npos;
20763 }
20764
20765 template<typename _CharT, typename _Traits, typename _Alloc>
20766 typename basic_string<_CharT, _Traits, _Alloc>::size_type
20767 basic_string<_CharT, _Traits, _Alloc>::
20768 rfind(_CharT __c, size_type __pos) const
20769 {
20770 size_type __size = this->size();
20771 if (__size)
20772 {
20773 if (--__size > __pos)
20774 __size = __pos;
20775 for (++__size; __size-- > 0; )
20776 if (traits_type::eq(_M_data()[__size], __c))
20777 return __size;
20778 }
20779 return npos;
20780 }
20781
20782 template<typename _CharT, typename _Traits, typename _Alloc>
20783 typename basic_string<_CharT, _Traits, _Alloc>::size_type
20784 basic_string<_CharT, _Traits, _Alloc>::
20785 find_first_of(const _CharT* __s, size_type __pos, size_type __n) const
20786 {
20787 ;
20788 for (; __n && __pos < this->size(); ++__pos)
20789 {
20790 const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]);
20791 if (__p)
20792 return __pos;
20793 }
20794 return npos;
20795 }
20796
20797 template<typename _CharT, typename _Traits, typename _Alloc>
20798 typename basic_string<_CharT, _Traits, _Alloc>::size_type
20799 basic_string<_CharT, _Traits, _Alloc>::
20800 find_last_of(const _CharT* __s, size_type __pos, size_type __n) const
20801 {
20802 ;
20803 size_type __size = this->size();
20804 if (__size && __n)
20805 {
20806 if (--__size > __pos)
20807 __size = __pos;
20808 do
20809 {
20810 if (traits_type::find(__s, __n, _M_data()[__size]))
20811 return __size;
20812 }
20813 while (__size-- != 0);
20814 }
20815 return npos;
20816 }
20817
20818 template<typename _CharT, typename _Traits, typename _Alloc>
20819 typename basic_string<_CharT, _Traits, _Alloc>::size_type
20820 basic_string<_CharT, _Traits, _Alloc>::
20821 find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const
20822 {
20823 ;
20824 for (; __pos < this->size(); ++__pos)
20825 if (!traits_type::find(__s, __n, _M_data()[__pos]))
20826 return __pos;
20827 return npos;
20828 }
20829
20830 template<typename _CharT, typename _Traits, typename _Alloc>
20831 typename basic_string<_CharT, _Traits, _Alloc>::size_type
20832 basic_string<_CharT, _Traits, _Alloc>::
20833 find_first_not_of(_CharT __c, size_type __pos) const
20834 {
20835 for (; __pos < this->size(); ++__pos)
20836 if (!traits_type::eq(_M_data()[__pos], __c))
20837 return __pos;
20838 return npos;
20839 }
20840
20841 template<typename _CharT, typename _Traits, typename _Alloc>
20842 typename basic_string<_CharT, _Traits, _Alloc>::size_type
20843 basic_string<_CharT, _Traits, _Alloc>::
20844 find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const
20845 {
20846 ;
20847 size_type __size = this->size();
20848 if (__size)
20849 {
20850 if (--__size > __pos)
20851 __size = __pos;
20852 do
20853 {
20854 if (!traits_type::find(__s, __n, _M_data()[__size]))
20855 return __size;
20856 }
20857 while (__size--);
20858 }
20859 return npos;
20860 }
20861
20862 template<typename _CharT, typename _Traits, typename _Alloc>
20863 typename basic_string<_CharT, _Traits, _Alloc>::size_type
20864 basic_string<_CharT, _Traits, _Alloc>::
20865 find_last_not_of(_CharT __c, size_type __pos) const
20866 {
20867 size_type __size = this->size();
20868 if (__size)
20869 {
20870 if (--__size > __pos)
20871 __size = __pos;
20872 do
20873 {
20874 if (!traits_type::eq(_M_data()[__size], __c))
20875 return __size;
20876 }
20877 while (__size--);
20878 }
20879 return npos;
20880 }
20881
20882 template<typename _CharT, typename _Traits, typename _Alloc>
20883 int
20884 basic_string<_CharT, _Traits, _Alloc>::
20885 compare(size_type __pos, size_type __n, const basic_string& __str) const
20886 {
20887 _M_check(__pos, "basic_string::compare");
20888 __n = _M_limit(__pos, __n);
20889 const size_type __osize = __str.size();
20890 const size_type __len = std::min(__n, __osize);
20891 int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len);
20892 if (!__r)
20893 __r = __n - __osize;
20894 return __r;
20895 }
20896
20897 template<typename _CharT, typename _Traits, typename _Alloc>
20898 int
20899 basic_string<_CharT, _Traits, _Alloc>::
20900 compare(size_type __pos1, size_type __n1, const basic_string& __str,
20901 size_type __pos2, size_type __n2) const
20902 {
20903 _M_check(__pos1, "basic_string::compare");
20904 __str._M_check(__pos2, "basic_string::compare");
20905 __n1 = _M_limit(__pos1, __n1);
20906 __n2 = __str._M_limit(__pos2, __n2);
20907 const size_type __len = std::min(__n1, __n2);
20908 int __r = traits_type::compare(_M_data() + __pos1,
20909 __str.data() + __pos2, __len);
20910 if (!__r)
20911 __r = __n1 - __n2;
20912 return __r;
20913 }
20914
20915 template<typename _CharT, typename _Traits, typename _Alloc>
20916 int
20917 basic_string<_CharT, _Traits, _Alloc>::
20918 compare(const _CharT* __s) const
20919 {
20920 ;
20921 const size_type __size = this->size();
20922 const size_type __osize = traits_type::length(__s);
20923 const size_type __len = std::min(__size, __osize);
20924 int __r = traits_type::compare(_M_data(), __s, __len);
20925 if (!__r)
20926 __r = __size - __osize;
20927 return __r;
20928 }
20929
20930 template<typename _CharT, typename _Traits, typename _Alloc>
20931 int
20932 basic_string <_CharT, _Traits, _Alloc>::
20933 compare(size_type __pos, size_type __n1, const _CharT* __s) const
20934 {
20935 ;
20936 _M_check(__pos, "basic_string::compare");
20937 __n1 = _M_limit(__pos, __n1);
20938 const size_type __osize = traits_type::length(__s);
20939 const size_type __len = std::min(__n1, __osize);
20940 int __r = traits_type::compare(_M_data() + __pos, __s, __len);
20941 if (!__r)
20942 __r = __n1 - __osize;
20943 return __r;
20944 }
20945
20946 template<typename _CharT, typename _Traits, typename _Alloc>
20947 int
20948 basic_string <_CharT, _Traits, _Alloc>::
20949 compare(size_type __pos, size_type __n1, const _CharT* __s,
20950 size_type __n2) const
20951 {
20952 ;
20953 _M_check(__pos, "basic_string::compare");
20954 __n1 = _M_limit(__pos, __n1);
20955 const size_type __len = std::min(__n1, __n2);
20956 int __r = traits_type::compare(_M_data() + __pos, __s, __len);
20957 if (!__r)
20958 __r = __n1 - __n2;
20959 return __r;
20960 }
20961
20962
20963
20964
20965
20966 extern template class basic_string<char>;
20967 extern template
20968 basic_istream<char>&
20969 operator>>(basic_istream<char>&, string&);
20970 extern template
20971 basic_ostream<char>&
20972 operator<<(basic_ostream<char>&, const string&);
20973 extern template
20974 basic_istream<char>&
20975 getline(basic_istream<char>&, string&, char);
20976 extern template
20977 basic_istream<char>&
20978 getline(basic_istream<char>&, string&);
20979
20980
20981 extern template class basic_string<wchar_t>;
20982 extern template
20983 basic_istream<wchar_t>&
20984 operator>>(basic_istream<wchar_t>&, wstring&);
20985 extern template
20986 basic_ostream<wchar_t>&
20987 operator<<(basic_ostream<wchar_t>&, const wstring&);
20988 extern template
20989 basic_istream<wchar_t>&
20990 getline(basic_istream<wchar_t>&, wstring&, wchar_t);
20991 extern template
20992 basic_istream<wchar_t>&
20993 getline(basic_istream<wchar_t>&, wstring&);
20994
20995
20996
20997 }
20998 # 59 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/string" 2 3
20999 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 2 3
21000
21001
21002 namespace std __attribute__ ((__visibility__ ("default"))) {
21003 # 66 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3
21004 class locale
21005 {
21006 public:
21007
21008
21009 typedef int category;
21010
21011
21012 class facet;
21013 class id;
21014 class _Impl;
21015
21016 friend class facet;
21017 friend class _Impl;
21018
21019 template<typename _Facet>
21020 friend bool
21021 has_facet(const locale&) throw();
21022
21023 template<typename _Facet>
21024 friend const _Facet&
21025 use_facet(const locale&);
21026
21027 template<typename _Cache>
21028 friend struct __use_cache;
21029 # 104 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3
21030 static const category none = 0;
21031 static const category ctype = 1L << 0;
21032 static const category numeric = 1L << 1;
21033 static const category collate = 1L << 2;
21034 static const category time = 1L << 3;
21035 static const category monetary = 1L << 4;
21036 static const category messages = 1L << 5;
21037 static const category all = (ctype | numeric | collate |
21038 time | monetary | messages);
21039 # 123 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3
21040 locale() throw();
21041 # 132 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3
21042 locale(const locale& __other) throw();
21043 # 142 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3
21044 explicit
21045 locale(const char* __s);
21046 # 157 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3
21047 locale(const locale& __base, const char* __s, category __cat);
21048 # 170 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3
21049 locale(const locale& __base, const locale& __add, category __cat);
21050 # 182 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3
21051 template<typename _Facet>
21052 locale(const locale& __other, _Facet* __f);
21053
21054
21055 ~locale() throw();
21056 # 196 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3
21057 const locale&
21058 operator=(const locale& __other) throw();
21059 # 211 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3
21060 template<typename _Facet>
21061 locale
21062 combine(const locale& __other) const;
21063
21064
21065
21066
21067
21068
21069 string
21070 name() const;
21071 # 230 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3
21072 bool
21073 operator==(const locale& __other) const throw ();
21074
21075
21076
21077
21078
21079
21080
21081 inline bool
21082 operator!=(const locale& __other) const throw ()
21083 { return !(this->operator==(__other)); }
21084 # 258 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3
21085 template<typename _Char, typename _Traits, typename _Alloc>
21086 bool
21087 operator()(const basic_string<_Char, _Traits, _Alloc>& __s1,
21088 const basic_string<_Char, _Traits, _Alloc>& __s2) const;
21089 # 274 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3
21090 static locale
21091 global(const locale&);
21092
21093
21094
21095
21096 static const locale&
21097 classic();
21098
21099 private:
21100
21101 _Impl* _M_impl;
21102
21103
21104 static _Impl* _S_classic;
21105
21106
21107 static _Impl* _S_global;
21108
21109
21110
21111
21112
21113 static const char* const* const _S_categories;
21114 # 309 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3
21115 enum { _S_categories_size = 6 + 6 };
21116
21117
21118 static __gthread_once_t _S_once;
21119
21120
21121 explicit
21122 locale(_Impl*) throw();
21123
21124 static void
21125 _S_initialize();
21126
21127 static void
21128 _S_initialize_once();
21129
21130 static category
21131 _S_normalize_category(category);
21132
21133 void
21134 _M_coalesce(const locale& __base, const locale& __add, category __cat);
21135 };
21136 # 342 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3
21137 class locale::facet
21138 {
21139 private:
21140 friend class locale;
21141 friend class locale::_Impl;
21142
21143 mutable _Atomic_word _M_refcount;
21144
21145
21146 static __c_locale _S_c_locale;
21147
21148
21149 static const char _S_c_name[2];
21150
21151
21152 static __gthread_once_t _S_once;
21153
21154
21155 static void
21156 _S_initialize_once();
21157
21158 protected:
21159 # 373 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3
21160 explicit
21161 facet(size_t __refs = 0) throw() : _M_refcount(__refs ? 1 : 0)
21162 { }
21163
21164
21165 virtual
21166 ~facet();
21167
21168 static void
21169 _S_create_c_locale(__c_locale& __cloc, const char* __s,
21170 __c_locale __old = 0);
21171
21172 static __c_locale
21173 _S_clone_c_locale(__c_locale& __cloc);
21174
21175 static void
21176 _S_destroy_c_locale(__c_locale& __cloc);
21177
21178
21179
21180 static __c_locale
21181 _S_get_c_locale();
21182
21183 static const char*
21184 _S_get_c_name();
21185
21186 private:
21187 inline void
21188 _M_add_reference() const throw()
21189 { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
21190
21191 inline void
21192 _M_remove_reference() const throw()
21193 {
21194 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1)
21195 {
21196 try
21197 { delete this; }
21198 catch (...)
21199 { }
21200 }
21201 }
21202
21203 facet(const facet&);
21204
21205 facet&
21206 operator=(const facet&);
21207 };
21208 # 433 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3
21209 class locale::id
21210 {
21211 private:
21212 friend class locale;
21213 friend class locale::_Impl;
21214
21215 template<typename _Facet>
21216 friend const _Facet&
21217 use_facet(const locale&);
21218
21219 template<typename _Facet>
21220 friend bool
21221 has_facet(const locale&) throw ();
21222
21223
21224
21225
21226 mutable size_t _M_index;
21227
21228
21229 static _Atomic_word _S_refcount;
21230
21231 void
21232 operator=(const id&);
21233
21234 id(const id&);
21235
21236 public:
21237
21238
21239
21240 id() { }
21241
21242 size_t
21243 _M_id() const;
21244 };
21245
21246
21247
21248 class locale::_Impl
21249 {
21250 public:
21251
21252 friend class locale;
21253 friend class locale::facet;
21254
21255 template<typename _Facet>
21256 friend bool
21257 has_facet(const locale&) throw();
21258
21259 template<typename _Facet>
21260 friend const _Facet&
21261 use_facet(const locale&);
21262
21263 template<typename _Cache>
21264 friend struct __use_cache;
21265
21266 private:
21267
21268 _Atomic_word _M_refcount;
21269 const facet** _M_facets;
21270 size_t _M_facets_size;
21271 const facet** _M_caches;
21272 char** _M_names;
21273 static const locale::id* const _S_id_ctype[];
21274 static const locale::id* const _S_id_numeric[];
21275 static const locale::id* const _S_id_collate[];
21276 static const locale::id* const _S_id_time[];
21277 static const locale::id* const _S_id_monetary[];
21278 static const locale::id* const _S_id_messages[];
21279 static const locale::id* const* const _S_facet_categories[];
21280
21281 inline void
21282 _M_add_reference() throw()
21283 { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
21284
21285 inline void
21286 _M_remove_reference() throw()
21287 {
21288 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1)
21289 {
21290 try
21291 { delete this; }
21292 catch(...)
21293 { }
21294 }
21295 }
21296
21297 _Impl(const _Impl&, size_t);
21298 _Impl(const char*, size_t);
21299 _Impl(size_t) throw();
21300
21301 ~_Impl() throw();
21302
21303 _Impl(const _Impl&);
21304
21305 void
21306 operator=(const _Impl&);
21307
21308 inline bool
21309 _M_check_same_name()
21310 {
21311 bool __ret = true;
21312 if (_M_names[1])
21313
21314 for (size_t __i = 0; __ret && __i < _S_categories_size - 1; ++__i)
21315 __ret = std::strcmp(_M_names[__i], _M_names[__i + 1]) == 0;
21316 return __ret;
21317 }
21318
21319 void
21320 _M_replace_categories(const _Impl*, category);
21321
21322 void
21323 _M_replace_category(const _Impl*, const locale::id* const*);
21324
21325 void
21326 _M_replace_facet(const _Impl*, const locale::id*);
21327
21328 void
21329 _M_install_facet(const locale::id*, const facet*);
21330
21331 template<typename _Facet>
21332 inline void
21333 _M_init_facet(_Facet* __facet)
21334 { _M_install_facet(&_Facet::id, __facet); }
21335
21336 void
21337 _M_install_cache(const facet*, size_t);
21338 };
21339
21340 template<typename _Facet>
21341 locale::locale(const locale& __other, _Facet* __f)
21342 {
21343 _M_impl = new _Impl(*__other._M_impl, 1);
21344
21345 try
21346 { _M_impl->_M_install_facet(&_Facet::id, __f); }
21347 catch(...)
21348 {
21349 _M_impl->_M_remove_reference();
21350 throw;
21351 }
21352 delete [] _M_impl->_M_names[0];
21353 _M_impl->_M_names[0] = 0;
21354 }
21355
21356 }
21357 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 2 3
21358
21359 namespace std __attribute__ ((__visibility__ ("default"))) {
21360
21361
21362
21363
21364
21365 enum _Ios_Fmtflags
21366 {
21367 _S_boolalpha = 1L << 0,
21368 _S_dec = 1L << 1,
21369 _S_fixed = 1L << 2,
21370 _S_hex = 1L << 3,
21371 _S_internal = 1L << 4,
21372 _S_left = 1L << 5,
21373 _S_oct = 1L << 6,
21374 _S_right = 1L << 7,
21375 _S_scientific = 1L << 8,
21376 _S_showbase = 1L << 9,
21377 _S_showpoint = 1L << 10,
21378 _S_showpos = 1L << 11,
21379 _S_skipws = 1L << 12,
21380 _S_unitbuf = 1L << 13,
21381 _S_uppercase = 1L << 14,
21382 _S_adjustfield = _S_left | _S_right | _S_internal,
21383 _S_basefield = _S_dec | _S_oct | _S_hex,
21384 _S_floatfield = _S_scientific | _S_fixed,
21385 _S_ios_fmtflags_end = 1L << 16
21386 };
21387
21388 inline _Ios_Fmtflags
21389 operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
21390 { return _Ios_Fmtflags(static_cast<int>(__a) & static_cast<int>(__b)); }
21391
21392 inline _Ios_Fmtflags
21393 operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
21394 { return _Ios_Fmtflags(static_cast<int>(__a) | static_cast<int>(__b)); }
21395
21396 inline _Ios_Fmtflags
21397 operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
21398 { return _Ios_Fmtflags(static_cast<int>(__a) ^ static_cast<int>(__b)); }
21399
21400 inline _Ios_Fmtflags&
21401 operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b)
21402 { return __a = __a | __b; }
21403
21404 inline _Ios_Fmtflags&
21405 operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b)
21406 { return __a = __a & __b; }
21407
21408 inline _Ios_Fmtflags&
21409 operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b)
21410 { return __a = __a ^ __b; }
21411
21412 inline _Ios_Fmtflags
21413 operator~(_Ios_Fmtflags __a)
21414 { return _Ios_Fmtflags(~static_cast<int>(__a)); }
21415
21416
21417 enum _Ios_Openmode
21418 {
21419 _S_app = 1L << 0,
21420 _S_ate = 1L << 1,
21421 _S_bin = 1L << 2,
21422 _S_in = 1L << 3,
21423 _S_out = 1L << 4,
21424 _S_trunc = 1L << 5,
21425 _S_ios_openmode_end = 1L << 16
21426 };
21427
21428 inline _Ios_Openmode
21429 operator&(_Ios_Openmode __a, _Ios_Openmode __b)
21430 { return _Ios_Openmode(static_cast<int>(__a) & static_cast<int>(__b)); }
21431
21432 inline _Ios_Openmode
21433 operator|(_Ios_Openmode __a, _Ios_Openmode __b)
21434 { return _Ios_Openmode(static_cast<int>(__a) | static_cast<int>(__b)); }
21435
21436 inline _Ios_Openmode
21437 operator^(_Ios_Openmode __a, _Ios_Openmode __b)
21438 { return _Ios_Openmode(static_cast<int>(__a) ^ static_cast<int>(__b)); }
21439
21440 inline _Ios_Openmode&
21441 operator|=(_Ios_Openmode& __a, _Ios_Openmode __b)
21442 { return __a = __a | __b; }
21443
21444 inline _Ios_Openmode&
21445 operator&=(_Ios_Openmode& __a, _Ios_Openmode __b)
21446 { return __a = __a & __b; }
21447
21448 inline _Ios_Openmode&
21449 operator^=(_Ios_Openmode& __a, _Ios_Openmode __b)
21450 { return __a = __a ^ __b; }
21451
21452 inline _Ios_Openmode
21453 operator~(_Ios_Openmode __a)
21454 { return _Ios_Openmode(~static_cast<int>(__a)); }
21455
21456
21457 enum _Ios_Iostate
21458 {
21459 _S_goodbit = 0,
21460 _S_badbit = 1L << 0,
21461 _S_eofbit = 1L << 1,
21462 _S_failbit = 1L << 2,
21463 _S_ios_iostate_end = 1L << 16
21464 };
21465
21466 inline _Ios_Iostate
21467 operator&(_Ios_Iostate __a, _Ios_Iostate __b)
21468 { return _Ios_Iostate(static_cast<int>(__a) & static_cast<int>(__b)); }
21469
21470 inline _Ios_Iostate
21471 operator|(_Ios_Iostate __a, _Ios_Iostate __b)
21472 { return _Ios_Iostate(static_cast<int>(__a) | static_cast<int>(__b)); }
21473
21474 inline _Ios_Iostate
21475 operator^(_Ios_Iostate __a, _Ios_Iostate __b)
21476 { return _Ios_Iostate(static_cast<int>(__a) ^ static_cast<int>(__b)); }
21477
21478 inline _Ios_Iostate&
21479 operator|=(_Ios_Iostate& __a, _Ios_Iostate __b)
21480 { return __a = __a | __b; }
21481
21482 inline _Ios_Iostate&
21483 operator&=(_Ios_Iostate& __a, _Ios_Iostate __b)
21484 { return __a = __a & __b; }
21485
21486 inline _Ios_Iostate&
21487 operator^=(_Ios_Iostate& __a, _Ios_Iostate __b)
21488 { return __a = __a ^ __b; }
21489
21490 inline _Ios_Iostate
21491 operator~(_Ios_Iostate __a)
21492 { return _Ios_Iostate(~static_cast<int>(__a)); }
21493
21494 enum _Ios_Seekdir
21495 {
21496 _S_beg = 0,
21497 _S_cur = 1,
21498 _S_end = 2,
21499 _S_ios_seekdir_end = 1L << 16
21500 };
21501 # 201 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3
21502 class ios_base
21503 {
21504 public:
21505
21506
21507
21508 class failure : public exception
21509 {
21510 public:
21511
21512
21513 explicit
21514 failure(const string& __str) throw();
21515
21516
21517
21518 virtual
21519 ~failure() throw();
21520
21521 virtual const char*
21522 what() const throw();
21523
21524 private:
21525 string _M_msg;
21526 };
21527 # 253 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3
21528 typedef _Ios_Fmtflags fmtflags;
21529
21530
21531 static const fmtflags boolalpha = _S_boolalpha;
21532
21533
21534 static const fmtflags dec = _S_dec;
21535
21536
21537 static const fmtflags fixed = _S_fixed;
21538
21539
21540 static const fmtflags hex = _S_hex;
21541
21542
21543
21544
21545 static const fmtflags internal = _S_internal;
21546
21547
21548
21549 static const fmtflags left = _S_left;
21550
21551
21552 static const fmtflags oct = _S_oct;
21553
21554
21555
21556 static const fmtflags right = _S_right;
21557
21558
21559 static const fmtflags scientific = _S_scientific;
21560
21561
21562
21563 static const fmtflags showbase = _S_showbase;
21564
21565
21566
21567 static const fmtflags showpoint = _S_showpoint;
21568
21569
21570 static const fmtflags showpos = _S_showpos;
21571
21572
21573 static const fmtflags skipws = _S_skipws;
21574
21575
21576 static const fmtflags unitbuf = _S_unitbuf;
21577
21578
21579
21580 static const fmtflags uppercase = _S_uppercase;
21581
21582
21583 static const fmtflags adjustfield = _S_adjustfield;
21584
21585
21586 static const fmtflags basefield = _S_basefield;
21587
21588
21589 static const fmtflags floatfield = _S_floatfield;
21590 # 328 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3
21591 typedef _Ios_Iostate iostate;
21592
21593
21594
21595 static const iostate badbit = _S_badbit;
21596
21597
21598 static const iostate eofbit = _S_eofbit;
21599
21600
21601
21602
21603 static const iostate failbit = _S_failbit;
21604
21605
21606 static const iostate goodbit = _S_goodbit;
21607 # 359 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3
21608 typedef _Ios_Openmode openmode;
21609
21610
21611 static const openmode app = _S_app;
21612
21613
21614 static const openmode ate = _S_ate;
21615
21616
21617
21618
21619
21620 static const openmode binary = _S_bin;
21621
21622
21623 static const openmode in = _S_in;
21624
21625
21626 static const openmode out = _S_out;
21627
21628
21629 static const openmode trunc = _S_trunc;
21630 # 392 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3
21631 typedef _Ios_Seekdir seekdir;
21632
21633
21634 static const seekdir beg = _S_beg;
21635
21636
21637 static const seekdir cur = _S_cur;
21638
21639
21640 static const seekdir end = _S_end;
21641
21642
21643 typedef int io_state;
21644 typedef int open_mode;
21645 typedef int seek_dir;
21646
21647 typedef std::streampos streampos;
21648 typedef std::streamoff streamoff;
21649 # 418 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3
21650 enum event
21651 {
21652 erase_event,
21653 imbue_event,
21654 copyfmt_event
21655 };
21656 # 435 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3
21657 typedef void (*event_callback) (event, ios_base&, int);
21658 # 447 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3
21659 void
21660 register_callback(event_callback __fn, int __index);
21661
21662 protected:
21663
21664
21665
21666
21667
21668
21669 streamsize _M_precision;
21670 streamsize _M_width;
21671 fmtflags _M_flags;
21672 iostate _M_exception;
21673 iostate _M_streambuf_state;
21674
21675
21676
21677
21678 struct _Callback_list
21679 {
21680
21681 _Callback_list* _M_next;
21682 ios_base::event_callback _M_fn;
21683 int _M_index;
21684 _Atomic_word _M_refcount;
21685
21686 _Callback_list(ios_base::event_callback __fn, int __index,
21687 _Callback_list* __cb)
21688 : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { }
21689
21690 void
21691 _M_add_reference() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
21692
21693
21694 int
21695 _M_remove_reference()
21696 { return __gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1); }
21697 };
21698
21699 _Callback_list* _M_callbacks;
21700
21701 void
21702 _M_call_callbacks(event __ev) throw();
21703
21704 void
21705 _M_dispose_callbacks(void);
21706
21707
21708 struct _Words
21709 {
21710 void* _M_pword;
21711 long _M_iword;
21712 _Words() : _M_pword(0), _M_iword(0) { }
21713 };
21714
21715
21716 _Words _M_word_zero;
21717
21718
21719
21720 enum { _S_local_word_size = 8 };
21721 _Words _M_local_word[_S_local_word_size];
21722
21723
21724 int _M_word_size;
21725 _Words* _M_word;
21726
21727 _Words&
21728 _M_grow_words(int __index, bool __iword);
21729
21730
21731 locale _M_ios_locale;
21732
21733 void
21734 _M_init();
21735
21736 public:
21737
21738
21739
21740
21741
21742 class Init
21743 {
21744 friend class ios_base;
21745 public:
21746 Init();
21747 ~Init();
21748
21749 private:
21750 static _Atomic_word _S_refcount;
21751 static bool _S_synced_with_stdio;
21752 };
21753
21754
21755
21756
21757
21758
21759 inline fmtflags
21760 flags() const { return _M_flags; }
21761 # 557 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3
21762 inline fmtflags
21763 flags(fmtflags __fmtfl)
21764 {
21765 fmtflags __old = _M_flags;
21766 _M_flags = __fmtfl;
21767 return __old;
21768 }
21769 # 573 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3
21770 inline fmtflags
21771 setf(fmtflags __fmtfl)
21772 {
21773 fmtflags __old = _M_flags;
21774 _M_flags |= __fmtfl;
21775 return __old;
21776 }
21777 # 590 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3
21778 inline fmtflags
21779 setf(fmtflags __fmtfl, fmtflags __mask)
21780 {
21781 fmtflags __old = _M_flags;
21782 _M_flags &= ~__mask;
21783 _M_flags |= (__fmtfl & __mask);
21784 return __old;
21785 }
21786
21787
21788
21789
21790
21791
21792
21793 inline void
21794 unsetf(fmtflags __mask) { _M_flags &= ~__mask; }
21795 # 617 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3
21796 inline streamsize
21797 precision() const { return _M_precision; }
21798
21799
21800
21801
21802
21803
21804 inline streamsize
21805 precision(streamsize __prec)
21806 {
21807 streamsize __old = _M_precision;
21808 _M_precision = __prec;
21809 return __old;
21810 }
21811
21812
21813
21814
21815
21816
21817
21818 inline streamsize
21819 width() const { return _M_width; }
21820
21821
21822
21823
21824
21825
21826 inline streamsize
21827 width(streamsize __wide)
21828 {
21829 streamsize __old = _M_width;
21830 _M_width = __wide;
21831 return __old;
21832 }
21833 # 666 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3
21834 static bool
21835 sync_with_stdio(bool __sync = true);
21836 # 678 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3
21837 locale
21838 imbue(const locale& __loc);
21839 # 689 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3
21840 inline locale
21841 getloc() const { return _M_ios_locale; }
21842 # 699 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3
21843 inline const locale&
21844 _M_getloc() const { return _M_ios_locale; }
21845 # 717 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3
21846 static int
21847 xalloc() throw();
21848 # 733 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3
21849 inline long&
21850 iword(int __ix)
21851 {
21852 _Words& __word = (__ix < _M_word_size)
21853 ? _M_word[__ix] : _M_grow_words(__ix, true);
21854 return __word._M_iword;
21855 }
21856 # 754 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3
21857 inline void*&
21858 pword(int __ix)
21859 {
21860 _Words& __word = (__ix < _M_word_size)
21861 ? _M_word[__ix] : _M_grow_words(__ix, false);
21862 return __word._M_pword;
21863 }
21864 # 771 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3
21865 virtual ~ios_base();
21866
21867 protected:
21868 ios_base();
21869
21870
21871
21872 private:
21873 ios_base(const ios_base&);
21874
21875 ios_base&
21876 operator=(const ios_base&);
21877 };
21878
21879
21880
21881 inline ios_base&
21882 boolalpha(ios_base& __base)
21883 {
21884 __base.setf(ios_base::boolalpha);
21885 return __base;
21886 }
21887
21888
21889 inline ios_base&
21890 noboolalpha(ios_base& __base)
21891 {
21892 __base.unsetf(ios_base::boolalpha);
21893 return __base;
21894 }
21895
21896
21897 inline ios_base&
21898 showbase(ios_base& __base)
21899 {
21900 __base.setf(ios_base::showbase);
21901 return __base;
21902 }
21903
21904
21905 inline ios_base&
21906 noshowbase(ios_base& __base)
21907 {
21908 __base.unsetf(ios_base::showbase);
21909 return __base;
21910 }
21911
21912
21913 inline ios_base&
21914 showpoint(ios_base& __base)
21915 {
21916 __base.setf(ios_base::showpoint);
21917 return __base;
21918 }
21919
21920
21921 inline ios_base&
21922 noshowpoint(ios_base& __base)
21923 {
21924 __base.unsetf(ios_base::showpoint);
21925 return __base;
21926 }
21927
21928
21929 inline ios_base&
21930 showpos(ios_base& __base)
21931 {
21932 __base.setf(ios_base::showpos);
21933 return __base;
21934 }
21935
21936
21937 inline ios_base&
21938 noshowpos(ios_base& __base)
21939 {
21940 __base.unsetf(ios_base::showpos);
21941 return __base;
21942 }
21943
21944
21945 inline ios_base&
21946 skipws(ios_base& __base)
21947 {
21948 __base.setf(ios_base::skipws);
21949 return __base;
21950 }
21951
21952
21953 inline ios_base&
21954 noskipws(ios_base& __base)
21955 {
21956 __base.unsetf(ios_base::skipws);
21957 return __base;
21958 }
21959
21960
21961 inline ios_base&
21962 uppercase(ios_base& __base)
21963 {
21964 __base.setf(ios_base::uppercase);
21965 return __base;
21966 }
21967
21968
21969 inline ios_base&
21970 nouppercase(ios_base& __base)
21971 {
21972 __base.unsetf(ios_base::uppercase);
21973 return __base;
21974 }
21975
21976
21977 inline ios_base&
21978 unitbuf(ios_base& __base)
21979 {
21980 __base.setf(ios_base::unitbuf);
21981 return __base;
21982 }
21983
21984
21985 inline ios_base&
21986 nounitbuf(ios_base& __base)
21987 {
21988 __base.unsetf(ios_base::unitbuf);
21989 return __base;
21990 }
21991
21992
21993
21994 inline ios_base&
21995 internal(ios_base& __base)
21996 {
21997 __base.setf(ios_base::internal, ios_base::adjustfield);
21998 return __base;
21999 }
22000
22001
22002 inline ios_base&
22003 left(ios_base& __base)
22004 {
22005 __base.setf(ios_base::left, ios_base::adjustfield);
22006 return __base;
22007 }
22008
22009
22010 inline ios_base&
22011 right(ios_base& __base)
22012 {
22013 __base.setf(ios_base::right, ios_base::adjustfield);
22014 return __base;
22015 }
22016
22017
22018
22019 inline ios_base&
22020 dec(ios_base& __base)
22021 {
22022 __base.setf(ios_base::dec, ios_base::basefield);
22023 return __base;
22024 }
22025
22026
22027 inline ios_base&
22028 hex(ios_base& __base)
22029 {
22030 __base.setf(ios_base::hex, ios_base::basefield);
22031 return __base;
22032 }
22033
22034
22035 inline ios_base&
22036 oct(ios_base& __base)
22037 {
22038 __base.setf(ios_base::oct, ios_base::basefield);
22039 return __base;
22040 }
22041
22042
22043
22044 inline ios_base&
22045 fixed(ios_base& __base)
22046 {
22047 __base.setf(ios_base::fixed, ios_base::floatfield);
22048 return __base;
22049 }
22050
22051
22052 inline ios_base&
22053 scientific(ios_base& __base)
22054 {
22055 __base.setf(ios_base::scientific, ios_base::floatfield);
22056 return __base;
22057 }
22058
22059 }
22060 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ios" 2 3
22061 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 1 3
22062 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22063
22064 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22065 # 51 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22066 namespace std __attribute__ ((__visibility__ ("default"))) {
22067
22068
22069
22070
22071
22072
22073 template<typename _CharT, typename _Traits>
22074 streamsize
22075 __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*,
22076 basic_streambuf<_CharT, _Traits>*, bool&);
22077 # 123 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22078 template<typename _CharT, typename _Traits>
22079 class basic_streambuf
22080 {
22081 public:
22082
22083
22084
22085
22086
22087
22088 typedef _CharT char_type;
22089 typedef _Traits traits_type;
22090 typedef typename traits_type::int_type int_type;
22091 typedef typename traits_type::pos_type pos_type;
22092 typedef typename traits_type::off_type off_type;
22093 # 146 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22094 typedef basic_streambuf<char_type, traits_type> __streambuf_type;
22095
22096
22097 friend class basic_ios<char_type, traits_type>;
22098 friend class basic_istream<char_type, traits_type>;
22099 friend class basic_ostream<char_type, traits_type>;
22100 friend class istreambuf_iterator<char_type, traits_type>;
22101 friend class ostreambuf_iterator<char_type, traits_type>;
22102
22103 friend streamsize
22104 __copy_streambufs_eof<>(__streambuf_type*, __streambuf_type*, bool&);
22105
22106 template<typename _CharT2>
22107 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
22108 _CharT2*>::__type
22109 __copy_aux(istreambuf_iterator<_CharT2>,
22110 istreambuf_iterator<_CharT2>, _CharT2*);
22111
22112 template<typename _CharT2>
22113 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
22114 istreambuf_iterator<_CharT2> >::__type
22115 find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>,
22116 const _CharT2&);
22117
22118 template<typename _CharT2, typename _Traits2>
22119 friend basic_istream<_CharT2, _Traits2>&
22120 operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*);
22121
22122 template<typename _CharT2, typename _Traits2, typename _Alloc>
22123 friend basic_istream<_CharT2, _Traits2>&
22124 operator>>(basic_istream<_CharT2, _Traits2>&,
22125 basic_string<_CharT2, _Traits2, _Alloc>&);
22126
22127 template<typename _CharT2, typename _Traits2, typename _Alloc>
22128 friend basic_istream<_CharT2, _Traits2>&
22129 getline(basic_istream<_CharT2, _Traits2>&,
22130 basic_string<_CharT2, _Traits2, _Alloc>&, _CharT2);
22131
22132 protected:
22133 # 195 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22134 char_type* _M_in_beg;
22135 char_type* _M_in_cur;
22136 char_type* _M_in_end;
22137 char_type* _M_out_beg;
22138 char_type* _M_out_cur;
22139 char_type* _M_out_end;
22140
22141
22142
22143
22144
22145
22146 locale _M_buf_locale;
22147
22148 public:
22149
22150 virtual
22151 ~basic_streambuf()
22152 { }
22153 # 223 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22154 locale
22155 pubimbue(const locale &__loc)
22156 {
22157 locale __tmp(this->getloc());
22158 this->imbue(__loc);
22159 _M_buf_locale = __loc;
22160 return __tmp;
22161 }
22162 # 240 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22163 locale
22164 getloc() const
22165 { return _M_buf_locale; }
22166 # 253 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22167 __streambuf_type*
22168 pubsetbuf(char_type* __s, streamsize __n)
22169 { return this->setbuf(__s, __n); }
22170
22171 pos_type
22172 pubseekoff(off_type __off, ios_base::seekdir __way,
22173 ios_base::openmode __mode = ios_base::in | ios_base::out)
22174 { return this->seekoff(__off, __way, __mode); }
22175
22176 pos_type
22177 pubseekpos(pos_type __sp,
22178 ios_base::openmode __mode = ios_base::in | ios_base::out)
22179 { return this->seekpos(__sp, __mode); }
22180
22181 int
22182 pubsync() { return this->sync(); }
22183 # 280 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22184 streamsize
22185 in_avail()
22186 {
22187 const streamsize __ret = this->egptr() - this->gptr();
22188 return __ret ? __ret : this->showmanyc();
22189 }
22190 # 294 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22191 int_type
22192 snextc()
22193 {
22194 int_type __ret = traits_type::eof();
22195 if (__builtin_expect(!traits_type::eq_int_type(this->sbumpc(),
22196 __ret), true))
22197 __ret = this->sgetc();
22198 return __ret;
22199 }
22200 # 312 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22201 int_type
22202 sbumpc()
22203 {
22204 int_type __ret;
22205 if (__builtin_expect(this->gptr() < this->egptr(), true))
22206 {
22207 __ret = traits_type::to_int_type(*this->gptr());
22208 this->gbump(1);
22209 }
22210 else
22211 __ret = this->uflow();
22212 return __ret;
22213 }
22214 # 334 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22215 int_type
22216 sgetc()
22217 {
22218 int_type __ret;
22219 if (__builtin_expect(this->gptr() < this->egptr(), true))
22220 __ret = traits_type::to_int_type(*this->gptr());
22221 else
22222 __ret = this->underflow();
22223 return __ret;
22224 }
22225 # 353 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22226 streamsize
22227 sgetn(char_type* __s, streamsize __n)
22228 { return this->xsgetn(__s, __n); }
22229 # 367 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22230 int_type
22231 sputbackc(char_type __c)
22232 {
22233 int_type __ret;
22234 const bool __testpos = this->eback() < this->gptr();
22235 if (__builtin_expect(!__testpos ||
22236 !traits_type::eq(__c, this->gptr()[-1]), false))
22237 __ret = this->pbackfail(traits_type::to_int_type(__c));
22238 else
22239 {
22240 this->gbump(-1);
22241 __ret = traits_type::to_int_type(*this->gptr());
22242 }
22243 return __ret;
22244 }
22245 # 392 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22246 int_type
22247 sungetc()
22248 {
22249 int_type __ret;
22250 if (__builtin_expect(this->eback() < this->gptr(), true))
22251 {
22252 this->gbump(-1);
22253 __ret = traits_type::to_int_type(*this->gptr());
22254 }
22255 else
22256 __ret = this->pbackfail();
22257 return __ret;
22258 }
22259 # 419 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22260 int_type
22261 sputc(char_type __c)
22262 {
22263 int_type __ret;
22264 if (__builtin_expect(this->pptr() < this->epptr(), true))
22265 {
22266 *this->pptr() = __c;
22267 this->pbump(1);
22268 __ret = traits_type::to_int_type(__c);
22269 }
22270 else
22271 __ret = this->overflow(traits_type::to_int_type(__c));
22272 return __ret;
22273 }
22274 # 445 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22275 streamsize
22276 sputn(const char_type* __s, streamsize __n)
22277 { return this->xsputn(__s, __n); }
22278
22279 protected:
22280 # 459 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22281 basic_streambuf()
22282 : _M_in_beg(0), _M_in_cur(0), _M_in_end(0),
22283 _M_out_beg(0), _M_out_cur(0), _M_out_end(0),
22284 _M_buf_locale(locale())
22285 { }
22286 # 477 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22287 char_type*
22288 eback() const { return _M_in_beg; }
22289
22290 char_type*
22291 gptr() const { return _M_in_cur; }
22292
22293 char_type*
22294 egptr() const { return _M_in_end; }
22295 # 493 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22296 void
22297 gbump(int __n) { _M_in_cur += __n; }
22298 # 504 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22299 void
22300 setg(char_type* __gbeg, char_type* __gnext, char_type* __gend)
22301 {
22302 _M_in_beg = __gbeg;
22303 _M_in_cur = __gnext;
22304 _M_in_end = __gend;
22305 }
22306 # 524 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22307 char_type*
22308 pbase() const { return _M_out_beg; }
22309
22310 char_type*
22311 pptr() const { return _M_out_cur; }
22312
22313 char_type*
22314 epptr() const { return _M_out_end; }
22315 # 540 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22316 void
22317 pbump(int __n) { _M_out_cur += __n; }
22318 # 550 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22319 void
22320 setp(char_type* __pbeg, char_type* __pend)
22321 {
22322 _M_out_beg = _M_out_cur = __pbeg;
22323 _M_out_end = __pend;
22324 }
22325 # 571 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22326 virtual void
22327 imbue(const locale&)
22328 { }
22329 # 586 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22330 virtual basic_streambuf<char_type,_Traits>*
22331 setbuf(char_type*, streamsize)
22332 { return this; }
22333 # 597 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22334 virtual pos_type
22335 seekoff(off_type, ios_base::seekdir,
22336 ios_base::openmode = ios_base::in | ios_base::out)
22337 { return pos_type(off_type(-1)); }
22338 # 609 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22339 virtual pos_type
22340 seekpos(pos_type,
22341 ios_base::openmode = ios_base::in | ios_base::out)
22342 { return pos_type(off_type(-1)); }
22343 # 622 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22344 virtual int
22345 sync() { return 0; }
22346 # 644 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22347 virtual streamsize
22348 showmanyc() { return 0; }
22349 # 660 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22350 virtual streamsize
22351 xsgetn(char_type* __s, streamsize __n);
22352 # 682 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22353 virtual int_type
22354 underflow()
22355 { return traits_type::eof(); }
22356 # 695 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22357 virtual int_type
22358 uflow()
22359 {
22360 int_type __ret = traits_type::eof();
22361 const bool __testeof = traits_type::eq_int_type(this->underflow(),
22362 __ret);
22363 if (!__testeof)
22364 {
22365 __ret = traits_type::to_int_type(*this->gptr());
22366 this->gbump(1);
22367 }
22368 return __ret;
22369 }
22370 # 719 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22371 virtual int_type
22372 pbackfail(int_type = traits_type::eof())
22373 { return traits_type::eof(); }
22374 # 737 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22375 virtual streamsize
22376 xsputn(const char_type* __s, streamsize __n);
22377 # 762 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22378 virtual int_type
22379 overflow(int_type = traits_type::eof())
22380 { return traits_type::eof(); }
22381 # 791 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3
22382 private:
22383
22384
22385 basic_streambuf(const __streambuf_type& __sb)
22386 : _M_in_beg(__sb._M_in_beg), _M_in_cur(__sb._M_in_cur),
22387 _M_in_end(__sb._M_in_end), _M_out_beg(__sb._M_out_beg),
22388 _M_out_cur(__sb._M_out_cur), _M_out_end(__sb._M_out_cur),
22389 _M_buf_locale(__sb._M_buf_locale)
22390 { }
22391
22392 __streambuf_type&
22393 operator=(const __streambuf_type&) { return *this; };
22394 };
22395
22396
22397 template<>
22398 streamsize
22399 __copy_streambufs_eof(basic_streambuf<char>* __sbin,
22400 basic_streambuf<char>* __sbout, bool& __ineof);
22401
22402 template<>
22403 streamsize
22404 __copy_streambufs_eof(basic_streambuf<wchar_t>* __sbin,
22405 basic_streambuf<wchar_t>* __sbout, bool& __ineof);
22406
22407
22408 }
22409
22410
22411 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/streambuf.tcc" 1 3
22412 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/streambuf.tcc" 3
22413
22414 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/streambuf.tcc" 3
22415
22416 namespace std __attribute__ ((__visibility__ ("default"))) {
22417
22418 template<typename _CharT, typename _Traits>
22419 streamsize
22420 basic_streambuf<_CharT, _Traits>::
22421 xsgetn(char_type* __s, streamsize __n)
22422 {
22423 streamsize __ret = 0;
22424 while (__ret < __n)
22425 {
22426 const streamsize __buf_len = this->egptr() - this->gptr();
22427 if (__buf_len)
22428 {
22429 const streamsize __remaining = __n - __ret;
22430 const streamsize __len = std::min(__buf_len, __remaining);
22431 traits_type::copy(__s, this->gptr(), __len);
22432 __ret += __len;
22433 __s += __len;
22434 this->gbump(__len);
22435 }
22436
22437 if (__ret < __n)
22438 {
22439 const int_type __c = this->uflow();
22440 if (!traits_type::eq_int_type(__c, traits_type::eof()))
22441 {
22442 traits_type::assign(*__s++, traits_type::to_char_type(__c));
22443 ++__ret;
22444 }
22445 else
22446 break;
22447 }
22448 }
22449 return __ret;
22450 }
22451
22452 template<typename _CharT, typename _Traits>
22453 streamsize
22454 basic_streambuf<_CharT, _Traits>::
22455 xsputn(const char_type* __s, streamsize __n)
22456 {
22457 streamsize __ret = 0;
22458 while (__ret < __n)
22459 {
22460 const streamsize __buf_len = this->epptr() - this->pptr();
22461 if (__buf_len)
22462 {
22463 const streamsize __remaining = __n - __ret;
22464 const streamsize __len = std::min(__buf_len, __remaining);
22465 traits_type::copy(this->pptr(), __s, __len);
22466 __ret += __len;
22467 __s += __len;
22468 this->pbump(__len);
22469 }
22470
22471 if (__ret < __n)
22472 {
22473 int_type __c = this->overflow(traits_type::to_int_type(*__s));
22474 if (!traits_type::eq_int_type(__c, traits_type::eof()))
22475 {
22476 ++__ret;
22477 ++__s;
22478 }
22479 else
22480 break;
22481 }
22482 }
22483 return __ret;
22484 }
22485
22486
22487
22488
22489 template<typename _CharT, typename _Traits>
22490 streamsize
22491 __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>* __sbin,
22492 basic_streambuf<_CharT, _Traits>* __sbout,
22493 bool& __ineof)
22494 {
22495 streamsize __ret = 0;
22496 __ineof = true;
22497 typename _Traits::int_type __c = __sbin->sgetc();
22498 while (!_Traits::eq_int_type(__c, _Traits::eof()))
22499 {
22500 __c = __sbout->sputc(_Traits::to_char_type(__c));
22501 if (_Traits::eq_int_type(__c, _Traits::eof()))
22502 {
22503 __ineof = false;
22504 break;
22505 }
22506 ++__ret;
22507 __c = __sbin->snextc();
22508 }
22509 return __ret;
22510 }
22511
22512 template<typename _CharT, typename _Traits>
22513 inline streamsize
22514 __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin,
22515 basic_streambuf<_CharT, _Traits>* __sbout)
22516 {
22517 bool __ineof;
22518 return __copy_streambufs_eof(__sbin, __sbout, __ineof);
22519 }
22520
22521
22522
22523
22524
22525 extern template class basic_streambuf<char>;
22526 extern template
22527 streamsize
22528 __copy_streambufs(basic_streambuf<char>*,
22529 basic_streambuf<char>*);
22530 extern template
22531 streamsize
22532 __copy_streambufs_eof(basic_streambuf<char>*,
22533 basic_streambuf<char>*, bool&);
22534
22535
22536 extern template class basic_streambuf<wchar_t>;
22537 extern template
22538 streamsize
22539 __copy_streambufs(basic_streambuf<wchar_t>*,
22540 basic_streambuf<wchar_t>*);
22541 extern template
22542 streamsize
22543 __copy_streambufs_eof(basic_streambuf<wchar_t>*,
22544 basic_streambuf<wchar_t>*, bool&);
22545
22546
22547
22548 }
22549 # 821 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 2 3
22550 # 50 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ios" 2 3
22551 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 1 3
22552 # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3
22553
22554 # 40 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3
22555
22556 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/streambuf_iterator.h" 1 3
22557 # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/streambuf_iterator.h" 3
22558
22559 # 40 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/streambuf_iterator.h" 3
22560
22561
22562
22563
22564 namespace std __attribute__ ((__visibility__ ("default"))) {
22565
22566
22567
22568 template<typename _CharT, typename _Traits>
22569 class istreambuf_iterator
22570 : public iterator<input_iterator_tag, _CharT, typename _Traits::off_type,
22571 _CharT*, _CharT&>
22572 {
22573 public:
22574
22575
22576
22577 typedef _CharT char_type;
22578 typedef _Traits traits_type;
22579 typedef typename _Traits::int_type int_type;
22580 typedef basic_streambuf<_CharT, _Traits> streambuf_type;
22581 typedef basic_istream<_CharT, _Traits> istream_type;
22582
22583
22584 template<typename _CharT2>
22585 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
22586 ostreambuf_iterator<_CharT2> >::__type
22587 copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>,
22588 ostreambuf_iterator<_CharT2>);
22589
22590 template<typename _CharT2>
22591 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
22592 _CharT2*>::__type
22593 __copy_aux(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>,
22594 _CharT2*);
22595
22596 template<typename _CharT2>
22597 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
22598 istreambuf_iterator<_CharT2> >::__type
22599 find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>,
22600 const _CharT2&);
22601
22602 private:
22603
22604
22605
22606
22607
22608
22609
22610 mutable streambuf_type* _M_sbuf;
22611 mutable int_type _M_c;
22612
22613 public:
22614
22615 istreambuf_iterator() throw()
22616 : _M_sbuf(0), _M_c(traits_type::eof()) { }
22617
22618
22619 istreambuf_iterator(istream_type& __s) throw()
22620 : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { }
22621
22622
22623 istreambuf_iterator(streambuf_type* __s) throw()
22624 : _M_sbuf(__s), _M_c(traits_type::eof()) { }
22625
22626
22627
22628
22629 char_type
22630 operator*() const
22631 {
22632
22633
22634
22635
22636
22637
22638
22639 return traits_type::to_char_type(_M_get());
22640 }
22641
22642
22643 istreambuf_iterator&
22644 operator++()
22645 {
22646 ;
22647
22648
22649 if (_M_sbuf)
22650 {
22651 _M_sbuf->sbumpc();
22652 _M_c = traits_type::eof();
22653 }
22654 return *this;
22655 }
22656
22657
22658 istreambuf_iterator
22659 operator++(int)
22660 {
22661 ;
22662
22663
22664
22665 istreambuf_iterator __old = *this;
22666 if (_M_sbuf)
22667 {
22668 __old._M_c = _M_sbuf->sbumpc();
22669 _M_c = traits_type::eof();
22670 }
22671 return __old;
22672 }
22673
22674
22675
22676
22677
22678 bool
22679 equal(const istreambuf_iterator& __b) const
22680 {
22681 const bool __thiseof = _M_at_eof();
22682 const bool __beof = __b._M_at_eof();
22683 return (__thiseof && __beof || (!__thiseof && !__beof));
22684 }
22685
22686 private:
22687 int_type
22688 _M_get() const
22689 {
22690 const int_type __eof = traits_type::eof();
22691 int_type __ret = __eof;
22692 if (_M_sbuf)
22693 {
22694 if (!traits_type::eq_int_type(_M_c, __eof))
22695 __ret = _M_c;
22696 else if (!traits_type::eq_int_type((__ret = _M_sbuf->sgetc()),
22697 __eof))
22698 _M_c = __ret;
22699 else
22700 _M_sbuf = 0;
22701 }
22702 return __ret;
22703 }
22704
22705 bool
22706 _M_at_eof() const
22707 {
22708 const int_type __eof = traits_type::eof();
22709 return traits_type::eq_int_type(_M_get(), __eof);
22710 }
22711 };
22712
22713 template<typename _CharT, typename _Traits>
22714 inline bool
22715 operator==(const istreambuf_iterator<_CharT, _Traits>& __a,
22716 const istreambuf_iterator<_CharT, _Traits>& __b)
22717 { return __a.equal(__b); }
22718
22719 template<typename _CharT, typename _Traits>
22720 inline bool
22721 operator!=(const istreambuf_iterator<_CharT, _Traits>& __a,
22722 const istreambuf_iterator<_CharT, _Traits>& __b)
22723 { return !__a.equal(__b); }
22724
22725
22726 template<typename _CharT, typename _Traits>
22727 class ostreambuf_iterator
22728 : public iterator<output_iterator_tag, void, void, void, void>
22729 {
22730 public:
22731
22732
22733
22734 typedef _CharT char_type;
22735 typedef _Traits traits_type;
22736 typedef basic_streambuf<_CharT, _Traits> streambuf_type;
22737 typedef basic_ostream<_CharT, _Traits> ostream_type;
22738
22739
22740 template<typename _CharT2>
22741 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
22742 ostreambuf_iterator<_CharT2> >::__type
22743 copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>,
22744 ostreambuf_iterator<_CharT2>);
22745
22746 private:
22747 streambuf_type* _M_sbuf;
22748 bool _M_failed;
22749
22750 public:
22751
22752 ostreambuf_iterator(ostream_type& __s) throw ()
22753 : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { }
22754
22755
22756 ostreambuf_iterator(streambuf_type* __s) throw ()
22757 : _M_sbuf(__s), _M_failed(!_M_sbuf) { }
22758
22759
22760 ostreambuf_iterator&
22761 operator=(_CharT __c)
22762 {
22763 if (!_M_failed &&
22764 _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof()))
22765 _M_failed = true;
22766 return *this;
22767 }
22768
22769
22770 ostreambuf_iterator&
22771 operator*()
22772 { return *this; }
22773
22774
22775 ostreambuf_iterator&
22776 operator++(int)
22777 { return *this; }
22778
22779
22780 ostreambuf_iterator&
22781 operator++()
22782 { return *this; }
22783
22784
22785 bool
22786 failed() const throw()
22787 { return _M_failed; }
22788
22789 ostreambuf_iterator&
22790 _M_put(const _CharT* __ws, streamsize __len)
22791 {
22792 if (__builtin_expect(!_M_failed, true)
22793 && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len,
22794 false))
22795 _M_failed = true;
22796 return *this;
22797 }
22798 };
22799
22800
22801 template<typename _CharT>
22802 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
22803 ostreambuf_iterator<_CharT> >::__type
22804 copy(istreambuf_iterator<_CharT> __first,
22805 istreambuf_iterator<_CharT> __last,
22806 ostreambuf_iterator<_CharT> __result)
22807 {
22808 if (__first._M_sbuf && !__last._M_sbuf && !__result._M_failed)
22809 {
22810 bool __ineof;
22811 __copy_streambufs_eof(__first._M_sbuf, __result._M_sbuf, __ineof);
22812 if (!__ineof)
22813 __result._M_failed = true;
22814 }
22815 return __result;
22816 }
22817
22818 template<typename _CharT>
22819 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
22820 ostreambuf_iterator<_CharT> >::__type
22821 __copy_aux(_CharT* __first, _CharT* __last,
22822 ostreambuf_iterator<_CharT> __result)
22823 {
22824 const streamsize __num = __last - __first;
22825 if (__num > 0)
22826 __result._M_put(__first, __num);
22827 return __result;
22828 }
22829
22830 template<typename _CharT>
22831 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
22832 ostreambuf_iterator<_CharT> >::__type
22833 __copy_aux(const _CharT* __first, const _CharT* __last,
22834 ostreambuf_iterator<_CharT> __result)
22835 {
22836 const streamsize __num = __last - __first;
22837 if (__num > 0)
22838 __result._M_put(__first, __num);
22839 return __result;
22840 }
22841
22842 template<typename _CharT>
22843 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
22844 _CharT*>::__type
22845 __copy_aux(istreambuf_iterator<_CharT> __first,
22846 istreambuf_iterator<_CharT> __last, _CharT* __result)
22847 {
22848 typedef istreambuf_iterator<_CharT> __is_iterator_type;
22849 typedef typename __is_iterator_type::traits_type traits_type;
22850 typedef typename __is_iterator_type::streambuf_type streambuf_type;
22851 typedef typename traits_type::int_type int_type;
22852
22853 if (__first._M_sbuf && !__last._M_sbuf)
22854 {
22855 streambuf_type* __sb = __first._M_sbuf;
22856 int_type __c = __sb->sgetc();
22857 while (!traits_type::eq_int_type(__c, traits_type::eof()))
22858 {
22859 const streamsize __n = __sb->egptr() - __sb->gptr();
22860 if (__n > 1)
22861 {
22862 traits_type::copy(__result, __sb->gptr(), __n);
22863 __sb->gbump(__n);
22864 __result += __n;
22865 __c = __sb->underflow();
22866 }
22867 else
22868 {
22869 *__result++ = traits_type::to_char_type(__c);
22870 __c = __sb->snextc();
22871 }
22872 }
22873 }
22874 return __result;
22875 }
22876
22877 template<typename _CharT>
22878 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
22879 istreambuf_iterator<_CharT> >::__type
22880 find(istreambuf_iterator<_CharT> __first,
22881 istreambuf_iterator<_CharT> __last, const _CharT& __val)
22882 {
22883 typedef istreambuf_iterator<_CharT> __is_iterator_type;
22884 typedef typename __is_iterator_type::traits_type traits_type;
22885 typedef typename __is_iterator_type::streambuf_type streambuf_type;
22886 typedef typename traits_type::int_type int_type;
22887
22888 if (__first._M_sbuf && !__last._M_sbuf)
22889 {
22890 const int_type __ival = traits_type::to_int_type(__val);
22891 streambuf_type* __sb = __first._M_sbuf;
22892 int_type __c = __sb->sgetc();
22893 while (!traits_type::eq_int_type(__c, traits_type::eof())
22894 && !traits_type::eq_int_type(__c, __ival))
22895 {
22896 streamsize __n = __sb->egptr() - __sb->gptr();
22897 if (__n > 1)
22898 {
22899 const _CharT* __p = traits_type::find(__sb->gptr(),
22900 __n, __val);
22901 if (__p)
22902 __n = __p - __sb->gptr();
22903 __sb->gbump(__n);
22904 __c = __sb->sgetc();
22905 }
22906 else
22907 __c = __sb->snextc();
22908 }
22909
22910 if (!traits_type::eq_int_type(__c, traits_type::eof()))
22911 __first._M_c = __c;
22912 else
22913 __first._M_sbuf = 0;
22914 }
22915 return __first;
22916 }
22917
22918 }
22919 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 2 3
22920
22921
22922 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 1 3
22923 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
22924
22925 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
22926
22927
22928 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cwctype" 1 3
22929 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cwctype" 3
22930
22931 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cwctype" 3
22932
22933
22934
22935
22936 # 1 "/usr/include/wctype.h" 1 3 4
22937 # 35 "/usr/include/wctype.h" 3 4
22938 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4
22939 # 36 "/usr/include/wctype.h" 2 3 4
22940 # 45 "/usr/include/wctype.h" 3 4
22941
22942 # 63 "/usr/include/wctype.h" 3 4
22943
22944
22945
22946 typedef unsigned long int wctype_t;
22947
22948 # 85 "/usr/include/wctype.h" 3 4
22949 enum
22950 {
22951 __ISwupper = 0,
22952 __ISwlower = 1,
22953 __ISwalpha = 2,
22954 __ISwdigit = 3,
22955 __ISwxdigit = 4,
22956 __ISwspace = 5,
22957 __ISwprint = 6,
22958 __ISwgraph = 7,
22959 __ISwblank = 8,
22960 __ISwcntrl = 9,
22961 __ISwpunct = 10,
22962 __ISwalnum = 11,
22963
22964 _ISwupper = (1 << (__ISwupper)),
22965 _ISwlower = (1 << (__ISwlower)),
22966 _ISwalpha = (1 << (__ISwalpha)),
22967 _ISwdigit = (1 << (__ISwdigit)),
22968 _ISwxdigit = (1 << (__ISwxdigit)),
22969 _ISwspace = (1 << (__ISwspace)),
22970 _ISwprint = (1 << (__ISwprint)),
22971 _ISwgraph = (1 << (__ISwgraph)),
22972 _ISwblank = (1 << (__ISwblank)),
22973 _ISwcntrl = (1 << (__ISwcntrl)),
22974 _ISwpunct = (1 << (__ISwpunct)),
22975 _ISwalnum = (1 << (__ISwalnum))
22976 };
22977
22978
22979
22980 extern "C" {
22981
22982
22983
22984
22985
22986
22987
22988
22989 extern int iswalnum (wint_t __wc) throw ();
22990
22991
22992
22993
22994
22995 extern int iswalpha (wint_t __wc) throw ();
22996
22997
22998 extern int iswcntrl (wint_t __wc) throw ();
22999
23000
23001
23002 extern int iswdigit (wint_t __wc) throw ();
23003
23004
23005
23006 extern int iswgraph (wint_t __wc) throw ();
23007
23008
23009
23010
23011 extern int iswlower (wint_t __wc) throw ();
23012
23013
23014 extern int iswprint (wint_t __wc) throw ();
23015
23016
23017
23018
23019 extern int iswpunct (wint_t __wc) throw ();
23020
23021
23022
23023
23024 extern int iswspace (wint_t __wc) throw ();
23025
23026
23027
23028
23029 extern int iswupper (wint_t __wc) throw ();
23030
23031
23032
23033
23034 extern int iswxdigit (wint_t __wc) throw ();
23035
23036
23037
23038
23039
23040 extern int iswblank (wint_t __wc) throw ();
23041 # 185 "/usr/include/wctype.h" 3 4
23042 extern wctype_t wctype (__const char *__property) throw ();
23043
23044
23045
23046 extern int iswctype (wint_t __wc, wctype_t __desc) throw ();
23047
23048
23049
23050
23051
23052
23053
23054
23055
23056
23057 typedef __const __int32_t *wctrans_t;
23058
23059
23060
23061
23062
23063
23064
23065 extern wint_t towlower (wint_t __wc) throw ();
23066
23067
23068 extern wint_t towupper (wint_t __wc) throw ();
23069
23070
23071 }
23072 # 227 "/usr/include/wctype.h" 3 4
23073 extern "C" {
23074
23075
23076
23077
23078 extern wctrans_t wctrans (__const char *__property) throw ();
23079
23080
23081 extern wint_t towctrans (wint_t __wc, wctrans_t __desc) throw ();
23082
23083
23084
23085
23086
23087
23088
23089
23090 extern int iswalnum_l (wint_t __wc, __locale_t __locale) throw ();
23091
23092
23093
23094
23095
23096 extern int iswalpha_l (wint_t __wc, __locale_t __locale) throw ();
23097
23098
23099 extern int iswcntrl_l (wint_t __wc, __locale_t __locale) throw ();
23100
23101
23102
23103 extern int iswdigit_l (wint_t __wc, __locale_t __locale) throw ();
23104
23105
23106
23107 extern int iswgraph_l (wint_t __wc, __locale_t __locale) throw ();
23108
23109
23110
23111
23112 extern int iswlower_l (wint_t __wc, __locale_t __locale) throw ();
23113
23114
23115 extern int iswprint_l (wint_t __wc, __locale_t __locale) throw ();
23116
23117
23118
23119
23120 extern int iswpunct_l (wint_t __wc, __locale_t __locale) throw ();
23121
23122
23123
23124
23125 extern int iswspace_l (wint_t __wc, __locale_t __locale) throw ();
23126
23127
23128
23129
23130 extern int iswupper_l (wint_t __wc, __locale_t __locale) throw ();
23131
23132
23133
23134
23135 extern int iswxdigit_l (wint_t __wc, __locale_t __locale) throw ();
23136
23137
23138
23139
23140 extern int iswblank_l (wint_t __wc, __locale_t __locale) throw ();
23141
23142
23143
23144 extern wctype_t wctype_l (__const char *__property, __locale_t __locale)
23145 throw ();
23146
23147
23148
23149 extern int iswctype_l (wint_t __wc, wctype_t __desc, __locale_t __locale)
23150 throw ();
23151
23152
23153
23154
23155
23156
23157
23158 extern wint_t towlower_l (wint_t __wc, __locale_t __locale) throw ();
23159
23160
23161 extern wint_t towupper_l (wint_t __wc, __locale_t __locale) throw ();
23162
23163
23164
23165 extern wctrans_t wctrans_l (__const char *__property, __locale_t __locale)
23166 throw ();
23167
23168
23169 extern wint_t towctrans_l (wint_t __wc, wctrans_t __desc,
23170 __locale_t __locale) throw ();
23171
23172
23173
23174 }
23175 # 54 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cwctype" 2 3
23176 # 80 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cwctype" 3
23177 namespace std __attribute__ ((__visibility__ ("default"))) {
23178
23179 using ::wint_t;
23180
23181 using ::wctype_t;
23182 using ::wctrans_t;
23183
23184 using ::iswalnum;
23185 using ::iswalpha;
23186
23187 using ::iswblank;
23188
23189 using ::iswcntrl;
23190 using ::iswctype;
23191 using ::iswdigit;
23192 using ::iswgraph;
23193 using ::iswlower;
23194 using ::iswprint;
23195 using ::iswpunct;
23196 using ::iswspace;
23197 using ::iswupper;
23198 using ::iswxdigit;
23199 using ::towctrans;
23200 using ::towlower;
23201 using ::towupper;
23202 using ::wctrans;
23203 using ::wctype;
23204
23205 }
23206 # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 2 3
23207 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/ctype_base.h" 1 3
23208 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/ctype_base.h" 3
23209 namespace std __attribute__ ((__visibility__ ("default"))) {
23210
23211
23212 struct ctype_base
23213 {
23214
23215 typedef const int* __to_type;
23216
23217
23218
23219 typedef unsigned short mask;
23220 static const mask upper = _ISupper;
23221 static const mask lower = _ISlower;
23222 static const mask alpha = _ISalpha;
23223 static const mask digit = _ISdigit;
23224 static const mask xdigit = _ISxdigit;
23225 static const mask space = _ISspace;
23226 static const mask print = _ISprint;
23227 static const mask graph = _ISalpha | _ISdigit | _ISpunct;
23228 static const mask cntrl = _IScntrl;
23229 static const mask punct = _ISpunct;
23230 static const mask alnum = _ISalpha | _ISdigit;
23231 };
23232
23233 }
23234 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 2 3
23235
23236
23237
23238
23239
23240 namespace std __attribute__ ((__visibility__ ("default"))) {
23241 # 65 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23242 template<typename _Tv>
23243 void
23244 __convert_to_v(const char* __in, _Tv& __out, ios_base::iostate& __err,
23245 const __c_locale& __cloc);
23246
23247
23248 template<>
23249 void
23250 __convert_to_v(const char*, float&, ios_base::iostate&,
23251 const __c_locale&);
23252
23253 template<>
23254 void
23255 __convert_to_v(const char*, double&, ios_base::iostate&,
23256 const __c_locale&);
23257
23258 template<>
23259 void
23260 __convert_to_v(const char*, long double&, ios_base::iostate&,
23261 const __c_locale&);
23262
23263
23264
23265 template<typename _CharT, typename _Traits>
23266 struct __pad
23267 {
23268 static void
23269 _S_pad(ios_base& __io, _CharT __fill, _CharT* __news,
23270 const _CharT* __olds, const streamsize __newlen,
23271 const streamsize __oldlen, const bool __num);
23272 };
23273
23274
23275
23276
23277
23278
23279 template<typename _CharT>
23280 _CharT*
23281 __add_grouping(_CharT* __s, _CharT __sep,
23282 const char* __gbeg, size_t __gsize,
23283 const _CharT* __first, const _CharT* __last);
23284
23285
23286
23287
23288 template<typename _CharT>
23289 inline
23290 ostreambuf_iterator<_CharT>
23291 __write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int __len)
23292 {
23293 __s._M_put(__ws, __len);
23294 return __s;
23295 }
23296
23297
23298 template<typename _CharT, typename _OutIter>
23299 inline
23300 _OutIter
23301 __write(_OutIter __s, const _CharT* __ws, int __len)
23302 {
23303 for (int __j = 0; __j < __len; __j++, ++__s)
23304 *__s = __ws[__j];
23305 return __s;
23306 }
23307 # 145 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23308 template<typename _CharT>
23309 class __ctype_abstract_base : public locale::facet, public ctype_base
23310 {
23311 public:
23312
23313
23314 typedef _CharT char_type;
23315 # 163 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23316 bool
23317 is(mask __m, char_type __c) const
23318 { return this->do_is(__m, __c); }
23319 # 180 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23320 const char_type*
23321 is(const char_type *__lo, const char_type *__hi, mask *__vec) const
23322 { return this->do_is(__lo, __hi, __vec); }
23323 # 196 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23324 const char_type*
23325 scan_is(mask __m, const char_type* __lo, const char_type* __hi) const
23326 { return this->do_scan_is(__m, __lo, __hi); }
23327 # 212 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23328 const char_type*
23329 scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
23330 { return this->do_scan_not(__m, __lo, __hi); }
23331 # 226 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23332 char_type
23333 toupper(char_type __c) const
23334 { return this->do_toupper(__c); }
23335 # 241 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23336 const char_type*
23337 toupper(char_type *__lo, const char_type* __hi) const
23338 { return this->do_toupper(__lo, __hi); }
23339 # 255 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23340 char_type
23341 tolower(char_type __c) const
23342 { return this->do_tolower(__c); }
23343 # 270 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23344 const char_type*
23345 tolower(char_type* __lo, const char_type* __hi) const
23346 { return this->do_tolower(__lo, __hi); }
23347 # 287 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23348 char_type
23349 widen(char __c) const
23350 { return this->do_widen(__c); }
23351 # 306 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23352 const char*
23353 widen(const char* __lo, const char* __hi, char_type* __to) const
23354 { return this->do_widen(__lo, __hi, __to); }
23355 # 325 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23356 char
23357 narrow(char_type __c, char __dfault) const
23358 { return this->do_narrow(__c, __dfault); }
23359 # 347 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23360 const char_type*
23361 narrow(const char_type* __lo, const char_type* __hi,
23362 char __dfault, char *__to) const
23363 { return this->do_narrow(__lo, __hi, __dfault, __to); }
23364
23365 protected:
23366 explicit
23367 __ctype_abstract_base(size_t __refs = 0): facet(__refs) { }
23368
23369 virtual
23370 ~__ctype_abstract_base() { }
23371 # 372 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23372 virtual bool
23373 do_is(mask __m, char_type __c) const = 0;
23374 # 391 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23375 virtual const char_type*
23376 do_is(const char_type* __lo, const char_type* __hi,
23377 mask* __vec) const = 0;
23378 # 410 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23379 virtual const char_type*
23380 do_scan_is(mask __m, const char_type* __lo,
23381 const char_type* __hi) const = 0;
23382 # 429 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23383 virtual const char_type*
23384 do_scan_not(mask __m, const char_type* __lo,
23385 const char_type* __hi) const = 0;
23386 # 447 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23387 virtual char_type
23388 do_toupper(char_type) const = 0;
23389 # 464 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23390 virtual const char_type*
23391 do_toupper(char_type* __lo, const char_type* __hi) const = 0;
23392 # 480 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23393 virtual char_type
23394 do_tolower(char_type) const = 0;
23395 # 497 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23396 virtual const char_type*
23397 do_tolower(char_type* __lo, const char_type* __hi) const = 0;
23398 # 516 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23399 virtual char_type
23400 do_widen(char) const = 0;
23401 # 537 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23402 virtual const char*
23403 do_widen(const char* __lo, const char* __hi,
23404 char_type* __dest) const = 0;
23405 # 559 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23406 virtual char
23407 do_narrow(char_type, char __dfault) const = 0;
23408 # 583 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23409 virtual const char_type*
23410 do_narrow(const char_type* __lo, const char_type* __hi,
23411 char __dfault, char* __dest) const = 0;
23412 };
23413 # 606 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23414 template<typename _CharT>
23415 class ctype : public __ctype_abstract_base<_CharT>
23416 {
23417 public:
23418
23419 typedef _CharT char_type;
23420 typedef typename __ctype_abstract_base<_CharT>::mask mask;
23421
23422
23423 static locale::id id;
23424
23425 explicit
23426 ctype(size_t __refs = 0) : __ctype_abstract_base<_CharT>(__refs) { }
23427
23428 protected:
23429 virtual
23430 ~ctype();
23431
23432 virtual bool
23433 do_is(mask __m, char_type __c) const;
23434
23435 virtual const char_type*
23436 do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const;
23437
23438 virtual const char_type*
23439 do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const;
23440
23441 virtual const char_type*
23442 do_scan_not(mask __m, const char_type* __lo,
23443 const char_type* __hi) const;
23444
23445 virtual char_type
23446 do_toupper(char_type __c) const;
23447
23448 virtual const char_type*
23449 do_toupper(char_type* __lo, const char_type* __hi) const;
23450
23451 virtual char_type
23452 do_tolower(char_type __c) const;
23453
23454 virtual const char_type*
23455 do_tolower(char_type* __lo, const char_type* __hi) const;
23456
23457 virtual char_type
23458 do_widen(char __c) const;
23459
23460 virtual const char*
23461 do_widen(const char* __lo, const char* __hi, char_type* __dest) const;
23462
23463 virtual char
23464 do_narrow(char_type, char __dfault) const;
23465
23466 virtual const char_type*
23467 do_narrow(const char_type* __lo, const char_type* __hi,
23468 char __dfault, char* __dest) const;
23469 };
23470
23471 template<typename _CharT>
23472 locale::id ctype<_CharT>::id;
23473 # 675 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23474 template<>
23475 class ctype<char> : public locale::facet, public ctype_base
23476 {
23477 public:
23478
23479
23480 typedef char char_type;
23481
23482 protected:
23483
23484 __c_locale _M_c_locale_ctype;
23485 bool _M_del;
23486 __to_type _M_toupper;
23487 __to_type _M_tolower;
23488 const mask* _M_table;
23489 mutable char _M_widen_ok;
23490 mutable char _M_widen[1 + static_cast<unsigned char>(-1)];
23491 mutable char _M_narrow[1 + static_cast<unsigned char>(-1)];
23492 mutable char _M_narrow_ok;
23493
23494
23495 public:
23496
23497 static locale::id id;
23498
23499 static const size_t table_size = 1 + static_cast<unsigned char>(-1);
23500 # 712 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23501 explicit
23502 ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0);
23503 # 725 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23504 explicit
23505 ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false,
23506 size_t __refs = 0);
23507 # 738 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23508 inline bool
23509 is(mask __m, char __c) const;
23510 # 753 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23511 inline const char*
23512 is(const char* __lo, const char* __hi, mask* __vec) const;
23513 # 767 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23514 inline const char*
23515 scan_is(mask __m, const char* __lo, const char* __hi) const;
23516 # 781 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23517 inline const char*
23518 scan_not(mask __m, const char* __lo, const char* __hi) const;
23519 # 796 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23520 char_type
23521 toupper(char_type __c) const
23522 { return this->do_toupper(__c); }
23523 # 813 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23524 const char_type*
23525 toupper(char_type *__lo, const char_type* __hi) const
23526 { return this->do_toupper(__lo, __hi); }
23527 # 829 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23528 char_type
23529 tolower(char_type __c) const
23530 { return this->do_tolower(__c); }
23531 # 846 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23532 const char_type*
23533 tolower(char_type* __lo, const char_type* __hi) const
23534 { return this->do_tolower(__lo, __hi); }
23535 # 866 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23536 char_type
23537 widen(char __c) const
23538 {
23539 if (_M_widen_ok)
23540 return _M_widen[static_cast<unsigned char>(__c)];
23541 this->_M_widen_init();
23542 return this->do_widen(__c);
23543 }
23544 # 893 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23545 const char*
23546 widen(const char* __lo, const char* __hi, char_type* __to) const
23547 {
23548 if (_M_widen_ok == 1)
23549 {
23550 memcpy(__to, __lo, __hi - __lo);
23551 return __hi;
23552 }
23553 if (!_M_widen_ok)
23554 _M_widen_init();
23555 return this->do_widen(__lo, __hi, __to);
23556 }
23557 # 924 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23558 char
23559 narrow(char_type __c, char __dfault) const
23560 {
23561 if (_M_narrow[static_cast<unsigned char>(__c)])
23562 return _M_narrow[static_cast<unsigned char>(__c)];
23563 const char __t = do_narrow(__c, __dfault);
23564 if (__t != __dfault)
23565 _M_narrow[static_cast<unsigned char>(__c)] = __t;
23566 return __t;
23567 }
23568 # 957 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23569 const char_type*
23570 narrow(const char_type* __lo, const char_type* __hi,
23571 char __dfault, char *__to) const
23572 {
23573 if (__builtin_expect(_M_narrow_ok == 1, true))
23574 {
23575 memcpy(__to, __lo, __hi - __lo);
23576 return __hi;
23577 }
23578 if (!_M_narrow_ok)
23579 _M_narrow_init();
23580 return this->do_narrow(__lo, __hi, __dfault, __to);
23581 }
23582
23583 protected:
23584
23585
23586 const mask*
23587 table() const throw()
23588 { return _M_table; }
23589
23590
23591 static const mask*
23592 classic_table() throw();
23593
23594
23595
23596
23597
23598
23599
23600 virtual
23601 ~ctype();
23602 # 1004 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23603 virtual char_type
23604 do_toupper(char_type) const;
23605 # 1021 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23606 virtual const char_type*
23607 do_toupper(char_type* __lo, const char_type* __hi) const;
23608 # 1037 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23609 virtual char_type
23610 do_tolower(char_type) const;
23611 # 1054 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23612 virtual const char_type*
23613 do_tolower(char_type* __lo, const char_type* __hi) const;
23614 # 1074 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23615 virtual char_type
23616 do_widen(char __c) const
23617 { return __c; }
23618 # 1097 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23619 virtual const char*
23620 do_widen(const char* __lo, const char* __hi, char_type* __dest) const
23621 {
23622 memcpy(__dest, __lo, __hi - __lo);
23623 return __hi;
23624 }
23625 # 1123 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23626 virtual char
23627 do_narrow(char_type __c, char) const
23628 { return __c; }
23629 # 1149 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23630 virtual const char_type*
23631 do_narrow(const char_type* __lo, const char_type* __hi,
23632 char, char* __dest) const
23633 {
23634 memcpy(__dest, __lo, __hi - __lo);
23635 return __hi;
23636 }
23637
23638 private:
23639
23640 void _M_widen_init() const
23641 {
23642 char __tmp[sizeof(_M_widen)];
23643 for (size_t __i = 0; __i < sizeof(_M_widen); ++__i)
23644 __tmp[__i] = __i;
23645 do_widen(__tmp, __tmp + sizeof(__tmp), _M_widen);
23646
23647 _M_widen_ok = 1;
23648
23649 if (memcmp(__tmp, _M_widen, sizeof(_M_widen)))
23650 _M_widen_ok = 2;
23651 }
23652
23653
23654
23655
23656 void _M_narrow_init() const
23657 {
23658 char __tmp[sizeof(_M_narrow)];
23659 for (size_t __i = 0; __i < sizeof(_M_narrow); ++__i)
23660 __tmp[__i] = __i;
23661 do_narrow(__tmp, __tmp + sizeof(__tmp), 0, _M_narrow);
23662
23663 _M_narrow_ok = 1;
23664 if (memcmp(__tmp, _M_narrow, sizeof(_M_narrow)))
23665 _M_narrow_ok = 2;
23666 else
23667 {
23668
23669
23670 char __c;
23671 do_narrow(__tmp, __tmp + 1, 1, &__c);
23672 if (__c == 1)
23673 _M_narrow_ok = 2;
23674 }
23675 }
23676 };
23677
23678 template<>
23679 const ctype<char>&
23680 use_facet<ctype<char> >(const locale& __loc);
23681 # 1213 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23682 template<>
23683 class ctype<wchar_t> : public __ctype_abstract_base<wchar_t>
23684 {
23685 public:
23686
23687
23688 typedef wchar_t char_type;
23689 typedef wctype_t __wmask_type;
23690
23691 protected:
23692 __c_locale _M_c_locale_ctype;
23693
23694
23695 bool _M_narrow_ok;
23696 char _M_narrow[128];
23697 wint_t _M_widen[1 + static_cast<unsigned char>(-1)];
23698
23699
23700 mask _M_bit[16];
23701 __wmask_type _M_wmask[16];
23702
23703 public:
23704
23705
23706 static locale::id id;
23707 # 1246 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23708 explicit
23709 ctype(size_t __refs = 0);
23710 # 1257 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23711 explicit
23712 ctype(__c_locale __cloc, size_t __refs = 0);
23713
23714 protected:
23715 __wmask_type
23716 _M_convert_to_wmask(const mask __m) const;
23717
23718
23719 virtual
23720 ~ctype();
23721 # 1281 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23722 virtual bool
23723 do_is(mask __m, char_type __c) const;
23724 # 1300 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23725 virtual const char_type*
23726 do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const;
23727 # 1318 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23728 virtual const char_type*
23729 do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const;
23730 # 1336 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23731 virtual const char_type*
23732 do_scan_not(mask __m, const char_type* __lo,
23733 const char_type* __hi) const;
23734 # 1353 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23735 virtual char_type
23736 do_toupper(char_type) const;
23737 # 1370 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23738 virtual const char_type*
23739 do_toupper(char_type* __lo, const char_type* __hi) const;
23740 # 1386 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23741 virtual char_type
23742 do_tolower(char_type) const;
23743 # 1403 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23744 virtual const char_type*
23745 do_tolower(char_type* __lo, const char_type* __hi) const;
23746 # 1423 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23747 virtual char_type
23748 do_widen(char) const;
23749 # 1445 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23750 virtual const char*
23751 do_widen(const char* __lo, const char* __hi, char_type* __dest) const;
23752 # 1468 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23753 virtual char
23754 do_narrow(char_type, char __dfault) const;
23755 # 1494 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
23756 virtual const char_type*
23757 do_narrow(const char_type* __lo, const char_type* __hi,
23758 char __dfault, char* __dest) const;
23759
23760
23761 void
23762 _M_initialize_ctype();
23763 };
23764
23765 template<>
23766 const ctype<wchar_t>&
23767 use_facet<ctype<wchar_t> >(const locale& __loc);
23768
23769
23770
23771 template<typename _CharT>
23772 class ctype_byname : public ctype<_CharT>
23773 {
23774 public:
23775 typedef _CharT char_type;
23776
23777 explicit
23778 ctype_byname(const char* __s, size_t __refs = 0);
23779
23780 protected:
23781 virtual
23782 ~ctype_byname() { };
23783 };
23784
23785
23786 template<>
23787 ctype_byname<char>::ctype_byname(const char*, size_t refs);
23788
23789 template<>
23790 ctype_byname<wchar_t>::ctype_byname(const char*, size_t refs);
23791
23792 }
23793
23794
23795 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/ctype_inline.h" 1 3
23796 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/ctype_inline.h" 3
23797 namespace std __attribute__ ((__visibility__ ("default"))) {
23798
23799 bool
23800 ctype<char>::
23801 is(mask __m, char __c) const
23802 { return _M_table[static_cast<unsigned char>(__c)] & __m; }
23803
23804 const char*
23805 ctype<char>::
23806 is(const char* __low, const char* __high, mask* __vec) const
23807 {
23808 while (__low < __high)
23809 *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
23810 return __high;
23811 }
23812
23813 const char*
23814 ctype<char>::
23815 scan_is(mask __m, const char* __low, const char* __high) const
23816 {
23817 while (__low < __high
23818 && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
23819 ++__low;
23820 return __low;
23821 }
23822
23823 const char*
23824 ctype<char>::
23825 scan_not(mask __m, const char* __low, const char* __high) const
23826 {
23827 while (__low < __high
23828 && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
23829 ++__low;
23830 return __low;
23831 }
23832
23833 }
23834 # 1534 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 2 3
23835
23836
23837 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/codecvt.h" 1 3
23838 # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/codecvt.h" 3
23839
23840 # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/codecvt.h" 3
23841
23842 namespace std __attribute__ ((__visibility__ ("default"))) {
23843
23844
23845 class codecvt_base
23846 {
23847 public:
23848 enum result
23849 {
23850 ok,
23851 partial,
23852 error,
23853 noconv
23854 };
23855 };
23856 # 71 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/codecvt.h" 3
23857 template<typename _InternT, typename _ExternT, typename _StateT>
23858 class __codecvt_abstract_base
23859 : public locale::facet, public codecvt_base
23860 {
23861 public:
23862
23863 typedef codecvt_base::result result;
23864 typedef _InternT intern_type;
23865 typedef _ExternT extern_type;
23866 typedef _StateT state_type;
23867 # 119 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/codecvt.h" 3
23868 result
23869 out(state_type& __state, const intern_type* __from,
23870 const intern_type* __from_end, const intern_type*& __from_next,
23871 extern_type* __to, extern_type* __to_end,
23872 extern_type*& __to_next) const
23873 {
23874 return this->do_out(__state, __from, __from_end, __from_next,
23875 __to, __to_end, __to_next);
23876 }
23877 # 158 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/codecvt.h" 3
23878 result
23879 unshift(state_type& __state, extern_type* __to, extern_type* __to_end,
23880 extern_type*& __to_next) const
23881 { return this->do_unshift(__state, __to,__to_end,__to_next); }
23882 # 199 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/codecvt.h" 3
23883 result
23884 in(state_type& __state, const extern_type* __from,
23885 const extern_type* __from_end, const extern_type*& __from_next,
23886 intern_type* __to, intern_type* __to_end,
23887 intern_type*& __to_next) const
23888 {
23889 return this->do_in(__state, __from, __from_end, __from_next,
23890 __to, __to_end, __to_next);
23891 }
23892
23893 int
23894 encoding() const throw()
23895 { return this->do_encoding(); }
23896
23897 bool
23898 always_noconv() const throw()
23899 { return this->do_always_noconv(); }
23900
23901 int
23902 length(state_type& __state, const extern_type* __from,
23903 const extern_type* __end, size_t __max) const
23904 { return this->do_length(__state, __from, __end, __max); }
23905
23906 int
23907 max_length() const throw()
23908 { return this->do_max_length(); }
23909
23910 protected:
23911 explicit
23912 __codecvt_abstract_base(size_t __refs = 0) : locale::facet(__refs) { }
23913
23914 virtual
23915 ~__codecvt_abstract_base() { }
23916 # 240 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/codecvt.h" 3
23917 virtual result
23918 do_out(state_type& __state, const intern_type* __from,
23919 const intern_type* __from_end, const intern_type*& __from_next,
23920 extern_type* __to, extern_type* __to_end,
23921 extern_type*& __to_next) const = 0;
23922
23923 virtual result
23924 do_unshift(state_type& __state, extern_type* __to,
23925 extern_type* __to_end, extern_type*& __to_next) const = 0;
23926
23927 virtual result
23928 do_in(state_type& __state, const extern_type* __from,
23929 const extern_type* __from_end, const extern_type*& __from_next,
23930 intern_type* __to, intern_type* __to_end,
23931 intern_type*& __to_next) const = 0;
23932
23933 virtual int
23934 do_encoding() const throw() = 0;
23935
23936 virtual bool
23937 do_always_noconv() const throw() = 0;
23938
23939 virtual int
23940 do_length(state_type&, const extern_type* __from,
23941 const extern_type* __end, size_t __max) const = 0;
23942
23943 virtual int
23944 do_max_length() const throw() = 0;
23945 };
23946
23947
23948
23949 template<typename _InternT, typename _ExternT, typename _StateT>
23950 class codecvt
23951 : public __codecvt_abstract_base<_InternT, _ExternT, _StateT>
23952 {
23953 public:
23954
23955 typedef codecvt_base::result result;
23956 typedef _InternT intern_type;
23957 typedef _ExternT extern_type;
23958 typedef _StateT state_type;
23959
23960 protected:
23961 __c_locale _M_c_locale_codecvt;
23962
23963 public:
23964 static locale::id id;
23965
23966 explicit
23967 codecvt(size_t __refs = 0)
23968 : __codecvt_abstract_base<_InternT, _ExternT, _StateT> (__refs) { }
23969
23970 explicit
23971 codecvt(__c_locale __cloc, size_t __refs = 0);
23972
23973 protected:
23974 virtual
23975 ~codecvt() { }
23976
23977 virtual result
23978 do_out(state_type& __state, const intern_type* __from,
23979 const intern_type* __from_end, const intern_type*& __from_next,
23980 extern_type* __to, extern_type* __to_end,
23981 extern_type*& __to_next) const;
23982
23983 virtual result
23984 do_unshift(state_type& __state, extern_type* __to,
23985 extern_type* __to_end, extern_type*& __to_next) const;
23986
23987 virtual result
23988 do_in(state_type& __state, const extern_type* __from,
23989 const extern_type* __from_end, const extern_type*& __from_next,
23990 intern_type* __to, intern_type* __to_end,
23991 intern_type*& __to_next) const;
23992
23993 virtual int
23994 do_encoding() const throw();
23995
23996 virtual bool
23997 do_always_noconv() const throw();
23998
23999 virtual int
24000 do_length(state_type&, const extern_type* __from,
24001 const extern_type* __end, size_t __max) const;
24002
24003 virtual int
24004 do_max_length() const throw();
24005 };
24006
24007 template<typename _InternT, typename _ExternT, typename _StateT>
24008 locale::id codecvt<_InternT, _ExternT, _StateT>::id;
24009
24010
24011 template<>
24012 class codecvt<char, char, mbstate_t>
24013 : public __codecvt_abstract_base<char, char, mbstate_t>
24014 {
24015 public:
24016
24017 typedef char intern_type;
24018 typedef char extern_type;
24019 typedef mbstate_t state_type;
24020
24021 protected:
24022 __c_locale _M_c_locale_codecvt;
24023
24024 public:
24025 static locale::id id;
24026
24027 explicit
24028 codecvt(size_t __refs = 0);
24029
24030 explicit
24031 codecvt(__c_locale __cloc, size_t __refs = 0);
24032
24033 protected:
24034 virtual
24035 ~codecvt();
24036
24037 virtual result
24038 do_out(state_type& __state, const intern_type* __from,
24039 const intern_type* __from_end, const intern_type*& __from_next,
24040 extern_type* __to, extern_type* __to_end,
24041 extern_type*& __to_next) const;
24042
24043 virtual result
24044 do_unshift(state_type& __state, extern_type* __to,
24045 extern_type* __to_end, extern_type*& __to_next) const;
24046
24047 virtual result
24048 do_in(state_type& __state, const extern_type* __from,
24049 const extern_type* __from_end, const extern_type*& __from_next,
24050 intern_type* __to, intern_type* __to_end,
24051 intern_type*& __to_next) const;
24052
24053 virtual int
24054 do_encoding() const throw();
24055
24056 virtual bool
24057 do_always_noconv() const throw();
24058
24059 virtual int
24060 do_length(state_type&, const extern_type* __from,
24061 const extern_type* __end, size_t __max) const;
24062
24063 virtual int
24064 do_max_length() const throw();
24065 };
24066
24067
24068
24069 template<>
24070 class codecvt<wchar_t, char, mbstate_t>
24071 : public __codecvt_abstract_base<wchar_t, char, mbstate_t>
24072 {
24073 public:
24074
24075 typedef wchar_t intern_type;
24076 typedef char extern_type;
24077 typedef mbstate_t state_type;
24078
24079 protected:
24080 __c_locale _M_c_locale_codecvt;
24081
24082 public:
24083 static locale::id id;
24084
24085 explicit
24086 codecvt(size_t __refs = 0);
24087
24088 explicit
24089 codecvt(__c_locale __cloc, size_t __refs = 0);
24090
24091 protected:
24092 virtual
24093 ~codecvt();
24094
24095 virtual result
24096 do_out(state_type& __state, const intern_type* __from,
24097 const intern_type* __from_end, const intern_type*& __from_next,
24098 extern_type* __to, extern_type* __to_end,
24099 extern_type*& __to_next) const;
24100
24101 virtual result
24102 do_unshift(state_type& __state,
24103 extern_type* __to, extern_type* __to_end,
24104 extern_type*& __to_next) const;
24105
24106 virtual result
24107 do_in(state_type& __state,
24108 const extern_type* __from, const extern_type* __from_end,
24109 const extern_type*& __from_next,
24110 intern_type* __to, intern_type* __to_end,
24111 intern_type*& __to_next) const;
24112
24113 virtual
24114 int do_encoding() const throw();
24115
24116 virtual
24117 bool do_always_noconv() const throw();
24118
24119 virtual
24120 int do_length(state_type&, const extern_type* __from,
24121 const extern_type* __end, size_t __max) const;
24122
24123 virtual int
24124 do_max_length() const throw();
24125 };
24126
24127
24128
24129 template<typename _InternT, typename _ExternT, typename _StateT>
24130 class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT>
24131 {
24132 public:
24133 explicit
24134 codecvt_byname(const char* __s, size_t __refs = 0)
24135 : codecvt<_InternT, _ExternT, _StateT>(__refs)
24136 {
24137 if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
24138 {
24139 this->_S_destroy_c_locale(this->_M_c_locale_codecvt);
24140 this->_S_create_c_locale(this->_M_c_locale_codecvt, __s);
24141 }
24142 }
24143
24144 protected:
24145 virtual
24146 ~codecvt_byname() { }
24147 };
24148
24149 }
24150 # 1537 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 2 3
24151
24152 namespace std __attribute__ ((__visibility__ ("default"))) {
24153
24154
24155 class __num_base
24156 {
24157 public:
24158
24159
24160 enum
24161 {
24162 _S_ominus,
24163 _S_oplus,
24164 _S_ox,
24165 _S_oX,
24166 _S_odigits,
24167 _S_odigits_end = _S_odigits + 16,
24168 _S_oudigits = _S_odigits_end,
24169 _S_oudigits_end = _S_oudigits + 16,
24170 _S_oe = _S_odigits + 14,
24171 _S_oE = _S_oudigits + 14,
24172 _S_oend = _S_oudigits_end
24173 };
24174
24175
24176
24177
24178
24179
24180 static const char* _S_atoms_out;
24181
24182
24183
24184 static const char* _S_atoms_in;
24185
24186 enum
24187 {
24188 _S_iminus,
24189 _S_iplus,
24190 _S_ix,
24191 _S_iX,
24192 _S_izero,
24193 _S_ie = _S_izero + 14,
24194 _S_iE = _S_izero + 20,
24195 _S_iend = 26
24196 };
24197
24198
24199
24200 static void
24201 _S_format_float(const ios_base& __io, char* __fptr, char __mod);
24202 };
24203
24204 template<typename _CharT>
24205 struct __numpunct_cache : public locale::facet
24206 {
24207 const char* _M_grouping;
24208 size_t _M_grouping_size;
24209 bool _M_use_grouping;
24210 const _CharT* _M_truename;
24211 size_t _M_truename_size;
24212 const _CharT* _M_falsename;
24213 size_t _M_falsename_size;
24214 _CharT _M_decimal_point;
24215 _CharT _M_thousands_sep;
24216
24217
24218
24219
24220
24221 _CharT _M_atoms_out[__num_base::_S_oend];
24222
24223
24224
24225
24226
24227 _CharT _M_atoms_in[__num_base::_S_iend];
24228
24229 bool _M_allocated;
24230
24231 __numpunct_cache(size_t __refs = 0) : facet(__refs),
24232 _M_grouping(__null), _M_grouping_size(0), _M_use_grouping(false),
24233 _M_truename(__null), _M_truename_size(0), _M_falsename(__null),
24234 _M_falsename_size(0), _M_decimal_point(_CharT()),
24235 _M_thousands_sep(_CharT()), _M_allocated(false)
24236 { }
24237
24238 ~__numpunct_cache();
24239
24240 void
24241 _M_cache(const locale& __loc);
24242
24243 private:
24244 __numpunct_cache&
24245 operator=(const __numpunct_cache&);
24246
24247 explicit
24248 __numpunct_cache(const __numpunct_cache&);
24249 };
24250
24251 template<typename _CharT>
24252 __numpunct_cache<_CharT>::~__numpunct_cache()
24253 {
24254 if (_M_allocated)
24255 {
24256 delete [] _M_grouping;
24257 delete [] _M_truename;
24258 delete [] _M_falsename;
24259 }
24260 }
24261 # 1661 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24262 template<typename _CharT>
24263 class numpunct : public locale::facet
24264 {
24265 public:
24266
24267
24268
24269 typedef _CharT char_type;
24270 typedef basic_string<_CharT> string_type;
24271
24272 typedef __numpunct_cache<_CharT> __cache_type;
24273
24274 protected:
24275 __cache_type* _M_data;
24276
24277 public:
24278
24279 static locale::id id;
24280
24281
24282
24283
24284
24285
24286 explicit
24287 numpunct(size_t __refs = 0) : facet(__refs), _M_data(__null)
24288 { _M_initialize_numpunct(); }
24289 # 1698 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24290 explicit
24291 numpunct(__cache_type* __cache, size_t __refs = 0)
24292 : facet(__refs), _M_data(__cache)
24293 { _M_initialize_numpunct(); }
24294 # 1712 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24295 explicit
24296 numpunct(__c_locale __cloc, size_t __refs = 0)
24297 : facet(__refs), _M_data(__null)
24298 { _M_initialize_numpunct(__cloc); }
24299 # 1726 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24300 char_type
24301 decimal_point() const
24302 { return this->do_decimal_point(); }
24303 # 1739 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24304 char_type
24305 thousands_sep() const
24306 { return this->do_thousands_sep(); }
24307 # 1770 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24308 string
24309 grouping() const
24310 { return this->do_grouping(); }
24311 # 1783 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24312 string_type
24313 truename() const
24314 { return this->do_truename(); }
24315 # 1796 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24316 string_type
24317 falsename() const
24318 { return this->do_falsename(); }
24319
24320 protected:
24321
24322 virtual
24323 ~numpunct();
24324 # 1813 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24325 virtual char_type
24326 do_decimal_point() const
24327 { return _M_data->_M_decimal_point; }
24328 # 1825 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24329 virtual char_type
24330 do_thousands_sep() const
24331 { return _M_data->_M_thousands_sep; }
24332 # 1838 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24333 virtual string
24334 do_grouping() const
24335 { return _M_data->_M_grouping; }
24336 # 1851 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24337 virtual string_type
24338 do_truename() const
24339 { return _M_data->_M_truename; }
24340 # 1864 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24341 virtual string_type
24342 do_falsename() const
24343 { return _M_data->_M_falsename; }
24344
24345
24346 void
24347 _M_initialize_numpunct(__c_locale __cloc = __null);
24348 };
24349
24350 template<typename _CharT>
24351 locale::id numpunct<_CharT>::id;
24352
24353 template<>
24354 numpunct<char>::~numpunct();
24355
24356 template<>
24357 void
24358 numpunct<char>::_M_initialize_numpunct(__c_locale __cloc);
24359
24360
24361 template<>
24362 numpunct<wchar_t>::~numpunct();
24363
24364 template<>
24365 void
24366 numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc);
24367
24368
24369
24370 template<typename _CharT>
24371 class numpunct_byname : public numpunct<_CharT>
24372 {
24373 public:
24374 typedef _CharT char_type;
24375 typedef basic_string<_CharT> string_type;
24376
24377 explicit
24378 numpunct_byname(const char* __s, size_t __refs = 0)
24379 : numpunct<_CharT>(__refs)
24380 {
24381 if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
24382 {
24383 __c_locale __tmp;
24384 this->_S_create_c_locale(__tmp, __s);
24385 this->_M_initialize_numpunct(__tmp);
24386 this->_S_destroy_c_locale(__tmp);
24387 }
24388 }
24389
24390 protected:
24391 virtual
24392 ~numpunct_byname() { }
24393 };
24394
24395 namespace __gnu_cxx_ldbl128 {
24396 # 1931 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24397 template<typename _CharT, typename _InIter>
24398 class num_get : public locale::facet
24399 {
24400 public:
24401
24402
24403
24404 typedef _CharT char_type;
24405 typedef _InIter iter_type;
24406
24407
24408
24409 static locale::id id;
24410 # 1952 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24411 explicit
24412 num_get(size_t __refs = 0) : facet(__refs) { }
24413 # 1978 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24414 iter_type
24415 get(iter_type __in, iter_type __end, ios_base& __io,
24416 ios_base::iostate& __err, bool& __v) const
24417 { return this->do_get(__in, __end, __io, __err, __v); }
24418 # 2014 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24419 iter_type
24420 get(iter_type __in, iter_type __end, ios_base& __io,
24421 ios_base::iostate& __err, long& __v) const
24422 { return this->do_get(__in, __end, __io, __err, __v); }
24423
24424 iter_type
24425 get(iter_type __in, iter_type __end, ios_base& __io,
24426 ios_base::iostate& __err, unsigned short& __v) const
24427 { return this->do_get(__in, __end, __io, __err, __v); }
24428
24429 iter_type
24430 get(iter_type __in, iter_type __end, ios_base& __io,
24431 ios_base::iostate& __err, unsigned int& __v) const
24432 { return this->do_get(__in, __end, __io, __err, __v); }
24433
24434 iter_type
24435 get(iter_type __in, iter_type __end, ios_base& __io,
24436 ios_base::iostate& __err, unsigned long& __v) const
24437 { return this->do_get(__in, __end, __io, __err, __v); }
24438
24439
24440 iter_type
24441 get(iter_type __in, iter_type __end, ios_base& __io,
24442 ios_base::iostate& __err, long long& __v) const
24443 { return this->do_get(__in, __end, __io, __err, __v); }
24444
24445 iter_type
24446 get(iter_type __in, iter_type __end, ios_base& __io,
24447 ios_base::iostate& __err, unsigned long long& __v) const
24448 { return this->do_get(__in, __end, __io, __err, __v); }
24449 # 2073 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24450 iter_type
24451 get(iter_type __in, iter_type __end, ios_base& __io,
24452 ios_base::iostate& __err, float& __v) const
24453 { return this->do_get(__in, __end, __io, __err, __v); }
24454
24455 iter_type
24456 get(iter_type __in, iter_type __end, ios_base& __io,
24457 ios_base::iostate& __err, double& __v) const
24458 { return this->do_get(__in, __end, __io, __err, __v); }
24459
24460 iter_type
24461 get(iter_type __in, iter_type __end, ios_base& __io,
24462 ios_base::iostate& __err, long double& __v) const
24463 { return this->do_get(__in, __end, __io, __err, __v); }
24464 # 2115 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24465 iter_type
24466 get(iter_type __in, iter_type __end, ios_base& __io,
24467 ios_base::iostate& __err, void*& __v) const
24468 { return this->do_get(__in, __end, __io, __err, __v); }
24469
24470 protected:
24471
24472 virtual ~num_get() { }
24473
24474 iter_type
24475 _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&,
24476 string& __xtrc) const;
24477
24478 template<typename _ValueT>
24479 iter_type
24480 _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&,
24481 _ValueT& __v) const;
24482
24483 template<typename _CharT2>
24484 typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, int>::__type
24485 _M_find(const _CharT2*, size_t __len, _CharT2 __c) const
24486 {
24487 int __ret = -1;
24488 if (__len <= 10)
24489 {
24490 if (__c >= _CharT2('0') && __c < _CharT2(_CharT2('0') + __len))
24491 __ret = __c - _CharT2('0');
24492 }
24493 else
24494 {
24495 if (__c >= _CharT2('0') && __c <= _CharT2('9'))
24496 __ret = __c - _CharT2('0');
24497 else if (__c >= _CharT2('a') && __c <= _CharT2('f'))
24498 __ret = 10 + (__c - _CharT2('a'));
24499 else if (__c >= _CharT2('A') && __c <= _CharT2('F'))
24500 __ret = 10 + (__c - _CharT2('A'));
24501 }
24502 return __ret;
24503 }
24504
24505 template<typename _CharT2>
24506 typename __gnu_cxx::__enable_if<!__is_char<_CharT2>::__value,
24507 int>::__type
24508 _M_find(const _CharT2* __zero, size_t __len, _CharT2 __c) const
24509 {
24510 int __ret = -1;
24511 const char_type* __q = char_traits<_CharT2>::find(__zero, __len, __c);
24512 if (__q)
24513 {
24514 __ret = __q - __zero;
24515 if (__ret > 15)
24516 __ret -= 6;
24517 }
24518 return __ret;
24519 }
24520 # 2186 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24521 virtual iter_type
24522 do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const;
24523
24524
24525 virtual iter_type
24526 do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, long&) const;
24527
24528 virtual iter_type
24529 do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
24530 unsigned short&) const;
24531
24532 virtual iter_type
24533 do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
24534 unsigned int&) const;
24535
24536 virtual iter_type
24537 do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
24538 unsigned long&) const;
24539
24540
24541 virtual iter_type
24542 do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
24543 long long&) const;
24544
24545 virtual iter_type
24546 do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
24547 unsigned long long&) const;
24548
24549
24550 virtual iter_type
24551 do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
24552 float&) const;
24553
24554 virtual iter_type
24555 do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
24556 double&) const;
24557
24558
24559
24560 virtual iter_type
24561 __do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
24562 double&) const;
24563
24564
24565
24566
24567
24568
24569 virtual iter_type
24570 do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
24571 void*&) const;
24572
24573
24574
24575 virtual iter_type
24576 do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
24577 long double&) const;
24578
24579
24580 };
24581
24582 template<typename _CharT, typename _InIter>
24583 locale::id num_get<_CharT, _InIter>::id;
24584 # 2262 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24585 template<typename _CharT, typename _OutIter>
24586 class num_put : public locale::facet
24587 {
24588 public:
24589
24590
24591
24592 typedef _CharT char_type;
24593 typedef _OutIter iter_type;
24594
24595
24596
24597 static locale::id id;
24598 # 2283 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24599 explicit
24600 num_put(size_t __refs = 0) : facet(__refs) { }
24601 # 2301 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24602 iter_type
24603 put(iter_type __s, ios_base& __f, char_type __fill, bool __v) const
24604 { return this->do_put(__s, __f, __fill, __v); }
24605 # 2343 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24606 iter_type
24607 put(iter_type __s, ios_base& __f, char_type __fill, long __v) const
24608 { return this->do_put(__s, __f, __fill, __v); }
24609
24610 iter_type
24611 put(iter_type __s, ios_base& __f, char_type __fill,
24612 unsigned long __v) const
24613 { return this->do_put(__s, __f, __fill, __v); }
24614
24615
24616 iter_type
24617 put(iter_type __s, ios_base& __f, char_type __fill, long long __v) const
24618 { return this->do_put(__s, __f, __fill, __v); }
24619
24620 iter_type
24621 put(iter_type __s, ios_base& __f, char_type __fill,
24622 unsigned long long __v) const
24623 { return this->do_put(__s, __f, __fill, __v); }
24624 # 2406 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24625 iter_type
24626 put(iter_type __s, ios_base& __f, char_type __fill, double __v) const
24627 { return this->do_put(__s, __f, __fill, __v); }
24628
24629 iter_type
24630 put(iter_type __s, ios_base& __f, char_type __fill,
24631 long double __v) const
24632 { return this->do_put(__s, __f, __fill, __v); }
24633 # 2431 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24634 iter_type
24635 put(iter_type __s, ios_base& __f, char_type __fill,
24636 const void* __v) const
24637 { return this->do_put(__s, __f, __fill, __v); }
24638
24639 protected:
24640 template<typename _ValueT>
24641 iter_type
24642 _M_insert_float(iter_type, ios_base& __io, char_type __fill,
24643 char __mod, _ValueT __v) const;
24644
24645 void
24646 _M_group_float(const char* __grouping, size_t __grouping_size,
24647 char_type __sep, const char_type* __p, char_type* __new,
24648 char_type* __cs, int& __len) const;
24649
24650 template<typename _ValueT>
24651 iter_type
24652 _M_insert_int(iter_type, ios_base& __io, char_type __fill,
24653 _ValueT __v) const;
24654
24655 void
24656 _M_group_int(const char* __grouping, size_t __grouping_size,
24657 char_type __sep, ios_base& __io, char_type* __new,
24658 char_type* __cs, int& __len) const;
24659
24660 void
24661 _M_pad(char_type __fill, streamsize __w, ios_base& __io,
24662 char_type* __new, const char_type* __cs, int& __len) const;
24663
24664
24665 virtual
24666 ~num_put() { };
24667 # 2479 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24668 virtual iter_type
24669 do_put(iter_type, ios_base&, char_type __fill, bool __v) const;
24670
24671 virtual iter_type
24672 do_put(iter_type, ios_base&, char_type __fill, long __v) const;
24673
24674 virtual iter_type
24675 do_put(iter_type, ios_base&, char_type __fill, unsigned long) const;
24676
24677
24678 virtual iter_type
24679 do_put(iter_type, ios_base&, char_type __fill, long long __v) const;
24680
24681 virtual iter_type
24682 do_put(iter_type, ios_base&, char_type __fill, unsigned long long) const;
24683
24684
24685 virtual iter_type
24686 do_put(iter_type, ios_base&, char_type __fill, double __v) const;
24687
24688
24689
24690 virtual iter_type
24691 __do_put(iter_type, ios_base&, char_type __fill, double __v) const;
24692
24693
24694
24695
24696
24697 virtual iter_type
24698 do_put(iter_type, ios_base&, char_type __fill, const void* __v) const;
24699
24700
24701
24702 virtual iter_type
24703 do_put(iter_type, ios_base&, char_type __fill, long double __v) const;
24704
24705
24706 };
24707
24708 template <typename _CharT, typename _OutIter>
24709 locale::id num_put<_CharT, _OutIter>::id;
24710
24711 }
24712 # 2536 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24713 template<typename _CharT>
24714 class collate : public locale::facet
24715 {
24716 public:
24717
24718
24719
24720 typedef _CharT char_type;
24721 typedef basic_string<_CharT> string_type;
24722
24723
24724 protected:
24725
24726
24727 __c_locale _M_c_locale_collate;
24728
24729 public:
24730
24731 static locale::id id;
24732 # 2563 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24733 explicit
24734 collate(size_t __refs = 0)
24735 : facet(__refs), _M_c_locale_collate(_S_get_c_locale())
24736 { }
24737 # 2577 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24738 explicit
24739 collate(__c_locale __cloc, size_t __refs = 0)
24740 : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc))
24741 { }
24742 # 2594 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24743 int
24744 compare(const _CharT* __lo1, const _CharT* __hi1,
24745 const _CharT* __lo2, const _CharT* __hi2) const
24746 { return this->do_compare(__lo1, __hi1, __lo2, __hi2); }
24747 # 2613 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24748 string_type
24749 transform(const _CharT* __lo, const _CharT* __hi) const
24750 { return this->do_transform(__lo, __hi); }
24751 # 2627 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24752 long
24753 hash(const _CharT* __lo, const _CharT* __hi) const
24754 { return this->do_hash(__lo, __hi); }
24755
24756
24757 int
24758 _M_compare(const _CharT*, const _CharT*) const;
24759
24760 size_t
24761 _M_transform(_CharT*, const _CharT*, size_t) const;
24762
24763 protected:
24764
24765 virtual
24766 ~collate()
24767 { _S_destroy_c_locale(_M_c_locale_collate); }
24768 # 2656 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24769 virtual int
24770 do_compare(const _CharT* __lo1, const _CharT* __hi1,
24771 const _CharT* __lo2, const _CharT* __hi2) const;
24772 # 2672 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24773 virtual string_type
24774 do_transform(const _CharT* __lo, const _CharT* __hi) const;
24775 # 2685 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24776 virtual long
24777 do_hash(const _CharT* __lo, const _CharT* __hi) const;
24778 };
24779
24780 template<typename _CharT>
24781 locale::id collate<_CharT>::id;
24782
24783
24784 template<>
24785 int
24786 collate<char>::_M_compare(const char*, const char*) const;
24787
24788 template<>
24789 size_t
24790 collate<char>::_M_transform(char*, const char*, size_t) const;
24791
24792
24793 template<>
24794 int
24795 collate<wchar_t>::_M_compare(const wchar_t*, const wchar_t*) const;
24796
24797 template<>
24798 size_t
24799 collate<wchar_t>::_M_transform(wchar_t*, const wchar_t*, size_t) const;
24800
24801
24802
24803 template<typename _CharT>
24804 class collate_byname : public collate<_CharT>
24805 {
24806 public:
24807
24808
24809 typedef _CharT char_type;
24810 typedef basic_string<_CharT> string_type;
24811
24812
24813 explicit
24814 collate_byname(const char* __s, size_t __refs = 0)
24815 : collate<_CharT>(__refs)
24816 {
24817 if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
24818 {
24819 this->_S_destroy_c_locale(this->_M_c_locale_collate);
24820 this->_S_create_c_locale(this->_M_c_locale_collate, __s);
24821 }
24822 }
24823
24824 protected:
24825 virtual
24826 ~collate_byname() { }
24827 };
24828 # 2745 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24829 class time_base
24830 {
24831 public:
24832 enum dateorder { no_order, dmy, mdy, ymd, ydm };
24833 };
24834
24835 template<typename _CharT>
24836 struct __timepunct_cache : public locale::facet
24837 {
24838
24839 static const _CharT* _S_timezones[14];
24840
24841 const _CharT* _M_date_format;
24842 const _CharT* _M_date_era_format;
24843 const _CharT* _M_time_format;
24844 const _CharT* _M_time_era_format;
24845 const _CharT* _M_date_time_format;
24846 const _CharT* _M_date_time_era_format;
24847 const _CharT* _M_am;
24848 const _CharT* _M_pm;
24849 const _CharT* _M_am_pm_format;
24850
24851
24852 const _CharT* _M_day1;
24853 const _CharT* _M_day2;
24854 const _CharT* _M_day3;
24855 const _CharT* _M_day4;
24856 const _CharT* _M_day5;
24857 const _CharT* _M_day6;
24858 const _CharT* _M_day7;
24859
24860
24861 const _CharT* _M_aday1;
24862 const _CharT* _M_aday2;
24863 const _CharT* _M_aday3;
24864 const _CharT* _M_aday4;
24865 const _CharT* _M_aday5;
24866 const _CharT* _M_aday6;
24867 const _CharT* _M_aday7;
24868
24869
24870 const _CharT* _M_month01;
24871 const _CharT* _M_month02;
24872 const _CharT* _M_month03;
24873 const _CharT* _M_month04;
24874 const _CharT* _M_month05;
24875 const _CharT* _M_month06;
24876 const _CharT* _M_month07;
24877 const _CharT* _M_month08;
24878 const _CharT* _M_month09;
24879 const _CharT* _M_month10;
24880 const _CharT* _M_month11;
24881 const _CharT* _M_month12;
24882
24883
24884 const _CharT* _M_amonth01;
24885 const _CharT* _M_amonth02;
24886 const _CharT* _M_amonth03;
24887 const _CharT* _M_amonth04;
24888 const _CharT* _M_amonth05;
24889 const _CharT* _M_amonth06;
24890 const _CharT* _M_amonth07;
24891 const _CharT* _M_amonth08;
24892 const _CharT* _M_amonth09;
24893 const _CharT* _M_amonth10;
24894 const _CharT* _M_amonth11;
24895 const _CharT* _M_amonth12;
24896
24897 bool _M_allocated;
24898
24899 __timepunct_cache(size_t __refs = 0) : facet(__refs),
24900 _M_date_format(__null), _M_date_era_format(__null), _M_time_format(__null),
24901 _M_time_era_format(__null), _M_date_time_format(__null),
24902 _M_date_time_era_format(__null), _M_am(__null), _M_pm(__null),
24903 _M_am_pm_format(__null), _M_day1(__null), _M_day2(__null), _M_day3(__null),
24904 _M_day4(__null), _M_day5(__null), _M_day6(__null), _M_day7(__null),
24905 _M_aday1(__null), _M_aday2(__null), _M_aday3(__null), _M_aday4(__null),
24906 _M_aday5(__null), _M_aday6(__null), _M_aday7(__null), _M_month01(__null),
24907 _M_month02(__null), _M_month03(__null), _M_month04(__null), _M_month05(__null),
24908 _M_month06(__null), _M_month07(__null), _M_month08(__null), _M_month09(__null),
24909 _M_month10(__null), _M_month11(__null), _M_month12(__null), _M_amonth01(__null),
24910 _M_amonth02(__null), _M_amonth03(__null), _M_amonth04(__null),
24911 _M_amonth05(__null), _M_amonth06(__null), _M_amonth07(__null),
24912 _M_amonth08(__null), _M_amonth09(__null), _M_amonth10(__null),
24913 _M_amonth11(__null), _M_amonth12(__null), _M_allocated(false)
24914 { }
24915
24916 ~__timepunct_cache();
24917
24918 void
24919 _M_cache(const locale& __loc);
24920
24921 private:
24922 __timepunct_cache&
24923 operator=(const __timepunct_cache&);
24924
24925 explicit
24926 __timepunct_cache(const __timepunct_cache&);
24927 };
24928
24929 template<typename _CharT>
24930 __timepunct_cache<_CharT>::~__timepunct_cache()
24931 {
24932 if (_M_allocated)
24933 {
24934
24935 }
24936 }
24937
24938
24939 template<>
24940 const char*
24941 __timepunct_cache<char>::_S_timezones[14];
24942
24943
24944 template<>
24945 const wchar_t*
24946 __timepunct_cache<wchar_t>::_S_timezones[14];
24947
24948
24949
24950 template<typename _CharT>
24951 const _CharT* __timepunct_cache<_CharT>::_S_timezones[14];
24952
24953 template<typename _CharT>
24954 class __timepunct : public locale::facet
24955 {
24956 public:
24957
24958 typedef _CharT __char_type;
24959 typedef basic_string<_CharT> __string_type;
24960 typedef __timepunct_cache<_CharT> __cache_type;
24961
24962 protected:
24963 __cache_type* _M_data;
24964 __c_locale _M_c_locale_timepunct;
24965 const char* _M_name_timepunct;
24966
24967 public:
24968
24969 static locale::id id;
24970
24971 explicit
24972 __timepunct(size_t __refs = 0);
24973
24974 explicit
24975 __timepunct(__cache_type* __cache, size_t __refs = 0);
24976 # 2903 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
24977 explicit
24978 __timepunct(__c_locale __cloc, const char* __s, size_t __refs = 0);
24979
24980
24981
24982 void
24983 _M_put(_CharT* __s, size_t __maxlen, const _CharT* __format,
24984 const tm* __tm) const;
24985
24986 void
24987 _M_date_formats(const _CharT** __date) const
24988 {
24989
24990 __date[0] = _M_data->_M_date_format;
24991 __date[1] = _M_data->_M_date_era_format;
24992 }
24993
24994 void
24995 _M_time_formats(const _CharT** __time) const
24996 {
24997
24998 __time[0] = _M_data->_M_time_format;
24999 __time[1] = _M_data->_M_time_era_format;
25000 }
25001
25002 void
25003 _M_date_time_formats(const _CharT** __dt) const
25004 {
25005
25006 __dt[0] = _M_data->_M_date_time_format;
25007 __dt[1] = _M_data->_M_date_time_era_format;
25008 }
25009
25010 void
25011 _M_am_pm_format(const _CharT* __ampm) const
25012 { __ampm = _M_data->_M_am_pm_format; }
25013
25014 void
25015 _M_am_pm(const _CharT** __ampm) const
25016 {
25017 __ampm[0] = _M_data->_M_am;
25018 __ampm[1] = _M_data->_M_pm;
25019 }
25020
25021 void
25022 _M_days(const _CharT** __days) const
25023 {
25024 __days[0] = _M_data->_M_day1;
25025 __days[1] = _M_data->_M_day2;
25026 __days[2] = _M_data->_M_day3;
25027 __days[3] = _M_data->_M_day4;
25028 __days[4] = _M_data->_M_day5;
25029 __days[5] = _M_data->_M_day6;
25030 __days[6] = _M_data->_M_day7;
25031 }
25032
25033 void
25034 _M_days_abbreviated(const _CharT** __days) const
25035 {
25036 __days[0] = _M_data->_M_aday1;
25037 __days[1] = _M_data->_M_aday2;
25038 __days[2] = _M_data->_M_aday3;
25039 __days[3] = _M_data->_M_aday4;
25040 __days[4] = _M_data->_M_aday5;
25041 __days[5] = _M_data->_M_aday6;
25042 __days[6] = _M_data->_M_aday7;
25043 }
25044
25045 void
25046 _M_months(const _CharT** __months) const
25047 {
25048 __months[0] = _M_data->_M_month01;
25049 __months[1] = _M_data->_M_month02;
25050 __months[2] = _M_data->_M_month03;
25051 __months[3] = _M_data->_M_month04;
25052 __months[4] = _M_data->_M_month05;
25053 __months[5] = _M_data->_M_month06;
25054 __months[6] = _M_data->_M_month07;
25055 __months[7] = _M_data->_M_month08;
25056 __months[8] = _M_data->_M_month09;
25057 __months[9] = _M_data->_M_month10;
25058 __months[10] = _M_data->_M_month11;
25059 __months[11] = _M_data->_M_month12;
25060 }
25061
25062 void
25063 _M_months_abbreviated(const _CharT** __months) const
25064 {
25065 __months[0] = _M_data->_M_amonth01;
25066 __months[1] = _M_data->_M_amonth02;
25067 __months[2] = _M_data->_M_amonth03;
25068 __months[3] = _M_data->_M_amonth04;
25069 __months[4] = _M_data->_M_amonth05;
25070 __months[5] = _M_data->_M_amonth06;
25071 __months[6] = _M_data->_M_amonth07;
25072 __months[7] = _M_data->_M_amonth08;
25073 __months[8] = _M_data->_M_amonth09;
25074 __months[9] = _M_data->_M_amonth10;
25075 __months[10] = _M_data->_M_amonth11;
25076 __months[11] = _M_data->_M_amonth12;
25077 }
25078
25079 protected:
25080 virtual
25081 ~__timepunct();
25082
25083
25084 void
25085 _M_initialize_timepunct(__c_locale __cloc = __null);
25086 };
25087
25088 template<typename _CharT>
25089 locale::id __timepunct<_CharT>::id;
25090
25091
25092 template<>
25093 void
25094 __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc);
25095
25096 template<>
25097 void
25098 __timepunct<char>::_M_put(char*, size_t, const char*, const tm*) const;
25099
25100
25101 template<>
25102 void
25103 __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc);
25104
25105 template<>
25106 void
25107 __timepunct<wchar_t>::_M_put(wchar_t*, size_t, const wchar_t*,
25108 const tm*) const;
25109
25110
25111 }
25112
25113
25114 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/time_members.h" 1 3
25115 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/time_members.h" 3
25116 namespace std __attribute__ ((__visibility__ ("default"))) {
25117
25118 template<typename _CharT>
25119 __timepunct<_CharT>::__timepunct(size_t __refs)
25120 : facet(__refs), _M_data(__null), _M_c_locale_timepunct(__null),
25121 _M_name_timepunct(_S_get_c_name())
25122 { _M_initialize_timepunct(); }
25123
25124 template<typename _CharT>
25125 __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
25126 : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(__null),
25127 _M_name_timepunct(_S_get_c_name())
25128 { _M_initialize_timepunct(); }
25129
25130 template<typename _CharT>
25131 __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
25132 size_t __refs)
25133 : facet(__refs), _M_data(__null), _M_c_locale_timepunct(__null),
25134 _M_name_timepunct(__null)
25135 {
25136 const size_t __len = std::strlen(__s) + 1;
25137 char* __tmp = new char[__len];
25138 std::memcpy(__tmp, __s, __len);
25139 _M_name_timepunct = __tmp;
25140
25141 try
25142 { _M_initialize_timepunct(__cloc); }
25143 catch(...)
25144 {
25145 delete [] _M_name_timepunct;
25146 throw;
25147 }
25148 }
25149
25150 template<typename _CharT>
25151 __timepunct<_CharT>::~__timepunct()
25152 {
25153 if (_M_name_timepunct != _S_get_c_name())
25154 delete [] _M_name_timepunct;
25155 delete _M_data;
25156 _S_destroy_c_locale(_M_c_locale_timepunct);
25157 }
25158
25159 }
25160 # 3041 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 2 3
25161
25162 namespace std __attribute__ ((__visibility__ ("default"))) {
25163 # 3056 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25164 template<typename _CharT, typename _InIter>
25165 class time_get : public locale::facet, public time_base
25166 {
25167 public:
25168
25169
25170
25171 typedef _CharT char_type;
25172 typedef _InIter iter_type;
25173
25174 typedef basic_string<_CharT> __string_type;
25175
25176
25177 static locale::id id;
25178 # 3078 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25179 explicit
25180 time_get(size_t __refs = 0)
25181 : facet (__refs) { }
25182 # 3095 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25183 dateorder
25184 date_order() const
25185 { return this->do_date_order(); }
25186 # 3119 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25187 iter_type
25188 get_time(iter_type __beg, iter_type __end, ios_base& __io,
25189 ios_base::iostate& __err, tm* __tm) const
25190 { return this->do_get_time(__beg, __end, __io, __err, __tm); }
25191 # 3144 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25192 iter_type
25193 get_date(iter_type __beg, iter_type __end, ios_base& __io,
25194 ios_base::iostate& __err, tm* __tm) const
25195 { return this->do_get_date(__beg, __end, __io, __err, __tm); }
25196 # 3172 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25197 iter_type
25198 get_weekday(iter_type __beg, iter_type __end, ios_base& __io,
25199 ios_base::iostate& __err, tm* __tm) const
25200 { return this->do_get_weekday(__beg, __end, __io, __err, __tm); }
25201 # 3201 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25202 iter_type
25203 get_monthname(iter_type __beg, iter_type __end, ios_base& __io,
25204 ios_base::iostate& __err, tm* __tm) const
25205 { return this->do_get_monthname(__beg, __end, __io, __err, __tm); }
25206 # 3227 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25207 iter_type
25208 get_year(iter_type __beg, iter_type __end, ios_base& __io,
25209 ios_base::iostate& __err, tm* __tm) const
25210 { return this->do_get_year(__beg, __end, __io, __err, __tm); }
25211
25212 protected:
25213
25214 virtual
25215 ~time_get() { }
25216 # 3247 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25217 virtual dateorder
25218 do_date_order() const;
25219 # 3265 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25220 virtual iter_type
25221 do_get_time(iter_type __beg, iter_type __end, ios_base& __io,
25222 ios_base::iostate& __err, tm* __tm) const;
25223 # 3284 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25224 virtual iter_type
25225 do_get_date(iter_type __beg, iter_type __end, ios_base& __io,
25226 ios_base::iostate& __err, tm* __tm) const;
25227 # 3303 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25228 virtual iter_type
25229 do_get_weekday(iter_type __beg, iter_type __end, ios_base&,
25230 ios_base::iostate& __err, tm* __tm) const;
25231 # 3322 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25232 virtual iter_type
25233 do_get_monthname(iter_type __beg, iter_type __end, ios_base&,
25234 ios_base::iostate& __err, tm* __tm) const;
25235 # 3341 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25236 virtual iter_type
25237 do_get_year(iter_type __beg, iter_type __end, ios_base& __io,
25238 ios_base::iostate& __err, tm* __tm) const;
25239
25240
25241 iter_type
25242 _M_extract_num(iter_type __beg, iter_type __end, int& __member,
25243 int __min, int __max, size_t __len,
25244 ios_base& __io, ios_base::iostate& __err) const;
25245
25246
25247
25248 iter_type
25249 _M_extract_name(iter_type __beg, iter_type __end, int& __member,
25250 const _CharT** __names, size_t __indexlen,
25251 ios_base& __io, ios_base::iostate& __err) const;
25252
25253
25254 iter_type
25255 _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io,
25256 ios_base::iostate& __err, tm* __tm,
25257 const _CharT* __format) const;
25258 };
25259
25260 template<typename _CharT, typename _InIter>
25261 locale::id time_get<_CharT, _InIter>::id;
25262
25263
25264 template<typename _CharT, typename _InIter>
25265 class time_get_byname : public time_get<_CharT, _InIter>
25266 {
25267 public:
25268
25269 typedef _CharT char_type;
25270 typedef _InIter iter_type;
25271
25272 explicit
25273 time_get_byname(const char*, size_t __refs = 0)
25274 : time_get<_CharT, _InIter>(__refs) { }
25275
25276 protected:
25277 virtual
25278 ~time_get_byname() { }
25279 };
25280 # 3397 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25281 template<typename _CharT, typename _OutIter>
25282 class time_put : public locale::facet
25283 {
25284 public:
25285
25286
25287
25288 typedef _CharT char_type;
25289 typedef _OutIter iter_type;
25290
25291
25292
25293 static locale::id id;
25294 # 3418 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25295 explicit
25296 time_put(size_t __refs = 0)
25297 : facet(__refs) { }
25298 # 3437 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25299 iter_type
25300 put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm,
25301 const _CharT* __beg, const _CharT* __end) const;
25302 # 3457 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25303 iter_type
25304 put(iter_type __s, ios_base& __io, char_type __fill,
25305 const tm* __tm, char __format, char __mod = 0) const
25306 { return this->do_put(__s, __io, __fill, __tm, __format, __mod); }
25307
25308 protected:
25309
25310 virtual
25311 ~time_put()
25312 { }
25313 # 3484 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25314 virtual iter_type
25315 do_put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm,
25316 char __format, char __mod) const;
25317 };
25318
25319 template<typename _CharT, typename _OutIter>
25320 locale::id time_put<_CharT, _OutIter>::id;
25321
25322
25323 template<typename _CharT, typename _OutIter>
25324 class time_put_byname : public time_put<_CharT, _OutIter>
25325 {
25326 public:
25327
25328 typedef _CharT char_type;
25329 typedef _OutIter iter_type;
25330
25331 explicit
25332 time_put_byname(const char*, size_t __refs = 0)
25333 : time_put<_CharT, _OutIter>(__refs)
25334 { };
25335
25336 protected:
25337 virtual
25338 ~time_put_byname() { }
25339 };
25340 # 3522 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25341 class money_base
25342 {
25343 public:
25344 enum part { none, space, symbol, sign, value };
25345 struct pattern { char field[4]; };
25346
25347 static const pattern _S_default_pattern;
25348
25349 enum
25350 {
25351 _S_minus,
25352 _S_zero,
25353 _S_end = 11
25354 };
25355
25356
25357
25358 static const char* _S_atoms;
25359
25360
25361
25362 static pattern
25363 _S_construct_pattern(char __precedes, char __space, char __posn);
25364 };
25365
25366 template<typename _CharT, bool _Intl>
25367 struct __moneypunct_cache : public locale::facet
25368 {
25369 const char* _M_grouping;
25370 size_t _M_grouping_size;
25371 bool _M_use_grouping;
25372 _CharT _M_decimal_point;
25373 _CharT _M_thousands_sep;
25374 const _CharT* _M_curr_symbol;
25375 size_t _M_curr_symbol_size;
25376 const _CharT* _M_positive_sign;
25377 size_t _M_positive_sign_size;
25378 const _CharT* _M_negative_sign;
25379 size_t _M_negative_sign_size;
25380 int _M_frac_digits;
25381 money_base::pattern _M_pos_format;
25382 money_base::pattern _M_neg_format;
25383
25384
25385
25386
25387 _CharT _M_atoms[money_base::_S_end];
25388
25389 bool _M_allocated;
25390
25391 __moneypunct_cache(size_t __refs = 0) : facet(__refs),
25392 _M_grouping(__null), _M_grouping_size(0), _M_use_grouping(false),
25393 _M_decimal_point(_CharT()), _M_thousands_sep(_CharT()),
25394 _M_curr_symbol(__null), _M_curr_symbol_size(0),
25395 _M_positive_sign(__null), _M_positive_sign_size(0),
25396 _M_negative_sign(__null), _M_negative_sign_size(0),
25397 _M_frac_digits(0),
25398 _M_pos_format(money_base::pattern()),
25399 _M_neg_format(money_base::pattern()), _M_allocated(false)
25400 { }
25401
25402 ~__moneypunct_cache();
25403
25404 void
25405 _M_cache(const locale& __loc);
25406
25407 private:
25408 __moneypunct_cache&
25409 operator=(const __moneypunct_cache&);
25410
25411 explicit
25412 __moneypunct_cache(const __moneypunct_cache&);
25413 };
25414
25415 template<typename _CharT, bool _Intl>
25416 __moneypunct_cache<_CharT, _Intl>::~__moneypunct_cache()
25417 {
25418 if (_M_allocated)
25419 {
25420 delete [] _M_grouping;
25421 delete [] _M_curr_symbol;
25422 delete [] _M_positive_sign;
25423 delete [] _M_negative_sign;
25424 }
25425 }
25426
25427
25428
25429
25430
25431
25432
25433 template<typename _CharT, bool _Intl>
25434 class moneypunct : public locale::facet, public money_base
25435 {
25436 public:
25437
25438
25439
25440 typedef _CharT char_type;
25441 typedef basic_string<_CharT> string_type;
25442
25443 typedef __moneypunct_cache<_CharT, _Intl> __cache_type;
25444
25445 private:
25446 __cache_type* _M_data;
25447
25448 public:
25449
25450
25451 static const bool intl = _Intl;
25452
25453 static locale::id id;
25454 # 3643 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25455 explicit
25456 moneypunct(size_t __refs = 0) : facet(__refs), _M_data(__null)
25457 { _M_initialize_moneypunct(); }
25458 # 3655 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25459 explicit
25460 moneypunct(__cache_type* __cache, size_t __refs = 0)
25461 : facet(__refs), _M_data(__cache)
25462 { _M_initialize_moneypunct(); }
25463 # 3670 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25464 explicit
25465 moneypunct(__c_locale __cloc, const char* __s, size_t __refs = 0)
25466 : facet(__refs), _M_data(__null)
25467 { _M_initialize_moneypunct(__cloc, __s); }
25468 # 3684 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25469 char_type
25470 decimal_point() const
25471 { return this->do_decimal_point(); }
25472 # 3697 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25473 char_type
25474 thousands_sep() const
25475 { return this->do_thousands_sep(); }
25476 # 3726 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25477 string
25478 grouping() const
25479 { return this->do_grouping(); }
25480 # 3739 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25481 string_type
25482 curr_symbol() const
25483 { return this->do_curr_symbol(); }
25484 # 3756 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25485 string_type
25486 positive_sign() const
25487 { return this->do_positive_sign(); }
25488 # 3773 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25489 string_type
25490 negative_sign() const
25491 { return this->do_negative_sign(); }
25492 # 3789 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25493 int
25494 frac_digits() const
25495 { return this->do_frac_digits(); }
25496 # 3824 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25497 pattern
25498 pos_format() const
25499 { return this->do_pos_format(); }
25500
25501 pattern
25502 neg_format() const
25503 { return this->do_neg_format(); }
25504
25505
25506 protected:
25507
25508 virtual
25509 ~moneypunct();
25510 # 3846 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25511 virtual char_type
25512 do_decimal_point() const
25513 { return _M_data->_M_decimal_point; }
25514 # 3858 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25515 virtual char_type
25516 do_thousands_sep() const
25517 { return _M_data->_M_thousands_sep; }
25518 # 3871 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25519 virtual string
25520 do_grouping() const
25521 { return _M_data->_M_grouping; }
25522 # 3884 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25523 virtual string_type
25524 do_curr_symbol() const
25525 { return _M_data->_M_curr_symbol; }
25526 # 3897 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25527 virtual string_type
25528 do_positive_sign() const
25529 { return _M_data->_M_positive_sign; }
25530 # 3910 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25531 virtual string_type
25532 do_negative_sign() const
25533 { return _M_data->_M_negative_sign; }
25534 # 3924 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25535 virtual int
25536 do_frac_digits() const
25537 { return _M_data->_M_frac_digits; }
25538 # 3938 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25539 virtual pattern
25540 do_pos_format() const
25541 { return _M_data->_M_pos_format; }
25542 # 3952 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25543 virtual pattern
25544 do_neg_format() const
25545 { return _M_data->_M_neg_format; }
25546
25547
25548 void
25549 _M_initialize_moneypunct(__c_locale __cloc = __null,
25550 const char* __name = __null);
25551 };
25552
25553 template<typename _CharT, bool _Intl>
25554 locale::id moneypunct<_CharT, _Intl>::id;
25555
25556 template<typename _CharT, bool _Intl>
25557 const bool moneypunct<_CharT, _Intl>::intl;
25558
25559 template<>
25560 moneypunct<char, true>::~moneypunct();
25561
25562 template<>
25563 moneypunct<char, false>::~moneypunct();
25564
25565 template<>
25566 void
25567 moneypunct<char, true>::_M_initialize_moneypunct(__c_locale, const char*);
25568
25569 template<>
25570 void
25571 moneypunct<char, false>::_M_initialize_moneypunct(__c_locale, const char*);
25572
25573
25574 template<>
25575 moneypunct<wchar_t, true>::~moneypunct();
25576
25577 template<>
25578 moneypunct<wchar_t, false>::~moneypunct();
25579
25580 template<>
25581 void
25582 moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale,
25583 const char*);
25584
25585 template<>
25586 void
25587 moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale,
25588 const char*);
25589
25590
25591
25592 template<typename _CharT, bool _Intl>
25593 class moneypunct_byname : public moneypunct<_CharT, _Intl>
25594 {
25595 public:
25596 typedef _CharT char_type;
25597 typedef basic_string<_CharT> string_type;
25598
25599 static const bool intl = _Intl;
25600
25601 explicit
25602 moneypunct_byname(const char* __s, size_t __refs = 0)
25603 : moneypunct<_CharT, _Intl>(__refs)
25604 {
25605 if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
25606 {
25607 __c_locale __tmp;
25608 this->_S_create_c_locale(__tmp, __s);
25609 this->_M_initialize_moneypunct(__tmp);
25610 this->_S_destroy_c_locale(__tmp);
25611 }
25612 }
25613
25614 protected:
25615 virtual
25616 ~moneypunct_byname() { }
25617 };
25618
25619 template<typename _CharT, bool _Intl>
25620 const bool moneypunct_byname<_CharT, _Intl>::intl;
25621
25622 namespace __gnu_cxx_ldbl128 {
25623 # 4044 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25624 template<typename _CharT, typename _InIter>
25625 class money_get : public locale::facet
25626 {
25627 public:
25628
25629
25630
25631 typedef _CharT char_type;
25632 typedef _InIter iter_type;
25633 typedef basic_string<_CharT> string_type;
25634
25635
25636
25637 static locale::id id;
25638 # 4066 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25639 explicit
25640 money_get(size_t __refs = 0) : facet(__refs) { }
25641 # 4096 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25642 iter_type
25643 get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
25644 ios_base::iostate& __err, long double& __units) const
25645 { return this->do_get(__s, __end, __intl, __io, __err, __units); }
25646 # 4126 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25647 iter_type
25648 get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
25649 ios_base::iostate& __err, string_type& __digits) const
25650 { return this->do_get(__s, __end, __intl, __io, __err, __digits); }
25651
25652 protected:
25653
25654 virtual
25655 ~money_get() { }
25656 # 4145 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25657 virtual iter_type
25658 __do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
25659 ios_base::iostate& __err, double& __units) const;
25660 # 4161 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25661 virtual iter_type
25662 do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
25663 ios_base::iostate& __err, string_type& __digits) const;
25664
25665
25666
25667 virtual iter_type
25668 do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
25669 ios_base::iostate& __err, long double& __units) const;
25670
25671
25672 template<bool _Intl>
25673 iter_type
25674 _M_extract(iter_type __s, iter_type __end, ios_base& __io,
25675 ios_base::iostate& __err, string& __digits) const;
25676 };
25677
25678 template<typename _CharT, typename _InIter>
25679 locale::id money_get<_CharT, _InIter>::id;
25680 # 4193 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25681 template<typename _CharT, typename _OutIter>
25682 class money_put : public locale::facet
25683 {
25684 public:
25685
25686
25687 typedef _CharT char_type;
25688 typedef _OutIter iter_type;
25689 typedef basic_string<_CharT> string_type;
25690
25691
25692
25693 static locale::id id;
25694 # 4214 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25695 explicit
25696 money_put(size_t __refs = 0) : facet(__refs) { }
25697 # 4234 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25698 iter_type
25699 put(iter_type __s, bool __intl, ios_base& __io,
25700 char_type __fill, long double __units) const
25701 { return this->do_put(__s, __intl, __io, __fill, __units); }
25702 # 4256 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25703 iter_type
25704 put(iter_type __s, bool __intl, ios_base& __io,
25705 char_type __fill, const string_type& __digits) const
25706 { return this->do_put(__s, __intl, __io, __fill, __digits); }
25707
25708 protected:
25709
25710 virtual
25711 ~money_put() { }
25712 # 4286 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25713 virtual iter_type
25714 __do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
25715 double __units) const;
25716 # 4313 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25717 virtual iter_type
25718 do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
25719 const string_type& __digits) const;
25720
25721
25722
25723 virtual iter_type
25724 do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
25725 long double __units) const;
25726
25727
25728 template<bool _Intl>
25729 iter_type
25730 _M_insert(iter_type __s, ios_base& __io, char_type __fill,
25731 const string_type& __digits) const;
25732 };
25733
25734 template<typename _CharT, typename _OutIter>
25735 locale::id money_put<_CharT, _OutIter>::id;
25736
25737 }
25738
25739
25740
25741
25742 struct messages_base
25743 {
25744 typedef int catalog;
25745 };
25746 # 4363 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25747 template<typename _CharT>
25748 class messages : public locale::facet, public messages_base
25749 {
25750 public:
25751
25752
25753
25754 typedef _CharT char_type;
25755 typedef basic_string<_CharT> string_type;
25756
25757
25758 protected:
25759
25760
25761 __c_locale _M_c_locale_messages;
25762 const char* _M_name_messages;
25763
25764 public:
25765
25766 static locale::id id;
25767 # 4391 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25768 explicit
25769 messages(size_t __refs = 0);
25770 # 4405 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25771 explicit
25772 messages(__c_locale __cloc, const char* __s, size_t __refs = 0);
25773 # 4418 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25774 catalog
25775 open(const basic_string<char>& __s, const locale& __loc) const
25776 { return this->do_open(__s, __loc); }
25777 # 4436 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25778 catalog
25779 open(const basic_string<char>&, const locale&, const char*) const;
25780 # 4454 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25781 string_type
25782 get(catalog __c, int __set, int __msgid, const string_type& __s) const
25783 { return this->do_get(__c, __set, __msgid, __s); }
25784 # 4465 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25785 void
25786 close(catalog __c) const
25787 { return this->do_close(__c); }
25788
25789 protected:
25790
25791 virtual
25792 ~messages();
25793 # 4485 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25794 virtual catalog
25795 do_open(const basic_string<char>&, const locale&) const;
25796 # 4504 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25797 virtual string_type
25798 do_get(catalog, int, int, const string_type& __dfault) const;
25799
25800
25801
25802
25803
25804
25805 virtual void
25806 do_close(catalog) const;
25807
25808
25809 char*
25810 _M_convert_to_char(const string_type& __msg) const
25811 {
25812
25813 return reinterpret_cast<char*>(const_cast<_CharT*>(__msg.c_str()));
25814 }
25815
25816
25817 string_type
25818 _M_convert_from_char(char*) const
25819 {
25820 # 4561 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3
25821 return string_type();
25822 }
25823 };
25824
25825 template<typename _CharT>
25826 locale::id messages<_CharT>::id;
25827
25828
25829 template<>
25830 string
25831 messages<char>::do_get(catalog, int, int, const string&) const;
25832
25833
25834 template<>
25835 wstring
25836 messages<wchar_t>::do_get(catalog, int, int, const wstring&) const;
25837
25838
25839
25840 template<typename _CharT>
25841 class messages_byname : public messages<_CharT>
25842 {
25843 public:
25844 typedef _CharT char_type;
25845 typedef basic_string<_CharT> string_type;
25846
25847 explicit
25848 messages_byname(const char* __s, size_t __refs = 0);
25849
25850 protected:
25851 virtual
25852 ~messages_byname()
25853 { }
25854 };
25855
25856 }
25857
25858
25859 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/messages_members.h" 1 3
25860 # 41 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/messages_members.h" 3
25861 namespace std __attribute__ ((__visibility__ ("default"))) {
25862
25863
25864 template<typename _CharT>
25865 messages<_CharT>::messages(size_t __refs)
25866 : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
25867 _M_name_messages(_S_get_c_name())
25868 { }
25869
25870 template<typename _CharT>
25871 messages<_CharT>::messages(__c_locale __cloc, const char* __s,
25872 size_t __refs)
25873 : facet(__refs), _M_c_locale_messages(__null), _M_name_messages(__null)
25874 {
25875 const size_t __len = std::strlen(__s) + 1;
25876 char* __tmp = new char[__len];
25877 std::memcpy(__tmp, __s, __len);
25878 _M_name_messages = __tmp;
25879
25880
25881 _M_c_locale_messages = _S_clone_c_locale(__cloc);
25882 }
25883
25884 template<typename _CharT>
25885 typename messages<_CharT>::catalog
25886 messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
25887 const char* __dir) const
25888 {
25889 bindtextdomain(__s.c_str(), __dir);
25890 return this->do_open(__s, __loc);
25891 }
25892
25893
25894 template<typename _CharT>
25895 messages<_CharT>::~messages()
25896 {
25897 if (_M_name_messages != _S_get_c_name())
25898 delete [] _M_name_messages;
25899 _S_destroy_c_locale(_M_c_locale_messages);
25900 }
25901
25902 template<typename _CharT>
25903 typename messages<_CharT>::catalog
25904 messages<_CharT>::do_open(const basic_string<char>& __s,
25905 const locale&) const
25906 {
25907
25908
25909 textdomain(__s.c_str());
25910 return 0;
25911 }
25912
25913 template<typename _CharT>
25914 void
25915 messages<_CharT>::do_close(catalog) const
25916 { }
25917
25918
25919 template<typename _CharT>
25920 messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
25921 : messages<_CharT>(__refs)
25922 {
25923 if (this->_M_name_messages != locale::facet::_S_get_c_name())
25924 delete [] this->_M_name_messages;
25925 char* __tmp = new char[std::strlen(__s) + 1];
25926 std::strcpy(__tmp, __s);
25927 this->_M_name_messages = __tmp;
25928
25929 if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
25930 {
25931 this->_S_destroy_c_locale(this->_M_c_locale_messages);
25932 this->_S_create_c_locale(this->_M_c_locale_messages, __s);
25933 }
25934 }
25935
25936 }
25937 # 4600 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 2 3
25938
25939 namespace std __attribute__ ((__visibility__ ("default"))) {
25940
25941
25942
25943
25944
25945
25946
25947 template<typename _CharT>
25948 inline bool
25949 isspace(_CharT __c, const locale& __loc)
25950 { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::space, __c); }
25951
25952
25953 template<typename _CharT>
25954 inline bool
25955 isprint(_CharT __c, const locale& __loc)
25956 { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::print, __c); }
25957
25958
25959 template<typename _CharT>
25960 inline bool
25961 iscntrl(_CharT __c, const locale& __loc)
25962 { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::cntrl, __c); }
25963
25964
25965 template<typename _CharT>
25966 inline bool
25967 isupper(_CharT __c, const locale& __loc)
25968 { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::upper, __c); }
25969
25970
25971 template<typename _CharT>
25972 inline bool
25973 islower(_CharT __c, const locale& __loc)
25974 { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::lower, __c); }
25975
25976
25977 template<typename _CharT>
25978 inline bool
25979 isalpha(_CharT __c, const locale& __loc)
25980 { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alpha, __c); }
25981
25982
25983 template<typename _CharT>
25984 inline bool
25985 isdigit(_CharT __c, const locale& __loc)
25986 { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::digit, __c); }
25987
25988
25989 template<typename _CharT>
25990 inline bool
25991 ispunct(_CharT __c, const locale& __loc)
25992 { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::punct, __c); }
25993
25994
25995 template<typename _CharT>
25996 inline bool
25997 isxdigit(_CharT __c, const locale& __loc)
25998 { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::xdigit, __c); }
25999
26000
26001 template<typename _CharT>
26002 inline bool
26003 isalnum(_CharT __c, const locale& __loc)
26004 { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alnum, __c); }
26005
26006
26007 template<typename _CharT>
26008 inline bool
26009 isgraph(_CharT __c, const locale& __loc)
26010 { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::graph, __c); }
26011
26012
26013 template<typename _CharT>
26014 inline _CharT
26015 toupper(_CharT __c, const locale& __loc)
26016 { return use_facet<ctype<_CharT> >(__loc).toupper(__c); }
26017
26018
26019 template<typename _CharT>
26020 inline _CharT
26021 tolower(_CharT __c, const locale& __loc)
26022 { return use_facet<ctype<_CharT> >(__loc).tolower(__c); }
26023
26024 }
26025 # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 2 3
26026
26027 namespace std __attribute__ ((__visibility__ ("default"))) {
26028 # 55 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3
26029 template<typename _CharT, typename _Traits>
26030 class basic_ios : public ios_base
26031 {
26032 public:
26033
26034
26035
26036
26037
26038
26039 typedef _CharT char_type;
26040 typedef typename _Traits::int_type int_type;
26041 typedef typename _Traits::pos_type pos_type;
26042 typedef typename _Traits::off_type off_type;
26043 typedef _Traits traits_type;
26044 # 78 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3
26045 typedef ctype<_CharT> __ctype_type;
26046 typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> >
26047 __num_put_type;
26048 typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> >
26049 __num_get_type;
26050
26051
26052
26053 protected:
26054 basic_ostream<_CharT, _Traits>* _M_tie;
26055 mutable char_type _M_fill;
26056 mutable bool _M_fill_init;
26057 basic_streambuf<_CharT, _Traits>* _M_streambuf;
26058
26059
26060 const __ctype_type* _M_ctype;
26061
26062 const __num_put_type* _M_num_put;
26063
26064 const __num_get_type* _M_num_get;
26065
26066 public:
26067
26068
26069
26070
26071
26072
26073
26074 operator void*() const
26075 { return this->fail() ? 0 : const_cast<basic_ios*>(this); }
26076
26077 bool
26078 operator!() const
26079 { return this->fail(); }
26080 # 122 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3
26081 iostate
26082 rdstate() const
26083 { return _M_streambuf_state; }
26084 # 133 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3
26085 void
26086 clear(iostate __state = goodbit);
26087
26088
26089
26090
26091
26092
26093
26094 void
26095 setstate(iostate __state)
26096 { this->clear(this->rdstate() | __state); }
26097
26098
26099
26100
26101 void
26102 _M_setstate(iostate __state)
26103 {
26104
26105
26106 _M_streambuf_state |= __state;
26107 if (this->exceptions() & __state)
26108 throw;
26109 }
26110
26111
26112
26113
26114
26115
26116
26117 bool
26118 good() const
26119 { return this->rdstate() == 0; }
26120
26121
26122
26123
26124
26125
26126
26127 bool
26128 eof() const
26129 { return (this->rdstate() & eofbit) != 0; }
26130 # 186 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3
26131 bool
26132 fail() const
26133 { return (this->rdstate() & (badbit | failbit)) != 0; }
26134
26135
26136
26137
26138
26139
26140
26141 bool
26142 bad() const
26143 { return (this->rdstate() & badbit) != 0; }
26144 # 207 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3
26145 iostate
26146 exceptions() const
26147 { return _M_exception; }
26148 # 242 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3
26149 void
26150 exceptions(iostate __except)
26151 {
26152 _M_exception = __except;
26153 this->clear(_M_streambuf_state);
26154 }
26155
26156
26157
26158
26159
26160
26161
26162 explicit
26163 basic_ios(basic_streambuf<_CharT, _Traits>* __sb)
26164 : ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0),
26165 _M_ctype(0), _M_num_put(0), _M_num_get(0)
26166 { this->init(__sb); }
26167
26168
26169
26170
26171
26172
26173
26174 virtual
26175 ~basic_ios() { }
26176 # 280 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3
26177 basic_ostream<_CharT, _Traits>*
26178 tie() const
26179 { return _M_tie; }
26180 # 292 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3
26181 basic_ostream<_CharT, _Traits>*
26182 tie(basic_ostream<_CharT, _Traits>* __tiestr)
26183 {
26184 basic_ostream<_CharT, _Traits>* __old = _M_tie;
26185 _M_tie = __tiestr;
26186 return __old;
26187 }
26188
26189
26190
26191
26192
26193
26194
26195 basic_streambuf<_CharT, _Traits>*
26196 rdbuf() const
26197 { return _M_streambuf; }
26198 # 332 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3
26199 basic_streambuf<_CharT, _Traits>*
26200 rdbuf(basic_streambuf<_CharT, _Traits>* __sb);
26201 # 346 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3
26202 basic_ios&
26203 copyfmt(const basic_ios& __rhs);
26204
26205
26206
26207
26208
26209
26210
26211 char_type
26212 fill() const
26213 {
26214 if (!_M_fill_init)
26215 {
26216 _M_fill = this->widen(' ');
26217 _M_fill_init = true;
26218 }
26219 return _M_fill;
26220 }
26221 # 375 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3
26222 char_type
26223 fill(char_type __ch)
26224 {
26225 char_type __old = this->fill();
26226 _M_fill = __ch;
26227 return __old;
26228 }
26229 # 395 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3
26230 locale
26231 imbue(const locale& __loc);
26232 # 415 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3
26233 char
26234 narrow(char_type __c, char __dfault) const;
26235 # 433 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3
26236 char_type
26237 widen(char __c) const;
26238
26239 protected:
26240
26241
26242
26243
26244
26245
26246
26247 basic_ios()
26248 : ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false),
26249 _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0)
26250 { }
26251
26252
26253
26254
26255
26256
26257
26258 void
26259 init(basic_streambuf<_CharT, _Traits>* __sb);
26260
26261 void
26262 _M_cache_locale(const locale& __loc);
26263 };
26264
26265 }
26266
26267
26268 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.tcc" 1 3
26269 # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.tcc" 3
26270
26271 # 40 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.tcc" 3
26272
26273 namespace std __attribute__ ((__visibility__ ("default"))) {
26274
26275 template<typename _CharT, typename _Traits>
26276 void
26277 basic_ios<_CharT, _Traits>::clear(iostate __state)
26278 {
26279 if (this->rdbuf())
26280 _M_streambuf_state = __state;
26281 else
26282 _M_streambuf_state = __state | badbit;
26283 if (this->exceptions() & this->rdstate())
26284 __throw_ios_failure(("basic_ios::clear"));
26285 }
26286
26287 template<typename _CharT, typename _Traits>
26288 basic_streambuf<_CharT, _Traits>*
26289 basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __sb)
26290 {
26291 basic_streambuf<_CharT, _Traits>* __old = _M_streambuf;
26292 _M_streambuf = __sb;
26293 this->clear();
26294 return __old;
26295 }
26296
26297 template<typename _CharT, typename _Traits>
26298 basic_ios<_CharT, _Traits>&
26299 basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs)
26300 {
26301
26302
26303 if (this != &__rhs)
26304 {
26305
26306
26307
26308
26309 _Words* __words = (__rhs._M_word_size <= _S_local_word_size) ?
26310 _M_local_word : new _Words[__rhs._M_word_size];
26311
26312
26313 _Callback_list* __cb = __rhs._M_callbacks;
26314 if (__cb)
26315 __cb->_M_add_reference();
26316 _M_call_callbacks(erase_event);
26317 if (_M_word != _M_local_word)
26318 {
26319 delete [] _M_word;
26320 _M_word = 0;
26321 }
26322 _M_dispose_callbacks();
26323
26324
26325 _M_callbacks = __cb;
26326 for (int __i = 0; __i < __rhs._M_word_size; ++__i)
26327 __words[__i] = __rhs._M_word[__i];
26328 _M_word = __words;
26329 _M_word_size = __rhs._M_word_size;
26330
26331 this->flags(__rhs.flags());
26332 this->width(__rhs.width());
26333 this->precision(__rhs.precision());
26334 this->tie(__rhs.tie());
26335 this->fill(__rhs.fill());
26336 _M_ios_locale = __rhs.getloc();
26337 _M_cache_locale(_M_ios_locale);
26338
26339 _M_call_callbacks(copyfmt_event);
26340
26341
26342 this->exceptions(__rhs.exceptions());
26343 }
26344 return *this;
26345 }
26346
26347 template<typename _CharT, typename _Traits>
26348 char
26349 basic_ios<_CharT, _Traits>::narrow(char_type __c, char __dfault) const
26350 { return __check_facet(_M_ctype).narrow(__c, __dfault); }
26351
26352 template<typename _CharT, typename _Traits>
26353 _CharT
26354 basic_ios<_CharT, _Traits>::widen(char __c) const
26355 { return __check_facet(_M_ctype).widen(__c); }
26356
26357
26358 template<typename _CharT, typename _Traits>
26359 locale
26360 basic_ios<_CharT, _Traits>::imbue(const locale& __loc)
26361 {
26362 locale __old(this->getloc());
26363 ios_base::imbue(__loc);
26364 _M_cache_locale(__loc);
26365 if (this->rdbuf() != 0)
26366 this->rdbuf()->pubimbue(__loc);
26367 return __old;
26368 }
26369
26370 template<typename _CharT, typename _Traits>
26371 void
26372 basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb)
26373 {
26374
26375 ios_base::_M_init();
26376
26377
26378 _M_cache_locale(_M_ios_locale);
26379 # 160 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.tcc" 3
26380 _M_fill = _CharT();
26381 _M_fill_init = false;
26382
26383 _M_tie = 0;
26384 _M_exception = goodbit;
26385 _M_streambuf = __sb;
26386 _M_streambuf_state = __sb ? goodbit : badbit;
26387 }
26388
26389 template<typename _CharT, typename _Traits>
26390 void
26391 basic_ios<_CharT, _Traits>::_M_cache_locale(const locale& __loc)
26392 {
26393 if (__builtin_expect(has_facet<__ctype_type>(__loc), true))
26394 _M_ctype = &use_facet<__ctype_type>(__loc);
26395 else
26396 _M_ctype = 0;
26397
26398 if (__builtin_expect(has_facet<__num_put_type>(__loc), true))
26399 _M_num_put = &use_facet<__num_put_type>(__loc);
26400 else
26401 _M_num_put = 0;
26402
26403 if (__builtin_expect(has_facet<__num_get_type>(__loc), true))
26404 _M_num_get = &use_facet<__num_get_type>(__loc);
26405 else
26406 _M_num_get = 0;
26407 }
26408
26409
26410
26411
26412
26413 extern template class basic_ios<char>;
26414
26415
26416 extern template class basic_ios<wchar_t>;
26417
26418
26419
26420 }
26421 # 466 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 2 3
26422 # 51 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ios" 2 3
26423 # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 2 3
26424
26425
26426 namespace std __attribute__ ((__visibility__ ("default"))) {
26427 # 58 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3
26428 template<typename _CharT, typename _Traits>
26429 class basic_ostream : virtual public basic_ios<_CharT, _Traits>
26430 {
26431 public:
26432
26433 typedef _CharT char_type;
26434 typedef typename _Traits::int_type int_type;
26435 typedef typename _Traits::pos_type pos_type;
26436 typedef typename _Traits::off_type off_type;
26437 typedef _Traits traits_type;
26438
26439
26440 typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
26441 typedef basic_ios<_CharT, _Traits> __ios_type;
26442 typedef basic_ostream<_CharT, _Traits> __ostream_type;
26443 typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> >
26444 __num_put_type;
26445 typedef ctype<_CharT> __ctype_type;
26446 # 85 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3
26447 explicit
26448 basic_ostream(__streambuf_type* __sb)
26449 { this->init(__sb); }
26450
26451
26452
26453
26454
26455
26456 virtual
26457 ~basic_ostream() { }
26458
26459
26460 class sentry;
26461 friend class sentry;
26462 # 111 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3
26463 __ostream_type&
26464 operator<<(__ostream_type& (*__pf)(__ostream_type&))
26465 {
26466
26467
26468
26469 return __pf(*this);
26470 }
26471
26472 __ostream_type&
26473 operator<<(__ios_type& (*__pf)(__ios_type&))
26474 {
26475
26476
26477
26478 __pf(*this);
26479 return *this;
26480 }
26481
26482 __ostream_type&
26483 operator<<(ios_base& (*__pf) (ios_base&))
26484 {
26485
26486
26487
26488 __pf(*this);
26489 return *this;
26490 }
26491 # 168 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3
26492 __ostream_type&
26493 operator<<(long __n)
26494 { return _M_insert(__n); }
26495
26496 __ostream_type&
26497 operator<<(unsigned long __n)
26498 { return _M_insert(__n); }
26499
26500 __ostream_type&
26501 operator<<(bool __n)
26502 { return _M_insert(__n); }
26503
26504 __ostream_type&
26505 operator<<(short __n);
26506
26507 __ostream_type&
26508 operator<<(unsigned short __n)
26509 {
26510
26511
26512 return _M_insert(static_cast<unsigned long>(__n));
26513 }
26514
26515 __ostream_type&
26516 operator<<(int __n);
26517
26518 __ostream_type&
26519 operator<<(unsigned int __n)
26520 {
26521
26522
26523 return _M_insert(static_cast<unsigned long>(__n));
26524 }
26525
26526
26527 __ostream_type&
26528 operator<<(long long __n)
26529 { return _M_insert(__n); }
26530
26531 __ostream_type&
26532 operator<<(unsigned long long __n)
26533 { return _M_insert(__n); }
26534
26535
26536 __ostream_type&
26537 operator<<(double __f)
26538 { return _M_insert(__f); }
26539
26540 __ostream_type&
26541 operator<<(float __f)
26542 {
26543
26544
26545 return _M_insert(static_cast<double>(__f));
26546 }
26547
26548 __ostream_type&
26549 operator<<(long double __f)
26550 { return _M_insert(__f); }
26551
26552 __ostream_type&
26553 operator<<(const void* __p)
26554 { return _M_insert(__p); }
26555 # 253 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3
26556 __ostream_type&
26557 operator<<(__streambuf_type* __sb);
26558 # 286 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3
26559 __ostream_type&
26560 put(char_type __c);
26561
26562
26563 void
26564 _M_write(const char_type* __s, streamsize __n)
26565 {
26566 const streamsize __put = this->rdbuf()->sputn(__s, __n);
26567 if (__put != __n)
26568 this->setstate(ios_base::badbit);
26569 }
26570 # 314 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3
26571 __ostream_type&
26572 write(const char_type* __s, streamsize __n);
26573 # 327 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3
26574 __ostream_type&
26575 flush();
26576 # 338 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3
26577 pos_type
26578 tellp();
26579 # 349 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3
26580 __ostream_type&
26581 seekp(pos_type);
26582 # 361 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3
26583 __ostream_type&
26584 seekp(off_type, ios_base::seekdir);
26585
26586 protected:
26587 explicit
26588 basic_ostream() { }
26589
26590 template<typename _ValueT>
26591 __ostream_type&
26592 _M_insert(_ValueT __v);
26593 };
26594 # 383 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3
26595 template <typename _CharT, typename _Traits>
26596 class basic_ostream<_CharT, _Traits>::sentry
26597 {
26598
26599 bool _M_ok;
26600 basic_ostream<_CharT, _Traits>& _M_os;
26601
26602 public:
26603 # 402 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3
26604 explicit
26605 sentry(basic_ostream<_CharT, _Traits>& __os);
26606 # 412 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3
26607 ~sentry()
26608 {
26609
26610 if (_M_os.flags() & ios_base::unitbuf && !uncaught_exception())
26611 {
26612
26613 if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1)
26614 _M_os.setstate(ios_base::badbit);
26615 }
26616 }
26617 # 430 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3
26618 operator bool() const
26619 { return _M_ok; }
26620 };
26621 # 451 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3
26622 template<typename _CharT, typename _Traits>
26623 inline basic_ostream<_CharT, _Traits>&
26624 operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
26625 { return __ostream_insert(__out, &__c, 1); }
26626
26627 template<typename _CharT, typename _Traits>
26628 inline basic_ostream<_CharT, _Traits>&
26629 operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
26630 { return (__out << __out.widen(__c)); }
26631
26632
26633 template <class _Traits>
26634 inline basic_ostream<char, _Traits>&
26635 operator<<(basic_ostream<char, _Traits>& __out, char __c)
26636 { return __ostream_insert(__out, &__c, 1); }
26637
26638
26639 template<class _Traits>
26640 inline basic_ostream<char, _Traits>&
26641 operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
26642 { return (__out << static_cast<char>(__c)); }
26643
26644 template<class _Traits>
26645 inline basic_ostream<char, _Traits>&
26646 operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
26647 { return (__out << static_cast<char>(__c)); }
26648 # 493 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3
26649 template<typename _CharT, typename _Traits>
26650 inline basic_ostream<_CharT, _Traits>&
26651 operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
26652 {
26653 if (!__s)
26654 __out.setstate(ios_base::badbit);
26655 else
26656 __ostream_insert(__out, __s,
26657 static_cast<streamsize>(_Traits::length(__s)));
26658 return __out;
26659 }
26660
26661 template<typename _CharT, typename _Traits>
26662 basic_ostream<_CharT, _Traits> &
26663 operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s);
26664
26665
26666 template<class _Traits>
26667 inline basic_ostream<char, _Traits>&
26668 operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
26669 {
26670 if (!__s)
26671 __out.setstate(ios_base::badbit);
26672 else
26673 __ostream_insert(__out, __s,
26674 static_cast<streamsize>(_Traits::length(__s)));
26675 return __out;
26676 }
26677
26678
26679 template<class _Traits>
26680 inline basic_ostream<char, _Traits>&
26681 operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
26682 { return (__out << reinterpret_cast<const char*>(__s)); }
26683
26684 template<class _Traits>
26685 inline basic_ostream<char, _Traits> &
26686 operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
26687 { return (__out << reinterpret_cast<const char*>(__s)); }
26688 # 543 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3
26689 template<typename _CharT, typename _Traits>
26690 inline basic_ostream<_CharT, _Traits>&
26691 endl(basic_ostream<_CharT, _Traits>& __os)
26692 { return flush(__os.put(__os.widen('\n'))); }
26693
26694
26695
26696
26697
26698
26699
26700 template<typename _CharT, typename _Traits>
26701 inline basic_ostream<_CharT, _Traits>&
26702 ends(basic_ostream<_CharT, _Traits>& __os)
26703 { return __os.put(_CharT()); }
26704
26705
26706
26707
26708
26709
26710 template<typename _CharT, typename _Traits>
26711 inline basic_ostream<_CharT, _Traits>&
26712 flush(basic_ostream<_CharT, _Traits>& __os)
26713 { return __os.flush(); }
26714
26715 }
26716
26717
26718 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ostream.tcc" 1 3
26719 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ostream.tcc" 3
26720
26721 # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ostream.tcc" 3
26722
26723 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/locale" 1 3
26724 # 41 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/locale" 3
26725
26726 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/locale" 3
26727
26728
26729
26730
26731 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.tcc" 1 3
26732 # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.tcc" 3
26733
26734 # 40 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.tcc" 3
26735
26736
26737 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/typeinfo" 1 3
26738 # 41 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/typeinfo" 3
26739 #pragma GCC visibility push(default)
26740
26741 extern "C++" {
26742
26743 namespace __cxxabiv1
26744 {
26745 class __class_type_info;
26746 }
26747 # 60 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/typeinfo" 3
26748 namespace std
26749 {
26750
26751
26752
26753
26754
26755
26756 class type_info
26757 {
26758 public:
26759
26760
26761
26762
26763 virtual ~type_info();
26764
26765 private:
26766
26767 type_info& operator=(const type_info&);
26768 type_info(const type_info&);
26769
26770 protected:
26771 const char *__name;
26772
26773 protected:
26774 explicit type_info(const char *__n): __name(__n) { }
26775
26776 public:
26777
26778
26779
26780 const char* name() const
26781 { return __name; }
26782 # 106 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/typeinfo" 3
26783 bool before(const type_info& __arg) const
26784 { return __name < __arg.__name; }
26785 bool operator==(const type_info& __arg) const
26786 { return __name == __arg.__name; }
26787
26788 bool operator!=(const type_info& __arg) const
26789 { return !operator==(__arg); }
26790
26791
26792 public:
26793
26794 virtual bool __is_pointer_p() const;
26795
26796 virtual bool __is_function_p() const;
26797
26798
26799
26800
26801
26802
26803
26804 virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj,
26805 unsigned __outer) const;
26806
26807
26808 virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target,
26809 void **__obj_ptr) const;
26810 };
26811
26812
26813
26814
26815
26816
26817 class bad_cast : public exception
26818 {
26819 public:
26820 bad_cast() throw() { }
26821
26822
26823 virtual ~bad_cast() throw();
26824
26825 virtual const char* what() const throw();
26826 };
26827
26828
26829 class bad_typeid : public exception
26830 {
26831 public:
26832 bad_typeid () throw() { }
26833
26834
26835 virtual ~bad_typeid() throw();
26836
26837 virtual const char* what() const throw();
26838 };
26839 }
26840
26841 #pragma GCC visibility pop
26842
26843 }
26844 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.tcc" 2 3
26845
26846
26847
26848 namespace std __attribute__ ((__visibility__ ("default"))) {
26849
26850 template<typename _Facet>
26851 locale
26852 locale::combine(const locale& __other) const
26853 {
26854 _Impl* __tmp = new _Impl(*_M_impl, 1);
26855 try
26856 {
26857 __tmp->_M_replace_facet(__other._M_impl, &_Facet::id);
26858 }
26859 catch(...)
26860 {
26861 __tmp->_M_remove_reference();
26862 throw;
26863 }
26864 return locale(__tmp);
26865 }
26866
26867 template<typename _CharT, typename _Traits, typename _Alloc>
26868 bool
26869 locale::operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1,
26870 const basic_string<_CharT, _Traits, _Alloc>& __s2) const
26871 {
26872 typedef std::collate<_CharT> __collate_type;
26873 const __collate_type& __collate = use_facet<__collate_type>(*this);
26874 return (__collate.compare(__s1.data(), __s1.data() + __s1.length(),
26875 __s2.data(), __s2.data() + __s2.length()) < 0);
26876 }
26877 # 87 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.tcc" 3
26878 template<typename _Facet>
26879 inline bool
26880 has_facet(const locale& __loc) throw()
26881 {
26882 const size_t __i = _Facet::id._M_id();
26883 const locale::facet** __facets = __loc._M_impl->_M_facets;
26884 return (__i < __loc._M_impl->_M_facets_size && __facets[__i]);
26885 }
26886 # 109 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.tcc" 3
26887 template<typename _Facet>
26888 inline const _Facet&
26889 use_facet(const locale& __loc)
26890 {
26891 const size_t __i = _Facet::id._M_id();
26892 const locale::facet** __facets = __loc._M_impl->_M_facets;
26893 if (!(__i < __loc._M_impl->_M_facets_size && __facets[__i]))
26894 __throw_bad_cast();
26895 return static_cast<const _Facet&>(*__facets[__i]);
26896 }
26897
26898
26899
26900 template<typename _Facet>
26901 struct __use_cache
26902 {
26903 const _Facet*
26904 operator() (const locale& __loc) const;
26905 };
26906
26907
26908 template<typename _CharT>
26909 struct __use_cache<__numpunct_cache<_CharT> >
26910 {
26911 const __numpunct_cache<_CharT>*
26912 operator() (const locale& __loc) const
26913 {
26914 const size_t __i = numpunct<_CharT>::id._M_id();
26915 const locale::facet** __caches = __loc._M_impl->_M_caches;
26916 if (!__caches[__i])
26917 {
26918 __numpunct_cache<_CharT>* __tmp = __null;
26919 try
26920 {
26921 __tmp = new __numpunct_cache<_CharT>;
26922 __tmp->_M_cache(__loc);
26923 }
26924 catch(...)
26925 {
26926 delete __tmp;
26927 throw;
26928 }
26929 __loc._M_impl->_M_install_cache(__tmp, __i);
26930 }
26931 return static_cast<const __numpunct_cache<_CharT>*>(__caches[__i]);
26932 }
26933 };
26934
26935 template<typename _CharT, bool _Intl>
26936 struct __use_cache<__moneypunct_cache<_CharT, _Intl> >
26937 {
26938 const __moneypunct_cache<_CharT, _Intl>*
26939 operator() (const locale& __loc) const
26940 {
26941 const size_t __i = moneypunct<_CharT, _Intl>::id._M_id();
26942 const locale::facet** __caches = __loc._M_impl->_M_caches;
26943 if (!__caches[__i])
26944 {
26945 __moneypunct_cache<_CharT, _Intl>* __tmp = __null;
26946 try
26947 {
26948 __tmp = new __moneypunct_cache<_CharT, _Intl>;
26949 __tmp->_M_cache(__loc);
26950 }
26951 catch(...)
26952 {
26953 delete __tmp;
26954 throw;
26955 }
26956 __loc._M_impl->_M_install_cache(__tmp, __i);
26957 }
26958 return static_cast<
26959 const __moneypunct_cache<_CharT, _Intl>*>(__caches[__i]);
26960 }
26961 };
26962
26963 template<typename _CharT>
26964 void
26965 __numpunct_cache<_CharT>::_M_cache(const locale& __loc)
26966 {
26967 _M_allocated = true;
26968
26969 const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc);
26970
26971 _M_grouping_size = __np.grouping().size();
26972 char* __grouping = new char[_M_grouping_size];
26973 __np.grouping().copy(__grouping, _M_grouping_size);
26974 _M_grouping = __grouping;
26975 _M_use_grouping = (_M_grouping_size
26976 && static_cast<signed char>(__np.grouping()[0]) > 0);
26977
26978 _M_truename_size = __np.truename().size();
26979 _CharT* __truename = new _CharT[_M_truename_size];
26980 __np.truename().copy(__truename, _M_truename_size);
26981 _M_truename = __truename;
26982
26983 _M_falsename_size = __np.falsename().size();
26984 _CharT* __falsename = new _CharT[_M_falsename_size];
26985 __np.falsename().copy(__falsename, _M_falsename_size);
26986 _M_falsename = __falsename;
26987
26988 _M_decimal_point = __np.decimal_point();
26989 _M_thousands_sep = __np.thousands_sep();
26990
26991 const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__loc);
26992 __ct.widen(__num_base::_S_atoms_out,
26993 __num_base::_S_atoms_out + __num_base::_S_oend, _M_atoms_out);
26994 __ct.widen(__num_base::_S_atoms_in,
26995 __num_base::_S_atoms_in + __num_base::_S_iend, _M_atoms_in);
26996 }
26997
26998 template<typename _CharT, bool _Intl>
26999 void
27000 __moneypunct_cache<_CharT, _Intl>::_M_cache(const locale& __loc)
27001 {
27002 _M_allocated = true;
27003
27004 const moneypunct<_CharT, _Intl>& __mp =
27005 use_facet<moneypunct<_CharT, _Intl> >(__loc);
27006
27007 _M_grouping_size = __mp.grouping().size();
27008 char* __grouping = new char[_M_grouping_size];
27009 __mp.grouping().copy(__grouping, _M_grouping_size);
27010 _M_grouping = __grouping;
27011 _M_use_grouping = (_M_grouping_size
27012 && static_cast<signed char>(__mp.grouping()[0]) > 0);
27013
27014 _M_decimal_point = __mp.decimal_point();
27015 _M_thousands_sep = __mp.thousands_sep();
27016 _M_frac_digits = __mp.frac_digits();
27017
27018 _M_curr_symbol_size = __mp.curr_symbol().size();
27019 _CharT* __curr_symbol = new _CharT[_M_curr_symbol_size];
27020 __mp.curr_symbol().copy(__curr_symbol, _M_curr_symbol_size);
27021 _M_curr_symbol = __curr_symbol;
27022
27023 _M_positive_sign_size = __mp.positive_sign().size();
27024 _CharT* __positive_sign = new _CharT[_M_positive_sign_size];
27025 __mp.positive_sign().copy(__positive_sign, _M_positive_sign_size);
27026 _M_positive_sign = __positive_sign;
27027
27028 _M_negative_sign_size = __mp.negative_sign().size();
27029 _CharT* __negative_sign = new _CharT[_M_negative_sign_size];
27030 __mp.negative_sign().copy(__negative_sign, _M_negative_sign_size);
27031 _M_negative_sign = __negative_sign;
27032
27033 _M_pos_format = __mp.pos_format();
27034 _M_neg_format = __mp.neg_format();
27035
27036 const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__loc);
27037 __ct.widen(money_base::_S_atoms,
27038 money_base::_S_atoms + money_base::_S_end, _M_atoms);
27039 }
27040 # 272 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.tcc" 3
27041 static bool
27042 __verify_grouping(const char* __grouping, size_t __grouping_size,
27043 const string& __grouping_tmp);
27044
27045 namespace __gnu_cxx_ldbl128 {
27046
27047 template<typename _CharT, typename _InIter>
27048 _InIter
27049 num_get<_CharT, _InIter>::
27050 _M_extract_float(_InIter __beg, _InIter __end, ios_base& __io,
27051 ios_base::iostate& __err, string& __xtrc) const
27052 {
27053 typedef char_traits<_CharT> __traits_type;
27054 typedef __numpunct_cache<_CharT> __cache_type;
27055 __use_cache<__cache_type> __uc;
27056 const locale& __loc = __io._M_getloc();
27057 const __cache_type* __lc = __uc(__loc);
27058 const _CharT* __lit = __lc->_M_atoms_in;
27059 char_type __c = char_type();
27060
27061
27062 bool __testeof = __beg == __end;
27063
27064
27065 if (!__testeof)
27066 {
27067 __c = *__beg;
27068 const bool __plus = __c == __lit[__num_base::_S_iplus];
27069 if ((__plus || __c == __lit[__num_base::_S_iminus])
27070 && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
27071 && !(__c == __lc->_M_decimal_point))
27072 {
27073 __xtrc += __plus ? '+' : '-';
27074 if (++__beg != __end)
27075 __c = *__beg;
27076 else
27077 __testeof = true;
27078 }
27079 }
27080
27081
27082 bool __found_mantissa = false;
27083 int __sep_pos = 0;
27084 while (!__testeof)
27085 {
27086 if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep
27087 || __c == __lc->_M_decimal_point)
27088 break;
27089 else if (__c == __lit[__num_base::_S_izero])
27090 {
27091 if (!__found_mantissa)
27092 {
27093 __xtrc += '0';
27094 __found_mantissa = true;
27095 }
27096 ++__sep_pos;
27097
27098 if (++__beg != __end)
27099 __c = *__beg;
27100 else
27101 __testeof = true;
27102 }
27103 else
27104 break;
27105 }
27106
27107
27108 bool __found_dec = false;
27109 bool __found_sci = false;
27110 string __found_grouping;
27111 if (__lc->_M_use_grouping)
27112 __found_grouping.reserve(32);
27113 const char_type* __lit_zero = __lit + __num_base::_S_izero;
27114
27115 if (!__lc->_M_allocated)
27116
27117 while (!__testeof)
27118 {
27119 const int __digit = _M_find(__lit_zero, 10, __c);
27120 if (__digit != -1)
27121 {
27122 __xtrc += '0' + __digit;
27123 __found_mantissa = true;
27124 }
27125 else if (__c == __lc->_M_decimal_point
27126 && !__found_dec && !__found_sci)
27127 {
27128 __xtrc += '.';
27129 __found_dec = true;
27130 }
27131 else if ((__c == __lit[__num_base::_S_ie]
27132 || __c == __lit[__num_base::_S_iE])
27133 && !__found_sci && __found_mantissa)
27134 {
27135
27136 __xtrc += 'e';
27137 __found_sci = true;
27138
27139
27140 if (++__beg != __end)
27141 {
27142 __c = *__beg;
27143 const bool __plus = __c == __lit[__num_base::_S_iplus];
27144 if (__plus || __c == __lit[__num_base::_S_iminus])
27145 __xtrc += __plus ? '+' : '-';
27146 else
27147 continue;
27148 }
27149 else
27150 {
27151 __testeof = true;
27152 break;
27153 }
27154 }
27155 else
27156 break;
27157
27158 if (++__beg != __end)
27159 __c = *__beg;
27160 else
27161 __testeof = true;
27162 }
27163 else
27164 while (!__testeof)
27165 {
27166
27167
27168 if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
27169 {
27170 if (!__found_dec && !__found_sci)
27171 {
27172
27173
27174 if (__sep_pos)
27175 {
27176 __found_grouping += static_cast<char>(__sep_pos);
27177 __sep_pos = 0;
27178 }
27179 else
27180 {
27181
27182
27183 __xtrc.clear();
27184 break;
27185 }
27186 }
27187 else
27188 break;
27189 }
27190 else if (__c == __lc->_M_decimal_point)
27191 {
27192 if (!__found_dec && !__found_sci)
27193 {
27194
27195
27196
27197 if (__found_grouping.size())
27198 __found_grouping += static_cast<char>(__sep_pos);
27199 __xtrc += '.';
27200 __found_dec = true;
27201 }
27202 else
27203 break;
27204 }
27205 else
27206 {
27207 const char_type* __q =
27208 __traits_type::find(__lit_zero, 10, __c);
27209 if (__q)
27210 {
27211 __xtrc += '0' + (__q - __lit_zero);
27212 __found_mantissa = true;
27213 ++__sep_pos;
27214 }
27215 else if ((__c == __lit[__num_base::_S_ie]
27216 || __c == __lit[__num_base::_S_iE])
27217 && !__found_sci && __found_mantissa)
27218 {
27219
27220 if (__found_grouping.size() && !__found_dec)
27221 __found_grouping += static_cast<char>(__sep_pos);
27222 __xtrc += 'e';
27223 __found_sci = true;
27224
27225
27226 if (++__beg != __end)
27227 {
27228 __c = *__beg;
27229 const bool __plus = __c == __lit[__num_base::_S_iplus];
27230 if ((__plus || __c == __lit[__num_base::_S_iminus])
27231 && !(__lc->_M_use_grouping
27232 && __c == __lc->_M_thousands_sep)
27233 && !(__c == __lc->_M_decimal_point))
27234 __xtrc += __plus ? '+' : '-';
27235 else
27236 continue;
27237 }
27238 else
27239 {
27240 __testeof = true;
27241 break;
27242 }
27243 }
27244 else
27245 break;
27246 }
27247
27248 if (++__beg != __end)
27249 __c = *__beg;
27250 else
27251 __testeof = true;
27252 }
27253
27254
27255
27256 if (__found_grouping.size())
27257 {
27258
27259 if (!__found_dec && !__found_sci)
27260 __found_grouping += static_cast<char>(__sep_pos);
27261
27262 if (!std::__verify_grouping(__lc->_M_grouping,
27263 __lc->_M_grouping_size,
27264 __found_grouping))
27265 __err |= ios_base::failbit;
27266 }
27267
27268
27269 if (__testeof)
27270 __err |= ios_base::eofbit;
27271 return __beg;
27272 }
27273
27274 }
27275
27276 namespace __gnu_cxx_ldbl128 {
27277
27278 template<typename _CharT, typename _InIter>
27279 template<typename _ValueT>
27280 _InIter
27281 num_get<_CharT, _InIter>::
27282 _M_extract_int(_InIter __beg, _InIter __end, ios_base& __io,
27283 ios_base::iostate& __err, _ValueT& __v) const
27284 {
27285 typedef char_traits<_CharT> __traits_type;
27286 using __gnu_cxx::__add_unsigned;
27287 typedef typename __add_unsigned<_ValueT>::__type __unsigned_type;
27288 typedef __numpunct_cache<_CharT> __cache_type;
27289 __use_cache<__cache_type> __uc;
27290 const locale& __loc = __io._M_getloc();
27291 const __cache_type* __lc = __uc(__loc);
27292 const _CharT* __lit = __lc->_M_atoms_in;
27293 char_type __c = char_type();
27294
27295
27296 const ios_base::fmtflags __basefield = __io.flags()
27297 & ios_base::basefield;
27298 const bool __oct = __basefield == ios_base::oct;
27299 int __base = __oct ? 8 : (__basefield == ios_base::hex ? 16 : 10);
27300
27301
27302 bool __testeof = __beg == __end;
27303
27304
27305 bool __negative = false;
27306 if (!__testeof)
27307 {
27308 __c = *__beg;
27309 if (numeric_limits<_ValueT>::is_signed)
27310 __negative = __c == __lit[__num_base::_S_iminus];
27311 if ((__negative || __c == __lit[__num_base::_S_iplus])
27312 && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
27313 && !(__c == __lc->_M_decimal_point))
27314 {
27315 if (++__beg != __end)
27316 __c = *__beg;
27317 else
27318 __testeof = true;
27319 }
27320 }
27321
27322
27323
27324 bool __found_zero = false;
27325 int __sep_pos = 0;
27326 while (!__testeof)
27327 {
27328 if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep
27329 || __c == __lc->_M_decimal_point)
27330 break;
27331 else if (__c == __lit[__num_base::_S_izero]
27332 && (!__found_zero || __base == 10))
27333 {
27334 __found_zero = true;
27335 ++__sep_pos;
27336 if (__basefield == 0)
27337 __base = 8;
27338 if (__base == 8)
27339 __sep_pos = 0;
27340 }
27341 else if (__found_zero
27342 && (__c == __lit[__num_base::_S_ix]
27343 || __c == __lit[__num_base::_S_iX]))
27344 {
27345 if (__basefield == 0)
27346 __base = 16;
27347 if (__base == 16)
27348 {
27349 __found_zero = false;
27350 __sep_pos = 0;
27351 }
27352 else
27353 break;
27354 }
27355 else
27356 break;
27357
27358 if (++__beg != __end)
27359 {
27360 __c = *__beg;
27361 if (!__found_zero)
27362 break;
27363 }
27364 else
27365 __testeof = true;
27366 }
27367
27368
27369
27370 const size_t __len = (__base == 16 ? __num_base::_S_iend
27371 - __num_base::_S_izero : __base);
27372
27373
27374 string __found_grouping;
27375 if (__lc->_M_use_grouping)
27376 __found_grouping.reserve(32);
27377 bool __testfail = false;
27378 const __unsigned_type __max = __negative ?
27379 -numeric_limits<_ValueT>::min() : numeric_limits<_ValueT>::max();
27380 const __unsigned_type __smax = __max / __base;
27381 __unsigned_type __result = 0;
27382 int __digit = 0;
27383 const char_type* __lit_zero = __lit + __num_base::_S_izero;
27384
27385 if (!__lc->_M_allocated)
27386
27387 while (!__testeof)
27388 {
27389 __digit = _M_find(__lit_zero, __len, __c);
27390 if (__digit == -1)
27391 break;
27392
27393 if (__result > __smax)
27394 __testfail = true;
27395 else
27396 {
27397 __result *= __base;
27398 __testfail |= __result > __max - __digit;
27399 __result += __digit;
27400 ++__sep_pos;
27401 }
27402
27403 if (++__beg != __end)
27404 __c = *__beg;
27405 else
27406 __testeof = true;
27407 }
27408 else
27409 while (!__testeof)
27410 {
27411
27412
27413 if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
27414 {
27415
27416
27417 if (__sep_pos)
27418 {
27419 __found_grouping += static_cast<char>(__sep_pos);
27420 __sep_pos = 0;
27421 }
27422 else
27423 {
27424 __testfail = true;
27425 break;
27426 }
27427 }
27428 else if (__c == __lc->_M_decimal_point)
27429 break;
27430 else
27431 {
27432 const char_type* __q =
27433 __traits_type::find(__lit_zero, __len, __c);
27434 if (!__q)
27435 break;
27436
27437 __digit = __q - __lit_zero;
27438 if (__digit > 15)
27439 __digit -= 6;
27440 if (__result > __smax)
27441 __testfail = true;
27442 else
27443 {
27444 __result *= __base;
27445 __testfail |= __result > __max - __digit;
27446 __result += __digit;
27447 ++__sep_pos;
27448 }
27449 }
27450
27451 if (++__beg != __end)
27452 __c = *__beg;
27453 else
27454 __testeof = true;
27455 }
27456
27457
27458
27459 if (__found_grouping.size())
27460 {
27461
27462 __found_grouping += static_cast<char>(__sep_pos);
27463
27464 if (!std::__verify_grouping(__lc->_M_grouping,
27465 __lc->_M_grouping_size,
27466 __found_grouping))
27467 __err |= ios_base::failbit;
27468 }
27469
27470 if (!__testfail && (__sep_pos || __found_zero
27471 || __found_grouping.size()))
27472 __v = __negative ? -__result : __result;
27473 else
27474 __err |= ios_base::failbit;
27475
27476 if (__testeof)
27477 __err |= ios_base::eofbit;
27478 return __beg;
27479 }
27480
27481
27482
27483 template<typename _CharT, typename _InIter>
27484 _InIter
27485 num_get<_CharT, _InIter>::
27486 do_get(iter_type __beg, iter_type __end, ios_base& __io,
27487 ios_base::iostate& __err, bool& __v) const
27488 {
27489 if (!(__io.flags() & ios_base::boolalpha))
27490 {
27491
27492
27493
27494 long __l = -1;
27495 __beg = _M_extract_int(__beg, __end, __io, __err, __l);
27496 if (__l == 0 || __l == 1)
27497 __v = __l;
27498 else
27499 __err |= ios_base::failbit;
27500 }
27501 else
27502 {
27503
27504 typedef __numpunct_cache<_CharT> __cache_type;
27505 __use_cache<__cache_type> __uc;
27506 const locale& __loc = __io._M_getloc();
27507 const __cache_type* __lc = __uc(__loc);
27508
27509 bool __testf = true;
27510 bool __testt = true;
27511 size_t __n;
27512 bool __testeof = __beg == __end;
27513 for (__n = 0; !__testeof; ++__n)
27514 {
27515 const char_type __c = *__beg;
27516
27517 if (__testf)
27518 if (__n < __lc->_M_falsename_size)
27519 __testf = __c == __lc->_M_falsename[__n];
27520 else
27521 break;
27522
27523 if (__testt)
27524 if (__n < __lc->_M_truename_size)
27525 __testt = __c == __lc->_M_truename[__n];
27526 else
27527 break;
27528
27529 if (!__testf && !__testt)
27530 break;
27531
27532 if (++__beg == __end)
27533 __testeof = true;
27534 }
27535 if (__testf && __n == __lc->_M_falsename_size)
27536 __v = 0;
27537 else if (__testt && __n == __lc->_M_truename_size)
27538 __v = 1;
27539 else
27540 __err |= ios_base::failbit;
27541
27542 if (__testeof)
27543 __err |= ios_base::eofbit;
27544 }
27545 return __beg;
27546 }
27547
27548 template<typename _CharT, typename _InIter>
27549 _InIter
27550 num_get<_CharT, _InIter>::
27551 do_get(iter_type __beg, iter_type __end, ios_base& __io,
27552 ios_base::iostate& __err, long& __v) const
27553 { return _M_extract_int(__beg, __end, __io, __err, __v); }
27554
27555 template<typename _CharT, typename _InIter>
27556 _InIter
27557 num_get<_CharT, _InIter>::
27558 do_get(iter_type __beg, iter_type __end, ios_base& __io,
27559 ios_base::iostate& __err, unsigned short& __v) const
27560 { return _M_extract_int(__beg, __end, __io, __err, __v); }
27561
27562 template<typename _CharT, typename _InIter>
27563 _InIter
27564 num_get<_CharT, _InIter>::
27565 do_get(iter_type __beg, iter_type __end, ios_base& __io,
27566 ios_base::iostate& __err, unsigned int& __v) const
27567 { return _M_extract_int(__beg, __end, __io, __err, __v); }
27568
27569 template<typename _CharT, typename _InIter>
27570 _InIter
27571 num_get<_CharT, _InIter>::
27572 do_get(iter_type __beg, iter_type __end, ios_base& __io,
27573 ios_base::iostate& __err, unsigned long& __v) const
27574 { return _M_extract_int(__beg, __end, __io, __err, __v); }
27575
27576
27577 template<typename _CharT, typename _InIter>
27578 _InIter
27579 num_get<_CharT, _InIter>::
27580 do_get(iter_type __beg, iter_type __end, ios_base& __io,
27581 ios_base::iostate& __err, long long& __v) const
27582 { return _M_extract_int(__beg, __end, __io, __err, __v); }
27583
27584 template<typename _CharT, typename _InIter>
27585 _InIter
27586 num_get<_CharT, _InIter>::
27587 do_get(iter_type __beg, iter_type __end, ios_base& __io,
27588 ios_base::iostate& __err, unsigned long long& __v) const
27589 { return _M_extract_int(__beg, __end, __io, __err, __v); }
27590
27591
27592 template<typename _CharT, typename _InIter>
27593 _InIter
27594 num_get<_CharT, _InIter>::
27595 do_get(iter_type __beg, iter_type __end, ios_base& __io,
27596 ios_base::iostate& __err, float& __v) const
27597 {
27598 string __xtrc;
27599 __xtrc.reserve(32);
27600 __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc);
27601 std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale());
27602 return __beg;
27603 }
27604
27605 template<typename _CharT, typename _InIter>
27606 _InIter
27607 num_get<_CharT, _InIter>::
27608 do_get(iter_type __beg, iter_type __end, ios_base& __io,
27609 ios_base::iostate& __err, double& __v) const
27610 {
27611 string __xtrc;
27612 __xtrc.reserve(32);
27613 __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc);
27614 std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale());
27615 return __beg;
27616 }
27617
27618
27619 template<typename _CharT, typename _InIter>
27620 _InIter
27621 num_get<_CharT, _InIter>::
27622 __do_get(iter_type __beg, iter_type __end, ios_base& __io,
27623 ios_base::iostate& __err, double& __v) const
27624 {
27625 string __xtrc;
27626 __xtrc.reserve(32);
27627 __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc);
27628 std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale());
27629 return __beg;
27630 }
27631
27632
27633 template<typename _CharT, typename _InIter>
27634 _InIter
27635 num_get<_CharT, _InIter>::
27636 do_get(iter_type __beg, iter_type __end, ios_base& __io,
27637 ios_base::iostate& __err, long double& __v) const
27638 {
27639 string __xtrc;
27640 __xtrc.reserve(32);
27641 __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc);
27642 std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale());
27643 return __beg;
27644 }
27645
27646 template<typename _CharT, typename _InIter>
27647 _InIter
27648 num_get<_CharT, _InIter>::
27649 do_get(iter_type __beg, iter_type __end, ios_base& __io,
27650 ios_base::iostate& __err, void*& __v) const
27651 {
27652
27653 typedef ios_base::fmtflags fmtflags;
27654 const fmtflags __fmt = __io.flags();
27655 __io.flags(__fmt & ~ios_base::basefield | ios_base::hex);
27656
27657 unsigned long __ul;
27658 __beg = _M_extract_int(__beg, __end, __io, __err, __ul);
27659
27660
27661 __io.flags(__fmt);
27662
27663 if (!(__err & ios_base::failbit))
27664 __v = reinterpret_cast<void*>(__ul);
27665 return __beg;
27666 }
27667
27668
27669
27670 template<typename _CharT, typename _OutIter>
27671 void
27672 num_put<_CharT, _OutIter>::
27673 _M_pad(_CharT __fill, streamsize __w, ios_base& __io,
27674 _CharT* __new, const _CharT* __cs, int& __len) const
27675 {
27676
27677
27678 __pad<_CharT, char_traits<_CharT> >::_S_pad(__io, __fill, __new, __cs,
27679 __w, __len, true);
27680 __len = static_cast<int>(__w);
27681 }
27682
27683 }
27684
27685 template<typename _CharT, typename _ValueT>
27686 int
27687 __int_to_char(_CharT* __bufend, _ValueT __v, const _CharT* __lit,
27688 ios_base::fmtflags __flags, bool __dec)
27689 {
27690 _CharT* __buf = __bufend;
27691 if (__builtin_expect(__dec, true))
27692 {
27693
27694 do
27695 {
27696 *--__buf = __lit[(__v % 10) + __num_base::_S_odigits];
27697 __v /= 10;
27698 }
27699 while (__v != 0);
27700 }
27701 else if ((__flags & ios_base::basefield) == ios_base::oct)
27702 {
27703
27704 do
27705 {
27706 *--__buf = __lit[(__v & 0x7) + __num_base::_S_odigits];
27707 __v >>= 3;
27708 }
27709 while (__v != 0);
27710 }
27711 else
27712 {
27713
27714 const bool __uppercase = __flags & ios_base::uppercase;
27715 const int __case_offset = __uppercase ? __num_base::_S_oudigits
27716 : __num_base::_S_odigits;
27717 do
27718 {
27719 *--__buf = __lit[(__v & 0xf) + __case_offset];
27720 __v >>= 4;
27721 }
27722 while (__v != 0);
27723 }
27724 return __bufend - __buf;
27725 }
27726
27727 namespace __gnu_cxx_ldbl128 {
27728
27729 template<typename _CharT, typename _OutIter>
27730 void
27731 num_put<_CharT, _OutIter>::
27732 _M_group_int(const char* __grouping, size_t __grouping_size, _CharT __sep,
27733 ios_base&, _CharT* __new, _CharT* __cs, int& __len) const
27734 {
27735 _CharT* __p = std::__add_grouping(__new, __sep, __grouping,
27736 __grouping_size, __cs, __cs + __len);
27737 __len = __p - __new;
27738 }
27739
27740 template<typename _CharT, typename _OutIter>
27741 template<typename _ValueT>
27742 _OutIter
27743 num_put<_CharT, _OutIter>::
27744 _M_insert_int(_OutIter __s, ios_base& __io, _CharT __fill,
27745 _ValueT __v) const
27746 {
27747 using __gnu_cxx::__add_unsigned;
27748 typedef typename __add_unsigned<_ValueT>::__type __unsigned_type;
27749 typedef __numpunct_cache<_CharT> __cache_type;
27750 __use_cache<__cache_type> __uc;
27751 const locale& __loc = __io._M_getloc();
27752 const __cache_type* __lc = __uc(__loc);
27753 const _CharT* __lit = __lc->_M_atoms_out;
27754 const ios_base::fmtflags __flags = __io.flags();
27755
27756
27757 const int __ilen = 5 * sizeof(_ValueT);
27758 _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
27759 * __ilen));
27760
27761
27762
27763 const ios_base::fmtflags __basefield = __flags & ios_base::basefield;
27764 const bool __dec = (__basefield != ios_base::oct
27765 && __basefield != ios_base::hex);
27766 const __unsigned_type __u = (__v > 0 || !__dec) ? __v : -__v;
27767 int __len = __int_to_char(__cs + __ilen, __u, __lit, __flags, __dec);
27768 __cs += __ilen - __len;
27769
27770
27771 if (__lc->_M_use_grouping)
27772 {
27773
27774
27775 _CharT* __cs2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
27776 * (__len + 1)
27777 * 2));
27778 _M_group_int(__lc->_M_grouping, __lc->_M_grouping_size,
27779 __lc->_M_thousands_sep, __io, __cs2 + 2, __cs, __len);
27780 __cs = __cs2 + 2;
27781 }
27782
27783
27784 if (__builtin_expect(__dec, true))
27785 {
27786
27787 if (__v > 0)
27788 {
27789 if (__flags & ios_base::showpos
27790 && numeric_limits<_ValueT>::is_signed)
27791 *--__cs = __lit[__num_base::_S_oplus], ++__len;
27792 }
27793 else if (__v)
27794 *--__cs = __lit[__num_base::_S_ominus], ++__len;
27795 }
27796 else if (__flags & ios_base::showbase && __v)
27797 {
27798 if (__basefield == ios_base::oct)
27799 *--__cs = __lit[__num_base::_S_odigits], ++__len;
27800 else
27801 {
27802
27803 const bool __uppercase = __flags & ios_base::uppercase;
27804 *--__cs = __lit[__num_base::_S_ox + __uppercase];
27805
27806 *--__cs = __lit[__num_base::_S_odigits];
27807 __len += 2;
27808 }
27809 }
27810
27811
27812 const streamsize __w = __io.width();
27813 if (__w > static_cast<streamsize>(__len))
27814 {
27815 _CharT* __cs3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
27816 * __w));
27817 _M_pad(__fill, __w, __io, __cs3, __cs, __len);
27818 __cs = __cs3;
27819 }
27820 __io.width(0);
27821
27822
27823
27824 return std::__write(__s, __cs, __len);
27825 }
27826
27827 template<typename _CharT, typename _OutIter>
27828 void
27829 num_put<_CharT, _OutIter>::
27830 _M_group_float(const char* __grouping, size_t __grouping_size,
27831 _CharT __sep, const _CharT* __p, _CharT* __new,
27832 _CharT* __cs, int& __len) const
27833 {
27834
27835
27836
27837 const int __declen = __p ? __p - __cs : __len;
27838 _CharT* __p2 = std::__add_grouping(__new, __sep, __grouping,
27839 __grouping_size,
27840 __cs, __cs + __declen);
27841
27842
27843 int __newlen = __p2 - __new;
27844 if (__p)
27845 {
27846 char_traits<_CharT>::copy(__p2, __p, __len - __declen);
27847 __newlen += __len - __declen;
27848 }
27849 __len = __newlen;
27850 }
27851 # 1093 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.tcc" 3
27852 template<typename _CharT, typename _OutIter>
27853 template<typename _ValueT>
27854 _OutIter
27855 num_put<_CharT, _OutIter>::
27856 _M_insert_float(_OutIter __s, ios_base& __io, _CharT __fill, char __mod,
27857 _ValueT __v) const
27858 {
27859 typedef __numpunct_cache<_CharT> __cache_type;
27860 __use_cache<__cache_type> __uc;
27861 const locale& __loc = __io._M_getloc();
27862 const __cache_type* __lc = __uc(__loc);
27863
27864
27865 const streamsize __prec = __io.precision() < 0 ? 6 : __io.precision();
27866
27867 const int __max_digits = numeric_limits<_ValueT>::digits10;
27868
27869
27870 int __len;
27871
27872 char __fbuf[16];
27873 __num_base::_S_format_float(__io, __fbuf, __mod);
27874
27875
27876
27877
27878 int __cs_size = __max_digits * 3;
27879 char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
27880 __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size,
27881 __fbuf, __prec, __v);
27882
27883
27884 if (__len >= __cs_size)
27885 {
27886 __cs_size = __len + 1;
27887 __cs = static_cast<char*>(__builtin_alloca(__cs_size));
27888 __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size,
27889 __fbuf, __prec, __v);
27890 }
27891 # 1152 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.tcc" 3
27892 const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
27893
27894 _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
27895 * __len));
27896 __ctype.widen(__cs, __cs + __len, __ws);
27897
27898
27899 _CharT* __wp = 0;
27900 const char* __p = char_traits<char>::find(__cs, __len, '.');
27901 if (__p)
27902 {
27903 __wp = __ws + (__p - __cs);
27904 *__wp = __lc->_M_decimal_point;
27905 }
27906
27907
27908
27909
27910 if (__lc->_M_use_grouping
27911 && (__wp || __len < 3 || (__cs[1] <= '9' && __cs[2] <= '9'
27912 && __cs[1] >= '0' && __cs[2] >= '0')))
27913 {
27914
27915
27916 _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
27917 * __len * 2));
27918
27919 streamsize __off = 0;
27920 if (__cs[0] == '-' || __cs[0] == '+')
27921 {
27922 __off = 1;
27923 __ws2[0] = __ws[0];
27924 __len -= 1;
27925 }
27926
27927 _M_group_float(__lc->_M_grouping, __lc->_M_grouping_size,
27928 __lc->_M_thousands_sep, __wp, __ws2 + __off,
27929 __ws + __off, __len);
27930 __len += __off;
27931
27932 __ws = __ws2;
27933 }
27934
27935
27936 const streamsize __w = __io.width();
27937 if (__w > static_cast<streamsize>(__len))
27938 {
27939 _CharT* __ws3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
27940 * __w));
27941 _M_pad(__fill, __w, __io, __ws3, __ws, __len);
27942 __ws = __ws3;
27943 }
27944 __io.width(0);
27945
27946
27947
27948 return std::__write(__s, __ws, __len);
27949 }
27950
27951 template<typename _CharT, typename _OutIter>
27952 _OutIter
27953 num_put<_CharT, _OutIter>::
27954 do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const
27955 {
27956 const ios_base::fmtflags __flags = __io.flags();
27957 if ((__flags & ios_base::boolalpha) == 0)
27958 {
27959 const long __l = __v;
27960 __s = _M_insert_int(__s, __io, __fill, __l);
27961 }
27962 else
27963 {
27964 typedef __numpunct_cache<_CharT> __cache_type;
27965 __use_cache<__cache_type> __uc;
27966 const locale& __loc = __io._M_getloc();
27967 const __cache_type* __lc = __uc(__loc);
27968
27969 const _CharT* __name = __v ? __lc->_M_truename
27970 : __lc->_M_falsename;
27971 int __len = __v ? __lc->_M_truename_size
27972 : __lc->_M_falsename_size;
27973
27974 const streamsize __w = __io.width();
27975 if (__w > static_cast<streamsize>(__len))
27976 {
27977 _CharT* __cs
27978 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
27979 * __w));
27980 _M_pad(__fill, __w, __io, __cs, __name, __len);
27981 __name = __cs;
27982 }
27983 __io.width(0);
27984 __s = std::__write(__s, __name, __len);
27985 }
27986 return __s;
27987 }
27988
27989 template<typename _CharT, typename _OutIter>
27990 _OutIter
27991 num_put<_CharT, _OutIter>::
27992 do_put(iter_type __s, ios_base& __io, char_type __fill, long __v) const
27993 { return _M_insert_int(__s, __io, __fill, __v); }
27994
27995 template<typename _CharT, typename _OutIter>
27996 _OutIter
27997 num_put<_CharT, _OutIter>::
27998 do_put(iter_type __s, ios_base& __io, char_type __fill,
27999 unsigned long __v) const
28000 { return _M_insert_int(__s, __io, __fill, __v); }
28001
28002
28003 template<typename _CharT, typename _OutIter>
28004 _OutIter
28005 num_put<_CharT, _OutIter>::
28006 do_put(iter_type __s, ios_base& __io, char_type __fill, long long __v) const
28007 { return _M_insert_int(__s, __io, __fill, __v); }
28008
28009 template<typename _CharT, typename _OutIter>
28010 _OutIter
28011 num_put<_CharT, _OutIter>::
28012 do_put(iter_type __s, ios_base& __io, char_type __fill,
28013 unsigned long long __v) const
28014 { return _M_insert_int(__s, __io, __fill, __v); }
28015
28016
28017 template<typename _CharT, typename _OutIter>
28018 _OutIter
28019 num_put<_CharT, _OutIter>::
28020 do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const
28021 { return _M_insert_float(__s, __io, __fill, char(), __v); }
28022
28023
28024 template<typename _CharT, typename _OutIter>
28025 _OutIter
28026 num_put<_CharT, _OutIter>::
28027 __do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const
28028 { return _M_insert_float(__s, __io, __fill, char(), __v); }
28029
28030
28031 template<typename _CharT, typename _OutIter>
28032 _OutIter
28033 num_put<_CharT, _OutIter>::
28034 do_put(iter_type __s, ios_base& __io, char_type __fill,
28035 long double __v) const
28036 { return _M_insert_float(__s, __io, __fill, 'L', __v); }
28037
28038 template<typename _CharT, typename _OutIter>
28039 _OutIter
28040 num_put<_CharT, _OutIter>::
28041 do_put(iter_type __s, ios_base& __io, char_type __fill,
28042 const void* __v) const
28043 {
28044 const ios_base::fmtflags __flags = __io.flags();
28045 const ios_base::fmtflags __fmt = ~(ios_base::basefield
28046 | ios_base::uppercase
28047 | ios_base::internal);
28048 __io.flags(__flags & __fmt | (ios_base::hex | ios_base::showbase));
28049
28050 __s = _M_insert_int(__s, __io, __fill,
28051 reinterpret_cast<unsigned long>(__v));
28052 __io.flags(__flags);
28053 return __s;
28054 }
28055
28056 template<typename _CharT, typename _InIter>
28057 template<bool _Intl>
28058 _InIter
28059 money_get<_CharT, _InIter>::
28060 _M_extract(iter_type __beg, iter_type __end, ios_base& __io,
28061 ios_base::iostate& __err, string& __units) const
28062 {
28063 typedef char_traits<_CharT> __traits_type;
28064 typedef typename string_type::size_type size_type;
28065 typedef money_base::part part;
28066 typedef __moneypunct_cache<_CharT, _Intl> __cache_type;
28067
28068 const locale& __loc = __io._M_getloc();
28069 const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
28070
28071 __use_cache<__cache_type> __uc;
28072 const __cache_type* __lc = __uc(__loc);
28073 const char_type* __lit = __lc->_M_atoms;
28074
28075
28076 bool __negative = false;
28077
28078 size_type __sign_size = 0;
28079
28080 const bool __mandatory_sign = (__lc->_M_positive_sign_size
28081 && __lc->_M_negative_sign_size);
28082
28083 string __grouping_tmp;
28084 if (__lc->_M_use_grouping)
28085 __grouping_tmp.reserve(32);
28086
28087 int __last_pos = 0;
28088
28089 int __n = 0;
28090
28091 bool __testvalid = true;
28092
28093 bool __testdecfound = false;
28094
28095
28096 string __res;
28097 __res.reserve(32);
28098
28099 const char_type* __lit_zero = __lit + money_base::_S_zero;
28100 const money_base::pattern __p = __lc->_M_neg_format;
28101 for (int __i = 0; __i < 4 && __testvalid; ++__i)
28102 {
28103 const part __which = static_cast<part>(__p.field[__i]);
28104 switch (__which)
28105 {
28106 case money_base::symbol:
28107
28108
28109
28110
28111 if (__io.flags() & ios_base::showbase || __sign_size > 1
28112 || __i == 0
28113 || (__i == 1 && (__mandatory_sign
28114 || (static_cast<part>(__p.field[0])
28115 == money_base::sign)
28116 || (static_cast<part>(__p.field[2])
28117 == money_base::space)))
28118 || (__i == 2 && ((static_cast<part>(__p.field[3])
28119 == money_base::value)
28120 || __mandatory_sign
28121 && (static_cast<part>(__p.field[3])
28122 == money_base::sign))))
28123 {
28124 const size_type __len = __lc->_M_curr_symbol_size;
28125 size_type __j = 0;
28126 for (; __beg != __end && __j < __len
28127 && *__beg == __lc->_M_curr_symbol[__j];
28128 ++__beg, ++__j);
28129 if (__j != __len
28130 && (__j || __io.flags() & ios_base::showbase))
28131 __testvalid = false;
28132 }
28133 break;
28134 case money_base::sign:
28135
28136 if (__lc->_M_positive_sign_size && __beg != __end
28137 && *__beg == __lc->_M_positive_sign[0])
28138 {
28139 __sign_size = __lc->_M_positive_sign_size;
28140 ++__beg;
28141 }
28142 else if (__lc->_M_negative_sign_size && __beg != __end
28143 && *__beg == __lc->_M_negative_sign[0])
28144 {
28145 __negative = true;
28146 __sign_size = __lc->_M_negative_sign_size;
28147 ++__beg;
28148 }
28149 else if (__lc->_M_positive_sign_size
28150 && !__lc->_M_negative_sign_size)
28151
28152
28153 __negative = true;
28154 else if (__mandatory_sign)
28155 __testvalid = false;
28156 break;
28157 case money_base::value:
28158
28159
28160 for (; __beg != __end; ++__beg)
28161 {
28162 const char_type __c = *__beg;
28163 const char_type* __q = __traits_type::find(__lit_zero,
28164 10, __c);
28165 if (__q != 0)
28166 {
28167 __res += money_base::_S_atoms[__q - __lit];
28168 ++__n;
28169 }
28170 else if (__c == __lc->_M_decimal_point
28171 && !__testdecfound)
28172 {
28173 __last_pos = __n;
28174 __n = 0;
28175 __testdecfound = true;
28176 }
28177 else if (__lc->_M_use_grouping
28178 && __c == __lc->_M_thousands_sep
28179 && !__testdecfound)
28180 {
28181 if (__n)
28182 {
28183
28184 __grouping_tmp += static_cast<char>(__n);
28185 __n = 0;
28186 }
28187 else
28188 {
28189 __testvalid = false;
28190 break;
28191 }
28192 }
28193 else
28194 break;
28195 }
28196 if (__res.empty())
28197 __testvalid = false;
28198 break;
28199 case money_base::space:
28200
28201 if (__beg != __end && __ctype.is(ctype_base::space, *__beg))
28202 ++__beg;
28203 else
28204 __testvalid = false;
28205 case money_base::none:
28206
28207 if (__i != 3)
28208 for (; __beg != __end
28209 && __ctype.is(ctype_base::space, *__beg); ++__beg);
28210 break;
28211 }
28212 }
28213
28214
28215 if (__sign_size > 1 && __testvalid)
28216 {
28217 const char_type* __sign = __negative ? __lc->_M_negative_sign
28218 : __lc->_M_positive_sign;
28219 size_type __i = 1;
28220 for (; __beg != __end && __i < __sign_size
28221 && *__beg == __sign[__i]; ++__beg, ++__i);
28222
28223 if (__i != __sign_size)
28224 __testvalid = false;
28225 }
28226
28227 if (__testvalid)
28228 {
28229
28230 if (__res.size() > 1)
28231 {
28232 const size_type __first = __res.find_first_not_of('0');
28233 const bool __only_zeros = __first == string::npos;
28234 if (__first)
28235 __res.erase(0, __only_zeros ? __res.size() - 1 : __first);
28236 }
28237
28238
28239 if (__negative && __res[0] != '0')
28240 __res.insert(__res.begin(), '-');
28241
28242
28243 if (__grouping_tmp.size())
28244 {
28245
28246 __grouping_tmp += static_cast<char>(__testdecfound ? __last_pos
28247 : __n);
28248 if (!std::__verify_grouping(__lc->_M_grouping,
28249 __lc->_M_grouping_size,
28250 __grouping_tmp))
28251 __err |= ios_base::failbit;
28252 }
28253
28254
28255 if (__testdecfound && __lc->_M_frac_digits > 0
28256 && __n != __lc->_M_frac_digits)
28257 __testvalid = false;
28258 }
28259
28260
28261 if (!__testvalid)
28262 __err |= ios_base::failbit;
28263 else
28264 __units.swap(__res);
28265
28266
28267 if (__beg == __end)
28268 __err |= ios_base::eofbit;
28269 return __beg;
28270 }
28271
28272
28273 template<typename _CharT, typename _InIter>
28274 _InIter
28275 money_get<_CharT, _InIter>::
28276 __do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io,
28277 ios_base::iostate& __err, double& __units) const
28278 {
28279 string __str;
28280 __beg = __intl ? _M_extract<true>(__beg, __end, __io, __err, __str)
28281 : _M_extract<false>(__beg, __end, __io, __err, __str);
28282 std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale());
28283 return __beg;
28284 }
28285
28286
28287 template<typename _CharT, typename _InIter>
28288 _InIter
28289 money_get<_CharT, _InIter>::
28290 do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io,
28291 ios_base::iostate& __err, long double& __units) const
28292 {
28293 string __str;
28294 __beg = __intl ? _M_extract<true>(__beg, __end, __io, __err, __str)
28295 : _M_extract<false>(__beg, __end, __io, __err, __str);
28296 std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale());
28297 return __beg;
28298 }
28299
28300 template<typename _CharT, typename _InIter>
28301 _InIter
28302 money_get<_CharT, _InIter>::
28303 do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io,
28304 ios_base::iostate& __err, string_type& __digits) const
28305 {
28306 typedef typename string::size_type size_type;
28307
28308 const locale& __loc = __io._M_getloc();
28309 const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
28310
28311 string __str;
28312 __beg = __intl ? _M_extract<true>(__beg, __end, __io, __err, __str)
28313 : _M_extract<false>(__beg, __end, __io, __err, __str);
28314 const size_type __len = __str.size();
28315 if (__len)
28316 {
28317 __digits.resize(__len);
28318 __ctype.widen(__str.data(), __str.data() + __len, &__digits[0]);
28319 }
28320 return __beg;
28321 }
28322
28323 template<typename _CharT, typename _OutIter>
28324 template<bool _Intl>
28325 _OutIter
28326 money_put<_CharT, _OutIter>::
28327 _M_insert(iter_type __s, ios_base& __io, char_type __fill,
28328 const string_type& __digits) const
28329 {
28330 typedef typename string_type::size_type size_type;
28331 typedef money_base::part part;
28332 typedef __moneypunct_cache<_CharT, _Intl> __cache_type;
28333
28334 const locale& __loc = __io._M_getloc();
28335 const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
28336
28337 __use_cache<__cache_type> __uc;
28338 const __cache_type* __lc = __uc(__loc);
28339 const char_type* __lit = __lc->_M_atoms;
28340
28341
28342
28343 const char_type* __beg = __digits.data();
28344
28345 money_base::pattern __p;
28346 const char_type* __sign;
28347 size_type __sign_size;
28348 if (!(*__beg == __lit[money_base::_S_minus]))
28349 {
28350 __p = __lc->_M_pos_format;
28351 __sign = __lc->_M_positive_sign;
28352 __sign_size = __lc->_M_positive_sign_size;
28353 }
28354 else
28355 {
28356 __p = __lc->_M_neg_format;
28357 __sign = __lc->_M_negative_sign;
28358 __sign_size = __lc->_M_negative_sign_size;
28359 if (__digits.size())
28360 ++__beg;
28361 }
28362
28363
28364 size_type __len = __ctype.scan_not(ctype_base::digit, __beg,
28365 __beg + __digits.size()) - __beg;
28366 if (__len)
28367 {
28368
28369
28370
28371 string_type __value;
28372 __value.reserve(2 * __len);
28373
28374
28375
28376 long __paddec = __len - __lc->_M_frac_digits;
28377 if (__paddec > 0)
28378 {
28379 if (__lc->_M_frac_digits < 0)
28380 __paddec = __len;
28381 if (__lc->_M_grouping_size)
28382 {
28383 __value.assign(2 * __paddec, char_type());
28384 _CharT* __vend =
28385 std::__add_grouping(&__value[0], __lc->_M_thousands_sep,
28386 __lc->_M_grouping,
28387 __lc->_M_grouping_size,
28388 __beg, __beg + __paddec);
28389 __value.erase(__vend - &__value[0]);
28390 }
28391 else
28392 __value.assign(__beg, __paddec);
28393 }
28394
28395
28396 if (__lc->_M_frac_digits > 0)
28397 {
28398 __value += __lc->_M_decimal_point;
28399 if (__paddec >= 0)
28400 __value.append(__beg + __paddec, __lc->_M_frac_digits);
28401 else
28402 {
28403
28404 __value.append(-__paddec, __lit[money_base::_S_zero]);
28405 __value.append(__beg, __len);
28406 }
28407 }
28408
28409
28410 const ios_base::fmtflags __f = __io.flags()
28411 & ios_base::adjustfield;
28412 __len = __value.size() + __sign_size;
28413 __len += ((__io.flags() & ios_base::showbase)
28414 ? __lc->_M_curr_symbol_size : 0);
28415
28416 string_type __res;
28417 __res.reserve(2 * __len);
28418
28419 const size_type __width = static_cast<size_type>(__io.width());
28420 const bool __testipad = (__f == ios_base::internal
28421 && __len < __width);
28422
28423 for (int __i = 0; __i < 4; ++__i)
28424 {
28425 const part __which = static_cast<part>(__p.field[__i]);
28426 switch (__which)
28427 {
28428 case money_base::symbol:
28429 if (__io.flags() & ios_base::showbase)
28430 __res.append(__lc->_M_curr_symbol,
28431 __lc->_M_curr_symbol_size);
28432 break;
28433 case money_base::sign:
28434
28435
28436
28437 if (__sign_size)
28438 __res += __sign[0];
28439 break;
28440 case money_base::value:
28441 __res += __value;
28442 break;
28443 case money_base::space:
28444
28445
28446
28447 if (__testipad)
28448 __res.append(__width - __len, __fill);
28449 else
28450 __res += __fill;
28451 break;
28452 case money_base::none:
28453 if (__testipad)
28454 __res.append(__width - __len, __fill);
28455 break;
28456 }
28457 }
28458
28459
28460 if (__sign_size > 1)
28461 __res.append(__sign + 1, __sign_size - 1);
28462
28463
28464 __len = __res.size();
28465 if (__width > __len)
28466 {
28467 if (__f == ios_base::left)
28468
28469 __res.append(__width - __len, __fill);
28470 else
28471
28472 __res.insert(0, __width - __len, __fill);
28473 __len = __width;
28474 }
28475
28476
28477 __s = std::__write(__s, __res.data(), __len);
28478 }
28479 __io.width(0);
28480 return __s;
28481 }
28482
28483
28484 template<typename _CharT, typename _OutIter>
28485 _OutIter
28486 money_put<_CharT, _OutIter>::
28487 __do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
28488 double __units) const
28489 { return this->do_put(__s, __intl, __io, __fill, (long double) __units); }
28490
28491
28492 template<typename _CharT, typename _OutIter>
28493 _OutIter
28494 money_put<_CharT, _OutIter>::
28495 do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
28496 long double __units) const
28497 {
28498 const locale __loc = __io.getloc();
28499 const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
28500
28501
28502 int __cs_size = 64;
28503 char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
28504
28505
28506 int __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size,
28507 "%.*Lf", 0, __units);
28508
28509 if (__len >= __cs_size)
28510 {
28511 __cs_size = __len + 1;
28512 __cs = static_cast<char*>(__builtin_alloca(__cs_size));
28513 __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size,
28514 "%.*Lf", 0, __units);
28515 }
28516
28517
28518
28519
28520
28521
28522
28523 string_type __digits(__len, char_type());
28524 __ctype.widen(__cs, __cs + __len, &__digits[0]);
28525 return __intl ? _M_insert<true>(__s, __io, __fill, __digits)
28526 : _M_insert<false>(__s, __io, __fill, __digits);
28527 }
28528
28529 template<typename _CharT, typename _OutIter>
28530 _OutIter
28531 money_put<_CharT, _OutIter>::
28532 do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
28533 const string_type& __digits) const
28534 { return __intl ? _M_insert<true>(__s, __io, __fill, __digits)
28535 : _M_insert<false>(__s, __io, __fill, __digits); }
28536
28537 }
28538
28539
28540
28541
28542 template<typename _CharT, typename _InIter>
28543 time_base::dateorder
28544 time_get<_CharT, _InIter>::do_date_order() const
28545 { return time_base::no_order; }
28546
28547
28548
28549 template<typename _CharT, typename _InIter>
28550 _InIter
28551 time_get<_CharT, _InIter>::
28552 _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io,
28553 ios_base::iostate& __err, tm* __tm,
28554 const _CharT* __format) const
28555 {
28556 const locale& __loc = __io._M_getloc();
28557 const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
28558 const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
28559 const size_t __len = char_traits<_CharT>::length(__format);
28560
28561 ios_base::iostate __tmperr = ios_base::goodbit;
28562 for (size_t __i = 0; __beg != __end && __i < __len && !__tmperr; ++__i)
28563 {
28564 if (__ctype.narrow(__format[__i], 0) == '%')
28565 {
28566
28567 char __c = __ctype.narrow(__format[++__i], 0);
28568 int __mem = 0;
28569 if (__c == 'E' || __c == 'O')
28570 __c = __ctype.narrow(__format[++__i], 0);
28571 switch (__c)
28572 {
28573 const char* __cs;
28574 _CharT __wcs[10];
28575 case 'a':
28576
28577 const char_type* __days1[7];
28578 __tp._M_days_abbreviated(__days1);
28579 __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days1,
28580 7, __io, __tmperr);
28581 break;
28582 case 'A':
28583
28584 const char_type* __days2[7];
28585 __tp._M_days(__days2);
28586 __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days2,
28587 7, __io, __tmperr);
28588 break;
28589 case 'h':
28590 case 'b':
28591
28592 const char_type* __months1[12];
28593 __tp._M_months_abbreviated(__months1);
28594 __beg = _M_extract_name(__beg, __end, __tm->tm_mon,
28595 __months1, 12, __io, __tmperr);
28596 break;
28597 case 'B':
28598
28599 const char_type* __months2[12];
28600 __tp._M_months(__months2);
28601 __beg = _M_extract_name(__beg, __end, __tm->tm_mon,
28602 __months2, 12, __io, __tmperr);
28603 break;
28604 case 'c':
28605
28606 const char_type* __dt[2];
28607 __tp._M_date_time_formats(__dt);
28608 __beg = _M_extract_via_format(__beg, __end, __io, __tmperr,
28609 __tm, __dt[0]);
28610 break;
28611 case 'd':
28612
28613 __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 1, 31, 2,
28614 __io, __tmperr);
28615 break;
28616 case 'e':
28617
28618
28619 if (__ctype.is(ctype_base::space, *__beg))
28620 __beg = _M_extract_num(++__beg, __end, __tm->tm_mday, 1, 9,
28621 1, __io, __tmperr);
28622 else
28623 __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 10, 31,
28624 2, __io, __tmperr);
28625 break;
28626 case 'D':
28627
28628 __cs = "%m/%d/%y";
28629 __ctype.widen(__cs, __cs + 9, __wcs);
28630 __beg = _M_extract_via_format(__beg, __end, __io, __tmperr,
28631 __tm, __wcs);
28632 break;
28633 case 'H':
28634
28635 __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 0, 23, 2,
28636 __io, __tmperr);
28637 break;
28638 case 'I':
28639
28640 __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 1, 12, 2,
28641 __io, __tmperr);
28642 break;
28643 case 'm':
28644
28645 __beg = _M_extract_num(__beg, __end, __mem, 1, 12, 2,
28646 __io, __tmperr);
28647 if (!__tmperr)
28648 __tm->tm_mon = __mem - 1;
28649 break;
28650 case 'M':
28651
28652 __beg = _M_extract_num(__beg, __end, __tm->tm_min, 0, 59, 2,
28653 __io, __tmperr);
28654 break;
28655 case 'n':
28656 if (__ctype.narrow(*__beg, 0) == '\n')
28657 ++__beg;
28658 else
28659 __tmperr |= ios_base::failbit;
28660 break;
28661 case 'R':
28662
28663 __cs = "%H:%M";
28664 __ctype.widen(__cs, __cs + 6, __wcs);
28665 __beg = _M_extract_via_format(__beg, __end, __io, __tmperr,
28666 __tm, __wcs);
28667 break;
28668 case 'S':
28669
28670
28671
28672 __beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 60, 2,
28673
28674
28675
28676 __io, __tmperr);
28677 break;
28678 case 't':
28679 if (__ctype.narrow(*__beg, 0) == '\t')
28680 ++__beg;
28681 else
28682 __tmperr |= ios_base::failbit;
28683 break;
28684 case 'T':
28685
28686 __cs = "%H:%M:%S";
28687 __ctype.widen(__cs, __cs + 9, __wcs);
28688 __beg = _M_extract_via_format(__beg, __end, __io, __tmperr,
28689 __tm, __wcs);
28690 break;
28691 case 'x':
28692
28693 const char_type* __dates[2];
28694 __tp._M_date_formats(__dates);
28695 __beg = _M_extract_via_format(__beg, __end, __io, __tmperr,
28696 __tm, __dates[0]);
28697 break;
28698 case 'X':
28699
28700 const char_type* __times[2];
28701 __tp._M_time_formats(__times);
28702 __beg = _M_extract_via_format(__beg, __end, __io, __tmperr,
28703 __tm, __times[0]);
28704 break;
28705 case 'y':
28706 case 'C':
28707
28708 __beg = _M_extract_num(__beg, __end, __tm->tm_year, 0, 99, 2,
28709 __io, __tmperr);
28710 break;
28711 case 'Y':
28712
28713 __beg = _M_extract_num(__beg, __end, __mem, 0, 9999, 4,
28714 __io, __tmperr);
28715 if (!__tmperr)
28716 __tm->tm_year = __mem - 1900;
28717 break;
28718 case 'Z':
28719
28720 if (__ctype.is(ctype_base::upper, *__beg))
28721 {
28722 int __tmp;
28723 __beg = _M_extract_name(__beg, __end, __tmp,
28724 __timepunct_cache<_CharT>::_S_timezones,
28725 14, __io, __tmperr);
28726
28727
28728 if (__beg != __end && !__tmperr && __tmp == 0
28729 && (*__beg == __ctype.widen('-')
28730 || *__beg == __ctype.widen('+')))
28731 {
28732 __beg = _M_extract_num(__beg, __end, __tmp, 0, 23, 2,
28733 __io, __tmperr);
28734 __beg = _M_extract_num(__beg, __end, __tmp, 0, 59, 2,
28735 __io, __tmperr);
28736 }
28737 }
28738 else
28739 __tmperr |= ios_base::failbit;
28740 break;
28741 default:
28742
28743 __tmperr |= ios_base::failbit;
28744 }
28745 }
28746 else
28747 {
28748
28749 if (__format[__i] == *__beg)
28750 ++__beg;
28751 else
28752 __tmperr |= ios_base::failbit;
28753 }
28754 }
28755
28756 if (__tmperr)
28757 __err |= ios_base::failbit;
28758
28759 return __beg;
28760 }
28761
28762 template<typename _CharT, typename _InIter>
28763 _InIter
28764 time_get<_CharT, _InIter>::
28765 _M_extract_num(iter_type __beg, iter_type __end, int& __member,
28766 int __min, int __max, size_t __len,
28767 ios_base& __io, ios_base::iostate& __err) const
28768 {
28769 const locale& __loc = __io._M_getloc();
28770 const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
28771
28772
28773 int __mult = __len == 2 ? 10 : (__len == 4 ? 1000 : 1);
28774
28775 ++__min;
28776 size_t __i = 0;
28777 int __value = 0;
28778 for (; __beg != __end && __i < __len; ++__beg, ++__i)
28779 {
28780 const char __c = __ctype.narrow(*__beg, '*');
28781 if (__c >= '0' && __c <= '9')
28782 {
28783 __value = __value * 10 + (__c - '0');
28784 const int __valuec = __value * __mult;
28785 if (__valuec > __max || __valuec + __mult < __min)
28786 break;
28787 __mult /= 10;
28788 }
28789 else
28790 break;
28791 }
28792 if (__i == __len)
28793 __member = __value;
28794 else
28795 __err |= ios_base::failbit;
28796
28797 return __beg;
28798 }
28799
28800
28801
28802 template<typename _CharT, typename _InIter>
28803 _InIter
28804 time_get<_CharT, _InIter>::
28805 _M_extract_name(iter_type __beg, iter_type __end, int& __member,
28806 const _CharT** __names, size_t __indexlen,
28807 ios_base& __io, ios_base::iostate& __err) const
28808 {
28809 typedef char_traits<_CharT> __traits_type;
28810 const locale& __loc = __io._M_getloc();
28811 const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
28812
28813 int* __matches = static_cast<int*>(__builtin_alloca(sizeof(int)
28814 * __indexlen));
28815 size_t __nmatches = 0;
28816 size_t __pos = 0;
28817 bool __testvalid = true;
28818 const char_type* __name;
28819
28820
28821
28822
28823
28824 if (__beg != __end)
28825 {
28826 const char_type __c = *__beg;
28827 for (size_t __i1 = 0; __i1 < __indexlen; ++__i1)
28828 if (__c == __names[__i1][0]
28829 || __c == __ctype.toupper(__names[__i1][0]))
28830 __matches[__nmatches++] = __i1;
28831 }
28832
28833 while (__nmatches > 1)
28834 {
28835
28836 size_t __minlen = __traits_type::length(__names[__matches[0]]);
28837 for (size_t __i2 = 1; __i2 < __nmatches; ++__i2)
28838 __minlen = std::min(__minlen,
28839 __traits_type::length(__names[__matches[__i2]]));
28840 ++__beg, ++__pos;
28841 if (__pos < __minlen && __beg != __end)
28842 for (size_t __i3 = 0; __i3 < __nmatches;)
28843 {
28844 __name = __names[__matches[__i3]];
28845 if (!(__name[__pos] == *__beg))
28846 __matches[__i3] = __matches[--__nmatches];
28847 else
28848 ++__i3;
28849 }
28850 else
28851 break;
28852 }
28853
28854 if (__nmatches == 1)
28855 {
28856
28857 ++__beg, ++__pos;
28858 __name = __names[__matches[0]];
28859 const size_t __len = __traits_type::length(__name);
28860 while (__pos < __len && __beg != __end && __name[__pos] == *__beg)
28861 ++__beg, ++__pos;
28862
28863 if (__len == __pos)
28864 __member = __matches[0];
28865 else
28866 __testvalid = false;
28867 }
28868 else
28869 __testvalid = false;
28870 if (!__testvalid)
28871 __err |= ios_base::failbit;
28872
28873 return __beg;
28874 }
28875
28876 template<typename _CharT, typename _InIter>
28877 _InIter
28878 time_get<_CharT, _InIter>::
28879 do_get_time(iter_type __beg, iter_type __end, ios_base& __io,
28880 ios_base::iostate& __err, tm* __tm) const
28881 {
28882 const locale& __loc = __io._M_getloc();
28883 const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
28884 const char_type* __times[2];
28885 __tp._M_time_formats(__times);
28886 __beg = _M_extract_via_format(__beg, __end, __io, __err,
28887 __tm, __times[0]);
28888 if (__beg == __end)
28889 __err |= ios_base::eofbit;
28890 return __beg;
28891 }
28892
28893 template<typename _CharT, typename _InIter>
28894 _InIter
28895 time_get<_CharT, _InIter>::
28896 do_get_date(iter_type __beg, iter_type __end, ios_base& __io,
28897 ios_base::iostate& __err, tm* __tm) const
28898 {
28899 const locale& __loc = __io._M_getloc();
28900 const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
28901 const char_type* __dates[2];
28902 __tp._M_date_formats(__dates);
28903 __beg = _M_extract_via_format(__beg, __end, __io, __err,
28904 __tm, __dates[0]);
28905 if (__beg == __end)
28906 __err |= ios_base::eofbit;
28907 return __beg;
28908 }
28909
28910 template<typename _CharT, typename _InIter>
28911 _InIter
28912 time_get<_CharT, _InIter>::
28913 do_get_weekday(iter_type __beg, iter_type __end, ios_base& __io,
28914 ios_base::iostate& __err, tm* __tm) const
28915 {
28916 typedef char_traits<_CharT> __traits_type;
28917 const locale& __loc = __io._M_getloc();
28918 const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
28919 const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
28920 const char_type* __days[7];
28921 __tp._M_days_abbreviated(__days);
28922 int __tmpwday;
28923 ios_base::iostate __tmperr = ios_base::goodbit;
28924 __beg = _M_extract_name(__beg, __end, __tmpwday, __days, 7,
28925 __io, __tmperr);
28926
28927
28928
28929
28930
28931
28932
28933 if (!__tmperr && __beg != __end)
28934 {
28935 size_t __pos = __traits_type::length(__days[__tmpwday]);
28936 __tp._M_days(__days);
28937 const char_type* __name = __days[__tmpwday];
28938 if (__name[__pos] == *__beg)
28939 {
28940
28941 const size_t __len = __traits_type::length(__name);
28942 while (__pos < __len && __beg != __end
28943 && __name[__pos] == *__beg)
28944 ++__beg, ++__pos;
28945 if (__len != __pos)
28946 __tmperr |= ios_base::failbit;
28947 }
28948 }
28949 if (!__tmperr)
28950 __tm->tm_wday = __tmpwday;
28951 else
28952 __err |= ios_base::failbit;
28953
28954 if (__beg == __end)
28955 __err |= ios_base::eofbit;
28956 return __beg;
28957 }
28958
28959 template<typename _CharT, typename _InIter>
28960 _InIter
28961 time_get<_CharT, _InIter>::
28962 do_get_monthname(iter_type __beg, iter_type __end,
28963 ios_base& __io, ios_base::iostate& __err, tm* __tm) const
28964 {
28965 typedef char_traits<_CharT> __traits_type;
28966 const locale& __loc = __io._M_getloc();
28967 const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
28968 const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
28969 const char_type* __months[12];
28970 __tp._M_months_abbreviated(__months);
28971 int __tmpmon;
28972 ios_base::iostate __tmperr = ios_base::goodbit;
28973 __beg = _M_extract_name(__beg, __end, __tmpmon, __months, 12,
28974 __io, __tmperr);
28975
28976
28977
28978
28979
28980
28981
28982 if (!__tmperr && __beg != __end)
28983 {
28984 size_t __pos = __traits_type::length(__months[__tmpmon]);
28985 __tp._M_months(__months);
28986 const char_type* __name = __months[__tmpmon];
28987 if (__name[__pos] == *__beg)
28988 {
28989
28990 const size_t __len = __traits_type::length(__name);
28991 while (__pos < __len && __beg != __end
28992 && __name[__pos] == *__beg)
28993 ++__beg, ++__pos;
28994 if (__len != __pos)
28995 __tmperr |= ios_base::failbit;
28996 }
28997 }
28998 if (!__tmperr)
28999 __tm->tm_mon = __tmpmon;
29000 else
29001 __err |= ios_base::failbit;
29002
29003 if (__beg == __end)
29004 __err |= ios_base::eofbit;
29005 return __beg;
29006 }
29007
29008 template<typename _CharT, typename _InIter>
29009 _InIter
29010 time_get<_CharT, _InIter>::
29011 do_get_year(iter_type __beg, iter_type __end, ios_base& __io,
29012 ios_base::iostate& __err, tm* __tm) const
29013 {
29014 const locale& __loc = __io._M_getloc();
29015 const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
29016
29017 size_t __i = 0;
29018 int __value = 0;
29019 for (; __beg != __end && __i < 4; ++__beg, ++__i)
29020 {
29021 const char __c = __ctype.narrow(*__beg, '*');
29022 if (__c >= '0' && __c <= '9')
29023 __value = __value * 10 + (__c - '0');
29024 else
29025 break;
29026 }
29027 if (__i == 2 || __i == 4)
29028 __tm->tm_year = __i == 2 ? __value : __value - 1900;
29029 else
29030 __err |= ios_base::failbit;
29031
29032 if (__beg == __end)
29033 __err |= ios_base::eofbit;
29034 return __beg;
29035 }
29036
29037 template<typename _CharT, typename _OutIter>
29038 _OutIter
29039 time_put<_CharT, _OutIter>::
29040 put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm,
29041 const _CharT* __beg, const _CharT* __end) const
29042 {
29043 const locale& __loc = __io._M_getloc();
29044 ctype<_CharT> const& __ctype = use_facet<ctype<_CharT> >(__loc);
29045 for (; __beg != __end; ++__beg)
29046 if (__ctype.narrow(*__beg, 0) != '%')
29047 {
29048 *__s = *__beg;
29049 ++__s;
29050 }
29051 else if (++__beg != __end)
29052 {
29053 char __format;
29054 char __mod = 0;
29055 const char __c = __ctype.narrow(*__beg, 0);
29056 if (__c != 'E' && __c != 'O')
29057 __format = __c;
29058 else if (++__beg != __end)
29059 {
29060 __mod = __c;
29061 __format = __ctype.narrow(*__beg, 0);
29062 }
29063 else
29064 break;
29065 __s = this->do_put(__s, __io, __fill, __tm, __format, __mod);
29066 }
29067 else
29068 break;
29069 return __s;
29070 }
29071
29072 template<typename _CharT, typename _OutIter>
29073 _OutIter
29074 time_put<_CharT, _OutIter>::
29075 do_put(iter_type __s, ios_base& __io, char_type, const tm* __tm,
29076 char __format, char __mod) const
29077 {
29078 const locale& __loc = __io._M_getloc();
29079 ctype<_CharT> const& __ctype = use_facet<ctype<_CharT> >(__loc);
29080 __timepunct<_CharT> const& __tp = use_facet<__timepunct<_CharT> >(__loc);
29081
29082
29083
29084 const size_t __maxlen = 128;
29085 char_type* __res =
29086 static_cast<char_type*>(__builtin_alloca(sizeof(char_type) * __maxlen));
29087
29088
29089
29090
29091
29092
29093 char_type __fmt[4];
29094 __fmt[0] = __ctype.widen('%');
29095 if (!__mod)
29096 {
29097 __fmt[1] = __format;
29098 __fmt[2] = char_type();
29099 }
29100 else
29101 {
29102 __fmt[1] = __mod;
29103 __fmt[2] = __format;
29104 __fmt[3] = char_type();
29105 }
29106
29107 __tp._M_put(__res, __maxlen, __fmt, __tm);
29108
29109
29110 return std::__write(__s, __res, char_traits<char_type>::length(__res));
29111 }
29112
29113
29114 template<typename _CharT>
29115 int
29116 collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const
29117 { return 0; }
29118
29119
29120 template<typename _CharT>
29121 size_t
29122 collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const
29123 { return 0; }
29124
29125 template<typename _CharT>
29126 int
29127 collate<_CharT>::
29128 do_compare(const _CharT* __lo1, const _CharT* __hi1,
29129 const _CharT* __lo2, const _CharT* __hi2) const
29130 {
29131
29132
29133 const string_type __one(__lo1, __hi1);
29134 const string_type __two(__lo2, __hi2);
29135
29136 const _CharT* __p = __one.c_str();
29137 const _CharT* __pend = __one.data() + __one.length();
29138 const _CharT* __q = __two.c_str();
29139 const _CharT* __qend = __two.data() + __two.length();
29140
29141
29142
29143
29144 for (;;)
29145 {
29146 const int __res = _M_compare(__p, __q);
29147 if (__res)
29148 return __res;
29149
29150 __p += char_traits<_CharT>::length(__p);
29151 __q += char_traits<_CharT>::length(__q);
29152 if (__p == __pend && __q == __qend)
29153 return 0;
29154 else if (__p == __pend)
29155 return -1;
29156 else if (__q == __qend)
29157 return 1;
29158
29159 __p++;
29160 __q++;
29161 }
29162 }
29163
29164 template<typename _CharT>
29165 typename collate<_CharT>::string_type
29166 collate<_CharT>::
29167 do_transform(const _CharT* __lo, const _CharT* __hi) const
29168 {
29169 string_type __ret;
29170
29171
29172 const string_type __str(__lo, __hi);
29173
29174 const _CharT* __p = __str.c_str();
29175 const _CharT* __pend = __str.data() + __str.length();
29176
29177 size_t __len = (__hi - __lo) * 2;
29178
29179 _CharT* __c = new _CharT[__len];
29180
29181 try
29182 {
29183
29184
29185
29186 for (;;)
29187 {
29188
29189 size_t __res = _M_transform(__c, __p, __len);
29190
29191
29192 if (__res >= __len)
29193 {
29194 __len = __res + 1;
29195 delete [] __c, __c = 0;
29196 __c = new _CharT[__len];
29197 __res = _M_transform(__c, __p, __len);
29198 }
29199
29200 __ret.append(__c, __res);
29201 __p += char_traits<_CharT>::length(__p);
29202 if (__p == __pend)
29203 break;
29204
29205 __p++;
29206 __ret.push_back(_CharT());
29207 }
29208 }
29209 catch(...)
29210 {
29211 delete [] __c;
29212 throw;
29213 }
29214
29215 delete [] __c;
29216
29217 return __ret;
29218 }
29219
29220 template<typename _CharT>
29221 long
29222 collate<_CharT>::
29223 do_hash(const _CharT* __lo, const _CharT* __hi) const
29224 {
29225 unsigned long __val = 0;
29226 for (; __lo < __hi; ++__lo)
29227 __val = *__lo + ((__val << 7) |
29228 (__val >> (numeric_limits<unsigned long>::digits - 7)));
29229 return static_cast<long>(__val);
29230 }
29231 # 2503 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.tcc" 3
29232 template<typename _CharT, typename _Traits>
29233 void
29234 __pad<_CharT, _Traits>::_S_pad(ios_base& __io, _CharT __fill,
29235 _CharT* __news, const _CharT* __olds,
29236 const streamsize __newlen,
29237 const streamsize __oldlen, const bool __num)
29238 {
29239 const size_t __plen = static_cast<size_t>(__newlen - __oldlen);
29240 const ios_base::fmtflags __adjust = __io.flags() & ios_base::adjustfield;
29241
29242
29243 if (__adjust == ios_base::left)
29244 {
29245 _Traits::copy(__news, const_cast<_CharT*>(__olds), __oldlen);
29246 _Traits::assign(__news + __oldlen, __plen, __fill);
29247 return;
29248 }
29249
29250 size_t __mod = 0;
29251 if (__adjust == ios_base::internal && __num)
29252 {
29253
29254
29255
29256 const locale& __loc = __io._M_getloc();
29257 const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
29258
29259 const bool __testsign = (__ctype.widen('-') == __olds[0]
29260 || __ctype.widen('+') == __olds[0]);
29261 const bool __testhex = (__ctype.widen('0') == __olds[0]
29262 && __oldlen > 1
29263 && (__ctype.widen('x') == __olds[1]
29264 || __ctype.widen('X') == __olds[1]));
29265 if (__testhex)
29266 {
29267 __news[0] = __olds[0];
29268 __news[1] = __olds[1];
29269 __mod = 2;
29270 __news += 2;
29271 }
29272 else if (__testsign)
29273 {
29274 __news[0] = __olds[0];
29275 __mod = 1;
29276 ++__news;
29277 }
29278
29279 }
29280 _Traits::assign(__news, __plen, __fill);
29281 _Traits::copy(__news + __plen, const_cast<_CharT*>(__olds + __mod),
29282 __oldlen - __mod);
29283 }
29284
29285 bool
29286 __verify_grouping(const char* __grouping, size_t __grouping_size,
29287 const string& __grouping_tmp)
29288 {
29289 const size_t __n = __grouping_tmp.size() - 1;
29290 const size_t __min = std::min(__n, size_t(__grouping_size - 1));
29291 size_t __i = __n;
29292 bool __test = true;
29293
29294
29295
29296
29297 for (size_t __j = 0; __j < __min && __test; --__i, ++__j)
29298 __test = __grouping_tmp[__i] == __grouping[__j];
29299 for (; __i && __test; --__i)
29300 __test = __grouping_tmp[__i] == __grouping[__min];
29301
29302
29303
29304 if (static_cast<signed char>(__grouping[__min]) > 0)
29305 __test &= __grouping_tmp[0] <= __grouping[__min];
29306 return __test;
29307 }
29308
29309 template<typename _CharT>
29310 _CharT*
29311 __add_grouping(_CharT* __s, _CharT __sep,
29312 const char* __gbeg, size_t __gsize,
29313 const _CharT* __first, const _CharT* __last)
29314 {
29315 size_t __idx = 0;
29316 size_t __ctr = 0;
29317
29318 while (__last - __first > __gbeg[__idx]
29319 && static_cast<signed char>(__gbeg[__idx]) > 0)
29320 {
29321 __last -= __gbeg[__idx];
29322 __idx < __gsize - 1 ? ++__idx : ++__ctr;
29323 }
29324
29325 while (__first != __last)
29326 *__s++ = *__first++;
29327
29328 while (__ctr--)
29329 {
29330 *__s++ = __sep;
29331 for (char __i = __gbeg[__idx]; __i > 0; --__i)
29332 *__s++ = *__first++;
29333 }
29334
29335 while (__idx--)
29336 {
29337 *__s++ = __sep;
29338 for (char __i = __gbeg[__idx]; __i > 0; --__i)
29339 *__s++ = *__first++;
29340 }
29341
29342 return __s;
29343 }
29344
29345
29346
29347
29348
29349 extern template class moneypunct<char, false>;
29350 extern template class moneypunct<char, true>;
29351 extern template class moneypunct_byname<char, false>;
29352 extern template class moneypunct_byname<char, true>;
29353 extern template class __gnu_cxx_ldbl128:: money_get<char>;
29354 extern template class __gnu_cxx_ldbl128:: money_put<char>;
29355 extern template class numpunct<char>;
29356 extern template class numpunct_byname<char>;
29357 extern template class __gnu_cxx_ldbl128:: num_get<char>;
29358 extern template class __gnu_cxx_ldbl128:: num_put<char>;
29359 extern template class __timepunct<char>;
29360 extern template class time_put<char>;
29361 extern template class time_put_byname<char>;
29362 extern template class time_get<char>;
29363 extern template class time_get_byname<char>;
29364 extern template class messages<char>;
29365 extern template class messages_byname<char>;
29366 extern template class ctype_byname<char>;
29367 extern template class codecvt_byname<char, char, mbstate_t>;
29368 extern template class collate<char>;
29369 extern template class collate_byname<char>;
29370
29371 extern template
29372 const codecvt<char, char, mbstate_t>&
29373 use_facet<codecvt<char, char, mbstate_t> >(const locale&);
29374
29375 extern template
29376 const collate<char>&
29377 use_facet<collate<char> >(const locale&);
29378
29379 extern template
29380 const numpunct<char>&
29381 use_facet<numpunct<char> >(const locale&);
29382
29383 extern template
29384 const num_put<char>&
29385 use_facet<num_put<char> >(const locale&);
29386
29387 extern template
29388 const num_get<char>&
29389 use_facet<num_get<char> >(const locale&);
29390
29391 extern template
29392 const moneypunct<char, true>&
29393 use_facet<moneypunct<char, true> >(const locale&);
29394
29395 extern template
29396 const moneypunct<char, false>&
29397 use_facet<moneypunct<char, false> >(const locale&);
29398
29399 extern template
29400 const money_put<char>&
29401 use_facet<money_put<char> >(const locale&);
29402
29403 extern template
29404 const money_get<char>&
29405 use_facet<money_get<char> >(const locale&);
29406
29407 extern template
29408 const __timepunct<char>&
29409 use_facet<__timepunct<char> >(const locale&);
29410
29411 extern template
29412 const time_put<char>&
29413 use_facet<time_put<char> >(const locale&);
29414
29415 extern template
29416 const time_get<char>&
29417 use_facet<time_get<char> >(const locale&);
29418
29419 extern template
29420 const messages<char>&
29421 use_facet<messages<char> >(const locale&);
29422
29423 extern template
29424 bool
29425 has_facet<ctype<char> >(const locale&);
29426
29427 extern template
29428 bool
29429 has_facet<codecvt<char, char, mbstate_t> >(const locale&);
29430
29431 extern template
29432 bool
29433 has_facet<collate<char> >(const locale&);
29434
29435 extern template
29436 bool
29437 has_facet<numpunct<char> >(const locale&);
29438
29439 extern template
29440 bool
29441 has_facet<num_put<char> >(const locale&);
29442
29443 extern template
29444 bool
29445 has_facet<num_get<char> >(const locale&);
29446
29447 extern template
29448 bool
29449 has_facet<moneypunct<char> >(const locale&);
29450
29451 extern template
29452 bool
29453 has_facet<money_put<char> >(const locale&);
29454
29455 extern template
29456 bool
29457 has_facet<money_get<char> >(const locale&);
29458
29459 extern template
29460 bool
29461 has_facet<__timepunct<char> >(const locale&);
29462
29463 extern template
29464 bool
29465 has_facet<time_put<char> >(const locale&);
29466
29467 extern template
29468 bool
29469 has_facet<time_get<char> >(const locale&);
29470
29471 extern template
29472 bool
29473 has_facet<messages<char> >(const locale&);
29474
29475
29476 extern template class moneypunct<wchar_t, false>;
29477 extern template class moneypunct<wchar_t, true>;
29478 extern template class moneypunct_byname<wchar_t, false>;
29479 extern template class moneypunct_byname<wchar_t, true>;
29480 extern template class __gnu_cxx_ldbl128:: money_get<wchar_t>;
29481 extern template class __gnu_cxx_ldbl128:: money_put<wchar_t>;
29482 extern template class numpunct<wchar_t>;
29483 extern template class numpunct_byname<wchar_t>;
29484 extern template class __gnu_cxx_ldbl128:: num_get<wchar_t>;
29485 extern template class __gnu_cxx_ldbl128:: num_put<wchar_t>;
29486 extern template class __timepunct<wchar_t>;
29487 extern template class time_put<wchar_t>;
29488 extern template class time_put_byname<wchar_t>;
29489 extern template class time_get<wchar_t>;
29490 extern template class time_get_byname<wchar_t>;
29491 extern template class messages<wchar_t>;
29492 extern template class messages_byname<wchar_t>;
29493 extern template class ctype_byname<wchar_t>;
29494 extern template class codecvt_byname<wchar_t, char, mbstate_t>;
29495 extern template class collate<wchar_t>;
29496 extern template class collate_byname<wchar_t>;
29497
29498 extern template
29499 const codecvt<wchar_t, char, mbstate_t>&
29500 use_facet<codecvt<wchar_t, char, mbstate_t> >(locale const&);
29501
29502 extern template
29503 const collate<wchar_t>&
29504 use_facet<collate<wchar_t> >(const locale&);
29505
29506 extern template
29507 const numpunct<wchar_t>&
29508 use_facet<numpunct<wchar_t> >(const locale&);
29509
29510 extern template
29511 const num_put<wchar_t>&
29512 use_facet<num_put<wchar_t> >(const locale&);
29513
29514 extern template
29515 const num_get<wchar_t>&
29516 use_facet<num_get<wchar_t> >(const locale&);
29517
29518 extern template
29519 const moneypunct<wchar_t, true>&
29520 use_facet<moneypunct<wchar_t, true> >(const locale&);
29521
29522 extern template
29523 const moneypunct<wchar_t, false>&
29524 use_facet<moneypunct<wchar_t, false> >(const locale&);
29525
29526 extern template
29527 const money_put<wchar_t>&
29528 use_facet<money_put<wchar_t> >(const locale&);
29529
29530 extern template
29531 const money_get<wchar_t>&
29532 use_facet<money_get<wchar_t> >(const locale&);
29533
29534 extern template
29535 const __timepunct<wchar_t>&
29536 use_facet<__timepunct<wchar_t> >(const locale&);
29537
29538 extern template
29539 const time_put<wchar_t>&
29540 use_facet<time_put<wchar_t> >(const locale&);
29541
29542 extern template
29543 const time_get<wchar_t>&
29544 use_facet<time_get<wchar_t> >(const locale&);
29545
29546 extern template
29547 const messages<wchar_t>&
29548 use_facet<messages<wchar_t> >(const locale&);
29549
29550 extern template
29551 bool
29552 has_facet<ctype<wchar_t> >(const locale&);
29553
29554 extern template
29555 bool
29556 has_facet<codecvt<wchar_t, char, mbstate_t> >(const locale&);
29557
29558 extern template
29559 bool
29560 has_facet<collate<wchar_t> >(const locale&);
29561
29562 extern template
29563 bool
29564 has_facet<numpunct<wchar_t> >(const locale&);
29565
29566 extern template
29567 bool
29568 has_facet<num_put<wchar_t> >(const locale&);
29569
29570 extern template
29571 bool
29572 has_facet<num_get<wchar_t> >(const locale&);
29573
29574 extern template
29575 bool
29576 has_facet<moneypunct<wchar_t> >(const locale&);
29577
29578 extern template
29579 bool
29580 has_facet<money_put<wchar_t> >(const locale&);
29581
29582 extern template
29583 bool
29584 has_facet<money_get<wchar_t> >(const locale&);
29585
29586 extern template
29587 bool
29588 has_facet<__timepunct<wchar_t> >(const locale&);
29589
29590 extern template
29591 bool
29592 has_facet<time_put<wchar_t> >(const locale&);
29593
29594 extern template
29595 bool
29596 has_facet<time_get<wchar_t> >(const locale&);
29597
29598 extern template
29599 bool
29600 has_facet<messages<wchar_t> >(const locale&);
29601
29602
29603
29604 }
29605 # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/locale" 2 3
29606 # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ostream.tcc" 2 3
29607
29608 namespace std __attribute__ ((__visibility__ ("default"))) {
29609
29610 template<typename _CharT, typename _Traits>
29611 basic_ostream<_CharT, _Traits>::sentry::
29612 sentry(basic_ostream<_CharT, _Traits>& __os)
29613 : _M_ok(false), _M_os(__os)
29614 {
29615
29616 if (__os.tie() && __os.good())
29617 __os.tie()->flush();
29618
29619 if (__os.good())
29620 _M_ok = true;
29621 else
29622 __os.setstate(ios_base::failbit);
29623 }
29624
29625 template<typename _CharT, typename _Traits>
29626 template<typename _ValueT>
29627 basic_ostream<_CharT, _Traits>&
29628 basic_ostream<_CharT, _Traits>::
29629 _M_insert(_ValueT __v)
29630 {
29631 sentry __cerb(*this);
29632 if (__cerb)
29633 {
29634 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
29635 try
29636 {
29637 const __num_put_type& __np = __check_facet(this->_M_num_put);
29638 if (__np.put(*this, *this, this->fill(), __v).failed())
29639 __err |= ios_base::badbit;
29640 }
29641 catch(...)
29642 { this->_M_setstate(ios_base::badbit); }
29643 if (__err)
29644 this->setstate(__err);
29645 }
29646 return *this;
29647 }
29648
29649 template<typename _CharT, typename _Traits>
29650 basic_ostream<_CharT, _Traits>&
29651 basic_ostream<_CharT, _Traits>::
29652 operator<<(short __n)
29653 {
29654
29655
29656 const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield;
29657 if (__fmt == ios_base::oct || __fmt == ios_base::hex)
29658 return _M_insert(static_cast<long>(static_cast<unsigned short>(__n)));
29659 else
29660 return _M_insert(static_cast<long>(__n));
29661 }
29662
29663 template<typename _CharT, typename _Traits>
29664 basic_ostream<_CharT, _Traits>&
29665 basic_ostream<_CharT, _Traits>::
29666 operator<<(int __n)
29667 {
29668
29669
29670 const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield;
29671 if (__fmt == ios_base::oct || __fmt == ios_base::hex)
29672 return _M_insert(static_cast<long>(static_cast<unsigned int>(__n)));
29673 else
29674 return _M_insert(static_cast<long>(__n));
29675 }
29676
29677 template<typename _CharT, typename _Traits>
29678 basic_ostream<_CharT, _Traits>&
29679 basic_ostream<_CharT, _Traits>::
29680 operator<<(__streambuf_type* __sbin)
29681 {
29682 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
29683 sentry __cerb(*this);
29684 if (__cerb && __sbin)
29685 {
29686 try
29687 {
29688 if (!__copy_streambufs(__sbin, this->rdbuf()))
29689 __err |= ios_base::failbit;
29690 }
29691 catch(...)
29692 { this->_M_setstate(ios_base::failbit); }
29693 }
29694 else if (!__sbin)
29695 __err |= ios_base::badbit;
29696 if (__err)
29697 this->setstate(__err);
29698 return *this;
29699 }
29700
29701 template<typename _CharT, typename _Traits>
29702 basic_ostream<_CharT, _Traits>&
29703 basic_ostream<_CharT, _Traits>::
29704 put(char_type __c)
29705 {
29706
29707
29708
29709
29710
29711
29712 sentry __cerb(*this);
29713 if (__cerb)
29714 {
29715 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
29716 try
29717 {
29718 const int_type __put = this->rdbuf()->sputc(__c);
29719 if (traits_type::eq_int_type(__put, traits_type::eof()))
29720 __err |= ios_base::badbit;
29721 }
29722 catch (...)
29723 { this->_M_setstate(ios_base::badbit); }
29724 if (__err)
29725 this->setstate(__err);
29726 }
29727 return *this;
29728 }
29729
29730 template<typename _CharT, typename _Traits>
29731 basic_ostream<_CharT, _Traits>&
29732 basic_ostream<_CharT, _Traits>::
29733 write(const _CharT* __s, streamsize __n)
29734 {
29735
29736
29737
29738
29739
29740
29741
29742 sentry __cerb(*this);
29743 if (__cerb)
29744 {
29745 try
29746 { _M_write(__s, __n); }
29747 catch (...)
29748 { this->_M_setstate(ios_base::badbit); }
29749 }
29750 return *this;
29751 }
29752
29753 template<typename _CharT, typename _Traits>
29754 basic_ostream<_CharT, _Traits>&
29755 basic_ostream<_CharT, _Traits>::
29756 flush()
29757 {
29758
29759
29760
29761 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
29762 try
29763 {
29764 if (this->rdbuf() && this->rdbuf()->pubsync() == -1)
29765 __err |= ios_base::badbit;
29766 }
29767 catch(...)
29768 { this->_M_setstate(ios_base::badbit); }
29769 if (__err)
29770 this->setstate(__err);
29771 return *this;
29772 }
29773
29774 template<typename _CharT, typename _Traits>
29775 typename basic_ostream<_CharT, _Traits>::pos_type
29776 basic_ostream<_CharT, _Traits>::
29777 tellp()
29778 {
29779 pos_type __ret = pos_type(-1);
29780 try
29781 {
29782 if (!this->fail())
29783 __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out);
29784 }
29785 catch(...)
29786 { this->_M_setstate(ios_base::badbit); }
29787 return __ret;
29788 }
29789
29790 template<typename _CharT, typename _Traits>
29791 basic_ostream<_CharT, _Traits>&
29792 basic_ostream<_CharT, _Traits>::
29793 seekp(pos_type __pos)
29794 {
29795 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
29796 try
29797 {
29798 if (!this->fail())
29799 {
29800
29801
29802 const pos_type __p = this->rdbuf()->pubseekpos(__pos,
29803 ios_base::out);
29804
29805
29806 if (__p == pos_type(off_type(-1)))
29807 __err |= ios_base::failbit;
29808 }
29809 }
29810 catch(...)
29811 { this->_M_setstate(ios_base::badbit); }
29812 if (__err)
29813 this->setstate(__err);
29814 return *this;
29815 }
29816
29817 template<typename _CharT, typename _Traits>
29818 basic_ostream<_CharT, _Traits>&
29819 basic_ostream<_CharT, _Traits>::
29820 seekp(off_type __off, ios_base::seekdir __dir)
29821 {
29822 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
29823 try
29824 {
29825 if (!this->fail())
29826 {
29827
29828
29829 const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir,
29830 ios_base::out);
29831
29832
29833 if (__p == pos_type(off_type(-1)))
29834 __err |= ios_base::failbit;
29835 }
29836 }
29837 catch(...)
29838 { this->_M_setstate(ios_base::badbit); }
29839 if (__err)
29840 this->setstate(__err);
29841 return *this;
29842 }
29843
29844 template<typename _CharT, typename _Traits>
29845 basic_ostream<_CharT, _Traits>&
29846 operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
29847 {
29848 if (!__s)
29849 __out.setstate(ios_base::badbit);
29850 else
29851 {
29852
29853
29854 const size_t __clen = char_traits<char>::length(__s);
29855 _CharT* __ws = 0;
29856 try
29857 {
29858 __ws = new _CharT[__clen];
29859 for (size_t __i = 0; __i < __clen; ++__i)
29860 __ws[__i] = __out.widen(__s[__i]);
29861 }
29862 catch(...)
29863 {
29864 delete [] __ws;
29865 __out._M_setstate(ios_base::badbit);
29866 return __out;
29867 }
29868
29869 try
29870 {
29871 __ostream_insert(__out, __ws, __clen);
29872 delete [] __ws;
29873 }
29874 catch(...)
29875 {
29876 delete [] __ws;
29877 throw;
29878 }
29879 }
29880 return __out;
29881 }
29882
29883
29884
29885
29886
29887 extern template class basic_ostream<char>;
29888 extern template ostream& endl(ostream&);
29889 extern template ostream& ends(ostream&);
29890 extern template ostream& flush(ostream&);
29891 extern template ostream& operator<<(ostream&, char);
29892 extern template ostream& operator<<(ostream&, unsigned char);
29893 extern template ostream& operator<<(ostream&, signed char);
29894 extern template ostream& operator<<(ostream&, const char*);
29895 extern template ostream& operator<<(ostream&, const unsigned char*);
29896 extern template ostream& operator<<(ostream&, const signed char*);
29897 extern template ostream& __ostream_insert(ostream&, const char*, streamsize);
29898
29899 extern template ostream& ostream::_M_insert(long);
29900 extern template ostream& ostream::_M_insert(unsigned long);
29901 extern template ostream& ostream::_M_insert(bool);
29902
29903 extern template ostream& ostream::_M_insert(long long);
29904 extern template ostream& ostream::_M_insert(unsigned long long);
29905
29906 extern template ostream& ostream::_M_insert(double);
29907 extern template ostream& ostream::_M_insert(long double);
29908 extern template ostream& ostream::_M_insert(const void*);
29909
29910
29911 extern template class basic_ostream<wchar_t>;
29912 extern template wostream& endl(wostream&);
29913 extern template wostream& ends(wostream&);
29914 extern template wostream& flush(wostream&);
29915 extern template wostream& operator<<(wostream&, wchar_t);
29916 extern template wostream& operator<<(wostream&, char);
29917 extern template wostream& operator<<(wostream&, const wchar_t*);
29918 extern template wostream& operator<<(wostream&, const char*);
29919 extern template wostream& __ostream_insert(wostream&, const wchar_t*,
29920 streamsize);
29921
29922 extern template wostream& wostream::_M_insert(long);
29923 extern template wostream& wostream::_M_insert(unsigned long);
29924 extern template wostream& wostream::_M_insert(bool);
29925
29926 extern template wostream& wostream::_M_insert(long long);
29927 extern template wostream& wostream::_M_insert(unsigned long long);
29928
29929 extern template wostream& wostream::_M_insert(double);
29930 extern template wostream& wostream::_M_insert(long double);
29931 extern template wostream& wostream::_M_insert(const void*);
29932
29933
29934
29935 }
29936 # 573 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 2 3
29937 # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iostream" 2 3
29938 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 1 3
29939 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
29940
29941 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
29942
29943
29944
29945
29946 namespace std __attribute__ ((__visibility__ ("default"))) {
29947 # 57 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
29948 template<typename _CharT, typename _Traits>
29949 class basic_istream : virtual public basic_ios<_CharT, _Traits>
29950 {
29951 public:
29952
29953 typedef _CharT char_type;
29954 typedef typename _Traits::int_type int_type;
29955 typedef typename _Traits::pos_type pos_type;
29956 typedef typename _Traits::off_type off_type;
29957 typedef _Traits traits_type;
29958
29959
29960 typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
29961 typedef basic_ios<_CharT, _Traits> __ios_type;
29962 typedef basic_istream<_CharT, _Traits> __istream_type;
29963 typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> >
29964 __num_get_type;
29965 typedef ctype<_CharT> __ctype_type;
29966
29967 template<typename _CharT2, typename _Traits2>
29968 friend basic_istream<_CharT2, _Traits2>&
29969 operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2&);
29970
29971 template<typename _CharT2, typename _Traits2>
29972 friend basic_istream<_CharT2, _Traits2>&
29973 operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*);
29974
29975 protected:
29976
29977
29978
29979
29980
29981
29982
29983 streamsize _M_gcount;
29984
29985 public:
29986 # 103 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
29987 explicit
29988 basic_istream(__streambuf_type* __sb): _M_gcount(streamsize(0))
29989 { this->init(__sb); }
29990
29991
29992
29993
29994
29995
29996 virtual
29997 ~basic_istream()
29998 { _M_gcount = streamsize(0); }
29999
30000
30001 class sentry;
30002 friend class sentry;
30003 # 130 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30004 __istream_type&
30005 operator>>(__istream_type& (*__pf)(__istream_type&))
30006 { return __pf(*this); }
30007
30008 __istream_type&
30009 operator>>(__ios_type& (*__pf)(__ios_type&))
30010 {
30011 __pf(*this);
30012 return *this;
30013 }
30014
30015 __istream_type&
30016 operator>>(ios_base& (*__pf)(ios_base&))
30017 {
30018 __pf(*this);
30019 return *this;
30020 }
30021 # 177 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30022 __istream_type&
30023 operator>>(bool& __n)
30024 { return _M_extract(__n); }
30025
30026 __istream_type&
30027 operator>>(short& __n);
30028
30029 __istream_type&
30030 operator>>(unsigned short& __n)
30031 { return _M_extract(__n); }
30032
30033 __istream_type&
30034 operator>>(int& __n);
30035
30036 __istream_type&
30037 operator>>(unsigned int& __n)
30038 { return _M_extract(__n); }
30039
30040 __istream_type&
30041 operator>>(long& __n)
30042 { return _M_extract(__n); }
30043
30044 __istream_type&
30045 operator>>(unsigned long& __n)
30046 { return _M_extract(__n); }
30047
30048
30049 __istream_type&
30050 operator>>(long long& __n)
30051 { return _M_extract(__n); }
30052
30053 __istream_type&
30054 operator>>(unsigned long long& __n)
30055 { return _M_extract(__n); }
30056
30057
30058 __istream_type&
30059 operator>>(float& __f)
30060 { return _M_extract(__f); }
30061
30062 __istream_type&
30063 operator>>(double& __f)
30064 { return _M_extract(__f); }
30065
30066 __istream_type&
30067 operator>>(long double& __f)
30068 { return _M_extract(__f); }
30069
30070 __istream_type&
30071 operator>>(void*& __p)
30072 { return _M_extract(__p); }
30073 # 249 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30074 __istream_type&
30075 operator>>(__streambuf_type* __sb);
30076 # 259 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30077 streamsize
30078 gcount() const
30079 { return _M_gcount; }
30080 # 291 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30081 int_type
30082 get();
30083 # 305 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30084 __istream_type&
30085 get(char_type& __c);
30086 # 332 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30087 __istream_type&
30088 get(char_type* __s, streamsize __n, char_type __delim);
30089 # 343 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30090 __istream_type&
30091 get(char_type* __s, streamsize __n)
30092 { return this->get(__s, __n, this->widen('\n')); }
30093 # 366 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30094 __istream_type&
30095 get(__streambuf_type& __sb, char_type __delim);
30096 # 376 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30097 __istream_type&
30098 get(__streambuf_type& __sb)
30099 { return this->get(__sb, this->widen('\n')); }
30100 # 405 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30101 __istream_type&
30102 getline(char_type* __s, streamsize __n, char_type __delim);
30103 # 416 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30104 __istream_type&
30105 getline(char_type* __s, streamsize __n)
30106 { return this->getline(__s, __n, this->widen('\n')); }
30107 # 440 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30108 __istream_type&
30109 ignore();
30110
30111 __istream_type&
30112 ignore(streamsize __n);
30113
30114 __istream_type&
30115 ignore(streamsize __n, int_type __delim);
30116 # 457 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30117 int_type
30118 peek();
30119 # 475 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30120 __istream_type&
30121 read(char_type* __s, streamsize __n);
30122 # 494 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30123 streamsize
30124 readsome(char_type* __s, streamsize __n);
30125 # 510 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30126 __istream_type&
30127 putback(char_type __c);
30128 # 525 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30129 __istream_type&
30130 unget();
30131 # 543 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30132 int
30133 sync();
30134 # 557 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30135 pos_type
30136 tellg();
30137 # 572 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30138 __istream_type&
30139 seekg(pos_type);
30140 # 588 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30141 __istream_type&
30142 seekg(off_type, ios_base::seekdir);
30143
30144
30145 protected:
30146 explicit
30147 basic_istream(): _M_gcount(streamsize(0)) { }
30148
30149 template<typename _ValueT>
30150 __istream_type&
30151 _M_extract(_ValueT& __v);
30152 };
30153
30154
30155 template<>
30156 basic_istream<char>&
30157 basic_istream<char>::
30158 getline(char_type* __s, streamsize __n, char_type __delim);
30159
30160 template<>
30161 basic_istream<char>&
30162 basic_istream<char>::
30163 ignore(streamsize __n);
30164
30165 template<>
30166 basic_istream<char>&
30167 basic_istream<char>::
30168 ignore(streamsize __n, int_type __delim);
30169
30170
30171 template<>
30172 basic_istream<wchar_t>&
30173 basic_istream<wchar_t>::
30174 getline(char_type* __s, streamsize __n, char_type __delim);
30175
30176 template<>
30177 basic_istream<wchar_t>&
30178 basic_istream<wchar_t>::
30179 ignore(streamsize __n);
30180
30181 template<>
30182 basic_istream<wchar_t>&
30183 basic_istream<wchar_t>::
30184 ignore(streamsize __n, int_type __delim);
30185 # 645 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30186 template<typename _CharT, typename _Traits>
30187 class basic_istream<_CharT, _Traits>::sentry
30188 {
30189 public:
30190
30191 typedef _Traits traits_type;
30192 typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
30193 typedef basic_istream<_CharT, _Traits> __istream_type;
30194 typedef typename __istream_type::__ctype_type __ctype_type;
30195 typedef typename _Traits::int_type __int_type;
30196 # 677 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30197 explicit
30198 sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false);
30199 # 687 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30200 operator bool() const
30201 { return _M_ok; }
30202
30203 private:
30204 bool _M_ok;
30205 };
30206 # 707 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30207 template<typename _CharT, typename _Traits>
30208 basic_istream<_CharT, _Traits>&
30209 operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c);
30210
30211 template<class _Traits>
30212 inline basic_istream<char, _Traits>&
30213 operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
30214 { return (__in >> reinterpret_cast<char&>(__c)); }
30215
30216 template<class _Traits>
30217 inline basic_istream<char, _Traits>&
30218 operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
30219 { return (__in >> reinterpret_cast<char&>(__c)); }
30220 # 748 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30221 template<typename _CharT, typename _Traits>
30222 basic_istream<_CharT, _Traits>&
30223 operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s);
30224
30225
30226 template<>
30227 basic_istream<char>&
30228 operator>>(basic_istream<char>& __in, char* __s);
30229
30230 template<class _Traits>
30231 inline basic_istream<char, _Traits>&
30232 operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
30233 { return (__in >> reinterpret_cast<char*>(__s)); }
30234
30235 template<class _Traits>
30236 inline basic_istream<char, _Traits>&
30237 operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
30238 { return (__in >> reinterpret_cast<char*>(__s)); }
30239 # 775 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30240 template<typename _CharT, typename _Traits>
30241 class basic_iostream
30242 : public basic_istream<_CharT, _Traits>,
30243 public basic_ostream<_CharT, _Traits>
30244 {
30245 public:
30246
30247
30248
30249 typedef _CharT char_type;
30250 typedef typename _Traits::int_type int_type;
30251 typedef typename _Traits::pos_type pos_type;
30252 typedef typename _Traits::off_type off_type;
30253 typedef _Traits traits_type;
30254
30255
30256 typedef basic_istream<_CharT, _Traits> __istream_type;
30257 typedef basic_ostream<_CharT, _Traits> __ostream_type;
30258
30259
30260
30261
30262
30263
30264
30265 explicit
30266 basic_iostream(basic_streambuf<_CharT, _Traits>* __sb)
30267 : __istream_type(), __ostream_type()
30268 { this->init(__sb); }
30269
30270
30271
30272
30273 virtual
30274 ~basic_iostream() { }
30275
30276 protected:
30277 explicit
30278 basic_iostream() : __istream_type(), __ostream_type()
30279 { }
30280 };
30281 # 838 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3
30282 template<typename _CharT, typename _Traits>
30283 basic_istream<_CharT, _Traits>&
30284 ws(basic_istream<_CharT, _Traits>& __is);
30285
30286 }
30287
30288
30289 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/istream.tcc" 1 3
30290 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/istream.tcc" 3
30291
30292 # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/istream.tcc" 3
30293
30294
30295
30296
30297 namespace std __attribute__ ((__visibility__ ("default"))) {
30298
30299 template<typename _CharT, typename _Traits>
30300 basic_istream<_CharT, _Traits>::sentry::
30301 sentry(basic_istream<_CharT, _Traits>& __in, bool __noskip) : _M_ok(false)
30302 {
30303 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30304 if (__in.good())
30305 {
30306 if (__in.tie())
30307 __in.tie()->flush();
30308 if (!__noskip && (__in.flags() & ios_base::skipws))
30309 {
30310 const __int_type __eof = traits_type::eof();
30311 __streambuf_type* __sb = __in.rdbuf();
30312 __int_type __c = __sb->sgetc();
30313
30314 const __ctype_type& __ct = __check_facet(__in._M_ctype);
30315 while (!traits_type::eq_int_type(__c, __eof)
30316 && __ct.is(ctype_base::space,
30317 traits_type::to_char_type(__c)))
30318 __c = __sb->snextc();
30319
30320
30321
30322
30323 if (traits_type::eq_int_type(__c, __eof))
30324 __err |= ios_base::eofbit;
30325 }
30326 }
30327
30328 if (__in.good() && __err == ios_base::goodbit)
30329 _M_ok = true;
30330 else
30331 {
30332 __err |= ios_base::failbit;
30333 __in.setstate(__err);
30334 }
30335 }
30336
30337 template<typename _CharT, typename _Traits>
30338 template<typename _ValueT>
30339 basic_istream<_CharT, _Traits>&
30340 basic_istream<_CharT, _Traits>::
30341 _M_extract(_ValueT& __v)
30342 {
30343 sentry __cerb(*this, false);
30344 if (__cerb)
30345 {
30346 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30347 try
30348 {
30349 const __num_get_type& __ng = __check_facet(this->_M_num_get);
30350 __ng.get(*this, 0, *this, __err, __v);
30351 }
30352 catch(...)
30353 { this->_M_setstate(ios_base::badbit); }
30354 if (__err)
30355 this->setstate(__err);
30356 }
30357 return *this;
30358 }
30359
30360 template<typename _CharT, typename _Traits>
30361 basic_istream<_CharT, _Traits>&
30362 basic_istream<_CharT, _Traits>::
30363 operator>>(short& __n)
30364 {
30365
30366
30367 long __l;
30368 _M_extract(__l);
30369 if (!this->fail())
30370 {
30371 if (numeric_limits<short>::min() <= __l
30372 && __l <= numeric_limits<short>::max())
30373 __n = __l;
30374 else
30375 this->setstate(ios_base::failbit);
30376 }
30377 return *this;
30378 }
30379
30380 template<typename _CharT, typename _Traits>
30381 basic_istream<_CharT, _Traits>&
30382 basic_istream<_CharT, _Traits>::
30383 operator>>(int& __n)
30384 {
30385
30386
30387 long __l;
30388 _M_extract(__l);
30389 if (!this->fail())
30390 {
30391 if (numeric_limits<int>::min() <= __l
30392 && __l <= numeric_limits<int>::max())
30393 __n = __l;
30394 else
30395 this->setstate(ios_base::failbit);
30396 }
30397 return *this;
30398 }
30399
30400 template<typename _CharT, typename _Traits>
30401 basic_istream<_CharT, _Traits>&
30402 basic_istream<_CharT, _Traits>::
30403 operator>>(__streambuf_type* __sbout)
30404 {
30405 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30406 sentry __cerb(*this, false);
30407 if (__cerb && __sbout)
30408 {
30409 try
30410 {
30411 bool __ineof;
30412 if (!__copy_streambufs_eof(this->rdbuf(), __sbout, __ineof))
30413 __err |= ios_base::failbit;
30414 if (__ineof)
30415 __err |= ios_base::eofbit;
30416 }
30417 catch(...)
30418 { this->_M_setstate(ios_base::failbit); }
30419 }
30420 else if (!__sbout)
30421 __err |= ios_base::failbit;
30422 if (__err)
30423 this->setstate(__err);
30424 return *this;
30425 }
30426
30427 template<typename _CharT, typename _Traits>
30428 typename basic_istream<_CharT, _Traits>::int_type
30429 basic_istream<_CharT, _Traits>::
30430 get(void)
30431 {
30432 const int_type __eof = traits_type::eof();
30433 int_type __c = __eof;
30434 _M_gcount = 0;
30435 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30436 sentry __cerb(*this, true);
30437 if (__cerb)
30438 {
30439 try
30440 {
30441 __c = this->rdbuf()->sbumpc();
30442
30443 if (!traits_type::eq_int_type(__c, __eof))
30444 _M_gcount = 1;
30445 else
30446 __err |= ios_base::eofbit;
30447 }
30448 catch(...)
30449 { this->_M_setstate(ios_base::badbit); }
30450 }
30451 if (!_M_gcount)
30452 __err |= ios_base::failbit;
30453 if (__err)
30454 this->setstate(__err);
30455 return __c;
30456 }
30457
30458 template<typename _CharT, typename _Traits>
30459 basic_istream<_CharT, _Traits>&
30460 basic_istream<_CharT, _Traits>::
30461 get(char_type& __c)
30462 {
30463 _M_gcount = 0;
30464 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30465 sentry __cerb(*this, true);
30466 if (__cerb)
30467 {
30468 try
30469 {
30470 const int_type __cb = this->rdbuf()->sbumpc();
30471
30472 if (!traits_type::eq_int_type(__cb, traits_type::eof()))
30473 {
30474 _M_gcount = 1;
30475 __c = traits_type::to_char_type(__cb);
30476 }
30477 else
30478 __err |= ios_base::eofbit;
30479 }
30480 catch(...)
30481 { this->_M_setstate(ios_base::badbit); }
30482 }
30483 if (!_M_gcount)
30484 __err |= ios_base::failbit;
30485 if (__err)
30486 this->setstate(__err);
30487 return *this;
30488 }
30489
30490 template<typename _CharT, typename _Traits>
30491 basic_istream<_CharT, _Traits>&
30492 basic_istream<_CharT, _Traits>::
30493 get(char_type* __s, streamsize __n, char_type __delim)
30494 {
30495 _M_gcount = 0;
30496 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30497 sentry __cerb(*this, true);
30498 if (__cerb)
30499 {
30500 try
30501 {
30502 const int_type __idelim = traits_type::to_int_type(__delim);
30503 const int_type __eof = traits_type::eof();
30504 __streambuf_type* __sb = this->rdbuf();
30505 int_type __c = __sb->sgetc();
30506
30507 while (_M_gcount + 1 < __n
30508 && !traits_type::eq_int_type(__c, __eof)
30509 && !traits_type::eq_int_type(__c, __idelim))
30510 {
30511 *__s++ = traits_type::to_char_type(__c);
30512 ++_M_gcount;
30513 __c = __sb->snextc();
30514 }
30515 if (traits_type::eq_int_type(__c, __eof))
30516 __err |= ios_base::eofbit;
30517 }
30518 catch(...)
30519 { this->_M_setstate(ios_base::badbit); }
30520 }
30521
30522
30523 if (__n > 0)
30524 *__s = char_type();
30525 if (!_M_gcount)
30526 __err |= ios_base::failbit;
30527 if (__err)
30528 this->setstate(__err);
30529 return *this;
30530 }
30531
30532 template<typename _CharT, typename _Traits>
30533 basic_istream<_CharT, _Traits>&
30534 basic_istream<_CharT, _Traits>::
30535 get(__streambuf_type& __sb, char_type __delim)
30536 {
30537 _M_gcount = 0;
30538 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30539 sentry __cerb(*this, true);
30540 if (__cerb)
30541 {
30542 try
30543 {
30544 const int_type __idelim = traits_type::to_int_type(__delim);
30545 const int_type __eof = traits_type::eof();
30546 __streambuf_type* __this_sb = this->rdbuf();
30547 int_type __c = __this_sb->sgetc();
30548 char_type __c2 = traits_type::to_char_type(__c);
30549
30550 while (!traits_type::eq_int_type(__c, __eof)
30551 && !traits_type::eq_int_type(__c, __idelim)
30552 && !traits_type::eq_int_type(__sb.sputc(__c2), __eof))
30553 {
30554 ++_M_gcount;
30555 __c = __this_sb->snextc();
30556 __c2 = traits_type::to_char_type(__c);
30557 }
30558 if (traits_type::eq_int_type(__c, __eof))
30559 __err |= ios_base::eofbit;
30560 }
30561 catch(...)
30562 { this->_M_setstate(ios_base::badbit); }
30563 }
30564 if (!_M_gcount)
30565 __err |= ios_base::failbit;
30566 if (__err)
30567 this->setstate(__err);
30568 return *this;
30569 }
30570
30571 template<typename _CharT, typename _Traits>
30572 basic_istream<_CharT, _Traits>&
30573 basic_istream<_CharT, _Traits>::
30574 getline(char_type* __s, streamsize __n, char_type __delim)
30575 {
30576 _M_gcount = 0;
30577 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30578 sentry __cerb(*this, true);
30579 if (__cerb)
30580 {
30581 try
30582 {
30583 const int_type __idelim = traits_type::to_int_type(__delim);
30584 const int_type __eof = traits_type::eof();
30585 __streambuf_type* __sb = this->rdbuf();
30586 int_type __c = __sb->sgetc();
30587
30588 while (_M_gcount + 1 < __n
30589 && !traits_type::eq_int_type(__c, __eof)
30590 && !traits_type::eq_int_type(__c, __idelim))
30591 {
30592 *__s++ = traits_type::to_char_type(__c);
30593 __c = __sb->snextc();
30594 ++_M_gcount;
30595 }
30596 if (traits_type::eq_int_type(__c, __eof))
30597 __err |= ios_base::eofbit;
30598 else
30599 {
30600 if (traits_type::eq_int_type(__c, __idelim))
30601 {
30602 __sb->sbumpc();
30603 ++_M_gcount;
30604 }
30605 else
30606 __err |= ios_base::failbit;
30607 }
30608 }
30609 catch(...)
30610 { this->_M_setstate(ios_base::badbit); }
30611 }
30612
30613
30614 if (__n > 0)
30615 *__s = char_type();
30616 if (!_M_gcount)
30617 __err |= ios_base::failbit;
30618 if (__err)
30619 this->setstate(__err);
30620 return *this;
30621 }
30622
30623
30624
30625
30626 template<typename _CharT, typename _Traits>
30627 basic_istream<_CharT, _Traits>&
30628 basic_istream<_CharT, _Traits>::
30629 ignore(void)
30630 {
30631 _M_gcount = 0;
30632 sentry __cerb(*this, true);
30633 if (__cerb)
30634 {
30635 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30636 try
30637 {
30638 const int_type __eof = traits_type::eof();
30639 __streambuf_type* __sb = this->rdbuf();
30640
30641 if (traits_type::eq_int_type(__sb->sbumpc(), __eof))
30642 __err |= ios_base::eofbit;
30643 else
30644 _M_gcount = 1;
30645 }
30646 catch(...)
30647 { this->_M_setstate(ios_base::badbit); }
30648 if (__err)
30649 this->setstate(__err);
30650 }
30651 return *this;
30652 }
30653
30654 template<typename _CharT, typename _Traits>
30655 basic_istream<_CharT, _Traits>&
30656 basic_istream<_CharT, _Traits>::
30657 ignore(streamsize __n)
30658 {
30659 _M_gcount = 0;
30660 sentry __cerb(*this, true);
30661 if (__cerb && __n > 0)
30662 {
30663 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30664 try
30665 {
30666 const int_type __eof = traits_type::eof();
30667 __streambuf_type* __sb = this->rdbuf();
30668 int_type __c = __sb->sgetc();
30669 # 429 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/istream.tcc" 3
30670 bool __large_ignore = false;
30671 while (true)
30672 {
30673 while (_M_gcount < __n
30674 && !traits_type::eq_int_type(__c, __eof))
30675 {
30676 ++_M_gcount;
30677 __c = __sb->snextc();
30678 }
30679 if (__n == numeric_limits<streamsize>::max()
30680 && !traits_type::eq_int_type(__c, __eof))
30681 {
30682 _M_gcount = numeric_limits<streamsize>::min();
30683 __large_ignore = true;
30684 }
30685 else
30686 break;
30687 }
30688
30689 if (__large_ignore)
30690 _M_gcount = numeric_limits<streamsize>::max();
30691
30692 if (traits_type::eq_int_type(__c, __eof))
30693 __err |= ios_base::eofbit;
30694 }
30695 catch(...)
30696 { this->_M_setstate(ios_base::badbit); }
30697 if (__err)
30698 this->setstate(__err);
30699 }
30700 return *this;
30701 }
30702
30703 template<typename _CharT, typename _Traits>
30704 basic_istream<_CharT, _Traits>&
30705 basic_istream<_CharT, _Traits>::
30706 ignore(streamsize __n, int_type __delim)
30707 {
30708 _M_gcount = 0;
30709 sentry __cerb(*this, true);
30710 if (__cerb && __n > 0)
30711 {
30712 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30713 try
30714 {
30715 const int_type __eof = traits_type::eof();
30716 __streambuf_type* __sb = this->rdbuf();
30717 int_type __c = __sb->sgetc();
30718
30719
30720 bool __large_ignore = false;
30721 while (true)
30722 {
30723 while (_M_gcount < __n
30724 && !traits_type::eq_int_type(__c, __eof)
30725 && !traits_type::eq_int_type(__c, __delim))
30726 {
30727 ++_M_gcount;
30728 __c = __sb->snextc();
30729 }
30730 if (__n == numeric_limits<streamsize>::max()
30731 && !traits_type::eq_int_type(__c, __eof)
30732 && !traits_type::eq_int_type(__c, __delim))
30733 {
30734 _M_gcount = numeric_limits<streamsize>::min();
30735 __large_ignore = true;
30736 }
30737 else
30738 break;
30739 }
30740
30741 if (__large_ignore)
30742 _M_gcount = numeric_limits<streamsize>::max();
30743
30744 if (traits_type::eq_int_type(__c, __eof))
30745 __err |= ios_base::eofbit;
30746 else if (traits_type::eq_int_type(__c, __delim))
30747 {
30748 if (_M_gcount < numeric_limits<streamsize>::max())
30749 ++_M_gcount;
30750 __sb->sbumpc();
30751 }
30752 }
30753 catch(...)
30754 { this->_M_setstate(ios_base::badbit); }
30755 if (__err)
30756 this->setstate(__err);
30757 }
30758 return *this;
30759 }
30760
30761 template<typename _CharT, typename _Traits>
30762 typename basic_istream<_CharT, _Traits>::int_type
30763 basic_istream<_CharT, _Traits>::
30764 peek(void)
30765 {
30766 int_type __c = traits_type::eof();
30767 _M_gcount = 0;
30768 sentry __cerb(*this, true);
30769 if (__cerb)
30770 {
30771 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30772 try
30773 {
30774 __c = this->rdbuf()->sgetc();
30775 if (traits_type::eq_int_type(__c, traits_type::eof()))
30776 __err |= ios_base::eofbit;
30777 }
30778 catch(...)
30779 { this->_M_setstate(ios_base::badbit); }
30780 if (__err)
30781 this->setstate(__err);
30782 }
30783 return __c;
30784 }
30785
30786 template<typename _CharT, typename _Traits>
30787 basic_istream<_CharT, _Traits>&
30788 basic_istream<_CharT, _Traits>::
30789 read(char_type* __s, streamsize __n)
30790 {
30791 _M_gcount = 0;
30792 sentry __cerb(*this, true);
30793 if (__cerb)
30794 {
30795 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30796 try
30797 {
30798 _M_gcount = this->rdbuf()->sgetn(__s, __n);
30799 if (_M_gcount != __n)
30800 __err |= (ios_base::eofbit | ios_base::failbit);
30801 }
30802 catch(...)
30803 { this->_M_setstate(ios_base::badbit); }
30804 if (__err)
30805 this->setstate(__err);
30806 }
30807 return *this;
30808 }
30809
30810 template<typename _CharT, typename _Traits>
30811 streamsize
30812 basic_istream<_CharT, _Traits>::
30813 readsome(char_type* __s, streamsize __n)
30814 {
30815 _M_gcount = 0;
30816 sentry __cerb(*this, true);
30817 if (__cerb)
30818 {
30819 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30820 try
30821 {
30822
30823 const streamsize __num = this->rdbuf()->in_avail();
30824 if (__num > 0)
30825 _M_gcount = this->rdbuf()->sgetn(__s, std::min(__num, __n));
30826 else if (__num == -1)
30827 __err |= ios_base::eofbit;
30828 }
30829 catch(...)
30830 { this->_M_setstate(ios_base::badbit); }
30831 if (__err)
30832 this->setstate(__err);
30833 }
30834 return _M_gcount;
30835 }
30836
30837 template<typename _CharT, typename _Traits>
30838 basic_istream<_CharT, _Traits>&
30839 basic_istream<_CharT, _Traits>::
30840 putback(char_type __c)
30841 {
30842
30843
30844 _M_gcount = 0;
30845 sentry __cerb(*this, true);
30846 if (__cerb)
30847 {
30848 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30849 try
30850 {
30851 const int_type __eof = traits_type::eof();
30852 __streambuf_type* __sb = this->rdbuf();
30853 if (!__sb
30854 || traits_type::eq_int_type(__sb->sputbackc(__c), __eof))
30855 __err |= ios_base::badbit;
30856 }
30857 catch(...)
30858 { this->_M_setstate(ios_base::badbit); }
30859 if (__err)
30860 this->setstate(__err);
30861 }
30862 return *this;
30863 }
30864
30865 template<typename _CharT, typename _Traits>
30866 basic_istream<_CharT, _Traits>&
30867 basic_istream<_CharT, _Traits>::
30868 unget(void)
30869 {
30870
30871
30872 _M_gcount = 0;
30873 sentry __cerb(*this, true);
30874 if (__cerb)
30875 {
30876 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30877 try
30878 {
30879 const int_type __eof = traits_type::eof();
30880 __streambuf_type* __sb = this->rdbuf();
30881 if (!__sb
30882 || traits_type::eq_int_type(__sb->sungetc(), __eof))
30883 __err |= ios_base::badbit;
30884 }
30885 catch(...)
30886 { this->_M_setstate(ios_base::badbit); }
30887 if (__err)
30888 this->setstate(__err);
30889 }
30890 return *this;
30891 }
30892
30893 template<typename _CharT, typename _Traits>
30894 int
30895 basic_istream<_CharT, _Traits>::
30896 sync(void)
30897 {
30898
30899
30900 int __ret = -1;
30901 sentry __cerb(*this, true);
30902 if (__cerb)
30903 {
30904 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30905 try
30906 {
30907 __streambuf_type* __sb = this->rdbuf();
30908 if (__sb)
30909 {
30910 if (__sb->pubsync() == -1)
30911 __err |= ios_base::badbit;
30912 else
30913 __ret = 0;
30914 }
30915 }
30916 catch(...)
30917 { this->_M_setstate(ios_base::badbit); }
30918 if (__err)
30919 this->setstate(__err);
30920 }
30921 return __ret;
30922 }
30923
30924 template<typename _CharT, typename _Traits>
30925 typename basic_istream<_CharT, _Traits>::pos_type
30926 basic_istream<_CharT, _Traits>::
30927 tellg(void)
30928 {
30929
30930
30931 pos_type __ret = pos_type(-1);
30932 try
30933 {
30934 if (!this->fail())
30935 __ret = this->rdbuf()->pubseekoff(0, ios_base::cur,
30936 ios_base::in);
30937 }
30938 catch(...)
30939 { this->_M_setstate(ios_base::badbit); }
30940 return __ret;
30941 }
30942
30943 template<typename _CharT, typename _Traits>
30944 basic_istream<_CharT, _Traits>&
30945 basic_istream<_CharT, _Traits>::
30946 seekg(pos_type __pos)
30947 {
30948
30949
30950 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30951 try
30952 {
30953 if (!this->fail())
30954 {
30955
30956 const pos_type __p = this->rdbuf()->pubseekpos(__pos,
30957 ios_base::in);
30958
30959
30960 if (__p == pos_type(off_type(-1)))
30961 __err |= ios_base::failbit;
30962 }
30963 }
30964 catch(...)
30965 { this->_M_setstate(ios_base::badbit); }
30966 if (__err)
30967 this->setstate(__err);
30968 return *this;
30969 }
30970
30971 template<typename _CharT, typename _Traits>
30972 basic_istream<_CharT, _Traits>&
30973 basic_istream<_CharT, _Traits>::
30974 seekg(off_type __off, ios_base::seekdir __dir)
30975 {
30976
30977
30978 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
30979 try
30980 {
30981 if (!this->fail())
30982 {
30983
30984 const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir,
30985 ios_base::in);
30986
30987
30988 if (__p == pos_type(off_type(-1)))
30989 __err |= ios_base::failbit;
30990 }
30991 }
30992 catch(...)
30993 { this->_M_setstate(ios_base::badbit); }
30994 if (__err)
30995 this->setstate(__err);
30996 return *this;
30997 }
30998
30999
31000 template<typename _CharT, typename _Traits>
31001 basic_istream<_CharT, _Traits>&
31002 operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
31003 {
31004 typedef basic_istream<_CharT, _Traits> __istream_type;
31005 typedef typename __istream_type::int_type __int_type;
31006
31007 typename __istream_type::sentry __cerb(__in, false);
31008 if (__cerb)
31009 {
31010 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
31011 try
31012 {
31013 const __int_type __cb = __in.rdbuf()->sbumpc();
31014 if (!_Traits::eq_int_type(__cb, _Traits::eof()))
31015 __c = _Traits::to_char_type(__cb);
31016 else
31017 __err |= (ios_base::eofbit | ios_base::failbit);
31018 }
31019 catch(...)
31020 { __in._M_setstate(ios_base::badbit); }
31021 if (__err)
31022 __in.setstate(__err);
31023 }
31024 return __in;
31025 }
31026
31027 template<typename _CharT, typename _Traits>
31028 basic_istream<_CharT, _Traits>&
31029 operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
31030 {
31031 typedef basic_istream<_CharT, _Traits> __istream_type;
31032 typedef typename __istream_type::__streambuf_type __streambuf_type;
31033 typedef typename _Traits::int_type int_type;
31034 typedef _CharT char_type;
31035 typedef ctype<_CharT> __ctype_type;
31036
31037 streamsize __extracted = 0;
31038 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
31039 typename __istream_type::sentry __cerb(__in, false);
31040 if (__cerb)
31041 {
31042 try
31043 {
31044
31045 streamsize __num = __in.width();
31046 if (__num <= 0)
31047 __num = numeric_limits<streamsize>::max();
31048
31049 const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc());
31050
31051 const int_type __eof = _Traits::eof();
31052 __streambuf_type* __sb = __in.rdbuf();
31053 int_type __c = __sb->sgetc();
31054
31055 while (__extracted < __num - 1
31056 && !_Traits::eq_int_type(__c, __eof)
31057 && !__ct.is(ctype_base::space,
31058 _Traits::to_char_type(__c)))
31059 {
31060 *__s++ = _Traits::to_char_type(__c);
31061 ++__extracted;
31062 __c = __sb->snextc();
31063 }
31064 if (_Traits::eq_int_type(__c, __eof))
31065 __err |= ios_base::eofbit;
31066
31067
31068
31069 *__s = char_type();
31070 __in.width(0);
31071 }
31072 catch(...)
31073 { __in._M_setstate(ios_base::badbit); }
31074 }
31075 if (!__extracted)
31076 __err |= ios_base::failbit;
31077 if (__err)
31078 __in.setstate(__err);
31079 return __in;
31080 }
31081
31082
31083 template<typename _CharT, typename _Traits>
31084 basic_istream<_CharT,_Traits>&
31085 ws(basic_istream<_CharT,_Traits>& __in)
31086 {
31087 typedef basic_istream<_CharT, _Traits> __istream_type;
31088 typedef typename __istream_type::__streambuf_type __streambuf_type;
31089 typedef typename __istream_type::__ctype_type __ctype_type;
31090 typedef typename __istream_type::int_type __int_type;
31091
31092 const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc());
31093 const __int_type __eof = _Traits::eof();
31094 __streambuf_type* __sb = __in.rdbuf();
31095 __int_type __c = __sb->sgetc();
31096
31097 while (!_Traits::eq_int_type(__c, __eof)
31098 && __ct.is(ctype_base::space, _Traits::to_char_type(__c)))
31099 __c = __sb->snextc();
31100
31101 if (_Traits::eq_int_type(__c, __eof))
31102 __in.setstate(ios_base::eofbit);
31103 return __in;
31104 }
31105
31106
31107 template<typename _CharT, typename _Traits, typename _Alloc>
31108 basic_istream<_CharT, _Traits>&
31109 operator>>(basic_istream<_CharT, _Traits>& __in,
31110 basic_string<_CharT, _Traits, _Alloc>& __str)
31111 {
31112 typedef basic_istream<_CharT, _Traits> __istream_type;
31113 typedef typename __istream_type::int_type __int_type;
31114 typedef typename __istream_type::__streambuf_type __streambuf_type;
31115 typedef typename __istream_type::__ctype_type __ctype_type;
31116 typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
31117 typedef typename __string_type::size_type __size_type;
31118
31119 __size_type __extracted = 0;
31120 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
31121 typename __istream_type::sentry __cerb(__in, false);
31122 if (__cerb)
31123 {
31124 try
31125 {
31126
31127 __str.erase();
31128 _CharT __buf[128];
31129 __size_type __len = 0;
31130 const streamsize __w = __in.width();
31131 const __size_type __n = __w > 0 ? static_cast<__size_type>(__w)
31132 : __str.max_size();
31133 const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc());
31134 const __int_type __eof = _Traits::eof();
31135 __streambuf_type* __sb = __in.rdbuf();
31136 __int_type __c = __sb->sgetc();
31137
31138 while (__extracted < __n
31139 && !_Traits::eq_int_type(__c, __eof)
31140 && !__ct.is(ctype_base::space, _Traits::to_char_type(__c)))
31141 {
31142 if (__len == sizeof(__buf) / sizeof(_CharT))
31143 {
31144 __str.append(__buf, sizeof(__buf) / sizeof(_CharT));
31145 __len = 0;
31146 }
31147 __buf[__len++] = _Traits::to_char_type(__c);
31148 ++__extracted;
31149 __c = __sb->snextc();
31150 }
31151 __str.append(__buf, __len);
31152
31153 if (_Traits::eq_int_type(__c, __eof))
31154 __err |= ios_base::eofbit;
31155 __in.width(0);
31156 }
31157 catch(...)
31158 {
31159
31160
31161
31162 __in._M_setstate(ios_base::badbit);
31163 }
31164 }
31165
31166 if (!__extracted)
31167 __err |= ios_base::failbit;
31168 if (__err)
31169 __in.setstate(__err);
31170 return __in;
31171 }
31172
31173 template<typename _CharT, typename _Traits, typename _Alloc>
31174 basic_istream<_CharT, _Traits>&
31175 getline(basic_istream<_CharT, _Traits>& __in,
31176 basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim)
31177 {
31178 typedef basic_istream<_CharT, _Traits> __istream_type;
31179 typedef typename __istream_type::int_type __int_type;
31180 typedef typename __istream_type::__streambuf_type __streambuf_type;
31181 typedef typename __istream_type::__ctype_type __ctype_type;
31182 typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
31183 typedef typename __string_type::size_type __size_type;
31184
31185 __size_type __extracted = 0;
31186 const __size_type __n = __str.max_size();
31187 ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
31188 typename __istream_type::sentry __cerb(__in, true);
31189 if (__cerb)
31190 {
31191 try
31192 {
31193 __str.erase();
31194 const __int_type __idelim = _Traits::to_int_type(__delim);
31195 const __int_type __eof = _Traits::eof();
31196 __streambuf_type* __sb = __in.rdbuf();
31197 __int_type __c = __sb->sgetc();
31198
31199 while (__extracted < __n
31200 && !_Traits::eq_int_type(__c, __eof)
31201 && !_Traits::eq_int_type(__c, __idelim))
31202 {
31203 __str += _Traits::to_char_type(__c);
31204 ++__extracted;
31205 __c = __sb->snextc();
31206 }
31207
31208 if (_Traits::eq_int_type(__c, __eof))
31209 __err |= ios_base::eofbit;
31210 else if (_Traits::eq_int_type(__c, __idelim))
31211 {
31212 ++__extracted;
31213 __sb->sbumpc();
31214 }
31215 else
31216 __err |= ios_base::failbit;
31217 }
31218 catch(...)
31219 {
31220
31221
31222
31223 __in._M_setstate(ios_base::badbit);
31224 }
31225 }
31226 if (!__extracted)
31227 __err |= ios_base::failbit;
31228 if (__err)
31229 __in.setstate(__err);
31230 return __in;
31231 }
31232
31233
31234
31235
31236
31237 extern template class basic_istream<char>;
31238 extern template istream& ws(istream&);
31239 extern template istream& operator>>(istream&, char&);
31240 extern template istream& operator>>(istream&, char*);
31241 extern template istream& operator>>(istream&, unsigned char&);
31242 extern template istream& operator>>(istream&, signed char&);
31243 extern template istream& operator>>(istream&, unsigned char*);
31244 extern template istream& operator>>(istream&, signed char*);
31245
31246 extern template istream& istream::_M_extract(unsigned short&);
31247 extern template istream& istream::_M_extract(unsigned int&);
31248 extern template istream& istream::_M_extract(long&);
31249 extern template istream& istream::_M_extract(unsigned long&);
31250 extern template istream& istream::_M_extract(bool&);
31251
31252 extern template istream& istream::_M_extract(long long&);
31253 extern template istream& istream::_M_extract(unsigned long long&);
31254
31255 extern template istream& istream::_M_extract(float&);
31256 extern template istream& istream::_M_extract(double&);
31257 extern template istream& istream::_M_extract(long double&);
31258 extern template istream& istream::_M_extract(void*&);
31259
31260 extern template class basic_iostream<char>;
31261
31262
31263 extern template class basic_istream<wchar_t>;
31264 extern template wistream& ws(wistream&);
31265 extern template wistream& operator>>(wistream&, wchar_t&);
31266 extern template wistream& operator>>(wistream&, wchar_t*);
31267
31268 extern template wistream& wistream::_M_extract(unsigned short&);
31269 extern template wistream& wistream::_M_extract(unsigned int&);
31270 extern template wistream& wistream::_M_extract(long&);
31271 extern template wistream& wistream::_M_extract(unsigned long&);
31272 extern template wistream& wistream::_M_extract(bool&);
31273
31274 extern template wistream& wistream::_M_extract(long long&);
31275 extern template wistream& wistream::_M_extract(unsigned long long&);
31276
31277 extern template wistream& wistream::_M_extract(float&);
31278 extern template wistream& wistream::_M_extract(double&);
31279 extern template wistream& wistream::_M_extract(long double&);
31280 extern template wistream& wistream::_M_extract(void*&);
31281
31282 extern template class basic_iostream<wchar_t>;
31283
31284
31285
31286 }
31287 # 846 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 2 3
31288 # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iostream" 2 3
31289
31290 namespace std __attribute__ ((__visibility__ ("default"))) {
31291 # 63 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iostream" 3
31292 extern istream cin;
31293 extern ostream cout;
31294 extern ostream cerr;
31295 extern ostream clog;
31296
31297
31298 extern wistream wcin;
31299 extern wostream wcout;
31300 extern wostream wcerr;
31301 extern wostream wclog;
31302
31303
31304
31305
31306 static ios_base::Init __ioinit;
31307
31308 }
31309 # 49 "enblend.cc" 2
31310 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/list" 1 3
31311 # 63 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/list" 3
31312
31313 # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/list" 3
31314
31315
31316
31317
31318
31319
31320 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 1 3
31321 # 67 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31322 namespace std __attribute__ ((__visibility__ ("default"))) {
31323
31324
31325
31326
31327
31328
31329
31330 struct _List_node_base
31331 {
31332 _List_node_base* _M_next;
31333 _List_node_base* _M_prev;
31334
31335 static void
31336 swap(_List_node_base& __x, _List_node_base& __y);
31337
31338 void
31339 transfer(_List_node_base * const __first,
31340 _List_node_base * const __last);
31341
31342 void
31343 reverse();
31344
31345 void
31346 hook(_List_node_base * const __position);
31347
31348 void
31349 unhook();
31350 };
31351
31352
31353 template<typename _Tp>
31354 struct _List_node : public _List_node_base
31355 {
31356 _Tp _M_data;
31357 };
31358 # 111 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31359 template<typename _Tp>
31360 struct _List_iterator
31361 {
31362 typedef _List_iterator<_Tp> _Self;
31363 typedef _List_node<_Tp> _Node;
31364
31365 typedef ptrdiff_t difference_type;
31366 typedef std::bidirectional_iterator_tag iterator_category;
31367 typedef _Tp value_type;
31368 typedef _Tp* pointer;
31369 typedef _Tp& reference;
31370
31371 _List_iterator()
31372 : _M_node() { }
31373
31374 explicit
31375 _List_iterator(_List_node_base* __x)
31376 : _M_node(__x) { }
31377
31378
31379 reference
31380 operator*() const
31381 { return static_cast<_Node*>(_M_node)->_M_data; }
31382
31383 pointer
31384 operator->() const
31385 { return &static_cast<_Node*>(_M_node)->_M_data; }
31386
31387 _Self&
31388 operator++()
31389 {
31390 _M_node = _M_node->_M_next;
31391 return *this;
31392 }
31393
31394 _Self
31395 operator++(int)
31396 {
31397 _Self __tmp = *this;
31398 _M_node = _M_node->_M_next;
31399 return __tmp;
31400 }
31401
31402 _Self&
31403 operator--()
31404 {
31405 _M_node = _M_node->_M_prev;
31406 return *this;
31407 }
31408
31409 _Self
31410 operator--(int)
31411 {
31412 _Self __tmp = *this;
31413 _M_node = _M_node->_M_prev;
31414 return __tmp;
31415 }
31416
31417 bool
31418 operator==(const _Self& __x) const
31419 { return _M_node == __x._M_node; }
31420
31421 bool
31422 operator!=(const _Self& __x) const
31423 { return _M_node != __x._M_node; }
31424
31425
31426 _List_node_base* _M_node;
31427 };
31428 # 188 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31429 template<typename _Tp>
31430 struct _List_const_iterator
31431 {
31432 typedef _List_const_iterator<_Tp> _Self;
31433 typedef const _List_node<_Tp> _Node;
31434 typedef _List_iterator<_Tp> iterator;
31435
31436 typedef ptrdiff_t difference_type;
31437 typedef std::bidirectional_iterator_tag iterator_category;
31438 typedef _Tp value_type;
31439 typedef const _Tp* pointer;
31440 typedef const _Tp& reference;
31441
31442 _List_const_iterator()
31443 : _M_node() { }
31444
31445 explicit
31446 _List_const_iterator(const _List_node_base* __x)
31447 : _M_node(__x) { }
31448
31449 _List_const_iterator(const iterator& __x)
31450 : _M_node(__x._M_node) { }
31451
31452
31453
31454 reference
31455 operator*() const
31456 { return static_cast<_Node*>(_M_node)->_M_data; }
31457
31458 pointer
31459 operator->() const
31460 { return &static_cast<_Node*>(_M_node)->_M_data; }
31461
31462 _Self&
31463 operator++()
31464 {
31465 _M_node = _M_node->_M_next;
31466 return *this;
31467 }
31468
31469 _Self
31470 operator++(int)
31471 {
31472 _Self __tmp = *this;
31473 _M_node = _M_node->_M_next;
31474 return __tmp;
31475 }
31476
31477 _Self&
31478 operator--()
31479 {
31480 _M_node = _M_node->_M_prev;
31481 return *this;
31482 }
31483
31484 _Self
31485 operator--(int)
31486 {
31487 _Self __tmp = *this;
31488 _M_node = _M_node->_M_prev;
31489 return __tmp;
31490 }
31491
31492 bool
31493 operator==(const _Self& __x) const
31494 { return _M_node == __x._M_node; }
31495
31496 bool
31497 operator!=(const _Self& __x) const
31498 { return _M_node != __x._M_node; }
31499
31500
31501 const _List_node_base* _M_node;
31502 };
31503
31504 template<typename _Val>
31505 inline bool
31506 operator==(const _List_iterator<_Val>& __x,
31507 const _List_const_iterator<_Val>& __y)
31508 { return __x._M_node == __y._M_node; }
31509
31510 template<typename _Val>
31511 inline bool
31512 operator!=(const _List_iterator<_Val>& __x,
31513 const _List_const_iterator<_Val>& __y)
31514 { return __x._M_node != __y._M_node; }
31515
31516
31517
31518
31519
31520
31521
31522 template<typename _Tp, typename _Alloc>
31523 class _List_base
31524 {
31525 protected:
31526 # 298 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31527 typedef typename _Alloc::template rebind<_List_node<_Tp> >::other
31528 _Node_alloc_type;
31529
31530 typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type;
31531
31532 struct _List_impl
31533 : public _Node_alloc_type
31534 {
31535 _List_node_base _M_node;
31536
31537 _List_impl(const _Node_alloc_type& __a)
31538 : _Node_alloc_type(__a), _M_node()
31539 { }
31540 };
31541
31542 _List_impl _M_impl;
31543
31544 _List_node<_Tp>*
31545 _M_get_node()
31546 { return _M_impl._Node_alloc_type::allocate(1); }
31547
31548 void
31549 _M_put_node(_List_node<_Tp>* __p)
31550 { _M_impl._Node_alloc_type::deallocate(__p, 1); }
31551
31552 public:
31553 typedef _Alloc allocator_type;
31554
31555 _Node_alloc_type&
31556 _M_get_Node_allocator()
31557 { return *static_cast<_Node_alloc_type*>(&this->_M_impl); }
31558
31559 const _Node_alloc_type&
31560 _M_get_Node_allocator() const
31561 { return *static_cast<const _Node_alloc_type*>(&this->_M_impl); }
31562
31563 _Tp_alloc_type
31564 _M_get_Tp_allocator() const
31565 { return _Tp_alloc_type(_M_get_Node_allocator()); }
31566
31567 allocator_type
31568 get_allocator() const
31569 { return allocator_type(_M_get_Node_allocator()); }
31570
31571 _List_base(const allocator_type& __a)
31572 : _M_impl(__a)
31573 { _M_init(); }
31574
31575
31576 ~_List_base()
31577 { _M_clear(); }
31578
31579 void
31580 _M_clear();
31581
31582 void
31583 _M_init()
31584 {
31585 this->_M_impl._M_node._M_next = &this->_M_impl._M_node;
31586 this->_M_impl._M_node._M_prev = &this->_M_impl._M_node;
31587 }
31588 };
31589 # 406 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31590 template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
31591 class list : protected _List_base<_Tp, _Alloc>
31592 {
31593
31594 typedef typename _Alloc::value_type _Alloc_value_type;
31595
31596
31597
31598 typedef _List_base<_Tp, _Alloc> _Base;
31599 typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
31600
31601 public:
31602 typedef _Tp value_type;
31603 typedef typename _Tp_alloc_type::pointer pointer;
31604 typedef typename _Tp_alloc_type::const_pointer const_pointer;
31605 typedef typename _Tp_alloc_type::reference reference;
31606 typedef typename _Tp_alloc_type::const_reference const_reference;
31607 typedef _List_iterator<_Tp> iterator;
31608 typedef _List_const_iterator<_Tp> const_iterator;
31609 typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
31610 typedef std::reverse_iterator<iterator> reverse_iterator;
31611 typedef size_t size_type;
31612 typedef ptrdiff_t difference_type;
31613 typedef _Alloc allocator_type;
31614
31615 protected:
31616
31617
31618 typedef _List_node<_Tp> _Node;
31619
31620 using _Base::_M_impl;
31621 using _Base::_M_put_node;
31622 using _Base::_M_get_node;
31623 using _Base::_M_get_Tp_allocator;
31624 using _Base::_M_get_Node_allocator;
31625 # 449 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31626 _Node*
31627 _M_create_node(const value_type& __x)
31628 {
31629 _Node* __p = this->_M_get_node();
31630 try
31631 {
31632 _M_get_Tp_allocator().construct(&__p->_M_data, __x);
31633 }
31634 catch(...)
31635 {
31636 _M_put_node(__p);
31637 throw;
31638 }
31639 return __p;
31640 }
31641
31642 public:
31643
31644
31645
31646
31647
31648 explicit
31649 list(const allocator_type& __a = allocator_type())
31650 : _Base(__a) { }
31651 # 482 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31652 explicit
31653 list(size_type __n, const value_type& __value = value_type(),
31654 const allocator_type& __a = allocator_type())
31655 : _Base(__a)
31656 { _M_fill_initialize(__n, __value); }
31657 # 495 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31658 list(const list& __x)
31659 : _Base(__x._M_get_Node_allocator())
31660 { _M_initialize_dispatch(__x.begin(), __x.end(), __false_type()); }
31661 # 508 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31662 template<typename _InputIterator>
31663 list(_InputIterator __first, _InputIterator __last,
31664 const allocator_type& __a = allocator_type())
31665 : _Base(__a)
31666 {
31667
31668 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
31669 _M_initialize_dispatch(__first, __last, _Integral());
31670 }
31671 # 533 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31672 list&
31673 operator=(const list& __x);
31674 # 546 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31675 void
31676 assign(size_type __n, const value_type& __val)
31677 { _M_fill_assign(__n, __val); }
31678 # 562 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31679 template<typename _InputIterator>
31680 void
31681 assign(_InputIterator __first, _InputIterator __last)
31682 {
31683
31684 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
31685 _M_assign_dispatch(__first, __last, _Integral());
31686 }
31687
31688
31689 allocator_type
31690 get_allocator() const
31691 { return _Base::get_allocator(); }
31692
31693
31694
31695
31696
31697
31698 iterator
31699 begin()
31700 { return iterator(this->_M_impl._M_node._M_next); }
31701
31702
31703
31704
31705
31706
31707 const_iterator
31708 begin() const
31709 { return const_iterator(this->_M_impl._M_node._M_next); }
31710
31711
31712
31713
31714
31715
31716 iterator
31717 end()
31718 { return iterator(&this->_M_impl._M_node); }
31719
31720
31721
31722
31723
31724
31725 const_iterator
31726 end() const
31727 { return const_iterator(&this->_M_impl._M_node); }
31728
31729
31730
31731
31732
31733
31734 reverse_iterator
31735 rbegin()
31736 { return reverse_iterator(end()); }
31737
31738
31739
31740
31741
31742
31743 const_reverse_iterator
31744 rbegin() const
31745 { return const_reverse_iterator(end()); }
31746
31747
31748
31749
31750
31751
31752 reverse_iterator
31753 rend()
31754 { return reverse_iterator(begin()); }
31755
31756
31757
31758
31759
31760
31761 const_reverse_iterator
31762 rend() const
31763 { return const_reverse_iterator(begin()); }
31764
31765
31766
31767
31768
31769
31770 bool
31771 empty() const
31772 { return this->_M_impl._M_node._M_next == &this->_M_impl._M_node; }
31773
31774
31775 size_type
31776 size() const
31777 { return std::distance(begin(), end()); }
31778
31779
31780 size_type
31781 max_size() const
31782 { return _M_get_Tp_allocator().max_size(); }
31783 # 677 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31784 void
31785 resize(size_type __new_size, value_type __x = value_type());
31786
31787
31788
31789
31790
31791
31792 reference
31793 front()
31794 { return *begin(); }
31795
31796
31797
31798
31799
31800 const_reference
31801 front() const
31802 { return *begin(); }
31803
31804
31805
31806
31807
31808 reference
31809 back()
31810 {
31811 iterator __tmp = end();
31812 --__tmp;
31813 return *__tmp;
31814 }
31815
31816
31817
31818
31819
31820 const_reference
31821 back() const
31822 {
31823 const_iterator __tmp = end();
31824 --__tmp;
31825 return *__tmp;
31826 }
31827 # 732 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31828 void
31829 push_front(const value_type& __x)
31830 { this->_M_insert(begin(), __x); }
31831 # 748 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31832 void
31833 pop_front()
31834 { this->_M_erase(begin()); }
31835 # 762 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31836 void
31837 push_back(const value_type& __x)
31838 { this->_M_insert(end(), __x); }
31839 # 777 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31840 void
31841 pop_back()
31842 { this->_M_erase(iterator(this->_M_impl._M_node._M_prev)); }
31843 # 792 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31844 iterator
31845 insert(iterator __position, const value_type& __x);
31846 # 807 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31847 void
31848 insert(iterator __position, size_type __n, const value_type& __x)
31849 {
31850 list __tmp(__n, __x, _M_get_Node_allocator());
31851 splice(__position, __tmp);
31852 }
31853 # 827 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31854 template<typename _InputIterator>
31855 void
31856 insert(iterator __position, _InputIterator __first,
31857 _InputIterator __last)
31858 {
31859 list __tmp(__first, __last, _M_get_Node_allocator());
31860 splice(__position, __tmp);
31861 }
31862 # 851 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31863 iterator
31864 erase(iterator __position);
31865 # 872 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31866 iterator
31867 erase(iterator __first, iterator __last)
31868 {
31869 while (__first != __last)
31870 __first = erase(__first);
31871 return __last;
31872 }
31873 # 889 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31874 void
31875 swap(list& __x)
31876 {
31877 _List_node_base::swap(this->_M_impl._M_node, __x._M_impl._M_node);
31878
31879
31880
31881 std::__alloc_swap<typename _Base::_Node_alloc_type>::
31882 _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator());
31883 }
31884
31885
31886
31887
31888
31889
31890
31891 void
31892 clear()
31893 {
31894 _Base::_M_clear();
31895 _Base::_M_init();
31896 }
31897 # 925 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31898 void
31899 splice(iterator __position, list& __x)
31900 {
31901 if (!__x.empty())
31902 {
31903 _M_check_equal_allocators(__x);
31904
31905 this->_M_transfer(__position, __x.begin(), __x.end());
31906 }
31907 }
31908 # 945 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31909 void
31910 splice(iterator __position, list& __x, iterator __i)
31911 {
31912 iterator __j = __i;
31913 ++__j;
31914 if (__position == __i || __position == __j)
31915 return;
31916
31917 if (this != &__x)
31918 _M_check_equal_allocators(__x);
31919
31920 this->_M_transfer(__position, __i, __j);
31921 }
31922 # 971 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31923 void
31924 splice(iterator __position, list& __x, iterator __first, iterator __last)
31925 {
31926 if (__first != __last)
31927 {
31928 if (this != &__x)
31929 _M_check_equal_allocators(__x);
31930
31931 this->_M_transfer(__position, __first, __last);
31932 }
31933 }
31934 # 994 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31935 void
31936 remove(const _Tp& __value);
31937 # 1008 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31938 template<typename _Predicate>
31939 void
31940 remove_if(_Predicate);
31941 # 1022 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31942 void
31943 unique();
31944 # 1037 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31945 template<typename _BinaryPredicate>
31946 void
31947 unique(_BinaryPredicate);
31948 # 1050 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31949 void
31950 merge(list& __x);
31951 # 1065 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
31952 template<typename _StrictWeakOrdering>
31953 void
31954 merge(list&, _StrictWeakOrdering);
31955
31956
31957
31958
31959
31960
31961 void
31962 reverse()
31963 { this->_M_impl._M_node.reverse(); }
31964
31965
31966
31967
31968
31969
31970
31971 void
31972 sort();
31973
31974
31975
31976
31977
31978
31979
31980 template<typename _StrictWeakOrdering>
31981 void
31982 sort(_StrictWeakOrdering);
31983
31984 protected:
31985
31986
31987
31988 template<typename _Integer>
31989 void
31990 _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
31991 {
31992 _M_fill_initialize(static_cast<size_type>(__n),
31993 static_cast<value_type>(__x));
31994 }
31995
31996
31997 template<typename _InputIterator>
31998 void
31999 _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
32000 __false_type)
32001 {
32002 for (; __first != __last; ++__first)
32003 push_back(*__first);
32004 }
32005
32006
32007
32008 void
32009 _M_fill_initialize(size_type __n, const value_type& __x)
32010 {
32011 for (; __n > 0; --__n)
32012 push_back(__x);
32013 }
32014
32015
32016
32017
32018
32019 template<typename _Integer>
32020 void
32021 _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
32022 {
32023 _M_fill_assign(static_cast<size_type>(__n),
32024 static_cast<value_type>(__val));
32025 }
32026
32027
32028 template<typename _InputIterator>
32029 void
32030 _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
32031 __false_type);
32032
32033
32034
32035 void
32036 _M_fill_assign(size_type __n, const value_type& __val);
32037
32038
32039
32040 void
32041 _M_transfer(iterator __position, iterator __first, iterator __last)
32042 { __position._M_node->transfer(__first._M_node, __last._M_node); }
32043
32044
32045 void
32046 _M_insert(iterator __position, const value_type& __x)
32047 {
32048 _Node* __tmp = _M_create_node(__x);
32049 __tmp->hook(__position._M_node);
32050 }
32051
32052
32053 void
32054 _M_erase(iterator __position)
32055 {
32056 __position._M_node->unhook();
32057 _Node* __n = static_cast<_Node*>(__position._M_node);
32058 _M_get_Tp_allocator().destroy(&__n->_M_data);
32059 _M_put_node(__n);
32060 }
32061
32062
32063 void
32064 _M_check_equal_allocators(list& __x)
32065 {
32066 if (_M_get_Node_allocator() != __x._M_get_Node_allocator())
32067 __throw_runtime_error(("list::_M_check_equal_allocators"));
32068 }
32069 };
32070 # 1194 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
32071 template<typename _Tp, typename _Alloc>
32072 inline bool
32073 operator==(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
32074 {
32075 typedef typename list<_Tp, _Alloc>::const_iterator const_iterator;
32076 const_iterator __end1 = __x.end();
32077 const_iterator __end2 = __y.end();
32078
32079 const_iterator __i1 = __x.begin();
32080 const_iterator __i2 = __y.begin();
32081 while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2)
32082 {
32083 ++__i1;
32084 ++__i2;
32085 }
32086 return __i1 == __end1 && __i2 == __end2;
32087 }
32088 # 1223 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3
32089 template<typename _Tp, typename _Alloc>
32090 inline bool
32091 operator<(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
32092 { return std::lexicographical_compare(__x.begin(), __x.end(),
32093 __y.begin(), __y.end()); }
32094
32095
32096 template<typename _Tp, typename _Alloc>
32097 inline bool
32098 operator!=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
32099 { return !(__x == __y); }
32100
32101
32102 template<typename _Tp, typename _Alloc>
32103 inline bool
32104 operator>(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
32105 { return __y < __x; }
32106
32107
32108 template<typename _Tp, typename _Alloc>
32109 inline bool
32110 operator<=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
32111 { return !(__y < __x); }
32112
32113
32114 template<typename _Tp, typename _Alloc>
32115 inline bool
32116 operator>=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
32117 { return !(__x < __y); }
32118
32119
32120 template<typename _Tp, typename _Alloc>
32121 inline void
32122 swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y)
32123 { __x.swap(__y); }
32124
32125 }
32126 # 71 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/list" 2 3
32127
32128
32129 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/list.tcc" 1 3
32130 # 65 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/list.tcc" 3
32131 namespace std __attribute__ ((__visibility__ ("default"))) {
32132
32133 template<typename _Tp, typename _Alloc>
32134 void
32135 _List_base<_Tp, _Alloc>::
32136 _M_clear()
32137 {
32138 typedef _List_node<_Tp> _Node;
32139 _Node* __cur = static_cast<_Node*>(this->_M_impl._M_node._M_next);
32140 while (__cur != &this->_M_impl._M_node)
32141 {
32142 _Node* __tmp = __cur;
32143 __cur = static_cast<_Node*>(__cur->_M_next);
32144 _M_get_Tp_allocator().destroy(&__tmp->_M_data);
32145 _M_put_node(__tmp);
32146 }
32147 }
32148
32149 template<typename _Tp, typename _Alloc>
32150 typename list<_Tp, _Alloc>::iterator
32151 list<_Tp, _Alloc>::
32152 insert(iterator __position, const value_type& __x)
32153 {
32154 _Node* __tmp = _M_create_node(__x);
32155 __tmp->hook(__position._M_node);
32156 return iterator(__tmp);
32157 }
32158
32159 template<typename _Tp, typename _Alloc>
32160 typename list<_Tp, _Alloc>::iterator
32161 list<_Tp, _Alloc>::
32162 erase(iterator __position)
32163 {
32164 iterator __ret = iterator(__position._M_node->_M_next);
32165 _M_erase(__position);
32166 return __ret;
32167 }
32168
32169 template<typename _Tp, typename _Alloc>
32170 void
32171 list<_Tp, _Alloc>::
32172 resize(size_type __new_size, value_type __x)
32173 {
32174 iterator __i = begin();
32175 size_type __len = 0;
32176 for (; __i != end() && __len < __new_size; ++__i, ++__len)
32177 ;
32178 if (__len == __new_size)
32179 erase(__i, end());
32180 else
32181 insert(end(), __new_size - __len, __x);
32182 }
32183
32184 template<typename _Tp, typename _Alloc>
32185 list<_Tp, _Alloc>&
32186 list<_Tp, _Alloc>::
32187 operator=(const list& __x)
32188 {
32189 if (this != &__x)
32190 {
32191 iterator __first1 = begin();
32192 iterator __last1 = end();
32193 const_iterator __first2 = __x.begin();
32194 const_iterator __last2 = __x.end();
32195 for (; __first1 != __last1 && __first2 != __last2;
32196 ++__first1, ++__first2)
32197 *__first1 = *__first2;
32198 if (__first2 == __last2)
32199 erase(__first1, __last1);
32200 else
32201 insert(__last1, __first2, __last2);
32202 }
32203 return *this;
32204 }
32205
32206 template<typename _Tp, typename _Alloc>
32207 void
32208 list<_Tp, _Alloc>::
32209 _M_fill_assign(size_type __n, const value_type& __val)
32210 {
32211 iterator __i = begin();
32212 for (; __i != end() && __n > 0; ++__i, --__n)
32213 *__i = __val;
32214 if (__n > 0)
32215 insert(end(), __n, __val);
32216 else
32217 erase(__i, end());
32218 }
32219
32220 template<typename _Tp, typename _Alloc>
32221 template <typename _InputIterator>
32222 void
32223 list<_Tp, _Alloc>::
32224 _M_assign_dispatch(_InputIterator __first2, _InputIterator __last2,
32225 __false_type)
32226 {
32227 iterator __first1 = begin();
32228 iterator __last1 = end();
32229 for (; __first1 != __last1 && __first2 != __last2;
32230 ++__first1, ++__first2)
32231 *__first1 = *__first2;
32232 if (__first2 == __last2)
32233 erase(__first1, __last1);
32234 else
32235 insert(__last1, __first2, __last2);
32236 }
32237
32238 template<typename _Tp, typename _Alloc>
32239 void
32240 list<_Tp, _Alloc>::
32241 remove(const value_type& __value)
32242 {
32243 iterator __first = begin();
32244 iterator __last = end();
32245 while (__first != __last)
32246 {
32247 iterator __next = __first;
32248 ++__next;
32249 if (*__first == __value)
32250 _M_erase(__first);
32251 __first = __next;
32252 }
32253 }
32254
32255 template<typename _Tp, typename _Alloc>
32256 void
32257 list<_Tp, _Alloc>::
32258 unique()
32259 {
32260 iterator __first = begin();
32261 iterator __last = end();
32262 if (__first == __last)
32263 return;
32264 iterator __next = __first;
32265 while (++__next != __last)
32266 {
32267 if (*__first == *__next)
32268 _M_erase(__next);
32269 else
32270 __first = __next;
32271 __next = __first;
32272 }
32273 }
32274
32275 template<typename _Tp, typename _Alloc>
32276 void
32277 list<_Tp, _Alloc>::
32278 merge(list& __x)
32279 {
32280
32281
32282 if (this != &__x)
32283 {
32284 _M_check_equal_allocators(__x);
32285
32286 iterator __first1 = begin();
32287 iterator __last1 = end();
32288 iterator __first2 = __x.begin();
32289 iterator __last2 = __x.end();
32290 while (__first1 != __last1 && __first2 != __last2)
32291 if (*__first2 < *__first1)
32292 {
32293 iterator __next = __first2;
32294 _M_transfer(__first1, __first2, ++__next);
32295 __first2 = __next;
32296 }
32297 else
32298 ++__first1;
32299 if (__first2 != __last2)
32300 _M_transfer(__last1, __first2, __last2);
32301 }
32302 }
32303
32304 template<typename _Tp, typename _Alloc>
32305 template <typename _StrictWeakOrdering>
32306 void
32307 list<_Tp, _Alloc>::
32308 merge(list& __x, _StrictWeakOrdering __comp)
32309 {
32310
32311
32312 if (this != &__x)
32313 {
32314 _M_check_equal_allocators(__x);
32315
32316 iterator __first1 = begin();
32317 iterator __last1 = end();
32318 iterator __first2 = __x.begin();
32319 iterator __last2 = __x.end();
32320 while (__first1 != __last1 && __first2 != __last2)
32321 if (__comp(*__first2, *__first1))
32322 {
32323 iterator __next = __first2;
32324 _M_transfer(__first1, __first2, ++__next);
32325 __first2 = __next;
32326 }
32327 else
32328 ++__first1;
32329 if (__first2 != __last2)
32330 _M_transfer(__last1, __first2, __last2);
32331 }
32332 }
32333
32334 template<typename _Tp, typename _Alloc>
32335 void
32336 list<_Tp, _Alloc>::
32337 sort()
32338 {
32339
32340 if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node
32341 && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node)
32342 {
32343 list __carry;
32344 list __tmp[64];
32345 list * __fill = &__tmp[0];
32346 list * __counter;
32347
32348 do
32349 {
32350 __carry.splice(__carry.begin(), *this, begin());
32351
32352 for(__counter = &__tmp[0];
32353 __counter != __fill && !__counter->empty();
32354 ++__counter)
32355 {
32356 __counter->merge(__carry);
32357 __carry.swap(*__counter);
32358 }
32359 __carry.swap(*__counter);
32360 if (__counter == __fill)
32361 ++__fill;
32362 }
32363 while ( !empty() );
32364
32365 for (__counter = &__tmp[1]; __counter != __fill; ++__counter)
32366 __counter->merge(*(__counter - 1));
32367 swap( *(__fill - 1) );
32368 }
32369 }
32370
32371 template<typename _Tp, typename _Alloc>
32372 template <typename _Predicate>
32373 void
32374 list<_Tp, _Alloc>::
32375 remove_if(_Predicate __pred)
32376 {
32377 iterator __first = begin();
32378 iterator __last = end();
32379 while (__first != __last)
32380 {
32381 iterator __next = __first;
32382 ++__next;
32383 if (__pred(*__first))
32384 _M_erase(__first);
32385 __first = __next;
32386 }
32387 }
32388
32389 template<typename _Tp, typename _Alloc>
32390 template <typename _BinaryPredicate>
32391 void
32392 list<_Tp, _Alloc>::
32393 unique(_BinaryPredicate __binary_pred)
32394 {
32395 iterator __first = begin();
32396 iterator __last = end();
32397 if (__first == __last)
32398 return;
32399 iterator __next = __first;
32400 while (++__next != __last)
32401 {
32402 if (__binary_pred(*__first, *__next))
32403 _M_erase(__next);
32404 else
32405 __first = __next;
32406 __next = __first;
32407 }
32408 }
32409
32410 template<typename _Tp, typename _Alloc>
32411 template <typename _StrictWeakOrdering>
32412 void
32413 list<_Tp, _Alloc>::
32414 sort(_StrictWeakOrdering __comp)
32415 {
32416
32417 if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node
32418 && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node)
32419 {
32420 list __carry;
32421 list __tmp[64];
32422 list * __fill = &__tmp[0];
32423 list * __counter;
32424
32425 do
32426 {
32427 __carry.splice(__carry.begin(), *this, begin());
32428
32429 for(__counter = &__tmp[0];
32430 __counter != __fill && !__counter->empty();
32431 ++__counter)
32432 {
32433 __counter->merge(__carry, __comp);
32434 __carry.swap(*__counter);
32435 }
32436 __carry.swap(*__counter);
32437 if (__counter == __fill)
32438 ++__fill;
32439 }
32440 while ( !empty() );
32441
32442 for (__counter = &__tmp[1]; __counter != __fill; ++__counter)
32443 __counter->merge(*(__counter - 1), __comp);
32444 swap(*(__fill - 1));
32445 }
32446 }
32447
32448 }
32449 # 74 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/list" 2 3
32450 # 50 "enblend.cc" 2
32451 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/vector" 1 3
32452 # 63 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/vector" 3
32453
32454 # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/vector" 3
32455
32456
32457
32458
32459
32460
32461 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 1 3
32462 # 69 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3
32463 namespace std __attribute__ ((__visibility__ ("default"))) {
32464
32465
32466
32467
32468
32469
32470 template<typename _Tp, typename _Alloc>
32471 struct _Vector_base
32472 {
32473 typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type;
32474
32475 struct _Vector_impl
32476 : public _Tp_alloc_type
32477 {
32478 _Tp* _M_start;
32479 _Tp* _M_finish;
32480 _Tp* _M_end_of_storage;
32481 _Vector_impl(_Tp_alloc_type const& __a)
32482 : _Tp_alloc_type(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0)
32483 { }
32484 };
32485
32486 public:
32487 typedef _Alloc allocator_type;
32488
32489 _Tp_alloc_type&
32490 _M_get_Tp_allocator()
32491 { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); }
32492
32493 const _Tp_alloc_type&
32494 _M_get_Tp_allocator() const
32495 { return *static_cast<const _Tp_alloc_type*>(&this->_M_impl); }
32496
32497 allocator_type
32498 get_allocator() const
32499 { return allocator_type(_M_get_Tp_allocator()); }
32500
32501 _Vector_base(const allocator_type& __a)
32502 : _M_impl(__a)
32503 { }
32504
32505 _Vector_base(size_t __n, const allocator_type& __a)
32506 : _M_impl(__a)
32507 {
32508 this->_M_impl._M_start = this->_M_allocate(__n);
32509 this->_M_impl._M_finish = this->_M_impl._M_start;
32510 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
32511 }
32512
32513 ~_Vector_base()
32514 { _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage
32515 - this->_M_impl._M_start); }
32516
32517 public:
32518 _Vector_impl _M_impl;
32519
32520 _Tp*
32521 _M_allocate(size_t __n)
32522 { return _M_impl.allocate(__n); }
32523
32524 void
32525 _M_deallocate(_Tp* __p, size_t __n)
32526 {
32527 if (__p)
32528 _M_impl.deallocate(__p, __n);
32529 }
32530 };
32531 # 158 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3
32532 template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
32533 class vector : protected _Vector_base<_Tp, _Alloc>
32534 {
32535
32536 typedef typename _Alloc::value_type _Alloc_value_type;
32537
32538
32539
32540 typedef _Vector_base<_Tp, _Alloc> _Base;
32541 typedef vector<_Tp, _Alloc> vector_type;
32542 typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
32543
32544 public:
32545 typedef _Tp value_type;
32546 typedef typename _Tp_alloc_type::pointer pointer;
32547 typedef typename _Tp_alloc_type::const_pointer const_pointer;
32548 typedef typename _Tp_alloc_type::reference reference;
32549 typedef typename _Tp_alloc_type::const_reference const_reference;
32550 typedef __gnu_cxx::__normal_iterator<pointer, vector_type> iterator;
32551 typedef __gnu_cxx::__normal_iterator<const_pointer, vector_type>
32552 const_iterator;
32553 typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
32554 typedef std::reverse_iterator<iterator> reverse_iterator;
32555 typedef size_t size_type;
32556 typedef ptrdiff_t difference_type;
32557 typedef _Alloc allocator_type;
32558
32559 protected:
32560 using _Base::_M_allocate;
32561 using _Base::_M_deallocate;
32562 using _Base::_M_impl;
32563 using _Base::_M_get_Tp_allocator;
32564
32565 public:
32566
32567
32568
32569
32570
32571 explicit
32572 vector(const allocator_type& __a = allocator_type())
32573 : _Base(__a)
32574 { }
32575 # 209 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3
32576 explicit
32577 vector(size_type __n, const value_type& __value = value_type(),
32578 const allocator_type& __a = allocator_type())
32579 : _Base(__n, __a)
32580 {
32581 std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value,
32582 _M_get_Tp_allocator());
32583 this->_M_impl._M_finish = this->_M_impl._M_start + __n;
32584 }
32585 # 228 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3
32586 vector(const vector& __x)
32587 : _Base(__x.size(), __x._M_get_Tp_allocator())
32588 { this->_M_impl._M_finish =
32589 std::__uninitialized_copy_a(__x.begin(), __x.end(),
32590 this->_M_impl._M_start,
32591 _M_get_Tp_allocator());
32592 }
32593 # 251 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3
32594 template<typename _InputIterator>
32595 vector(_InputIterator __first, _InputIterator __last,
32596 const allocator_type& __a = allocator_type())
32597 : _Base(__a)
32598 {
32599
32600 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
32601 _M_initialize_dispatch(__first, __last, _Integral());
32602 }
32603
32604
32605
32606
32607
32608
32609
32610 ~vector()
32611 { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
32612 _M_get_Tp_allocator()); }
32613 # 279 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3
32614 vector&
32615 operator=(const vector& __x);
32616 # 292 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3
32617 void
32618 assign(size_type __n, const value_type& __val)
32619 { _M_fill_assign(__n, __val); }
32620 # 308 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3
32621 template<typename _InputIterator>
32622 void
32623 assign(_InputIterator __first, _InputIterator __last)
32624 {
32625
32626 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
32627 _M_assign_dispatch(__first, __last, _Integral());
32628 }
32629
32630
32631 using _Base::get_allocator;
32632
32633
32634
32635
32636
32637
32638
32639 iterator
32640 begin()
32641 { return iterator(this->_M_impl._M_start); }
32642
32643
32644
32645
32646
32647
32648 const_iterator
32649 begin() const
32650 { return const_iterator(this->_M_impl._M_start); }
32651
32652
32653
32654
32655
32656
32657 iterator
32658 end()
32659 { return iterator(this->_M_impl._M_finish); }
32660
32661
32662
32663
32664
32665
32666 const_iterator
32667 end() const
32668 { return const_iterator(this->_M_impl._M_finish); }
32669
32670
32671
32672
32673
32674
32675 reverse_iterator
32676 rbegin()
32677 { return reverse_iterator(end()); }
32678
32679
32680
32681
32682
32683
32684 const_reverse_iterator
32685 rbegin() const
32686 { return const_reverse_iterator(end()); }
32687
32688
32689
32690
32691
32692
32693 reverse_iterator
32694 rend()
32695 { return reverse_iterator(begin()); }
32696
32697
32698
32699
32700
32701
32702 const_reverse_iterator
32703 rend() const
32704 { return const_reverse_iterator(begin()); }
32705
32706
32707
32708 size_type
32709 size() const
32710 { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); }
32711
32712
32713 size_type
32714 max_size() const
32715 { return _M_get_Tp_allocator().max_size(); }
32716 # 415 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3
32717 void
32718 resize(size_type __new_size, value_type __x = value_type())
32719 {
32720 if (__new_size < size())
32721 _M_erase_at_end(this->_M_impl._M_start + __new_size);
32722 else
32723 insert(end(), __new_size - size(), __x);
32724 }
32725
32726
32727
32728
32729
32730 size_type
32731 capacity() const
32732 { return size_type(this->_M_impl._M_end_of_storage
32733 - this->_M_impl._M_start); }
32734
32735
32736
32737
32738
32739 bool
32740 empty() const
32741 { return begin() == end(); }
32742 # 458 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3
32743 void
32744 reserve(size_type __n);
32745 # 473 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3
32746 reference
32747 operator[](size_type __n)
32748 { return *(this->_M_impl._M_start + __n); }
32749 # 488 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3
32750 const_reference
32751 operator[](size_type __n) const
32752 { return *(this->_M_impl._M_start + __n); }
32753
32754 protected:
32755
32756 void
32757 _M_range_check(size_type __n) const
32758 {
32759 if (__n >= this->size())
32760 __throw_out_of_range(("vector::_M_range_check"));
32761 }
32762
32763 public:
32764 # 513 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3
32765 reference
32766 at(size_type __n)
32767 {
32768 _M_range_check(__n);
32769 return (*this)[__n];
32770 }
32771 # 531 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3
32772 const_reference
32773 at(size_type __n) const
32774 {
32775 _M_range_check(__n);
32776 return (*this)[__n];
32777 }
32778
32779
32780
32781
32782
32783 reference
32784 front()
32785 { return *begin(); }
32786
32787
32788
32789
32790
32791 const_reference
32792 front() const
32793 { return *begin(); }
32794
32795
32796
32797
32798
32799 reference
32800 back()
32801 { return *(end() - 1); }
32802
32803
32804
32805
32806
32807 const_reference
32808 back() const
32809 { return *(end() - 1); }
32810 # 577 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3
32811 pointer
32812 data()
32813 { return pointer(this->_M_impl._M_start); }
32814
32815 const_pointer
32816 data() const
32817 { return const_pointer(this->_M_impl._M_start); }
32818 # 596 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3
32819 void
32820 push_back(const value_type& __x)
32821 {
32822 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
32823 {
32824 this->_M_impl.construct(this->_M_impl._M_finish, __x);
32825 ++this->_M_impl._M_finish;
32826 }
32827 else
32828 _M_insert_aux(end(), __x);
32829 }
32830 # 617 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3
32831 void
32832 pop_back()
32833 {
32834 --this->_M_impl._M_finish;
32835 this->_M_impl.destroy(this->_M_impl._M_finish);
32836 }
32837 # 635 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3
32838 iterator
32839 insert(iterator __position, const value_type& __x);
32840 # 651 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3
32841 void
32842 insert(iterator __position, size_type __n, const value_type& __x)
32843 { _M_fill_insert(__position, __n, __x); }
32844 # 669 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3
32845 template<typename _InputIterator>
32846 void
32847 insert(iterator __position, _InputIterator __first,
32848 _InputIterator __last)
32849 {
32850
32851 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
32852 _M_insert_dispatch(__position, __first, __last, _Integral());
32853 }
32854 # 694 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3
32855 iterator
32856 erase(iterator __position);
32857 # 715 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3
32858 iterator
32859 erase(iterator __first, iterator __last);
32860 # 727 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3
32861 void
32862 swap(vector& __x)
32863 {
32864 std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
32865 std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
32866 std::swap(this->_M_impl._M_end_of_storage,
32867 __x._M_impl._M_end_of_storage);
32868
32869
32870
32871 std::__alloc_swap<_Tp_alloc_type>::_S_do_it(_M_get_Tp_allocator(),
32872 __x._M_get_Tp_allocator());
32873 }
32874
32875
32876
32877
32878
32879
32880
32881 void
32882 clear()
32883 { _M_erase_at_end(this->_M_impl._M_start); }
32884
32885 protected:
32886
32887
32888
32889
32890
32891
32892 template<typename _ForwardIterator>
32893 pointer
32894 _M_allocate_and_copy(size_type __n,
32895 _ForwardIterator __first, _ForwardIterator __last)
32896 {
32897 pointer __result = this->_M_allocate(__n);
32898 try
32899 {
32900 std::__uninitialized_copy_a(__first, __last, __result,
32901 _M_get_Tp_allocator());
32902 return __result;
32903 }
32904 catch(...)
32905 {
32906 _M_deallocate(__result, __n);
32907 throw;
32908 }
32909 }
32910
32911
32912
32913
32914
32915 template<typename _Integer>
32916 void
32917 _M_initialize_dispatch(_Integer __n, _Integer __value, __true_type)
32918 {
32919 this->_M_impl._M_start = _M_allocate(__n);
32920 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
32921 std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value,
32922 _M_get_Tp_allocator());
32923 this->_M_impl._M_finish = this->_M_impl._M_end_of_storage;
32924 }
32925
32926
32927 template<typename _InputIterator>
32928 void
32929 _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
32930 __false_type)
32931 {
32932 typedef typename std::iterator_traits<_InputIterator>::
32933 iterator_category _IterCategory;
32934 _M_range_initialize(__first, __last, _IterCategory());
32935 }
32936
32937
32938 template<typename _InputIterator>
32939 void
32940 _M_range_initialize(_InputIterator __first,
32941 _InputIterator __last, std::input_iterator_tag)
32942 {
32943 for (; __first != __last; ++__first)
32944 push_back(*__first);
32945 }
32946
32947
32948 template<typename _ForwardIterator>
32949 void
32950 _M_range_initialize(_ForwardIterator __first,
32951 _ForwardIterator __last, std::forward_iterator_tag)
32952 {
32953 const size_type __n = std::distance(__first, __last);
32954 this->_M_impl._M_start = this->_M_allocate(__n);
32955 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
32956 this->_M_impl._M_finish =
32957 std::__uninitialized_copy_a(__first, __last,
32958 this->_M_impl._M_start,
32959 _M_get_Tp_allocator());
32960 }
32961
32962
32963
32964
32965
32966
32967 template<typename _Integer>
32968 void
32969 _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
32970 {
32971 _M_fill_assign(static_cast<size_type>(__n),
32972 static_cast<value_type>(__val));
32973 }
32974
32975
32976 template<typename _InputIterator>
32977 void
32978 _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
32979 __false_type)
32980 {
32981 typedef typename std::iterator_traits<_InputIterator>::
32982 iterator_category _IterCategory;
32983 _M_assign_aux(__first, __last, _IterCategory());
32984 }
32985
32986
32987 template<typename _InputIterator>
32988 void
32989 _M_assign_aux(_InputIterator __first, _InputIterator __last,
32990 std::input_iterator_tag);
32991
32992
32993 template<typename _ForwardIterator>
32994 void
32995 _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
32996 std::forward_iterator_tag);
32997
32998
32999
33000 void
33001 _M_fill_assign(size_type __n, const value_type& __val);
33002
33003
33004
33005
33006
33007 template<typename _Integer>
33008 void
33009 _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val,
33010 __true_type)
33011 {
33012 _M_fill_insert(__pos, static_cast<size_type>(__n),
33013 static_cast<value_type>(__val));
33014 }
33015
33016
33017 template<typename _InputIterator>
33018 void
33019 _M_insert_dispatch(iterator __pos, _InputIterator __first,
33020 _InputIterator __last, __false_type)
33021 {
33022 typedef typename std::iterator_traits<_InputIterator>::
33023 iterator_category _IterCategory;
33024 _M_range_insert(__pos, __first, __last, _IterCategory());
33025 }
33026
33027
33028 template<typename _InputIterator>
33029 void
33030 _M_range_insert(iterator __pos, _InputIterator __first,
33031 _InputIterator __last, std::input_iterator_tag);
33032
33033
33034 template<typename _ForwardIterator>
33035 void
33036 _M_range_insert(iterator __pos, _ForwardIterator __first,
33037 _ForwardIterator __last, std::forward_iterator_tag);
33038
33039
33040
33041 void
33042 _M_fill_insert(iterator __pos, size_type __n, const value_type& __x);
33043
33044
33045 void
33046 _M_insert_aux(iterator __position, const value_type& __x);
33047
33048
33049
33050
33051
33052 void
33053 _M_erase_at_end(pointer __pos)
33054 {
33055 std::_Destroy(__pos, this->_M_impl._M_finish, _M_get_Tp_allocator());
33056 this->_M_impl._M_finish = __pos;
33057 }
33058 };
33059 # 937 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3
33060 template<typename _Tp, typename _Alloc>
33061 inline bool
33062 operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
33063 { return (__x.size() == __y.size()
33064 && std::equal(__x.begin(), __x.end(), __y.begin())); }
33065 # 954 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3
33066 template<typename _Tp, typename _Alloc>
33067 inline bool
33068 operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
33069 { return std::lexicographical_compare(__x.begin(), __x.end(),
33070 __y.begin(), __y.end()); }
33071
33072
33073 template<typename _Tp, typename _Alloc>
33074 inline bool
33075 operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
33076 { return !(__x == __y); }
33077
33078
33079 template<typename _Tp, typename _Alloc>
33080 inline bool
33081 operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
33082 { return __y < __x; }
33083
33084
33085 template<typename _Tp, typename _Alloc>
33086 inline bool
33087 operator<=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
33088 { return !(__y < __x); }
33089
33090
33091 template<typename _Tp, typename _Alloc>
33092 inline bool
33093 operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
33094 { return !(__x < __y); }
33095
33096
33097 template<typename _Tp, typename _Alloc>
33098 inline void
33099 swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y)
33100 { __x.swap(__y); }
33101
33102 }
33103 # 71 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/vector" 2 3
33104 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_bvector.h" 1 3
33105 # 65 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_bvector.h" 3
33106 namespace std __attribute__ ((__visibility__ ("default"))) {
33107
33108 typedef unsigned long _Bit_type;
33109 enum { _S_word_bit = int(8 * sizeof(_Bit_type)) };
33110
33111 struct _Bit_reference
33112 {
33113 _Bit_type * _M_p;
33114 _Bit_type _M_mask;
33115
33116 _Bit_reference(_Bit_type * __x, _Bit_type __y)
33117 : _M_p(__x), _M_mask(__y) { }
33118
33119 _Bit_reference() : _M_p(0), _M_mask(0) { }
33120
33121 operator bool() const
33122 { return !!(*_M_p & _M_mask); }
33123
33124 _Bit_reference&
33125 operator=(bool __x)
33126 {
33127 if (__x)
33128 *_M_p |= _M_mask;
33129 else
33130 *_M_p &= ~_M_mask;
33131 return *this;
33132 }
33133
33134 _Bit_reference&
33135 operator=(const _Bit_reference& __x)
33136 { return *this = bool(__x); }
33137
33138 bool
33139 operator==(const _Bit_reference& __x) const
33140 { return bool(*this) == bool(__x); }
33141
33142 bool
33143 operator<(const _Bit_reference& __x) const
33144 { return !bool(*this) && bool(__x); }
33145
33146 void
33147 flip()
33148 { *_M_p ^= _M_mask; }
33149 };
33150
33151 struct _Bit_iterator_base
33152 : public std::iterator<std::random_access_iterator_tag, bool>
33153 {
33154 _Bit_type * _M_p;
33155 unsigned int _M_offset;
33156
33157 _Bit_iterator_base(_Bit_type * __x, unsigned int __y)
33158 : _M_p(__x), _M_offset(__y) { }
33159
33160 void
33161 _M_bump_up()
33162 {
33163 if (_M_offset++ == int(_S_word_bit) - 1)
33164 {
33165 _M_offset = 0;
33166 ++_M_p;
33167 }
33168 }
33169
33170 void
33171 _M_bump_down()
33172 {
33173 if (_M_offset-- == 0)
33174 {
33175 _M_offset = int(_S_word_bit) - 1;
33176 --_M_p;
33177 }
33178 }
33179
33180 void
33181 _M_incr(ptrdiff_t __i)
33182 {
33183 difference_type __n = __i + _M_offset;
33184 _M_p += __n / int(_S_word_bit);
33185 __n = __n % int(_S_word_bit);
33186 if (__n < 0)
33187 {
33188 __n += int(_S_word_bit);
33189 --_M_p;
33190 }
33191 _M_offset = static_cast<unsigned int>(__n);
33192 }
33193
33194 bool
33195 operator==(const _Bit_iterator_base& __i) const
33196 { return _M_p == __i._M_p && _M_offset == __i._M_offset; }
33197
33198 bool
33199 operator<(const _Bit_iterator_base& __i) const
33200 {
33201 return _M_p < __i._M_p
33202 || (_M_p == __i._M_p && _M_offset < __i._M_offset);
33203 }
33204
33205 bool
33206 operator!=(const _Bit_iterator_base& __i) const
33207 { return !(*this == __i); }
33208
33209 bool
33210 operator>(const _Bit_iterator_base& __i) const
33211 { return __i < *this; }
33212
33213 bool
33214 operator<=(const _Bit_iterator_base& __i) const
33215 { return !(__i < *this); }
33216
33217 bool
33218 operator>=(const _Bit_iterator_base& __i) const
33219 { return !(*this < __i); }
33220 };
33221
33222 inline ptrdiff_t
33223 operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y)
33224 {
33225 return (int(_S_word_bit) * (__x._M_p - __y._M_p)
33226 + __x._M_offset - __y._M_offset);
33227 }
33228
33229 struct _Bit_iterator : public _Bit_iterator_base
33230 {
33231 typedef _Bit_reference reference;
33232 typedef _Bit_reference* pointer;
33233 typedef _Bit_iterator iterator;
33234
33235 _Bit_iterator() : _Bit_iterator_base(0, 0) { }
33236
33237 _Bit_iterator(_Bit_type * __x, unsigned int __y)
33238 : _Bit_iterator_base(__x, __y) { }
33239
33240 reference
33241 operator*() const
33242 { return reference(_M_p, 1UL << _M_offset); }
33243
33244 iterator&
33245 operator++()
33246 {
33247 _M_bump_up();
33248 return *this;
33249 }
33250
33251 iterator
33252 operator++(int)
33253 {
33254 iterator __tmp = *this;
33255 _M_bump_up();
33256 return __tmp;
33257 }
33258
33259 iterator&
33260 operator--()
33261 {
33262 _M_bump_down();
33263 return *this;
33264 }
33265
33266 iterator
33267 operator--(int)
33268 {
33269 iterator __tmp = *this;
33270 _M_bump_down();
33271 return __tmp;
33272 }
33273
33274 iterator&
33275 operator+=(difference_type __i)
33276 {
33277 _M_incr(__i);
33278 return *this;
33279 }
33280
33281 iterator&
33282 operator-=(difference_type __i)
33283 {
33284 *this += -__i;
33285 return *this;
33286 }
33287
33288 iterator
33289 operator+(difference_type __i) const
33290 {
33291 iterator __tmp = *this;
33292 return __tmp += __i;
33293 }
33294
33295 iterator
33296 operator-(difference_type __i) const
33297 {
33298 iterator __tmp = *this;
33299 return __tmp -= __i;
33300 }
33301
33302 reference
33303 operator[](difference_type __i) const
33304 { return *(*this + __i); }
33305 };
33306
33307 inline _Bit_iterator
33308 operator+(ptrdiff_t __n, const _Bit_iterator& __x)
33309 { return __x + __n; }
33310
33311 struct _Bit_const_iterator : public _Bit_iterator_base
33312 {
33313 typedef bool reference;
33314 typedef bool const_reference;
33315 typedef const bool* pointer;
33316 typedef _Bit_const_iterator const_iterator;
33317
33318 _Bit_const_iterator() : _Bit_iterator_base(0, 0) { }
33319
33320 _Bit_const_iterator(_Bit_type * __x, unsigned int __y)
33321 : _Bit_iterator_base(__x, __y) { }
33322
33323 _Bit_const_iterator(const _Bit_iterator& __x)
33324 : _Bit_iterator_base(__x._M_p, __x._M_offset) { }
33325
33326 const_reference
33327 operator*() const
33328 { return _Bit_reference(_M_p, 1UL << _M_offset); }
33329
33330 const_iterator&
33331 operator++()
33332 {
33333 _M_bump_up();
33334 return *this;
33335 }
33336
33337 const_iterator
33338 operator++(int)
33339 {
33340 const_iterator __tmp = *this;
33341 _M_bump_up();
33342 return __tmp;
33343 }
33344
33345 const_iterator&
33346 operator--()
33347 {
33348 _M_bump_down();
33349 return *this;
33350 }
33351
33352 const_iterator
33353 operator--(int)
33354 {
33355 const_iterator __tmp = *this;
33356 _M_bump_down();
33357 return __tmp;
33358 }
33359
33360 const_iterator&
33361 operator+=(difference_type __i)
33362 {
33363 _M_incr(__i);
33364 return *this;
33365 }
33366
33367 const_iterator&
33368 operator-=(difference_type __i)
33369 {
33370 *this += -__i;
33371 return *this;
33372 }
33373
33374 const_iterator
33375 operator+(difference_type __i) const
33376 {
33377 const_iterator __tmp = *this;
33378 return __tmp += __i;
33379 }
33380
33381 const_iterator
33382 operator-(difference_type __i) const
33383 {
33384 const_iterator __tmp = *this;
33385 return __tmp -= __i;
33386 }
33387
33388 const_reference
33389 operator[](difference_type __i) const
33390 { return *(*this + __i); }
33391 };
33392
33393 inline _Bit_const_iterator
33394 operator+(ptrdiff_t __n, const _Bit_const_iterator& __x)
33395 { return __x + __n; }
33396
33397 inline void
33398 __fill_bvector(_Bit_iterator __first, _Bit_iterator __last, bool __x)
33399 {
33400 for (; __first != __last; ++__first)
33401 *__first = __x;
33402 }
33403
33404 inline void
33405 fill(_Bit_iterator __first, _Bit_iterator __last, const bool& __x)
33406 {
33407 if (__first._M_p != __last._M_p)
33408 {
33409 std::fill(__first._M_p + 1, __last._M_p, __x ? ~0 : 0);
33410 __fill_bvector(__first, _Bit_iterator(__first._M_p + 1, 0), __x);
33411 __fill_bvector(_Bit_iterator(__last._M_p, 0), __last, __x);
33412 }
33413 else
33414 __fill_bvector(__first, __last, __x);
33415 }
33416
33417 template<class _Alloc>
33418 struct _Bvector_base
33419 {
33420 typedef typename _Alloc::template rebind<_Bit_type>::other
33421 _Bit_alloc_type;
33422
33423 struct _Bvector_impl
33424 : public _Bit_alloc_type
33425 {
33426 _Bit_iterator _M_start;
33427 _Bit_iterator _M_finish;
33428 _Bit_type* _M_end_of_storage;
33429 _Bvector_impl(const _Bit_alloc_type& __a)
33430 : _Bit_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage(0)
33431 { }
33432 };
33433
33434 public:
33435 typedef _Alloc allocator_type;
33436
33437 _Bit_alloc_type&
33438 _M_get_Bit_allocator()
33439 { return *static_cast<_Bit_alloc_type*>(&this->_M_impl); }
33440
33441 const _Bit_alloc_type&
33442 _M_get_Bit_allocator() const
33443 { return *static_cast<const _Bit_alloc_type*>(&this->_M_impl); }
33444
33445 allocator_type
33446 get_allocator() const
33447 { return allocator_type(_M_get_Bit_allocator()); }
33448
33449 _Bvector_base(const allocator_type& __a) : _M_impl(__a) { }
33450
33451 ~_Bvector_base()
33452 { this->_M_deallocate(); }
33453
33454 protected:
33455 _Bvector_impl _M_impl;
33456
33457 _Bit_type*
33458 _M_allocate(size_t __n)
33459 { return _M_impl.allocate((__n + int(_S_word_bit) - 1)
33460 / int(_S_word_bit)); }
33461
33462 void
33463 _M_deallocate()
33464 {
33465 if (_M_impl._M_start._M_p)
33466 _M_impl.deallocate(_M_impl._M_start._M_p,
33467 _M_impl._M_end_of_storage - _M_impl._M_start._M_p);
33468 }
33469 };
33470
33471 }
33472
33473
33474
33475
33476 namespace std __attribute__ ((__visibility__ ("default"))) {
33477 # 455 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_bvector.h" 3
33478 template<typename _Alloc>
33479 class vector<bool, _Alloc> : protected _Bvector_base<_Alloc>
33480 {
33481 typedef _Bvector_base<_Alloc> _Base;
33482
33483 public:
33484 typedef bool value_type;
33485 typedef size_t size_type;
33486 typedef ptrdiff_t difference_type;
33487 typedef _Bit_reference reference;
33488 typedef bool const_reference;
33489 typedef _Bit_reference* pointer;
33490 typedef const bool* const_pointer;
33491 typedef _Bit_iterator iterator;
33492 typedef _Bit_const_iterator const_iterator;
33493 typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
33494 typedef std::reverse_iterator<iterator> reverse_iterator;
33495 typedef _Alloc allocator_type;
33496
33497 allocator_type get_allocator() const
33498 { return _Base::get_allocator(); }
33499
33500 protected:
33501 using _Base::_M_allocate;
33502 using _Base::_M_deallocate;
33503 using _Base::_M_get_Bit_allocator;
33504
33505 public:
33506 explicit
33507 vector(const allocator_type& __a = allocator_type())
33508 : _Base(__a) { }
33509
33510 explicit
33511 vector(size_type __n, const bool& __value = bool(),
33512 const allocator_type& __a = allocator_type())
33513 : _Base(__a)
33514 {
33515 _M_initialize(__n);
33516 std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_of_storage,
33517 __value ? ~0 : 0);
33518 }
33519
33520 vector(const vector& __x)
33521 : _Base(__x._M_get_Bit_allocator())
33522 {
33523 _M_initialize(__x.size());
33524 _M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start);
33525 }
33526
33527 template<class _InputIterator>
33528 vector(_InputIterator __first, _InputIterator __last,
33529 const allocator_type& __a = allocator_type())
33530 : _Base(__a)
33531 {
33532 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
33533 _M_initialize_dispatch(__first, __last, _Integral());
33534 }
33535
33536 ~vector() { }
33537
33538 vector&
33539 operator=(const vector& __x)
33540 {
33541 if (&__x == this)
33542 return *this;
33543 if (__x.size() > capacity())
33544 {
33545 this->_M_deallocate();
33546 _M_initialize(__x.size());
33547 }
33548 this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(),
33549 begin());
33550 return *this;
33551 }
33552
33553
33554
33555
33556
33557 void
33558 assign(size_type __n, const bool& __x)
33559 { _M_fill_assign(__n, __x); }
33560
33561 template<class _InputIterator>
33562 void
33563 assign(_InputIterator __first, _InputIterator __last)
33564 {
33565 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
33566 _M_assign_dispatch(__first, __last, _Integral());
33567 }
33568
33569 iterator
33570 begin()
33571 { return this->_M_impl._M_start; }
33572
33573 const_iterator
33574 begin() const
33575 { return this->_M_impl._M_start; }
33576
33577 iterator
33578 end()
33579 { return this->_M_impl._M_finish; }
33580
33581 const_iterator
33582 end() const
33583 { return this->_M_impl._M_finish; }
33584
33585 reverse_iterator
33586 rbegin()
33587 { return reverse_iterator(end()); }
33588
33589 const_reverse_iterator
33590 rbegin() const
33591 { return const_reverse_iterator(end()); }
33592
33593 reverse_iterator
33594 rend()
33595 { return reverse_iterator(begin()); }
33596
33597 const_reverse_iterator
33598 rend() const
33599 { return const_reverse_iterator(begin()); }
33600
33601 size_type
33602 size() const
33603 { return size_type(end() - begin()); }
33604
33605 size_type
33606 max_size() const
33607 {
33608 const size_type __asize = _M_get_Bit_allocator().max_size();
33609 return (__asize <= size_type(-1) / int(_S_word_bit) ?
33610 __asize * int(_S_word_bit) : size_type(-1));
33611 }
33612
33613 size_type
33614 capacity() const
33615 { return size_type(const_iterator(this->_M_impl._M_end_of_storage, 0)
33616 - begin()); }
33617
33618 bool
33619 empty() const
33620 { return begin() == end(); }
33621
33622 reference
33623 operator[](size_type __n)
33624 {
33625 return *iterator(this->_M_impl._M_start._M_p
33626 + __n / int(_S_word_bit), __n % int(_S_word_bit));
33627 }
33628
33629 const_reference
33630 operator[](size_type __n) const
33631 {
33632 return *const_iterator(this->_M_impl._M_start._M_p
33633 + __n / int(_S_word_bit), __n % int(_S_word_bit));
33634 }
33635
33636 protected:
33637 void
33638 _M_range_check(size_type __n) const
33639 {
33640 if (__n >= this->size())
33641 __throw_out_of_range(("vector<bool>::_M_range_check"));
33642 }
33643
33644 public:
33645 reference
33646 at(size_type __n)
33647 { _M_range_check(__n); return (*this)[__n]; }
33648
33649 const_reference
33650 at(size_type __n) const
33651 { _M_range_check(__n); return (*this)[__n]; }
33652
33653 void
33654 reserve(size_type __n)
33655 {
33656 if (__n > this->max_size())
33657 __throw_length_error(("vector::reserve"));
33658 if (this->capacity() < __n)
33659 {
33660 _Bit_type* __q = this->_M_allocate(__n);
33661 this->_M_impl._M_finish = _M_copy_aligned(begin(), end(),
33662 iterator(__q, 0));
33663 this->_M_deallocate();
33664 this->_M_impl._M_start = iterator(__q, 0);
33665 this->_M_impl._M_end_of_storage = (__q + (__n + int(_S_word_bit) - 1)
33666 / int(_S_word_bit));
33667 }
33668 }
33669
33670 reference
33671 front()
33672 { return *begin(); }
33673
33674 const_reference
33675 front() const
33676 { return *begin(); }
33677
33678 reference
33679 back()
33680 { return *(end() - 1); }
33681
33682 const_reference
33683 back() const
33684 { return *(end() - 1); }
33685
33686
33687
33688
33689
33690
33691 void
33692 data() { }
33693
33694 void
33695 push_back(bool __x)
33696 {
33697 if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage)
33698 *this->_M_impl._M_finish++ = __x;
33699 else
33700 _M_insert_aux(end(), __x);
33701 }
33702
33703 void
33704 swap(vector<bool, _Alloc>& __x)
33705 {
33706 std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
33707 std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
33708 std::swap(this->_M_impl._M_end_of_storage,
33709 __x._M_impl._M_end_of_storage);
33710
33711
33712
33713 std::__alloc_swap<typename _Base::_Bit_alloc_type>::
33714 _S_do_it(_M_get_Bit_allocator(), __x._M_get_Bit_allocator());
33715 }
33716
33717
33718 static void
33719 swap(reference __x, reference __y)
33720 {
33721 bool __tmp = __x;
33722 __x = __y;
33723 __y = __tmp;
33724 }
33725
33726 iterator
33727 insert(iterator __position, const bool& __x = bool())
33728 {
33729 const difference_type __n = __position - begin();
33730 if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage
33731 && __position == end())
33732 *this->_M_impl._M_finish++ = __x;
33733 else
33734 _M_insert_aux(__position, __x);
33735 return begin() + __n;
33736 }
33737
33738 template<class _InputIterator>
33739 void
33740 insert(iterator __position,
33741 _InputIterator __first, _InputIterator __last)
33742 {
33743 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
33744 _M_insert_dispatch(__position, __first, __last, _Integral());
33745 }
33746
33747 void
33748 insert(iterator __position, size_type __n, const bool& __x)
33749 { _M_fill_insert(__position, __n, __x); }
33750
33751 void
33752 pop_back()
33753 { --this->_M_impl._M_finish; }
33754
33755 iterator
33756 erase(iterator __position)
33757 {
33758 if (__position + 1 != end())
33759 std::copy(__position + 1, end(), __position);
33760 --this->_M_impl._M_finish;
33761 return __position;
33762 }
33763
33764 iterator
33765 erase(iterator __first, iterator __last)
33766 {
33767 _M_erase_at_end(std::copy(__last, end(), __first));
33768 return __first;
33769 }
33770
33771 void
33772 resize(size_type __new_size, bool __x = bool())
33773 {
33774 if (__new_size < size())
33775 _M_erase_at_end(begin() + difference_type(__new_size));
33776 else
33777 insert(end(), __new_size - size(), __x);
33778 }
33779
33780 void
33781 flip()
33782 {
33783 for (_Bit_type * __p = this->_M_impl._M_start._M_p;
33784 __p != this->_M_impl._M_end_of_storage; ++__p)
33785 *__p = ~*__p;
33786 }
33787
33788 void
33789 clear()
33790 { _M_erase_at_end(begin()); }
33791
33792
33793 protected:
33794
33795 iterator
33796 _M_copy_aligned(const_iterator __first, const_iterator __last,
33797 iterator __result)
33798 {
33799 _Bit_type* __q = std::copy(__first._M_p, __last._M_p, __result._M_p);
33800 return std::copy(const_iterator(__last._M_p, 0), __last,
33801 iterator(__q, 0));
33802 }
33803
33804 void
33805 _M_initialize(size_type __n)
33806 {
33807 _Bit_type* __q = this->_M_allocate(__n);
33808 this->_M_impl._M_end_of_storage = (__q
33809 + ((__n + int(_S_word_bit) - 1)
33810 / int(_S_word_bit)));
33811 this->_M_impl._M_start = iterator(__q, 0);
33812 this->_M_impl._M_finish = this->_M_impl._M_start + difference_type(__n);
33813 }
33814
33815
33816 template<class _Integer>
33817 void
33818 _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
33819 {
33820 _M_initialize(__n);
33821 std::fill(this->_M_impl._M_start._M_p,
33822 this->_M_impl._M_end_of_storage, __x ? ~0 : 0);
33823 }
33824
33825 template<class _InputIterator>
33826 void
33827 _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
33828 __false_type)
33829 { _M_initialize_range(__first, __last,
33830 std::__iterator_category(__first)); }
33831
33832 template<class _InputIterator>
33833 void
33834 _M_initialize_range(_InputIterator __first, _InputIterator __last,
33835 std::input_iterator_tag)
33836 {
33837 for (; __first != __last; ++__first)
33838 push_back(*__first);
33839 }
33840
33841 template<class _ForwardIterator>
33842 void
33843 _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last,
33844 std::forward_iterator_tag)
33845 {
33846 const size_type __n = std::distance(__first, __last);
33847 _M_initialize(__n);
33848 std::copy(__first, __last, this->_M_impl._M_start);
33849 }
33850
33851 template<class _Integer>
33852 void
33853 _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
33854 { _M_fill_assign((size_t) __n, (bool) __val); }
33855
33856 template<class _InputIterator>
33857 void
33858 _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
33859 __false_type)
33860 { _M_assign_aux(__first, __last, std::__iterator_category(__first)); }
33861
33862 void
33863 _M_fill_assign(size_t __n, bool __x)
33864 {
33865 if (__n > size())
33866 {
33867 std::fill(this->_M_impl._M_start._M_p,
33868 this->_M_impl._M_end_of_storage, __x ? ~0 : 0);
33869 insert(end(), __n - size(), __x);
33870 }
33871 else
33872 {
33873 _M_erase_at_end(begin() + __n);
33874 std::fill(this->_M_impl._M_start._M_p,
33875 this->_M_impl._M_end_of_storage, __x ? ~0 : 0);
33876 }
33877 }
33878
33879 template<class _InputIterator>
33880 void
33881 _M_assign_aux(_InputIterator __first, _InputIterator __last,
33882 std::input_iterator_tag)
33883 {
33884 iterator __cur = begin();
33885 for (; __first != __last && __cur != end(); ++__cur, ++__first)
33886 *__cur = *__first;
33887 if (__first == __last)
33888 _M_erase_at_end(__cur);
33889 else
33890 insert(end(), __first, __last);
33891 }
33892
33893 template<class _ForwardIterator>
33894 void
33895 _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
33896 std::forward_iterator_tag)
33897 {
33898 const size_type __len = std::distance(__first, __last);
33899 if (__len < size())
33900 _M_erase_at_end(std::copy(__first, __last, begin()));
33901 else
33902 {
33903 _ForwardIterator __mid = __first;
33904 std::advance(__mid, size());
33905 std::copy(__first, __mid, begin());
33906 insert(end(), __mid, __last);
33907 }
33908 }
33909
33910
33911 template<class _Integer>
33912 void
33913 _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x,
33914 __true_type)
33915 { _M_fill_insert(__pos, __n, __x); }
33916
33917 template<class _InputIterator>
33918 void
33919 _M_insert_dispatch(iterator __pos,
33920 _InputIterator __first, _InputIterator __last,
33921 __false_type)
33922 { _M_insert_range(__pos, __first, __last,
33923 std::__iterator_category(__first)); }
33924
33925 void
33926 _M_fill_insert(iterator __position, size_type __n, bool __x)
33927 {
33928 if (__n == 0)
33929 return;
33930 if (capacity() - size() >= __n)
33931 {
33932 std::copy_backward(__position, end(),
33933 this->_M_impl._M_finish + difference_type(__n));
33934 std::fill(__position, __position + difference_type(__n), __x);
33935 this->_M_impl._M_finish += difference_type(__n);
33936 }
33937 else
33938 {
33939 const size_type __len = size() + std::max(size(), __n);
33940 _Bit_type * __q = this->_M_allocate(__len);
33941 iterator __i = _M_copy_aligned(begin(), __position,
33942 iterator(__q, 0));
33943 std::fill(__i, __i + difference_type(__n), __x);
33944 this->_M_impl._M_finish = std::copy(__position, end(),
33945 __i + difference_type(__n));
33946 this->_M_deallocate();
33947 this->_M_impl._M_end_of_storage = (__q + ((__len
33948 + int(_S_word_bit) - 1)
33949 / int(_S_word_bit)));
33950 this->_M_impl._M_start = iterator(__q, 0);
33951 }
33952 }
33953
33954 template<class _InputIterator>
33955 void
33956 _M_insert_range(iterator __pos, _InputIterator __first,
33957 _InputIterator __last, std::input_iterator_tag)
33958 {
33959 for (; __first != __last; ++__first)
33960 {
33961 __pos = insert(__pos, *__first);
33962 ++__pos;
33963 }
33964 }
33965
33966 template<class _ForwardIterator>
33967 void
33968 _M_insert_range(iterator __position, _ForwardIterator __first,
33969 _ForwardIterator __last, std::forward_iterator_tag)
33970 {
33971 if (__first != __last)
33972 {
33973 size_type __n = std::distance(__first, __last);
33974 if (capacity() - size() >= __n)
33975 {
33976 std::copy_backward(__position, end(),
33977 this->_M_impl._M_finish
33978 + difference_type(__n));
33979 std::copy(__first, __last, __position);
33980 this->_M_impl._M_finish += difference_type(__n);
33981 }
33982 else
33983 {
33984 const size_type __len = size() + std::max(size(), __n);
33985 _Bit_type * __q = this->_M_allocate(__len);
33986 iterator __i = _M_copy_aligned(begin(), __position,
33987 iterator(__q, 0));
33988 __i = std::copy(__first, __last, __i);
33989 this->_M_impl._M_finish = std::copy(__position, end(), __i);
33990 this->_M_deallocate();
33991 this->_M_impl._M_end_of_storage = (__q
33992 + ((__len
33993 + int(_S_word_bit) - 1)
33994 / int(_S_word_bit)));
33995 this->_M_impl._M_start = iterator(__q, 0);
33996 }
33997 }
33998 }
33999
34000 void
34001 _M_insert_aux(iterator __position, bool __x)
34002 {
34003 if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage)
34004 {
34005 std::copy_backward(__position, this->_M_impl._M_finish,
34006 this->_M_impl._M_finish + 1);
34007 *__position = __x;
34008 ++this->_M_impl._M_finish;
34009 }
34010 else
34011 {
34012 const size_type __len = size() ? 2 * size()
34013 : static_cast<size_type>(_S_word_bit);
34014 _Bit_type * __q = this->_M_allocate(__len);
34015 iterator __i = _M_copy_aligned(begin(), __position,
34016 iterator(__q, 0));
34017 *__i++ = __x;
34018 this->_M_impl._M_finish = std::copy(__position, end(), __i);
34019 this->_M_deallocate();
34020 this->_M_impl._M_end_of_storage = (__q + ((__len
34021 + int(_S_word_bit) - 1)
34022 / int(_S_word_bit)));
34023 this->_M_impl._M_start = iterator(__q, 0);
34024 }
34025 }
34026
34027 void
34028 _M_erase_at_end(iterator __pos)
34029 { this->_M_impl._M_finish = __pos; }
34030 };
34031
34032 }
34033 # 72 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/vector" 2 3
34034
34035
34036 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/vector.tcc" 1 3
34037 # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/vector.tcc" 3
34038 namespace std __attribute__ ((__visibility__ ("default"))) {
34039
34040 template<typename _Tp, typename _Alloc>
34041 void
34042 vector<_Tp, _Alloc>::
34043 reserve(size_type __n)
34044 {
34045 if (__n > this->max_size())
34046 __throw_length_error(("vector::reserve"));
34047 if (this->capacity() < __n)
34048 {
34049 const size_type __old_size = size();
34050 pointer __tmp = _M_allocate_and_copy(__n, this->_M_impl._M_start,
34051 this->_M_impl._M_finish);
34052 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
34053 _M_get_Tp_allocator());
34054 _M_deallocate(this->_M_impl._M_start,
34055 this->_M_impl._M_end_of_storage
34056 - this->_M_impl._M_start);
34057 this->_M_impl._M_start = __tmp;
34058 this->_M_impl._M_finish = __tmp + __old_size;
34059 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
34060 }
34061 }
34062
34063 template<typename _Tp, typename _Alloc>
34064 typename vector<_Tp, _Alloc>::iterator
34065 vector<_Tp, _Alloc>::
34066 insert(iterator __position, const value_type& __x)
34067 {
34068 const size_type __n = __position - begin();
34069 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage
34070 && __position == end())
34071 {
34072 this->_M_impl.construct(this->_M_impl._M_finish, __x);
34073 ++this->_M_impl._M_finish;
34074 }
34075 else
34076 _M_insert_aux(__position, __x);
34077 return iterator(this->_M_impl._M_start + __n);
34078 }
34079
34080 template<typename _Tp, typename _Alloc>
34081 typename vector<_Tp, _Alloc>::iterator
34082 vector<_Tp, _Alloc>::
34083 erase(iterator __position)
34084 {
34085 if (__position + 1 != end())
34086 std::copy(__position + 1, end(), __position);
34087 --this->_M_impl._M_finish;
34088 this->_M_impl.destroy(this->_M_impl._M_finish);
34089 return __position;
34090 }
34091
34092 template<typename _Tp, typename _Alloc>
34093 typename vector<_Tp, _Alloc>::iterator
34094 vector<_Tp, _Alloc>::
34095 erase(iterator __first, iterator __last)
34096 {
34097 if (__last != end())
34098 std::copy(__last, end(), __first);
34099 _M_erase_at_end(__first.base() + (end() - __last));
34100 return __first;
34101 }
34102
34103 template<typename _Tp, typename _Alloc>
34104 vector<_Tp, _Alloc>&
34105 vector<_Tp, _Alloc>::
34106 operator=(const vector<_Tp, _Alloc>& __x)
34107 {
34108 if (&__x != this)
34109 {
34110 const size_type __xlen = __x.size();
34111 if (__xlen > capacity())
34112 {
34113 pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(),
34114 __x.end());
34115 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
34116 _M_get_Tp_allocator());
34117 _M_deallocate(this->_M_impl._M_start,
34118 this->_M_impl._M_end_of_storage
34119 - this->_M_impl._M_start);
34120 this->_M_impl._M_start = __tmp;
34121 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen;
34122 }
34123 else if (size() >= __xlen)
34124 {
34125 std::_Destroy(std::copy(__x.begin(), __x.end(), begin()),
34126 end(), _M_get_Tp_allocator());
34127 }
34128 else
34129 {
34130 std::copy(__x._M_impl._M_start, __x._M_impl._M_start + size(),
34131 this->_M_impl._M_start);
34132 std::__uninitialized_copy_a(__x._M_impl._M_start + size(),
34133 __x._M_impl._M_finish,
34134 this->_M_impl._M_finish,
34135 _M_get_Tp_allocator());
34136 }
34137 this->_M_impl._M_finish = this->_M_impl._M_start + __xlen;
34138 }
34139 return *this;
34140 }
34141
34142 template<typename _Tp, typename _Alloc>
34143 void
34144 vector<_Tp, _Alloc>::
34145 _M_fill_assign(size_t __n, const value_type& __val)
34146 {
34147 if (__n > capacity())
34148 {
34149 vector __tmp(__n, __val, _M_get_Tp_allocator());
34150 __tmp.swap(*this);
34151 }
34152 else if (__n > size())
34153 {
34154 std::fill(begin(), end(), __val);
34155 std::__uninitialized_fill_n_a(this->_M_impl._M_finish,
34156 __n - size(), __val,
34157 _M_get_Tp_allocator());
34158 this->_M_impl._M_finish += __n - size();
34159 }
34160 else
34161 _M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val));
34162 }
34163
34164 template<typename _Tp, typename _Alloc>
34165 template<typename _InputIterator>
34166 void
34167 vector<_Tp, _Alloc>::
34168 _M_assign_aux(_InputIterator __first, _InputIterator __last,
34169 std::input_iterator_tag)
34170 {
34171 pointer __cur(this->_M_impl._M_start);
34172 for (; __first != __last && __cur != this->_M_impl._M_finish;
34173 ++__cur, ++__first)
34174 *__cur = *__first;
34175 if (__first == __last)
34176 _M_erase_at_end(__cur);
34177 else
34178 insert(end(), __first, __last);
34179 }
34180
34181 template<typename _Tp, typename _Alloc>
34182 template<typename _ForwardIterator>
34183 void
34184 vector<_Tp, _Alloc>::
34185 _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
34186 std::forward_iterator_tag)
34187 {
34188 const size_type __len = std::distance(__first, __last);
34189
34190 if (__len > capacity())
34191 {
34192 pointer __tmp(_M_allocate_and_copy(__len, __first, __last));
34193 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
34194 _M_get_Tp_allocator());
34195 _M_deallocate(this->_M_impl._M_start,
34196 this->_M_impl._M_end_of_storage
34197 - this->_M_impl._M_start);
34198 this->_M_impl._M_start = __tmp;
34199 this->_M_impl._M_finish = this->_M_impl._M_start + __len;
34200 this->_M_impl._M_end_of_storage = this->_M_impl._M_finish;
34201 }
34202 else if (size() >= __len)
34203 _M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start));
34204 else
34205 {
34206 _ForwardIterator __mid = __first;
34207 std::advance(__mid, size());
34208 std::copy(__first, __mid, this->_M_impl._M_start);
34209 this->_M_impl._M_finish =
34210 std::__uninitialized_copy_a(__mid, __last,
34211 this->_M_impl._M_finish,
34212 _M_get_Tp_allocator());
34213 }
34214 }
34215
34216 template<typename _Tp, typename _Alloc>
34217 void
34218 vector<_Tp, _Alloc>::
34219 _M_insert_aux(iterator __position, const _Tp& __x)
34220 {
34221 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
34222 {
34223 this->_M_impl.construct(this->_M_impl._M_finish,
34224 *(this->_M_impl._M_finish - 1));
34225 ++this->_M_impl._M_finish;
34226 _Tp __x_copy = __x;
34227 std::copy_backward(__position.base(),
34228 this->_M_impl._M_finish - 2,
34229 this->_M_impl._M_finish - 1);
34230 *__position = __x_copy;
34231 }
34232 else
34233 {
34234 const size_type __old_size = size();
34235 if (__old_size == this->max_size())
34236 __throw_length_error(("vector::_M_insert_aux"));
34237
34238
34239
34240
34241 size_type __len = __old_size != 0 ? 2 * __old_size : 1;
34242 if (__len < __old_size)
34243 __len = this->max_size();
34244
34245 pointer __new_start(this->_M_allocate(__len));
34246 pointer __new_finish(__new_start);
34247 try
34248 {
34249 __new_finish =
34250 std::__uninitialized_copy_a(this->_M_impl._M_start,
34251 __position.base(), __new_start,
34252 _M_get_Tp_allocator());
34253 this->_M_impl.construct(__new_finish, __x);
34254 ++__new_finish;
34255 __new_finish =
34256 std::__uninitialized_copy_a(__position.base(),
34257 this->_M_impl._M_finish,
34258 __new_finish,
34259 _M_get_Tp_allocator());
34260 }
34261 catch(...)
34262 {
34263 std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator());
34264 _M_deallocate(__new_start, __len);
34265 throw;
34266 }
34267 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
34268 _M_get_Tp_allocator());
34269 _M_deallocate(this->_M_impl._M_start,
34270 this->_M_impl._M_end_of_storage
34271 - this->_M_impl._M_start);
34272 this->_M_impl._M_start = __new_start;
34273 this->_M_impl._M_finish = __new_finish;
34274 this->_M_impl._M_end_of_storage = __new_start + __len;
34275 }
34276 }
34277
34278 template<typename _Tp, typename _Alloc>
34279 void
34280 vector<_Tp, _Alloc>::
34281 _M_fill_insert(iterator __position, size_type __n, const value_type& __x)
34282 {
34283 if (__n != 0)
34284 {
34285 if (size_type(this->_M_impl._M_end_of_storage
34286 - this->_M_impl._M_finish) >= __n)
34287 {
34288 value_type __x_copy = __x;
34289 const size_type __elems_after = end() - __position;
34290 pointer __old_finish(this->_M_impl._M_finish);
34291 if (__elems_after > __n)
34292 {
34293 std::__uninitialized_copy_a(this->_M_impl._M_finish - __n,
34294 this->_M_impl._M_finish,
34295 this->_M_impl._M_finish,
34296 _M_get_Tp_allocator());
34297 this->_M_impl._M_finish += __n;
34298 std::copy_backward(__position.base(), __old_finish - __n,
34299 __old_finish);
34300 std::fill(__position.base(), __position.base() + __n,
34301 __x_copy);
34302 }
34303 else
34304 {
34305 std::__uninitialized_fill_n_a(this->_M_impl._M_finish,
34306 __n - __elems_after,
34307 __x_copy,
34308 _M_get_Tp_allocator());
34309 this->_M_impl._M_finish += __n - __elems_after;
34310 std::__uninitialized_copy_a(__position.base(), __old_finish,
34311 this->_M_impl._M_finish,
34312 _M_get_Tp_allocator());
34313 this->_M_impl._M_finish += __elems_after;
34314 std::fill(__position.base(), __old_finish, __x_copy);
34315 }
34316 }
34317 else
34318 {
34319 const size_type __old_size = size();
34320 if (this->max_size() - __old_size < __n)
34321 __throw_length_error(("vector::_M_fill_insert"));
34322
34323
34324 size_type __len = __old_size + std::max(__old_size, __n);
34325 if (__len < __old_size)
34326 __len = this->max_size();
34327
34328 pointer __new_start(this->_M_allocate(__len));
34329 pointer __new_finish(__new_start);
34330 try
34331 {
34332 __new_finish =
34333 std::__uninitialized_copy_a(this->_M_impl._M_start,
34334 __position.base(),
34335 __new_start,
34336 _M_get_Tp_allocator());
34337 std::__uninitialized_fill_n_a(__new_finish, __n, __x,
34338 _M_get_Tp_allocator());
34339 __new_finish += __n;
34340 __new_finish =
34341 std::__uninitialized_copy_a(__position.base(),
34342 this->_M_impl._M_finish,
34343 __new_finish,
34344 _M_get_Tp_allocator());
34345 }
34346 catch(...)
34347 {
34348 std::_Destroy(__new_start, __new_finish,
34349 _M_get_Tp_allocator());
34350 _M_deallocate(__new_start, __len);
34351 throw;
34352 }
34353 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
34354 _M_get_Tp_allocator());
34355 _M_deallocate(this->_M_impl._M_start,
34356 this->_M_impl._M_end_of_storage
34357 - this->_M_impl._M_start);
34358 this->_M_impl._M_start = __new_start;
34359 this->_M_impl._M_finish = __new_finish;
34360 this->_M_impl._M_end_of_storage = __new_start + __len;
34361 }
34362 }
34363 }
34364
34365 template<typename _Tp, typename _Alloc> template<typename _InputIterator>
34366 void
34367 vector<_Tp, _Alloc>::
34368 _M_range_insert(iterator __pos, _InputIterator __first,
34369 _InputIterator __last, std::input_iterator_tag)
34370 {
34371 for (; __first != __last; ++__first)
34372 {
34373 __pos = insert(__pos, *__first);
34374 ++__pos;
34375 }
34376 }
34377
34378 template<typename _Tp, typename _Alloc>
34379 template<typename _ForwardIterator>
34380 void
34381 vector<_Tp, _Alloc>::
34382 _M_range_insert(iterator __position, _ForwardIterator __first,
34383 _ForwardIterator __last, std::forward_iterator_tag)
34384 {
34385 if (__first != __last)
34386 {
34387 const size_type __n = std::distance(__first, __last);
34388 if (size_type(this->_M_impl._M_end_of_storage
34389 - this->_M_impl._M_finish) >= __n)
34390 {
34391 const size_type __elems_after = end() - __position;
34392 pointer __old_finish(this->_M_impl._M_finish);
34393 if (__elems_after > __n)
34394 {
34395 std::__uninitialized_copy_a(this->_M_impl._M_finish - __n,
34396 this->_M_impl._M_finish,
34397 this->_M_impl._M_finish,
34398 _M_get_Tp_allocator());
34399 this->_M_impl._M_finish += __n;
34400 std::copy_backward(__position.base(), __old_finish - __n,
34401 __old_finish);
34402 std::copy(__first, __last, __position);
34403 }
34404 else
34405 {
34406 _ForwardIterator __mid = __first;
34407 std::advance(__mid, __elems_after);
34408 std::__uninitialized_copy_a(__mid, __last,
34409 this->_M_impl._M_finish,
34410 _M_get_Tp_allocator());
34411 this->_M_impl._M_finish += __n - __elems_after;
34412 std::__uninitialized_copy_a(__position.base(),
34413 __old_finish,
34414 this->_M_impl._M_finish,
34415 _M_get_Tp_allocator());
34416 this->_M_impl._M_finish += __elems_after;
34417 std::copy(__first, __mid, __position);
34418 }
34419 }
34420 else
34421 {
34422 const size_type __old_size = size();
34423 if (this->max_size() - __old_size < __n)
34424 __throw_length_error(("vector::_M_range_insert"));
34425
34426
34427 size_type __len = __old_size + std::max(__old_size, __n);
34428 if (__len < __old_size)
34429 __len = this->max_size();
34430
34431 pointer __new_start(this->_M_allocate(__len));
34432 pointer __new_finish(__new_start);
34433 try
34434 {
34435 __new_finish =
34436 std::__uninitialized_copy_a(this->_M_impl._M_start,
34437 __position.base(),
34438 __new_start,
34439 _M_get_Tp_allocator());
34440 __new_finish =
34441 std::__uninitialized_copy_a(__first, __last, __new_finish,
34442 _M_get_Tp_allocator());
34443 __new_finish =
34444 std::__uninitialized_copy_a(__position.base(),
34445 this->_M_impl._M_finish,
34446 __new_finish,
34447 _M_get_Tp_allocator());
34448 }
34449 catch(...)
34450 {
34451 std::_Destroy(__new_start, __new_finish,
34452 _M_get_Tp_allocator());
34453 _M_deallocate(__new_start, __len);
34454 throw;
34455 }
34456 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
34457 _M_get_Tp_allocator());
34458 _M_deallocate(this->_M_impl._M_start,
34459 this->_M_impl._M_end_of_storage
34460 - this->_M_impl._M_start);
34461 this->_M_impl._M_start = __new_start;
34462 this->_M_impl._M_finish = __new_finish;
34463 this->_M_impl._M_end_of_storage = __new_start + __len;
34464 }
34465 }
34466 }
34467
34468 }
34469 # 75 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/vector" 2 3
34470 # 51 "enblend.cc" 2
34471
34472
34473 # 1 "/usr/include/getopt.h" 1 3 4
34474 # 50 "/usr/include/getopt.h" 3 4
34475 extern "C" {
34476 # 59 "/usr/include/getopt.h" 3 4
34477 extern char *optarg;
34478 # 73 "/usr/include/getopt.h" 3 4
34479 extern int optind;
34480
34481
34482
34483
34484 extern int opterr;
34485
34486
34487
34488 extern int optopt;
34489 # 106 "/usr/include/getopt.h" 3 4
34490 struct option
34491 {
34492 const char *name;
34493
34494
34495 int has_arg;
34496 int *flag;
34497 int val;
34498 };
34499 # 152 "/usr/include/getopt.h" 3 4
34500 extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
34501 throw ();
34502
34503
34504
34505
34506
34507 extern int getopt_long (int ___argc, char *const *___argv,
34508 const char *__shortopts,
34509 const struct option *__longopts, int *__longind)
34510 throw ();
34511 extern int getopt_long_only (int ___argc, char *const *___argv,
34512 const char *__shortopts,
34513 const struct option *__longopts, int *__longind)
34514 throw ();
34515
34516
34517
34518
34519 }
34520 # 54 "enblend.cc" 2
34521
34522
34523
34524
34525
34526
34527
34528 extern "C" char *optarg;
34529 extern "C" int optind;
34530
34531
34532 # 1 "/usr/include/fenv.h" 1 3 4
34533 # 58 "/usr/include/fenv.h" 3 4
34534 # 1 "/usr/include/bits/fenv.h" 1 3 4
34535 # 26 "/usr/include/bits/fenv.h" 3 4
34536 enum
34537 {
34538 FE_INEXACT = 1 << (31 - 6),
34539
34540 FE_DIVBYZERO = 1 << (31 - 5),
34541
34542 FE_UNDERFLOW = 1 << (31 - 4),
34543
34544 FE_OVERFLOW = 1 << (31 - 3),
34545 # 43 "/usr/include/bits/fenv.h" 3 4
34546 FE_INVALID = 1 << (31 - 2),
34547 # 54 "/usr/include/bits/fenv.h" 3 4
34548 FE_INVALID_SNAN = 1 << (31 - 7),
34549
34550
34551
34552 FE_INVALID_ISI = 1 << (31 - 8),
34553
34554
34555
34556 FE_INVALID_IDI = 1 << (31 - 9),
34557
34558
34559
34560 FE_INVALID_ZDZ = 1 << (31 - 10),
34561
34562
34563
34564 FE_INVALID_IMZ = 1 << (31 - 11),
34565
34566
34567
34568 FE_INVALID_COMPARE = 1 << (31 - 12),
34569
34570
34571
34572
34573
34574 FE_INVALID_SOFTWARE = 1 << (31 - 21),
34575
34576
34577
34578
34579 FE_INVALID_SQRT = 1 << (31 - 22),
34580
34581
34582
34583 FE_INVALID_INTEGER_CONVERSION = 1 << (31 - 23)
34584
34585
34586
34587
34588
34589
34590
34591 };
34592
34593
34594
34595
34596
34597
34598
34599 enum
34600 {
34601 FE_TONEAREST = 0,
34602
34603 FE_TOWARDZERO = 1,
34604
34605 FE_UPWARD = 2,
34606
34607 FE_DOWNWARD = 3
34608
34609 };
34610
34611
34612 typedef unsigned int fexcept_t;
34613
34614
34615
34616 typedef double fenv_t;
34617
34618
34619 extern const fenv_t __fe_dfl_env;
34620
34621
34622
34623
34624
34625 extern const fenv_t __fe_enabled_env;
34626
34627
34628
34629
34630 extern const fenv_t __fe_nonieee_env;
34631 # 145 "/usr/include/bits/fenv.h" 3 4
34632 extern const fenv_t *__fe_nomask_env (void);
34633
34634
34635
34636
34637
34638
34639
34640 extern const fenv_t *__fe_mask_env (void);
34641 # 59 "/usr/include/fenv.h" 2 3 4
34642
34643 extern "C" {
34644
34645
34646
34647
34648 extern int feclearexcept (int __excepts) throw ();
34649
34650
34651
34652 extern int fegetexceptflag (fexcept_t *__flagp, int __excepts) throw ();
34653
34654
34655 extern int feraiseexcept (int __excepts) throw ();
34656
34657
34658
34659 extern int fesetexceptflag (__const fexcept_t *__flagp, int __excepts) throw ();
34660
34661
34662
34663 extern int fetestexcept (int __excepts) throw ();
34664
34665
34666
34667
34668
34669 extern int fegetround (void) throw ();
34670
34671
34672 extern int fesetround (int __rounding_direction) throw ();
34673
34674
34675
34676
34677
34678
34679 extern int fegetenv (fenv_t *__envp) throw ();
34680
34681
34682
34683
34684 extern int feholdexcept (fenv_t *__envp) throw ();
34685
34686
34687
34688 extern int fesetenv (__const fenv_t *__envp) throw ();
34689
34690
34691
34692
34693 extern int feupdateenv (__const fenv_t *__envp) throw ();
34694
34695
34696
34697
34698 # 1 "/usr/include/bits/fenvinline.h" 1 3 4
34699 # 116 "/usr/include/fenv.h" 2 3 4
34700
34701
34702
34703
34704
34705
34706
34707 extern int feenableexcept (int __excepts) throw ();
34708
34709
34710
34711
34712 extern int fedisableexcept (int __excepts) throw ();
34713
34714
34715 extern int fegetexcept (void) throw ();
34716
34717
34718 }
34719 # 66 "enblend.cc" 2
34720
34721
34722 # 1 "/usr/include/signal.h" 1 3 4
34723 # 31 "/usr/include/signal.h" 3 4
34724 extern "C" {
34725
34726 # 1 "/usr/include/bits/sigset.h" 1 3 4
34727 # 104 "/usr/include/bits/sigset.h" 3 4
34728 extern int __sigismember (__const __sigset_t *, int);
34729 extern int __sigaddset (__sigset_t *, int);
34730 extern int __sigdelset (__sigset_t *, int);
34731 # 118 "/usr/include/bits/sigset.h" 3 4
34732 extern __inline int __sigismember (__const __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return (__set->__val[__word] & __mask) ? 1 : 0; }
34733 extern __inline int __sigaddset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] |= __mask), 0); }
34734 extern __inline int __sigdelset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] &= ~__mask), 0); }
34735 # 34 "/usr/include/signal.h" 2 3 4
34736
34737
34738
34739
34740
34741
34742
34743 typedef __sig_atomic_t sig_atomic_t;
34744
34745 # 58 "/usr/include/signal.h" 3 4
34746 # 1 "/usr/include/bits/signum.h" 1 3 4
34747 # 59 "/usr/include/signal.h" 2 3 4
34748 # 75 "/usr/include/signal.h" 3 4
34749 typedef void (*__sighandler_t) (int);
34750
34751
34752
34753
34754 extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler)
34755 throw ();
34756
34757 extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler)
34758 throw ();
34759
34760
34761
34762
34763
34764
34765
34766 extern __sighandler_t signal (int __sig, __sighandler_t __handler)
34767 throw ();
34768 # 104 "/usr/include/signal.h" 3 4
34769
34770
34771
34772
34773
34774 extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler)
34775 throw ();
34776
34777
34778
34779
34780
34781
34782 extern int kill (__pid_t __pid, int __sig) throw ();
34783
34784
34785
34786
34787
34788
34789 extern int killpg (__pid_t __pgrp, int __sig) throw ();
34790
34791
34792
34793
34794 extern int raise (int __sig) throw ();
34795
34796
34797
34798
34799 extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)
34800 throw ();
34801 extern int gsignal (int __sig) throw ();
34802
34803
34804
34805
34806 extern void psignal (int __sig, __const char *__s);
34807 # 153 "/usr/include/signal.h" 3 4
34808 extern int __sigpause (int __sig_or_mask, int __is_sig);
34809 # 162 "/usr/include/signal.h" 3 4
34810 extern int sigpause (int __sig) __asm__ ("__xpg_sigpause");
34811 # 181 "/usr/include/signal.h" 3 4
34812 extern int sigblock (int __mask) throw () __attribute__ ((__deprecated__));
34813
34814
34815 extern int sigsetmask (int __mask) throw () __attribute__ ((__deprecated__));
34816
34817
34818 extern int siggetmask (void) throw () __attribute__ ((__deprecated__));
34819 # 196 "/usr/include/signal.h" 3 4
34820 typedef __sighandler_t sighandler_t;
34821
34822
34823
34824
34825 typedef __sighandler_t sig_t;
34826 # 212 "/usr/include/signal.h" 3 4
34827 # 1 "/usr/include/bits/siginfo.h" 1 3 4
34828 # 25 "/usr/include/bits/siginfo.h" 3 4
34829 # 1 "/usr/include/bits/wordsize.h" 1 3 4
34830 # 26 "/usr/include/bits/siginfo.h" 2 3 4
34831
34832
34833
34834
34835
34836
34837
34838 typedef union sigval
34839 {
34840 int sival_int;
34841 void *sival_ptr;
34842 } sigval_t;
34843 # 51 "/usr/include/bits/siginfo.h" 3 4
34844 typedef struct siginfo
34845 {
34846 int si_signo;
34847 int si_errno;
34848
34849 int si_code;
34850
34851 union
34852 {
34853 int _pad[((128 / sizeof (int)) - 3)];
34854
34855
34856 struct
34857 {
34858 __pid_t si_pid;
34859 __uid_t si_uid;
34860 } _kill;
34861
34862
34863 struct
34864 {
34865 int si_tid;
34866 int si_overrun;
34867 sigval_t si_sigval;
34868 } _timer;
34869
34870
34871 struct
34872 {
34873 __pid_t si_pid;
34874 __uid_t si_uid;
34875 sigval_t si_sigval;
34876 } _rt;
34877
34878
34879 struct
34880 {
34881 __pid_t si_pid;
34882 __uid_t si_uid;
34883 int si_status;
34884 __clock_t si_utime;
34885 __clock_t si_stime;
34886 } _sigchld;
34887
34888
34889 struct
34890 {
34891 void *si_addr;
34892 } _sigfault;
34893
34894
34895 struct
34896 {
34897 long int si_band;
34898 int si_fd;
34899 } _sigpoll;
34900 } _sifields;
34901 } siginfo_t;
34902 # 129 "/usr/include/bits/siginfo.h" 3 4
34903 enum
34904 {
34905 SI_ASYNCNL = -60,
34906
34907 SI_TKILL = -6,
34908
34909 SI_SIGIO,
34910
34911 SI_ASYNCIO,
34912
34913 SI_MESGQ,
34914
34915 SI_TIMER,
34916
34917 SI_QUEUE,
34918
34919 SI_USER,
34920
34921 SI_KERNEL = 0x80
34922
34923 };
34924
34925
34926
34927 enum
34928 {
34929 ILL_ILLOPC = 1,
34930
34931 ILL_ILLOPN,
34932
34933 ILL_ILLADR,
34934
34935 ILL_ILLTRP,
34936
34937 ILL_PRVOPC,
34938
34939 ILL_PRVREG,
34940
34941 ILL_COPROC,
34942
34943 ILL_BADSTK
34944
34945 };
34946
34947
34948 enum
34949 {
34950 FPE_INTDIV = 1,
34951
34952 FPE_INTOVF,
34953
34954 FPE_FLTDIV,
34955
34956 FPE_FLTOVF,
34957
34958 FPE_FLTUND,
34959
34960 FPE_FLTRES,
34961
34962 FPE_FLTINV,
34963
34964 FPE_FLTSUB
34965
34966 };
34967
34968
34969 enum
34970 {
34971 SEGV_MAPERR = 1,
34972
34973 SEGV_ACCERR
34974
34975 };
34976
34977
34978 enum
34979 {
34980 BUS_ADRALN = 1,
34981
34982 BUS_ADRERR,
34983
34984 BUS_OBJERR
34985
34986 };
34987
34988
34989 enum
34990 {
34991 TRAP_BRKPT = 1,
34992
34993 TRAP_TRACE
34994
34995 };
34996
34997
34998 enum
34999 {
35000 CLD_EXITED = 1,
35001
35002 CLD_KILLED,
35003
35004 CLD_DUMPED,
35005
35006 CLD_TRAPPED,
35007
35008 CLD_STOPPED,
35009
35010 CLD_CONTINUED
35011
35012 };
35013
35014
35015 enum
35016 {
35017 POLL_IN = 1,
35018
35019 POLL_OUT,
35020
35021 POLL_MSG,
35022
35023 POLL_ERR,
35024
35025 POLL_PRI,
35026
35027 POLL_HUP
35028
35029 };
35030 # 273 "/usr/include/bits/siginfo.h" 3 4
35031 typedef struct sigevent
35032 {
35033 sigval_t sigev_value;
35034 int sigev_signo;
35035 int sigev_notify;
35036
35037 union
35038 {
35039 int _pad[((64 / sizeof (int)) - 3)];
35040
35041
35042
35043 __pid_t _tid;
35044
35045 struct
35046 {
35047 void (*_function) (sigval_t);
35048 void *_attribute;
35049 } _sigev_thread;
35050 } _sigev_un;
35051 } sigevent_t;
35052
35053
35054
35055
35056
35057
35058 enum
35059 {
35060 SIGEV_SIGNAL = 0,
35061
35062 SIGEV_NONE,
35063
35064 SIGEV_THREAD,
35065
35066
35067 SIGEV_THREAD_ID = 4
35068
35069 };
35070 # 213 "/usr/include/signal.h" 2 3 4
35071
35072
35073
35074 extern int sigemptyset (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1)));
35075
35076
35077 extern int sigfillset (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1)));
35078
35079
35080 extern int sigaddset (sigset_t *__set, int __signo) throw () __attribute__ ((__nonnull__ (1)));
35081
35082
35083 extern int sigdelset (sigset_t *__set, int __signo) throw () __attribute__ ((__nonnull__ (1)));
35084
35085
35086 extern int sigismember (__const sigset_t *__set, int __signo)
35087 throw () __attribute__ ((__nonnull__ (1)));
35088
35089
35090
35091 extern int sigisemptyset (__const sigset_t *__set) throw () __attribute__ ((__nonnull__ (1)));
35092
35093
35094 extern int sigandset (sigset_t *__set, __const sigset_t *__left,
35095 __const sigset_t *__right) throw () __attribute__ ((__nonnull__ (1, 2, 3)));
35096
35097
35098 extern int sigorset (sigset_t *__set, __const sigset_t *__left,
35099 __const sigset_t *__right) throw () __attribute__ ((__nonnull__ (1, 2, 3)));
35100
35101
35102
35103
35104 # 1 "/usr/include/bits/sigaction.h" 1 3 4
35105 # 25 "/usr/include/bits/sigaction.h" 3 4
35106 struct sigaction
35107 {
35108
35109
35110 union
35111 {
35112
35113 __sighandler_t sa_handler;
35114
35115 void (*sa_sigaction) (int, siginfo_t *, void *);
35116 }
35117 __sigaction_handler;
35118
35119
35120
35121
35122
35123
35124
35125 __sigset_t sa_mask;
35126
35127
35128 int sa_flags;
35129
35130
35131 void (*sa_restorer) (void);
35132 };
35133 # 247 "/usr/include/signal.h" 2 3 4
35134
35135
35136 extern int sigprocmask (int __how, __const sigset_t *__restrict __set,
35137 sigset_t *__restrict __oset) throw ();
35138
35139
35140
35141
35142
35143
35144 extern int sigsuspend (__const sigset_t *__set) __attribute__ ((__nonnull__ (1)));
35145
35146
35147 extern int sigaction (int __sig, __const struct sigaction *__restrict __act,
35148 struct sigaction *__restrict __oact) throw ();
35149
35150
35151 extern int sigpending (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1)));
35152
35153
35154
35155
35156
35157
35158 extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig)
35159 __attribute__ ((__nonnull__ (1, 2)));
35160
35161
35162
35163
35164
35165
35166 extern int sigwaitinfo (__const sigset_t *__restrict __set,
35167 siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1)));
35168
35169
35170
35171
35172
35173
35174 extern int sigtimedwait (__const sigset_t *__restrict __set,
35175 siginfo_t *__restrict __info,
35176 __const struct timespec *__restrict __timeout)
35177 __attribute__ ((__nonnull__ (1)));
35178
35179
35180
35181 extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val)
35182 throw ();
35183 # 304 "/usr/include/signal.h" 3 4
35184 extern __const char *__const _sys_siglist[65];
35185 extern __const char *__const sys_siglist[65];
35186
35187
35188 struct sigvec
35189 {
35190 __sighandler_t sv_handler;
35191 int sv_mask;
35192
35193 int sv_flags;
35194
35195 };
35196 # 328 "/usr/include/signal.h" 3 4
35197 extern int sigvec (int __sig, __const struct sigvec *__vec,
35198 struct sigvec *__ovec) throw ();
35199
35200
35201
35202 # 1 "/usr/include/bits/sigcontext.h" 1 3 4
35203 # 28 "/usr/include/bits/sigcontext.h" 3 4
35204 # 1 "/usr/include/asm/sigcontext.h" 1 3 4
35205 # 10 "/usr/include/asm/sigcontext.h" 3 4
35206 # 1 "/usr/include/asm/ptrace.h" 1 3 4
35207 # 29 "/usr/include/asm/ptrace.h" 3 4
35208 struct pt_regs {
35209 unsigned long gpr[32];
35210 unsigned long nip;
35211 unsigned long msr;
35212 unsigned long orig_gpr3;
35213 unsigned long ctr;
35214 unsigned long link;
35215 unsigned long xer;
35216 unsigned long ccr;
35217
35218
35219
35220 unsigned long mq;
35221
35222
35223 unsigned long trap;
35224
35225
35226 unsigned long dar;
35227 unsigned long dsisr;
35228 unsigned long result;
35229 };
35230 # 11 "/usr/include/asm/sigcontext.h" 2 3 4
35231
35232
35233
35234
35235 struct sigcontext {
35236 unsigned long _unused[4];
35237 int signal;
35238
35239
35240
35241 unsigned long handler;
35242 unsigned long oldmask;
35243 struct pt_regs *regs;
35244 # 49 "/usr/include/asm/sigcontext.h" 3 4
35245 };
35246 # 29 "/usr/include/bits/sigcontext.h" 2 3 4
35247 # 334 "/usr/include/signal.h" 2 3 4
35248
35249
35250 extern int sigreturn (struct sigcontext *__scp) throw ();
35251 # 346 "/usr/include/signal.h" 3 4
35252 extern int siginterrupt (int __sig, int __interrupt) throw ();
35253
35254 # 1 "/usr/include/bits/sigstack.h" 1 3 4
35255 # 26 "/usr/include/bits/sigstack.h" 3 4
35256 struct sigstack
35257 {
35258 void *ss_sp;
35259 int ss_onstack;
35260 };
35261
35262
35263
35264 enum
35265 {
35266 SS_ONSTACK = 1,
35267
35268 SS_DISABLE
35269
35270 };
35271 # 50 "/usr/include/bits/sigstack.h" 3 4
35272 typedef struct sigaltstack
35273 {
35274 void *ss_sp;
35275 int ss_flags;
35276 size_t ss_size;
35277 } stack_t;
35278 # 349 "/usr/include/signal.h" 2 3 4
35279
35280
35281 # 1 "/usr/include/sys/ucontext.h" 1 3 4
35282 # 27 "/usr/include/sys/ucontext.h" 3 4
35283 # 1 "/usr/include/bits/sigcontext.h" 1 3 4
35284 # 28 "/usr/include/sys/ucontext.h" 2 3 4
35285
35286
35287
35288
35289
35290
35291
35292 typedef unsigned long gregset_t[48];
35293
35294
35295 typedef struct _libc_fpstate
35296 {
35297 double fpregs[32];
35298 double fpscr;
35299 unsigned int _pad[2];
35300 } fpregset_t;
35301
35302
35303
35304 typedef struct _libc_vrstate
35305 {
35306 unsigned int vrregs[32][4];
35307 unsigned int vrsave;
35308 unsigned int _pad[2];
35309 unsigned int vscr;
35310 } vrregset_t;
35311
35312
35313 typedef struct
35314 {
35315 gregset_t gregs;
35316 fpregset_t fpregs;
35317 vrregset_t vrregs __attribute__((__aligned__(16)));
35318 } mcontext_t;
35319 # 135 "/usr/include/sys/ucontext.h" 3 4
35320 typedef struct ucontext
35321 {
35322 unsigned long int uc_flags;
35323 struct ucontext *uc_link;
35324 stack_t uc_stack;
35325 # 164 "/usr/include/sys/ucontext.h" 3 4
35326 int uc_pad[7];
35327 union uc_regs_ptr {
35328 struct pt_regs *regs;
35329 mcontext_t *uc_regs;
35330 } uc_mcontext;
35331 sigset_t uc_sigmask;
35332 char uc_reg_space[sizeof(mcontext_t) + 12];
35333
35334
35335
35336
35337 } ucontext_t;
35338 # 352 "/usr/include/signal.h" 2 3 4
35339
35340
35341
35342
35343
35344 extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)
35345 throw () __attribute__ ((__deprecated__));
35346
35347
35348
35349 extern int sigaltstack (__const struct sigaltstack *__restrict __ss,
35350 struct sigaltstack *__restrict __oss) throw ();
35351
35352
35353
35354
35355
35356
35357
35358 extern int sighold (int __sig) throw ();
35359
35360
35361 extern int sigrelse (int __sig) throw ();
35362
35363
35364 extern int sigignore (int __sig) throw ();
35365
35366
35367 extern __sighandler_t sigset (int __sig, __sighandler_t __disp) throw ();
35368
35369
35370
35371
35372
35373
35374 # 1 "/usr/include/bits/sigthread.h" 1 3 4
35375 # 31 "/usr/include/bits/sigthread.h" 3 4
35376 extern int pthread_sigmask (int __how,
35377 __const __sigset_t *__restrict __newmask,
35378 __sigset_t *__restrict __oldmask)throw ();
35379
35380
35381 extern int pthread_kill (pthread_t __threadid, int __signo) throw ();
35382 # 388 "/usr/include/signal.h" 2 3 4
35383
35384
35385
35386
35387
35388
35389 extern int __libc_current_sigrtmin (void) throw ();
35390
35391 extern int __libc_current_sigrtmax (void) throw ();
35392
35393
35394
35395 }
35396 # 69 "enblend.cc" 2
35397
35398
35399 # 1 "/usr/include/tiffconf.h" 1 3 4
35400 # 72 "enblend.cc" 2
35401
35402
35403
35404
35405
35406 # 1 "/usr/include/boost/random/mersenne_twister.hpp" 1 3 4
35407 # 21 "/usr/include/boost/random/mersenne_twister.hpp" 3 4
35408 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/stdexcept" 1 3 4
35409 # 41 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/stdexcept" 3 4
35410
35411 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/stdexcept" 3
35412
35413
35414
35415
35416 namespace std __attribute__ ((__visibility__ ("default"))) {
35417
35418
35419
35420
35421
35422
35423 class logic_error : public exception
35424 {
35425 string _M_msg;
35426
35427 public:
35428
35429 explicit
35430 logic_error(const string& __arg);
35431
35432 virtual
35433 ~logic_error() throw();
35434
35435
35436
35437 virtual const char*
35438 what() const throw();
35439 };
35440
35441
35442
35443 class domain_error : public logic_error
35444 {
35445 public:
35446 explicit domain_error(const string& __arg);
35447 };
35448
35449
35450 class invalid_argument : public logic_error
35451 {
35452 public:
35453 explicit invalid_argument(const string& __arg);
35454 };
35455
35456
35457
35458 class length_error : public logic_error
35459 {
35460 public:
35461 explicit length_error(const string& __arg);
35462 };
35463
35464
35465
35466 class out_of_range : public logic_error
35467 {
35468 public:
35469 explicit out_of_range(const string& __arg);
35470 };
35471
35472
35473
35474
35475
35476
35477 class runtime_error : public exception
35478 {
35479 string _M_msg;
35480
35481 public:
35482
35483 explicit
35484 runtime_error(const string& __arg);
35485
35486 virtual
35487 ~runtime_error() throw();
35488
35489
35490
35491 virtual const char*
35492 what() const throw();
35493 };
35494
35495
35496 class range_error : public runtime_error
35497 {
35498 public:
35499 explicit range_error(const string& __arg);
35500 };
35501
35502
35503 class overflow_error : public runtime_error
35504 {
35505 public:
35506 explicit overflow_error(const string& __arg);
35507 };
35508
35509
35510 class underflow_error : public runtime_error
35511 {
35512 public:
35513 explicit underflow_error(const string& __arg);
35514 };
35515
35516 }
35517 # 22 "/usr/include/boost/random/mersenne_twister.hpp" 2 3 4
35518 # 1 "/usr/include/boost/config.hpp" 1 3 4
35519 # 26 "/usr/include/boost/config.hpp" 3 4
35520 # 1 "/usr/include/boost/config/user.hpp" 1 3 4
35521 # 27 "/usr/include/boost/config.hpp" 2 3 4
35522
35523
35524
35525
35526 # 1 "/usr/include/boost/config/select_compiler_config.hpp" 1 3 4
35527 # 32 "/usr/include/boost/config.hpp" 2 3 4
35528
35529
35530
35531 # 1 "/usr/include/boost/config/compiler/gcc.hpp" 1 3 4
35532 # 36 "/usr/include/boost/config.hpp" 2 3 4
35533
35534
35535
35536
35537 # 1 "/usr/include/boost/config/select_stdlib_config.hpp" 1 3 4
35538 # 20 "/usr/include/boost/config/select_stdlib_config.hpp" 3 4
35539 # 1 "/usr/include/boost/config/no_tr1/utility.hpp" 1 3 4
35540 # 21 "/usr/include/boost/config/select_stdlib_config.hpp" 2 3 4
35541 # 41 "/usr/include/boost/config.hpp" 2 3 4
35542
35543
35544
35545 # 1 "/usr/include/boost/config/stdlib/libstdcpp3.hpp" 1 3 4
35546 # 45 "/usr/include/boost/config.hpp" 2 3 4
35547
35548
35549
35550
35551 # 1 "/usr/include/boost/config/select_platform_config.hpp" 1 3 4
35552 # 50 "/usr/include/boost/config.hpp" 2 3 4
35553
35554
35555
35556 # 1 "/usr/include/boost/config/platform/linux.hpp" 1 3 4
35557 # 70 "/usr/include/boost/config/platform/linux.hpp" 3 4
35558 # 1 "/usr/include/boost/config/posix_features.hpp" 1 3 4
35559 # 71 "/usr/include/boost/config/platform/linux.hpp" 2 3 4
35560 # 54 "/usr/include/boost/config.hpp" 2 3 4
35561
35562
35563
35564 # 1 "/usr/include/boost/config/suffix.hpp" 1 3 4
35565 # 433 "/usr/include/boost/config/suffix.hpp" 3 4
35566 namespace boost{
35567
35568 __extension__ typedef long long long_long_type;
35569 __extension__ typedef unsigned long long ulong_long_type;
35570
35571
35572
35573
35574 }
35575 # 58 "/usr/include/boost/config.hpp" 2 3 4
35576 # 23 "/usr/include/boost/random/mersenne_twister.hpp" 2 3 4
35577 # 1 "/usr/include/boost/limits.hpp" 1 3 4
35578 # 24 "/usr/include/boost/random/mersenne_twister.hpp" 2 3 4
35579 # 1 "/usr/include/boost/static_assert.hpp" 1 3 4
35580 # 18 "/usr/include/boost/static_assert.hpp" 3 4
35581 # 1 "/usr/include/boost/detail/workaround.hpp" 1 3 4
35582 # 19 "/usr/include/boost/static_assert.hpp" 2 3 4
35583 # 31 "/usr/include/boost/static_assert.hpp" 3 4
35584 namespace boost{
35585
35586
35587 template <bool x> struct STATIC_ASSERTION_FAILURE;
35588
35589 template <> struct STATIC_ASSERTION_FAILURE<true> { enum { value = 1 }; };
35590
35591
35592 template<int x> struct static_assert_test{};
35593
35594 }
35595 # 25 "/usr/include/boost/random/mersenne_twister.hpp" 2 3 4
35596 # 1 "/usr/include/boost/integer_traits.hpp" 1 3 4
35597 # 23 "/usr/include/boost/integer_traits.hpp" 3 4
35598 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/limits.h" 1 3 4
35599 # 24 "/usr/include/boost/integer_traits.hpp" 2 3 4
35600
35601
35602
35603
35604
35605
35606
35607 namespace boost {
35608 template<class T>
35609 class integer_traits : public std::numeric_limits<T>
35610 {
35611 public:
35612 static const bool is_integral = false;
35613 };
35614
35615 namespace detail {
35616 template<class T, T min_val, T max_val>
35617 class integer_traits_base
35618 {
35619 public:
35620 static const bool is_integral = true;
35621 static const T const_min = min_val;
35622 static const T const_max = max_val;
35623 };
35624
35625
35626
35627 template<class T, T min_val, T max_val>
35628 const bool integer_traits_base<T, min_val, max_val>::is_integral;
35629
35630 template<class T, T min_val, T max_val>
35631 const T integer_traits_base<T, min_val, max_val>::const_min;
35632
35633 template<class T, T min_val, T max_val>
35634 const T integer_traits_base<T, min_val, max_val>::const_max;
35635
35636
35637 }
35638
35639 template<>
35640 class integer_traits<bool>
35641 : public std::numeric_limits<bool>,
35642 public detail::integer_traits_base<bool, false, true>
35643 { };
35644
35645 template<>
35646 class integer_traits<char>
35647 : public std::numeric_limits<char>,
35648 public detail::integer_traits_base<char, 0, (127 * 2 + 1)>
35649 { };
35650
35651 template<>
35652 class integer_traits<signed char>
35653 : public std::numeric_limits<signed char>,
35654 public detail::integer_traits_base<signed char, (-127 - 1), 127>
35655 { };
35656
35657 template<>
35658 class integer_traits<unsigned char>
35659 : public std::numeric_limits<unsigned char>,
35660 public detail::integer_traits_base<unsigned char, 0, (127 * 2 + 1)>
35661 { };
35662
35663
35664 template<>
35665 class integer_traits<wchar_t>
35666 : public std::numeric_limits<wchar_t>,
35667
35668
35669
35670 public detail::integer_traits_base<wchar_t, (-2147483647 - 1), (2147483647)>
35671 # 119 "/usr/include/boost/integer_traits.hpp" 3 4
35672 { };
35673
35674
35675 template<>
35676 class integer_traits<short>
35677 : public std::numeric_limits<short>,
35678 public detail::integer_traits_base<short, (-32767 - 1), 32767>
35679 { };
35680
35681 template<>
35682 class integer_traits<unsigned short>
35683 : public std::numeric_limits<unsigned short>,
35684 public detail::integer_traits_base<unsigned short, 0, (32767 * 2 + 1)>
35685 { };
35686
35687 template<>
35688 class integer_traits<int>
35689 : public std::numeric_limits<int>,
35690 public detail::integer_traits_base<int, (-2147483647 - 1), 2147483647>
35691 { };
35692
35693 template<>
35694 class integer_traits<unsigned int>
35695 : public std::numeric_limits<unsigned int>,
35696 public detail::integer_traits_base<unsigned int, 0, (2147483647 * 2U + 1U)>
35697 { };
35698
35699 template<>
35700 class integer_traits<long>
35701 : public std::numeric_limits<long>,
35702 public detail::integer_traits_base<long, (-2147483647L - 1L), 2147483647L>
35703 { };
35704
35705 template<>
35706 class integer_traits<unsigned long>
35707 : public std::numeric_limits<unsigned long>,
35708 public detail::integer_traits_base<unsigned long, 0, (2147483647L * 2UL + 1UL)>
35709 { };
35710
35711
35712
35713
35714 template<>
35715 class integer_traits< ::boost::long_long_type>
35716 : public std::numeric_limits< ::boost::long_long_type>,
35717 public detail::integer_traits_base< ::boost::long_long_type, (-9223372036854775807LL -1), 9223372036854775807LL>
35718 { };
35719
35720 template<>
35721 class integer_traits< ::boost::ulong_long_type>
35722 : public std::numeric_limits< ::boost::ulong_long_type>,
35723 public detail::integer_traits_base< ::boost::ulong_long_type, 0, (9223372036854775807LL * 2ULL + 1)>
35724 { };
35725 # 231 "/usr/include/boost/integer_traits.hpp" 3 4
35726 }
35727 # 26 "/usr/include/boost/random/mersenne_twister.hpp" 2 3 4
35728 # 1 "/usr/include/boost/cstdint.hpp" 1 3 4
35729 # 85 "/usr/include/boost/cstdint.hpp" 3 4
35730 namespace boost
35731 {
35732
35733 using ::int8_t;
35734 using ::int_least8_t;
35735 using ::int_fast8_t;
35736 using ::uint8_t;
35737 using ::uint_least8_t;
35738 using ::uint_fast8_t;
35739
35740 using ::int16_t;
35741 using ::int_least16_t;
35742 using ::int_fast16_t;
35743 using ::uint16_t;
35744 using ::uint_least16_t;
35745 using ::uint_fast16_t;
35746
35747 using ::int32_t;
35748 using ::int_least32_t;
35749 using ::int_fast32_t;
35750 using ::uint32_t;
35751 using ::uint_least32_t;
35752 using ::uint_fast32_t;
35753
35754
35755
35756 using ::int64_t;
35757 using ::int_least64_t;
35758 using ::int_fast64_t;
35759 using ::uint64_t;
35760 using ::uint_least64_t;
35761 using ::uint_fast64_t;
35762
35763
35764
35765 using ::intmax_t;
35766 using ::uintmax_t;
35767
35768 }
35769 # 27 "/usr/include/boost/random/mersenne_twister.hpp" 2 3 4
35770 # 1 "/usr/include/boost/random/linear_congruential.hpp" 1 3 4
35771 # 20 "/usr/include/boost/random/linear_congruential.hpp" 3 4
35772 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cassert" 1 3 4
35773 # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cassert" 3 4
35774
35775 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cassert" 3
35776
35777 # 1 "/usr/include/assert.h" 1 3 4
35778 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cassert" 2 3
35779 # 21 "/usr/include/boost/random/linear_congruential.hpp" 2 3 4
35780
35781
35782
35783
35784 # 1 "/usr/include/boost/random/detail/const_mod.hpp" 1 3 4
35785 # 19 "/usr/include/boost/random/detail/const_mod.hpp" 3 4
35786 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cassert" 1 3 4
35787 # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cassert" 3 4
35788
35789 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cassert" 3
35790
35791 # 1 "/usr/include/assert.h" 1 3 4
35792 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cassert" 2 3
35793 # 20 "/usr/include/boost/random/detail/const_mod.hpp" 2 3 4
35794
35795 # 1 "/usr/include/boost/cstdint.hpp" 1 3 4
35796 # 22 "/usr/include/boost/random/detail/const_mod.hpp" 2 3 4
35797
35798
35799
35800 namespace boost {
35801 namespace random {
35802
35803
35804
35805
35806
35807
35808
35809 namespace detail {
35810
35811 template<bool is_signed>
35812 struct do_add
35813 { };
35814
35815 template<>
35816 struct do_add<true>
35817 {
35818 template<class IntType>
35819 static IntType add(IntType m, IntType x, IntType c)
35820 {
35821 x += (c-m);
35822 if(x < 0)
35823 x += m;
35824 return x;
35825 }
35826 };
35827
35828 template<>
35829 struct do_add<false>
35830 {
35831 template<class IntType>
35832 static IntType add(IntType, IntType, IntType)
35833 {
35834
35835 (static_cast<void> (0));
35836 return 0;
35837 }
35838 };
35839 }
35840
35841
35842
35843 template<class IntType, IntType m>
35844 class const_mod
35845 {
35846 public:
35847 static IntType add(IntType x, IntType c)
35848 {
35849 if(c == 0)
35850 return x;
35851 else if(c <= traits::const_max - m)
35852 return add_small(x, c);
35853 else
35854 return detail::do_add<traits::is_signed>::add(m, x, c);
35855 }
35856
35857 static IntType mult(IntType a, IntType x)
35858 {
35859 if(a == 1)
35860 return x;
35861 else if(m <= traits::const_max/a)
35862 return mult_small(a, x);
35863 else if(traits::is_signed && (m%a < m/a))
35864 return mult_schrage(a, x);
35865 else {
35866
35867 (static_cast<void> (0));
35868 return 0;
35869 }
35870 }
35871
35872 static IntType mult_add(IntType a, IntType x, IntType c)
35873 {
35874 if(m <= (traits::const_max-c)/a)
35875 return (a*x+c) % m;
35876 else
35877 return add(mult(a, x), c);
35878 }
35879
35880 static IntType invert(IntType x)
35881 { return x == 0 ? 0 : invert_euclidian(x); }
35882
35883 private:
35884 typedef integer_traits<IntType> traits;
35885
35886 const_mod();
35887
35888 static IntType add_small(IntType x, IntType c)
35889 {
35890 x += c;
35891 if(x >= m)
35892 x -= m;
35893 return x;
35894 }
35895
35896 static IntType mult_small(IntType a, IntType x)
35897 {
35898 return a*x % m;
35899 }
35900
35901 static IntType mult_schrage(IntType a, IntType value)
35902 {
35903 const IntType q = m / a;
35904 const IntType r = m % a;
35905
35906 (static_cast<void> (0));
35907
35908 value = a*(value%q) - r*(value/q);
35909
35910
35911 for(;;) {
35912 if (value > 0)
35913 break;
35914 value += m;
35915 }
35916 return value;
35917 }
35918
35919
35920 static IntType invert_euclidian(IntType c)
35921 {
35922
35923 typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( m > 0 ) >)> boost_static_assert_typedef_148;
35924
35925
35926
35927 typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( boost::integer_traits<IntType>::is_signed ) >)> boost_static_assert_typedef_152;
35928
35929 (static_cast<void> (0));
35930 IntType l1 = 0;
35931 IntType l2 = 1;
35932 IntType n = c;
35933 IntType p = m;
35934 for(;;) {
35935 IntType q = p / n;
35936 l1 -= q * l2;
35937 p -= q * n;
35938 if(p == 0)
35939 return (l2 < 1 ? l2 + m : l2);
35940 IntType q2 = n / p;
35941 l2 -= q2 * l1;
35942 n -= q2 * p;
35943 if(n == 0)
35944 return (l1 < 1 ? l1 + m : l1);
35945 }
35946 }
35947 };
35948
35949
35950
35951
35952 template<>
35953 class const_mod<unsigned int, 0>
35954 {
35955 typedef unsigned int IntType;
35956 public:
35957 static IntType add(IntType x, IntType c) { return x+c; }
35958 static IntType mult(IntType a, IntType x) { return a*x; }
35959 static IntType mult_add(IntType a, IntType x, IntType c) { return a*x+c; }
35960
35961
35962 private:
35963 const_mod();
35964 };
35965
35966 template<>
35967 class const_mod<unsigned long, 0>
35968 {
35969 typedef unsigned long IntType;
35970 public:
35971 static IntType add(IntType x, IntType c) { return x+c; }
35972 static IntType mult(IntType a, IntType x) { return a*x; }
35973 static IntType mult_add(IntType a, IntType x, IntType c) { return a*x+c; }
35974
35975
35976 private:
35977 const_mod();
35978 };
35979
35980
35981
35982
35983 template<>
35984 class const_mod<uint64_t, uint64_t(1) << 48>
35985 {
35986 typedef uint64_t IntType;
35987 public:
35988 static IntType add(IntType x, IntType c) { return c == 0 ? x : mod(x+c); }
35989 static IntType mult(IntType a, IntType x) { return mod(a*x); }
35990 static IntType mult_add(IntType a, IntType x, IntType c)
35991 { return mod(a*x+c); }
35992 static IntType mod(IntType x) { return x &= ((uint64_t(1) << 48)-1); }
35993
35994
35995 private:
35996 const_mod();
35997 };
35998 # 356 "/usr/include/boost/random/detail/const_mod.hpp" 3 4
35999 }
36000 }
36001 # 26 "/usr/include/boost/random/linear_congruential.hpp" 2 3 4
36002
36003
36004 namespace boost {
36005 namespace random {
36006
36007
36008 template<class IntType, IntType a, IntType c, IntType m, IntType val>
36009 class linear_congruential
36010 {
36011 public:
36012 typedef IntType result_type;
36013
36014 static const bool has_fixed_range = true;
36015 static const result_type min_value = ( c == 0 ? 1 : 0 );
36016 static const result_type max_value = m-1;
36017
36018
36019
36020 static const IntType multiplier = a;
36021 static const IntType increment = c;
36022 static const IntType modulus = m;
36023
36024
36025
36026
36027
36028
36029 explicit linear_congruential(IntType x0 = 1)
36030 : _modulus(modulus), _x(_modulus ? (x0 % _modulus) : x0)
36031 {
36032 (static_cast<void> (0));
36033
36034
36035
36036
36037
36038
36039 typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( std::numeric_limits<IntType>::is_integer ) >)> boost_static_assert_typedef_63;
36040
36041 }
36042
36043 template<class It>
36044 linear_congruential(It& first, It last) { seed(first, last); }
36045
36046
36047 void seed(IntType x0 = 1)
36048 {
36049 (static_cast<void> (0));
36050 _x = (_modulus ? (x0 % _modulus) : x0);
36051 }
36052
36053 template<class It>
36054 void seed(It& first, It last)
36055 {
36056 if(first == last)
36057 throw std::invalid_argument("linear_congruential::seed");
36058 IntType value = *first++;
36059 _x = (_modulus ? (value % _modulus) : value);
36060 }
36061
36062 result_type min () const { return c == 0 ? 1 : 0; }
36063 result_type max () const { return modulus-1; }
36064
36065 IntType operator()()
36066 {
36067 _x = const_mod<IntType, m>::mult_add(a, _x, c);
36068 return _x;
36069 }
36070
36071 static bool validation(IntType x) { return val == x; }
36072 # 106 "/usr/include/boost/random/linear_congruential.hpp" 3 4
36073 friend bool operator==(const linear_congruential& x,
36074 const linear_congruential& y)
36075 { return x._x == y._x; }
36076 friend bool operator!=(const linear_congruential& x,
36077 const linear_congruential& y)
36078 { return !(x == y); }
36079
36080
36081 template<class CharT, class Traits>
36082 friend std::basic_ostream<CharT,Traits>&
36083 operator<<(std::basic_ostream<CharT,Traits>& os,
36084 const linear_congruential& lcg)
36085 {
36086 return os << lcg._x;
36087 }
36088
36089 template<class CharT, class Traits>
36090 friend std::basic_istream<CharT,Traits>&
36091 operator>>(std::basic_istream<CharT,Traits>& is,
36092 linear_congruential& lcg)
36093 {
36094 return is >> lcg._x;
36095 }
36096
36097 private:
36098
36099
36100
36101 IntType _modulus;
36102 IntType _x;
36103 };
36104 # 175 "/usr/include/boost/random/linear_congruential.hpp" 3 4
36105 template<class IntType, IntType a, IntType c, IntType m, IntType val>
36106 const bool linear_congruential<IntType, a, c, m, val>::has_fixed_range;
36107 template<class IntType, IntType a, IntType c, IntType m, IntType val>
36108 const typename linear_congruential<IntType, a, c, m, val>::result_type linear_congruential<IntType, a, c, m, val>::min_value;
36109 template<class IntType, IntType a, IntType c, IntType m, IntType val>
36110 const typename linear_congruential<IntType, a, c, m, val>::result_type linear_congruential<IntType, a, c, m, val>::max_value;
36111 template<class IntType, IntType a, IntType c, IntType m, IntType val>
36112 const IntType linear_congruential<IntType,a,c,m,val>::modulus;
36113
36114
36115 }
36116
36117
36118 typedef random::linear_congruential<int32_t, 16807, 0, 2147483647,
36119 1043618065> minstd_rand0;
36120 typedef random::linear_congruential<int32_t, 48271, 0, 2147483647,
36121 399268537> minstd_rand;
36122
36123
36124
36125
36126 class rand48
36127 {
36128 public:
36129 typedef int32_t result_type;
36130
36131 static const bool has_fixed_range = true;
36132 static const int32_t min_value = 0;
36133 static const int32_t max_value = integer_traits<int32_t>::const_max;
36134
36135
36136
36137 int32_t min () const { return 0; }
36138 int32_t max () const { return std::numeric_limits<int32_t>::max (); }
36139
36140 explicit rand48(int32_t x0 = 1) : lcf(cnv(x0)) { }
36141 explicit rand48(uint64_t x0) : lcf(x0) { }
36142 template<class It> rand48(It& first, It last) : lcf(first, last) { }
36143
36144 void seed(int32_t x0 = 1) { lcf.seed(cnv(x0)); }
36145 void seed(uint64_t x0) { lcf.seed(x0); }
36146 template<class It> void seed(It& first, It last) { lcf.seed(first,last); }
36147
36148 int32_t operator()() { return static_cast<int32_t>(lcf() >> 17); }
36149
36150 static bool validation(int32_t x) { return x == 1993516219; }
36151
36152
36153
36154
36155 template<class CharT,class Traits>
36156 friend std::basic_ostream<CharT,Traits>&
36157 operator<<(std::basic_ostream<CharT,Traits>& os, const rand48& r)
36158 { os << r.lcf; return os; }
36159
36160 template<class CharT,class Traits>
36161 friend std::basic_istream<CharT,Traits>&
36162 operator>>(std::basic_istream<CharT,Traits>& is, rand48& r)
36163 { is >> r.lcf; return is; }
36164
36165
36166 friend bool operator==(const rand48& x, const rand48& y)
36167 { return x.lcf == y.lcf; }
36168 friend bool operator!=(const rand48& x, const rand48& y)
36169 { return !(x == y); }
36170
36171
36172
36173
36174
36175
36176
36177 private:
36178 random::linear_congruential<uint64_t,
36179 uint64_t(0xDEECE66DUL) | (uint64_t(0x5) << 32),
36180 0xB, uint64_t(1)<<48, 0> lcf;
36181 static uint64_t cnv(int32_t x)
36182 { return (static_cast<uint64_t>(x) << 16) | 0x330e; }
36183 };
36184
36185
36186 }
36187 # 28 "/usr/include/boost/random/mersenne_twister.hpp" 2 3 4
36188
36189 # 1 "/usr/include/boost/random/detail/ptr_helper.hpp" 1 3 4
36190 # 20 "/usr/include/boost/random/detail/ptr_helper.hpp" 3 4
36191 namespace boost {
36192 namespace random {
36193 namespace detail {
36194
36195
36196 template<class T>
36197 struct ptr_helper
36198 {
36199 typedef T value_type;
36200 typedef T& reference_type;
36201 typedef const T& rvalue_type;
36202 static reference_type ref(T& r) { return r; }
36203 static const T& ref(const T& r) { return r; }
36204 };
36205
36206
36207 template<class T>
36208 struct ptr_helper<T&>
36209 {
36210 typedef T value_type;
36211 typedef T& reference_type;
36212 typedef T& rvalue_type;
36213 static reference_type ref(T& r) { return r; }
36214 static const T& ref(const T& r) { return r; }
36215 };
36216
36217 template<class T>
36218 struct ptr_helper<T*>
36219 {
36220 typedef T value_type;
36221 typedef T& reference_type;
36222 typedef T* rvalue_type;
36223 static reference_type ref(T * p) { return *p; }
36224 static const T& ref(const T * p) { return *p; }
36225 };
36226
36227
36228 }
36229 }
36230 }
36231 # 30 "/usr/include/boost/random/mersenne_twister.hpp" 2 3 4
36232
36233 namespace boost {
36234 namespace random {
36235
36236
36237 template<class UIntType, int w, int n, int m, int r, UIntType a, int u,
36238 int s, UIntType b, int t, UIntType c, int l, UIntType val>
36239 class mersenne_twister
36240 {
36241 public:
36242 typedef UIntType result_type;
36243 static const int word_size = w;
36244 static const int state_size = n;
36245 static const int shift_size = m;
36246 static const int mask_bits = r;
36247 static const UIntType parameter_a = a;
36248 static const int output_u = u;
36249 static const int output_s = s;
36250 static const UIntType output_b = b;
36251 static const int output_t = t;
36252 static const UIntType output_c = c;
36253 static const int output_l = l;
36254
36255 static const bool has_fixed_range = false;
36256
36257 mersenne_twister() { seed(); }
36258
36259
36260
36261
36262
36263 explicit mersenne_twister(UIntType value)
36264
36265 { seed(value); }
36266 template<class It> mersenne_twister(It& first, It last) { seed(first,last); }
36267
36268 template<class Generator>
36269 explicit mersenne_twister(Generator & gen) { seed(gen); }
36270
36271
36272
36273 void seed() { seed(UIntType(5489)); }
36274
36275
36276
36277
36278
36279 void seed(UIntType value)
36280
36281 {
36282
36283
36284
36285
36286 const UIntType mask = ~0u;
36287 x[0] = value & mask;
36288 for (i = 1; i < n; i++) {
36289
36290 x[i] = (1812433253UL * (x[i-1] ^ (x[i-1] >> (w-2))) + i) & mask;
36291 }
36292 }
36293
36294
36295
36296
36297 template<class Generator>
36298 void seed(Generator & gen)
36299 {
36300
36301 typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( !std::numeric_limits<result_type>::is_signed ) >)> boost_static_assert_typedef_99;
36302
36303
36304 for(int j = 0; j < n; j++)
36305 x[j] = gen();
36306 i = n;
36307 }
36308
36309 template<class It>
36310 void seed(It& first, It last)
36311 {
36312 int j;
36313 for(j = 0; j < n && first != last; ++j, ++first)
36314 x[j] = *first;
36315 i = n;
36316 if(first == last && j < n)
36317 throw std::invalid_argument("mersenne_twister::seed");
36318 }
36319
36320 result_type min () const { return 0; }
36321 result_type max () const
36322 {
36323
36324 result_type res = 0;
36325 for(int i = 0; i < w; ++i)
36326 res |= (1u << i);
36327 return res;
36328 }
36329
36330 result_type operator()();
36331 static bool validation(result_type v) { return val == v; }
36332
36333
36334
36335
36336 template<class CharT, class Traits>
36337 friend std::basic_ostream<CharT,Traits>&
36338 operator<<(std::basic_ostream<CharT,Traits>& os, const mersenne_twister& mt)
36339 {
36340 for(int j = 0; j < mt.state_size; ++j)
36341 os << mt.compute(j) << " ";
36342 return os;
36343 }
36344
36345 template<class CharT, class Traits>
36346 friend std::basic_istream<CharT,Traits>&
36347 operator>>(std::basic_istream<CharT,Traits>& is, mersenne_twister& mt)
36348 {
36349 for(int j = 0; j < mt.state_size; ++j)
36350 is >> mt.x[j] >> std::ws;
36351
36352
36353
36354 mt.i = mt.state_size;
36355 return is;
36356 }
36357
36358
36359 friend bool operator==(const mersenne_twister& x, const mersenne_twister& y)
36360 {
36361 for(int j = 0; j < state_size; ++j)
36362 if(x.compute(j) != y.compute(j))
36363 return false;
36364 return true;
36365 }
36366
36367 friend bool operator!=(const mersenne_twister& x, const mersenne_twister& y)
36368 { return !(x == y); }
36369 # 181 "/usr/include/boost/random/mersenne_twister.hpp" 3 4
36370 private:
36371
36372 UIntType compute(unsigned int index) const
36373 {
36374
36375 return x[ (i + n + index) % (2*n) ];
36376 }
36377 void twist(int block);
36378
36379
36380
36381
36382
36383
36384
36385 UIntType x[2*n];
36386 int i;
36387 };
36388
36389
36390
36391 template<class UIntType, int w, int n, int m, int r, UIntType a, int u,
36392 int s, UIntType b, int t, UIntType c, int l, UIntType val>
36393 const bool mersenne_twister<UIntType,w,n,m,r,a,u,s,b,t,c,l,val>::has_fixed_range;
36394 template<class UIntType, int w, int n, int m, int r, UIntType a, int u,
36395 int s, UIntType b, int t, UIntType c, int l, UIntType val>
36396 const int mersenne_twister<UIntType,w,n,m,r,a,u,s,b,t,c,l,val>::state_size;
36397 template<class UIntType, int w, int n, int m, int r, UIntType a, int u,
36398 int s, UIntType b, int t, UIntType c, int l, UIntType val>
36399 const int mersenne_twister<UIntType,w,n,m,r,a,u,s,b,t,c,l,val>::shift_size;
36400 template<class UIntType, int w, int n, int m, int r, UIntType a, int u,
36401 int s, UIntType b, int t, UIntType c, int l, UIntType val>
36402 const int mersenne_twister<UIntType,w,n,m,r,a,u,s,b,t,c,l,val>::mask_bits;
36403 template<class UIntType, int w, int n, int m, int r, UIntType a, int u,
36404 int s, UIntType b, int t, UIntType c, int l, UIntType val>
36405 const UIntType mersenne_twister<UIntType,w,n,m,r,a,u,s,b,t,c,l,val>::parameter_a;
36406 template<class UIntType, int w, int n, int m, int r, UIntType a, int u,
36407 int s, UIntType b, int t, UIntType c, int l, UIntType val>
36408 const int mersenne_twister<UIntType,w,n,m,r,a,u,s,b,t,c,l,val>::output_u;
36409 template<class UIntType, int w, int n, int m, int r, UIntType a, int u,
36410 int s, UIntType b, int t, UIntType c, int l, UIntType val>
36411 const int mersenne_twister<UIntType,w,n,m,r,a,u,s,b,t,c,l,val>::output_s;
36412 template<class UIntType, int w, int n, int m, int r, UIntType a, int u,
36413 int s, UIntType b, int t, UIntType c, int l, UIntType val>
36414 const UIntType mersenne_twister<UIntType,w,n,m,r,a,u,s,b,t,c,l,val>::output_b;
36415 template<class UIntType, int w, int n, int m, int r, UIntType a, int u,
36416 int s, UIntType b, int t, UIntType c, int l, UIntType val>
36417 const int mersenne_twister<UIntType,w,n,m,r,a,u,s,b,t,c,l,val>::output_t;
36418 template<class UIntType, int w, int n, int m, int r, UIntType a, int u,
36419 int s, UIntType b, int t, UIntType c, int l, UIntType val>
36420 const UIntType mersenne_twister<UIntType,w,n,m,r,a,u,s,b,t,c,l,val>::output_c;
36421 template<class UIntType, int w, int n, int m, int r, UIntType a, int u,
36422 int s, UIntType b, int t, UIntType c, int l, UIntType val>
36423 const int mersenne_twister<UIntType,w,n,m,r,a,u,s,b,t,c,l,val>::output_l;
36424
36425
36426 template<class UIntType, int w, int n, int m, int r, UIntType a, int u,
36427 int s, UIntType b, int t, UIntType c, int l, UIntType val>
36428 void mersenne_twister<UIntType,w,n,m,r,a,u,s,b,t,c,l,val>::twist(int block)
36429 {
36430 const UIntType upper_mask = (~0u) << r;
36431 const UIntType lower_mask = ~upper_mask;
36432
36433 if(block == 0) {
36434 for(int j = n; j < 2*n; j++) {
36435 UIntType y = (x[j-n] & upper_mask) | (x[j-(n-1)] & lower_mask);
36436 x[j] = x[j-(n-m)] ^ (y >> 1) ^ (y&1 ? a : 0);
36437 }
36438 } else if (block == 1) {
36439
36440 {
36441 for(int j = 0; j < n-m; j++) {
36442 UIntType y = (x[j+n] & upper_mask) | (x[j+n+1] & lower_mask);
36443 x[j] = x[j+n+m] ^ (y >> 1) ^ (y&1 ? a : 0);
36444 }
36445 }
36446
36447 for(int j = n-m; j < n-1; j++) {
36448 UIntType y = (x[j+n] & upper_mask) | (x[j+n+1] & lower_mask);
36449 x[j] = x[j-(n-m)] ^ (y >> 1) ^ (y&1 ? a : 0);
36450 }
36451
36452 UIntType y = (x[2*n-1] & upper_mask) | (x[0] & lower_mask);
36453 x[n-1] = x[m-1] ^ (y >> 1) ^ (y&1 ? a : 0);
36454 i = 0;
36455 }
36456 }
36457
36458 template<class UIntType, int w, int n, int m, int r, UIntType a, int u,
36459 int s, UIntType b, int t, UIntType c, int l, UIntType val>
36460 inline typename mersenne_twister<UIntType,w,n,m,r,a,u,s,b,t,c,l,val>::result_type
36461 mersenne_twister<UIntType,w,n,m,r,a,u,s,b,t,c,l,val>::operator()()
36462 {
36463 if(i == n)
36464 twist(0);
36465 else if(i >= 2*n)
36466 twist(1);
36467
36468 UIntType z = x[i];
36469 ++i;
36470 z ^= (z >> u);
36471 z ^= ((z << s) & b);
36472 z ^= ((z << t) & c);
36473 z ^= (z >> l);
36474 return z;
36475 }
36476
36477 }
36478
36479
36480 typedef random::mersenne_twister<uint32_t,32,351,175,19,0xccab8ee7,11,
36481 7,0x31b6ab00,15,0xffe50000,17, 0xa37d3c92> mt11213b;
36482
36483
36484 typedef random::mersenne_twister<uint32_t,32,624,397,31,0x9908b0df,11,
36485 7,0x9d2c5680,15,0xefc60000,18, 3346425566U> mt19937;
36486
36487 }
36488
36489
36490 # 78 "enblend.cc" 2
36491 # 1 "/usr/include/lcms.h" 1 3 4
36492 # 99 "/usr/include/lcms.h" 3 4
36493 # 1 "/usr/include/assert.h" 1 3 4
36494 # 100 "/usr/include/lcms.h" 2 3 4
36495 # 179 "/usr/include/lcms.h" 3 4
36496 # 1 "/usr/include/memory.h" 1 3 4
36497 # 180 "/usr/include/lcms.h" 2 3 4
36498 # 190 "/usr/include/lcms.h" 3 4
36499 typedef unsigned char BYTE, *LPBYTE;
36500 typedef unsigned short WORD, *LPWORD;
36501 typedef unsigned long DWORD, *LPDWORD;
36502 typedef char *LPSTR;
36503 typedef void *LPVOID;
36504 # 265 "/usr/include/lcms.h" 3 4
36505 typedef int LCMS_RWLOCK_T;
36506 # 275 "/usr/include/lcms.h" 3 4
36507 typedef int LCMSBOOL;
36508 typedef void* LCMSHANDLE;
36509
36510 # 1 "/usr/include/icc34.h" 1 3 4
36511 # 154 "/usr/include/icc34.h" 3 4
36512 typedef unsigned char icUInt8Number;
36513 typedef unsigned short icUInt16Number;
36514 typedef unsigned int icUInt32Number;
36515 typedef unsigned int icUInt64Number[2];
36516
36517 typedef char icInt8Number;
36518 typedef short icInt16Number;
36519 typedef int icInt32Number;
36520 typedef int icInt64Number[2];
36521 # 269 "/usr/include/icc34.h" 3 4
36522 typedef icInt32Number icSignature;
36523 typedef icInt32Number icS15Fixed16Number;
36524 typedef icUInt32Number icU16Fixed16Number;
36525
36526
36527
36528
36529 typedef enum {
36530 icSigAToB0Tag = 0x41324230L,
36531 icSigAToB1Tag = 0x41324231L,
36532 icSigAToB2Tag = 0x41324232L,
36533 icSigBlueColorantTag = 0x6258595AL,
36534 icSigBlueTRCTag = 0x62545243L,
36535 icSigBToA0Tag = 0x42324130L,
36536 icSigBToA1Tag = 0x42324131L,
36537 icSigBToA2Tag = 0x42324132L,
36538 icSigCalibrationDateTimeTag = 0x63616C74L,
36539 icSigCharTargetTag = 0x74617267L,
36540 icSigCopyrightTag = 0x63707274L,
36541 icSigCrdInfoTag = 0x63726469L,
36542 icSigDeviceMfgDescTag = 0x646D6E64L,
36543 icSigDeviceModelDescTag = 0x646D6464L,
36544 icSigGamutTag = 0x67616D74L,
36545 icSigGrayTRCTag = 0x6b545243L,
36546 icSigGreenColorantTag = 0x6758595AL,
36547 icSigGreenTRCTag = 0x67545243L,
36548 icSigLuminanceTag = 0x6C756d69L,
36549 icSigMeasurementTag = 0x6D656173L,
36550 icSigMediaBlackPointTag = 0x626B7074L,
36551 icSigMediaWhitePointTag = 0x77747074L,
36552 icSigNamedColorTag = 0x6E636f6CL,
36553
36554 icSigNamedColor2Tag = 0x6E636C32L,
36555 icSigPreview0Tag = 0x70726530L,
36556 icSigPreview1Tag = 0x70726531L,
36557 icSigPreview2Tag = 0x70726532L,
36558 icSigProfileDescriptionTag = 0x64657363L,
36559 icSigProfileSequenceDescTag = 0x70736571L,
36560 icSigPs2CRD0Tag = 0x70736430L,
36561 icSigPs2CRD1Tag = 0x70736431L,
36562 icSigPs2CRD2Tag = 0x70736432L,
36563 icSigPs2CRD3Tag = 0x70736433L,
36564 icSigPs2CSATag = 0x70733273L,
36565 icSigPs2RenderingIntentTag = 0x70733269L,
36566 icSigRedColorantTag = 0x7258595AL,
36567 icSigRedTRCTag = 0x72545243L,
36568 icSigScreeningDescTag = 0x73637264L,
36569 icSigScreeningTag = 0x7363726EL,
36570 icSigTechnologyTag = 0x74656368L,
36571 icSigUcrBgTag = 0x62666420L,
36572 icSigViewingCondDescTag = 0x76756564L,
36573 icSigViewingConditionsTag = 0x76696577L,
36574 icMaxEnumTag = 0xFFFFFFFFL
36575 } icTagSignature;
36576
36577
36578 typedef enum {
36579 icSigDigitalCamera = 0x6463616DL,
36580 icSigFilmScanner = 0x6673636EL,
36581 icSigReflectiveScanner = 0x7273636EL,
36582 icSigInkJetPrinter = 0x696A6574L,
36583 icSigThermalWaxPrinter = 0x74776178L,
36584 icSigElectrophotographicPrinter = 0x6570686FL,
36585 icSigElectrostaticPrinter = 0x65737461L,
36586 icSigDyeSublimationPrinter = 0x64737562L,
36587 icSigPhotographicPaperPrinter = 0x7270686FL,
36588 icSigFilmWriter = 0x6670726EL,
36589 icSigVideoMonitor = 0x7669646DL,
36590 icSigVideoCamera = 0x76696463L,
36591 icSigProjectionTelevision = 0x706A7476L,
36592 icSigCRTDisplay = 0x43525420L,
36593 icSigPMDisplay = 0x504D4420L,
36594 icSigAMDisplay = 0x414D4420L,
36595 icSigPhotoCD = 0x4B504344L,
36596 icSigPhotoImageSetter = 0x696D6773L,
36597 icSigGravure = 0x67726176L,
36598 icSigOffsetLithography = 0x6F666673L,
36599 icSigSilkscreen = 0x73696C6BL,
36600 icSigFlexography = 0x666C6578L,
36601 icMaxEnumTechnology = 0xFFFFFFFFL
36602 } icTechnologySignature;
36603
36604
36605 typedef enum {
36606 icSigCurveType = 0x63757276L,
36607 icSigDataType = 0x64617461L,
36608 icSigDateTimeType = 0x6474696DL,
36609 icSigLut16Type = 0x6d667432L,
36610 icSigLut8Type = 0x6d667431L,
36611 icSigMeasurementType = 0x6D656173L,
36612 icSigNamedColorType = 0x6E636f6CL,
36613
36614 icSigProfileSequenceDescType = 0x70736571L,
36615 icSigS15Fixed16ArrayType = 0x73663332L,
36616 icSigScreeningType = 0x7363726EL,
36617 icSigSignatureType = 0x73696720L,
36618 icSigTextType = 0x74657874L,
36619 icSigTextDescriptionType = 0x64657363L,
36620 icSigU16Fixed16ArrayType = 0x75663332L,
36621 icSigUcrBgType = 0x62666420L,
36622 icSigUInt16ArrayType = 0x75693136L,
36623 icSigUInt32ArrayType = 0x75693332L,
36624 icSigUInt64ArrayType = 0x75693634L,
36625 icSigUInt8ArrayType = 0x75693038L,
36626 icSigViewingConditionsType = 0x76696577L,
36627 icSigXYZType = 0x58595A20L,
36628 icSigXYZArrayType = 0x58595A20L,
36629 icSigNamedColor2Type = 0x6E636C32L,
36630 icSigCrdInfoType = 0x63726469L,
36631 icMaxEnumType = 0xFFFFFFFFL
36632 } icTagTypeSignature;
36633
36634
36635
36636
36637
36638
36639 typedef enum {
36640 icSigXYZData = 0x58595A20L,
36641 icSigLabData = 0x4C616220L,
36642 icSigLuvData = 0x4C757620L,
36643 icSigYCbCrData = 0x59436272L,
36644 icSigYxyData = 0x59787920L,
36645 icSigRgbData = 0x52474220L,
36646 icSigGrayData = 0x47524159L,
36647 icSigHsvData = 0x48535620L,
36648 icSigHlsData = 0x484C5320L,
36649 icSigCmykData = 0x434D594BL,
36650 icSigCmyData = 0x434D5920L,
36651 icSig2colorData = 0x32434C52L,
36652 icSig3colorData = 0x33434C52L,
36653 icSig4colorData = 0x34434C52L,
36654 icSig5colorData = 0x35434C52L,
36655 icSig6colorData = 0x36434C52L,
36656 icSig7colorData = 0x37434C52L,
36657 icSig8colorData = 0x38434C52L,
36658 icSig9colorData = 0x39434C52L,
36659 icSig10colorData = 0x41434C52L,
36660 icSig11colorData = 0x42434C52L,
36661 icSig12colorData = 0x43434C52L,
36662 icSig13colorData = 0x44434C52L,
36663 icSig14colorData = 0x45434C52L,
36664 icSig15colorData = 0x46434C52L,
36665 icMaxEnumData = 0xFFFFFFFFL
36666 } icColorSpaceSignature;
36667
36668
36669 typedef enum {
36670 icSigInputClass = 0x73636E72L,
36671 icSigDisplayClass = 0x6D6E7472L,
36672 icSigOutputClass = 0x70727472L,
36673 icSigLinkClass = 0x6C696E6BL,
36674 icSigAbstractClass = 0x61627374L,
36675 icSigColorSpaceClass = 0x73706163L,
36676 icSigNamedColorClass = 0x6e6d636cL,
36677 icMaxEnumClass = 0xFFFFFFFFL
36678 } icProfileClassSignature;
36679
36680
36681 typedef enum {
36682 icSigMacintosh = 0x4150504CL,
36683 icSigMicrosoft = 0x4D534654L,
36684 icSigSolaris = 0x53554E57L,
36685 icSigSGI = 0x53474920L,
36686 icSigTaligent = 0x54474E54L,
36687 icMaxEnumPlatform = 0xFFFFFFFFL
36688 } icPlatformSignature;
36689
36690
36691
36692
36693
36694
36695
36696 typedef enum {
36697 icFlare0 = 0x00000000L,
36698 icFlare100 = 0x00000001L,
36699 icMaxFlare = 0xFFFFFFFFL
36700 } icMeasurementFlare;
36701
36702
36703 typedef enum {
36704 icGeometryUnknown = 0x00000000L,
36705 icGeometry045or450 = 0x00000001L,
36706 icGeometry0dord0 = 0x00000002L,
36707 icMaxGeometry = 0xFFFFFFFFL
36708 } icMeasurementGeometry;
36709
36710
36711 typedef enum {
36712 icPerceptual = 0,
36713 icRelativeColorimetric = 1,
36714 icSaturation = 2,
36715 icAbsoluteColorimetric = 3,
36716 icMaxEnumIntent = 0xFFFFFFFFL
36717 } icRenderingIntent;
36718
36719
36720 typedef enum {
36721 icSpotShapeUnknown = 0,
36722 icSpotShapePrinterDefault = 1,
36723 icSpotShapeRound = 2,
36724 icSpotShapeDiamond = 3,
36725 icSpotShapeEllipse = 4,
36726 icSpotShapeLine = 5,
36727 icSpotShapeSquare = 6,
36728 icSpotShapeCross = 7,
36729 icMaxEnumSpot = 0xFFFFFFFFL
36730 } icSpotShape;
36731
36732
36733 typedef enum {
36734 icStdObsUnknown = 0x00000000L,
36735 icStdObs1931TwoDegrees = 0x00000001L,
36736 icStdObs1964TenDegrees = 0x00000002L,
36737 icMaxStdObs = 0xFFFFFFFFL
36738 } icStandardObserver;
36739
36740
36741 typedef enum {
36742 icIlluminantUnknown = 0x00000000L,
36743 icIlluminantD50 = 0x00000001L,
36744 icIlluminantD65 = 0x00000002L,
36745 icIlluminantD93 = 0x00000003L,
36746 icIlluminantF2 = 0x00000004L,
36747 icIlluminantD55 = 0x00000005L,
36748 icIlluminantA = 0x00000006L,
36749 icIlluminantEquiPowerE = 0x00000007L,
36750 icIlluminantF8 = 0x00000008L,
36751 icMaxEnumIluminant = 0xFFFFFFFFL
36752 } icIlluminant;
36753 # 508 "/usr/include/icc34.h" 3 4
36754 typedef struct {
36755 icInt8Number data[1];
36756 } icInt8Array;
36757
36758
36759 typedef struct {
36760 icUInt8Number data[1];
36761 } icUInt8Array;
36762
36763
36764 typedef struct {
36765 icUInt16Number data[1];
36766 } icUInt16Array;
36767
36768
36769 typedef struct {
36770 icInt16Number data[1];
36771 } icInt16Array;
36772
36773
36774 typedef struct {
36775 icUInt32Number data[1];
36776 } icUInt32Array;
36777
36778
36779 typedef struct {
36780 icInt32Number data[1];
36781 } icInt32Array;
36782
36783
36784 typedef struct {
36785 icUInt64Number data[1];
36786 } icUInt64Array;
36787
36788
36789 typedef struct {
36790 icInt64Number data[1];
36791 } icInt64Array;
36792
36793
36794 typedef struct {
36795 icU16Fixed16Number data[1];
36796 } icU16Fixed16Array;
36797
36798
36799 typedef struct {
36800 icS15Fixed16Number data[1];
36801 } icS15Fixed16Array;
36802
36803
36804 typedef struct {
36805 icUInt16Number year;
36806 icUInt16Number month;
36807 icUInt16Number day;
36808 icUInt16Number hours;
36809 icUInt16Number minutes;
36810 icUInt16Number seconds;
36811 } icDateTimeNumber;
36812
36813
36814 typedef struct {
36815 icS15Fixed16Number X;
36816 icS15Fixed16Number Y;
36817 icS15Fixed16Number Z;
36818 } icXYZNumber;
36819
36820
36821 typedef struct {
36822 icXYZNumber data[1];
36823 } icXYZArray;
36824
36825
36826 typedef struct {
36827 icUInt32Number count;
36828 icUInt16Number data[1];
36829
36830
36831
36832
36833 } icCurve;
36834
36835
36836 typedef struct {
36837 icUInt32Number dataFlag;
36838 icInt8Number data[1];
36839 } icData;
36840
36841
36842 typedef struct {
36843 icUInt8Number inputChan;
36844 icUInt8Number outputChan;
36845 icUInt8Number clutPoints;
36846 icInt8Number pad;
36847 icS15Fixed16Number e00;
36848 icS15Fixed16Number e01;
36849 icS15Fixed16Number e02;
36850 icS15Fixed16Number e10;
36851 icS15Fixed16Number e11;
36852 icS15Fixed16Number e12;
36853 icS15Fixed16Number e20;
36854 icS15Fixed16Number e21;
36855 icS15Fixed16Number e22;
36856 icUInt16Number inputEnt;
36857 icUInt16Number outputEnt;
36858 icUInt16Number data[1];
36859
36860
36861
36862
36863
36864
36865
36866 } icLut16;
36867
36868
36869 typedef struct {
36870 icUInt8Number inputChan;
36871 icUInt8Number outputChan;
36872 icUInt8Number clutPoints;
36873 icInt8Number pad;
36874 icS15Fixed16Number e00;
36875 icS15Fixed16Number e01;
36876 icS15Fixed16Number e02;
36877 icS15Fixed16Number e10;
36878 icS15Fixed16Number e11;
36879 icS15Fixed16Number e12;
36880 icS15Fixed16Number e20;
36881 icS15Fixed16Number e21;
36882 icS15Fixed16Number e22;
36883 icUInt8Number data[1];
36884
36885
36886
36887
36888
36889
36890
36891 } icLut8;
36892
36893
36894 typedef struct {
36895 icStandardObserver stdObserver;
36896 icXYZNumber backing;
36897 icMeasurementGeometry geometry;
36898 icMeasurementFlare flare;
36899 icIlluminant illuminant;
36900 } icMeasurement;
36901
36902
36903
36904
36905
36906
36907 typedef struct {
36908 icUInt32Number vendorFlag;
36909 icUInt32Number count;
36910 icUInt32Number nDeviceCoords;
36911 icInt8Number prefix[32];
36912 icInt8Number suffix[32];
36913 icInt8Number data[1];
36914 # 692 "/usr/include/icc34.h" 3 4
36915 } icNamedColor2;
36916
36917
36918 typedef struct {
36919 icSignature deviceMfg;
36920 icSignature deviceModel;
36921 icUInt64Number attributes;
36922 icTechnologySignature technology;
36923 icInt8Number data[1];
36924 # 709 "/usr/include/icc34.h" 3 4
36925 } icDescStruct;
36926
36927
36928 typedef struct {
36929 icUInt32Number count;
36930 icUInt8Number data[1];
36931 } icProfileSequenceDesc;
36932
36933
36934 typedef struct {
36935 icUInt32Number count;
36936 icInt8Number data[1];
36937 # 732 "/usr/include/icc34.h" 3 4
36938 } icTextDescription;
36939
36940
36941 typedef struct {
36942 icS15Fixed16Number frequency;
36943 icS15Fixed16Number angle;
36944 icSpotShape spotShape;
36945 } icScreeningData;
36946
36947 typedef struct {
36948 icUInt32Number screeningFlag;
36949 icUInt32Number channels;
36950 icScreeningData data[1];
36951 } icScreening;
36952
36953
36954 typedef struct {
36955 icInt8Number data[1];
36956 } icText;
36957
36958
36959 typedef struct {
36960 icUInt32Number count;
36961 icUInt16Number curve[1];
36962 } icUcrBgCurve;
36963
36964
36965 typedef struct {
36966 icInt8Number data[1];
36967 # 770 "/usr/include/icc34.h" 3 4
36968 } icUcrBg;
36969
36970
36971 typedef struct {
36972 icXYZNumber illuminant;
36973 icXYZNumber surround;
36974 icIlluminant stdIluminant;
36975 } icViewingCondition;
36976
36977
36978 typedef struct {
36979 icUInt32Number count;
36980 icInt8Number desc[1];
36981 } icCrdInfo;
36982 # 798 "/usr/include/icc34.h" 3 4
36983 typedef struct {
36984 icTagTypeSignature sig;
36985 icInt8Number reserved[4];
36986 } icTagBase;
36987
36988
36989 typedef struct {
36990 icTagBase base;
36991 icCurve curve;
36992 } icCurveType;
36993
36994
36995 typedef struct {
36996 icTagBase base;
36997 icData data;
36998 } icDataType;
36999
37000
37001 typedef struct {
37002 icTagBase base;
37003 icDateTimeNumber date;
37004 } icDateTimeType;
37005
37006
37007 typedef struct {
37008 icTagBase base;
37009 icLut16 lut;
37010 } icLut16Type;
37011
37012
37013 typedef struct {
37014 icTagBase base;
37015 icLut8 lut;
37016 } icLut8Type;
37017
37018
37019 typedef struct {
37020 icTagBase base;
37021 icMeasurement measurement;
37022 } icMeasurementType;
37023
37024
37025
37026 typedef struct {
37027 icTagBase base;
37028 icNamedColor2 ncolor;
37029 } icNamedColor2Type;
37030
37031
37032 typedef struct {
37033 icTagBase base;
37034 icProfileSequenceDesc desc;
37035 } icProfileSequenceDescType;
37036
37037
37038 typedef struct {
37039 icTagBase base;
37040 icTextDescription desc;
37041 } icTextDescriptionType;
37042
37043
37044 typedef struct {
37045 icTagBase base;
37046 icS15Fixed16Array data;
37047 } icS15Fixed16ArrayType;
37048
37049 typedef struct {
37050 icTagBase base;
37051 icScreening screen;
37052 } icScreeningType;
37053
37054
37055 typedef struct {
37056 icTagBase base;
37057 icSignature signature;
37058 } icSignatureType;
37059
37060
37061 typedef struct {
37062 icTagBase base;
37063 icText data;
37064 } icTextType;
37065
37066
37067 typedef struct {
37068 icTagBase base;
37069 icU16Fixed16Array data;
37070 } icU16Fixed16ArrayType;
37071
37072
37073 typedef struct {
37074 icTagBase base;
37075 icUcrBg data;
37076 } icUcrBgType;
37077
37078
37079 typedef struct {
37080 icTagBase base;
37081 icUInt16Array data;
37082 } icUInt16ArrayType;
37083
37084
37085 typedef struct {
37086 icTagBase base;
37087 icUInt32Array data;
37088 } icUInt32ArrayType;
37089
37090
37091 typedef struct {
37092 icTagBase base;
37093 icUInt64Array data;
37094 } icUInt64ArrayType;
37095
37096
37097 typedef struct {
37098 icTagBase base;
37099 icUInt8Array data;
37100 } icUInt8ArrayType;
37101
37102
37103 typedef struct {
37104 icTagBase base;
37105 icViewingCondition view;
37106 } icViewingConditionType;
37107
37108
37109 typedef struct {
37110 icTagBase base;
37111 icXYZArray data;
37112 } icXYZType;
37113
37114
37115
37116
37117 typedef struct {
37118 icTagBase base;
37119 icCrdInfo info;
37120 }icCrdInfoType;
37121 # 949 "/usr/include/icc34.h" 3 4
37122 typedef struct {
37123 icTagSignature sig;
37124 icUInt32Number offset;
37125
37126
37127 icUInt32Number size;
37128 } icTag;
37129
37130
37131 typedef struct {
37132 icUInt32Number count;
37133 icTag tags[1];
37134 } icTagList;
37135
37136
37137 typedef struct {
37138 icUInt32Number size;
37139 icSignature cmmId;
37140 icUInt32Number version;
37141 icProfileClassSignature deviceClass;
37142 icColorSpaceSignature colorSpace;
37143 icColorSpaceSignature pcs;
37144 icDateTimeNumber date;
37145 icSignature magic;
37146 icPlatformSignature platform;
37147 icUInt32Number flags;
37148 icSignature manufacturer;
37149 icUInt32Number model;
37150 icUInt64Number attributes;
37151 icUInt32Number renderingIntent;
37152 icXYZNumber illuminant;
37153 icSignature creator;
37154 icInt8Number reserved[44];
37155 } icHeader;
37156
37157
37158
37159
37160
37161 typedef struct {
37162 icHeader header;
37163 icUInt32Number count;
37164 icInt8Number data[1];
37165
37166
37167
37168
37169
37170
37171 } icProfile;
37172
37173
37174
37175
37176
37177 typedef struct {
37178 icUInt32Number vendorFlag;
37179 icUInt32Number count;
37180 icInt8Number data[1];
37181 # 1021 "/usr/include/icc34.h" 3 4
37182 } icNamedColor;
37183
37184
37185 typedef struct {
37186 icTagBase base;
37187 icNamedColor ncolor;
37188 } icNamedColorType;
37189 # 279 "/usr/include/lcms.h" 2 3 4
37190 # 317 "/usr/include/lcms.h" 3 4
37191 typedef struct {
37192 icUInt8Number gridPoints[16];
37193 icUInt8Number prec;
37194 icUInt8Number pad1;
37195 icUInt8Number pad2;
37196 icUInt8Number pad3;
37197
37198 } icCLutStruct;
37199
37200
37201 typedef struct {
37202 icUInt8Number inputChan;
37203 icUInt8Number outputChan;
37204 icUInt8Number pad1;
37205 icUInt8Number pad2;
37206 icUInt32Number offsetB;
37207 icUInt32Number offsetMat;
37208 icUInt32Number offsetM;
37209 icUInt32Number offsetC;
37210 icUInt32Number offsetA;
37211
37212 } icLutAtoB;
37213
37214
37215 typedef struct {
37216 icUInt8Number inputChan;
37217 icUInt8Number outputChan;
37218 icUInt8Number pad1;
37219 icUInt8Number pad2;
37220 icUInt32Number offsetB;
37221 icUInt32Number offsetMat;
37222 icUInt32Number offsetM;
37223 icUInt32Number offsetC;
37224 icUInt32Number offsetA;
37225
37226 } icLutBtoA;
37227
37228
37229
37230
37231
37232
37233 extern "C" {
37234 # 442 "/usr/include/lcms.h" 3 4
37235 typedef LCMSHANDLE cmsHPROFILE;
37236 typedef LCMSHANDLE cmsHTRANSFORM;
37237 # 688 "/usr/include/lcms.h" 3 4
37238 typedef struct {
37239
37240 unsigned int Crc32;
37241
37242
37243
37244 int Type;
37245 double Params[10];
37246
37247 } LCMSGAMMAPARAMS, * LPLCMSGAMMAPARAMS;
37248
37249
37250
37251 typedef struct {
37252
37253 LCMSGAMMAPARAMS Seed;
37254
37255
37256
37257 int nEntries;
37258 WORD GammaTable[1];
37259
37260 } GAMMATABLE;
37261
37262 typedef GAMMATABLE * LPGAMMATABLE;
37263
37264
37265 typedef struct {
37266
37267 int nItems;
37268 double* Values;
37269
37270 } SAMPLEDCURVE;
37271
37272 typedef SAMPLEDCURVE * LPSAMPLEDCURVE;
37273
37274
37275 typedef struct {
37276
37277 double n[3];
37278
37279 } VEC3;
37280
37281 typedef VEC3 * LPVEC3;
37282
37283
37284 typedef struct {
37285
37286 VEC3 v[3];
37287
37288 } MAT3;
37289
37290 typedef MAT3 * LPMAT3;
37291
37292
37293 typedef struct {
37294
37295 double X;
37296 double Y;
37297 double Z;
37298
37299 } cmsCIEXYZ;
37300
37301 typedef cmsCIEXYZ * LPcmsCIEXYZ;
37302
37303 typedef struct {
37304
37305 double x;
37306 double y;
37307 double Y;
37308
37309 } cmsCIExyY;
37310
37311 typedef cmsCIExyY * LPcmsCIExyY;
37312
37313 typedef struct {
37314
37315 double L;
37316 double a;
37317 double b;
37318
37319 } cmsCIELab;
37320
37321 typedef cmsCIELab * LPcmsCIELab;
37322
37323 typedef struct {
37324
37325 double L;
37326 double C;
37327 double h;
37328
37329 } cmsCIELCh;
37330
37331 typedef cmsCIELCh * LPcmsCIELCh;
37332
37333 typedef struct {
37334
37335 double J;
37336 double C;
37337 double h;
37338
37339 } cmsJCh;
37340
37341 typedef cmsJCh * LPcmsJCh;
37342
37343
37344 typedef struct {
37345
37346 cmsCIEXYZ Red;
37347 cmsCIEXYZ Green;
37348 cmsCIEXYZ Blue;
37349
37350 } cmsCIEXYZTRIPLE;
37351
37352 typedef cmsCIEXYZTRIPLE * LPcmsCIEXYZTRIPLE;
37353
37354
37355 typedef struct {
37356
37357 cmsCIExyY Red;
37358 cmsCIExyY Green;
37359 cmsCIExyY Blue;
37360
37361 } cmsCIExyYTRIPLE;
37362
37363 typedef cmsCIExyYTRIPLE * LPcmsCIExyYTRIPLE;
37364 # 829 "/usr/include/lcms.h" 3 4
37365 LPcmsCIEXYZ cmsD50_XYZ(void);
37366 LPcmsCIExyY cmsD50_xyY(void);
37367
37368
37369
37370
37371 cmsHPROFILE cmsOpenProfileFromFile(const char *ICCProfile, const char *sAccess);
37372 cmsHPROFILE cmsOpenProfileFromMem(LPVOID MemPtr, DWORD dwSize);
37373 LCMSBOOL cmsCloseProfile(cmsHPROFILE hProfile);
37374
37375
37376
37377 cmsHPROFILE cmsCreateRGBProfile(LPcmsCIExyY WhitePoint,
37378 LPcmsCIExyYTRIPLE Primaries,
37379 LPGAMMATABLE TransferFunction[3]);
37380
37381 cmsHPROFILE cmsCreateGrayProfile(LPcmsCIExyY WhitePoint,
37382 LPGAMMATABLE TransferFunction);
37383
37384 cmsHPROFILE cmsCreateLinearizationDeviceLink(icColorSpaceSignature ColorSpace,
37385 LPGAMMATABLE TransferFunctions[]);
37386
37387 cmsHPROFILE cmsCreateInkLimitingDeviceLink(icColorSpaceSignature ColorSpace,
37388 double Limit);
37389
37390
37391 cmsHPROFILE cmsCreateLabProfile(LPcmsCIExyY WhitePoint);
37392 cmsHPROFILE cmsCreateLab4Profile(LPcmsCIExyY WhitePoint);
37393
37394 cmsHPROFILE cmsCreateXYZProfile(void);
37395 cmsHPROFILE cmsCreate_sRGBProfile(void);
37396
37397
37398
37399 cmsHPROFILE cmsCreateBCHSWabstractProfile(int nLUTPoints,
37400 double Bright,
37401 double Contrast,
37402 double Hue,
37403 double Saturation,
37404 int TempSrc,
37405 int TempDest);
37406
37407 cmsHPROFILE cmsCreateNULLProfile(void);
37408
37409
37410
37411
37412 void cmsXYZ2xyY(LPcmsCIExyY Dest, const cmsCIEXYZ* Source);
37413 void cmsxyY2XYZ(LPcmsCIEXYZ Dest, const cmsCIExyY* Source);
37414 void cmsXYZ2Lab(LPcmsCIEXYZ WhitePoint, LPcmsCIELab Lab, const cmsCIEXYZ* xyz);
37415 void cmsLab2XYZ(LPcmsCIEXYZ WhitePoint, LPcmsCIEXYZ xyz, const cmsCIELab* Lab);
37416 void cmsLab2LCh(LPcmsCIELCh LCh, const cmsCIELab* Lab);
37417 void cmsLCh2Lab(LPcmsCIELab Lab, const cmsCIELCh* LCh);
37418
37419
37420
37421
37422 double cmsDeltaE(LPcmsCIELab Lab1, LPcmsCIELab Lab2);
37423 double cmsCIE94DeltaE(LPcmsCIELab Lab1, LPcmsCIELab Lab2);
37424 double cmsBFDdeltaE(LPcmsCIELab Lab1, LPcmsCIELab Lab2);
37425 double cmsCMCdeltaE(LPcmsCIELab Lab1, LPcmsCIELab Lab2);
37426 double cmsCIE2000DeltaE(LPcmsCIELab Lab1, LPcmsCIELab Lab2, double Kl, double Kc, double Kh);
37427
37428 void cmsClampLab(LPcmsCIELab Lab, double amax, double amin, double bmax, double bmin);
37429
37430 LCMSBOOL cmsWhitePointFromTemp(int TempK, LPcmsCIExyY WhitePoint);
37431
37432 LCMSBOOL cmsAdaptToIlluminant(LPcmsCIEXYZ Result,
37433 LPcmsCIEXYZ SourceWhitePt,
37434 LPcmsCIEXYZ Illuminant,
37435 LPcmsCIEXYZ Value);
37436
37437 LCMSBOOL cmsBuildRGB2XYZtransferMatrix(LPMAT3 r,
37438 LPcmsCIExyY WhitePoint,
37439 LPcmsCIExyYTRIPLE Primaries);
37440 # 916 "/usr/include/lcms.h" 3 4
37441 typedef struct {
37442
37443 cmsCIEXYZ whitePoint;
37444 double Yb;
37445 double La;
37446 int surround;
37447 double D_value;
37448
37449 } cmsViewingConditions;
37450
37451 typedef cmsViewingConditions * LPcmsViewingConditions;
37452
37453
37454
37455 LCMSHANDLE cmsCIECAM97sInit(LPcmsViewingConditions pVC2);
37456 void cmsCIECAM97sDone(LCMSHANDLE hModel);
37457 void cmsCIECAM97sForward(LCMSHANDLE hModel, LPcmsCIEXYZ pIn, LPcmsJCh pOut);
37458 void cmsCIECAM97sReverse(LCMSHANDLE hModel, LPcmsJCh pIn, LPcmsCIEXYZ pOut);
37459
37460
37461
37462
37463 LCMSHANDLE cmsCIECAM02Init(LPcmsViewingConditions pVC);
37464 void cmsCIECAM02Done(LCMSHANDLE hModel);
37465 void cmsCIECAM02Forward(LCMSHANDLE hModel, LPcmsCIEXYZ pIn, LPcmsJCh pOut);
37466 void cmsCIECAM02Reverse(LCMSHANDLE hModel, LPcmsJCh pIn, LPcmsCIEXYZ pOut);
37467
37468
37469
37470
37471 LPGAMMATABLE cmsBuildGamma(int nEntries, double Gamma);
37472 LPGAMMATABLE cmsBuildParametricGamma(int nEntries, int Type, double Params[]);
37473 LPGAMMATABLE cmsAllocGamma(int nEntries);
37474 void cmsFreeGamma(LPGAMMATABLE Gamma);
37475 void cmsFreeGammaTriple(LPGAMMATABLE Gamma[3]);
37476 LPGAMMATABLE cmsDupGamma(LPGAMMATABLE Src);
37477 LPGAMMATABLE cmsReverseGamma(int nResultSamples, LPGAMMATABLE InGamma);
37478 LPGAMMATABLE cmsJoinGamma(LPGAMMATABLE InGamma, LPGAMMATABLE OutGamma);
37479 LPGAMMATABLE cmsJoinGammaEx(LPGAMMATABLE InGamma, LPGAMMATABLE OutGamma, int nPoints);
37480 LCMSBOOL cmsSmoothGamma(LPGAMMATABLE Tab, double lambda);
37481 double cmsEstimateGamma(LPGAMMATABLE t);
37482 double cmsEstimateGammaEx(LPWORD Table, int nEntries, double Thereshold);
37483 LPGAMMATABLE cmsReadICCGamma(cmsHPROFILE hProfile, icTagSignature sig);
37484 LPGAMMATABLE cmsReadICCGammaReversed(cmsHPROFILE hProfile, icTagSignature sig);
37485
37486
37487
37488 LCMSBOOL cmsTakeMediaWhitePoint(LPcmsCIEXYZ Dest, cmsHPROFILE hProfile);
37489 LCMSBOOL cmsTakeMediaBlackPoint(LPcmsCIEXYZ Dest, cmsHPROFILE hProfile);
37490 LCMSBOOL cmsTakeIluminant(LPcmsCIEXYZ Dest, cmsHPROFILE hProfile);
37491 LCMSBOOL cmsTakeColorants(LPcmsCIEXYZTRIPLE Dest, cmsHPROFILE hProfile);
37492 DWORD cmsTakeHeaderFlags(cmsHPROFILE hProfile);
37493 DWORD cmsTakeHeaderAttributes(cmsHPROFILE hProfile);
37494
37495 void cmsSetLanguage(const char LanguageCode[4], const char CountryCode[4]);
37496 const char* cmsTakeProductName(cmsHPROFILE hProfile);
37497 const char* cmsTakeProductDesc(cmsHPROFILE hProfile);
37498 const char* cmsTakeProductInfo(cmsHPROFILE hProfile);
37499 const char* cmsTakeManufacturer(cmsHPROFILE hProfile);
37500 const char* cmsTakeModel(cmsHPROFILE hProfile);
37501 const char* cmsTakeCopyright(cmsHPROFILE hProfile);
37502 const BYTE* cmsTakeProfileID(cmsHPROFILE hProfile);
37503
37504 LCMSBOOL cmsTakeCreationDateTime(struct tm *Dest, cmsHPROFILE hProfile);
37505 LCMSBOOL cmsTakeCalibrationDateTime(struct tm *Dest, cmsHPROFILE hProfile);
37506
37507 LCMSBOOL cmsIsTag(cmsHPROFILE hProfile, icTagSignature sig);
37508 int cmsTakeRenderingIntent(cmsHPROFILE hProfile);
37509
37510 LCMSBOOL cmsTakeCharTargetData(cmsHPROFILE hProfile, char** Data, size_t* len);
37511
37512 int cmsReadICCTextEx(cmsHPROFILE hProfile, icTagSignature sig, char *Text, size_t size);
37513 int cmsReadICCText(cmsHPROFILE hProfile, icTagSignature sig, char *Text);
37514
37515
37516
37517
37518 typedef struct {
37519
37520 icSignature deviceMfg;
37521 icSignature deviceModel;
37522 icUInt32Number attributes[2];
37523 icTechnologySignature technology;
37524
37525 char Manufacturer[512];
37526 char Model[512];
37527
37528 } cmsPSEQDESC, *LPcmsPSEQDESC;
37529
37530 typedef struct {
37531
37532 int n;
37533 cmsPSEQDESC seq[1];
37534
37535 } cmsSEQ, *LPcmsSEQ;
37536
37537
37538 LPcmsSEQ cmsReadProfileSequenceDescription(cmsHPROFILE hProfile);
37539 void cmsFreeProfileSequenceDescription(LPcmsSEQ pseq);
37540
37541
37542
37543 icColorSpaceSignature _cmsICCcolorSpace(int OurNotation);
37544 int _cmsLCMScolorSpace(icColorSpaceSignature ProfileSpace);
37545 int _cmsChannelsOf(icColorSpaceSignature ColorSpace);
37546 LCMSBOOL _cmsIsMatrixShaper(cmsHPROFILE hProfile);
37547
37548
37549
37550
37551
37552
37553 LCMSBOOL cmsIsIntentSupported(cmsHPROFILE hProfile, int Intent, int UsedDirection);
37554
37555 icColorSpaceSignature cmsGetPCS(cmsHPROFILE hProfile);
37556 icColorSpaceSignature cmsGetColorSpace(cmsHPROFILE hProfile);
37557 icProfileClassSignature cmsGetDeviceClass(cmsHPROFILE hProfile);
37558 DWORD cmsGetProfileICCversion(cmsHPROFILE hProfile);
37559 void cmsSetProfileICCversion(cmsHPROFILE hProfile, DWORD Version);
37560 icInt32Number cmsGetTagCount(cmsHPROFILE hProfile);
37561 icTagSignature cmsGetTagSignature(cmsHPROFILE hProfile, icInt32Number n);
37562
37563
37564 void cmsSetDeviceClass(cmsHPROFILE hProfile, icProfileClassSignature sig);
37565 void cmsSetColorSpace(cmsHPROFILE hProfile, icColorSpaceSignature sig);
37566 void cmsSetPCS(cmsHPROFILE hProfile, icColorSpaceSignature pcs);
37567 void cmsSetRenderingIntent(cmsHPROFILE hProfile, int RenderingIntent);
37568 void cmsSetHeaderFlags(cmsHPROFILE hProfile, DWORD Flags);
37569 void cmsSetHeaderAttributes(cmsHPROFILE hProfile, DWORD Flags);
37570 void cmsSetProfileID(cmsHPROFILE hProfile, LPBYTE ProfileID);
37571 # 1097 "/usr/include/lcms.h" 3 4
37572 cmsHTRANSFORM cmsCreateTransform(cmsHPROFILE Input,
37573 DWORD InputFormat,
37574 cmsHPROFILE Output,
37575 DWORD OutputFormat,
37576 int Intent,
37577 DWORD dwFlags);
37578
37579 cmsHTRANSFORM cmsCreateProofingTransform(cmsHPROFILE Input,
37580 DWORD InputFormat,
37581 cmsHPROFILE Output,
37582 DWORD OutputFormat,
37583 cmsHPROFILE Proofing,
37584 int Intent,
37585 int ProofingIntent,
37586 DWORD dwFlags);
37587
37588 cmsHTRANSFORM cmsCreateMultiprofileTransform(cmsHPROFILE hProfiles[],
37589 int nProfiles,
37590 DWORD InputFormat,
37591 DWORD OutputFormat,
37592 int Intent,
37593 DWORD dwFlags);
37594
37595 void cmsDeleteTransform(cmsHTRANSFORM hTransform);
37596
37597 void cmsDoTransform(cmsHTRANSFORM Transform,
37598 LPVOID InputBuffer,
37599 LPVOID OutputBuffer,
37600 unsigned int Size);
37601
37602 void cmsChangeBuffersFormat(cmsHTRANSFORM hTransform, DWORD InputFormat, DWORD dwOutputFormat);
37603
37604 void cmsSetAlarmCodes(int r, int g, int b);
37605 void cmsGetAlarmCodes(int *r, int *g, int *b);
37606
37607
37608
37609
37610 double cmsSetAdaptationState(double d);
37611
37612
37613
37614
37615
37616
37617
37618 int cmsSetCMYKPreservationStrategy(int n);
37619
37620
37621 typedef struct {
37622 char Name[(256)];
37623 WORD PCS[3];
37624 WORD DeviceColorant[16];
37625
37626
37627 } cmsNAMEDCOLOR, * LPcmsNAMEDCOLOR;
37628
37629 typedef struct {
37630 int nColors;
37631 int Allocated;
37632 int ColorantCount;
37633 char Prefix[33];
37634 char Suffix[33];
37635
37636 cmsNAMEDCOLOR List[1];
37637
37638 } cmsNAMEDCOLORLIST, * LPcmsNAMEDCOLORLIST;
37639
37640
37641
37642 int cmsNamedColorCount(cmsHTRANSFORM xform);
37643 LCMSBOOL cmsNamedColorInfo(cmsHTRANSFORM xform, int nColor, char* Name, char* Prefix, char* Suffix);
37644 int cmsNamedColorIndex(cmsHTRANSFORM xform, const char* Name);
37645
37646
37647
37648 LPcmsNAMEDCOLORLIST cmsReadColorantTable(cmsHPROFILE hProfile, icTagSignature sig);
37649
37650
37651
37652 LCMSBOOL cmsAddTag(cmsHPROFILE hProfile, icTagSignature sig, const void* data);
37653
37654
37655 cmsHPROFILE cmsTransform2DeviceLink(cmsHTRANSFORM hTransform, DWORD dwFlags);
37656
37657
37658 void _cmsSetLUTdepth(cmsHPROFILE hProfile, int depth);
37659
37660
37661
37662 LCMSBOOL _cmsSaveProfile(cmsHPROFILE hProfile, const char* FileName);
37663 LCMSBOOL _cmsSaveProfileToMem(cmsHPROFILE hProfile, void *MemPtr,
37664 size_t* BytesNeeded);
37665
37666
37667
37668
37669
37670 DWORD cmsGetPostScriptCSA(cmsHPROFILE hProfile, int Intent, LPVOID Buffer, DWORD dwBufferLen);
37671 DWORD cmsGetPostScriptCRD(cmsHPROFILE hProfile, int Intent, LPVOID Buffer, DWORD dwBufferLen);
37672 DWORD cmsGetPostScriptCRDEx(cmsHPROFILE hProfile, int Intent, DWORD dwFlags, LPVOID Buffer, DWORD dwBufferLen);
37673 # 1206 "/usr/include/lcms.h" 3 4
37674 int cmsErrorAction(int nAction);
37675
37676
37677
37678
37679
37680 typedef int (* cmsErrorHandlerFunction)(int ErrorCode, const char *ErrorText);
37681
37682 void cmsSetErrorHandler(cmsErrorHandlerFunction Fn);
37683
37684
37685
37686
37687
37688 typedef struct _lcms_LUT_struc LUT, * LPLUT;
37689
37690 LPLUT cmsAllocLUT(void);
37691 LPLUT cmsAllocLinearTable(LPLUT NewLUT, LPGAMMATABLE Tables[], int nTable);
37692 LPLUT cmsAlloc3DGrid(LPLUT Lut, int clutPoints, int inputChan, int outputChan);
37693 LPLUT cmsSetMatrixLUT(LPLUT Lut, LPMAT3 M);
37694 LPLUT cmsSetMatrixLUT4(LPLUT Lut, LPMAT3 M, LPVEC3 off, DWORD dwFlags);
37695 void cmsFreeLUT(LPLUT Lut);
37696 void cmsEvalLUT(LPLUT Lut, WORD In[], WORD Out[]);
37697 double cmsEvalLUTreverse(LPLUT Lut, WORD Target[], WORD Result[], LPWORD Hint);
37698 LPLUT cmsReadICCLut(cmsHPROFILE hProfile, icTagSignature sig);
37699 LPLUT cmsDupLUT(LPLUT Orig);
37700
37701
37702
37703 typedef int (* _cmsSAMPLER)(register WORD In[],
37704 register WORD Out[],
37705 register LPVOID Cargo);
37706
37707
37708
37709
37710
37711 int cmsSample3DGrid(LPLUT Lut, _cmsSAMPLER Sampler, LPVOID Cargo, DWORD dwFlags);
37712
37713
37714
37715 typedef unsigned char* (* cmsFORMATTER)(register void* CMMcargo,
37716 register WORD ToUnroll[],
37717 register LPBYTE Buffer);
37718
37719 void cmsSetUserFormatters(cmsHTRANSFORM hTransform, DWORD dwInput, cmsFORMATTER Input,
37720 DWORD dwOutput, cmsFORMATTER Output);
37721
37722 void cmsGetUserFormatters(cmsHTRANSFORM hTransform,
37723 LPDWORD InputFormat, cmsFORMATTER* Input,
37724 LPDWORD OutputFormat, cmsFORMATTER* Output);
37725
37726
37727
37728
37729 LCMSHANDLE cmsIT8Alloc(void);
37730 void cmsIT8Free(LCMSHANDLE IT8);
37731
37732
37733
37734 int cmsIT8TableCount(LCMSHANDLE IT8);
37735 int cmsIT8SetTable(LCMSHANDLE IT8, int nTable);
37736
37737
37738 LCMSHANDLE cmsIT8LoadFromFile(const char* cFileName);
37739 LCMSHANDLE cmsIT8LoadFromMem(void *Ptr, size_t len);
37740 LCMSBOOL cmsIT8SaveToFile(LCMSHANDLE IT8, const char* cFileName);
37741 LCMSBOOL cmsIT8SaveToMem(LCMSHANDLE hIT8, void *MemPtr, size_t* BytesNeeded);
37742
37743
37744 const char* cmsIT8GetSheetType(LCMSHANDLE hIT8);
37745 LCMSBOOL cmsIT8SetSheetType(LCMSHANDLE hIT8, const char* Type);
37746
37747 LCMSBOOL cmsIT8SetComment(LCMSHANDLE hIT8, const char* cComment);
37748
37749 LCMSBOOL cmsIT8SetPropertyStr(LCMSHANDLE hIT8, const char* cProp, const char *Str);
37750 LCMSBOOL cmsIT8SetPropertyDbl(LCMSHANDLE hIT8, const char* cProp, double Val);
37751 LCMSBOOL cmsIT8SetPropertyHex(LCMSHANDLE hIT8, const char* cProp, int Val);
37752
37753 LCMSBOOL cmsIT8SetPropertyUncooked(LCMSHANDLE hIT8, const char* Key, const char* Buffer);
37754
37755
37756 const char* cmsIT8GetProperty(LCMSHANDLE hIT8, const char* cProp);
37757 double cmsIT8GetPropertyDbl(LCMSHANDLE hIT8, const char* cProp);
37758 int cmsIT8EnumProperties(LCMSHANDLE IT8, char ***PropertyNames);
37759
37760
37761
37762 const char* cmsIT8GetDataRowCol(LCMSHANDLE IT8, int row, int col);
37763 double cmsIT8GetDataRowColDbl(LCMSHANDLE IT8, int row, int col);
37764
37765 LCMSBOOL cmsIT8SetDataRowCol(LCMSHANDLE hIT8, int row, int col,
37766 const char* Val);
37767
37768 LCMSBOOL cmsIT8SetDataRowColDbl(LCMSHANDLE hIT8, int row, int col,
37769 double Val);
37770
37771 const char* cmsIT8GetData(LCMSHANDLE IT8, const char* cPatch, const char* cSample);
37772
37773
37774 double cmsIT8GetDataDbl(LCMSHANDLE IT8, const char* cPatch, const char* cSample);
37775
37776 LCMSBOOL cmsIT8SetData(LCMSHANDLE IT8, const char* cPatch,
37777 const char* cSample,
37778 const char *Val);
37779
37780 LCMSBOOL cmsIT8SetDataDbl(LCMSHANDLE hIT8, const char* cPatch,
37781 const char* cSample,
37782 double Val);
37783
37784 int cmsIT8GetDataFormat(LCMSHANDLE hIT8, const char* cSample);
37785 LCMSBOOL cmsIT8SetDataFormat(LCMSHANDLE IT8, int n, const char *Sample);
37786 int cmsIT8EnumDataFormat(LCMSHANDLE IT8, char ***SampleNames);
37787
37788
37789 const char* cmsIT8GetPatchName(LCMSHANDLE hIT8, int nPatch, char* buffer);
37790
37791
37792
37793 int cmsIT8SetTableByLabel(LCMSHANDLE hIT8, const char* cSet, const char* cField, const char* ExpectedType);
37794
37795
37796 void cmsIT8DefineDblFormat(LCMSHANDLE IT8, const char* Formatter);
37797 # 1342 "/usr/include/lcms.h" 3 4
37798 void cmsLabEncoded2Float(LPcmsCIELab Lab, const WORD wLab[3]);
37799 void cmsLabEncoded2Float4(LPcmsCIELab Lab, const WORD wLab[3]);
37800 void cmsFloat2LabEncoded(WORD wLab[3], const cmsCIELab* Lab);
37801 void cmsFloat2LabEncoded4(WORD wLab[3], const cmsCIELab* Lab);
37802 void cmsXYZEncoded2Float(LPcmsCIEXYZ fxyz, const WORD XYZ[3]);
37803 void cmsFloat2XYZEncoded(WORD XYZ[3], const cmsCIEXYZ* fXYZ);
37804
37805
37806
37807
37808 LCMSBOOL _cmsAddTextTag(cmsHPROFILE hProfile, icTagSignature sig, const char* Text);
37809 LCMSBOOL _cmsAddXYZTag(cmsHPROFILE hProfile, icTagSignature sig, const cmsCIEXYZ* XYZ);
37810 LCMSBOOL _cmsAddLUTTag(cmsHPROFILE hProfile, icTagSignature sig, const void* lut);
37811 LCMSBOOL _cmsAddGammaTag(cmsHPROFILE hProfile, icTagSignature sig, LPGAMMATABLE TransferFunction);
37812 LCMSBOOL _cmsAddChromaticityTag(cmsHPROFILE hProfile, icTagSignature sig, LPcmsCIExyYTRIPLE Chrm);
37813 LCMSBOOL _cmsAddSequenceDescriptionTag(cmsHPROFILE hProfile, icTagSignature sig, LPcmsSEQ PSeq);
37814 LCMSBOOL _cmsAddNamedColorTag(cmsHPROFILE hProfile, icTagSignature sig, LPcmsNAMEDCOLORLIST nc);
37815 LCMSBOOL _cmsAddDateTimeTag(cmsHPROFILE hProfile, icTagSignature sig, struct tm *DateTime);
37816 LCMSBOOL _cmsAddColorantTableTag(cmsHPROFILE hProfile, icTagSignature sig, LPcmsNAMEDCOLORLIST nc);
37817 LCMSBOOL _cmsAddChromaticAdaptationTag(cmsHPROFILE hProfile, icTagSignature sig, const cmsCIEXYZ* mat);
37818 # 1370 "/usr/include/lcms.h" 3 4
37819 static inline int _cmsQuickFloor(double val)
37820 {
37821
37822
37823
37824 const double _lcms_double2fixmagic = 68719476736.0 * 1.5;
37825 union {
37826 double val;
37827 int halves[2];
37828 } temp;
37829
37830 temp.val = val + _lcms_double2fixmagic;
37831
37832
37833
37834 return temp.halves[1] >> 16;
37835
37836
37837
37838
37839 }
37840
37841
37842
37843
37844
37845 static inline WORD _cmsClampWord(int in)
37846 {
37847 if (in < 0) return 0;
37848 if (in > 0xFFFF) return 0xFFFFU;
37849 return (WORD) in;
37850 }
37851
37852
37853
37854
37855
37856 static inline void* _cmsMalloc(size_t size)
37857 {
37858 if (size > ((size_t) 1024*1024*500)) return __null;
37859 if (size < 0) return __null;
37860
37861 return (void*) malloc(size);
37862 }
37863
37864
37865 static inline void _cmsFree(void *Ptr)
37866 {
37867 if (Ptr) free(Ptr);
37868 }
37869
37870
37871
37872
37873
37874
37875
37876 void cmsSignalError(int ErrorCode, const char *ErrorText, ...);
37877
37878
37879
37880 typedef struct {
37881 icS15Fixed16Number a;
37882 icUInt16Number b;
37883
37884 } _cmsTestAlign16;
37885
37886
37887
37888 typedef struct {
37889 icS15Fixed16Number a;
37890 icUInt8Number b;
37891
37892 } _cmsTestAlign8;
37893
37894
37895
37896
37897
37898
37899
37900 typedef icInt32Number Fixed32;
37901 # 1461 "/usr/include/lcms.h" 3 4
37902 Fixed32 FixedMul(Fixed32 a, Fixed32 b);
37903 Fixed32 FixedSquare(Fixed32 a);
37904
37905
37906
37907
37908 static inline Fixed32 ToFixedDomain(int a) { return a + ((a + 0x7fff) / 0xffff); }
37909 static inline int FromFixedDomain(Fixed32 a) { return a - ((a + 0x7fff) >> 16); }
37910 # 1477 "/usr/include/lcms.h" 3 4
37911 Fixed32 FixedLERP(Fixed32 a, Fixed32 l, Fixed32 h);
37912 WORD FixedScale(WORD a, Fixed32 s);
37913 # 1489 "/usr/include/lcms.h" 3 4
37914 typedef struct {
37915 Fixed32 n[3];
37916 } WVEC3, * LPWVEC3;
37917
37918 typedef struct {
37919 WVEC3 v[3];
37920 } WMAT3, * LPWMAT3;
37921
37922
37923
37924 void VEC3init(LPVEC3 r, double x, double y, double z);
37925 void VEC3initF(LPWVEC3 r, double x, double y, double z);
37926 void VEC3toFix(LPWVEC3 r, LPVEC3 v);
37927 void VEC3fromFix(LPVEC3 r, LPWVEC3 v);
37928 void VEC3scaleFix(LPWORD r, LPWVEC3 Scale);
37929 void VEC3swap(LPVEC3 a, LPVEC3 b);
37930 void VEC3divK(LPVEC3 r, LPVEC3 v, double d);
37931 void VEC3perK(LPVEC3 r, LPVEC3 v, double d);
37932 void VEC3minus(LPVEC3 r, LPVEC3 a, LPVEC3 b);
37933 void VEC3perComp(LPVEC3 r, LPVEC3 a, LPVEC3 b);
37934 LCMSBOOL VEC3equal(LPWVEC3 a, LPWVEC3 b, double Tolerance);
37935 LCMSBOOL VEC3equalF(LPVEC3 a, LPVEC3 b, double Tolerance);
37936 void VEC3scaleAndCut(LPWVEC3 r, LPVEC3 v, double d);
37937 void VEC3cross(LPVEC3 r, LPVEC3 u, LPVEC3 v);
37938 void VEC3saturate(LPVEC3 v);
37939 double VEC3distance(LPVEC3 a, LPVEC3 b);
37940 double VEC3length(LPVEC3 a);
37941
37942 void MAT3identity(LPMAT3 a);
37943 void MAT3per(LPMAT3 r, LPMAT3 a, LPMAT3 b);
37944 void MAT3perK(LPMAT3 r, LPMAT3 v, double d);
37945 int MAT3inverse(LPMAT3 a, LPMAT3 b);
37946 LCMSBOOL MAT3solve(LPVEC3 x, LPMAT3 a, LPVEC3 b);
37947 double MAT3det(LPMAT3 m);
37948 void MAT3eval(LPVEC3 r, LPMAT3 a, LPVEC3 v);
37949 void MAT3toFix(LPWMAT3 r, LPMAT3 v);
37950 void MAT3fromFix(LPMAT3 r, LPWMAT3 v);
37951 void MAT3evalW(LPWVEC3 r, LPWMAT3 a, LPWVEC3 v);
37952 LCMSBOOL MAT3isIdentity(LPWMAT3 a, double Tolerance);
37953 void MAT3scaleAndCut(LPWMAT3 r, LPMAT3 v, double d);
37954
37955
37956
37957 int cmsIsLinear(WORD Table[], int nEntries);
37958
37959
37960
37961
37962 struct _lcms_l16params_struc;
37963
37964 typedef void (* _cms3DLERP)(WORD Input[],
37965 WORD Output[],
37966 WORD LutTable[],
37967 struct _lcms_l16params_struc* p);
37968
37969
37970
37971 typedef struct _lcms_l8opt_struc {
37972
37973 unsigned int X0[256], Y0[256], Z0[256];
37974 WORD rx[256], ry[256], rz[256];
37975
37976 } L8PARAMS, * LPL8PARAMS;
37977
37978 typedef struct _lcms_l16params_struc {
37979
37980 int nSamples;
37981 int nInputs;
37982 int nOutputs;
37983
37984 WORD Domain;
37985
37986 int opta1, opta2;
37987 int opta3, opta4;
37988 int opta5, opta6;
37989 int opta7, opta8;
37990
37991 _cms3DLERP Interp3D;
37992
37993 LPL8PARAMS p8;
37994
37995 } L16PARAMS, *LPL16PARAMS;
37996
37997
37998 void cmsCalcL16Params(int nSamples, LPL16PARAMS p);
37999 void cmsCalcCLUT16Params(int nSamples, int InputChan, int OutputChan, LPL16PARAMS p);
38000 void cmsCalcCLUT16ParamsEx(int nSamples, int InputChan, int OutputChan,
38001 LCMSBOOL lUseTetrahedral, LPL16PARAMS p);
38002
38003 WORD cmsLinearInterpLUT16(WORD Value, WORD LutTable[], LPL16PARAMS p);
38004 Fixed32 cmsLinearInterpFixed(WORD Value1, WORD LutTable[], LPL16PARAMS p);
38005 WORD cmsReverseLinearInterpLUT16(WORD Value, WORD LutTable[], LPL16PARAMS p);
38006
38007 void cmsTrilinearInterp16(WORD Input[],
38008 WORD Output[],
38009 WORD LutTable[],
38010 LPL16PARAMS p);
38011
38012 void cmsTetrahedralInterp16(WORD Input[],
38013 WORD Output[],
38014 WORD LutTable[], LPL16PARAMS p);
38015
38016 void cmsTetrahedralInterp8(WORD Input[],
38017 WORD Output[],
38018 WORD LutTable[], LPL16PARAMS p);
38019 # 1618 "/usr/include/lcms.h" 3 4
38020 struct _lcms_LUT_struc {
38021
38022 DWORD wFlags;
38023 WMAT3 Matrix;
38024
38025 unsigned int InputChan;
38026 unsigned int OutputChan;
38027 unsigned int InputEntries;
38028 unsigned int OutputEntries;
38029 unsigned int cLutPoints;
38030
38031
38032 LPWORD L1[16];
38033 LPWORD L2[16];
38034
38035 LPWORD T;
38036 unsigned int Tsize;
38037
38038
38039
38040 L16PARAMS In16params;
38041 L16PARAMS Out16params;
38042 L16PARAMS CLut16params;
38043
38044 int Intent;
38045
38046
38047
38048 WMAT3 Mat3;
38049 WVEC3 Ofs3;
38050 LPWORD L3[16];
38051 L16PARAMS L3params;
38052 unsigned int L3Entries;
38053
38054 WMAT3 Mat4;
38055 WVEC3 Ofs4;
38056 LPWORD L4[16];
38057 L16PARAMS L4params;
38058 unsigned int L4Entries;
38059
38060
38061
38062 LCMSBOOL FixGrayAxes;
38063
38064
38065
38066
38067 LCMSGAMMAPARAMS LCurvesSeed[4][16];
38068
38069
38070 };
38071
38072
38073 LCMSBOOL _cmsSmoothEndpoints(LPWORD Table, int nEntries);
38074
38075
38076
38077
38078 unsigned int _cmsCrc32OfGammaTable(LPGAMMATABLE Table);
38079
38080
38081
38082 LPSAMPLEDCURVE cmsAllocSampledCurve(int nItems);
38083 void cmsFreeSampledCurve(LPSAMPLEDCURVE p);
38084 LPSAMPLEDCURVE cmsDupSampledCurve(LPSAMPLEDCURVE p);
38085
38086 LPSAMPLEDCURVE cmsConvertGammaToSampledCurve(LPGAMMATABLE Gamma, int nPoints);
38087 LPGAMMATABLE cmsConvertSampledCurveToGamma(LPSAMPLEDCURVE Sampled, double Max);
38088
38089 void cmsEndpointsOfSampledCurve(LPSAMPLEDCURVE p, double* Min, double* Max);
38090 void cmsClampSampledCurve(LPSAMPLEDCURVE p, double Min, double Max);
38091 LCMSBOOL cmsSmoothSampledCurve(LPSAMPLEDCURVE Tab, double SmoothingLambda);
38092 void cmsRescaleSampledCurve(LPSAMPLEDCURVE p, double Min, double Max, int nPoints);
38093
38094 LPSAMPLEDCURVE cmsJoinSampledCurves(LPSAMPLEDCURVE X, LPSAMPLEDCURVE Y, int nResultingPoints);
38095 # 1704 "/usr/include/lcms.h" 3 4
38096 typedef struct {
38097 DWORD dwFlags;
38098
38099 WMAT3 Matrix;
38100
38101 L16PARAMS p16;
38102 LPWORD L[3];
38103
38104 L16PARAMS p2_16;
38105 LPWORD L2[3];
38106
38107 } MATSHAPER, * LPMATSHAPER;
38108
38109 LPMATSHAPER cmsAllocMatShaper(LPMAT3 matrix, LPGAMMATABLE Shaper[], DWORD Behaviour);
38110 LPMATSHAPER cmsAllocMatShaper2(LPMAT3 matrix, LPGAMMATABLE In[], LPGAMMATABLE Out[], DWORD Behaviour);
38111
38112 void cmsFreeMatShaper(LPMATSHAPER MatShaper);
38113 void cmsEvalMatShaper(LPMATSHAPER MatShaper, WORD In[], WORD Out[]);
38114
38115 LCMSBOOL cmsReadICCMatrixRGB2XYZ(LPMAT3 r, cmsHPROFILE hProfile);
38116
38117 LPMATSHAPER cmsBuildInputMatrixShaper(cmsHPROFILE InputProfile);
38118 LPMATSHAPER cmsBuildOutputMatrixShaper(cmsHPROFILE OutputProfile);
38119
38120
38121
38122
38123 LCMSBOOL cmsAdaptationMatrix(LPMAT3 r, LPMAT3 ConeMatrix, LPcmsCIEXYZ FromIll, LPcmsCIEXYZ ToIll);
38124 LCMSBOOL cmsAdaptMatrixToD50(LPMAT3 r, LPcmsCIExyY SourceWhitePt);
38125 LCMSBOOL cmsAdaptMatrixFromD50(LPMAT3 r, LPcmsCIExyY DestWhitePt);
38126
38127 LCMSBOOL cmsReadChromaticAdaptationMatrix(LPMAT3 r, cmsHPROFILE hProfile);
38128
38129
38130 void cmsXYZ2LabEncoded(WORD XYZ[3], WORD Lab[3]);
38131 void cmsLab2XYZEncoded(WORD Lab[3], WORD XYZ[3]);
38132
38133
38134 void _cmsIdentifyWhitePoint(char *Buffer, LPcmsCIEXYZ WhitePt);
38135
38136
38137 WORD _cmsQuantizeVal(double i, int MaxSamples);
38138
38139 LPcmsNAMEDCOLORLIST cmsAllocNamedColorList(int n);
38140 int cmsReadICCnamedColorList(cmsHTRANSFORM xform, cmsHPROFILE hProfile, icTagSignature sig);
38141 void cmsFreeNamedColorList(LPcmsNAMEDCOLORLIST List);
38142 LCMSBOOL cmsAppendNamedColor(cmsHTRANSFORM xform, const char* Name, WORD PCS[3], WORD Colorant[16]);
38143 # 1759 "/usr/include/lcms.h" 3 4
38144 typedef struct _lcms_iccprofile_struct {
38145
38146 void* stream;
38147
38148
38149
38150
38151
38152 icProfileClassSignature DeviceClass;
38153 icColorSpaceSignature ColorSpace;
38154 icColorSpaceSignature PCS;
38155 icRenderingIntent RenderingIntent;
38156 icUInt32Number flags;
38157 icUInt32Number attributes;
38158 cmsCIEXYZ Illuminant;
38159
38160
38161
38162 icUInt32Number Version;
38163 MAT3 ChromaticAdaptation;
38164 cmsCIEXYZ MediaWhitePoint;
38165 cmsCIEXYZ MediaBlackPoint;
38166 BYTE ProfileID[16];
38167
38168
38169
38170
38171 icInt32Number TagCount;
38172 icTagSignature TagNames[100];
38173 size_t TagSizes[100];
38174 size_t TagOffsets[100];
38175 LPVOID TagPtrs[100];
38176
38177 char PhysicalFile[(256)];
38178
38179 LCMSBOOL IsWrite;
38180 LCMSBOOL SaveAs8Bits;
38181
38182 struct tm Created;
38183
38184
38185
38186 size_t (* Read)(void *buffer, size_t size, size_t count, struct _lcms_iccprofile_struct* Icc);
38187
38188 LCMSBOOL (* Seek)(struct _lcms_iccprofile_struct* Icc, size_t offset);
38189 LCMSBOOL (* Close)(struct _lcms_iccprofile_struct* Icc);
38190 size_t (* Tell)(struct _lcms_iccprofile_struct* Icc);
38191
38192
38193
38194 LCMSBOOL (* Write)(struct _lcms_iccprofile_struct* Icc, size_t size, LPVOID Ptr);
38195
38196 size_t UsedSpace;
38197
38198
38199 } LCMSICCPROFILE, * LPLCMSICCPROFILE;
38200
38201
38202
38203 cmsHPROFILE _cmsCreateProfilePlaceholder(void);
38204
38205
38206 icInt32Number _cmsSearchTag(LPLCMSICCPROFILE Profile, icTagSignature sig, LCMSBOOL lSignalError);
38207
38208
38209 LPVOID _cmsInitTag(LPLCMSICCPROFILE Icc, icTagSignature sig, size_t size, const void* Init);
38210
38211
38212 LPLCMSICCPROFILE _cmsCreateProfileFromFilePlaceholder(const char* FileName);
38213 LPLCMSICCPROFILE _cmsCreateProfileFromMemPlaceholder(LPVOID MemPtr, DWORD dwSize);
38214
38215 void _cmsSetSaveToDisk(LPLCMSICCPROFILE Icc, const char* FileName);
38216 void _cmsSetSaveToMemory(LPLCMSICCPROFILE Icc, LPVOID MemPtr, size_t dwSize);
38217 # 1850 "/usr/include/lcms.h" 3 4
38218 struct _cmstransform_struct;
38219
38220
38221 typedef void (* _cmsCOLORCALLBACKFN)(struct _cmstransform_struct *Transform,
38222 LPVOID InputBuffer,
38223 LPVOID OutputBuffer, unsigned int Size);
38224
38225
38226
38227 typedef void (* _cmsADJFN)(WORD In[], WORD Out[], LPWMAT3 m, LPWVEC3 b);
38228
38229 typedef void (* _cmsTRANSFN)(struct _cmstransform_struct *Transform,
38230 WORD In[], WORD Out[]);
38231
38232 typedef void (* _cmsCNVRT)(WORD In[], WORD Out[]);
38233
38234 typedef LPBYTE (* _cmsFIXFN)(register struct _cmstransform_struct *info,
38235 register WORD ToUnroll[],
38236 register LPBYTE Buffer);
38237
38238
38239
38240
38241 typedef struct _cmstransform_struct {
38242
38243
38244 DWORD InputFormat, OutputFormat;
38245
38246 DWORD StrideIn, StrideOut;
38247
38248 int Intent, ProofIntent;
38249 int DoGamutCheck;
38250
38251
38252 cmsHPROFILE InputProfile;
38253 cmsHPROFILE OutputProfile;
38254 cmsHPROFILE PreviewProfile;
38255
38256 icColorSpaceSignature EntryColorSpace;
38257 icColorSpaceSignature ExitColorSpace;
38258
38259 DWORD dwOriginalFlags;
38260
38261 WMAT3 m1, m2;
38262 WVEC3 of1, of2;
38263
38264 _cmsCOLORCALLBACKFN xform;
38265
38266
38267
38268 _cmsFIXFN FromInput;
38269 _cmsTRANSFN FromDevice;
38270 _cmsADJFN Stage1;
38271 _cmsADJFN Stage2;
38272 _cmsTRANSFN ToDevice;
38273 _cmsFIXFN ToOutput;
38274
38275
38276
38277 LPLUT Device2PCS;
38278 LPLUT PCS2Device;
38279 LPLUT Gamut;
38280 LPLUT Preview;
38281
38282 LPLUT DeviceLink;
38283 LPLUT GamutCheck;
38284
38285
38286
38287 LPMATSHAPER InMatShaper;
38288 LPMATSHAPER OutMatShaper;
38289 LPMATSHAPER SmeltMatShaper;
38290
38291
38292
38293 int Phase1, Phase2, Phase3;
38294
38295
38296
38297 LPcmsNAMEDCOLORLIST NamedColorList;
38298
38299
38300
38301 LCMSBOOL lInputV4Lab, lOutputV4Lab;
38302
38303
38304
38305
38306 WORD CacheIn[16];
38307 WORD CacheOut[16];
38308
38309 double AdaptationState;
38310
38311 LCMS_RWLOCK_T rwlock;
38312
38313 } _cmsTRANSFORM, *_LPcmsTRANSFORM;
38314
38315
38316
38317
38318
38319 _cmsFIXFN _cmsIdentifyInputFormat(_LPcmsTRANSFORM xform, DWORD dwInput);
38320 _cmsFIXFN _cmsIdentifyOutputFormat(_LPcmsTRANSFORM xform, DWORD dwOutput);
38321 # 1961 "/usr/include/lcms.h" 3 4
38322 int cmsChooseCnvrt(int Absolute,
38323 int Phase1, LPcmsCIEXYZ BlackPointIn,
38324 LPcmsCIEXYZ WhitePointIn,
38325 LPcmsCIEXYZ IlluminantIn,
38326 LPMAT3 ChromaticAdaptationMatrixIn,
38327
38328 int Phase2, LPcmsCIEXYZ BlackPointOut,
38329 LPcmsCIEXYZ WhitePointOut,
38330 LPcmsCIEXYZ IlluminantOut,
38331 LPMAT3 ChromaticAdaptationMatrixOut,
38332 int DoBPC,
38333 double AdaptationState,
38334 _cmsADJFN *fn1,
38335 LPWMAT3 wm, LPWVEC3 wof);
38336
38337
38338
38339
38340
38341 LCMSBOOL _cmsEndPointsBySpace(icColorSpaceSignature Space,
38342 WORD **White, WORD **Black, int *nOutputs);
38343
38344 WORD * _cmsWhiteBySpace(icColorSpaceSignature Space);
38345
38346
38347
38348 WORD Clamp_L(Fixed32 in);
38349 WORD Clamp_ab(Fixed32 in);
38350
38351
38352
38353
38354
38355 int cmsDetectBlackPoint(LPcmsCIEXYZ BlackPoint, cmsHPROFILE hProfile, int Intent, DWORD dwFlags);
38356
38357
38358 int _cmsReasonableGridpointsByColorspace(icColorSpaceSignature Colorspace, DWORD dwFlags);
38359
38360
38361 LPLUT _cmsPrecalculateDeviceLink(cmsHTRANSFORM h, DWORD dwFlags);
38362
38363
38364 LPLUT _cmsPrecalculateBlackPreservingDeviceLink(cmsHTRANSFORM hCMYK2CMYK, DWORD dwFlags);
38365
38366
38367 LPLUT _cmsPrecalculateGamutCheck(cmsHTRANSFORM h);
38368
38369
38370 LCMSBOOL _cmsFixWhiteMisalignment(_LPcmsTRANSFORM p);
38371
38372
38373 LPLUT _cmsBlessLUT8(LPLUT Lut);
38374
38375
38376 LPLUT _cmsComputeGamutLUT(cmsHPROFILE hProfile, int Intent);
38377
38378
38379 LPLUT _cmsComputeSoftProofLUT(cmsHPROFILE hProfile, int nIntent);
38380
38381
38382 void _cmsComputePrelinearizationTablesFromXFORM(cmsHTRANSFORM h[], int nTransforms, LPLUT Grid);
38383
38384
38385
38386 LPGAMMATABLE _cmsBuildKToneCurve(cmsHTRANSFORM hCMYK2CMYK, int nPoints);
38387 # 2040 "/usr/include/lcms.h" 3 4
38388 }
38389 # 79 "enblend.cc" 2
38390
38391
38392
38393
38394 boost::mt19937 Twister;
38395
38396
38397 int Verbose = 1;
38398 unsigned int ExactLevels = 0;
38399 bool OneAtATime = true;
38400 bool Wraparound = false;
38401 bool GimpAssociatedAlphaHack = false;
38402 bool UseCIECAM = false;
38403 bool UseLZW = false;
38404 bool OutputSizeGiven = false;
38405 int OutputWidthCmdLine = 0;
38406 int OutputHeightCmdLine = 0;
38407 bool Checkpoint = false;
38408 int UseGPU = 0;
38409 int OptimizeMask = 1;
38410 int CoarseMask = 1;
38411 char *SaveMaskFileName = __null;
38412 char *LoadMaskFileName = __null;
38413 char *VisualizeMaskFileName = __null;
38414 unsigned int GDAKmax = 32;
38415 unsigned int DijkstraRadius = 25;
38416 unsigned int MaskVectorizeDistance = 0;
38417
38418
38419
38420 sigset_t SigintMask;
38421
38422
38423
38424 cmsHPROFILE InputProfile = __null;
38425 cmsHPROFILE XYZProfile = __null;
38426 cmsHTRANSFORM InputToXYZTransform = __null;
38427 cmsHTRANSFORM XYZToInputTransform = __null;
38428 cmsViewingConditions ViewingConditions;
38429 LCMSHANDLE CIECAMTransform = __null;
38430
38431 # 1 "common.h" 1
38432 # 43 "common.h"
38433 namespace enblend {
38434
38435
38436 enum Overlap {NoOverlap, PartialOverlap, CompleteOverlap};
38437
38438 }
38439 # 121 "enblend.cc" 2
38440 # 1 "enblend.h" 1
38441 # 24 "enblend.h"
38442 # 1 "../config.h" 1
38443 # 25 "enblend.h" 2
38444 # 34 "enblend.h"
38445 # 1 "numerictraits.h" 1
38446 # 24 "numerictraits.h"
38447 # 1 "../config.h" 1
38448 # 25 "numerictraits.h" 2
38449
38450
38451 # 1 "../include/vigra/basicimage.hxx" 1
38452 # 42 "../include/vigra/basicimage.hxx"
38453 # 1 "../include/vigra/utilities.hxx" 1
38454 # 41 "../include/vigra/utilities.hxx"
38455 # 1 "../include/vigra/config.hxx" 1
38456 # 191 "../include/vigra/config.hxx"
38457 namespace vigra {
38458
38459
38460 typedef std::exception StdException;
38461
38462
38463 }
38464 # 42 "../include/vigra/utilities.hxx" 2
38465 # 1 "../include/vigra/error.hxx" 1
38466 # 124 "../include/vigra/error.hxx"
38467 namespace vigra {
38468
38469 class ContractViolation : public StdException
38470 {
38471 public:
38472 ContractViolation(char const * prefix, char const * message,
38473 char const * file, int line)
38474 {
38475 sprintf(what_, "\n%.30s\n%.900s\n(%.100s:%d)\n", prefix, message, file, line);
38476 }
38477
38478 ContractViolation(char const * prefix, char const * message)
38479 {
38480 sprintf(what_, "\n%.30s\n%.900s\n", prefix, message);
38481 }
38482
38483 virtual const char * what() const throw()
38484 {
38485 return what_;
38486 }
38487
38488 private:
38489 enum { bufsize_ = 1100 };
38490 char what_[bufsize_];
38491 };
38492
38493 class PreconditionViolation : public ContractViolation
38494 {
38495 public:
38496 PreconditionViolation(char const * message, const char * file, int line)
38497 : ContractViolation("Precondition violation!", message, file, line)
38498 {}
38499
38500 PreconditionViolation(char const * message)
38501 : ContractViolation("Precondition violation!", message)
38502 {}
38503 };
38504
38505 class PostconditionViolation : public ContractViolation
38506 {
38507 public:
38508 PostconditionViolation(char const * message, const char * file, int line)
38509 : ContractViolation("Postcondition violation!", message, file, line)
38510 {}
38511
38512 PostconditionViolation(char const * message)
38513 : ContractViolation("Postcondition violation!", message)
38514 {}
38515 };
38516
38517 class InvariantViolation : public ContractViolation
38518 {
38519 public:
38520 InvariantViolation(char const * message, const char * file, int line)
38521 : ContractViolation("Invariant violation!", message, file, line)
38522 {}
38523
38524 InvariantViolation(char const * message)
38525 : ContractViolation("Invariant violation!", message)
38526 {}
38527 };
38528 # 258 "../include/vigra/error.hxx"
38529 inline
38530 void throw_invariant_error(bool predicate, char const * message)
38531 {
38532 if(!predicate)
38533 throw vigra::InvariantViolation(message);
38534 }
38535
38536 inline
38537 void throw_precondition_error(bool predicate, char const * message)
38538 {
38539 if(!predicate)
38540 throw vigra::PreconditionViolation(message);
38541 }
38542
38543 inline
38544 void throw_postcondition_error(bool predicate, char const * message)
38545 {
38546 if(!predicate)
38547 throw vigra::PostconditionViolation(message);
38548 }
38549
38550 inline
38551 void throw_invariant_error(bool predicate, std::string message)
38552 {
38553 if(!predicate)
38554 throw vigra::InvariantViolation(message.c_str());
38555 }
38556
38557 inline
38558 void throw_precondition_error(bool predicate, std::string message)
38559 {
38560 if(!predicate)
38561 throw vigra::PreconditionViolation(message.c_str());
38562 }
38563
38564 inline
38565 void throw_postcondition_error(bool predicate, std::string message)
38566 {
38567 if(!predicate)
38568 throw vigra::PostconditionViolation(message.c_str());
38569 }
38570 # 312 "../include/vigra/error.hxx"
38571 }
38572 # 43 "../include/vigra/utilities.hxx" 2
38573 # 1 "../include/vigra/metaprogramming.hxx" 1
38574 # 40 "../include/vigra/metaprogramming.hxx"
38575 # 1 "../include/vigra/config.hxx" 1
38576 # 41 "../include/vigra/metaprogramming.hxx" 2
38577
38578 namespace vigra {
38579
38580 template <int N>
38581 class MetaInt
38582 {
38583 public:
38584 enum { value = N };
38585 };
38586
38587 struct VigraTrueType
38588 {
38589 enum { asBool = true };
38590 };
38591
38592 struct VigraFalseType
38593 {
38594 enum { asBool = false };
38595 };
38596 # 80 "../include/vigra/metaprogramming.hxx"
38597 struct StridedArrayTag {};
38598 # 95 "../include/vigra/metaprogramming.hxx"
38599 struct UnstridedArrayTag {};
38600
38601 template<class T>
38602 class TypeTraits
38603 {
38604 public:
38605 typedef VigraFalseType isConst;
38606 typedef VigraFalseType isPOD;
38607 typedef VigraFalseType isBuiltinType;
38608 };
38609
38610
38611
38612 template<class T>
38613 class TypeTraits<T const>
38614 : public TypeTraits<T>
38615 {
38616 public:
38617 typedef VigraTrueType isConst;
38618 };
38619
38620 template<class T>
38621 class TypeTraits<T *>
38622 {
38623 public:
38624 typedef VigraFalseType isConst;
38625 typedef VigraTrueType isPOD;
38626 typedef VigraTrueType isBuiltinType;
38627 };
38628
38629 template<class T>
38630 class TypeTraits<T const *>
38631 {
38632 public:
38633 typedef VigraFalseType isConst;
38634 typedef VigraTrueType isPOD;
38635 typedef VigraTrueType isBuiltinType;
38636 };
38637 # 146 "../include/vigra/metaprogramming.hxx"
38638 template<> class TypeTraits<char> { public: typedef VigraFalseType isConst; typedef VigraTrueType isPOD; typedef VigraTrueType isBuiltinType; };
38639 template<> class TypeTraits<signed char> { public: typedef VigraFalseType isConst; typedef VigraTrueType isPOD; typedef VigraTrueType isBuiltinType; };
38640 template<> class TypeTraits<unsigned char> { public: typedef VigraFalseType isConst; typedef VigraTrueType isPOD; typedef VigraTrueType isBuiltinType; };
38641 template<> class TypeTraits<short> { public: typedef VigraFalseType isConst; typedef VigraTrueType isPOD; typedef VigraTrueType isBuiltinType; };
38642 template<> class TypeTraits<unsigned short> { public: typedef VigraFalseType isConst; typedef VigraTrueType isPOD; typedef VigraTrueType isBuiltinType; };
38643 template<> class TypeTraits<int> { public: typedef VigraFalseType isConst; typedef VigraTrueType isPOD; typedef VigraTrueType isBuiltinType; };
38644 template<> class TypeTraits<unsigned int> { public: typedef VigraFalseType isConst; typedef VigraTrueType isPOD; typedef VigraTrueType isBuiltinType; };
38645 template<> class TypeTraits<long> { public: typedef VigraFalseType isConst; typedef VigraTrueType isPOD; typedef VigraTrueType isBuiltinType; };
38646 template<> class TypeTraits<unsigned long> { public: typedef VigraFalseType isConst; typedef VigraTrueType isPOD; typedef VigraTrueType isBuiltinType; };
38647 template<> class TypeTraits<float> { public: typedef VigraFalseType isConst; typedef VigraTrueType isPOD; typedef VigraTrueType isBuiltinType; };
38648 template<> class TypeTraits<double> { public: typedef VigraFalseType isConst; typedef VigraTrueType isPOD; typedef VigraTrueType isBuiltinType; };
38649 template<> class TypeTraits<long double> { public: typedef VigraFalseType isConst; typedef VigraTrueType isPOD; typedef VigraTrueType isBuiltinType; };
38650
38651
38652
38653
38654
38655 template <class L, class R>
38656 struct And;
38657
38658 template <>
38659 struct And<VigraFalseType, VigraFalseType>
38660 {
38661 typedef VigraFalseType result;
38662 static const bool boolResult = false;
38663 };
38664
38665 template <>
38666 struct And<VigraFalseType, VigraTrueType>
38667 {
38668 typedef VigraFalseType result;
38669 static const bool boolResult = false;
38670 };
38671
38672 template <>
38673 struct And<VigraTrueType, VigraFalseType>
38674 {
38675 typedef VigraFalseType result;
38676 static const bool boolResult = false;
38677 };
38678
38679 template <>
38680 struct And<VigraTrueType, VigraTrueType>
38681 {
38682 typedef VigraTrueType result;
38683 static const bool boolResult = true;
38684 };
38685
38686 template <class L, class R>
38687 struct Or;
38688
38689 template <>
38690 struct Or<VigraFalseType, VigraFalseType>
38691 {
38692 typedef VigraFalseType result;
38693 static const bool boolResult = false;
38694 };
38695
38696 template <>
38697 struct Or<VigraTrueType, VigraFalseType>
38698 {
38699 typedef VigraTrueType result;
38700 static const bool boolResult = true;
38701 };
38702
38703 template <>
38704 struct Or<VigraFalseType, VigraTrueType>
38705 {
38706 typedef VigraTrueType result;
38707 static const bool boolResult = true;
38708 };
38709
38710 template <>
38711 struct Or<VigraTrueType, VigraTrueType>
38712 {
38713 typedef VigraTrueType result;
38714 static const bool boolResult = true;
38715 };
38716
38717
38718
38719 template <class PREDICATE, class TRUECASE, class FALSECASE>
38720 struct If;
38721
38722 template <class TRUECASE, class FALSECASE>
38723 struct If<VigraTrueType, TRUECASE, FALSECASE>
38724 {
38725 typedef TRUECASE type;
38726 };
38727
38728 template <class TRUECASE, class FALSECASE>
38729 struct If<VigraFalseType, TRUECASE, FALSECASE>
38730 {
38731 typedef FALSECASE type;
38732 };
38733
38734 template <bool PREDICATE, class TRUECASE, class FALSECASE>
38735 struct IfBool;
38736
38737 template <class TRUECASE, class FALSECASE>
38738 struct IfBool<true, TRUECASE, FALSECASE>
38739 {
38740 typedef TRUECASE type;
38741 };
38742
38743 template <class TRUECASE, class FALSECASE>
38744 struct IfBool<false, TRUECASE, FALSECASE>
38745 {
38746 typedef FALSECASE type;
38747 };
38748
38749 template <class L, class R>
38750 struct IsSameType
38751 {
38752 typedef VigraFalseType result;
38753 static const bool boolResult = false;
38754 };
38755
38756 template <class T>
38757 struct IsSameType<T, T>
38758 {
38759 typedef VigraTrueType result;
38760 static const bool boolResult = true;
38761 };
38762
38763 template <class DERIVED, class BASE>
38764 struct IsDerivedFrom
38765 {
38766 typedef char falseResult[1];
38767 typedef char trueResult[2];
38768
38769 static falseResult * testIsDerivedFrom(...);
38770 static trueResult * testIsDerivedFrom(BASE const *);
38771
38772 enum { resultSize = sizeof(*testIsDerivedFrom((DERIVED const *)0)) };
38773
38774 static const bool boolResult = (resultSize == 2);
38775 typedef typename
38776 IfBool<boolResult, VigraTrueType, VigraFalseType>::type
38777 result;
38778 };
38779
38780
38781
38782 }
38783 # 44 "../include/vigra/utilities.hxx" 2
38784 # 1 "../include/vigra/tuple.hxx" 1
38785 # 42 "../include/vigra/tuple.hxx"
38786 namespace vigra {
38787 # 97 "../include/vigra/tuple.hxx"
38788 using std::pair;
38789
38790
38791
38792
38793
38794
38795
38796 template <class T1, class T2, class T3>
38797 struct triple {
38798 typedef T1 first_type;
38799 typedef T2 second_type;
38800 typedef T3 third_type;
38801
38802 T1 first;
38803 T2 second;
38804 T3 third;
38805 triple() {}
38806 triple(const T1& a, const T2& b, const T3& c)
38807 : first(a), second(b), third(c) {}
38808 };
38809
38810 template <class T1, class T2, class T3>
38811 triple<T1,T2,T3> make_triple( T1 t1, T2 t2, T3 t3 )
38812 { return triple<T1,T2,T3>( t1, t2, t3 ); }
38813
38814
38815
38816
38817
38818
38819
38820 template <class T1, class T2, class T3, class T4>
38821 struct tuple4 {
38822 typedef T1 first_type;
38823 typedef T2 second_type;
38824 typedef T3 third_type;
38825 typedef T4 fourth_type;
38826
38827 T1 first;
38828 T2 second;
38829 T3 third;
38830 T4 fourth;
38831 tuple4() {}
38832 tuple4(const T1& a, const T2& b, const T3& c, const T4& d)
38833 : first(a), second(b), third(c), fourth(d) {}
38834 };
38835
38836 template <class T1, class T2, class T3, class T4>
38837 tuple4<T1,T2,T3,T4> make_tuple4( T1 t1, T2 t2, T3 t3, T4 t4 )
38838 { return tuple4<T1,T2,T3,T4>( t1, t2, t3, t4 ); }
38839
38840
38841
38842
38843
38844
38845
38846 template <class T1, class T2, class T3, class T4, class T5>
38847 struct tuple5 {
38848 typedef T1 first_type;
38849 typedef T2 second_type;
38850 typedef T3 third_type;
38851 typedef T4 fourth_type;
38852 typedef T5 fifth_type;
38853
38854 T1 first;
38855 T2 second;
38856 T3 third;
38857 T4 fourth;
38858 T5 fifth;
38859 tuple5() {}
38860 tuple5(const T1& a, const T2& b, const T3& c, const T4& d, const T5& e)
38861 : first(a), second(b), third(c), fourth(d), fifth(e) {}
38862 };
38863
38864 template <class T1, class T2, class T3, class T4, class T5>
38865 tuple5<T1,T2,T3,T4,T5> make_tuple5( T1 t1, T2 t2, T3 t3, T4 t4, T5 t5 )
38866 { return tuple5<T1,T2,T3,T4,T5>( t1, t2, t3, t4, t5 ); }
38867
38868
38869 }
38870 # 45 "../include/vigra/utilities.hxx" 2
38871 # 1 "../include/vigra/diff2d.hxx" 1
38872 # 40 "../include/vigra/diff2d.hxx"
38873 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cmath" 1 3
38874 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cmath" 3
38875
38876 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cmath" 3
38877 # 82 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cmath" 3
38878 namespace std __attribute__ ((__visibility__ ("default"))) {
38879
38880
38881
38882 template<typename _Tp> _Tp __cmath_power(_Tp, unsigned int);
38883
38884 inline double
38885 abs(double __x)
38886 { return __builtin_fabs(__x); }
38887
38888 inline float
38889 abs(float __x)
38890 { return __builtin_fabsf(__x); }
38891
38892 inline long double
38893 abs(long double __x)
38894 { return __builtin_fabsl(__x); }
38895
38896 using ::acos;
38897
38898 inline float
38899 acos(float __x)
38900 { return __builtin_acosf(__x); }
38901
38902 inline long double
38903 acos(long double __x)
38904 { return __builtin_acosl(__x); }
38905
38906 template<typename _Tp>
38907 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
38908 double>::__type
38909 acos(_Tp __x)
38910 { return __builtin_acos(__x); }
38911
38912 using ::asin;
38913
38914 inline float
38915 asin(float __x)
38916 { return __builtin_asinf(__x); }
38917
38918 inline long double
38919 asin(long double __x)
38920 { return __builtin_asinl(__x); }
38921
38922 template<typename _Tp>
38923 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
38924 double>::__type
38925 asin(_Tp __x)
38926 { return __builtin_asin(__x); }
38927
38928 using ::atan;
38929
38930 inline float
38931 atan(float __x)
38932 { return __builtin_atanf(__x); }
38933
38934 inline long double
38935 atan(long double __x)
38936 { return __builtin_atanl(__x); }
38937
38938 template<typename _Tp>
38939 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
38940 double>::__type
38941 atan(_Tp __x)
38942 { return __builtin_atan(__x); }
38943
38944 using ::atan2;
38945
38946 inline float
38947 atan2(float __y, float __x)
38948 { return __builtin_atan2f(__y, __x); }
38949
38950 inline long double
38951 atan2(long double __y, long double __x)
38952 { return __builtin_atan2l(__y, __x); }
38953
38954 template<typename _Tp, typename _Up>
38955 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value
38956 && __is_integer<_Up>::__value,
38957 double>::__type
38958 atan2(_Tp __y, _Up __x)
38959 { return __builtin_atan2(__y, __x); }
38960
38961 using ::ceil;
38962
38963 inline float
38964 ceil(float __x)
38965 { return __builtin_ceilf(__x); }
38966
38967 inline long double
38968 ceil(long double __x)
38969 { return __builtin_ceill(__x); }
38970
38971 template<typename _Tp>
38972 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
38973 double>::__type
38974 ceil(_Tp __x)
38975 { return __builtin_ceil(__x); }
38976
38977 using ::cos;
38978
38979 inline float
38980 cos(float __x)
38981 { return __builtin_cosf(__x); }
38982
38983 inline long double
38984 cos(long double __x)
38985 { return __builtin_cosl(__x); }
38986
38987 template<typename _Tp>
38988 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
38989 double>::__type
38990 cos(_Tp __x)
38991 { return __builtin_cos(__x); }
38992
38993 using ::cosh;
38994
38995 inline float
38996 cosh(float __x)
38997 { return __builtin_coshf(__x); }
38998
38999 inline long double
39000 cosh(long double __x)
39001 { return __builtin_coshl(__x); }
39002
39003 template<typename _Tp>
39004 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
39005 double>::__type
39006 cosh(_Tp __x)
39007 { return __builtin_cosh(__x); }
39008
39009 using ::exp;
39010
39011 inline float
39012 exp(float __x)
39013 { return __builtin_expf(__x); }
39014
39015 inline long double
39016 exp(long double __x)
39017 { return __builtin_expl(__x); }
39018
39019 template<typename _Tp>
39020 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
39021 double>::__type
39022 exp(_Tp __x)
39023 { return __builtin_exp(__x); }
39024
39025 using ::fabs;
39026
39027 inline float
39028 fabs(float __x)
39029 { return __builtin_fabsf(__x); }
39030
39031 inline long double
39032 fabs(long double __x)
39033 { return __builtin_fabsl(__x); }
39034
39035 template<typename _Tp>
39036 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
39037 double>::__type
39038 fabs(_Tp __x)
39039 { return __builtin_fabs(__x); }
39040
39041 using ::floor;
39042
39043 inline float
39044 floor(float __x)
39045 { return __builtin_floorf(__x); }
39046
39047 inline long double
39048 floor(long double __x)
39049 { return __builtin_floorl(__x); }
39050
39051 template<typename _Tp>
39052 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
39053 double>::__type
39054 floor(_Tp __x)
39055 { return __builtin_floor(__x); }
39056
39057 using ::fmod;
39058
39059 inline float
39060 fmod(float __x, float __y)
39061 { return __builtin_fmodf(__x, __y); }
39062
39063 inline long double
39064 fmod(long double __x, long double __y)
39065 { return __builtin_fmodl(__x, __y); }
39066
39067 using ::frexp;
39068
39069 inline float
39070 frexp(float __x, int* __exp)
39071 { return __builtin_frexpf(__x, __exp); }
39072
39073 inline long double
39074 frexp(long double __x, int* __exp)
39075 { return __builtin_frexpl(__x, __exp); }
39076
39077 template<typename _Tp>
39078 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
39079 double>::__type
39080 frexp(_Tp __x, int* __exp)
39081 { return __builtin_frexp(__x, __exp); }
39082
39083 using ::ldexp;
39084
39085 inline float
39086 ldexp(float __x, int __exp)
39087 { return __builtin_ldexpf(__x, __exp); }
39088
39089 inline long double
39090 ldexp(long double __x, int __exp)
39091 { return __builtin_ldexpl(__x, __exp); }
39092
39093 template<typename _Tp>
39094 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
39095 double>::__type
39096 ldexp(_Tp __x, int __exp)
39097 { return __builtin_ldexp(__x, __exp); }
39098
39099 using ::log;
39100
39101 inline float
39102 log(float __x)
39103 { return __builtin_logf(__x); }
39104
39105 inline long double
39106 log(long double __x)
39107 { return __builtin_logl(__x); }
39108
39109 template<typename _Tp>
39110 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
39111 double>::__type
39112 log(_Tp __x)
39113 { return __builtin_log(__x); }
39114
39115 using ::log10;
39116
39117 inline float
39118 log10(float __x)
39119 { return __builtin_log10f(__x); }
39120
39121 inline long double
39122 log10(long double __x)
39123 { return __builtin_log10l(__x); }
39124
39125 template<typename _Tp>
39126 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
39127 double>::__type
39128 log10(_Tp __x)
39129 { return __builtin_log10(__x); }
39130
39131 using ::modf;
39132
39133 inline float
39134 modf(float __x, float* __iptr)
39135 { return __builtin_modff(__x, __iptr); }
39136
39137 inline long double
39138 modf(long double __x, long double* __iptr)
39139 { return __builtin_modfl(__x, __iptr); }
39140
39141 template<typename _Tp>
39142 inline _Tp
39143 __pow_helper(_Tp __x, int __n)
39144 {
39145 return __n < 0
39146 ? _Tp(1)/__cmath_power(__x, -__n)
39147 : __cmath_power(__x, __n);
39148 }
39149
39150 using ::pow;
39151
39152 inline float
39153 pow(float __x, float __y)
39154 { return __builtin_powf(__x, __y); }
39155
39156 inline long double
39157 pow(long double __x, long double __y)
39158 { return __builtin_powl(__x, __y); }
39159
39160 inline double
39161 pow(double __x, int __i)
39162 { return __builtin_powi(__x, __i); }
39163
39164 inline float
39165 pow(float __x, int __n)
39166 { return __builtin_powif(__x, __n); }
39167
39168 inline long double
39169 pow(long double __x, int __n)
39170 { return __builtin_powil(__x, __n); }
39171
39172 using ::sin;
39173
39174 inline float
39175 sin(float __x)
39176 { return __builtin_sinf(__x); }
39177
39178 inline long double
39179 sin(long double __x)
39180 { return __builtin_sinl(__x); }
39181
39182 template<typename _Tp>
39183 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
39184 double>::__type
39185 sin(_Tp __x)
39186 { return __builtin_sin(__x); }
39187
39188 using ::sinh;
39189
39190 inline float
39191 sinh(float __x)
39192 { return __builtin_sinhf(__x); }
39193
39194 inline long double
39195 sinh(long double __x)
39196 { return __builtin_sinhl(__x); }
39197
39198 template<typename _Tp>
39199 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
39200 double>::__type
39201 sinh(_Tp __x)
39202 { return __builtin_sinh(__x); }
39203
39204 using ::sqrt;
39205
39206 inline float
39207 sqrt(float __x)
39208 { return __builtin_sqrtf(__x); }
39209
39210 inline long double
39211 sqrt(long double __x)
39212 { return __builtin_sqrtl(__x); }
39213
39214 template<typename _Tp>
39215 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
39216 double>::__type
39217 sqrt(_Tp __x)
39218 { return __builtin_sqrt(__x); }
39219
39220 using ::tan;
39221
39222 inline float
39223 tan(float __x)
39224 { return __builtin_tanf(__x); }
39225
39226 inline long double
39227 tan(long double __x)
39228 { return __builtin_tanl(__x); }
39229
39230 template<typename _Tp>
39231 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
39232 double>::__type
39233 tan(_Tp __x)
39234 { return __builtin_tan(__x); }
39235
39236 using ::tanh;
39237
39238 inline float
39239 tanh(float __x)
39240 { return __builtin_tanhf(__x); }
39241
39242 inline long double
39243 tanh(long double __x)
39244 { return __builtin_tanhl(__x); }
39245
39246 template<typename _Tp>
39247 inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
39248 double>::__type
39249 tanh(_Tp __x)
39250 { return __builtin_tanh(__x); }
39251
39252 }
39253
39254
39255
39256
39257
39258
39259
39260 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
39261
39262 template<typename _Tp>
39263 inline int
39264 __capture_fpclassify(_Tp __f) { return (sizeof (__f) == sizeof (float) ? __fpclassifyf (__f) : sizeof (__f) == sizeof (double) ? __fpclassify (__f) : __fpclassifyl (__f)); }
39265
39266 template<typename _Tp>
39267 inline int
39268 __capture_isfinite(_Tp __f) { return (sizeof (__f) == sizeof (float) ? __finitef (__f) : sizeof (__f) == sizeof (double) ? __finite (__f) : __finitel (__f)); }
39269
39270 template<typename _Tp>
39271 inline int
39272 __capture_isinf(_Tp __f) { return (sizeof (__f) == sizeof (float) ? __isinff (__f) : sizeof (__f) == sizeof (double) ? __isinf (__f) : __isinfl (__f)); }
39273
39274 template<typename _Tp>
39275 inline int
39276 __capture_isnan(_Tp __f) { return (sizeof (__f) == sizeof (float) ? __isnanf (__f) : sizeof (__f) == sizeof (double) ? __isnan (__f) : __isnanl (__f)); }
39277
39278 template<typename _Tp>
39279 inline int
39280 __capture_isnormal(_Tp __f) { return ((sizeof (__f) == sizeof (float) ? __fpclassifyf (__f) : sizeof (__f) == sizeof (double) ? __fpclassify (__f) : __fpclassifyl (__f)) == FP_NORMAL); }
39281
39282 template<typename _Tp>
39283 inline int
39284 __capture_signbit(_Tp __f) { return (sizeof (__f) == sizeof (float) ? __signbitf (__f) : sizeof (__f) == sizeof (double) ? __signbit (__f) : __signbitl (__f)); }
39285
39286 template<typename _Tp>
39287 inline int
39288 __capture_isgreater(_Tp __f1, _Tp __f2)
39289 { return __builtin_isgreater(__f1, __f2); }
39290
39291 template<typename _Tp>
39292 inline int
39293 __capture_isgreaterequal(_Tp __f1, _Tp __f2)
39294 { return __builtin_isgreaterequal(__f1, __f2); }
39295
39296 template<typename _Tp>
39297 inline int
39298 __capture_isless(_Tp __f1, _Tp __f2) { return __builtin_isless(__f1, __f2); }
39299
39300 template<typename _Tp>
39301 inline int
39302 __capture_islessequal(_Tp __f1, _Tp __f2)
39303 { return __builtin_islessequal(__f1, __f2); }
39304
39305 template<typename _Tp>
39306 inline int
39307 __capture_islessgreater(_Tp __f1, _Tp __f2)
39308 { return __builtin_islessgreater(__f1, __f2); }
39309
39310 template<typename _Tp>
39311 inline int
39312 __capture_isunordered(_Tp __f1, _Tp __f2)
39313 { return __builtin_isunordered(__f1, __f2); }
39314
39315 }
39316 # 535 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cmath" 3
39317 namespace std __attribute__ ((__visibility__ ("default"))) {
39318
39319 template<typename _Tp>
39320 inline int
39321 fpclassify(_Tp __f) { return ::__gnu_cxx::__capture_fpclassify(__f); }
39322
39323 template<typename _Tp>
39324 inline int
39325 isfinite(_Tp __f) { return ::__gnu_cxx::__capture_isfinite(__f); }
39326
39327 template<typename _Tp>
39328 inline int
39329 isinf(_Tp __f) { return ::__gnu_cxx::__capture_isinf(__f); }
39330
39331 template<typename _Tp>
39332 inline int
39333 isnan(_Tp __f) { return ::__gnu_cxx::__capture_isnan(__f); }
39334
39335 template<typename _Tp>
39336 inline int
39337 isnormal(_Tp __f) { return ::__gnu_cxx::__capture_isnormal(__f); }
39338
39339 template<typename _Tp>
39340 inline int
39341 signbit(_Tp __f) { return ::__gnu_cxx::__capture_signbit(__f); }
39342
39343 template<typename _Tp>
39344 inline int
39345 isgreater(_Tp __f1, _Tp __f2)
39346 { return ::__gnu_cxx::__capture_isgreater(__f1, __f2); }
39347
39348 template<typename _Tp>
39349 inline int
39350 isgreaterequal(_Tp __f1, _Tp __f2)
39351 { return ::__gnu_cxx::__capture_isgreaterequal(__f1, __f2); }
39352
39353 template<typename _Tp>
39354 inline int
39355 isless(_Tp __f1, _Tp __f2)
39356 { return ::__gnu_cxx::__capture_isless(__f1, __f2); }
39357
39358 template<typename _Tp>
39359 inline int
39360 islessequal(_Tp __f1, _Tp __f2)
39361 { return ::__gnu_cxx::__capture_islessequal(__f1, __f2); }
39362
39363 template<typename _Tp>
39364 inline int
39365 islessgreater(_Tp __f1, _Tp __f2)
39366 { return ::__gnu_cxx::__capture_islessgreater(__f1, __f2); }
39367
39368 template<typename _Tp>
39369 inline int
39370 isunordered(_Tp __f1, _Tp __f2)
39371 { return ::__gnu_cxx::__capture_isunordered(__f1, __f2); }
39372
39373 }
39374
39375
39376
39377
39378
39379 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/cmath.tcc" 1 3
39380 # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/cmath.tcc" 3
39381 namespace std __attribute__ ((__visibility__ ("default"))) {
39382
39383 template<typename _Tp>
39384 inline _Tp
39385 __cmath_power(_Tp __x, unsigned int __n)
39386 {
39387 _Tp __y = __n % 2 ? __x : 1;
39388
39389 while (__n >>= 1)
39390 {
39391 __x = __x * __x;
39392 if (__n % 2)
39393 __y = __y * __x;
39394 }
39395
39396 return __y;
39397 }
39398
39399 }
39400 # 598 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cmath" 2 3
39401 # 41 "../include/vigra/diff2d.hxx" 2
39402
39403
39404 # 1 "../include/vigra/iteratortags.hxx" 1
39405 # 40 "../include/vigra/iteratortags.hxx"
39406 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iterator" 1 3
39407 # 63 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iterator" 3
39408
39409 # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iterator" 3
39410 # 72 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iterator" 3
39411 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stream_iterator.h" 1 3
39412 # 38 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stream_iterator.h" 3
39413
39414 # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stream_iterator.h" 3
39415
39416
39417
39418 namespace std __attribute__ ((__visibility__ ("default"))) {
39419
39420
39421 template<typename _Tp, typename _CharT = char,
39422 typename _Traits = char_traits<_CharT>, typename _Dist = ptrdiff_t>
39423 class istream_iterator
39424 : public iterator<input_iterator_tag, _Tp, _Dist, const _Tp*, const _Tp&>
39425 {
39426 public:
39427 typedef _CharT char_type;
39428 typedef _Traits traits_type;
39429 typedef basic_istream<_CharT, _Traits> istream_type;
39430
39431 private:
39432 istream_type* _M_stream;
39433 _Tp _M_value;
39434 bool _M_ok;
39435
39436 public:
39437
39438 istream_iterator()
39439 : _M_stream(0), _M_value(), _M_ok(false) {}
39440
39441
39442 istream_iterator(istream_type& __s)
39443 : _M_stream(&__s)
39444 { _M_read(); }
39445
39446 istream_iterator(const istream_iterator& __obj)
39447 : _M_stream(__obj._M_stream), _M_value(__obj._M_value),
39448 _M_ok(__obj._M_ok)
39449 { }
39450
39451 const _Tp&
39452 operator*() const
39453 {
39454 ;
39455
39456
39457 return _M_value;
39458 }
39459
39460 const _Tp*
39461 operator->() const { return &(operator*()); }
39462
39463 istream_iterator&
39464 operator++()
39465 {
39466 ;
39467
39468
39469 _M_read();
39470 return *this;
39471 }
39472
39473 istream_iterator
39474 operator++(int)
39475 {
39476 ;
39477
39478
39479 istream_iterator __tmp = *this;
39480 _M_read();
39481 return __tmp;
39482 }
39483
39484 bool
39485 _M_equal(const istream_iterator& __x) const
39486 { return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); }
39487
39488 private:
39489 void
39490 _M_read()
39491 {
39492 _M_ok = (_M_stream && *_M_stream) ? true : false;
39493 if (_M_ok)
39494 {
39495 *_M_stream >> _M_value;
39496 _M_ok = *_M_stream ? true : false;
39497 }
39498 }
39499 };
39500
39501
39502 template<typename _Tp, typename _CharT, typename _Traits, typename _Dist>
39503 inline bool
39504 operator==(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x,
39505 const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y)
39506 { return __x._M_equal(__y); }
39507
39508
39509 template <class _Tp, class _CharT, class _Traits, class _Dist>
39510 inline bool
39511 operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x,
39512 const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y)
39513 { return !__x._M_equal(__y); }
39514 # 150 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stream_iterator.h" 3
39515 template<typename _Tp, typename _CharT = char,
39516 typename _Traits = char_traits<_CharT> >
39517 class ostream_iterator
39518 : public iterator<output_iterator_tag, void, void, void, void>
39519 {
39520 public:
39521
39522
39523 typedef _CharT char_type;
39524 typedef _Traits traits_type;
39525 typedef basic_ostream<_CharT, _Traits> ostream_type;
39526
39527
39528 private:
39529 ostream_type* _M_stream;
39530 const _CharT* _M_string;
39531
39532 public:
39533
39534 ostream_iterator(ostream_type& __s) : _M_stream(&__s), _M_string(0) {}
39535 # 181 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stream_iterator.h" 3
39536 ostream_iterator(ostream_type& __s, const _CharT* __c)
39537 : _M_stream(&__s), _M_string(__c) { }
39538
39539
39540 ostream_iterator(const ostream_iterator& __obj)
39541 : _M_stream(__obj._M_stream), _M_string(__obj._M_string) { }
39542
39543
39544
39545 ostream_iterator&
39546 operator=(const _Tp& __value)
39547 {
39548 ;
39549
39550
39551 *_M_stream << __value;
39552 if (_M_string) *_M_stream << _M_string;
39553 return *this;
39554 }
39555
39556 ostream_iterator&
39557 operator*()
39558 { return *this; }
39559
39560 ostream_iterator&
39561 operator++()
39562 { return *this; }
39563
39564 ostream_iterator&
39565 operator++(int)
39566 { return *this; }
39567 };
39568
39569 }
39570 # 73 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iterator" 2 3
39571 # 41 "../include/vigra/iteratortags.hxx" 2
39572
39573 struct image_traverser_tag {};
39574
39575 struct multi_dimensional_traverser_tag {};
39576
39577 struct forward_circulator_tag {};
39578
39579 struct bidirectional_circulator_tag {};
39580
39581 struct random_access_circulator_tag {};
39582 # 44 "../include/vigra/diff2d.hxx" 2
39583 # 1 "../include/vigra/iteratortraits.hxx" 1
39584 # 41 "../include/vigra/iteratortraits.hxx"
39585 # 1 "../include/vigra/accessor.hxx" 1
39586 # 41 "../include/vigra/accessor.hxx"
39587 # 1 "../include/vigra/numerictraits.hxx" 1
39588 # 44 "../include/vigra/numerictraits.hxx"
39589 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/limits.h" 1 3 4
39590 # 45 "../include/vigra/numerictraits.hxx" 2
39591 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cfloat" 1 3
39592 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cfloat" 3
39593
39594 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cfloat" 3
39595
39596 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/float.h" 1 3 4
39597 # 51 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cfloat" 2 3
39598 # 46 "../include/vigra/numerictraits.hxx" 2
39599 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/complex" 1 3
39600 # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/complex" 3
39601
39602 # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/complex" 3
39603
39604
39605
39606
39607 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 1 3
39608 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3
39609
39610 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3
39611
39612
39613
39614
39615 namespace std __attribute__ ((__visibility__ ("default"))) {
39616 # 61 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3
39617 template<typename _CharT, typename _Traits, typename _Alloc>
39618 class basic_stringbuf : public basic_streambuf<_CharT, _Traits>
39619 {
39620 public:
39621
39622 typedef _CharT char_type;
39623 typedef _Traits traits_type;
39624
39625
39626 typedef _Alloc allocator_type;
39627 typedef typename traits_type::int_type int_type;
39628 typedef typename traits_type::pos_type pos_type;
39629 typedef typename traits_type::off_type off_type;
39630
39631 typedef basic_streambuf<char_type, traits_type> __streambuf_type;
39632 typedef basic_string<char_type, _Traits, _Alloc> __string_type;
39633 typedef typename __string_type::size_type __size_type;
39634
39635 protected:
39636
39637
39638
39639
39640
39641 ios_base::openmode _M_mode;
39642
39643
39644 __string_type _M_string;
39645
39646 public:
39647 # 99 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3
39648 explicit
39649 basic_stringbuf(ios_base::openmode __mode = ios_base::in | ios_base::out)
39650 : __streambuf_type(), _M_mode(__mode), _M_string()
39651 { }
39652 # 112 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3
39653 explicit
39654 basic_stringbuf(const __string_type& __str,
39655 ios_base::openmode __mode = ios_base::in | ios_base::out)
39656 : __streambuf_type(), _M_mode(), _M_string(__str.data(), __str.size())
39657 { _M_stringbuf_init(__mode); }
39658 # 127 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3
39659 __string_type
39660 str() const
39661 {
39662 __string_type __ret;
39663 if (this->pptr())
39664 {
39665
39666 if (this->pptr() > this->egptr())
39667 __ret = __string_type(this->pbase(), this->pptr());
39668 else
39669 __ret = __string_type(this->pbase(), this->egptr());
39670 }
39671 else
39672 __ret = _M_string;
39673 return __ret;
39674 }
39675 # 151 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3
39676 void
39677 str(const __string_type& __s)
39678 {
39679
39680 _M_string.assign(__s.data(), __s.size());
39681 _M_stringbuf_init(_M_mode);
39682 }
39683
39684 protected:
39685
39686 void
39687 _M_stringbuf_init(ios_base::openmode __mode)
39688 {
39689 _M_mode = __mode;
39690 __size_type __len = 0;
39691 if (_M_mode & (ios_base::ate | ios_base::app))
39692 __len = _M_string.size();
39693 _M_sync(const_cast<char_type*>(_M_string.data()), 0, __len);
39694 }
39695
39696 virtual streamsize
39697 showmanyc()
39698 {
39699 streamsize __ret = -1;
39700 if (_M_mode & ios_base::in)
39701 {
39702 _M_update_egptr();
39703 __ret = this->egptr() - this->gptr();
39704 }
39705 return __ret;
39706 }
39707
39708 virtual int_type
39709 underflow();
39710
39711 virtual int_type
39712 pbackfail(int_type __c = traits_type::eof());
39713
39714 virtual int_type
39715 overflow(int_type __c = traits_type::eof());
39716 # 203 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3
39717 virtual __streambuf_type*
39718 setbuf(char_type* __s, streamsize __n)
39719 {
39720 if (__s && __n >= 0)
39721 {
39722
39723
39724
39725
39726
39727
39728 _M_string.clear();
39729
39730
39731 _M_sync(__s, __n, 0);
39732 }
39733 return this;
39734 }
39735
39736 virtual pos_type
39737 seekoff(off_type __off, ios_base::seekdir __way,
39738 ios_base::openmode __mode = ios_base::in | ios_base::out);
39739
39740 virtual pos_type
39741 seekpos(pos_type __sp,
39742 ios_base::openmode __mode = ios_base::in | ios_base::out);
39743
39744
39745
39746
39747 void
39748 _M_sync(char_type* __base, __size_type __i, __size_type __o);
39749
39750
39751
39752 void
39753 _M_update_egptr()
39754 {
39755 const bool __testin = _M_mode & ios_base::in;
39756 if (this->pptr() && this->pptr() > this->egptr())
39757 if (__testin)
39758 this->setg(this->eback(), this->gptr(), this->pptr());
39759 else
39760 this->setg(this->pptr(), this->pptr(), this->pptr());
39761 }
39762 };
39763 # 260 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3
39764 template<typename _CharT, typename _Traits, typename _Alloc>
39765 class basic_istringstream : public basic_istream<_CharT, _Traits>
39766 {
39767 public:
39768
39769 typedef _CharT char_type;
39770 typedef _Traits traits_type;
39771
39772
39773 typedef _Alloc allocator_type;
39774 typedef typename traits_type::int_type int_type;
39775 typedef typename traits_type::pos_type pos_type;
39776 typedef typename traits_type::off_type off_type;
39777
39778
39779 typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
39780 typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type;
39781 typedef basic_istream<char_type, traits_type> __istream_type;
39782
39783 private:
39784 __stringbuf_type _M_stringbuf;
39785
39786 public:
39787 # 298 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3
39788 explicit
39789 basic_istringstream(ios_base::openmode __mode = ios_base::in)
39790 : __istream_type(), _M_stringbuf(__mode | ios_base::in)
39791 { this->init(&_M_stringbuf); }
39792 # 318 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3
39793 explicit
39794 basic_istringstream(const __string_type& __str,
39795 ios_base::openmode __mode = ios_base::in)
39796 : __istream_type(), _M_stringbuf(__str, __mode | ios_base::in)
39797 { this->init(&_M_stringbuf); }
39798
39799
39800
39801
39802
39803
39804
39805 ~basic_istringstream()
39806 { }
39807 # 340 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3
39808 __stringbuf_type*
39809 rdbuf() const
39810 { return const_cast<__stringbuf_type*>(&_M_stringbuf); }
39811
39812
39813
39814
39815
39816 __string_type
39817 str() const
39818 { return _M_stringbuf.str(); }
39819
39820
39821
39822
39823
39824
39825
39826 void
39827 str(const __string_type& __s)
39828 { _M_stringbuf.str(__s); }
39829 };
39830 # 373 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3
39831 template <typename _CharT, typename _Traits, typename _Alloc>
39832 class basic_ostringstream : public basic_ostream<_CharT, _Traits>
39833 {
39834 public:
39835
39836 typedef _CharT char_type;
39837 typedef _Traits traits_type;
39838
39839
39840 typedef _Alloc allocator_type;
39841 typedef typename traits_type::int_type int_type;
39842 typedef typename traits_type::pos_type pos_type;
39843 typedef typename traits_type::off_type off_type;
39844
39845
39846 typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
39847 typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type;
39848 typedef basic_ostream<char_type, traits_type> __ostream_type;
39849
39850 private:
39851 __stringbuf_type _M_stringbuf;
39852
39853 public:
39854 # 411 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3
39855 explicit
39856 basic_ostringstream(ios_base::openmode __mode = ios_base::out)
39857 : __ostream_type(), _M_stringbuf(__mode | ios_base::out)
39858 { this->init(&_M_stringbuf); }
39859 # 431 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3
39860 explicit
39861 basic_ostringstream(const __string_type& __str,
39862 ios_base::openmode __mode = ios_base::out)
39863 : __ostream_type(), _M_stringbuf(__str, __mode | ios_base::out)
39864 { this->init(&_M_stringbuf); }
39865
39866
39867
39868
39869
39870
39871
39872 ~basic_ostringstream()
39873 { }
39874 # 453 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3
39875 __stringbuf_type*
39876 rdbuf() const
39877 { return const_cast<__stringbuf_type*>(&_M_stringbuf); }
39878
39879
39880
39881
39882
39883 __string_type
39884 str() const
39885 { return _M_stringbuf.str(); }
39886
39887
39888
39889
39890
39891
39892
39893 void
39894 str(const __string_type& __s)
39895 { _M_stringbuf.str(__s); }
39896 };
39897 # 486 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3
39898 template <typename _CharT, typename _Traits, typename _Alloc>
39899 class basic_stringstream : public basic_iostream<_CharT, _Traits>
39900 {
39901 public:
39902
39903 typedef _CharT char_type;
39904 typedef _Traits traits_type;
39905
39906
39907 typedef _Alloc allocator_type;
39908 typedef typename traits_type::int_type int_type;
39909 typedef typename traits_type::pos_type pos_type;
39910 typedef typename traits_type::off_type off_type;
39911
39912
39913 typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
39914 typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type;
39915 typedef basic_iostream<char_type, traits_type> __iostream_type;
39916
39917 private:
39918 __stringbuf_type _M_stringbuf;
39919
39920 public:
39921 # 522 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3
39922 explicit
39923 basic_stringstream(ios_base::openmode __m = ios_base::out | ios_base::in)
39924 : __iostream_type(), _M_stringbuf(__m)
39925 { this->init(&_M_stringbuf); }
39926 # 540 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3
39927 explicit
39928 basic_stringstream(const __string_type& __str,
39929 ios_base::openmode __m = ios_base::out | ios_base::in)
39930 : __iostream_type(), _M_stringbuf(__str, __m)
39931 { this->init(&_M_stringbuf); }
39932
39933
39934
39935
39936
39937
39938
39939 ~basic_stringstream()
39940 { }
39941 # 562 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3
39942 __stringbuf_type*
39943 rdbuf() const
39944 { return const_cast<__stringbuf_type*>(&_M_stringbuf); }
39945
39946
39947
39948
39949
39950 __string_type
39951 str() const
39952 { return _M_stringbuf.str(); }
39953
39954
39955
39956
39957
39958
39959
39960 void
39961 str(const __string_type& __s)
39962 { _M_stringbuf.str(__s); }
39963 };
39964
39965 }
39966
39967
39968 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/sstream.tcc" 1 3
39969 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/sstream.tcc" 3
39970
39971 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/sstream.tcc" 3
39972
39973 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 1 3
39974 # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/sstream.tcc" 2 3
39975
39976 namespace std __attribute__ ((__visibility__ ("default"))) {
39977
39978 template <class _CharT, class _Traits, class _Alloc>
39979 typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
39980 basic_stringbuf<_CharT, _Traits, _Alloc>::
39981 pbackfail(int_type __c)
39982 {
39983 int_type __ret = traits_type::eof();
39984 if (this->eback() < this->gptr())
39985 {
39986
39987
39988 const bool __testeof = traits_type::eq_int_type(__c, __ret);
39989 if (!__testeof)
39990 {
39991 const bool __testeq = traits_type::eq(traits_type::
39992 to_char_type(__c),
39993 this->gptr()[-1]);
39994 const bool __testout = this->_M_mode & ios_base::out;
39995 if (__testeq || __testout)
39996 {
39997 this->gbump(-1);
39998 if (!__testeq)
39999 *this->gptr() = traits_type::to_char_type(__c);
40000 __ret = __c;
40001 }
40002 }
40003 else
40004 {
40005 this->gbump(-1);
40006 __ret = traits_type::not_eof(__c);
40007 }
40008 }
40009 return __ret;
40010 }
40011
40012 template <class _CharT, class _Traits, class _Alloc>
40013 typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
40014 basic_stringbuf<_CharT, _Traits, _Alloc>::
40015 overflow(int_type __c)
40016 {
40017 const bool __testout = this->_M_mode & ios_base::out;
40018 if (__builtin_expect(!__testout, false))
40019 return traits_type::eof();
40020
40021 const bool __testeof = traits_type::eq_int_type(__c, traits_type::eof());
40022 if (__builtin_expect(__testeof, false))
40023 return traits_type::not_eof(__c);
40024
40025 const __size_type __capacity = _M_string.capacity();
40026 const __size_type __max_size = _M_string.max_size();
40027 const bool __testput = this->pptr() < this->epptr();
40028 if (__builtin_expect(!__testput && __capacity == __max_size, false))
40029 return traits_type::eof();
40030
40031
40032
40033 const char_type __conv = traits_type::to_char_type(__c);
40034 if (!__testput)
40035 {
40036 # 116 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/sstream.tcc" 3
40037 const __size_type __opt_len = std::max(__size_type(2 * __capacity),
40038 __size_type(512));
40039 const __size_type __len = std::min(__opt_len, __max_size);
40040 __string_type __tmp;
40041 __tmp.reserve(__len);
40042 if (this->pbase())
40043 __tmp.assign(this->pbase(), this->epptr() - this->pbase());
40044 __tmp.push_back(__conv);
40045 _M_string.swap(__tmp);
40046 _M_sync(const_cast<char_type*>(_M_string.data()),
40047 this->gptr() - this->eback(), this->pptr() - this->pbase());
40048 }
40049 else
40050 *this->pptr() = __conv;
40051 this->pbump(1);
40052 return __c;
40053 }
40054
40055 template <class _CharT, class _Traits, class _Alloc>
40056 typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
40057 basic_stringbuf<_CharT, _Traits, _Alloc>::
40058 underflow()
40059 {
40060 int_type __ret = traits_type::eof();
40061 const bool __testin = this->_M_mode & ios_base::in;
40062 if (__testin)
40063 {
40064
40065 _M_update_egptr();
40066
40067 if (this->gptr() < this->egptr())
40068 __ret = traits_type::to_int_type(*this->gptr());
40069 }
40070 return __ret;
40071 }
40072
40073 template <class _CharT, class _Traits, class _Alloc>
40074 typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type
40075 basic_stringbuf<_CharT, _Traits, _Alloc>::
40076 seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode)
40077 {
40078 pos_type __ret = pos_type(off_type(-1));
40079 bool __testin = (ios_base::in & this->_M_mode & __mode) != 0;
40080 bool __testout = (ios_base::out & this->_M_mode & __mode) != 0;
40081 const bool __testboth = __testin && __testout && __way != ios_base::cur;
40082 __testin &= !(__mode & ios_base::out);
40083 __testout &= !(__mode & ios_base::in);
40084
40085
40086
40087 const char_type* __beg = __testin ? this->eback() : this->pbase();
40088 if ((__beg || !__off) && (__testin || __testout || __testboth))
40089 {
40090 _M_update_egptr();
40091
40092 off_type __newoffi = __off;
40093 off_type __newoffo = __newoffi;
40094 if (__way == ios_base::cur)
40095 {
40096 __newoffi += this->gptr() - __beg;
40097 __newoffo += this->pptr() - __beg;
40098 }
40099 else if (__way == ios_base::end)
40100 __newoffo = __newoffi += this->egptr() - __beg;
40101
40102 if ((__testin || __testboth)
40103 && __newoffi >= 0
40104 && this->egptr() - __beg >= __newoffi)
40105 {
40106 this->gbump((__beg + __newoffi) - this->gptr());
40107 __ret = pos_type(__newoffi);
40108 }
40109 if ((__testout || __testboth)
40110 && __newoffo >= 0
40111 && this->egptr() - __beg >= __newoffo)
40112 {
40113 this->pbump((__beg + __newoffo) - this->pptr());
40114 __ret = pos_type(__newoffo);
40115 }
40116 }
40117 return __ret;
40118 }
40119
40120 template <class _CharT, class _Traits, class _Alloc>
40121 typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type
40122 basic_stringbuf<_CharT, _Traits, _Alloc>::
40123 seekpos(pos_type __sp, ios_base::openmode __mode)
40124 {
40125 pos_type __ret = pos_type(off_type(-1));
40126 const bool __testin = (ios_base::in & this->_M_mode & __mode) != 0;
40127 const bool __testout = (ios_base::out & this->_M_mode & __mode) != 0;
40128
40129 const char_type* __beg = __testin ? this->eback() : this->pbase();
40130 if ((__beg || !off_type(__sp)) && (__testin || __testout))
40131 {
40132 _M_update_egptr();
40133
40134 const off_type __pos(__sp);
40135 const bool __testpos = (0 <= __pos
40136 && __pos <= this->egptr() - __beg);
40137 if (__testpos)
40138 {
40139 if (__testin)
40140 this->gbump((__beg + __pos) - this->gptr());
40141 if (__testout)
40142 this->pbump((__beg + __pos) - this->pptr());
40143 __ret = __sp;
40144 }
40145 }
40146 return __ret;
40147 }
40148
40149 template <class _CharT, class _Traits, class _Alloc>
40150 void
40151 basic_stringbuf<_CharT, _Traits, _Alloc>::
40152 _M_sync(char_type* __base, __size_type __i, __size_type __o)
40153 {
40154 const bool __testin = _M_mode & ios_base::in;
40155 const bool __testout = _M_mode & ios_base::out;
40156 char_type* __endg = __base + _M_string.size();
40157 char_type* __endp = __base + _M_string.capacity();
40158
40159 if (__base != _M_string.data())
40160 {
40161
40162 __endg += __i;
40163 __i = 0;
40164 __endp = __endg;
40165 }
40166
40167 if (__testin)
40168 this->setg(__base, __base + __i, __endg);
40169 if (__testout)
40170 {
40171 this->setp(__base, __endp);
40172 this->pbump(__o);
40173
40174
40175
40176 if (!__testin)
40177 this->setg(__endg, __endg, __endg);
40178 }
40179 }
40180
40181
40182
40183
40184
40185 extern template class basic_stringbuf<char>;
40186 extern template class basic_istringstream<char>;
40187 extern template class basic_ostringstream<char>;
40188 extern template class basic_stringstream<char>;
40189
40190
40191 extern template class basic_stringbuf<wchar_t>;
40192 extern template class basic_istringstream<wchar_t>;
40193 extern template class basic_ostringstream<wchar_t>;
40194 extern template class basic_stringstream<wchar_t>;
40195
40196
40197
40198 }
40199 # 589 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 2 3
40200 # 51 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/complex" 2 3
40201
40202 namespace std __attribute__ ((__visibility__ ("default"))) {
40203
40204
40205 template<typename _Tp> class complex;
40206 template<> class complex<float>;
40207 template<> class complex<double>;
40208 template<> class complex<long double>;
40209
40210
40211 template<typename _Tp> _Tp abs(const complex<_Tp>&);
40212
40213 template<typename _Tp> _Tp arg(const complex<_Tp>&);
40214
40215 template<typename _Tp> _Tp norm(const complex<_Tp>&);
40216
40217
40218 template<typename _Tp> complex<_Tp> conj(const complex<_Tp>&);
40219
40220 template<typename _Tp> complex<_Tp> polar(const _Tp&, const _Tp& = 0);
40221
40222
40223
40224 template<typename _Tp> complex<_Tp> cos(const complex<_Tp>&);
40225
40226 template<typename _Tp> complex<_Tp> cosh(const complex<_Tp>&);
40227
40228 template<typename _Tp> complex<_Tp> exp(const complex<_Tp>&);
40229
40230 template<typename _Tp> complex<_Tp> log(const complex<_Tp>&);
40231
40232 template<typename _Tp> complex<_Tp> log10(const complex<_Tp>&);
40233
40234 template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&, int);
40235
40236 template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&, const _Tp&);
40237
40238 template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&,
40239 const complex<_Tp>&);
40240
40241 template<typename _Tp> complex<_Tp> pow(const _Tp&, const complex<_Tp>&);
40242
40243 template<typename _Tp> complex<_Tp> sin(const complex<_Tp>&);
40244
40245 template<typename _Tp> complex<_Tp> sinh(const complex<_Tp>&);
40246
40247 template<typename _Tp> complex<_Tp> sqrt(const complex<_Tp>&);
40248
40249 template<typename _Tp> complex<_Tp> tan(const complex<_Tp>&);
40250
40251 template<typename _Tp> complex<_Tp> tanh(const complex<_Tp>&);
40252 # 114 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/complex" 3
40253 template<typename _Tp>
40254 struct complex
40255 {
40256
40257 typedef _Tp value_type;
40258
40259
40260
40261 complex(const _Tp& = _Tp(), const _Tp & = _Tp());
40262
40263
40264
40265
40266 template<typename _Up>
40267 complex(const complex<_Up>&);
40268
40269
40270 _Tp& real();
40271
40272 const _Tp& real() const;
40273
40274 _Tp& imag();
40275
40276 const _Tp& imag() const;
40277
40278
40279 complex<_Tp>& operator=(const _Tp&);
40280
40281 complex<_Tp>& operator+=(const _Tp&);
40282
40283 complex<_Tp>& operator-=(const _Tp&);
40284
40285 complex<_Tp>& operator*=(const _Tp&);
40286
40287 complex<_Tp>& operator/=(const _Tp&);
40288
40289
40290
40291
40292
40293 template<typename _Up>
40294 complex<_Tp>& operator=(const complex<_Up>&);
40295
40296 template<typename _Up>
40297 complex<_Tp>& operator+=(const complex<_Up>&);
40298
40299 template<typename _Up>
40300 complex<_Tp>& operator-=(const complex<_Up>&);
40301
40302 template<typename _Up>
40303 complex<_Tp>& operator*=(const complex<_Up>&);
40304
40305 template<typename _Up>
40306 complex<_Tp>& operator/=(const complex<_Up>&);
40307
40308 const complex& __rep() const;
40309
40310 private:
40311 _Tp _M_real;
40312 _Tp _M_imag;
40313 };
40314
40315 template<typename _Tp>
40316 inline _Tp&
40317 complex<_Tp>::real() { return _M_real; }
40318
40319 template<typename _Tp>
40320 inline const _Tp&
40321 complex<_Tp>::real() const { return _M_real; }
40322
40323 template<typename _Tp>
40324 inline _Tp&
40325 complex<_Tp>::imag() { return _M_imag; }
40326
40327 template<typename _Tp>
40328 inline const _Tp&
40329 complex<_Tp>::imag() const { return _M_imag; }
40330
40331 template<typename _Tp>
40332 inline
40333 complex<_Tp>::complex(const _Tp& __r, const _Tp& __i)
40334 : _M_real(__r), _M_imag(__i) { }
40335
40336 template<typename _Tp>
40337 template<typename _Up>
40338 inline
40339 complex<_Tp>::complex(const complex<_Up>& __z)
40340 : _M_real(__z.real()), _M_imag(__z.imag()) { }
40341
40342 template<typename _Tp>
40343 complex<_Tp>&
40344 complex<_Tp>::operator=(const _Tp& __t)
40345 {
40346 _M_real = __t;
40347 _M_imag = _Tp();
40348 return *this;
40349 }
40350
40351
40352 template<typename _Tp>
40353 inline complex<_Tp>&
40354 complex<_Tp>::operator+=(const _Tp& __t)
40355 {
40356 _M_real += __t;
40357 return *this;
40358 }
40359
40360
40361 template<typename _Tp>
40362 inline complex<_Tp>&
40363 complex<_Tp>::operator-=(const _Tp& __t)
40364 {
40365 _M_real -= __t;
40366 return *this;
40367 }
40368
40369
40370 template<typename _Tp>
40371 complex<_Tp>&
40372 complex<_Tp>::operator*=(const _Tp& __t)
40373 {
40374 _M_real *= __t;
40375 _M_imag *= __t;
40376 return *this;
40377 }
40378
40379
40380 template<typename _Tp>
40381 complex<_Tp>&
40382 complex<_Tp>::operator/=(const _Tp& __t)
40383 {
40384 _M_real /= __t;
40385 _M_imag /= __t;
40386 return *this;
40387 }
40388
40389 template<typename _Tp>
40390 template<typename _Up>
40391 complex<_Tp>&
40392 complex<_Tp>::operator=(const complex<_Up>& __z)
40393 {
40394 _M_real = __z.real();
40395 _M_imag = __z.imag();
40396 return *this;
40397 }
40398
40399
40400 template<typename _Tp>
40401 template<typename _Up>
40402 complex<_Tp>&
40403 complex<_Tp>::operator+=(const complex<_Up>& __z)
40404 {
40405 _M_real += __z.real();
40406 _M_imag += __z.imag();
40407 return *this;
40408 }
40409
40410
40411 template<typename _Tp>
40412 template<typename _Up>
40413 complex<_Tp>&
40414 complex<_Tp>::operator-=(const complex<_Up>& __z)
40415 {
40416 _M_real -= __z.real();
40417 _M_imag -= __z.imag();
40418 return *this;
40419 }
40420
40421
40422
40423 template<typename _Tp>
40424 template<typename _Up>
40425 complex<_Tp>&
40426 complex<_Tp>::operator*=(const complex<_Up>& __z)
40427 {
40428 const _Tp __r = _M_real * __z.real() - _M_imag * __z.imag();
40429 _M_imag = _M_real * __z.imag() + _M_imag * __z.real();
40430 _M_real = __r;
40431 return *this;
40432 }
40433
40434
40435
40436 template<typename _Tp>
40437 template<typename _Up>
40438 complex<_Tp>&
40439 complex<_Tp>::operator/=(const complex<_Up>& __z)
40440 {
40441 const _Tp __r = _M_real * __z.real() + _M_imag * __z.imag();
40442 const _Tp __n = std::norm(__z);
40443 _M_imag = (_M_imag * __z.real() - _M_real * __z.imag()) / __n;
40444 _M_real = __r / __n;
40445 return *this;
40446 }
40447
40448 template<typename _Tp>
40449 inline const complex<_Tp>&
40450 complex<_Tp>::__rep() const { return *this; }
40451
40452
40453
40454
40455 template<typename _Tp>
40456 inline complex<_Tp>
40457 operator+(const complex<_Tp>& __x, const complex<_Tp>& __y)
40458 {
40459 complex<_Tp> __r = __x;
40460 __r += __y;
40461 return __r;
40462 }
40463
40464 template<typename _Tp>
40465 inline complex<_Tp>
40466 operator+(const complex<_Tp>& __x, const _Tp& __y)
40467 {
40468 complex<_Tp> __r = __x;
40469 __r.real() += __y;
40470 return __r;
40471 }
40472
40473 template<typename _Tp>
40474 inline complex<_Tp>
40475 operator+(const _Tp& __x, const complex<_Tp>& __y)
40476 {
40477 complex<_Tp> __r = __y;
40478 __r.real() += __x;
40479 return __r;
40480 }
40481
40482
40483
40484
40485 template<typename _Tp>
40486 inline complex<_Tp>
40487 operator-(const complex<_Tp>& __x, const complex<_Tp>& __y)
40488 {
40489 complex<_Tp> __r = __x;
40490 __r -= __y;
40491 return __r;
40492 }
40493
40494 template<typename _Tp>
40495 inline complex<_Tp>
40496 operator-(const complex<_Tp>& __x, const _Tp& __y)
40497 {
40498 complex<_Tp> __r = __x;
40499 __r.real() -= __y;
40500 return __r;
40501 }
40502
40503 template<typename _Tp>
40504 inline complex<_Tp>
40505 operator-(const _Tp& __x, const complex<_Tp>& __y)
40506 {
40507 complex<_Tp> __r(__x, -__y.imag());
40508 __r.real() -= __y.real();
40509 return __r;
40510 }
40511
40512
40513
40514
40515 template<typename _Tp>
40516 inline complex<_Tp>
40517 operator*(const complex<_Tp>& __x, const complex<_Tp>& __y)
40518 {
40519 complex<_Tp> __r = __x;
40520 __r *= __y;
40521 return __r;
40522 }
40523
40524 template<typename _Tp>
40525 inline complex<_Tp>
40526 operator*(const complex<_Tp>& __x, const _Tp& __y)
40527 {
40528 complex<_Tp> __r = __x;
40529 __r *= __y;
40530 return __r;
40531 }
40532
40533 template<typename _Tp>
40534 inline complex<_Tp>
40535 operator*(const _Tp& __x, const complex<_Tp>& __y)
40536 {
40537 complex<_Tp> __r = __y;
40538 __r *= __x;
40539 return __r;
40540 }
40541
40542
40543
40544
40545 template<typename _Tp>
40546 inline complex<_Tp>
40547 operator/(const complex<_Tp>& __x, const complex<_Tp>& __y)
40548 {
40549 complex<_Tp> __r = __x;
40550 __r /= __y;
40551 return __r;
40552 }
40553
40554 template<typename _Tp>
40555 inline complex<_Tp>
40556 operator/(const complex<_Tp>& __x, const _Tp& __y)
40557 {
40558 complex<_Tp> __r = __x;
40559 __r /= __y;
40560 return __r;
40561 }
40562
40563 template<typename _Tp>
40564 inline complex<_Tp>
40565 operator/(const _Tp& __x, const complex<_Tp>& __y)
40566 {
40567 complex<_Tp> __r = __x;
40568 __r /= __y;
40569 return __r;
40570 }
40571
40572
40573
40574 template<typename _Tp>
40575 inline complex<_Tp>
40576 operator+(const complex<_Tp>& __x)
40577 { return __x; }
40578
40579
40580 template<typename _Tp>
40581 inline complex<_Tp>
40582 operator-(const complex<_Tp>& __x)
40583 { return complex<_Tp>(-__x.real(), -__x.imag()); }
40584
40585
40586
40587 template<typename _Tp>
40588 inline bool
40589 operator==(const complex<_Tp>& __x, const complex<_Tp>& __y)
40590 { return __x.real() == __y.real() && __x.imag() == __y.imag(); }
40591
40592 template<typename _Tp>
40593 inline bool
40594 operator==(const complex<_Tp>& __x, const _Tp& __y)
40595 { return __x.real() == __y && __x.imag() == _Tp(); }
40596
40597 template<typename _Tp>
40598 inline bool
40599 operator==(const _Tp& __x, const complex<_Tp>& __y)
40600 { return __x == __y.real() && _Tp() == __y.imag(); }
40601
40602
40603
40604
40605 template<typename _Tp>
40606 inline bool
40607 operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y)
40608 { return __x.real() != __y.real() || __x.imag() != __y.imag(); }
40609
40610 template<typename _Tp>
40611 inline bool
40612 operator!=(const complex<_Tp>& __x, const _Tp& __y)
40613 { return __x.real() != __y || __x.imag() != _Tp(); }
40614
40615 template<typename _Tp>
40616 inline bool
40617 operator!=(const _Tp& __x, const complex<_Tp>& __y)
40618 { return __x != __y.real() || _Tp() != __y.imag(); }
40619
40620
40621
40622 template<typename _Tp, typename _CharT, class _Traits>
40623 basic_istream<_CharT, _Traits>&
40624 operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
40625 {
40626 _Tp __re_x, __im_x;
40627 _CharT __ch;
40628 __is >> __ch;
40629 if (__ch == '(')
40630 {
40631 __is >> __re_x >> __ch;
40632 if (__ch == ',')
40633 {
40634 __is >> __im_x >> __ch;
40635 if (__ch == ')')
40636 __x = complex<_Tp>(__re_x, __im_x);
40637 else
40638 __is.setstate(ios_base::failbit);
40639 }
40640 else if (__ch == ')')
40641 __x = __re_x;
40642 else
40643 __is.setstate(ios_base::failbit);
40644 }
40645 else
40646 {
40647 __is.putback(__ch);
40648 __is >> __re_x;
40649 __x = __re_x;
40650 }
40651 return __is;
40652 }
40653
40654
40655 template<typename _Tp, typename _CharT, class _Traits>
40656 basic_ostream<_CharT, _Traits>&
40657 operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x)
40658 {
40659 basic_ostringstream<_CharT, _Traits> __s;
40660 __s.flags(__os.flags());
40661 __s.imbue(__os.getloc());
40662 __s.precision(__os.precision());
40663 __s << '(' << __x.real() << ',' << __x.imag() << ')';
40664 return __os << __s.str();
40665 }
40666
40667
40668 template<typename _Tp>
40669 inline _Tp&
40670 real(complex<_Tp>& __z)
40671 { return __z.real(); }
40672
40673 template<typename _Tp>
40674 inline const _Tp&
40675 real(const complex<_Tp>& __z)
40676 { return __z.real(); }
40677
40678 template<typename _Tp>
40679 inline _Tp&
40680 imag(complex<_Tp>& __z)
40681 { return __z.imag(); }
40682
40683 template<typename _Tp>
40684 inline const _Tp&
40685 imag(const complex<_Tp>& __z)
40686 { return __z.imag(); }
40687
40688
40689 template<typename _Tp>
40690 inline _Tp
40691 __complex_abs(const complex<_Tp>& __z)
40692 {
40693 _Tp __x = __z.real();
40694 _Tp __y = __z.imag();
40695 const _Tp __s = std::max(abs(__x), abs(__y));
40696 if (__s == _Tp())
40697 return __s;
40698 __x /= __s;
40699 __y /= __s;
40700 return __s * sqrt(__x * __x + __y * __y);
40701 }
40702
40703
40704 inline float
40705 __complex_abs(__complex__ float __z) { return __builtin_cabsf(__z); }
40706
40707 inline double
40708 __complex_abs(__complex__ double __z) { return __builtin_cabs(__z); }
40709
40710 inline long double
40711 __complex_abs(const __complex__ long double& __z)
40712 { return __builtin_cabsl(__z); }
40713
40714 template<typename _Tp>
40715 inline _Tp
40716 abs(const complex<_Tp>& __z) { return __complex_abs(__z.__rep()); }
40717 # 586 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/complex" 3
40718 template<typename _Tp>
40719 inline _Tp
40720 __complex_arg(const complex<_Tp>& __z)
40721 { return atan2(__z.imag(), __z.real()); }
40722
40723
40724 inline float
40725 __complex_arg(__complex__ float __z) { return __builtin_cargf(__z); }
40726
40727 inline double
40728 __complex_arg(__complex__ double __z) { return __builtin_carg(__z); }
40729
40730 inline long double
40731 __complex_arg(const __complex__ long double& __z)
40732 { return __builtin_cargl(__z); }
40733
40734 template<typename _Tp>
40735 inline _Tp
40736 arg(const complex<_Tp>& __z) { return __complex_arg(__z.__rep()); }
40737 # 616 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/complex" 3
40738 template<bool>
40739 struct _Norm_helper
40740 {
40741 template<typename _Tp>
40742 static inline _Tp _S_do_it(const complex<_Tp>& __z)
40743 {
40744 const _Tp __x = __z.real();
40745 const _Tp __y = __z.imag();
40746 return __x * __x + __y * __y;
40747 }
40748 };
40749
40750 template<>
40751 struct _Norm_helper<true>
40752 {
40753 template<typename _Tp>
40754 static inline _Tp _S_do_it(const complex<_Tp>& __z)
40755 {
40756 _Tp __res = std::abs(__z);
40757 return __res * __res;
40758 }
40759 };
40760
40761 template<typename _Tp>
40762 inline _Tp
40763 norm(const complex<_Tp>& __z)
40764 {
40765 return _Norm_helper<__is_floating<_Tp>::__value
40766 && !1>::_S_do_it(__z);
40767 }
40768
40769 template<typename _Tp>
40770 inline complex<_Tp>
40771 polar(const _Tp& __rho, const _Tp& __theta)
40772 { return complex<_Tp>(__rho * cos(__theta), __rho * sin(__theta)); }
40773
40774 template<typename _Tp>
40775 inline complex<_Tp>
40776 conj(const complex<_Tp>& __z)
40777 { return complex<_Tp>(__z.real(), -__z.imag()); }
40778
40779
40780
40781
40782 template<typename _Tp>
40783 inline complex<_Tp>
40784 __complex_cos(const complex<_Tp>& __z)
40785 {
40786 const _Tp __x = __z.real();
40787 const _Tp __y = __z.imag();
40788 return complex<_Tp>(cos(__x) * cosh(__y), -sin(__x) * sinh(__y));
40789 }
40790
40791
40792 inline __complex__ float
40793 __complex_cos(__complex__ float __z) { return __builtin_ccosf(__z); }
40794
40795 inline __complex__ double
40796 __complex_cos(__complex__ double __z) { return __builtin_ccos(__z); }
40797
40798 inline __complex__ long double
40799 __complex_cos(const __complex__ long double& __z)
40800 { return __builtin_ccosl(__z); }
40801
40802 template<typename _Tp>
40803 inline complex<_Tp>
40804 cos(const complex<_Tp>& __z) { return __complex_cos(__z.__rep()); }
40805
40806
40807
40808
40809
40810
40811
40812 template<typename _Tp>
40813 inline complex<_Tp>
40814 __complex_cosh(const complex<_Tp>& __z)
40815 {
40816 const _Tp __x = __z.real();
40817 const _Tp __y = __z.imag();
40818 return complex<_Tp>(cosh(__x) * cos(__y), sinh(__x) * sin(__y));
40819 }
40820
40821
40822 inline __complex__ float
40823 __complex_cosh(__complex__ float __z) { return __builtin_ccoshf(__z); }
40824
40825 inline __complex__ double
40826 __complex_cosh(__complex__ double __z) { return __builtin_ccosh(__z); }
40827
40828 inline __complex__ long double
40829 __complex_cosh(const __complex__ long double& __z)
40830 { return __builtin_ccoshl(__z); }
40831
40832 template<typename _Tp>
40833 inline complex<_Tp>
40834 cosh(const complex<_Tp>& __z) { return __complex_cosh(__z.__rep()); }
40835
40836
40837
40838
40839
40840
40841
40842 template<typename _Tp>
40843 inline complex<_Tp>
40844 __complex_exp(const complex<_Tp>& __z)
40845 { return std::polar(exp(__z.real()), __z.imag()); }
40846
40847
40848 inline __complex__ float
40849 __complex_exp(__complex__ float __z) { return __builtin_cexpf(__z); }
40850
40851 inline __complex__ double
40852 __complex_exp(__complex__ double __z) { return __builtin_cexp(__z); }
40853
40854 inline __complex__ long double
40855 __complex_exp(const __complex__ long double& __z)
40856 { return __builtin_cexpl(__z); }
40857
40858 template<typename _Tp>
40859 inline complex<_Tp>
40860 exp(const complex<_Tp>& __z) { return __complex_exp(__z.__rep()); }
40861 # 747 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/complex" 3
40862 template<typename _Tp>
40863 inline complex<_Tp>
40864 __complex_log(const complex<_Tp>& __z)
40865 { return complex<_Tp>(log(std::abs(__z)), std::arg(__z)); }
40866
40867
40868 inline __complex__ float
40869 __complex_log(__complex__ float __z) { return __builtin_clogf(__z); }
40870
40871 inline __complex__ double
40872 __complex_log(__complex__ double __z) { return __builtin_clog(__z); }
40873
40874 inline __complex__ long double
40875 __complex_log(const __complex__ long double& __z)
40876 { return __builtin_clogl(__z); }
40877
40878 template<typename _Tp>
40879 inline complex<_Tp>
40880 log(const complex<_Tp>& __z) { return __complex_log(__z.__rep()); }
40881
40882
40883
40884
40885
40886
40887 template<typename _Tp>
40888 inline complex<_Tp>
40889 log10(const complex<_Tp>& __z)
40890 { return std::log(__z) / log(_Tp(10.0)); }
40891
40892
40893 template<typename _Tp>
40894 inline complex<_Tp>
40895 __complex_sin(const complex<_Tp>& __z)
40896 {
40897 const _Tp __x = __z.real();
40898 const _Tp __y = __z.imag();
40899 return complex<_Tp>(sin(__x) * cosh(__y), cos(__x) * sinh(__y));
40900 }
40901
40902
40903 inline __complex__ float
40904 __complex_sin(__complex__ float __z) { return __builtin_csinf(__z); }
40905
40906 inline __complex__ double
40907 __complex_sin(__complex__ double __z) { return __builtin_csin(__z); }
40908
40909 inline __complex__ long double
40910 __complex_sin(const __complex__ long double& __z)
40911 { return __builtin_csinl(__z); }
40912
40913 template<typename _Tp>
40914 inline complex<_Tp>
40915 sin(const complex<_Tp>& __z) { return __complex_sin(__z.__rep()); }
40916
40917
40918
40919
40920
40921
40922
40923 template<typename _Tp>
40924 inline complex<_Tp>
40925 __complex_sinh(const complex<_Tp>& __z)
40926 {
40927 const _Tp __x = __z.real();
40928 const _Tp __y = __z.imag();
40929 return complex<_Tp>(sinh(__x) * cos(__y), cosh(__x) * sin(__y));
40930 }
40931
40932
40933 inline __complex__ float
40934 __complex_sinh(__complex__ float __z) { return __builtin_csinhf(__z); }
40935
40936 inline __complex__ double
40937 __complex_sinh(__complex__ double __z) { return __builtin_csinh(__z); }
40938
40939 inline __complex__ long double
40940 __complex_sinh(const __complex__ long double& __z)
40941 { return __builtin_csinhl(__z); }
40942
40943 template<typename _Tp>
40944 inline complex<_Tp>
40945 sinh(const complex<_Tp>& __z) { return __complex_sinh(__z.__rep()); }
40946 # 839 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/complex" 3
40947 template<typename _Tp>
40948 complex<_Tp>
40949 __complex_sqrt(const complex<_Tp>& __z)
40950 {
40951 _Tp __x = __z.real();
40952 _Tp __y = __z.imag();
40953
40954 if (__x == _Tp())
40955 {
40956 _Tp __t = sqrt(abs(__y) / 2);
40957 return complex<_Tp>(__t, __y < _Tp() ? -__t : __t);
40958 }
40959 else
40960 {
40961 _Tp __t = sqrt(2 * (std::abs(__z) + abs(__x)));
40962 _Tp __u = __t / 2;
40963 return __x > _Tp()
40964 ? complex<_Tp>(__u, __y / __t)
40965 : complex<_Tp>(abs(__y) / __t, __y < _Tp() ? -__u : __u);
40966 }
40967 }
40968
40969
40970 inline __complex__ float
40971 __complex_sqrt(__complex__ float __z) { return __builtin_csqrtf(__z); }
40972
40973 inline __complex__ double
40974 __complex_sqrt(__complex__ double __z) { return __builtin_csqrt(__z); }
40975
40976 inline __complex__ long double
40977 __complex_sqrt(const __complex__ long double& __z)
40978 { return __builtin_csqrtl(__z); }
40979
40980 template<typename _Tp>
40981 inline complex<_Tp>
40982 sqrt(const complex<_Tp>& __z) { return __complex_sqrt(__z.__rep()); }
40983 # 883 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/complex" 3
40984 template<typename _Tp>
40985 inline complex<_Tp>
40986 __complex_tan(const complex<_Tp>& __z)
40987 { return std::sin(__z) / std::cos(__z); }
40988
40989
40990 inline __complex__ float
40991 __complex_tan(__complex__ float __z) { return __builtin_ctanf(__z); }
40992
40993 inline __complex__ double
40994 __complex_tan(__complex__ double __z) { return __builtin_ctan(__z); }
40995
40996 inline __complex__ long double
40997 __complex_tan(const __complex__ long double& __z)
40998 { return __builtin_ctanl(__z); }
40999
41000 template<typename _Tp>
41001 inline complex<_Tp>
41002 tan(const complex<_Tp>& __z) { return __complex_tan(__z.__rep()); }
41003 # 911 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/complex" 3
41004 template<typename _Tp>
41005 inline complex<_Tp>
41006 __complex_tanh(const complex<_Tp>& __z)
41007 { return std::sinh(__z) / std::cosh(__z); }
41008
41009
41010 inline __complex__ float
41011 __complex_tanh(__complex__ float __z) { return __builtin_ctanhf(__z); }
41012
41013 inline __complex__ double
41014 __complex_tanh(__complex__ double __z) { return __builtin_ctanh(__z); }
41015
41016 inline __complex__ long double
41017 __complex_tanh(const __complex__ long double& __z)
41018 { return __builtin_ctanhl(__z); }
41019
41020 template<typename _Tp>
41021 inline complex<_Tp>
41022 tanh(const complex<_Tp>& __z) { return __complex_tanh(__z.__rep()); }
41023 # 940 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/complex" 3
41024 template<typename _Tp>
41025 inline complex<_Tp>
41026 pow(const complex<_Tp>& __z, int __n)
41027 { return std::__pow_helper(__z, __n); }
41028
41029 template<typename _Tp>
41030 complex<_Tp>
41031 pow(const complex<_Tp>& __x, const _Tp& __y)
41032 {
41033
41034
41035
41036
41037 if (__x.imag() == _Tp() && __x.real() > _Tp())
41038 return pow(__x.real(), __y);
41039
41040 complex<_Tp> __t = std::log(__x);
41041 return std::polar(exp(__y * __t.real()), __y * __t.imag());
41042 }
41043
41044 template<typename _Tp>
41045 inline complex<_Tp>
41046 __complex_pow(const complex<_Tp>& __x, const complex<_Tp>& __y)
41047 { return __x == _Tp() ? _Tp() : std::exp(__y * std::log(__x)); }
41048
41049
41050 inline __complex__ float
41051 __complex_pow(__complex__ float __x, __complex__ float __y)
41052 { return __builtin_cpowf(__x, __y); }
41053
41054 inline __complex__ double
41055 __complex_pow(__complex__ double __x, __complex__ double __y)
41056 { return __builtin_cpow(__x, __y); }
41057
41058 inline __complex__ long double
41059 __complex_pow(const __complex__ long double& __x,
41060 const __complex__ long double& __y)
41061 { return __builtin_cpowl(__x, __y); }
41062
41063 template<typename _Tp>
41064 inline complex<_Tp>
41065 pow(const complex<_Tp>& __x, const complex<_Tp>& __y)
41066 { return __complex_pow(__x.__rep(), __y.__rep()); }
41067
41068
41069
41070
41071
41072
41073
41074 template<typename _Tp>
41075 inline complex<_Tp>
41076 pow(const _Tp& __x, const complex<_Tp>& __y)
41077 {
41078 return __x > _Tp() ? std::polar(pow(__x, __y.real()),
41079 __y.imag() * log(__x))
41080 : std::pow(complex<_Tp>(__x, _Tp()), __y);
41081 }
41082
41083
41084
41085 template<>
41086 struct complex<float>
41087 {
41088 typedef float value_type;
41089 typedef __complex__ float _ComplexT;
41090
41091 complex(_ComplexT __z) : _M_value(__z) { }
41092
41093 complex(float = 0.0f, float = 0.0f);
41094
41095 explicit complex(const complex<double>&);
41096 explicit complex(const complex<long double>&);
41097
41098 float& real();
41099 const float& real() const;
41100 float& imag();
41101 const float& imag() const;
41102
41103 complex<float>& operator=(float);
41104 complex<float>& operator+=(float);
41105 complex<float>& operator-=(float);
41106 complex<float>& operator*=(float);
41107 complex<float>& operator/=(float);
41108
41109
41110
41111
41112 template<typename _Tp>
41113 complex<float>&operator=(const complex<_Tp>&);
41114 template<typename _Tp>
41115 complex<float>& operator+=(const complex<_Tp>&);
41116 template<class _Tp>
41117 complex<float>& operator-=(const complex<_Tp>&);
41118 template<class _Tp>
41119 complex<float>& operator*=(const complex<_Tp>&);
41120 template<class _Tp>
41121 complex<float>&operator/=(const complex<_Tp>&);
41122
41123 const _ComplexT& __rep() const { return _M_value; }
41124
41125 private:
41126 _ComplexT _M_value;
41127 };
41128
41129 inline float&
41130 complex<float>::real()
41131 { return __real__ _M_value; }
41132
41133 inline const float&
41134 complex<float>::real() const
41135 { return __real__ _M_value; }
41136
41137 inline float&
41138 complex<float>::imag()
41139 { return __imag__ _M_value; }
41140
41141 inline const float&
41142 complex<float>::imag() const
41143 { return __imag__ _M_value; }
41144
41145 inline
41146 complex<float>::complex(float r, float i)
41147 {
41148 __real__ _M_value = r;
41149 __imag__ _M_value = i;
41150 }
41151
41152 inline complex<float>&
41153 complex<float>::operator=(float __f)
41154 {
41155 __real__ _M_value = __f;
41156 __imag__ _M_value = 0.0f;
41157 return *this;
41158 }
41159
41160 inline complex<float>&
41161 complex<float>::operator+=(float __f)
41162 {
41163 __real__ _M_value += __f;
41164 return *this;
41165 }
41166
41167 inline complex<float>&
41168 complex<float>::operator-=(float __f)
41169 {
41170 __real__ _M_value -= __f;
41171 return *this;
41172 }
41173
41174 inline complex<float>&
41175 complex<float>::operator*=(float __f)
41176 {
41177 _M_value *= __f;
41178 return *this;
41179 }
41180
41181 inline complex<float>&
41182 complex<float>::operator/=(float __f)
41183 {
41184 _M_value /= __f;
41185 return *this;
41186 }
41187
41188 template<typename _Tp>
41189 inline complex<float>&
41190 complex<float>::operator=(const complex<_Tp>& __z)
41191 {
41192 __real__ _M_value = __z.real();
41193 __imag__ _M_value = __z.imag();
41194 return *this;
41195 }
41196
41197 template<typename _Tp>
41198 inline complex<float>&
41199 complex<float>::operator+=(const complex<_Tp>& __z)
41200 {
41201 __real__ _M_value += __z.real();
41202 __imag__ _M_value += __z.imag();
41203 return *this;
41204 }
41205
41206 template<typename _Tp>
41207 inline complex<float>&
41208 complex<float>::operator-=(const complex<_Tp>& __z)
41209 {
41210 __real__ _M_value -= __z.real();
41211 __imag__ _M_value -= __z.imag();
41212 return *this;
41213 }
41214
41215 template<typename _Tp>
41216 inline complex<float>&
41217 complex<float>::operator*=(const complex<_Tp>& __z)
41218 {
41219 _ComplexT __t;
41220 __real__ __t = __z.real();
41221 __imag__ __t = __z.imag();
41222 _M_value *= __t;
41223 return *this;
41224 }
41225
41226 template<typename _Tp>
41227 inline complex<float>&
41228 complex<float>::operator/=(const complex<_Tp>& __z)
41229 {
41230 _ComplexT __t;
41231 __real__ __t = __z.real();
41232 __imag__ __t = __z.imag();
41233 _M_value /= __t;
41234 return *this;
41235 }
41236
41237
41238
41239 template<>
41240 struct complex<double>
41241 {
41242 typedef double value_type;
41243 typedef __complex__ double _ComplexT;
41244
41245 complex(_ComplexT __z) : _M_value(__z) { }
41246
41247 complex(double = 0.0, double = 0.0);
41248
41249 complex(const complex<float>&);
41250 explicit complex(const complex<long double>&);
41251
41252 double& real();
41253 const double& real() const;
41254 double& imag();
41255 const double& imag() const;
41256
41257 complex<double>& operator=(double);
41258 complex<double>& operator+=(double);
41259 complex<double>& operator-=(double);
41260 complex<double>& operator*=(double);
41261 complex<double>& operator/=(double);
41262
41263
41264
41265 template<typename _Tp>
41266 complex<double>& operator=(const complex<_Tp>&);
41267 template<typename _Tp>
41268 complex<double>& operator+=(const complex<_Tp>&);
41269 template<typename _Tp>
41270 complex<double>& operator-=(const complex<_Tp>&);
41271 template<typename _Tp>
41272 complex<double>& operator*=(const complex<_Tp>&);
41273 template<typename _Tp>
41274 complex<double>& operator/=(const complex<_Tp>&);
41275
41276 const _ComplexT& __rep() const { return _M_value; }
41277
41278 private:
41279 _ComplexT _M_value;
41280 };
41281
41282 inline double&
41283 complex<double>::real()
41284 { return __real__ _M_value; }
41285
41286 inline const double&
41287 complex<double>::real() const
41288 { return __real__ _M_value; }
41289
41290 inline double&
41291 complex<double>::imag()
41292 { return __imag__ _M_value; }
41293
41294 inline const double&
41295 complex<double>::imag() const
41296 { return __imag__ _M_value; }
41297
41298 inline
41299 complex<double>::complex(double __r, double __i)
41300 {
41301 __real__ _M_value = __r;
41302 __imag__ _M_value = __i;
41303 }
41304
41305 inline complex<double>&
41306 complex<double>::operator=(double __d)
41307 {
41308 __real__ _M_value = __d;
41309 __imag__ _M_value = 0.0;
41310 return *this;
41311 }
41312
41313 inline complex<double>&
41314 complex<double>::operator+=(double __d)
41315 {
41316 __real__ _M_value += __d;
41317 return *this;
41318 }
41319
41320 inline complex<double>&
41321 complex<double>::operator-=(double __d)
41322 {
41323 __real__ _M_value -= __d;
41324 return *this;
41325 }
41326
41327 inline complex<double>&
41328 complex<double>::operator*=(double __d)
41329 {
41330 _M_value *= __d;
41331 return *this;
41332 }
41333
41334 inline complex<double>&
41335 complex<double>::operator/=(double __d)
41336 {
41337 _M_value /= __d;
41338 return *this;
41339 }
41340
41341 template<typename _Tp>
41342 inline complex<double>&
41343 complex<double>::operator=(const complex<_Tp>& __z)
41344 {
41345 __real__ _M_value = __z.real();
41346 __imag__ _M_value = __z.imag();
41347 return *this;
41348 }
41349
41350 template<typename _Tp>
41351 inline complex<double>&
41352 complex<double>::operator+=(const complex<_Tp>& __z)
41353 {
41354 __real__ _M_value += __z.real();
41355 __imag__ _M_value += __z.imag();
41356 return *this;
41357 }
41358
41359 template<typename _Tp>
41360 inline complex<double>&
41361 complex<double>::operator-=(const complex<_Tp>& __z)
41362 {
41363 __real__ _M_value -= __z.real();
41364 __imag__ _M_value -= __z.imag();
41365 return *this;
41366 }
41367
41368 template<typename _Tp>
41369 inline complex<double>&
41370 complex<double>::operator*=(const complex<_Tp>& __z)
41371 {
41372 _ComplexT __t;
41373 __real__ __t = __z.real();
41374 __imag__ __t = __z.imag();
41375 _M_value *= __t;
41376 return *this;
41377 }
41378
41379 template<typename _Tp>
41380 inline complex<double>&
41381 complex<double>::operator/=(const complex<_Tp>& __z)
41382 {
41383 _ComplexT __t;
41384 __real__ __t = __z.real();
41385 __imag__ __t = __z.imag();
41386 _M_value /= __t;
41387 return *this;
41388 }
41389
41390
41391
41392 template<>
41393 struct complex<long double>
41394 {
41395 typedef long double value_type;
41396 typedef __complex__ long double _ComplexT;
41397
41398 complex(_ComplexT __z) : _M_value(__z) { }
41399
41400 complex(long double = 0.0L, long double = 0.0L);
41401
41402 complex(const complex<float>&);
41403 complex(const complex<double>&);
41404
41405 long double& real();
41406 const long double& real() const;
41407 long double& imag();
41408 const long double& imag() const;
41409
41410 complex<long double>& operator= (long double);
41411 complex<long double>& operator+= (long double);
41412 complex<long double>& operator-= (long double);
41413 complex<long double>& operator*= (long double);
41414 complex<long double>& operator/= (long double);
41415
41416
41417
41418 template<typename _Tp>
41419 complex<long double>& operator=(const complex<_Tp>&);
41420 template<typename _Tp>
41421 complex<long double>& operator+=(const complex<_Tp>&);
41422 template<typename _Tp>
41423 complex<long double>& operator-=(const complex<_Tp>&);
41424 template<typename _Tp>
41425 complex<long double>& operator*=(const complex<_Tp>&);
41426 template<typename _Tp>
41427 complex<long double>& operator/=(const complex<_Tp>&);
41428
41429 const _ComplexT& __rep() const { return _M_value; }
41430
41431 private:
41432 _ComplexT _M_value;
41433 };
41434
41435 inline
41436 complex<long double>::complex(long double __r, long double __i)
41437 {
41438 __real__ _M_value = __r;
41439 __imag__ _M_value = __i;
41440 }
41441
41442 inline long double&
41443 complex<long double>::real()
41444 { return __real__ _M_value; }
41445
41446 inline const long double&
41447 complex<long double>::real() const
41448 { return __real__ _M_value; }
41449
41450 inline long double&
41451 complex<long double>::imag()
41452 { return __imag__ _M_value; }
41453
41454 inline const long double&
41455 complex<long double>::imag() const
41456 { return __imag__ _M_value; }
41457
41458 inline complex<long double>&
41459 complex<long double>::operator=(long double __r)
41460 {
41461 __real__ _M_value = __r;
41462 __imag__ _M_value = 0.0L;
41463 return *this;
41464 }
41465
41466 inline complex<long double>&
41467 complex<long double>::operator+=(long double __r)
41468 {
41469 __real__ _M_value += __r;
41470 return *this;
41471 }
41472
41473 inline complex<long double>&
41474 complex<long double>::operator-=(long double __r)
41475 {
41476 __real__ _M_value -= __r;
41477 return *this;
41478 }
41479
41480 inline complex<long double>&
41481 complex<long double>::operator*=(long double __r)
41482 {
41483 _M_value *= __r;
41484 return *this;
41485 }
41486
41487 inline complex<long double>&
41488 complex<long double>::operator/=(long double __r)
41489 {
41490 _M_value /= __r;
41491 return *this;
41492 }
41493
41494 template<typename _Tp>
41495 inline complex<long double>&
41496 complex<long double>::operator=(const complex<_Tp>& __z)
41497 {
41498 __real__ _M_value = __z.real();
41499 __imag__ _M_value = __z.imag();
41500 return *this;
41501 }
41502
41503 template<typename _Tp>
41504 inline complex<long double>&
41505 complex<long double>::operator+=(const complex<_Tp>& __z)
41506 {
41507 __real__ _M_value += __z.real();
41508 __imag__ _M_value += __z.imag();
41509 return *this;
41510 }
41511
41512 template<typename _Tp>
41513 inline complex<long double>&
41514 complex<long double>::operator-=(const complex<_Tp>& __z)
41515 {
41516 __real__ _M_value -= __z.real();
41517 __imag__ _M_value -= __z.imag();
41518 return *this;
41519 }
41520
41521 template<typename _Tp>
41522 inline complex<long double>&
41523 complex<long double>::operator*=(const complex<_Tp>& __z)
41524 {
41525 _ComplexT __t;
41526 __real__ __t = __z.real();
41527 __imag__ __t = __z.imag();
41528 _M_value *= __t;
41529 return *this;
41530 }
41531
41532 template<typename _Tp>
41533 inline complex<long double>&
41534 complex<long double>::operator/=(const complex<_Tp>& __z)
41535 {
41536 _ComplexT __t;
41537 __real__ __t = __z.real();
41538 __imag__ __t = __z.imag();
41539 _M_value /= __t;
41540 return *this;
41541 }
41542
41543
41544
41545
41546
41547 inline
41548 complex<float>::complex(const complex<double>& __z)
41549 : _M_value(__z.__rep()) { }
41550
41551 inline
41552 complex<float>::complex(const complex<long double>& __z)
41553 : _M_value(__z.__rep()) { }
41554
41555 inline
41556 complex<double>::complex(const complex<float>& __z)
41557 : _M_value(__z.__rep()) { }
41558
41559 inline
41560 complex<double>::complex(const complex<long double>& __z)
41561 : _M_value(__z.__rep()) { }
41562
41563 inline
41564 complex<long double>::complex(const complex<float>& __z)
41565 : _M_value(__z.__rep()) { }
41566
41567 inline
41568 complex<long double>::complex(const complex<double>& __z)
41569 : _M_value(__z.__rep()) { }
41570
41571 }
41572 # 47 "../include/vigra/numerictraits.hxx" 2
41573
41574 # 1 "../include/vigra/sized_int.hxx" 1
41575 # 41 "../include/vigra/sized_int.hxx"
41576 # 1 "../include/vigra/metaprogramming.hxx" 1
41577 # 42 "../include/vigra/sized_int.hxx" 2
41578
41579 namespace vigra {
41580
41581 class Int_type_not_supported_on_this_platform {};
41582
41583
41584
41585 namespace detail {
41586
41587 template<class T, class NEXT>
41588 struct IntTypeList
41589 {
41590 enum { size = sizeof(T)*8 };
41591 typedef T type;
41592 typedef NEXT next;
41593 };
41594
41595 template<int SIZE, class LIST>
41596 struct SelectIntegerType
41597 {
41598 typedef typename
41599 IfBool<(SIZE == LIST::size),
41600 typename LIST::type,
41601 typename SelectIntegerType<SIZE, typename LIST::next>::type >::type
41602 type;
41603 };
41604
41605 template<int SIZE>
41606 struct SelectIntegerType<SIZE, Int_type_not_supported_on_this_platform>
41607 {
41608 typedef Int_type_not_supported_on_this_platform type;
41609 };
41610
41611 template<class LIST>
41612 struct SelectBiggestIntegerType
41613 {
41614 enum { cursize = LIST::size,
41615 nextsize = SelectBiggestIntegerType<typename LIST::next>::size,
41616 size = (cursize < nextsize) ? nextsize : cursize };
41617 typedef typename
41618 IfBool<(cursize < nextsize),
41619 typename SelectBiggestIntegerType<typename LIST::next>::type,
41620 typename LIST::type>::type
41621 type;
41622 };
41623
41624 template<>
41625 struct SelectBiggestIntegerType<Int_type_not_supported_on_this_platform>
41626 {
41627 enum { size = 0 };
41628 typedef Int_type_not_supported_on_this_platform type;
41629 };
41630
41631 typedef IntTypeList<signed char,
41632 IntTypeList<signed short,
41633 IntTypeList<signed int,
41634 IntTypeList<signed long,
41635 IntTypeList<signed long long,
41636 Int_type_not_supported_on_this_platform > > > > > SignedIntTypes;
41637 typedef IntTypeList<unsigned char,
41638 IntTypeList<unsigned short,
41639 IntTypeList<unsigned int,
41640 IntTypeList<unsigned long,
41641 IntTypeList<unsigned long long,
41642 Int_type_not_supported_on_this_platform > > > > > UnsignedIntTypes;
41643
41644 }
41645 # 123 "../include/vigra/sized_int.hxx"
41646 typedef detail::SelectIntegerType<8, detail::SignedIntTypes>::type Int8;
41647
41648 typedef detail::SelectIntegerType<16, detail::SignedIntTypes>::type Int16;
41649
41650 typedef detail::SelectIntegerType<32, detail::SignedIntTypes>::type Int32;
41651
41652 typedef detail::SelectIntegerType<64, detail::SignedIntTypes>::type Int64;
41653
41654 typedef detail::SelectIntegerType<8, detail::UnsignedIntTypes>::type UInt8;
41655
41656 typedef detail::SelectIntegerType<16, detail::UnsignedIntTypes>::type UInt16;
41657
41658 typedef detail::SelectIntegerType<32, detail::UnsignedIntTypes>::type UInt32;
41659
41660 typedef detail::SelectIntegerType<64, detail::UnsignedIntTypes>::type UInt64;
41661
41662
41663 typedef detail::SelectBiggestIntegerType<detail::SignedIntTypes>::type IntBiggest;
41664
41665 typedef detail::SelectBiggestIntegerType<detail::UnsignedIntTypes>::type UIntBiggest;
41666 # 162 "../include/vigra/sized_int.hxx"
41667 }
41668 # 49 "../include/vigra/numerictraits.hxx" 2
41669 # 482 "../include/vigra/numerictraits.hxx"
41670 namespace vigra {
41671
41672 struct Error_NumericTraits_not_specialized_for_this_case { };
41673 struct Error_NumericTraits_char_is_not_a_numeric_type__use_signed_char_or_unsigned_char { };
41674
41675 template<class A>
41676 struct NumericTraits
41677 {
41678 typedef Error_NumericTraits_not_specialized_for_this_case Type;
41679 typedef Error_NumericTraits_not_specialized_for_this_case Promote;
41680 typedef Error_NumericTraits_not_specialized_for_this_case RealPromote;
41681 typedef Error_NumericTraits_not_specialized_for_this_case ComplexPromote;
41682 typedef Error_NumericTraits_not_specialized_for_this_case ValueType;
41683
41684 typedef Error_NumericTraits_not_specialized_for_this_case isScalar;
41685 typedef Error_NumericTraits_not_specialized_for_this_case isIntegral;
41686 typedef Error_NumericTraits_not_specialized_for_this_case isSigned;
41687 typedef Error_NumericTraits_not_specialized_for_this_case isOrdered;
41688 typedef Error_NumericTraits_not_specialized_for_this_case isComplex;
41689 };
41690
41691 template<>
41692 struct NumericTraits<char>
41693 {
41694 typedef Error_NumericTraits_char_is_not_a_numeric_type__use_signed_char_or_unsigned_char Type;
41695 typedef Error_NumericTraits_char_is_not_a_numeric_type__use_signed_char_or_unsigned_char Promote;
41696 typedef Error_NumericTraits_char_is_not_a_numeric_type__use_signed_char_or_unsigned_char RealPromote;
41697 typedef Error_NumericTraits_char_is_not_a_numeric_type__use_signed_char_or_unsigned_char ComplexPromote;
41698 typedef Error_NumericTraits_char_is_not_a_numeric_type__use_signed_char_or_unsigned_char ValueType;
41699
41700 typedef Error_NumericTraits_char_is_not_a_numeric_type__use_signed_char_or_unsigned_char isScalar;
41701 typedef Error_NumericTraits_char_is_not_a_numeric_type__use_signed_char_or_unsigned_char isIntegral;
41702 typedef Error_NumericTraits_char_is_not_a_numeric_type__use_signed_char_or_unsigned_char isSigned;
41703 typedef Error_NumericTraits_char_is_not_a_numeric_type__use_signed_char_or_unsigned_char isOrdered;
41704 typedef Error_NumericTraits_char_is_not_a_numeric_type__use_signed_char_or_unsigned_char isComplex;
41705 };
41706
41707
41708 template<>
41709 struct NumericTraits<bool>
41710 {
41711 typedef bool Type;
41712 typedef int Promote;
41713 typedef double RealPromote;
41714 typedef std::complex<RealPromote> ComplexPromote;
41715 typedef Type ValueType;
41716
41717 typedef VigraTrueType isIntegral;
41718 typedef VigraTrueType isScalar;
41719 typedef VigraFalseType isSigned;
41720 typedef VigraTrueType isOrdered;
41721 typedef VigraFalseType isComplex;
41722
41723 static bool zero() { return false; }
41724 static bool one() { return true; }
41725 static bool nonZero() { return true; }
41726 static bool min() { return false; }
41727 static bool max() { return true; }
41728
41729
41730
41731
41732 static const bool minConst = false;
41733 static const bool maxConst = true;
41734
41735
41736 static Promote toPromote(bool v) { return v ? 1 : 0; }
41737 static RealPromote toRealPromote(bool v) { return v ? 1.0 : 0.0; }
41738 static bool fromPromote(Promote v) {
41739 return (v == 0) ? false : true;
41740 }
41741 static bool fromRealPromote(RealPromote v) {
41742 return (v == 0.0) ? false : true;
41743 }
41744 };
41745
41746
41747 template<>
41748 struct NumericTraits<signed char>
41749 {
41750 typedef signed char Type;
41751 typedef int Promote;
41752 typedef double RealPromote;
41753 typedef std::complex<RealPromote> ComplexPromote;
41754 typedef Type ValueType;
41755
41756 typedef VigraTrueType isIntegral;
41757 typedef VigraTrueType isScalar;
41758 typedef VigraTrueType isSigned;
41759 typedef VigraTrueType isOrdered;
41760 typedef VigraFalseType isComplex;
41761
41762 static signed char zero() { return 0; }
41763 static signed char one() { return 1; }
41764 static signed char nonZero() { return 1; }
41765 static signed char min() { return (-127 - 1); }
41766 static signed char max() { return 127; }
41767
41768
41769
41770
41771 static const signed char minConst = (-127 - 1);
41772 static const signed char maxConst = (-127 - 1);
41773
41774
41775 static Promote toPromote(signed char v) { return v; }
41776 static RealPromote toRealPromote(signed char v) { return v; }
41777 static signed char fromPromote(Promote v) {
41778 return ((v < (-127 - 1)) ? (-127 - 1) : (v > 127) ? 127 : v);
41779 }
41780 static signed char fromRealPromote(RealPromote v) {
41781
41782
41783
41784
41785
41786
41787
41788 return (v < (RealPromote)(-127 - 1))
41789 ? (-127 - 1)
41790 : (v > (RealPromote)127)
41791 ? 127
41792 : static_cast<signed char>(lrint(v));
41793 }
41794 };
41795
41796 template<>
41797 struct NumericTraits<unsigned char>
41798 {
41799 typedef unsigned char Type;
41800 typedef int Promote;
41801 typedef double RealPromote;
41802 typedef std::complex<RealPromote> ComplexPromote;
41803 typedef Type ValueType;
41804
41805 typedef VigraTrueType isIntegral;
41806 typedef VigraTrueType isScalar;
41807 typedef VigraFalseType isSigned;
41808 typedef VigraTrueType isOrdered;
41809 typedef VigraFalseType isComplex;
41810
41811 static unsigned char zero() { return 0; }
41812 static unsigned char one() { return 1; }
41813 static unsigned char nonZero() { return 1; }
41814 static unsigned char min() { return 0; }
41815 static unsigned char max() { return (127 * 2 + 1); }
41816
41817
41818
41819
41820 static const unsigned char minConst = 0;
41821 static const unsigned char maxConst = (127 * 2 + 1);
41822
41823
41824 static Promote toPromote(unsigned char v) { return v; }
41825 static RealPromote toRealPromote(unsigned char v) { return v; }
41826 static unsigned char fromPromote(Promote const & v) {
41827 return ((v < 0) ? 0 : (v > (127 * 2 + 1)) ? (127 * 2 + 1) : v);
41828 }
41829 static unsigned char fromRealPromote(RealPromote const & v) {
41830
41831
41832
41833
41834
41835 return (v < 0.0)
41836 ? 0
41837 : (v > (RealPromote)(127 * 2 + 1))
41838 ? (127 * 2 + 1)
41839 : static_cast<unsigned char>(lrint(v));
41840 }
41841 };
41842
41843 template<>
41844 struct NumericTraits<short int>
41845 {
41846 typedef short int Type;
41847 typedef int Promote;
41848 typedef double RealPromote;
41849 typedef std::complex<RealPromote> ComplexPromote;
41850 typedef Type ValueType;
41851
41852 typedef VigraTrueType isIntegral;
41853 typedef VigraTrueType isScalar;
41854 typedef VigraTrueType isSigned;
41855 typedef VigraTrueType isOrdered;
41856 typedef VigraFalseType isComplex;
41857
41858 static short int zero() { return 0; }
41859 static short int one() { return 1; }
41860 static short int nonZero() { return 1; }
41861 static short int min() { return (-32767 - 1); }
41862 static short int max() { return 32767; }
41863
41864
41865
41866
41867 static const short int minConst = (-32767 - 1);
41868 static const short int maxConst = 32767;
41869
41870
41871 static Promote toPromote(short int v) { return v; }
41872 static RealPromote toRealPromote(short int v) { return v; }
41873 static short int fromPromote(Promote v) {
41874 return ((v < (-32767 - 1)) ? (-32767 - 1) :
41875 (v > 32767) ? 32767 : v);
41876 }
41877 static short int fromRealPromote(RealPromote v) {
41878
41879
41880
41881
41882
41883
41884
41885 return (v < (RealPromote)(-32767 - 1))
41886 ? (-32767 - 1)
41887 : (v > (RealPromote)32767)
41888 ? 32767
41889 : static_cast<short int>(lrint(v));
41890 }
41891 };
41892
41893 template<>
41894 struct NumericTraits<short unsigned int>
41895 {
41896 typedef short unsigned int Type;
41897 typedef int Promote;
41898 typedef double RealPromote;
41899 typedef std::complex<RealPromote> ComplexPromote;
41900 typedef Type ValueType;
41901
41902 typedef VigraTrueType isIntegral;
41903 typedef VigraTrueType isScalar;
41904 typedef VigraFalseType isSigned;
41905 typedef VigraTrueType isOrdered;
41906 typedef VigraFalseType isComplex;
41907
41908 static short unsigned int zero() { return 0; }
41909 static short unsigned int one() { return 1; }
41910 static short unsigned int nonZero() { return 1; }
41911 static short unsigned int min() { return 0; }
41912 static short unsigned int max() { return (32767 * 2 + 1); }
41913
41914
41915
41916
41917 static const short unsigned int minConst = 0;
41918 static const short unsigned int maxConst = (32767 * 2 + 1);
41919
41920
41921 static Promote toPromote(short unsigned int v) { return v; }
41922 static RealPromote toRealPromote(short unsigned int v) { return v; }
41923 static short unsigned int fromPromote(Promote v) {
41924 return ((v < 0) ? 0 : (v > (32767 * 2 + 1)) ? (32767 * 2 + 1) : v);
41925 }
41926 static short unsigned int fromRealPromote(RealPromote v) {
41927
41928
41929
41930
41931
41932 return (v < 0.0)
41933 ? 0
41934 : (v > (RealPromote)(32767 * 2 + 1))
41935 ? (32767 * 2 + 1)
41936 : static_cast<short unsigned int>(lrint(v));
41937 }
41938 };
41939
41940 template<>
41941 struct NumericTraits<int>
41942 {
41943 typedef int Type;
41944 typedef int Promote;
41945 typedef double RealPromote;
41946 typedef std::complex<RealPromote> ComplexPromote;
41947 typedef Type ValueType;
41948
41949 typedef VigraTrueType isIntegral;
41950 typedef VigraTrueType isScalar;
41951 typedef VigraTrueType isSigned;
41952 typedef VigraTrueType isOrdered;
41953 typedef VigraFalseType isComplex;
41954
41955 static int zero() { return 0; }
41956 static int one() { return 1; }
41957 static int nonZero() { return 1; }
41958 static int min() { return (-2147483647 - 1); }
41959 static int max() { return 2147483647; }
41960
41961
41962
41963
41964 static const int minConst = (-2147483647 - 1);
41965 static const int maxConst = 2147483647;
41966
41967
41968 static Promote toPromote(int v) { return v; }
41969 static RealPromote toRealPromote(int v) { return v; }
41970 static int fromPromote(Promote v) { return v; }
41971 static int fromRealPromote(RealPromote v) {
41972
41973
41974
41975
41976
41977
41978
41979 return (v < (RealPromote)(-2147483647 - 1))
41980 ? (-2147483647 - 1)
41981 : (v > (RealPromote)2147483647)
41982 ? 2147483647
41983 : static_cast<int>(lrint(v));
41984 }
41985 };
41986
41987 template<>
41988 struct NumericTraits<unsigned int>
41989 {
41990 typedef unsigned int Type;
41991 typedef unsigned int Promote;
41992 typedef double RealPromote;
41993 typedef std::complex<RealPromote> ComplexPromote;
41994 typedef Type ValueType;
41995
41996 typedef VigraTrueType isIntegral;
41997 typedef VigraTrueType isScalar;
41998 typedef VigraFalseType isSigned;
41999 typedef VigraTrueType isOrdered;
42000 typedef VigraFalseType isComplex;
42001
42002 static unsigned int zero() { return 0; }
42003 static unsigned int one() { return 1; }
42004 static unsigned int nonZero() { return 1; }
42005 static unsigned int min() { return 0; }
42006 static unsigned int max() { return (2147483647 * 2U + 1U); }
42007
42008
42009
42010
42011 static const unsigned int minConst = 0;
42012 static const unsigned int maxConst = (2147483647 * 2U + 1U);
42013
42014
42015 static Promote toPromote(unsigned int v) { return v; }
42016 static RealPromote toRealPromote(unsigned int v) { return v; }
42017 static unsigned int fromPromote(Promote v) { return v; }
42018 static unsigned int fromRealPromote(RealPromote v) {
42019
42020
42021
42022
42023
42024 return (v < 0.0)
42025 ? 0
42026 : (v > (RealPromote)(2147483647 * 2U + 1U))
42027 ? (2147483647 * 2U + 1U)
42028 : static_cast<unsigned int>(llrint(v));
42029 }
42030 };
42031
42032 template<>
42033 struct NumericTraits<long>
42034 {
42035 typedef long Type;
42036 typedef long Promote;
42037 typedef double RealPromote;
42038 typedef std::complex<RealPromote> ComplexPromote;
42039 typedef Type ValueType;
42040
42041 typedef VigraTrueType isIntegral;
42042 typedef VigraTrueType isScalar;
42043 typedef VigraTrueType isSigned;
42044 typedef VigraTrueType isOrdered;
42045 typedef VigraFalseType isComplex;
42046
42047 static long zero() { return 0; }
42048 static long one() { return 1; }
42049 static long nonZero() { return 1; }
42050 static long min() { return (-2147483647L - 1L); }
42051 static long max() { return 2147483647L; }
42052
42053
42054
42055
42056 static const long minConst = (-2147483647L - 1L);
42057 static const long maxConst = 2147483647L;
42058
42059
42060 static Promote toPromote(long v) { return v; }
42061 static RealPromote toRealPromote(long v) { return v; }
42062 static long fromPromote(Promote v) { return v; }
42063 static long fromRealPromote(RealPromote v) {
42064
42065
42066
42067
42068
42069
42070
42071 return (v < (RealPromote)(-2147483647L - 1L))
42072 ? (-2147483647L - 1L)
42073 : (v > (RealPromote)2147483647L)
42074 ? 2147483647L
42075 : static_cast<long>(lrint(v));
42076 }
42077 };
42078
42079 template<>
42080 struct NumericTraits<unsigned long>
42081 {
42082 typedef unsigned long Type;
42083 typedef unsigned long Promote;
42084 typedef double RealPromote;
42085 typedef std::complex<RealPromote> ComplexPromote;
42086 typedef Type ValueType;
42087
42088 typedef VigraTrueType isIntegral;
42089 typedef VigraTrueType isScalar;
42090 typedef VigraFalseType isSigned;
42091 typedef VigraTrueType isOrdered;
42092 typedef VigraFalseType isComplex;
42093
42094 static unsigned long zero() { return 0; }
42095 static unsigned long one() { return 1; }
42096 static unsigned long nonZero() { return 1; }
42097 static unsigned long min() { return 0; }
42098 static unsigned long max() { return (2147483647L * 2UL + 1UL); }
42099
42100
42101
42102
42103 static const unsigned long minConst = 0;
42104 static const unsigned long maxConst = (2147483647L * 2UL + 1UL);
42105
42106
42107 static Promote toPromote(unsigned long v) { return v; }
42108 static RealPromote toRealPromote(unsigned long v) { return v; }
42109 static unsigned long fromPromote(Promote v) { return v; }
42110 static unsigned long fromRealPromote(RealPromote v) {
42111
42112
42113
42114
42115
42116 return (v < 0.0)
42117 ? 0
42118 : (v > (RealPromote)(2147483647L * 2UL + 1UL))
42119 ? (2147483647L * 2UL + 1UL)
42120 : static_cast<unsigned long>(llrint(v));
42121 }
42122 };
42123 # 1018 "../include/vigra/numerictraits.hxx"
42124 template<>
42125 struct NumericTraits<float>
42126 {
42127 typedef float Type;
42128 typedef float Promote;
42129 typedef float RealPromote;
42130 typedef std::complex<RealPromote> ComplexPromote;
42131 typedef Type ValueType;
42132
42133 typedef VigraFalseType isIntegral;
42134 typedef VigraTrueType isScalar;
42135 typedef VigraTrueType isSigned;
42136 typedef VigraTrueType isOrdered;
42137 typedef VigraFalseType isComplex;
42138
42139 static float zero() { return 0.0; }
42140 static float one() { return 1.0; }
42141 static float nonZero() { return 1.0; }
42142 static float epsilon() { return 1.19209290e-7F; }
42143 static float smallestPositive() { return 1.17549435e-38F; }
42144 static float min() { return -3.40282347e+38F; }
42145 static float max() { return 3.40282347e+38F; }
42146
42147 static Promote toPromote(float v) { return v; }
42148 static RealPromote toRealPromote(float v) { return v; }
42149 static float fromPromote(Promote v) { return v; }
42150 static float fromRealPromote(RealPromote v) { return v; }
42151 };
42152
42153 template<>
42154 struct NumericTraits<double>
42155 {
42156 typedef double Type;
42157 typedef double Promote;
42158 typedef double RealPromote;
42159 typedef std::complex<RealPromote> ComplexPromote;
42160 typedef Type ValueType;
42161
42162 typedef VigraFalseType isIntegral;
42163 typedef VigraTrueType isScalar;
42164 typedef VigraTrueType isSigned;
42165 typedef VigraTrueType isOrdered;
42166 typedef VigraFalseType isComplex;
42167
42168 static double zero() { return 0.0; }
42169 static double one() { return 1.0; }
42170 static double nonZero() { return 1.0; }
42171 static double epsilon() { return 2.2204460492503131e-16; }
42172 static double smallestPositive() { return 2.2250738585072014e-308; }
42173 static double min() { return -1.7976931348623157e+308; }
42174 static double max() { return 1.7976931348623157e+308; }
42175
42176 static Promote toPromote(double v) { return v; }
42177 static RealPromote toRealPromote(double v) { return v; }
42178 static double fromPromote(Promote v) { return v; }
42179 static double fromRealPromote(RealPromote v) { return v; }
42180 };
42181
42182 template<>
42183 struct NumericTraits<long double>
42184 {
42185 typedef long double Type;
42186 typedef long double Promote;
42187 typedef long double RealPromote;
42188 typedef std::complex<RealPromote> ComplexPromote;
42189 typedef Type ValueType;
42190
42191 typedef VigraFalseType isIntegral;
42192 typedef VigraTrueType isScalar;
42193 typedef VigraTrueType isSigned;
42194 typedef VigraTrueType isOrdered;
42195 typedef VigraFalseType isComplex;
42196
42197 static long double zero() { return 0.0; }
42198 static long double one() { return 1.0; }
42199 static long double nonZero() { return 1.0; }
42200 static long double epsilon() { return 4.94065645841246544176568792868221e-324L; }
42201 static long double smallestPositive() { return 2.00416836000897277799610805135016e-292L; }
42202 static long double min() { return -1.79769313486231580793728971405301e+308L; }
42203 static long double max() { return 1.79769313486231580793728971405301e+308L; }
42204
42205 static Promote toPromote(long double v) { return v; }
42206 static RealPromote toRealPromote(long double v) { return v; }
42207 static long double fromPromote(Promote v) { return v; }
42208 static long double fromRealPromote(RealPromote v) { return v; }
42209 };
42210
42211
42212
42213 template<class T>
42214 struct NumericTraits<std::complex<T> >
42215 {
42216 typedef std::complex<T> Type;
42217 typedef std::complex<typename NumericTraits<T>::Promote> Promote;
42218 typedef std::complex<typename NumericTraits<T>::RealPromote> RealPromote;
42219 typedef std::complex<RealPromote> ComplexPromote;
42220 typedef T ValueType;
42221
42222 typedef VigraFalseType isIntegral;
42223 typedef VigraFalseType isScalar;
42224 typedef typename NumericTraits<T>::isSigned isSigned;
42225 typedef VigraFalseType isOrdered;
42226 typedef VigraTrueType isComplex;
42227
42228 static Type zero() { return Type(0.0); }
42229 static Type one() { return Type(1.0); }
42230 static Type nonZero() { return one(); }
42231 static Type epsilon() { return Type(NumericTraits<T>::epsilon()); }
42232 static Type smallestPositive() { return Type(NumericTraits<T>::smallestPositive()); }
42233
42234 static Promote toPromote(Type const & v) { return v; }
42235 static Type fromPromote(Promote const & v) { return v; }
42236 static Type fromRealPromote(RealPromote v) { return Type(v); }
42237 };
42238 # 1141 "../include/vigra/numerictraits.hxx"
42239 template<class T>
42240 struct SquareRootTraits
42241 {
42242 typedef T Type;
42243 typedef typename NumericTraits<T>::RealPromote SquareRootResult;
42244 typedef typename NumericTraits<T>::RealPromote SquareRootArgument;
42245 };
42246 # 1156 "../include/vigra/numerictraits.hxx"
42247 struct Error_NormTraits_not_specialized_for_this_case { };
42248
42249 template<class T>
42250 struct NormTraits
42251 {
42252 typedef T Type;
42253 typedef typename T::SquaredNormType SquaredNormType;
42254 typedef typename SquareRootTraits<SquaredNormType>::SquareRootResult NormType;
42255 };
42256 # 1173 "../include/vigra/numerictraits.hxx"
42257 template <> struct NormTraits<bool> { typedef bool Type; typedef NumericTraits<bool>::Promote SquaredNormType; typedef bool NormType; };
42258 template <> struct NormTraits<signed char> { typedef signed char Type; typedef NumericTraits<signed char>::Promote SquaredNormType; typedef signed char NormType; };
42259 template <> struct NormTraits<unsigned char> { typedef unsigned char Type; typedef NumericTraits<unsigned char>::Promote SquaredNormType; typedef unsigned char NormType; };
42260 template <> struct NormTraits<short> { typedef short Type; typedef NumericTraits<short>::Promote SquaredNormType; typedef short NormType; };
42261 template <> struct NormTraits<unsigned short> { typedef unsigned short Type; typedef NumericTraits<unsigned short>::Promote SquaredNormType; typedef unsigned short NormType; };
42262 template <> struct NormTraits<int> { typedef int Type; typedef NumericTraits<int>::Promote SquaredNormType; typedef int NormType; };
42263 template <> struct NormTraits<unsigned int> { typedef unsigned int Type; typedef NumericTraits<unsigned int>::Promote SquaredNormType; typedef unsigned int NormType; };
42264 template <> struct NormTraits<long> { typedef long Type; typedef NumericTraits<long>::Promote SquaredNormType; typedef long NormType; };
42265 template <> struct NormTraits<unsigned long> { typedef unsigned long Type; typedef NumericTraits<unsigned long>::Promote SquaredNormType; typedef unsigned long NormType; };
42266
42267
42268
42269 template <> struct NormTraits<float> { typedef float Type; typedef NumericTraits<float>::Promote SquaredNormType; typedef float NormType; };
42270 template <> struct NormTraits<double> { typedef double Type; typedef NumericTraits<double>::Promote SquaredNormType; typedef double NormType; };
42271 template <> struct NormTraits<long double> { typedef long double Type; typedef NumericTraits<long double>::Promote SquaredNormType; typedef long double NormType; };
42272
42273
42274
42275
42276
42277 template<class T>
42278 struct NormTraits<std::complex<T> >
42279 {
42280 typedef std::complex<T> Type;
42281 typedef typename NormTraits<T>::SquaredNormType SquaredNormType;
42282 typedef typename SquareRootTraits<SquaredNormType>::SquareRootResult NormType;
42283 };
42284 # 1209 "../include/vigra/numerictraits.hxx"
42285 struct Error_PromoteTraits_not_specialized_for_this_case { };
42286
42287 template<class A, class B>
42288 struct PromoteTraits
42289 {
42290 typedef Error_PromoteTraits_not_specialized_for_this_case Promote;
42291 };
42292
42293 template<>
42294 struct PromoteTraits<signed char, signed char>
42295 {
42296 typedef int Promote;
42297 static Promote toPromote(signed char v) { return v; }
42298 };
42299
42300 template<>
42301 struct PromoteTraits<signed char, unsigned char>
42302 {
42303 typedef int Promote;
42304 static Promote toPromote(signed char v) { return v; }
42305 static Promote toPromote(unsigned char v) { return v; }
42306 };
42307
42308 template<>
42309 struct PromoteTraits<signed char, short int>
42310 {
42311 typedef int Promote;
42312 static Promote toPromote(signed char v) { return v; }
42313 static Promote toPromote(short int v) { return v; }
42314 };
42315
42316 template<>
42317 struct PromoteTraits<signed char, short unsigned int>
42318 {
42319 typedef unsigned int Promote;
42320 static Promote toPromote(signed char v) { return v; }
42321 static Promote toPromote(short unsigned int v) { return v; }
42322 };
42323
42324 template<>
42325 struct PromoteTraits<signed char, int>
42326 {
42327 typedef int Promote;
42328 static Promote toPromote(signed char v) { return v; }
42329 static Promote toPromote(int v) { return v; }
42330 };
42331
42332 template<>
42333 struct PromoteTraits<signed char, unsigned int>
42334 {
42335 typedef unsigned int Promote;
42336 static Promote toPromote(signed char v) { return v; }
42337 static Promote toPromote(unsigned int v) { return v; }
42338 };
42339
42340 template<>
42341 struct PromoteTraits<signed char, long>
42342 {
42343 typedef long Promote;
42344 static Promote toPromote(signed char v) { return v; }
42345 static Promote toPromote(long v) { return v; }
42346 };
42347
42348 template<>
42349 struct PromoteTraits<signed char, unsigned long>
42350 {
42351 typedef unsigned long Promote;
42352 static Promote toPromote(signed char v) { return v; }
42353 static Promote toPromote(unsigned long v) { return v; }
42354 };
42355
42356 template<>
42357 struct PromoteTraits<signed char, float>
42358 {
42359 typedef float Promote;
42360 static Promote toPromote(signed char v) { return v; }
42361 static Promote toPromote(float v) { return v; }
42362 };
42363
42364 template<>
42365 struct PromoteTraits<signed char, double>
42366 {
42367 typedef double Promote;
42368 static Promote toPromote(signed char v) { return v; }
42369 static Promote toPromote(double v) { return v; }
42370 };
42371
42372 template<>
42373 struct PromoteTraits<signed char, long double>
42374 {
42375 typedef long double Promote;
42376 static Promote toPromote(signed char v) { return v; }
42377 static Promote toPromote(long double v) { return v; }
42378 };
42379
42380 template<>
42381 struct PromoteTraits<unsigned char, signed char>
42382 {
42383 typedef int Promote;
42384 static Promote toPromote(unsigned char v) { return v; }
42385 static Promote toPromote(signed char v) { return v; }
42386 };
42387
42388 template<>
42389 struct PromoteTraits<unsigned char, unsigned char>
42390 {
42391 typedef int Promote;
42392 static Promote toPromote(unsigned char v) { return v; }
42393 };
42394
42395 template<>
42396 struct PromoteTraits<unsigned char, short int>
42397 {
42398 typedef int Promote;
42399 static Promote toPromote(unsigned char v) { return v; }
42400 static Promote toPromote(short int v) { return v; }
42401 };
42402
42403 template<>
42404 struct PromoteTraits<unsigned char, short unsigned int>
42405 {
42406 typedef unsigned int Promote;
42407 static Promote toPromote(unsigned char v) { return v; }
42408 static Promote toPromote(short unsigned int v) { return v; }
42409 };
42410
42411 template<>
42412 struct PromoteTraits<unsigned char, int>
42413 {
42414 typedef int Promote;
42415 static Promote toPromote(unsigned char v) { return v; }
42416 static Promote toPromote(int v) { return v; }
42417 };
42418
42419 template<>
42420 struct PromoteTraits<unsigned char, unsigned int>
42421 {
42422 typedef unsigned int Promote;
42423 static Promote toPromote(unsigned char v) { return v; }
42424 static Promote toPromote(unsigned int v) { return v; }
42425 };
42426
42427 template<>
42428 struct PromoteTraits<unsigned char, long>
42429 {
42430 typedef long Promote;
42431 static Promote toPromote(unsigned char v) { return v; }
42432 static Promote toPromote(long v) { return v; }
42433 };
42434
42435 template<>
42436 struct PromoteTraits<unsigned char, unsigned long>
42437 {
42438 typedef unsigned long Promote;
42439 static Promote toPromote(unsigned char v) { return v; }
42440 static Promote toPromote(unsigned long v) { return v; }
42441 };
42442
42443 template<>
42444 struct PromoteTraits<unsigned char, float>
42445 {
42446 typedef float Promote;
42447 static Promote toPromote(unsigned char v) { return v; }
42448 static Promote toPromote(float v) { return v; }
42449 };
42450
42451 template<>
42452 struct PromoteTraits<unsigned char, double>
42453 {
42454 typedef double Promote;
42455 static Promote toPromote(unsigned char v) { return v; }
42456 static Promote toPromote(double v) { return v; }
42457 };
42458
42459 template<>
42460 struct PromoteTraits<unsigned char, long double>
42461 {
42462 typedef long double Promote;
42463 static Promote toPromote(unsigned char v) { return v; }
42464 static Promote toPromote(long double v) { return v; }
42465 };
42466
42467 template<>
42468 struct PromoteTraits<short int, signed char>
42469 {
42470 typedef int Promote;
42471 static Promote toPromote(short int v) { return v; }
42472 static Promote toPromote(signed char v) { return v; }
42473 };
42474
42475 template<>
42476 struct PromoteTraits<short int, unsigned char>
42477 {
42478 typedef int Promote;
42479 static Promote toPromote(short int v) { return v; }
42480 static Promote toPromote(unsigned char v) { return v; }
42481 };
42482
42483 template<>
42484 struct PromoteTraits<short int, short int>
42485 {
42486 typedef int Promote;
42487 static Promote toPromote(short int v) { return v; }
42488 };
42489
42490 template<>
42491 struct PromoteTraits<short int, short unsigned int>
42492 {
42493 typedef unsigned int Promote;
42494 static Promote toPromote(short int v) { return v; }
42495 static Promote toPromote(short unsigned int v) { return v; }
42496 };
42497
42498 template<>
42499 struct PromoteTraits<short int, int>
42500 {
42501 typedef int Promote;
42502 static Promote toPromote(short int v) { return v; }
42503 static Promote toPromote(int v) { return v; }
42504 };
42505
42506 template<>
42507 struct PromoteTraits<short int, unsigned int>
42508 {
42509 typedef unsigned int Promote;
42510 static Promote toPromote(short int v) { return v; }
42511 static Promote toPromote(unsigned int v) { return v; }
42512 };
42513
42514 template<>
42515 struct PromoteTraits<short int, long>
42516 {
42517 typedef long Promote;
42518 static Promote toPromote(short int v) { return v; }
42519 static Promote toPromote(long v) { return v; }
42520 };
42521
42522 template<>
42523 struct PromoteTraits<short int, unsigned long>
42524 {
42525 typedef unsigned long Promote;
42526 static Promote toPromote(short int v) { return v; }
42527 static Promote toPromote(unsigned long v) { return v; }
42528 };
42529
42530 template<>
42531 struct PromoteTraits<short int, float>
42532 {
42533 typedef float Promote;
42534 static Promote toPromote(short int v) { return v; }
42535 static Promote toPromote(float v) { return v; }
42536 };
42537
42538 template<>
42539 struct PromoteTraits<short int, double>
42540 {
42541 typedef double Promote;
42542 static Promote toPromote(short int v) { return v; }
42543 static Promote toPromote(double v) { return v; }
42544 };
42545
42546 template<>
42547 struct PromoteTraits<short int, long double>
42548 {
42549 typedef long double Promote;
42550 static Promote toPromote(short int v) { return v; }
42551 static Promote toPromote(long double v) { return v; }
42552 };
42553
42554 template<>
42555 struct PromoteTraits<short unsigned int, signed char>
42556 {
42557 typedef unsigned int Promote;
42558 static Promote toPromote(short unsigned int v) { return v; }
42559 static Promote toPromote(signed char v) { return v; }
42560 };
42561
42562 template<>
42563 struct PromoteTraits<short unsigned int, unsigned char>
42564 {
42565 typedef unsigned int Promote;
42566 static Promote toPromote(short unsigned int v) { return v; }
42567 static Promote toPromote(unsigned char v) { return v; }
42568 };
42569
42570 template<>
42571 struct PromoteTraits<short unsigned int, short int>
42572 {
42573 typedef unsigned int Promote;
42574 static Promote toPromote(short unsigned int v) { return v; }
42575 static Promote toPromote(short int v) { return v; }
42576 };
42577
42578 template<>
42579 struct PromoteTraits<short unsigned int, short unsigned int>
42580 {
42581 typedef unsigned int Promote;
42582 static Promote toPromote(short unsigned int v) { return v; }
42583 };
42584
42585 template<>
42586 struct PromoteTraits<short unsigned int, int>
42587 {
42588 typedef unsigned int Promote;
42589 static Promote toPromote(short unsigned int v) { return v; }
42590 static Promote toPromote(int v) { return v; }
42591 };
42592
42593 template<>
42594 struct PromoteTraits<short unsigned int, unsigned int>
42595 {
42596 typedef unsigned int Promote;
42597 static Promote toPromote(short unsigned int v) { return v; }
42598 static Promote toPromote(unsigned int v) { return v; }
42599 };
42600
42601 template<>
42602 struct PromoteTraits<short unsigned int, long>
42603 {
42604 typedef long Promote;
42605 static Promote toPromote(short unsigned int v) { return v; }
42606 static Promote toPromote(long v) { return v; }
42607 };
42608
42609 template<>
42610 struct PromoteTraits<short unsigned int, unsigned long>
42611 {
42612 typedef unsigned long Promote;
42613 static Promote toPromote(short unsigned int v) { return v; }
42614 static Promote toPromote(unsigned long v) { return v; }
42615 };
42616
42617 template<>
42618 struct PromoteTraits<short unsigned int, float>
42619 {
42620 typedef float Promote;
42621 static Promote toPromote(short unsigned int v) { return v; }
42622 static Promote toPromote(float v) { return v; }
42623 };
42624
42625 template<>
42626 struct PromoteTraits<short unsigned int, double>
42627 {
42628 typedef double Promote;
42629 static Promote toPromote(short unsigned int v) { return v; }
42630 static Promote toPromote(double v) { return v; }
42631 };
42632
42633 template<>
42634 struct PromoteTraits<short unsigned int, long double>
42635 {
42636 typedef long double Promote;
42637 static Promote toPromote(short unsigned int v) { return v; }
42638 static Promote toPromote(long double v) { return v; }
42639 };
42640
42641 template<>
42642 struct PromoteTraits<int, signed char>
42643 {
42644 typedef int Promote;
42645 static Promote toPromote(int v) { return v; }
42646 static Promote toPromote(signed char v) { return v; }
42647 };
42648
42649 template<>
42650 struct PromoteTraits<int, unsigned char>
42651 {
42652 typedef int Promote;
42653 static Promote toPromote(int v) { return v; }
42654 static Promote toPromote(unsigned char v) { return v; }
42655 };
42656
42657 template<>
42658 struct PromoteTraits<int, short int>
42659 {
42660 typedef int Promote;
42661 static Promote toPromote(int v) { return v; }
42662 static Promote toPromote(short int v) { return v; }
42663 };
42664
42665 template<>
42666 struct PromoteTraits<int, short unsigned int>
42667 {
42668 typedef unsigned int Promote;
42669 static Promote toPromote(int v) { return v; }
42670 static Promote toPromote(short unsigned int v) { return v; }
42671 };
42672
42673 template<>
42674 struct PromoteTraits<int, int>
42675 {
42676 typedef int Promote;
42677 static Promote toPromote(int v) { return v; }
42678 };
42679
42680 template<>
42681 struct PromoteTraits<int, unsigned int>
42682 {
42683 typedef unsigned int Promote;
42684 static Promote toPromote(int v) { return v; }
42685 static Promote toPromote(unsigned int v) { return v; }
42686 };
42687
42688 template<>
42689 struct PromoteTraits<int, long>
42690 {
42691 typedef long Promote;
42692 static Promote toPromote(int v) { return v; }
42693 static Promote toPromote(long v) { return v; }
42694 };
42695
42696 template<>
42697 struct PromoteTraits<int, unsigned long>
42698 {
42699 typedef unsigned long Promote;
42700 static Promote toPromote(int v) { return v; }
42701 static Promote toPromote(unsigned long v) { return v; }
42702 };
42703
42704 template<>
42705 struct PromoteTraits<int, float>
42706 {
42707 typedef float Promote;
42708 static Promote toPromote(int v) { return static_cast<Promote>(v); }
42709 static Promote toPromote(float v) { return v; }
42710 };
42711
42712 template<>
42713 struct PromoteTraits<int, double>
42714 {
42715 typedef double Promote;
42716 static Promote toPromote(int v) { return v; }
42717 static Promote toPromote(double v) { return v; }
42718 };
42719
42720 template<>
42721 struct PromoteTraits<int, long double>
42722 {
42723 typedef long double Promote;
42724 static Promote toPromote(int v) { return v; }
42725 static Promote toPromote(long double v) { return v; }
42726 };
42727
42728 template<>
42729 struct PromoteTraits<unsigned int, signed char>
42730 {
42731 typedef unsigned int Promote;
42732 static Promote toPromote(unsigned int v) { return v; }
42733 static Promote toPromote(signed char v) { return v; }
42734 };
42735
42736 template<>
42737 struct PromoteTraits<unsigned int, unsigned char>
42738 {
42739 typedef unsigned int Promote;
42740 static Promote toPromote(unsigned int v) { return v; }
42741 static Promote toPromote(unsigned char v) { return v; }
42742 };
42743
42744 template<>
42745 struct PromoteTraits<unsigned int, short int>
42746 {
42747 typedef unsigned int Promote;
42748 static Promote toPromote(unsigned int v) { return v; }
42749 static Promote toPromote(short int v) { return v; }
42750 };
42751
42752 template<>
42753 struct PromoteTraits<unsigned int, short unsigned int>
42754 {
42755 typedef unsigned int Promote;
42756 static Promote toPromote(unsigned int v) { return v; }
42757 static Promote toPromote(short unsigned int v) { return v; }
42758 };
42759
42760 template<>
42761 struct PromoteTraits<unsigned int, int>
42762 {
42763 typedef unsigned int Promote;
42764 static Promote toPromote(unsigned int v) { return v; }
42765 static Promote toPromote(int v) { return v; }
42766 };
42767
42768 template<>
42769 struct PromoteTraits<unsigned int, unsigned int>
42770 {
42771 typedef unsigned int Promote;
42772 static Promote toPromote(unsigned int v) { return v; }
42773 };
42774
42775 template<>
42776 struct PromoteTraits<unsigned int, long>
42777 {
42778 typedef long Promote;
42779 static Promote toPromote(unsigned int v) { return v; }
42780 static Promote toPromote(long v) { return v; }
42781 };
42782
42783 template<>
42784 struct PromoteTraits<unsigned int, unsigned long>
42785 {
42786 typedef unsigned long Promote;
42787 static Promote toPromote(unsigned int v) { return v; }
42788 static Promote toPromote(unsigned long v) { return v; }
42789 };
42790
42791 template<>
42792 struct PromoteTraits<unsigned int, float>
42793 {
42794 typedef float Promote;
42795 static Promote toPromote(unsigned int v) { return static_cast<Promote>(v); }
42796 static Promote toPromote(float v) { return v; }
42797 };
42798
42799 template<>
42800 struct PromoteTraits<unsigned int, double>
42801 {
42802 typedef double Promote;
42803 static Promote toPromote(unsigned int v) { return v; }
42804 static Promote toPromote(double v) { return v; }
42805 };
42806
42807 template<>
42808 struct PromoteTraits<unsigned int, long double>
42809 {
42810 typedef long double Promote;
42811 static Promote toPromote(unsigned int v) { return v; }
42812 static Promote toPromote(long double v) { return v; }
42813 };
42814
42815 template<>
42816 struct PromoteTraits<long, signed char>
42817 {
42818 typedef long Promote;
42819 static Promote toPromote(long v) { return v; }
42820 static Promote toPromote(signed char v) { return v; }
42821 };
42822
42823 template<>
42824 struct PromoteTraits<long, unsigned char>
42825 {
42826 typedef long Promote;
42827 static Promote toPromote(long v) { return v; }
42828 static Promote toPromote(unsigned char v) { return v; }
42829 };
42830
42831 template<>
42832 struct PromoteTraits<long, short int>
42833 {
42834 typedef long Promote;
42835 static Promote toPromote(long v) { return v; }
42836 static Promote toPromote(short int v) { return v; }
42837 };
42838
42839 template<>
42840 struct PromoteTraits<long, short unsigned int>
42841 {
42842 typedef long Promote;
42843 static Promote toPromote(long v) { return v; }
42844 static Promote toPromote(short unsigned int v) { return v; }
42845 };
42846
42847 template<>
42848 struct PromoteTraits<long, int>
42849 {
42850 typedef long Promote;
42851 static Promote toPromote(long v) { return v; }
42852 static Promote toPromote(int v) { return v; }
42853 };
42854
42855 template<>
42856 struct PromoteTraits<long, unsigned int>
42857 {
42858 typedef long Promote;
42859 static Promote toPromote(long v) { return v; }
42860 static Promote toPromote(unsigned int v) { return v; }
42861 };
42862
42863 template<>
42864 struct PromoteTraits<long, long>
42865 {
42866 typedef long Promote;
42867 static Promote toPromote(long v) { return v; }
42868 };
42869
42870 template<>
42871 struct PromoteTraits<long, unsigned long>
42872 {
42873 typedef unsigned long Promote;
42874 static Promote toPromote(long v) { return v; }
42875 static Promote toPromote(unsigned long v) { return v; }
42876 };
42877
42878 template<>
42879 struct PromoteTraits<long, float>
42880 {
42881 typedef float Promote;
42882 static Promote toPromote(long v) { return static_cast<Promote>(v); }
42883 static Promote toPromote(float v) { return v; }
42884 };
42885
42886 template<>
42887 struct PromoteTraits<long, double>
42888 {
42889 typedef double Promote;
42890 static Promote toPromote(long v) { return v; }
42891 static Promote toPromote(double v) { return v; }
42892 };
42893
42894 template<>
42895 struct PromoteTraits<long, long double>
42896 {
42897 typedef long double Promote;
42898 static Promote toPromote(long v) { return v; }
42899 static Promote toPromote(long double v) { return v; }
42900 };
42901
42902 template<>
42903 struct PromoteTraits<unsigned long, signed char>
42904 {
42905 typedef unsigned long Promote;
42906 static Promote toPromote(unsigned long v) { return v; }
42907 static Promote toPromote(signed char v) { return v; }
42908 };
42909
42910 template<>
42911 struct PromoteTraits<unsigned long, unsigned char>
42912 {
42913 typedef unsigned long Promote;
42914 static Promote toPromote(unsigned long v) { return v; }
42915 static Promote toPromote(unsigned char v) { return v; }
42916 };
42917
42918 template<>
42919 struct PromoteTraits<unsigned long, short int>
42920 {
42921 typedef unsigned long Promote;
42922 static Promote toPromote(unsigned long v) { return v; }
42923 static Promote toPromote(short int v) { return v; }
42924 };
42925
42926 template<>
42927 struct PromoteTraits<unsigned long, short unsigned int>
42928 {
42929 typedef unsigned long Promote;
42930 static Promote toPromote(unsigned long v) { return v; }
42931 static Promote toPromote(short unsigned int v) { return v; }
42932 };
42933
42934 template<>
42935 struct PromoteTraits<unsigned long, int>
42936 {
42937 typedef unsigned long Promote;
42938 static Promote toPromote(unsigned long v) { return v; }
42939 static Promote toPromote(int v) { return v; }
42940 };
42941
42942 template<>
42943 struct PromoteTraits<unsigned long, unsigned int>
42944 {
42945 typedef unsigned long Promote;
42946 static Promote toPromote(unsigned long v) { return v; }
42947 static Promote toPromote(unsigned int v) { return v; }
42948 };
42949
42950 template<>
42951 struct PromoteTraits<unsigned long, long>
42952 {
42953 typedef unsigned long Promote;
42954 static Promote toPromote(unsigned long v) { return v; }
42955 static Promote toPromote(long v) { return v; }
42956 };
42957
42958 template<>
42959 struct PromoteTraits<unsigned long, unsigned long>
42960 {
42961 typedef unsigned long Promote;
42962 static Promote toPromote(unsigned long v) { return v; }
42963 };
42964
42965 template<>
42966 struct PromoteTraits<unsigned long, float>
42967 {
42968 typedef float Promote;
42969 static Promote toPromote(unsigned long v) { return static_cast<Promote>(v); }
42970 static Promote toPromote(float v) { return v; }
42971 };
42972
42973 template<>
42974 struct PromoteTraits<unsigned long, double>
42975 {
42976 typedef double Promote;
42977 static Promote toPromote(unsigned long v) { return v; }
42978 static Promote toPromote(double v) { return v; }
42979 };
42980
42981 template<>
42982 struct PromoteTraits<unsigned long, long double>
42983 {
42984 typedef long double Promote;
42985 static Promote toPromote(unsigned long v) { return v; }
42986 static Promote toPromote(long double v) { return v; }
42987 };
42988
42989 template<>
42990 struct PromoteTraits<float, signed char>
42991 {
42992 typedef float Promote;
42993 static Promote toPromote(float v) { return v; }
42994 static Promote toPromote(signed char v) { return v; }
42995 };
42996
42997 template<>
42998 struct PromoteTraits<float, unsigned char>
42999 {
43000 typedef float Promote;
43001 static Promote toPromote(float v) { return v; }
43002 static Promote toPromote(unsigned char v) { return v; }
43003 };
43004
43005 template<>
43006 struct PromoteTraits<float, short int>
43007 {
43008 typedef float Promote;
43009 static Promote toPromote(float v) { return v; }
43010 static Promote toPromote(short int v) { return v; }
43011 };
43012
43013 template<>
43014 struct PromoteTraits<float, short unsigned int>
43015 {
43016 typedef float Promote;
43017 static Promote toPromote(float v) { return v; }
43018 static Promote toPromote(short unsigned int v) { return v; }
43019 };
43020
43021 template<>
43022 struct PromoteTraits<float, int>
43023 {
43024 typedef float Promote;
43025 static Promote toPromote(float v) { return v; }
43026 static Promote toPromote(int v) { return static_cast<Promote>(v); }
43027 };
43028
43029 template<>
43030 struct PromoteTraits<float, unsigned int>
43031 {
43032 typedef float Promote;
43033 static Promote toPromote(float v) { return v; }
43034 static Promote toPromote(unsigned int v) { return static_cast<Promote>(v); }
43035 };
43036
43037 template<>
43038 struct PromoteTraits<float, long>
43039 {
43040 typedef float Promote;
43041 static Promote toPromote(float v) { return v; }
43042 static Promote toPromote(long v) { return static_cast<Promote>(v); }
43043 };
43044
43045 template<>
43046 struct PromoteTraits<float, unsigned long>
43047 {
43048 typedef float Promote;
43049 static Promote toPromote(float v) { return v; }
43050 static Promote toPromote(unsigned long v) { return static_cast<Promote>(v); }
43051 };
43052
43053 template<>
43054 struct PromoteTraits<float, float>
43055 {
43056 typedef float Promote;
43057 static Promote toPromote(float v) { return v; }
43058 };
43059
43060 template<>
43061 struct PromoteTraits<float, double>
43062 {
43063 typedef double Promote;
43064 static Promote toPromote(float v) { return v; }
43065 static Promote toPromote(double v) { return v; }
43066 };
43067
43068 template<>
43069 struct PromoteTraits<float, long double>
43070 {
43071 typedef long double Promote;
43072 static Promote toPromote(float v) { return v; }
43073 static Promote toPromote(long double v) { return v; }
43074 };
43075
43076 template<>
43077 struct PromoteTraits<double, signed char>
43078 {
43079 typedef double Promote;
43080 static Promote toPromote(double v) { return v; }
43081 static Promote toPromote(signed char v) { return v; }
43082 };
43083
43084 template<>
43085 struct PromoteTraits<double, unsigned char>
43086 {
43087 typedef double Promote;
43088 static Promote toPromote(double v) { return v; }
43089 static Promote toPromote(unsigned char v) { return v; }
43090 };
43091
43092 template<>
43093 struct PromoteTraits<double, short int>
43094 {
43095 typedef double Promote;
43096 static Promote toPromote(double v) { return v; }
43097 static Promote toPromote(short int v) { return v; }
43098 };
43099
43100 template<>
43101 struct PromoteTraits<double, short unsigned int>
43102 {
43103 typedef double Promote;
43104 static Promote toPromote(double v) { return v; }
43105 static Promote toPromote(short unsigned int v) { return v; }
43106 };
43107
43108 template<>
43109 struct PromoteTraits<double, int>
43110 {
43111 typedef double Promote;
43112 static Promote toPromote(double v) { return v; }
43113 static Promote toPromote(int v) { return v; }
43114 };
43115
43116 template<>
43117 struct PromoteTraits<double, unsigned int>
43118 {
43119 typedef double Promote;
43120 static Promote toPromote(double v) { return v; }
43121 static Promote toPromote(unsigned int v) { return v; }
43122 };
43123
43124 template<>
43125 struct PromoteTraits<double, long>
43126 {
43127 typedef double Promote;
43128 static Promote toPromote(double v) { return v; }
43129 static Promote toPromote(long v) { return v; }
43130 };
43131
43132 template<>
43133 struct PromoteTraits<double, unsigned long>
43134 {
43135 typedef double Promote;
43136 static Promote toPromote(double v) { return v; }
43137 static Promote toPromote(unsigned long v) { return v; }
43138 };
43139
43140 template<>
43141 struct PromoteTraits<double, float>
43142 {
43143 typedef double Promote;
43144 static Promote toPromote(double v) { return v; }
43145 static Promote toPromote(float v) { return v; }
43146 };
43147
43148 template<>
43149 struct PromoteTraits<double, double>
43150 {
43151 typedef double Promote;
43152 static Promote toPromote(double v) { return v; }
43153 };
43154
43155 template<>
43156 struct PromoteTraits<double, long double>
43157 {
43158 typedef long double Promote;
43159 static Promote toPromote(double v) { return v; }
43160 static Promote toPromote(long double v) { return v; }
43161 };
43162
43163 template<>
43164 struct PromoteTraits<long double, signed char>
43165 {
43166 typedef long double Promote;
43167 static Promote toPromote(long double v) { return v; }
43168 static Promote toPromote(signed char v) { return v; }
43169 };
43170
43171 template<>
43172 struct PromoteTraits<long double, unsigned char>
43173 {
43174 typedef long double Promote;
43175 static Promote toPromote(long double v) { return v; }
43176 static Promote toPromote(unsigned char v) { return v; }
43177 };
43178
43179 template<>
43180 struct PromoteTraits<long double, short int>
43181 {
43182 typedef long double Promote;
43183 static Promote toPromote(long double v) { return v; }
43184 static Promote toPromote(short int v) { return v; }
43185 };
43186
43187 template<>
43188 struct PromoteTraits<long double, short unsigned int>
43189 {
43190 typedef long double Promote;
43191 static Promote toPromote(long double v) { return v; }
43192 static Promote toPromote(short unsigned int v) { return v; }
43193 };
43194
43195 template<>
43196 struct PromoteTraits<long double, int>
43197 {
43198 typedef long double Promote;
43199 static Promote toPromote(long double v) { return v; }
43200 static Promote toPromote(int v) { return v; }
43201 };
43202
43203 template<>
43204 struct PromoteTraits<long double, unsigned int>
43205 {
43206 typedef long double Promote;
43207 static Promote toPromote(long double v) { return v; }
43208 static Promote toPromote(unsigned int v) { return v; }
43209 };
43210
43211 template<>
43212 struct PromoteTraits<long double, long>
43213 {
43214 typedef long double Promote;
43215 static Promote toPromote(long double v) { return v; }
43216 static Promote toPromote(long v) { return v; }
43217 };
43218
43219 template<>
43220 struct PromoteTraits<long double, unsigned long>
43221 {
43222 typedef long double Promote;
43223 static Promote toPromote(long double v) { return v; }
43224 static Promote toPromote(unsigned long v) { return v; }
43225 };
43226
43227 template<>
43228 struct PromoteTraits<long double, float>
43229 {
43230 typedef long double Promote;
43231 static Promote toPromote(long double v) { return v; }
43232 static Promote toPromote(float v) { return v; }
43233 };
43234
43235 template<>
43236 struct PromoteTraits<long double, double>
43237 {
43238 typedef long double Promote;
43239 static Promote toPromote(long double v) { return v; }
43240 static Promote toPromote(double v) { return v; }
43241 };
43242
43243 template<>
43244 struct PromoteTraits<long double, long double>
43245 {
43246 typedef long double Promote;
43247 static Promote toPromote(long double v) { return v; }
43248 };
43249
43250
43251
43252 template <class T>
43253 struct PromoteTraits<std::complex<T>, std::complex<T> >
43254 {
43255 typedef std::complex<typename PromoteTraits<T, T>::Promote> Promote;
43256 static Promote toPromote(std::complex<T> const & v) { return v; }
43257 };
43258
43259 template <class T1, class T2>
43260 struct PromoteTraits<std::complex<T1>, std::complex<T2> >
43261 {
43262 typedef std::complex<typename PromoteTraits<T1, T2>::Promote> Promote;
43263 static Promote toPromote(std::complex<T1> const & v) { return v; }
43264 static Promote toPromote(std::complex<T2> const & v) { return v; }
43265 };
43266
43267 template <class T1, class T2>
43268 struct PromoteTraits<std::complex<T1>, T2 >
43269 {
43270 typedef std::complex<typename PromoteTraits<T1, T2>::Promote> Promote;
43271 static Promote toPromote(std::complex<T1> const & v) { return v; }
43272 static Promote toPromote(T2 const & v) { return Promote(v); }
43273 };
43274
43275 template <class T1, class T2>
43276 struct PromoteTraits<T1, std::complex<T2> >
43277 {
43278 typedef std::complex<typename PromoteTraits<T1, T2>::Promote> Promote;
43279 static Promote toPromote(T1 const & v) { return Promote(v); }
43280 static Promote toPromote(std::complex<T2> const & v) { return v; }
43281 };
43282
43283
43284
43285 namespace detail {
43286
43287 template <class T>
43288 struct RequiresExplicitCast {
43289 template <class U>
43290 static U const & cast(U const & v)
43291 { return v; }
43292 };
43293 # 2261 "../include/vigra/numerictraits.hxx"
43294 template <> struct RequiresExplicitCast<signed char> { static signed char cast(float v) { return NumericTraits<signed char>::fromRealPromote(v); } static signed char cast(double v) { return NumericTraits<signed char>::fromRealPromote(v); } static signed char cast(signed char v) { return v; } template <class U> static signed char cast(U v) { return static_cast<signed char>(v); } };
43295 template <> struct RequiresExplicitCast<unsigned char> { static unsigned char cast(float v) { return NumericTraits<unsigned char>::fromRealPromote(v); } static unsigned char cast(double v) { return NumericTraits<unsigned char>::fromRealPromote(v); } static unsigned char cast(unsigned char v) { return v; } template <class U> static unsigned char cast(U v) { return static_cast<unsigned char>(v); } };
43296 template <> struct RequiresExplicitCast<short> { static short cast(float v) { return NumericTraits<short>::fromRealPromote(v); } static short cast(double v) { return NumericTraits<short>::fromRealPromote(v); } static short cast(short v) { return v; } template <class U> static short cast(U v) { return static_cast<short>(v); } };
43297 template <> struct RequiresExplicitCast<unsigned short> { static unsigned short cast(float v) { return NumericTraits<unsigned short>::fromRealPromote(v); } static unsigned short cast(double v) { return NumericTraits<unsigned short>::fromRealPromote(v); } static unsigned short cast(unsigned short v) { return v; } template <class U> static unsigned short cast(U v) { return static_cast<unsigned short>(v); } };
43298 template <> struct RequiresExplicitCast<int> { static int cast(float v) { return NumericTraits<int>::fromRealPromote(v); } static int cast(double v) { return NumericTraits<int>::fromRealPromote(v); } static int cast(int v) { return v; } template <class U> static int cast(U v) { return static_cast<int>(v); } };
43299 template <> struct RequiresExplicitCast<unsigned int> { static unsigned int cast(float v) { return NumericTraits<unsigned int>::fromRealPromote(v); } static unsigned int cast(double v) { return NumericTraits<unsigned int>::fromRealPromote(v); } static unsigned int cast(unsigned int v) { return v; } template <class U> static unsigned int cast(U v) { return static_cast<unsigned int>(v); } };
43300 template <> struct RequiresExplicitCast<long> { static long cast(float v) { return NumericTraits<long>::fromRealPromote(v); } static long cast(double v) { return NumericTraits<long>::fromRealPromote(v); } static long cast(long v) { return v; } template <class U> static long cast(U v) { return static_cast<long>(v); } };
43301 template <> struct RequiresExplicitCast<unsigned long> { static unsigned long cast(float v) { return NumericTraits<unsigned long>::fromRealPromote(v); } static unsigned long cast(double v) { return NumericTraits<unsigned long>::fromRealPromote(v); } static unsigned long cast(unsigned long v) { return v; } template <class U> static unsigned long cast(U v) { return static_cast<unsigned long>(v); } };
43302
43303
43304
43305 template <>
43306 struct RequiresExplicitCast<float> {
43307 template <class U>
43308 static U cast(U v)
43309 { return v; }
43310 };
43311
43312 template <>
43313 struct RequiresExplicitCast<double> {
43314 template <class U>
43315 static U cast(U v)
43316 { return v; }
43317 };
43318
43319
43320
43321 }
43322
43323
43324
43325 }
43326 # 42 "../include/vigra/accessor.hxx" 2
43327
43328
43329 namespace vigra {
43330 # 149 "../include/vigra/accessor.hxx"
43331 template <class VALUETYPE>
43332 class StandardAccessor
43333 {
43334 public:
43335
43336
43337 typedef VALUETYPE value_type;
43338
43339
43340
43341 template <class ITERATOR>
43342 VALUETYPE const & operator()(ITERATOR const & i) const { return *i; }
43343
43344 VALUETYPE const & operator()(VALUETYPE const * i) const { return *i; }
43345
43346
43347
43348 template <class ITERATOR, class DIFFERENCE>
43349 VALUETYPE const & operator()(ITERATOR const & i, DIFFERENCE const & diff) const
43350 {
43351 return i[diff];
43352 }
43353
43354
43355
43356
43357
43358 template <class V, class ITERATOR>
43359 void set(V const & value, ITERATOR const & i) const
43360 { *i = detail::RequiresExplicitCast<VALUETYPE>::cast(value); }
43361
43362
43363 template <class V, class ITERATOR>
43364 void set(V const & value, ITERATOR & i) const
43365 { *i = detail::RequiresExplicitCast<VALUETYPE>::cast(value); }
43366
43367
43368
43369
43370
43371
43372 template <class V, class ITERATOR, class DIFFERENCE>
43373 void set(V const & value, ITERATOR const & i, DIFFERENCE const & diff) const
43374 {
43375 i[diff]= detail::RequiresExplicitCast<VALUETYPE>::cast(value);
43376 }
43377 };
43378 # 214 "../include/vigra/accessor.hxx"
43379 template <class VALUETYPE>
43380 class StandardValueAccessor
43381 {
43382 public:
43383
43384
43385 typedef VALUETYPE value_type;
43386
43387
43388
43389
43390
43391 template <class ITERATOR>
43392 VALUETYPE operator()(ITERATOR const & i) const
43393 { return detail::RequiresExplicitCast<VALUETYPE>::cast(*i); }
43394
43395
43396
43397
43398
43399
43400 template <class ITERATOR, class DIFFERENCE>
43401 VALUETYPE operator()(ITERATOR const & i, DIFFERENCE const & diff) const
43402 {
43403 return detail::RequiresExplicitCast<VALUETYPE>::cast(i[diff]);
43404 }
43405
43406
43407
43408
43409 template <class V, class ITERATOR>
43410 void set(V value, ITERATOR const & i) const
43411 { *i = detail::RequiresExplicitCast<VALUETYPE>::cast(value); }
43412
43413
43414 template <class V, class ITERATOR>
43415 void set(V value, ITERATOR & i) const
43416 { *i = detail::RequiresExplicitCast<VALUETYPE>::cast(value); }
43417
43418
43419
43420
43421
43422
43423 template <class V, class ITERATOR, class DIFFERENCE>
43424 void set(V value, ITERATOR const & i, DIFFERENCE const & diff) const
43425 {
43426 i[diff]= detail::RequiresExplicitCast<VALUETYPE>::cast(value);
43427 }
43428 };
43429 # 285 "../include/vigra/accessor.hxx"
43430 template <class VALUETYPE>
43431 class StandardConstAccessor
43432 {
43433 public:
43434 typedef VALUETYPE value_type;
43435
43436
43437
43438 template <class ITERATOR>
43439 VALUETYPE const & operator()(ITERATOR const & i) const
43440 { return *i; }
43441
43442
43443
43444 template <class ITERATOR, class DIFFERENCE>
43445 VALUETYPE const & operator()(ITERATOR const & i, DIFFERENCE const & diff) const
43446 {
43447 return i[diff];
43448 }
43449 };
43450 # 323 "../include/vigra/accessor.hxx"
43451 template <class VALUETYPE>
43452 class StandardConstValueAccessor
43453 {
43454 public:
43455 typedef VALUETYPE value_type;
43456
43457
43458
43459
43460
43461 template <class ITERATOR>
43462 VALUETYPE operator()(ITERATOR const & i) const
43463 { return detail::RequiresExplicitCast<VALUETYPE>::cast(*i); }
43464
43465
43466
43467
43468
43469
43470 template <class ITERATOR, class DIFFERENCE>
43471 VALUETYPE operator()(ITERATOR const & i, DIFFERENCE const & diff) const
43472 {
43473 return detail::RequiresExplicitCast<VALUETYPE>::cast(i[diff]);
43474 }
43475 };
43476 # 381 "../include/vigra/accessor.hxx"
43477 template <class VECTORTYPE>
43478 class VectorComponentAccessor
43479 {
43480 int index_;
43481 public:
43482
43483
43484 typedef typename VECTORTYPE::value_type value_type;
43485
43486
43487
43488 VectorComponentAccessor(int index)
43489 : index_(index)
43490 {}
43491
43492
43493
43494 template <class ITERATOR>
43495 value_type const & operator()(ITERATOR const & i) const
43496 { return (*i)[index_]; }
43497
43498
43499
43500 template <class ITERATOR, class DIFFERENCE>
43501 value_type const & operator()(ITERATOR const & i, DIFFERENCE const & diff) const
43502 {
43503 return i[diff][index_];
43504 }
43505
43506
43507
43508
43509
43510 template <class V, class ITERATOR>
43511 void set(V const & value, ITERATOR const & i) const
43512 {
43513 (*i)[index_] = detail::RequiresExplicitCast<value_type>::cast(value);
43514 }
43515
43516
43517
43518
43519
43520
43521 template <class V, class ITERATOR, class DIFFERENCE>
43522 void set(V const & value, ITERATOR const & i, DIFFERENCE const & diff) const
43523 {
43524 i[diff][index_]= detail::RequiresExplicitCast<value_type>::cast(value);
43525 }
43526
43527
43528
43529 void setIndex(int i)
43530 {
43531 index_ = i;
43532 }
43533 };
43534 # 465 "../include/vigra/accessor.hxx"
43535 template <class VECTORTYPE>
43536 class VectorComponentValueAccessor
43537 {
43538 int index_;
43539 public:
43540
43541
43542 typedef typename VECTORTYPE::value_type value_type;
43543
43544
43545
43546 VectorComponentValueAccessor(int index)
43547 : index_(index)
43548 {}
43549
43550
43551
43552
43553
43554
43555 template <class ITERATOR>
43556 value_type operator()(ITERATOR const & i) const
43557 { return detail::RequiresExplicitCast<value_type>::cast((*i)[index_]); }
43558
43559
43560
43561
43562
43563
43564 template <class ITERATOR, class DIFFERENCE>
43565 value_type operator()(ITERATOR const & i, DIFFERENCE const & diff) const
43566 {
43567 return detail::RequiresExplicitCast<value_type>::cast(i[diff][index_]);
43568 }
43569
43570
43571
43572
43573
43574 template <class V, class ITERATOR>
43575 void set(V value, ITERATOR const & i) const
43576 {
43577 (*i)[index_] = detail::RequiresExplicitCast<value_type>::cast(value);
43578 }
43579
43580
43581
43582
43583
43584
43585 template <class V, class ITERATOR, class DIFFERENCE>
43586 void set(V value, ITERATOR const & i, DIFFERENCE const & diff) const
43587 {
43588 i[diff][index_]= detail::RequiresExplicitCast<value_type>::cast(value);
43589 }
43590
43591
43592
43593 void setIndex(int i)
43594 {
43595 index_ = i;
43596 }
43597 };
43598 # 555 "../include/vigra/accessor.hxx"
43599 template <class ACCESSOR>
43600 class VectorElementAccessor
43601 {
43602 int index_;
43603 ACCESSOR a_;
43604 public:
43605
43606
43607 typedef typename ACCESSOR::component_type value_type;
43608
43609
43610
43611 VectorElementAccessor(int index, ACCESSOR a = ACCESSOR())
43612 : index_(index),
43613 a_(a)
43614 {}
43615
43616
43617
43618 template <class ITERATOR>
43619 value_type const & operator()(ITERATOR const & i) const
43620 { return a_.getComponent(i, index_); }
43621
43622
43623
43624 template <class ITERATOR, class DIFFERENCE>
43625 value_type const & operator()(ITERATOR const & i, DIFFERENCE const & diff) const
43626 {
43627 return a_.getComponent(i, diff, index_);
43628 }
43629
43630
43631
43632
43633
43634 template <class V, class ITERATOR>
43635 void set(V const & value, ITERATOR const & i) const
43636 {
43637 a_.setComponent(detail::RequiresExplicitCast<value_type>::cast(value), i, index_);
43638 }
43639
43640
43641
43642
43643
43644
43645 template <class V, class ITERATOR, class DIFFERENCE>
43646 void set(V const & value, ITERATOR const & i, DIFFERENCE const & diff) const
43647 {
43648 a_.setComponent(detail::RequiresExplicitCast<value_type>::cast(value), i, diff, index_);
43649 }
43650
43651
43652
43653 void setIndex(int i)
43654 {
43655 index_ = i;
43656 }
43657 };
43658 # 648 "../include/vigra/accessor.hxx"
43659 template <class SEQUENCE>
43660 class SequenceAccessor
43661 : public StandardAccessor<SEQUENCE>
43662 {
43663 public:
43664
43665
43666 typedef typename SEQUENCE::value_type component_type;
43667
43668
43669 typedef typename
43670 If<typename TypeTraits<SEQUENCE>::isConst,
43671 typename SEQUENCE::const_iterator,
43672 typename SEQUENCE::iterator>::type
43673 iterator;
43674 # 671 "../include/vigra/accessor.hxx"
43675 template <class ITERATOR>
43676 iterator begin(ITERATOR const & i) const
43677 {
43678 return (*i).begin();
43679 }
43680
43681
43682
43683 template <class ITERATOR>
43684 iterator end(ITERATOR const & i) const
43685 {
43686 return (*i).end();
43687 }
43688
43689
43690
43691
43692 template <class ITERATOR, class DIFFERENCE>
43693 iterator begin(ITERATOR const & i, DIFFERENCE const & diff) const
43694 {
43695 return i[diff].begin();
43696 }
43697
43698
43699
43700
43701 template <class ITERATOR, class DIFFERENCE>
43702 iterator end(ITERATOR const & i, DIFFERENCE const & diff) const
43703 {
43704 return i[diff].end();
43705 }
43706
43707
43708
43709 template <class ITERATOR>
43710 unsigned int size(ITERATOR const & i) const { return (*i).size(); }
43711
43712
43713
43714 template <class ITERATOR, class DIFFERENCE>
43715 unsigned int size(ITERATOR const & i, DIFFERENCE const & diff) const
43716 { return i[diff].size(); }
43717 };
43718 # 787 "../include/vigra/accessor.hxx"
43719 template <class VECTOR>
43720 class VectorAccessor
43721 : public SequenceAccessor<VECTOR>
43722 {
43723 public:
43724
43725
43726 typedef typename VECTOR::value_type component_type;
43727
43728
43729
43730
43731 template <class ITERATOR>
43732 component_type const & getComponent(ITERATOR const & i, int idx) const
43733 {
43734 return (*i)[idx];
43735 }
43736
43737
43738
43739
43740
43741
43742 template <class V, class ITERATOR>
43743 void setComponent(V const & value, ITERATOR const & i, int idx) const
43744 {
43745 (*i)[idx] = detail::RequiresExplicitCast<component_type>::cast(value);
43746 }
43747
43748
43749
43750
43751 template <class ITERATOR, class DIFFERENCE>
43752 component_type const & getComponent(ITERATOR const & i, DIFFERENCE const & diff, int idx) const
43753 {
43754 return i[diff][idx];
43755 }
43756
43757
43758
43759
43760
43761
43762 template <class V, class ITERATOR, class DIFFERENCE>
43763 void
43764 setComponent(V const & value, ITERATOR const & i, DIFFERENCE const & diff, int idx) const
43765 {
43766 i[diff][idx] = detail::RequiresExplicitCast<component_type>::cast(value);
43767 }
43768 };
43769 # 882 "../include/vigra/accessor.hxx"
43770 template <class Iter1, class Acc1, class Iter2, class Acc2>
43771 class MultiImageAccessor2
43772 {
43773 public:
43774
43775
43776
43777 typedef pair<typename Acc1::value_type, typename Acc2::value_type>
43778 value_type;
43779
43780
43781
43782 MultiImageAccessor2(Iter1 i1, Acc1 a1, Iter2 i2, Acc2 a2)
43783 : i1_(i1), a1_(a1), i2_(i2), a2_(a2)
43784 {}
43785
43786
43787
43788 template <class DIFFERENCE>
43789 value_type operator()(DIFFERENCE const & d) const
43790 {
43791 return std::make_pair(a1_(i1_, d), a2_(i2_, d));
43792 }
43793
43794
43795
43796 template <class DIFFERENCE1, class DIFFERENCE2>
43797 value_type operator()(DIFFERENCE1 d1, DIFFERENCE2 const & d2) const
43798 {
43799 d1 += d2;
43800 return std::make_pair(a1_(i1_, d1), a2_(i2_, d1));
43801 }
43802
43803 private:
43804 Iter1 i1_;
43805 Acc1 a1_;
43806 Iter2 i2_;
43807 Acc2 a2_;
43808 };
43809
43810
43811
43812 template <class T>
43813 struct AccessorTraits
43814 {
43815 typedef StandardAccessor<T> default_accessor;
43816 typedef StandardConstAccessor<T> default_const_accessor;
43817 };
43818 # 939 "../include/vigra/accessor.hxx"
43819 template <> struct AccessorTraits<signed char > { typedef StandardValueAccessor<signed char > default_accessor; typedef StandardConstValueAccessor<signed char > default_const_accessor; };
43820 template <> struct AccessorTraits<unsigned char > { typedef StandardValueAccessor<unsigned char > default_accessor; typedef StandardConstValueAccessor<unsigned char > default_const_accessor; };
43821 template <> struct AccessorTraits<short > { typedef StandardValueAccessor<short > default_accessor; typedef StandardConstValueAccessor<short > default_const_accessor; };
43822 template <> struct AccessorTraits<unsigned short > { typedef StandardValueAccessor<unsigned short > default_accessor; typedef StandardConstValueAccessor<unsigned short > default_const_accessor; };
43823 template <> struct AccessorTraits<int > { typedef StandardValueAccessor<int > default_accessor; typedef StandardConstValueAccessor<int > default_const_accessor; };
43824 template <> struct AccessorTraits<unsigned int > { typedef StandardValueAccessor<unsigned int > default_accessor; typedef StandardConstValueAccessor<unsigned int > default_const_accessor; };
43825 template <> struct AccessorTraits<long > { typedef StandardValueAccessor<long > default_accessor; typedef StandardConstValueAccessor<long > default_const_accessor; };
43826 template <> struct AccessorTraits<unsigned long > { typedef StandardValueAccessor<unsigned long > default_accessor; typedef StandardConstValueAccessor<unsigned long > default_const_accessor; };
43827 template <> struct AccessorTraits<float > { typedef StandardValueAccessor<float > default_accessor; typedef StandardConstValueAccessor<float > default_const_accessor; };
43828 template <> struct AccessorTraits<double > { typedef StandardValueAccessor<double > default_accessor; typedef StandardConstValueAccessor<double > default_const_accessor; };
43829
43830 template <class T, unsigned int RED_IDX, unsigned int GREEN_IDX, unsigned int BLUE_IDX> class RGBValue;
43831 template <class T> class RGBAccessor;
43832 template <class T, int SIZE> class TinyVector;
43833
43834
43835
43836 template <class T, unsigned int RED_IDX, unsigned int GREEN_IDX, unsigned int BLUE_IDX>
43837 struct AccessorTraits<RGBValue<T, RED_IDX, GREEN_IDX, BLUE_IDX> >
43838 {
43839 typedef RGBAccessor<RGBValue<T, RED_IDX, GREEN_IDX, BLUE_IDX> > default_accessor;
43840 typedef RGBAccessor<RGBValue<T, RED_IDX, GREEN_IDX, BLUE_IDX> > default_const_accessor;
43841 };
43842
43843 template <class T, int SIZE>
43844 struct AccessorTraits<TinyVector<T, SIZE> >
43845 {
43846 typedef VectorAccessor<TinyVector<T, SIZE> > default_accessor;
43847 typedef VectorAccessor<TinyVector<T, SIZE> > default_const_accessor;
43848 };
43849 # 1033 "../include/vigra/accessor.hxx"
43850 }
43851 # 42 "../include/vigra/iteratortraits.hxx" 2
43852 # 1 "../include/vigra/imageiteratoradapter.hxx" 1
43853 # 43 "../include/vigra/imageiteratoradapter.hxx"
43854 namespace vigra {
43855 # 77 "../include/vigra/imageiteratoradapter.hxx"
43856 template <class IMAGE_ITERATOR>
43857 class ColumnIterator : private IMAGE_ITERATOR
43858 {
43859 public:
43860
43861
43862 typedef typename IMAGE_ITERATOR::value_type value_type;
43863
43864
43865
43866 typedef typename IMAGE_ITERATOR::value_type PixelType;
43867
43868
43869
43870 typedef typename IMAGE_ITERATOR::reference reference;
43871
43872
43873
43874 typedef typename IMAGE_ITERATOR::index_reference index_reference;
43875
43876
43877
43878 typedef typename IMAGE_ITERATOR::pointer pointer;
43879
43880
43881
43882 typedef typename IMAGE_ITERATOR::difference_type::MoveY difference_type;
43883
43884
43885
43886 typedef std::random_access_iterator_tag iterator_category;
43887
43888
43889
43890 typedef IMAGE_ITERATOR Adaptee;
43891
43892
43893
43894 ColumnIterator(IMAGE_ITERATOR const & i)
43895 : IMAGE_ITERATOR(i)
43896 {}
43897
43898
43899
43900 ColumnIterator & operator=(ColumnIterator const & i)
43901 {
43902 IMAGE_ITERATOR::operator=(i);
43903
43904 return *this;
43905 }
43906
43907
43908
43909 ColumnIterator & operator=(IMAGE_ITERATOR const & i)
43910 {
43911 IMAGE_ITERATOR::operator=(i);
43912
43913 return *this;
43914 }
43915
43916
43917
43918
43919 ColumnIterator & operator++()
43920 {
43921 ++(this->y);
43922 return *this;
43923 }
43924
43925 ColumnIterator operator++(int)
43926 {
43927 ColumnIterator ret(*this);
43928 (this->y)++;
43929 return ret;
43930 }
43931
43932
43933 ColumnIterator & operator--()
43934 {
43935 --(this->y);
43936 return *this;
43937 }
43938
43939
43940 ColumnIterator operator--(int)
43941 {
43942 ColumnIterator ret(*this);
43943 (this->y)--;
43944 return ret;
43945 }
43946
43947
43948 ColumnIterator & operator+=(int d)
43949 {
43950 this->y += d;
43951 return *this;
43952 }
43953
43954
43955 ColumnIterator & operator-=(int d)
43956 {
43957 this->y -= d;
43958 return *this;
43959 }
43960
43961
43962
43963
43964
43965
43966 ColumnIterator operator+(int d) const
43967 {
43968 IMAGE_ITERATOR ret(*this);
43969 ret.y += d;
43970 return ColumnIterator(ret);
43971 }
43972
43973
43974 ColumnIterator operator-(int d) const
43975 {
43976 IMAGE_ITERATOR ret(*this);
43977 ret.y -= d;
43978 return ColumnIterator(ret);
43979 }
43980
43981
43982 int operator-(ColumnIterator const & c) const
43983 {
43984 return this->y - c.y;
43985 }
43986
43987
43988
43989 bool operator==(ColumnIterator const & c) const
43990 {
43991 return IMAGE_ITERATOR::operator==(c);
43992 }
43993
43994
43995
43996 bool operator!=(ColumnIterator const & c) const
43997 {
43998 return IMAGE_ITERATOR::operator!=(c);
43999 }
44000
44001
44002
44003 bool operator<(ColumnIterator const & c) const
44004 {
44005 return this->y < c.y;
44006 }
44007
44008
44009
44010 reference operator*() const
44011 {
44012 return IMAGE_ITERATOR::operator*();
44013 }
44014
44015
44016
44017 index_reference operator[](int d) const
44018 {
44019 return IMAGE_ITERATOR::operator()(0, d);
44020 }
44021
44022
44023
44024 pointer operator->() const
44025 {
44026 return IMAGE_ITERATOR::operator->();
44027 }
44028
44029
44030
44031 Adaptee & adaptee() const { return (Adaptee &)*this; }
44032
44033
44034 };
44035 # 283 "../include/vigra/imageiteratoradapter.hxx"
44036 template <class IMAGE_ITERATOR>
44037 class RowIterator : private IMAGE_ITERATOR
44038 {
44039 public:
44040
44041
44042 typedef typename IMAGE_ITERATOR::value_type value_type;
44043
44044
44045
44046 typedef typename IMAGE_ITERATOR::value_type PixelType;
44047
44048
44049
44050 typedef typename IMAGE_ITERATOR::reference reference;
44051
44052
44053
44054 typedef typename IMAGE_ITERATOR::index_reference index_reference;
44055
44056
44057
44058 typedef typename IMAGE_ITERATOR::pointer pointer;
44059
44060
44061
44062 typedef typename IMAGE_ITERATOR::difference_type::MoveY difference_type;
44063
44064
44065
44066 typedef std::random_access_iterator_tag iterator_category;
44067
44068
44069
44070 typedef IMAGE_ITERATOR Adaptee;
44071
44072
44073
44074 RowIterator(IMAGE_ITERATOR const & i)
44075 : IMAGE_ITERATOR(i)
44076 {}
44077
44078
44079
44080 RowIterator & operator=(RowIterator const & i)
44081 {
44082 IMAGE_ITERATOR::operator=(i);
44083
44084 return *this;
44085 }
44086
44087
44088
44089 RowIterator & operator=(IMAGE_ITERATOR const & i)
44090 {
44091 IMAGE_ITERATOR::operator=(i);
44092
44093 return *this;
44094 }
44095
44096
44097
44098
44099 RowIterator & operator++()
44100 {
44101 ++(this->x);
44102 return *this;
44103 }
44104
44105 RowIterator operator++(int)
44106 {
44107 RowIterator ret(*this);
44108 (this->x)++;
44109 return ret;
44110 }
44111
44112
44113 RowIterator & operator--()
44114 {
44115 --(this->x);
44116 return *this;
44117 }
44118
44119
44120 RowIterator operator--(int)
44121 {
44122 RowIterator ret(*this);
44123 (this->x)--;
44124 return ret;
44125 }
44126
44127
44128 RowIterator & operator+=(int d)
44129 {
44130 this->x += d;
44131 return *this;
44132 }
44133
44134
44135 RowIterator & operator-=(int d)
44136 {
44137 this->x -= d;
44138 return *this;
44139 }
44140
44141
44142
44143
44144
44145
44146 RowIterator operator+(int d) const
44147 {
44148 IMAGE_ITERATOR ret(*this);
44149 ret.x += d;
44150 return RowIterator(ret);
44151 }
44152
44153
44154 RowIterator operator-(int d) const
44155 {
44156 IMAGE_ITERATOR ret(*this);
44157 ret.x -= d;
44158 return RowIterator(ret);
44159 }
44160
44161
44162 int operator-(RowIterator const & c) const
44163 {
44164 return this->x - c.x;
44165 }
44166
44167
44168
44169 bool operator==(RowIterator const & c) const
44170 {
44171 return IMAGE_ITERATOR::operator==(c);
44172 }
44173
44174
44175
44176 bool operator!=(RowIterator const & c) const
44177 {
44178 return IMAGE_ITERATOR::operator!=(c);
44179 }
44180
44181
44182
44183 bool operator<(RowIterator const & c) const
44184 {
44185 return this->x < c.x;
44186 }
44187
44188
44189
44190 reference operator*() const
44191 {
44192 return IMAGE_ITERATOR::operator*();
44193 }
44194
44195
44196
44197 index_reference operator[](int d) const
44198 {
44199 return IMAGE_ITERATOR::operator()(d, 0);
44200 }
44201
44202
44203
44204 pointer operator->() const
44205 {
44206 return IMAGE_ITERATOR::operator->();
44207 }
44208
44209
44210
44211 Adaptee & adaptee() const { return (Adaptee &)*this; }
44212
44213
44214 };
44215 # 482 "../include/vigra/imageiteratoradapter.hxx"
44216 template <class IMAGE_ITERATOR>
44217 class LineIterator : private IMAGE_ITERATOR
44218 {
44219 public:
44220
44221
44222 typedef typename IMAGE_ITERATOR::value_type value_type;
44223
44224
44225
44226 typedef typename IMAGE_ITERATOR::value_type PixelType;
44227
44228
44229
44230 typedef typename IMAGE_ITERATOR::reference reference;
44231
44232
44233
44234 typedef typename IMAGE_ITERATOR::pointer pointer;
44235
44236
44237
44238 typedef std::forward_iterator_tag iterator_category;
44239
44240
44241
44242 typedef IMAGE_ITERATOR Adaptee;
44243
44244
44245
44246 LineIterator(IMAGE_ITERATOR const & start,
44247 IMAGE_ITERATOR const & end)
44248
44249 : IMAGE_ITERATOR(start)
44250 {
44251 # 528 "../include/vigra/imageiteratoradapter.hxx"
44252 dy_ = end.y - start.y;
44253 dx_ = end.x - start.x;
44254
44255 stepy_ = (dy_ < 0) ? -1 : 1;
44256 dy_ = std::abs(dy_) << 1;
44257
44258 stepx_ = (dx_ < 0) ? -1 : 1;
44259 dx_ = std::abs(dx_) << 1;
44260
44261 fraction_ = (dx_ > dy_) ? (dy_ - (dx_ >> 1)) : (dx_ - (dy_ >> 1));
44262 # 557 "../include/vigra/imageiteratoradapter.hxx"
44263 }
44264
44265
44266
44267
44268 LineIterator & operator++()
44269 {
44270 # 583 "../include/vigra/imageiteratoradapter.hxx"
44271 if (dx_ > dy_) {
44272 if (fraction_ >= 0) {
44273 this->y += stepy_;
44274 fraction_ -= dx_;
44275 }
44276 this->x += stepx_;
44277 fraction_ += dy_;
44278 }
44279 else {
44280 if (fraction_ >= 0) {
44281 this->x += stepx_;
44282 fraction_ -= dy_;
44283 }
44284 this->y += stepy_;
44285 fraction_ += dx_;
44286 }
44287 return *this;
44288 }
44289
44290 LineIterator operator++(int)
44291 {
44292 LineIterator ret(*this);
44293 operator++();
44294 return ret;
44295 }
44296
44297
44298
44299
44300
44301
44302
44303 bool operator==(LineIterator const & c) const
44304 {
44305 return IMAGE_ITERATOR::operator==(c);
44306 }
44307
44308
44309
44310
44311
44312 bool operator==(IMAGE_ITERATOR const & c) const
44313 {
44314 return IMAGE_ITERATOR::operator==(c);
44315 }
44316
44317
44318
44319 bool operator!=(LineIterator const & c) const
44320 {
44321 return IMAGE_ITERATOR::operator!=(c);
44322 }
44323
44324
44325
44326
44327
44328 bool operator!=(IMAGE_ITERATOR const & c) const
44329 {
44330 return IMAGE_ITERATOR::operator!=(c);
44331 }
44332
44333
44334
44335 reference operator*() const
44336 {
44337 return IMAGE_ITERATOR::operator*();
44338 }
44339
44340
44341
44342 pointer operator->() const
44343 {
44344 return IMAGE_ITERATOR::operator->();
44345 }
44346
44347
44348
44349 Adaptee & adaptee() const { return (Adaptee &)*this; }
44350
44351
44352
44353 private:
44354
44355
44356 int dx_, dy_, fraction_, stepx_, stepy_;
44357 };
44358
44359
44360
44361 }
44362 # 43 "../include/vigra/iteratortraits.hxx" 2
44363
44364 namespace vigra {
44365 # 108 "../include/vigra/iteratortraits.hxx"
44366 template <class T>
44367 struct IteratorTraits
44368 {
44369 typedef T Iterator;
44370 typedef Iterator iterator;
44371 typedef typename iterator::iterator_category iterator_category;
44372 typedef typename iterator::value_type value_type;
44373 typedef typename iterator::reference reference;
44374 typedef typename iterator::index_reference index_reference;
44375 typedef typename iterator::pointer pointer;
44376 typedef typename iterator::difference_type difference_type;
44377 typedef typename iterator::row_iterator row_iterator;
44378 typedef typename iterator::column_iterator column_iterator;
44379 typedef typename
44380 AccessorTraits<value_type>::default_accessor DefaultAccessor;
44381 typedef DefaultAccessor default_accessor;
44382
44383
44384 typedef VigraFalseType hasConstantStrides;
44385 };
44386
44387 template <class T>
44388 struct IteratorTraitsBase
44389 {
44390 typedef T Iterator;
44391 typedef Iterator iterator;
44392 typedef typename iterator::iterator_category iterator_category;
44393 typedef typename iterator::value_type value_type;
44394 typedef typename iterator::reference reference;
44395 typedef typename iterator::index_reference index_reference;
44396 typedef typename iterator::pointer pointer;
44397 typedef typename iterator::difference_type difference_type;
44398 typedef typename iterator::row_iterator row_iterator;
44399 typedef typename iterator::column_iterator column_iterator;
44400 };
44401 # 555 "../include/vigra/iteratortraits.hxx"
44402 template <class Iterator, class Accessor>
44403 inline triple<Iterator, Iterator, Accessor>
44404 srcIterRange(Iterator const & upperleft, Iterator const & lowerright, Accessor a)
44405 {
44406 return triple<Iterator, Iterator, Accessor>(upperleft, lowerright, a);
44407 }
44408
44409 template <class Iterator, class Accessor>
44410 inline pair<Iterator, Accessor>
44411 srcIter(Iterator const & upperleft, Accessor a)
44412 {
44413 return pair<Iterator, Accessor>(upperleft, a);
44414 }
44415
44416 template <class Iterator, class Accessor>
44417 inline pair<Iterator, Accessor>
44418 maskIter(Iterator const & upperleft, Accessor a)
44419 {
44420 return pair<Iterator, Accessor>(upperleft, a);
44421 }
44422
44423 template <class Iterator, class Accessor>
44424 inline pair<Iterator, Accessor>
44425 destIter(Iterator const & upperleft, Accessor a)
44426 {
44427 return pair<Iterator, Accessor>(upperleft, a);
44428 }
44429
44430
44431 template <class Iterator, class Accessor>
44432 inline triple<Iterator, Iterator, Accessor>
44433 destIterRange(Iterator const & upperleft, Iterator const & lowerright, Accessor a)
44434 {
44435 return triple<Iterator, Iterator, Accessor>(upperleft, lowerright, a);
44436 }
44437
44438 template <class Iterator>
44439 inline pair<Iterator, typename IteratorTraits<Iterator>::DefaultAccessor>
44440 srcIter(Iterator const & upperleft)
44441 {
44442 return pair<Iterator, typename IteratorTraits<Iterator>::DefaultAccessor>(
44443 upperleft,
44444 typename IteratorTraits<Iterator>::DefaultAccessor());
44445 }
44446
44447 template <class Iterator>
44448 inline triple<Iterator, Iterator, typename IteratorTraits<Iterator>::DefaultAccessor>
44449 srcIterRange(Iterator const & upperleft, Iterator const & lowerright)
44450 {
44451 return triple<Iterator, Iterator,
44452 typename IteratorTraits<Iterator>::DefaultAccessor>(
44453 upperleft, lowerright,
44454 typename IteratorTraits<Iterator>::DefaultAccessor());
44455 }
44456
44457 template <class Iterator>
44458 inline pair<Iterator, typename IteratorTraits<Iterator>::DefaultAccessor>
44459 maskIter(Iterator const & upperleft)
44460 {
44461 return pair<Iterator, typename IteratorTraits<Iterator>::DefaultAccessor>(
44462 upperleft,
44463 typename IteratorTraits<Iterator>::DefaultAccessor());
44464 }
44465
44466 template <class Iterator>
44467 inline pair<Iterator, typename IteratorTraits<Iterator>::DefaultAccessor>
44468 destIter(Iterator const & upperleft)
44469 {
44470 return pair<Iterator, typename IteratorTraits<Iterator>::DefaultAccessor>(
44471 upperleft,
44472 typename IteratorTraits<Iterator>::DefaultAccessor());
44473 }
44474
44475 template <class Iterator>
44476 inline triple<Iterator, Iterator, typename IteratorTraits<Iterator>::DefaultAccessor>
44477 destIterRange(Iterator const & upperleft, Iterator const & lowerright)
44478 {
44479 return triple<Iterator, Iterator,
44480 typename IteratorTraits<Iterator>::DefaultAccessor>(
44481 upperleft, lowerright,
44482 typename IteratorTraits<Iterator>::DefaultAccessor());
44483 }
44484
44485
44486
44487 }
44488 # 45 "../include/vigra/diff2d.hxx" 2
44489 # 1 "../include/vigra/iteratoradapter.hxx" 1
44490 # 41 "../include/vigra/iteratoradapter.hxx"
44491 namespace vigra {
44492 # 148 "../include/vigra/iteratoradapter.hxx"
44493 template <class Policy>
44494 class IteratorAdaptor
44495 {
44496 public:
44497
44498 typedef typename Policy::BaseType BaseType;
44499 typedef typename Policy::value_type value_type;
44500 typedef typename Policy::difference_type difference_type;
44501 typedef typename Policy::reference reference;
44502 typedef typename Policy::index_reference index_reference;
44503 typedef typename Policy::pointer pointer;
44504 typedef typename Policy::iterator_category iterator_category;
44505
44506 IteratorAdaptor()
44507 : adaptee_()
44508 {}
44509
44510
44511
44512
44513
44514
44515 explicit IteratorAdaptor(BaseType const & o)
44516 : adaptee_(o)
44517 {
44518 Policy::initialize(adaptee_);
44519 }
44520
44521 IteratorAdaptor(IteratorAdaptor const & o)
44522 : adaptee_(o.adaptee_)
44523 {}
44524
44525 IteratorAdaptor & operator=(BaseType const & o)
44526 {
44527 if(this != &o)
44528 {
44529 adaptee_ = o;
44530 Policy::initialize(adaptee_);
44531 }
44532 return *this;
44533 }
44534
44535 IteratorAdaptor & operator=(IteratorAdaptor const & o)
44536 {
44537 if(this != &o)
44538 adaptee_ = o.adaptee_;
44539 return *this;
44540 }
44541
44542 IteratorAdaptor & operator+=(difference_type d)
44543 {
44544 Policy::advance(adaptee_, d);
44545 return *this;
44546 }
44547
44548 IteratorAdaptor operator+(difference_type d) const
44549 {
44550 return IteratorAdaptor(*this) += d;
44551 }
44552
44553 IteratorAdaptor & operator-=(difference_type d)
44554 {
44555 Policy::advance(adaptee_, -d);
44556 return *this;
44557 }
44558
44559 IteratorAdaptor operator-(difference_type d) const
44560 {
44561 return IteratorAdaptor(*this) -= d;
44562 }
44563
44564 IteratorAdaptor & operator++()
44565 {
44566 Policy::increment(adaptee_);
44567 return *this;
44568 }
44569
44570 IteratorAdaptor operator++(int)
44571 {
44572 IteratorAdaptor res(*this);
44573 Policy::increment(adaptee_);
44574 return res;
44575 }
44576
44577 IteratorAdaptor & operator--()
44578 {
44579 Policy::decrement(adaptee_);
44580 return *this;
44581 }
44582
44583 IteratorAdaptor operator--(int)
44584 {
44585 IteratorAdaptor res(*this);
44586 Policy::decrement(adaptee_);
44587 return res;
44588 }
44589
44590 bool operator==(IteratorAdaptor const & o) const
44591 {
44592 return Policy::equal(adaptee_, o.adaptee_);
44593 }
44594
44595 bool operator!=(IteratorAdaptor const & o) const
44596 {
44597 return !Policy::equal(adaptee_, o.adaptee_);
44598 }
44599
44600 bool operator<(IteratorAdaptor const & o) const
44601 {
44602 return Policy::less(adaptee_, o.adaptee_);
44603 }
44604
44605 bool operator<=(IteratorAdaptor const & o) const
44606 {
44607 return !Policy::less(o.adaptee_, adaptee_);
44608 }
44609
44610 bool operator>(IteratorAdaptor const & o) const
44611 {
44612 return Policy::less(o.adaptee_, adaptee_);
44613 }
44614
44615 bool operator>=(IteratorAdaptor const & o) const
44616 {
44617 return !Policy::less(adaptee_, o.adaptee_);
44618 }
44619
44620 difference_type operator-(IteratorAdaptor const & o) const
44621 {
44622 return Policy::difference(adaptee_, o.adaptee_);
44623 }
44624
44625 reference operator*() const
44626 {
44627 return Policy::dereference(adaptee_);
44628 }
44629
44630 index_reference operator[](difference_type d) const
44631 {
44632 return Policy::dereference(adaptee_, d);
44633 }
44634
44635 pointer operator->() const
44636 {
44637 return &Policy::dereference(adaptee_);
44638 }
44639
44640 protected:
44641
44642 BaseType adaptee_;
44643 };
44644
44645 }
44646 # 46 "../include/vigra/diff2d.hxx" 2
44647
44648
44649 namespace vigra {
44650
44651 template <class Diff>
44652 class Diff2DConstRowIteratorPolicy
44653 {
44654 public:
44655 typedef Diff BaseType;
44656 typedef Diff value_type;
44657 typedef typename Diff::MoveX difference_type;
44658 typedef Diff const & reference;
44659 typedef Diff index_reference;
44660 typedef Diff const * pointer;
44661 typedef std::random_access_iterator_tag iterator_category;
44662
44663 static void initialize(BaseType &) {}
44664
44665 static reference dereference(BaseType const & d)
44666 { return d; }
44667
44668 static index_reference dereference(BaseType d, difference_type n)
44669 {
44670 d.x += n;
44671 return d;
44672 }
44673
44674 static bool equal(BaseType const & d1, BaseType const & d2)
44675 { return d1.x == d2.x; }
44676
44677 static bool less(BaseType const & d1, BaseType const & d2)
44678 { return d1.x < d2.x; }
44679
44680 static difference_type difference(BaseType const & d1, BaseType const & d2)
44681 { return d1.x - d2.x; }
44682
44683 static void increment(BaseType & d)
44684 { ++d.x; }
44685
44686 static void decrement(BaseType & d)
44687 { --d.x; }
44688
44689 static void advance(BaseType & d, difference_type n)
44690 { d.x += n; }
44691 };
44692
44693 template <class Diff>
44694 class Diff2DConstColumnIteratorPolicy
44695 {
44696 public:
44697 typedef Diff BaseType;
44698 typedef Diff value_type;
44699 typedef typename Diff::MoveY difference_type;
44700 typedef Diff const & reference;
44701 typedef Diff index_reference;
44702 typedef Diff const * pointer;
44703 typedef std::random_access_iterator_tag iterator_category;
44704
44705 static void initialize(BaseType & ) {}
44706
44707 static reference dereference(BaseType const & d)
44708 { return d; }
44709
44710 static index_reference dereference(BaseType d, difference_type n)
44711 {
44712 d.y += n;
44713 return d;
44714 }
44715
44716 static bool equal(BaseType const & d1, BaseType const & d2)
44717 { return d1.y == d2.y; }
44718
44719 static bool less(BaseType const & d1, BaseType const & d2)
44720 { return d1.y < d2.y; }
44721
44722 static difference_type difference(BaseType const & d1, BaseType const & d2)
44723 { return d1.y - d2.y; }
44724
44725 static void increment(BaseType & d)
44726 { ++d.y; }
44727
44728 static void decrement(BaseType & d)
44729 { --d.y; }
44730
44731 static void advance(BaseType & d, difference_type n)
44732 { d.y += n; }
44733 };
44734 # 184 "../include/vigra/diff2d.hxx"
44735 class Diff2D
44736 {
44737 public:
44738
44739
44740 typedef Diff2D PixelType;
44741
44742
44743
44744 typedef Diff2D value_type;
44745
44746
44747
44748 typedef Diff2D const & reference;
44749
44750
44751
44752 typedef Diff2D index_reference;
44753
44754
44755
44756 typedef Diff2D const * pointer;
44757
44758
44759
44760 typedef Diff2D difference_type;
44761
44762
44763
44764 typedef image_traverser_tag iterator_category;
44765
44766
44767
44768 typedef IteratorAdaptor<Diff2DConstRowIteratorPolicy<Diff2D> > row_iterator;
44769
44770
44771
44772 typedef IteratorAdaptor<Diff2DConstColumnIteratorPolicy<Diff2D> > column_iterator;
44773
44774
44775
44776 typedef int MoveX;
44777
44778
44779 typedef int MoveY;
44780
44781
44782
44783
44784 Diff2D()
44785 : x(0), y(0)
44786 {}
44787
44788
44789
44790 Diff2D(int ax, int ay)
44791 : x(ax), y(ay)
44792 {}
44793
44794
44795
44796 Diff2D(Diff2D const & v)
44797 : x(v.x), y(v.y)
44798 {}
44799
44800
44801
44802 Diff2D & operator=(Diff2D const & v)
44803 {
44804 if(this != &v)
44805 {
44806 x = v.x;
44807 y = v.y;
44808 }
44809 return *this;
44810 }
44811
44812
44813
44814 Diff2D operator-() const
44815 {
44816 return Diff2D(-x, -y);
44817 }
44818
44819
44820
44821 Diff2D & operator+=(Diff2D const & offset)
44822 {
44823 x += offset.x;
44824 y += offset.y;
44825 return *this;
44826 }
44827
44828
44829
44830 Diff2D & operator-=(Diff2D const & offset)
44831 {
44832 x -= offset.x;
44833 y -= offset.y;
44834 return *this;
44835 }
44836
44837
44838
44839 Diff2D & operator*=(int factor)
44840 {
44841 x *= factor;
44842 y *= factor;
44843 return *this;
44844 }
44845
44846
44847
44848 Diff2D & operator*=(double factor)
44849 {
44850 x = (int)(x * factor);
44851 y = (int)(y * factor);
44852 return *this;
44853 }
44854
44855
44856
44857 Diff2D & operator/=(int factor)
44858 {
44859 x /= factor;
44860 y /= factor;
44861 return *this;
44862 }
44863
44864
44865
44866 Diff2D & operator/=(double factor)
44867 {
44868 x = (int)(x / factor);
44869 y = (int)(y / factor);
44870 return *this;
44871 }
44872
44873
44874
44875 Diff2D operator*(int factor) const
44876 {
44877 return Diff2D(x * factor, y * factor);
44878 }
44879
44880
44881
44882 Diff2D operator*(double factor) const
44883 {
44884 return Diff2D((int)(x * factor), (int)(y * factor));
44885 }
44886
44887
44888
44889 Diff2D operator/(int factor) const
44890 {
44891 return Diff2D(x / factor, y / factor);
44892 }
44893
44894
44895
44896 Diff2D operator/(double factor) const
44897 {
44898 return Diff2D((int)(x / factor), (int)(y / factor));
44899 }
44900
44901
44902
44903 int squaredMagnitude() const
44904 {
44905 return x*x + y*y;
44906 }
44907
44908
44909
44910 double magnitude() const
44911 {
44912 return std::sqrt((double)squaredMagnitude());
44913 }
44914
44915
44916
44917 bool operator==(Diff2D const & r) const
44918 {
44919 return (x == r.x) && (y == r.y);
44920 }
44921
44922
44923
44924 bool operator!=(Diff2D const & r) const
44925 {
44926 return (x != r.x) || (y != r.y);
44927 }
44928
44929
44930
44931
44932
44933
44934
44935 int x;
44936
44937
44938
44939
44940
44941
44942 int y;
44943
44944
44945
44946 reference operator*() const
44947 {
44948 return *this;
44949 }
44950
44951
44952
44953 index_reference operator()(int const & dx, int const & dy) const
44954 {
44955 return Diff2D(x + dx, y + dy);
44956 }
44957
44958
44959
44960 index_reference operator[](Diff2D const & offset) const
44961 {
44962 return Diff2D(x + offset.x, y + offset.y);
44963 }
44964
44965
44966
44967 int operator[](int index) const
44968 {
44969 return (&x)[index];
44970 }
44971
44972
44973
44974 pointer operator->() const
44975 {
44976 return this;
44977 }
44978
44979
44980
44981 row_iterator rowIterator() const
44982 { return row_iterator(*this); }
44983
44984
44985
44986 column_iterator columnIterator() const
44987 { return column_iterator(*this); }
44988 };
44989
44990
44991 template <>
44992 struct IteratorTraits<Diff2D >
44993 {
44994 typedef Diff2D Iterator;
44995 typedef Iterator iterator;
44996 typedef Iterator const_iterator;
44997
44998 typedef iterator::iterator_category iterator_category;
44999 typedef iterator::value_type value_type;
45000 typedef iterator::reference reference;
45001 typedef iterator::index_reference index_reference;
45002 typedef iterator::pointer pointer;
45003 typedef iterator::difference_type difference_type;
45004 typedef iterator::row_iterator row_iterator;
45005 typedef iterator::column_iterator column_iterator;
45006 typedef StandardConstValueAccessor<Diff2D> DefaultAccessor;
45007 typedef StandardConstValueAccessor<Diff2D> default_accessor;
45008 typedef VigraTrueType hasConstantStrides;
45009
45010 };
45011 # 482 "../include/vigra/diff2d.hxx"
45012 class Size2D : public Diff2D
45013 {
45014 public:
45015
45016
45017 Size2D()
45018 {}
45019
45020
45021
45022 Size2D(int width, int height)
45023 : Diff2D(width, height)
45024 {}
45025
45026
45027
45028 Size2D(Size2D const & v)
45029 : Diff2D(v)
45030 {}
45031
45032
45033
45034 explicit Size2D(Diff2D const & v)
45035 : Diff2D(v)
45036 {}
45037
45038
45039
45040 int width() const
45041 {
45042 return x;
45043 }
45044
45045
45046
45047 int height() const
45048 {
45049 return y;
45050 }
45051
45052
45053
45054 void setWidth(int w)
45055 {
45056 x = w;
45057 }
45058
45059
45060
45061 void setHeight(int h)
45062 {
45063 y = h;
45064 }
45065
45066
45067
45068 int area() const
45069 {
45070 return width()*height();
45071 }
45072
45073
45074
45075 Size2D & operator=(Diff2D const & v)
45076 {
45077 return static_cast<Size2D &>(Diff2D::operator=(v));
45078 }
45079
45080
45081
45082 Size2D operator-() const
45083 {
45084 return Size2D(-x, -y);
45085 }
45086
45087
45088
45089 Size2D & operator+=(Diff2D const & offset)
45090 {
45091 return static_cast<Size2D &>(Diff2D::operator+=(offset));
45092 }
45093
45094
45095
45096 Size2D & operator-=(Diff2D const & offset)
45097 {
45098 return static_cast<Size2D &>(Diff2D::operator-=(offset));
45099 }
45100 };
45101 # 592 "../include/vigra/diff2d.hxx"
45102 class Point2D : public Diff2D
45103 {
45104 public:
45105
45106
45107 typedef Point2D PixelType;
45108
45109
45110
45111 typedef Point2D value_type;
45112
45113
45114
45115 typedef Point2D const & reference;
45116
45117
45118
45119 typedef Point2D index_reference;
45120
45121
45122
45123 typedef Point2D const * pointer;
45124
45125
45126
45127 Point2D()
45128 {}
45129
45130
45131
45132 Point2D(int x, int y)
45133 : Diff2D(x, y)
45134 {}
45135
45136
45137
45138 Point2D(Point2D const & v)
45139 : Diff2D(v)
45140 {}
45141
45142
45143
45144 explicit Point2D(Diff2D const & v)
45145 : Diff2D(v)
45146 {}
45147
45148
45149
45150 int px() const
45151 {
45152 return x;
45153 }
45154
45155
45156
45157 int py() const
45158 {
45159 return y;
45160 }
45161
45162
45163
45164 Point2D & operator=(Diff2D const & v)
45165 {
45166 return static_cast<Point2D &>(Diff2D::operator=(v));
45167 }
45168
45169
45170
45171 Point2D operator-() const
45172 {
45173 return Point2D(-x, -y);
45174 }
45175
45176
45177
45178 Point2D & operator+=(Diff2D const & offset)
45179 {
45180 return static_cast<Point2D &>(Diff2D::operator+=(offset));
45181 }
45182
45183
45184
45185 Point2D & operator-=(Diff2D const & offset)
45186 {
45187 return static_cast<Point2D &>(Diff2D::operator-=(offset));
45188 }
45189
45190
45191
45192 reference operator*() const
45193 {
45194 return *this;
45195 }
45196
45197
45198
45199 index_reference operator()(int const & dx, int const & dy) const
45200 {
45201 return Point2D(x + dx, y + dy);
45202 }
45203
45204
45205
45206 index_reference operator[](Diff2D const & offset) const
45207 {
45208 return Point2D(x + offset.x, y + offset.y);
45209 }
45210
45211
45212
45213 pointer operator->() const
45214 {
45215 return this;
45216 }
45217 };
45218
45219
45220
45221 inline Diff2D operator-(Diff2D const &a, Diff2D const &b)
45222 {
45223 return Diff2D(a.x - b.x, a.y - b.y);
45224 }
45225
45226
45227
45228 inline Size2D operator-(Size2D const & s, Diff2D const &offset)
45229 {
45230 return Size2D(s.x - offset.x, s.y - offset.y);
45231 }
45232
45233
45234
45235 inline Point2D operator-(Point2D const & s, Diff2D const & offset)
45236 {
45237 return Point2D(s.x - offset.x, s.y - offset.y);
45238 }
45239
45240
45241
45242 inline Size2D operator-(Point2D const & s, Point2D const & p)
45243 {
45244 return Size2D(s.x - p.x, s.y - p.y);
45245 }
45246
45247
45248
45249 inline Diff2D operator+(Diff2D const &a, Diff2D const &b)
45250 {
45251 return Diff2D(a.x + b.x, a.y + b.y);
45252 }
45253
45254
45255
45256 inline Size2D operator+(Size2D const &a, Diff2D const &b)
45257 {
45258 return Size2D(a.x + b.x, a.y + b.y);
45259 }
45260
45261
45262
45263 inline Point2D operator+(Point2D const &a, Diff2D const &b)
45264 {
45265 return Point2D(a.x + b.x, a.y + b.y);
45266 }
45267
45268
45269
45270 inline Point2D operator+(Size2D const & s, Point2D const & p)
45271 {
45272 return Point2D(s.x + p.x, s.y + p.y);
45273 }
45274
45275 inline Point2D operator*(Point2D l, double r)
45276 {
45277 l *= r;
45278 return l;
45279 }
45280
45281 inline Point2D operator*(double l, Point2D r)
45282 {
45283 r *= l;
45284 return r;
45285 }
45286
45287 inline Size2D operator*(Size2D l, double r)
45288 {
45289 l *= r;
45290 return l;
45291 }
45292
45293 inline Size2D operator*(double l, Size2D r)
45294 {
45295 r *= l;
45296 return r;
45297 }
45298
45299 inline Point2D operator/(Point2D l, double r)
45300 {
45301 l /= r;
45302 return l;
45303 }
45304
45305 inline Size2D operator/(Size2D l, double r)
45306 {
45307 l /= r;
45308 return l;
45309 }
45310
45311 inline Point2D operator*(Point2D l, int r)
45312 {
45313 l *= r;
45314 return l;
45315 }
45316
45317 inline Point2D operator*(int l, Point2D r)
45318 {
45319 r *= l;
45320 return r;
45321 }
45322
45323 inline Size2D operator*(Size2D l, int r)
45324 {
45325 l *= r;
45326 return l;
45327 }
45328
45329 inline Size2D operator*(int l, Size2D r)
45330 {
45331 r *= l;
45332 return r;
45333 }
45334
45335 inline Point2D operator/(Point2D l, int r)
45336 {
45337 l /= r;
45338 return l;
45339 }
45340
45341 inline Size2D operator/(Size2D l, int r)
45342 {
45343 l /= r;
45344 return l;
45345 }
45346 # 872 "../include/vigra/diff2d.hxx"
45347 class Rect2D
45348 {
45349 Point2D upperLeft_, lowerRight_;
45350
45351 public:
45352
45353
45354 Rect2D()
45355 {}
45356
45357
45358
45359
45360
45361 Rect2D(Point2D const &upperLeft, Point2D const &lowerRight)
45362 : upperLeft_(upperLeft), lowerRight_(lowerRight)
45363 {}
45364
45365
45366
45367 Rect2D(int left, int top, int right, int bottom)
45368 : upperLeft_(left, top), lowerRight_(right, bottom)
45369 {}
45370
45371
45372
45373 Rect2D(Point2D const &upperLeft, Size2D const &size)
45374 : upperLeft_(upperLeft), lowerRight_(upperLeft + size)
45375 {}
45376
45377
45378
45379 explicit Rect2D(Size2D const &size)
45380 : lowerRight_(Point2D(size))
45381 {}
45382
45383
45384
45385
45386 Point2D const & upperLeft() const
45387 {
45388 return upperLeft_;
45389 }
45390
45391
45392
45393
45394 Point2D const & lowerRight() const
45395 {
45396 return lowerRight_;
45397 }
45398
45399
45400
45401
45402 void setUpperLeft(Point2D const &ul)
45403 {
45404 upperLeft_ = ul;
45405 }
45406
45407
45408
45409
45410 void setLowerRight(Point2D const &lr)
45411 {
45412 lowerRight_ = lr;
45413 }
45414
45415
45416
45417
45418 void moveTo(Point2D const &newUpperLeft)
45419 {
45420 lowerRight_ += newUpperLeft - upperLeft_;
45421 upperLeft_ = newUpperLeft;
45422 }
45423
45424
45425
45426
45427 void moveTo(int left, int top)
45428 {
45429 moveTo(Point2D(left, top));
45430 }
45431
45432
45433
45434 void moveBy(Diff2D const &offset)
45435 {
45436 upperLeft_ += offset;
45437 lowerRight_ += offset;
45438 }
45439
45440
45441
45442 void moveBy(int xOffset, int yOffset)
45443 {
45444 moveBy(Diff2D(xOffset, yOffset));
45445 }
45446
45447
45448
45449 int left() const
45450 {
45451 return upperLeft_.x;
45452 }
45453
45454
45455
45456 int top() const
45457 {
45458 return upperLeft_.y;
45459 }
45460
45461
45462
45463
45464 int right() const
45465 {
45466 return lowerRight_.x;
45467 }
45468
45469
45470
45471
45472 int bottom() const
45473 {
45474 return lowerRight_.y;
45475 }
45476
45477
45478
45479
45480 int width() const
45481 {
45482 return lowerRight_.x - upperLeft_.x;
45483 }
45484
45485
45486
45487
45488 int height() const
45489 {
45490 return lowerRight_.y - upperLeft_.y;
45491 }
45492
45493
45494
45495
45496
45497 long long area() const
45498 {
45499 return isEmpty() ? 0LL : (long long)width()*(long long)height();
45500 }
45501
45502
45503
45504
45505
45506 Size2D size() const
45507 {
45508 return lowerRight_ - upperLeft_;
45509 }
45510
45511
45512
45513
45514 void setSize(Size2D const &size)
45515 {
45516 lowerRight_ = upperLeft_ + size;
45517 }
45518
45519
45520
45521
45522 void setSize(int width, int height)
45523 {
45524 lowerRight_ = upperLeft_ + Size2D(width, height);
45525 }
45526
45527
45528
45529
45530
45531
45532 void addSize(Size2D const &offset)
45533 {
45534 lowerRight_ += offset;
45535 }
45536
45537
45538
45539
45540
45541
45542 void addBorder(int borderWidth)
45543 {
45544 upperLeft_ += Diff2D(-borderWidth, -borderWidth);
45545 lowerRight_ += Diff2D(borderWidth, borderWidth);
45546 }
45547 # 1080 "../include/vigra/diff2d.hxx"
45548 void addBorder(int borderWidth, int borderHeight)
45549 {
45550 upperLeft_ += Diff2D(-borderWidth, -borderHeight);
45551 lowerRight_ += Diff2D(borderWidth, borderHeight);
45552 }
45553
45554
45555 bool operator==(Rect2D const &r) const
45556 {
45557 return (upperLeft_ == r.upperLeft_) && (lowerRight_ == r.lowerRight_);
45558 }
45559
45560
45561 bool operator!=(Rect2D const &r) const
45562 {
45563 return (upperLeft_ != r.upperLeft_) || (lowerRight_ != r.lowerRight_);
45564 }
45565 # 1105 "../include/vigra/diff2d.hxx"
45566 bool isEmpty() const
45567 {
45568 return ((lowerRight_.x <= upperLeft_.x) ||
45569 (lowerRight_.y <= upperLeft_.y));
45570 }
45571
45572
45573
45574
45575
45576
45577 bool contains(Point2D const &p) const
45578 {
45579 return ((upperLeft_.x <= p.x) &&
45580 (upperLeft_.y <= p.y) &&
45581 (p.x < lowerRight_.x) &&
45582 (p.y < lowerRight_.y));
45583 }
45584
45585
45586
45587
45588
45589
45590
45591 bool contains(Rect2D const &r) const
45592 {
45593 return r.isEmpty() ||
45594 contains(r.upperLeft()) && contains(r.lowerRight()-Diff2D(1,1));
45595 }
45596
45597
45598
45599
45600
45601
45602 bool intersects(Rect2D const &r) const
45603 {
45604 return ((r.upperLeft_.x < lowerRight_.x) &&
45605 (upperLeft_.x < r.lowerRight_.x) &&
45606 (r.upperLeft_.y < lowerRight_.y) &&
45607 (upperLeft_.y < r.lowerRight_.y))
45608 && !r.isEmpty();
45609 }
45610
45611
45612
45613
45614
45615
45616 Rect2D &operator|=(Point2D const &p)
45617 {
45618 if(isEmpty())
45619 {
45620 upperLeft_ = p;
45621 lowerRight_ = p + Diff2D(1, 1);
45622 }
45623 else
45624 {
45625 if(p.x < upperLeft_.x)
45626 upperLeft_.x = p.x;
45627 if(p.y < upperLeft_.y)
45628 upperLeft_.y = p.y;
45629 if(lowerRight_.x <= p.x)
45630 lowerRight_.x = p.x + 1;
45631 if(lowerRight_.y <= p.y)
45632 lowerRight_.y = p.y + 1;
45633 }
45634 return *this;
45635 }
45636
45637
45638
45639
45640
45641
45642 Rect2D operator|(Point2D const &p) const
45643 {
45644 Rect2D result(*this);
45645 result |= p;
45646 return result;
45647 }
45648
45649
45650
45651
45652
45653
45654 Rect2D &operator|=(Rect2D const &r)
45655 {
45656 if(r.isEmpty())
45657 return *this;
45658 if(isEmpty())
45659 return operator=(r);
45660
45661 if(r.upperLeft_.x < upperLeft_.x)
45662 upperLeft_.x = r.upperLeft_.x;
45663 if(r.upperLeft_.y < upperLeft_.y)
45664 upperLeft_.y = r.upperLeft_.y;
45665 if(lowerRight_.x < r.lowerRight_.x)
45666 lowerRight_.x = r.lowerRight_.x;
45667 if(lowerRight_.y < r.lowerRight_.y)
45668 lowerRight_.y = r.lowerRight_.y;
45669 return *this;
45670 }
45671
45672
45673
45674
45675
45676
45677 Rect2D operator|(Rect2D const &r) const
45678 {
45679 Rect2D result(*this);
45680 result |= r;
45681 return result;
45682 }
45683
45684
45685
45686
45687
45688
45689 Rect2D &operator&=(Point2D const &p)
45690 {
45691 if(contains(p))
45692 {
45693 upperLeft_ = p;
45694 lowerRight_ = p + Diff2D(1, 1);
45695 }
45696 else
45697 lowerRight_ = upperLeft_;
45698 return *this;
45699 }
45700
45701
45702
45703
45704
45705
45706 Rect2D operator&(Point2D const &p) const
45707 {
45708 Rect2D result(*this);
45709 result &= p;
45710 return result;
45711 }
45712
45713
45714
45715
45716
45717
45718 Rect2D &operator&=(Rect2D const &r)
45719 {
45720 if(isEmpty())
45721 return *this;
45722 if(r.isEmpty())
45723 return operator=(r);
45724
45725 if(upperLeft_.x < r.upperLeft_.x)
45726 upperLeft_.x = r.upperLeft_.x;
45727 if(upperLeft_.y < r.upperLeft_.y)
45728 upperLeft_.y = r.upperLeft_.y;
45729 if(r.lowerRight_.x < lowerRight_.x)
45730 lowerRight_.x = r.lowerRight_.x;
45731 if(r.lowerRight_.y < lowerRight_.y)
45732 lowerRight_.y = r.lowerRight_.y;
45733 return *this;
45734 }
45735
45736
45737
45738
45739
45740
45741 Rect2D operator&(Rect2D const &r) const
45742 {
45743 Rect2D result(*this);
45744 result &= r;
45745 return result;
45746 }
45747
45748
45749
45750
45751
45752
45753
45754 template <typename ImgIter, typename ImgAccessor>
45755 vigra::triple<ImgIter, ImgIter, ImgAccessor>
45756 apply(vigra::triple<ImgIter, ImgIter, ImgAccessor> image) const
45757 {
45758 return vigra::make_triple(image.first + upperLeft_, image.first + lowerRight_, image.third);
45759 }
45760 # 1307 "../include/vigra/diff2d.hxx"
45761 template <typename ImgIter, typename ImgAccessor>
45762 std::pair<ImgIter, ImgAccessor>
45763 apply(std::pair<ImgIter, ImgAccessor> image) const
45764 {
45765 return std::make_pair(image.first + upperLeft_, image.second);
45766 }
45767
45768 };
45769 # 1324 "../include/vigra/diff2d.hxx"
45770 class Dist2D
45771 {
45772 public:
45773 Dist2D(int the_width, int the_height)
45774 : width(the_width),
45775 height(the_height)
45776 {}
45777
45778 Dist2D(Dist2D const & s)
45779 : width(s.width),
45780 height(s.height)
45781 {}
45782
45783 Dist2D & operator=(Dist2D const & s)
45784 {
45785 if(this != &s)
45786 {
45787 width = s.width;
45788 height = s.height;
45789 }
45790 return *this;
45791 }
45792
45793 Dist2D & operator+=(Dist2D const & s)
45794 {
45795 width += s.width;
45796 height += s.height;
45797
45798 return *this;
45799 }
45800
45801 Dist2D operator+(Dist2D const & s) const
45802 {
45803 Dist2D ret(*this);
45804 ret += s;
45805
45806 return ret;
45807 }
45808
45809 operator Diff2D()
45810 { return Diff2D(width, height); }
45811
45812 int width;
45813 int height;
45814 };
45815
45816
45817
45818
45819
45820
45821
45822 inline
45823 std::ostream & operator<<(std::ostream & o, vigra::Diff2D const & d)
45824 {
45825 o << '(' << d.x << ", " << d.y << ')';
45826 return o;
45827 }
45828
45829
45830
45831
45832
45833 inline
45834 std::ostream &operator <<(std::ostream &s, vigra::Size2D const &d)
45835 {
45836 s << '(' << d.x << 'x' << d.y << ')';
45837 return s;
45838 }
45839
45840
45841
45842
45843
45844 inline
45845 std::ostream &operator <<(std::ostream &s, vigra::Rect2D const &r)
45846 {
45847 s << "[" << r.upperLeft() << " to " << r.lowerRight()
45848 << " = " << r.size() << "]";
45849 return s;
45850 }
45851
45852 }
45853 # 46 "../include/vigra/utilities.hxx" 2
45854 # 1 "../include/vigra/mathutil.hxx" 1
45855 # 73 "../include/vigra/mathutil.hxx"
45856 namespace vigra {
45857 # 97 "../include/vigra/mathutil.hxx"
45858 template <class T>
45859 double erf(T x)
45860 {
45861 double t = 1.0/(1.0+0.5*std::fabs(x));
45862 double ans = t*std::exp(-x*x-1.26551223+t*(1.00002368+t*(0.37409196+
45863 t*(0.09678418+t*(-0.18628806+t*(0.27886807+
45864 t*(-1.13520398+t*(1.48851587+t*(-0.82215223+
45865 t*0.17087277)))))))));
45866 if (x >= 0.0)
45867 return 1.0 - ans;
45868 else
45869 return ans - 1.0;
45870 }
45871 # 119 "../include/vigra/mathutil.hxx"
45872 using std::pow;
45873 using std::floor;
45874 using std::ceil;
45875
45876
45877
45878 using std::abs;
45879
45880
45881
45882
45883
45884
45885 inline bool abs(bool t) { return t; }
45886 inline unsigned char abs(unsigned char t) { return t; }
45887 inline unsigned short abs(unsigned short t) { return t; }
45888 inline unsigned int abs(unsigned int t) { return t; }
45889 inline unsigned long abs(unsigned long t) { return t; }
45890 inline unsigned long long abs(unsigned long long t) { return t; }
45891
45892
45893
45894
45895
45896
45897 inline signed char abs(signed char t) { return t < 0 ? -t : t; }
45898 inline signed short abs(signed short t) { return t < 0 ? -t : t; }
45899 # 157 "../include/vigra/mathutil.hxx"
45900 inline float round(float t)
45901 {
45902 return t >= 0.0
45903 ? floor(t + 0.5)
45904 : ceil(t - 0.5);
45905 }
45906
45907 inline double round(double t)
45908 {
45909 return t >= 0.0
45910 ? floor(t + 0.5)
45911 : ceil(t - 0.5);
45912 }
45913
45914 inline long double round(long double t)
45915 {
45916 return t >= 0.0
45917 ? floor(t + 0.5)
45918 : ceil(t - 0.5);
45919 }
45920 # 185 "../include/vigra/mathutil.hxx"
45921 template <class T>
45922 inline
45923 typename NumericTraits<T>::Promote sq(T t)
45924 {
45925 return t*t;
45926 }
45927
45928 namespace detail {
45929
45930 template <class T>
45931 class IntSquareRoot
45932 {
45933 public:
45934 static int sqq_table[];
45935 static UInt32 exec(UInt32 v);
45936 };
45937
45938 template <class T>
45939 int IntSquareRoot<T>::sqq_table[] = {
45940 0, 16, 22, 27, 32, 35, 39, 42, 45, 48, 50, 53, 55, 57,
45941 59, 61, 64, 65, 67, 69, 71, 73, 75, 76, 78, 80, 81, 83,
45942 84, 86, 87, 89, 90, 91, 93, 94, 96, 97, 98, 99, 101, 102,
45943 103, 104, 106, 107, 108, 109, 110, 112, 113, 114, 115, 116, 117, 118,
45944 119, 120, 121, 122, 123, 124, 125, 126, 128, 128, 129, 130, 131, 132,
45945 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 144, 145,
45946 146, 147, 148, 149, 150, 150, 151, 152, 153, 154, 155, 155, 156, 157,
45947 158, 159, 160, 160, 161, 162, 163, 163, 164, 165, 166, 167, 167, 168,
45948 169, 170, 170, 171, 172, 173, 173, 174, 175, 176, 176, 177, 178, 178,
45949 179, 180, 181, 181, 182, 183, 183, 184, 185, 185, 186, 187, 187, 188,
45950 189, 189, 190, 191, 192, 192, 193, 193, 194, 195, 195, 196, 197, 197,
45951 198, 199, 199, 200, 201, 201, 202, 203, 203, 204, 204, 205, 206, 206,
45952 207, 208, 208, 209, 209, 210, 211, 211, 212, 212, 213, 214, 214, 215,
45953 215, 216, 217, 217, 218, 218, 219, 219, 220, 221, 221, 222, 222, 223,
45954 224, 224, 225, 225, 226, 226, 227, 227, 228, 229, 229, 230, 230, 231,
45955 231, 232, 232, 233, 234, 234, 235, 235, 236, 236, 237, 237, 238, 238,
45956 239, 240, 240, 241, 241, 242, 242, 243, 243, 244, 244, 245, 245, 246,
45957 246, 247, 247, 248, 248, 249, 249, 250, 250, 251, 251, 252, 252, 253,
45958 253, 254, 254, 255
45959 };
45960
45961 template <class T>
45962 UInt32 IntSquareRoot<T>::exec(UInt32 x)
45963 {
45964 UInt32 xn;
45965 if (x >= 0x10000)
45966 if (x >= 0x1000000)
45967 if (x >= 0x10000000)
45968 if (x >= 0x40000000) {
45969 if (x >= (UInt32)65535*(UInt32)65535)
45970 return 65535;
45971 xn = sqq_table[x>>24] << 8;
45972 } else
45973 xn = sqq_table[x>>22] << 7;
45974 else
45975 if (x >= 0x4000000)
45976 xn = sqq_table[x>>20] << 6;
45977 else
45978 xn = sqq_table[x>>18] << 5;
45979 else {
45980 if (x >= 0x100000)
45981 if (x >= 0x400000)
45982 xn = sqq_table[x>>16] << 4;
45983 else
45984 xn = sqq_table[x>>14] << 3;
45985 else
45986 if (x >= 0x40000)
45987 xn = sqq_table[x>>12] << 2;
45988 else
45989 xn = sqq_table[x>>10] << 1;
45990
45991 goto nr1;
45992 }
45993 else
45994 if (x >= 0x100) {
45995 if (x >= 0x1000)
45996 if (x >= 0x4000)
45997 xn = (sqq_table[x>>8] >> 0) + 1;
45998 else
45999 xn = (sqq_table[x>>6] >> 1) + 1;
46000 else
46001 if (x >= 0x400)
46002 xn = (sqq_table[x>>4] >> 2) + 1;
46003 else
46004 xn = (sqq_table[x>>2] >> 3) + 1;
46005
46006 goto adj;
46007 } else
46008 return sqq_table[x] >> 4;
46009
46010
46011
46012 xn = (xn + 1 + x / xn) / 2;
46013 nr1:
46014 xn = (xn + 1 + x / xn) / 2;
46015 adj:
46016
46017 if (xn * xn > x)
46018 xn--;
46019
46020 return xn;
46021 }
46022
46023 }
46024
46025 using std::sqrt;
46026 # 298 "../include/vigra/mathutil.hxx"
46027 inline Int32 sqrti(Int32 v)
46028 {
46029 if(v < 0)
46030 throw std::domain_error("sqrti(Int32): negative argument.");
46031 return (Int32)detail::IntSquareRoot<UInt32>::exec((UInt32)v);
46032 }
46033 # 312 "../include/vigra/mathutil.hxx"
46034 inline UInt32 sqrti(UInt32 v)
46035 {
46036 return detail::IntSquareRoot<UInt32>::exec(v);
46037 }
46038 # 339 "../include/vigra/mathutil.hxx"
46039 using ::hypot;
46040
46041
46042
46043 namespace detail {
46044
46045 template <class T>
46046 T ellipticRD(T x, T y, T z)
46047 {
46048 double f = 1.0, s = 0.0, X, Y, Z, m;
46049 while(true)
46050 {
46051 m = (x + y + 3.0*z) / 5.0;
46052 X = 1.0 - x/m;
46053 Y = 1.0 - y/m;
46054 Z = 1.0 - z/m;
46055 if(std::max(std::max(std::fabs(X), std::fabs(Y)), std::fabs(Z)) < 0.01)
46056 break;
46057 double l = std::sqrt(x*y) + std::sqrt(x*z) + std::sqrt(y*z);
46058 s += f / (std::sqrt(z)*(z + l));
46059 f /= 4.0;
46060 x = (x + l)/4.0;
46061 y = (y + l)/4.0;
46062 z = (z + l)/4.0;
46063 }
46064 double a = X*Y;
46065 double b = sq(Z);
46066 double c = a - b;
46067 double d = a - 6.0*b;
46068 double e = d + 2.0*c;
46069 return 3.0*s + f*(1.0+d*(-3.0/14.0+d*9.0/88.0-Z*e*4.5/26.0)
46070 +Z*(e/6.0+Z*(-c*9.0/22.0+a*Z*3.0/26.0))) / std::pow(m,1.5);
46071 }
46072
46073 template <class T>
46074 T ellipticRF(T x, T y, T z)
46075 {
46076 double X, Y, Z, m;
46077 while(true)
46078 {
46079 m = (x + y + z) / 3.0;
46080 X = 1.0 - x/m;
46081 Y = 1.0 - y/m;
46082 Z = 1.0 - z/m;
46083 if(std::max(std::max(std::fabs(X), std::fabs(Y)), std::fabs(Z)) < 0.01)
46084 break;
46085 double l = std::sqrt(x*y) + std::sqrt(x*z) + std::sqrt(y*z);
46086 x = (x + l)/4.0;
46087 y = (y + l)/4.0;
46088 z = (z + l)/4.0;
46089 }
46090 double d = X*Y - sq(Z);
46091 double p = X*Y*Z;
46092 return (1.0 - d/10.0 + p/14.0 + sq(d)/24.0 - d*p*3.0/44.0) / std::sqrt(m);
46093 }
46094
46095 }
46096 # 411 "../include/vigra/mathutil.hxx"
46097 inline double ellipticIntegralF(double x, double k)
46098 {
46099 double c2 = sq(std::cos(x));
46100 double s = std::sin(x);
46101 return s*detail::ellipticRF(c2, 1.0 - sq(k*s), 1.0);
46102 }
46103 # 432 "../include/vigra/mathutil.hxx"
46104 inline double ellipticIntegralE(double x, double k)
46105 {
46106 double c2 = sq(std::cos(x));
46107 double s = std::sin(x);
46108 k = sq(k*s);
46109 return s*(detail::ellipticRF(c2, 1.0-k, 1.0) - k/3.0*detail::ellipticRD(c2, 1.0-k, 1.0));
46110 }
46111 # 447 "../include/vigra/mathutil.hxx"
46112 template <class T>
46113 T sign(T t)
46114 {
46115 return t > NumericTraits<T>::zero()
46116 ? NumericTraits<T>::one()
46117 : t < NumericTraits<T>::zero()
46118 ? -NumericTraits<T>::one()
46119 : NumericTraits<T>::zero();
46120 }
46121 # 464 "../include/vigra/mathutil.hxx"
46122 template <class T1, class T2>
46123 T1 sign(T1 t1, T2 t2)
46124 {
46125 return t2 >= NumericTraits<T2>::zero()
46126 ? abs(t1)
46127 : -abs(t1);
46128 }
46129
46130
46131
46132
46133
46134 inline NormTraits<bool>::SquaredNormType squaredNorm(bool t) { return sq(t); } inline NormTraits<bool>::NormType norm(bool t) { return abs(t); }
46135 inline NormTraits<signed char>::SquaredNormType squaredNorm(signed char t) { return sq(t); } inline NormTraits<signed char>::NormType norm(signed char t) { return abs(t); }
46136 inline NormTraits<unsigned char>::SquaredNormType squaredNorm(unsigned char t) { return sq(t); } inline NormTraits<unsigned char>::NormType norm(unsigned char t) { return abs(t); }
46137 inline NormTraits<short>::SquaredNormType squaredNorm(short t) { return sq(t); } inline NormTraits<short>::NormType norm(short t) { return abs(t); }
46138 inline NormTraits<unsigned short>::SquaredNormType squaredNorm(unsigned short t) { return sq(t); } inline NormTraits<unsigned short>::NormType norm(unsigned short t) { return abs(t); }
46139 inline NormTraits<int>::SquaredNormType squaredNorm(int t) { return sq(t); } inline NormTraits<int>::NormType norm(int t) { return abs(t); }
46140 inline NormTraits<unsigned int>::SquaredNormType squaredNorm(unsigned int t) { return sq(t); } inline NormTraits<unsigned int>::NormType norm(unsigned int t) { return abs(t); }
46141 inline NormTraits<long>::SquaredNormType squaredNorm(long t) { return sq(t); } inline NormTraits<long>::NormType norm(long t) { return abs(t); }
46142 inline NormTraits<unsigned long>::SquaredNormType squaredNorm(unsigned long t) { return sq(t); } inline NormTraits<unsigned long>::NormType norm(unsigned long t) { return abs(t); }
46143 inline NormTraits<float>::SquaredNormType squaredNorm(float t) { return sq(t); } inline NormTraits<float>::NormType norm(float t) { return abs(t); }
46144 inline NormTraits<double>::SquaredNormType squaredNorm(double t) { return sq(t); } inline NormTraits<double>::NormType norm(double t) { return abs(t); }
46145 inline NormTraits<long double>::SquaredNormType squaredNorm(long double t) { return sq(t); } inline NormTraits<long double>::NormType norm(long double t) { return abs(t); }
46146
46147
46148
46149 template <class T>
46150 inline typename NormTraits<std::complex<T> >::SquaredNormType
46151 squaredNorm(std::complex<T> const & t)
46152 {
46153 return sq(t.real()) + sq(t.imag());
46154 }
46155 # 518 "../include/vigra/mathutil.hxx"
46156 template <class T>
46157 inline typename NormTraits<T>::NormType
46158 norm(T const & t)
46159 {
46160 typedef typename NormTraits<T>::SquaredNormType SNT;
46161 return sqrt(static_cast<typename SquareRootTraits<SNT>::SquareRootArgument>(squaredNorm(t)));
46162 }
46163
46164 namespace detail {
46165
46166
46167 template<class FPT>
46168 inline
46169 FPT safeFloatDivision( FPT f1, FPT f2 )
46170 {
46171 return f2 < NumericTraits<FPT>::one() && f1 > f2 * NumericTraits<FPT>::max()
46172 ? NumericTraits<FPT>::max()
46173 : (f2 > NumericTraits<FPT>::one() && f1 < f2 * NumericTraits<FPT>::smallestPositive()) ||
46174 f1 == NumericTraits<FPT>::zero()
46175 ? NumericTraits<FPT>::zero()
46176 : f1/f2;
46177 }
46178
46179 }
46180 # 553 "../include/vigra/mathutil.hxx"
46181 template <class T1, class T2>
46182 bool closeAtTolerance(T1 l, T2 r, typename PromoteTraits<T1, T2>::Promote epsilon)
46183 {
46184 typedef typename PromoteTraits<T1, T2>::Promote T;
46185 if(l == 0.0)
46186 return std::fabs(r) <= epsilon;
46187 if(r == 0.0)
46188 return std::fabs(l) <= epsilon;
46189 T diff = std::fabs( l - r );
46190 T d1 = detail::safeFloatDivision<T>( diff, std::fabs( r ) );
46191 T d2 = detail::safeFloatDivision<T>( diff, std::fabs( l ) );
46192
46193 return (d1 <= epsilon && d2 <= epsilon);
46194 }
46195
46196 template <class T1, class T2>
46197 bool closeAtTolerance(T1 l, T2 r)
46198 {
46199 typedef typename PromoteTraits<T1, T2>::Promote T;
46200 return closeAtTolerance(l, r, 2.0 * NumericTraits<T>::epsilon());
46201 }
46202
46203
46204
46205 }
46206 # 47 "../include/vigra/utilities.hxx" 2
46207 # 43 "../include/vigra/basicimage.hxx" 2
46208
46209
46210
46211 namespace vigra {
46212
46213 template <class IMAGEITERATOR>
46214 class LineBasedColumnIteratorPolicy
46215 {
46216 public:
46217 typedef IMAGEITERATOR ImageIterator;
46218 typedef typename IMAGEITERATOR::LineStartIterator LineStartIterator;
46219 typedef typename IMAGEITERATOR::value_type value_type;
46220 typedef typename IMAGEITERATOR::difference_type::MoveY
46221 difference_type;
46222 typedef typename IMAGEITERATOR::reference reference;
46223 typedef typename IMAGEITERATOR::index_reference index_reference;
46224 typedef typename IMAGEITERATOR::pointer pointer;
46225 typedef std::random_access_iterator_tag iterator_category;
46226
46227
46228 struct BaseType
46229 {
46230 explicit BaseType(LineStartIterator c = LineStartIterator(),
46231 difference_type o = 0)
46232 : line_start_(c), offset_(o)
46233 {}
46234
46235 LineStartIterator line_start_;
46236 difference_type offset_;
46237 };
46238
46239 static void initialize(BaseType &) {}
46240
46241 static reference dereference(BaseType const & d)
46242 { return const_cast<reference>(*(*d.line_start_ + d.offset_)); }
46243
46244 static index_reference dereference(BaseType const & d, difference_type n)
46245 {
46246 return const_cast<index_reference>(*(d.line_start_[n] + d.offset_));
46247 }
46248
46249 static bool equal(BaseType const & d1, BaseType const & d2)
46250 { return d1.line_start_ == d2.line_start_; }
46251
46252 static bool less(BaseType const & d1, BaseType const & d2)
46253 { return d1.line_start_ < d2.line_start_; }
46254
46255 static difference_type difference(BaseType const & d1, BaseType const & d2)
46256 { return d1.line_start_ - d2.line_start_; }
46257
46258 static void increment(BaseType & d)
46259 { ++d.line_start_; }
46260
46261 static void decrement(BaseType & d)
46262 { --d.line_start_; }
46263
46264 static void advance(BaseType & d, difference_type n)
46265 { d.line_start_ += n; }
46266 };
46267 # 115 "../include/vigra/basicimage.hxx"
46268 template <class IMAGEITERATOR, class PIXELTYPE,
46269 class REFERENCE, class POINTER, class LINESTARTITERATOR>
46270 class BasicImageIteratorBase
46271 {
46272 public:
46273 typedef BasicImageIteratorBase<IMAGEITERATOR,
46274 PIXELTYPE, REFERENCE, POINTER, LINESTARTITERATOR> self_type;
46275
46276 typedef LINESTARTITERATOR LineStartIterator;
46277 typedef PIXELTYPE value_type;
46278 typedef PIXELTYPE PixelType;
46279 typedef REFERENCE reference;
46280 typedef REFERENCE index_reference;
46281 typedef POINTER pointer;
46282 typedef Diff2D difference_type;
46283 typedef image_traverser_tag iterator_category;
46284 typedef POINTER row_iterator;
46285 typedef IteratorAdaptor<LineBasedColumnIteratorPolicy<IMAGEITERATOR> >
46286 column_iterator;
46287
46288 typedef int MoveX;
46289 typedef LINESTARTITERATOR MoveY;
46290
46291 MoveX x;
46292 MoveY y;
46293
46294 IMAGEITERATOR & operator+=(difference_type const & s)
46295 {
46296 x += s.x;
46297 y += s.y;
46298 return static_cast<IMAGEITERATOR &>(*this);
46299 }
46300
46301 IMAGEITERATOR & operator-=(difference_type const & s)
46302 {
46303 x -= s.x;
46304 y -= s.y;
46305 return static_cast<IMAGEITERATOR &>(*this);
46306 }
46307
46308 IMAGEITERATOR operator+(difference_type const & s) const
46309 {
46310 IMAGEITERATOR ret(static_cast<IMAGEITERATOR const &>(*this));
46311
46312 ret += s;
46313
46314 return ret;
46315 }
46316
46317 IMAGEITERATOR operator-(difference_type const & s) const
46318 {
46319 IMAGEITERATOR ret(static_cast<IMAGEITERATOR const &>(*this));
46320
46321 ret -= s;
46322
46323 return ret;
46324 }
46325
46326 difference_type operator-(BasicImageIteratorBase const & rhs) const
46327 {
46328 return difference_type(x - rhs.x, y - rhs.y);
46329 }
46330
46331 bool operator==(BasicImageIteratorBase const & rhs) const
46332 {
46333 return (x == rhs.x) && (y == rhs.y);
46334 }
46335
46336 bool operator!=(BasicImageIteratorBase const & rhs) const
46337 {
46338 return (x != rhs.x) || (y != rhs.y);
46339 }
46340
46341 reference operator*() const
46342 {
46343 return *(*y + x );
46344 }
46345
46346 pointer operator->() const
46347 {
46348 return *y + x;
46349 }
46350
46351 index_reference operator[](difference_type const & d) const
46352 {
46353 return *(*(y + d.y) + x + d.x);
46354 }
46355
46356 index_reference operator()(int dx, int dy) const
46357 {
46358 return *(*(y + dy) + x + dx);
46359 }
46360
46361 pointer operator[](int dy) const
46362 {
46363 return y[dy] + x;
46364 }
46365
46366 row_iterator rowIterator() const
46367 { return *y + x; }
46368
46369 column_iterator columnIterator() const
46370 {
46371 typedef typename column_iterator::BaseType Iter;
46372 return column_iterator(Iter(y, x));
46373 }
46374
46375 protected:
46376 BasicImageIteratorBase(LINESTARTITERATOR const & line)
46377 : x(0),
46378 y(line)
46379 {}
46380
46381 BasicImageIteratorBase(int ix, LINESTARTITERATOR const & line)
46382 : x(ix),
46383 y(line)
46384 {}
46385
46386 BasicImageIteratorBase()
46387 : x(0),
46388 y(0)
46389 {}
46390 };
46391 # 251 "../include/vigra/basicimage.hxx"
46392 template <class PIXELTYPE, class ITERATOR>
46393 class BasicImageIterator
46394 : public BasicImageIteratorBase<BasicImageIterator<PIXELTYPE, ITERATOR>,
46395 PIXELTYPE, PIXELTYPE &, PIXELTYPE *, ITERATOR>
46396 {
46397 public:
46398
46399 typedef BasicImageIteratorBase<BasicImageIterator, PIXELTYPE,
46400 PIXELTYPE &, PIXELTYPE *, ITERATOR> Base;
46401
46402
46403 BasicImageIterator(ITERATOR line)
46404 : Base(line)
46405 {}
46406
46407 BasicImageIterator()
46408 : Base()
46409 {}
46410 };
46411 # 283 "../include/vigra/basicimage.hxx"
46412 template <class PIXELTYPE, class ITERATOR>
46413 class ConstBasicImageIterator
46414 : public BasicImageIteratorBase<ConstBasicImageIterator<PIXELTYPE, ITERATOR>,
46415 PIXELTYPE, PIXELTYPE const &, PIXELTYPE const *, ITERATOR>
46416 {
46417 public:
46418
46419 typedef BasicImageIteratorBase<ConstBasicImageIterator,
46420 PIXELTYPE, PIXELTYPE const &, PIXELTYPE const *, ITERATOR> Base;
46421
46422
46423 ConstBasicImageIterator(ITERATOR line)
46424 : Base(line)
46425 {}
46426
46427 ConstBasicImageIterator(BasicImageIterator<PIXELTYPE, ITERATOR> const & rhs)
46428 : Base(rhs.x, rhs.y)
46429 {}
46430
46431 ConstBasicImageIterator()
46432 : Base()
46433 {}
46434
46435 ConstBasicImageIterator &
46436 operator=(BasicImageIterator<PIXELTYPE, ITERATOR> const & rhs)
46437 {
46438 Base::x = rhs.x;
46439 Base::y = rhs.y;
46440 return *this;
46441 }
46442
46443 };
46444 # 325 "../include/vigra/basicimage.hxx"
46445 template <class T>
46446 struct IteratorTraits<BasicImageIterator<T, T**> >
46447 : public IteratorTraitsBase<BasicImageIterator<T, T**> >
46448 {
46449 typedef BasicImageIterator<T, T**> mutable_iterator;
46450 typedef ConstBasicImageIterator<T, T**> const_iterator;
46451 typedef typename AccessorTraits<T>::default_accessor DefaultAccessor;
46452 typedef DefaultAccessor default_accessor;
46453 typedef VigraTrueType hasConstantStrides;
46454 };
46455
46456 template <class T>
46457 struct IteratorTraits<ConstBasicImageIterator<T, T**> >
46458 : public IteratorTraitsBase<ConstBasicImageIterator<T, T**> >
46459 {
46460 typedef BasicImageIterator<T, T**> mutable_iterator;
46461 typedef ConstBasicImageIterator<T, T**> const_iterator;
46462 typedef typename AccessorTraits<T>::default_const_accessor DefaultAccessor;
46463 typedef DefaultAccessor default_accessor;
46464 typedef VigraTrueType hasConstantStrides;
46465 };
46466 # 463 "../include/vigra/basicimage.hxx"
46467 template <class PIXELTYPE, class Alloc = std::allocator<PIXELTYPE> >
46468 class BasicImage
46469 {
46470 public:
46471
46472
46473
46474 typedef PIXELTYPE value_type;
46475
46476
46477
46478 typedef PIXELTYPE PixelType;
46479
46480
46481
46482
46483 typedef PIXELTYPE & reference;
46484
46485
46486
46487
46488
46489 typedef PIXELTYPE const & const_reference;
46490
46491
46492
46493 typedef PIXELTYPE * pointer;
46494
46495
46496
46497 typedef PIXELTYPE const * const_pointer;
46498
46499
46500
46501
46502
46503 typedef PIXELTYPE * iterator;
46504
46505
46506
46507 typedef PIXELTYPE * ScanOrderIterator;
46508
46509
46510
46511
46512
46513 typedef PIXELTYPE const * const_iterator;
46514
46515
46516
46517 typedef PIXELTYPE const * ConstScanOrderIterator;
46518
46519
46520
46521 typedef BasicImageIterator<PIXELTYPE, PIXELTYPE **> traverser;
46522
46523
46524
46525 typedef BasicImageIterator<PIXELTYPE, PIXELTYPE **> Iterator;
46526
46527
46528
46529 typedef
46530 ConstBasicImageIterator<PIXELTYPE, PIXELTYPE **>
46531 const_traverser;
46532
46533
46534
46535 typedef
46536 ConstBasicImageIterator<PIXELTYPE, PIXELTYPE **>
46537 ConstIterator;
46538
46539
46540
46541 typedef typename traverser::row_iterator row_iterator;
46542
46543
46544
46545 typedef typename const_traverser::row_iterator const_row_iterator;
46546
46547
46548
46549 typedef typename traverser::column_iterator column_iterator;
46550
46551
46552
46553 typedef typename const_traverser::column_iterator const_column_iterator;
46554
46555
46556
46557 typedef Diff2D difference_type;
46558
46559
46560
46561 typedef Size2D size_type;
46562
46563
46564
46565 typedef typename
46566 IteratorTraits<traverser>::DefaultAccessor Accessor;
46567
46568
46569
46570 typedef typename
46571 IteratorTraits<const_traverser>::DefaultAccessor ConstAccessor;
46572
46573
46574
46575 typedef Alloc allocator_type;
46576
46577 typedef Alloc Allocator;
46578 typedef typename Alloc::template rebind<PIXELTYPE *>::other LineAllocator;
46579
46580
46581
46582 BasicImage()
46583 : data_(0),
46584 width_(0),
46585 height_(0)
46586 {}
46587
46588
46589
46590 explicit BasicImage(Alloc const & alloc)
46591 : data_(0),
46592 width_(0),
46593 height_(0),
46594 allocator_(alloc),
46595 pallocator_(alloc)
46596 {}
46597
46598
46599
46600 BasicImage(int width, int height, Alloc const & alloc = Alloc())
46601 : data_(0),
46602 width_(0),
46603 height_(0),
46604 allocator_(alloc),
46605 pallocator_(alloc)
46606 {
46607 vigra::throw_precondition_error(((width >= 0) && (height >= 0)), "BasicImage::BasicImage(int width, int height): " "width and height must be >= 0.\n");
46608
46609
46610
46611 resize(width, height, value_type());
46612 }
46613
46614
46615
46616 explicit BasicImage(difference_type const & size, Alloc const & alloc = Alloc())
46617 : data_(0),
46618 width_(0),
46619 height_(0),
46620 allocator_(alloc),
46621 pallocator_(alloc)
46622 {
46623 vigra::throw_precondition_error(((size.x >= 0) && (size.y >= 0)), "BasicImage::BasicImage(Diff2D size): " "size.x and size.y must be >= 0.\n");
46624
46625
46626
46627 resize(size.x, size.y, value_type());
46628 }
46629
46630
46631
46632
46633
46634
46635 BasicImage(int width, int height, value_type const & d, Alloc const & alloc = Alloc())
46636 : data_(0),
46637 width_(0),
46638 height_(0),
46639 allocator_(alloc),
46640 pallocator_(alloc)
46641 {
46642 vigra::throw_precondition_error(((width >= 0) && (height >= 0)), "BasicImage::BasicImage(int width, int height, value_type const & ): " "width and height must be >= 0.\n");
46643
46644
46645
46646 resize(width, height, d);
46647 }
46648
46649
46650
46651
46652
46653 explicit BasicImage(difference_type const & size, value_type const & d, Alloc const & alloc = Alloc())
46654 : data_(0),
46655 width_(0),
46656 height_(0),
46657 allocator_(alloc),
46658 pallocator_(alloc)
46659 {
46660 vigra::throw_precondition_error(((size.x >= 0) && (size.y >= 0)), "BasicImage::BasicImage(Diff2D const & size, value_type const & v): " "size.x and size.y must be >= 0.\n");
46661
46662
46663
46664 resize(size.x, size.y, d);
46665 }
46666
46667
46668
46669
46670
46671 BasicImage(int width, int height, const_pointer d, Alloc const & alloc = Alloc())
46672 : data_(0),
46673 width_(0),
46674 height_(0),
46675 allocator_(alloc),
46676 pallocator_(alloc)
46677 {
46678 vigra::throw_precondition_error(((width >= 0) && (height >= 0)), "BasicImage::BasicImage(int width, int height, const_pointer ): " "width and height must be >= 0.\n");
46679
46680
46681
46682 resizeCopy(width, height, d);
46683 }
46684
46685
46686
46687
46688 explicit BasicImage(difference_type const & size, const_pointer d, Alloc const & alloc = Alloc())
46689 : data_(0),
46690 width_(0),
46691 height_(0),
46692 allocator_(alloc),
46693 pallocator_(alloc)
46694 {
46695 vigra::throw_precondition_error(((size.x >= 0) && (size.y >= 0)), "BasicImage::BasicImage(Diff2D const & size, const_pointer): " "size.x and size.y must be >= 0.\n");
46696
46697
46698
46699 resizeCopy(size.x, size.y, d);
46700 }
46701
46702
46703
46704 BasicImage(const BasicImage & rhs)
46705 : data_(0),
46706 width_(0),
46707 height_(0),
46708 allocator_(rhs.allocator_),
46709 pallocator_(rhs.pallocator_)
46710 {
46711 resizeCopy(rhs);
46712 }
46713
46714
46715
46716 ~BasicImage()
46717 {
46718 deallocate();
46719 }
46720
46721
46722
46723 BasicImage & operator=(const BasicImage & rhs);
46724
46725
46726
46727 BasicImage & operator=(value_type pixel);
46728
46729
46730
46731 BasicImage & init(value_type const & pixel);
46732
46733
46734
46735
46736 void resize(int width, int height)
46737 {
46738 if(width != width_ || height != height_)
46739 resize(width, height, value_type());
46740 }
46741
46742
46743
46744
46745 void resize(difference_type const & size)
46746 {
46747 if(size.x != width_ || size.y != height_)
46748 {
46749 resize(size.x, size.y, value_type());
46750 }
46751 }
46752
46753
46754
46755
46756
46757
46758 void resize(int width, int height, value_type const & d);
46759
46760
46761
46762
46763 void resizeCopy(int width, int height, const_pointer data);
46764
46765
46766
46767 void resizeCopy(const BasicImage & rhs)
46768 {
46769 resizeCopy(rhs.width(), rhs.height(), rhs.data_);
46770 }
46771
46772
46773
46774 void swap( BasicImage & rhs );
46775
46776
46777
46778 int width() const
46779 {
46780 return width_;
46781 }
46782
46783
46784
46785 int height() const
46786 {
46787 return height_;
46788 }
46789
46790
46791
46792 size_type size() const
46793 {
46794 return size_type(width(), height());
46795 }
46796
46797
46798
46799 bool isInside(difference_type const & d) const
46800 {
46801 return d.x >= 0 && d.y >= 0 &&
46802 d.x < width() && d.y < height();
46803 }
46804
46805
46806
46807
46808 reference operator[](difference_type const & d)
46809 {
46810 return lines_[d.y][d.x];
46811 }
46812
46813
46814
46815
46816 const_reference operator[](difference_type const & d) const
46817 {
46818 return lines_[d.y][d.x];
46819 }
46820
46821
46822
46823
46824 reference operator()(int dx, int dy)
46825 {
46826 return lines_[dy][dx];
46827 }
46828
46829
46830
46831
46832 const_reference operator()(int dx, int dy) const
46833 {
46834 return lines_[dy][dx];
46835 }
46836
46837
46838
46839
46840
46841 pointer operator[](int dy)
46842 {
46843 return lines_[dy];
46844 }
46845
46846
46847
46848
46849
46850 const_pointer operator[](int dy) const
46851 {
46852 return lines_[dy];
46853 }
46854
46855
46856
46857 traverser upperLeft()
46858 {
46859
46860 ;
46861
46862 return traverser(lines_);
46863 }
46864
46865
46866
46867
46868
46869 traverser lowerRight()
46870 {
46871
46872 ;
46873
46874 return upperLeft() + size();
46875 }
46876
46877
46878
46879 const_traverser upperLeft() const
46880 {
46881
46882 ;
46883
46884 return const_traverser(const_cast<PIXELTYPE **>(lines_));
46885 }
46886
46887
46888
46889
46890
46891 const_traverser lowerRight() const
46892 {
46893
46894 ;
46895
46896 return upperLeft() + size();
46897 }
46898
46899
46900
46901 iterator begin()
46902 {
46903
46904 ;
46905
46906 return data_;
46907 }
46908
46909
46910
46911 iterator end()
46912 {
46913
46914 ;
46915
46916 return data_ + width() * height();
46917 }
46918
46919
46920
46921 const_iterator begin() const
46922 {
46923
46924 ;
46925
46926 return data_;
46927 }
46928
46929
46930
46931 const_iterator end() const
46932 {
46933
46934 ;
46935
46936 return data_ + width() * height();
46937 }
46938
46939
46940
46941 row_iterator rowBegin(int y)
46942 {
46943 return lines_[y];
46944 }
46945
46946
46947
46948 row_iterator rowEnd(int y)
46949 {
46950 return rowBegin(y) + width();
46951 }
46952
46953
46954
46955 const_row_iterator rowBegin(int y) const
46956 {
46957 return lines_[y];
46958 }
46959
46960
46961
46962 const_row_iterator rowEnd(int y) const
46963 {
46964 return rowBegin(y) + width();
46965 }
46966
46967
46968
46969 column_iterator columnBegin(int x)
46970 {
46971 typedef typename column_iterator::BaseType Iter;
46972 return column_iterator(Iter(lines_, x));
46973 }
46974
46975
46976
46977 column_iterator columnEnd(int x)
46978 {
46979 return columnBegin(x) + height();
46980 }
46981
46982
46983
46984 const_column_iterator columnBegin(int x) const
46985 {
46986 typedef typename const_column_iterator::BaseType Iter;
46987 return const_column_iterator(Iter(lines_, x));
46988 }
46989
46990
46991
46992 const_column_iterator columnEnd(int x) const
46993 {
46994 return columnBegin(x) + height();
46995 }
46996
46997
46998
46999 const_pointer data() const
47000 {
47001 return data_;
47002 }
47003
47004
47005
47006 Accessor accessor()
47007 {
47008 return Accessor();
47009 }
47010
47011
47012
47013 ConstAccessor accessor() const
47014 {
47015 return ConstAccessor();
47016 }
47017
47018 private:
47019
47020 void deallocate();
47021
47022 value_type ** initLineStartArray(value_type * data, int width, int height);
47023
47024 PIXELTYPE * data_;
47025 PIXELTYPE ** lines_;
47026 int width_, height_;
47027 Alloc allocator_;
47028 LineAllocator pallocator_;
47029 };
47030
47031 template <class PIXELTYPE, class Alloc>
47032 BasicImage<PIXELTYPE, Alloc> &
47033 BasicImage<PIXELTYPE, Alloc>::operator=(const BasicImage<PIXELTYPE, Alloc> & rhs)
47034 {
47035 if(this != &rhs)
47036 {
47037 if((width() != rhs.width()) ||
47038 (height() != rhs.height()))
47039 {
47040 resizeCopy(rhs);
47041 }
47042 else
47043 {
47044 ConstScanOrderIterator is = rhs.begin();
47045 ConstScanOrderIterator iend = rhs.end();
47046 ScanOrderIterator id = begin();
47047
47048 for(; is != iend; ++is, ++id) *id = *is;
47049 }
47050 }
47051 return *this;
47052 }
47053
47054 template <class PIXELTYPE, class Alloc>
47055 BasicImage<PIXELTYPE, Alloc> &
47056 BasicImage<PIXELTYPE, Alloc>::operator=(value_type pixel)
47057 {
47058 ScanOrderIterator i = begin();
47059 ScanOrderIterator iend = end();
47060
47061 for(; i != iend; ++i) *i = pixel;
47062
47063 return *this;
47064 }
47065
47066 template <class PIXELTYPE, class Alloc>
47067 BasicImage<PIXELTYPE, Alloc> &
47068 BasicImage<PIXELTYPE, Alloc>::init(value_type const & pixel)
47069 {
47070 ScanOrderIterator i = begin();
47071 ScanOrderIterator iend = end();
47072
47073 for(; i != iend; ++i) *i = pixel;
47074
47075 return *this;
47076 }
47077
47078 template <class PIXELTYPE, class Alloc>
47079 void
47080 BasicImage<PIXELTYPE, Alloc>::resize(int width, int height, value_type const & d)
47081 {
47082 vigra::throw_precondition_error(((width >= 0) && (height >= 0)), "BasicImage::resize(int width, int height, value_type const &): " "width and height must be >= 0.\n");
47083
47084
47085
47086 if (width_ != width || height_ != height)
47087 {
47088 value_type * newdata = 0;
47089 value_type ** newlines = 0;
47090 if(width*height > 0)
47091 {
47092 if (width*height != width_*height_)
47093 {
47094 newdata = allocator_.allocate(width*height);
47095 std::uninitialized_fill_n(newdata, width*height, d);
47096 newlines = initLineStartArray(newdata, width, height);
47097 deallocate();
47098 }
47099 else
47100 {
47101 newdata = data_;
47102 std::fill_n(newdata, width*height, d);
47103 newlines = initLineStartArray(newdata, width, height);
47104 pallocator_.deallocate(lines_, height_);
47105 }
47106 }
47107 else
47108 {
47109 deallocate();
47110 }
47111
47112 data_ = newdata;
47113 lines_ = newlines;
47114 width_ = width;
47115 height_ = height;
47116 }
47117 else if(width*height > 0)
47118 {
47119 std::fill_n(data_, width*height, d);
47120 }
47121 }
47122
47123
47124 template <class PIXELTYPE, class Alloc>
47125 void
47126 BasicImage<PIXELTYPE, Alloc>::resizeCopy(int width, int height, const_pointer data)
47127 {
47128 int newsize = width*height;
47129 if (width_ != width || height_ != height)
47130 {
47131 value_type * newdata = 0;
47132 value_type ** newlines = 0;
47133 if(newsize > 0)
47134 {
47135 if (newsize != width_*height_)
47136 {
47137 newdata = allocator_.allocate(newsize);
47138 std::uninitialized_copy(data, data + newsize, newdata);
47139 newlines = initLineStartArray(newdata, width, height);
47140 deallocate();
47141 }
47142 else
47143 {
47144 newdata = data_;
47145 std::copy(data, data + newsize, newdata);
47146 newlines = initLineStartArray(newdata, width, height);
47147 pallocator_.deallocate(lines_, height_);
47148 }
47149 }
47150 else
47151 {
47152 deallocate();
47153 }
47154
47155 data_ = newdata;
47156 lines_ = newlines;
47157 width_ = width;
47158 height_ = height;
47159 }
47160 else if(newsize > 0)
47161 {
47162 std::copy(data, data + newsize, data_);
47163 }
47164 }
47165
47166 template <class PIXELTYPE, class Alloc>
47167 void
47168 BasicImage<PIXELTYPE, Alloc>::swap( BasicImage<PIXELTYPE, Alloc>& rhs )
47169 {
47170 if (&rhs!=this)
47171 {
47172 std::swap( data_, rhs.data_ );
47173 std::swap( lines_, rhs.lines_ );
47174 std::swap( width_, rhs.width_ );
47175 std::swap( height_, rhs.height_ );
47176 }
47177 }
47178
47179 template <class PIXELTYPE, class Alloc>
47180 void
47181 BasicImage<PIXELTYPE, Alloc>::deallocate()
47182 {
47183 if(data_)
47184 {
47185 ScanOrderIterator i = begin();
47186 ScanOrderIterator iend = end();
47187
47188 for(; i != iend; ++i) (*i).~PIXELTYPE();
47189
47190 allocator_.deallocate(data_, width()*height());
47191 pallocator_.deallocate(lines_, height_);
47192 }
47193 }
47194
47195 template <class PIXELTYPE, class Alloc>
47196 PIXELTYPE **
47197 BasicImage<PIXELTYPE, Alloc>::initLineStartArray(value_type * data, int width, int height)
47198 {
47199 value_type ** lines = pallocator_.allocate(height);
47200 for(int y=0; y<height; ++y)
47201 lines[y] = data + y*width;
47202 return lines;
47203 }
47204
47205
47206
47207
47208
47209
47210
47211 template <class PixelType, class Accessor, class Alloc>
47212 inline triple<typename BasicImage<PixelType, Alloc>::const_traverser,
47213 typename BasicImage<PixelType, Alloc>::const_traverser, Accessor>
47214 srcImageRange(BasicImage<PixelType, Alloc> const & img, Accessor a)
47215 {
47216 return triple<typename BasicImage<PixelType, Alloc>::const_traverser,
47217 typename BasicImage<PixelType, Alloc>::const_traverser,
47218 Accessor>(img.upperLeft(),
47219 img.lowerRight(),
47220 a);
47221 }
47222
47223 template <class PixelType, class Accessor, class Alloc>
47224 inline pair<typename BasicImage<PixelType, Alloc>::const_traverser, Accessor>
47225 srcImage(BasicImage<PixelType, Alloc> const & img, Accessor a)
47226 {
47227 return pair<typename BasicImage<PixelType, Alloc>::const_traverser,
47228 Accessor>(img.upperLeft(), a);
47229 }
47230
47231 template <class PixelType, class Accessor, class Alloc>
47232 inline triple<typename BasicImage<PixelType, Alloc>::traverser,
47233 typename BasicImage<PixelType, Alloc>::traverser, Accessor>
47234 destImageRange(BasicImage<PixelType, Alloc> & img, Accessor a)
47235 {
47236 return triple<typename BasicImage<PixelType, Alloc>::traverser,
47237 typename BasicImage<PixelType, Alloc>::traverser,
47238 Accessor>(img.upperLeft(),
47239 img.lowerRight(),
47240 a);
47241 }
47242
47243 template <class PixelType, class Accessor, class Alloc>
47244 inline pair<typename BasicImage<PixelType, Alloc>::traverser, Accessor>
47245 destImage(BasicImage<PixelType, Alloc> & img, Accessor a)
47246 {
47247 return pair<typename BasicImage<PixelType, Alloc>::traverser,
47248 Accessor>(img.upperLeft(), a);
47249 }
47250
47251 template <class PixelType, class Accessor, class Alloc>
47252 inline pair<typename BasicImage<PixelType, Alloc>::const_traverser, Accessor>
47253 maskImage(BasicImage<PixelType, Alloc> const & img, Accessor a)
47254 {
47255 return pair<typename BasicImage<PixelType, Alloc>::const_traverser,
47256 Accessor>(img.upperLeft(), a);
47257 }
47258
47259
47260
47261 template <class PixelType, class Alloc>
47262 inline triple<typename BasicImage<PixelType, Alloc>::const_traverser,
47263 typename BasicImage<PixelType, Alloc>::const_traverser,
47264 typename BasicImage<PixelType, Alloc>::ConstAccessor>
47265 srcImageRange(BasicImage<PixelType, Alloc> const & img)
47266 {
47267 return triple<typename BasicImage<PixelType, Alloc>::const_traverser,
47268 typename BasicImage<PixelType, Alloc>::const_traverser,
47269 typename BasicImage<PixelType, Alloc>::ConstAccessor>(img.upperLeft(),
47270 img.lowerRight(),
47271 img.accessor());
47272 }
47273
47274 template <class PixelType, class Alloc>
47275 inline pair< typename BasicImage<PixelType, Alloc>::const_traverser,
47276 typename BasicImage<PixelType, Alloc>::ConstAccessor>
47277 srcImage(BasicImage<PixelType, Alloc> const & img)
47278 {
47279 return pair<typename BasicImage<PixelType, Alloc>::const_traverser,
47280 typename BasicImage<PixelType, Alloc>::ConstAccessor>(img.upperLeft(),
47281 img.accessor());
47282 }
47283
47284 template <class PixelType, class Alloc>
47285 inline triple< typename BasicImage<PixelType, Alloc>::traverser,
47286 typename BasicImage<PixelType, Alloc>::traverser,
47287 typename BasicImage<PixelType, Alloc>::Accessor>
47288 destImageRange(BasicImage<PixelType, Alloc> & img)
47289 {
47290 return triple<typename BasicImage<PixelType, Alloc>::traverser,
47291 typename BasicImage<PixelType, Alloc>::traverser,
47292 typename BasicImage<PixelType, Alloc>::Accessor>(img.upperLeft(),
47293 img.lowerRight(),
47294 img.accessor());
47295 }
47296
47297 template <class PixelType, class Alloc>
47298 inline pair< typename BasicImage<PixelType, Alloc>::traverser,
47299 typename BasicImage<PixelType, Alloc>::Accessor>
47300 destImage(BasicImage<PixelType, Alloc> & img)
47301 {
47302 return pair<typename BasicImage<PixelType, Alloc>::traverser,
47303 typename BasicImage<PixelType, Alloc>::Accessor>(img.upperLeft(),
47304 img.accessor());
47305 }
47306
47307 template <class PixelType, class Alloc>
47308 inline pair< typename BasicImage<PixelType, Alloc>::const_traverser,
47309 typename BasicImage<PixelType, Alloc>::ConstAccessor>
47310 maskImage(BasicImage<PixelType, Alloc> const & img)
47311 {
47312 return pair<typename BasicImage<PixelType, Alloc>::const_traverser,
47313 typename BasicImage<PixelType, Alloc>::ConstAccessor>(img.upperLeft(),
47314 img.accessor());
47315 }
47316
47317 }
47318 # 28 "numerictraits.h" 2
47319 # 1 "../include/vigra/cachedfileimage.hxx" 1
47320 # 25 "../include/vigra/cachedfileimage.hxx"
47321 # 1 "/usr/include/errno.h" 1 3 4
47322 # 32 "/usr/include/errno.h" 3 4
47323 extern "C" {
47324
47325
47326
47327 # 1 "/usr/include/bits/errno.h" 1 3 4
47328 # 25 "/usr/include/bits/errno.h" 3 4
47329 # 1 "/usr/include/linux/errno.h" 1 3 4
47330
47331
47332
47333 # 1 "/usr/include/asm/errno.h" 1 3 4
47334
47335
47336
47337 # 1 "/usr/include/asm-generic/errno.h" 1 3 4
47338
47339
47340
47341 # 1 "/usr/include/asm-generic/errno-base.h" 1 3 4
47342 # 5 "/usr/include/asm-generic/errno.h" 2 3 4
47343 # 5 "/usr/include/asm/errno.h" 2 3 4
47344 # 5 "/usr/include/linux/errno.h" 2 3 4
47345 # 26 "/usr/include/bits/errno.h" 2 3 4
47346 # 43 "/usr/include/bits/errno.h" 3 4
47347 extern int *__errno_location (void) throw () __attribute__ ((__const__));
47348 # 37 "/usr/include/errno.h" 2 3 4
47349 # 55 "/usr/include/errno.h" 3 4
47350 extern char *program_invocation_name, *program_invocation_short_name;
47351
47352
47353
47354 }
47355 # 69 "/usr/include/errno.h" 3 4
47356 typedef int error_t;
47357 # 26 "../include/vigra/cachedfileimage.hxx" 2
47358 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/map" 1 3
47359 # 63 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/map" 3
47360
47361 # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/map" 3
47362
47363 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_tree.h" 1 3
47364 # 73 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_tree.h" 3
47365 namespace std __attribute__ ((__visibility__ ("default"))) {
47366 # 91 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_tree.h" 3
47367 enum _Rb_tree_color { _S_red = false, _S_black = true };
47368
47369 struct _Rb_tree_node_base
47370 {
47371 typedef _Rb_tree_node_base* _Base_ptr;
47372 typedef const _Rb_tree_node_base* _Const_Base_ptr;
47373
47374 _Rb_tree_color _M_color;
47375 _Base_ptr _M_parent;
47376 _Base_ptr _M_left;
47377 _Base_ptr _M_right;
47378
47379 static _Base_ptr
47380 _S_minimum(_Base_ptr __x)
47381 {
47382 while (__x->_M_left != 0) __x = __x->_M_left;
47383 return __x;
47384 }
47385
47386 static _Const_Base_ptr
47387 _S_minimum(_Const_Base_ptr __x)
47388 {
47389 while (__x->_M_left != 0) __x = __x->_M_left;
47390 return __x;
47391 }
47392
47393 static _Base_ptr
47394 _S_maximum(_Base_ptr __x)
47395 {
47396 while (__x->_M_right != 0) __x = __x->_M_right;
47397 return __x;
47398 }
47399
47400 static _Const_Base_ptr
47401 _S_maximum(_Const_Base_ptr __x)
47402 {
47403 while (__x->_M_right != 0) __x = __x->_M_right;
47404 return __x;
47405 }
47406 };
47407
47408 template<typename _Val>
47409 struct _Rb_tree_node : public _Rb_tree_node_base
47410 {
47411 typedef _Rb_tree_node<_Val>* _Link_type;
47412 _Val _M_value_field;
47413 };
47414
47415 _Rb_tree_node_base*
47416 _Rb_tree_increment(_Rb_tree_node_base* __x);
47417
47418 const _Rb_tree_node_base*
47419 _Rb_tree_increment(const _Rb_tree_node_base* __x);
47420
47421 _Rb_tree_node_base*
47422 _Rb_tree_decrement(_Rb_tree_node_base* __x);
47423
47424 const _Rb_tree_node_base*
47425 _Rb_tree_decrement(const _Rb_tree_node_base* __x);
47426
47427 template<typename _Tp>
47428 struct _Rb_tree_iterator
47429 {
47430 typedef _Tp value_type;
47431 typedef _Tp& reference;
47432 typedef _Tp* pointer;
47433
47434 typedef bidirectional_iterator_tag iterator_category;
47435 typedef ptrdiff_t difference_type;
47436
47437 typedef _Rb_tree_iterator<_Tp> _Self;
47438 typedef _Rb_tree_node_base::_Base_ptr _Base_ptr;
47439 typedef _Rb_tree_node<_Tp>* _Link_type;
47440
47441 _Rb_tree_iterator()
47442 : _M_node() { }
47443
47444 explicit
47445 _Rb_tree_iterator(_Link_type __x)
47446 : _M_node(__x) { }
47447
47448 reference
47449 operator*() const
47450 { return static_cast<_Link_type>(_M_node)->_M_value_field; }
47451
47452 pointer
47453 operator->() const
47454 { return &static_cast<_Link_type>(_M_node)->_M_value_field; }
47455
47456 _Self&
47457 operator++()
47458 {
47459 _M_node = _Rb_tree_increment(_M_node);
47460 return *this;
47461 }
47462
47463 _Self
47464 operator++(int)
47465 {
47466 _Self __tmp = *this;
47467 _M_node = _Rb_tree_increment(_M_node);
47468 return __tmp;
47469 }
47470
47471 _Self&
47472 operator--()
47473 {
47474 _M_node = _Rb_tree_decrement(_M_node);
47475 return *this;
47476 }
47477
47478 _Self
47479 operator--(int)
47480 {
47481 _Self __tmp = *this;
47482 _M_node = _Rb_tree_decrement(_M_node);
47483 return __tmp;
47484 }
47485
47486 bool
47487 operator==(const _Self& __x) const
47488 { return _M_node == __x._M_node; }
47489
47490 bool
47491 operator!=(const _Self& __x) const
47492 { return _M_node != __x._M_node; }
47493
47494 _Base_ptr _M_node;
47495 };
47496
47497 template<typename _Tp>
47498 struct _Rb_tree_const_iterator
47499 {
47500 typedef _Tp value_type;
47501 typedef const _Tp& reference;
47502 typedef const _Tp* pointer;
47503
47504 typedef _Rb_tree_iterator<_Tp> iterator;
47505
47506 typedef bidirectional_iterator_tag iterator_category;
47507 typedef ptrdiff_t difference_type;
47508
47509 typedef _Rb_tree_const_iterator<_Tp> _Self;
47510 typedef _Rb_tree_node_base::_Const_Base_ptr _Base_ptr;
47511 typedef const _Rb_tree_node<_Tp>* _Link_type;
47512
47513 _Rb_tree_const_iterator()
47514 : _M_node() { }
47515
47516 explicit
47517 _Rb_tree_const_iterator(_Link_type __x)
47518 : _M_node(__x) { }
47519
47520 _Rb_tree_const_iterator(const iterator& __it)
47521 : _M_node(__it._M_node) { }
47522
47523 reference
47524 operator*() const
47525 { return static_cast<_Link_type>(_M_node)->_M_value_field; }
47526
47527 pointer
47528 operator->() const
47529 { return &static_cast<_Link_type>(_M_node)->_M_value_field; }
47530
47531 _Self&
47532 operator++()
47533 {
47534 _M_node = _Rb_tree_increment(_M_node);
47535 return *this;
47536 }
47537
47538 _Self
47539 operator++(int)
47540 {
47541 _Self __tmp = *this;
47542 _M_node = _Rb_tree_increment(_M_node);
47543 return __tmp;
47544 }
47545
47546 _Self&
47547 operator--()
47548 {
47549 _M_node = _Rb_tree_decrement(_M_node);
47550 return *this;
47551 }
47552
47553 _Self
47554 operator--(int)
47555 {
47556 _Self __tmp = *this;
47557 _M_node = _Rb_tree_decrement(_M_node);
47558 return __tmp;
47559 }
47560
47561 bool
47562 operator==(const _Self& __x) const
47563 { return _M_node == __x._M_node; }
47564
47565 bool
47566 operator!=(const _Self& __x) const
47567 { return _M_node != __x._M_node; }
47568
47569 _Base_ptr _M_node;
47570 };
47571
47572 template<typename _Val>
47573 inline bool
47574 operator==(const _Rb_tree_iterator<_Val>& __x,
47575 const _Rb_tree_const_iterator<_Val>& __y)
47576 { return __x._M_node == __y._M_node; }
47577
47578 template<typename _Val>
47579 inline bool
47580 operator!=(const _Rb_tree_iterator<_Val>& __x,
47581 const _Rb_tree_const_iterator<_Val>& __y)
47582 { return __x._M_node != __y._M_node; }
47583
47584 void
47585 _Rb_tree_rotate_left(_Rb_tree_node_base* const __x,
47586 _Rb_tree_node_base*& __root);
47587
47588 void
47589 _Rb_tree_rotate_right(_Rb_tree_node_base* const __x,
47590 _Rb_tree_node_base*& __root);
47591
47592 void
47593 _Rb_tree_insert_and_rebalance(const bool __insert_left,
47594 _Rb_tree_node_base* __x,
47595 _Rb_tree_node_base* __p,
47596 _Rb_tree_node_base& __header);
47597
47598 _Rb_tree_node_base*
47599 _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z,
47600 _Rb_tree_node_base& __header);
47601
47602
47603 template<typename _Key, typename _Val, typename _KeyOfValue,
47604 typename _Compare, typename _Alloc = allocator<_Val> >
47605 class _Rb_tree
47606 {
47607 typedef typename _Alloc::template rebind<_Rb_tree_node<_Val> >::other
47608 _Node_allocator;
47609
47610 protected:
47611 typedef _Rb_tree_node_base* _Base_ptr;
47612 typedef const _Rb_tree_node_base* _Const_Base_ptr;
47613 typedef _Rb_tree_node<_Val> _Rb_tree_node;
47614
47615 public:
47616 typedef _Key key_type;
47617 typedef _Val value_type;
47618 typedef value_type* pointer;
47619 typedef const value_type* const_pointer;
47620 typedef value_type& reference;
47621 typedef const value_type& const_reference;
47622 typedef _Rb_tree_node* _Link_type;
47623 typedef const _Rb_tree_node* _Const_Link_type;
47624 typedef size_t size_type;
47625 typedef ptrdiff_t difference_type;
47626 typedef _Alloc allocator_type;
47627
47628 _Node_allocator&
47629 _M_get_Node_allocator()
47630 { return *static_cast<_Node_allocator*>(&this->_M_impl); }
47631
47632 const _Node_allocator&
47633 _M_get_Node_allocator() const
47634 { return *static_cast<const _Node_allocator*>(&this->_M_impl); }
47635
47636 allocator_type
47637 get_allocator() const
47638 { return allocator_type(_M_get_Node_allocator()); }
47639
47640 protected:
47641 _Rb_tree_node*
47642 _M_get_node()
47643 { return _M_impl._Node_allocator::allocate(1); }
47644
47645 void
47646 _M_put_node(_Rb_tree_node* __p)
47647 { _M_impl._Node_allocator::deallocate(__p, 1); }
47648
47649 _Link_type
47650 _M_create_node(const value_type& __x)
47651 {
47652 _Link_type __tmp = _M_get_node();
47653 try
47654 { get_allocator().construct(&__tmp->_M_value_field, __x); }
47655 catch(...)
47656 {
47657 _M_put_node(__tmp);
47658 throw;
47659 }
47660 return __tmp;
47661 }
47662
47663 _Link_type
47664 _M_clone_node(_Const_Link_type __x)
47665 {
47666 _Link_type __tmp = _M_create_node(__x->_M_value_field);
47667 __tmp->_M_color = __x->_M_color;
47668 __tmp->_M_left = 0;
47669 __tmp->_M_right = 0;
47670 return __tmp;
47671 }
47672
47673 void
47674 _M_destroy_node(_Link_type __p)
47675 {
47676 get_allocator().destroy(&__p->_M_value_field);
47677 _M_put_node(__p);
47678 }
47679
47680 protected:
47681 template<typename _Key_compare,
47682 bool _Is_pod_comparator = std::__is_pod<_Key_compare>::__value>
47683 struct _Rb_tree_impl : public _Node_allocator
47684 {
47685 _Key_compare _M_key_compare;
47686 _Rb_tree_node_base _M_header;
47687 size_type _M_node_count;
47688
47689 _Rb_tree_impl(const _Node_allocator& __a = _Node_allocator(),
47690 const _Key_compare& __comp = _Key_compare())
47691 : _Node_allocator(__a), _M_key_compare(__comp), _M_header(),
47692 _M_node_count(0)
47693 {
47694 this->_M_header._M_color = _S_red;
47695 this->_M_header._M_parent = 0;
47696 this->_M_header._M_left = &this->_M_header;
47697 this->_M_header._M_right = &this->_M_header;
47698 }
47699 };
47700
47701
47702
47703 template<typename _Key_compare>
47704 struct _Rb_tree_impl<_Key_compare, true> : public _Node_allocator
47705 {
47706 _Key_compare _M_key_compare;
47707 _Rb_tree_node_base _M_header;
47708 size_type _M_node_count;
47709
47710 _Rb_tree_impl(const _Node_allocator& __a = _Node_allocator(),
47711 const _Key_compare& __comp = _Key_compare())
47712 : _Node_allocator(__a), _M_key_compare(__comp), _M_header(),
47713 _M_node_count(0)
47714 {
47715 this->_M_header._M_color = _S_red;
47716 this->_M_header._M_parent = 0;
47717 this->_M_header._M_left = &this->_M_header;
47718 this->_M_header._M_right = &this->_M_header;
47719 }
47720 };
47721
47722 _Rb_tree_impl<_Compare> _M_impl;
47723
47724 protected:
47725 _Base_ptr&
47726 _M_root()
47727 { return this->_M_impl._M_header._M_parent; }
47728
47729 _Const_Base_ptr
47730 _M_root() const
47731 { return this->_M_impl._M_header._M_parent; }
47732
47733 _Base_ptr&
47734 _M_leftmost()
47735 { return this->_M_impl._M_header._M_left; }
47736
47737 _Const_Base_ptr
47738 _M_leftmost() const
47739 { return this->_M_impl._M_header._M_left; }
47740
47741 _Base_ptr&
47742 _M_rightmost()
47743 { return this->_M_impl._M_header._M_right; }
47744
47745 _Const_Base_ptr
47746 _M_rightmost() const
47747 { return this->_M_impl._M_header._M_right; }
47748
47749 _Link_type
47750 _M_begin()
47751 { return static_cast<_Link_type>(this->_M_impl._M_header._M_parent); }
47752
47753 _Const_Link_type
47754 _M_begin() const
47755 {
47756 return static_cast<_Const_Link_type>
47757 (this->_M_impl._M_header._M_parent);
47758 }
47759
47760 _Link_type
47761 _M_end()
47762 { return static_cast<_Link_type>(&this->_M_impl._M_header); }
47763
47764 _Const_Link_type
47765 _M_end() const
47766 { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); }
47767
47768 static const_reference
47769 _S_value(_Const_Link_type __x)
47770 { return __x->_M_value_field; }
47771
47772 static const _Key&
47773 _S_key(_Const_Link_type __x)
47774 { return _KeyOfValue()(_S_value(__x)); }
47775
47776 static _Link_type
47777 _S_left(_Base_ptr __x)
47778 { return static_cast<_Link_type>(__x->_M_left); }
47779
47780 static _Const_Link_type
47781 _S_left(_Const_Base_ptr __x)
47782 { return static_cast<_Const_Link_type>(__x->_M_left); }
47783
47784 static _Link_type
47785 _S_right(_Base_ptr __x)
47786 { return static_cast<_Link_type>(__x->_M_right); }
47787
47788 static _Const_Link_type
47789 _S_right(_Const_Base_ptr __x)
47790 { return static_cast<_Const_Link_type>(__x->_M_right); }
47791
47792 static const_reference
47793 _S_value(_Const_Base_ptr __x)
47794 { return static_cast<_Const_Link_type>(__x)->_M_value_field; }
47795
47796 static const _Key&
47797 _S_key(_Const_Base_ptr __x)
47798 { return _KeyOfValue()(_S_value(__x)); }
47799
47800 static _Base_ptr
47801 _S_minimum(_Base_ptr __x)
47802 { return _Rb_tree_node_base::_S_minimum(__x); }
47803
47804 static _Const_Base_ptr
47805 _S_minimum(_Const_Base_ptr __x)
47806 { return _Rb_tree_node_base::_S_minimum(__x); }
47807
47808 static _Base_ptr
47809 _S_maximum(_Base_ptr __x)
47810 { return _Rb_tree_node_base::_S_maximum(__x); }
47811
47812 static _Const_Base_ptr
47813 _S_maximum(_Const_Base_ptr __x)
47814 { return _Rb_tree_node_base::_S_maximum(__x); }
47815
47816 public:
47817 typedef _Rb_tree_iterator<value_type> iterator;
47818 typedef _Rb_tree_const_iterator<value_type> const_iterator;
47819
47820 typedef std::reverse_iterator<iterator> reverse_iterator;
47821 typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
47822
47823 private:
47824 iterator
47825 _M_insert(_Base_ptr __x, _Base_ptr __y, const value_type& __v);
47826
47827
47828
47829 iterator
47830 _M_insert_lower(_Base_ptr __x, _Base_ptr __y, const value_type& __v);
47831
47832 const_iterator
47833 _M_insert(_Const_Base_ptr __x, _Const_Base_ptr __y,
47834 const value_type& __v);
47835
47836 _Link_type
47837 _M_copy(_Const_Link_type __x, _Link_type __p);
47838
47839 void
47840 _M_erase(_Link_type __x);
47841
47842 public:
47843
47844 _Rb_tree()
47845 { }
47846
47847 _Rb_tree(const _Compare& __comp)
47848 : _M_impl(allocator_type(), __comp)
47849 { }
47850
47851 _Rb_tree(const _Compare& __comp, const allocator_type& __a)
47852 : _M_impl(__a, __comp)
47853 { }
47854
47855 _Rb_tree(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x)
47856 : _M_impl(__x._M_get_Node_allocator(), __x._M_impl._M_key_compare)
47857 {
47858 if (__x._M_root() != 0)
47859 {
47860 _M_root() = _M_copy(__x._M_begin(), _M_end());
47861 _M_leftmost() = _S_minimum(_M_root());
47862 _M_rightmost() = _S_maximum(_M_root());
47863 _M_impl._M_node_count = __x._M_impl._M_node_count;
47864 }
47865 }
47866
47867 ~_Rb_tree()
47868 { _M_erase(_M_begin()); }
47869
47870 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&
47871 operator=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x);
47872
47873
47874 _Compare
47875 key_comp() const
47876 { return _M_impl._M_key_compare; }
47877
47878 iterator
47879 begin()
47880 {
47881 return iterator(static_cast<_Link_type>
47882 (this->_M_impl._M_header._M_left));
47883 }
47884
47885 const_iterator
47886 begin() const
47887 {
47888 return const_iterator(static_cast<_Const_Link_type>
47889 (this->_M_impl._M_header._M_left));
47890 }
47891
47892 iterator
47893 end()
47894 { return iterator(static_cast<_Link_type>(&this->_M_impl._M_header)); }
47895
47896 const_iterator
47897 end() const
47898 {
47899 return const_iterator(static_cast<_Const_Link_type>
47900 (&this->_M_impl._M_header));
47901 }
47902
47903 reverse_iterator
47904 rbegin()
47905 { return reverse_iterator(end()); }
47906
47907 const_reverse_iterator
47908 rbegin() const
47909 { return const_reverse_iterator(end()); }
47910
47911 reverse_iterator
47912 rend()
47913 { return reverse_iterator(begin()); }
47914
47915 const_reverse_iterator
47916 rend() const
47917 { return const_reverse_iterator(begin()); }
47918
47919 bool
47920 empty() const
47921 { return _M_impl._M_node_count == 0; }
47922
47923 size_type
47924 size() const
47925 { return _M_impl._M_node_count; }
47926
47927 size_type
47928 max_size() const
47929 { return get_allocator().max_size(); }
47930
47931 void
47932 swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __t);
47933
47934
47935 pair<iterator, bool>
47936 _M_insert_unique(const value_type& __x);
47937
47938 iterator
47939 _M_insert_equal(const value_type& __x);
47940
47941
47942
47943 iterator
47944 _M_insert_equal_lower(const value_type& __x);
47945
47946 iterator
47947 _M_insert_unique(iterator __position, const value_type& __x);
47948
47949 const_iterator
47950 _M_insert_unique(const_iterator __position, const value_type& __x);
47951
47952 iterator
47953 _M_insert_equal(iterator __position, const value_type& __x);
47954
47955 const_iterator
47956 _M_insert_equal(const_iterator __position, const value_type& __x);
47957
47958 template<typename _InputIterator>
47959 void
47960 _M_insert_unique(_InputIterator __first, _InputIterator __last);
47961
47962 template<typename _InputIterator>
47963 void
47964 _M_insert_equal(_InputIterator __first, _InputIterator __last);
47965
47966 void
47967 erase(iterator __position);
47968
47969 void
47970 erase(const_iterator __position);
47971
47972 size_type
47973 erase(const key_type& __x);
47974
47975 void
47976 erase(iterator __first, iterator __last);
47977
47978 void
47979 erase(const_iterator __first, const_iterator __last);
47980
47981 void
47982 erase(const key_type* __first, const key_type* __last);
47983
47984 void
47985 clear()
47986 {
47987 _M_erase(_M_begin());
47988 _M_leftmost() = _M_end();
47989 _M_root() = 0;
47990 _M_rightmost() = _M_end();
47991 _M_impl._M_node_count = 0;
47992 }
47993
47994
47995 iterator
47996 find(const key_type& __x);
47997
47998 const_iterator
47999 find(const key_type& __x) const;
48000
48001 size_type
48002 count(const key_type& __x) const;
48003
48004 iterator
48005 lower_bound(const key_type& __x);
48006
48007 const_iterator
48008 lower_bound(const key_type& __x) const;
48009
48010 iterator
48011 upper_bound(const key_type& __x);
48012
48013 const_iterator
48014 upper_bound(const key_type& __x) const;
48015
48016 pair<iterator,iterator>
48017 equal_range(const key_type& __x);
48018
48019 pair<const_iterator, const_iterator>
48020 equal_range(const key_type& __x) const;
48021
48022
48023 bool
48024 __rb_verify() const;
48025 };
48026
48027 template<typename _Key, typename _Val, typename _KeyOfValue,
48028 typename _Compare, typename _Alloc>
48029 inline bool
48030 operator==(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x,
48031 const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y)
48032 {
48033 return __x.size() == __y.size()
48034 && std::equal(__x.begin(), __x.end(), __y.begin());
48035 }
48036
48037 template<typename _Key, typename _Val, typename _KeyOfValue,
48038 typename _Compare, typename _Alloc>
48039 inline bool
48040 operator<(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x,
48041 const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y)
48042 {
48043 return std::lexicographical_compare(__x.begin(), __x.end(),
48044 __y.begin(), __y.end());
48045 }
48046
48047 template<typename _Key, typename _Val, typename _KeyOfValue,
48048 typename _Compare, typename _Alloc>
48049 inline bool
48050 operator!=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x,
48051 const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y)
48052 { return !(__x == __y); }
48053
48054 template<typename _Key, typename _Val, typename _KeyOfValue,
48055 typename _Compare, typename _Alloc>
48056 inline bool
48057 operator>(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x,
48058 const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y)
48059 { return __y < __x; }
48060
48061 template<typename _Key, typename _Val, typename _KeyOfValue,
48062 typename _Compare, typename _Alloc>
48063 inline bool
48064 operator<=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x,
48065 const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y)
48066 { return !(__y < __x); }
48067
48068 template<typename _Key, typename _Val, typename _KeyOfValue,
48069 typename _Compare, typename _Alloc>
48070 inline bool
48071 operator>=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x,
48072 const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y)
48073 { return !(__x < __y); }
48074
48075 template<typename _Key, typename _Val, typename _KeyOfValue,
48076 typename _Compare, typename _Alloc>
48077 inline void
48078 swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x,
48079 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y)
48080 { __x.swap(__y); }
48081
48082 template<typename _Key, typename _Val, typename _KeyOfValue,
48083 typename _Compare, typename _Alloc>
48084 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&
48085 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48086 operator=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x)
48087 {
48088 if (this != &__x)
48089 {
48090
48091 clear();
48092 _M_impl._M_key_compare = __x._M_impl._M_key_compare;
48093 if (__x._M_root() != 0)
48094 {
48095 _M_root() = _M_copy(__x._M_begin(), _M_end());
48096 _M_leftmost() = _S_minimum(_M_root());
48097 _M_rightmost() = _S_maximum(_M_root());
48098 _M_impl._M_node_count = __x._M_impl._M_node_count;
48099 }
48100 }
48101 return *this;
48102 }
48103
48104 template<typename _Key, typename _Val, typename _KeyOfValue,
48105 typename _Compare, typename _Alloc>
48106 typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator
48107 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48108 _M_insert(_Base_ptr __x, _Base_ptr __p, const _Val& __v)
48109 {
48110 bool __insert_left = (__x != 0 || __p == _M_end()
48111 || _M_impl._M_key_compare(_KeyOfValue()(__v),
48112 _S_key(__p)));
48113
48114 _Link_type __z = _M_create_node(__v);
48115
48116 _Rb_tree_insert_and_rebalance(__insert_left, __z, __p,
48117 this->_M_impl._M_header);
48118 ++_M_impl._M_node_count;
48119 return iterator(__z);
48120 }
48121
48122 template<typename _Key, typename _Val, typename _KeyOfValue,
48123 typename _Compare, typename _Alloc>
48124 typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator
48125 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48126 _M_insert_lower(_Base_ptr __x, _Base_ptr __p, const _Val& __v)
48127 {
48128 bool __insert_left = (__x != 0 || __p == _M_end()
48129 || !_M_impl._M_key_compare(_S_key(__p),
48130 _KeyOfValue()(__v)));
48131
48132 _Link_type __z = _M_create_node(__v);
48133
48134 _Rb_tree_insert_and_rebalance(__insert_left, __z, __p,
48135 this->_M_impl._M_header);
48136 ++_M_impl._M_node_count;
48137 return iterator(__z);
48138 }
48139
48140 template<typename _Key, typename _Val, typename _KeyOfValue,
48141 typename _Compare, typename _Alloc>
48142 typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator
48143 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48144 _M_insert(_Const_Base_ptr __x, _Const_Base_ptr __p, const _Val& __v)
48145 {
48146 bool __insert_left = (__x != 0 || __p == _M_end()
48147 || _M_impl._M_key_compare(_KeyOfValue()(__v),
48148 _S_key(__p)));
48149
48150 _Link_type __z = _M_create_node(__v);
48151
48152 _Rb_tree_insert_and_rebalance(__insert_left, __z,
48153 const_cast<_Base_ptr>(__p),
48154 this->_M_impl._M_header);
48155 ++_M_impl._M_node_count;
48156 return const_iterator(__z);
48157 }
48158
48159 template<typename _Key, typename _Val, typename _KeyOfValue,
48160 typename _Compare, typename _Alloc>
48161 typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator
48162 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48163 _M_insert_equal(const _Val& __v)
48164 {
48165 _Link_type __x = _M_begin();
48166 _Link_type __y = _M_end();
48167 while (__x != 0)
48168 {
48169 __y = __x;
48170 __x = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x)) ?
48171 _S_left(__x) : _S_right(__x);
48172 }
48173 return _M_insert(__x, __y, __v);
48174 }
48175
48176 template<typename _Key, typename _Val, typename _KeyOfValue,
48177 typename _Compare, typename _Alloc>
48178 typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator
48179 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48180 _M_insert_equal_lower(const _Val& __v)
48181 {
48182 _Link_type __x = _M_begin();
48183 _Link_type __y = _M_end();
48184 while (__x != 0)
48185 {
48186 __y = __x;
48187 __x = !_M_impl._M_key_compare(_S_key(__x), _KeyOfValue()(__v)) ?
48188 _S_left(__x) : _S_right(__x);
48189 }
48190 return _M_insert_lower(__x, __y, __v);
48191 }
48192
48193 template<typename _Key, typename _Val, typename _KeyOfValue,
48194 typename _Compare, typename _Alloc>
48195 void
48196 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48197 swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __t)
48198 {
48199 if (_M_root() == 0)
48200 {
48201 if (__t._M_root() != 0)
48202 {
48203 _M_root() = __t._M_root();
48204 _M_leftmost() = __t._M_leftmost();
48205 _M_rightmost() = __t._M_rightmost();
48206 _M_root()->_M_parent = _M_end();
48207
48208 __t._M_root() = 0;
48209 __t._M_leftmost() = __t._M_end();
48210 __t._M_rightmost() = __t._M_end();
48211 }
48212 }
48213 else if (__t._M_root() == 0)
48214 {
48215 __t._M_root() = _M_root();
48216 __t._M_leftmost() = _M_leftmost();
48217 __t._M_rightmost() = _M_rightmost();
48218 __t._M_root()->_M_parent = __t._M_end();
48219
48220 _M_root() = 0;
48221 _M_leftmost() = _M_end();
48222 _M_rightmost() = _M_end();
48223 }
48224 else
48225 {
48226 std::swap(_M_root(),__t._M_root());
48227 std::swap(_M_leftmost(),__t._M_leftmost());
48228 std::swap(_M_rightmost(),__t._M_rightmost());
48229
48230 _M_root()->_M_parent = _M_end();
48231 __t._M_root()->_M_parent = __t._M_end();
48232 }
48233
48234 std::swap(this->_M_impl._M_node_count, __t._M_impl._M_node_count);
48235 std::swap(this->_M_impl._M_key_compare, __t._M_impl._M_key_compare);
48236
48237
48238
48239 std::__alloc_swap<_Node_allocator>::
48240 _S_do_it(_M_get_Node_allocator(), __t._M_get_Node_allocator());
48241 }
48242
48243 template<typename _Key, typename _Val, typename _KeyOfValue,
48244 typename _Compare, typename _Alloc>
48245 pair<typename _Rb_tree<_Key, _Val, _KeyOfValue,
48246 _Compare, _Alloc>::iterator, bool>
48247 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48248 _M_insert_unique(const _Val& __v)
48249 {
48250 _Link_type __x = _M_begin();
48251 _Link_type __y = _M_end();
48252 bool __comp = true;
48253 while (__x != 0)
48254 {
48255 __y = __x;
48256 __comp = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x));
48257 __x = __comp ? _S_left(__x) : _S_right(__x);
48258 }
48259 iterator __j = iterator(__y);
48260 if (__comp)
48261 if (__j == begin())
48262 return pair<iterator,bool>(_M_insert(__x, __y, __v), true);
48263 else
48264 --__j;
48265 if (_M_impl._M_key_compare(_S_key(__j._M_node), _KeyOfValue()(__v)))
48266 return pair<iterator, bool>(_M_insert(__x, __y, __v), true);
48267 return pair<iterator, bool>(__j, false);
48268 }
48269
48270 template<typename _Key, typename _Val, typename _KeyOfValue,
48271 typename _Compare, typename _Alloc>
48272 typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator
48273 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48274 _M_insert_unique(iterator __position, const _Val& __v)
48275 {
48276
48277 if (__position._M_node == _M_end())
48278 {
48279 if (size() > 0
48280 && _M_impl._M_key_compare(_S_key(_M_rightmost()),
48281 _KeyOfValue()(__v)))
48282 return _M_insert(0, _M_rightmost(), __v);
48283 else
48284 return _M_insert_unique(__v).first;
48285 }
48286 else if (_M_impl._M_key_compare(_KeyOfValue()(__v),
48287 _S_key(__position._M_node)))
48288 {
48289
48290 iterator __before = __position;
48291 if (__position._M_node == _M_leftmost())
48292 return _M_insert(_M_leftmost(), _M_leftmost(), __v);
48293 else if (_M_impl._M_key_compare(_S_key((--__before)._M_node),
48294 _KeyOfValue()(__v)))
48295 {
48296 if (_S_right(__before._M_node) == 0)
48297 return _M_insert(0, __before._M_node, __v);
48298 else
48299 return _M_insert(__position._M_node,
48300 __position._M_node, __v);
48301 }
48302 else
48303 return _M_insert_unique(__v).first;
48304 }
48305 else if (_M_impl._M_key_compare(_S_key(__position._M_node),
48306 _KeyOfValue()(__v)))
48307 {
48308
48309 iterator __after = __position;
48310 if (__position._M_node == _M_rightmost())
48311 return _M_insert(0, _M_rightmost(), __v);
48312 else if (_M_impl._M_key_compare(_KeyOfValue()(__v),
48313 _S_key((++__after)._M_node)))
48314 {
48315 if (_S_right(__position._M_node) == 0)
48316 return _M_insert(0, __position._M_node, __v);
48317 else
48318 return _M_insert(__after._M_node, __after._M_node, __v);
48319 }
48320 else
48321 return _M_insert_unique(__v).first;
48322 }
48323 else
48324 return __position;
48325 }
48326
48327 template<typename _Key, typename _Val, typename _KeyOfValue,
48328 typename _Compare, typename _Alloc>
48329 typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator
48330 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48331 _M_insert_unique(const_iterator __position, const _Val& __v)
48332 {
48333
48334 if (__position._M_node == _M_end())
48335 {
48336 if (size() > 0
48337 && _M_impl._M_key_compare(_S_key(_M_rightmost()),
48338 _KeyOfValue()(__v)))
48339 return _M_insert(0, _M_rightmost(), __v);
48340 else
48341 return const_iterator(_M_insert_unique(__v).first);
48342 }
48343 else if (_M_impl._M_key_compare(_KeyOfValue()(__v),
48344 _S_key(__position._M_node)))
48345 {
48346
48347 const_iterator __before = __position;
48348 if (__position._M_node == _M_leftmost())
48349 return _M_insert(_M_leftmost(), _M_leftmost(), __v);
48350 else if (_M_impl._M_key_compare(_S_key((--__before)._M_node),
48351 _KeyOfValue()(__v)))
48352 {
48353 if (_S_right(__before._M_node) == 0)
48354 return _M_insert(0, __before._M_node, __v);
48355 else
48356 return _M_insert(__position._M_node,
48357 __position._M_node, __v);
48358 }
48359 else
48360 return const_iterator(_M_insert_unique(__v).first);
48361 }
48362 else if (_M_impl._M_key_compare(_S_key(__position._M_node),
48363 _KeyOfValue()(__v)))
48364 {
48365
48366 const_iterator __after = __position;
48367 if (__position._M_node == _M_rightmost())
48368 return _M_insert(0, _M_rightmost(), __v);
48369 else if (_M_impl._M_key_compare(_KeyOfValue()(__v),
48370 _S_key((++__after)._M_node)))
48371 {
48372 if (_S_right(__position._M_node) == 0)
48373 return _M_insert(0, __position._M_node, __v);
48374 else
48375 return _M_insert(__after._M_node, __after._M_node, __v);
48376 }
48377 else
48378 return const_iterator(_M_insert_unique(__v).first);
48379 }
48380 else
48381 return __position;
48382 }
48383
48384 template<typename _Key, typename _Val, typename _KeyOfValue,
48385 typename _Compare, typename _Alloc>
48386 typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator
48387 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48388 _M_insert_equal(iterator __position, const _Val& __v)
48389 {
48390
48391 if (__position._M_node == _M_end())
48392 {
48393 if (size() > 0
48394 && !_M_impl._M_key_compare(_KeyOfValue()(__v),
48395 _S_key(_M_rightmost())))
48396 return _M_insert(0, _M_rightmost(), __v);
48397 else
48398 return _M_insert_equal(__v);
48399 }
48400 else if (!_M_impl._M_key_compare(_S_key(__position._M_node),
48401 _KeyOfValue()(__v)))
48402 {
48403
48404 iterator __before = __position;
48405 if (__position._M_node == _M_leftmost())
48406 return _M_insert(_M_leftmost(), _M_leftmost(), __v);
48407 else if (!_M_impl._M_key_compare(_KeyOfValue()(__v),
48408 _S_key((--__before)._M_node)))
48409 {
48410 if (_S_right(__before._M_node) == 0)
48411 return _M_insert(0, __before._M_node, __v);
48412 else
48413 return _M_insert(__position._M_node,
48414 __position._M_node, __v);
48415 }
48416 else
48417 return _M_insert_equal(__v);
48418 }
48419 else
48420 {
48421
48422 iterator __after = __position;
48423 if (__position._M_node == _M_rightmost())
48424 return _M_insert(0, _M_rightmost(), __v);
48425 else if (!_M_impl._M_key_compare(_S_key((++__after)._M_node),
48426 _KeyOfValue()(__v)))
48427 {
48428 if (_S_right(__position._M_node) == 0)
48429 return _M_insert(0, __position._M_node, __v);
48430 else
48431 return _M_insert(__after._M_node, __after._M_node, __v);
48432 }
48433 else
48434 return _M_insert_equal_lower(__v);
48435 }
48436 }
48437
48438 template<typename _Key, typename _Val, typename _KeyOfValue,
48439 typename _Compare, typename _Alloc>
48440 typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator
48441 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48442 _M_insert_equal(const_iterator __position, const _Val& __v)
48443 {
48444
48445 if (__position._M_node == _M_end())
48446 {
48447 if (size() > 0
48448 && !_M_impl._M_key_compare(_KeyOfValue()(__v),
48449 _S_key(_M_rightmost())))
48450 return _M_insert(0, _M_rightmost(), __v);
48451 else
48452 return const_iterator(_M_insert_equal(__v));
48453 }
48454 else if (!_M_impl._M_key_compare(_S_key(__position._M_node),
48455 _KeyOfValue()(__v)))
48456 {
48457
48458 const_iterator __before = __position;
48459 if (__position._M_node == _M_leftmost())
48460 return _M_insert(_M_leftmost(), _M_leftmost(), __v);
48461 else if (!_M_impl._M_key_compare(_KeyOfValue()(__v),
48462 _S_key((--__before)._M_node)))
48463 {
48464 if (_S_right(__before._M_node) == 0)
48465 return _M_insert(0, __before._M_node, __v);
48466 else
48467 return _M_insert(__position._M_node,
48468 __position._M_node, __v);
48469 }
48470 else
48471 return const_iterator(_M_insert_equal(__v));
48472 }
48473 else
48474 {
48475
48476 const_iterator __after = __position;
48477 if (__position._M_node == _M_rightmost())
48478 return _M_insert(0, _M_rightmost(), __v);
48479 else if (!_M_impl._M_key_compare(_S_key((++__after)._M_node),
48480 _KeyOfValue()(__v)))
48481 {
48482 if (_S_right(__position._M_node) == 0)
48483 return _M_insert(0, __position._M_node, __v);
48484 else
48485 return _M_insert(__after._M_node, __after._M_node, __v);
48486 }
48487 else
48488 return const_iterator(_M_insert_equal_lower(__v));
48489 }
48490 }
48491
48492 template<typename _Key, typename _Val, typename _KoV,
48493 typename _Cmp, typename _Alloc>
48494 template<class _II>
48495 void
48496 _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>::
48497 _M_insert_equal(_II __first, _II __last)
48498 {
48499 for (; __first != __last; ++__first)
48500 _M_insert_equal(end(), *__first);
48501 }
48502
48503 template<typename _Key, typename _Val, typename _KoV,
48504 typename _Cmp, typename _Alloc>
48505 template<class _II>
48506 void
48507 _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>::
48508 _M_insert_unique(_II __first, _II __last)
48509 {
48510 for (; __first != __last; ++__first)
48511 _M_insert_unique(end(), *__first);
48512 }
48513
48514 template<typename _Key, typename _Val, typename _KeyOfValue,
48515 typename _Compare, typename _Alloc>
48516 inline void
48517 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48518 erase(iterator __position)
48519 {
48520 _Link_type __y =
48521 static_cast<_Link_type>(_Rb_tree_rebalance_for_erase
48522 (__position._M_node,
48523 this->_M_impl._M_header));
48524 _M_destroy_node(__y);
48525 --_M_impl._M_node_count;
48526 }
48527
48528 template<typename _Key, typename _Val, typename _KeyOfValue,
48529 typename _Compare, typename _Alloc>
48530 inline void
48531 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48532 erase(const_iterator __position)
48533 {
48534 _Link_type __y =
48535 static_cast<_Link_type>(_Rb_tree_rebalance_for_erase
48536 (const_cast<_Base_ptr>(__position._M_node),
48537 this->_M_impl._M_header));
48538 _M_destroy_node(__y);
48539 --_M_impl._M_node_count;
48540 }
48541
48542 template<typename _Key, typename _Val, typename _KeyOfValue,
48543 typename _Compare, typename _Alloc>
48544 typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type
48545 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48546 erase(const _Key& __x)
48547 {
48548 pair<iterator, iterator> __p = equal_range(__x);
48549 const size_type __old_size = size();
48550 erase(__p.first, __p.second);
48551 return __old_size - size();
48552 }
48553
48554 template<typename _Key, typename _Val, typename _KoV,
48555 typename _Compare, typename _Alloc>
48556 typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::_Link_type
48557 _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::
48558 _M_copy(_Const_Link_type __x, _Link_type __p)
48559 {
48560
48561 _Link_type __top = _M_clone_node(__x);
48562 __top->_M_parent = __p;
48563
48564 try
48565 {
48566 if (__x->_M_right)
48567 __top->_M_right = _M_copy(_S_right(__x), __top);
48568 __p = __top;
48569 __x = _S_left(__x);
48570
48571 while (__x != 0)
48572 {
48573 _Link_type __y = _M_clone_node(__x);
48574 __p->_M_left = __y;
48575 __y->_M_parent = __p;
48576 if (__x->_M_right)
48577 __y->_M_right = _M_copy(_S_right(__x), __y);
48578 __p = __y;
48579 __x = _S_left(__x);
48580 }
48581 }
48582 catch(...)
48583 {
48584 _M_erase(__top);
48585 throw;
48586 }
48587 return __top;
48588 }
48589
48590 template<typename _Key, typename _Val, typename _KeyOfValue,
48591 typename _Compare, typename _Alloc>
48592 void
48593 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48594 _M_erase(_Link_type __x)
48595 {
48596
48597 while (__x != 0)
48598 {
48599 _M_erase(_S_right(__x));
48600 _Link_type __y = _S_left(__x);
48601 _M_destroy_node(__x);
48602 __x = __y;
48603 }
48604 }
48605
48606 template<typename _Key, typename _Val, typename _KeyOfValue,
48607 typename _Compare, typename _Alloc>
48608 void
48609 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48610 erase(iterator __first, iterator __last)
48611 {
48612 if (__first == begin() && __last == end())
48613 clear();
48614 else
48615 while (__first != __last)
48616 erase(__first++);
48617 }
48618
48619 template<typename _Key, typename _Val, typename _KeyOfValue,
48620 typename _Compare, typename _Alloc>
48621 void
48622 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48623 erase(const_iterator __first, const_iterator __last)
48624 {
48625 if (__first == begin() && __last == end())
48626 clear();
48627 else
48628 while (__first != __last)
48629 erase(__first++);
48630 }
48631
48632 template<typename _Key, typename _Val, typename _KeyOfValue,
48633 typename _Compare, typename _Alloc>
48634 void
48635 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48636 erase(const _Key* __first, const _Key* __last)
48637 {
48638 while (__first != __last)
48639 erase(*__first++);
48640 }
48641
48642 template<typename _Key, typename _Val, typename _KeyOfValue,
48643 typename _Compare, typename _Alloc>
48644 typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator
48645 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48646 find(const _Key& __k)
48647 {
48648 _Link_type __x = _M_begin();
48649 _Link_type __y = _M_end();
48650
48651 while (__x != 0)
48652 if (!_M_impl._M_key_compare(_S_key(__x), __k))
48653 __y = __x, __x = _S_left(__x);
48654 else
48655 __x = _S_right(__x);
48656
48657 iterator __j = iterator(__y);
48658 return (__j == end()
48659 || _M_impl._M_key_compare(__k,
48660 _S_key(__j._M_node))) ? end() : __j;
48661 }
48662
48663 template<typename _Key, typename _Val, typename _KeyOfValue,
48664 typename _Compare, typename _Alloc>
48665 typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator
48666 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48667 find(const _Key& __k) const
48668 {
48669 _Const_Link_type __x = _M_begin();
48670 _Const_Link_type __y = _M_end();
48671
48672 while (__x != 0)
48673 {
48674 if (!_M_impl._M_key_compare(_S_key(__x), __k))
48675 __y = __x, __x = _S_left(__x);
48676 else
48677 __x = _S_right(__x);
48678 }
48679 const_iterator __j = const_iterator(__y);
48680 return (__j == end()
48681 || _M_impl._M_key_compare(__k,
48682 _S_key(__j._M_node))) ? end() : __j;
48683 }
48684
48685 template<typename _Key, typename _Val, typename _KeyOfValue,
48686 typename _Compare, typename _Alloc>
48687 typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type
48688 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48689 count(const _Key& __k) const
48690 {
48691 pair<const_iterator, const_iterator> __p = equal_range(__k);
48692 const size_type __n = std::distance(__p.first, __p.second);
48693 return __n;
48694 }
48695
48696 template<typename _Key, typename _Val, typename _KeyOfValue,
48697 typename _Compare, typename _Alloc>
48698 typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator
48699 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48700 lower_bound(const _Key& __k)
48701 {
48702 _Link_type __x = _M_begin();
48703 _Link_type __y = _M_end();
48704
48705 while (__x != 0)
48706 if (!_M_impl._M_key_compare(_S_key(__x), __k))
48707 __y = __x, __x = _S_left(__x);
48708 else
48709 __x = _S_right(__x);
48710
48711 return iterator(__y);
48712 }
48713
48714 template<typename _Key, typename _Val, typename _KeyOfValue,
48715 typename _Compare, typename _Alloc>
48716 typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator
48717 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48718 lower_bound(const _Key& __k) const
48719 {
48720 _Const_Link_type __x = _M_begin();
48721 _Const_Link_type __y = _M_end();
48722
48723 while (__x != 0)
48724 if (!_M_impl._M_key_compare(_S_key(__x), __k))
48725 __y = __x, __x = _S_left(__x);
48726 else
48727 __x = _S_right(__x);
48728
48729 return const_iterator(__y);
48730 }
48731
48732 template<typename _Key, typename _Val, typename _KeyOfValue,
48733 typename _Compare, typename _Alloc>
48734 typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator
48735 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48736 upper_bound(const _Key& __k)
48737 {
48738 _Link_type __x = _M_begin();
48739 _Link_type __y = _M_end();
48740
48741 while (__x != 0)
48742 if (_M_impl._M_key_compare(__k, _S_key(__x)))
48743 __y = __x, __x = _S_left(__x);
48744 else
48745 __x = _S_right(__x);
48746
48747 return iterator(__y);
48748 }
48749
48750 template<typename _Key, typename _Val, typename _KeyOfValue,
48751 typename _Compare, typename _Alloc>
48752 typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator
48753 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48754 upper_bound(const _Key& __k) const
48755 {
48756 _Const_Link_type __x = _M_begin();
48757 _Const_Link_type __y = _M_end();
48758
48759 while (__x != 0)
48760 if (_M_impl._M_key_compare(__k, _S_key(__x)))
48761 __y = __x, __x = _S_left(__x);
48762 else
48763 __x = _S_right(__x);
48764
48765 return const_iterator(__y);
48766 }
48767
48768 template<typename _Key, typename _Val, typename _KeyOfValue,
48769 typename _Compare, typename _Alloc>
48770 inline
48771 pair<typename _Rb_tree<_Key, _Val, _KeyOfValue,
48772 _Compare, _Alloc>::iterator,
48773 typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator>
48774 _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
48775 equal_range(const _Key& __k)
48776 { return pair<iterator, iterator>(lower_bound(__k), upper_bound(__k)); }
48777
48778 template<typename _Key, typename _Val, typename _KoV,
48779 typename _Compare, typename _Alloc>
48780 inline
48781 pair<typename _Rb_tree<_Key, _Val, _KoV,
48782 _Compare, _Alloc>::const_iterator,
48783 typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::const_iterator>
48784 _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::
48785 equal_range(const _Key& __k) const
48786 { return pair<const_iterator, const_iterator>(lower_bound(__k),
48787 upper_bound(__k)); }
48788
48789 unsigned int
48790 _Rb_tree_black_count(const _Rb_tree_node_base* __node,
48791 const _Rb_tree_node_base* __root);
48792
48793 template<typename _Key, typename _Val, typename _KeyOfValue,
48794 typename _Compare, typename _Alloc>
48795 bool
48796 _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::__rb_verify() const
48797 {
48798 if (_M_impl._M_node_count == 0 || begin() == end())
48799 return _M_impl._M_node_count == 0 && begin() == end()
48800 && this->_M_impl._M_header._M_left == _M_end()
48801 && this->_M_impl._M_header._M_right == _M_end();
48802
48803 unsigned int __len = _Rb_tree_black_count(_M_leftmost(), _M_root());
48804 for (const_iterator __it = begin(); __it != end(); ++__it)
48805 {
48806 _Const_Link_type __x = static_cast<_Const_Link_type>(__it._M_node);
48807 _Const_Link_type __L = _S_left(__x);
48808 _Const_Link_type __R = _S_right(__x);
48809
48810 if (__x->_M_color == _S_red)
48811 if ((__L && __L->_M_color == _S_red)
48812 || (__R && __R->_M_color == _S_red))
48813 return false;
48814
48815 if (__L && _M_impl._M_key_compare(_S_key(__x), _S_key(__L)))
48816 return false;
48817 if (__R && _M_impl._M_key_compare(_S_key(__R), _S_key(__x)))
48818 return false;
48819
48820 if (!__L && !__R && _Rb_tree_black_count(__x, _M_root()) != __len)
48821 return false;
48822 }
48823
48824 if (_M_leftmost() != _Rb_tree_node_base::_S_minimum(_M_root()))
48825 return false;
48826 if (_M_rightmost() != _Rb_tree_node_base::_S_maximum(_M_root()))
48827 return false;
48828 return true;
48829 }
48830
48831 }
48832 # 66 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/map" 2 3
48833 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 1 3
48834 # 68 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3
48835 namespace std __attribute__ ((__visibility__ ("default"))) {
48836 # 91 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3
48837 template <typename _Key, typename _Tp, typename _Compare = std::less<_Key>,
48838 typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
48839 class map
48840 {
48841 public:
48842 typedef _Key key_type;
48843 typedef _Tp mapped_type;
48844 typedef std::pair<const _Key, _Tp> value_type;
48845 typedef _Compare key_compare;
48846 typedef _Alloc allocator_type;
48847
48848 private:
48849
48850 typedef typename _Alloc::value_type _Alloc_value_type;
48851
48852
48853
48854
48855
48856 public:
48857 class value_compare
48858 : public std::binary_function<value_type, value_type, bool>
48859 {
48860 friend class map<_Key, _Tp, _Compare, _Alloc>;
48861 protected:
48862 _Compare comp;
48863
48864 value_compare(_Compare __c)
48865 : comp(__c) { }
48866
48867 public:
48868 bool operator()(const value_type& __x, const value_type& __y) const
48869 { return comp(__x.first, __y.first); }
48870 };
48871
48872 private:
48873
48874 typedef typename _Alloc::template rebind<value_type>::other
48875 _Pair_alloc_type;
48876
48877 typedef _Rb_tree<key_type, value_type, _Select1st<value_type>,
48878 key_compare, _Pair_alloc_type> _Rep_type;
48879
48880
48881 _Rep_type _M_t;
48882
48883 public:
48884
48885
48886 typedef typename _Pair_alloc_type::pointer pointer;
48887 typedef typename _Pair_alloc_type::const_pointer const_pointer;
48888 typedef typename _Pair_alloc_type::reference reference;
48889 typedef typename _Pair_alloc_type::const_reference const_reference;
48890 typedef typename _Rep_type::iterator iterator;
48891 typedef typename _Rep_type::const_iterator const_iterator;
48892 typedef typename _Rep_type::size_type size_type;
48893 typedef typename _Rep_type::difference_type difference_type;
48894 typedef typename _Rep_type::reverse_iterator reverse_iterator;
48895 typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
48896
48897
48898
48899
48900
48901
48902
48903 map()
48904 : _M_t(_Compare(), allocator_type()) { }
48905
48906
48907
48908
48909
48910 explicit
48911 map(const _Compare& __comp, const allocator_type& __a = allocator_type())
48912 : _M_t(__comp, __a) { }
48913 # 175 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3
48914 map(const map& __x)
48915 : _M_t(__x._M_t) { }
48916 # 187 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3
48917 template <typename _InputIterator>
48918 map(_InputIterator __first, _InputIterator __last)
48919 : _M_t(_Compare(), allocator_type())
48920 { _M_t._M_insert_unique(__first, __last); }
48921 # 203 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3
48922 template <typename _InputIterator>
48923 map(_InputIterator __first, _InputIterator __last,
48924 const _Compare& __comp, const allocator_type& __a = allocator_type())
48925 : _M_t(__comp, __a)
48926 { _M_t._M_insert_unique(__first, __last); }
48927 # 225 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3
48928 map&
48929 operator=(const map& __x)
48930 {
48931 _M_t = __x._M_t;
48932 return *this;
48933 }
48934
48935
48936 allocator_type
48937 get_allocator() const
48938 { return _M_t.get_allocator(); }
48939
48940
48941
48942
48943
48944
48945
48946 iterator
48947 begin()
48948 { return _M_t.begin(); }
48949
48950
48951
48952
48953
48954
48955 const_iterator
48956 begin() const
48957 { return _M_t.begin(); }
48958
48959
48960
48961
48962
48963
48964 iterator
48965 end()
48966 { return _M_t.end(); }
48967
48968
48969
48970
48971
48972
48973 const_iterator
48974 end() const
48975 { return _M_t.end(); }
48976
48977
48978
48979
48980
48981
48982 reverse_iterator
48983 rbegin()
48984 { return _M_t.rbegin(); }
48985
48986
48987
48988
48989
48990
48991 const_reverse_iterator
48992 rbegin() const
48993 { return _M_t.rbegin(); }
48994
48995
48996
48997
48998
48999
49000 reverse_iterator
49001 rend()
49002 { return _M_t.rend(); }
49003
49004
49005
49006
49007
49008
49009 const_reverse_iterator
49010 rend() const
49011 { return _M_t.rend(); }
49012
49013
49014
49015
49016
49017 bool
49018 empty() const
49019 { return _M_t.empty(); }
49020
49021
49022 size_type
49023 size() const
49024 { return _M_t.size(); }
49025
49026
49027 size_type
49028 max_size() const
49029 { return _M_t.max_size(); }
49030 # 341 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3
49031 mapped_type&
49032 operator[](const key_type& __k)
49033 {
49034
49035
49036
49037 iterator __i = lower_bound(__k);
49038
49039 if (__i == end() || key_comp()(__k, (*__i).first))
49040 __i = insert(__i, value_type(__k, mapped_type()));
49041 return (*__i).second;
49042 }
49043 # 363 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3
49044 mapped_type&
49045 at(const key_type& __k)
49046 {
49047 iterator __i = lower_bound(__k);
49048 if (__i == end() || key_comp()(__k, (*__i).first))
49049 __throw_out_of_range(("map::at"));
49050 return (*__i).second;
49051 }
49052
49053 const mapped_type&
49054 at(const key_type& __k) const
49055 {
49056 const_iterator __i = lower_bound(__k);
49057 if (__i == end() || key_comp()(__k, (*__i).first))
49058 __throw_out_of_range(("map::at"));
49059 return (*__i).second;
49060 }
49061 # 398 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3
49062 std::pair<iterator, bool>
49063 insert(const value_type& __x)
49064 { return _M_t._M_insert_unique(__x); }
49065 # 425 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3
49066 iterator
49067 insert(iterator __position, const value_type& __x)
49068 { return _M_t._M_insert_unique(__position, __x); }
49069 # 437 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3
49070 template <typename _InputIterator>
49071 void
49072 insert(_InputIterator __first, _InputIterator __last)
49073 { _M_t._M_insert_unique(__first, __last); }
49074 # 452 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3
49075 void
49076 erase(iterator __position)
49077 { _M_t.erase(__position); }
49078 # 467 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3
49079 size_type
49080 erase(const key_type& __x)
49081 { return _M_t.erase(__x); }
49082 # 482 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3
49083 void
49084 erase(iterator __first, iterator __last)
49085 { _M_t.erase(__first, __last); }
49086 # 497 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3
49087 void
49088 swap(map& __x)
49089 { _M_t.swap(__x._M_t); }
49090
49091
49092
49093
49094
49095
49096
49097 void
49098 clear()
49099 { _M_t.clear(); }
49100
49101
49102
49103
49104
49105
49106 key_compare
49107 key_comp() const
49108 { return _M_t.key_comp(); }
49109
49110
49111
49112
49113
49114 value_compare
49115 value_comp() const
49116 { return value_compare(_M_t.key_comp()); }
49117 # 540 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3
49118 iterator
49119 find(const key_type& __x)
49120 { return _M_t.find(__x); }
49121 # 555 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3
49122 const_iterator
49123 find(const key_type& __x) const
49124 { return _M_t.find(__x); }
49125 # 567 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3
49126 size_type
49127 count(const key_type& __x) const
49128 { return _M_t.find(__x) == _M_t.end() ? 0 : 1; }
49129 # 582 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3
49130 iterator
49131 lower_bound(const key_type& __x)
49132 { return _M_t.lower_bound(__x); }
49133 # 597 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3
49134 const_iterator
49135 lower_bound(const key_type& __x) const
49136 { return _M_t.lower_bound(__x); }
49137
49138
49139
49140
49141
49142
49143
49144 iterator
49145 upper_bound(const key_type& __x)
49146 { return _M_t.upper_bound(__x); }
49147
49148
49149
49150
49151
49152
49153
49154 const_iterator
49155 upper_bound(const key_type& __x) const
49156 { return _M_t.upper_bound(__x); }
49157 # 636 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3
49158 std::pair<iterator, iterator>
49159 equal_range(const key_type& __x)
49160 { return _M_t.equal_range(__x); }
49161 # 655 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3
49162 std::pair<const_iterator, const_iterator>
49163 equal_range(const key_type& __x) const
49164 { return _M_t.equal_range(__x); }
49165
49166 template <typename _K1, typename _T1, typename _C1, typename _A1>
49167 friend bool
49168 operator== (const map<_K1, _T1, _C1, _A1>&,
49169 const map<_K1, _T1, _C1, _A1>&);
49170
49171 template <typename _K1, typename _T1, typename _C1, typename _A1>
49172 friend bool
49173 operator< (const map<_K1, _T1, _C1, _A1>&,
49174 const map<_K1, _T1, _C1, _A1>&);
49175 };
49176 # 680 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3
49177 template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
49178 inline bool
49179 operator==(const map<_Key, _Tp, _Compare, _Alloc>& __x,
49180 const map<_Key, _Tp, _Compare, _Alloc>& __y)
49181 { return __x._M_t == __y._M_t; }
49182 # 697 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3
49183 template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
49184 inline bool
49185 operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x,
49186 const map<_Key, _Tp, _Compare, _Alloc>& __y)
49187 { return __x._M_t < __y._M_t; }
49188
49189
49190 template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
49191 inline bool
49192 operator!=(const map<_Key, _Tp, _Compare, _Alloc>& __x,
49193 const map<_Key, _Tp, _Compare, _Alloc>& __y)
49194 { return !(__x == __y); }
49195
49196
49197 template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
49198 inline bool
49199 operator>(const map<_Key, _Tp, _Compare, _Alloc>& __x,
49200 const map<_Key, _Tp, _Compare, _Alloc>& __y)
49201 { return __y < __x; }
49202
49203
49204 template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
49205 inline bool
49206 operator<=(const map<_Key, _Tp, _Compare, _Alloc>& __x,
49207 const map<_Key, _Tp, _Compare, _Alloc>& __y)
49208 { return !(__y < __x); }
49209
49210
49211 template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
49212 inline bool
49213 operator>=(const map<_Key, _Tp, _Compare, _Alloc>& __x,
49214 const map<_Key, _Tp, _Compare, _Alloc>& __y)
49215 { return !(__x < __y); }
49216
49217
49218 template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
49219 inline void
49220 swap(map<_Key, _Tp, _Compare, _Alloc>& __x,
49221 map<_Key, _Tp, _Compare, _Alloc>& __y)
49222 { __x.swap(__y); }
49223
49224 }
49225 # 67 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/map" 2 3
49226 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 1 3
49227 # 66 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3
49228 namespace std __attribute__ ((__visibility__ ("default"))) {
49229 # 89 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3
49230 template <typename _Key, typename _Tp,
49231 typename _Compare = std::less<_Key>,
49232 typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
49233 class multimap
49234 {
49235 public:
49236 typedef _Key key_type;
49237 typedef _Tp mapped_type;
49238 typedef std::pair<const _Key, _Tp> value_type;
49239 typedef _Compare key_compare;
49240 typedef _Alloc allocator_type;
49241
49242 private:
49243
49244 typedef typename _Alloc::value_type _Alloc_value_type;
49245
49246
49247
49248
49249
49250 public:
49251 class value_compare
49252 : public std::binary_function<value_type, value_type, bool>
49253 {
49254 friend class multimap<_Key, _Tp, _Compare, _Alloc>;
49255 protected:
49256 _Compare comp;
49257
49258 value_compare(_Compare __c)
49259 : comp(__c) { }
49260
49261 public:
49262 bool operator()(const value_type& __x, const value_type& __y) const
49263 { return comp(__x.first, __y.first); }
49264 };
49265
49266 private:
49267
49268 typedef typename _Alloc::template rebind<value_type>::other
49269 _Pair_alloc_type;
49270
49271 typedef _Rb_tree<key_type, value_type, _Select1st<value_type>,
49272 key_compare, _Pair_alloc_type> _Rep_type;
49273
49274 _Rep_type _M_t;
49275
49276 public:
49277
49278
49279 typedef typename _Pair_alloc_type::pointer pointer;
49280 typedef typename _Pair_alloc_type::const_pointer const_pointer;
49281 typedef typename _Pair_alloc_type::reference reference;
49282 typedef typename _Pair_alloc_type::const_reference const_reference;
49283 typedef typename _Rep_type::iterator iterator;
49284 typedef typename _Rep_type::const_iterator const_iterator;
49285 typedef typename _Rep_type::size_type size_type;
49286 typedef typename _Rep_type::difference_type difference_type;
49287 typedef typename _Rep_type::reverse_iterator reverse_iterator;
49288 typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
49289
49290
49291
49292
49293
49294
49295 multimap()
49296 : _M_t(_Compare(), allocator_type()) { }
49297
49298
49299
49300
49301
49302 explicit
49303 multimap(const _Compare& __comp,
49304 const allocator_type& __a = allocator_type())
49305 : _M_t(__comp, __a) { }
49306 # 173 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3
49307 multimap(const multimap& __x)
49308 : _M_t(__x._M_t) { }
49309 # 185 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3
49310 template <typename _InputIterator>
49311 multimap(_InputIterator __first, _InputIterator __last)
49312 : _M_t(_Compare(), allocator_type())
49313 { _M_t._M_insert_equal(__first, __last); }
49314 # 201 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3
49315 template <typename _InputIterator>
49316 multimap(_InputIterator __first, _InputIterator __last,
49317 const _Compare& __comp,
49318 const allocator_type& __a = allocator_type())
49319 : _M_t(__comp, __a)
49320 { _M_t._M_insert_equal(__first, __last); }
49321 # 224 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3
49322 multimap&
49323 operator=(const multimap& __x)
49324 {
49325 _M_t = __x._M_t;
49326 return *this;
49327 }
49328
49329
49330 allocator_type
49331 get_allocator() const
49332 { return _M_t.get_allocator(); }
49333
49334
49335
49336
49337
49338
49339
49340 iterator
49341 begin()
49342 { return _M_t.begin(); }
49343
49344
49345
49346
49347
49348
49349 const_iterator
49350 begin() const
49351 { return _M_t.begin(); }
49352
49353
49354
49355
49356
49357
49358 iterator
49359 end()
49360 { return _M_t.end(); }
49361
49362
49363
49364
49365
49366
49367 const_iterator
49368 end() const
49369 { return _M_t.end(); }
49370
49371
49372
49373
49374
49375
49376 reverse_iterator
49377 rbegin()
49378 { return _M_t.rbegin(); }
49379
49380
49381
49382
49383
49384
49385 const_reverse_iterator
49386 rbegin() const
49387 { return _M_t.rbegin(); }
49388
49389
49390
49391
49392
49393
49394 reverse_iterator
49395 rend()
49396 { return _M_t.rend(); }
49397
49398
49399
49400
49401
49402
49403 const_reverse_iterator
49404 rend() const
49405 { return _M_t.rend(); }
49406
49407
49408
49409 bool
49410 empty() const
49411 { return _M_t.empty(); }
49412
49413
49414 size_type
49415 size() const
49416 { return _M_t.size(); }
49417
49418
49419 size_type
49420 max_size() const
49421 { return _M_t.max_size(); }
49422 # 338 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3
49423 iterator
49424 insert(const value_type& __x)
49425 { return _M_t._M_insert_equal(__x); }
49426 # 362 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3
49427 iterator
49428 insert(iterator __position, const value_type& __x)
49429 { return _M_t._M_insert_equal(__position, __x); }
49430 # 374 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3
49431 template <typename _InputIterator>
49432 void
49433 insert(_InputIterator __first, _InputIterator __last)
49434 { _M_t._M_insert_equal(__first, __last); }
49435 # 389 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3
49436 void
49437 erase(iterator __position)
49438 { _M_t.erase(__position); }
49439 # 404 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3
49440 size_type
49441 erase(const key_type& __x)
49442 { return _M_t.erase(__x); }
49443 # 419 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3
49444 void
49445 erase(iterator __first, iterator __last)
49446 { _M_t.erase(__first, __last); }
49447 # 434 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3
49448 void
49449 swap(multimap& __x)
49450 { _M_t.swap(__x._M_t); }
49451
49452
49453
49454
49455
49456
49457
49458 void
49459 clear()
49460 { _M_t.clear(); }
49461
49462
49463
49464
49465
49466
49467 key_compare
49468 key_comp() const
49469 { return _M_t.key_comp(); }
49470
49471
49472
49473
49474
49475 value_compare
49476 value_comp() const
49477 { return value_compare(_M_t.key_comp()); }
49478 # 477 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3
49479 iterator
49480 find(const key_type& __x)
49481 { return _M_t.find(__x); }
49482 # 492 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3
49483 const_iterator
49484 find(const key_type& __x) const
49485 { return _M_t.find(__x); }
49486
49487
49488
49489
49490
49491
49492 size_type
49493 count(const key_type& __x) const
49494 { return _M_t.count(__x); }
49495 # 516 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3
49496 iterator
49497 lower_bound(const key_type& __x)
49498 { return _M_t.lower_bound(__x); }
49499 # 531 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3
49500 const_iterator
49501 lower_bound(const key_type& __x) const
49502 { return _M_t.lower_bound(__x); }
49503
49504
49505
49506
49507
49508
49509
49510 iterator
49511 upper_bound(const key_type& __x)
49512 { return _M_t.upper_bound(__x); }
49513
49514
49515
49516
49517
49518
49519
49520 const_iterator
49521 upper_bound(const key_type& __x) const
49522 { return _M_t.upper_bound(__x); }
49523 # 568 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3
49524 std::pair<iterator, iterator>
49525 equal_range(const key_type& __x)
49526 { return _M_t.equal_range(__x); }
49527 # 585 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3
49528 std::pair<const_iterator, const_iterator>
49529 equal_range(const key_type& __x) const
49530 { return _M_t.equal_range(__x); }
49531
49532 template <typename _K1, typename _T1, typename _C1, typename _A1>
49533 friend bool
49534 operator== (const multimap<_K1, _T1, _C1, _A1>&,
49535 const multimap<_K1, _T1, _C1, _A1>&);
49536
49537 template <typename _K1, typename _T1, typename _C1, typename _A1>
49538 friend bool
49539 operator< (const multimap<_K1, _T1, _C1, _A1>&,
49540 const multimap<_K1, _T1, _C1, _A1>&);
49541 };
49542 # 610 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3
49543 template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
49544 inline bool
49545 operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
49546 const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
49547 { return __x._M_t == __y._M_t; }
49548 # 627 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3
49549 template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
49550 inline bool
49551 operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
49552 const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
49553 { return __x._M_t < __y._M_t; }
49554
49555
49556 template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
49557 inline bool
49558 operator!=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
49559 const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
49560 { return !(__x == __y); }
49561
49562
49563 template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
49564 inline bool
49565 operator>(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
49566 const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
49567 { return __y < __x; }
49568
49569
49570 template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
49571 inline bool
49572 operator<=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
49573 const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
49574 { return !(__y < __x); }
49575
49576
49577 template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
49578 inline bool
49579 operator>=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
49580 const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
49581 { return !(__x < __y); }
49582
49583
49584 template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
49585 inline void
49586 swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x,
49587 multimap<_Key, _Tp, _Compare, _Alloc>& __y)
49588 { __x.swap(__y); }
49589
49590 }
49591 # 68 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/map" 2 3
49592 # 27 "../include/vigra/cachedfileimage.hxx" 2
49593 # 46 "../include/vigra/cachedfileimage.hxx"
49594 # 1 "/usr/include/boost/pool/pool.hpp" 1 3 4
49595 # 15 "/usr/include/boost/pool/pool.hpp" 3 4
49596 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/functional" 1 3 4
49597 # 51 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/functional" 3 4
49598
49599 # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/functional" 3
49600 # 16 "/usr/include/boost/pool/pool.hpp" 2 3 4
49601 # 27 "/usr/include/boost/pool/pool.hpp" 3 4
49602 # 1 "/usr/include/boost/pool/poolfwd.hpp" 1 3 4
49603 # 18 "/usr/include/boost/pool/poolfwd.hpp" 3 4
49604 # 1 "/usr/include/boost/pool/detail/mutex.hpp" 1 3 4
49605 # 53 "/usr/include/boost/pool/detail/mutex.hpp" 3 4
49606 namespace boost {
49607
49608 namespace details {
49609 namespace pool {
49610 # 88 "/usr/include/boost/pool/detail/mutex.hpp" 3 4
49611 class pthread_mutex
49612 {
49613 private:
49614 pthread_mutex_t mtx;
49615
49616 pthread_mutex(const pthread_mutex &);
49617 void operator=(const pthread_mutex &);
49618
49619 public:
49620 pthread_mutex()
49621 { pthread_mutex_init(&mtx, 0); }
49622
49623 ~pthread_mutex()
49624 { pthread_mutex_destroy(&mtx); }
49625
49626 void lock()
49627 { pthread_mutex_lock(&mtx); }
49628
49629 void unlock()
49630 { pthread_mutex_unlock(&mtx); }
49631 };
49632
49633
49634
49635
49636
49637 class null_mutex
49638 {
49639 private:
49640 null_mutex(const null_mutex &);
49641 void operator=(const null_mutex &);
49642
49643 public:
49644 null_mutex() { }
49645
49646 static void lock() { }
49647 static void unlock() { }
49648 };
49649
49650
49651
49652
49653
49654
49655 typedef pthread_mutex default_mutex;
49656
49657
49658 }
49659 }
49660
49661 }
49662 # 19 "/usr/include/boost/pool/poolfwd.hpp" 2 3 4
49663
49664 namespace boost {
49665
49666
49667
49668
49669 template <typename SizeType = std::size_t>
49670 class simple_segregated_storage;
49671
49672
49673
49674
49675 struct default_user_allocator_new_delete;
49676 struct default_user_allocator_malloc_free;
49677
49678 template <typename UserAllocator = default_user_allocator_new_delete>
49679 class pool;
49680
49681
49682
49683
49684 template <typename T, typename UserAllocator = default_user_allocator_new_delete>
49685 class object_pool;
49686
49687
49688
49689
49690 template <typename Tag, unsigned RequestedSize,
49691 typename UserAllocator = default_user_allocator_new_delete,
49692 typename Mutex = details::pool::default_mutex,
49693 unsigned NextSize = 32>
49694 struct singleton_pool;
49695
49696
49697
49698
49699 struct pool_allocator_tag;
49700
49701 template <typename T,
49702 typename UserAllocator = default_user_allocator_new_delete,
49703 typename Mutex = details::pool::default_mutex,
49704 unsigned NextSize = 32>
49705 class pool_allocator;
49706
49707 struct fast_pool_allocator_tag;
49708
49709 template <typename T,
49710 typename UserAllocator = default_user_allocator_new_delete,
49711 typename Mutex = details::pool::default_mutex,
49712 unsigned NextSize = 32>
49713 class fast_pool_allocator;
49714
49715 }
49716 # 28 "/usr/include/boost/pool/pool.hpp" 2 3 4
49717
49718
49719 # 1 "/usr/include/boost/pool/detail/ct_gcd_lcm.hpp" 1 3 4
49720 # 13 "/usr/include/boost/pool/detail/ct_gcd_lcm.hpp" 3 4
49721 # 1 "/usr/include/boost/type_traits/ice.hpp" 1 3 4
49722 # 14 "/usr/include/boost/type_traits/ice.hpp" 3 4
49723 # 1 "/usr/include/boost/type_traits/detail/yes_no_type.hpp" 1 3 4
49724 # 14 "/usr/include/boost/type_traits/detail/yes_no_type.hpp" 3 4
49725 namespace boost {
49726 namespace type_traits {
49727
49728 typedef char yes_type;
49729 struct no_type
49730 {
49731 char padding[8];
49732 };
49733
49734 }
49735 }
49736 # 15 "/usr/include/boost/type_traits/ice.hpp" 2 3 4
49737 # 1 "/usr/include/boost/type_traits/detail/ice_or.hpp" 1 3 4
49738 # 13 "/usr/include/boost/type_traits/detail/ice_or.hpp" 3 4
49739 namespace boost {
49740 namespace type_traits {
49741
49742 template <bool b1, bool b2, bool b3 = false, bool b4 = false, bool b5 = false, bool b6 = false, bool b7 = false>
49743 struct ice_or;
49744
49745 template <bool b1, bool b2, bool b3, bool b4, bool b5, bool b6, bool b7>
49746 struct ice_or
49747 {
49748 static const bool value = true;
49749 };
49750
49751 template <>
49752 struct ice_or<false, false, false, false, false, false, false>
49753 {
49754 static const bool value = false;
49755 };
49756
49757 }
49758 }
49759 # 16 "/usr/include/boost/type_traits/ice.hpp" 2 3 4
49760 # 1 "/usr/include/boost/type_traits/detail/ice_and.hpp" 1 3 4
49761 # 14 "/usr/include/boost/type_traits/detail/ice_and.hpp" 3 4
49762 namespace boost {
49763 namespace type_traits {
49764
49765 template <bool b1, bool b2, bool b3 = true, bool b4 = true, bool b5 = true, bool b6 = true, bool b7 = true>
49766 struct ice_and;
49767
49768 template <bool b1, bool b2, bool b3, bool b4, bool b5, bool b6, bool b7>
49769 struct ice_and
49770 {
49771 static const bool value = false;
49772 };
49773
49774 template <>
49775 struct ice_and<true, true, true, true, true, true, true>
49776 {
49777 static const bool value = true;
49778 };
49779
49780 }
49781 }
49782 # 17 "/usr/include/boost/type_traits/ice.hpp" 2 3 4
49783 # 1 "/usr/include/boost/type_traits/detail/ice_not.hpp" 1 3 4
49784 # 13 "/usr/include/boost/type_traits/detail/ice_not.hpp" 3 4
49785 namespace boost {
49786 namespace type_traits {
49787
49788 template <bool b>
49789 struct ice_not
49790 {
49791 static const bool value = true;
49792 };
49793
49794 template <>
49795 struct ice_not<true>
49796 {
49797 static const bool value = false;
49798 };
49799
49800 }
49801 }
49802 # 18 "/usr/include/boost/type_traits/ice.hpp" 2 3 4
49803 # 1 "/usr/include/boost/type_traits/detail/ice_eq.hpp" 1 3 4
49804 # 13 "/usr/include/boost/type_traits/detail/ice_eq.hpp" 3 4
49805 namespace boost {
49806 namespace type_traits {
49807
49808 template <int b1, int b2>
49809 struct ice_eq
49810 {
49811 static const bool value = (b1 == b2);
49812 };
49813
49814 template <int b1, int b2>
49815 struct ice_ne
49816 {
49817 static const bool value = (b1 != b2);
49818 };
49819
49820
49821 template <int b1, int b2> bool const ice_eq<b1,b2>::value;
49822 template <int b1, int b2> bool const ice_ne<b1,b2>::value;
49823
49824
49825 }
49826 }
49827 # 19 "/usr/include/boost/type_traits/ice.hpp" 2 3 4
49828 # 14 "/usr/include/boost/pool/detail/ct_gcd_lcm.hpp" 2 3 4
49829
49830 namespace boost {
49831
49832 namespace details {
49833 namespace pool {
49834 # 31 "/usr/include/boost/pool/detail/ct_gcd_lcm.hpp" 3 4
49835 namespace details {
49836 template <unsigned A, unsigned B, bool Bis0>
49837 struct ct_gcd_helper;
49838 template <unsigned A, unsigned B>
49839 struct ct_gcd_helper<A, B, false>
49840 {
49841 static const unsigned A_mod_B_ = A % B;
49842 static const unsigned value = (::boost::details::pool::details::ct_gcd_helper< B, static_cast<unsigned>(A_mod_B_), ::boost::type_traits::ice_eq<A_mod_B_, 0>::value >::value);
49843
49844
49845
49846
49847 };
49848 template <unsigned A, unsigned B>
49849 struct ct_gcd_helper<A, B, true>
49850 {
49851 static const unsigned value = A;
49852 };
49853 }
49854
49855 template <unsigned A, unsigned B>
49856 struct ct_gcd
49857 {
49858 typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( A != 0 && B != 0 ) >)> boost_static_assert_typedef_54;
49859 static const unsigned value = (::boost::details::pool::details::ct_gcd_helper<A, B, false>::value);
49860
49861 };
49862 # 92 "/usr/include/boost/pool/detail/ct_gcd_lcm.hpp" 3 4
49863 template <unsigned A, unsigned B>
49864 struct ct_lcm
49865 {
49866 static const unsigned value = (A / ::boost::details::pool::ct_gcd<A, B>::value * B);
49867
49868 };
49869
49870 }
49871 }
49872
49873 }
49874 # 31 "/usr/include/boost/pool/pool.hpp" 2 3 4
49875
49876 # 1 "/usr/include/boost/pool/detail/gcd_lcm.hpp" 1 3 4
49877 # 12 "/usr/include/boost/pool/detail/gcd_lcm.hpp" 3 4
49878 namespace boost {
49879
49880 namespace details {
49881 namespace pool {
49882 # 25 "/usr/include/boost/pool/detail/gcd_lcm.hpp" 3 4
49883 template <typename Integer>
49884 Integer gcd(Integer A, Integer B)
49885 {
49886 do
49887 {
49888 const Integer tmp(B);
49889 B = A % B;
49890 A = tmp;
49891 } while (B != 0);
49892
49893 return A;
49894 }
49895
49896
49897
49898
49899
49900
49901
49902 template <typename Integer>
49903 Integer lcm(const Integer & A, const Integer & B)
49904 {
49905 Integer ret = A;
49906 ret /= gcd(A, B);
49907 ret *= B;
49908 return ret;
49909 }
49910
49911 }
49912 }
49913
49914 }
49915 # 33 "/usr/include/boost/pool/pool.hpp" 2 3 4
49916
49917 # 1 "/usr/include/boost/pool/simple_segregated_storage.hpp" 1 3 4
49918 # 17 "/usr/include/boost/pool/simple_segregated_storage.hpp" 3 4
49919 namespace boost {
49920
49921 template <typename SizeType>
49922 class simple_segregated_storage
49923 {
49924 public:
49925 typedef SizeType size_type;
49926
49927 private:
49928 simple_segregated_storage(const simple_segregated_storage &);
49929 void operator=(const simple_segregated_storage &);
49930
49931
49932
49933 static void * try_malloc_n(void * & start, size_type n,
49934 size_type partition_size);
49935
49936 protected:
49937 void * first;
49938
49939
49940
49941
49942
49943
49944 void * find_prev(void * ptr);
49945
49946
49947 static void * & nextof(void * const ptr)
49948 { return *(static_cast<void **>(ptr)); }
49949
49950 public:
49951
49952 simple_segregated_storage()
49953 :first(0) { }
49954 # 61 "/usr/include/boost/pool/simple_segregated_storage.hpp" 3 4
49955 static void * segregate(void * block,
49956 size_type nsz, size_type npartition_sz,
49957 void * end = 0);
49958
49959
49960
49961 void add_block(void * const block,
49962 const size_type nsz, const size_type npartition_sz)
49963 {
49964
49965
49966 first = segregate(block, nsz, npartition_sz, first);
49967 }
49968
49969
49970
49971 void add_ordered_block(void * const block,
49972 const size_type nsz, const size_type npartition_sz)
49973 {
49974
49975
49976
49977
49978
49979 void * const loc = find_prev(block);
49980
49981
49982 if (loc == 0)
49983 add_block(block, nsz, npartition_sz);
49984 else
49985 nextof(loc) = segregate(block, nsz, npartition_sz, nextof(loc));
49986 }
49987
49988
49989
49990 bool empty() const { return (first == 0); }
49991
49992
49993 void * malloc()
49994 {
49995 void * const ret = first;
49996
49997
49998 first = nextof(first);
49999 return ret;
50000 }
50001
50002
50003
50004
50005 void free(void * const chunk)
50006 {
50007 nextof(chunk) = first;
50008 first = chunk;
50009 }
50010
50011
50012
50013
50014 void ordered_free(void * const chunk)
50015 {
50016
50017
50018
50019
50020 void * const loc = find_prev(chunk);
50021
50022
50023 if (loc == 0)
50024 free(chunk);
50025 else
50026 {
50027 nextof(chunk) = nextof(loc);
50028 nextof(loc) = chunk;
50029 }
50030 }
50031
50032
50033
50034 void * malloc_n(size_type n, size_type partition_size);
50035
50036
50037
50038
50039
50040
50041 void free_n(void * const chunks, const size_type n,
50042 const size_type partition_size)
50043 {
50044 add_block(chunks, n * partition_size, partition_size);
50045 }
50046
50047
50048
50049
50050 void ordered_free_n(void * const chunks, const size_type n,
50051 const size_type partition_size)
50052 {
50053 add_ordered_block(chunks, n * partition_size, partition_size);
50054 }
50055 };
50056
50057 template <typename SizeType>
50058 void * simple_segregated_storage<SizeType>::find_prev(void * const ptr)
50059 {
50060
50061 if (first == 0 || std::greater<void *>()(first, ptr))
50062 return 0;
50063
50064 void * iter = first;
50065 while (true)
50066 {
50067
50068
50069 if (nextof(iter) == 0 || std::greater<void *>()(nextof(iter), ptr))
50070 return iter;
50071
50072 iter = nextof(iter);
50073 }
50074 }
50075
50076 template <typename SizeType>
50077 void * simple_segregated_storage<SizeType>::segregate(
50078 void * const block,
50079 const size_type sz,
50080 const size_type partition_sz,
50081 void * const end)
50082 {
50083
50084
50085
50086
50087 char * old = static_cast<char *>(block)
50088 + ((sz - partition_sz) / partition_sz) * partition_sz;
50089
50090
50091 nextof(old) = end;
50092
50093
50094
50095 if (old == block)
50096 return block;
50097
50098
50099 for (char * iter = old - partition_sz; iter != block;
50100 old = iter, iter -= partition_sz)
50101 nextof(iter) = old;
50102
50103
50104 nextof(block) = old;
50105
50106 return block;
50107 }
50108 # 227 "/usr/include/boost/pool/simple_segregated_storage.hpp" 3 4
50109 template <typename SizeType>
50110 void * simple_segregated_storage<SizeType>::try_malloc_n(
50111 void * & start, size_type n, const size_type partition_size)
50112 {
50113 void * iter = nextof(start);
50114 while (--n != 0)
50115 {
50116 void * next = nextof(iter);
50117 if (next != static_cast<char *>(iter) + partition_size)
50118 {
50119
50120 start = iter;
50121 return 0;
50122 }
50123 iter = next;
50124 }
50125 return iter;
50126 }
50127
50128 template <typename SizeType>
50129 void * simple_segregated_storage<SizeType>::malloc_n(const size_type n,
50130 const size_type partition_size)
50131 {
50132 void * start = &first;
50133 void * iter;
50134 do
50135 {
50136 if (nextof(start) == 0)
50137 return 0;
50138 iter = try_malloc_n(start, n, partition_size);
50139 } while (iter == 0);
50140 void * const ret = nextof(start);
50141 nextof(start) = nextof(iter);
50142 return ret;
50143 }
50144
50145 }
50146 # 35 "/usr/include/boost/pool/pool.hpp" 2 3 4
50147 # 47 "/usr/include/boost/pool/pool.hpp" 3 4
50148 namespace boost {
50149
50150 struct default_user_allocator_new_delete
50151 {
50152 typedef std::size_t size_type;
50153 typedef std::ptrdiff_t difference_type;
50154
50155 static char * malloc(const size_type bytes)
50156 { return new (std::nothrow) char[bytes]; }
50157 static void free(char * const block)
50158 { delete [] block; }
50159 };
50160
50161 struct default_user_allocator_malloc_free
50162 {
50163 typedef std::size_t size_type;
50164 typedef std::ptrdiff_t difference_type;
50165
50166 static char * malloc(const size_type bytes)
50167 { return reinterpret_cast<char *>(std::malloc(bytes)); }
50168 static void free(char * const block)
50169 { std::free(block); }
50170 };
50171
50172 namespace details {
50173
50174
50175
50176
50177
50178
50179
50180 template <typename SizeType>
50181 class PODptr
50182 {
50183 public:
50184 typedef SizeType size_type;
50185
50186 private:
50187 char * ptr;
50188 size_type sz;
50189
50190 char * ptr_next_size() const
50191 { return (ptr + sz - sizeof(size_type)); }
50192 char * ptr_next_ptr() const
50193 {
50194 return (ptr_next_size() -
50195 pool::ct_lcm<sizeof(size_type), sizeof(void *)>::value);
50196 }
50197
50198 public:
50199 PODptr(char * const nptr, const size_type nsize)
50200 :ptr(nptr), sz(nsize) { }
50201 PODptr()
50202 :ptr(0), sz(0) { }
50203
50204 bool valid() const { return (begin() != 0); }
50205 void invalidate() { begin() = 0; }
50206 char * & begin() { return ptr; }
50207 char * begin() const { return ptr; }
50208 char * end() const { return ptr_next_ptr(); }
50209 size_type total_size() const { return sz; }
50210 size_type element_size() const
50211 {
50212 return (sz - sizeof(size_type) -
50213 pool::ct_lcm<sizeof(size_type), sizeof(void *)>::value);
50214 }
50215
50216 size_type & next_size() const
50217 { return *(reinterpret_cast<size_type *>(ptr_next_size())); }
50218 char * & next_ptr() const
50219 { return *(reinterpret_cast<char **>(ptr_next_ptr())); }
50220
50221 PODptr next() const
50222 { return PODptr<size_type>(next_ptr(), next_size()); }
50223 void next(const PODptr & arg) const
50224 {
50225 next_ptr() = arg.begin();
50226 next_size() = arg.total_size();
50227 }
50228 };
50229
50230 }
50231
50232 template <typename UserAllocator>
50233 class pool: protected simple_segregated_storage<
50234 typename UserAllocator::size_type>
50235 {
50236 public:
50237 typedef UserAllocator user_allocator;
50238 typedef typename UserAllocator::size_type size_type;
50239 typedef typename UserAllocator::difference_type difference_type;
50240
50241 private:
50242 static const unsigned min_alloc_size = (::boost::details::pool::ct_lcm<sizeof(void *), sizeof(size_type)>::value);
50243
50244
50245
50246
50247 void * malloc_need_resize();
50248 void * ordered_malloc_need_resize();
50249
50250 protected:
50251 details::PODptr<size_type> list;
50252
50253 simple_segregated_storage<size_type> & store() { return *this; }
50254 const simple_segregated_storage<size_type> & store() const { return *this; }
50255 const size_type requested_size;
50256 size_type next_size;
50257
50258
50259 details::PODptr<size_type> find_POD(void * const chunk) const;
50260
50261
50262 static bool is_from(void * const chunk, char * const i,
50263 const size_type sizeof_i)
50264 {
50265 # 175 "/usr/include/boost/pool/pool.hpp" 3 4
50266 std::less_equal<void *> lt_eq;
50267 std::less<void *> lt;
50268 return (lt_eq(i, chunk) && lt(chunk, i + sizeof_i));
50269 }
50270
50271 size_type alloc_size() const
50272 {
50273 const unsigned min_size = min_alloc_size;
50274 return details::pool::lcm<size_type>(requested_size, min_size);
50275 }
50276
50277
50278 static void * & nextof(void * const ptr)
50279 { return *(static_cast<void **>(ptr)); }
50280
50281 public:
50282
50283
50284 explicit pool(const size_type nrequested_size,
50285 const size_type nnext_size = 32)
50286 :list(0, 0), requested_size(nrequested_size), next_size(nnext_size)
50287 { }
50288
50289 ~pool() { purge_memory(); }
50290
50291
50292
50293
50294 bool release_memory();
50295
50296
50297
50298 bool purge_memory();
50299
50300
50301 size_type get_next_size() const { return next_size; }
50302 void set_next_size(const size_type nnext_size) { next_size = nnext_size; }
50303
50304
50305
50306
50307
50308 void * malloc()
50309 {
50310
50311 if (!store().empty())
50312 return store().malloc();
50313 return malloc_need_resize();
50314 }
50315
50316 void * ordered_malloc()
50317 {
50318
50319 if (!store().empty())
50320 return store().malloc();
50321 return ordered_malloc_need_resize();
50322 }
50323
50324
50325
50326 void * ordered_malloc(size_type n);
50327
50328
50329
50330 void free(void * const chunk)
50331 { store().free(chunk); }
50332
50333
50334
50335 void ordered_free(void * const chunk)
50336 { store().ordered_free(chunk); }
50337
50338
50339
50340 void free(void * const chunks, const size_type n)
50341 {
50342 const size_type partition_size = alloc_size();
50343 const size_type total_req_size = n * requested_size;
50344 const size_type num_chunks = total_req_size / partition_size +
50345 ((total_req_size % partition_size) ? true : false);
50346
50347 store().free_n(chunks, num_chunks, partition_size);
50348 }
50349
50350
50351
50352 void ordered_free(void * const chunks, const size_type n)
50353 {
50354 const size_type partition_size = alloc_size();
50355 const size_type total_req_size = n * requested_size;
50356 const size_type num_chunks = total_req_size / partition_size +
50357 ((total_req_size % partition_size) ? true : false);
50358
50359 store().ordered_free_n(chunks, num_chunks, partition_size);
50360 }
50361
50362
50363 bool is_from(void * const chunk) const
50364 {
50365 return (find_POD(chunk).valid());
50366 }
50367 };
50368
50369 template <typename UserAllocator>
50370 bool pool<UserAllocator>::release_memory()
50371 {
50372
50373
50374 bool ret = false;
50375
50376
50377 details::PODptr<size_type> ptr = list;
50378 details::PODptr<size_type> prev;
50379
50380
50381
50382
50383
50384 void * free = this->first;
50385 void * prev_free = 0;
50386
50387 const size_type partition_size = alloc_size();
50388
50389
50390 while (ptr.valid())
50391 {
50392 # 316 "/usr/include/boost/pool/pool.hpp" 3 4
50393 if (free == 0)
50394 return ret;
50395
50396
50397
50398 bool all_chunks_free = true;
50399
50400
50401
50402 void * saved_free = free;
50403 for (char * i = ptr.begin(); i != ptr.end(); i += partition_size)
50404 {
50405
50406 if (i != free)
50407 {
50408
50409 all_chunks_free = false;
50410
50411
50412 free = saved_free;
50413
50414
50415 break;
50416 }
50417
50418
50419 free = nextof(free);
50420 }
50421
50422
50423
50424
50425 const details::PODptr<size_type> next = ptr.next();
50426
50427 if (!all_chunks_free)
50428 {
50429 if (is_from(free, ptr.begin(), ptr.element_size()))
50430 {
50431 std::less<void *> lt;
50432 void * const end = ptr.end();
50433 do
50434 {
50435 prev_free = free;
50436 free = nextof(free);
50437 } while (free && lt(free, end));
50438 }
50439 # 370 "/usr/include/boost/pool/pool.hpp" 3 4
50440 prev = ptr;
50441 }
50442 else
50443 {
50444
50445
50446
50447 if (prev.valid())
50448 prev.next(next);
50449 else
50450 list = next;
50451
50452
50453 if (prev_free != 0)
50454 nextof(prev_free) = free;
50455 else
50456 this->first = free;
50457
50458
50459 UserAllocator::free(ptr.begin());
50460 ret = true;
50461 }
50462
50463
50464 ptr = next;
50465 }
50466
50467 return ret;
50468 }
50469
50470 template <typename UserAllocator>
50471 bool pool<UserAllocator>::purge_memory()
50472 {
50473 details::PODptr<size_type> iter = list;
50474
50475 if (!iter.valid())
50476 return false;
50477
50478 do
50479 {
50480
50481 const details::PODptr<size_type> next = iter.next();
50482
50483
50484 UserAllocator::free(iter.begin());
50485
50486
50487 iter = next;
50488 } while (iter.valid());
50489
50490 list.invalidate();
50491 this->first = 0;
50492
50493 return true;
50494 }
50495
50496 template <typename UserAllocator>
50497 void * pool<UserAllocator>::malloc_need_resize()
50498 {
50499
50500 const size_type partition_size = alloc_size();
50501 const size_type POD_size = next_size * partition_size +
50502 details::pool::ct_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
50503 char * const ptr = UserAllocator::malloc(POD_size);
50504 if (ptr == 0)
50505 return 0;
50506 const details::PODptr<size_type> node(ptr, POD_size);
50507 next_size <<= 1;
50508
50509
50510 store().add_block(node.begin(), node.element_size(), partition_size);
50511
50512
50513 node.next(list);
50514 list = node;
50515
50516
50517 return store().malloc();
50518 }
50519
50520 template <typename UserAllocator>
50521 void * pool<UserAllocator>::ordered_malloc_need_resize()
50522 {
50523
50524 const size_type partition_size = alloc_size();
50525 const size_type POD_size = next_size * partition_size +
50526 details::pool::ct_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
50527 char * const ptr = UserAllocator::malloc(POD_size);
50528 if (ptr == 0)
50529 return 0;
50530 const details::PODptr<size_type> node(ptr, POD_size);
50531 next_size <<= 1;
50532
50533
50534
50535
50536
50537 store().add_block(node.begin(), node.element_size(), partition_size);
50538
50539
50540
50541 if (!list.valid() || std::greater<void *>()(list.begin(), node.begin()))
50542 {
50543 node.next(list);
50544 list = node;
50545 }
50546 else
50547 {
50548 details::PODptr<size_type> prev = list;
50549
50550 while (true)
50551 {
50552
50553
50554 if (prev.next_ptr() == 0
50555 || std::greater<void *>()(prev.next_ptr(), node.begin()))
50556 break;
50557
50558 prev = prev.next();
50559 }
50560
50561 node.next(prev.next());
50562 prev.next(node);
50563 }
50564
50565
50566 return store().malloc();
50567 }
50568
50569 template <typename UserAllocator>
50570 void * pool<UserAllocator>::ordered_malloc(const size_type n)
50571 {
50572 const size_type partition_size = alloc_size();
50573 const size_type total_req_size = n * requested_size;
50574 const size_type num_chunks = total_req_size / partition_size +
50575 ((total_req_size % partition_size) ? true : false);
50576
50577 void * ret = store().malloc_n(num_chunks, partition_size);
50578
50579 if (ret != 0)
50580 return ret;
50581
50582
50583 using std::max;
50584 next_size = max (next_size, num_chunks);
50585 const size_type POD_size = next_size * partition_size +
50586 details::pool::ct_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
50587 char * const ptr = UserAllocator::malloc(POD_size);
50588 if (ptr == 0)
50589 return 0;
50590 const details::PODptr<size_type> node(ptr, POD_size);
50591
50592
50593
50594
50595
50596 if (next_size > num_chunks)
50597 store().add_block(node.begin() + num_chunks * partition_size,
50598 node.element_size() - num_chunks * partition_size, partition_size);
50599
50600 next_size <<= 1;
50601
50602
50603
50604 if (!list.valid() || std::greater<void *>()(list.begin(), node.begin()))
50605 {
50606 node.next(list);
50607 list = node;
50608 }
50609 else
50610 {
50611 details::PODptr<size_type> prev = list;
50612
50613 while (true)
50614 {
50615
50616
50617 if (prev.next_ptr() == 0
50618 || std::greater<void *>()(prev.next_ptr(), node.begin()))
50619 break;
50620
50621 prev = prev.next();
50622 }
50623
50624 node.next(prev.next());
50625 prev.next(node);
50626 }
50627
50628
50629 return node.begin();
50630 }
50631
50632 template <typename UserAllocator>
50633 details::PODptr<typename pool<UserAllocator>::size_type>
50634 pool<UserAllocator>::find_POD(void * const chunk) const
50635 {
50636
50637 details::PODptr<size_type> iter = list;
50638 while (iter.valid())
50639 {
50640 if (is_from(chunk, iter.begin(), iter.element_size()))
50641 return iter;
50642 iter = iter.next();
50643 }
50644
50645 return iter;
50646 }
50647
50648 }
50649 # 47 "../include/vigra/cachedfileimage.hxx" 2
50650
50651 # 1 "../include/vigra/error.hxx" 1
50652 # 49 "../include/vigra/cachedfileimage.hxx" 2
50653 # 1 "../include/vigra/metaprogramming.hxx" 1
50654 # 50 "../include/vigra/cachedfileimage.hxx" 2
50655 # 1 "../include/vigra/utilities.hxx" 1
50656 # 51 "../include/vigra/cachedfileimage.hxx" 2
50657
50658 using std::cout;
50659 using std::endl;
50660 using std::list;
50661 using std::map;
50662 using std::min;
50663
50664
50665
50666
50667
50668 namespace vigra {
50669
50670
50671 class CachedFileImageBase {
50672 public:
50673 virtual ~CachedFileImageBase() { }
50674 virtual int numBlocksAllocated() const = 0;
50675 virtual int numBlocksNeeded() const = 0;
50676 virtual void swapOutBlock() const = 0;
50677 virtual void printBlockStats() const = 0;
50678 };
50679
50680
50681 template <class PIXELTYPE> class CachedFileImage;
50682
50683
50684
50685 class CachedFileImageDirector {
50686 public:
50687
50688 ~CachedFileImageDirector() {
50689 # 96 "../include/vigra/cachedfileimage.hxx"
50690 }
50691
50692
50693 static CachedFileImageDirector &v() {
50694 static CachedFileImageDirector instance;
50695 return instance;
50696 }
50697
50698
50699 void* allocateBlock() {
50700 void *block = pool->malloc();
50701
50702
50703
50704 pool->set_next_size(1);
50705 if (block == __null) throw std::bad_alloc();
50706 return block;
50707 }
50708
50709 void deallocateBlock(void* block) {
50710 if (block != __null) pool->free(block);
50711 }
50712
50713
50714 void setAllocation(long long bytes) {
50715
50716 vigra::throw_precondition_error((imageList.empty()), "CachedFileImageDirector: " "attempt to change allocation after images have already " "been created.");
50717
50718
50719 managedBytes = bytes;
50720
50721 managedBlocks = (int)ceil(managedBytes / (double)blocksize);
50722 blocksAvailable = managedBlocks;
50723
50724
50725 }
50726
50727
50728
50729 void setBlockSize(int bytes) {
50730
50731 vigra::throw_precondition_error((imageList.empty()), "CachedFileImageDirector: " "attempt to change block size after images have already " "been created.");
50732
50733
50734 blocksize = bytes;
50735 delete pool;
50736 pool = new boost::pool<>(blocksize);
50737
50738 managedBlocks = (int)ceil(managedBytes / (double)blocksize);
50739 blocksAvailable = managedBlocks;
50740
50741
50742 }
50743
50744
50745 int getBlockSize() {
50746 return blocksize;
50747 }
50748
50749 int getManagedBlocks() {
50750 return managedBlocks;
50751 }
50752
50753 int getBlocksAvailable() {
50754 return blocksAvailable;
50755 }
50756
50757
50758
50759 int requestBlocksForNewImage(int blocks, CachedFileImageBase const * image) {
50760
50761
50762 int blocksAllocated = 0;
50763 if (blocksAvailable > 0) {
50764 blocksAllocated = 1;
50765 blocksAvailable--;
50766 } else {
50767
50768
50769 blocksAvailable += freeBlock(image);
50770 if (blocksAvailable == 0) {
50771
50772 throw std::runtime_error("CachedFileImageDirector::requestBlocksForNewImage(): " "no blocks available and attempt to free blocks failed.");
50773
50774 }
50775 blocksAllocated = blocksAvailable;
50776 blocksAvailable = 0;
50777 }
50778
50779
50780
50781
50782 imageList.push_back(image);
50783
50784
50785 imageToMissMap[image] = 0LL;
50786 # 200 "../include/vigra/cachedfileimage.hxx"
50787 return blocksAllocated;
50788 }
50789
50790
50791 void returnBlocksUnregisterImage(int blocks, CachedFileImageBase const * image) {
50792 blocksAvailable += blocks;
50793 imageList.remove(image);
50794 # 215 "../include/vigra/cachedfileimage.hxx"
50795 }
50796
50797
50798
50799
50800 int registerCacheMiss(CachedFileImageBase const * image) {
50801 cacheMisses++;
50802 imageToMissMap[image]++;
50803
50804
50805 imageList.remove(image);
50806
50807 if (blocksAvailable == 0) {
50808
50809
50810
50811 blocksAvailable += freeBlock(image);
50812 }
50813
50814
50815
50816 imageList.push_back(image);
50817
50818 if (blocksAvailable > 0) {
50819
50820
50821 blocksAvailable--;
50822
50823
50824 return 1;
50825 } else {
50826
50827
50828 return 0;
50829 }
50830 }
50831
50832
50833 long long getCacheMisses() {
50834 return cacheMisses;
50835 }
50836
50837
50838 long long getCacheMisses(CachedFileImageBase const * image) {
50839 return imageToMissMap[image];
50840 }
50841
50842
50843 void resetCacheMisses() {
50844 cacheMisses = 0LL;
50845 map<CachedFileImageBase const *, long long>::iterator i;
50846 for (i = imageToMissMap.begin(); i != imageToMissMap.end(); i++) {
50847 (*i).second = 0LL;
50848 }
50849 }
50850
50851
50852 void printStats() {
50853 cout << "Summary: cache misses="
50854 << cacheMisses
50855 << " blocks managed="
50856 << managedBlocks
50857 << " allocated="
50858 << (managedBlocks - blocksAvailable)
50859 << " free="
50860 << blocksAvailable
50861 << endl;
50862 }
50863
50864
50865 void printStats(const char * imageName, const CachedFileImageBase * image) {
50866 cout << imageName << " " << image << ":"
50867 << " cache misses=" << imageToMissMap[image]
50868 << " blocks allocated=" << image->numBlocksAllocated()
50869 << " blocks required=" << image->numBlocksNeeded()
50870 << endl;
50871 }
50872
50873
50874
50875 void printStats(const char * imageName, const int imageNumber,
50876 const CachedFileImageBase * image) {
50877 cout << imageName << imageNumber << " " << image << ":"
50878 << " cache misses=" << imageToMissMap[image]
50879 << " blocks allocated=" << image->numBlocksAllocated()
50880 << " blocks required=" << image->numBlocksNeeded()
50881 << endl;
50882 }
50883
50884
50885 void printAllBlockStats() {
50886 list<CachedFileImageBase const *>::iterator i;
50887 for (i = imageList.begin(); i != imageList.end(); i++) {
50888 (*i)->printBlockStats();
50889 }
50890 }
50891
50892 protected:
50893
50894
50895 CachedFileImageDirector()
50896 : blocksize(2<<20),
50897 managedBytes(1LL<<30),
50898 cacheMisses(0),
50899 imageList(),
50900 imageToMissMap()
50901 {
50902
50903 managedBlocks = (int)ceil(managedBytes / (double)blocksize);
50904 blocksAvailable = managedBlocks;
50905 pool = new boost::pool<>(blocksize);
50906 }
50907
50908
50909
50910 int freeBlock(CachedFileImageBase const * image) {
50911
50912
50913 list<CachedFileImageBase const *>::iterator i;
50914 for (i = imageList.begin(); i != imageList.end(); i++) {
50915 CachedFileImageBase const * candidate = *i;
50916
50917
50918
50919
50920
50921
50922 if (candidate->numBlocksAllocated() > (1+image->numBlocksAllocated())) {
50923
50924
50925 candidate->swapOutBlock();
50926
50927 imageList.erase(i);
50928 imageList.push_back(candidate);
50929 return 1;
50930 }
50931 }
50932 # 366 "../include/vigra/cachedfileimage.hxx"
50933 return 0;
50934 }
50935
50936 int blocksize;
50937 long long managedBytes;
50938 int managedBlocks;
50939 int blocksAvailable;
50940 long long cacheMisses;
50941
50942
50943 boost::pool<> *pool;
50944
50945
50946
50947
50948 list<CachedFileImageBase const *> imageList;
50949
50950
50951 map<CachedFileImageBase const *, long long> imageToMissMap;
50952
50953 };
50954
50955
50956 template <class Iterator>
50957 class CachedFileSequentialAccessIteratorPolicy
50958 {
50959 public:
50960 typedef Iterator BaseType;
50961 typedef typename Iterator::value_type value_type;
50962 typedef typename Iterator::difference_type::MoveX difference_type;
50963 typedef typename Iterator::reference reference;
50964 typedef typename Iterator::index_reference index_reference;
50965 typedef typename Iterator::pointer pointer;
50966 typedef typename Iterator::iterator_category iterator_category;
50967
50968 static void initialize(BaseType & d) { }
50969
50970 static reference dereference(BaseType const & d) {
50971 return *d;
50972 }
50973
50974 static index_reference dereference(BaseType const & d, difference_type n) {
50975 int width = d.i->width();
50976 int dy = n / width;
50977 int dx = n % width;
50978 if (d.x() + dx >= width) {dy++; dx -= width;}
50979 else if (d.x() + dx < 0) {dy--; dx += width;}
50980 return d(dx, dy);
50981 }
50982
50983 static bool equal(BaseType const & d1, BaseType const & d2) {
50984 int width1 = d1.i->width();
50985 int width2 = d2.i->width();
50986 return (d1.y()*width1 + d1.x()) == (d2.y()*width2 + d2.x());
50987 }
50988
50989 static bool less(BaseType const & d1, BaseType const & d2) {
50990 int width1 = d1.i->width();
50991 int width2 = d2.i->width();
50992 return (d1.y()*width1 + d1.x()) < (d2.y()*width2 + d2.x());
50993 }
50994
50995 static difference_type difference(BaseType const & d1, BaseType const & d2) {
50996 int width1 = d1.i->width();
50997 int width2 = d2.i->width();
50998 return (d1.y()*width1 + d1.x()) - (d2.y()*width2 + d2.x());
50999 }
51000
51001 static void increment(BaseType & d) {
51002 ++d.x;
51003 if (d.x() == d.i->width()) {
51004 d.x = 0;
51005 ++d.y;
51006 }
51007 }
51008
51009 static void decrement(BaseType & d) {
51010 --d.x;
51011 if (d.x() < 0) {
51012 d.x = d.i->width() - 1;
51013 --d.y;
51014 }
51015 }
51016
51017 static void advance(BaseType & d, difference_type n) {
51018 int width = d.i->width();
51019 int dy = n / width;
51020 int dx = n % width;
51021 d.x += dx;
51022 d.y += dy;
51023 if (d.x() >= width) {++d.y; d.x -= width;}
51024 if (d.x() < 0) {--d.y; d.x += width;}
51025 }
51026
51027 };
51028
51029 namespace cfi_detail {
51030
51031 template <class StridedOrUnstrided, class T>
51032 class DirectionSelector;
51033
51034 template <class T>
51035 class DirectionSelector<UnstridedArrayTag, T>
51036 {
51037 public:
51038 DirectionSelector(T base=0) : current_(base) {}
51039 DirectionSelector(DirectionSelector const & rhs) : current_(rhs.current_) {}
51040
51041 DirectionSelector & operator=(DirectionSelector const & rhs) {
51042 current_ = rhs.current_;
51043 return *this;
51044 }
51045
51046 void operator++() { ++current_; }
51047 void operator++(int) { ++current_; }
51048 void operator--() { --current_; }
51049 void operator--(int) { --current_; }
51050 void operator+=(int dx) { current_ += dx; }
51051 void operator-=(int dx) { current_ -= dx; }
51052
51053 bool operator==(DirectionSelector const & rhs) const { return (current_ == rhs.current_); }
51054 bool operator!=(DirectionSelector const & rhs) const { return (current_ != rhs.current_); }
51055 bool operator<(DirectionSelector const & rhs) const { return (current_ < rhs.current_); }
51056 bool operator<=(DirectionSelector const & rhs) const { return (current_ <= rhs.current_); }
51057 bool operator>(DirectionSelector const & rhs) const { return (current_ > rhs.current_); }
51058 bool operator>=(DirectionSelector const & rhs) const { return (current_ >= rhs.current_); }
51059
51060 int operator-(DirectionSelector const & rhs) const { return (current_ - rhs.current_); }
51061
51062 T operator()() const { return current_; }
51063 T operator()(int d) const { return (current_ + d); }
51064
51065 T current_;
51066 };
51067
51068 template <class T>
51069 class DirectionSelector<StridedArrayTag, T> {
51070 public:
51071 DirectionSelector(int stride=1, T base=0) : stride_(stride), current_(base) {}
51072 DirectionSelector(DirectionSelector const & rhs) : stride_(rhs.stride_), current_(rhs.current_) {}
51073
51074 DirectionSelector & operator=(DirectionSelector const & rhs) {
51075 stride_ = rhs.stride_;
51076 current_ = rhs.current_;
51077 return *this;
51078 }
51079
51080 void operator++() { current_ += stride_; }
51081 void operator++(int) { current_ += stride_; }
51082 void operator--() { current_ -= stride_; }
51083 void operator--(int) { current_ -= stride_; }
51084 void operator+=(int dy) { current_ += dy*stride_; }
51085 void operator-=(int dy) { current_ -= dy*stride_; }
51086
51087 bool operator==(DirectionSelector const & rhs) const { return (current_ == rhs.current_); }
51088 bool operator!=(DirectionSelector const & rhs) const { return (current_ != rhs.current_); }
51089 bool operator<(DirectionSelector const & rhs) const { return (current_ < rhs.current_); }
51090 bool operator<=(DirectionSelector const & rhs) const { return (current_ <= rhs.current_); }
51091 bool operator>(DirectionSelector const & rhs) const { return (current_ > rhs.current_); }
51092 bool operator>=(DirectionSelector const & rhs) const { return (current_ >= rhs.current_); }
51093
51094 int operator-(DirectionSelector const & rhs) const { return (current_ - rhs.current_) / stride_; }
51095
51096 T operator()() const { return current_; }
51097 T operator()(int d) const { return current_ + d*stride_; }
51098
51099 int stride_;
51100 T current_;
51101 };
51102
51103 template <class StridedOrUnstrided, class T, class Notify>
51104 class NotifyingDirectionSelector;
51105
51106 template <class T, class Notify>
51107 class NotifyingDirectionSelector<UnstridedArrayTag, T, Notify>
51108 {
51109 public:
51110 NotifyingDirectionSelector(T base = 0) : current_(base), notify_(__null) {}
51111 NotifyingDirectionSelector(NotifyingDirectionSelector const & rhs) : current_(rhs.current_), notify_(__null) {}
51112
51113 NotifyingDirectionSelector & operator=(NotifyingDirectionSelector const & rhs) {
51114 current_ = rhs.current_;
51115 notify_ = __null;
51116 return *this;
51117 }
51118
51119 void setNotify(Notify *n) { notify_ = n; }
51120
51121 void operator++() { notify_->_notify(current_, current_+1); ++current_; }
51122 void operator++(int) { notify_->_notify(current_, current_+1); ++current_; }
51123 void operator--() { notify_->_notify(current_, current_-1); --current_; }
51124 void operator--(int) { notify_->_notify(current_, current_-1); --current_; }
51125 void operator+=(int dx) { notify_->_notify(current_, current_+dx); current_ += dx; }
51126 void operator-=(int dx) { notify_->_notify(current_, current_-dx); current_ -= dx; }
51127
51128 bool operator==(NotifyingDirectionSelector const & rhs) const { return (current_ == rhs.current_); }
51129 bool operator!=(NotifyingDirectionSelector const & rhs) const { return (current_ != rhs.current_); }
51130 bool operator<(NotifyingDirectionSelector const & rhs) const { return (current_ < rhs.current_); }
51131 bool operator<=(NotifyingDirectionSelector const & rhs) const { return (current_ <= rhs.current_); }
51132 bool operator>(NotifyingDirectionSelector const & rhs) const { return (current_ > rhs.current_); }
51133 bool operator>=(NotifyingDirectionSelector const & rhs) const { return (current_ >= rhs.current_); }
51134
51135 int operator-(NotifyingDirectionSelector const & rhs) const { return (current_ - rhs.current_); }
51136
51137 T operator()() const { return current_; }
51138 T operator()(int d) const { return (current_ + d); }
51139
51140 T current_;
51141
51142 private:
51143 Notify *notify_;
51144 };
51145
51146 template <class T, class Notify>
51147 class NotifyingDirectionSelector<StridedArrayTag, T, Notify> {
51148 public:
51149 NotifyingDirectionSelector(int stride = 1, T base = 0) : stride_(stride), current_(base), notify_(__null) {}
51150 NotifyingDirectionSelector(NotifyingDirectionSelector const & rhs) : stride_(rhs.stride_), current_(rhs.current_), notify_(__null) {}
51151
51152 NotifyingDirectionSelector & operator=(NotifyingDirectionSelector const & rhs) {
51153 stride_ = rhs.stride_;
51154 current_ = rhs.current_;
51155 notify_ = __null;
51156 return *this;
51157 }
51158
51159 void setNotify(Notify *n) { notify_ = n; }
51160
51161 void operator++() { notify_->_notify(current_, current_+stride_); current_ += stride_; }
51162 void operator++(int) { notify_->_notify(current_, current_+stride_); current_ += stride_; }
51163 void operator--() { notify_->_notify(current_, current_-stride_); current_ -= stride_; }
51164 void operator--(int) { notify_->_notify(current_, current_-stride_); current_ -= stride_; }
51165 void operator+=(int dy) { notify_->_notify(current_, current_+dy*stride_); current_ += dy*stride_; }
51166 void operator-=(int dy) { notify_->_notify(current_, current_-dy*stride_); current_ -= dy*stride_; }
51167
51168 bool operator==(NotifyingDirectionSelector const & rhs) const { return (current_ == rhs.current_); }
51169 bool operator!=(NotifyingDirectionSelector const & rhs) const { return (current_ != rhs.current_); }
51170 bool operator<(NotifyingDirectionSelector const & rhs) const { return (current_ < rhs.current_); }
51171 bool operator<=(NotifyingDirectionSelector const & rhs) const { return (current_ <= rhs.current_); }
51172 bool operator>(NotifyingDirectionSelector const & rhs) const { return (current_ > rhs.current_); }
51173 bool operator>=(NotifyingDirectionSelector const & rhs) const { return (current_ >= rhs.current_); }
51174
51175 int operator-(NotifyingDirectionSelector const & rhs) const { return (current_ - rhs.current_) / stride_; }
51176
51177 T operator()() const { return current_; }
51178 T operator()(int d) const { return current_ + d*stride_; }
51179
51180 int stride_;
51181 T current_;
51182
51183 private:
51184 Notify *notify_;
51185
51186 };
51187
51188 }
51189
51190
51191 template <class IMAGEITERATOR, class IMAGETYPE, class PIXELTYPE, class REFERENCE, class POINTER,
51192 class StridedOrUnstrided=UnstridedArrayTag>
51193 class CachedFileImageIteratorBase
51194 {
51195 public:
51196 typedef CachedFileImageIteratorBase<IMAGEITERATOR,
51197 IMAGETYPE, PIXELTYPE, REFERENCE, POINTER, StridedOrUnstrided> self_type;
51198 typedef IMAGETYPE image_type;
51199 typedef PIXELTYPE value_type;
51200 typedef PIXELTYPE PixelType;
51201 typedef REFERENCE reference;
51202 typedef REFERENCE index_reference;
51203 typedef POINTER pointer;
51204 typedef Diff2D difference_type;
51205 typedef image_traverser_tag iterator_category;
51206 typedef RowIterator<IMAGEITERATOR> row_iterator;
51207 typedef ColumnIterator<IMAGEITERATOR> column_iterator;
51208 typedef typename cfi_detail::DirectionSelector<StridedOrUnstrided, int> MoveX;
51209 friend class cfi_detail::DirectionSelector<StridedOrUnstrided, int>;
51210 typedef typename cfi_detail::NotifyingDirectionSelector<StridedOrUnstrided, int, self_type> MoveY;
51211 friend class cfi_detail::NotifyingDirectionSelector<StridedOrUnstrided, int, self_type>;
51212 friend class CachedFileSequentialAccessIteratorPolicy<IMAGEITERATOR>;
51213
51214 MoveX x;
51215 MoveY y;
51216
51217 IMAGEITERATOR & operator+=(difference_type const & s) {
51218 x += s.x;
51219 y += s.y;
51220 return static_cast<IMAGEITERATOR &>(*this);
51221 }
51222
51223 IMAGEITERATOR & operator-=(difference_type const & s) {
51224 x -= s.x;
51225 y -= s.y;
51226 return static_cast<IMAGEITERATOR &>(*this);
51227 }
51228
51229 IMAGEITERATOR operator+(difference_type const & s) const {
51230 IMAGEITERATOR ret(static_cast<IMAGEITERATOR const &>(*this));
51231 ret += s;
51232 return ret;
51233 }
51234
51235 IMAGEITERATOR operator-(difference_type const & s) const {
51236 IMAGEITERATOR ret(static_cast<IMAGEITERATOR const &>(*this));
51237 ret -= s;
51238 return ret;
51239 }
51240
51241 difference_type operator-(CachedFileImageIteratorBase const & rhs) const {
51242 return difference_type(x-rhs.x, y-rhs.y);
51243 }
51244
51245 bool operator==(CachedFileImageIteratorBase const & rhs) const {
51246 return (x == rhs.x) && (y == rhs.y);
51247 }
51248
51249 bool operator!=(CachedFileImageIteratorBase const & rhs) const {
51250 return (x != rhs.x) || (y != rhs.y);
51251 }
51252
51253 reference operator*() const {
51254
51255 return currentRow[x()];
51256
51257 }
51258
51259
51260 pointer operator->() const {
51261
51262 return (*i)[y()] + x();
51263 }
51264
51265 index_reference operator[](difference_type const & d) const {
51266 if (d.y == 0) {
51267 return currentRow[x()+d.x];
51268 } else {
51269 return (*i)(x()+d.x, y()+d.y);
51270 }
51271 }
51272
51273 index_reference operator()(int dx, int dy) const {
51274 if (dy == 0) {
51275 return currentRow[x()+dx];
51276 } else {
51277 return (*i)(x()+dx, y()+dy);
51278 }
51279 }
51280
51281
51282 pointer operator[](int dy) const {
51283
51284 return (*i)[y() + dy] + x();
51285 }
51286
51287 row_iterator rowIterator() const {
51288 return row_iterator(static_cast<IMAGEITERATOR const &>(*this));
51289 }
51290
51291 column_iterator columnIterator() const {
51292 return column_iterator(static_cast<IMAGEITERATOR const &>(*this));
51293 }
51294
51295 protected:
51296
51297 CachedFileImageIteratorBase(const int X, const int Y, image_type * const I) : x(X), y(Y), i(I), currentRow(__null) {
51298 y.setNotify(this);
51299 _notify(y());
51300 }
51301
51302
51303 CachedFileImageIteratorBase(const int X, const int Y, image_type * const I, int xstride, int ystride) : x(xstride, X), y(ystride, Y), i(I), currentRow(__null) {
51304 y.setNotify(this);
51305 _notify(y());
51306 }
51307
51308 CachedFileImageIteratorBase(const CachedFileImageIteratorBase &r) : x(r.x), y(r.y), i(r.i), currentRow(__null) {
51309 y.setNotify(this);
51310 _notify(y());
51311 }
51312
51313 CachedFileImageIteratorBase& operator=(const CachedFileImageIteratorBase &r) {
51314 x = r.x;
51315 y = r.y;
51316 i = r.i;
51317 currentRow = __null;
51318 y.setNotify(this);
51319 _notify(y());
51320 return *this;
51321 }
51322
51323 void _notify(int initialY) {
51324
51325 if (i) currentRow = (*i)[initialY];
51326
51327 }
51328
51329 void _notify(int oldY, int newY) {
51330
51331 if (i) currentRow = (*i)[newY];
51332
51333 }
51334
51335 image_type *i;
51336 pointer currentRow;
51337
51338 };
51339
51340
51341 template <class PIXELTYPE>
51342 class StridedCachedFileImageIterator;
51343
51344 template <class PIXELTYPE>
51345 class ConstStridedCachedFileImageIterator;
51346
51347
51348 template <class PIXELTYPE>
51349 class CachedFileImageIterator
51350 : public CachedFileImageIteratorBase<CachedFileImageIterator<PIXELTYPE>,
51351 CachedFileImage<PIXELTYPE>,
51352 PIXELTYPE, PIXELTYPE &, PIXELTYPE *>
51353
51354
51355 {
51356 public:
51357
51358 typedef CachedFileImageIteratorBase<CachedFileImageIterator,
51359 CachedFileImage<PIXELTYPE>,
51360 PIXELTYPE, PIXELTYPE &, PIXELTYPE *> Base;
51361
51362 CachedFileImageIterator(const int x = 0,
51363 const int y = 0,
51364 CachedFileImage<PIXELTYPE> * const i = __null)
51365 : Base(x, y, i)
51366 {}
51367
51368 friend class StridedCachedFileImageIterator<PIXELTYPE>;
51369 friend class ConstStridedCachedFileImageIterator<PIXELTYPE>;
51370 };
51371
51372
51373 template <class PIXELTYPE>
51374 class ConstCachedFileImageIterator
51375 : public CachedFileImageIteratorBase<ConstCachedFileImageIterator<PIXELTYPE>,
51376 const CachedFileImage<PIXELTYPE>,
51377 PIXELTYPE, PIXELTYPE const &, PIXELTYPE const *>
51378
51379
51380 {
51381 public:
51382
51383 typedef CachedFileImageIteratorBase<ConstCachedFileImageIterator,
51384 const CachedFileImage<PIXELTYPE>,
51385 PIXELTYPE, PIXELTYPE const &, PIXELTYPE const *> Base;
51386
51387
51388 ConstCachedFileImageIterator(const int x = 0,
51389 const int y = 0,
51390 const CachedFileImage<PIXELTYPE> * const i = __null)
51391 : Base(x, y, i)
51392 {}
51393 # 852 "../include/vigra/cachedfileimage.hxx"
51394 friend class ConstStridedCachedFileImageIterator<PIXELTYPE>;
51395 };
51396
51397
51398 template <class PIXELTYPE>
51399 class StridedCachedFileImageIterator
51400 : public CachedFileImageIteratorBase<StridedCachedFileImageIterator<PIXELTYPE>,
51401 CachedFileImage<PIXELTYPE>,
51402 PIXELTYPE, PIXELTYPE &, PIXELTYPE *, StridedArrayTag>
51403
51404
51405 {
51406 public:
51407
51408 typedef CachedFileImageIteratorBase<StridedCachedFileImageIterator,
51409 CachedFileImage<PIXELTYPE>,
51410 PIXELTYPE, PIXELTYPE &, PIXELTYPE *, StridedArrayTag> Base;
51411
51412 StridedCachedFileImageIterator(const int x = 0,
51413 const int y = 0,
51414 CachedFileImage<PIXELTYPE> * const i = __null,
51415 const int xstride = 1,
51416 const int ystride = 1)
51417 : Base(x, y, i, xstride, ystride)
51418 {}
51419
51420 StridedCachedFileImageIterator(CachedFileImageIterator<PIXELTYPE> const & r,
51421 const int xstride,
51422 const int ystride)
51423 : Base(r.x(), r.y(), r.i, xstride, ystride)
51424 {}
51425
51426 };
51427
51428
51429 template <class PIXELTYPE>
51430 class ConstStridedCachedFileImageIterator
51431 : public CachedFileImageIteratorBase<ConstStridedCachedFileImageIterator<PIXELTYPE>,
51432 const CachedFileImage<PIXELTYPE>,
51433 PIXELTYPE, PIXELTYPE const &, PIXELTYPE const *, StridedArrayTag>
51434
51435
51436 {
51437 public:
51438
51439 typedef CachedFileImageIteratorBase<ConstStridedCachedFileImageIterator,
51440 const CachedFileImage<PIXELTYPE>,
51441 PIXELTYPE, PIXELTYPE const &, PIXELTYPE const *, StridedArrayTag> Base;
51442
51443
51444 ConstStridedCachedFileImageIterator(const int x = 0,
51445 const int y = 0,
51446 const CachedFileImage<PIXELTYPE> * const i = __null,
51447 const int xstride = 1,
51448 const int ystride = 1)
51449 : Base(x, y, i, xstride, ystride)
51450 {}
51451
51452 ConstStridedCachedFileImageIterator(ConstCachedFileImageIterator<PIXELTYPE> const & r,
51453 const int xstride,
51454 const int ystride)
51455 : Base(r.x(), r.y(), r.i, xstride, ystride)
51456 {}
51457
51458 ConstStridedCachedFileImageIterator(CachedFileImageIterator<PIXELTYPE> const & r,
51459 const int xstride,
51460 const int ystride)
51461 : Base(r.x(), r.y(), r.i, xstride, ystride)
51462 {}
51463 # 947 "../include/vigra/cachedfileimage.hxx"
51464 };
51465
51466
51467 template <class T> struct IteratorTraits;
51468
51469
51470 template <class PIXELTYPE>
51471 class CachedFileImage : public CachedFileImageBase {
51472 public:
51473
51474 typedef PIXELTYPE value_type;
51475 typedef PIXELTYPE PixelType;
51476 typedef PIXELTYPE & reference;
51477 typedef PIXELTYPE const & const_reference;
51478
51479 typedef PIXELTYPE * pointer;
51480 typedef PIXELTYPE const * const_pointer;
51481 typedef CachedFileImageIterator<PIXELTYPE> traverser;
51482 typedef ConstCachedFileImageIterator<PIXELTYPE> const_traverser;
51483 typedef IteratorAdaptor<CachedFileSequentialAccessIteratorPolicy<traverser> > iterator;
51484 typedef IteratorAdaptor<CachedFileSequentialAccessIteratorPolicy<const_traverser> > const_iterator;
51485 typedef Diff2D difference_type;
51486 typedef Size2D size_type;
51487 typedef typename IteratorTraits<traverser>::DefaultAccessor Accessor;
51488 typedef typename IteratorTraits<const_traverser>::DefaultAccessor ConstAccessor;
51489
51490 CachedFileImage() {
51491 initMembers();
51492 }
51493
51494 CachedFileImage(int width, int height) {
51495 vigra::throw_precondition_error(((width >= 0) && (height >= 0)), "CachedFileImage::CachedFileImage(int width, int height): " "width and height must be >= 0.\n");
51496
51497
51498 initMembers();
51499 resize(width, height, value_type());
51500 }
51501
51502 explicit CachedFileImage(difference_type const & size, value_type const & d = value_type()) {
51503 vigra::throw_precondition_error(((size.x >= 0) && (size.y >= 0)), "CachedFileImage::CachedIfelImage(Diff2D size): " "size.x and size.y must be >= 0.\n");
51504
51505
51506 initMembers();
51507 resize(size.x, size.y, d);
51508 }
51509
51510 CachedFileImage(int width, int height, value_type const & d) {
51511 vigra::throw_precondition_error(((width >= 0) && (height >= 0)), "CachedFileImage::CachedFileImage(int width, int height, value_type const & ): " "width and height must be >= 0.\n");
51512
51513
51514 initMembers();
51515 resize(width, height, d);
51516 }
51517
51518 CachedFileImage(const CachedFileImage & rhs) {
51519 initMembers();
51520 resizeCopy(rhs);
51521 }
51522
51523 virtual ~CachedFileImage() {
51524 deallocate();
51525 }
51526
51527 CachedFileImage & operator=(const CachedFileImage &rhs);
51528 CachedFileImage & init(value_type const & pixel);
51529
51530 void resize(int width, int height) {
51531 resize(width, height, value_type());
51532 }
51533
51534 void resize(difference_type const & size) {
51535 resize(size.x, size.y, value_type());
51536 }
51537
51538 void resize(int width, int height, value_type const & d);
51539 void resizeCopy(const CachedFileImage & rhs);
51540 void swap( CachedFileImage<PIXELTYPE>& rhs );
51541
51542 int width() const {
51543 return width_;
51544 }
51545
51546 int height() const {
51547 return height_;
51548 }
51549
51550 size_type size() const {
51551 return size_type(width(), height());
51552 }
51553
51554 bool isInside(difference_type const & d) const {
51555 return d.x >= 0 && d.y >= 0 &&
51556 d.x < width() && d.y < height();
51557 }
51558
51559 reference operator[](difference_type const & d) {
51560 return (getLinePointerDirty(d.y))[d.x];
51561 }
51562
51563 const_reference operator[](difference_type const & d) const {
51564 return (getLinePointer(d.y))[d.x];
51565 }
51566
51567 reference operator()(int dx, int dy) {
51568 return (getLinePointerDirty(dy))[dx];
51569 }
51570
51571 const_reference operator()(int dx, int dy) const {
51572 return (getLinePointer(dy))[dx];
51573 }
51574
51575
51576 pointer operator[](int dy) {
51577
51578
51579 if (dy < 0 || dy >= height_) return __null;
51580 else return getLinePointerDirty(dy);
51581 }
51582
51583
51584 const_pointer operator[](int dy) const {
51585
51586
51587 if (dy < 0 || dy >= height_) return __null;
51588 else return getLinePointer(dy);
51589 }
51590
51591 traverser upperLeft() {
51592
51593 ;
51594
51595 return traverser(0, 0, this);
51596 }
51597
51598 traverser lowerRight() {
51599
51600 ;
51601
51602 return traverser(width_, height_, this);
51603 }
51604
51605 const_traverser upperLeft() const {
51606
51607 ;
51608
51609 return const_traverser(0, 0, this);
51610 }
51611
51612 const_traverser lowerRight() const {
51613
51614 ;
51615
51616 return const_traverser(width_, height_, this);
51617 }
51618
51619 iterator begin() {
51620
51621 ;
51622
51623 return iterator(traverser(0, 0, this));
51624 }
51625
51626 iterator end() {
51627
51628 ;
51629
51630 return iterator(traverser(0, height_, this));
51631 }
51632
51633 const_iterator begin() const {
51634
51635 ;
51636
51637 return const_iterator(const_traverser(0, 0, this));
51638 }
51639
51640 const_iterator end() const {
51641
51642 ;
51643
51644 return const_iterator(const_traverser(0, height_, this));
51645 }
51646
51647 Accessor accessor() {
51648 return Accessor();
51649 }
51650
51651 ConstAccessor accessor() const {
51652 return ConstAccessor();
51653 }
51654
51655 int numBlocksAllocated() const {
51656 return blocksAllocated_;
51657 }
51658
51659 int numBlocksNeeded() const {
51660 return blocksNeeded_;
51661 }
51662
51663 void printBlockStats() const {
51664 cout << "image " << this
51665 << " blocksAllocated=" << blocksAllocated_
51666 << "/" << blocksNeeded_
51667 << " mrl=" << *mostRecentlyLoadedBlockIterator_
51668 << " blocksInMemory={";
51669
51670 std::copy(blocksInMemory_->begin(), blocksInMemory_->end(),
51671 std::ostream_iterator<int>(cout, " "));
51672
51673 cout << "}" << endl;
51674 }
51675
51676 private:
51677
51678
51679 PIXELTYPE initPixel;
51680
51681 void deallocate();
51682
51683
51684 void initLineStartArray();
51685
51686
51687
51688
51689
51690 PIXELTYPE * getLinePointer(const int dy) const;
51691 PIXELTYPE * getLinePointerDirty(const int dy);
51692 PIXELTYPE * getLinePointerCacheMiss(const int dy) const;
51693
51694
51695 void swapOutBlock() const;
51696
51697
51698 void initTmpfile() const;
51699
51700 void initMembers() {
51701 initPixel = value_type();
51702 linesPerBlocksize_ = 0;
51703 linesPerBlocksizeLog2_ = 0;
51704 blocksAllocated_ = 0;
51705 blocksNeeded_ = 0;
51706 blocksInMemory_ = __null;
51707 lines_ = __null;
51708 blockIsClean_ = __null;
51709 blockInFile_ = __null;
51710 width_ = 0;
51711 height_ = 0;
51712
51713
51714
51715 tmpFile_ = __null;
51716
51717 tmpFilename_ = __null;
51718 }
51719
51720
51721 int linesPerBlocksize_;
51722 int linesPerBlocksizeLog2_;
51723
51724 mutable int blocksAllocated_;
51725
51726 int blocksNeeded_;
51727
51728
51729
51730 mutable list<int> *blocksInMemory_;
51731
51732
51733
51734 mutable list<int>::iterator mostRecentlyLoadedBlockIterator_;
51735
51736
51737 mutable PIXELTYPE ** lines_;
51738
51739
51740
51741
51742 mutable bool * blockIsClean_;
51743
51744
51745
51746
51747 mutable bool * blockInFile_;
51748
51749 int width_, height_;
51750
51751
51752
51753
51754 mutable FILE *tmpFile_;
51755
51756
51757 mutable char *tmpFilename_;
51758 };
51759
51760 template <class PIXELTYPE>
51761 void CachedFileImage<PIXELTYPE>::deallocate() {
51762
51763
51764 CachedFileImageDirector::v().returnBlocksUnregisterImage(blocksAllocated_, this);
51765 delete blocksInMemory_;
51766
51767
51768 if (lines_ != __null) {
51769 int line = 0;
51770 for (int block = 0; block < blocksNeeded_; block++) {
51771 int firstLineInBlock = line;
51772 for (int subblock = 0; subblock < linesPerBlocksize_; subblock++, line++) {
51773 if (line >= height_) break;
51774 PIXELTYPE *p = lines_[line];
51775 if (p != __null) {
51776 for (int column = 0; column < width_; column++) {
51777
51778
51779
51780 (p[column]).~PIXELTYPE();
51781 }
51782 }
51783 }
51784 CachedFileImageDirector::v().deallocateBlock(lines_[firstLineInBlock]);
51785 if (line >= height_) break;
51786 }
51787 delete[] lines_;
51788 }
51789
51790 delete[] blockIsClean_;
51791 delete[] blockInFile_;
51792
51793
51794
51795
51796
51797
51798
51799 if (tmpFile_ != __null) {
51800 fclose(tmpFile_);
51801 }
51802
51803
51804
51805 delete[] tmpFilename_;
51806 };
51807
51808
51809 template <class PIXELTYPE>
51810 void CachedFileImage<PIXELTYPE>::initLineStartArray() {
51811
51812
51813 linesPerBlocksize_ = (int)floor(
51814 ((double)CachedFileImageDirector::v().getBlockSize())
51815 / (width_ * sizeof(PIXELTYPE)));
51816
51817
51818 linesPerBlocksizeLog2_ = (int)floor(log((double)linesPerBlocksize_)/log(2.0));
51819 linesPerBlocksize_ = 1 << linesPerBlocksizeLog2_;
51820 # 1313 "../include/vigra/cachedfileimage.hxx"
51821 blocksNeeded_ = (int)ceil(((double)height_) / linesPerBlocksize_);
51822
51823
51824
51825
51826
51827
51828 int blocksAllowed = CachedFileImageDirector::v().requestBlocksForNewImage(
51829 blocksNeeded_, this);
51830
51831
51832
51833
51834
51835 blocksInMemory_ = new list<int>();
51836
51837 lines_ = new PIXELTYPE*[height_];
51838 blockIsClean_ = new bool[blocksNeeded_];
51839 blockInFile_ = new bool[blocksNeeded_];
51840
51841
51842 for (int block = 0; block < blocksNeeded_; block++) {
51843 blockIsClean_[block] = true;
51844 blockInFile_[block] = false;
51845 }
51846
51847
51848 int line = 0;
51849 for (int block = 0; block < blocksAllowed; block++) {
51850 blocksInMemory_->push_back(block);
51851 blocksAllocated_++;
51852
51853
51854 PIXELTYPE* blockStart = (PIXELTYPE*)CachedFileImageDirector::v().allocateBlock();
51855
51856
51857 for (int subblock = 0; subblock < linesPerBlocksize_; subblock++, line++, blockStart+=width_) {
51858 if (line >= height_) break;
51859 lines_[line] = blockStart;
51860
51861 std::uninitialized_fill_n(lines_[line], width_, initPixel);
51862 }
51863 if (line >= height_) break;
51864 }
51865
51866
51867 for (; line < height_; line++) {
51868 lines_[line] = __null;
51869 }
51870
51871
51872
51873
51874
51875
51876 mostRecentlyLoadedBlockIterator_ = blocksInMemory_->begin();
51877
51878 return;
51879 };
51880
51881
51882
51883
51884 template <class PIXELTYPE>
51885 inline PIXELTYPE * CachedFileImage<PIXELTYPE>::getLinePointerDirty(const int dy) {
51886 PIXELTYPE *line = lines_[dy];
51887
51888
51889 if (line == __null) line = getLinePointerCacheMiss(dy);
51890
51891
51892
51893 blockIsClean_[dy >> linesPerBlocksizeLog2_] = false;
51894
51895 return line;
51896 };
51897
51898
51899
51900
51901 template <class PIXELTYPE>
51902 inline PIXELTYPE * CachedFileImage<PIXELTYPE>::getLinePointer(const int dy) const {
51903 PIXELTYPE *line = lines_[dy];
51904
51905
51906 if (line == __null) line = getLinePointerCacheMiss(dy);
51907
51908 return line;
51909 };
51910
51911
51912 template <class PIXELTYPE>
51913 PIXELTYPE * CachedFileImage<PIXELTYPE>::getLinePointerCacheMiss(const int dy) const {
51914
51915 int blockNumber = dy >> linesPerBlocksizeLog2_;
51916
51917 int firstLineInBlock = blockNumber << linesPerBlocksizeLog2_;
51918 # 1422 "../include/vigra/cachedfileimage.hxx"
51919 int moreBlocks = CachedFileImageDirector::v().registerCacheMiss(this);
51920 if (moreBlocks == 0 && blocksAllocated_ == 0) {
51921 throw std::runtime_error("enblend: Out of memory blocks. Try using the -m flag to " "increase the amount of memory to use, or use the -b flag to " "decrease the block size\n" "reason: cache miss, 0 blocks allocated, 0 blocks available.");
51922
51923
51924
51925 } else if (moreBlocks == 0) {
51926
51927 swapOutBlock();
51928 }
51929
51930
51931 PIXELTYPE* blockStart = (PIXELTYPE*)CachedFileImageDirector::v().allocateBlock();
51932
51933
51934 int numLinesInBlock = min(height_, firstLineInBlock + linesPerBlocksize_)
51935 - firstLineInBlock;
51936 int pixelsToRead = numLinesInBlock * width_;
51937
51938 if (blockInFile_[blockNumber]) {
51939 # 1467 "../include/vigra/cachedfileimage.hxx"
51940 off_t offset = (off_t)width_
51941 * (off_t)firstLineInBlock
51942 * (off_t)sizeof(PIXELTYPE);
51943 if (fseeko(tmpFile_, offset, 0) != 0) {
51944 throw std::runtime_error(strerror((*__errno_location ())));
51945 }
51946 # 1498 "../include/vigra/cachedfileimage.hxx"
51947 clearerr(tmpFile_);
51948 int itemsRead = fread(blockStart, sizeof(PIXELTYPE), pixelsToRead, tmpFile_);
51949 if (itemsRead < pixelsToRead) {
51950 perror("enblend");
51951 throw std::runtime_error("enblend: error reading from image swap file.\n");
51952 }
51953
51954 }
51955 else {
51956
51957
51958 std::uninitialized_fill_n(blockStart, pixelsToRead, initPixel);
51959 }
51960
51961
51962 for (int l = 0; l < linesPerBlocksize_; l++, blockStart+=width_) {
51963 int absoluteLineNumber = l + firstLineInBlock;
51964 if (absoluteLineNumber >= height_) break;
51965 lines_[absoluteLineNumber] = blockStart;
51966 }
51967
51968
51969 blockIsClean_[blockNumber] = true;
51970
51971
51972 list<int>::iterator i = blocksInMemory_->begin();
51973 for (; i != blocksInMemory_->end(); ++i) {
51974 if (*i > blockNumber) break;
51975 }
51976 blocksInMemory_->insert(i, blockNumber);
51977
51978
51979
51980 mostRecentlyLoadedBlockIterator_ = --i;
51981 for (++i; i != blocksInMemory_->end(); ++i) {
51982 if (*i == ++blockNumber) mostRecentlyLoadedBlockIterator_ = i;
51983 else break;
51984 }
51985
51986 blocksAllocated_++;
51987 # 1547 "../include/vigra/cachedfileimage.hxx"
51988 return lines_[dy];
51989 };
51990
51991
51992 template <class PIXELTYPE>
51993 void CachedFileImage<PIXELTYPE>::swapOutBlock() const {
51994 if (blocksAllocated_ == 0) {
51995 throw std::runtime_error("Attempt to free a block from an image that has no blocks.");
51996 }
51997 # 1565 "../include/vigra/cachedfileimage.hxx"
51998 int blockNumber = 0;
51999 # 1576 "../include/vigra/cachedfileimage.hxx"
52000 if (mostRecentlyLoadedBlockIterator_ == blocksInMemory_->begin()) {
52001
52002
52003 blockNumber = blocksInMemory_->back();
52004 blocksInMemory_->pop_back();
52005 } else {
52006
52007
52008
52009 list<int>::iterator candidate = mostRecentlyLoadedBlockIterator_;
52010 --candidate;
52011 blockNumber = *candidate;
52012 blocksInMemory_->erase(candidate);
52013 }
52014 # 1598 "../include/vigra/cachedfileimage.hxx"
52015 int firstLineInBlock = blockNumber << linesPerBlocksizeLog2_;
52016 PIXELTYPE *blockStart = lines_[firstLineInBlock];
52017
52018
52019 if (!blockIsClean_[blockNumber]) {
52020 blockInFile_[blockNumber] = true;
52021
52022
52023
52024
52025
52026 if (tmpFile_ == __null)
52027
52028 initTmpfile();
52029 # 1638 "../include/vigra/cachedfileimage.hxx"
52030 off_t offset = (off_t)width_
52031 * (off_t)firstLineInBlock
52032 * (off_t)sizeof(PIXELTYPE);
52033 if (fseeko(tmpFile_, offset, 0) != 0) {
52034 throw std::runtime_error(strerror((*__errno_location ())));
52035 }
52036
52037
52038 int numLinesInBlock = min(height_, firstLineInBlock + linesPerBlocksize_)
52039 - firstLineInBlock;
52040 int pixelsToWrite = numLinesInBlock * width_;
52041 # 1672 "../include/vigra/cachedfileimage.hxx"
52042 clearerr(tmpFile_);
52043 int itemsWritten = fwrite(blockStart, sizeof(PIXELTYPE), pixelsToWrite, tmpFile_);
52044 if (itemsWritten < pixelsToWrite) {
52045 perror("enblend");
52046 throw std::runtime_error("enblend: error writing to image swap file.\n");
52047 }
52048
52049 }
52050
52051
52052 for (int l = 0; l < linesPerBlocksize_; l++) {
52053 int absoluteLineNumber = l + firstLineInBlock;
52054 if (absoluteLineNumber >= height_) break;
52055 PIXELTYPE *p = lines_[absoluteLineNumber];
52056 for (int column = 0; column <= width_; column++) {
52057
52058
52059
52060 (p[column]).~PIXELTYPE();
52061 }
52062 lines_[absoluteLineNumber] = __null;
52063 }
52064
52065
52066 CachedFileImageDirector::v().deallocateBlock(blockStart);
52067
52068 blocksAllocated_--;
52069
52070
52071
52072
52073
52074
52075
52076 };
52077
52078
52079 template <class PIXELTYPE>
52080 void CachedFileImage<PIXELTYPE>::initTmpfile() const {
52081 char filenameTemplate[] = ".enblend_tmpXXXXXX";
52082
52083
52084 sigset_t oldsigmask;
52085 sigprocmask(0, &SigintMask, &oldsigmask);
52086
52087
52088
52089
52090
52091
52092
52093 int tmpFD = mkstemp(filenameTemplate);
52094 if (tmpFD < 0) {
52095 throw std::runtime_error("enblend: unable to create image swap file.\n");
52096 }
52097 tmpFile_ = fdopen(tmpFD, "wb+");
52098 # 1749 "../include/vigra/cachedfileimage.hxx"
52099 if (tmpFile_ == __null) {
52100
52101 throw std::runtime_error(strerror((*__errno_location ())));
52102 }
52103
52104 unsigned int filenameTemplateLength = (unsigned int)strlen(filenameTemplate) + 1;
52105 tmpFilename_ = new char[filenameTemplateLength];
52106 strncpy(tmpFilename_, filenameTemplate, filenameTemplateLength);
52107
52108
52109 unlink(tmpFilename_);
52110 sigprocmask(2, &oldsigmask, __null);
52111
52112
52113
52114
52115
52116
52117 };
52118
52119 template <class PIXELTYPE>
52120 CachedFileImage<PIXELTYPE> &
52121 CachedFileImage<PIXELTYPE>::operator=(const CachedFileImage<PIXELTYPE> & rhs) {
52122 if (this != &rhs) {
52123 if ((width() != rhs.width()) ||
52124 (height() != rhs.height())) {
52125 resizeCopy(rhs);
52126 }
52127 else {
52128 const_iterator is = rhs.begin();
52129 const_iterator iend = rhs.end();
52130 iterator id = begin();
52131 for(; is != iend; ++is, ++id) *id = *is;
52132 }
52133 }
52134 return *this;
52135 };
52136
52137 template <class PIXELTYPE>
52138 CachedFileImage<PIXELTYPE> &
52139 CachedFileImage<PIXELTYPE>::init(value_type const & pixel) {
52140 initPixel = pixel;
52141
52142
52143
52144
52145 for (int block = 0; block < blocksNeeded_; block++) {
52146 blockIsClean_[block] = true;
52147 blockInFile_[block] = false;
52148 }
52149
52150
52151
52152 for (int line = 0; line < height_; line++) {
52153 PIXELTYPE *p = lines_[line];
52154 if (lines_[line] != __null) {
52155 for (int column = 0; column <= width_; column++) {
52156
52157
52158
52159 (p[column]).~PIXELTYPE();
52160 }
52161
52162 std::uninitialized_fill_n(lines_[line], width_, initPixel);
52163 }
52164 }
52165
52166 return *this;
52167 };
52168
52169 template <class PIXELTYPE>
52170 void CachedFileImage<PIXELTYPE>::resize(int width, int height, value_type const & d) {
52171 vigra::throw_precondition_error(((width >= 0) && (height >= 0)), "CachedFileImage::resize(int width, int height, value_type const &): " "width and height must be >= 0.\n");
52172
52173
52174 deallocate();
52175 initMembers();
52176 initPixel = d;
52177 width_ = width;
52178 height_ = height;
52179 initLineStartArray();
52180 };
52181
52182 template <class PIXELTYPE>
52183 void CachedFileImage<PIXELTYPE>::resizeCopy(const CachedFileImage & rhs) {
52184 deallocate();
52185 initMembers();
52186 if (rhs.width() * rhs.height() > 0) {
52187 width_ = rhs.width();
52188 height_ = rhs.height();
52189 initLineStartArray();
52190
52191 const_iterator is = rhs.begin();
52192 const_iterator iend = rhs.end();
52193 iterator id = begin();
52194 for(; is != iend; ++is, ++id) *id = *is;
52195 }
52196 };
52197
52198 template <class PIXELTYPE>
52199 void CachedFileImage<PIXELTYPE>::swap( CachedFileImage<PIXELTYPE>& rhs ) {
52200 if (&rhs != this) {
52201 std::swap(initPixel, rhs.initPixel);
52202 std::swap(linesPerBlocksize_, rhs.linesPerBlocksize_);
52203 std::swap(linesPerBlocksizeLog2_, rhs.linesPerBlocksizeLog2_);
52204 std::swap(blocksAllocated_, rhs.blocksAllocated_);
52205 std::swap(blocksNeeded_, rhs.blocksNeeded_);
52206 std::swap(blocksInMemory_, rhs.blocksInMemory_);
52207 std::swap(mostRecentlyLoadedBlockIterator_, rhs.mostRecentlyLoadedBlockIterator_);
52208 std::swap(lines_, rhs.lines_);
52209 std::swap(blockIsClean_, rhs.blockIsClean_);
52210 std::swap(blockInFile_, rhs.blockInFile_);
52211 std::swap(width_, rhs.width_);
52212 std::swap(height_, rhs.height_);
52213
52214
52215
52216 std::swap(tmpFile_, rhs.tmpFile_);
52217
52218 std::swap(tmpFilename_, rhs.tmpFilename_);
52219 }
52220 };
52221
52222
52223
52224
52225
52226
52227
52228 template <class PixelType, class Accessor>
52229 inline triple<typename CachedFileImage<PixelType>::const_traverser,
52230 typename CachedFileImage<PixelType>::const_traverser, Accessor>
52231 srcImageRange(CachedFileImage<PixelType> const & img, Accessor a)
52232 {
52233 return triple<typename CachedFileImage<PixelType>::const_traverser,
52234 typename CachedFileImage<PixelType>::const_traverser,
52235 Accessor>(img.upperLeft(),
52236 img.lowerRight(),
52237 a);
52238 }
52239
52240 template <class PixelType, class Accessor>
52241 inline pair<typename CachedFileImage<PixelType>::const_traverser, Accessor>
52242 srcImage(CachedFileImage<PixelType> const & img, Accessor a)
52243 {
52244 return pair<typename CachedFileImage<PixelType>::const_traverser,
52245 Accessor>(img.upperLeft(), a);
52246 }
52247
52248 template <class PixelType, class Accessor>
52249 inline triple<typename CachedFileImage<PixelType>::traverser,
52250 typename CachedFileImage<PixelType>::traverser, Accessor>
52251 destImageRange(CachedFileImage<PixelType> & img, Accessor a)
52252 {
52253 return triple<typename CachedFileImage<PixelType>::traverser,
52254 typename CachedFileImage<PixelType>::traverser,
52255 Accessor>(img.upperLeft(),
52256 img.lowerRight(),
52257 a);
52258 }
52259
52260 template <class PixelType, class Accessor>
52261 inline pair<typename CachedFileImage<PixelType>::traverser, Accessor>
52262 destImage(CachedFileImage<PixelType> & img, Accessor a)
52263 {
52264 return pair<typename CachedFileImage<PixelType>::traverser,
52265 Accessor>(img.upperLeft(), a);
52266 }
52267
52268 template <class PixelType, class Accessor>
52269 inline pair<typename CachedFileImage<PixelType>::const_traverser, Accessor>
52270 maskImage(CachedFileImage<PixelType> const & img, Accessor a)
52271 {
52272 return pair<typename CachedFileImage<PixelType>::const_traverser,
52273 Accessor>(img.upperLeft(), a);
52274 }
52275
52276
52277
52278 template <class PixelType>
52279 inline triple<typename CachedFileImage<PixelType>::const_traverser,
52280 typename CachedFileImage<PixelType>::const_traverser,
52281 typename CachedFileImage<PixelType>::ConstAccessor>
52282 srcImageRange(CachedFileImage<PixelType> const & img)
52283 {
52284 return triple<typename CachedFileImage<PixelType>::const_traverser,
52285 typename CachedFileImage<PixelType>::const_traverser,
52286 typename CachedFileImage<PixelType>::ConstAccessor>(img.upperLeft(),
52287 img.lowerRight(),
52288 img.accessor());
52289 }
52290
52291 template <class PixelType>
52292 inline pair< typename CachedFileImage<PixelType>::const_traverser,
52293 typename CachedFileImage<PixelType>::ConstAccessor>
52294 srcImage(CachedFileImage<PixelType> const & img)
52295 {
52296 return pair<typename CachedFileImage<PixelType>::const_traverser,
52297 typename CachedFileImage<PixelType>::ConstAccessor>(img.upperLeft(),
52298 img.accessor());
52299 }
52300
52301 template <class PixelType>
52302 inline triple< typename CachedFileImage<PixelType>::traverser,
52303 typename CachedFileImage<PixelType>::traverser,
52304 typename CachedFileImage<PixelType>::Accessor>
52305 destImageRange(CachedFileImage<PixelType> & img)
52306 {
52307 return triple<typename CachedFileImage<PixelType>::traverser,
52308 typename CachedFileImage<PixelType>::traverser,
52309 typename CachedFileImage<PixelType>::Accessor>(img.upperLeft(),
52310 img.lowerRight(),
52311 img.accessor());
52312 }
52313
52314 template <class PixelType>
52315 inline pair< typename CachedFileImage<PixelType>::traverser,
52316 typename CachedFileImage<PixelType>::Accessor>
52317 destImage(CachedFileImage<PixelType> & img)
52318 {
52319 return pair<typename CachedFileImage<PixelType>::traverser,
52320 typename CachedFileImage<PixelType>::Accessor>(img.upperLeft(),
52321 img.accessor());
52322 }
52323
52324 template <class PixelType>
52325 inline pair< typename CachedFileImage<PixelType>::const_traverser,
52326 typename CachedFileImage<PixelType>::ConstAccessor>
52327 maskImage(CachedFileImage<PixelType> const & img)
52328 {
52329 return pair<typename CachedFileImage<PixelType>::const_traverser,
52330 typename CachedFileImage<PixelType>::ConstAccessor>(img.upperLeft(),
52331 img.accessor());
52332 }
52333
52334 template <class PixelType>
52335 inline pair< ConstStridedCachedFileImageIterator<PixelType>,
52336 typename IteratorTraits<ConstStridedCachedFileImageIterator<PixelType> >::DefaultAccessor>
52337 maskStrideIter(CachedFileImageIterator<PixelType> const & upperLeft, int xstride, int ystride)
52338 {
52339 return pair< ConstStridedCachedFileImageIterator<PixelType>,
52340 typename IteratorTraits<ConstStridedCachedFileImageIterator<PixelType> >::DefaultAccessor >
52341 (ConstStridedCachedFileImageIterator<PixelType>(upperLeft, xstride, ystride),
52342 typename IteratorTraits<ConstStridedCachedFileImageIterator<PixelType> >::DefaultAccessor());
52343 }
52344
52345 template <class PixelType>
52346 inline pair< ConstStridedCachedFileImageIterator<PixelType>,
52347 typename IteratorTraits<ConstStridedCachedFileImageIterator<PixelType> >::DefaultAccessor>
52348 maskStrideIter(ConstCachedFileImageIterator<PixelType> const & upperLeft, int xstride, int ystride)
52349 {
52350 return pair< ConstStridedCachedFileImageIterator<PixelType>,
52351 typename IteratorTraits<ConstStridedCachedFileImageIterator<PixelType> >::DefaultAccessor >
52352 (ConstStridedCachedFileImageIterator<PixelType>(upperLeft, xstride, ystride),
52353 typename IteratorTraits<ConstStridedCachedFileImageIterator<PixelType> >::DefaultAccessor());
52354 }
52355
52356 template <class PixelType>
52357 inline triple< ConstStridedCachedFileImageIterator<PixelType>,
52358 ConstStridedCachedFileImageIterator<PixelType>,
52359 typename IteratorTraits<ConstStridedCachedFileImageIterator<PixelType> >::DefaultAccessor>
52360 maskStrideIterRange(CachedFileImageIterator<PixelType> const & upperLeft,
52361 CachedFileImageIterator<PixelType> const & lowerRight,
52362 int xstride, int ystride)
52363 {
52364 return triple< ConstStridedCachedFileImageIterator<PixelType>,
52365 ConstStridedCachedFileImageIterator<PixelType>,
52366 typename IteratorTraits<ConstStridedCachedFileImageIterator<PixelType> >::DefaultAccessor >
52367 (ConstStridedCachedFileImageIterator<PixelType>(upperLeft, xstride, ystride),
52368 ConstStridedCachedFileImageIterator<PixelType>(lowerRight, xstride, ystride),
52369 typename IteratorTraits<ConstStridedCachedFileImageIterator<PixelType> >::DefaultAccessor());
52370 }
52371
52372 template <class PixelType>
52373 inline triple< ConstStridedCachedFileImageIterator<PixelType>,
52374 ConstStridedCachedFileImageIterator<PixelType>,
52375 typename IteratorTraits<ConstStridedCachedFileImageIterator<PixelType> >::DefaultAccessor>
52376 maskStrideIterRange(ConstCachedFileImageIterator<PixelType> const & upperLeft,
52377 ConstCachedFileImageIterator<PixelType> const & lowerRight,
52378 int xstride, int ystride)
52379 {
52380 return triple< ConstStridedCachedFileImageIterator<PixelType>,
52381 ConstStridedCachedFileImageIterator<PixelType>,
52382 typename IteratorTraits<ConstStridedCachedFileImageIterator<PixelType> >::DefaultAccessor >
52383 (ConstStridedCachedFileImageIterator<PixelType>(upperLeft, xstride, ystride),
52384 ConstStridedCachedFileImageIterator<PixelType>(lowerRight, xstride, ystride),
52385 typename IteratorTraits<ConstStridedCachedFileImageIterator<PixelType> >::DefaultAccessor());
52386 }
52387
52388 template <typename PixelType, typename ImgAccessor>
52389 vigra::triple<StridedCachedFileImageIterator<PixelType>, StridedCachedFileImageIterator<PixelType>, ImgAccessor>
52390 stride(int xstride, int ystride, vigra::triple<CachedFileImageIterator<PixelType>, CachedFileImageIterator<PixelType>, ImgAccessor> image) {
52391 Diff2D diff = image.second - image.first;
52392 if (diff.x % xstride) diff.x += (xstride - (diff.x % xstride));
52393 if (diff.y % ystride) diff.y += (ystride - (diff.y % ystride));
52394
52395 return vigra::make_triple(StridedCachedFileImageIterator<PixelType>(image.first, xstride, ystride),
52396 StridedCachedFileImageIterator<PixelType>(image.first + diff, xstride, ystride),
52397 image.third);
52398 };
52399
52400 template <typename PixelType, typename ImgAccessor>
52401 vigra::triple<ConstStridedCachedFileImageIterator<PixelType>, ConstStridedCachedFileImageIterator<PixelType>, ImgAccessor>
52402 stride(int xstride, int ystride, vigra::triple<ConstCachedFileImageIterator<PixelType>, ConstCachedFileImageIterator<PixelType>, ImgAccessor> image) {
52403 Diff2D diff = image.second - image.first;
52404 if (diff.x % xstride) diff.x += (xstride - (diff.x % xstride));
52405 if (diff.y % ystride) diff.y += (ystride - (diff.y % ystride));
52406
52407 return vigra::make_triple(ConstStridedCachedFileImageIterator<PixelType>(image.first, xstride, ystride),
52408 ConstStridedCachedFileImageIterator<PixelType>(image.first + diff, xstride, ystride),
52409 image.third);
52410 };
52411
52412 template <typename PixelType, typename ImgAccessor>
52413 std::pair<StridedCachedFileImageIterator<PixelType>, ImgAccessor>
52414 stride(int xstride, int ystride, std::pair<CachedFileImageIterator<PixelType>, ImgAccessor> image) {
52415 return std::make_pair(StridedCachedFileImageIterator<PixelType>(image.first, xstride, ystride), image.second);
52416 };
52417
52418 template <typename PixelType, typename ImgAccessor>
52419 std::pair<ConstStridedCachedFileImageIterator<PixelType>, ImgAccessor>
52420 stride(int xstride, int ystride, std::pair<ConstCachedFileImageIterator<PixelType>, ImgAccessor> image) {
52421 return std::make_pair(ConstStridedCachedFileImageIterator<PixelType>(image.first, xstride, ystride), image.second);
52422 };
52423
52424 }
52425 # 29 "numerictraits.h" 2
52426 # 1 "../include/vigra/numerictraits.hxx" 1
52427 # 30 "numerictraits.h" 2
52428
52429
52430 using vigra::BasicImage;
52431 using vigra::CachedFileImage;
52432 using vigra::NumericTraits;
52433 using vigra::RGBValue;
52434 using vigra::VigraFalseType;
52435 using vigra::VigraTrueType;
52436
52437 using vigra::Int8;
52438 using vigra::Int16;
52439 using vigra::Int32;
52440 using vigra::Int64;
52441 using vigra::UInt8;
52442 using vigra::UInt16;
52443 using vigra::UInt32;
52444 using vigra::UInt64;
52445
52446
52447
52448
52449
52450
52451
52452 namespace enblend {
52453
52454 struct Error_EnblendNumericTraits_not_specialized_for_this_case { };
52455
52456 template<class A>
52457 struct EnblendNumericTraits {
52458
52459 typedef Error_EnblendNumericTraits_not_specialized_for_this_case ImagePixelComponentType;
52460 typedef Error_EnblendNumericTraits_not_specialized_for_this_case ImagePixelType;
52461 typedef Error_EnblendNumericTraits_not_specialized_for_this_case ImageType;
52462 typedef Error_EnblendNumericTraits_not_specialized_for_this_case ImageIsScalar;
52463 typedef Error_EnblendNumericTraits_not_specialized_for_this_case AlphaPixelType;
52464 typedef Error_EnblendNumericTraits_not_specialized_for_this_case AlphaType;
52465
52466
52467 typedef Error_EnblendNumericTraits_not_specialized_for_this_case MaskPixelType;
52468 typedef Error_EnblendNumericTraits_not_specialized_for_this_case MaskType;
52469
52470
52471 typedef Error_EnblendNumericTraits_not_specialized_for_this_case ImagePyramidPixelComponentType;
52472 typedef Error_EnblendNumericTraits_not_specialized_for_this_case ImagePyramidPixelType;
52473 typedef Error_EnblendNumericTraits_not_specialized_for_this_case ImagePyramidType;
52474 enum { ImagePyramidIntegerBits = 0 };
52475 enum { ImagePyramidFractionBits = 0 };
52476
52477
52478 typedef Error_EnblendNumericTraits_not_specialized_for_this_case SKIPSMImagePixelType;
52479
52480
52481 typedef Error_EnblendNumericTraits_not_specialized_for_this_case SKIPSMAlphaPixelType;
52482
52483
52484 typedef Error_EnblendNumericTraits_not_specialized_for_this_case MaskPyramidPixelType;
52485 typedef Error_EnblendNumericTraits_not_specialized_for_this_case MaskPyramidType;
52486 enum { MaskPyramidIntegerBits = 0 };
52487 enum { MaskPyramidFractionBits = 0 };
52488
52489 typedef Error_EnblendNumericTraits_not_specialized_for_this_case SKIPSMMaskPixelType;
52490 };
52491 # 146 "numerictraits.h"
52492 template<> struct EnblendNumericTraits<Int8> { typedef Int8 ImagePixelComponentType; typedef Int8 ImagePixelType; typedef CachedFileImage<Int8> ImageType; typedef VigraTrueType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage<UInt8> AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage<UInt8> MaskType; typedef Int16 ImagePyramidPixelComponentType; typedef Int16 ImagePyramidPixelType; typedef CachedFileImage<Int16> ImagePyramidType; enum {ImagePyramidIntegerBits = 9}; enum {ImagePyramidFractionBits = 7}; typedef Int32 SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int16 MaskPyramidPixelType; typedef CachedFileImage<Int16> MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 7}; typedef Int32 SKIPSMMaskPixelType; };template<> struct EnblendNumericTraits<RGBValue<Int8,0,1,2> > { typedef Int8 ImagePixelComponentType; typedef RGBValue<Int8,0,1,2> ImagePixelType; typedef CachedFileImage<RGBValue<Int8,0,1,2> > ImageType; typedef VigraFalseType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage<UInt8> AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage<UInt8> MaskType; typedef Int16 ImagePyramidPixelComponentType; typedef RGBValue<Int16,0,1,2> ImagePyramidPixelType; typedef CachedFileImage<RGBValue<Int16,0,1,2> > ImagePyramidType; enum {ImagePyramidIntegerBits = 9}; enum {ImagePyramidFractionBits = 7}; typedef RGBValue<Int32,0,1,2> SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int16 MaskPyramidPixelType; typedef CachedFileImage<Int16> MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 7}; typedef Int32 SKIPSMMaskPixelType; };
52493 template<> struct EnblendNumericTraits<UInt8> { typedef UInt8 ImagePixelComponentType; typedef UInt8 ImagePixelType; typedef CachedFileImage<UInt8> ImageType; typedef VigraTrueType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage<UInt8> AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage<UInt8> MaskType; typedef Int16 ImagePyramidPixelComponentType; typedef Int16 ImagePyramidPixelType; typedef CachedFileImage<Int16> ImagePyramidType; enum {ImagePyramidIntegerBits = 9}; enum {ImagePyramidFractionBits = 7}; typedef Int32 SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int16 MaskPyramidPixelType; typedef CachedFileImage<Int16> MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 7}; typedef Int32 SKIPSMMaskPixelType; };template<> struct EnblendNumericTraits<RGBValue<UInt8,0,1,2> > { typedef UInt8 ImagePixelComponentType; typedef RGBValue<UInt8,0,1,2> ImagePixelType; typedef CachedFileImage<RGBValue<UInt8,0,1,2> > ImageType; typedef VigraFalseType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage<UInt8> AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage<UInt8> MaskType; typedef Int16 ImagePyramidPixelComponentType; typedef RGBValue<Int16,0,1,2> ImagePyramidPixelType; typedef CachedFileImage<RGBValue<Int16,0,1,2> > ImagePyramidType; enum {ImagePyramidIntegerBits = 9}; enum {ImagePyramidFractionBits = 7}; typedef RGBValue<Int32,0,1,2> SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int16 MaskPyramidPixelType; typedef CachedFileImage<Int16> MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 7}; typedef Int32 SKIPSMMaskPixelType; };
52494 template<> struct EnblendNumericTraits<Int16> { typedef Int16 ImagePixelComponentType; typedef Int16 ImagePixelType; typedef CachedFileImage<Int16> ImageType; typedef VigraTrueType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage<UInt8> AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage<UInt8> MaskType; typedef Int32 ImagePyramidPixelComponentType; typedef Int32 ImagePyramidPixelType; typedef CachedFileImage<Int32> ImagePyramidType; enum {ImagePyramidIntegerBits = 17}; enum {ImagePyramidFractionBits = 7}; typedef Int32 SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int32 MaskPyramidPixelType; typedef CachedFileImage<Int32> MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 15}; typedef Int32 SKIPSMMaskPixelType; };template<> struct EnblendNumericTraits<RGBValue<Int16,0,1,2> > { typedef Int16 ImagePixelComponentType; typedef RGBValue<Int16,0,1,2> ImagePixelType; typedef CachedFileImage<RGBValue<Int16,0,1,2> > ImageType; typedef VigraFalseType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage<UInt8> AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage<UInt8> MaskType; typedef Int32 ImagePyramidPixelComponentType; typedef RGBValue<Int32,0,1,2> ImagePyramidPixelType; typedef CachedFileImage<RGBValue<Int32,0,1,2> > ImagePyramidType; enum {ImagePyramidIntegerBits = 17}; enum {ImagePyramidFractionBits = 7}; typedef RGBValue<Int32,0,1,2> SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int32 MaskPyramidPixelType; typedef CachedFileImage<Int32> MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 15}; typedef Int32 SKIPSMMaskPixelType; };
52495 template<> struct EnblendNumericTraits<UInt16> { typedef UInt16 ImagePixelComponentType; typedef UInt16 ImagePixelType; typedef CachedFileImage<UInt16> ImageType; typedef VigraTrueType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage<UInt8> AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage<UInt8> MaskType; typedef Int32 ImagePyramidPixelComponentType; typedef Int32 ImagePyramidPixelType; typedef CachedFileImage<Int32> ImagePyramidType; enum {ImagePyramidIntegerBits = 17}; enum {ImagePyramidFractionBits = 7}; typedef Int32 SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int32 MaskPyramidPixelType; typedef CachedFileImage<Int32> MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 15}; typedef Int32 SKIPSMMaskPixelType; };template<> struct EnblendNumericTraits<RGBValue<UInt16,0,1,2> > { typedef UInt16 ImagePixelComponentType; typedef RGBValue<UInt16,0,1,2> ImagePixelType; typedef CachedFileImage<RGBValue<UInt16,0,1,2> > ImageType; typedef VigraFalseType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage<UInt8> AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage<UInt8> MaskType; typedef Int32 ImagePyramidPixelComponentType; typedef RGBValue<Int32,0,1,2> ImagePyramidPixelType; typedef CachedFileImage<RGBValue<Int32,0,1,2> > ImagePyramidType; enum {ImagePyramidIntegerBits = 17}; enum {ImagePyramidFractionBits = 7}; typedef RGBValue<Int32,0,1,2> SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int32 MaskPyramidPixelType; typedef CachedFileImage<Int32> MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 15}; typedef Int32 SKIPSMMaskPixelType; };
52496
52497
52498 template<> struct EnblendNumericTraits<Int32> { typedef Int32 ImagePixelComponentType; typedef Int32 ImagePixelType; typedef CachedFileImage<Int32> ImageType; typedef VigraTrueType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage<UInt8> AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage<UInt8> MaskType; typedef double ImagePyramidPixelComponentType; typedef double ImagePyramidPixelType; typedef CachedFileImage<double> ImagePyramidType; enum {ImagePyramidIntegerBits = 8}; enum {ImagePyramidFractionBits = 0}; typedef double SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int32 MaskPyramidPixelType; typedef CachedFileImage<Int32> MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 15}; typedef Int32 SKIPSMMaskPixelType; };template<> struct EnblendNumericTraits<RGBValue<Int32,0,1,2> > { typedef Int32 ImagePixelComponentType; typedef RGBValue<Int32,0,1,2> ImagePixelType; typedef CachedFileImage<RGBValue<Int32,0,1,2> > ImageType; typedef VigraFalseType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage<UInt8> AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage<UInt8> MaskType; typedef double ImagePyramidPixelComponentType; typedef RGBValue<double,0,1,2> ImagePyramidPixelType; typedef CachedFileImage<RGBValue<double,0,1,2> > ImagePyramidType; enum {ImagePyramidIntegerBits = 8}; enum {ImagePyramidFractionBits = 0}; typedef RGBValue<double,0,1,2> SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int32 MaskPyramidPixelType; typedef CachedFileImage<Int32> MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 15}; typedef Int32 SKIPSMMaskPixelType; };
52499 template<> struct EnblendNumericTraits<UInt32> { typedef UInt32 ImagePixelComponentType; typedef UInt32 ImagePixelType; typedef CachedFileImage<UInt32> ImageType; typedef VigraTrueType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage<UInt8> AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage<UInt8> MaskType; typedef double ImagePyramidPixelComponentType; typedef double ImagePyramidPixelType; typedef CachedFileImage<double> ImagePyramidType; enum {ImagePyramidIntegerBits = 8}; enum {ImagePyramidFractionBits = 0}; typedef double SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int32 MaskPyramidPixelType; typedef CachedFileImage<Int32> MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 15}; typedef Int32 SKIPSMMaskPixelType; };template<> struct EnblendNumericTraits<RGBValue<UInt32,0,1,2> > { typedef UInt32 ImagePixelComponentType; typedef RGBValue<UInt32,0,1,2> ImagePixelType; typedef CachedFileImage<RGBValue<UInt32,0,1,2> > ImageType; typedef VigraFalseType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage<UInt8> AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage<UInt8> MaskType; typedef double ImagePyramidPixelComponentType; typedef RGBValue<double,0,1,2> ImagePyramidPixelType; typedef CachedFileImage<RGBValue<double,0,1,2> > ImagePyramidType; enum {ImagePyramidIntegerBits = 8}; enum {ImagePyramidFractionBits = 0}; typedef RGBValue<double,0,1,2> SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int32 MaskPyramidPixelType; typedef CachedFileImage<Int32> MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 15}; typedef Int32 SKIPSMMaskPixelType; };
52500
52501
52502 template<> struct EnblendNumericTraits<float> { typedef float ImagePixelComponentType; typedef float ImagePixelType; typedef CachedFileImage<float> ImageType; typedef VigraTrueType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage<UInt8> AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage<UInt8> MaskType; typedef double ImagePyramidPixelComponentType; typedef double ImagePyramidPixelType; typedef CachedFileImage<double> ImagePyramidType; enum {ImagePyramidIntegerBits = 8}; enum {ImagePyramidFractionBits = 0}; typedef double SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int32 MaskPyramidPixelType; typedef CachedFileImage<Int32> MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 15}; typedef Int32 SKIPSMMaskPixelType; };template<> struct EnblendNumericTraits<RGBValue<float,0,1,2> > { typedef float ImagePixelComponentType; typedef RGBValue<float,0,1,2> ImagePixelType; typedef CachedFileImage<RGBValue<float,0,1,2> > ImageType; typedef VigraFalseType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage<UInt8> AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage<UInt8> MaskType; typedef double ImagePyramidPixelComponentType; typedef RGBValue<double,0,1,2> ImagePyramidPixelType; typedef CachedFileImage<RGBValue<double,0,1,2> > ImagePyramidType; enum {ImagePyramidIntegerBits = 8}; enum {ImagePyramidFractionBits = 0}; typedef RGBValue<double,0,1,2> SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int32 MaskPyramidPixelType; typedef CachedFileImage<Int32> MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 15}; typedef Int32 SKIPSMMaskPixelType; };
52503 template<> struct EnblendNumericTraits<double> { typedef double ImagePixelComponentType; typedef double ImagePixelType; typedef CachedFileImage<double> ImageType; typedef VigraTrueType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage<UInt8> AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage<UInt8> MaskType; typedef double ImagePyramidPixelComponentType; typedef double ImagePyramidPixelType; typedef CachedFileImage<double> ImagePyramidType; enum {ImagePyramidIntegerBits = 8}; enum {ImagePyramidFractionBits = 0}; typedef double SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int32 MaskPyramidPixelType; typedef CachedFileImage<Int32> MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 15}; typedef Int32 SKIPSMMaskPixelType; };template<> struct EnblendNumericTraits<RGBValue<double,0,1,2> > { typedef double ImagePixelComponentType; typedef RGBValue<double,0,1,2> ImagePixelType; typedef CachedFileImage<RGBValue<double,0,1,2> > ImageType; typedef VigraFalseType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage<UInt8> AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage<UInt8> MaskType; typedef double ImagePyramidPixelComponentType; typedef RGBValue<double,0,1,2> ImagePyramidPixelType; typedef CachedFileImage<RGBValue<double,0,1,2> > ImagePyramidType; enum {ImagePyramidIntegerBits = 8}; enum {ImagePyramidFractionBits = 0}; typedef RGBValue<double,0,1,2> SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int32 MaskPyramidPixelType; typedef CachedFileImage<Int32> MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 15}; typedef Int32 SKIPSMMaskPixelType; };
52504
52505 }
52506 # 35 "enblend.h" 2
52507 # 1 "fixmath.h" 1
52508 # 24 "fixmath.h"
52509 # 1 "../config.h" 1
52510 # 25 "fixmath.h" 2
52511 # 35 "fixmath.h"
52512 # 1 "../include/vigra/mathutil.hxx" 1
52513 # 36 "fixmath.h" 2
52514
52515
52516
52517 using std::pair;
52518
52519 using vigra::NumericTraits;
52520 using vigra::triple;
52521
52522 namespace enblend {
52523
52524
52525
52526
52527 template <typename SrcPixelType, typename PyramidPixelType, int PyramidIntegerBits, int PyramidFractionBits>
52528 class ConvertScalarToPyramidFunctor {
52529
52530 public:
52531 ConvertScalarToPyramidFunctor() { }
52532
52533 inline PyramidPixelType operator()(const SrcPixelType &v) const {
52534 return doConvert(v, SrcIsIntegral(), PyramidIsIntegral());
52535 }
52536
52537 protected:
52538
52539 typedef typename NumericTraits<SrcPixelType>::isIntegral SrcIsIntegral;
52540 typedef typename NumericTraits<PyramidPixelType>::isIntegral PyramidIsIntegral;
52541
52542
52543 inline PyramidPixelType doConvert(const SrcPixelType &v, VigraTrueType, VigraTrueType) const {
52544 return convertIntegerToFixedPoint(v);
52545 }
52546
52547
52548 inline PyramidPixelType doConvert(const SrcPixelType &v, VigraTrueType, VigraFalseType) const {
52549 return NumericTraits<SrcPixelType>::toRealPromote(v);
52550 }
52551
52552
52553 inline PyramidPixelType doConvert(const SrcPixelType &v, VigraFalseType, VigraTrueType) const {
52554 return convertDoubleToFixedPoint(v);
52555 }
52556
52557
52558 inline PyramidPixelType doConvert(const SrcPixelType &v, VigraFalseType, VigraFalseType) const {
52559 return v;
52560 }
52561
52562 inline PyramidPixelType convertDoubleToFixedPoint(const double &v) const {
52563
52564
52565 return NumericTraits<PyramidPixelType>::fromRealPromote(v * (double)(1 << PyramidFractionBits));
52566 };
52567
52568 inline PyramidPixelType convertIntegerToFixedPoint(const SrcPixelType &v) const {
52569
52570 return (PyramidPixelType)v << PyramidFractionBits;
52571 };
52572
52573 };
52574
52575
52576
52577
52578 template <typename DestPixelType, typename PyramidPixelType, int PyramidIntegerBits, int PyramidFractionBits>
52579 class ConvertPyramidToScalarFunctor {
52580
52581 public:
52582 ConvertPyramidToScalarFunctor() { }
52583
52584 inline DestPixelType operator()(const PyramidPixelType &v) const {
52585 return doConvert(v, DestIsIntegral(), PyramidIsIntegral());
52586 }
52587
52588 protected:
52589
52590 typedef typename NumericTraits<DestPixelType>::isIntegral DestIsIntegral;
52591 typedef typename NumericTraits<PyramidPixelType>::isIntegral PyramidIsIntegral;
52592
52593
52594
52595
52596 inline DestPixelType doConvert(const PyramidPixelType &v, VigraTrueType, VigraTrueType) const {
52597
52598 PyramidPixelType half = 1 << (PyramidFractionBits-1);
52599 PyramidPixelType quarter = 1 << (PyramidFractionBits-2);
52600 PyramidPixelType threeQuarter = 3 << (PyramidFractionBits-2);
52601
52602 PyramidPixelType vFraction = v & ((1 << PyramidFractionBits) - 1);
52603
52604 if ((vFraction >= quarter) && (vFraction < threeQuarter)) {
52605 PyramidPixelType random = (PyramidPixelType(::Twister()) & (half - 1)) + quarter;
52606 if (random <= vFraction) {
52607 return DestPixelType(NumericTraits<DestPixelType>::fromPromote((v >> PyramidFractionBits) + 1));
52608 } else {
52609 return DestPixelType(NumericTraits<DestPixelType>::fromPromote(v >> PyramidFractionBits));
52610 }
52611 }
52612 else if (vFraction >= quarter) {
52613 return DestPixelType(NumericTraits<DestPixelType>::fromPromote((v >> PyramidFractionBits) + 1));
52614 }
52615 else {
52616 return DestPixelType(NumericTraits<DestPixelType>::fromPromote(v >> PyramidFractionBits));
52617 }
52618
52619 }
52620
52621
52622 inline DestPixelType doConvert(const PyramidPixelType &v, VigraTrueType, VigraFalseType) const {
52623 double d = dither(v);
52624 return NumericTraits<DestPixelType>::fromRealPromote(d);
52625 }
52626
52627
52628 inline DestPixelType doConvert(const PyramidPixelType &v, VigraFalseType, VigraTrueType) const {
52629 return convertFixedPointToDouble(v);
52630 }
52631
52632
52633 inline DestPixelType doConvert(const PyramidPixelType &v, VigraFalseType, VigraFalseType) const {
52634 return v;
52635 }
52636
52637
52638
52639
52640
52641
52642 inline double dither(const double &v) const {
52643 double vFraction = v - floor(v);
52644
52645 if (vFraction > 0.25 && vFraction <= 0.75) {
52646
52647 double random = 0.5 * (double)::Twister() / (2147483647 * 2U + 1U);
52648 if ((vFraction - 0.25) >= random) {
52649 return ceil(v);
52650 } else {
52651 return floor(v);
52652 }
52653 } else {
52654 return v;
52655 }
52656 }
52657
52658 inline double convertFixedPointToDouble(const PyramidPixelType &v) const {
52659 return NumericTraits<PyramidPixelType>::toRealPromote(v) / (double)(1 << PyramidFractionBits);
52660 };
52661
52662 };
52663
52664
52665 template <typename SrcVectorType, typename PyramidVectorType, int PyramidIntegerBits, int PyramidFractionBits>
52666 class ConvertVectorToPyramidFunctor {
52667
52668 typedef typename SrcVectorType::value_type SrcComponentType;
52669 typedef typename PyramidVectorType::value_type PyramidComponentType;
52670 typedef ConvertScalarToPyramidFunctor<SrcComponentType, PyramidComponentType,
52671 PyramidIntegerBits, PyramidFractionBits> ConvertFunctorType;
52672
52673 public:
52674 ConvertVectorToPyramidFunctor() : cf() {}
52675
52676 inline PyramidVectorType operator()(const SrcVectorType &v) const {
52677 return PyramidVectorType(cf(v.red()), cf(v.green()), cf(v.blue()));
52678 }
52679
52680 protected:
52681 ConvertFunctorType cf;
52682 };
52683
52684
52685 template <typename DestVectorType, typename PyramidVectorType, int PyramidIntegerBits, int PyramidFractionBits>
52686 class ConvertPyramidToVectorFunctor {
52687
52688 typedef typename DestVectorType::value_type DestComponentType;
52689 typedef typename PyramidVectorType::value_type PyramidComponentType;
52690 typedef ConvertPyramidToScalarFunctor<DestComponentType, PyramidComponentType,
52691 PyramidIntegerBits, PyramidFractionBits> ConvertFunctorType;
52692
52693 public:
52694 ConvertPyramidToVectorFunctor() : cf() {}
52695
52696 inline DestVectorType operator()(const PyramidVectorType &v) const {
52697 return DestVectorType(cf(v.red()), cf(v.green()), cf(v.blue()));
52698 }
52699
52700 protected:
52701 ConvertFunctorType cf;
52702 };
52703
52704
52705 template <typename SrcVectorType, typename PyramidVectorType, int PyramidIntegerBits, int PyramidFractionBits>
52706 class ConvertVectorToJCHPyramidFunctor {
52707
52708 typedef typename SrcVectorType::value_type SrcComponentType;
52709 typedef typename PyramidVectorType::value_type PyramidComponentType;
52710 typedef ConvertScalarToPyramidFunctor<double, PyramidComponentType,
52711 PyramidIntegerBits, PyramidFractionBits> ConvertFunctorType;
52712
52713 public:
52714 ConvertVectorToJCHPyramidFunctor() : cf() {
52715 scale = 1.0 / NumericTraits<SrcComponentType>::toRealPromote(
52716 NumericTraits<SrcComponentType>::max());
52717 }
52718
52719 inline PyramidVectorType operator()(const SrcVectorType &v) const {
52720
52721 double rgb[3];
52722 rgb[0] = scale * NumericTraits<SrcComponentType>::toRealPromote(v.red());
52723 rgb[1] = scale * NumericTraits<SrcComponentType>::toRealPromote(v.green());
52724 rgb[2] = scale * NumericTraits<SrcComponentType>::toRealPromote(v.blue());
52725
52726 double xyz[3];
52727 cmsDoTransform(InputToXYZTransform, rgb, xyz, 1);
52728
52729
52730
52731 cmsCIEXYZ cmsxyz;
52732 cmsxyz.X = xyz[0] * 100.0;
52733 cmsxyz.Y = xyz[1] * 100.0;
52734 cmsxyz.Z = xyz[2] * 100.0;
52735
52736 cmsJCh jch;
52737 cmsCIECAM02Forward(CIECAMTransform, &cmsxyz, &jch);
52738
52739
52740
52741 double theta = jch.h * 3.14159265358979323846 / 180.0;
52742 jch.h = jch.C * cos(theta);
52743 jch.C = jch.C * sin(theta);
52744
52745
52746 double shift = double(1 << (PyramidIntegerBits - 1 - 7));
52747 jch.J *= shift;
52748 jch.C *= shift;
52749 jch.h *= shift;
52750
52751 return PyramidVectorType(cf(jch.J), cf(jch.C), cf(jch.h));
52752 }
52753
52754 protected:
52755 ConvertFunctorType cf;
52756 double scale;
52757 };
52758
52759
52760 template <typename DestVectorType, typename PyramidVectorType, int PyramidIntegerBits, int PyramidFractionBits>
52761 class ConvertJCHPyramidToVectorFunctor {
52762
52763 typedef typename DestVectorType::value_type DestComponentType;
52764 typedef typename PyramidVectorType::value_type PyramidComponentType;
52765 typedef ConvertPyramidToScalarFunctor<double, PyramidComponentType,
52766 PyramidIntegerBits, PyramidFractionBits> ConvertFunctorType;
52767
52768 public:
52769 ConvertJCHPyramidToVectorFunctor() : cf() {
52770 scale = NumericTraits<DestComponentType>::toRealPromote(
52771 NumericTraits<DestComponentType>::max());
52772 }
52773
52774 inline DestVectorType operator()(const PyramidVectorType &v) const {
52775 cmsJCh jch;
52776 jch.J = cf(v.red());
52777 jch.C = cf(v.green());
52778 jch.h = cf(v.blue());
52779
52780
52781 double shift = double(1 << (PyramidIntegerBits - 1 - 7));
52782 jch.J /= shift;
52783 jch.C /= shift;
52784 jch.h /= shift;
52785
52786
52787 double r = sqrt(jch.C * jch.C + jch.h * jch.h);
52788 jch.h = (180.0 / 3.14159265358979323846) * atan2(jch.C, jch.h);
52789 if (jch.h < 0.0) jch.h += 360.0;
52790 jch.C = r;
52791
52792 cmsCIEXYZ cmsxyz;
52793 cmsCIECAM02Reverse(CIECAMTransform, &jch, &cmsxyz);
52794
52795
52796
52797 double xyz[3];
52798 xyz[0] = cmsxyz.X / 100.0;
52799 xyz[1] = cmsxyz.Y / 100.0;
52800 xyz[2] = cmsxyz.Z / 100.0;
52801
52802 double rgb[3];
52803 cmsDoTransform(XYZToInputTransform, xyz, rgb, 1);
52804
52805
52806 return DestVectorType(NumericTraits<DestComponentType>::fromRealPromote(rgb[0] * scale),
52807 NumericTraits<DestComponentType>::fromRealPromote(rgb[1] * scale),
52808 NumericTraits<DestComponentType>::fromRealPromote(rgb[2] * scale));
52809 }
52810
52811 protected:
52812 ConvertFunctorType cf;
52813 double scale;
52814 };
52815
52816
52817
52818 template <typename SrcImageType, typename PyramidImageType, int PyramidIntegerBits, int PyramidFractionBits>
52819 void copyToPyramidImage(
52820 typename SrcImageType::const_traverser src_upperleft,
52821 typename SrcImageType::const_traverser src_lowerright,
52822 typename SrcImageType::ConstAccessor sa,
52823 typename PyramidImageType::traverser dest_upperleft,
52824 typename PyramidImageType::Accessor da,
52825 VigraTrueType) {
52826
52827 typedef typename SrcImageType::value_type SrcPixelType;
52828 typedef typename PyramidImageType::value_type PyramidPixelType;
52829
52830 transformImage(src_upperleft, src_lowerright, sa,
52831 dest_upperleft, da,
52832 ConvertScalarToPyramidFunctor<SrcPixelType, PyramidPixelType, PyramidIntegerBits, PyramidFractionBits>());
52833 };
52834
52835
52836
52837
52838 template <typename SrcImageType, typename PyramidImageType, int PyramidIntegerBits, int PyramidFractionBits>
52839 void copyToPyramidImage(
52840 typename SrcImageType::const_traverser src_upperleft,
52841 typename SrcImageType::const_traverser src_lowerright,
52842 typename SrcImageType::ConstAccessor sa,
52843 typename PyramidImageType::traverser dest_upperleft,
52844 typename PyramidImageType::Accessor da,
52845 VigraFalseType) {
52846
52847 typedef typename SrcImageType::value_type SrcVectorType;
52848 typedef typename PyramidImageType::value_type PyramidVectorType;
52849
52850 if (UseCIECAM) {
52851 if (Verbose > 0) {
52852 cout << "CIECAM02 color conversion:";
52853 cout.flush();
52854 }
52855 int w = src_lowerright.x - src_upperleft.x;
52856 int twentyPercent = 1 + ((src_lowerright.y - src_upperleft.y) / 5);
52857 int tick = 1;
52858 for (int y = 0; src_upperleft.y < src_lowerright.y; ++src_upperleft.y, ++dest_upperleft.y, ++y) {
52859 if (Verbose > 0) {
52860 if ((y % twentyPercent) == 0) {
52861 cout << " " << tick++ << "/5";
52862 cout.flush();
52863 }
52864 }
52865 transformLine(src_upperleft.rowIterator(),
52866 src_upperleft.rowIterator() + w, sa,
52867 dest_upperleft.rowIterator(), da,
52868 ConvertVectorToJCHPyramidFunctor<SrcVectorType, PyramidVectorType, PyramidIntegerBits, PyramidFractionBits>());
52869 }
52870 if (Verbose > 0) cout << endl;
52871
52872
52873
52874 } else {
52875 transformImage(src_upperleft, src_lowerright, sa,
52876 dest_upperleft, da,
52877 ConvertVectorToPyramidFunctor<SrcVectorType, PyramidVectorType, PyramidIntegerBits, PyramidFractionBits>());
52878 }
52879
52880 };
52881
52882
52883 template <typename SrcImageType, typename PyramidImageType, int PyramidIntegerBits, int PyramidFractionBits>
52884 inline void copyToPyramidImage(
52885 typename SrcImageType::const_traverser src_upperleft,
52886 typename SrcImageType::const_traverser src_lowerright,
52887 typename SrcImageType::ConstAccessor sa,
52888 typename PyramidImageType::traverser dest_upperleft,
52889 typename PyramidImageType::Accessor da) {
52890
52891 typedef typename NumericTraits<typename SrcImageType::value_type>::isScalar src_is_scalar;
52892
52893 copyToPyramidImage<SrcImageType, PyramidImageType, PyramidIntegerBits, PyramidFractionBits>(
52894 src_upperleft,
52895 src_lowerright,
52896 sa,
52897 dest_upperleft,
52898 da,
52899 src_is_scalar());
52900 };
52901
52902
52903 template <typename SrcImageType, typename PyramidImageType, int PyramidIntegerBits, int PyramidFractionBits>
52904 inline void copyToPyramidImage(
52905 triple<typename SrcImageType::const_traverser, typename SrcImageType::const_traverser, typename SrcImageType::ConstAccessor> src,
52906 pair<typename PyramidImageType::traverser, typename PyramidImageType::Accessor> dest) {
52907 copyToPyramidImage<SrcImageType, PyramidImageType, PyramidIntegerBits, PyramidFractionBits>(
52908 src.first,
52909 src.second,
52910 src.third,
52911 dest.first,
52912 dest.second);
52913 };
52914
52915
52916 template <typename PyramidImageType, typename MaskImageType, typename DestImageType, int PyramidIntegerBits, int PyramidFractionBits>
52917 inline void copyFromPyramidImageIf(
52918 typename PyramidImageType::const_traverser src_upperleft,
52919 typename PyramidImageType::const_traverser src_lowerright,
52920 typename PyramidImageType::ConstAccessor sa,
52921 typename MaskImageType::const_traverser mask_upperleft,
52922 typename MaskImageType::ConstAccessor ma,
52923 typename DestImageType::traverser dest_upperleft,
52924 typename DestImageType::Accessor da,
52925 VigraTrueType) {
52926
52927 typedef typename DestImageType::value_type DestPixelType;
52928 typedef typename PyramidImageType::value_type PyramidPixelType;
52929
52930 transformImageIf(src_upperleft, src_lowerright, sa,
52931 mask_upperleft, ma,
52932 dest_upperleft, da,
52933 ConvertPyramidToScalarFunctor<DestPixelType, PyramidPixelType, PyramidIntegerBits, PyramidFractionBits>());
52934
52935 };
52936
52937
52938
52939
52940 template <typename PyramidImageType, typename MaskImageType, typename DestImageType, int PyramidIntegerBits, int PyramidFractionBits>
52941 inline void copyFromPyramidImageIf(
52942 typename PyramidImageType::const_traverser src_upperleft,
52943 typename PyramidImageType::const_traverser src_lowerright,
52944 typename PyramidImageType::ConstAccessor sa,
52945 typename MaskImageType::const_traverser mask_upperleft,
52946 typename MaskImageType::ConstAccessor ma,
52947 typename DestImageType::traverser dest_upperleft,
52948 typename DestImageType::Accessor da,
52949 VigraFalseType) {
52950
52951 typedef typename DestImageType::value_type DestVectorType;
52952 typedef typename PyramidImageType::value_type PyramidVectorType;
52953
52954 if (UseCIECAM) {
52955 if (Verbose > 0) {
52956 cout << "CIECAM02 color conversion:";
52957 cout.flush();
52958 }
52959 int w = src_lowerright.x - src_upperleft.x;
52960 int twentyPercent = 1 + ((src_lowerright.y - src_upperleft.y) / 5);
52961 int tick = 1;
52962 for (int y = 0; src_upperleft.y < src_lowerright.y; ++src_upperleft.y, ++mask_upperleft.y, ++dest_upperleft.y, ++y) {
52963 if (Verbose > 0) {
52964 if ((y % twentyPercent) == 0) {
52965 cout << " " << tick++ << "/5";
52966 cout.flush();
52967 }
52968 }
52969 transformLineIf(src_upperleft.rowIterator(),
52970 src_upperleft.rowIterator() + w, sa,
52971 mask_upperleft.rowIterator(), ma,
52972 dest_upperleft.rowIterator(), da,
52973 ConvertJCHPyramidToVectorFunctor<DestVectorType, PyramidVectorType, PyramidIntegerBits, PyramidFractionBits>());
52974 }
52975 if (Verbose > 0) cout << endl;
52976
52977
52978
52979
52980 } else {
52981 transformImageIf(src_upperleft, src_lowerright, sa,
52982 mask_upperleft, ma,
52983 dest_upperleft, da,
52984 ConvertPyramidToVectorFunctor<DestVectorType, PyramidVectorType, PyramidIntegerBits, PyramidFractionBits>());
52985 }
52986
52987 };
52988
52989
52990 template <typename PyramidImageType, typename MaskImageType, typename DestImageType, int PyramidIntegerBits, int PyramidFractionBits>
52991 inline void copyFromPyramidImageIf(
52992 typename PyramidImageType::const_traverser src_upperleft,
52993 typename PyramidImageType::const_traverser src_lowerright,
52994 typename PyramidImageType::ConstAccessor sa,
52995 typename MaskImageType::const_traverser mask_upperleft,
52996 typename MaskImageType::ConstAccessor ma,
52997 typename DestImageType::traverser dest_upperleft,
52998 typename DestImageType::Accessor da) {
52999
53000 typedef typename NumericTraits<typename PyramidImageType::value_type>::isScalar src_is_scalar;
53001
53002 copyFromPyramidImageIf<PyramidImageType, MaskImageType, DestImageType, PyramidIntegerBits, PyramidFractionBits>(
53003 src_upperleft,
53004 src_lowerright,
53005 sa,
53006 mask_upperleft,
53007 ma,
53008 dest_upperleft,
53009 da,
53010 src_is_scalar());
53011 };
53012
53013
53014 template <typename PyramidImageType, typename MaskImageType, typename DestImageType, int PyramidIntegerBits, int PyramidFractionBits>
53015 inline void copyFromPyramidImageIf(
53016 triple<typename PyramidImageType::const_traverser, typename PyramidImageType::const_traverser, typename PyramidImageType::ConstAccessor> src,
53017 pair<typename MaskImageType::const_traverser, typename MaskImageType::ConstAccessor> mask,
53018 pair<typename DestImageType::traverser, typename DestImageType::Accessor> dest) {
53019
53020 copyFromPyramidImageIf<PyramidImageType, MaskImageType, DestImageType, PyramidIntegerBits, PyramidFractionBits>(
53021 src.first,
53022 src.second,
53023 src.third,
53024 mask.first,
53025 mask.second,
53026 dest.first,
53027 dest.second);
53028 };
53029
53030 }
53031 # 36 "enblend.h" 2
53032 # 1 "assemble.h" 1
53033 # 24 "assemble.h"
53034 # 1 "../config.h" 1
53035 # 25 "assemble.h" 2
53036 # 38 "assemble.h"
53037 # 1 "../include/vigra/copyimage.hxx" 1
53038 # 43 "../include/vigra/copyimage.hxx"
53039 namespace vigra {
53040 # 56 "../include/vigra/copyimage.hxx"
53041 template <class SrcIterator, class SrcAccessor,
53042 class DestIterator, class DestAccessor>
53043 void
53044 copyLine(SrcIterator s,
53045 SrcIterator send, SrcAccessor src,
53046 DestIterator d, DestAccessor dest)
53047 {
53048 for(; s != send; ++s, ++d)
53049 dest.set(src(s), d);
53050 }
53051
53052 template <class SrcIterator, class SrcAccessor,
53053 class MaskIterator, class MaskAccessor,
53054 class DestIterator, class DestAccessor>
53055 void
53056 copyLineIf(SrcIterator s,
53057 SrcIterator send, SrcAccessor src,
53058 MaskIterator m, MaskAccessor mask,
53059 DestIterator d, DestAccessor dest)
53060 {
53061 for(; s != send; ++s, ++d, ++m)
53062 if(mask(m))
53063 dest.set(src(s), d);
53064 }
53065 # 144 "../include/vigra/copyimage.hxx"
53066 template <class SrcImageIterator, class SrcAccessor,
53067 class DestImageIterator, class DestAccessor>
53068 void
53069 copyImage(SrcImageIterator src_upperleft,
53070 SrcImageIterator src_lowerright, SrcAccessor sa,
53071 DestImageIterator dest_upperleft, DestAccessor da)
53072 {
53073 int w = src_lowerright.x - src_upperleft.x;
53074
53075 for(; src_upperleft.y<src_lowerright.y; ++src_upperleft.y, ++dest_upperleft.y)
53076 {
53077 copyLine(src_upperleft.rowIterator(),
53078 src_upperleft.rowIterator() + w, sa,
53079 dest_upperleft.rowIterator(), da);
53080 }
53081 }
53082
53083 template <class SrcImageIterator, class SrcAccessor,
53084 class DestImageIterator, class DestAccessor>
53085 inline
53086 void
53087 copyImage(triple<SrcImageIterator, SrcImageIterator, SrcAccessor> src,
53088 pair<DestImageIterator, DestAccessor> dest)
53089 {
53090 copyImage(src.first, src.second, src.third,
53091 dest.first, dest.second);
53092 }
53093 # 246 "../include/vigra/copyimage.hxx"
53094 template <class SrcImageIterator, class SrcAccessor,
53095 class MaskImageIterator, class MaskAccessor,
53096 class DestImageIterator, class DestAccessor>
53097 void
53098 copyImageIf(SrcImageIterator src_upperleft,
53099 SrcImageIterator src_lowerright, SrcAccessor sa,
53100 MaskImageIterator mask_upperleft, MaskAccessor ma,
53101 DestImageIterator dest_upperleft, DestAccessor da)
53102 {
53103 int w = src_lowerright.x - src_upperleft.x;
53104
53105 for(; src_upperleft.y<src_lowerright.y;
53106 ++src_upperleft.y, ++mask_upperleft.y, ++dest_upperleft.y)
53107 {
53108 copyLineIf(src_upperleft.rowIterator(),
53109 src_upperleft.rowIterator() + w, sa,
53110 mask_upperleft.rowIterator(), ma,
53111 dest_upperleft.rowIterator(), da);
53112 }
53113 }
53114
53115 template <class SrcImageIterator, class SrcAccessor,
53116 class MaskImageIterator, class MaskAccessor,
53117 class DestImageIterator, class DestAccessor>
53118 inline
53119 void
53120 copyImageIf(triple<SrcImageIterator, SrcImageIterator, SrcAccessor> src,
53121 pair<MaskImageIterator, MaskAccessor> mask,
53122 pair<DestImageIterator, DestAccessor> dest)
53123 {
53124 copyImageIf(src.first, src.second, src.third,
53125 mask.first, mask.second,
53126 dest.first, dest.second);
53127 }
53128
53129
53130
53131 }
53132 # 39 "assemble.h" 2
53133 # 1 "../include/vigra/impex.hxx" 1
53134 # 65 "../include/vigra/impex.hxx"
53135 # 1 "../include/vigra/stdimage.hxx" 1
53136 # 43 "../include/vigra/stdimage.hxx"
53137 # 1 "../include/vigra/basicimage.hxx" 1
53138 # 44 "../include/vigra/stdimage.hxx" 2
53139
53140
53141 # 1 "../include/vigra/rgbvalue.hxx" 1
53142 # 46 "../include/vigra/rgbvalue.hxx"
53143 # 1 "../include/vigra/tinyvector.hxx" 1
53144 # 49 "../include/vigra/tinyvector.hxx"
53145 namespace vigra {
53146
53147 using std::abs;
53148 using std::ceil;
53149 using std::floor;
53150
53151
53152 template <class V1, int SIZE, class D1, class D2>
53153 class TinyVectorBase;
53154
53155 template <class V1, int SIZE, class D1, class D2>
53156 inline
53157 typename TinyVectorBase<V1, SIZE, D1, D2>::SquaredNormType
53158 squaredNorm(TinyVectorBase<V1, SIZE, D1, D2> const & t);
53159
53160
53161 namespace detail {
53162 # 83 "../include/vigra/tinyvector.hxx"
53163 template <int LEVEL>
53164 struct ExecLoop
53165 {
53166 template <class T1, class T2>
53167 static void assignCast(T1 * left, T2 const * right)
53168 {
53169 for(int i=0; i<LEVEL; ++i)
53170 left[i] = detail::RequiresExplicitCast<T1>::cast(right[i]);
53171 }
53172
53173 template <class T1, class T2> static void assign(T1 * left, T2 const * right) { for(int i=0; i<LEVEL; ++i) (left[i]) = (right[i]); }
53174 template <class T1, class T2> static void add(T1 * left, T2 const * right) { for(int i=0; i<LEVEL; ++i) (left[i]) += (right[i]); }
53175 template <class T1, class T2> static void sub(T1 * left, T2 const * right) { for(int i=0; i<LEVEL; ++i) (left[i]) -= (right[i]); }
53176 template <class T1, class T2> static void mul(T1 * left, T2 const * right) { for(int i=0; i<LEVEL; ++i) (left[i]) *= (right[i]); }
53177 template <class T1, class T2> static void neg(T1 * left, T2 const * right) { for(int i=0; i<LEVEL; ++i) (left[i]) = - (right[i]); }
53178 template <class T1, class T2> static void abs(T1 * left, T2 const * right) { for(int i=0; i<LEVEL; ++i) (left[i]) = vigra::abs (right[i]); }
53179 template <class T1, class T2> static void floor(T1 * left, T2 const * right) { for(int i=0; i<LEVEL; ++i) (left[i]) = vigra::floor (right[i]); }
53180 template <class T1, class T2> static void ceil(T1 * left, T2 const * right) { for(int i=0; i<LEVEL; ++i) (left[i]) = vigra::ceil (right[i]); }
53181 template <class T1, class T2> static void fromPromote(T1 * left, T2 const * right) { for(int i=0; i<LEVEL; ++i) (left[i]) = NumericTraits<T1>::fromPromote (right[i]); }
53182 template <class T1, class T2> static void fromRealPromote(T1 * left, T2 const * right) { for(int i=0; i<LEVEL; ++i) (left[i]) = NumericTraits<T1>::fromRealPromote (right[i]); }
53183 template <class T1, class T2> static void assignScalar(T1 * left, T2 right) { for(int i=0; i<LEVEL; ++i) (left[i]) = (right); }
53184 template <class T1, class T2> static void mulScalar(T1 * left, T2 right) { for(int i=0; i<LEVEL; ++i) (left[i]) *= (right); }
53185 template <class T1, class T2> static void divScalar(T1 * left, T2 right) { for(int i=0; i<LEVEL; ++i) (left[i]) /= (right); }
53186
53187 template <class T1, class T2>
53188 static bool notEqual(T1 const * left, T2 const * right)
53189 {
53190 for(int i=0; i<LEVEL; ++i)
53191 if(left[i] != right[i])
53192 return true;
53193 return false;
53194 }
53195
53196 template <class T>
53197 static typename NumericTraits<T>::Promote
53198 dot(T const * d)
53199 {
53200 typename NumericTraits<T>::Promote res(*d * *d);
53201 for(int i=1; i<LEVEL; ++i)
53202 res += d[i] * d[i];
53203 return res;
53204 }
53205
53206 template <class T1, class T2>
53207 static typename PromoteTraits<T1, T2>::Promote
53208 dot(T1 const * left, T2 const * right)
53209 {
53210 typename PromoteTraits<T1, T2>::Promote res(*left * *right);
53211 for(int i=1; i<LEVEL; ++i)
53212 res += left[i] * right[i];
53213 return res;
53214 }
53215
53216 template <class T>
53217 static typename NormTraits<T>::SquaredNormType
53218 squaredNorm(T const * d)
53219 {
53220 typename NormTraits<T>::SquaredNormType res = vigra::squaredNorm(*d);
53221 for(int i=1; i<LEVEL; ++i)
53222 res += vigra::squaredNorm(d[i]);
53223 return res;
53224 }
53225 };
53226
53227 template <int LEVEL>
53228 struct UnrollDot
53229 {
53230 template <class T>
53231 static typename NumericTraits<T>::Promote
53232 dot(T const * d)
53233 {
53234 return *d * *d + UnrollDot<LEVEL-1>::dot(d+1);
53235 }
53236
53237 template <class T1, class T2>
53238 static typename PromoteTraits<T1, T2>::Promote
53239 dot(T1 const * left, T2 const * right)
53240 {
53241 return *left * *right + UnrollDot<LEVEL-1>::dot(left+1, right+1);
53242 }
53243 };
53244
53245 template <>
53246 struct UnrollDot<1>
53247 {
53248 template <class T>
53249 static typename NumericTraits<T>::Promote
53250 dot(T const * d)
53251 {
53252 return *d * *d ;
53253 }
53254
53255 template <class T1, class T2>
53256 static typename PromoteTraits<T1, T2>::Promote
53257 dot(T1 const * left, T2 const * right)
53258 {
53259 return *left * *right;
53260 }
53261 };
53262
53263 template <int LEVEL>
53264 struct UnrollSquaredNorm
53265 {
53266 template <class T>
53267 static typename NormTraits<T>::SquaredNormType
53268 squaredNorm(T const * d)
53269 {
53270 return vigra::squaredNorm(*d) + UnrollSquaredNorm<LEVEL-1>::squaredNorm(d+1);
53271 }
53272 };
53273
53274 template <>
53275 struct UnrollSquaredNorm<1>
53276 {
53277 template <class T>
53278 static typename NormTraits<T>::SquaredNormType
53279 squaredNorm(T const * d)
53280 {
53281 return vigra::squaredNorm(*d);
53282 }
53283 };
53284 # 225 "../include/vigra/tinyvector.hxx"
53285 template <int LEVEL>
53286 struct UnrollLoop
53287 {
53288 template <class T1, class T2>
53289 static void assignCast(T1 * left, T2 const * right)
53290 {
53291 *left = detail::RequiresExplicitCast<T1>::cast(*right);
53292 UnrollLoop<LEVEL-1>::assignCast(left+1, right+1);
53293 }
53294
53295 template <class T1, class T2> static void assign(T1 * left, T2 const * right) { (*left) = (*right); UnrollLoop<LEVEL-1>::assign(left+1, right+1); }
53296 template <class T1, class T2> static void add(T1 * left, T2 const * right) { (*left) += (*right); UnrollLoop<LEVEL-1>::add(left+1, right+1); }
53297 template <class T1, class T2> static void sub(T1 * left, T2 const * right) { (*left) -= (*right); UnrollLoop<LEVEL-1>::sub(left+1, right+1); }
53298 template <class T1, class T2> static void mul(T1 * left, T2 const * right) { (*left) *= (*right); UnrollLoop<LEVEL-1>::mul(left+1, right+1); }
53299 template <class T1, class T2> static void neg(T1 * left, T2 const * right) { (*left) = - (*right); UnrollLoop<LEVEL-1>::neg(left+1, right+1); }
53300 template <class T1, class T2> static void abs(T1 * left, T2 const * right) { (*left) = vigra::abs (*right); UnrollLoop<LEVEL-1>::abs(left+1, right+1); }
53301 template <class T1, class T2> static void floor(T1 * left, T2 const * right) { (*left) = vigra::floor (*right); UnrollLoop<LEVEL-1>::floor(left+1, right+1); }
53302 template <class T1, class T2> static void ceil(T1 * left, T2 const * right) { (*left) = vigra::ceil (*right); UnrollLoop<LEVEL-1>::ceil(left+1, right+1); }
53303 template <class T1, class T2> static void fromPromote(T1 * left, T2 const * right) { (*left) = NumericTraits<T1>::fromPromote (*right); UnrollLoop<LEVEL-1>::fromPromote(left+1, right+1); }
53304 template <class T1, class T2> static void fromRealPromote(T1 * left, T2 const * right) { (*left) = NumericTraits<T1>::fromRealPromote (*right); UnrollLoop<LEVEL-1>::fromRealPromote(left+1, right+1); }
53305 template <class T1, class T2> static void assignScalar(T1 * left, T2 right) { (*left) = (right); UnrollLoop<LEVEL-1>::assignScalar(left+1, right); }
53306 template <class T1, class T2> static void mulScalar(T1 * left, T2 right) { (*left) *= (right); UnrollLoop<LEVEL-1>::mulScalar(left+1, right); }
53307 template <class T1, class T2> static void divScalar(T1 * left, T2 right) { (*left) /= (right); UnrollLoop<LEVEL-1>::divScalar(left+1, right); }
53308
53309 template <class T1, class T2>
53310 static bool notEqual(T1 const * left, T2 const * right)
53311 {
53312 return (*left != *right) || UnrollLoop<LEVEL - 1>::notEqual(left+1, right+1);
53313 }
53314
53315 template <class T>
53316 static typename NumericTraits<T>::Promote
53317 dot(T const * d)
53318 {
53319 return UnrollDot<LEVEL>::dot(d);
53320 }
53321
53322 template <class T1, class T2>
53323 static typename PromoteTraits<T1, T2>::Promote
53324 dot(T1 const * left, T2 const * right)
53325 {
53326 return UnrollDot<LEVEL>::dot(left, right);
53327 }
53328
53329 template <class T>
53330 static typename NormTraits<T>::SquaredNormType
53331 squaredNorm(T const * d)
53332 {
53333 return UnrollSquaredNorm<LEVEL>::squaredNorm(d);
53334 }
53335 };
53336
53337
53338
53339
53340 template <>
53341 struct UnrollLoop<0>
53342 {
53343 template <class T1, class T2>
53344 static void assignCast(T1, T2) {}
53345 template <class T1, class T2>
53346 static void assign(T1, T2) {}
53347 template <class T1, class T2>
53348 static void assignScalar(T1, T2) {}
53349 template <class T1, class T2>
53350 static void add(T1, T2) {}
53351 template <class T1, class T2>
53352 static void sub(T1, T2) {}
53353 template <class T1, class T2>
53354 static void mul(T1, T2) {}
53355 template <class T1, class T2>
53356 static void mulScalar(T1, T2) {}
53357 template <class T1, class T2>
53358 static void div(T1, T2) {}
53359 template <class T1, class T2>
53360 static void divScalar(T1, T2) {}
53361 template <class T1, class T2>
53362 static void fromPromote(T1, T2) {}
53363 template <class T1, class T2>
53364 static void fromRealPromote(T1, T2) {}
53365 template <class T1, class T2>
53366 static void neg(T1, T2) {}
53367 template <class T1, class T2>
53368 static void abs(T1, T2) {}
53369 template <class T1, class T2>
53370 static void floor(T1, T2) {}
53371 template <class T1, class T2>
53372 static void ceil(T1, T2) {}
53373 template <class T1, class T2>
53374 static bool notEqual(T1, T2) { return false; }
53375 };
53376
53377 template <bool PREDICATE>
53378 struct TinyVectorIf
53379 {
53380 template <class T, class F>
53381 struct res
53382 {
53383 typedef T type;
53384 };
53385 };
53386
53387 template <>
53388 struct TinyVectorIf<false>
53389 {
53390 template <class T, class F>
53391 struct res
53392 {
53393 typedef F type;
53394 };
53395 };
53396
53397 template <int SIZE>
53398 struct LoopType
53399 {
53400 typedef typename TinyVectorIf<SIZE < 5>::
53401 template res<UnrollLoop<SIZE>, ExecLoop<SIZE> >::type type;
53402 };
53403
53404 struct DontInit {};
53405
53406 inline DontInit dontInit() {return DontInit(); }
53407
53408 }
53409
53410 template <class T, int SIZE>
53411 class TinyVector;
53412
53413 template <class T, int SIZE>
53414 class TinyVectorView;
53415 # 371 "../include/vigra/tinyvector.hxx"
53416 template <class VALUETYPE, int SIZE, class DATA, class DERIVED>
53417 class TinyVectorBase
53418 {
53419 TinyVectorBase(TinyVectorBase const &);
53420
53421 TinyVectorBase & operator=(TinyVectorBase const & other);
53422
53423 protected:
53424
53425 typedef typename detail::LoopType<SIZE>::type Loop;
53426
53427 TinyVectorBase()
53428 {}
53429
53430 public:
53431
53432
53433 typedef VALUETYPE value_type;
53434
53435
53436
53437 typedef VALUETYPE & reference;
53438
53439
53440
53441 typedef VALUETYPE const & const_reference;
53442
53443
53444
53445 typedef VALUETYPE * pointer;
53446
53447
53448
53449 typedef VALUETYPE const * const_pointer;
53450
53451
53452
53453 typedef value_type * iterator;
53454
53455
53456
53457 typedef value_type const * const_iterator;
53458
53459
53460
53461 typedef unsigned int size_type;
53462
53463
53464
53465 typedef int difference_type;
53466
53467
53468
53469 typedef double scalar_multiplier;
53470
53471
53472
53473 typedef typename NormTraits<VALUETYPE>::SquaredNormType SquaredNormType;
53474
53475
53476
53477 typedef typename SquareRootTraits<SquaredNormType>::SquareRootResult NormType;
53478
53479
53480
53481 enum { static_size = SIZE };
53482
53483
53484
53485 template <class Iterator>
53486 void init(Iterator i, Iterator end)
53487 {
53488 vigra::throw_precondition_error((end-i == SIZE), "TinyVector::init(): Sequence has wrong size.");
53489
53490 Loop::assignCast(data_, i);
53491 }
53492
53493
53494
53495 template <class T1, class D1, class D2>
53496 DERIVED & operator+=(TinyVectorBase<T1, SIZE, D1, D2> const & r)
53497 {
53498 Loop::add(data_, r.begin());
53499 return static_cast<DERIVED &>(*this);
53500 }
53501
53502
53503
53504 template <class T1, class D1, class D2>
53505 DERIVED & operator-=(TinyVectorBase<T1, SIZE, D1, D2> const & r)
53506 {
53507 Loop::sub(data_, r.begin());
53508 return static_cast<DERIVED &>(*this);
53509 }
53510
53511
53512
53513 template <class T1, class D1, class D2>
53514 DERIVED & operator*=(TinyVectorBase<T1, SIZE, D1, D2> const & r)
53515 {
53516 Loop::mul(data_, r.begin());
53517 return static_cast<DERIVED &>(*this);
53518 }
53519
53520
53521
53522 DERIVED & operator*=(double r)
53523 {
53524 Loop::mulScalar(data_, r);
53525 return static_cast<DERIVED &>(*this);
53526 }
53527
53528
53529
53530 DERIVED & operator/=(double r)
53531 {
53532 Loop::divScalar(data_, r);
53533 return static_cast<DERIVED &>(*this);
53534 }
53535
53536
53537
53538 NormType magnitude() const
53539 {
53540 return sqrt(static_cast<typename
53541 SquareRootTraits<SquaredNormType>::SquareRootArgument>(squaredMagnitude()));
53542 }
53543
53544
53545
53546 SquaredNormType squaredMagnitude() const
53547 {
53548 return Loop::squaredNorm(data_);
53549 }
53550
53551
53552
53553 reference operator[](difference_type i) { return data_[i]; }
53554
53555
53556
53557 const_reference operator[](difference_type i) const { return data_[i]; }
53558
53559
53560
53561 iterator begin() { return data_; }
53562
53563
53564 iterator end() { return data_ + SIZE; }
53565
53566
53567
53568 const_iterator begin() const { return data_; }
53569
53570
53571
53572 const_iterator end() const { return data_ + SIZE; }
53573
53574
53575
53576 size_type size() const { return SIZE; }
53577
53578 pointer data() { return data_; }
53579
53580 const_pointer data() const { return data_; }
53581
53582
53583 protected:
53584 DATA data_;
53585 };
53586 # 581 "../include/vigra/tinyvector.hxx"
53587 template <class T, int SIZE>
53588 class TinyVector
53589 : public TinyVectorBase<T, SIZE, T[SIZE], TinyVector<T, SIZE> >
53590 {
53591 typedef TinyVectorBase<T, SIZE, T[SIZE], TinyVector<T, SIZE> > BaseType;
53592 typedef typename BaseType::Loop Loop;
53593
53594 public:
53595
53596 typedef typename BaseType::value_type value_type;
53597 typedef typename BaseType::reference reference;
53598 typedef typename BaseType::const_reference const_reference;
53599 typedef typename BaseType::pointer pointer;
53600 typedef typename BaseType::const_pointer const_pointer;
53601 typedef typename BaseType::iterator iterator;
53602 typedef typename BaseType::const_iterator const_iterator;
53603 typedef typename BaseType::size_type size_type;
53604 typedef typename BaseType::difference_type difference_type;
53605 typedef typename BaseType::scalar_multiplier scalar_multiplier;
53606 typedef typename BaseType::SquaredNormType SquaredNormType;
53607 typedef typename BaseType::NormType NormType;
53608
53609
53610
53611 explicit TinyVector(value_type const & initial)
53612 : BaseType()
53613 {
53614 Loop::assignScalar(BaseType::begin(), initial);
53615 }
53616
53617
53618
53619
53620 TinyVector(value_type const & i1, value_type const & i2)
53621 : BaseType()
53622 {
53623 BaseType::data_[0] = i1;
53624 BaseType::data_[1] = i2;
53625 }
53626
53627
53628
53629
53630 TinyVector(value_type const & i1, value_type const & i2, value_type const & i3)
53631 : BaseType()
53632 {
53633 BaseType::data_[0] = i1;
53634 BaseType::data_[1] = i2;
53635 BaseType::data_[2] = i3;
53636 }
53637
53638
53639
53640
53641 TinyVector(value_type const & i1, value_type const & i2,
53642 value_type const & i3, value_type const & i4)
53643 : BaseType()
53644 {
53645 BaseType::data_[0] = i1;
53646 BaseType::data_[1] = i2;
53647 BaseType::data_[2] = i3;
53648 BaseType::data_[3] = i4;
53649 }
53650
53651
53652
53653 TinyVector()
53654 : BaseType()
53655 {
53656 Loop::assignScalar(BaseType::data_, NumericTraits<value_type>::zero());
53657 }
53658
53659
53660
53661 TinyVector(TinyVector const & r)
53662 : BaseType()
53663 {
53664 Loop::assign(BaseType::data_, r.data_);
53665 }
53666
53667
53668
53669 explicit TinyVector(const_pointer data)
53670 : BaseType()
53671 {
53672 Loop::assign(BaseType::data_, data);
53673 }
53674
53675
53676
53677 TinyVector & operator=(TinyVector const & r)
53678 {
53679 Loop::assign(BaseType::data_, r.data_);
53680 return *this;
53681 }
53682
53683
53684
53685 template <class U, class DATA, class DERIVED>
53686 TinyVector(TinyVectorBase<U, SIZE, DATA, DERIVED> const & r)
53687 : BaseType()
53688 {
53689 Loop::assignCast(BaseType::data_, r.begin());
53690 }
53691
53692
53693
53694 template <class U, class DATA, class DERIVED>
53695 TinyVector & operator=(TinyVectorBase<U, SIZE, DATA, DERIVED> const & r)
53696 {
53697 Loop::assignCast(BaseType::data_, r.begin());
53698 return *this;
53699 }
53700
53701 explicit TinyVector(detail::DontInit)
53702 : BaseType()
53703 {}
53704 };
53705 # 729 "../include/vigra/tinyvector.hxx"
53706 template <class T, int SIZE>
53707 class TinyVectorView
53708 : public TinyVectorBase<T, SIZE, T *, TinyVectorView<T, SIZE> >
53709 {
53710 typedef TinyVectorBase<T, SIZE, T *, TinyVectorView<T, SIZE> > BaseType;
53711 typedef typename BaseType::Loop Loop;
53712
53713 public:
53714
53715 typedef typename BaseType::value_type value_type;
53716 typedef typename BaseType::reference reference;
53717 typedef typename BaseType::const_reference const_reference;
53718 typedef typename BaseType::pointer pointer;
53719 typedef typename BaseType::const_pointer const_pointer;
53720 typedef typename BaseType::iterator iterator;
53721 typedef typename BaseType::const_iterator const_iterator;
53722 typedef typename BaseType::size_type size_type;
53723 typedef typename BaseType::difference_type difference_type;
53724 typedef typename BaseType::scalar_multiplier scalar_multiplier;
53725 typedef typename BaseType::SquaredNormType SquaredNormType;
53726 typedef typename BaseType::NormType NormType;
53727
53728
53729
53730
53731 TinyVectorView()
53732 : BaseType()
53733 {
53734 BaseType::data_ = 0;
53735 }
53736
53737
53738
53739 TinyVectorView(const_pointer data)
53740 : BaseType()
53741 {
53742 BaseType::data_ = const_cast<pointer>(data);
53743 }
53744
53745
53746
53747 TinyVectorView(TinyVectorView const & other)
53748 : BaseType()
53749 {
53750 BaseType::data_ = const_cast<pointer>(other.data_);
53751 }
53752
53753
53754
53755 template <class DATA, class DERIVED>
53756 TinyVectorView(TinyVectorBase<T, SIZE, DATA, DERIVED> const & other)
53757 : BaseType()
53758 {
53759 BaseType::data_ = const_cast<pointer>(other.data());
53760 }
53761
53762
53763
53764 TinyVectorView & operator=(TinyVectorView const & r)
53765 {
53766 Loop::assign(BaseType::data_, r.begin());
53767 return *this;
53768 }
53769
53770
53771
53772 template <class U, class DATA, class DERIVED>
53773 TinyVectorView & operator=(TinyVectorBase<U, SIZE, DATA, DERIVED> const & r)
53774 {
53775 Loop::assignCast(BaseType::data_, r.begin());
53776 return *this;
53777 }
53778 };
53779 # 822 "../include/vigra/tinyvector.hxx"
53780 template <class V1, int SIZE, class D1, class D2, class V2, class D3, class D4>
53781 inline bool
53782 operator==(TinyVectorBase<V1, SIZE, D1, D2> const & l,
53783 TinyVectorBase<V2, SIZE, D3, D4> const & r)
53784 {
53785 return !(l != r);
53786 }
53787
53788
53789 template <class V1, int SIZE, class D1, class D2, class V2, class D3, class D4>
53790 inline bool
53791 operator!=(TinyVectorBase<V1, SIZE, D1, D2> const & l,
53792 TinyVectorBase<V2, SIZE, D3, D4> const & r)
53793 {
53794 typedef typename detail::LoopType<SIZE>::type ltype;
53795 return ltype::notEqual(l.begin(), r.begin());
53796 }
53797 # 847 "../include/vigra/tinyvector.hxx"
53798 template <class V1, int SIZE, class DATA, class DERIVED>
53799 std::ostream &
53800 operator<<(std::ostream & out, TinyVectorBase<V1, SIZE, DATA, DERIVED> const & l)
53801 {
53802 out << "(";
53803 int i;
53804 for(i=0; i<SIZE-1; ++i)
53805 out << l[i] << ", ";
53806 out << l[i] << ")";
53807 return out;
53808 }
53809 # 914 "../include/vigra/tinyvector.hxx"
53810 template <class T, int SIZE>
53811 struct NumericTraits<TinyVector<T, SIZE> >
53812 {
53813 typedef TinyVector<T, SIZE> Type;
53814 typedef TinyVector<typename NumericTraits<T>::Promote, SIZE> Promote;
53815 typedef TinyVector<typename NumericTraits<T>::RealPromote, SIZE> RealPromote;
53816 typedef TinyVector<typename NumericTraits<T>::ComplexPromote, SIZE> ComplexPromote;
53817 typedef T ValueType;
53818
53819 typedef typename NumericTraits<T>::isIntegral isIntegral;
53820 typedef VigraFalseType isScalar;
53821 typedef typename NumericTraits<T>::isSigned isSigned;
53822 typedef VigraFalseType isOrdered;
53823 typedef VigraFalseType isComplex;
53824
53825 static TinyVector<T, SIZE> zero() {
53826 return TinyVector<T, SIZE>(NumericTraits<T>::zero());
53827 }
53828 static TinyVector<T, SIZE> one() {
53829 return TinyVector<T, SIZE>(NumericTraits<T>::one());
53830 }
53831 static TinyVector<T, SIZE> nonZero() {
53832 return TinyVector<T, SIZE>(NumericTraits<T>::nonZero());
53833 }
53834
53835 template <class D1, class D2>
53836 static Promote toPromote(TinyVectorBase<T, SIZE, D1, D2> const & v)
53837 {
53838 return Promote(v);
53839 }
53840
53841 template <class D1, class D2>
53842 static RealPromote toRealPromote(TinyVectorBase<T, SIZE, D1, D2> const & v)
53843 {
53844 return RealPromote(v);
53845 }
53846
53847 template <class D1, class D2>
53848 static TinyVector<T, SIZE>
53849 fromPromote(TinyVectorBase<typename NumericTraits<T>::Promote, SIZE, D1, D2> const & v)
53850 {
53851 TinyVector<T, SIZE> res(detail::dontInit());
53852 typedef typename detail::LoopType<SIZE>::type ltype;
53853 ltype::fromPromote(res.begin(), v.begin());
53854 return res;
53855 }
53856
53857 template <class D1, class D2>
53858 static TinyVector<T, SIZE>
53859 fromRealPromote(TinyVectorBase<typename NumericTraits<T>::RealPromote, SIZE, D1, D2> const & v)
53860 {
53861 TinyVector<T, SIZE> res(detail::dontInit());
53862 typedef typename detail::LoopType<SIZE>::type ltype;
53863 ltype::fromRealPromote(res.begin(), v.begin());
53864 return res;
53865 }
53866 };
53867
53868 template <class T, int SIZE>
53869 struct NumericTraits<TinyVectorView<T, SIZE> >
53870 : public NumericTraits<TinyVector<T, SIZE> >
53871 {
53872 typedef TinyVector<T, SIZE> Type;
53873 typedef TinyVector<typename NumericTraits<T>::Promote, SIZE> Promote;
53874 typedef TinyVector<typename NumericTraits<T>::RealPromote, SIZE> RealPromote;
53875 typedef TinyVector<typename NumericTraits<T>::ComplexPromote, SIZE> ComplexPromote;
53876 typedef T ValueType;
53877
53878 typedef typename NumericTraits<T>::isIntegral isIntegral;
53879 typedef VigraFalseType isScalar;
53880 typedef typename NumericTraits<T>::isSigned isSigned;
53881 typedef VigraFalseType isOrdered;
53882 typedef VigraFalseType isComplex;
53883 };
53884
53885 template <class T, int SIZE>
53886 struct NormTraits<TinyVector<T, SIZE> >
53887 {
53888 typedef TinyVector<T, SIZE> Type;
53889 typedef typename Type::SquaredNormType SquaredNormType;
53890 typedef typename Type::NormType NormType;
53891 };
53892
53893 template <class T, int SIZE>
53894 struct NormTraits<TinyVectorView<T, SIZE> >
53895 {
53896 typedef TinyVector<T, SIZE> Type;
53897 typedef typename Type::SquaredNormType SquaredNormType;
53898 typedef typename Type::NormType NormType;
53899 };
53900
53901 template <class T1, class T2, int SIZE>
53902 struct PromoteTraits<TinyVector<T1, SIZE>, TinyVector<T2, SIZE> >
53903 {
53904 typedef TinyVector<typename PromoteTraits<T1, T2>::Promote, SIZE> Promote;
53905 };
53906
53907 template <class T1, class T2, int SIZE>
53908 struct PromoteTraits<TinyVectorView<T1, SIZE>, TinyVectorView<T2, SIZE> >
53909 {
53910 typedef TinyVector<typename PromoteTraits<T1, T2>::Promote, SIZE> Promote;
53911 };
53912
53913 template <class T1, class T2, int SIZE>
53914 struct PromoteTraits<TinyVectorView<T1, SIZE>, TinyVector<T2, SIZE> >
53915 {
53916 typedef TinyVector<typename PromoteTraits<T1, T2>::Promote, SIZE> Promote;
53917 };
53918
53919 template <class T1, class T2, int SIZE>
53920 struct PromoteTraits<TinyVector<T1, SIZE>, TinyVectorView<T2, SIZE> >
53921 {
53922 typedef TinyVector<typename PromoteTraits<T1, T2>::Promote, SIZE> Promote;
53923 };
53924
53925 template <class T, int SIZE>
53926 struct PromoteTraits<TinyVector<T, SIZE>, double >
53927 {
53928 typedef TinyVector<typename NumericTraits<T>::RealPromote, SIZE> Promote;
53929 };
53930
53931 template <class T, int SIZE>
53932 struct PromoteTraits<double, TinyVector<T, SIZE> >
53933 {
53934 typedef TinyVector<typename NumericTraits<T>::RealPromote, SIZE> Promote;
53935 };
53936
53937 template <class T, int SIZE>
53938 struct PromoteTraits<TinyVectorView<T, SIZE>, double >
53939 {
53940 typedef TinyVector<typename NumericTraits<T>::RealPromote, SIZE> Promote;
53941 };
53942
53943 template <class T, int SIZE>
53944 struct PromoteTraits<double, TinyVectorView<T, SIZE> >
53945 {
53946 typedef TinyVector<typename NumericTraits<T>::RealPromote, SIZE> Promote;
53947 };
53948 # 1177 "../include/vigra/tinyvector.hxx"
53949 template <class V1, int SIZE, class D1, class D2, class V2, class D3, class D4>
53950 inline
53951 typename PromoteTraits<TinyVector<V1, SIZE>, TinyVector<V2, SIZE> >::Promote
53952 operator+(TinyVectorBase<V1, SIZE, D1, D2> const & l,
53953 TinyVectorBase<V2, SIZE, D3, D4> const & r)
53954 {
53955 return typename PromoteTraits<TinyVector<V1, SIZE>, TinyVector<V2 , SIZE> >::Promote(l) += r;
53956 }
53957
53958
53959 template <class V1, int SIZE, class D1, class D2, class V2, class D3, class D4>
53960 inline
53961 typename PromoteTraits<TinyVector<V1, SIZE>, TinyVector<V2, SIZE> >::Promote
53962 operator-(TinyVectorBase<V1, SIZE, D1, D2> const & l,
53963 TinyVectorBase<V2, SIZE, D3, D4> const & r)
53964 {
53965 return typename PromoteTraits<TinyVector<V1, SIZE>, TinyVector<V2 , SIZE> >::Promote(l) -= r;
53966 }
53967
53968
53969 template <class V1, int SIZE, class D1, class D2, class V2, class D3, class D4>
53970 inline
53971 typename PromoteTraits<TinyVector<V1, SIZE>, TinyVector<V2, SIZE> >::Promote
53972 operator*(TinyVectorBase<V1, SIZE, D1, D2> const & l,
53973 TinyVectorBase<V2, SIZE, D3, D4> const & r)
53974 {
53975 return typename PromoteTraits<TinyVector<V1, SIZE>, TinyVector<V2 , SIZE> >::Promote(l) *= r;
53976 }
53977
53978
53979 template <class V, int SIZE, class D1, class D2>
53980 inline
53981 typename NumericTraits<TinyVector<V, SIZE> >::RealPromote
53982 operator*(double v, TinyVectorBase<V, SIZE, D1, D2> const & r)
53983 {
53984 return typename NumericTraits<TinyVector<V, SIZE> >::RealPromote(r) *= v;
53985 }
53986
53987
53988 template <class V, int SIZE, class D1, class D2>
53989 inline
53990 typename NumericTraits<TinyVector<V, SIZE> >::RealPromote
53991 operator*(TinyVectorBase<V, SIZE, D1, D2> const & l, double v)
53992 {
53993 return typename NumericTraits<TinyVector<V, SIZE> >::RealPromote(l) *= v;
53994 }
53995
53996
53997 template <class V, int SIZE, class D1, class D2>
53998 inline
53999 typename NumericTraits<TinyVector<V, SIZE> >::RealPromote
54000 operator/(TinyVectorBase<V, SIZE, D1, D2> const & l, double v)
54001 {
54002 return typename NumericTraits<TinyVector<V, SIZE> >::RealPromote(l) /= v;
54003 }
54004
54005
54006
54007
54008 template <class V, int SIZE, class D1, class D2>
54009 inline
54010 TinyVector<V, SIZE>
54011 operator-(TinyVectorBase<V, SIZE, D1, D2> const & v)
54012 {
54013 TinyVector<V, SIZE> res(detail::dontInit());
54014 typedef typename detail::LoopType<SIZE>::type ltype;
54015 ltype::neg(res.begin(), v.begin());
54016 return res;
54017 }
54018
54019
54020 template <class V, int SIZE, class D1, class D2>
54021 inline
54022 TinyVector<V, SIZE>
54023 abs(TinyVectorBase<V, SIZE, D1, D2> const & v)
54024 {
54025 TinyVector<V, SIZE> res(detail::dontInit());
54026 typedef typename detail::LoopType<SIZE>::type ltype;
54027 ltype::abs(res.begin(), v.begin());
54028 return res;
54029 }
54030
54031
54032
54033 template <class V, int SIZE, class D1, class D2>
54034 inline
54035 TinyVector<V, SIZE>
54036 ceil(TinyVectorBase<V, SIZE, D1, D2> const & v)
54037 {
54038 TinyVector<V, SIZE> res(detail::dontInit());
54039 typedef typename detail::LoopType<SIZE>::type ltype;
54040 ltype::ceil(res.begin(), v.begin());
54041 return res;
54042 }
54043
54044
54045
54046 template <class V, int SIZE, class D1, class D2>
54047 inline
54048 TinyVector<V, SIZE>
54049 floor(TinyVectorBase<V, SIZE, D1, D2> const & v)
54050 {
54051 TinyVector<V, SIZE> res(detail::dontInit());
54052 typedef typename detail::LoopType<SIZE>::type ltype;
54053 ltype::floor(res.begin(), v.begin());
54054 return res;
54055 }
54056
54057
54058 template <class V1, class D1, class D2, class V2, class D3, class D4>
54059 inline
54060 TinyVector<typename PromoteTraits<V1, V2>::Promote, 3>
54061 cross(TinyVectorBase<V1, 3, D1, D2> const & r1,
54062 TinyVectorBase<V2, 3, D3, D4> const & r2)
54063 {
54064 typedef TinyVector<typename PromoteTraits<V1, V2>::Promote, 3>
54065 Res;
54066 return Res(r1[1]*r2[2] - r1[2]*r2[1],
54067 r1[2]*r2[0] - r1[0]*r2[2],
54068 r1[0]*r2[1] - r1[1]*r2[0]);
54069 }
54070
54071
54072 template <class V1, int SIZE, class D1, class D2, class V2, class D3, class D4>
54073 inline
54074 typename PromoteTraits<V1, V2>::Promote
54075 dot(TinyVectorBase<V1, SIZE, D1, D2> const & l,
54076 TinyVectorBase<V2, SIZE, D3, D4> const & r)
54077 {
54078 typedef typename detail::LoopType<SIZE>::type ltype;
54079 return ltype::dot(l.begin(), r.begin());
54080 }
54081
54082
54083
54084 template <class V1, int SIZE, class D1, class D2>
54085 inline
54086 typename TinyVectorBase<V1, SIZE, D1, D2>::SquaredNormType
54087 squaredNorm(TinyVectorBase<V1, SIZE, D1, D2> const & t)
54088 {
54089 return t.squaredMagnitude();
54090 }
54091
54092
54093 template <class V, int SIZE>
54094 inline
54095 typename TinyVector<V, SIZE>::SquaredNormType
54096 squaredNorm(TinyVector<V, SIZE> const & t)
54097 {
54098 return t.squaredMagnitude();
54099 }
54100
54101
54102
54103 }
54104 # 47 "../include/vigra/rgbvalue.hxx" 2
54105 # 1 "../include/vigra/static_assert.hxx" 1
54106 # 45 "../include/vigra/static_assert.hxx"
54107 namespace vigra {
54108
54109 namespace staticAssert {
54110
54111 template <bool Predicate>
54112 struct AssertBool;
54113
54114 template <>
54115 struct AssertBool<true>
54116 {
54117 typedef int type;
54118 typedef void * not_type;
54119 };
54120
54121 template <>
54122 struct AssertBool<false>
54123 {
54124 typedef void * type;
54125 typedef int not_type;
54126 };
54127
54128 template <class T>
54129 struct Assert;
54130
54131 template <>
54132 struct Assert<VigraTrueType>
54133 {
54134 typedef int type;
54135 typedef void * not_type;
54136 };
54137
54138 template <>
54139 struct Assert<VigraFalseType>
54140 {
54141 typedef void * type;
54142 typedef int not_type;
54143 };
54144
54145 struct failure{};
54146 struct success {};
54147 inline int check( success ) { return 0; }
54148
54149 template< typename Predicate >
54150 failure ************ (Predicate::************
54151 assertImpl( void (*)(Predicate), typename Predicate::not_type )
54152 );
54153
54154 template< typename Predicate >
54155 success
54156 assertImpl( void (*)(Predicate), typename Predicate::type );
54157 # 130 "../include/vigra/static_assert.hxx"
54158 }
54159
54160 }
54161 # 48 "../include/vigra/rgbvalue.hxx" 2
54162
54163 namespace vigra {
54164
54165 namespace detail {
54166
54167 template <unsigned int I, unsigned int R, unsigned int G, unsigned int B>
54168 struct SelectColorIndexRHS;
54169
54170 template <unsigned int R, unsigned int G, unsigned int B>
54171 struct SelectColorIndexRHS<0, R, G, B>
54172 {
54173 enum { res = R };
54174 };
54175
54176 template <unsigned int R, unsigned int G, unsigned int B>
54177 struct SelectColorIndexRHS<1, R, G, B>
54178 {
54179 enum { res = G };
54180 };
54181
54182 template <unsigned int R, unsigned int G, unsigned int B>
54183 struct SelectColorIndexRHS<2, R, G, B>
54184 {
54185 enum { res = B };
54186 };
54187
54188 }
54189
54190
54191
54192 template <unsigned int R, unsigned int G, unsigned int B>
54193 struct RGBValue_bad_color_indices
54194 : staticAssert::AssertBool<(R < 3 && G < 3 && B < 3 &&
54195 ((1 << R) + (1 << G) + (1 << B) == 7))>
54196 {};
54197 # 126 "../include/vigra/rgbvalue.hxx"
54198 template <class VALUETYPE, unsigned int RED_IDX = 0, unsigned int GREEN_IDX = 1, unsigned int BLUE_IDX = 2>
54199 class RGBValue
54200 : public TinyVector<VALUETYPE, 3>
54201 {
54202 typedef TinyVector<VALUETYPE, 3> Base;
54203
54204
54205 enum {
54206 IDX0 = (RED_IDX == 0) ? 0 : (GREEN_IDX == 0) ? 1 : 2,
54207 IDX1 = (RED_IDX == 1) ? 0 : (GREEN_IDX == 1) ? 1 : 2,
54208 IDX2 = (RED_IDX == 2) ? 0 : (GREEN_IDX == 2) ? 1 : 2
54209 };
54210
54211 public:
54212
54213
54214 typedef typename Base::value_type value_type;
54215
54216
54217 typedef typename Base::iterator iterator;
54218
54219
54220 typedef typename Base::const_iterator const_iterator;
54221
54222
54223 typedef typename Base::SquaredNormType SquaredNormType;
54224
54225
54226 typedef typename Base::NormType NormType;
54227
54228
54229
54230 enum
54231 {
54232 RedIdx = RED_IDX,
54233 GreenIdx = GREEN_IDX,
54234 BlueIdx = BLUE_IDX
54235 };
54236
54237
54238
54239
54240
54241 RGBValue(value_type first, value_type second, value_type third)
54242 : Base(first, second, third)
54243 {
54244 enum { vigra_assertion_in_line_172 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (RGBValue_bad_color_indices<RED_IDX, GREEN_IDX, BLUE_IDX>))0, 1 ) ) ) };
54245 }
54246
54247
54248
54249 RGBValue(value_type gray)
54250 : Base(gray, gray, gray)
54251 {
54252 enum { vigra_assertion_in_line_180 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (RGBValue_bad_color_indices<RED_IDX, GREEN_IDX, BLUE_IDX>))0, 1 ) ) ) };
54253 }
54254
54255
54256
54257 template <class Iterator>
54258 RGBValue(Iterator i, Iterator end)
54259 : Base(i[0], i[1], i[2])
54260 {
54261 enum { vigra_assertion_in_line_189 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (RGBValue_bad_color_indices<RED_IDX, GREEN_IDX, BLUE_IDX>))0, 1 ) ) ) };
54262 }
54263
54264
54265
54266 RGBValue()
54267 : Base(0, 0, 0)
54268 {
54269 enum { vigra_assertion_in_line_197 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (RGBValue_bad_color_indices<RED_IDX, GREEN_IDX, BLUE_IDX>))0, 1 ) ) ) };
54270 }
54271
54272
54273
54274 RGBValue(RGBValue const & r)
54275 : Base(r)
54276 {
54277 enum { vigra_assertion_in_line_205 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (RGBValue_bad_color_indices<RED_IDX, GREEN_IDX, BLUE_IDX>))0, 1 ) ) ) };
54278 }
54279
54280 RGBValue & operator=(RGBValue const & r)
54281 {
54282 Base::operator=(r);
54283 return *this;
54284 }
54285
54286
54287
54288
54289
54290 template <class U, unsigned int R, unsigned int G, unsigned int B>
54291 RGBValue(RGBValue<U, R, G, B> const & r)
54292 : Base(detail::RequiresExplicitCast<value_type>::cast(r[detail::SelectColorIndexRHS<IDX0, R, G, B>::res]),
54293 detail::RequiresExplicitCast<value_type>::cast(r[detail::SelectColorIndexRHS<IDX1, R, G, B>::res]),
54294 detail::RequiresExplicitCast<value_type>::cast(r[detail::SelectColorIndexRHS<IDX2, R, G, B>::res]))
54295 {
54296 enum { vigra_assertion_in_line_224 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (RGBValue_bad_color_indices<RED_IDX, GREEN_IDX, BLUE_IDX>))0, 1 ) ) ) };
54297 }
54298
54299
54300
54301 template <class U, unsigned int R, unsigned int G, unsigned int B>
54302 RGBValue & operator=(RGBValue<U, R, G, B> const & r)
54303 {
54304 setRed(detail::RequiresExplicitCast<value_type>::cast(r.red()));
54305 setGreen(detail::RequiresExplicitCast<value_type>::cast(r.green()));
54306 setBlue(detail::RequiresExplicitCast<value_type>::cast(r.blue()));
54307 return *this;
54308 }
54309
54310
54311
54312 RGBValue(TinyVector<value_type, 3> const & r)
54313 : Base(r)
54314 {
54315 enum { vigra_assertion_in_line_243 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (RGBValue_bad_color_indices<RED_IDX, GREEN_IDX, BLUE_IDX>))0, 1 ) ) ) };
54316 }
54317
54318
54319
54320 RGBValue & operator=(TinyVector<value_type, 3> const & r)
54321 {
54322 Base::operator=(r);
54323 return *this;
54324 }
54325
54326
54327
54328 RGBValue operator-() const
54329 {
54330 return RGBValue(-red(), -green(), -blue());
54331 }
54332
54333
54334
54335 value_type & red() { return (*this)[RED_IDX]; }
54336
54337
54338
54339 value_type & green() { return (*this)[GREEN_IDX]; }
54340
54341
54342
54343 value_type & blue() { return (*this)[BLUE_IDX]; }
54344
54345
54346
54347 value_type const & red() const { return (*this)[RED_IDX]; }
54348
54349
54350
54351 value_type const & green() const { return (*this)[GREEN_IDX]; }
54352
54353
54354
54355 value_type const & blue() const { return (*this)[BLUE_IDX]; }
54356
54357
54358
54359 value_type luminance() const {
54360 return detail::RequiresExplicitCast<value_type>::cast(0.3*red() + 0.59*green() + 0.11*blue()); }
54361
54362
54363 value_type hue() const {
54364 value_type max = std::max(red(), std::max(green(), blue()));
54365 value_type min = std::min(red(), std::min(green(), blue()));
54366 value_type delta = (max - min) * 6;
54367 typename NumericTraits<value_type>::RealPromote rdelta = NumericTraits<value_type>::toRealPromote(delta);
54368 typename NumericTraits<value_type>::RealPromote h = 0.0;
54369 if (red() == max) h = (green() - blue()) / rdelta;
54370 else if (green() == max) h = (1/3) + ((blue() - red()) / rdelta);
54371 else h = (2/3) + ((red() - green()) / rdelta);
54372 if (h < 0.0) h += 1.0;
54373 return NumericTraits<value_type>::fromRealPromote(h * NumericTraits<value_type>::max());
54374 }
54375
54376
54377
54378 NormType magnitude() const {
54379 return Base::magnitude();
54380 }
54381
54382
54383
54384 SquaredNormType squaredMagnitude() const {
54385 return Base::squaredMagnitude();
54386 }
54387
54388
54389
54390
54391 template <class V>
54392 void setRed(V value) { (*this)[RED_IDX] = detail::RequiresExplicitCast<value_type>::cast(value); }
54393
54394
54395
54396
54397 template <class V>
54398 void setGreen(V value) { (*this)[GREEN_IDX] = detail::RequiresExplicitCast<value_type>::cast(value); }
54399
54400
54401
54402
54403 template <class V>
54404 void setBlue(V value) { (*this)[BLUE_IDX] = detail::RequiresExplicitCast<value_type>::cast(value); }
54405
54406
54407 template <class V>
54408 void setRGB(V r, V g, V b)
54409 {
54410 (*this)[RED_IDX] = detail::RequiresExplicitCast<value_type>::cast(r);
54411 (*this)[GREEN_IDX] = detail::RequiresExplicitCast<value_type>::cast(g);
54412 (*this)[BLUE_IDX] = detail::RequiresExplicitCast<value_type>::cast(b);
54413 }
54414 };
54415 # 363 "../include/vigra/rgbvalue.hxx"
54416 template <class V1, unsigned int RIDX1, unsigned int GIDX1, unsigned int BIDX1,
54417 class V2, unsigned int RIDX2, unsigned int GIDX2, unsigned int BIDX2>
54418 inline
54419 bool
54420 operator==(RGBValue<V1, RIDX1, GIDX1, BIDX1> const & l,
54421 RGBValue<V2, RIDX2, GIDX2, BIDX2> const & r)
54422 {
54423 return (l.red() == r.red()) &&
54424 (l.green() == r.green()) &&
54425 (l.blue() == r.blue());
54426 }
54427
54428
54429 template <class V1, unsigned int RIDX1, unsigned int GIDX1, unsigned int BIDX1,
54430 class V2, unsigned int RIDX2, unsigned int GIDX2, unsigned int BIDX2>
54431 inline
54432 bool
54433 operator!=(RGBValue<V1, RIDX1, GIDX1, BIDX1> const & l,
54434 RGBValue<V2, RIDX2, GIDX2, BIDX2> const & r)
54435 {
54436 return (l.red() != r.red()) ||
54437 (l.green() != r.green()) ||
54438 (l.blue() != r.blue());
54439 }
54440 # 456 "../include/vigra/rgbvalue.hxx"
54441 template <class T, unsigned int R, unsigned int G, unsigned int B>
54442 struct NumericTraits<RGBValue<T, R, G, B> >
54443 {
54444 typedef RGBValue<T, R, G, B> Type;
54445 typedef RGBValue<typename NumericTraits<T>::Promote, R, G, B> Promote;
54446 typedef RGBValue<typename NumericTraits<T>::RealPromote, R, G, B> RealPromote;
54447 typedef RGBValue<typename NumericTraits<T>::ComplexPromote, R, G, B> ComplexPromote;
54448 typedef T ValueType;
54449
54450 typedef typename NumericTraits<T>::isIntegral isIntegral;
54451 typedef VigraFalseType isScalar;
54452 typedef typename NumericTraits<T>::isSigned isSigned;
54453 typedef VigraFalseType isOrdered;
54454 typedef VigraFalseType isComplex;
54455
54456 static Type zero() {
54457 return Type(NumericTraits<T>::zero());
54458 }
54459 static Type one() {
54460 return Type(NumericTraits<T>::one());
54461 }
54462 static Type nonZero() {
54463 return Type(NumericTraits<T>::nonZero());
54464 }
54465
54466 static Promote toPromote(Type const & v) {
54467 return Promote(v);
54468 }
54469 static RealPromote toRealPromote(Type const & v) {
54470 return RealPromote(v);
54471 }
54472 static Type fromPromote(Promote const & v) {
54473 return Type(NumericTraits<T>::fromPromote(v.red()),
54474 NumericTraits<T>::fromPromote(v.green()),
54475 NumericTraits<T>::fromPromote(v.blue()));
54476 }
54477 static Type fromRealPromote(RealPromote const & v) {
54478 return Type(NumericTraits<T>::fromRealPromote(v.red()),
54479 NumericTraits<T>::fromRealPromote(v.green()),
54480 NumericTraits<T>::fromRealPromote(v.blue()));
54481 }
54482 };
54483
54484 template <class T, unsigned int R, unsigned int G, unsigned int B>
54485 struct NormTraits<RGBValue<T, R, G, B> >
54486 {
54487 typedef RGBValue<T, R, G, B> Type;
54488 typedef typename Type::SquaredNormType SquaredNormType;
54489 typedef typename Type::NormType NormType;
54490 };
54491
54492 template <class T1, unsigned int R, unsigned int G, unsigned int B, class T2>
54493 struct PromoteTraits<RGBValue<T1, R, G, B>, RGBValue<T2, R, G, B> >
54494 {
54495 typedef RGBValue<typename PromoteTraits<T1, T2>::Promote, R, G, B> Promote;
54496 };
54497
54498 template <class T, unsigned int R, unsigned int G, unsigned int B>
54499 struct PromoteTraits<RGBValue<T, R, G, B>, double >
54500 {
54501 typedef RGBValue<typename NumericTraits<T>::RealPromote, R, G, B> Promote;
54502 };
54503
54504 template <class T, unsigned int R, unsigned int G, unsigned int B>
54505 struct PromoteTraits<double, RGBValue<T, R, G, B> >
54506 {
54507 typedef RGBValue<typename NumericTraits<T>::RealPromote, R, G, B> Promote;
54508 };
54509 # 652 "../include/vigra/rgbvalue.hxx"
54510 template <class V1, unsigned int RIDX1, unsigned int GIDX1, unsigned int BIDX1,
54511 class V2, unsigned int RIDX2, unsigned int GIDX2, unsigned int BIDX2>
54512 inline
54513 RGBValue<V1, RIDX1, GIDX1, BIDX1> &
54514 operator+=(RGBValue<V1, RIDX1, GIDX1, BIDX1> & l,
54515 RGBValue<V2, RIDX2, GIDX2, BIDX2> const & r)
54516 {
54517 l.red() += r.red();
54518 l.green() += r.green();
54519 l.blue() += r.blue();
54520 return l;
54521 }
54522
54523
54524 template <class V1, unsigned int RIDX1, unsigned int GIDX1, unsigned int BIDX1,
54525 class V2, unsigned int RIDX2, unsigned int GIDX2, unsigned int BIDX2>
54526 inline
54527 RGBValue<V1, RIDX1, GIDX1, BIDX1> &
54528 operator-=(RGBValue<V1, RIDX1, GIDX1, BIDX1> & l,
54529 RGBValue<V2, RIDX2, GIDX2, BIDX2> const & r)
54530 {
54531 l.red() -= r.red();
54532 l.green() -= r.green();
54533 l.blue() -= r.blue();
54534 return l;
54535 }
54536
54537
54538 template <class V1, unsigned int RIDX1, unsigned int BIDX1, unsigned int GIDX1, class V2, unsigned int RIDX2, unsigned int GIDX2, unsigned int BIDX2>
54539 inline
54540 RGBValue<V1, RIDX1, GIDX1, BIDX1> &
54541 operator*=(RGBValue<V1, RIDX1, GIDX1, BIDX1> & l,
54542 RGBValue<V2, RIDX2, GIDX2, BIDX2> const & r)
54543 {
54544 l.red() *= r.red();
54545 l.green() *= r.green();
54546 l.blue() *= r.blue();
54547 return l;
54548 }
54549
54550
54551
54552 template <class V1, unsigned int RIDX1, unsigned int BIDX1, unsigned int GIDX1, class V2, unsigned int RIDX2, unsigned int GIDX2, unsigned int BIDX2>
54553 inline
54554 RGBValue<V1, RIDX1, GIDX1, BIDX1> &
54555 operator/=(RGBValue<V1, RIDX1, GIDX1, BIDX1> & l,
54556 RGBValue<V2, RIDX2, GIDX2, BIDX2> const & r)
54557 {
54558 l.red() /= r.red();
54559 l.green() /= r.green();
54560 l.blue() /= r.blue();
54561 return l;
54562 }
54563
54564
54565 template <class V, unsigned int RIDX, unsigned int GIDX, unsigned int BIDX, class RV>
54566 inline
54567 RGBValue<V, RIDX, GIDX, BIDX> &
54568 operator*=(RGBValue<V, RIDX, GIDX, BIDX> & l, RV r)
54569 {
54570 l.red() *= r;
54571 l.green() *= r;
54572 l.blue() *= r;
54573 return l;
54574 }
54575
54576
54577 template <class V, unsigned int RIDX, unsigned int GIDX, unsigned int BIDX, class RV>
54578 inline
54579 RGBValue<V, RIDX, GIDX, BIDX> &
54580 operator/=(RGBValue<V, RIDX, GIDX, BIDX> & l, RV r)
54581 {
54582 l.red() /= r;
54583 l.green() /= r;
54584 l.blue() /= r;
54585 return l;
54586 }
54587
54588
54589
54590 template <class V, unsigned int RIDX, unsigned int GIDX, unsigned int BIDX>
54591 inline RGBValue<V, RIDX, GIDX, BIDX> &
54592 operator>>=(RGBValue<V, RIDX, GIDX, BIDX> & l, const unsigned int s) {
54593 l.red() >>= s;
54594 l.green() >>= s;
54595 l.blue() >>= s;
54596 return l;
54597 }
54598
54599 template <unsigned int RIDX, unsigned int GIDX, unsigned int BIDX>
54600 inline RGBValue<double, RIDX, GIDX, BIDX> &
54601 operator>>=(RGBValue<double, RIDX, GIDX, BIDX> & l, const unsigned int s) {
54602 double scale = (double)(1 << s);
54603 l.red() /= scale;
54604 l.green() /= scale;
54605 l.blue() /= scale;
54606 return l;
54607 }
54608
54609 template <unsigned int RIDX, unsigned int GIDX, unsigned int BIDX>
54610 inline RGBValue<float, RIDX, GIDX, BIDX> &
54611 operator>>=(RGBValue<float, RIDX, GIDX, BIDX> & l, const unsigned int s) {
54612 float scale = (float)(1 << s);
54613 l.red() /= scale;
54614 l.green() /= scale;
54615 l.blue() /= scale;
54616 return l;
54617 }
54618
54619
54620
54621 template <class V, unsigned int RIDX, unsigned int GIDX, unsigned int BIDX>
54622 inline RGBValue<V, RIDX, GIDX, BIDX> &
54623 operator<<=(RGBValue<V, RIDX, GIDX, BIDX> & l, const unsigned int s) {
54624 l.red() <<= s;
54625 l.green() <<= s;
54626 l.blue() <<= s;
54627 return l;
54628 }
54629
54630 template <unsigned int RIDX, unsigned int GIDX, unsigned int BIDX>
54631 inline RGBValue<double, RIDX, GIDX, BIDX> &
54632 operator<<=(RGBValue<double, RIDX, GIDX, BIDX> & l, const unsigned int s) {
54633 double scale = (double)(1 << s);
54634 l.red() *= scale;
54635 l.green() *= scale;
54636 l.blue() *= scale;
54637 return l;
54638 }
54639
54640 template <unsigned int RIDX, unsigned int GIDX, unsigned int BIDX>
54641 inline RGBValue<float, RIDX, GIDX, BIDX> &
54642 operator<<=(RGBValue<float, RIDX, GIDX, BIDX> & l, const unsigned int s) {
54643 float scale = (float)(1 << s);
54644 l.red() *= scale;
54645 l.green() *= scale;
54646 l.blue() *= scale;
54647 return l;
54648 }
54649
54650 using std::abs;
54651
54652
54653 template <class T, unsigned int RIDX, unsigned int GIDX, unsigned int BIDX>
54654 inline
54655 RGBValue<T, RIDX, GIDX, BIDX>
54656 abs(RGBValue<T, RIDX, GIDX, BIDX> const & v)
54657 {
54658 return RGBValue<T, RIDX, GIDX, BIDX>(abs(v.red()), abs(v.green()), abs(v.blue()));
54659 }
54660
54661
54662 template <class V1, unsigned int R, unsigned int G, unsigned int B, class V2>
54663 inline
54664 typename PromoteTraits<RGBValue<V1, R, G, B>,
54665 RGBValue<V2, R, G, B> >::Promote
54666 operator+(RGBValue<V1, R, G, B> const & r1,
54667 RGBValue<V2, R, G, B> const & r2)
54668 {
54669 typename PromoteTraits<RGBValue<V1, R, G, B>,
54670 RGBValue<V2, R, G, B> >::Promote res(r1);
54671
54672 res += r2;
54673
54674 return res;
54675 }
54676
54677
54678 template <class V1, unsigned int R, unsigned int G, unsigned int B, class V2>
54679 inline
54680 typename PromoteTraits<RGBValue<V1, R, G, B>,
54681 RGBValue<V2, R, G, B> >::Promote
54682 operator-(RGBValue<V1, R, G, B> const & r1,
54683 RGBValue<V2, R, G, B> const & r2)
54684 {
54685 typename PromoteTraits<RGBValue<V1, R, G, B>,
54686 RGBValue<V2, R, G, B> >::Promote res(r1);
54687
54688 res -= r2;
54689
54690 return res;
54691 }
54692
54693
54694 template <class V1, unsigned int R, unsigned int G, unsigned int B, class V2>
54695 inline
54696 typename PromoteTraits<RGBValue<V1, R, G, B>,
54697 RGBValue<V2, R, G, B> >::Promote
54698 operator*(RGBValue<V1, R, G, B> const & r1,
54699 RGBValue<V2, R, G, B> const & r2)
54700 {
54701 typename PromoteTraits<RGBValue<V1, R, G, B>,
54702 RGBValue<V2, R, G, B> >::Promote res(r1);
54703
54704 res *= r2;
54705
54706 return res;
54707 }
54708
54709
54710
54711 template <class V1, unsigned int R, unsigned int G, unsigned int B, class V2>
54712 inline
54713 typename PromoteTraits<RGBValue<V1, R, G, B>,
54714 RGBValue<V2, R, G, B> >::Promote
54715 operator/(RGBValue<V1, R, G, B> const & r1,
54716 RGBValue<V2, R, G, B> const & r2)
54717 {
54718 typename PromoteTraits<RGBValue<V1, R, G, B>,
54719 RGBValue<V2, R, G, B> >::Promote res(r1);
54720
54721 res /= r2;
54722
54723 return res;
54724 }
54725
54726
54727 template <class RV, class V, unsigned int R, unsigned int G, unsigned int B>
54728 inline typename PromoteTraits<RGBValue<V, R, G, B>, RGBValue<RV, R, G, B> >::Promote
54729 operator*(RV v, RGBValue<V, R, G, B> const & r) {
54730 return r * RGBValue<RV, R, G, B>(v);
54731 }
54732
54733
54734 template <class V, unsigned int R, unsigned int G, unsigned int B, class RV>
54735 inline typename PromoteTraits<RGBValue<V, R, G, B>, RGBValue<RV, R, G, B> >::Promote
54736 operator*(RGBValue<V, R, G, B> const & r, RV v) {
54737 return r * RGBValue<RV, R, G, B>(v);
54738 }
54739
54740
54741 template <class V, unsigned int R, unsigned int G, unsigned int B, class RV>
54742 inline typename PromoteTraits<RGBValue<V, R, G, B>, RGBValue<RV, R, G, B> >::Promote
54743 operator/(RGBValue<V, R, G, B> const & r, RV v) {
54744 return r / RGBValue<RV, R, G, B>(v);
54745 }
54746 # 930 "../include/vigra/rgbvalue.hxx"
54747 template <class V>
54748 inline
54749 RGBValue<V> operator&(RGBValue<V> const & r1, RGBValue<V> const & r2)
54750 {
54751 RGBValue<V> res(r1.red() & r2.red(), r1.green() & r2.green(), r1.blue() & r2.blue());
54752 return res;
54753 }
54754
54755
54756
54757 template <class V, unsigned int R, unsigned int G, unsigned int B>
54758 inline RGBValue<V, R, G, B> operator>>(RGBValue<V, R, G, B> const & r, int rs)
54759 {
54760 RGBValue<V, R, G, B> res(r.red() >> rs, r.green() >> rs, r.blue() >> rs);
54761 return res;
54762 }
54763
54764 template <unsigned int R, unsigned int G, unsigned int B>
54765 inline RGBValue<double, R, G, B> operator>>(RGBValue<double, R, G, B> const & r, int rs)
54766 {
54767 double scale = (double)(1 << rs);
54768 RGBValue<double, R, G, B> res(r.red() / scale, r.green() / scale, r.blue() / scale);
54769 return res;
54770 }
54771
54772 template <unsigned int R, unsigned int G, unsigned int B>
54773 inline RGBValue<float, R, G, B> operator>>(RGBValue<float, R, G, B> const & r, int rs)
54774 {
54775 float scale = (float)(1 << rs);
54776 RGBValue<float, R, G, B> res(r.red() / scale, r.green() / scale, r.blue() / scale);
54777 return res;
54778 }
54779
54780
54781
54782 template <class V, unsigned int R, unsigned int G, unsigned int B>
54783 inline RGBValue<V, R, G, B> operator<<(RGBValue<V, R, G, B> const & r, int ls)
54784 {
54785 RGBValue<V, R, G, B> res(r.red() << ls, r.green() << ls, r.blue() << ls);
54786 return res;
54787 }
54788
54789 template <unsigned int R, unsigned int G, unsigned int B>
54790 inline RGBValue<double, R, G, B> operator<<(RGBValue<double, R, G, B> const & r, int ls)
54791 {
54792 double scale = (double)(1 << ls);
54793 RGBValue<double, R, G, B> res(r.red() * scale, r.green() * scale, r.blue() * scale);
54794 return res;
54795 }
54796
54797 template <unsigned int R, unsigned int G, unsigned int B>
54798 inline RGBValue<float, R, G, B> operator<<(RGBValue<float, R, G, B> const & r, int ls)
54799 {
54800 float scale = (float)(1 << ls);
54801 RGBValue<float, R, G, B> res(r.red() * scale, r.green() * scale, r.blue() * scale);
54802 return res;
54803 }
54804
54805
54806 template <class V1, unsigned int R, unsigned int G, unsigned int B, class V2>
54807 inline
54808 typename PromoteTraits<RGBValue<V1, R, G, B>,
54809 RGBValue<V2, R, G, B> >::Promote
54810 cross(RGBValue<V1, R, G, B> const & r1,
54811 RGBValue<V2, R, G, B> const & r2)
54812 {
54813 typedef typename PromoteTraits<RGBValue<V1, R, G, B>,
54814 RGBValue<V2, R, G, B> >::Promote
54815 Res;
54816
54817 return Res(r1.green()*r2.blue() - r1.blue()*r2.green(),
54818 r1.blue()*r2.red() - r1.red()*r2.blue(),
54819 r1.red()*r2.green() - r1.green()*r2.red());
54820 }
54821
54822
54823 template <class V1, unsigned int RIDX1, unsigned int GIDX1, unsigned int BIDX1,
54824 class V2, unsigned int RIDX2, unsigned int GIDX2, unsigned int BIDX2>
54825 inline
54826 typename PromoteTraits<V1, V2>::Promote
54827 dot(RGBValue<V1, RIDX1, GIDX1, BIDX1> const & r1,
54828 RGBValue<V2, RIDX2, GIDX2, BIDX2> const & r2)
54829 {
54830 return r1.red()*r2.red() + r1.green()*r2.green() + r1.blue()*r2.blue();
54831 }
54832
54833 using std::ceil;
54834
54835
54836
54837 template <class V, unsigned int RIDX, unsigned int GIDX, unsigned int BIDX>
54838 inline
54839 RGBValue<V, RIDX, GIDX, BIDX>
54840 ceil(RGBValue<V, RIDX, GIDX, BIDX> const & r)
54841 {
54842 return RGBValue<V, RIDX, GIDX, BIDX>(ceil(r.red()),
54843 ceil(r.green()),
54844 ceil(r.blue()));
54845 }
54846
54847 using std::floor;
54848
54849
54850
54851 template <class V, unsigned int RIDX, unsigned int GIDX, unsigned int BIDX>
54852 inline
54853 RGBValue<V, RIDX, GIDX, BIDX>
54854 floor(RGBValue<V, RIDX, GIDX, BIDX> const & r)
54855 {
54856 return RGBValue<V, RIDX, GIDX, BIDX>(floor(r.red()),
54857 floor(r.green()),
54858 floor(r.blue()));
54859 }
54860 # 1062 "../include/vigra/rgbvalue.hxx"
54861 template <class RGBVALUE>
54862 class RGBAccessor
54863 : public VectorAccessor<RGBVALUE>
54864 {
54865 public:
54866
54867 typedef typename RGBVALUE::value_type component_type;
54868
54869
54870
54871 template <class RGBIterator>
54872 component_type const & red(RGBIterator const & rgb) const
54873 {
54874 return (*rgb).red();
54875 }
54876
54877 template <class V, class RGBIterator>
54878 void setRGB(V r, V g, V b, RGBIterator const & rgb) const
54879 {
54880 (*rgb).setRGB( r, g, b );
54881 }
54882
54883
54884
54885
54886
54887 template <class V, class RGBIterator>
54888 void setRed(V value, RGBIterator const & rgb) const
54889 {
54890 (*rgb).setRed(value);
54891 }
54892
54893
54894
54895 template <class RGBIterator, class DIFFERENCE>
54896 component_type const & red(RGBIterator const & rgb, DIFFERENCE diff) const
54897 {
54898 return rgb[diff].red();
54899 }
54900
54901
54902
54903
54904 template <class V, class RGBIterator, class DIFFERENCE>
54905 void setRed(V value, RGBIterator const & rgb, DIFFERENCE diff) const
54906 {
54907 rgb[diff].setRed(value);
54908 }
54909
54910
54911
54912 template <class RGBIterator>
54913 component_type const & green(RGBIterator const & rgb) const
54914 {
54915 return (*rgb).green();
54916 }
54917
54918
54919
54920
54921 template <class V, class RGBIterator>
54922 void setGreen(V value, RGBIterator const & rgb) const
54923 {
54924 (*rgb).setGreen(value);
54925 }
54926
54927
54928
54929 template <class RGBIterator, class DIFFERENCE>
54930 component_type const & green(RGBIterator const & rgb, DIFFERENCE d) const
54931 {
54932 return rgb[d].green();
54933 }
54934
54935
54936
54937
54938 template <class V, class RGBIterator, class DIFFERENCE>
54939 void setGreen(V value, RGBIterator const & rgb, DIFFERENCE d) const
54940 {
54941 rgb[d].setGreen(value);
54942 }
54943
54944
54945
54946 template <class RGBIterator>
54947 component_type const & blue(RGBIterator const & rgb) const
54948 {
54949 return (*rgb).blue();
54950 }
54951
54952
54953
54954
54955 template <class V, class RGBIterator>
54956 void setBlue(V value, RGBIterator const & rgb) const
54957 {
54958 (*rgb).setBlue(value);
54959 }
54960
54961
54962
54963 template <class RGBIterator, class DIFFERENCE>
54964 component_type const & blue(RGBIterator const & rgb, DIFFERENCE d) const
54965 {
54966 return rgb[d].blue();
54967 }
54968
54969
54970
54971
54972 template <class V, class RGBIterator, class DIFFERENCE>
54973 void setBlue(V value, RGBIterator const & rgb, DIFFERENCE d) const
54974 {
54975 rgb[d].setBlue(value);
54976 }
54977
54978 };
54979 # 1193 "../include/vigra/rgbvalue.hxx"
54980 template <class RGBVALUE>
54981 class RedAccessor
54982 {
54983 public:
54984 typedef typename RGBVALUE::value_type value_type;
54985
54986
54987
54988 template <class ITERATOR>
54989 value_type const & operator()(ITERATOR const & i) const {
54990 return (*i).red();
54991 }
54992
54993
54994
54995 template <class ITERATOR, class DIFFERENCE>
54996 value_type const & operator()(ITERATOR const & i, DIFFERENCE d) const
54997 {
54998 return i[d].red();
54999 }
55000
55001
55002
55003
55004 template <class V, class ITERATOR>
55005 void set(V value, ITERATOR const & i) const {
55006 (*i).setRed(value);
55007 }
55008
55009
55010
55011
55012
55013 template <class V, class ITERATOR, class DIFFERENCE>
55014 void set(V value, ITERATOR const & i, DIFFERENCE d) const
55015 {
55016 i[d].setRed(value);
55017 }
55018 };
55019 # 1244 "../include/vigra/rgbvalue.hxx"
55020 template <class RGBVALUE>
55021 class GreenAccessor
55022 {
55023 public:
55024 typedef typename RGBVALUE::value_type value_type;
55025
55026
55027
55028 template <class ITERATOR>
55029 value_type const & operator()(ITERATOR const & i) const {
55030 return (*i).green();
55031 }
55032
55033
55034
55035 template <class ITERATOR, class DIFFERENCE>
55036 value_type const & operator()(ITERATOR const & i, DIFFERENCE d) const
55037 {
55038 return i[d].green();
55039 }
55040
55041
55042
55043
55044 template <class V, class ITERATOR>
55045 void set(V value, ITERATOR const & i) const {
55046 (*i).setGreen(value);
55047 }
55048
55049
55050
55051
55052
55053 template <class V, class ITERATOR, class DIFFERENCE>
55054 void set(V value, ITERATOR const & i, DIFFERENCE d) const
55055 {
55056 i[d].setGreen(value);
55057 }
55058 };
55059 # 1295 "../include/vigra/rgbvalue.hxx"
55060 template <class RGBVALUE>
55061 class BlueAccessor
55062 {
55063 public:
55064 typedef typename RGBVALUE::value_type value_type;
55065
55066
55067
55068 template <class ITERATOR>
55069 value_type const & operator()(ITERATOR const & i) const {
55070 return (*i).blue();
55071 }
55072
55073
55074
55075 template <class ITERATOR, class DIFFERENCE>
55076 value_type const & operator()(ITERATOR const & i, DIFFERENCE d) const
55077 {
55078 return i[d].blue();
55079 }
55080
55081
55082
55083
55084 template <class V, class ITERATOR>
55085 void set(V value, ITERATOR const & i) const {
55086 (*i).setBlue(value);
55087 }
55088
55089
55090
55091
55092
55093 template <class V, class ITERATOR, class DIFFERENCE>
55094 void set(V value, ITERATOR const & i, DIFFERENCE d) const
55095 {
55096 i[d].setBlue(value);
55097 }
55098 };
55099 # 1346 "../include/vigra/rgbvalue.hxx"
55100 template <class RGBVALUE>
55101 class RGBToGrayAccessor
55102 {
55103 public:
55104 typedef typename RGBVALUE::value_type value_type;
55105
55106
55107
55108 template <class ITERATOR>
55109 value_type operator()(ITERATOR const & i) const {
55110 return (*i).luminance(); }
55111
55112
55113
55114 template <class ITERATOR, class DIFFERENCE>
55115 value_type operator()(ITERATOR const & i, DIFFERENCE d) const
55116 {
55117 return i[d].luminance();
55118 }
55119 };
55120 # 1380 "../include/vigra/rgbvalue.hxx"
55121 template <class VALUETYPE>
55122 class GrayToRGBAccessor
55123 {
55124 public:
55125 typedef typename vigra::RGBValue<VALUETYPE> value_type;
55126
55127
55128
55129 template <class ITERATOR>
55130 value_type operator()(ITERATOR const & i) const {
55131 return value_type(*i,*i,*i); }
55132
55133
55134
55135 template <class ITERATOR, class DIFFERENCE>
55136 value_type operator()(ITERATOR const & i, DIFFERENCE d) const
55137 {
55138 return value_type(i[d],i[d],i[d]);
55139 }
55140 };
55141
55142
55143
55144
55145
55146
55147 }
55148 # 47 "../include/vigra/stdimage.hxx" 2
55149
55150 namespace vigra {
55151 # 63 "../include/vigra/stdimage.hxx"
55152 typedef BasicImage<UInt8> BImage;
55153 # 72 "../include/vigra/stdimage.hxx"
55154 typedef BasicImage<UInt8> UInt8Image;
55155 # 81 "../include/vigra/stdimage.hxx"
55156 typedef BasicImage<Int8> Int8Image;
55157 # 90 "../include/vigra/stdimage.hxx"
55158 typedef BasicImage<Int16> SImage;
55159 # 99 "../include/vigra/stdimage.hxx"
55160 typedef BasicImage<UInt16> UInt16Image;
55161 # 108 "../include/vigra/stdimage.hxx"
55162 typedef BasicImage<Int16> Int16Image;
55163 # 117 "../include/vigra/stdimage.hxx"
55164 typedef BasicImage<Int32> IImage;
55165 # 126 "../include/vigra/stdimage.hxx"
55166 typedef BasicImage<UInt32> UInt32Image;
55167 # 135 "../include/vigra/stdimage.hxx"
55168 typedef BasicImage<Int32> Int32Image;
55169 # 144 "../include/vigra/stdimage.hxx"
55170 typedef BasicImage<float> FImage;
55171 # 154 "../include/vigra/stdimage.hxx"
55172 typedef BasicImage<double> DImage;
55173 # 165 "../include/vigra/stdimage.hxx"
55174 typedef BasicImage<RGBValue<UInt8> > BRGBImage;
55175 # 175 "../include/vigra/stdimage.hxx"
55176 typedef BasicImage<RGBValue<UInt8> > UInt8RGBImage;
55177 # 185 "../include/vigra/stdimage.hxx"
55178 typedef BasicImage<RGBValue<Int8> > Int8RGBImage;
55179 # 195 "../include/vigra/stdimage.hxx"
55180 typedef BasicImage<RGBValue<Int16> > SRGBImage;
55181 # 205 "../include/vigra/stdimage.hxx"
55182 typedef BasicImage<RGBValue<UInt16> > UInt16RGBImage;
55183 # 215 "../include/vigra/stdimage.hxx"
55184 typedef BasicImage<RGBValue<Int16> > Int16RGBImage;
55185 # 225 "../include/vigra/stdimage.hxx"
55186 typedef BasicImage<RGBValue<Int32> > IRGBImage;
55187 # 235 "../include/vigra/stdimage.hxx"
55188 typedef BasicImage<RGBValue<UInt32> > UInt32RGBImage;
55189 # 245 "../include/vigra/stdimage.hxx"
55190 typedef BasicImage<RGBValue<Int32> > Int32RGBImage;
55191 # 256 "../include/vigra/stdimage.hxx"
55192 typedef BasicImage<RGBValue<float> > FRGBImage;
55193 # 267 "../include/vigra/stdimage.hxx"
55194 typedef BasicImage<RGBValue<double> > DRGBImage;
55195 # 277 "../include/vigra/stdimage.hxx"
55196 typedef BasicImage<TinyVector<float, 2> > FVector2Image;
55197 # 287 "../include/vigra/stdimage.hxx"
55198 typedef BasicImage<TinyVector<float, 3> > FVector3Image;
55199 # 297 "../include/vigra/stdimage.hxx"
55200 typedef BasicImage<TinyVector<float, 4> > FVector4Image;
55201 # 307 "../include/vigra/stdimage.hxx"
55202 typedef BasicImage<TinyVector<double, 2> > DVector2Image;
55203 # 318 "../include/vigra/stdimage.hxx"
55204 typedef BasicImage<TinyVector<double, 3> > DVector3Image;
55205 # 328 "../include/vigra/stdimage.hxx"
55206 typedef BasicImage<TinyVector<double, 4> > DVector4Image;
55207
55208
55209
55210 }
55211 # 66 "../include/vigra/impex.hxx" 2
55212
55213
55214
55215 # 1 "../include/vigra/inspectimage.hxx" 1
55216 # 46 "../include/vigra/inspectimage.hxx"
55217 # 1 "../include/vigra/functortraits.hxx" 1
55218 # 44 "../include/vigra/functortraits.hxx"
55219 namespace vigra {
55220
55221 template <class T>
55222 class FunctorTraitsBase
55223 {
55224 public:
55225 typedef T type;
55226
55227 typedef VigraFalseType isInitializer;
55228
55229 typedef VigraFalseType isUnaryFunctor;
55230 typedef VigraFalseType isBinaryFunctor;
55231 typedef VigraFalseType isTernaryFunctor;
55232
55233 typedef VigraFalseType isUnaryAnalyser;
55234 typedef VigraFalseType isBinaryAnalyser;
55235 typedef VigraFalseType isTernaryAnalyser;
55236 };
55237 # 123 "../include/vigra/functortraits.hxx"
55238 template <class T>
55239 class FunctorTraits
55240 : public FunctorTraitsBase<T>
55241 {};
55242 # 147 "../include/vigra/functortraits.hxx"
55243 template <class T> class FunctorTraits<std::plus<T> > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; };
55244 template <class T> class FunctorTraits<std::minus<T> > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; };
55245 template <class T> class FunctorTraits<std::multiplies<T> > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; };
55246 template <class T> class FunctorTraits<std::divides<T> > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; };
55247 template <class T> class FunctorTraits<std::modulus<T> > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; };
55248 template <class T> class FunctorTraits<std::equal_to<T> > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; };
55249 template <class T> class FunctorTraits<std::not_equal_to<T> > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; };
55250 template <class T> class FunctorTraits<std::greater<T> > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; };
55251 template <class T> class FunctorTraits<std::less<T> > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; };
55252 template <class T> class FunctorTraits<std::greater_equal<T> > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; };
55253 template <class T> class FunctorTraits<std::less_equal<T> > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; };
55254 template <class T> class FunctorTraits<std::logical_and<T> > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; };
55255 template <class T> class FunctorTraits<std::logical_or<T> > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; };
55256 template <class T> class FunctorTraits<std::binary_negate<T> > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; };
55257
55258 template <class T> class FunctorTraits<std::negate<T> > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraTrueType isUnaryFunctor; typedef VigraFalseType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; };
55259 template <class T> class FunctorTraits<std::logical_not<T> > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraTrueType isUnaryFunctor; typedef VigraFalseType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; };
55260 template <class T> class FunctorTraits<std::unary_negate<T> > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraTrueType isUnaryFunctor; typedef VigraFalseType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; };
55261 template <class T> class FunctorTraits<std::binder1st<T> > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraTrueType isUnaryFunctor; typedef VigraFalseType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; };
55262 template <class T> class FunctorTraits<std::binder2nd<T> > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraTrueType isUnaryFunctor; typedef VigraFalseType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; };
55263
55264
55265 template <class R>
55266 class FunctorTraits<R (*)()>
55267 {
55268 public:
55269 typedef R (*type)();
55270
55271 typedef VigraTrueType isInitializer;
55272 typedef VigraFalseType isUnaryFunctor;
55273 typedef VigraFalseType isBinaryFunctor;
55274 typedef VigraFalseType isTernaryFunctor;
55275 typedef VigraFalseType isUnaryAnalyser;
55276 typedef VigraFalseType isBinaryAnalyser;
55277 typedef VigraFalseType isTernaryAnalyser;
55278 };
55279
55280 template <class R, class T>
55281 class FunctorTraits<R (*)(T)>
55282 {
55283 public:
55284 typedef R (*type)(T);
55285
55286 typedef VigraFalseType isInitializer;
55287 typedef VigraTrueType isUnaryFunctor;
55288 typedef VigraFalseType isBinaryFunctor;
55289 typedef VigraFalseType isTernaryFunctor;
55290 typedef VigraFalseType isUnaryAnalyser;
55291 typedef VigraFalseType isBinaryAnalyser;
55292 typedef VigraFalseType isTernaryAnalyser;
55293 };
55294
55295 template <class R, class T1, class T2>
55296 class FunctorTraits<R (*)(T1, T2)>
55297 {
55298 public:
55299 typedef R (*type)(T1, T2);
55300
55301 typedef VigraFalseType isInitializer;
55302 typedef VigraFalseType isUnaryFunctor;
55303 typedef VigraTrueType isBinaryFunctor;
55304 typedef VigraFalseType isTernaryFunctor;
55305 typedef VigraFalseType isUnaryAnalyser;
55306 typedef VigraFalseType isBinaryAnalyser;
55307 typedef VigraFalseType isTernaryAnalyser;
55308 };
55309
55310 template <class R, class T1, class T2, class T3>
55311 class FunctorTraits<R (*)(T1, T2, T3)>
55312 {
55313 public:
55314 typedef R (*type)(T1, T2, T3);
55315
55316 typedef VigraFalseType isInitializer;
55317 typedef VigraFalseType isUnaryFunctor;
55318 typedef VigraFalseType isBinaryFunctor;
55319 typedef VigraTrueType isTernaryFunctor;
55320 typedef VigraFalseType isUnaryAnalyser;
55321 typedef VigraFalseType isBinaryAnalyser;
55322 typedef VigraFalseType isTernaryAnalyser;
55323 };
55324
55325
55326
55327 }
55328 # 47 "../include/vigra/inspectimage.hxx" 2
55329
55330
55331 namespace vigra {
55332 # 63 "../include/vigra/inspectimage.hxx"
55333 template <class SrcIterator, class SrcAccessor, class Functor>
55334 void
55335 inspectLine(SrcIterator s,
55336 SrcIterator send, SrcAccessor src,
55337 Functor & f)
55338 {
55339 for(; s != send; ++s)
55340 f(src(s));
55341 }
55342
55343 template <class SrcIterator, class SrcAccessor,
55344 class MaskIterator, class MaskAccessor,
55345 class Functor>
55346 void
55347 inspectLineIf(SrcIterator s,
55348 SrcIterator send, SrcAccessor src,
55349 MaskIterator m, MaskAccessor mask,
55350 Functor & f)
55351 {
55352 for(; s != send; ++s, ++m)
55353 if(mask(m))
55354 f(src(s));
55355 }
55356
55357 template <class SrcIterator1, class SrcAccessor1,
55358 class SrcIterator2, class SrcAccessor2,
55359 class Functor>
55360 void
55361 inspectTwoLines(SrcIterator1 s1,
55362 SrcIterator1 s1end, SrcAccessor1 src1,
55363 SrcIterator2 s2, SrcAccessor2 src2,
55364 Functor & f)
55365 {
55366 for(; s1 != s1end; ++s1, ++s2)
55367 f(src1(s1), src2(s2));
55368 }
55369
55370 template <class SrcIterator1, class SrcAccessor1,
55371 class SrcIterator2, class SrcAccessor2,
55372 class MaskIterator, class MaskAccessor,
55373 class Functor>
55374 void
55375 inspectTwoLinesIf(SrcIterator1 s1,
55376 SrcIterator1 s1end, SrcAccessor1 src1,
55377 SrcIterator2 s2, SrcAccessor2 src2,
55378 MaskIterator m, MaskAccessor mask,
55379 Functor & f)
55380 {
55381 for(; s1 != s1end; ++s1, ++s2, ++m)
55382 if(mask(m))
55383 f(src1(s1), src2(s2));
55384 }
55385 # 181 "../include/vigra/inspectimage.hxx"
55386 template <class ImageIterator, class Accessor, class Functor>
55387 void
55388 inspectImage(ImageIterator upperleft, ImageIterator lowerright,
55389 Accessor a, Functor & f)
55390 {
55391 int w = lowerright.x - upperleft.x;
55392
55393 for(; upperleft.y<lowerright.y; ++upperleft.y)
55394 {
55395 inspectLine(upperleft.rowIterator(),
55396 upperleft.rowIterator() + w, a, f);
55397 }
55398 }
55399
55400 template <class ImageIterator, class Accessor, class Functor>
55401 inline
55402 void
55403 inspectImage(triple<ImageIterator, ImageIterator, Accessor> img,
55404 Functor & f)
55405 {
55406 inspectImage(img.first, img.second, img.third, f);
55407 }
55408
55409 namespace functor
55410 {
55411 template <class T> class UnaryAnalyser;
55412 }
55413
55414 template <class ImageIterator, class Accessor, class Functor>
55415 inline
55416 void
55417 inspectImage(ImageIterator upperleft, ImageIterator lowerright,
55418 Accessor a, functor::UnaryAnalyser<Functor> const & f)
55419 {
55420 inspectImage(upperleft, lowerright, a,
55421 const_cast<functor::UnaryAnalyser<Functor> &>(f));
55422 }
55423
55424 template <class ImageIterator, class Accessor, class Functor>
55425 inline
55426 void
55427 inspectImage(triple<ImageIterator, ImageIterator, Accessor> img,
55428 functor::UnaryAnalyser<Functor> const & f)
55429 {
55430 inspectImage(img.first, img.second, img.third,
55431 const_cast<functor::UnaryAnalyser<Functor> &>(f));
55432 }
55433 # 307 "../include/vigra/inspectimage.hxx"
55434 template <class ImageIterator, class Accessor,
55435 class MaskImageIterator, class MaskAccessor, class Functor>
55436 void
55437 inspectImageIf(ImageIterator upperleft,
55438 ImageIterator lowerright, Accessor a,
55439 MaskImageIterator mask_upperleft, MaskAccessor ma,
55440 Functor & f)
55441 {
55442 int w = lowerright.x - upperleft.x;
55443
55444 for(; upperleft.y<lowerright.y; ++upperleft.y, ++mask_upperleft.y)
55445 {
55446 inspectLineIf(upperleft.rowIterator(),
55447 upperleft.rowIterator() + w, a,
55448 mask_upperleft.rowIterator(), ma, f);
55449 }
55450 }
55451
55452 template <class ImageIterator, class Accessor,
55453 class MaskImageIterator, class MaskAccessor, class Functor>
55454 inline
55455 void
55456 inspectImageIf(triple<ImageIterator, ImageIterator, Accessor> img,
55457 pair<MaskImageIterator, MaskAccessor> mask,
55458 Functor & f)
55459 {
55460 inspectImageIf(img.first, img.second, img.third,
55461 mask.first, mask.second, f);
55462 }
55463 # 413 "../include/vigra/inspectimage.hxx"
55464 template <class ImageIterator1, class Accessor1,
55465 class ImageIterator2, class Accessor2,
55466 class Functor>
55467 void
55468 inspectTwoImages(ImageIterator1 upperleft1, ImageIterator1 lowerright1, Accessor1 a1,
55469 ImageIterator2 upperleft2, Accessor2 a2,
55470 Functor & f)
55471 {
55472 int w = lowerright1.x - upperleft1.x;
55473
55474 for(; upperleft1.y<lowerright1.y; ++upperleft1.y, ++upperleft2.y)
55475 {
55476 inspectTwoLines(upperleft1.rowIterator(),
55477 upperleft1.rowIterator() + w, a1,
55478 upperleft2.rowIterator(), a2, f);
55479 }
55480 }
55481
55482 template <class ImageIterator1, class Accessor1,
55483 class ImageIterator2, class Accessor2,
55484 class Functor>
55485 inline
55486 void
55487 inspectTwoImages(triple<ImageIterator1, ImageIterator1, Accessor1> img1,
55488 pair<ImageIterator2, Accessor2> img2,
55489 Functor & f)
55490 {
55491 inspectTwoImages(img1.first, img1.second, img1.third,
55492 img2.first, img2.second, f);
55493 }
55494 # 529 "../include/vigra/inspectimage.hxx"
55495 template <class ImageIterator1, class Accessor1,
55496 class ImageIterator2, class Accessor2,
55497 class MaskImageIterator, class MaskAccessor,
55498 class Functor>
55499 void
55500 inspectTwoImagesIf(ImageIterator1 upperleft1, ImageIterator1 lowerright1, Accessor1 a1,
55501 ImageIterator2 upperleft2, Accessor2 a2,
55502 MaskImageIterator mupperleft, MaskAccessor mask,
55503 Functor & f)
55504 {
55505 int w = lowerright1.x - upperleft1.x;
55506
55507 for(; upperleft1.y<lowerright1.y; ++upperleft1.y, ++upperleft2.y, ++mupperleft.y)
55508 {
55509 inspectTwoLinesIf(upperleft1.rowIterator(),
55510 upperleft1.rowIterator() + w, a1,
55511 upperleft2.rowIterator(), a2,
55512 mupperleft.rowIterator(), mask, f);
55513 }
55514 }
55515
55516 template <class ImageIterator1, class Accessor1,
55517 class ImageIterator2, class Accessor2,
55518 class MaskImageIterator, class MaskAccessor,
55519 class Functor>
55520 inline
55521 void
55522 inspectTwoImagesIf(triple<ImageIterator1, ImageIterator1, Accessor1> img1,
55523 pair<ImageIterator2, Accessor2> img2,
55524 pair<MaskImageIterator, MaskAccessor> m,
55525 Functor & f)
55526 {
55527 inspectTwoImagesIf(img1.first, img1.second, img1.third,
55528 img2.first, img2.second,
55529 m.first, m.second,
55530 f);
55531 }
55532 # 617 "../include/vigra/inspectimage.hxx"
55533 template <class VALUETYPE>
55534 class FindMinMax
55535 {
55536 public:
55537
55538
55539
55540 typedef VALUETYPE argument_type;
55541
55542
55543
55544 typedef VALUETYPE result_type;
55545
55546
55547
55548 typedef VALUETYPE value_type;
55549
55550
55551
55552 FindMinMax()
55553 : count(0)
55554 {}
55555
55556
55557
55558 void reset()
55559 {
55560 count = 0;
55561 }
55562
55563
55564
55565 void operator()(argument_type const & v)
55566 {
55567 if(count)
55568 {
55569 if(v < min) min = v;
55570 if(max < v) max = v;
55571 }
55572 else
55573 {
55574 min = v;
55575 max = v;
55576 }
55577 ++count;
55578 }
55579
55580
55581
55582 void operator()(RGBValue<VALUETYPE> const & v)
55583 {
55584 operator()(v.red());
55585 operator()(v.green());
55586 operator()(v.blue());
55587 }
55588
55589
55590
55591 void operator()(FindMinMax const & v)
55592 {
55593 if(v.count)
55594 {
55595 if(count)
55596 {
55597 if(v.min < min) min = v.min;
55598 if((this->max) < v.max) max = v.max;
55599 }
55600 else
55601 {
55602 min = v.min;
55603 max = v.max;
55604 }
55605 }
55606 count += v.count;
55607 }
55608
55609
55610
55611 VALUETYPE min;
55612
55613
55614
55615 VALUETYPE max;
55616
55617
55618
55619 unsigned int count;
55620
55621 };
55622
55623 template <class VALUETYPE>
55624 class FunctorTraits<FindMinMax<VALUETYPE> >
55625 : public FunctorTraitsBase<FindMinMax<VALUETYPE> >
55626 {
55627 public:
55628 typedef VigraTrueType isUnaryAnalyser;
55629 };
55630 # 759 "../include/vigra/inspectimage.hxx"
55631 template <class VALUETYPE>
55632 class FindAverage
55633 {
55634 public:
55635
55636
55637
55638 typedef VALUETYPE argument_type;
55639
55640
55641
55642 typedef typename NumericTraits<VALUETYPE>::RealPromote result_type;
55643
55644
55645
55646 typedef typename NumericTraits<VALUETYPE>::RealPromote value_type;
55647
55648
55649
55650 FindAverage()
55651 : count(0), sum(NumericTraits<result_type>::zero())
55652 {}
55653
55654
55655
55656 void reset()
55657 {
55658 count = 0;
55659 sum = NumericTraits<result_type>::zero();
55660 }
55661
55662
55663
55664 void operator()(argument_type const & v)
55665 {
55666 sum += v;
55667 ++count;
55668 }
55669
55670
55671
55672 void operator()(FindAverage const & v)
55673 {
55674 sum += v.sum;
55675 count += v.count;
55676 }
55677
55678
55679
55680 result_type average() const
55681 {
55682 return sum / (double)count;
55683 }
55684
55685
55686
55687 result_type operator()() const
55688 {
55689 return sum / (double)count;
55690 }
55691
55692 unsigned int count;
55693 result_type sum;
55694
55695 };
55696
55697 template <class VALUETYPE>
55698 class FunctorTraits<FindAverage<VALUETYPE> >
55699 : public FunctorTraitsBase<FindAverage<VALUETYPE> >
55700 {
55701 public:
55702 typedef VigraTrueType isInitializer;
55703 typedef VigraTrueType isUnaryAnalyser;
55704 };
55705 # 868 "../include/vigra/inspectimage.hxx"
55706 template <class VALUETYPE>
55707 class FindROISize
55708 {
55709 public:
55710
55711
55712
55713 typedef VALUETYPE argument_type;
55714
55715
55716
55717 typedef unsigned int result_type;
55718
55719
55720
55721 typedef VALUETYPE value_type;
55722
55723
55724
55725 FindROISize()
55726 : count(0)
55727 {}
55728
55729
55730
55731 void reset()
55732 {
55733 count = 0;
55734 }
55735
55736
55737
55738 void operator()(argument_type const &)
55739 {
55740 ++count;
55741 }
55742
55743
55744
55745 result_type operator()() const
55746 {
55747 return count;
55748 }
55749
55750
55751
55752 result_type size() const
55753 {
55754 return count;
55755 }
55756
55757
55758
55759 void operator()(FindROISize const & o)
55760 {
55761 count += o.count;
55762 }
55763
55764
55765
55766 result_type count;
55767
55768 };
55769
55770 template <class VALUETYPE>
55771 class FunctorTraits<FindROISize<VALUETYPE> >
55772 : public FunctorTraitsBase<FindROISize<VALUETYPE> >
55773 {
55774 public:
55775 typedef VigraTrueType isInitializer;
55776 typedef VigraTrueType isUnaryAnalyser;
55777 };
55778 # 985 "../include/vigra/inspectimage.hxx"
55779 class FindBoundingRectangle
55780 {
55781 public:
55782
55783
55784
55785 typedef Diff2D argument_type;
55786
55787
55788
55789 typedef Rect2D result_type;
55790
55791
55792
55793 typedef Diff2D value_type;
55794
55795
55796
55797 Point2D upperLeft;
55798
55799
55800
55801 Point2D lowerRight;
55802
55803
55804
55805 bool valid;
55806
55807
55808
55809 FindBoundingRectangle()
55810 : valid(false)
55811 {}
55812
55813
55814
55815 void reset()
55816 {
55817 valid = false;
55818 }
55819
55820
55821
55822 void operator()(argument_type const & coord)
55823 {
55824 if(!valid)
55825 {
55826 upperLeft = Point2D(coord);
55827 lowerRight = Point2D(coord + Diff2D(1,1));
55828 valid = true;
55829 }
55830 else
55831 {
55832 upperLeft.x = std::min(upperLeft.x, coord.x);
55833 upperLeft.y = std::min(upperLeft.y, coord.y);
55834 lowerRight.x = std::max(lowerRight.x, coord.x + 1);
55835 lowerRight.y = std::max(lowerRight.y, coord.y + 1);
55836 }
55837 }
55838
55839
55840
55841 void operator()(FindBoundingRectangle const & otherRegion)
55842 {
55843 if(!valid)
55844 {
55845 upperLeft = otherRegion.upperLeft;
55846 lowerRight = otherRegion.lowerRight;
55847 valid = otherRegion.valid;
55848 }
55849 else if(otherRegion.valid)
55850 {
55851 upperLeft.x = std::min(upperLeft.x, otherRegion.upperLeft.x);
55852 upperLeft.y = std::min(upperLeft.y, otherRegion.upperLeft.y);
55853 lowerRight.x = std::max(lowerRight.x, otherRegion.lowerRight.x);
55854 lowerRight.y = std::max(lowerRight.y, otherRegion.lowerRight.y);
55855 }
55856 }
55857
55858
55859
55860 Size2D size() const
55861 {
55862 return lowerRight - upperLeft;
55863 }
55864
55865
55866
55867
55868
55869 result_type operator()() const
55870 {
55871 return result_type(upperLeft, lowerRight);
55872 }
55873 };
55874
55875 template <>
55876 class FunctorTraits<FindBoundingRectangle>
55877 : public FunctorTraitsBase<FindBoundingRectangle>
55878 {
55879 public:
55880 typedef VigraTrueType isInitializer;
55881 typedef VigraTrueType isUnaryAnalyser;
55882 };
55883 # 1126 "../include/vigra/inspectimage.hxx"
55884 template <class VALUETYPE>
55885 class LastValueFunctor
55886 {
55887 public:
55888
55889
55890
55891 typedef VALUETYPE argument_type;
55892
55893
55894
55895 typedef VALUETYPE result_type;
55896
55897
55898
55899 typedef VALUETYPE value_type;
55900
55901
55902
55903 LastValueFunctor()
55904 {}
55905
55906
55907
55908 void operator=(argument_type const & v) { value = v; }
55909
55910
55911
55912 void reset() { value = VALUETYPE(); }
55913
55914
55915
55916 void operator()(argument_type const & v) { value = v; }
55917
55918
55919
55920 result_type const & operator()() const { return value; }
55921
55922
55923
55924 VALUETYPE value;
55925
55926 };
55927
55928 template <class VALUETYPE>
55929 class FunctorTraits<LastValueFunctor<VALUETYPE> >
55930 : public FunctorTraitsBase<LastValueFunctor<VALUETYPE> >
55931 {
55932 public:
55933 typedef VigraTrueType isInitializer;
55934 typedef VigraTrueType isUnaryAnalyser;
55935 };
55936 # 1229 "../include/vigra/inspectimage.hxx"
55937 template <class FUNCTOR, class VALUETYPE>
55938 class ReduceFunctor
55939 {
55940 FUNCTOR f_;
55941 VALUETYPE start_, accumulator_;
55942 public:
55943
55944
55945
55946
55947
55948
55949 typedef VALUETYPE argument_type;
55950
55951
55952
55953
55954
55955
55956 typedef VALUETYPE first_argument_type;
55957
55958
55959
55960
55961
55962
55963 typedef VALUETYPE second_argument_type;
55964
55965
55966
55967 typedef VALUETYPE result_type;
55968
55969
55970
55971
55972 ReduceFunctor(FUNCTOR const & f, VALUETYPE const & initial)
55973 : f_(f),
55974 start_(initial),
55975 accumulator_(initial)
55976 {}
55977
55978
55979
55980 void reset()
55981 { accumulator_ = start_; }
55982
55983
55984
55985
55986
55987 template <class T>
55988 void operator()(T const & v)
55989 {
55990 accumulator_ = f_(accumulator_, v);
55991 }
55992
55993
55994
55995
55996
55997 template <class T1, class T2>
55998 void operator()(T1 const & v1, T2 const & v2)
55999 {
56000 accumulator_ = f_(accumulator_, v1, v2);
56001 }
56002
56003
56004
56005 result_type const & operator()() const
56006 { return accumulator_; }
56007 };
56008
56009 template <class FUNCTOR, class VALUETYPE>
56010 ReduceFunctor<FUNCTOR, VALUETYPE>
56011 reduceFunctor(FUNCTOR const & f, VALUETYPE const & initial)
56012 {
56013 return ReduceFunctor<FUNCTOR, VALUETYPE>(f, initial);
56014 }
56015
56016 template <class FUNCTOR, class VALUETYPE>
56017 class FunctorTraits<ReduceFunctor<FUNCTOR, VALUETYPE> >
56018 : public FunctorTraitsBase<ReduceFunctor<FUNCTOR, VALUETYPE> >
56019 {
56020 public:
56021 typedef VigraTrueType isInitializer;
56022 typedef VigraTrueType isUnaryAnalyser;
56023 typedef VigraTrueType isBinaryAnalyser;
56024 };
56025 # 1381 "../include/vigra/inspectimage.hxx"
56026 template <class RegionStatistics, class LabelType = int>
56027 class ArrayOfRegionStatistics
56028 {
56029 typedef std::vector<RegionStatistics> RegionArray;
56030
56031 public:
56032
56033
56034
56035 typedef typename RegionStatistics::argument_type first_argument_type;
56036
56037
56038
56039 typedef LabelType second_argument_type;
56040
56041
56042
56043
56044 typedef LabelType argument_type;
56045
56046
56047
56048
56049 typedef typename RegionStatistics::result_type result_type;
56050
56051
56052
56053
56054
56055 typedef RegionStatistics value_type;
56056
56057
56058
56059 typedef RegionStatistics & reference;
56060
56061
56062
56063 typedef RegionStatistics const & const_reference;
56064
56065
56066
56067 typedef typename RegionArray::iterator iterator;
56068
56069
56070
56071 typedef typename RegionArray::const_iterator const_iterator;
56072
56073
56074
56075 ArrayOfRegionStatistics()
56076 {}
56077
56078
56079
56080
56081 ArrayOfRegionStatistics(unsigned int max_region_label)
56082 : regions(max_region_label+1)
56083 {}
56084
56085
56086
56087
56088 void resize(unsigned int max_region_label)
56089 {
56090 RegionArray newRegions(max_region_label+1);
56091 regions.swap(newRegions);
56092 }
56093
56094
56095
56096 void reset()
56097 {
56098 RegionArray newRegions(regions.size());
56099 regions.swap(newRegions);
56100 }
56101
56102
56103
56104
56105 void operator()(first_argument_type const & v, second_argument_type label) {
56106 regions[static_cast<unsigned int>(label)](v);
56107 }
56108
56109
56110
56111 void merge(argument_type label1, argument_type label2) {
56112 regions[static_cast<unsigned int>(label1)](regions[static_cast<unsigned int>(label2)]);
56113 }
56114
56115
56116
56117 unsigned int maxRegionLabel() const
56118 { return size() - 1; }
56119
56120
56121
56122 unsigned int size() const
56123 { return regions.size(); }
56124
56125
56126
56127
56128 result_type operator()(argument_type label) const
56129 { return regions[static_cast<unsigned int>(label)](); }
56130
56131
56132
56133 const_reference operator[](argument_type label) const
56134 { return regions[static_cast<unsigned int>(label)]; }
56135
56136
56137
56138 reference operator[](argument_type label)
56139 { return regions[static_cast<unsigned int>(label)]; }
56140
56141
56142
56143 iterator begin()
56144 { return regions.begin(); }
56145
56146
56147
56148 const_iterator begin() const
56149 { return regions.begin(); }
56150
56151
56152
56153 iterator end()
56154 { return regions.end(); }
56155
56156
56157
56158 const_iterator end() const
56159 { return regions.end(); }
56160
56161 private:
56162 std::vector<RegionStatistics> regions;
56163 };
56164
56165 template <class RegionStatistics, class LabelType>
56166 class FunctorTraits<ArrayOfRegionStatistics<RegionStatistics, LabelType> >
56167 : public FunctorTraitsBase<ArrayOfRegionStatistics<RegionStatistics, LabelType> >
56168 {
56169 public:
56170 typedef VigraTrueType isUnaryFunctor;
56171 typedef VigraTrueType isBinaryAnalyser;
56172 };
56173
56174
56175
56176 }
56177 # 70 "../include/vigra/impex.hxx" 2
56178 # 1 "../include/vigra/transformimage.hxx" 1
56179 # 47 "../include/vigra/transformimage.hxx"
56180 namespace vigra {
56181 # 61 "../include/vigra/transformimage.hxx"
56182 template <class SrcIterator, class SrcAccessor,
56183 class DestIterator, class DestAccessor, class Functor>
56184 void
56185 transformLine(SrcIterator s,
56186 SrcIterator send, SrcAccessor src,
56187 DestIterator d, DestAccessor dest,
56188 Functor const & f)
56189 {
56190 for(; s != send; ++s, ++d)
56191 dest.set(f(src(s)), d);
56192 }
56193
56194 template <class SrcIterator, class SrcAccessor,
56195 class MaskIterator, class MaskAccessor,
56196 class DestIterator, class DestAccessor,
56197 class Functor>
56198 void
56199 transformLineIf(SrcIterator s,
56200 SrcIterator send, SrcAccessor src,
56201 MaskIterator m, MaskAccessor mask,
56202 DestIterator d, DestAccessor dest,
56203 Functor const & f)
56204 {
56205 for(; s != send; ++s, ++d, ++m)
56206 if(mask(m))
56207 dest.set(f(src(s)), d);
56208 }
56209 # 165 "../include/vigra/transformimage.hxx"
56210 template <class SrcImageIterator, class SrcAccessor,
56211 class DestImageIterator, class DestAccessor, class Functor>
56212 void
56213 transformImage(SrcImageIterator src_upperleft,
56214 SrcImageIterator src_lowerright, SrcAccessor sa,
56215 DestImageIterator dest_upperleft, DestAccessor da,
56216 Functor const & f)
56217 {
56218 int w = src_lowerright.x - src_upperleft.x;
56219
56220 for(; src_upperleft.y < src_lowerright.y; ++src_upperleft.y, ++dest_upperleft.y)
56221 {
56222 transformLine(src_upperleft.rowIterator(),
56223 src_upperleft.rowIterator() + w, sa,
56224 dest_upperleft.rowIterator(), da, f);
56225 }
56226 }
56227
56228 template <class SrcImageIterator, class SrcAccessor,
56229 class DestImageIterator, class DestAccessor, class Functor>
56230 inline
56231 void
56232 transformImage(triple<SrcImageIterator, SrcImageIterator, SrcAccessor> src,
56233 pair<DestImageIterator, DestAccessor> dest,
56234 Functor const & f)
56235 {
56236 transformImage(src.first, src.second, src.third,
56237 dest.first, dest.second, f);
56238 }
56239 # 283 "../include/vigra/transformimage.hxx"
56240 template <class SrcImageIterator, class SrcAccessor,
56241 class MaskImageIterator, class MaskAccessor,
56242 class DestImageIterator, class DestAccessor,
56243 class Functor>
56244 void
56245 transformImageIf(SrcImageIterator src_upperleft,
56246 SrcImageIterator src_lowerright, SrcAccessor sa,
56247 MaskImageIterator mask_upperleft, MaskAccessor ma,
56248 DestImageIterator dest_upperleft, DestAccessor da,
56249 Functor const & f)
56250 {
56251 int w = src_lowerright.x - src_upperleft.x;
56252
56253 for(; src_upperleft.y < src_lowerright.y;
56254 ++src_upperleft.y, ++mask_upperleft.y, ++dest_upperleft.y)
56255 {
56256 transformLineIf(src_upperleft.rowIterator(),
56257 src_upperleft.rowIterator() + w, sa,
56258 mask_upperleft.rowIterator(), ma,
56259 dest_upperleft.rowIterator(), da, f);
56260 }
56261 }
56262
56263 template <class SrcImageIterator, class SrcAccessor,
56264 class MaskImageIterator, class MaskAccessor,
56265 class DestImageIterator, class DestAccessor,
56266 class Functor>
56267 inline
56268 void
56269 transformImageIf(triple<SrcImageIterator, SrcImageIterator, SrcAccessor> src,
56270 pair<MaskImageIterator, MaskAccessor> mask,
56271 pair<DestImageIterator, DestAccessor> dest,
56272 Functor const & f)
56273 {
56274 transformImageIf(src.first, src.second, src.third,
56275 mask.first, mask.second,
56276 dest.first, dest.second, f);
56277 }
56278 # 399 "../include/vigra/transformimage.hxx"
56279 template <class SrcImageIterator, class SrcAccessor,
56280 class DestImageIterator, class DestAccessor, class Functor>
56281 void
56282 gradientBasedTransform(SrcImageIterator srcul, SrcImageIterator srclr, SrcAccessor sa,
56283 DestImageIterator destul, DestAccessor da, Functor const & grad)
56284 {
56285 int w = srclr.x - srcul.x;
56286 int h = srclr.y - srcul.y;
56287 int x,y;
56288
56289 SrcImageIterator sy = srcul;
56290 DestImageIterator dy = destul;
56291
56292 static const Diff2D left(-1,0);
56293 static const Diff2D right(1,0);
56294 static const Diff2D top(0,-1);
56295 static const Diff2D bottom(0,1);
56296
56297 typename NumericTraits<typename SrcAccessor::value_type>::RealPromote
56298 diffx, diffy;
56299
56300 SrcImageIterator sx = sy;
56301 DestImageIterator dx = dy;
56302
56303 diffx = sa(sx) - sa(sx, right);
56304 diffy = sa(sx) - sa(sx, bottom);
56305 da.set(grad(diffx, diffy), dx);
56306
56307 for(x=2, ++sx.x, ++dx.x; x<w; ++x, ++sx.x, ++dx.x)
56308 {
56309 diffx = (sa(sx, left) - sa(sx, right)) / 2.0;
56310 diffy = sa(sx) - sa(sx, bottom);
56311 da.set(grad(diffx, diffy), dx);
56312 }
56313
56314 diffx = sa(sx, left) - sa(sx);
56315 diffy = sa(sx) - sa(sx, bottom);
56316 da.set(grad(diffx, diffy), dx);
56317
56318 ++sy.y;
56319 ++dy.y;
56320
56321 for(y=2; y<h; ++y, ++sy.y, ++dy.y)
56322 {
56323 sx = sy;
56324 dx = dy;
56325
56326 diffx = sa(sx) - sa(sx, right);
56327 diffy = (sa(sx, top) - sa(sx, bottom)) / 2.0;
56328 da.set(grad(diffx, diffy), dx);
56329
56330 for(x=2, ++sx.x, ++dx.x; x<w; ++x, ++sx.x, ++dx.x)
56331 {
56332 diffx = (sa(sx, left) - sa(sx, right)) / 2.0;
56333 diffy = (sa(sx, top) - sa(sx, bottom)) / 2.0;
56334 da.set(grad(diffx, diffy), dx);
56335 }
56336
56337 diffx = sa(sx, left) - sa(sx);
56338 diffy = (sa(sx, top) - sa(sx, bottom)) / 2.0;
56339 da.set(grad(diffx, diffy), dx);
56340 }
56341
56342 sx = sy;
56343 dx = dy;
56344
56345 diffx = sa(sx) - sa(sx, right);
56346 diffy = sa(sx, top) - sa(sx);
56347 da.set(grad(diffx, diffy), dx);
56348
56349 for(x=2, ++sx.x, ++dx.x; x<w; ++x, ++sx.x, ++dx.x)
56350 {
56351 diffx = (sa(sx, left) - sa(sx, right)) / 2.0;
56352 diffy = sa(sx, top) - sa(sx);
56353 da.set(grad(diffx, diffy), dx);
56354 }
56355
56356 diffx = sa(sx, left) - sa(sx);
56357 diffy = sa(sx, top) - sa(sx);
56358 da.set(grad(diffx, diffy), dx);
56359 }
56360
56361 template <class SrcImageIterator, class SrcAccessor,
56362 class DestImageIterator, class DestAccessor, class Functor>
56363 inline
56364 void
56365 gradientBasedTransform(triple<SrcImageIterator, SrcImageIterator, SrcAccessor> src,
56366 pair<DestImageIterator, DestAccessor> dest, Functor const & grad)
56367 {
56368 gradientBasedTransform(src.first, src.second, src.third,
56369 dest.first, dest.second, grad);
56370 }
56371 # 500 "../include/vigra/transformimage.hxx"
56372 template <class DestValueType, class Multiplier = double>
56373 class LinearIntensityTransform
56374 {
56375 public:
56376
56377
56378
56379 typedef DestValueType argument_type;
56380
56381
56382
56383 typedef DestValueType result_type;
56384
56385
56386
56387 typedef DestValueType value_type;
56388
56389
56390
56391
56392 typedef typename
56393 NumericTraits<DestValueType>::RealPromote argument_promote;
56394
56395
56396
56397 typedef Multiplier scalar_multiplier_type;
56398
56399
56400
56401 LinearIntensityTransform(scalar_multiplier_type scale, argument_promote offset)
56402 : scale_(scale), offset_(offset)
56403 {}
56404
56405
56406
56407 template <class SrcValueType>
56408 result_type operator()(SrcValueType const & s) const
56409 {
56410 return NumericTraits<result_type>::fromRealPromote(scale_ * (s + offset_));
56411 }
56412
56413 private:
56414
56415 scalar_multiplier_type scale_;
56416 argument_promote offset_;
56417 };
56418
56419 template <class DestValueType, class Multiplier>
56420 class FunctorTraits<LinearIntensityTransform<DestValueType, Multiplier> >
56421 : public FunctorTraitsBase<LinearIntensityTransform<DestValueType, Multiplier> >
56422 {
56423 public:
56424 typedef VigraTrueType isUnaryFunctor;
56425 };
56426
56427 template <class DestValueType, class Multiplier = double>
56428 class ScalarIntensityTransform
56429 {
56430 public:
56431
56432
56433
56434 typedef DestValueType argument_type;
56435
56436
56437
56438 typedef DestValueType result_type;
56439
56440
56441
56442 typedef DestValueType value_type;
56443
56444
56445
56446 typedef Multiplier scalar_multiplier_type;
56447
56448
56449
56450 ScalarIntensityTransform(scalar_multiplier_type scale)
56451 : scale_(scale)
56452 {}
56453
56454
56455
56456 template <class SrcValueType>
56457 result_type operator()(SrcValueType const & s) const
56458 {
56459 return NumericTraits<result_type>::fromRealPromote(scale_ * s);
56460 }
56461
56462 private:
56463 scalar_multiplier_type scale_;
56464 };
56465
56466 template <class DestValueType, class Multiplier>
56467 class FunctorTraits<ScalarIntensityTransform<DestValueType, Multiplier> >
56468 : public FunctorTraitsBase<ScalarIntensityTransform<DestValueType, Multiplier> >
56469 {
56470 public:
56471 typedef VigraTrueType isUnaryFunctor;
56472 };
56473 # 674 "../include/vigra/transformimage.hxx"
56474 template <class Multiplier, class DestValueType>
56475 LinearIntensityTransform<DestValueType, Multiplier>
56476 linearIntensityTransform(Multiplier scale, DestValueType offset)
56477 {
56478 return LinearIntensityTransform<DestValueType, Multiplier>(scale, offset);
56479 }
56480
56481 template <class DestValueType, class Multiplier>
56482 ScalarIntensityTransform<DestValueType, Multiplier>
56483 linearIntensityTransform(Multiplier scale)
56484 {
56485 return ScalarIntensityTransform<DestValueType, Multiplier>(scale);
56486 }
56487 # 742 "../include/vigra/transformimage.hxx"
56488 template <class SrcValueType, class DestValueType>
56489 LinearIntensityTransform<DestValueType, typename NumericTraits<DestValueType>::RealPromote>
56490 linearRangeMapping(SrcValueType src_min, SrcValueType src_max,
56491 DestValueType dest_min, DestValueType dest_max )
56492 {
56493 return linearRangeMapping(src_min, src_max, dest_min, dest_max,
56494 typename NumericTraits<DestValueType>::isScalar());
56495 }
56496
56497 template <class SrcValueType, class DestValueType>
56498 LinearIntensityTransform<DestValueType, typename NumericTraits<DestValueType>::RealPromote>
56499 linearRangeMapping(
56500 SrcValueType src_min, SrcValueType src_max,
56501 DestValueType dest_min, DestValueType dest_max,
56502 VigraTrueType )
56503 {
56504 typedef typename NumericTraits<DestValueType>::RealPromote Multiplier;
56505 Multiplier diff = src_max - src_min;
56506 Multiplier scale = diff == NumericTraits<Multiplier>::zero()
56507 ? NumericTraits<Multiplier>::one()
56508 : (dest_max - dest_min) / diff;
56509 return LinearIntensityTransform<DestValueType, Multiplier>(
56510 scale, dest_min / scale - src_min );
56511 }
56512
56513 template <class SrcValueType, class DestValueType>
56514 LinearIntensityTransform<DestValueType, typename NumericTraits<DestValueType>::RealPromote>
56515 linearRangeMapping(
56516 SrcValueType src_min, SrcValueType src_max,
56517 DestValueType dest_min, DestValueType dest_max,
56518 VigraFalseType )
56519 {
56520 typedef typename NumericTraits<DestValueType>::RealPromote Multiplier;
56521 typedef typename Multiplier::value_type MComponent;
56522 Multiplier scale(dest_max), offset(dest_max);
56523 for(unsigned int i=0; i<src_min.size(); ++i)
56524 {
56525 MComponent diff = src_max[i] - src_min[i];
56526 scale[i] = diff == NumericTraits<MComponent>::zero()
56527 ? NumericTraits<MComponent>::one()
56528 : (dest_max[i] - dest_min[i]) / diff;
56529 offset[i] = dest_min[i] / scale[i] - src_min[i];
56530 }
56531 return LinearIntensityTransform<DestValueType, Multiplier>(scale, offset);
56532 }
56533 # 832 "../include/vigra/transformimage.hxx"
56534 template <class SrcValueType, class DestValueType>
56535 class Threshold
56536 {
56537 public:
56538
56539
56540
56541 typedef SrcValueType argument_type;
56542
56543
56544
56545 typedef DestValueType result_type;
56546
56547
56548
56549 Threshold(argument_type lower, argument_type higher,
56550 result_type noresult, result_type yesresult)
56551 : lower_(lower), higher_(higher),
56552 yesresult_(yesresult), noresult_(noresult)
56553 {}
56554
56555
56556
56557 result_type operator()(argument_type s) const
56558 {
56559 return ((s < lower_) || (higher_ < s)) ? noresult_ : yesresult_;
56560 }
56561
56562 private:
56563
56564 argument_type lower_, higher_;
56565 result_type yesresult_, noresult_;
56566 };
56567
56568 template <class SrcValueType, class DestValueType>
56569 class FunctorTraits<Threshold<SrcValueType, DestValueType> >
56570 : public FunctorTraitsBase<Threshold<SrcValueType, DestValueType> >
56571 {
56572 public:
56573 typedef VigraTrueType isUnaryFunctor;
56574 };
56575 # 948 "../include/vigra/transformimage.hxx"
56576 template <class PixelType>
56577 class BrightnessContrastFunctor
56578 {
56579 typedef typename
56580 NumericTraits<PixelType>::RealPromote promote_type;
56581
56582 public:
56583
56584
56585
56586 typedef PixelType argument_type;
56587
56588
56589
56590 typedef PixelType result_type;
56591
56592
56593
56594 typedef PixelType value_type;
56595
56596
56597
56598
56599
56600
56601 BrightnessContrastFunctor(promote_type brightness, promote_type contrast,
56602 argument_type const & min, argument_type const & max)
56603 : b_(1.0/brightness),
56604 c_(1.0/contrast),
56605 min_(min),
56606 diff_(max - min),
56607 zero_(NumericTraits<promote_type>::zero()),
56608 one_(NumericTraits<promote_type>::one())
56609 {}
56610
56611
56612
56613 result_type operator()(argument_type const & v) const
56614 {
56615 promote_type v1 = (v - min_) / diff_;
56616 promote_type brighter = std::pow(v1, b_);
56617 promote_type v2 = 2.0 * brighter - one_;
56618 promote_type contrasted = (v2 < zero_) ?
56619 -std::pow(-v2, c_) :
56620 std::pow(v2, c_);
56621 return result_type(0.5 * diff_ * (contrasted + one_) + min_);
56622 }
56623
56624 private:
56625 promote_type b_, c_;
56626 argument_type min_;
56627 promote_type diff_, zero_, one_;
56628 };
56629
56630 template <>
56631 class BrightnessContrastFunctor<unsigned char>
56632 {
56633 typedef NumericTraits<unsigned char>::RealPromote promote_type;
56634 unsigned char lut[256];
56635
56636 public:
56637
56638 typedef unsigned char value_type;
56639
56640 BrightnessContrastFunctor(promote_type brightness, promote_type contrast,
56641 value_type const & min = 0, value_type const & max = 255)
56642 {
56643 BrightnessContrastFunctor<promote_type> f(brightness, contrast, min, max);
56644
56645 for(int i = min; i <= max; ++i)
56646 {
56647 lut[i] = static_cast<unsigned char>(f(i)+0.5);
56648 }
56649 }
56650
56651 value_type operator()(value_type const & v) const
56652 {
56653
56654 return lut[v];
56655 }
56656 };
56657
56658
56659
56660 template <class ComponentType>
56661 class BrightnessContrastFunctor<RGBValue<ComponentType> >
56662 {
56663 typedef typename
56664 NumericTraits<ComponentType>::RealPromote promote_type;
56665 BrightnessContrastFunctor<ComponentType> red, green, blue;
56666
56667 public:
56668
56669 typedef RGBValue<ComponentType> value_type;
56670
56671 BrightnessContrastFunctor(promote_type brightness, promote_type contrast,
56672 value_type const & min, value_type const & max)
56673 : red(brightness, contrast, min.red(), max.red()),
56674 green(brightness, contrast, min.green(), max.green()),
56675 blue(brightness, contrast, min.blue(), max.blue())
56676 {}
56677
56678 value_type operator()(value_type const & v) const
56679 {
56680
56681 return value_type(red(v.red()), green(v.green()), blue(v.blue()));
56682 }
56683 };
56684 # 1117 "../include/vigra/transformimage.hxx"
56685 template <>
56686 class BrightnessContrastFunctor<RGBValue<unsigned char> >
56687 {
56688 typedef NumericTraits<unsigned char>::RealPromote promote_type;
56689 BrightnessContrastFunctor<unsigned char> red, green, blue;
56690
56691 public:
56692
56693 typedef RGBValue<unsigned char> value_type;
56694
56695 BrightnessContrastFunctor(promote_type brightness, promote_type contrast,
56696 value_type const & min = value_type(0,0,0),
56697 value_type const & max = value_type(255, 255, 255))
56698 : red(brightness, contrast, min.red(), max.red()),
56699 green(brightness, contrast, min.green(), max.green()),
56700 blue(brightness, contrast, min.blue(), max.blue())
56701 {}
56702
56703 value_type operator()(value_type const & v) const
56704 {
56705
56706 return value_type(red(v.red()), green(v.green()), blue(v.blue()));
56707 }
56708 };
56709 # 1181 "../include/vigra/transformimage.hxx"
56710 template <class ValueType>
56711 class VectorNormFunctor
56712 {
56713 public:
56714
56715
56716 typedef ValueType argument_type;
56717
56718
56719
56720 typedef typename NumericTraits<typename ValueType::value_type>::RealPromote result_type;
56721
56722
56723
56724 result_type operator()( const argument_type &a ) const
56725 {
56726 return std::sqrt( dot(a,a) );
56727 }
56728 };
56729
56730 template <class ValueType>
56731 class FunctorTraits<VectorNormFunctor<ValueType> >
56732 : public FunctorTraitsBase<VectorNormFunctor<ValueType> >
56733 {
56734 public:
56735 typedef VigraTrueType isUnaryFunctor;
56736 };
56737 # 1226 "../include/vigra/transformimage.hxx"
56738 template <class ValueType>
56739 class VectorNormSqFunctor
56740 {
56741 public:
56742
56743
56744 typedef ValueType argument_type;
56745
56746
56747
56748 typedef typename NumericTraits<typename ValueType::value_type>::RealPromote result_type;
56749
56750
56751
56752 result_type operator()( const argument_type &a ) const
56753 {
56754 return dot(a,a);
56755 }
56756 };
56757
56758 template <class ValueType>
56759 class FunctorTraits<VectorNormSqFunctor<ValueType> >
56760 : public FunctorTraitsBase<VectorNormSqFunctor<ValueType> >
56761 {
56762 public:
56763 typedef VigraTrueType isUnaryFunctor;
56764 };
56765
56766
56767
56768 }
56769 # 71 "../include/vigra/impex.hxx" 2
56770 # 1 "../include/vigra/copyimage.hxx" 1
56771 # 72 "../include/vigra/impex.hxx" 2
56772 # 1 "../include/vigra/multi_array.hxx" 1
56773 # 46 "../include/vigra/multi_array.hxx"
56774 # 1 "../include/vigra/basicimageview.hxx" 1
56775 # 40 "../include/vigra/basicimageview.hxx"
56776 # 1 "../include/vigra/imageiterator.hxx" 1
56777 # 46 "../include/vigra/imageiterator.hxx"
56778 namespace vigra {
56779
56780 template <class IMAGEITERATOR>
56781 class StridedIteratorPolicy
56782 {
56783 public:
56784 typedef IMAGEITERATOR ImageIterator;
56785 typedef typename IMAGEITERATOR::value_type value_type;
56786 typedef typename IMAGEITERATOR::difference_type::MoveY
56787 difference_type;
56788 typedef typename IMAGEITERATOR::reference reference;
56789 typedef typename IMAGEITERATOR::index_reference index_reference;
56790 typedef typename IMAGEITERATOR::pointer pointer;
56791 typedef std::random_access_iterator_tag iterator_category;
56792
56793
56794 struct BaseType
56795 {
56796 explicit BaseType(pointer c = 0, difference_type stride = 0)
56797 : current_(c), stride_(stride)
56798 {}
56799
56800 pointer current_;
56801 difference_type stride_;
56802 };
56803
56804 static void initialize(BaseType & ) {}
56805
56806 static reference dereference(BaseType const & d)
56807 { return const_cast<reference>(*d.current_); }
56808
56809 static index_reference dereference(BaseType const & d, difference_type n)
56810 {
56811 return const_cast<index_reference>(d.current_[n*d.stride_]);
56812 }
56813
56814 static bool equal(BaseType const & d1, BaseType const & d2)
56815 { return d1.current_ == d2.current_; }
56816
56817 static bool less(BaseType const & d1, BaseType const & d2)
56818 { return d1.current_ < d2.current_; }
56819
56820 static difference_type difference(BaseType const & d1, BaseType const & d2)
56821 { return (d1.current_ - d2.current_) / d1.stride_; }
56822
56823 static void increment(BaseType & d)
56824 { d.current_ += d.stride_; }
56825
56826 static void decrement(BaseType & d)
56827 { d.current_ -= d.stride_; }
56828
56829 static void advance(BaseType & d, difference_type n)
56830 { d.current_ += d.stride_*n; }
56831 };
56832 # 445 "../include/vigra/imageiterator.hxx"
56833 namespace detail {
56834
56835 template <class StridedOrUnstrided>
56836 class DirectionSelector;
56837
56838 template <>
56839 class DirectionSelector<UnstridedArrayTag>
56840 {
56841 public:
56842
56843 template <class T>
56844 class type
56845 {
56846 public:
56847 type(T base)
56848 : current_(base)
56849 {}
56850
56851 type(type const & rhs)
56852 : current_(rhs.current_)
56853 {}
56854
56855 type & operator=(type const & rhs)
56856 {
56857 current_ = rhs.current_;
56858 return *this;
56859 }
56860
56861 void operator++() {++current_;}
56862 void operator++(int) {++current_;}
56863 void operator--() {--current_;}
56864 void operator--(int) {--current_;}
56865 void operator+=(int dx) {current_ += dx; }
56866 void operator-=(int dx) {current_ -= dx; }
56867
56868 bool operator==(type const & rhs) const
56869 { return current_ == rhs.current_; }
56870
56871 bool operator!=(type const & rhs) const
56872 { return current_ != rhs.current_; }
56873
56874 bool operator<(type const & rhs) const
56875 { return current_ < rhs.current_; }
56876
56877 bool operator<=(type const & rhs) const
56878 { return current_ <= rhs.current_; }
56879
56880 bool operator>(type const & rhs) const
56881 { return current_ > rhs.current_; }
56882
56883 bool operator>=(type const & rhs) const
56884 { return current_ >= rhs.current_; }
56885
56886 int operator-(type const & rhs) const
56887 { return current_ - rhs.current_; }
56888
56889 T operator()() const
56890 { return current_; }
56891
56892 T operator()(int d) const
56893 { return current_ + d; }
56894
56895 T current_;
56896 };
56897 };
56898
56899 template <>
56900 class DirectionSelector<StridedArrayTag>
56901 {
56902 public:
56903
56904 template <class T>
56905 class type
56906 {
56907 public:
56908 type(int stride, T base = 0)
56909 : stride_(stride),
56910 current_(base)
56911 {}
56912
56913 type(type const & rhs)
56914 : stride_(rhs.stride_),
56915 current_(rhs.current_)
56916 {}
56917
56918 type & operator=(type const & rhs)
56919 {
56920 stride_ = rhs.stride_;
56921 current_ = rhs.current_;
56922 return *this;
56923 }
56924
56925 void operator++() {current_ += stride_; }
56926 void operator++(int) {current_ += stride_; }
56927 void operator--() {current_ -= stride_; }
56928 void operator--(int) {current_ -= stride_; }
56929 void operator+=(int dy) {current_ += dy*stride_; }
56930 void operator-=(int dy) {current_ -= dy*stride_; }
56931
56932 bool operator==(type const & rhs) const
56933 { return (current_ == rhs.current_); }
56934
56935 bool operator!=(type const & rhs) const
56936 { return (current_ != rhs.current_); }
56937
56938 bool operator<(type const & rhs) const
56939 { return (current_ < rhs.current_); }
56940
56941 bool operator<=(type const & rhs) const
56942 { return (current_ <= rhs.current_); }
56943
56944 bool operator>(type const & rhs) const
56945 { return (current_ > rhs.current_); }
56946
56947 bool operator>=(type const & rhs) const
56948 { return (current_ >= rhs.current_); }
56949
56950 int operator-(type const & rhs) const
56951 { return (current_ - rhs.current_) / stride_; }
56952
56953 T operator()() const
56954 { return current_; }
56955
56956 T operator()(int d) const
56957 { return current_ + d*stride_; }
56958
56959 int stride_;
56960 T current_;
56961 };
56962 };
56963
56964 template <class StridedOrUnstrided>
56965 class LinearIteratorSelector;
56966
56967 template <>
56968 class LinearIteratorSelector<UnstridedArrayTag>
56969 {
56970 public:
56971 template <class IMAGEITERATOR>
56972 class type
56973 {
56974 public:
56975 typedef typename IMAGEITERATOR::pointer res;
56976
56977 template <class DirSelect>
56978 static res construct(typename IMAGEITERATOR::pointer data, DirSelect const &)
56979 {
56980 return data;
56981 }
56982 };
56983 };
56984
56985 template <>
56986 class LinearIteratorSelector<StridedArrayTag>
56987 {
56988 public:
56989 template <class IMAGEITERATOR>
56990 class type
56991 {
56992 public:
56993 typedef IteratorAdaptor<StridedIteratorPolicy<IMAGEITERATOR> > res;
56994
56995 template <class DirSelect>
56996 static res construct(typename IMAGEITERATOR::pointer data, DirSelect const & d)
56997 {
56998 typedef typename res::BaseType Base;
56999 return res(Base(data, d.stride_));
57000 }
57001 };
57002 };
57003
57004
57005 }
57006 # 648 "../include/vigra/imageiterator.hxx"
57007 template <class IMAGEITERATOR,
57008 class PIXELTYPE, class REFERENCE, class POINTER,
57009 class StridedOrUnstrided = UnstridedArrayTag>
57010 class ImageIteratorBase
57011 {
57012 typedef typename
57013 detail::LinearIteratorSelector<StridedOrUnstrided>::template type<ImageIteratorBase>
57014 RowIteratorSelector;
57015 typedef typename
57016 detail::LinearIteratorSelector<StridedArrayTag>::template type<ImageIteratorBase>
57017 ColumnIteratorSelector;
57018 public:
57019 typedef ImageIteratorBase<IMAGEITERATOR,
57020 PIXELTYPE, REFERENCE, POINTER, StridedOrUnstrided> self_type;
57021
57022
57023
57024 typedef PIXELTYPE value_type;
57025
57026
57027
57028 typedef PIXELTYPE PixelType;
57029
57030
57031
57032 typedef REFERENCE reference;
57033
57034
57035
57036 typedef REFERENCE index_reference;
57037
57038
57039
57040 typedef POINTER pointer;
57041
57042
57043
57044 typedef Diff2D difference_type;
57045
57046
57047
57048 typedef image_traverser_tag iterator_category;
57049
57050
57051
57052 typedef typename RowIteratorSelector::res row_iterator;
57053
57054
57055
57056 typedef typename ColumnIteratorSelector::res column_iterator;
57057
57058
57059
57060 typedef typename
57061 detail::DirectionSelector<StridedOrUnstrided>::template type<pointer> MoveX;
57062
57063
57064
57065 typedef typename
57066 detail::DirectionSelector<StridedArrayTag>::template type<int> MoveY;
57067
57068
57069
57070
57071
57072 bool operator==(ImageIteratorBase const & rhs) const
57073 {
57074 return (x == rhs.x) && (y == rhs.y);
57075 }
57076
57077
57078
57079 bool operator!=(ImageIteratorBase const & rhs) const
57080 {
57081 return (x != rhs.x) || (y != rhs.y);
57082 }
57083
57084
57085
57086 difference_type operator-(ImageIteratorBase const & rhs) const
57087 {
57088 return difference_type(x - rhs.x, y - rhs.y);
57089 }
57090 # 748 "../include/vigra/imageiterator.hxx"
57091 MoveX x;
57092 # 761 "../include/vigra/imageiterator.hxx"
57093 MoveY y;
57094
57095
57096 protected:
57097
57098
57099
57100
57101
57102
57103 ImageIteratorBase(pointer base, int ystride)
57104 : x(base),
57105 y(ystride)
57106 {}
57107
57108
57109
57110
57111
57112
57113
57114 ImageIteratorBase(pointer base, int xstride, int ystride)
57115 : x(xstride, base),
57116 y(ystride)
57117 {}
57118
57119
57120 ImageIteratorBase(ImageIteratorBase const & rhs)
57121 : x(rhs.x),
57122 y(rhs.y)
57123 {}
57124
57125
57126 ImageIteratorBase()
57127 : x(0),
57128 y(0)
57129 {}
57130
57131
57132 ImageIteratorBase & operator=(ImageIteratorBase const & rhs)
57133 {
57134 if(this != &rhs)
57135 {
57136 x = rhs.x;
57137 y = rhs.y;
57138 }
57139 return *this;
57140 }
57141
57142 public:
57143
57144
57145
57146
57147 IMAGEITERATOR & operator+=(difference_type const & s)
57148 {
57149 x += s.x;
57150 y += s.y;
57151 return static_cast<IMAGEITERATOR &>(*this);
57152 }
57153
57154
57155 IMAGEITERATOR & operator-=(difference_type const & s)
57156 {
57157 x -= s.x;
57158 y -= s.y;
57159 return static_cast<IMAGEITERATOR &>(*this);
57160 }
57161
57162
57163
57164 IMAGEITERATOR operator+(difference_type const & s) const
57165 {
57166 IMAGEITERATOR ret(static_cast<IMAGEITERATOR const &>(*this));
57167
57168 ret += s;
57169
57170 return ret;
57171 }
57172
57173
57174
57175 IMAGEITERATOR operator-(difference_type const & s) const
57176 {
57177 IMAGEITERATOR ret(static_cast<IMAGEITERATOR const &>(*this));
57178
57179 ret -= s;
57180
57181 return ret;
57182 }
57183
57184
57185
57186
57187
57188
57189
57190 reference operator*() const
57191 {
57192 return *current();
57193 }
57194
57195
57196
57197
57198 pointer operator->() const
57199 {
57200 return current();
57201 }
57202
57203
57204
57205
57206 index_reference operator[](Diff2D const & d) const
57207 {
57208 return *current(d.x, d.y);
57209 }
57210
57211
57212
57213
57214 index_reference operator()(int dx, int dy) const
57215 {
57216 return *current(dx, dy);
57217 }
57218
57219
57220
57221
57222
57223 pointer operator[](int dy) const
57224 {
57225 return x() + y(dy);
57226 }
57227
57228
57229 row_iterator rowIterator() const
57230 {
57231 return RowIteratorSelector::construct(current(), x);
57232 }
57233
57234 column_iterator columnIterator() const
57235 {
57236 return ColumnIteratorSelector::construct(current(), y);
57237 }
57238
57239 private:
57240
57241 pointer current() const
57242 { return x() + y(); }
57243
57244 pointer current(int dx, int dy) const
57245 { return x(dx) + y(dy); }
57246 };
57247 # 936 "../include/vigra/imageiterator.hxx"
57248 template <class PIXELTYPE>
57249 class ImageIterator
57250 : public ImageIteratorBase<ImageIterator<PIXELTYPE>,
57251 PIXELTYPE, PIXELTYPE &, PIXELTYPE *>
57252 {
57253 public:
57254 typedef ImageIteratorBase<ImageIterator<PIXELTYPE>,
57255 PIXELTYPE, PIXELTYPE &, PIXELTYPE *> Base;
57256
57257 typedef typename Base::pointer pointer;
57258 typedef typename Base::difference_type difference_type;
57259 # 955 "../include/vigra/imageiterator.hxx"
57260 ImageIterator(pointer base, int ystride)
57261 : Base(base, ystride)
57262 {}
57263
57264
57265 ImageIterator()
57266 : Base()
57267 {}
57268
57269 };
57270 # 982 "../include/vigra/imageiterator.hxx"
57271 template <class PIXELTYPE>
57272 class ConstImageIterator
57273 : public ImageIteratorBase<ConstImageIterator<PIXELTYPE>,
57274 PIXELTYPE, PIXELTYPE const &, PIXELTYPE const *>
57275 {
57276 public:
57277 typedef ImageIteratorBase<ConstImageIterator<PIXELTYPE>,
57278 PIXELTYPE, PIXELTYPE const &, PIXELTYPE const *> Base;
57279
57280 typedef typename Base::pointer pointer;
57281 typedef typename Base::difference_type difference_type;
57282 # 1001 "../include/vigra/imageiterator.hxx"
57283 ConstImageIterator(pointer base, int ystride)
57284 : Base(base, ystride)
57285 {}
57286
57287 ConstImageIterator(ImageIterator<PIXELTYPE> const & o)
57288 : Base(o.x, o.y)
57289 {}
57290
57291
57292 ConstImageIterator()
57293 : Base()
57294 {}
57295
57296 ConstImageIterator & operator=(ImageIterator<PIXELTYPE> const & o)
57297 {
57298 Base::x = o.x;
57299 Base::y = o.y;
57300 return *this;
57301 }
57302 };
57303 # 1056 "../include/vigra/imageiterator.hxx"
57304 template <class PIXELTYPE>
57305 class StridedImageIterator
57306 : public ImageIteratorBase<StridedImageIterator<PIXELTYPE>,
57307 PIXELTYPE, PIXELTYPE &, PIXELTYPE *, StridedArrayTag>
57308 {
57309 public:
57310 typedef ImageIteratorBase<StridedImageIterator<PIXELTYPE>,
57311 PIXELTYPE, PIXELTYPE &, PIXELTYPE *, StridedArrayTag> Base;
57312
57313 typedef typename Base::pointer pointer;
57314 typedef typename Base::difference_type difference_type;
57315
57316
57317
57318
57319
57320 StridedImageIterator(pointer base, int ystride, int xskip, int yskip)
57321 : Base(base, xskip, ystride*yskip)
57322 {}
57323
57324
57325 StridedImageIterator()
57326 : Base()
57327 {}
57328
57329 };
57330 # 1117 "../include/vigra/imageiterator.hxx"
57331 template <class PIXELTYPE>
57332 class ConstStridedImageIterator
57333 : public ImageIteratorBase<ConstStridedImageIterator<PIXELTYPE>,
57334 PIXELTYPE, PIXELTYPE const &, PIXELTYPE const *,
57335 StridedArrayTag>
57336 {
57337 public:
57338 typedef ImageIteratorBase<ConstStridedImageIterator<PIXELTYPE>,
57339 PIXELTYPE, PIXELTYPE const &, PIXELTYPE const *,
57340 StridedArrayTag> Base;
57341
57342 typedef typename Base::pointer pointer;
57343 typedef typename Base::difference_type difference_type;
57344
57345
57346
57347
57348
57349 ConstStridedImageIterator(pointer base, int ystride, int xskip, int yskip)
57350 : Base(base, xskip, ystride*yskip)
57351 {}
57352
57353
57354 ConstStridedImageIterator(StridedImageIterator<PIXELTYPE> const & o)
57355 : Base(o.x, o.y)
57356 {}
57357
57358
57359 ConstStridedImageIterator()
57360 : Base()
57361 {}
57362
57363
57364 ConstStridedImageIterator & operator=(StridedImageIterator<PIXELTYPE> const & o)
57365 {
57366 Base::x = o.x;
57367 Base::y = o.y;
57368 return *this;
57369 }
57370 };
57371 # 1167 "../include/vigra/imageiterator.hxx"
57372 template <class T>
57373 struct IteratorTraits<ImageIterator<T> >
57374 : public IteratorTraitsBase<ImageIterator<T> >
57375 {
57376 typedef ImageIterator<T> mutable_iterator;
57377 typedef ConstImageIterator<T> const_iterator;
57378 typedef typename AccessorTraits<T>::default_accessor DefaultAccessor;
57379 typedef DefaultAccessor default_accessor;
57380 typedef VigraTrueType hasConstantStrides;
57381 };
57382
57383 template <class T>
57384 struct IteratorTraits<ConstImageIterator<T> >
57385 : public IteratorTraitsBase<ConstImageIterator<T> >
57386 {
57387 typedef ImageIterator<T> mutable_iterator;
57388 typedef ConstImageIterator<T> const_iterator;
57389 typedef typename AccessorTraits<T>::default_const_accessor DefaultAccessor;
57390 typedef DefaultAccessor default_accessor;
57391 typedef VigraTrueType hasConstantStrides;
57392 };
57393
57394 template <class T>
57395 struct IteratorTraits<StridedImageIterator<T> >
57396 : public IteratorTraitsBase<StridedImageIterator<T> >
57397 {
57398 typedef StridedImageIterator<T> mutable_iterator;
57399 typedef ConstStridedImageIterator<T> const_iterator;
57400 typedef typename AccessorTraits<T>::default_accessor DefaultAccessor;
57401 typedef DefaultAccessor default_accessor;
57402 typedef VigraTrueType hasConstantStrides;
57403 };
57404
57405 template <class T>
57406 struct IteratorTraits<ConstStridedImageIterator<T> >
57407 : public IteratorTraitsBase<ConstStridedImageIterator<T> >
57408 {
57409 typedef StridedImageIterator<T> mutable_iterator;
57410 typedef ConstStridedImageIterator<T> const_iterator;
57411 typedef typename AccessorTraits<T>::default_const_accessor DefaultAccessor;
57412 typedef DefaultAccessor default_accessor;
57413 typedef VigraTrueType hasConstantStrides;
57414 };
57415 # 1313 "../include/vigra/imageiterator.hxx"
57416 template <class PIXELTYPE>
57417 class ConstValueIteratorPolicy
57418 {
57419 public:
57420
57421 typedef PIXELTYPE value_type;
57422 typedef int difference_type;
57423 typedef PIXELTYPE const & reference;
57424 typedef PIXELTYPE const & index_reference;
57425 typedef PIXELTYPE const * pointer;
57426 typedef std::random_access_iterator_tag iterator_category;
57427
57428 struct BaseType
57429 {
57430 BaseType(PIXELTYPE const & v = PIXELTYPE(), int p = 0)
57431 : value(v), pos(p)
57432 {}
57433
57434 PIXELTYPE value;
57435 int pos;
57436 };
57437
57438 static void initialize(BaseType & d) {}
57439
57440 static reference dereference(BaseType const & d)
57441 { return d.value; }
57442
57443 static index_reference dereference(BaseType d, difference_type)
57444 {
57445 return d.value;
57446 }
57447
57448 static bool equal(BaseType const & d1, BaseType const & d2)
57449 { return d1.pos == d2.pos; }
57450
57451 static bool less(BaseType const & d1, BaseType const & d2)
57452 { return d1.pos < d2.pos; }
57453
57454 static difference_type difference(BaseType const & d1, BaseType const & d2)
57455 { return d1.pos - d2.pos; }
57456
57457 static void increment(BaseType & d)
57458 { ++d.pos; }
57459
57460 static void decrement(BaseType & d)
57461 { --d.pos; }
57462
57463 static void advance(BaseType & d, difference_type n)
57464 { d.pos += n; }
57465 };
57466 # 1381 "../include/vigra/imageiterator.hxx"
57467 template <class PIXELTYPE>
57468 class ConstValueIterator
57469 {
57470 public:
57471
57472
57473 typedef PIXELTYPE value_type;
57474
57475
57476
57477 typedef PIXELTYPE PixelType;
57478
57479
57480
57481 typedef PIXELTYPE const & reference;
57482
57483
57484
57485 typedef PIXELTYPE const & index_reference;
57486
57487
57488
57489 typedef PIXELTYPE const * pointer;
57490
57491
57492
57493 typedef Diff2D difference_type;
57494
57495
57496
57497 typedef image_traverser_tag iterator_category;
57498
57499
57500
57501 typedef IteratorAdaptor<ConstValueIteratorPolicy<PIXELTYPE> > row_iterator;
57502
57503
57504
57505 typedef IteratorAdaptor<ConstValueIteratorPolicy<PIXELTYPE> > column_iterator;
57506
57507
57508
57509 typedef int MoveX;
57510
57511
57512
57513 typedef int MoveY;
57514
57515
57516
57517
57518 ConstValueIterator()
57519 : value_(NumericTraits<PIXELTYPE>::zero()), x(0), y(0)
57520 {}
57521
57522
57523
57524 ConstValueIterator(PixelType const & v)
57525 : value_(v), x(0), y(0)
57526 {}
57527
57528
57529
57530 ConstValueIterator(ConstValueIterator const & v)
57531 : value_(v.value_), x(v.x), y(v.y)
57532 {}
57533
57534
57535
57536 ConstValueIterator & operator=(ConstValueIterator const & v)
57537 {
57538 if(this != &v)
57539 {
57540 value_ = v.value_;
57541 x = v.x;
57542 y = v.y;
57543 }
57544 return *this;
57545 }
57546
57547
57548
57549 ConstValueIterator & operator+=(Diff2D const & d)
57550 {
57551 x += d.x;
57552 y += d.y;
57553 return *this;
57554 }
57555
57556
57557
57558 ConstValueIterator & operator-=(Diff2D const & d)
57559 {
57560 x -= d.x;
57561 y -= d.y;
57562 return *this;
57563 }
57564
57565
57566
57567 ConstValueIterator operator+(Diff2D const & d) const
57568 {
57569 ConstValueIterator ret(*this);
57570 ret += d;
57571 return ret;
57572 }
57573
57574
57575
57576 ConstValueIterator operator-(Diff2D const & d) const
57577 {
57578 ConstValueIterator ret(*this);
57579 ret -= d;
57580 return ret;
57581 }
57582
57583
57584
57585 Diff2D operator-(ConstValueIterator const & r) const
57586 {
57587 return Diff2D(x - r.x, y - r.y);
57588 }
57589
57590
57591
57592 bool operator==(ConstValueIterator const & r) const
57593 {
57594 return (x == r.x) && (y == r.y);
57595 }
57596
57597
57598
57599 bool operator!=(ConstValueIterator const & r) const
57600 {
57601 return (x != r.x) || (y != r.y);
57602 }
57603
57604
57605
57606 reference operator*() const
57607 {
57608 return value_;
57609 }
57610
57611
57612
57613 pointer operator->() const
57614 {
57615 return &value_;
57616 }
57617
57618
57619
57620 index_reference operator()(int const &, int const &) const
57621 {
57622 return value_;
57623 }
57624
57625
57626
57627 index_reference operator[](Diff2D const &) const
57628 {
57629 return value_;
57630 }
57631
57632
57633
57634 row_iterator rowIterator() const
57635 { return row_iterator(typename row_iterator::BaseType(value_, x)); }
57636
57637
57638
57639 column_iterator columnIterator() const
57640 { return column_iterator(typename column_iterator::BaseType(value_, y)); }
57641
57642
57643
57644
57645 int x;
57646
57647 int y;
57648
57649
57650 private:
57651
57652 PixelType value_;
57653 };
57654
57655
57656
57657 template <class T>
57658 struct IteratorTraits<ConstValueIterator<T> >
57659 {
57660 typedef ConstValueIterator<T> Iterator;
57661 typedef Iterator iterator;
57662 typedef typename iterator::iterator_category iterator_category;
57663 typedef typename iterator::value_type value_type;
57664 typedef typename iterator::reference reference;
57665 typedef typename iterator::index_reference index_reference;
57666 typedef typename iterator::pointer pointer;
57667 typedef typename iterator::difference_type difference_type;
57668 typedef typename iterator::row_iterator row_iterator;
57669 typedef typename iterator::column_iterator column_iterator;
57670 typedef StandardConstAccessor<T> DefaultAccessor;
57671 typedef StandardConstAccessor<T> default_accessor;
57672 typedef VigraTrueType hasConstantStrides;
57673 };
57674
57675
57676
57677 typedef Diff2D CoordinateIterator;
57678 # 1659 "../include/vigra/imageiterator.hxx"
57679 }
57680 # 41 "../include/vigra/basicimageview.hxx" 2
57681 # 1 "../include/vigra/initimage.hxx" 1
57682 # 45 "../include/vigra/initimage.hxx"
57683 namespace vigra {
57684 # 59 "../include/vigra/initimage.hxx"
57685 template <class DestIterator, class DestAccessor, class VALUETYPE>
57686 void
57687 initLineImpl(DestIterator d, DestIterator dend, DestAccessor dest,
57688 VALUETYPE v, VigraFalseType)
57689 {
57690 for(; d != dend; ++d)
57691 dest.set(v, d);
57692 }
57693
57694 template <class DestIterator, class DestAccessor, class FUNCTOR>
57695 void
57696 initLineImpl(DestIterator d, DestIterator dend, DestAccessor dest,
57697 FUNCTOR const & f, VigraTrueType)
57698 {
57699 for(; d != dend; ++d)
57700 dest.set(f(), d);
57701 }
57702
57703 template <class DestIterator, class DestAccessor, class VALUETYPE>
57704 inline void
57705 initLine(DestIterator d, DestIterator dend, DestAccessor dest,
57706 VALUETYPE v)
57707 {
57708 initLineImpl(d, dend, dest, v, typename FunctorTraits<VALUETYPE>::isInitializer());
57709 }
57710
57711 template <class DestIterator, class DestAccessor, class FUNCTOR>
57712 inline void
57713 initLineFunctor(DestIterator d, DestIterator dend, DestAccessor dest,
57714 FUNCTOR f)
57715 {
57716 initLineImpl(d, dend, dest, f, VigraTrueType());
57717 }
57718
57719 template <class DestIterator, class DestAccessor,
57720 class MaskIterator, class MaskAccessor,
57721 class VALUETYPE>
57722 void
57723 initLineIfImpl(DestIterator d, DestIterator dend, DestAccessor dest,
57724 MaskIterator m, MaskAccessor mask,
57725 VALUETYPE v, VigraFalseType)
57726 {
57727 for(; d != dend; ++d, ++m)
57728 if(mask(m))
57729 dest.set(v, d);
57730 }
57731
57732 template <class DestIterator, class DestAccessor,
57733 class MaskIterator, class MaskAccessor,
57734 class FUNCTOR>
57735 void
57736 initLineIfImpl(DestIterator d, DestIterator dend, DestAccessor dest,
57737 MaskIterator m, MaskAccessor mask,
57738 FUNCTOR const & f, VigraTrueType)
57739 {
57740 for(; d != dend; ++d, ++m)
57741 if(mask(m))
57742 dest.set(f(), d);
57743 }
57744
57745 template <class DestIterator, class DestAccessor,
57746 class MaskIterator, class MaskAccessor,
57747 class VALUETYPE>
57748 inline void
57749 initLineIf(DestIterator d, DestIterator dend, DestAccessor dest,
57750 MaskIterator m, MaskAccessor mask,
57751 VALUETYPE v)
57752 {
57753 initLineIfImpl(d, dend, dest, m, mask, v, typename FunctorTraits<VALUETYPE>::isInitializer());
57754 }
57755
57756 template <class DestIterator, class DestAccessor,
57757 class MaskIterator, class MaskAccessor,
57758 class FUNCTOR>
57759 void
57760 initLineFunctorIf(DestIterator d, DestIterator dend, DestAccessor dest,
57761 MaskIterator m, MaskAccessor mask,
57762 FUNCTOR f)
57763 {
57764 initLineIfImpl(d, dend, dest, m, mask, f, VigraTrueType());
57765 }
57766 # 199 "../include/vigra/initimage.hxx"
57767 template <class ImageIterator, class Accessor, class VALUETYPE>
57768 void
57769 initImage(ImageIterator upperleft, ImageIterator lowerright,
57770 Accessor a, VALUETYPE v)
57771 {
57772 int w = lowerright.x - upperleft.x;
57773
57774 for(; upperleft.y < lowerright.y; ++upperleft.y)
57775 {
57776 initLine(upperleft.rowIterator(),
57777 upperleft.rowIterator() + w, a, v);
57778 }
57779 }
57780
57781 template <class ImageIterator, class Accessor, class VALUETYPE>
57782 inline
57783 void
57784 initImage(triple<ImageIterator, ImageIterator, Accessor> img, VALUETYPE v)
57785 {
57786 initImage(img.first, img.second, img.third, v);
57787 }
57788 # 287 "../include/vigra/initimage.hxx"
57789 template <class ImageIterator, class Accessor, class FUNCTOR>
57790 void
57791 initImageWithFunctor(ImageIterator upperleft, ImageIterator lowerright,
57792 Accessor a, FUNCTOR f)
57793 {
57794 int w = lowerright.x - upperleft.x;
57795
57796 for(; upperleft.y < lowerright.y; ++upperleft.y)
57797 {
57798 initLineFunctor(upperleft.rowIterator(),
57799 upperleft.rowIterator() + w, a, f);
57800 }
57801 }
57802
57803 template <class ImageIterator, class Accessor, class FUNCTOR>
57804 inline
57805 void
57806 initImageWithFunctor(triple<ImageIterator, ImageIterator, Accessor> img, FUNCTOR f)
57807 {
57808 initImageWithFunctor(img.first, img.second, img.third, f);
57809 }
57810 # 379 "../include/vigra/initimage.hxx"
57811 template <class ImageIterator, class Accessor,
57812 class MaskImageIterator, class MaskAccessor,
57813 class VALUETYPE>
57814 void
57815 initImageIf(ImageIterator upperleft, ImageIterator lowerright, Accessor a,
57816 MaskImageIterator mask_upperleft, MaskAccessor ma,
57817 VALUETYPE v)
57818 {
57819 int w = lowerright.x - upperleft.x;
57820
57821 for(; upperleft.y < lowerright.y; ++upperleft.y, ++mask_upperleft.y)
57822 {
57823 initLineIf(upperleft.rowIterator(),
57824 upperleft.rowIterator() + w, a,
57825 mask_upperleft.rowIterator(), ma, v);
57826 }
57827 }
57828
57829 template <class ImageIterator, class Accessor,
57830 class MaskImageIterator, class MaskAccessor,
57831 class VALUETYPE>
57832 inline
57833 void
57834 initImageIf(triple<ImageIterator, ImageIterator, Accessor> img,
57835 pair<MaskImageIterator, MaskAccessor> mask,
57836 VALUETYPE v)
57837 {
57838 initImageIf(img.first, img.second, img.third, mask.first, mask.second, v);
57839 }
57840 # 461 "../include/vigra/initimage.hxx"
57841 template <class ImageIterator, class Accessor, class VALUETYPE>
57842 inline
57843 void
57844 initImageBorder(ImageIterator upperleft, ImageIterator lowerright,
57845 Accessor a, int border_width, VALUETYPE v)
57846 {
57847 int w = lowerright.x - upperleft.x;
57848 int h = lowerright.y - upperleft.y;
57849
57850 int hb = (border_width > h) ? h : border_width;
57851 int wb = (border_width > w) ? w : border_width;
57852
57853 initImage(upperleft, upperleft+Diff2D(w,hb), a, v);
57854 initImage(upperleft, upperleft+Diff2D(wb,h), a, v);
57855 initImage(upperleft+Diff2D(0,h-hb), lowerright, a, v);
57856 initImage(upperleft+Diff2D(w-wb,0), lowerright, a, v);
57857 }
57858
57859 template <class ImageIterator, class Accessor, class VALUETYPE>
57860 inline
57861 void
57862 initImageBorder(triple<ImageIterator, ImageIterator, Accessor> img,
57863 int border_width, VALUETYPE v)
57864 {
57865 initImageBorder(img.first, img.second, img.third, border_width, v);
57866 }
57867
57868
57869
57870
57871 }
57872 # 42 "../include/vigra/basicimageview.hxx" 2
57873
57874 namespace vigra {
57875 # 66 "../include/vigra/basicimageview.hxx"
57876 template <class PIXELTYPE>
57877 class BasicImageView
57878 {
57879 public:
57880
57881
57882
57883 typedef PIXELTYPE value_type;
57884
57885
57886
57887 typedef PIXELTYPE PixelType;
57888
57889
57890
57891
57892 typedef PIXELTYPE & reference;
57893
57894
57895
57896
57897 typedef PIXELTYPE const & const_reference;
57898
57899
57900
57901 typedef PIXELTYPE * pointer;
57902
57903
57904
57905 typedef PIXELTYPE const * const_pointer;
57906
57907
57908
57909
57910
57911 typedef PIXELTYPE * iterator;
57912
57913
57914
57915 typedef PIXELTYPE * ScanOrderIterator;
57916
57917
57918
57919
57920
57921 typedef PIXELTYPE const * const_iterator;
57922
57923
57924
57925 typedef PIXELTYPE const * ConstScanOrderIterator;
57926
57927
57928
57929 typedef ImageIterator<value_type> traverser;
57930
57931
57932
57933 typedef ImageIterator<value_type> Iterator;
57934
57935
57936
57937 typedef ConstImageIterator<value_type> const_traverser;
57938
57939
57940
57941 typedef ConstImageIterator<value_type> ConstIterator;
57942
57943
57944
57945 typedef typename traverser::row_iterator row_iterator;
57946
57947
57948
57949 typedef typename const_traverser::row_iterator const_row_iterator;
57950
57951
57952
57953 typedef typename traverser::column_iterator column_iterator;
57954
57955
57956
57957 typedef typename const_traverser::column_iterator const_column_iterator;
57958
57959
57960
57961 typedef Diff2D difference_type;
57962
57963
57964
57965 typedef Size2D size_type;
57966
57967
57968
57969 typedef typename
57970 IteratorTraits<traverser>::DefaultAccessor Accessor;
57971
57972
57973
57974 typedef typename
57975 IteratorTraits<const_traverser>::DefaultAccessor ConstAccessor;
57976
57977
57978
57979 BasicImageView()
57980 : data_(0),
57981 width_(0),
57982 height_(0),
57983 stride_(0)
57984 {}
57985
57986
57987
57988 BasicImageView(const_pointer data, int w, int h, int stride = 0)
57989 : data_(const_cast<pointer>(data)),
57990 width_(w),
57991 height_(h),
57992 stride_(stride == 0 ? w : stride)
57993 {}
57994
57995
57996
57997 BasicImageView(const_pointer data, difference_type const & size, int stride = 0)
57998 : data_(const_cast<pointer>(data)),
57999 width_(size.x),
58000 height_(size.y),
58001 stride_(stride == 0 ? size.x : stride)
58002 {}
58003
58004
58005
58006 BasicImageView & init(value_type const & pixel)
58007 {
58008 initImage(upperLeft(), lowerRight(), accessor(), pixel);
58009
58010 return *this;
58011 }
58012
58013
58014
58015 int width() const
58016 {
58017 return width_;
58018 }
58019
58020
58021
58022 int height() const
58023 {
58024 return height_;
58025 }
58026
58027
58028
58029
58030 int stride() const
58031 {
58032 return stride_;
58033 }
58034
58035
58036
58037 size_type size() const
58038 {
58039 return size_type(width(), height());
58040 }
58041
58042
58043
58044 bool isInside(difference_type const & d) const
58045 {
58046 return d.x >= 0 && d.y >= 0 &&
58047 d.x < width() && d.y < height();
58048 }
58049
58050
58051
58052
58053 reference operator[](difference_type const & d)
58054 {
58055 return data_[d.y*stride_ + d.x];
58056 }
58057
58058
58059
58060
58061 const_reference operator[](difference_type const & d) const
58062 {
58063 return data_[d.y*stride_ + d.x];
58064 }
58065
58066
58067
58068
58069 reference operator()(int dx, int dy)
58070 {
58071 return data_[dy*stride_ + dx];
58072 }
58073
58074
58075
58076
58077 const_reference operator()(int dx, int dy) const
58078 {
58079 return data_[dy*stride_ + dx];
58080 }
58081
58082
58083
58084
58085
58086 pointer operator[](int dy)
58087 {
58088 return data_ + dy*stride_;
58089 }
58090
58091
58092
58093
58094
58095 const_pointer operator[](int dy) const
58096 {
58097 return data_ + dy*stride_;
58098 }
58099
58100
58101
58102 traverser upperLeft()
58103 {
58104 return traverser(data_, stride_);
58105 }
58106
58107
58108
58109
58110
58111 traverser lowerRight()
58112 {
58113 return upperLeft() + size();
58114 }
58115
58116
58117
58118 const_traverser upperLeft() const
58119 {
58120 return const_traverser(data_, stride_);
58121 }
58122
58123
58124
58125
58126
58127 const_traverser lowerRight() const
58128 {
58129 return upperLeft() + size();
58130 }
58131
58132
58133
58134
58135 iterator begin()
58136 {
58137 vigra::throw_precondition_error((stride_ == width_), "BasicImageView::begin(): " "can only create scan order iterator if width() == stride().");
58138
58139
58140 return data_;
58141 }
58142
58143
58144
58145
58146 iterator end()
58147 {
58148 vigra::throw_precondition_error((stride_ == width_), "BasicImageView::end(): " "can only create scan order iterator if width() == stride().");
58149
58150
58151 return data_ + width() * height();
58152 }
58153
58154
58155
58156
58157 const_iterator begin() const
58158 {
58159 vigra::throw_precondition_error((stride_ == width_), "BasicImageView::begin(): " "can only create scan order iterator if width() == stride().");
58160
58161
58162 return data_;
58163 }
58164
58165
58166
58167
58168 const_iterator end() const
58169 {
58170 vigra::throw_precondition_error((stride_ == width_), "BasicImageView::end(): " "can only create scan order iterator if width() == stride().");
58171
58172
58173 return data_ + width() * height();
58174 }
58175
58176
58177
58178 row_iterator rowBegin(int y)
58179 {
58180 return data_ + stride_ * y;
58181 }
58182
58183
58184
58185 row_iterator rowEnd(int y)
58186 {
58187 return rowBegin(y) + width();
58188 }
58189
58190
58191
58192 const_row_iterator rowBegin(int y) const
58193 {
58194 return data_ + stride_ * y;
58195 }
58196
58197
58198
58199 const_row_iterator rowEnd(int y) const
58200 {
58201 return rowBegin(y) + width();
58202 }
58203
58204
58205
58206 column_iterator columnBegin(int x)
58207 {
58208 typedef typename column_iterator::BaseType Iter;
58209 return column_iterator(Iter(data_ + x, stride_));
58210 }
58211
58212
58213
58214 column_iterator columnEnd(int x)
58215 {
58216 return columnBegin(x) + height();
58217 }
58218
58219
58220
58221 const_column_iterator columnBegin(int x) const
58222 {
58223 typedef typename const_column_iterator::BaseType Iter;
58224 return const_column_iterator(Iter(data_ + x, stride_));
58225 }
58226
58227
58228
58229 const_column_iterator columnEnd(int x) const
58230 {
58231 return columnBegin(x) + height();
58232 }
58233
58234
58235
58236 const_pointer data() const
58237 {
58238 return data_;
58239 }
58240
58241
58242
58243 Accessor accessor()
58244 {
58245 return Accessor();
58246 }
58247
58248
58249
58250 ConstAccessor accessor() const
58251 {
58252 return ConstAccessor();
58253 }
58254
58255 private:
58256
58257 pointer data_;
58258 int width_, height_, stride_;
58259 };
58260 # 458 "../include/vigra/basicimageview.hxx"
58261 template <class PixelType, class Accessor>
58262 inline triple<typename BasicImageView<PixelType>::const_traverser,
58263 typename BasicImageView<PixelType>::const_traverser, Accessor>
58264 srcImageRange(BasicImageView<PixelType> const & img, Accessor a)
58265 {
58266 return triple<typename BasicImageView<PixelType>::const_traverser,
58267 typename BasicImageView<PixelType>::const_traverser,
58268 Accessor>(img.upperLeft(),
58269 img.lowerRight(),
58270 a);
58271 }
58272
58273 template <class PixelType, class Accessor>
58274 inline pair<typename BasicImageView<PixelType>::const_traverser, Accessor>
58275 srcImage(BasicImageView<PixelType> const & img, Accessor a)
58276 {
58277 return pair<typename BasicImageView<PixelType>::const_traverser,
58278 Accessor>(img.upperLeft(), a);
58279 }
58280
58281 template <class PixelType, class Accessor>
58282 inline triple<typename BasicImageView<PixelType>::traverser,
58283 typename BasicImageView<PixelType>::traverser, Accessor>
58284 destImageRange(BasicImageView<PixelType> & img, Accessor a)
58285 {
58286 return triple<typename BasicImageView<PixelType>::traverser,
58287 typename BasicImageView<PixelType>::traverser,
58288 Accessor>(img.upperLeft(),
58289 img.lowerRight(),
58290 a);
58291 }
58292
58293 template <class PixelType, class Accessor>
58294 inline pair<typename BasicImageView<PixelType>::traverser, Accessor>
58295 destImage(BasicImageView<PixelType> & img, Accessor a)
58296 {
58297 return pair<typename BasicImageView<PixelType>::traverser,
58298 Accessor>(img.upperLeft(), a);
58299 }
58300
58301 template <class PixelType, class Accessor>
58302 inline pair<typename BasicImageView<PixelType>::const_traverser, Accessor>
58303 maskImage(BasicImageView<PixelType> const & img, Accessor a)
58304 {
58305 return pair<typename BasicImageView<PixelType>::const_traverser,
58306 Accessor>(img.upperLeft(), a);
58307 }
58308
58309
58310
58311 template <class PixelType>
58312 inline triple<typename BasicImageView<PixelType>::const_traverser,
58313 typename BasicImageView<PixelType>::const_traverser,
58314 typename BasicImageView<PixelType>::ConstAccessor>
58315 srcImageRange(BasicImageView<PixelType> const & img)
58316 {
58317 return triple<typename BasicImageView<PixelType>::const_traverser,
58318 typename BasicImageView<PixelType>::const_traverser,
58319 typename BasicImageView<PixelType>::ConstAccessor>(img.upperLeft(),
58320 img.lowerRight(),
58321 img.accessor());
58322 }
58323
58324 template <class PixelType>
58325 inline pair< typename BasicImageView<PixelType>::const_traverser,
58326 typename BasicImageView<PixelType>::ConstAccessor>
58327 srcImage(BasicImageView<PixelType> const & img)
58328 {
58329 return pair<typename BasicImageView<PixelType>::const_traverser,
58330 typename BasicImageView<PixelType>::ConstAccessor>(img.upperLeft(),
58331 img.accessor());
58332 }
58333
58334 template <class PixelType>
58335 inline triple< typename BasicImageView<PixelType>::traverser,
58336 typename BasicImageView<PixelType>::traverser,
58337 typename BasicImageView<PixelType>::Accessor>
58338 destImageRange(BasicImageView<PixelType> & img)
58339 {
58340 return triple<typename BasicImageView<PixelType>::traverser,
58341 typename BasicImageView<PixelType>::traverser,
58342 typename BasicImageView<PixelType>::Accessor>(img.upperLeft(),
58343 img.lowerRight(),
58344 img.accessor());
58345 }
58346
58347 template <class PixelType>
58348 inline pair< typename BasicImageView<PixelType>::traverser,
58349 typename BasicImageView<PixelType>::Accessor>
58350 destImage(BasicImageView<PixelType> & img)
58351 {
58352 return pair<typename BasicImageView<PixelType>::traverser,
58353 typename BasicImageView<PixelType>::Accessor>(img.upperLeft(),
58354 img.accessor());
58355 }
58356
58357 template <class PixelType>
58358 inline pair< typename BasicImageView<PixelType>::const_traverser,
58359 typename BasicImageView<PixelType>::ConstAccessor>
58360 maskImage(BasicImageView<PixelType> const & img)
58361 {
58362 return pair<typename BasicImageView<PixelType>::const_traverser,
58363 typename BasicImageView<PixelType>::ConstAccessor>(img.upperLeft(),
58364 img.accessor());
58365 }
58366
58367 }
58368 # 47 "../include/vigra/multi_array.hxx" 2
58369
58370
58371 # 1 "../include/vigra/multi_iterator.hxx" 1
58372 # 46 "../include/vigra/multi_iterator.hxx"
58373 namespace vigra {
58374
58375
58376 template <unsigned int N, class T,
58377 class REFERENCE = T &, class POINTER = T *> class MultiIterator;
58378 template <unsigned int N, class T,
58379 class REFERENCE = T &, class POINTER = T *> class StridedMultiIterator;
58380 # 455 "../include/vigra/multi_iterator.hxx"
58381 template <unsigned int N>
58382 class MultiIteratorBase
58383 {
58384 public:
58385 # 469 "../include/vigra/multi_iterator.hxx"
58386 template <class T, class REFERENCE, class POINTER>
58387 class type : public MultiIterator <N-1, T, REFERENCE, POINTER>
58388 {
58389 public:
58390
58391
58392 typedef MultiIterator <N-1, T, REFERENCE, POINTER> base_type;
58393
58394 public:
58395
58396
58397
58398 enum { level = N-1 };
58399
58400
58401
58402 typedef T value_type;
58403
58404
58405
58406 typedef REFERENCE reference;
58407
58408
58409
58410 typedef POINTER pointer;
58411
58412
58413
58414 typedef ptrdiff_t difference_type;
58415
58416
58417
58418
58419 typedef TinyVector<difference_type, N> multi_difference_type;
58420
58421
58422
58423
58424 typedef MultiIterator <level, T, REFERENCE, POINTER> next_type;
58425
58426
58427
58428
58429 typedef StridedMultiIterator <1, T, REFERENCE, POINTER> iterator;
58430
58431
58432
58433 typedef multi_dimensional_traverser_tag iterator_category;
58434
58435
58436
58437
58438
58439
58440 type ()
58441 {}
58442
58443
58444
58445
58446 type (pointer ptr,
58447 const difference_type *stride,
58448 const difference_type *shape)
58449 : base_type (ptr, stride, shape)
58450 {}
58451
58452
58453
58454 void operator++ ()
58455 {
58456 type::m_ptr += type::m_stride [level];
58457 }
58458
58459
58460
58461 void operator-- ()
58462 {
58463 type::m_ptr -= type::m_stride [level];
58464 }
58465
58466
58467
58468 type operator++ (int)
58469 {
58470 type ret = *this;
58471 ++(*this);
58472 return ret;
58473 }
58474
58475
58476
58477 type operator-- (int)
58478 {
58479 type ret = *this;
58480 --(*this);
58481 return ret;
58482 }
58483
58484
58485
58486
58487 type & operator+= (difference_type n)
58488 {
58489 type::m_ptr += n * type::m_stride [level];
58490 return *this;
58491 }
58492
58493
58494
58495
58496 type & operator+= (multi_difference_type const & d)
58497 {
58498 type::m_ptr += total_stride(d.begin());
58499 return *this;
58500 }
58501
58502
58503
58504
58505 type & operator-= (difference_type n)
58506 {
58507 type::m_ptr -= n * type::m_stride [level];
58508 return *this;
58509 }
58510
58511
58512
58513
58514 type & operator-= (multi_difference_type const & d)
58515 {
58516 type::m_ptr -= total_stride(d.begin());
58517 return *this;
58518 }
58519
58520
58521
58522
58523
58524 difference_type operator- (type const & d) const
58525 {
58526 return (type::m_ptr - d.m_ptr) / type::m_stride[level];
58527 }
58528
58529
58530
58531
58532
58533
58534 reference operator[] (difference_type n) const
58535 {
58536 return type::m_ptr [n* type::m_stride [level]];
58537 }
58538
58539
58540
58541 reference operator[] (multi_difference_type const & d) const
58542 {
58543 return type::m_ptr [total_stride(d.begin())];
58544 }
58545 # 647 "../include/vigra/multi_iterator.hxx"
58546 next_type begin () const
58547 {
58548 return *this;
58549 }
58550 # 659 "../include/vigra/multi_iterator.hxx"
58551 next_type end () const
58552 {
58553 next_type ret = *this;
58554 ret += type::m_shape [level-1];
58555 return ret;
58556 }
58557 # 682 "../include/vigra/multi_iterator.hxx"
58558 iterator iteratorForDimension(unsigned int d) const
58559 {
58560 vigra::throw_precondition_error((d <= level), "MultiIterator<N>::iteratorForDimension(d): d < N required");
58561
58562 return iterator(type::m_ptr, &type::m_stride [d], 0);
58563 }
58564
58565 protected:
58566
58567 difference_type
58568 total_stride(typename multi_difference_type::const_iterator d) const
58569 {
58570 return d[level]*type::m_stride[level] + base_type::total_stride(d);
58571 }
58572 };
58573 };
58574 # 706 "../include/vigra/multi_iterator.hxx"
58575 template <>
58576 class MultiIteratorBase <2>
58577 {
58578 public:
58579 template <class T, class REFERENCE, class POINTER>
58580 class type : public MultiIterator <1, T, REFERENCE, POINTER>
58581 {
58582
58583 public:
58584
58585 enum { level = 1 };
58586 typedef MultiIterator <1, T, REFERENCE, POINTER> base_type;
58587 typedef T value_type;
58588 typedef REFERENCE reference;
58589 typedef const value_type &const_reference;
58590 typedef POINTER pointer;
58591 typedef const value_type *const_pointer;
58592 typedef ptrdiff_t difference_type;
58593 typedef MultiIterator <1, T, REFERENCE, POINTER> next_type;
58594 typedef StridedMultiIterator <1, T, REFERENCE, POINTER> iterator;
58595 typedef TinyVector<difference_type, 2> multi_difference_type;
58596 typedef std::random_access_iterator_tag iterator_category;
58597
58598 const difference_type *m_stride;
58599 const difference_type *m_shape;
58600
58601
58602
58603 type ()
58604 : base_type (),
58605 m_stride (0), m_shape (0)
58606 {}
58607
58608 type (pointer ptr,
58609 const difference_type *stride,
58610 const difference_type *shape)
58611 : base_type (ptr, stride, shape),
58612 m_stride (stride), m_shape (shape)
58613 {}
58614
58615 void operator++ ()
58616 {
58617 type::m_ptr += m_stride [level];
58618 }
58619
58620 void operator-- ()
58621 {
58622 type::m_ptr -= m_stride [level];
58623 }
58624
58625 type operator++ (int)
58626 {
58627 type ret = *this;
58628 ++(*this);
58629 return ret;
58630 }
58631
58632 type operator-- (int)
58633 {
58634 type ret = *this;
58635 --(*this);
58636 return ret;
58637 }
58638
58639 type & operator+= (difference_type n)
58640 {
58641 type::m_ptr += n * m_stride [level];
58642 return *this;
58643 }
58644
58645 type & operator+= (multi_difference_type const & d)
58646 {
58647 type::m_ptr += total_stride(d.begin());
58648 return *this;
58649 }
58650
58651 type &operator-= (difference_type n)
58652 {
58653 type::m_ptr -= n * m_stride [level];
58654 return *this;
58655 }
58656
58657 type & operator-= (multi_difference_type const & d)
58658 {
58659 type::m_ptr -= total_stride(d.begin());
58660 return *this;
58661 }
58662
58663 difference_type operator- (type const & d) const
58664 {
58665 return (type::m_ptr - d.m_ptr) / m_stride[level];
58666 }
58667
58668 reference operator[] (difference_type n) const
58669 {
58670 return type::m_ptr [n*m_stride [level]];
58671 }
58672
58673 reference operator[] (multi_difference_type const & d) const
58674 {
58675 return type::m_ptr [total_stride(d.begin())];
58676 }
58677
58678 next_type begin () const
58679 {
58680 return *this;
58681 }
58682
58683 next_type end () const
58684 {
58685 next_type ret = *this;
58686 ret += m_shape [level-1];
58687 return ret;
58688 }
58689
58690 iterator iteratorForDimension(unsigned int d) const
58691 {
58692 vigra::throw_precondition_error((d <= level), "MultiIterator<N>::iteratorForDimension(d): d < N required");
58693
58694 return iterator(type::m_ptr, &m_stride [d], 0);
58695 }
58696
58697 protected:
58698
58699 difference_type
58700 total_stride(typename multi_difference_type::const_iterator d) const
58701 {
58702 return d[level]*m_stride[level] + base_type::total_stride(d);
58703 }
58704 };
58705 };
58706 # 845 "../include/vigra/multi_iterator.hxx"
58707 template <>
58708 class MultiIteratorBase <1>
58709 {
58710 public:
58711 template <class T, class REFERENCE, class POINTER>
58712 class type
58713 {
58714 public:
58715 enum { level = 0 };
58716 typedef T value_type;
58717 typedef REFERENCE reference;
58718 typedef const value_type &const_reference;
58719 typedef POINTER pointer;
58720 typedef const value_type *const_pointer;
58721 typedef ptrdiff_t difference_type;
58722 typedef void next_type;
58723 typedef StridedMultiIterator <1, T, REFERENCE, POINTER> iterator;
58724 typedef TinyVector<difference_type, 1> multi_difference_type;
58725 typedef multi_dimensional_traverser_tag iterator_category;
58726
58727 pointer m_ptr;
58728
58729
58730
58731
58732 type ()
58733 : m_ptr (0)
58734 {}
58735
58736 type (pointer ptr,
58737 const difference_type *,
58738 const difference_type *)
58739 : m_ptr (ptr)
58740 {}
58741
58742 void operator++ ()
58743 {
58744 ++m_ptr;
58745 }
58746
58747 void operator-- ()
58748 {
58749 --m_ptr;
58750 }
58751
58752 type operator++ (int)
58753 {
58754 type ret = *this;
58755 ++(*this);
58756 return ret;
58757 }
58758
58759 type operator-- (int)
58760 {
58761 type ret = *this;
58762 --(*this);
58763 return ret;
58764 }
58765
58766 type &operator+= (difference_type n)
58767 {
58768 m_ptr += n;
58769 return *this;
58770 }
58771
58772 type & operator+= (multi_difference_type const & d)
58773 {
58774 m_ptr += d[level];
58775 return *this;
58776 }
58777
58778 type &operator-= (difference_type n)
58779 {
58780 m_ptr -= n;
58781 return *this;
58782 }
58783
58784 type & operator-= (multi_difference_type const & d)
58785 {
58786 m_ptr -= d[level];
58787 return *this;
58788 }
58789
58790 reference operator* () const
58791 {
58792 return *m_ptr;
58793 }
58794
58795 pointer get () const
58796 {
58797 return m_ptr;
58798 }
58799
58800 pointer operator->() const
58801 {
58802 return &(operator*());
58803 }
58804
58805 reference operator[] (difference_type n) const
58806 {
58807 return m_ptr [n];
58808 }
58809
58810 reference operator[] (multi_difference_type const & d) const
58811 {
58812 return m_ptr [d[level]];
58813 }
58814
58815 difference_type operator- (type const & d) const
58816 {
58817 return (m_ptr - d.m_ptr);
58818 }
58819
58820 bool operator!= (const type &rhs) const
58821 {
58822 return m_ptr != rhs.m_ptr;
58823 }
58824
58825 bool operator== (const type &rhs) const
58826 {
58827 return m_ptr == rhs.m_ptr;
58828 }
58829
58830 bool operator< (const type &rhs) const
58831 {
58832 return m_ptr < rhs.m_ptr;
58833 }
58834
58835 bool operator<= (const type &rhs) const
58836 {
58837 return m_ptr <= rhs.m_ptr;
58838 }
58839
58840 iterator iteratorForDimension(unsigned int d) const
58841 {
58842 vigra::throw_precondition_error((d == 0), "MultiIterator<1>::iteratorForDimension(d): d == 0 required");
58843
58844 const difference_type stride = 1;
58845 return iterator(m_ptr, &stride, 0);
58846 }
58847
58848 protected:
58849
58850 difference_type
58851 total_stride(typename multi_difference_type::const_iterator d) const
58852 {
58853 return d[level];
58854 }
58855 };
58856 };
58857 # 1012 "../include/vigra/multi_iterator.hxx"
58858 template <unsigned int N, class T, class REFERENCE, class POINTER>
58859 class MultiIterator
58860 : public MultiIteratorBase <N>::template type <T, REFERENCE, POINTER>
58861 {
58862 public:
58863
58864
58865
58866 typedef typename MultiIteratorBase <N>::template type <T, REFERENCE, POINTER> base_type;
58867
58868
58869
58870 typedef T value_type;
58871
58872
58873
58874 typedef REFERENCE reference;
58875
58876
58877
58878 typedef const value_type &const_reference;
58879
58880
58881
58882 typedef POINTER pointer;
58883
58884
58885
58886 typedef const value_type *const_pointer;
58887
58888
58889
58890 typedef ptrdiff_t difference_type;
58891
58892
58893
58894
58895 typedef TinyVector<difference_type, N> multi_difference_type;
58896
58897
58898
58899 typedef typename base_type::next_type next_type;
58900
58901
58902
58903
58904 typedef StridedMultiIterator <1, T, REFERENCE, POINTER> iterator;
58905
58906
58907
58908 typedef typename base_type::iterator_category iterator_category;
58909
58910
58911
58912
58913
58914 MultiIterator ()
58915 {}
58916
58917
58918
58919
58920 MultiIterator (pointer ptr,
58921 const difference_type *stride,
58922 const difference_type *shape)
58923 : base_type (ptr, stride, shape)
58924 {}
58925
58926
58927
58928 MultiIterator operator+ (difference_type n) const
58929 {
58930 MultiIterator ret = *this;
58931 ret += n;
58932 return ret;
58933 }
58934
58935
58936
58937 MultiIterator operator+ (multi_difference_type const & d) const
58938 {
58939 MultiIterator ret = *this;
58940 ret += d;
58941 return ret;
58942 }
58943
58944
58945
58946
58947
58948 difference_type operator- (MultiIterator const & d) const
58949 {
58950 return base_type::operator-(d);
58951 }
58952
58953
58954
58955 MultiIterator operator- (difference_type n) const
58956 {
58957 MultiIterator ret = *this;
58958 ret -= n;
58959 return ret;
58960 }
58961
58962
58963
58964 MultiIterator operator- (multi_difference_type const & d) const
58965 {
58966 MultiIterator ret = *this;
58967 ret -= d;
58968 return ret;
58969 }
58970 # 1147 "../include/vigra/multi_iterator.hxx"
58971 template <unsigned int K>
58972 MultiIterator<K+1, T, REFERENCE, POINTER> &
58973 dim()
58974 {
58975 return *this;
58976 }
58977
58978 MultiIterator<1, T, REFERENCE, POINTER> &
58979 dim0() { return *this; }
58980 MultiIterator<2, T, REFERENCE, POINTER> &
58981 dim1() { return *this; }
58982 MultiIterator<3, T, REFERENCE, POINTER> &
58983 dim2() { return *this; }
58984 MultiIterator<4, T, REFERENCE, POINTER> &
58985 dim3() { return *this; }
58986 MultiIterator<5, T, REFERENCE, POINTER> &
58987 dim4() { return *this; }
58988 };
58989 # 1181 "../include/vigra/multi_iterator.hxx"
58990 template <unsigned int N>
58991 class StridedMultiIteratorBase
58992 {
58993 public:
58994 # 1196 "../include/vigra/multi_iterator.hxx"
58995 template <class T, class REFERENCE, class POINTER>
58996 class type : public StridedMultiIterator <N-1, T, REFERENCE, POINTER>
58997 {
58998 public:
58999
59000
59001
59002 typedef StridedMultiIterator <N-1, T, REFERENCE, POINTER> base_type;
59003
59004 public:
59005
59006
59007
59008 enum { level = N-1 };
59009
59010
59011
59012 typedef T value_type;
59013
59014
59015
59016 typedef REFERENCE reference;
59017
59018
59019
59020 typedef const value_type &const_reference;
59021
59022
59023
59024 typedef POINTER pointer;
59025
59026
59027
59028 typedef const value_type *const_pointer;
59029
59030
59031
59032 typedef ptrdiff_t difference_type;
59033
59034
59035
59036
59037 typedef TinyVector<difference_type, N> multi_difference_type;
59038
59039
59040
59041
59042 typedef StridedMultiIterator <level, T, REFERENCE, POINTER> next_type;
59043
59044
59045
59046
59047 typedef StridedMultiIterator <1, T, REFERENCE, POINTER> iterator;
59048
59049
59050
59051 typedef multi_dimensional_traverser_tag iterator_category;
59052
59053
59054
59055
59056
59057 type ()
59058 {}
59059
59060
59061
59062
59063 type (pointer ptr,
59064 const difference_type *stride,
59065 const difference_type *shape)
59066 : base_type (ptr, stride, shape)
59067 {}
59068
59069
59070
59071 void operator++ ()
59072 {
59073 type::m_ptr += type::m_stride [level];
59074 }
59075
59076
59077
59078 void operator-- ()
59079 {
59080 type::m_ptr -= type::m_stride [level];
59081 }
59082
59083
59084
59085 type operator++ (int)
59086 {
59087 type ret = *this;
59088 ++(*this);
59089 return ret;
59090 }
59091
59092
59093
59094 type operator-- (int)
59095 {
59096 type ret = *this;
59097 --(*this);
59098 return ret;
59099 }
59100
59101
59102
59103
59104 type &operator+= (difference_type n)
59105 {
59106 type::m_ptr += n * type::m_stride [level];
59107 return *this;
59108 }
59109
59110
59111
59112
59113 type & operator+= (multi_difference_type const & d)
59114 {
59115 type::m_ptr += total_stride(d.begin());
59116 return *this;
59117 }
59118
59119
59120
59121
59122 type &operator-= (difference_type n)
59123 {
59124 type::m_ptr -= n * type::m_stride [level];
59125 return *this;
59126 }
59127
59128
59129
59130
59131 type & operator-= (multi_difference_type const & d)
59132 {
59133 type::m_ptr -= total_stride(d.begin());
59134 return *this;
59135 }
59136
59137
59138
59139
59140
59141 difference_type operator- (type const & d) const
59142 {
59143 return (type::m_ptr - d.m_ptr) / type::m_stride[level];
59144 }
59145
59146
59147
59148
59149
59150
59151 reference operator[] (difference_type n) const
59152 {
59153 return type::m_ptr [n* type::m_stride [level]];
59154 }
59155
59156
59157
59158 reference operator[] (multi_difference_type const & d) const
59159 {
59160 return type::m_ptr [total_stride(d.begin())];
59161 }
59162 # 1382 "../include/vigra/multi_iterator.hxx"
59163 next_type begin () const
59164 {
59165 return *this;
59166 }
59167 # 1394 "../include/vigra/multi_iterator.hxx"
59168 next_type end () const
59169 {
59170 next_type ret = *this;
59171 ret += type::m_shape [level-1];
59172 return ret;
59173 }
59174 # 1417 "../include/vigra/multi_iterator.hxx"
59175 iterator iteratorForDimension(unsigned int d) const
59176 {
59177 vigra::throw_precondition_error((d <= N), "StridedMultiIterator<N>::iteratorForDimension(d): d <= N required");
59178
59179 return iterator(type::m_ptr, &type::m_stride [d], 0);
59180 }
59181
59182 protected:
59183
59184 difference_type
59185 total_stride(typename multi_difference_type::const_iterator d) const
59186 {
59187 return d[level]*type::m_stride[level] + base_type::total_stride(d);
59188 }
59189 };
59190 };
59191 # 1441 "../include/vigra/multi_iterator.hxx"
59192 template <>
59193 class StridedMultiIteratorBase <2>
59194 {
59195 public:
59196 template <class T, class REFERENCE, class POINTER>
59197 class type : public StridedMultiIterator <1, T, REFERENCE, POINTER>
59198 {
59199 public:
59200 enum { level = 1 };
59201 typedef StridedMultiIterator <1, T, REFERENCE, POINTER> base_type;
59202 typedef T value_type;
59203 typedef REFERENCE reference;
59204 typedef const value_type &const_reference;
59205 typedef POINTER pointer;
59206 typedef const value_type *const_pointer;
59207 typedef ptrdiff_t difference_type;
59208 typedef TinyVector<difference_type, 2> multi_difference_type;
59209 typedef StridedMultiIterator <1, T, REFERENCE, POINTER> next_type;
59210 typedef StridedMultiIterator <1, T, REFERENCE, POINTER> iterator;
59211 typedef multi_dimensional_traverser_tag iterator_category;
59212
59213 const difference_type *m_stride;
59214 const difference_type *m_shape;
59215
59216
59217
59218 type ()
59219 : base_type (),
59220 m_stride (0), m_shape (0)
59221 {}
59222
59223 type (pointer ptr,
59224 const difference_type *stride,
59225 const difference_type *shape)
59226 : base_type (ptr, stride, shape),
59227 m_stride (stride), m_shape (shape)
59228 {}
59229
59230 void operator++ ()
59231 {
59232 type::m_ptr += m_stride [level];
59233 }
59234
59235 void operator-- ()
59236 {
59237 type::m_ptr -= m_stride [level];
59238 }
59239
59240 type operator++ (int)
59241 {
59242 type ret = *this;
59243 ++(*this);
59244 return ret;
59245 }
59246
59247 type operator-- (int)
59248 {
59249 type ret = *this;
59250 --(*this);
59251 return ret;
59252 }
59253
59254 type &operator+= (int n)
59255 {
59256 type::m_ptr += n * m_stride [level];
59257 return *this;
59258 }
59259
59260 type & operator+= (multi_difference_type const & d)
59261 {
59262 type::m_ptr += total_stride(d.begin());
59263 return *this;
59264 }
59265
59266 type &operator-= (difference_type n)
59267 {
59268 type::m_ptr -= n * m_stride [level];
59269 return *this;
59270 }
59271
59272 type & operator-= (multi_difference_type const & d)
59273 {
59274 type::m_ptr -= total_stride(d.begin());
59275 return *this;
59276 }
59277
59278 reference operator[] (difference_type n) const
59279 {
59280 return type::m_ptr [n*m_stride [level]];
59281 }
59282
59283 difference_type operator- (type const & d) const
59284 {
59285 return (type::m_ptr - d.m_ptr) / m_stride[level];
59286 }
59287
59288 reference operator[] (multi_difference_type const & d) const
59289 {
59290 return type::m_ptr [total_stride(d.begin())];
59291 }
59292
59293 next_type begin () const
59294 {
59295 return *this;
59296 }
59297
59298 next_type end () const
59299 {
59300 next_type ret = *this;
59301 ret += m_shape [level-1];
59302 return ret;
59303 }
59304
59305 iterator iteratorForDimension(unsigned int d) const
59306 {
59307 vigra::throw_precondition_error((d <= type::N), "StridedMultiIterator<N>::iteratorForDimension(d): d <= N required");
59308
59309 return iterator(type::m_ptr, &m_stride [d], 0);
59310 }
59311
59312 protected:
59313
59314 difference_type
59315 total_stride(typename multi_difference_type::const_iterator d) const
59316 {
59317 return d[level]*m_stride[level] + base_type::total_stride(d);
59318 }
59319 };
59320 };
59321 # 1578 "../include/vigra/multi_iterator.hxx"
59322 template <>
59323 class StridedMultiIteratorBase <1>
59324 {
59325 public:
59326 template <class T, class REFERENCE, class POINTER>
59327 class type
59328 {
59329 public:
59330
59331 enum { level = 0 };
59332 typedef T value_type;
59333 typedef REFERENCE reference;
59334 typedef const value_type &const_reference;
59335 typedef POINTER pointer;
59336 typedef const value_type *const_pointer;
59337 typedef ptrdiff_t difference_type;
59338 typedef TinyVector<difference_type, 1> multi_difference_type;
59339 typedef void next_type;
59340 typedef StridedMultiIterator <1, T, REFERENCE, POINTER> iterator;
59341 typedef std::random_access_iterator_tag iterator_category;
59342
59343 pointer m_ptr;
59344 difference_type m_stride;
59345
59346
59347
59348 type ()
59349 : m_ptr (0), m_stride (0)
59350 {}
59351
59352 type (pointer ptr,
59353 const difference_type *stride,
59354 const difference_type *)
59355 : m_ptr (ptr), m_stride (stride [level])
59356 {}
59357
59358 reference operator* () const
59359 {
59360 return *m_ptr;
59361 }
59362
59363 pointer get () const
59364 {
59365 return m_ptr;
59366 }
59367
59368 pointer operator-> () const
59369 {
59370 return &(operator*());
59371 }
59372
59373 void operator++ ()
59374 {
59375 m_ptr += m_stride;
59376 }
59377
59378 void operator-- ()
59379 {
59380 m_ptr -= m_stride;
59381 }
59382
59383 type operator++ (int)
59384 {
59385 type ret = *this;
59386 ++(*this);
59387 return ret;
59388 }
59389
59390 type operator-- (int)
59391 {
59392 type ret = *this;
59393 --(*this);
59394 return ret;
59395 }
59396
59397 type &operator+= (difference_type n)
59398 {
59399 m_ptr += n * m_stride;
59400 return *this;
59401 }
59402
59403 type & operator+= (multi_difference_type const & d)
59404 {
59405 m_ptr += d[level] * m_stride;
59406 return *this;
59407 }
59408
59409 type &operator-= (difference_type n)
59410 {
59411 m_ptr -= n * m_stride;
59412 return *this;
59413 }
59414
59415 type & operator-= (multi_difference_type const & d)
59416 {
59417 m_ptr -= d[level] * m_stride;
59418 return *this;
59419 }
59420
59421 difference_type operator- (type const & d) const
59422 {
59423 return (m_ptr - d.m_ptr) / m_stride;
59424 }
59425
59426 reference operator[] (difference_type n) const
59427 {
59428 return m_ptr [n*m_stride];
59429 }
59430
59431 reference operator[] (multi_difference_type const & d) const
59432 {
59433 return m_ptr [d[level]*m_stride];
59434 }
59435
59436 bool operator!= (const type &rhs) const
59437 {
59438 return m_ptr != rhs.m_ptr;
59439 }
59440
59441 bool operator== (const type &rhs) const
59442 {
59443 return m_ptr == rhs.m_ptr;
59444 }
59445
59446 bool operator< (const type &rhs) const
59447 {
59448 return m_ptr < rhs.m_ptr;
59449 }
59450
59451 bool operator<= (const type &rhs) const
59452 {
59453 return m_ptr <= rhs.m_ptr;
59454 }
59455
59456 iterator iteratorForDimension(unsigned int d) const
59457 {
59458 vigra::throw_precondition_error((d == 0), "StridedMultiIterator<1>::iteratorForDimension(d): d == 0 required");
59459
59460 return *this;
59461 }
59462
59463 protected:
59464
59465 difference_type
59466 total_stride(typename multi_difference_type::const_iterator d) const
59467 {
59468 return d[level]*m_stride;
59469 }
59470 };
59471 };
59472 # 1744 "../include/vigra/multi_iterator.hxx"
59473 template <unsigned int N, class T, class REFERENCE, class POINTER>
59474 class StridedMultiIterator
59475 : public StridedMultiIteratorBase <N>::template type <T, REFERENCE, POINTER>
59476 {
59477 public:
59478
59479
59480
59481 typedef typename StridedMultiIteratorBase <
59482 N>::template type <T, REFERENCE, POINTER> base_type;
59483
59484
59485
59486 typedef T value_type;
59487
59488
59489
59490 typedef REFERENCE reference;
59491
59492
59493
59494 typedef const value_type &const_reference;
59495
59496
59497
59498 typedef POINTER pointer;
59499
59500
59501
59502 typedef const value_type *const_pointer;
59503
59504
59505
59506 typedef ptrdiff_t difference_type;
59507
59508
59509
59510
59511 typedef TinyVector<difference_type, N> multi_difference_type;
59512
59513
59514
59515 typedef typename base_type::next_type next_type;
59516
59517
59518
59519
59520 typedef StridedMultiIterator <1, T, REFERENCE, POINTER> iterator;
59521
59522
59523
59524 typedef typename base_type::iterator_category iterator_category;
59525
59526
59527
59528
59529
59530 StridedMultiIterator ()
59531 {}
59532
59533
59534
59535
59536 StridedMultiIterator (pointer ptr,
59537 const difference_type *stride,
59538 const difference_type *shape)
59539 : base_type (ptr, stride, shape)
59540 {}
59541
59542
59543
59544 StridedMultiIterator operator+ (difference_type n) const
59545 {
59546 StridedMultiIterator ret = *this;
59547 ret += n;
59548 return ret;
59549 }
59550
59551
59552
59553 StridedMultiIterator operator+ (multi_difference_type const & d) const
59554 {
59555 StridedMultiIterator ret = *this;
59556 ret += d;
59557 return ret;
59558 }
59559
59560
59561
59562
59563
59564 difference_type operator- (StridedMultiIterator const & d) const
59565 {
59566 return base_type::operator-(d);
59567 }
59568
59569
59570
59571 StridedMultiIterator operator- (difference_type n) const
59572 {
59573 StridedMultiIterator ret = *this;
59574 ret -= n;
59575 return ret;
59576 }
59577
59578
59579
59580 StridedMultiIterator operator- (multi_difference_type const & d) const
59581 {
59582 StridedMultiIterator ret = *this;
59583 ret -= d;
59584 return ret;
59585 }
59586 # 1880 "../include/vigra/multi_iterator.hxx"
59587 template <unsigned int K>
59588 StridedMultiIterator<K+1, T, REFERENCE, POINTER> &
59589 dim()
59590 {
59591 return *this;
59592 }
59593
59594 StridedMultiIterator<1, T, REFERENCE, POINTER> &
59595 dim0() { return *this; }
59596 StridedMultiIterator<2, T, REFERENCE, POINTER> &
59597 dim1() { return *this; }
59598 StridedMultiIterator<3, T, REFERENCE, POINTER> &
59599 dim2() { return *this; }
59600 StridedMultiIterator<4, T, REFERENCE, POINTER> &
59601 dim3() { return *this; }
59602 StridedMultiIterator<5, T, REFERENCE, POINTER> &
59603 dim4() { return *this; }
59604 };
59605
59606
59607
59608
59609 }
59610 # 50 "../include/vigra/multi_array.hxx" 2
59611
59612
59613
59614 namespace vigra
59615 {
59616
59617 namespace detail
59618 {
59619 # 68 "../include/vigra/multi_array.hxx"
59620 template <unsigned int N>
59621 TinyVector <ptrdiff_t, N> defaultStride(const TinyVector <ptrdiff_t, N> &shape)
59622 {
59623 TinyVector <ptrdiff_t, N> ret;
59624 ret [0] = 1;
59625 for (unsigned int i = 1; i < N; ++i)
59626 ret [i] = ret [i-1] * shape [i-1];
59627 return ret;
59628 }
59629 # 93 "../include/vigra/multi_array.hxx"
59630 template <unsigned int N>
59631 struct MaybeStrided
59632 {
59633 typedef UnstridedArrayTag type;
59634 };
59635
59636 template <>
59637 struct MaybeStrided <0>
59638 {
59639 typedef StridedArrayTag type;
59640 };
59641 # 119 "../include/vigra/multi_array.hxx"
59642 template <class O>
59643 struct MultiIteratorChooser
59644 {
59645 struct Nil {};
59646
59647 template <unsigned int N, class T, class REFERENCE, class POINTER>
59648 struct Traverser
59649 {
59650 typedef Nil type;
59651 };
59652 };
59653 # 144 "../include/vigra/multi_array.hxx"
59654 template <>
59655 struct MultiIteratorChooser <StridedArrayTag>
59656 {
59657 template <unsigned int N, class T, class REFERENCE, class POINTER>
59658 struct Traverser
59659 {
59660 typedef StridedMultiIterator <N, T, REFERENCE, POINTER> type;
59661 };
59662 };
59663 # 167 "../include/vigra/multi_array.hxx"
59664 template <>
59665 struct MultiIteratorChooser <UnstridedArrayTag>
59666 {
59667 template <unsigned int N, class T, class REFERENCE, class POINTER>
59668 struct Traverser
59669 {
59670 typedef MultiIterator <N, T, REFERENCE, POINTER> type;
59671 };
59672 };
59673
59674
59675
59676
59677
59678
59679
59680 template <class DestIterator, class Shape, class T>
59681 void
59682 initMultiArrayData(DestIterator d, Shape const & shape, T const & init, MetaInt<0>)
59683 {
59684 DestIterator dend = d + shape[0];
59685 for(; d != dend; ++d)
59686 {
59687 *d = init;
59688 }
59689 }
59690
59691 template <class DestIterator, class Shape, class T, int N>
59692 void
59693 initMultiArrayData(DestIterator d, Shape const & shape, T const & init, MetaInt<N>)
59694 {
59695 DestIterator dend = d + shape[N];
59696 for(; d != dend; ++d)
59697 {
59698 initMultiArrayData(d.begin(), shape, init, MetaInt<N-1>());
59699 }
59700 }
59701
59702 template <class SrcIterator, class Shape, class DestIterator>
59703 void
59704 copyMultiArrayData(SrcIterator s, Shape const & shape, DestIterator d, MetaInt<0>)
59705 {
59706 SrcIterator send = s + shape[0];
59707 for(; s != send; ++s, ++d)
59708 {
59709 *d = *s;
59710 }
59711 }
59712
59713 template <class SrcIterator, class Shape, class DestIterator, int N>
59714 void
59715 copyMultiArrayData(SrcIterator s, Shape const & shape, DestIterator d, MetaInt<N>)
59716 {
59717 SrcIterator send = s + shape[N];
59718 for(; s != send; ++s, ++d)
59719 {
59720 copyMultiArrayData(s.begin(), shape, d.begin(), MetaInt<N-1>());
59721 }
59722 }
59723
59724 template <class SrcIterator, class Shape, class T, class ALLOC>
59725 void
59726 uninitializedCopyMultiArrayData(SrcIterator s, Shape const & shape, T * & d, ALLOC & a, MetaInt<0>)
59727 {
59728 SrcIterator send = s + shape[0];
59729 for(; s != send; ++s, ++d)
59730 {
59731 a.construct(d, *s);
59732 }
59733 }
59734
59735 template <class SrcIterator, class Shape, class T, class ALLOC, int N>
59736 void
59737 uninitializedCopyMultiArrayData(SrcIterator s, Shape const & shape, T * & d, ALLOC & a, MetaInt<N>)
59738 {
59739 SrcIterator send = s + shape[N];
59740 for(; s != send; ++s)
59741 {
59742 uninitializedCopyMultiArrayData(s.begin(), shape, d, a, MetaInt<N-1>());
59743 }
59744 }
59745
59746 template <class SrcIterator, class Shape, class T>
59747 void
59748 squaredNormOfMultiArray(SrcIterator s, Shape const & shape, T & result, MetaInt<0>)
59749 {
59750 SrcIterator send = s + shape[0];
59751 for(; s != send; ++s)
59752 {
59753 result += *s * *s;
59754 }
59755 }
59756
59757 template <class SrcIterator, class Shape, class T, int N>
59758 void
59759 squaredNormOfMultiArray(SrcIterator s, Shape const & shape, T & result, MetaInt<N>)
59760 {
59761 SrcIterator send = s + shape[N];
59762 for(; s != send; ++s)
59763 {
59764 squaredNormOfMultiArray(s.begin(), shape, result, MetaInt<N-1>());
59765 }
59766 }
59767
59768
59769 }
59770 # 281 "../include/vigra/multi_array.hxx"
59771 template <unsigned int N, class T, class C = UnstridedArrayTag>
59772 class MultiArrayView;
59773 template <unsigned int N, class T, class A = std::allocator<T> >
59774 class MultiArray;
59775 # 317 "../include/vigra/multi_array.hxx"
59776 template <unsigned int N, class T, class C>
59777 class MultiArrayView
59778 {
59779 public:
59780 # 329 "../include/vigra/multi_array.hxx"
59781 enum ActualDimension { actual_dimension = (N==0) ? 1 : N };
59782
59783
59784
59785 typedef T value_type;
59786
59787
59788
59789 typedef value_type &reference;
59790
59791
59792
59793 typedef const value_type &const_reference;
59794
59795
59796
59797 typedef value_type *pointer;
59798
59799
59800
59801 typedef const value_type *const_pointer;
59802
59803
59804
59805 typedef TinyVector <ptrdiff_t, actual_dimension> difference_type;
59806
59807
59808
59809 typedef difference_type size_type;
59810
59811
59812
59813 typedef typename detail::MultiIteratorChooser <
59814 C>::template Traverser <actual_dimension, T, T &, T *>::type traverser;
59815
59816
59817
59818 typedef typename detail::MultiIteratorChooser <
59819 C>::template Traverser <actual_dimension, T, T const &, T const *>::type const_traverser;
59820
59821
59822
59823 typedef MultiArrayView <N, T, C> view_type;
59824
59825
59826
59827 typedef MultiArray <N, T> matrix_type;
59828
59829
59830
59831 typedef typename NormTraits<T>::SquaredNormType SquaredNormType;
59832
59833
59834
59835 typedef typename SquareRootTraits<SquaredNormType>::SquareRootResult NormType;
59836
59837 protected:
59838
59839 typedef typename difference_type::value_type diff_zero_t;
59840
59841
59842
59843 difference_type m_shape;
59844
59845
59846
59847
59848 difference_type m_stride;
59849
59850
59851
59852 pointer m_ptr;
59853
59854 public:
59855
59856
59857
59858 MultiArrayView ()
59859 : m_shape (diff_zero_t(0)), m_stride (diff_zero_t(0)), m_ptr (0)
59860 {}
59861
59862
59863
59864
59865 MultiArrayView (const difference_type &shape, pointer ptr);
59866
59867
59868
59869
59870 MultiArrayView (const difference_type &shape,
59871 const difference_type &stride,
59872 pointer ptr);
59873
59874
59875
59876 reference operator[] (const difference_type &d)
59877 {
59878 return m_ptr [dot (d, m_stride)];
59879 }
59880
59881
59882
59883 const_reference operator[] (const difference_type &d) const
59884 {
59885 return m_ptr [dot (d, m_stride)];
59886 }
59887
59888
59889
59890 reference operator() (int x)
59891 {
59892 return m_ptr [m_stride[0]*x];
59893 }
59894
59895
59896
59897 reference operator() (int x, int y)
59898 {
59899 return m_ptr [m_stride[0]*x + m_stride[1]*y];
59900 }
59901
59902
59903
59904 reference operator() (int x, int y, int z)
59905 {
59906 return m_ptr [m_stride[0]*x + m_stride[1]*y + m_stride[2]*z];
59907 }
59908
59909
59910
59911 reference operator() (int x, int y, int z, int u)
59912 {
59913 return m_ptr [m_stride[0]*x + m_stride[1]*y + m_stride[2]*z + m_stride[3]*u];
59914 }
59915
59916
59917
59918 reference operator() (int x, int y, int z, int u, int v)
59919 {
59920 return m_ptr [m_stride[0]*x + m_stride[1]*y + m_stride[2]*z + m_stride[3]*u + m_stride[4]*v];
59921 }
59922
59923
59924
59925 const_reference operator() (int x) const
59926 {
59927 return m_ptr [m_stride[0]*x];
59928 }
59929
59930
59931
59932 const_reference operator() (int x, int y) const
59933 {
59934 return m_ptr [m_stride[0]*x + m_stride[1]*y];
59935 }
59936
59937
59938
59939 const_reference operator() (int x, int y, int z) const
59940 {
59941 return m_ptr [m_stride[0]*x + m_stride[1]*y + m_stride[2]*z];
59942 }
59943
59944
59945
59946 const_reference operator() (int x, int y, int z, int u) const
59947 {
59948 return m_ptr [m_stride[0]*x + m_stride[1]*y + m_stride[2]*z + m_stride[3]*u];
59949 }
59950
59951
59952
59953 const_reference operator() (int x, int y, int z, int u, int v) const
59954 {
59955 return m_ptr [m_stride[0]*x + m_stride[1]*y + m_stride[2]*z + m_stride[3]*u + m_stride[4]*v];
59956 }
59957
59958
59959
59960 template <class U>
59961 void init(const U & init);
59962
59963
59964
59965 template <class U, class CN>
59966 void copy(const MultiArrayView <N, U, CN>& rhs);
59967
59968
59969
59970
59971
59972 template <unsigned int M>
59973 MultiArrayView <N-M, T, C> bindOuter (const TinyVector <ptrdiff_t, M> &d) const;
59974
59975
59976
59977
59978
59979 template <unsigned int M>
59980 MultiArrayView <N-M, T, StridedArrayTag>
59981 bindInner (const TinyVector <ptrdiff_t, M> &d) const;
59982
59983
59984
59985
59986
59987 template <unsigned int M>
59988 MultiArrayView <N-1, T, typename detail::MaybeStrided <M>::type >
59989 bind (int d) const;
59990
59991
59992
59993
59994
59995 MultiArrayView <N-1, T, C> bindOuter (int d) const;
59996
59997
59998
59999
60000
60001 MultiArrayView <N-1, T, StridedArrayTag> bindInner (int d) const;
60002
60003
60004
60005
60006
60007 MultiArrayView <N-1, T, StridedArrayTag>
60008 bindAt (int m, int d) const;
60009
60010
60011
60012
60013 MultiArrayView subarray (const difference_type &p,
60014 const difference_type &q) const
60015 {
60016 const int offset = dot (m_stride, p);
60017 return MultiArrayView (q - p, m_stride, m_ptr + offset);
60018 }
60019
60020
60021
60022
60023
60024
60025
60026 MultiArrayView <N, T, StridedArrayTag>
60027 stridearray (const difference_type &s) const
60028 {
60029 difference_type shape = m_shape;
60030 for (unsigned int i = 0; i < actual_dimension; ++i)
60031 shape [i] /= s [i];
60032 return MultiArrayView <N, T, StridedArrayTag>
60033 (shape, m_stride * s, m_ptr);
60034 }
60035
60036
60037
60038 std::size_t elementCount () const
60039 {
60040 std::size_t ret = m_shape[0];
60041 for(unsigned int i = 1; i < actual_dimension; ++i)
60042 ret *= m_shape[i];
60043 return ret;
60044 }
60045
60046
60047
60048 const size_type & size () const
60049 {
60050 return m_shape;
60051 }
60052
60053
60054
60055 const difference_type & shape () const
60056 {
60057 return m_shape;
60058 }
60059
60060
60061
60062 int size (int n) const
60063 {
60064 return m_shape [n];
60065 }
60066
60067
60068
60069
60070 int shape (int n) const
60071 {
60072 return m_shape [n];
60073 }
60074
60075
60076
60077 const difference_type & stride () const
60078 {
60079 return m_stride;
60080 }
60081
60082
60083
60084 int stride (int n) const
60085 {
60086 return m_stride [n];
60087 }
60088
60089
60090
60091 bool isInside (difference_type const & p) const
60092 {
60093 for(int d=0; d<actual_dimension; ++d)
60094 if(p[d] < 0 || p[d] >= shape(d))
60095 return false;
60096 return true;
60097 }
60098
60099
60100
60101 SquaredNormType squaredNorm() const
60102 {
60103 SquaredNormType res = NumericTraits<SquaredNormType>::zero();
60104 detail::squaredNormOfMultiArray(traverser_begin(), shape(), res, MetaInt<actual_dimension-1>());
60105 return res;
60106 }
60107
60108
60109
60110 NormType norm() const
60111 {
60112 return sqrt(static_cast<typename SquareRootTraits<SquaredNormType>::SquareRootArgument>(this->squaredNorm()));
60113 }
60114
60115
60116
60117 pointer data () const
60118 {
60119 return m_ptr;
60120 }
60121
60122
60123
60124
60125 traverser traverser_begin ()
60126 {
60127 traverser ret (m_ptr, m_stride.begin (), m_shape.begin ());
60128 return ret;
60129 }
60130
60131
60132
60133
60134 const_traverser traverser_begin () const
60135 {
60136 const_traverser ret (m_ptr, m_stride.begin (), m_shape.begin ());
60137 return ret;
60138 }
60139
60140
60141
60142
60143
60144 traverser traverser_end ()
60145 {
60146 traverser ret (m_ptr, m_stride.begin (), m_shape.begin ());
60147 ret += m_shape [actual_dimension-1];
60148 return ret;
60149 }
60150
60151
60152
60153
60154
60155 const_traverser traverser_end () const
60156 {
60157 const_traverser ret (m_ptr, m_stride.begin (), m_shape.begin ());
60158 ret += m_shape [actual_dimension-1];
60159 return ret;
60160 }
60161
60162 view_type view ()
60163 {
60164 return *this;
60165 }
60166 };
60167
60168 template <unsigned int N, class T, class C>
60169 MultiArrayView <N, T, C>::MultiArrayView (const difference_type &shape,
60170 pointer ptr)
60171 : m_shape (shape), m_stride (detail::defaultStride <MultiArrayView<N,T>::actual_dimension> (shape)), m_ptr (ptr)
60172 {}
60173
60174 template <unsigned int N, class T, class C>
60175 MultiArrayView <N, T, C>::MultiArrayView
60176 (const difference_type &shape, const difference_type &stride, pointer ptr)
60177 : m_shape (shape), m_stride (stride), m_ptr (ptr)
60178 {}
60179
60180 template <unsigned int N, class T, class C>
60181 template <class U>
60182 void
60183 MultiArrayView <N, T, C>::init(const U & init)
60184 {
60185 detail::initMultiArrayData(traverser_begin(), shape(), init, MetaInt<actual_dimension-1>());
60186 }
60187
60188 template <unsigned int N, class T, class C>
60189 template <class U, class CN>
60190 void
60191 MultiArrayView <N, T, C>::copy(const MultiArrayView <N, U, CN>& rhs)
60192 {
60193 if(this == &rhs)
60194 return;
60195 vigra::throw_precondition_error((shape () == rhs.shape ()), "MultiArrayView::copy(): shape mismatch.");
60196
60197 detail::copyMultiArrayData(rhs.traverser_begin(), shape(), traverser_begin(), MetaInt<actual_dimension-1>());
60198 }
60199
60200 template <unsigned int N, class T, class C>
60201 template <unsigned int M>
60202 MultiArrayView <N-M, T, C>
60203 MultiArrayView <N, T, C>::bindOuter (const TinyVector <ptrdiff_t, M> &d) const
60204 {
60205 TinyVector <ptrdiff_t, M> stride;
60206 stride.init (m_stride.begin () + N-M, m_stride.end ());
60207 pointer ptr = m_ptr + dot (d, stride);
60208 static const int NNew = (N-M == 0) ? 1 : N-M;
60209 TinyVector <ptrdiff_t, NNew> inner_shape, inner_stride;
60210 if (N-M == 0)
60211 {
60212 inner_shape [0] = 1;
60213 inner_stride [0] = 0;
60214 }
60215 else
60216 {
60217 inner_shape.init (m_shape.begin (), m_shape.end () - M);
60218 inner_stride.init (m_stride.begin (), m_stride.end () - M);
60219 }
60220 return MultiArrayView <N-M, T, C> (inner_shape, inner_stride, ptr);
60221 }
60222
60223 template <unsigned int N, class T, class C>
60224 template <unsigned int M>
60225 MultiArrayView <N - M, T, StridedArrayTag>
60226 MultiArrayView <N, T, C>::bindInner (const TinyVector <ptrdiff_t, M> &d) const
60227 {
60228 TinyVector <ptrdiff_t, M> stride;
60229 stride.init (m_stride.begin (), m_stride.end () - N + M);
60230 pointer ptr = m_ptr + dot (d, stride);
60231 static const int NNew = (N-M == 0) ? 1 : N-M;
60232 TinyVector <ptrdiff_t, NNew> outer_shape, outer_stride;
60233 if (N-M == 0)
60234 {
60235 outer_shape [0] = 1;
60236 outer_stride [0] = 0;
60237 }
60238 else
60239 {
60240 outer_shape.init (m_shape.begin () + M, m_shape.end ());
60241 outer_stride.init (m_stride.begin () + M, m_stride.end ());
60242 }
60243 return MultiArrayView <N-M, T, StridedArrayTag>
60244 (outer_shape, outer_stride, ptr);
60245 }
60246
60247 template <unsigned int N, class T, class C>
60248 template <unsigned int M>
60249 MultiArrayView <N-1, T, typename detail::MaybeStrided <M>::type >
60250 MultiArrayView <N, T, C>::bind (int d) const
60251 {
60252 static const int NNew = (N-1 == 0) ? 1 : N-1;
60253 TinyVector <ptrdiff_t, NNew> shape, stride;
60254
60255 if (N-1 == 0)
60256 {
60257 shape[0] = 1;
60258 stride[0] = 0;
60259 }
60260 else
60261 {
60262 std::copy (m_shape.begin (), m_shape.begin () + M, shape.begin ());
60263 std::copy (m_shape.begin () + M+1, m_shape.end (),
60264 shape.begin () + M);
60265 std::copy (m_stride.begin (), m_stride.begin () + M, stride.begin ());
60266 std::copy (m_stride.begin () + M+1, m_stride.end (),
60267 stride.begin () + M);
60268 }
60269 return MultiArrayView <N-1, T, typename detail::MaybeStrided <M>::type>
60270 (shape, stride, m_ptr + d * m_stride[M]);
60271 }
60272
60273 template <unsigned int N, class T, class C>
60274 MultiArrayView <N - 1, T, C>
60275 MultiArrayView <N, T, C>::bindOuter (int d) const
60276 {
60277 static const int NNew = (N-1 == 0) ? 1 : N-1;
60278 TinyVector <ptrdiff_t, NNew> inner_shape, inner_stride;
60279 if (N-1 == 0)
60280 {
60281 inner_shape [0] = 1;
60282 inner_stride [0] = 0;
60283 }
60284 else
60285 {
60286 inner_shape.init (m_shape.begin (), m_shape.end () - 1);
60287 inner_stride.init (m_stride.begin (), m_stride.end () - 1);
60288 }
60289 return MultiArrayView <N-1, T, C> (inner_shape, inner_stride,
60290 m_ptr + d * m_stride [N-1]);
60291 }
60292
60293 template <unsigned int N, class T, class C>
60294 MultiArrayView <N - 1, T, StridedArrayTag>
60295 MultiArrayView <N, T, C>::bindInner (int d) const
60296 {
60297 static const int NNew = (N-1 == 0) ? 1 : N-1;
60298 TinyVector <ptrdiff_t, NNew> outer_shape, outer_stride;
60299 if (N-1 == 0)
60300 {
60301 outer_shape [0] = 1;
60302 outer_stride [0] = 0;
60303 }
60304 else
60305 {
60306 outer_shape.init (m_shape.begin () + 1, m_shape.end ());
60307 outer_stride.init (m_stride.begin () + 1, m_stride.end ());
60308 }
60309 return MultiArrayView <N-1, T, StridedArrayTag>
60310 (outer_shape, outer_stride, m_ptr + d * m_stride [0]);
60311 }
60312
60313 template <unsigned int N, class T, class C>
60314 MultiArrayView <N - 1, T, StridedArrayTag>
60315 MultiArrayView <N, T, C>::bindAt (int n, int d) const
60316 {
60317 vigra::throw_precondition_error((n < static_cast <int> (N)), "MultiArrayView <N, T, C>::bindAt(): dimension out of range.");
60318
60319
60320 static const int NNew = (N-1 == 0) ? 1 : N-1;
60321 TinyVector <ptrdiff_t, NNew> shape, stride;
60322
60323 if (N-1 == 0)
60324 {
60325 shape [0] = 1;
60326 stride [0] = 0;
60327 }
60328 else
60329 {
60330 std::copy (m_shape.begin (), m_shape.begin () + n, shape.begin ());
60331 std::copy (m_shape.begin () + n+1, m_shape.end (),
60332 shape.begin () + n);
60333 std::copy (m_stride.begin (), m_stride.begin () + n, stride.begin ());
60334 std::copy (m_stride.begin () + n+1, m_stride.end (),
60335 stride.begin () + n);
60336 }
60337 return MultiArrayView <N-1, T, StridedArrayTag>
60338 (shape, stride, m_ptr + d * m_stride[n]);
60339 }
60340
60341
60342
60343
60344
60345
60346
60347 template <unsigned int N, class T, class C>
60348 struct NormTraits<MultiArrayView <N, T, C> >
60349 {
60350 typedef MultiArrayView <N, T, C> Type;
60351 typedef typename Type::SquaredNormType SquaredNormType;
60352 typedef typename Type::NormType NormType;
60353 };
60354
60355 template <unsigned int N, class T, class C>
60356 inline typename MultiArrayView <N, T, C>::SquaredNormType
60357 squaredNorm(MultiArrayView <N, T, C> const & a)
60358 {
60359 return a.squaredNorm();
60360 }
60361
60362 template <unsigned int N, class T, class C>
60363 inline typename MultiArrayView <N, T, C>::NormType
60364 norm(MultiArrayView <N, T, C> const & a)
60365 {
60366 return a.norm();
60367 }
60368 # 946 "../include/vigra/multi_array.hxx"
60369 template <unsigned int N, class T, class A >
60370 class MultiArray : public MultiArrayView <N, T>
60371 {
60372
60373 public:
60374 using MultiArrayView <N, T>::actual_dimension;
60375
60376
60377
60378 typedef A allocator_type;
60379
60380
60381
60382 typedef MultiArrayView <N, T> view_type;
60383
60384
60385
60386 typedef MultiArray <N, T, A> matrix_type;
60387
60388
60389
60390 typedef typename view_type::value_type value_type;
60391
60392
60393
60394 typedef typename view_type::pointer pointer;
60395
60396
60397
60398 typedef typename view_type::const_pointer const_pointer;
60399
60400
60401
60402 typedef typename view_type::reference reference;
60403
60404
60405
60406 typedef typename view_type::const_reference const_reference;
60407
60408
60409
60410 typedef typename view_type::size_type size_type;
60411
60412
60413
60414 typedef typename view_type::difference_type difference_type;
60415
60416
60417
60418 typedef typename detail::MultiIteratorChooser <
60419 UnstridedArrayTag>::template Traverser <N, T, T &, T *>::type
60420 traverser;
60421
60422
60423
60424 typedef typename detail::MultiIteratorChooser <
60425 UnstridedArrayTag>::template Traverser <N, T, T const &, T const *>::type
60426 const_traverser;
60427
60428
60429
60430 typedef T * iterator;
60431
60432
60433
60434 typedef T * const_iterator;
60435
60436
60437
60438 typedef typename view_type::SquaredNormType SquaredNormType;
60439
60440
60441
60442 typedef typename view_type::NormType NormType;
60443
60444 protected:
60445
60446 typedef typename difference_type::value_type diff_zero_t;
60447
60448
60449
60450 allocator_type m_alloc;
60451
60452
60453
60454
60455 void allocate (pointer &ptr, std::size_t s, const_reference init);
60456
60457
60458
60459
60460 template <class U>
60461 void allocate (pointer &ptr, std::size_t s, U const * init);
60462
60463
60464
60465
60466 template <class U, class C>
60467 void allocate (pointer &ptr, MultiArrayView<N, U, C> const & init);
60468
60469
60470
60471 void deallocate (pointer &ptr, std::size_t s);
60472
60473 public:
60474
60475
60476
60477 MultiArray ();
60478
60479
60480
60481 MultiArray (allocator_type const & alloc);
60482
60483
60484
60485 explicit MultiArray (const difference_type &shape,
60486 allocator_type const & alloc = allocator_type());
60487
60488
60489
60490 MultiArray (const difference_type &shape, const_reference init,
60491 allocator_type const & alloc = allocator_type());
60492
60493
60494
60495 MultiArray (const difference_type &shape, const_pointer init,
60496 allocator_type const & alloc = allocator_type());
60497
60498
60499
60500 MultiArray (const MultiArray &rhs);
60501
60502
60503
60504 template <class U, class C>
60505 MultiArray (const MultiArrayView<N, U, C> &rhs,
60506 allocator_type const & alloc = allocator_type());
60507
60508
60509
60510
60511
60512
60513 MultiArray &operator= (const MultiArray &rhs)
60514 {
60515 return this->operator=(static_cast<view_type const &>(rhs));
60516 }
60517
60518
60519
60520
60521
60522
60523 template <class U, class C>
60524 MultiArray &operator= (const MultiArrayView<N, U, C> &rhs);
60525
60526
60527
60528 ~MultiArray ();
60529
60530
60531
60532
60533
60534
60535 void reshape (const difference_type &shape)
60536 {
60537 reshape (shape, NumericTraits <T>::zero ());
60538 }
60539
60540
60541
60542
60543
60544
60545 void reshape (const difference_type &shape, const_reference init);
60546
60547
60548
60549
60550
60551
60552 void swap (MultiArray & other);
60553
60554
60555
60556 iterator begin ()
60557 {
60558 return this->data();
60559 }
60560
60561
60562
60563 iterator end ()
60564 {
60565 return this->data() + this->elementCount();
60566 }
60567
60568
60569
60570 const_iterator begin () const
60571 {
60572 return this->data();
60573 }
60574
60575
60576
60577 const_iterator end () const
60578 {
60579 return this->data() + this->elementCount();
60580 }
60581
60582
60583
60584 allocator_type const & allocator () const
60585 {
60586 return m_alloc;
60587 }
60588 };
60589
60590 template <unsigned int N, class T, class A>
60591 MultiArray <N, T, A>::MultiArray ()
60592 : MultiArrayView <N, T> (difference_type (diff_zero_t(0)),
60593 difference_type (diff_zero_t(0)), 0)
60594 {}
60595
60596 template <unsigned int N, class T, class A>
60597 MultiArray <N, T, A>::MultiArray (allocator_type const & alloc)
60598 : MultiArrayView <N, T> (difference_type (diff_zero_t(0)),
60599 difference_type (diff_zero_t(0)), 0),
60600 m_alloc(alloc)
60601 {}
60602
60603 template <unsigned int N, class T, class A>
60604 MultiArray <N, T, A>::MultiArray (const difference_type &shape,
60605 allocator_type const & alloc)
60606 : MultiArrayView <N, T> (shape, detail::defaultStride <MultiArrayView<N,T>::actual_dimension> (shape), 0),
60607 m_alloc(alloc)
60608 {
60609 if (N == 0)
60610 {
60611 this->m_shape [0] = 1;
60612 this->m_stride [0] = 0;
60613 }
60614 allocate (this->m_ptr, this->elementCount (), NumericTraits<T>::zero ());
60615 }
60616
60617 template <unsigned int N, class T, class A>
60618 MultiArray <N, T, A>::MultiArray (const difference_type &shape,
60619 const_reference init,
60620 allocator_type const & alloc)
60621 : MultiArrayView <N, T> (shape, detail::defaultStride <MultiArrayView<N,T>::actual_dimension> (shape), 0),
60622 m_alloc(alloc)
60623 {
60624 if (N == 0)
60625 {
60626 this->m_shape [0] = 1;
60627 this->m_stride [0] = 0;
60628 }
60629 allocate (this->m_ptr, this->elementCount (), init);
60630 }
60631
60632 template <unsigned int N, class T, class A>
60633 MultiArray <N, T, A>::MultiArray (const difference_type &shape,
60634 const_pointer init,
60635 allocator_type const & alloc)
60636 : MultiArrayView <N, T> (shape, detail::defaultStride <MultiArrayView<N,T>::actual_dimension> (shape), 0),
60637 m_alloc(alloc)
60638 {
60639 if (N == 0)
60640 {
60641 this->m_shape [0] = 1;
60642 this->m_stride [0] = 0;
60643 }
60644 allocate (this->m_ptr, this->elementCount (), init);
60645 }
60646
60647 template <unsigned int N, class T, class A>
60648 MultiArray <N, T, A>::MultiArray (const MultiArray &rhs)
60649 : MultiArrayView <N, T> (rhs.m_shape, rhs.m_stride, 0),
60650 m_alloc (rhs.m_alloc)
60651 {
60652 allocate (this->m_ptr, this->elementCount (), rhs.data ());
60653 }
60654
60655 template <unsigned int N, class T, class A>
60656 template <class U, class C>
60657 MultiArray <N, T, A>::MultiArray (const MultiArrayView<N, U, C> &rhs,
60658 allocator_type const & alloc)
60659 : MultiArrayView <N, T> (rhs.shape(),
60660 detail::defaultStride <MultiArrayView<N,T>::actual_dimension> (rhs.shape()), 0),
60661 m_alloc (alloc)
60662 {
60663 allocate (this->m_ptr, rhs);
60664 }
60665
60666 template <unsigned int N, class T, class A>
60667 MultiArray <N, T, A>::~MultiArray ()
60668 {
60669 deallocate (this->m_ptr, this->elementCount ());
60670 }
60671
60672 template <unsigned int N, class T, class A>
60673 template <class U, class C>
60674 MultiArray <N, T, A> &
60675 MultiArray <N, T, A>::operator= (const MultiArrayView<N, U, C> &rhs)
60676 {
60677 if (this == &rhs)
60678 return *this;
60679 if (this->shape() == rhs.shape())
60680 this->copy(rhs);
60681 else
60682 {
60683 pointer new_ptr;
60684 allocate (new_ptr, rhs);
60685 deallocate (this->m_ptr, this->elementCount ());
60686 this->m_shape = rhs.shape();
60687 this->m_stride = rhs.stride();
60688 this->m_ptr = new_ptr;
60689 }
60690 return *this;
60691 }
60692
60693 template <unsigned int N, class T, class A>
60694 void MultiArray <N, T, A>::reshape (const difference_type & new_shape,
60695 const_reference init)
60696 {
60697 if (N== 0)
60698 return;
60699
60700 difference_type new_stride = detail::defaultStride <MultiArrayView<N,T>::actual_dimension> (new_shape);
60701 std::size_t new_size = new_shape [MultiArrayView<N,T>::actual_dimension-1] * new_stride [MultiArrayView<N,T>::actual_dimension-1];
60702 T *new_ptr;
60703 allocate (new_ptr, new_size, init);
60704 deallocate (this->m_ptr, this->elementCount ());
60705 this->m_ptr = new_ptr;
60706 this->m_shape = new_shape;
60707 this->m_stride = new_stride;
60708 }
60709
60710
60711 template <unsigned int N, class T, class A>
60712 void MultiArray <N, T, A>::swap (MultiArray <N, T, A> & other)
60713 {
60714 if (this == &other)
60715 return;
60716 std::swap(this->m_shape, other.m_shape);
60717 std::swap(this->m_stride, other.m_stride);
60718 std::swap(this->m_ptr, other.m_ptr);
60719 std::swap(this->m_alloc, other.m_alloc);
60720 }
60721
60722 template <unsigned int N, class T, class A>
60723 void MultiArray <N, T, A>::allocate (pointer & ptr, std::size_t s,
60724 const_reference init)
60725 {
60726 ptr = m_alloc.allocate (s);
60727 std::size_t i;
60728 try {
60729 for (i = 0; i < s; ++i)
60730 m_alloc.construct (ptr + i, init);
60731 }
60732 catch (...) {
60733 for (std::size_t j = 0; j < i; ++j)
60734 m_alloc.destroy (ptr + j);
60735 m_alloc.deallocate (ptr, s);
60736 throw;
60737 }
60738 }
60739
60740 template <unsigned int N, class T, class A>
60741 template <class U>
60742 void MultiArray <N, T, A>::allocate (pointer & ptr, std::size_t s,
60743 U const * init)
60744 {
60745 ptr = m_alloc.allocate (s);
60746 std::size_t i;
60747 try {
60748 for (i = 0; i < s; ++i, ++init)
60749 m_alloc.construct (ptr + i, *init);
60750 }
60751 catch (...) {
60752 for (std::size_t j = 0; j < i; ++j)
60753 m_alloc.destroy (ptr + j);
60754 m_alloc.deallocate (ptr, s);
60755 throw;
60756 }
60757 }
60758
60759 template <unsigned int N, class T, class A>
60760 template <class U, class C>
60761 void MultiArray <N, T, A>::allocate (pointer & ptr, MultiArrayView<N, U, C> const & init)
60762 {
60763 std::size_t s = init.elementCount();
60764 ptr = m_alloc.allocate (s);
60765 pointer p = ptr;
60766 try {
60767 detail::uninitializedCopyMultiArrayData(init.traverser_begin(), init.shape(),
60768 p, m_alloc, MetaInt<actual_dimension-1>());
60769 }
60770 catch (...) {
60771 for (pointer pp = ptr; pp < p; ++pp)
60772 m_alloc.destroy (pp);
60773 m_alloc.deallocate (ptr, s);
60774 throw;
60775 }
60776 }
60777
60778 template <unsigned int N, class T, class A>
60779 void MultiArray <N, T, A>::deallocate (pointer & ptr, std::size_t s)
60780 {
60781 if (ptr == 0)
60782 return;
60783 for (std::size_t i = 0; i < s; ++i)
60784 m_alloc.destroy (ptr + i);
60785 m_alloc.deallocate (ptr, s);
60786 ptr = 0;
60787 }
60788
60789
60790
60791
60792
60793
60794
60795 template <unsigned int N, class T, class A>
60796 struct NormTraits<MultiArray <N, T, A> >
60797 {
60798 typedef MultiArray <N, T, A> Type;
60799 typedef typename Type::SquaredNormType SquaredNormType;
60800 typedef typename Type::NormType NormType;
60801 };
60802
60803
60804
60805
60806
60807
60808
60809 template <unsigned int N, class T, class C>
60810 inline triple<typename MultiArrayView<N,T,C>::const_traverser,
60811 typename MultiArrayView<N,T,C>::difference_type,
60812 typename AccessorTraits<T>::default_const_accessor >
60813 srcMultiArrayRange( MultiArrayView<N,T,C> const & array )
60814 {
60815 return triple<typename MultiArrayView<N,T,C>::const_traverser,
60816 typename MultiArrayView<N,T,C>::difference_type,
60817 typename AccessorTraits<T>::default_const_accessor >
60818 ( array.traverser_begin(),
60819 array.shape(),
60820 typename AccessorTraits<T>::default_const_accessor() );
60821 }
60822
60823 template <unsigned int N, class T, class C, class Accessor>
60824 inline triple<typename MultiArrayView<N,T,C>::const_traverser,
60825 typename MultiArrayView<N,T,C>::difference_type,
60826 Accessor >
60827 srcMultiArrayRange( MultiArrayView<N,T,C> const & array, Accessor a )
60828 {
60829 return triple<typename MultiArrayView<N,T,C>::const_traverser,
60830 typename MultiArrayView<N,T,C>::difference_type,
60831 Accessor >
60832 ( array.traverser_begin(),
60833 array.shape(),
60834 a);
60835 }
60836
60837 template <unsigned int N, class T, class C>
60838 inline pair<typename MultiArrayView<N,T,C>::const_traverser,
60839 typename AccessorTraits<T>::default_const_accessor >
60840 srcMultiArray( MultiArrayView<N,T,C> const & array )
60841 {
60842 return pair<typename MultiArrayView<N,T,C>::const_traverser,
60843 typename AccessorTraits<T>::default_const_accessor >
60844 ( array.traverser_begin(),
60845 typename AccessorTraits<T>::default_const_accessor() );
60846 }
60847
60848 template <unsigned int N, class T, class C, class Accessor>
60849 inline pair<typename MultiArrayView<N,T,C>::const_traverser,
60850 Accessor >
60851 srcMultiArray( MultiArrayView<N,T,C> const & array, Accessor a )
60852 {
60853 return pair<typename MultiArrayView<N,T,C>::const_traverser,
60854 Accessor >
60855 ( array.traverser_begin(), a );
60856 }
60857
60858 template <unsigned int N, class T, class C>
60859 inline triple<typename MultiArrayView<N,T,C>::traverser,
60860 typename MultiArrayView<N,T,C>::difference_type,
60861 typename AccessorTraits<T>::default_accessor >
60862 destMultiArrayRange( MultiArrayView<N,T,C> & array )
60863 {
60864 return triple<typename MultiArrayView<N,T,C>::traverser,
60865 typename MultiArrayView<N,T,C>::difference_type,
60866 typename AccessorTraits<T>::default_accessor >
60867 ( array.traverser_begin(),
60868 array.shape(),
60869 typename AccessorTraits<T>::default_accessor() );
60870 }
60871
60872 template <unsigned int N, class T, class C, class Accessor>
60873 inline triple<typename MultiArrayView<N,T,C>::traverser,
60874 typename MultiArrayView<N,T,C>::difference_type,
60875 Accessor >
60876 destMultiArrayRange( MultiArrayView<N,T,C> & array, Accessor a )
60877 {
60878 return triple<typename MultiArrayView<N,T,C>::traverser,
60879 typename MultiArrayView<N,T,C>::difference_type,
60880 Accessor >
60881 ( array.traverser_begin(),
60882 array.shape(),
60883 a );
60884 }
60885
60886 template <unsigned int N, class T, class C>
60887 inline pair<typename MultiArrayView<N,T,C>::traverser,
60888 typename AccessorTraits<T>::default_accessor >
60889 destMultiArray( MultiArrayView<N,T,C> & array )
60890 {
60891 return pair<typename MultiArrayView<N,T,C>::traverser,
60892 typename AccessorTraits<T>::default_accessor >
60893 ( array.traverser_begin(),
60894 typename AccessorTraits<T>::default_accessor() );
60895 }
60896
60897 template <unsigned int N, class T, class C, class Accessor>
60898 inline pair<typename MultiArrayView<N,T,C>::traverser,
60899 Accessor >
60900 destMultiArray( MultiArrayView<N,T,C> & array, Accessor a )
60901 {
60902 return pair<typename MultiArrayView<N,T,C>::traverser,
60903 Accessor >
60904 ( array.traverser_begin(), a );
60905 }
60906 # 1500 "../include/vigra/multi_array.hxx"
60907 template <class T>
60908 BasicImageView <T>
60909 makeBasicImageView (MultiArrayView <2, T, UnstridedArrayTag> const &array)
60910 {
60911 return BasicImageView <T> (array.data (), array.shape (0),
60912 array.shape (1));
60913 }
60914 # 1516 "../include/vigra/multi_array.hxx"
60915 template <class T>
60916 BasicImageView <T>
60917 makeBasicImageView (MultiArray <3, T> const &array)
60918 {
60919 return BasicImageView <T> (array.data (),
60920 array.shape (0)*array.shape (1), array.shape (2));
60921 }
60922 # 1532 "../include/vigra/multi_array.hxx"
60923 template <class T>
60924 BasicImageView <RGBValue<T> >
60925 makeRGBImageView (MultiArray<3, T> const &array)
60926 {
60927 vigra::throw_precondition_error((array.shape (0) == 3), "makeRGBImageView(): array.shape(0) must be 3.");
60928
60929 return BasicImageView <RGBValue<T> > (
60930 reinterpret_cast <RGBValue <T> *> (array.data ()),
60931 array.shape (1), array.shape (2));
60932 }
60933
60934
60935
60936 }
60937 # 73 "../include/vigra/impex.hxx" 2
60938
60939 # 1 "../include/vigra/codec.hxx" 1
60940 # 58 "../include/vigra/codec.hxx"
60941 # 1 "../include/vigra/windows.h" 1
60942 # 59 "../include/vigra/codec.hxx" 2
60943 # 1 "../include/vigra/array_vector.hxx" 1
60944 # 42 "../include/vigra/array_vector.hxx"
60945 # 1 "../include/vigra/memory.hxx" 1
60946 # 42 "../include/vigra/memory.hxx"
60947 namespace vigra { namespace detail {
60948
60949 template <class T>
60950 void destroy_n(T * , int , VigraTrueType )
60951 {
60952 }
60953
60954 template <class T>
60955 void destroy_n(T * p, int n, VigraFalseType )
60956 {
60957 T * end = p + n;
60958 for(; p != end; ++p)
60959 p->~T();
60960 }
60961
60962 template <class T>
60963 void destroy_n(T * p, int n)
60964 {
60965 destroy_n(p, n, typename TypeTraits<T>::isPOD());
60966 }
60967
60968
60969
60970
60971
60972
60973 template <class T>
60974 void destroy(T * p, VigraTrueType )
60975 {
60976 }
60977
60978 template <class T>
60979 void destroy(T * p, VigraFalseType )
60980 {
60981 p->~T();
60982 }
60983
60984 template <class T>
60985 void destroy(T * p)
60986 {
60987 destroy(p, typename TypeTraits<T>::isPOD());
60988 }
60989 # 97 "../include/vigra/memory.hxx"
60990 } }
60991 # 43 "../include/vigra/array_vector.hxx" 2
60992
60993 namespace vigra
60994 {
60995 # 69 "../include/vigra/array_vector.hxx"
60996 template <class T, class Alloc = std::allocator<T> >
60997 class ArrayVector
60998 {
60999 typedef ArrayVector<T, Alloc> this_type;
61000 enum { minimumCapacity = 2 };
61001
61002 public:
61003 typedef T value_type;
61004 typedef value_type & reference;
61005 typedef value_type const & const_reference;
61006 typedef value_type * pointer;
61007 typedef value_type const * const_pointer;
61008 typedef value_type * iterator;
61009 typedef value_type const * const_iterator;
61010 typedef unsigned int size_type;
61011 typedef int difference_type;
61012 typedef Alloc allocator_type;
61013 typedef std::reverse_iterator<iterator> reverse_iterator;
61014 typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
61015
61016 public:
61017 ArrayVector();
61018
61019 explicit ArrayVector(Alloc const & alloc);
61020
61021 explicit ArrayVector( size_type size, Alloc const & alloc = Alloc());
61022
61023 ArrayVector( size_type size, value_type const & initial, Alloc const & alloc = Alloc());
61024
61025 ArrayVector( this_type const & rhs );
61026
61027 template <class InputIterator>
61028 ArrayVector(InputIterator i, InputIterator end);
61029
61030 template <class InputIterator>
61031 ArrayVector(InputIterator i, InputIterator end, Alloc const & alloc);
61032
61033 this_type & operator=( this_type const & rhs );
61034
61035 ~ArrayVector();
61036
61037 inline const_pointer data() const
61038 {
61039 return data_;
61040 }
61041
61042 inline pointer data()
61043 {
61044 return data_;
61045 }
61046
61047 inline const_iterator begin() const
61048 {
61049 return data();
61050 }
61051
61052 inline iterator begin()
61053 {
61054 return data();
61055 }
61056
61057 inline const_iterator end() const
61058 {
61059 return data() + size();
61060 }
61061
61062 inline iterator end()
61063 {
61064 return data() + size();
61065 }
61066
61067 inline reverse_iterator rbegin()
61068 {
61069 return (reverse_iterator(end()));
61070 }
61071
61072 inline const_reverse_iterator rbegin() const
61073 {
61074 return (const_reverse_iterator(end()));
61075 }
61076
61077 inline reverse_iterator rend()
61078 {
61079 return (reverse_iterator(begin()));
61080 }
61081
61082 inline const_reverse_iterator rend() const
61083 {
61084 return (const_reverse_iterator(begin()));
61085 }
61086
61087 reference front()
61088 {
61089 return *data_;
61090 }
61091
61092 const_reference front() const
61093 {
61094 return *data_;
61095 }
61096
61097 reference back()
61098 {
61099 return data_[size_-1];
61100 }
61101
61102 const_reference back() const
61103 {
61104 return data_[size_-1];
61105 }
61106
61107 reference operator[]( size_type i )
61108 {
61109 return data()[i];
61110 }
61111
61112 const_reference operator[]( size_type i ) const
61113 {
61114 return data()[i];
61115 }
61116
61117 void pop_back();
61118
61119 void push_back( value_type const & t );
61120
61121 iterator insert(iterator p, value_type const & v);
61122
61123 iterator insert(iterator p, size_type n, value_type const & v);
61124
61125 template <class InputIterator>
61126 iterator insert(iterator p, InputIterator i, InputIterator iend);
61127
61128 iterator erase(iterator p);
61129
61130 iterator erase(iterator p, iterator q);
61131
61132 void clear();
61133
61134 void reserve( size_type new_capacity );
61135
61136 void reserve();
61137
61138 void resize( size_type new_size, value_type const & initial );
61139
61140 void resize( size_type new_size )
61141 {
61142 resize(new_size, value_type());
61143 }
61144
61145 bool empty() const
61146 {
61147 return size_ == 0;
61148 }
61149
61150 size_type size() const
61151 {
61152 return size_;
61153 }
61154
61155 size_type capacity() const
61156 {
61157 return capacity_;
61158 }
61159
61160 void swap(this_type & rhs);
61161
61162 private:
61163
61164 void deallocate(pointer data, size_type size);
61165
61166 pointer reserve_raw(size_type capacity);
61167
61168 Alloc alloc_;
61169 size_type size_, capacity_;
61170 pointer data_;
61171 };
61172
61173 template <class T, class Alloc>
61174 ArrayVector<T, Alloc>::ArrayVector()
61175 : alloc_(Alloc()),
61176 size_(0),
61177 capacity_(minimumCapacity),
61178 data_(reserve_raw(minimumCapacity))
61179 {}
61180
61181 template <class T, class Alloc>
61182 ArrayVector<T, Alloc>::ArrayVector(Alloc const & alloc)
61183 : alloc_(alloc),
61184 size_(0),
61185 capacity_(minimumCapacity),
61186 data_(reserve_raw(minimumCapacity))
61187 {}
61188
61189 template <class T, class Alloc>
61190 ArrayVector<T, Alloc>::ArrayVector( size_type size, Alloc const & alloc)
61191 : alloc_(alloc),
61192 size_(size),
61193 capacity_(size),
61194 data_(reserve_raw(size))
61195 {
61196 if(size_ > 0)
61197 std::uninitialized_fill(data_, data_+size_, value_type());
61198 }
61199
61200 template <class T, class Alloc>
61201 ArrayVector<T, Alloc>::ArrayVector( size_type size,
61202 value_type const & initial, Alloc const & alloc)
61203 : alloc_(alloc),
61204 size_(size),
61205 capacity_(size),
61206 data_(reserve_raw(size))
61207 {
61208 if(size_ > 0)
61209 std::uninitialized_fill(data_, data_+size_, initial);
61210 }
61211
61212 template <class T, class Alloc>
61213 ArrayVector<T, Alloc>::ArrayVector( this_type const & rhs )
61214 : alloc_(rhs.alloc_),
61215 size_(rhs.size_),
61216 capacity_(rhs.capacity_),
61217 data_(reserve_raw(rhs.capacity_))
61218 {
61219 if(size_ > 0)
61220 std::uninitialized_copy(rhs.data_, rhs.data_+size_, data_);
61221 }
61222
61223 template <class T, class Alloc>
61224 template <class InputIterator>
61225 ArrayVector<T, Alloc>::ArrayVector(InputIterator i, InputIterator end)
61226 : alloc_(),
61227 size_(std::distance(i, end)),
61228 capacity_(size_),
61229 data_(reserve_raw(size_))
61230 {
61231 std::uninitialized_copy(i, end, data_);
61232 }
61233
61234 template <class T, class Alloc>
61235 template <class InputIterator>
61236 ArrayVector<T, Alloc>::ArrayVector(InputIterator i, InputIterator end, Alloc const & alloc)
61237 : alloc_(alloc),
61238 size_(std::distance(i, end)),
61239 capacity_(size_),
61240 data_(reserve_raw(size_))
61241 {
61242 std::uninitialized_copy(i, end, data_);
61243 }
61244
61245
61246 template <class T, class Alloc>
61247 ArrayVector<T, Alloc> & ArrayVector<T, Alloc>::operator=( this_type const & rhs )
61248 {
61249 if(this == &rhs)
61250 return *this;
61251 ArrayVector new_vector(rhs);
61252 swap(new_vector);
61253 return *this;
61254 }
61255
61256 template <class T, class Alloc>
61257 ArrayVector<T, Alloc>::~ArrayVector()
61258 {
61259 deallocate(data_, size_);
61260 }
61261
61262 template <class T, class Alloc>
61263 void ArrayVector<T, Alloc>::pop_back()
61264 {
61265 --size_;
61266 alloc_.destroy(data_ + size_);
61267 }
61268
61269 template <class T, class Alloc>
61270 void ArrayVector<T, Alloc>::push_back( value_type const & t )
61271 {
61272 reserve();
61273 alloc_.construct(data_ + size_, t);
61274 ++size_;
61275 }
61276
61277 template <class T, class Alloc>
61278 void ArrayVector<T, Alloc>::clear()
61279 {
61280 detail::destroy_n(data_, size_);
61281 size_ = 0;
61282 }
61283
61284 template <class T, class Alloc>
61285 typename ArrayVector<T, Alloc>::iterator
61286 ArrayVector<T, Alloc>::insert(iterator p, value_type const & v)
61287 {
61288 difference_type pos = p - begin();
61289 if(p == end())
61290 {
61291 push_back(v);
61292 p = begin() + pos;
61293 }
61294 else
61295 {
61296 push_back(back());
61297 p = begin() + pos;
61298 std::copy_backward(p, end() - 2, end() - 1);
61299 *p = v;
61300 }
61301 return p;
61302 }
61303
61304 template <class T, class Alloc>
61305 typename ArrayVector<T, Alloc>::iterator
61306 ArrayVector<T, Alloc>::insert(iterator p, size_type n, value_type const & v)
61307 {
61308 difference_type pos = p - begin();
61309 size_type new_size = size() + n;
61310 if(new_size >= capacity_)
61311 {
61312 pointer new_data = reserve_raw(new_size);
61313 std::uninitialized_copy(begin(), p, new_data);
61314 std::uninitialized_fill(new_data + pos, new_data + pos + n, v);
61315 std::uninitialized_copy(p, end(), new_data + pos + n);
61316 deallocate(data_, size_);
61317 capacity_ = new_size;
61318 data_ = new_data;
61319 }
61320 else if(pos + n >= size_)
61321 {
61322 size_type diff = pos + n - size_;
61323 std::uninitialized_copy(p, end(), end() + diff);
61324 std::uninitialized_fill(end(), end() + diff, v);
61325 std::fill(p, end(), v);
61326 }
61327 else
61328 {
61329 size_type diff = size_ - (pos + n);
61330 std::uninitialized_copy(end() - n, end(), end());
61331 std::copy_backward(p, p + diff, end());
61332 std::fill(p, p + n, v);
61333 }
61334 size_ = new_size;
61335 return begin() + pos;
61336 }
61337
61338 template <class T, class Alloc>
61339 template <class InputIterator>
61340 typename ArrayVector<T, Alloc>::iterator
61341 ArrayVector<T, Alloc>::insert(iterator p, InputIterator i, InputIterator iend)
61342 {
61343 size_type n = iend - i;
61344 size_type pos = p - begin();
61345 size_type new_size = size() + n;
61346 if(new_size >= capacity_)
61347 {
61348 pointer new_data = reserve_raw(new_size);
61349 std::uninitialized_copy(begin(), p, new_data);
61350 std::uninitialized_copy(i, iend, new_data + pos);
61351 std::uninitialized_copy(p, end(), new_data + pos + n);
61352 deallocate(data_, size_);
61353 capacity_ = new_size;
61354 data_ = new_data;
61355 }
61356 else if(pos + n >= size_)
61357 {
61358 size_type diff = pos + n - size_;
61359 std::uninitialized_copy(p, end(), end() + diff);
61360 std::uninitialized_copy(iend - diff, iend, end());
61361 std::copy(i, iend - diff, p);
61362 }
61363 else
61364 {
61365 size_type diff = size_ - (pos + n);
61366 std::uninitialized_copy(end() - n, end(), end());
61367 std::copy_backward(p, p + diff, end());
61368 std::copy(i, iend, p);
61369 }
61370 size_ = new_size;
61371 return begin() + pos;
61372 }
61373
61374 template <class T, class Alloc>
61375 typename ArrayVector<T, Alloc>::iterator
61376 ArrayVector<T, Alloc>::erase(iterator p)
61377 {
61378 std::copy(p+1, end(), p);
61379 pop_back();
61380 return p;
61381 }
61382
61383 template <class T, class Alloc>
61384 typename ArrayVector<T, Alloc>::iterator
61385 ArrayVector<T, Alloc>::erase(iterator p, iterator q)
61386 {
61387 std::copy(q, end(), p);
61388 size_type eraseCount = q - p;
61389 detail::destroy_n(end() - eraseCount, eraseCount);
61390 size_ -= eraseCount;
61391 return p;
61392 }
61393
61394 template <class T, class Alloc>
61395 void ArrayVector<T, Alloc>::reserve( size_type new_capacity )
61396 {
61397 if(new_capacity <= capacity_)
61398 return;
61399 pointer new_data = reserve_raw(new_capacity);
61400 if(size_ > 0)
61401 std::uninitialized_copy(data_, data_+size_, new_data);
61402 deallocate(data_, size_);
61403 data_ = new_data;
61404 capacity_ = new_capacity;
61405 }
61406
61407 template <class T, class Alloc>
61408 void ArrayVector<T, Alloc>::reserve()
61409 {
61410 if(capacity_ == 0)
61411 reserve(minimumCapacity);
61412 else if(size_ == capacity_)
61413 reserve(2*capacity_);
61414 }
61415
61416 template <class T, class Alloc>
61417 void ArrayVector<T, Alloc>::resize( size_type new_size, value_type const & initial)
61418 {
61419 if(new_size < size_)
61420 erase(begin() + new_size, end());
61421 else if(size_ < new_size)
61422 {
61423 insert(end(), new_size - size(), initial);
61424 }
61425 }
61426
61427 template <class T, class Alloc>
61428 void ArrayVector<T, Alloc>::swap(this_type & rhs)
61429 {
61430 std::swap(size_, rhs.size_);
61431 std::swap(capacity_, rhs.capacity_);
61432 std::swap(data_, rhs.data_);
61433 }
61434
61435 template <class T, class Alloc>
61436 void ArrayVector<T, Alloc>::deallocate(pointer data, size_type size)
61437 {
61438
61439 if(data && (size > 0))
61440 {
61441 detail::destroy_n(data, size);
61442 alloc_.deallocate(data, size);
61443 }
61444 }
61445
61446 template <class T, class Alloc>
61447 typename ArrayVector<T, Alloc>::pointer
61448 ArrayVector<T, Alloc>::reserve_raw(size_type capacity)
61449 {
61450 pointer data = 0;
61451 if(capacity)
61452 {
61453 data = alloc_.allocate(capacity);
61454 }
61455 return data;
61456 }
61457
61458 }
61459 # 60 "../include/vigra/codec.hxx" 2
61460 # 74 "../include/vigra/codec.hxx"
61461 namespace vigra
61462 {
61463 template <class T>
61464 struct TypeAsString
61465 {
61466 static std::string result() { return "undefined"; }
61467 };
61468
61469 template <>
61470 struct TypeAsString<unsigned char>
61471 {
61472 static std::string result() { return "UINT8"; }
61473 };
61474
61475 template <>
61476 struct TypeAsString<short>
61477 {
61478 static std::string result() { return "INT16"; }
61479 };
61480
61481 template <>
61482 struct TypeAsString<unsigned short>
61483 {
61484 static std::string result() { return "UINT16"; }
61485 };
61486
61487 template <>
61488 struct TypeAsString<int>
61489 {
61490 static std::string result() { return "INT32"; }
61491 };
61492
61493 template <>
61494 struct TypeAsString<unsigned int>
61495 {
61496 static std::string result() { return "UINT32"; }
61497 };
61498
61499 template <>
61500 struct TypeAsString<long>
61501 {
61502 static std::string result() { return "INT32"; }
61503 };
61504
61505 template <>
61506 struct TypeAsString<float>
61507 {
61508 static std::string result() { return "FLOAT"; }
61509 };
61510
61511 template <>
61512 struct TypeAsString<double>
61513 {
61514 static std::string result() { return "DOUBLE"; }
61515 };
61516
61517
61518
61519 struct CodecDesc
61520 {
61521 std::string fileType;
61522 std::vector<std::string> pixelTypes;
61523 std::vector<std::string> compressionTypes;
61524 std::vector<std::vector<char> > magicStrings;
61525 std::vector<std::string> fileExtensions;
61526 std::vector<int> bandNumbers;
61527 };
61528
61529
61530
61531
61532 struct Decoder
61533 {
61534 virtual ~Decoder() {};
61535 virtual void init( const std::string & ) = 0;
61536 virtual void close() = 0;
61537 virtual void abort() = 0;
61538
61539 virtual std::string getFileType() const = 0;
61540 virtual std::string getPixelType() const = 0;
61541
61542 virtual unsigned int getWidth() const = 0;
61543 virtual unsigned int getHeight() const = 0;
61544 virtual unsigned int getNumBands() const = 0;
61545 virtual unsigned int getNumExtraBands() const
61546 {
61547 return 0;
61548 }
61549
61550 virtual vigra::Diff2D getPosition() const
61551 {
61552 return vigra::Diff2D();
61553 }
61554
61555 virtual unsigned int getOffset() const = 0;
61556
61557 virtual const void * currentScanlineOfBand( unsigned int ) const = 0;
61558 virtual void nextScanline() = 0;
61559
61560 typedef ArrayVector<unsigned char> ICCProfile;
61561
61562 const ICCProfile & getICCProfile() const
61563 {
61564 return iccProfile_;
61565 }
61566
61567 ICCProfile iccProfile_;
61568 };
61569
61570 struct Encoder
61571 {
61572 virtual ~Encoder() {};
61573 virtual void init( const std::string & ) = 0;
61574 virtual void close() = 0;
61575 virtual void abort() = 0;
61576
61577 virtual std::string getFileType() const = 0;
61578 virtual unsigned int getOffset() const = 0;
61579
61580 virtual void setWidth( unsigned int ) = 0;
61581 virtual void setHeight( unsigned int ) = 0;
61582 virtual void setNumBands( unsigned int ) = 0;
61583 virtual void setCompressionType( const std::string &, int = -1 ) = 0;
61584 virtual void setPixelType( const std::string & ) = 0;
61585 virtual void finalizeSettings() = 0;
61586
61587 virtual void setPosition( const vigra::Diff2D & pos )
61588 {
61589 }
61590 virtual void setXResolution( float xres )
61591 {
61592 }
61593 virtual void setYResolution( float yres )
61594 {
61595 }
61596
61597 typedef ArrayVector<unsigned char> ICCProfile;
61598
61599 virtual void setICCProfile(const ICCProfile & )
61600 {
61601 }
61602
61603 virtual void * currentScanlineOfBand( unsigned int ) = 0;
61604 virtual void nextScanline() = 0;
61605
61606 struct TIFFCompressionException {};
61607 };
61608
61609
61610
61611 struct CodecFactory
61612 {
61613 virtual CodecDesc getCodecDesc() const = 0;
61614 virtual std::auto_ptr<Decoder> getDecoder() const = 0;
61615 virtual std::auto_ptr<Encoder> getEncoder() const = 0;
61616 virtual ~CodecFactory() {};
61617 };
61618 # 239 "../include/vigra/codec.hxx"
61619 std::auto_ptr<Decoder>
61620 getDecoder( const std::string &, const std::string & = "undefined" );
61621
61622 std::auto_ptr<Encoder>
61623 getEncoder( const std::string &, const std::string & = "undefined" );
61624
61625
61626
61627 std::vector<std::string> queryCodecPixelTypes( const std::string & );
61628
61629 bool negotiatePixelType( std::string const & codecname,
61630 std::string const & srcPixeltype, std::string & destPixeltype);
61631
61632 bool isPixelTypeSupported( const std::string &, const std::string & );
61633
61634 bool isBandNumberSupported( const std::string &, int bands );
61635 }
61636 # 75 "../include/vigra/impex.hxx" 2
61637 # 1 "../include/vigra/imageinfo.hxx" 1
61638 # 59 "../include/vigra/imageinfo.hxx"
61639 namespace vigra
61640 {
61641 # 82 "../include/vigra/imageinfo.hxx"
61642 std::string impexListFormats();
61643 # 99 "../include/vigra/imageinfo.hxx"
61644 std::string impexListExtensions();
61645 # 116 "../include/vigra/imageinfo.hxx"
61646 bool isImage(char const * filename);
61647 # 131 "../include/vigra/imageinfo.hxx"
61648 class ImageExportInfo
61649 {
61650 public:
61651 # 144 "../include/vigra/imageinfo.hxx"
61652 ImageExportInfo( const char * );
61653 ~ImageExportInfo();
61654
61655 const char * getFileName() const;
61656 # 197 "../include/vigra/imageinfo.hxx"
61657 ImageExportInfo & setFileType( const char * );
61658 const char * getFileType() const;
61659 # 216 "../include/vigra/imageinfo.hxx"
61660 ImageExportInfo & setCompression( const char * );
61661 const char * getCompression() const;
61662 # 240 "../include/vigra/imageinfo.hxx"
61663 ImageExportInfo & setPixelType( const char * );
61664 # 251 "../include/vigra/imageinfo.hxx"
61665 const char * getPixelType() const;
61666
61667
61668
61669 ImageExportInfo & setXResolution( float );
61670 float getXResolution() const;
61671
61672
61673
61674 ImageExportInfo & setYResolution( float );
61675 float getYResolution() const;
61676 # 273 "../include/vigra/imageinfo.hxx"
61677 ImageExportInfo & setPosition(const Diff2D & pos);
61678
61679
61680
61681
61682 Diff2D getPosition() const;
61683
61684
61685
61686
61687
61688 typedef ArrayVector<unsigned char> ICCProfile;
61689
61690
61691
61692 const ICCProfile & getICCProfile() const;
61693
61694
61695
61696
61697
61698 ImageExportInfo & setICCProfile(const ICCProfile & profile);
61699
61700 private:
61701 std::string m_filename, m_filetype, m_pixeltype, m_comp;
61702 float m_x_res, m_y_res;
61703 Diff2D m_pos;
61704 ICCProfile m_icc_profile;
61705 };
61706
61707
61708 std::auto_ptr<Encoder> encoder( const ImageExportInfo & info );
61709 # 320 "../include/vigra/imageinfo.hxx"
61710 class ImageImportInfo
61711 {
61712 public:
61713 enum PixelType { UINT8, INT16, UINT16, INT32, UINT32, FLOAT, DOUBLE };
61714 # 348 "../include/vigra/imageinfo.hxx"
61715 ImageImportInfo( const char * );
61716 ~ImageImportInfo();
61717
61718 const char * getFileName() const;
61719
61720
61721
61722
61723
61724
61725
61726 const char * getFileType() const;
61727
61728
61729
61730 int width() const;
61731
61732
61733
61734 int height() const;
61735
61736
61737
61738 int numBands() const;
61739
61740
61741
61742
61743 int numExtraBands() const;
61744
61745
61746
61747 Size2D size() const;
61748
61749
61750
61751 bool isGrayscale() const;
61752
61753
61754
61755 bool isColor() const;
61756 # 403 "../include/vigra/imageinfo.hxx"
61757 const char * getPixelType() const;
61758
61759
61760 PixelType pixelType() const;
61761
61762
61763
61764
61765 bool isByte() const;
61766
61767
61768
61769 Diff2D getPosition() const;
61770
61771
61772
61773 float getXResolution() const;
61774
61775
61776
61777 float getYResolution() const;
61778
61779
61780
61781
61782
61783 typedef ArrayVector<unsigned char> ICCProfile;
61784
61785
61786
61787
61788
61789
61790 const ICCProfile & getICCProfile() const;
61791
61792 private:
61793 std::string m_filename, m_filetype, m_pixeltype;
61794 int m_width, m_height, m_num_bands, m_num_extra_bands;
61795 float m_x_res, m_y_res;
61796 Diff2D m_pos;
61797 ICCProfile m_icc_profile;
61798 };
61799
61800
61801 std::auto_ptr<Decoder> decoder( const ImageImportInfo & info );
61802
61803 }
61804 # 76 "../include/vigra/impex.hxx" 2
61805
61806
61807
61808
61809 namespace vigra
61810 {
61811 # 105 "../include/vigra/impex.hxx"
61812 template< class ImageIterator, class Accessor, class SrcValueType >
61813 void read_bands( Decoder * dec, ImageIterator ys, Accessor a, SrcValueType )
61814 {
61815 typedef unsigned int size_type;
61816 typedef typename ImageIterator::row_iterator DstRowIterator;
61817 typedef typename Accessor::value_type AccessorValueType;
61818 typedef typename AccessorValueType::value_type DstValueType;
61819
61820 const size_type width = dec->getWidth();
61821 const size_type height = dec->getHeight();
61822 const size_type num_bands = dec->getNumBands();
61823
61824 vigra::throw_precondition_error((num_bands == a.size(ys)), "importImage(): number of bands (color channels) in file and destination image differ.");
61825
61826
61827 SrcValueType const * scanline;
61828
61829 DstRowIterator xs = ys.rowIterator();
61830
61831
61832 if (num_bands == 4) {
61833
61834 unsigned int offset = dec->getOffset();
61835 SrcValueType const * scanline0;
61836 SrcValueType const * scanline1;
61837 SrcValueType const * scanline2;
61838 SrcValueType const * scanline3;
61839 for( size_type y = 0; y < height; ++y, ++ys.y ) {
61840 dec->nextScanline();
61841 xs = ys.rowIterator();
61842 scanline0 = static_cast< SrcValueType const * >
61843 (dec->currentScanlineOfBand(0));
61844 scanline1 = static_cast< SrcValueType const * >
61845 (dec->currentScanlineOfBand(1));
61846 scanline2 = static_cast< SrcValueType const * >
61847 (dec->currentScanlineOfBand(2));
61848 scanline3 = static_cast< SrcValueType const * >
61849 (dec->currentScanlineOfBand(3));
61850 for( size_type x = 0; x < width; ++x, ++xs ) {
61851
61852
61853
61854
61855
61856
61857 a.setComponent( *scanline0, xs, 0);
61858 a.setComponent( *scanline1, xs, 1);
61859 a.setComponent( *scanline2, xs, 2);
61860 a.setComponent( *scanline3, xs, 3);
61861 scanline0 += offset;
61862 scanline1 += offset;
61863 scanline2 += offset;
61864 scanline3 += offset;
61865 }
61866 }
61867 }
61868 else {
61869
61870 for( size_type y = 0; y < height; ++y, ++ys.y ) {
61871 dec->nextScanline();
61872 for( size_type b = 0; b < num_bands; ++b ) {
61873 xs = ys.rowIterator();
61874 scanline = static_cast< SrcValueType const * >
61875 (dec->currentScanlineOfBand(b));
61876 for( size_type x = 0; x < width; ++x, ++xs ) {
61877 a.setComponent( *scanline, xs, b );
61878 scanline += dec->getOffset();
61879 }
61880 }
61881 }
61882 }
61883 }
61884 # 197 "../include/vigra/impex.hxx"
61885 template< class ImageIterator, class Accessor, class SrcValueType >
61886 void read_band( Decoder * dec, ImageIterator ys, Accessor a, SrcValueType )
61887 {
61888 typedef unsigned int size_type;
61889 typedef typename ImageIterator::row_iterator DstRowIterator;
61890 typedef typename Accessor::value_type DstValueType;
61891 const size_type width = dec->getWidth();
61892 const size_type height = dec->getHeight();
61893
61894 SrcValueType const * scanline;
61895
61896 DstRowIterator xs = ys.rowIterator();
61897
61898 for( size_type y = 0; y < height; ++y, ++ys.y ) {
61899 dec->nextScanline();
61900 xs = ys.rowIterator();
61901 scanline = static_cast< SrcValueType const * >(dec->currentScanlineOfBand(0));
61902 for( size_type x = 0; x < width; ++x, ++xs )
61903 a.set( scanline[x], xs );
61904 }
61905 }
61906 # 240 "../include/vigra/impex.hxx"
61907 template< class ImageIterator, class Accessor >
61908 void importVectorImage( const ImageImportInfo & info, ImageIterator iter, Accessor a )
61909 {
61910 std::auto_ptr<Decoder> dec = decoder(info);
61911 std::string pixeltype = dec->getPixelType();
61912
61913 if ( pixeltype == "UINT8" )
61914 read_bands( dec.get(), iter, a, (UInt8)0 );
61915 else if ( pixeltype == "INT16" )
61916 read_bands( dec.get(), iter, a, Int16() );
61917 else if ( pixeltype == "UINT16" )
61918 read_bands( dec.get(), iter, a, (UInt16)0 );
61919 else if ( pixeltype == "INT32" )
61920 read_bands( dec.get(), iter, a, Int32() );
61921 else if ( pixeltype == "UINT32" )
61922 read_bands( dec.get(), iter, a, (UInt32)0 );
61923 else if ( pixeltype == "FLOAT" )
61924 read_bands( dec.get(), iter, a, float() );
61925 else if ( pixeltype == "DOUBLE" )
61926 read_bands( dec.get(), iter, a, double() );
61927 else
61928 vigra::throw_precondition_error((false), "invalid pixeltype");
61929
61930
61931 dec->close();
61932 }
61933 # 288 "../include/vigra/impex.hxx"
61934 template < class ImageIterator, class Accessor >
61935 void importScalarImage( const ImageImportInfo & info, ImageIterator iter, Accessor a )
61936 {
61937 std::auto_ptr<Decoder> dec = decoder(info);
61938 std::string pixeltype = dec->getPixelType();
61939
61940 if ( pixeltype == "UINT8" )
61941 read_band( dec.get(), iter, a, (UInt8)0 );
61942 else if ( pixeltype == "INT16" )
61943 read_band( dec.get(), iter, a, Int16() );
61944 else if ( pixeltype == "UINT16" )
61945 read_band( dec.get(), iter, a, (UInt16)0 );
61946 else if ( pixeltype == "INT32" )
61947 read_band( dec.get(), iter, a, Int32() );
61948 else if ( pixeltype == "UINT32" )
61949 read_band( dec.get(), iter, a, (UInt32)0 );
61950 else if ( pixeltype == "FLOAT" )
61951 read_band( dec.get(), iter, a, float() );
61952 else if ( pixeltype == "DOUBLE" )
61953 read_band( dec.get(), iter, a, double() );
61954 else
61955 vigra::throw_precondition_error((false), "invalid pixeltype");
61956
61957
61958 dec->close();
61959 }
61960
61961 template < class ImageIterator, class Accessor >
61962 void importImage( const ImageImportInfo & info, ImageIterator iter, Accessor a, VigraFalseType )
61963 {
61964 importVectorImage( info, iter, a );
61965 }
61966
61967 template < class ImageIterator, class Accessor >
61968 void importImage( const ImageImportInfo & info, ImageIterator iter, Accessor a, VigraTrueType )
61969 {
61970 importScalarImage( info, iter, a );
61971 }
61972 # 405 "../include/vigra/impex.hxx"
61973 template < class ImageIterator, class Accessor >
61974 void importImage( const ImageImportInfo & info, ImageIterator iter, Accessor a )
61975 {
61976 typedef typename NumericTraits<typename Accessor::value_type>::isScalar is_scalar;
61977 importImage( info, iter, a, is_scalar() );
61978 }
61979
61980 template < class ImageIterator, class Accessor >
61981 void importImage( const ImageImportInfo & info, pair< ImageIterator, Accessor > dest )
61982 {
61983 importImage( info, dest.first, dest.second );
61984 }
61985 # 438 "../include/vigra/impex.hxx"
61986 template< class ImageIterator, class Accessor, class DstValueType >
61987 void write_bands( Encoder * enc, ImageIterator ul, ImageIterator lr, Accessor a, DstValueType)
61988 {
61989 typedef unsigned int size_type;
61990 typedef typename ImageIterator::row_iterator SrcRowIterator;
61991 typedef typename Accessor::value_type AccessorValueType;
61992 typedef typename AccessorValueType::value_type SrcValueType;
61993
61994
61995 const size_type width = lr.x - ul.x;
61996 const size_type height = lr.y - ul.y;
61997 enc->setWidth(width);
61998 enc->setHeight(height);
61999 const size_type num_bands = a.size(ul);
62000 enc->setNumBands(num_bands);
62001 enc->finalizeSettings();
62002
62003 DstValueType * scanline;
62004
62005
62006 ImageIterator ys(ul);
62007
62008 SrcRowIterator xs = ys.rowIterator();
62009
62010 if (num_bands == 4) {
62011
62012 unsigned int offset = enc->getOffset();
62013 DstValueType * scanline0;
62014 DstValueType * scanline1;
62015 DstValueType * scanline2;
62016 DstValueType * scanline3;
62017 for( size_type y = 0; y < height; ++y, ++ys.y ) {
62018 xs = ys.rowIterator();
62019 scanline0 = static_cast< DstValueType * >
62020 (enc->currentScanlineOfBand(0));
62021 scanline1 = static_cast< DstValueType * >
62022 (enc->currentScanlineOfBand(1));
62023 scanline2 = static_cast< DstValueType * >
62024 (enc->currentScanlineOfBand(2));
62025 scanline3 = static_cast< DstValueType * >
62026 (enc->currentScanlineOfBand(3));
62027 for( size_type x = 0; x < width; ++x, ++xs) {
62028
62029
62030
62031
62032
62033
62034 *scanline0 = detail::RequiresExplicitCast<DstValueType>::cast(a.getComponent( xs, 0));
62035 *scanline1 = detail::RequiresExplicitCast<DstValueType>::cast(a.getComponent( xs, 1));
62036 *scanline2 = detail::RequiresExplicitCast<DstValueType>::cast(a.getComponent( xs, 2));
62037 *scanline3 = detail::RequiresExplicitCast<DstValueType>::cast(a.getComponent( xs, 3));
62038 scanline0 += offset;
62039 scanline1 += offset;
62040 scanline2 += offset;
62041 scanline3 += offset;
62042 }
62043 enc->nextScanline();
62044 }
62045 }
62046 else {
62047
62048 for( size_type y = 0; y < height; ++y, ++ys.y ) {
62049 for( size_type b = 0; b < num_bands; ++b ) {
62050 xs = ys.rowIterator();
62051 scanline = static_cast< DstValueType * >
62052 (enc->currentScanlineOfBand(b));
62053 for( size_type x = 0; x < width; ++x, ++xs ) {
62054 *scanline = detail::RequiresExplicitCast<DstValueType>::cast(a.getComponent( xs, b ));
62055 scanline += enc->getOffset();
62056 }
62057 }
62058 enc->nextScanline();
62059 }
62060 }
62061 }
62062
62063 template< class MArray, class DstValueType >
62064 void write_bands( Encoder * enc, MArray const & array, DstValueType)
62065 {
62066 typedef unsigned int size_type;
62067
62068
62069 const size_type width = array.shape(0);
62070 const size_type height = array.shape(1);
62071 enc->setWidth(width);
62072 enc->setHeight(height);
62073 const size_type num_bands = array.shape(2);
62074 enc->setNumBands(num_bands);
62075 enc->finalizeSettings();
62076
62077 DstValueType * scanline;
62078
62079
62080 for( size_type y = 0; y < height; ++y ) {
62081 for( size_type b = 0; b < num_bands; ++b ) {
62082 scanline = static_cast< DstValueType * >
62083 (enc->currentScanlineOfBand(b));
62084 for( size_type x = 0; x < width; ++x) {
62085 *scanline = array(x, y, b);
62086 scanline += enc->getOffset();
62087 }
62088 }
62089 enc->nextScanline();
62090 }
62091 }
62092 # 565 "../include/vigra/impex.hxx"
62093 template< class ImageIterator, class Accessor, class DstValueType >
62094 void write_band( Encoder * enc, ImageIterator ul, ImageIterator lr, Accessor a, DstValueType)
62095 {
62096 typedef unsigned int size_type;
62097 typedef typename ImageIterator::row_iterator SrcRowIterator;
62098 typedef typename Accessor::value_type SrcValueType;
62099
62100
62101 const size_type width = lr.x - ul.x;
62102 const size_type height = lr.y - ul.y;
62103 enc->setWidth(width);
62104 enc->setHeight(height);
62105 enc->setNumBands(1);
62106 enc->finalizeSettings();
62107
62108 DstValueType * scanline;
62109
62110
62111 ImageIterator ys(ul);
62112
62113 SrcRowIterator xs = ys.rowIterator();
62114 size_type y;
62115 for( y = 0; y < height; ++y, ++ys.y ) {
62116 xs = ys.rowIterator();
62117 scanline = static_cast< DstValueType * >(enc->currentScanlineOfBand(0));
62118 for( size_type x = 0; x < width; ++x, ++xs, ++scanline )
62119 *scanline = detail::RequiresExplicitCast<DstValueType>::cast(a(xs));
62120 enc->nextScanline();
62121 }
62122 }
62123
62124 namespace detail {
62125
62126 template < class SrcIterator, class SrcAccessor,
62127 class DestIterator, class DestAccessor >
62128 void mapScalarImageToLowerPixelType( SrcIterator sul, SrcIterator slr, SrcAccessor sget,
62129 DestIterator dul, DestAccessor dget )
62130 {
62131 typedef typename SrcAccessor::value_type SrcValue;
62132 typedef typename DestAccessor::value_type DestValue;
62133 typedef typename NumericTraits<SrcValue>::RealPromote PromoteValue;
62134
62135 FindMinMax<SrcValue> minmax;
62136 inspectImage( sul, slr, sget, minmax );
62137 double scale = (double)NumericTraits<DestValue>::max() / (minmax.max - minmax.min) -
62138 (double)NumericTraits<DestValue>::min() / (minmax.max - minmax.min);
62139 double offset = (NumericTraits<DestValue>::min() / scale) - minmax.min ;
62140 transformImage( sul, slr, sget, dul, dget,
62141 linearIntensityTransform( scale, offset ) );
62142 }
62143
62144
62145 template < class SrcIterator, class SrcAccessor, class T >
62146 void exportScalarImage(SrcIterator sul, SrcIterator slr, SrcAccessor sget,
62147 Encoder * enc, bool downcast, T zero)
62148 {
62149 if (!downcast) {
62150 write_band( enc, sul, slr, sget, zero );
62151 } else {
62152
62153 BasicImage<T> image(slr-sul);
62154 mapScalarImageToLowerPixelType(sul, slr, sget, image.upperLeft(), image.accessor());
62155 write_band( enc, image.upperLeft(),
62156 image.lowerRight(), image.accessor(), zero );
62157 }
62158 }
62159
62160 template < class SrcIterator, class SrcAccessor,
62161 class MArray>
62162 void mapVectorImageToLowerPixelType( SrcIterator sul, SrcIterator slr, SrcAccessor sget,
62163 MArray & array )
62164 {
62165 typedef typename SrcAccessor::value_type SrcValue;
62166 typedef typename SrcValue::value_type SrcComponent;
62167 typedef typename MArray::value_type DestValue;
62168
62169 FindMinMax<SrcComponent> minmax;
62170 for(unsigned int i=0; i<sget.size(sul); ++i)
62171 {
62172
62173
62174
62175
62176 VectorComponentValueAccessor<typename SrcAccessor::value_type> band(i);
62177 inspectImage( sul, slr, band, minmax );
62178 }
62179 double scale = (double)NumericTraits<DestValue>::max() / (minmax.max - minmax.min) -
62180 (double)NumericTraits<DestValue>::min() / (minmax.max - minmax.min);
62181
62182
62183 double offset = (NumericTraits<DestValue>::min() / scale) - minmax.min ;
62184 for(unsigned int i=0; i<sget.size(sul); ++i)
62185 {
62186 BasicImageView<DestValue> subImage = makeBasicImageView(array.bindOuter(i));
62187
62188
62189 VectorComponentValueAccessor<typename SrcAccessor::value_type> band(i);
62190 transformImage( sul, slr, band, subImage.upperLeft(), subImage.accessor(),
62191 linearIntensityTransform( scale, offset ) );
62192 }
62193 }
62194
62195
62196 template < class SrcIterator, class SrcAccessor, class T >
62197 void exportVectorImage(SrcIterator sul, SrcIterator slr, SrcAccessor sget,
62198 Encoder * enc, bool downcast, T zero)
62199 {
62200 int bands = sget.size(sul);
62201 vigra::throw_precondition_error((isBandNumberSupported(enc->getFileType(), bands)), "exportImage(): file format does not support requested number of bands (color channels)");
62202
62203 if ( !downcast )
62204 {
62205 write_bands( enc, sul, slr, sget, zero );
62206 }
62207 else
62208 {
62209
62210 int w = slr.x - sul.x;
62211 int h = slr.y - sul.y;
62212
62213 typedef vigra::MultiArray<3, T> MArray;
62214 MArray array(typename MArray::difference_type(w, h, bands));
62215
62216 mapVectorImageToLowerPixelType(sul, slr, sget, array);
62217
62218 write_bands( enc, array, zero );
62219 }
62220 }
62221 }
62222 # 711 "../include/vigra/impex.hxx"
62223 template < class SrcIterator, class SrcAccessor >
62224 void exportFloatingVectorImage( SrcIterator sul, SrcIterator slr, SrcAccessor sget,
62225 const ImageExportInfo & info )
62226 {
62227 exportImage(sul, slr, sget, info);
62228 }
62229 # 733 "../include/vigra/impex.hxx"
62230 template < class SrcIterator, class SrcAccessor >
62231 void exportIntegralVectorImage( SrcIterator sul, SrcIterator slr, SrcAccessor sget,
62232 const ImageExportInfo & info )
62233 {
62234 exportImage(sul, slr, sget, info);
62235 }
62236 # 755 "../include/vigra/impex.hxx"
62237 template < class SrcIterator, class SrcAccessor >
62238 void exportFloatingScalarImage( SrcIterator sul, SrcIterator slr, SrcAccessor sget,
62239 const ImageExportInfo & info )
62240 {
62241 exportImage(sul, slr, sget, info);
62242 }
62243 # 777 "../include/vigra/impex.hxx"
62244 template < class SrcIterator, class SrcAccessor >
62245 void exportIntegralScalarImage( SrcIterator sul, SrcIterator slr, SrcAccessor sget,
62246 const ImageExportInfo & info )
62247 {
62248 exportImage(sul, slr, sget, info);
62249 }
62250
62251 template < class SrcIterator, class SrcAccessor >
62252 void exportImage( SrcIterator sul, SrcIterator slr, SrcAccessor sget,
62253 const ImageExportInfo & info, VigraFalseType )
62254 {
62255 typedef typename SrcAccessor::value_type AccessorValueType;
62256 typedef typename AccessorValueType::value_type SrcValueType;
62257 std::string pixeltype = info.getPixelType();
62258 std::auto_ptr<Encoder> enc = encoder(info);
62259 bool downcast = negotiatePixelType(enc->getFileType(),
62260 TypeAsString<SrcValueType>::result(), pixeltype);
62261 enc->setPixelType(pixeltype);
62262 if(pixeltype == "UINT8")
62263 detail::exportVectorImage( sul, slr, sget, enc.get(), downcast, (UInt8)0);
62264 else if(pixeltype == "INT16")
62265 detail::exportVectorImage( sul, slr, sget, enc.get(), downcast, Int16());
62266 else if(pixeltype == "UINT16")
62267 detail::exportVectorImage( sul, slr, sget, enc.get(), downcast, (UInt16)0);
62268 else if(pixeltype == "INT32")
62269 detail::exportVectorImage( sul, slr, sget, enc.get(), downcast, Int32());
62270 else if(pixeltype == "UINT32")
62271 detail::exportVectorImage( sul, slr, sget, enc.get(), downcast, (UInt32)0);
62272 else if(pixeltype == "FLOAT")
62273 detail::exportVectorImage( sul, slr, sget, enc.get(), downcast, float());
62274 else if(pixeltype == "DOUBLE")
62275 detail::exportVectorImage( sul, slr, sget, enc.get(), downcast, double());
62276 enc->close();
62277 }
62278
62279 template < class SrcIterator, class SrcAccessor >
62280 void exportImage( SrcIterator sul, SrcIterator slr, SrcAccessor sget,
62281 const ImageExportInfo & info, VigraTrueType )
62282 {
62283 typedef typename SrcAccessor::value_type SrcValueType;
62284 std::string pixeltype = info.getPixelType();
62285 std::auto_ptr<Encoder> enc = encoder(info);
62286 bool downcast = negotiatePixelType(enc->getFileType(),
62287 TypeAsString<SrcValueType>::result(), pixeltype);
62288 enc->setPixelType(pixeltype);
62289 if(pixeltype == "UINT8")
62290 detail::exportScalarImage( sul, slr, sget, enc.get(), downcast, (UInt8)0);
62291 else if(pixeltype == "INT16")
62292 detail::exportScalarImage( sul, slr, sget, enc.get(), downcast, Int16());
62293 else if(pixeltype == "UINT16")
62294 detail::exportScalarImage( sul, slr, sget, enc.get(), downcast, (UInt16)0);
62295 else if(pixeltype == "INT32")
62296 detail::exportScalarImage( sul, slr, sget, enc.get(), downcast, Int32());
62297 else if(pixeltype == "UINT32")
62298 detail::exportScalarImage( sul, slr, sget, enc.get(), downcast, (UInt32)0);
62299 else if(pixeltype == "FLOAT")
62300 detail::exportScalarImage( sul, slr, sget, enc.get(), downcast, float());
62301 else if(pixeltype == "DOUBLE")
62302 detail::exportScalarImage( sul, slr, sget, enc.get(), downcast, double());
62303 enc->close();
62304 }
62305 # 927 "../include/vigra/impex.hxx"
62306 template < class SrcIterator, class SrcAccessor >
62307 inline
62308 void exportImage( SrcIterator sul, SrcIterator slr, SrcAccessor sget,
62309 const ImageExportInfo & info )
62310 {
62311 typedef typename NumericTraits<typename SrcAccessor::value_type>::isScalar is_scalar;
62312
62313 try
62314 {
62315 exportImage( sul, slr, sget, info, is_scalar() );
62316 }
62317 catch(Encoder::TIFFCompressionException &)
62318 {
62319 const_cast<ImageExportInfo &>(info).setCompression("");
62320 exportImage( sul, slr, sget, info, is_scalar() );
62321 }
62322 }
62323
62324 template < class SrcIterator, class SrcAccessor >
62325 inline
62326 void exportImage( triple<SrcIterator, SrcIterator, SrcAccessor> src,
62327 const ImageExportInfo & info )
62328 {
62329 exportImage( src.first, src.second, src.third, info );
62330 }
62331
62332
62333
62334 }
62335 # 40 "assemble.h" 2
62336 # 1 "../include/vigra/inspectimage.hxx" 1
62337 # 41 "assemble.h" 2
62338
62339 # 1 "../include/vigra/transformimage.hxx" 1
62340 # 43 "assemble.h" 2
62341 # 1 "../include/vigra_ext/FunctorAccessor.h" 1
62342 # 27 "../include/vigra_ext/FunctorAccessor.h"
62343 # 1 "../include/vigra/numerictraits.hxx" 1
62344 # 28 "../include/vigra_ext/FunctorAccessor.h" 2
62345
62346 namespace vigra_ext {
62347 # 40 "../include/vigra_ext/FunctorAccessor.h"
62348 template <class Functor, class Accessor>
62349 class ReadFunctorAccessor
62350 {
62351 public:
62352 typedef typename Functor::result_type value_type;
62353 ReadFunctorAccessor(Functor f, Accessor a)
62354 : m_f(f), m_a(a)
62355 {
62356 }
62357 # 57 "../include/vigra_ext/FunctorAccessor.h"
62358 template <typename ITERATOR_, typename DIFFERENCE_>
62359 typename Functor::result_type operator()(ITERATOR_ const & i, DIFFERENCE_ d) const
62360 {
62361 return m_f(m_a(i,d));
62362 }
62363
62364
62365
62366 template <class ITERATOR>
62367 typename Functor::result_type operator()(ITERATOR const & i) const {
62368 return m_f(m_a(i)); }
62369
62370
62371 protected:
62372 Functor m_f;
62373 Accessor m_a;
62374 };
62375 # 83 "../include/vigra_ext/FunctorAccessor.h"
62376 template <class Functor, class Accessor>
62377 class WriteFunctorAccessor
62378 {
62379 public:
62380 typedef typename Functor::result_type value_type;
62381
62382 WriteFunctorAccessor(Functor f, Accessor a)
62383 : m_f(f), m_a(a)
62384 {
62385 }
62386
62387
62388
62389 template <class Value, class ITERATOR>
62390 void set(Value const & v, ITERATOR const & i) const
62391 {
62392 m_a.set(m_f(vigra::detail::RequiresExplicitCast<typename Functor::argument_type>::cast(v)), i);
62393 }
62394
62395
62396
62397 template <class Value, class ITERATOR_, class DIFFERENCE_>
62398 void set(Value const & v, ITERATOR_ const & i, DIFFERENCE_ d) const
62399 {
62400 m_a.set(m_f(vigra::detail::RequiresExplicitCast<typename Functor::argument_type>::cast(v)),i,d);
62401 }
62402
62403 Functor m_f;
62404 Accessor m_a;
62405 };
62406 # 142 "../include/vigra_ext/FunctorAccessor.h"
62407 template <class Iter1, class Acc1, class Iter2, class Acc2>
62408 class SplitVector2Accessor
62409 {
62410 public:
62411
62412
62413 typedef vigra::TinyVector<typename Acc1::value_type, 2> value_type;
62414 typedef typename value_type::value_type component_type;
62415
62416
62417
62418 SplitVector2Accessor(Iter1 i1, Acc1 a1, Iter2 i2, Acc2 a2)
62419 : i1_(i1), a1_(a1), i2_(i2), a2_(a2)
62420 {}
62421
62422
62423 template <class V, class ITERATOR>
62424 void setComponent( V const & value, ITERATOR const & i, int idx ) const
62425 {
62426 switch (idx) {
62427 case 0:
62428 a1_.set(value, i1_, *i);
62429 break;
62430 case 1:
62431 a2_.set(value, i2_, *i);
62432 break;
62433 default:
62434 throw std::runtime_error("too many components in input value");
62435 }
62436 }
62437
62438
62439 template <class ITERATOR>
62440 unsigned int size(ITERATOR const & i) const
62441 {
62442 return 2;
62443 }
62444
62445 Iter1 i1_;
62446 Acc1 a1_;
62447 Iter2 i2_;
62448 Acc2 a2_;
62449 };
62450 # 196 "../include/vigra_ext/FunctorAccessor.h"
62451 template <class Iter1, class Acc1, class Iter2, class Acc2, int SIZE>
62452 class SplitVectorNAccessor
62453 {
62454 public:
62455
62456
62457 typedef vigra::TinyVector<typename Acc1::value_type, SIZE> value_type;
62458 typedef typename value_type::value_type component_type;
62459
62460
62461
62462 SplitVectorNAccessor(Iter1 i1, Acc1 a1, Iter2 i2, Acc2 a2)
62463 : i1_(i1), a1_(a1), i2_(i2), a2_(a2)
62464 {}
62465
62466
62467 template <class V, class ITERATOR>
62468 void setComponent( V const & value, ITERATOR const & i, int idx ) const
62469 {
62470 if ( idx < SIZE - 1 ) {
62471 a1_.setComponent(value, i1_, *i, idx);
62472 } else if ( idx == SIZE - 1 ) {
62473 a2_.set(value, i2_, *i);
62474 } else {
62475 throw std::runtime_error("too many components in input value");
62476 }
62477 }
62478
62479
62480 template <class ITERATOR>
62481 unsigned int size(ITERATOR const & i) const
62482 {
62483 return SIZE;
62484 }
62485
62486 Iter1 i1_;
62487 Acc1 a1_;
62488 Iter2 i2_;
62489 Acc2 a2_;
62490 };
62491
62492
62493
62494
62495
62496
62497 template <class Iter1, class Acc1, class Iter2, class Acc2>
62498 class MergeScalarScalar2VectorAccessor
62499 {
62500 public:
62501
62502
62503 typedef vigra::TinyVector<typename Acc1::value_type, 2> value_type;
62504 typedef typename value_type::value_type component_type;
62505
62506
62507
62508 MergeScalarScalar2VectorAccessor(Iter1 i1, Acc1 a1, Iter2 i2, Acc2 a2)
62509 : i1_(i1), a1_(a1), i2_(i2), a2_(a2)
62510 {}
62511
62512
62513
62514 template <class DIFFERENCE_>
62515 value_type operator()(DIFFERENCE_ const & d) const
62516 {
62517 return value_type(a1_(i1_, d), a2_(i2_, d));
62518 }
62519
62520
62521 template <class ITERATOR>
62522 component_type getComponent(ITERATOR const & i, int idx) const
62523 {
62524 switch (idx) {
62525 case 0:
62526 return a1_( i1_, *i );
62527 case 1:
62528 return a2_( i2_, *i );
62529 default:
62530 throw std::runtime_error("too many components in input value");
62531
62532 exit(1);
62533 }
62534 }
62535
62536
62537 template <class ITERATOR, class DIFFERENCE_>
62538 component_type const & getComponent(ITERATOR const & i, DIFFERENCE_ const & d, int idx) const
62539 {
62540 i += d;
62541 switch (idx) {
62542 case 0:
62543 return a1_.getComponent(i1_, *i, idx);
62544 case 1:
62545 return a2_.getComponent(i2_, *i, idx);
62546 default:
62547 throw std::runtime_error("too many components in input value");
62548 }
62549 }
62550
62551
62552 template <class ITERATOR>
62553 unsigned int size(ITERATOR const & i) const
62554 {
62555 return 2;
62556 }
62557
62558 Iter1 i1_;
62559 Acc1 a1_;
62560 Iter2 i2_;
62561 Acc2 a2_;
62562 };
62563 # 318 "../include/vigra_ext/FunctorAccessor.h"
62564 template <class Iter1, class Acc1, class Iter2, class Acc2, int SIZE>
62565 class MergeVectorScalar2VectorAccessor
62566 {
62567 public:
62568
62569
62570 typedef typename Acc1::value_type image1_type;
62571 typedef typename Acc2::value_type image2_type;
62572
62573 typedef typename image1_type::value_type component_type;
62574
62575 typedef vigra::TinyVector<component_type, SIZE> value_type;
62576
62577
62578
62579 MergeVectorScalar2VectorAccessor(Iter1 i1, Acc1 a1, Iter2 i2, Acc2 a2)
62580 : i1_(i1), a1_(a1), i2_(i2), a2_(a2)
62581 {}
62582
62583
62584
62585 template <class DIFFERENCE_>
62586 value_type operator()(DIFFERENCE_ const & d) const
62587 {
62588 value_type ret;
62589 typename value_type::iterator it = ret.begin();
62590 const image1_type & i1 = a1_(i1_, d);
62591 for ( typename image1_type::const_iterator it1 = i1.begin();
62592 it1 != i1.end(); ++it1 )
62593 {
62594 *it = *it1;
62595 it++;
62596 }
62597 *it = a2_(i2_, d);
62598 return ret;
62599 }
62600
62601
62602 template <class ITERATOR>
62603 component_type getComponent(ITERATOR const & i, int idx) const
62604 {
62605 if ( idx < SIZE - 1 ) {
62606 return a1_.getComponent(i1_, *i, idx);
62607 } else if ( idx == SIZE - 1 ) {
62608 return a2_(i2_, *i);
62609 } else {
62610 throw std::runtime_error("too many components in input value");
62611
62612
62613
62614 throw 0;
62615 }
62616 }
62617
62618
62619 template <class ITERATOR, class DIFFERENCE_>
62620 component_type const getComponent(ITERATOR i, DIFFERENCE_ const & d, int idx) const
62621 {
62622 i += d;
62623 if ( idx < SIZE - 1 ) {
62624 return a1_.getComponent(i1_, *i, idx);
62625 } else if ( idx == SIZE - 1 ) {
62626 return a2_(i2_, *i);
62627 } else {
62628 throw std::runtime_error("too many components in input value");
62629
62630
62631
62632 throw 0;
62633 }
62634 }
62635
62636
62637
62638 template <class ITERATOR>
62639 unsigned int size(ITERATOR const & i) const
62640 {
62641 return SIZE;
62642 }
62643
62644 Iter1 i1_;
62645 Acc1 a1_;
62646 Iter2 i2_;
62647 Acc2 a2_;
62648 };
62649 # 437 "../include/vigra_ext/FunctorAccessor.h"
62650 template <class Iter1, class Acc1, class Iter2, class Acc2, int SIZE>
62651 class ImageSplittingAccessor
62652 {
62653 public:
62654
62655 typedef typename Acc1::value_type image_type1;
62656
62657
62658 typedef typename Acc2::value_type image_type2;
62659
62660
62661
62662
62663
62664
62665 ImageSplittingAccessor(Iter1 i1, Acc1 a1, Iter2 i2, Acc2 a2)
62666 : i1_(i1), a1_(a1), i2_(i2), a2_(a2)
62667 {}
62668
62669
62670
62671
62672
62673
62674
62675 template <class V, class ITERATOR>
62676 void setComponent(V const & value, ITERATOR const & i, int idx) const
62677 {
62678 setComponentIsScalar(value, i, idx,
62679 vigra::NumericTraits<image_type1>::isScalar() );
62680 }
62681 # 525 "../include/vigra_ext/FunctorAccessor.h"
62682 protected:
62683
62684 template <class V, class ITERATOR>
62685 void setComponentIsScalar(V const & value, ITERATOR const & i, int idx,
62686 vigra::VigraTrueType) const
62687 {
62688 setComponentScalarIsScalar(value, i, idx,
62689 vigra::NumericTraits<image_type2>::isScalar() );
62690 }
62691
62692
62693 template <class V, class ITERATOR>
62694 void setComponentIsScalar(V const & value, ITERATOR const & i, int idx,
62695 vigra::VigraFalseType) const
62696 {
62697 setComponentVectorIsScalar(value, i, idx,
62698 vigra::NumericTraits<image_type2>::isScalar() );
62699 }
62700
62701
62702 template <class V, class ITERATOR>
62703 void setComponentScalarIsScalar(V const & value, ITERATOR const & i, int idx,
62704 vigra::VigraTrueType) const
62705 {
62706 switch (idx) {
62707 case 0:
62708 a1_.set(value, i);
62709 break;
62710 case 1:
62711 a2_.set(value, i2_, i - i1_);
62712 break;
62713 default:
62714 throw std::runtime_error("too many components in input value");
62715 }
62716 }
62717
62718
62719 template <class V, class ITERATOR>
62720 void setComponentScalarIsVector(V const & value, ITERATOR const & i, int idx,
62721 vigra::VigraTrueType) const
62722 {
62723 throw std::runtime_error("vector -> scalar, vector accessor not implemented");
62724 }
62725
62726
62727 template <class V, class ITERATOR>
62728 void setComponentVectorIsScalar(V const & value, ITERATOR const & i, int idx,
62729 vigra::VigraTrueType) const
62730 {
62731 image_type1 & v1 = a1_(i);
62732 typename image_type1::size_type s1 = v1.size();
62733 if (idx < s1) {
62734 a1_.setComponent(value, i, idx);
62735 } else if ( idx == s1) {
62736 a2_.set(value, i2_, i - i1_);
62737 } else {
62738 throw std::runtime_error("too many components in input value");
62739 }
62740 }
62741
62742
62743 template <class V, class ITERATOR>
62744 void setComponentVectorIsVector(V const & value, ITERATOR const & i, int idx,
62745 vigra::VigraTrueType) const
62746 {
62747 throw std::runtime_error("vector -> vector, vector accessor not implemented");
62748 }
62749
62750 Iter1 i1_;
62751 Acc1 a1_;
62752 Iter2 i2_;
62753 Acc2 a2_;
62754 };
62755
62756
62757 template <class T>
62758 struct Multiply
62759 {
62760 typedef T result_type;
62761
62762 Multiply(T factor)
62763 : m_factor(factor)
62764 {}
62765
62766 template <class PixelType>
62767 PixelType operator()(PixelType const& v) const
62768 {
62769 return vigra::NumericTraits<result_type>::fromRealPromote(v * m_factor);
62770 }
62771
62772 T m_factor;
62773 };
62774
62775 }
62776 # 44 "assemble.h" 2
62777 # 1 "../include/vigra_ext/impexalpha.hxx" 1
62778 # 33 "../include/vigra_ext/impexalpha.hxx"
62779 # 1 "../include/vigra/imageiterator.hxx" 1
62780 # 34 "../include/vigra_ext/impexalpha.hxx" 2
62781 # 1 "../include/vigra/transformimage.hxx" 1
62782 # 35 "../include/vigra_ext/impexalpha.hxx" 2
62783 # 1 "../include/vigra/initimage.hxx" 1
62784 # 36 "../include/vigra_ext/impexalpha.hxx" 2
62785
62786
62787 # 1 "../include/vigra/impex.hxx" 1
62788 # 39 "../include/vigra_ext/impexalpha.hxx" 2
62789
62790 namespace vigra {
62791
62792
62793
62794
62795 template <class T1>
62796 struct GetMaskTrue;
62797 # 68 "../include/vigra_ext/impexalpha.hxx"
62798 template<> struct GetMaskTrue<vigra::UInt8> { static vigra::UInt8 get() { return vigra::NumericTraits<vigra::UInt8>::max(); } };
62799 template<> struct GetMaskTrue<vigra::Int16> { static vigra::Int16 get() { return vigra::NumericTraits<vigra::Int16>::max(); } };
62800 template<> struct GetMaskTrue<vigra::UInt16> { static vigra::UInt16 get() { return vigra::NumericTraits<vigra::UInt16>::max(); } };
62801 template<> struct GetMaskTrue<vigra::Int32> { static vigra::Int32 get() { return vigra::NumericTraits<vigra::Int32>::max(); } };
62802 template<> struct GetMaskTrue<vigra::UInt32> { static vigra::UInt32 get() { return vigra::NumericTraits<vigra::UInt32>::max(); } };
62803 template<> struct GetMaskTrue<float> { static float get() { return 1.0f; } };
62804 template<> struct GetMaskTrue<double> { static double get() { return 1.0; } };
62805
62806 template <class Iter1, class Acc1, class Iter2, class Acc2>
62807 class MultiImageMaskAccessor2
62808 {
62809 public:
62810
62811
62812
62813 typedef vigra::TinyVector<typename Acc1::value_type, 2> value_type;
62814 typedef typename Acc1::value_type component_type;
62815 typedef typename Acc2::value_type alpha_type;
62816
62817
62818
62819 MultiImageMaskAccessor2(Iter1 i1, Acc1 a1, Iter2 i2, Acc2 a2)
62820 : i1_(i1), a1_(a1), i2_(i2), a2_(a2)
62821 {}
62822
62823
62824
62825 template <class DIFFERENCE>
62826 value_type operator()(DIFFERENCE const & d) const
62827 {
62828
62829
62830 return value_type(a1_(i1_, d), a2_(i2_, d));
62831 }
62832
62833
62834
62835 template <class DIFFERENCE1, class DIFFERENCE2>
62836 value_type operator()(DIFFERENCE1 d, DIFFERENCE2 const & d2) const
62837 {
62838 d += d2;
62839 return value_type(a1_(i1_, d), a2_(i2_, d));
62840
62841
62842
62843
62844 }
62845
62846
62847
62848 template <class DIFFERENCE>
62849 value_type set(const value_type & vt, DIFFERENCE const & d) const
62850 {
62851 a1_.set(vt[0], i1_, d);
62852 a2_.set(vt[1], i2_, d);
62853
62854 }
62855
62856
62857 template <class V, class ITERATOR>
62858 void setComponent( V const & value, ITERATOR const & i, int idx ) const
62859 {
62860 switch (idx) {
62861 case 0:
62862 a1_.set(value, i1_, *i);
62863 break;
62864 case 1:
62865
62866 a2_.set(value, i2_, *i);
62867 break;
62868 default:
62869 throw std::runtime_error("too many components in input value");
62870 }
62871 }
62872
62873
62874 template <class ITERATOR>
62875 component_type getComponent(ITERATOR const & i, int idx) const
62876 {
62877 switch (idx) {
62878 case 0:
62879 return a1_( i1_, *i );
62880 case 1:
62881 return a2_( i2_, *i );
62882
62883 default:
62884 throw std::runtime_error("too many components in input value");
62885
62886 exit(1);
62887 }
62888 }
62889
62890 template <class ITERATOR>
62891 unsigned int size ( ITERATOR const & i ) const
62892 {
62893 return 2;
62894 }
62895
62896 private:
62897 Iter1 i1_;
62898 Acc1 a1_;
62899 Iter2 i2_;
62900 Acc2 a2_;
62901 };
62902
62903
62904
62905 template <class Iter1, class Acc1, class Iter2, class Acc2>
62906 class MultiImageVectorMaskAccessor4
62907 {
62908 public:
62909
62910
62911
62912 typedef typename Acc1::value_type VT1;
62913
62914 enum { static_size = 4 };
62915
62916 typedef vigra::TinyVector<typename VT1::value_type, static_size> value_type;
62917 typedef typename value_type::value_type component_type;
62918
62919 typedef typename Acc2::value_type alpha_type;
62920
62921
62922
62923 MultiImageVectorMaskAccessor4(Iter1 i1, Acc1 a1, Iter2 i2, Acc2 a2)
62924 : i1_(i1), a1_(a1), i2_(i2), a2_(a2)
62925 {}
62926
62927
62928
62929 template <class DIFFERENCE>
62930 value_type operator()(DIFFERENCE const & d) const
62931 {
62932 const VT1 & v1 = a1_.get(i1_,d);
62933 return value_type(v1[0],
62934 v1[1],
62935 v1[2],
62936 a2_(i2_, d));
62937
62938 }
62939
62940
62941
62942 template <class DIFFERENCE1, class DIFFERENCE2>
62943 value_type operator()(DIFFERENCE1 d, DIFFERENCE2 const & d2) const
62944 {
62945 d += d2;
62946 const VT1 & v1 = a1_.get(i1_,d);
62947 return value_type(v1[0],
62948 v1[1],
62949 v1[2],
62950 a2_(i2_, d));
62951
62952 }
62953
62954
62955
62956 template <class DIFFERENCE>
62957 value_type set(const value_type & vt, DIFFERENCE const & d) const
62958 {
62959 Iter1 i1(i1_);
62960 i1 +=d;
62961 a1_.setComponent(vt[0], i1_, 0);
62962 a1_.setComponent(vt[1], i1_, 1);
62963 a1_.setComponent(vt[2], i1_, 2);
62964
62965 a2_.set(vt[3], i2_, d);
62966 }
62967
62968
62969 template <class V, class ITERATOR>
62970 void setComponent( V const & value, ITERATOR const & i, int idx ) const
62971 {
62972 if ( idx < static_size - 1 ) {
62973 a1_.setComponent(value, i1_, *i, idx);
62974 } else if ( idx == static_size - 1 ) {
62975 a2_.set(value, i2_, *i);
62976
62977 } else {
62978 throw std::runtime_error("too many components in input value");
62979 }
62980 }
62981
62982
62983 template <class ITERATOR>
62984 component_type getComponent(ITERATOR const & i, int idx) const
62985 {
62986 if ( idx < static_size - 1 ) {
62987 return a1_.getComponent(i1_, *i, idx);
62988 } else
62989
62990 return a2_(i2_, *i);
62991 # 274 "../include/vigra_ext/impexalpha.hxx"
62992 }
62993
62994 template <class ITERATOR>
62995 unsigned int size ( ITERATOR const & i ) const
62996 {
62997 return static_size;
62998 }
62999
63000 private:
63001 Iter1 i1_;
63002 Acc1 a1_;
63003 Iter2 i2_;
63004 Acc2 a2_;
63005 };
63006
63007
63008
63009 template<class SrcIterator, class SrcAccessor,
63010 class AlphaIterator, class AlphaAccessor>
63011 void exportImageAlpha(vigra::triple<SrcIterator, SrcIterator, SrcAccessor> image,
63012 std::pair<AlphaIterator, AlphaAccessor> alpha,
63013 vigra::ImageExportInfo const & info,
63014 vigra::VigraTrueType)
63015 {
63016 typedef MultiImageMaskAccessor2<SrcIterator, SrcAccessor, AlphaIterator, AlphaAccessor> MAcc;
63017
63018 exportImage(vigra::CoordinateIterator(),
63019 vigra::CoordinateIterator() + (image.second - image.first),
63020 MAcc(image.first, image.third, alpha.first, alpha.second),
63021 info);
63022 }
63023
63024
63025
63026 template<class SrcIterator, class SrcAccessor,
63027 class AlphaIterator, class AlphaAccessor>
63028 void exportImageAlpha(vigra::triple<SrcIterator, SrcIterator, SrcAccessor> image,
63029 std::pair<AlphaIterator, AlphaAccessor> alpha,
63030 vigra::ImageExportInfo const & info,
63031 vigra::VigraFalseType)
63032 {
63033 typedef MultiImageVectorMaskAccessor4<SrcIterator, SrcAccessor, AlphaIterator, AlphaAccessor> MAcc;
63034
63035 exportImage(vigra::CoordinateIterator(), vigra::CoordinateIterator(image.second - image.first),
63036 MAcc(image.first, image.third, alpha.first, alpha.second), info );
63037 }
63038 # 330 "../include/vigra_ext/impexalpha.hxx"
63039 template<class SrcIterator, class SrcAccessor,
63040 class AlphaIterator, class AlphaAccessor>
63041 void exportImageAlpha(vigra::triple<SrcIterator, SrcIterator, SrcAccessor> image,
63042 std::pair<AlphaIterator, AlphaAccessor> alpha,
63043 vigra::ImageExportInfo const & info)
63044 {
63045 typedef typename vigra::NumericTraits<typename SrcAccessor::value_type>::isScalar is_scalar;
63046
63047
63048
63049 exportImageAlpha( image, alpha, info, is_scalar());
63050 }
63051
63052
63053
63054 template<class DestIterator, class DestAccessor,
63055 class AlphaIterator, class AlphaAccessor>
63056 void importImageAlpha(vigra::ImageImportInfo const & info,
63057 std::pair<DestIterator, DestAccessor> image,
63058 std::pair<AlphaIterator, AlphaAccessor> alpha,
63059 vigra::VigraFalseType)
63060 {
63061 vigra::throw_precondition_error((image.second(image.first).size() == 3), "only scalar and 3 channel (vector) images supported by impexalpha.hxx");
63062
63063
63064 typedef MultiImageVectorMaskAccessor4<DestIterator, DestAccessor, AlphaIterator, AlphaAccessor> MAcc;
63065 importImage(info,
63066 vigra::CoordinateIterator(),
63067 MAcc(image.first, image.second, alpha.first, alpha.second) );
63068 }
63069
63070
63071 template<class DestIterator, class DestAccessor,
63072 class AlphaIterator, class AlphaAccessor>
63073 void importImageAlpha(vigra::ImageImportInfo const & info,
63074 std::pair<DestIterator, DestAccessor> image,
63075 std::pair<AlphaIterator, AlphaAccessor> alpha,
63076 vigra::VigraTrueType)
63077 {
63078 typedef MultiImageMaskAccessor2<DestIterator, DestAccessor, AlphaIterator, AlphaAccessor> MAcc;
63079
63080 importImage(info, vigra::CoordinateIterator(),
63081 MAcc(image.first, image.second, alpha.first, alpha.second) );
63082 }
63083 # 388 "../include/vigra_ext/impexalpha.hxx"
63084 template<class DestIterator, class DestAccessor,
63085 class AlphaIterator, class AlphaAccessor>
63086 void importImageAlpha(vigra::ImageImportInfo const & info,
63087 vigra::pair<DestIterator, DestAccessor> image,
63088 std::pair<AlphaIterator, AlphaAccessor> alpha
63089 )
63090 {
63091 typedef typename vigra::NumericTraits<typename DestAccessor::value_type>::isScalar is_scalar;
63092
63093 if (info.numExtraBands() == 1 ) {
63094
63095 importImageAlpha(info, image, alpha, is_scalar());
63096 } else if (info.numExtraBands() == 0 ) {
63097
63098 importImage(info, image);
63099
63100 vigra::initImage(alpha.first ,
63101 alpha.first + vigra::Diff2D(info.width(), info.height()),
63102 alpha.second,
63103 255);
63104 } else {
63105 throw std::runtime_error("Images with two or more alpha channel are not supported");
63106 }
63107 }
63108
63109 }
63110 # 45 "assemble.h" 2
63111
63112 using std::cerr;
63113 using std::cout;
63114 using std::endl;
63115 using std::list;
63116 using std::pair;
63117
63118 using vigra::copyImageIf;
63119 using vigra::Diff2D;
63120 using vigra::exportImageAlpha;
63121 using vigra::FindBoundingRectangle;
63122 using vigra::ImageExportInfo;
63123 using vigra::ImageImportInfo;
63124 using vigra::importImageAlpha;
63125 using vigra::inspectImageIf;
63126 using vigra::NumericTraits;
63127 using vigra::Rect2D;
63128 using vigra::Threshold;
63129 using vigra::transformImage;
63130
63131 using vigra_ext::ReadFunctorAccessor;
63132 using vigra_ext::WriteFunctorAccessor;
63133
63134 namespace enblend {
63135
63136
63137
63138 template <typename ImageType, typename AlphaType>
63139 void checkpoint(pair<ImageType*, AlphaType*> &p, ImageExportInfo &outputImageInfo) {
63140
63141 typedef typename ImageType::PixelType ImagePixelType;
63142 typedef typename EnblendNumericTraits<ImagePixelType>::ImagePixelComponentType ImagePixelComponentType;
63143 typedef typename AlphaType::Accessor AlphaAccessor;
63144 typedef typename AlphaType::PixelType AlphaPixelType;
63145
63146 typedef ReadFunctorAccessor<
63147 Threshold<AlphaPixelType, ImagePixelComponentType>, AlphaAccessor>
63148 ThresholdingAccessor;
63149
63150 ThresholdingAccessor ata(
63151 Threshold<AlphaPixelType, ImagePixelComponentType>(
63152 NumericTraits<AlphaPixelType>::zero(),
63153 NumericTraits<AlphaPixelType>::zero(),
63154 NumericTraits<ImagePixelComponentType>::max(),
63155 NumericTraits<ImagePixelComponentType>::zero()
63156 ),
63157 (p.second)->accessor());
63158
63159 exportImageAlpha(srcImageRange(*(p.first)),
63160 srcIter((p.second)->upperLeft(), ata),
63161 outputImageInfo);
63162
63163 };
63164
63165 template <typename DestIterator, typename DestAccessor,
63166 typename AlphaIterator, typename AlphaAccessor>
63167 void import(const ImageImportInfo &info,
63168 const pair<DestIterator, DestAccessor> &image,
63169 const pair<AlphaIterator, AlphaAccessor> &alpha) {
63170
63171 typedef typename DestIterator::PixelType ImagePixelType;
63172 typedef typename EnblendNumericTraits<ImagePixelType>::ImagePixelComponentType ImagePixelComponentType;
63173 typedef typename AlphaIterator::PixelType AlphaPixelType;
63174
63175
63176 typedef WriteFunctorAccessor<
63177 Threshold<ImagePixelComponentType, AlphaPixelType>, AlphaAccessor>
63178 ThresholdingAccessor;
63179
63180
63181
63182 ThresholdingAccessor ata(
63183 Threshold<ImagePixelComponentType, AlphaPixelType>(
63184
63185 NumericTraits<ImagePixelComponentType>::max() / 2,
63186 NumericTraits<ImagePixelComponentType>::max(),
63187 NumericTraits<AlphaPixelType>::zero(),
63188 NumericTraits<AlphaPixelType>::max()
63189 ),
63190 alpha.second);
63191
63192 importImageAlpha(info, image, destIter(alpha.first, ata));
63193
63194 };
63195
63196
63197
63198
63199
63200
63201
63202 template <typename ImageType, typename AlphaType>
63203 pair<ImageType*, AlphaType*> assemble(list<ImageImportInfo*> &imageInfoList,
63204 Rect2D &inputUnion,
63205 Rect2D &bb) {
63206
63207 typedef typename AlphaType::traverser AlphaIteratorType;
63208 typedef typename AlphaType::Accessor AlphaAccessor;
63209
63210
63211 if (imageInfoList.empty()) return pair<ImageType*, AlphaType*>(__null, __null);
63212
63213
63214 ImageType *image = new ImageType(inputUnion.size());
63215 AlphaType *imageA = new AlphaType(inputUnion.size());
63216
63217 if (Verbose > 0) {
63218 if (OneAtATime) {
63219 cout << "Loading next image: "
63220 << imageInfoList.front()->getFileName()
63221 << endl;
63222 } else {
63223 cout << "Combining non-overlapping images: "
63224 << imageInfoList.front()->getFileName();
63225 cout.flush();
63226 }
63227 }
63228
63229 Diff2D imagePos = imageInfoList.front()->getPosition();
63230 import(*imageInfoList.front(),
63231 destIter(image->upperLeft() + imagePos - inputUnion.upperLeft()),
63232 destIter(imageA->upperLeft() + imagePos - inputUnion.upperLeft()));
63233 imageInfoList.erase(imageInfoList.begin());
63234
63235 if (!OneAtATime) {
63236
63237
63238
63239 list<list<ImageImportInfo*>::iterator> toBeRemoved;
63240
63241 list<ImageImportInfo*>::iterator i;
63242 for (i = imageInfoList.begin(); i != imageInfoList.end(); i++) {
63243 ImageImportInfo *info = *i;
63244
63245
63246 ImageType *src = new ImageType(info->size());
63247 AlphaType *srcA = new AlphaType(info->size());
63248
63249 import(*info, destImage(*src), destImage(*srcA));
63250
63251
63252 bool overlapFound = false;
63253 AlphaIteratorType dy =
63254 imageA->upperLeft() - inputUnion.upperLeft() + info->getPosition();
63255 AlphaAccessor da = imageA->accessor();
63256 AlphaIteratorType sy = srcA->upperLeft();
63257 AlphaIteratorType send = srcA->lowerRight();
63258 AlphaAccessor sa = srcA->accessor();
63259 for(; sy.y < send.y; ++sy.y, ++dy.y) {
63260 AlphaIteratorType sx = sy;
63261 AlphaIteratorType dx = dy;
63262 for(; sx.x < send.x; ++sx.x, ++dx.x) {
63263 if (sa(sx) && da(dx)) {
63264 overlapFound = true;
63265 break;
63266 }
63267 }
63268 if (overlapFound) break;
63269 }
63270
63271 if (!overlapFound) {
63272
63273
63274 if (Verbose > 0) {
63275 cout << " " << info->getFileName();
63276 cout.flush();
63277 }
63278
63279 Diff2D srcPos = info->getPosition();
63280 copyImageIf(srcImageRange(*src),
63281 maskImage(*srcA),
63282 destIter(image->upperLeft() - inputUnion.upperLeft() + srcPos));
63283 copyImageIf(srcImageRange(*srcA),
63284 maskImage(*srcA),
63285 destIter(imageA->upperLeft() - inputUnion.upperLeft() + srcPos));
63286
63287
63288 toBeRemoved.push_back(i);
63289 }
63290
63291 delete src;
63292 delete srcA;
63293 }
63294
63295
63296 list<list<ImageImportInfo*>::iterator>::iterator r;
63297 for (r = toBeRemoved.begin(); r != toBeRemoved.end(); r++) {
63298 imageInfoList.erase(*r);
63299 }
63300 }
63301
63302 if (Verbose > 0 && !OneAtATime) cout << endl;
63303
63304
63305 FindBoundingRectangle unionRect;
63306 inspectImageIf(srcIterRange(Diff2D(), Diff2D() + image->size()),
63307 srcImage(*imageA), unionRect);
63308 bb = unionRect();
63309
63310 if (Verbose > 1) {
63311 cout << "assembled images bounding box: " << unionRect() << endl;
63312 }
63313
63314 return pair<ImageType*, AlphaType*>(image, imageA);
63315
63316 };
63317
63318 }
63319 # 37 "enblend.h" 2
63320 # 1 "blend.h" 1
63321 # 24 "blend.h"
63322 # 1 "../config.h" 1
63323 # 25 "blend.h" 2
63324
63325
63326
63327
63328 # 1 "../include/vigra/combineimages.hxx" 1
63329 # 46 "../include/vigra/combineimages.hxx"
63330 namespace vigra {
63331 # 61 "../include/vigra/combineimages.hxx"
63332 template <class SrcIterator1, class SrcAccessor1,
63333 class SrcIterator2, class SrcAccessor2,
63334 class DestIterator, class DestAccessor, class Functor>
63335 void
63336 combineTwoLines(SrcIterator1 s1,
63337 SrcIterator1 s1end, SrcAccessor1 src1,
63338 SrcIterator2 s2, SrcAccessor2 src2,
63339 DestIterator d, DestAccessor dest,
63340 Functor const & f)
63341 {
63342 for(; s1 != s1end; ++s1, ++s2, ++d)
63343 dest.set(f(src1(s1), src2(s2)), d);
63344 }
63345
63346 template <class SrcIterator1, class SrcAccessor1,
63347 class SrcIterator2, class SrcAccessor2,
63348 class MaskIterator, class MaskAccessor,
63349 class DestIterator, class DestAccessor, class Functor>
63350 void
63351 combineTwoLinesIf(SrcIterator1 s1,
63352 SrcIterator1 s1end, SrcAccessor1 src1,
63353 SrcIterator2 s2, SrcAccessor2 src2,
63354 MaskIterator m, MaskAccessor mask,
63355 DestIterator d, DestAccessor dest,
63356 Functor const & f)
63357 {
63358 for(; s1 != s1end; ++s1, ++s2, ++m, ++d)
63359 if(mask(m))
63360 dest.set(f(src1(s1), src2(s2)), d);
63361 }
63362
63363 template <class SrcIterator1, class SrcAccessor1,
63364 class SrcIterator2, class SrcAccessor2,
63365 class SrcIterator3, class SrcAccessor3,
63366 class DestIterator, class DestAccessor, class Functor>
63367 void
63368 combineThreeLines(SrcIterator1 s1,
63369 SrcIterator1 s1end, SrcAccessor1 src1,
63370 SrcIterator2 s2, SrcAccessor2 src2,
63371 SrcIterator3 s3, SrcAccessor3 src3,
63372 DestIterator d, DestAccessor dest,
63373 Functor const & f)
63374 {
63375 for(; s1 != s1end; ++s1, ++s2, ++s3, ++d)
63376 dest.set(f(src1(s1), src2(s2), src3(s3)), d);
63377 }
63378 # 202 "../include/vigra/combineimages.hxx"
63379 template <class SrcImageIterator1, class SrcAccessor1,
63380 class SrcImageIterator2, class SrcAccessor2,
63381 class DestImageIterator, class DestAccessor,
63382 class Functor>
63383 void
63384 combineTwoImages(SrcImageIterator1 src1_upperleft,
63385 SrcImageIterator1 src1_lowerright, SrcAccessor1 sa1,
63386 SrcImageIterator2 src2_upperleft, SrcAccessor2 sa2,
63387 DestImageIterator dest_upperleft, DestAccessor da,
63388 Functor const & f)
63389 {
63390 int w = src1_lowerright.x - src1_upperleft.x;
63391
63392 for(; src1_upperleft.y < src1_lowerright.y;
63393 ++src1_upperleft.y, ++src2_upperleft.y, ++dest_upperleft.y)
63394 {
63395 combineTwoLines(src1_upperleft.rowIterator(),
63396 src1_upperleft.rowIterator() + w, sa1,
63397 src2_upperleft.rowIterator(), sa2,
63398 dest_upperleft.rowIterator(), da, f);
63399 }
63400 }
63401
63402 template <class SrcImageIterator1, class SrcAccessor1,
63403 class SrcImageIterator2, class SrcAccessor2,
63404 class DestImageIterator, class DestAccessor,
63405 class Functor>
63406 inline
63407 void
63408 combineTwoImages(triple<SrcImageIterator1, SrcImageIterator1, SrcAccessor1> src1,
63409 pair<SrcImageIterator2, SrcAccessor2> src2,
63410 pair<DestImageIterator, DestAccessor> dest,
63411 Functor const & f)
63412 {
63413 combineTwoImages(src1.first, src1.second, src1.third,
63414 src2.first, src2.second,
63415 dest.first, dest.second, f);
63416 }
63417 # 346 "../include/vigra/combineimages.hxx"
63418 template <class SrcImageIterator1, class SrcAccessor1,
63419 class SrcImageIterator2, class SrcAccessor2,
63420 class MaskImageIterator, class MaskAccessor,
63421 class DestImageIterator, class DestAccessor,
63422 class Functor>
63423 void
63424 combineTwoImagesIf(SrcImageIterator1 src1_upperleft,
63425 SrcImageIterator1 src1_lowerright, SrcAccessor1 sa1,
63426 SrcImageIterator2 src2_upperleft, SrcAccessor2 sa2,
63427 MaskImageIterator mask_upperleft, MaskAccessor ma,
63428 DestImageIterator dest_upperleft, DestAccessor da,
63429 Functor const & f)
63430 {
63431 int w = src1_lowerright.x - src1_upperleft.x;
63432
63433 for(; src1_upperleft.y < src1_lowerright.y;
63434 ++src1_upperleft.y, ++src2_upperleft.y,
63435 ++dest_upperleft.y, ++mask_upperleft.y)
63436 {
63437 combineTwoLinesIf(src1_upperleft.rowIterator(),
63438 src1_upperleft.rowIterator() + w, sa1,
63439 src2_upperleft.rowIterator(), sa2,
63440 mask_upperleft.rowIterator(), ma,
63441 dest_upperleft.rowIterator(), da, f);
63442 }
63443 }
63444
63445 template <class SrcImageIterator1, class SrcAccessor1,
63446 class SrcImageIterator2, class SrcAccessor2,
63447 class MaskImageIterator, class MaskAccessor,
63448 class DestImageIterator, class DestAccessor,
63449 class Functor>
63450 inline
63451 void
63452 combineTwoImagesIf(triple<SrcImageIterator1, SrcImageIterator1, SrcAccessor1> src1,
63453 pair<SrcImageIterator2, SrcAccessor2> src2,
63454 pair<MaskImageIterator, MaskAccessor> mask,
63455 pair<DestImageIterator, DestAccessor> dest,
63456 Functor const & f)
63457 {
63458 combineTwoImagesIf(src1.first, src1.second, src1.third,
63459 src2.first, src2.second,
63460 mask.first, mask.second,
63461 dest.first, dest.second, f);
63462 }
63463 # 487 "../include/vigra/combineimages.hxx"
63464 template <class SrcImageIterator1, class SrcAccessor1,
63465 class SrcImageIterator2, class SrcAccessor2,
63466 class SrcImageIterator3, class SrcAccessor3,
63467 class DestImageIterator, class DestAccessor,
63468 class Functor>
63469 void
63470 combineThreeImages(SrcImageIterator1 src1_upperleft,
63471 SrcImageIterator1 src1_lowerright, SrcAccessor1 sa1,
63472 SrcImageIterator2 src2_upperleft, SrcAccessor2 sa2,
63473 SrcImageIterator3 src3_upperleft, SrcAccessor3 sa3,
63474 DestImageIterator dest_upperleft, DestAccessor da,
63475 Functor const & f)
63476 {
63477 int w = src1_lowerright.x - src1_upperleft.x;
63478
63479 for(; src1_upperleft.y < src1_lowerright.y;
63480 ++src1_upperleft.y, ++src2_upperleft.y, ++src3_upperleft.y,
63481 ++dest_upperleft.y)
63482 {
63483 combineThreeLines(src1_upperleft.rowIterator(),
63484 src1_upperleft.rowIterator() + w, sa1,
63485 src2_upperleft.rowIterator(), sa2,
63486 src3_upperleft.rowIterator(), sa3,
63487 dest_upperleft.rowIterator(), da, f);
63488 }
63489 }
63490
63491 template <class SrcImageIterator1, class SrcAccessor1,
63492 class SrcImageIterator2, class SrcAccessor2,
63493 class SrcImageIterator3, class SrcAccessor3,
63494 class DestImageIterator, class DestAccessor,
63495 class Functor>
63496 inline
63497 void
63498 combineThreeImages(triple<SrcImageIterator1, SrcImageIterator1, SrcAccessor1> src1,
63499 pair<SrcImageIterator2, SrcAccessor2> src2,
63500 pair<SrcImageIterator3, SrcAccessor3> src3,
63501 pair<DestImageIterator, DestAccessor> dest,
63502 Functor const & f)
63503 {
63504 combineThreeImages(src1.first, src1.second, src1.third,
63505 src2.first, src2.second,
63506 src3.first, src3.second,
63507 dest.first, dest.second, f);
63508 }
63509 # 558 "../include/vigra/combineimages.hxx"
63510 template <class ValueType>
63511 class MagnitudeFunctor
63512 {
63513 public:
63514
63515
63516 typedef ValueType first_argument_type;
63517
63518
63519
63520 typedef ValueType second_argument_type;
63521
63522
63523
63524 typedef typename NumericTraits<ValueType>::RealPromote result_type;
63525
63526
63527
63528 typedef ValueType value_type;
63529
63530
63531
63532
63533 result_type operator()(first_argument_type const & v1, second_argument_type const & v2) const
63534 {
63535 return std::sqrt(v1*v1 + v2*v2);
63536 }
63537 };
63538
63539 template <class T>
63540 class FunctorTraits<MagnitudeFunctor<T> >
63541 : public FunctorTraitsBase<MagnitudeFunctor<T> >
63542 {
63543 public:
63544 typedef VigraTrueType isBinaryFunctor;
63545 };
63546 # 609 "../include/vigra/combineimages.hxx"
63547 template <class ValueType>
63548 class RGBGradientMagnitudeFunctor
63549 {
63550 public:
63551
63552
63553 typedef RGBValue<ValueType> first_argument_type;
63554
63555
63556
63557 typedef RGBValue<ValueType> second_argument_type;
63558
63559
63560
63561 typedef typename NumericTraits<ValueType>::RealPromote result_type;
63562
63563
63564
63565 typedef ValueType value_type;
63566 # 640 "../include/vigra/combineimages.hxx"
63567 result_type
63568 operator()(first_argument_type const & gx, second_argument_type const & gy) const
63569 {
63570 return std::sqrt(gx.red()*gx.red() + gx.green()*gx.green() +
63571 gx.blue()*gx.blue() + gy.red()*gy.red() +
63572 gy.green()*gy.green() + gy.blue()*gy.blue());
63573 }
63574 };
63575
63576 template <class T>
63577 class FunctorTraits<RGBGradientMagnitudeFunctor<T> >
63578 : public FunctorTraitsBase<RGBGradientMagnitudeFunctor<T> >
63579 {
63580 public:
63581 typedef VigraTrueType isBinaryFunctor;
63582 };
63583
63584
63585
63586 }
63587 # 30 "blend.h" 2
63588
63589
63590
63591
63592 using std::cout;
63593 using std::vector;
63594
63595 using vigra::combineThreeImages;
63596 using vigra::NumericTraits;
63597 # 54 "blend.h"
63598 namespace enblend {
63599
63600
63601
63602
63603 template <typename MaskPixelType>
63604 class CartesianBlendFunctor {
63605 public:
63606 CartesianBlendFunctor(MaskPixelType w) : white(NumericTraits<MaskPixelType>::toRealPromote(w)) {}
63607
63608 template <typename ImagePixelType>
63609 ImagePixelType operator()(const MaskPixelType &maskP, const ImagePixelType &wP, const ImagePixelType &bP) const {
63610
63611 typedef typename NumericTraits<ImagePixelType>::RealPromote RealImagePixelType;
63612
63613
63614 double whiteCoeff =
63615 NumericTraits<MaskPixelType>::toRealPromote(maskP) / white;
63616 double blackCoeff = 1.0 - whiteCoeff;
63617
63618 RealImagePixelType rwP = NumericTraits<ImagePixelType>::toRealPromote(wP);
63619 RealImagePixelType rbP = NumericTraits<ImagePixelType>::toRealPromote(bP);
63620
63621 RealImagePixelType blendP = (whiteCoeff * rwP) + (blackCoeff * rbP);
63622
63623 return NumericTraits<ImagePixelType>::fromRealPromote(blendP);
63624 }
63625
63626 protected:
63627 double white;
63628 };
63629 # 118 "blend.h"
63630 template <typename MaskPyramidType, typename ImagePyramidType>
63631 void blend(vector<MaskPyramidType*> *maskGP,
63632 vector<ImagePyramidType*> *whiteLP,
63633 vector<ImagePyramidType*> *blackLP,
63634 typename MaskPyramidType::value_type maskPyramidWhiteValue) {
63635
63636
63637
63638 if (Verbose > 0) {
63639 cout << "Blending layers: ";
63640 cout.flush();
63641 }
63642 # 158 "blend.h"
63643 for (unsigned int layer = 0; layer < maskGP->size(); layer++) {
63644
63645 if (Verbose > 0) {
63646 cout << " l" << layer;
63647 cout.flush();
63648 }
63649
63650
63651 if (1) {
63652 combineThreeImages(srcImageRange(*((*maskGP)[layer])),
63653 srcImage(*((*whiteLP)[layer])),
63654 srcImage(*((*blackLP)[layer])),
63655 destImage(*((*blackLP)[layer])),
63656 CartesianBlendFunctor<typename MaskPyramidType::value_type>(maskPyramidWhiteValue));
63657 continue;
63658 }
63659 # 259 "blend.h"
63660 }
63661
63662 if (Verbose > 0) {
63663 cout << endl;
63664 }
63665
63666 };
63667
63668 }
63669 # 38 "enblend.h" 2
63670 # 1 "bounds.h" 1
63671 # 24 "bounds.h"
63672 # 1 "../config.h" 1
63673 # 25 "bounds.h" 2
63674
63675
63676
63677 # 1 "pyramid.h" 1
63678 # 24 "pyramid.h"
63679 # 1 "../config.h" 1
63680 # 25 "pyramid.h" 2
63681
63682
63683
63684
63685
63686 # 1 "../include/vigra/convolution.hxx" 1
63687 # 42 "../include/vigra/convolution.hxx"
63688 # 1 "../include/vigra/stdconvolution.hxx" 1
63689 # 43 "../include/vigra/stdconvolution.hxx"
63690 # 1 "../include/vigra/bordertreatment.hxx" 1
63691 # 41 "../include/vigra/bordertreatment.hxx"
63692 namespace vigra {
63693 # 76 "../include/vigra/bordertreatment.hxx"
63694 enum BorderTreatmentMode
63695 {
63696 BORDER_TREATMENT_AVOID,
63697 BORDER_TREATMENT_CLIP,
63698 BORDER_TREATMENT_REPEAT,
63699 BORDER_TREATMENT_REFLECT,
63700 BORDER_TREATMENT_WRAP
63701 };
63702
63703 }
63704 # 44 "../include/vigra/stdconvolution.hxx" 2
63705 # 1 "../include/vigra/separableconvolution.hxx" 1
63706 # 46 "../include/vigra/separableconvolution.hxx"
63707 # 1 "../include/vigra/gaussians.hxx" 1
63708 # 46 "../include/vigra/gaussians.hxx"
63709 namespace vigra {
63710 # 63 "../include/vigra/gaussians.hxx"
63711 template <class T = double>
63712 class Gaussian
63713 {
63714 public:
63715
63716
63717
63718 typedef T value_type;
63719
63720
63721 typedef T argument_type;
63722
63723
63724 typedef T result_type;
63725 # 90 "../include/vigra/gaussians.hxx"
63726 explicit Gaussian(T sigma = 1.0, unsigned int derivativeOrder = 0)
63727 : sigma_(sigma),
63728 sigma2_(-0.5 / sigma / sigma),
63729 norm_(0.0),
63730 order_(derivativeOrder),
63731 hermitePolynomial_(derivativeOrder / 2 + 1)
63732 {
63733 vigra::throw_precondition_error((sigma_ > 0.0), "Gaussian::Gaussian(): sigma > 0 required.");
63734
63735 switch(order_)
63736 {
63737 case 1:
63738 case 2:
63739 norm_ = -1.0 / (std::sqrt(2.0 * 3.14159265358979323846) * sq(sigma) * sigma);
63740 break;
63741 case 3:
63742 norm_ = 1.0 / (std::sqrt(2.0 * 3.14159265358979323846) * sq(sigma) * sq(sigma) * sigma);
63743 break;
63744 default:
63745 norm_ = 1.0 / std::sqrt(2.0 * 3.14159265358979323846) / sigma;
63746 }
63747 calculateHermitePolynomial();
63748 }
63749
63750
63751
63752 result_type operator()(argument_type x) const;
63753
63754
63755
63756 value_type sigma() const
63757 { return sigma_; }
63758
63759
63760
63761 unsigned int derivativeOrder() const
63762 { return order_; }
63763
63764
63765
63766
63767
63768
63769
63770 double radius(double sigmaMultiple = 3.0) const
63771 { return std::ceil(sigma_ * (sigmaMultiple + 0.5 * derivativeOrder())); }
63772
63773 private:
63774 void calculateHermitePolynomial();
63775 T horner(T x) const;
63776
63777 T sigma_, sigma2_, norm_;
63778 unsigned int order_;
63779 ArrayVector<T> hermitePolynomial_;
63780 };
63781
63782 template <class T>
63783 typename Gaussian<T>::result_type
63784 Gaussian<T>::operator()(argument_type x) const
63785 {
63786 T x2 = x * x;
63787 T g = norm_ * std::exp(x2 * sigma2_);
63788 switch(order_)
63789 {
63790 case 0:
63791 return g;
63792 case 1:
63793 return x * g;
63794 case 2:
63795 return (1.0 - sq(x / sigma_)) * g;
63796 case 3:
63797 return (3.0 - sq(x / sigma_)) * x * g;
63798 default:
63799 return order_ % 2 == 0 ?
63800 g * horner(x2)
63801 : x * g * horner(x2);
63802 }
63803 }
63804
63805 template <class T>
63806 T Gaussian<T>::horner(T x) const
63807 {
63808 int i = order_ / 2;
63809 T res = hermitePolynomial_[i];
63810 for(--i; i >= 0; --i)
63811 res = x * res + hermitePolynomial_[i];
63812 return res;
63813 }
63814
63815 template <class T>
63816 void Gaussian<T>::calculateHermitePolynomial()
63817 {
63818 if(order_ == 0)
63819 {
63820 hermitePolynomial_[0] = 1.0;
63821 }
63822 else if(order_ == 1)
63823 {
63824 hermitePolynomial_[0] = -1.0 / sigma_ / sigma_;
63825 }
63826 else
63827 {
63828 # 203 "../include/vigra/gaussians.hxx"
63829 T s2 = -1.0 / sigma_ / sigma_;
63830 ArrayVector<T> hn(3*order_+3, 0.0);
63831 typename ArrayVector<T>::iterator hn0 = hn.begin(),
63832 hn1 = hn0 + order_+1,
63833 hn2 = hn1 + order_+1,
63834 ht;
63835 hn2[0] = 1.0;
63836 hn1[1] = s2;
63837 for(unsigned int i = 2; i <= order_; ++i)
63838 {
63839 hn0[0] = s2 * (i-1) * hn2[0];
63840 for(unsigned int j = 1; j <= i; ++j)
63841 hn0[j] = s2 * (hn1[j-1] + (i-1) * hn2[j]);
63842 ht = hn2;
63843 hn2 = hn1;
63844 hn1 = hn0;
63845 hn0 = ht;
63846 }
63847
63848 for(unsigned int i = 0; i < hermitePolynomial_.size(); ++i)
63849 hermitePolynomial_[i] = order_ % 2 == 0 ?
63850 hn1[2*i]
63851 : hn1[2*i+1];
63852 }
63853 }
63854
63855
63856
63857
63858 }
63859 # 47 "../include/vigra/separableconvolution.hxx" 2
63860
63861
63862 namespace vigra {
63863
63864
63865
63866
63867
63868
63869
63870 template <class SrcIterator, class SrcAccessor,
63871 class DestIterator, class DestAccessor,
63872 class KernelIterator, class KernelAccessor>
63873 void internalConvolveLineWrap(SrcIterator is, SrcIterator iend, SrcAccessor sa,
63874 DestIterator id, DestAccessor da,
63875 KernelIterator kernel, KernelAccessor ka,
63876 int kleft, int kright)
63877 {
63878
63879 int w = std::distance( is, iend );
63880
63881 typedef typename NumericTraits<typename
63882 SrcAccessor::value_type>::RealPromote SumType;
63883
63884 SrcIterator ibegin = is;
63885
63886 for(int x=0; x<w; ++x, ++is, ++id)
63887 {
63888 KernelIterator ik = kernel + kright;
63889 SumType sum = NumericTraits<SumType>::zero();
63890
63891 if(x < kright)
63892 {
63893 int x0 = x - kright;
63894 SrcIterator iss = iend + x0;
63895
63896 for(; x0; ++x0, --ik, ++iss)
63897 {
63898 sum += ka(ik) * sa(iss);
63899 }
63900
63901 iss = ibegin;
63902 SrcIterator isend = is + (1 - kleft);
63903 for(; iss != isend ; --ik, ++iss)
63904 {
63905 sum += ka(ik) * sa(iss);
63906 }
63907 }
63908 else if(w-x <= -kleft)
63909 {
63910 SrcIterator iss = is + (-kright);
63911 SrcIterator isend = iend;
63912 for(; iss != isend ; --ik, ++iss)
63913 {
63914 sum += ka(ik) * sa(iss);
63915 }
63916
63917 int x0 = -kleft - w + x + 1;
63918 iss = ibegin;
63919
63920 for(; x0; --x0, --ik, ++iss)
63921 {
63922 sum += ka(ik) * sa(iss);
63923 }
63924 }
63925 else
63926 {
63927 SrcIterator iss = is - kright;
63928 SrcIterator isend = is + (1 - kleft);
63929 for(; iss != isend ; --ik, ++iss)
63930 {
63931 sum += ka(ik) * sa(iss);
63932 }
63933 }
63934
63935 da.set(NumericTraits<typename
63936 DestAccessor::value_type>::fromRealPromote(sum), id);
63937 }
63938 }
63939
63940
63941
63942
63943
63944
63945
63946 template <class SrcIterator, class SrcAccessor,
63947 class DestIterator, class DestAccessor,
63948 class KernelIterator, class KernelAccessor,
63949 class Norm>
63950 void internalConvolveLineClip(SrcIterator is, SrcIterator iend, SrcAccessor sa,
63951 DestIterator id, DestAccessor da,
63952 KernelIterator kernel, KernelAccessor ka,
63953 int kleft, int kright, Norm norm)
63954 {
63955
63956 int w = std::distance( is, iend );
63957
63958 typedef typename NumericTraits<typename
63959 SrcAccessor::value_type>::RealPromote SumType;
63960
63961 SrcIterator ibegin = is;
63962
63963 for(int x=0; x<w; ++x, ++is, ++id)
63964 {
63965 KernelIterator ik = kernel + kright;
63966 SumType sum = NumericTraits<SumType>::zero();
63967
63968 if(x < kright)
63969 {
63970 int x0 = x - kright;
63971 Norm clipped = NumericTraits<Norm>::zero();
63972
63973 for(; x0; ++x0, --ik)
63974 {
63975 clipped += ka(ik);
63976 }
63977
63978 SrcIterator iss = ibegin;
63979 SrcIterator isend = is + (1 - kleft);
63980 for(; iss != isend ; --ik, ++iss)
63981 {
63982 sum += ka(ik) * sa(iss);
63983 }
63984
63985 sum = norm / (norm - clipped) * sum;
63986 }
63987 else if(w-x <= -kleft)
63988 {
63989 SrcIterator iss = is + (-kright);
63990 SrcIterator isend = iend;
63991 for(; iss != isend ; --ik, ++iss)
63992 {
63993 sum += ka(ik) * sa(iss);
63994 }
63995
63996 Norm clipped = NumericTraits<Norm>::zero();
63997
63998 int x0 = -kleft - w + x + 1;
63999
64000 for(; x0; --x0, --ik)
64001 {
64002 clipped += ka(ik);
64003 }
64004
64005 sum = norm / (norm - clipped) * sum;
64006 }
64007 else
64008 {
64009 SrcIterator iss = is + (-kright);
64010 SrcIterator isend = is + (1 - kleft);
64011 for(; iss != isend ; --ik, ++iss)
64012 {
64013 sum += ka(ik) * sa(iss);
64014 }
64015 }
64016
64017 da.set(NumericTraits<typename
64018 DestAccessor::value_type>::fromRealPromote(sum), id);
64019 }
64020 }
64021
64022
64023
64024
64025
64026
64027
64028 template <class SrcIterator, class SrcAccessor,
64029 class DestIterator, class DestAccessor,
64030 class KernelIterator, class KernelAccessor>
64031 void internalConvolveLineReflect(SrcIterator is, SrcIterator iend, SrcAccessor sa,
64032 DestIterator id, DestAccessor da,
64033 KernelIterator kernel, KernelAccessor ka,
64034 int kleft, int kright)
64035 {
64036
64037 int w = std::distance( is, iend );
64038
64039 typedef typename NumericTraits<typename
64040 SrcAccessor::value_type>::RealPromote SumType;
64041
64042 SrcIterator ibegin = is;
64043
64044 for(int x=0; x<w; ++x, ++is, ++id)
64045 {
64046 KernelIterator ik = kernel + kright;
64047 SumType sum = NumericTraits<SumType>::zero();
64048
64049 if(x < kright)
64050 {
64051 int x0 = x - kright;
64052 SrcIterator iss = ibegin - x0;
64053
64054 for(; x0; ++x0, --ik, --iss)
64055 {
64056 sum += ka(ik) * sa(iss);
64057 }
64058
64059 SrcIterator isend = is + (1 - kleft);
64060 for(; iss != isend ; --ik, ++iss)
64061 {
64062 sum += ka(ik) * sa(iss);
64063 }
64064 }
64065 else if(w-x <= -kleft)
64066 {
64067 SrcIterator iss = is + (-kright);
64068 SrcIterator isend = iend;
64069 for(; iss != isend ; --ik, ++iss)
64070 {
64071 sum += ka(ik) * sa(iss);
64072 }
64073
64074 int x0 = -kleft - w + x + 1;
64075 iss = iend - 2;
64076
64077 for(; x0; --x0, --ik, --iss)
64078 {
64079 sum += ka(ik) * sa(iss);
64080 }
64081 }
64082 else
64083 {
64084 SrcIterator iss = is + (-kright);
64085 SrcIterator isend = is + (1 - kleft);
64086 for(; iss != isend ; --ik, ++iss)
64087 {
64088 sum += ka(ik) * sa(iss);
64089 }
64090 }
64091
64092 da.set(NumericTraits<typename
64093 DestAccessor::value_type>::fromRealPromote(sum), id);
64094 }
64095 }
64096
64097
64098
64099
64100
64101
64102
64103 template <class SrcIterator, class SrcAccessor,
64104 class DestIterator, class DestAccessor,
64105 class KernelIterator, class KernelAccessor>
64106 void internalConvolveLineRepeat(SrcIterator is, SrcIterator iend, SrcAccessor sa,
64107 DestIterator id, DestAccessor da,
64108 KernelIterator kernel, KernelAccessor ka,
64109 int kleft, int kright)
64110 {
64111
64112 int w = std::distance( is, iend );
64113
64114 typedef typename NumericTraits<typename
64115 SrcAccessor::value_type>::RealPromote SumType;
64116
64117 SrcIterator ibegin = is;
64118
64119 for(int x=0; x<w; ++x, ++is, ++id)
64120 {
64121 KernelIterator ik = kernel + kright;
64122 SumType sum = NumericTraits<SumType>::zero();
64123
64124 if(x < kright)
64125 {
64126 int x0 = x - kright;
64127 SrcIterator iss = ibegin;
64128
64129 for(; x0; ++x0, --ik)
64130 {
64131 sum += ka(ik) * sa(iss);
64132 }
64133
64134 SrcIterator isend = is + (1 - kleft);
64135 for(; iss != isend ; --ik, ++iss)
64136 {
64137 sum += ka(ik) * sa(iss);
64138 }
64139 }
64140 else if(w-x <= -kleft)
64141 {
64142 SrcIterator iss = is + (-kright);
64143 SrcIterator isend = iend;
64144 for(; iss != isend ; --ik, ++iss)
64145 {
64146 sum += ka(ik) * sa(iss);
64147 }
64148
64149 int x0 = -kleft - w + x + 1;
64150 iss = iend - 1;
64151
64152 for(; x0; --x0, --ik)
64153 {
64154 sum += ka(ik) * sa(iss);
64155 }
64156 }
64157 else
64158 {
64159 SrcIterator iss = is + (-kright);
64160 SrcIterator isend = is + (1 - kleft);
64161 for(; iss != isend ; --ik, ++iss)
64162 {
64163 sum += ka(ik) * sa(iss);
64164 }
64165 }
64166
64167 da.set(NumericTraits<typename
64168 DestAccessor::value_type>::fromRealPromote(sum), id);
64169 }
64170 }
64171
64172
64173
64174
64175
64176
64177
64178 template <class SrcIterator, class SrcAccessor,
64179 class DestIterator, class DestAccessor,
64180 class KernelIterator, class KernelAccessor>
64181 void internalConvolveLineAvoid(SrcIterator is, SrcIterator iend, SrcAccessor sa,
64182 DestIterator id, DestAccessor da,
64183 KernelIterator kernel, KernelAccessor ka,
64184 int kleft, int kright)
64185 {
64186
64187 int w = std::distance( is, iend );
64188
64189 typedef typename NumericTraits<typename
64190 SrcAccessor::value_type>::RealPromote SumType;
64191
64192 is += kright;
64193 id += kright;
64194
64195 for(int x=kright; x<w+kleft; ++x, ++is, ++id)
64196 {
64197 KernelIterator ik = kernel + kright;
64198 SumType sum = NumericTraits<SumType>::zero();
64199
64200 SrcIterator iss = is + (-kright);
64201 SrcIterator isend = is + (1 - kleft);
64202 for(; iss != isend ; --ik, ++iss)
64203 {
64204 sum += ka(ik) * sa(iss);
64205 }
64206
64207 da.set(NumericTraits<typename
64208 DestAccessor::value_type>::fromRealPromote(sum), id);
64209 }
64210 }
64211 # 531 "../include/vigra/separableconvolution.hxx"
64212 template <class SrcIterator, class SrcAccessor,
64213 class DestIterator, class DestAccessor,
64214 class KernelIterator, class KernelAccessor>
64215 void convolveLine(SrcIterator is, SrcIterator iend, SrcAccessor sa,
64216 DestIterator id, DestAccessor da,
64217 KernelIterator ik, KernelAccessor ka,
64218 int kleft, int kright, BorderTreatmentMode border)
64219 {
64220 typedef typename KernelAccessor::value_type KernelValue;
64221
64222 vigra::throw_precondition_error((kleft <= 0), "convolveLine(): kleft must be <= 0.\n");
64223
64224 vigra::throw_precondition_error((kright >= 0), "convolveLine(): kright must be >= 0.\n");
64225
64226
64227
64228 int w = std::distance( is, iend );
64229
64230 vigra::throw_precondition_error((w >= kright - kleft + 1), "convolveLine(): kernel longer than line\n");
64231
64232
64233 switch(border)
64234 {
64235 case BORDER_TREATMENT_WRAP:
64236 {
64237 internalConvolveLineWrap(is, iend, sa, id, da, ik, ka, kleft, kright);
64238 break;
64239 }
64240 case BORDER_TREATMENT_AVOID:
64241 {
64242 internalConvolveLineAvoid(is, iend, sa, id, da, ik, ka, kleft, kright);
64243 break;
64244 }
64245 case BORDER_TREATMENT_REFLECT:
64246 {
64247 internalConvolveLineReflect(is, iend, sa, id, da, ik, ka, kleft, kright);
64248 break;
64249 }
64250 case BORDER_TREATMENT_REPEAT:
64251 {
64252 internalConvolveLineRepeat(is, iend, sa, id, da, ik, ka, kleft, kright);
64253 break;
64254 }
64255 case BORDER_TREATMENT_CLIP:
64256 {
64257
64258 typedef typename KernelAccessor::value_type KT;
64259 KT norm = NumericTraits<KT>::zero();
64260 KernelIterator iik = ik + kleft;
64261 for(int i=kleft; i<=kright; ++i, ++iik) norm += ka(iik);
64262
64263 vigra::throw_precondition_error((norm != NumericTraits<KT>::zero()), "convolveLine(): Norm of kernel must be != 0" " in mode BORDER_TREATMENT_CLIP.\n");
64264
64265
64266
64267 internalConvolveLineClip(is, iend, sa, id, da, ik, ka, kleft, kright, norm);
64268 break;
64269 }
64270 default:
64271 {
64272 vigra::throw_precondition_error((0), "convolveLine(): Unknown border treatment mode.\n");
64273
64274 }
64275 }
64276 }
64277
64278 template <class SrcIterator, class SrcAccessor,
64279 class DestIterator, class DestAccessor,
64280 class KernelIterator, class KernelAccessor>
64281 inline
64282 void convolveLine(triple<SrcIterator, SrcIterator, SrcAccessor> src,
64283 pair<DestIterator, DestAccessor> dest,
64284 tuple5<KernelIterator, KernelAccessor,
64285 int, int, BorderTreatmentMode> kernel)
64286 {
64287 convolveLine(src.first, src.second, src.third,
64288 dest.first, dest.second,
64289 kernel.first, kernel.second,
64290 kernel.third, kernel.fourth, kernel.fifth);
64291 }
64292 # 672 "../include/vigra/separableconvolution.hxx"
64293 template <class SrcIterator, class SrcAccessor,
64294 class DestIterator, class DestAccessor,
64295 class KernelIterator, class KernelAccessor>
64296 void separableConvolveX(SrcIterator supperleft,
64297 SrcIterator slowerright, SrcAccessor sa,
64298 DestIterator dupperleft, DestAccessor da,
64299 KernelIterator ik, KernelAccessor ka,
64300 int kleft, int kright, BorderTreatmentMode border)
64301 {
64302 typedef typename KernelAccessor::value_type KernelValue;
64303
64304 vigra::throw_precondition_error((kleft <= 0), "separableConvolveX(): kleft must be <= 0.\n");
64305
64306 vigra::throw_precondition_error((kright >= 0), "separableConvolveX(): kright must be >= 0.\n");
64307
64308
64309 int w = slowerright.x - supperleft.x;
64310 int h = slowerright.y - supperleft.y;
64311
64312 vigra::throw_precondition_error((w >= kright - kleft + 1), "separableConvolveX(): kernel longer than line\n");
64313
64314
64315 int y;
64316
64317 for(y=0; y<h; ++y, ++supperleft.y, ++dupperleft.y)
64318 {
64319 typename SrcIterator::row_iterator rs = supperleft.rowIterator();
64320 typename DestIterator::row_iterator rd = dupperleft.rowIterator();
64321
64322 convolveLine(rs, rs+w, sa, rd, da,
64323 ik, ka, kleft, kright, border);
64324 }
64325 }
64326
64327 template <class SrcIterator, class SrcAccessor,
64328 class DestIterator, class DestAccessor,
64329 class KernelIterator, class KernelAccessor>
64330 inline void
64331 separableConvolveX(triple<SrcIterator, SrcIterator, SrcAccessor> src,
64332 pair<DestIterator, DestAccessor> dest,
64333 tuple5<KernelIterator, KernelAccessor,
64334 int, int, BorderTreatmentMode> kernel)
64335 {
64336 separableConvolveX(src.first, src.second, src.third,
64337 dest.first, dest.second,
64338 kernel.first, kernel.second,
64339 kernel.third, kernel.fourth, kernel.fifth);
64340 }
64341 # 783 "../include/vigra/separableconvolution.hxx"
64342 template <class SrcIterator, class SrcAccessor,
64343 class DestIterator, class DestAccessor,
64344 class KernelIterator, class KernelAccessor>
64345 void separableConvolveY(SrcIterator supperleft,
64346 SrcIterator slowerright, SrcAccessor sa,
64347 DestIterator dupperleft, DestAccessor da,
64348 KernelIterator ik, KernelAccessor ka,
64349 int kleft, int kright, BorderTreatmentMode border)
64350 {
64351 typedef typename KernelAccessor::value_type KernelValue;
64352
64353 vigra::throw_precondition_error((kleft <= 0), "separableConvolveY(): kleft must be <= 0.\n");
64354
64355 vigra::throw_precondition_error((kright >= 0), "separableConvolveY(): kright must be >= 0.\n");
64356
64357
64358 int w = slowerright.x - supperleft.x;
64359 int h = slowerright.y - supperleft.y;
64360
64361 vigra::throw_precondition_error((h >= kright - kleft + 1), "separableConvolveY(): kernel longer than line\n");
64362
64363
64364 int x;
64365
64366 for(x=0; x<w; ++x, ++supperleft.x, ++dupperleft.x)
64367 {
64368 typename SrcIterator::column_iterator cs = supperleft.columnIterator();
64369 typename DestIterator::column_iterator cd = dupperleft.columnIterator();
64370
64371 convolveLine(cs, cs+h, sa, cd, da,
64372 ik, ka, kleft, kright, border);
64373 }
64374 }
64375
64376 template <class SrcIterator, class SrcAccessor,
64377 class DestIterator, class DestAccessor,
64378 class KernelIterator, class KernelAccessor>
64379 inline void
64380 separableConvolveY(triple<SrcIterator, SrcIterator, SrcAccessor> src,
64381 pair<DestIterator, DestAccessor> dest,
64382 tuple5<KernelIterator, KernelAccessor,
64383 int, int, BorderTreatmentMode> kernel)
64384 {
64385 separableConvolveY(src.first, src.second, src.third,
64386 dest.first, dest.second,
64387 kernel.first, kernel.second,
64388 kernel.third, kernel.fourth, kernel.fifth);
64389 }
64390 # 885 "../include/vigra/separableconvolution.hxx"
64391 template <class ARITHTYPE>
64392 class Kernel1D
64393 {
64394 public:
64395 typedef ArrayVector<ARITHTYPE> InternalVector;
64396
64397
64398
64399 typedef typename InternalVector::value_type value_type;
64400
64401
64402
64403 typedef typename InternalVector::reference reference;
64404
64405
64406
64407 typedef typename InternalVector::const_reference const_reference;
64408
64409
64410
64411 typedef typename InternalVector::iterator Iterator;
64412
64413
64414
64415 typedef typename InternalVector::iterator iterator;
64416
64417
64418
64419 typedef typename InternalVector::const_iterator const_iterator;
64420
64421
64422
64423 typedef StandardAccessor<ARITHTYPE> Accessor;
64424
64425
64426
64427 typedef StandardConstAccessor<ARITHTYPE> ConstAccessor;
64428
64429 struct InitProxy
64430 {
64431 InitProxy(Iterator i, int count, value_type & norm)
64432 : iter_(i), base_(i),
64433 count_(count), sum_(count),
64434 norm_(norm)
64435 {}
64436
64437 ~InitProxy()
64438 {
64439 vigra::throw_precondition_error((count_ == 1 || count_ == sum_), "Kernel1D::initExplicitly(): " "Too few init values.");
64440
64441
64442 }
64443
64444 InitProxy & operator,(value_type const & v)
64445 {
64446 if(sum_ == count_) norm_ = *iter_;
64447
64448 norm_ += v;
64449
64450 --count_;
64451 vigra::throw_precondition_error((count_ > 0), "Kernel1D::initExplicitly(): " "Too many init values.");
64452
64453
64454
64455 ++iter_;
64456 *iter_ = v;
64457
64458 return *this;
64459 }
64460
64461 Iterator iter_, base_;
64462 int count_, sum_;
64463 value_type & norm_;
64464 };
64465
64466 static value_type one() { return NumericTraits<value_type>::one(); }
64467
64468
64469
64470
64471
64472 Kernel1D()
64473 : kernel_(),
64474 left_(0),
64475 right_(0),
64476 border_treatment_(BORDER_TREATMENT_CLIP),
64477 norm_(one())
64478 {
64479 kernel_.push_back(norm_);
64480 }
64481
64482
64483
64484 Kernel1D(Kernel1D const & k)
64485 : kernel_(k.kernel_),
64486 left_(k.left_),
64487 right_(k.right_),
64488 border_treatment_(k.border_treatment_),
64489 norm_(k.norm_)
64490 {}
64491
64492
64493
64494 Kernel1D & operator=(Kernel1D const & k)
64495 {
64496 if(this != &k)
64497 {
64498 left_ = k.left_;
64499 right_ = k.right_;
64500 border_treatment_ = k.border_treatment_;
64501 norm_ = k.norm_;
64502 kernel_ = k.kernel_;
64503 }
64504 return *this;
64505 }
64506 # 1017 "../include/vigra/separableconvolution.hxx"
64507 InitProxy operator=(value_type const & v)
64508 {
64509 int size = right_ - left_ + 1;
64510 for(unsigned int i=0; i<kernel_.size(); ++i) kernel_[i] = v;
64511 norm_ = (double)size*v;
64512
64513 return InitProxy(kernel_.begin(), size, norm_);
64514 }
64515
64516
64517
64518 ~Kernel1D()
64519 {}
64520 # 1053 "../include/vigra/separableconvolution.hxx"
64521 void initGaussian(double std_dev, value_type norm);
64522
64523
64524
64525 void initGaussian(double std_dev)
64526 {
64527 initGaussian(std_dev, one());
64528 }
64529 # 1080 "../include/vigra/separableconvolution.hxx"
64530 void initDiscreteGaussian(double std_dev, value_type norm);
64531
64532
64533
64534
64535 void initDiscreteGaussian(double std_dev)
64536 {
64537 initDiscreteGaussian(std_dev, one());
64538 }
64539 # 1120 "../include/vigra/separableconvolution.hxx"
64540 void initGaussianDerivative(double std_dev, int order, value_type norm);
64541
64542
64543
64544 void initGaussianDerivative(double std_dev, int order)
64545 {
64546 initGaussianDerivative(std_dev, order, one());
64547 }
64548 # 1146 "../include/vigra/separableconvolution.hxx"
64549 void initBinomial(int radius, value_type norm);
64550
64551
64552
64553 void initBinomial(int radius)
64554 {
64555 initBinomial(radius, one());
64556 }
64557 # 1172 "../include/vigra/separableconvolution.hxx"
64558 void initAveraging(int radius, value_type norm);
64559
64560
64561
64562 void initAveraging(int radius)
64563 {
64564 initAveraging(radius, one());
64565 }
64566 # 1193 "../include/vigra/separableconvolution.hxx"
64567 void
64568 initSymmetricGradient(value_type norm );
64569
64570
64571
64572 void initSymmetricGradient()
64573 {
64574 initSymmetricGradient(one());
64575 }
64576 # 1237 "../include/vigra/separableconvolution.hxx"
64577 Kernel1D & initExplicitly(int left, int right)
64578 {
64579 vigra::throw_precondition_error((left <= 0), "Kernel1D::initExplicitly(): left border must be <= 0.");
64580
64581 vigra::throw_precondition_error((right >= 0), "Kernel1D::initExplicitly(): right border must be <= 0.");
64582
64583
64584 right_ = right;
64585 left_ = left;
64586
64587 kernel_.resize(right - left + 1);
64588
64589 return *this;
64590 }
64591 # 1260 "../include/vigra/separableconvolution.hxx"
64592 iterator center()
64593 {
64594 return kernel_.begin() - left();
64595 }
64596
64597 const_iterator center() const
64598 {
64599 return kernel_.begin() - left();
64600 }
64601 # 1278 "../include/vigra/separableconvolution.hxx"
64602 reference operator[](int location)
64603 {
64604 return kernel_[location - left()];
64605 }
64606
64607 const_reference operator[](int location) const
64608 {
64609 return kernel_[location - left()];
64610 }
64611
64612
64613
64614 int left() const { return left_; }
64615
64616
64617
64618 int right() const { return right_; }
64619
64620
64621
64622 int size() const { return right_ - left_ + 1; }
64623
64624
64625
64626 BorderTreatmentMode borderTreatment() const
64627 { return border_treatment_; }
64628
64629
64630
64631 void setBorderTreatment( BorderTreatmentMode new_mode)
64632 { border_treatment_ = new_mode; }
64633
64634
64635
64636 value_type norm() const { return norm_; }
64637
64638
64639
64640
64641 void
64642 normalize(value_type norm, unsigned int derivativeOrder = 0, double offset = 0.0);
64643
64644
64645
64646 void
64647 normalize()
64648 {
64649 normalize(one());
64650 }
64651
64652
64653
64654 ConstAccessor accessor() const { return ConstAccessor(); }
64655
64656
64657
64658 Accessor accessor() { return Accessor(); }
64659
64660 private:
64661 InternalVector kernel_;
64662 int left_, right_;
64663 BorderTreatmentMode border_treatment_;
64664 value_type norm_;
64665 };
64666
64667 template <class ARITHTYPE>
64668 void Kernel1D<ARITHTYPE>::normalize(value_type norm,
64669 unsigned int derivativeOrder,
64670 double offset)
64671 {
64672 typedef typename NumericTraits<value_type>::RealPromote TmpType;
64673
64674
64675 Iterator k = kernel_.begin();
64676 TmpType sum = NumericTraits<TmpType>::zero();
64677
64678 if(derivativeOrder == 0)
64679 {
64680 for(; k < kernel_.end(); ++k)
64681 {
64682 sum += *k;
64683 }
64684 }
64685 else
64686 {
64687 unsigned int faculty = 1;
64688 for(unsigned int i = 2; i <= derivativeOrder; ++i)
64689 faculty *= i;
64690 for(double x = left() + offset; k < kernel_.end(); ++x, ++k)
64691 {
64692 sum += *k * std::pow(-x, int(derivativeOrder)) / faculty;
64693 }
64694 }
64695
64696 vigra::throw_precondition_error((sum != NumericTraits<value_type>::zero()), "Kernel1D<ARITHTYPE>::normalize(): " "Cannot normalize a kernel with sum = 0");
64697
64698
64699
64700 sum = norm / sum;
64701 k = kernel_.begin();
64702 for(; k != kernel_.end(); ++k)
64703 {
64704 *k = *k * sum;
64705 }
64706
64707 norm_ = norm;
64708 }
64709
64710
64711
64712 template <class ARITHTYPE>
64713 void Kernel1D<ARITHTYPE>::initGaussian(double std_dev,
64714 value_type norm)
64715 {
64716 vigra::throw_precondition_error((std_dev >= 0.0), "Kernel1D::initGaussian(): Standard deviation must be >= 0.");
64717
64718
64719 if(std_dev > 0.0)
64720 {
64721 Gaussian<ARITHTYPE> gauss(std_dev);
64722
64723
64724 int radius = (int)(3.0 * std_dev + 0.5);
64725 if(radius == 0)
64726 radius = 1;
64727
64728
64729 kernel_.erase(kernel_.begin(), kernel_.end());
64730 kernel_.reserve(radius*2+1);
64731
64732 for(ARITHTYPE x = -radius; x <= radius; ++x)
64733 {
64734 kernel_.push_back(gauss(x));
64735 }
64736 left_ = -radius;
64737 right_ = radius;
64738 }
64739 else
64740 {
64741 kernel_.erase(kernel_.begin(), kernel_.end());
64742 kernel_.push_back(1.0);
64743 left_ = 0;
64744 right_ = 0;
64745 }
64746
64747 if(norm != 0.0)
64748 normalize(norm);
64749 else
64750 norm_ = 1.0;
64751
64752
64753 border_treatment_ = BORDER_TREATMENT_CLIP;
64754 }
64755
64756
64757
64758 template <class ARITHTYPE>
64759 void Kernel1D<ARITHTYPE>::initDiscreteGaussian(double std_dev,
64760 value_type norm)
64761 {
64762 vigra::throw_precondition_error((std_dev >= 0.0), "Kernel1D::initDiscreteGaussian(): Standard deviation must be >= 0.");
64763
64764
64765 if(std_dev > 0.0)
64766 {
64767
64768 int radius = (int)(3.0*std_dev + 0.5);
64769 if(radius == 0)
64770 radius = 1;
64771
64772 double f = 2.0 / std_dev / std_dev;
64773
64774
64775 int maxIndex = (int)(2.0 * (radius + 5.0 * std::sqrt((double)radius)) + 0.5);
64776 InternalVector warray(maxIndex+1);
64777 warray[maxIndex] = 0.0;
64778 warray[maxIndex-1] = 1.0;
64779
64780 for(int i = maxIndex-2; i >= radius; --i)
64781 {
64782 warray[i] = warray[i+2] + f * (i+1) * warray[i+1];
64783 if(warray[i] > 1.0e40)
64784 {
64785 warray[i+1] /= warray[i];
64786 warray[i] = 1.0;
64787 }
64788 }
64789
64790
64791
64792 double er = std::exp(-radius*radius / (2.0*std_dev*std_dev));
64793 warray[radius+1] = er * warray[radius+1] / warray[radius];
64794 warray[radius] = er;
64795
64796 for(int i = radius-1; i >= 0; --i)
64797 {
64798 warray[i] = warray[i+2] + f * (i+1) * warray[i+1];
64799 er += warray[i];
64800 }
64801
64802 double scale = norm / (2*er - warray[0]);
64803
64804 initExplicitly(-radius, radius);
64805 iterator c = center();
64806
64807 for(int i=0; i<=radius; ++i)
64808 {
64809 c[i] = c[-i] = warray[i] * scale;
64810 }
64811 }
64812 else
64813 {
64814 kernel_.erase(kernel_.begin(), kernel_.end());
64815 kernel_.push_back(norm);
64816 left_ = 0;
64817 right_ = 0;
64818 }
64819
64820 norm_ = norm;
64821
64822
64823 border_treatment_ = BORDER_TREATMENT_REFLECT;
64824 }
64825
64826
64827
64828 template <class ARITHTYPE>
64829 void
64830 Kernel1D<ARITHTYPE>::initGaussianDerivative(double std_dev,
64831 int order,
64832 value_type norm)
64833 {
64834 vigra::throw_precondition_error((order >= 0), "Kernel1D::initGaussianDerivative(): Order must be >= 0.");
64835
64836
64837 if(order == 0)
64838 {
64839 initGaussian(std_dev, norm);
64840 return;
64841 }
64842
64843 vigra::throw_precondition_error((std_dev > 0.0), "Kernel1D::initGaussianDerivative(): " "Standard deviation must be > 0.");
64844
64845
64846
64847 Gaussian<ARITHTYPE> gauss(std_dev, order);
64848
64849
64850 int radius = (int)(3.0 * std_dev + 0.5 * order + 0.5);
64851 if(radius == 0)
64852 radius = 1;
64853
64854
64855 kernel_.clear();
64856 kernel_.reserve(radius*2+1);
64857
64858
64859
64860 ARITHTYPE dc = 0.0;
64861 for(ARITHTYPE x = -radius; x <= radius; ++x)
64862 {
64863 kernel_.push_back(gauss(x));
64864 dc += kernel_[kernel_.size()-1];
64865 }
64866 dc /= (2.0*radius + 1.0);
64867
64868
64869
64870 if(norm != 0.0)
64871 {
64872 for(unsigned int i=0; i < kernel_.size(); ++i)
64873 {
64874 kernel_[i] -= dc;
64875 }
64876 }
64877
64878 left_ = -radius;
64879 right_ = radius;
64880
64881 if(norm != 0.0)
64882 normalize(norm, order);
64883 else
64884 norm_ = 1.0;
64885
64886
64887
64888 border_treatment_ = BORDER_TREATMENT_REPEAT;
64889 }
64890
64891
64892
64893 template <class ARITHTYPE>
64894 void
64895 Kernel1D<ARITHTYPE>::initBinomial(int radius,
64896 value_type norm)
64897 {
64898 vigra::throw_precondition_error((radius > 0), "Kernel1D::initBinomial(): Radius must be > 0.");
64899
64900
64901
64902 InternalVector kernel(radius*2+1);
64903
64904 int i,j;
64905 for(i=0; i<radius*2+1; ++i) kernel[i] = 0;
64906
64907
64908 typename InternalVector::iterator x = kernel.begin() + radius;
64909 x[radius] = 1.0;
64910
64911 for(j=radius-1; j>=-radius; --j)
64912 {
64913 for(i=j; i<radius; ++i)
64914 {
64915 x[i] = (x[i] + x[i+1]) / 2.0;
64916 }
64917 x[radius] /= 2.0;
64918 }
64919
64920
64921 kernel_.erase(kernel_.begin(), kernel_.end());
64922 kernel_.reserve(radius*2+1);
64923
64924 for(i=0; i<=radius*2+1; ++i)
64925 {
64926 kernel_.push_back(kernel[i] * norm);
64927 }
64928
64929 left_ = -radius;
64930 right_ = radius;
64931 norm_ = norm;
64932
64933
64934 border_treatment_ = BORDER_TREATMENT_REFLECT;
64935 }
64936
64937
64938
64939 template <class ARITHTYPE>
64940 void Kernel1D<ARITHTYPE>::initAveraging(int radius,
64941 value_type norm)
64942 {
64943 vigra::throw_precondition_error((radius > 0), "Kernel1D::initAveraging(): Radius must be > 0.");
64944
64945
64946
64947 double scale = 1.0 / (radius * 2 + 1);
64948
64949
64950 kernel_.erase(kernel_.begin(), kernel_.end());
64951 kernel_.reserve(radius*2+1);
64952
64953 for(int i=0; i<=radius*2+1; ++i)
64954 {
64955 kernel_.push_back(scale * norm);
64956 }
64957
64958 left_ = -radius;
64959 right_ = radius;
64960 norm_ = norm;
64961
64962
64963 border_treatment_ = BORDER_TREATMENT_CLIP;
64964 }
64965
64966
64967
64968 template <class ARITHTYPE>
64969 void
64970 Kernel1D<ARITHTYPE>::initSymmetricGradient(value_type norm)
64971 {
64972 kernel_.erase(kernel_.begin(), kernel_.end());
64973 kernel_.reserve(3);
64974
64975 kernel_.push_back(0.5 * norm);
64976 kernel_.push_back(0.0 * norm);
64977 kernel_.push_back(-0.5 * norm);
64978
64979 left_ = -1;
64980 right_ = 1;
64981 norm_ = norm;
64982
64983
64984
64985 border_treatment_ = BORDER_TREATMENT_REPEAT;
64986 }
64987 # 1672 "../include/vigra/separableconvolution.hxx"
64988 template <class KernelIterator, class KernelAccessor>
64989 inline
64990 tuple5<KernelIterator, KernelAccessor, int, int, BorderTreatmentMode>
64991 kernel1d(KernelIterator ik, KernelAccessor ka,
64992 int kleft, int kright, BorderTreatmentMode border)
64993 {
64994 return
64995 tuple5<KernelIterator, KernelAccessor, int, int, BorderTreatmentMode>(
64996 ik, ka, kleft, kright, border);
64997 }
64998
64999 template <class T>
65000 inline
65001 tuple5<typename Kernel1D<T>::const_iterator, typename Kernel1D<T>::ConstAccessor,
65002 int, int, BorderTreatmentMode>
65003 kernel1d(Kernel1D<T> const & k)
65004
65005 {
65006 return
65007 tuple5<typename Kernel1D<T>::const_iterator, typename Kernel1D<T>::ConstAccessor,
65008 int, int, BorderTreatmentMode>(
65009 k.center(),
65010 k.accessor(),
65011 k.left(), k.right(),
65012 k.borderTreatment());
65013 }
65014
65015 template <class T>
65016 inline
65017 tuple5<typename Kernel1D<T>::const_iterator, typename Kernel1D<T>::ConstAccessor,
65018 int, int, BorderTreatmentMode>
65019 kernel1d(Kernel1D<T> const & k, BorderTreatmentMode border)
65020
65021 {
65022 return
65023 tuple5<typename Kernel1D<T>::const_iterator, typename Kernel1D<T>::ConstAccessor,
65024 int, int, BorderTreatmentMode>(
65025 k.center(),
65026 k.accessor(),
65027 k.left(), k.right(),
65028 border);
65029 }
65030
65031
65032 }
65033 # 45 "../include/vigra/stdconvolution.hxx" 2
65034
65035
65036
65037 namespace vigra {
65038
65039 template <class SrcIterator, class SrcAccessor,
65040 class DestIterator, class DestAccessor,
65041 class KernelIterator, class KernelAccessor,
65042 class KSumType>
65043 void internalPixelEvaluationByClip(int x, int y, int w, int h, SrcIterator xs,
65044 SrcAccessor src_acc, DestIterator xd, DestAccessor dest_acc,
65045 KernelIterator ki, Diff2D kul, Diff2D klr, KernelAccessor ak,
65046 KSumType norm)
65047 {
65048 typedef typename
65049 NumericTraits<typename SrcAccessor::value_type>::RealPromote SumType;
65050 typedef
65051 NumericTraits<typename DestAccessor::value_type> DestTraits;
65052
65053
65054 int kernel_width = klr.x - kul.x + 1;
65055 int kernel_height = klr.y - kul.y + 1;
65056
65057 SumType sum = NumericTraits<SumType>::zero();
65058 int xx, yy;
65059 int x0, y0, x1, y1;
65060
65061 y0 = (y<klr.y) ? -y : -klr.y;
65062 y1 = (h-y-1<-kul.y) ? h-y-1 : -kul.y;
65063
65064 x0 = (x<klr.x) ? -x : -klr.x;
65065 x1 = (w-x-1<-kul.x) ? w-x-1 : -kul.x;
65066
65067 SrcIterator yys = xs + Diff2D(x0, y0);
65068 KernelIterator yk = ki - Diff2D(x0, y0);
65069
65070 KSumType ksum = NumericTraits<KSumType>::zero();
65071 kernel_width = x1 - x0 + 1;
65072 kernel_height = y1 - y0 + 1;
65073
65074
65075
65076 for(yy=0; yy<kernel_height; ++yy, ++yys.y, --yk.y)
65077 {
65078 SrcIterator xxs = yys;
65079 KernelIterator xk = yk;
65080
65081 for(xx=0; xx<kernel_width; ++xx, ++xxs.x, --xk.x)
65082 {
65083 sum += ak(xk) * src_acc(xxs);
65084 ksum += ak(xk);
65085 }
65086 }
65087
65088
65089 dest_acc.set(DestTraits::fromRealPromote((norm / ksum) * sum), xd);
65090
65091 }
65092 # 290 "../include/vigra/stdconvolution.hxx"
65093 template <class SrcIterator, class SrcAccessor,
65094 class KernelIterator, class KernelAccessor,
65095 class SumType>
65096 void
65097 internalPixelEvaluationByWrapReflectRepeat(SrcIterator xs, SrcAccessor src_acc,
65098 KernelIterator xk, KernelAccessor ak,
65099 int left, int right, int kleft, int kright,
65100 int borderskipx, int borderinc, SumType & sum)
65101 {
65102 SrcIterator xxs = xs + left;
65103 KernelIterator xxk = xk - left;
65104
65105 for(int xx = left; xx <= right; ++xx, ++xxs, --xxk)
65106 {
65107 sum += ak(xxk) * src_acc(xxs);
65108 }
65109
65110 xxs = xs + left - borderskipx;
65111 xxk = xk - left + 1;
65112 for(int xx = left - 1; xx >= -kright; --xx, xxs -= borderinc, ++xxk)
65113 {
65114 sum += ak(xxk) * src_acc(xxs);
65115 }
65116
65117 xxs = xs + right + borderskipx;
65118 xxk = xk - right - 1;
65119 for(int xx = right + 1; xx <= -kleft; ++xx, xxs += borderinc, --xxk)
65120 {
65121 sum += ak(xxk) * src_acc(xxs);
65122 }
65123 }
65124 # 452 "../include/vigra/stdconvolution.hxx"
65125 template <class SrcIterator, class SrcAccessor,
65126 class DestIterator, class DestAccessor,
65127 class KernelIterator, class KernelAccessor>
65128 void convolveImage(SrcIterator src_ul, SrcIterator src_lr, SrcAccessor src_acc,
65129 DestIterator dest_ul, DestAccessor dest_acc,
65130 KernelIterator ki, KernelAccessor ak,
65131 Diff2D kul, Diff2D klr, BorderTreatmentMode border)
65132 {
65133 vigra::throw_precondition_error(((border == BORDER_TREATMENT_CLIP || border == BORDER_TREATMENT_AVOID || border == BORDER_TREATMENT_REFLECT || border == BORDER_TREATMENT_REPEAT || border == BORDER_TREATMENT_WRAP)), "convolveImage():\n" " Border treatment must be one of follow treatments:\n" " - BORDER_TREATMENT_CLIP\n" " - BORDER_TREATMENT_AVOID\n" " - BORDER_TREATMENT_REFLECT\n" " - BORDER_TREATMENT_REPEAT\n" " - BORDER_TREATMENT_WRAP\n");
65134 # 473 "../include/vigra/stdconvolution.hxx"
65135 vigra::throw_precondition_error((kul.x <= 0 && kul.y <= 0), "convolveImage(): coordinates of " "kernel's upper left must be <= 0.");
65136
65137
65138 vigra::throw_precondition_error((klr.x >= 0 && klr.y >= 0), "convolveImage(): coordinates of " "kernel's lower right must be >= 0.");
65139
65140
65141
65142
65143 typedef typename
65144 PromoteTraits<typename SrcAccessor::value_type,
65145 typename KernelAccessor::value_type>::Promote SumType;
65146 typedef typename
65147 NumericTraits<typename KernelAccessor::value_type>::RealPromote KernelSumType;
65148 typedef
65149 NumericTraits<typename DestAccessor::value_type> DestTraits;
65150
65151
65152 int w = src_lr.x - src_ul.x;
65153 int h = src_lr.y - src_ul.y;
65154
65155
65156 int kernel_width = klr.x - kul.x + 1;
65157 int kernel_height = klr.y - kul.y + 1;
65158
65159 vigra::throw_precondition_error((w >= kernel_width && h >= kernel_height), "convolveImage(): kernel larger than image.");
65160
65161
65162 int x,y;
65163 x = 0;
65164 y = 0;
65165
65166 KernelSumType norm = NumericTraits<KernelSumType>::zero();
65167 if(border == BORDER_TREATMENT_CLIP)
65168 {
65169
65170 KernelIterator yk = ki + klr;
65171
65172
65173 for(y=0; y<kernel_height; ++y, --yk.y)
65174 {
65175 KernelIterator xk = yk;
65176 for(x=0; x<kernel_width; ++x, --xk.x)
65177 {
65178 norm += ak(xk);
65179 }
65180 }
65181 vigra::throw_precondition_error((norm != NumericTraits<KernelSumType>::zero()), "convolveImage(): Cannot use BORDER_TREATMENT_CLIP with a DC-free kernel");
65182
65183 }
65184
65185
65186 DestIterator yd = dest_ul + Diff2D(klr.x, klr.y);
65187 SrcIterator ys = src_ul + Diff2D(klr.x, klr.y);
65188 SrcIterator send = src_lr + Diff2D(kul.x, kul.y);
65189
65190
65191 for(; ys.y < send.y; ++ys.y, ++yd.y)
65192 {
65193
65194 DestIterator xd(yd);
65195 SrcIterator xs(ys);
65196
65197 for(; xs.x < send.x; ++x, ++xs.x, ++xd.x)
65198 {
65199
65200 SumType sum = NumericTraits<SumType>::zero();
65201
65202 SrcIterator yys = xs - klr;
65203 SrcIterator yyend = xs - kul;
65204 KernelIterator yk = ki + klr;
65205
65206 for(; yys.y <= yyend.y; ++yys.y, --yk.y)
65207 {
65208 typename SrcIterator::row_iterator xxs = yys.rowIterator();
65209 typename SrcIterator::row_iterator xxe = xxs + kernel_width;
65210 typename KernelIterator::row_iterator xk = yk.rowIterator();
65211
65212 for(; xxs < xxe; ++xxs, --xk)
65213 {
65214 sum += ak(xk) * src_acc(xxs);
65215 }
65216 }
65217
65218
65219 dest_acc.set(DestTraits::fromRealPromote(sum), xd);
65220 }
65221 }
65222
65223 if(border == BORDER_TREATMENT_AVOID)
65224 return;
65225
65226 int interiorskip = w + kul.x - klr.x - 1;
65227 int borderskipx;
65228 int borderskipy;
65229 int borderinc;
65230 if(border == BORDER_TREATMENT_REPEAT)
65231 {
65232 borderskipx = 0;
65233 borderskipy = 0;
65234 borderinc = 0;
65235 }
65236 else if(border == BORDER_TREATMENT_REFLECT)
65237 {
65238 borderskipx = -1;
65239 borderskipy = -1;
65240 borderinc = -1;
65241 }
65242 else if(border == BORDER_TREATMENT_WRAP)
65243 {
65244 borderskipx = -w+1;
65245 borderskipy = -h+1;
65246 borderinc = 1;
65247 }
65248
65249
65250 yd = dest_ul;
65251 ys = src_ul;
65252
65253
65254 for(y=0; y < h; ++y, ++ys.y, ++yd.y)
65255 {
65256 int top = std::max(static_cast<IntBiggest>(-klr.y),
65257 static_cast<IntBiggest>(src_ul.y - ys.y));
65258 int bottom = std::min(static_cast<IntBiggest>(-kul.y),
65259 static_cast<IntBiggest>(src_lr.y - ys.y - 1));
65260
65261
65262 DestIterator xd(yd);
65263 SrcIterator xs(ys);
65264
65265 for(x=0; x < w; ++x, ++xs.x, ++xd.x)
65266 {
65267
65268 if(y >= klr.y && y < h+kul.y && x == klr.x)
65269 {
65270
65271 x += interiorskip;
65272 xs.x += interiorskip;
65273 xd.x += interiorskip;
65274 continue;
65275 }
65276 if (border == BORDER_TREATMENT_CLIP)
65277 {
65278 internalPixelEvaluationByClip(x, y, w, h, xs, src_acc, xd, dest_acc, ki, kul, klr, ak, norm);
65279 }
65280 else
65281 {
65282 int left = std::max(-klr.x, src_ul.x - xs.x);
65283 int right = std::min(-kul.x, src_lr.x - xs.x - 1);
65284
65285
65286 SumType sum = NumericTraits<SumType>::zero();
65287
65288
65289 SrcIterator yys = xs + Size2D(0, top);
65290 KernelIterator yk = ki - Size2D(0, top);
65291
65292 int yy;
65293 for(yy = top; yy <= bottom; ++yy, ++yys.y, --yk.y)
65294 {
65295 internalPixelEvaluationByWrapReflectRepeat(yys.rowIterator(), src_acc, yk.rowIterator(), ak,
65296 left, right, kul.x, klr.x, borderskipx, borderinc, sum);
65297 }
65298 yys = xs + Size2D(0, top - borderskipy);
65299 yk = ki - Size2D(0, top - 1);
65300 for(yy = top - 1; yy >= -klr.y; --yy, yys.y -= borderinc, ++yk.y)
65301 {
65302 internalPixelEvaluationByWrapReflectRepeat(yys.rowIterator(), src_acc, yk.rowIterator(), ak,
65303 left, right, kul.x, klr.x, borderskipx, borderinc, sum);
65304 }
65305 yys = xs + Size2D(0, bottom + borderskipy);
65306 yk = ki - Size2D(0, bottom + 1);
65307 for(yy = bottom + 1; yy <= -kul.y; ++yy, yys.y += borderinc, --yk.y)
65308 {
65309 internalPixelEvaluationByWrapReflectRepeat(yys.rowIterator(), src_acc, yk.rowIterator(), ak,
65310 left, right, kul.x, klr.x, borderskipx, borderinc, sum);
65311 }
65312
65313
65314 dest_acc.set(DestTraits::fromRealPromote(sum), xd);
65315
65316
65317 }
65318 }
65319 }
65320 }
65321
65322
65323 template <class SrcIterator, class SrcAccessor,
65324 class DestIterator, class DestAccessor,
65325 class KernelIterator, class KernelAccessor>
65326 inline
65327 void convolveImage(
65328 triple<SrcIterator, SrcIterator, SrcAccessor> src,
65329 pair<DestIterator, DestAccessor> dest,
65330 tuple5<KernelIterator, KernelAccessor, Diff2D, Diff2D,
65331 BorderTreatmentMode> kernel)
65332 {
65333 convolveImage(src.first, src.second, src.third,
65334 dest.first, dest.second,
65335 kernel.first, kernel.second, kernel.third,
65336 kernel.fourth, kernel.fifth);
65337 }
65338 # 818 "../include/vigra/stdconvolution.hxx"
65339 template <class SrcIterator, class SrcAccessor,
65340 class DestIterator, class DestAccessor,
65341 class MaskIterator, class MaskAccessor,
65342 class KernelIterator, class KernelAccessor>
65343 void
65344 normalizedConvolveImage(SrcIterator src_ul, SrcIterator src_lr, SrcAccessor src_acc,
65345 MaskIterator mul, MaskAccessor am,
65346 DestIterator dest_ul, DestAccessor dest_acc,
65347 KernelIterator ki, KernelAccessor ak,
65348 Diff2D kul, Diff2D klr, BorderTreatmentMode border)
65349 {
65350 vigra::throw_precondition_error(((border == BORDER_TREATMENT_CLIP || border == BORDER_TREATMENT_AVOID)), "normalizedConvolveImage(): " "Border treatment must be BORDER_TREATMENT_CLIP or BORDER_TREATMENT_AVOID.");
65351
65352
65353
65354
65355 vigra::throw_precondition_error((kul.x <= 0 && kul.y <= 0), "normalizedConvolveImage(): left borders must be <= 0.");
65356
65357 vigra::throw_precondition_error((klr.x >= 0 && klr.y >= 0), "normalizedConvolveImage(): right borders must be >= 0.");
65358
65359
65360
65361 typedef typename
65362 NumericTraits<typename SrcAccessor::value_type>::RealPromote SumType;
65363 typedef typename
65364 NumericTraits<typename KernelAccessor::value_type>::RealPromote KSumType;
65365 typedef
65366 NumericTraits<typename DestAccessor::value_type> DestTraits;
65367
65368
65369 int w = src_lr.x - src_ul.x;
65370 int h = src_lr.y - src_ul.y;
65371 int kernel_width = klr.x - kul.x + 1;
65372 int kernel_height = klr.y - kul.y + 1;
65373
65374 int x,y;
65375 int ystart = (border == BORDER_TREATMENT_AVOID) ? klr.y : 0;
65376 int yend = (border == BORDER_TREATMENT_AVOID) ? h+kul.y : h;
65377 int xstart = (border == BORDER_TREATMENT_AVOID) ? klr.x : 0;
65378 int xend = (border == BORDER_TREATMENT_AVOID) ? w+kul.x : w;
65379
65380
65381 DestIterator yd = dest_ul + Diff2D(xstart, ystart);
65382 SrcIterator ys = src_ul + Diff2D(xstart, ystart);
65383 MaskIterator ym = mul + Diff2D(xstart, ystart);
65384
65385 KSumType norm = ak(ki);
65386 int xx, yy;
65387 KernelIterator yk = ki + klr;
65388 for(yy=0; yy<kernel_height; ++yy, --yk.y)
65389 {
65390 KernelIterator xk = yk;
65391
65392 for(xx=0; xx<kernel_width; ++xx, --xk.x)
65393 {
65394 norm += ak(xk);
65395 }
65396 }
65397 norm -= ak(ki);
65398
65399
65400 for(y=ystart; y < yend; ++y, ++ys.y, ++yd.y, ++ym.y)
65401 {
65402
65403 DestIterator xd(yd);
65404 SrcIterator xs(ys);
65405 MaskIterator xm(ym);
65406
65407 for(x=xstart; x < xend; ++x, ++xs.x, ++xd.x, ++xm.x)
65408 {
65409
65410 int x0, y0, x1, y1;
65411
65412 y0 = (y<klr.y) ? -y : -klr.y;
65413 y1 = (h-y-1<-kul.y) ? h-y-1 : -kul.y;
65414 x0 = (x<klr.x) ? -x : -klr.x;
65415 x1 = (w-x-1<-kul.x) ? w-x-1 : -kul.x;
65416
65417 bool first = true;
65418
65419 SumType sum;
65420 KSumType ksum;
65421
65422 SrcIterator yys = xs + Diff2D(x0, y0);
65423 MaskIterator yym = xm + Diff2D(x0, y0);
65424 KernelIterator yk = ki - Diff2D(x0, y0);
65425
65426 int xx, kernel_width, kernel_height;
65427 kernel_width = x1 - x0 + 1;
65428 kernel_height = y1 - y0 + 1;
65429 for(yy=0; yy<kernel_height; ++yy, ++yys.y, --yk.y, ++yym.y)
65430 {
65431 typename SrcIterator::row_iterator xxs = yys.rowIterator();
65432 typename SrcIterator::row_iterator xxend = xxs + kernel_width;
65433 typename MaskIterator::row_iterator xxm = yym.rowIterator();
65434 typename KernelIterator::row_iterator xk = yk.rowIterator();
65435
65436 for(xx=0; xxs < xxend; ++xxs.x, --xk.x, ++xxm.x)
65437 {
65438 if(!am(xxm)) continue;
65439
65440 if(first)
65441 {
65442 sum = ak(xk) * src_acc(xxs);
65443 ksum = ak(xk);
65444 first = false;
65445 }
65446 else
65447 {
65448 sum += ak(xk) * src_acc(xxs);
65449 ksum += ak(xk);
65450 }
65451 }
65452 }
65453
65454 if(!first &&
65455 ksum != NumericTraits<KSumType>::zero())
65456 {
65457 dest_acc.set(DestTraits::fromRealPromote((norm / ksum) * sum), xd);
65458 }
65459 }
65460 }
65461 }
65462
65463
65464 template <class SrcIterator, class SrcAccessor,
65465 class DestIterator, class DestAccessor,
65466 class MaskIterator, class MaskAccessor,
65467 class KernelIterator, class KernelAccessor>
65468 inline
65469 void normalizedConvolveImage(
65470 triple<SrcIterator, SrcIterator, SrcAccessor> src,
65471 pair<MaskIterator, MaskAccessor> mask,
65472 pair<DestIterator, DestAccessor> dest,
65473 tuple5<KernelIterator, KernelAccessor, Diff2D, Diff2D,
65474 BorderTreatmentMode> kernel)
65475 {
65476 normalizedConvolveImage(src.first, src.second, src.third,
65477 mask.first, mask.second,
65478 dest.first, dest.second,
65479 kernel.first, kernel.second, kernel.third,
65480 kernel.fourth, kernel.fifth);
65481 }
65482 # 1001 "../include/vigra/stdconvolution.hxx"
65483 template <class SrcIterator, class SrcAccessor,
65484 class DestIterator, class DestAccessor,
65485 class MaskIterator, class MaskAccessor,
65486 class KernelIterator, class KernelAccessor>
65487 inline void
65488 convolveImageWithMask(SrcIterator src_ul, SrcIterator src_lr, SrcAccessor src_acc,
65489 MaskIterator mul, MaskAccessor am,
65490 DestIterator dest_ul, DestAccessor dest_acc,
65491 KernelIterator ki, KernelAccessor ak,
65492 Diff2D kul, Diff2D klr, BorderTreatmentMode border)
65493 {
65494 normalizedConvolveImage(src_ul, src_lr, src_acc,
65495 mul, am,
65496 dest_ul, dest_acc,
65497 ki, ak, kul, klr, border);
65498 }
65499
65500 template <class SrcIterator, class SrcAccessor,
65501 class DestIterator, class DestAccessor,
65502 class MaskIterator, class MaskAccessor,
65503 class KernelIterator, class KernelAccessor>
65504 inline
65505 void convolveImageWithMask(
65506 triple<SrcIterator, SrcIterator, SrcAccessor> src,
65507 pair<MaskIterator, MaskAccessor> mask,
65508 pair<DestIterator, DestAccessor> dest,
65509 tuple5<KernelIterator, KernelAccessor, Diff2D, Diff2D,
65510 BorderTreatmentMode> kernel)
65511 {
65512 normalizedConvolveImage(src.first, src.second, src.third,
65513 mask.first, mask.second,
65514 dest.first, dest.second,
65515 kernel.first, kernel.second, kernel.third,
65516 kernel.fourth, kernel.fifth);
65517 }
65518 # 1093 "../include/vigra/stdconvolution.hxx"
65519 template <class ARITHTYPE>
65520 class Kernel2D
65521 {
65522 public:
65523
65524
65525 typedef ARITHTYPE value_type;
65526
65527
65528
65529 typedef typename BasicImage<value_type>::traverser Iterator;
65530
65531
65532
65533 typedef typename BasicImage<value_type>::const_traverser ConstIterator;
65534
65535
65536
65537 typedef typename BasicImage<value_type>::Accessor Accessor;
65538
65539
65540
65541 typedef typename BasicImage<value_type>::ConstAccessor ConstAccessor;
65542
65543 struct InitProxy
65544 {
65545 typedef typename
65546 BasicImage<value_type>::ScanOrderIterator Iterator;
65547
65548 InitProxy(Iterator i, int count, value_type & norm)
65549 : iter_(i), base_(i),
65550 count_(count), sum_(count),
65551 norm_(norm)
65552 {}
65553
65554 ~InitProxy()
65555 {
65556 vigra::throw_precondition_error((count_ == 1 || count_ == sum_), "Kernel2D::initExplicitly(): " "Too few init values.");
65557
65558
65559 }
65560
65561 InitProxy & operator,(value_type const & v)
65562 {
65563 if(count_ == sum_) norm_ = *iter_;
65564
65565 --count_;
65566 vigra::throw_precondition_error((count_ > 0), "Kernel2D::initExplicitly(): " "Too many init values.");
65567
65568
65569
65570 norm_ += v;
65571
65572 ++iter_;
65573 *iter_ = v;
65574
65575 return *this;
65576 }
65577
65578 Iterator iter_, base_;
65579 int count_, sum_;
65580 value_type & norm_;
65581 };
65582
65583 static value_type one() { return NumericTraits<value_type>::one(); }
65584
65585
65586
65587
65588
65589 Kernel2D()
65590 : kernel_(1, 1, one()),
65591 left_(0, 0),
65592 right_(0, 0),
65593 norm_(one()),
65594 border_treatment_(BORDER_TREATMENT_CLIP)
65595 {}
65596
65597
65598
65599 Kernel2D(Kernel2D const & k)
65600 : kernel_(k.kernel_),
65601 left_(k.left_),
65602 right_(k.right_),
65603 norm_(k.norm_),
65604 border_treatment_(k.border_treatment_)
65605 {}
65606
65607
65608
65609 Kernel2D & operator=(Kernel2D const & k)
65610 {
65611 if(this != &k)
65612 {
65613 kernel_ = k.kernel_;
65614 left_ = k.left_;
65615 right_ = k.right_;
65616 norm_ = k.norm_;
65617 border_treatment_ = k.border_treatment_;
65618 }
65619 return *this;
65620 }
65621 # 1215 "../include/vigra/stdconvolution.hxx"
65622 InitProxy operator=(value_type const & v)
65623 {
65624 int size = (right_.x - left_.x + 1) *
65625 (right_.y - left_.y + 1);
65626 kernel_ = v;
65627 norm_ = (double)size*v;
65628
65629 return InitProxy(kernel_.begin(), size, norm_);
65630 }
65631
65632
65633
65634 ~Kernel2D()
65635 {}
65636 # 1243 "../include/vigra/stdconvolution.hxx"
65637 void initSeparable(Kernel1D<value_type> & kx,
65638 Kernel1D<value_type> & ky)
65639 {
65640 left_ = Diff2D(kx.left(), ky.left());
65641 right_ = Diff2D(kx.right(), ky.right());
65642 int w = right_.x - left_.x + 1;
65643 int h = right_.y - left_.y + 1;
65644 kernel_.resize(w, h);
65645
65646 norm_ = kx.norm() * ky.norm();
65647
65648 typedef typename Kernel1D<value_type>::Iterator KIter;
65649 typename Kernel1D<value_type>::Accessor ka;
65650
65651 KIter kiy = ky.center() + left_.y;
65652 Iterator iy = center() + left_;
65653
65654 for(int y=left_.y; y<=right_.y; ++y, ++kiy, ++iy.y)
65655 {
65656 KIter kix = kx.center() + left_.x;
65657 Iterator ix = iy;
65658 for(int x=left_.x; x<=right_.x; ++x, ++kix, ++ix.x)
65659 {
65660 *ix = ka(kix) * ka(kiy);
65661 }
65662 }
65663 }
65664 # 1294 "../include/vigra/stdconvolution.hxx"
65665 template <class KernelIterator>
65666 void initSeparable(KernelIterator kxcenter, int xleft, int xright,
65667 KernelIterator kycenter, int yleft, int yright)
65668 {
65669 vigra::throw_precondition_error((xleft <= 0 && yleft <= 0), "Kernel2D::initSeparable(): left borders must be <= 0.");
65670
65671 vigra::throw_precondition_error((xright >= 0 && yright >= 0), "Kernel2D::initSeparable(): right borders must be >= 0.");
65672
65673
65674 left_ = Point2D(xleft, yleft);
65675 right_ = Point2D(xright, yright);
65676
65677 int w = right_.x - left_.x + 1;
65678 int h = right_.y - left_.y + 1;
65679 kernel_.resize(w, h);
65680
65681 KernelIterator kiy = kycenter + left_.y;
65682 Iterator iy = center() + left_;
65683
65684 for(int y=left_.y; y<=right_.y; ++y, ++kiy, ++iy.y)
65685 {
65686 KernelIterator kix = kxcenter + left_.x;
65687 Iterator ix = iy;
65688 for(int x=left_.x; x<=right_.x; ++x, ++kix, ++ix.x)
65689 {
65690 *ix = *kix * *kiy;
65691 }
65692 }
65693
65694 typename BasicImage<value_type>::iterator i = kernel_.begin();
65695 typename BasicImage<value_type>::iterator iend = kernel_.end();
65696 norm_ = *i;
65697 ++i;
65698
65699 for(; i!= iend; ++i)
65700 {
65701 norm_ += *i;
65702 }
65703 }
65704 # 1354 "../include/vigra/stdconvolution.hxx"
65705 void initDisk(int radius)
65706 {
65707 vigra::throw_precondition_error((radius > 0), "Kernel2D::initDisk(): radius must be > 0.");
65708
65709
65710 left_ = Point2D(-radius, -radius);
65711 right_ = Point2D(radius, radius);
65712 int w = right_.x - left_.x + 1;
65713 int h = right_.y - left_.y + 1;
65714 kernel_.resize(w, h);
65715 norm_ = NumericTraits<value_type>::one();
65716
65717 kernel_ = NumericTraits<value_type>::zero();
65718 double count = 0.0;
65719
65720 Iterator k = center();
65721 double r2 = (double)radius*radius;
65722
65723 int i;
65724 for(i=0; i<= radius; ++i)
65725 {
65726 double r = (double) i - 0.5;
65727 int w = (int)(std::sqrt(r2 - r*r) + 0.5);
65728 for(int j=-w; j<=w; ++j)
65729 {
65730 k(j, i) = NumericTraits<value_type>::one();
65731 k(j, -i) = NumericTraits<value_type>::one();
65732 count += (i != 0) ? 2.0 : 1.0;
65733 }
65734 }
65735
65736 count = 1.0 / count;
65737
65738 for(int y=-radius; y<=radius; ++y)
65739 {
65740 for(int x=-radius; x<=radius; ++x)
65741 {
65742 k(x,y) = count * k(x,y);
65743 }
65744 }
65745 }
65746 # 1434 "../include/vigra/stdconvolution.hxx"
65747 Kernel2D & initExplicitly(Diff2D upperleft, Diff2D lowerright)
65748 {
65749 vigra::throw_precondition_error((upperleft.x <= 0 && upperleft.y <= 0), "Kernel2D::initExplicitly(): left borders must be <= 0.");
65750
65751 vigra::throw_precondition_error((lowerright.x >= 0 && lowerright.y >= 0), "Kernel2D::initExplicitly(): right borders must be >= 0.");
65752
65753
65754 left_ = Point2D(upperleft);
65755 right_ = Point2D(lowerright);
65756
65757 int w = right_.x - left_.x + 1;
65758 int h = right_.y - left_.y + 1;
65759 kernel_.resize(w, h);
65760
65761 return *this;
65762 }
65763
65764
65765
65766 Point2D upperLeft() const { return left_; }
65767
65768
65769
65770 Point2D lowerRight() const { return right_; }
65771
65772
65773
65774 int width() const { return right_.x - left_.x + 1; }
65775
65776
65777
65778 int height() const { return right_.y - left_.y + 1; }
65779
65780
65781
65782 Iterator center() { return kernel_.upperLeft() - left_; }
65783
65784
65785
65786 ConstIterator center() const { return kernel_.upperLeft() - left_; }
65787
65788
65789
65790 value_type & operator()(int x, int y)
65791 { return kernel_[Diff2D(x,y) - left_]; }
65792
65793
65794
65795 value_type operator()(int x, int y) const
65796 { return kernel_[Diff2D(x,y) - left_]; }
65797
65798
65799
65800 value_type & operator[](Diff2D const & d)
65801 { return kernel_[d - left_]; }
65802
65803
65804
65805 value_type operator[](Diff2D const & d) const
65806 { return kernel_[d - left_]; }
65807
65808
65809
65810 value_type norm() const { return norm_; }
65811
65812
65813
65814 Accessor accessor() { return Accessor(); }
65815
65816
65817
65818 ConstAccessor accessor() const { return ConstAccessor(); }
65819 # 1522 "../include/vigra/stdconvolution.hxx"
65820 void normalize(value_type norm)
65821 {
65822 typename BasicImage<value_type>::iterator i = kernel_.begin();
65823 typename BasicImage<value_type>::iterator iend = kernel_.end();
65824 typename NumericTraits<value_type>::RealPromote sum = *i;
65825 ++i;
65826
65827 for(; i!= iend; ++i)
65828 {
65829 sum += *i;
65830 }
65831
65832 sum = norm / sum;
65833 i = kernel_.begin();
65834 for(; i != iend; ++i)
65835 {
65836 *i = *i * sum;
65837 }
65838
65839 norm_ = norm;
65840 }
65841
65842
65843
65844 void normalize()
65845 {
65846 normalize(one());
65847 }
65848
65849
65850
65851 BorderTreatmentMode borderTreatment() const
65852 { return border_treatment_; }
65853
65854
65855
65856
65857
65858 void setBorderTreatment( BorderTreatmentMode new_mode)
65859 {
65860 vigra::throw_precondition_error(((new_mode == BORDER_TREATMENT_CLIP || new_mode == BORDER_TREATMENT_AVOID || new_mode == BORDER_TREATMENT_REFLECT || new_mode == BORDER_TREATMENT_REPEAT || new_mode == BORDER_TREATMENT_WRAP)), "convolveImage():\n" " Border treatment must be one of follow treatments:\n" " - BORDER_TREATMENT_CLIP\n" " - BORDER_TREATMENT_AVOID\n" " - BORDER_TREATMENT_REFLECT\n" " - BORDER_TREATMENT_REPEAT\n" " - BORDER_TREATMENT_WRAP\n");
65861 # 1575 "../include/vigra/stdconvolution.hxx"
65862 border_treatment_ = new_mode;
65863 }
65864
65865
65866 private:
65867 BasicImage<value_type> kernel_;
65868 Point2D left_, right_;
65869 value_type norm_;
65870 BorderTreatmentMode border_treatment_;
65871 };
65872 # 1594 "../include/vigra/stdconvolution.hxx"
65873 template <class KernelIterator, class KernelAccessor>
65874 inline
65875 tuple5<KernelIterator, KernelAccessor, Diff2D, Diff2D, BorderTreatmentMode>
65876 kernel2d(KernelIterator ik, KernelAccessor ak, Diff2D kul, Diff2D klr,
65877 BorderTreatmentMode border)
65878
65879 {
65880 return
65881 tuple5<KernelIterator, KernelAccessor, Diff2D, Diff2D, BorderTreatmentMode> (
65882 ik, ak, kul, klr, border);
65883 }
65884
65885 template <class T>
65886 inline
65887 tuple5<typename Kernel2D<T>::ConstIterator,
65888 typename Kernel2D<T>::ConstAccessor,
65889 Diff2D, Diff2D, BorderTreatmentMode>
65890 kernel2d(Kernel2D<T> const & k)
65891
65892 {
65893 return
65894 tuple5<typename Kernel2D<T>::ConstIterator,
65895 typename Kernel2D<T>::ConstAccessor,
65896 Diff2D, Diff2D, BorderTreatmentMode>(
65897 k.center(),
65898 k.accessor(),
65899 k.upperLeft(), k.lowerRight(),
65900 k.borderTreatment());
65901 }
65902
65903 template <class T>
65904 inline
65905 tuple5<typename Kernel2D<T>::ConstIterator,
65906 typename Kernel2D<T>::ConstAccessor,
65907 Diff2D, Diff2D, BorderTreatmentMode>
65908 kernel2d(Kernel2D<T> const & k, BorderTreatmentMode border)
65909
65910 {
65911 return
65912 tuple5<typename Kernel2D<T>::ConstIterator,
65913 typename Kernel2D<T>::ConstAccessor,
65914 Diff2D, Diff2D, BorderTreatmentMode>(
65915 k.center(),
65916 k.accessor(),
65917 k.upperLeft(), k.lowerRight(),
65918 border);
65919 }
65920
65921
65922 }
65923 # 43 "../include/vigra/convolution.hxx" 2
65924
65925 # 1 "../include/vigra/recursiveconvolution.hxx" 1
65926 # 48 "../include/vigra/recursiveconvolution.hxx"
65927 namespace vigra {
65928 # 162 "../include/vigra/recursiveconvolution.hxx"
65929 template <class SrcIterator, class SrcAccessor,
65930 class DestIterator, class DestAccessor>
65931 void recursiveFilterLine(SrcIterator is, SrcIterator isend, SrcAccessor as,
65932 DestIterator id, DestAccessor ad, double b, BorderTreatmentMode border)
65933 {
65934 int w = isend - is;
65935 SrcIterator istart = is;
65936
65937 int x;
65938
65939 vigra::throw_precondition_error((-1.0 < b && b < 1.0), "recursiveFilterLine(): -1 < factor < 1 required.\n");
65940
65941
65942 if(b == 0.0)
65943 {
65944 for(; is != isend; ++is, ++id)
65945 {
65946 ad.set(as(is), id);
65947 }
65948 return;
65949 }
65950
65951 double eps = 0.00001;
65952 int kernelw = std::min(w-1, (int)(std::log(eps)/std::log(std::fabs(b))));
65953
65954 typedef typename
65955 NumericTraits<typename SrcAccessor::value_type>::RealPromote TempType;
65956 typedef NumericTraits<typename DestAccessor::value_type> DestTraits;
65957
65958
65959 std::vector<TempType> vline(w);
65960 typename std::vector<TempType>::iterator line = vline.begin();
65961
65962 double norm = (1.0 - b) / (1.0 + b);
65963
65964 TempType old;
65965
65966 if(border == BORDER_TREATMENT_REPEAT ||
65967 border == BORDER_TREATMENT_AVOID)
65968 {
65969 old = (1.0 / (1.0 - b)) * as(is);
65970 }
65971 else if(border == BORDER_TREATMENT_REFLECT)
65972 {
65973 is += kernelw;
65974 old = (1.0 / (1.0 - b)) * as(is);
65975 for(x = 0; x < kernelw; ++x, --is)
65976 old = as(is) + b * old;
65977 }
65978 else if(border == BORDER_TREATMENT_WRAP)
65979 {
65980 is = isend - kernelw;
65981 old = (1.0 / (1.0 - b)) * as(is);
65982 for(x = 0; x < kernelw; ++x, ++is)
65983 old = as(is) + b * old;
65984 }
65985 else if(border == BORDER_TREATMENT_CLIP)
65986 {
65987 old = NumericTraits<TempType>::zero();
65988 }
65989 else
65990 throw std::runtime_error("recursiveFilterLine(): Unknown border treatment mode.\n");
65991
65992
65993 for(x=0, is = istart; x < w; ++x, ++is)
65994 {
65995 old = as(is) + b * old;
65996 line[x] = old;
65997 }
65998
65999
66000 if(border == BORDER_TREATMENT_REPEAT ||
66001 border == BORDER_TREATMENT_AVOID)
66002 {
66003 is = isend - 1;
66004 old = (1.0 / (1.0 - b)) * as(is);
66005 }
66006 else if(border == BORDER_TREATMENT_REFLECT)
66007 {
66008 old = line[w-2];
66009 }
66010 else if(border == BORDER_TREATMENT_WRAP)
66011 {
66012 is = istart + kernelw - 1;
66013 old = (1.0 / (1.0 - b)) * as(is);
66014 for(x = 0; x < kernelw; ++x, --is)
66015 old = as(is) + b * old;
66016 }
66017 else if(border == BORDER_TREATMENT_CLIP)
66018 {
66019 old = NumericTraits<TempType>::zero();
66020 }
66021
66022 is = isend - 1;
66023 id += w - 1;
66024 if(border == BORDER_TREATMENT_CLIP)
66025 {
66026
66027 double bright = b;
66028 double bleft = std::pow(b, w);
66029
66030 for(x=w-1; x>=0; --x, --is, --id)
66031 {
66032 TempType f = b * old;
66033 old = as(is) + f;
66034 double norm = (1.0 - b) / (1.0 + b - bleft - bright);
66035 bleft /= b;
66036 bright *= b;
66037 ad.set(norm * (line[x] + f), id);
66038 }
66039 }
66040 else if(border == BORDER_TREATMENT_AVOID)
66041 {
66042 for(x=w-1; x >= kernelw; --x, --is, --id)
66043 {
66044 TempType f = b * old;
66045 old = as(is) + f;
66046 if(x < w - kernelw)
66047 ad.set(DestTraits::fromRealPromote(norm * (line[x] + f)), id);
66048 }
66049 }
66050 else
66051 {
66052 for(x=w-1; x>=0; --x, --is, --id)
66053 {
66054 TempType f = b * old;
66055 old = as(is) + f;
66056 ad.set(DestTraits::fromRealPromote(norm * (line[x] + f)), id);
66057 }
66058 }
66059 }
66060
66061
66062
66063
66064
66065
66066
66067 template <class SrcIterator, class SrcAccessor,
66068 class DestIterator, class DestAccessor>
66069 void recursiveFilterLine(SrcIterator is, SrcIterator isend, SrcAccessor as,
66070 DestIterator id, DestAccessor ad, double b1, double b2)
66071 {
66072 int w = isend - is;
66073 SrcIterator istart = is;
66074
66075 int x;
66076
66077 typedef typename
66078 NumericTraits<typename SrcAccessor::value_type>::RealPromote TempType;
66079 typedef NumericTraits<typename DestAccessor::value_type> DestTraits;
66080
66081
66082 std::vector<TempType> vline(w+1);
66083 typename std::vector<TempType>::iterator line = vline.begin();
66084
66085 double norm = 1.0 - b1 - b2;
66086 double norm1 = (1.0 - b1 - b2) / (1.0 + b1 + b2);
66087 double norm2 = norm * norm;
66088
66089
66090
66091 int kernelw = std::min(w-1, std::max(8, (int)(1.0 / norm + 0.5)));
66092 is += (kernelw - 2);
66093 line[kernelw] = as(is);
66094 line[kernelw-1] = as(is);
66095 for(x = kernelw - 2; x > 0; --x, --is)
66096 {
66097 line[x] = as(is) + b1 * line[x+1] + b2 * line[x+2];
66098 }
66099 line[0] = as(is) + b1 * line[1] + b2 * line[2];
66100 ++is;
66101 line[1] = as(is) + b1 * line[0] + b2 * line[1];
66102 ++is;
66103 for(x=2; x < w; ++x, ++is)
66104 {
66105 line[x] = as(is) + b1 * line[x-1] + b2 * line[x-2];
66106 }
66107 line[w] = line[w-1];
66108
66109 line[w-1] = norm1 * (line[w-1] + b1 * line[w-2] + b2 * line[w-3]);
66110 line[w-2] = norm1 * (line[w-2] + b1 * line[w] + b2 * line[w-2]);
66111 id += w-1;
66112 ad.set(line[w-1], id);
66113 --id;
66114 ad.set(line[w-2], id);
66115 --id;
66116 for(x=w-3; x>=0; --x, --id, --is)
66117 {
66118 line[x] = norm2 * line[x] + b1 * line[x+1] + b2 * line[x+2];
66119 ad.set(line[x], id);
66120 }
66121 }
66122 # 423 "../include/vigra/recursiveconvolution.hxx"
66123 template <class SrcIterator, class SrcAccessor,
66124 class DestIterator, class DestAccessor>
66125 inline
66126 void recursiveSmoothLine(SrcIterator is, SrcIterator isend, SrcAccessor as,
66127 DestIterator id, DestAccessor ad, double scale)
66128 {
66129 vigra::throw_precondition_error((scale >= 0), "recursiveSmoothLine(): scale must be >= 0.\n");
66130
66131
66132 double b = (scale == 0.0) ?
66133 0.0 :
66134 std::exp(-1.0/scale);
66135
66136 recursiveFilterLine(is, isend, as, id, ad, b, BORDER_TREATMENT_REPEAT);
66137 }
66138 # 510 "../include/vigra/recursiveconvolution.hxx"
66139 template <class SrcIterator, class SrcAccessor,
66140 class DestIterator, class DestAccessor>
66141 void recursiveFirstDerivativeLine(SrcIterator is, SrcIterator isend, SrcAccessor as,
66142 DestIterator id, DestAccessor ad, double scale)
66143 {
66144 vigra::throw_precondition_error((scale > 0), "recursiveFirstDerivativeLine(): scale must be > 0.\n");
66145
66146
66147 int w = isend -is;
66148
66149 int x;
66150
66151 typedef typename
66152 NumericTraits<typename SrcAccessor::value_type>::RealPromote
66153 TempType;
66154 typedef NumericTraits<typename DestAccessor::value_type> DestTraits;
66155
66156 std::vector<TempType> vline(w);
66157 typename std::vector<TempType>::iterator line = vline.begin();
66158
66159 double b = std::exp(-1.0/scale);
66160 double norm = (1.0 - b) * (1.0 - b) / 2.0 / b;
66161 TempType old = (1.0 / (1.0 - b)) * as(is);
66162
66163
66164 for(x=0; x<w; ++x, ++is)
66165 {
66166 old = as(is) + b * old;
66167 line[x] = -old;
66168 }
66169
66170
66171 --is;
66172 old = (1.0 / (1.0 - b)) * as(is);
66173 id += w;
66174 ++is;
66175
66176 for(x=w-1; x>=0; --x)
66177 {
66178 --is;
66179 --id;
66180
66181 old = as(is) + b * old;
66182
66183 ad.set(DestTraits::fromRealPromote(norm * (line[x] + old)), id);
66184 }
66185 }
66186 # 629 "../include/vigra/recursiveconvolution.hxx"
66187 template <class SrcIterator, class SrcAccessor,
66188 class DestIterator, class DestAccessor>
66189 void recursiveSecondDerivativeLine(SrcIterator is, SrcIterator isend, SrcAccessor as,
66190 DestIterator id, DestAccessor ad, double scale)
66191 {
66192 vigra::throw_precondition_error((scale > 0), "recursiveSecondDerivativeLine(): scale must be > 0.\n");
66193
66194
66195 int w = isend -is;
66196
66197 int x;
66198
66199 typedef typename
66200 NumericTraits<typename SrcAccessor::value_type>::RealPromote
66201 TempType;
66202 typedef NumericTraits<typename DestAccessor::value_type> DestTraits;
66203
66204 std::vector<TempType> vline(w);
66205 typename std::vector<TempType>::iterator line = vline.begin();
66206
66207 double b = std::exp(-1.0/scale);
66208 double a = -2.0 / (1.0 - b);
66209 double norm = (1.0 - b) * (1.0 - b) * (1.0 - b) / (1.0 + b);
66210 TempType old = (1.0 / (1.0 - b)) * as(is);
66211
66212
66213 for(x=0; x<w; ++x, ++is)
66214 {
66215 line[x] = old;
66216 old = as(is) + b * old;
66217 }
66218
66219
66220 --is;
66221 old = (1.0 / (1.0 - b)) * as(is);
66222 id += w;
66223 ++is;
66224
66225 for(x=w-1; x>=0; --x)
66226 {
66227 --is;
66228 --id;
66229
66230 TempType f = old + a * as(is);
66231 old = as(is) + b * old;
66232 ad.set(DestTraits::fromRealPromote(norm * (line[x] + f)), id);
66233 }
66234 }
66235 # 750 "../include/vigra/recursiveconvolution.hxx"
66236 template <class SrcImageIterator, class SrcAccessor,
66237 class DestImageIterator, class DestAccessor>
66238 void recursiveFilterX(SrcImageIterator supperleft,
66239 SrcImageIterator slowerright, SrcAccessor as,
66240 DestImageIterator dupperleft, DestAccessor ad,
66241 double b, BorderTreatmentMode border)
66242 {
66243 int w = slowerright.x - supperleft.x;
66244 int h = slowerright.y - supperleft.y;
66245
66246 int y;
66247
66248 for(y=0; y<h; ++y, ++supperleft.y, ++dupperleft.y)
66249 {
66250 typename SrcImageIterator::row_iterator rs = supperleft.rowIterator();
66251 typename DestImageIterator::row_iterator rd = dupperleft.rowIterator();
66252
66253 recursiveFilterLine(rs, rs+w, as,
66254 rd, ad,
66255 b, border);
66256 }
66257 }
66258
66259 template <class SrcImageIterator, class SrcAccessor,
66260 class DestImageIterator, class DestAccessor>
66261 inline void recursiveFilterX(
66262 triple<SrcImageIterator, SrcImageIterator, SrcAccessor> src,
66263 pair<DestImageIterator, DestAccessor> dest,
66264 double b, BorderTreatmentMode border)
66265 {
66266 recursiveFilterX(src.first, src.second, src.third,
66267 dest.first, dest.second, b, border);
66268 }
66269
66270
66271
66272
66273
66274
66275
66276 template <class SrcImageIterator, class SrcAccessor,
66277 class DestImageIterator, class DestAccessor>
66278 void recursiveFilterX(SrcImageIterator supperleft,
66279 SrcImageIterator slowerright, SrcAccessor as,
66280 DestImageIterator dupperleft, DestAccessor ad,
66281 double b1, double b2)
66282 {
66283 int w = slowerright.x - supperleft.x;
66284 int h = slowerright.y - supperleft.y;
66285
66286 int y;
66287
66288 for(y=0; y<h; ++y, ++supperleft.y, ++dupperleft.y)
66289 {
66290 typename SrcImageIterator::row_iterator rs = supperleft.rowIterator();
66291 typename DestImageIterator::row_iterator rd = dupperleft.rowIterator();
66292
66293 recursiveFilterLine(rs, rs+w, as,
66294 rd, ad,
66295 b1, b2);
66296 }
66297 }
66298
66299 template <class SrcImageIterator, class SrcAccessor,
66300 class DestImageIterator, class DestAccessor>
66301 inline void recursiveFilterX(
66302 triple<SrcImageIterator, SrcImageIterator, SrcAccessor> src,
66303 pair<DestImageIterator, DestAccessor> dest,
66304 double b1, double b2)
66305 {
66306 recursiveFilterX(src.first, src.second, src.third,
66307 dest.first, dest.second, b1, b2);
66308 }
66309 # 877 "../include/vigra/recursiveconvolution.hxx"
66310 template <class SrcImageIterator, class SrcAccessor,
66311 class DestImageIterator, class DestAccessor>
66312 void recursiveSmoothX(SrcImageIterator supperleft,
66313 SrcImageIterator slowerright, SrcAccessor as,
66314 DestImageIterator dupperleft, DestAccessor ad,
66315 double scale)
66316 {
66317 int w = slowerright.x - supperleft.x;
66318 int h = slowerright.y - supperleft.y;
66319
66320 int y;
66321
66322 for(y=0; y<h; ++y, ++supperleft.y, ++dupperleft.y)
66323 {
66324 typename SrcImageIterator::row_iterator rs = supperleft.rowIterator();
66325 typename DestImageIterator::row_iterator rd = dupperleft.rowIterator();
66326
66327 recursiveSmoothLine(rs, rs+w, as,
66328 rd, ad,
66329 scale);
66330 }
66331 }
66332
66333 template <class SrcImageIterator, class SrcAccessor,
66334 class DestImageIterator, class DestAccessor>
66335 inline void recursiveSmoothX(
66336 triple<SrcImageIterator, SrcImageIterator, SrcAccessor> src,
66337 pair<DestImageIterator, DestAccessor> dest,
66338 double scale)
66339 {
66340 recursiveSmoothX(src.first, src.second, src.third,
66341 dest. first, dest.second, scale);
66342 }
66343 # 982 "../include/vigra/recursiveconvolution.hxx"
66344 template <class SrcImageIterator, class SrcAccessor,
66345 class DestImageIterator, class DestAccessor>
66346 void recursiveFilterY(SrcImageIterator supperleft,
66347 SrcImageIterator slowerright, SrcAccessor as,
66348 DestImageIterator dupperleft, DestAccessor ad,
66349 double b, BorderTreatmentMode border)
66350 {
66351 int w = slowerright.x - supperleft.x;
66352 int h = slowerright.y - supperleft.y;
66353
66354 int x;
66355
66356 for(x=0; x<w; ++x, ++supperleft.x, ++dupperleft.x)
66357 {
66358 typename SrcImageIterator::column_iterator cs = supperleft.columnIterator();
66359 typename DestImageIterator::column_iterator cd = dupperleft.columnIterator();
66360
66361 recursiveFilterLine(cs, cs+h, as,
66362 cd, ad,
66363 b, border);
66364 }
66365 }
66366
66367 template <class SrcImageIterator, class SrcAccessor,
66368 class DestImageIterator, class DestAccessor>
66369 inline void recursiveFilterY(
66370 triple<SrcImageIterator, SrcImageIterator, SrcAccessor> src,
66371 pair<DestImageIterator, DestAccessor> dest,
66372 double b, BorderTreatmentMode border)
66373 {
66374 recursiveFilterY(src.first, src.second, src.third,
66375 dest.first, dest.second, b, border);
66376 }
66377
66378
66379
66380
66381
66382
66383
66384 template <class SrcImageIterator, class SrcAccessor,
66385 class DestImageIterator, class DestAccessor>
66386 void recursiveFilterY(SrcImageIterator supperleft,
66387 SrcImageIterator slowerright, SrcAccessor as,
66388 DestImageIterator dupperleft, DestAccessor ad,
66389 double b1, double b2)
66390 {
66391 int w = slowerright.x - supperleft.x;
66392 int h = slowerright.y - supperleft.y;
66393
66394 int x;
66395
66396 for(x=0; x<w; ++x, ++supperleft.x, ++dupperleft.x)
66397 {
66398 typename SrcImageIterator::column_iterator cs = supperleft.columnIterator();
66399 typename DestImageIterator::column_iterator cd = dupperleft.columnIterator();
66400
66401 recursiveFilterLine(cs, cs+h, as,
66402 cd, ad,
66403 b1, b2);
66404 }
66405 }
66406
66407 template <class SrcImageIterator, class SrcAccessor,
66408 class DestImageIterator, class DestAccessor>
66409 inline void recursiveFilterY(
66410 triple<SrcImageIterator, SrcImageIterator, SrcAccessor> src,
66411 pair<DestImageIterator, DestAccessor> dest,
66412 double b1, double b2)
66413 {
66414 recursiveFilterY(src.first, src.second, src.third,
66415 dest.first, dest.second, b1, b2);
66416 }
66417 # 1109 "../include/vigra/recursiveconvolution.hxx"
66418 template <class SrcImageIterator, class SrcAccessor,
66419 class DestImageIterator, class DestAccessor>
66420 void recursiveSmoothY(SrcImageIterator supperleft,
66421 SrcImageIterator slowerright, SrcAccessor as,
66422 DestImageIterator dupperleft, DestAccessor ad,
66423 double scale)
66424 {
66425 int w = slowerright.x - supperleft.x;
66426 int h = slowerright.y - supperleft.y;
66427
66428 int x;
66429
66430 for(x=0; x<w; ++x, ++supperleft.x, ++dupperleft.x)
66431 {
66432 typename SrcImageIterator::column_iterator cs = supperleft.columnIterator();
66433 typename DestImageIterator::column_iterator cd = dupperleft.columnIterator();
66434
66435 recursiveSmoothLine(cs, cs+h, as,
66436 cd, ad,
66437 scale);
66438 }
66439 }
66440
66441 template <class SrcImageIterator, class SrcAccessor,
66442 class DestImageIterator, class DestAccessor>
66443 inline void recursiveSmoothY(
66444 triple<SrcImageIterator, SrcImageIterator, SrcAccessor> src,
66445 pair<DestImageIterator, DestAccessor> dest,
66446 double scale)
66447 {
66448 recursiveSmoothY(src.first, src.second, src.third,
66449 dest. first, dest.second, scale);
66450 }
66451 # 1197 "../include/vigra/recursiveconvolution.hxx"
66452 template <class SrcImageIterator, class SrcAccessor,
66453 class DestImageIterator, class DestAccessor>
66454 void recursiveFirstDerivativeX(SrcImageIterator supperleft,
66455 SrcImageIterator slowerright, SrcAccessor as,
66456 DestImageIterator dupperleft, DestAccessor ad,
66457 double scale)
66458 {
66459 int w = slowerright.x - supperleft.x;
66460 int h = slowerright.y - supperleft.y;
66461
66462 int y;
66463
66464 for(y=0; y<h; ++y, ++supperleft.y, ++dupperleft.y)
66465 {
66466 typename SrcImageIterator::row_iterator rs = supperleft.rowIterator();
66467 typename DestImageIterator::row_iterator rd = dupperleft.rowIterator();
66468
66469 recursiveFirstDerivativeLine(rs, rs+w, as,
66470 rd, ad,
66471 scale);
66472 }
66473 }
66474
66475 template <class SrcImageIterator, class SrcAccessor,
66476 class DestImageIterator, class DestAccessor>
66477 inline void recursiveFirstDerivativeX(
66478 triple<SrcImageIterator, SrcImageIterator, SrcAccessor> src,
66479 pair<DestImageIterator, DestAccessor> dest,
66480 double scale)
66481 {
66482 recursiveFirstDerivativeX(src.first, src.second, src.third,
66483 dest. first, dest.second, scale);
66484 }
66485 # 1285 "../include/vigra/recursiveconvolution.hxx"
66486 template <class SrcImageIterator, class SrcAccessor,
66487 class DestImageIterator, class DestAccessor>
66488 void recursiveFirstDerivativeY(SrcImageIterator supperleft,
66489 SrcImageIterator slowerright, SrcAccessor as,
66490 DestImageIterator dupperleft, DestAccessor ad,
66491 double scale)
66492 {
66493 int w = slowerright.x - supperleft.x;
66494 int h = slowerright.y - supperleft.y;
66495
66496 int x;
66497
66498 for(x=0; x<w; ++x, ++supperleft.x, ++dupperleft.x)
66499 {
66500 typename SrcImageIterator::column_iterator cs = supperleft.columnIterator();
66501 typename DestImageIterator::column_iterator cd = dupperleft.columnIterator();
66502
66503 recursiveFirstDerivativeLine(cs, cs+h, as,
66504 cd, ad,
66505 scale);
66506 }
66507 }
66508
66509 template <class SrcImageIterator, class SrcAccessor,
66510 class DestImageIterator, class DestAccessor>
66511 inline void recursiveFirstDerivativeY(
66512 triple<SrcImageIterator, SrcImageIterator, SrcAccessor> src,
66513 pair<DestImageIterator, DestAccessor> dest,
66514 double scale)
66515 {
66516 recursiveFirstDerivativeY(src.first, src.second, src.third,
66517 dest. first, dest.second, scale);
66518 }
66519 # 1373 "../include/vigra/recursiveconvolution.hxx"
66520 template <class SrcImageIterator, class SrcAccessor,
66521 class DestImageIterator, class DestAccessor>
66522 void recursiveSecondDerivativeX(SrcImageIterator supperleft,
66523 SrcImageIterator slowerright, SrcAccessor as,
66524 DestImageIterator dupperleft, DestAccessor ad,
66525 double scale)
66526 {
66527 int w = slowerright.x - supperleft.x;
66528 int h = slowerright.y - supperleft.y;
66529
66530 int y;
66531
66532 for(y=0; y<h; ++y, ++supperleft.y, ++dupperleft.y)
66533 {
66534 typename SrcImageIterator::row_iterator rs = supperleft.rowIterator();
66535 typename DestImageIterator::row_iterator rd = dupperleft.rowIterator();
66536
66537 recursiveSecondDerivativeLine(rs, rs+w, as,
66538 rd, ad,
66539 scale);
66540 }
66541 }
66542
66543 template <class SrcImageIterator, class SrcAccessor,
66544 class DestImageIterator, class DestAccessor>
66545 inline void recursiveSecondDerivativeX(
66546 triple<SrcImageIterator, SrcImageIterator, SrcAccessor> src,
66547 pair<DestImageIterator, DestAccessor> dest,
66548 double scale)
66549 {
66550 recursiveSecondDerivativeX(src.first, src.second, src.third,
66551 dest. first, dest.second, scale);
66552 }
66553 # 1461 "../include/vigra/recursiveconvolution.hxx"
66554 template <class SrcImageIterator, class SrcAccessor,
66555 class DestImageIterator, class DestAccessor>
66556 void recursiveSecondDerivativeY(SrcImageIterator supperleft,
66557 SrcImageIterator slowerright, SrcAccessor as,
66558 DestImageIterator dupperleft, DestAccessor ad,
66559 double scale)
66560 {
66561 int w = slowerright.x - supperleft.x;
66562 int h = slowerright.y - supperleft.y;
66563
66564 int x;
66565
66566 for(x=0; x<w; ++x, ++supperleft.x, ++dupperleft.x)
66567 {
66568 typename SrcImageIterator::column_iterator cs = supperleft.columnIterator();
66569 typename DestImageIterator::column_iterator cd = dupperleft.columnIterator();
66570
66571 recursiveSecondDerivativeLine(cs, cs+h, as,
66572 cd, ad,
66573 scale);
66574 }
66575 }
66576
66577 template <class SrcImageIterator, class SrcAccessor,
66578 class DestImageIterator, class DestAccessor>
66579 inline void recursiveSecondDerivativeY(
66580 triple<SrcImageIterator, SrcImageIterator, SrcAccessor> src,
66581 pair<DestImageIterator, DestAccessor> dest,
66582 double scale)
66583 {
66584 recursiveSecondDerivativeY(src.first, src.second, src.third,
66585 dest. first, dest.second, scale);
66586 }
66587
66588
66589
66590 }
66591 # 45 "../include/vigra/convolution.hxx" 2
66592 # 1 "../include/vigra/nonlineardiffusion.hxx" 1
66593 # 42 "../include/vigra/nonlineardiffusion.hxx"
66594 # 1 "../include/vigra/stdimagefunctions.hxx" 1
66595 # 92 "../include/vigra/stdimagefunctions.hxx"
66596 # 1 "../include/vigra/combineimages.hxx" 1
66597 # 93 "../include/vigra/stdimagefunctions.hxx" 2
66598 # 1 "../include/vigra/resizeimage.hxx" 1
66599 # 47 "../include/vigra/resizeimage.hxx"
66600 # 1 "../include/vigra/resampling_convolution.hxx" 1
66601 # 43 "../include/vigra/resampling_convolution.hxx"
66602 # 1 "../include/vigra/rational.hxx" 1
66603 # 60 "../include/vigra/rational.hxx"
66604 namespace vigra {
66605 # 81 "../include/vigra/rational.hxx"
66606 template <typename IntType>
66607 IntType gcd(IntType n, IntType m)
66608 {
66609
66610 IntType zero(0);
66611
66612
66613
66614
66615 if (n < zero)
66616 n = -n;
66617 if (m < zero)
66618 m = -m;
66619
66620
66621
66622
66623 for(;;) {
66624 if(m == zero)
66625 return n;
66626 n %= m;
66627 if(n == zero)
66628 return m;
66629 m %= n;
66630 }
66631 }
66632 # 122 "../include/vigra/rational.hxx"
66633 template <typename IntType>
66634 IntType lcm(IntType n, IntType m)
66635 {
66636
66637 IntType zero(0);
66638
66639 if (n == zero || m == zero)
66640 return zero;
66641
66642 n /= gcd(n, m);
66643 n *= m;
66644
66645 if (n < zero)
66646 n = -n;
66647 return n;
66648 }
66649
66650
66651
66652 class bad_rational : public std::domain_error
66653 {
66654 public:
66655 explicit bad_rational() : std::domain_error("bad rational: zero denominator") {}
66656 };
66657
66658 template <typename IntType>
66659 class Rational;
66660
66661 template <typename IntType>
66662 Rational<IntType> abs(const Rational<IntType>& r);
66663 template <typename IntType>
66664 Rational<IntType> pow(const Rational<IntType>& r, int n);
66665 template <typename IntType>
66666 Rational<IntType> floor(const Rational<IntType>& r);
66667 template <typename IntType>
66668 Rational<IntType> ceil(const Rational<IntType>& r);
66669 # 193 "../include/vigra/rational.hxx"
66670 template <typename IntType>
66671 class Rational
66672 {
66673 public:
66674
66675
66676 typedef IntType value_type;
66677
66678
66679
66680
66681 typedef typename If<typename TypeTraits<IntType>::isBuiltinType,
66682 IntType, IntType const &>::type param_type;
66683
66684
66685
66686 Rational()
66687 : num(0),
66688 den(1)
66689 {}
66690
66691
66692
66693 template <class U>
66694 Rational(Rational<U> const & r)
66695 : num(r.numerator()),
66696 den(r.denominator())
66697 {}
66698
66699
66700
66701 Rational(param_type n)
66702 : num(n),
66703 den(IntType(1))
66704 {}
66705 # 237 "../include/vigra/rational.hxx"
66706 Rational(param_type n, param_type d, bool doNormalize = true)
66707 : num(n),
66708 den(d)
66709 {
66710 if(doNormalize)
66711 normalize();
66712 }
66713
66714
66715
66716
66717
66718 explicit Rational(double v, double epsilon = 1e-4)
66719 : num(IntType(v < 0.0 ?
66720 v/epsilon - 0.5
66721 : v/epsilon + 0.5)),
66722 den(IntType(1.0/epsilon + 0.5))
66723 {
66724 normalize();
66725 }
66726
66727
66728
66729
66730
66731 Rational& operator=(param_type n) { return assign(n, 1); }
66732
66733
66734
66735 Rational& assign(param_type n, param_type d, bool doNormalize = true);
66736
66737
66738
66739 param_type numerator() const { return num; }
66740
66741
66742
66743 param_type denominator() const { return den; }
66744
66745
66746
66747
66748
66749 Rational& operator+= (const Rational& r);
66750
66751
66752
66753
66754
66755 Rational& operator-= (const Rational& r);
66756
66757
66758
66759
66760
66761 Rational& operator*= (const Rational& r);
66762
66763
66764
66765
66766
66767 Rational& operator/= (const Rational& r);
66768
66769
66770
66771
66772
66773 Rational& operator+= (param_type i);
66774
66775
66776
66777
66778
66779 Rational& operator-= (param_type i);
66780
66781
66782
66783
66784
66785 Rational& operator*= (param_type i);
66786
66787
66788
66789
66790
66791 Rational& operator/= (param_type i);
66792
66793
66794
66795 Rational& operator++();
66796
66797
66798 Rational& operator--();
66799
66800
66801
66802 Rational operator++(int) { Rational res(*this); operator++(); return res; }
66803
66804
66805 Rational operator--(int) { Rational res(*this); operator--(); return res; }
66806
66807
66808
66809 bool operator!() const { return !num; }
66810
66811
66812
66813 bool is_pinf() const
66814 {
66815 IntType zero(0);
66816 return den == zero && num > zero;
66817 }
66818
66819
66820
66821 bool is_ninf() const
66822 {
66823 IntType zero(0);
66824 return den == zero && num < zero;
66825 }
66826
66827
66828
66829 bool is_inf() const
66830 {
66831 IntType zero(0);
66832 return den == zero && num != zero;
66833 }
66834
66835
66836
66837
66838
66839 int sign() const
66840 {
66841 IntType zero(0);
66842 return num == zero ? 0 : num < zero ? -1 : 1;
66843 }
66844
66845 private:
66846
66847
66848 IntType num;
66849 IntType den;
66850
66851
66852
66853
66854
66855 void normalize();
66856 };
66857
66858
66859 template <typename IntType>
66860 inline Rational<IntType>&
66861 Rational<IntType>::assign(param_type n, param_type d, bool doNormalize)
66862 {
66863 num = n;
66864 den = d;
66865 if(doNormalize)
66866 normalize();
66867 return *this;
66868 }
66869
66870
66871 template <typename IntType>
66872 Rational<IntType>& Rational<IntType>::operator+= (const Rational<IntType>& r)
66873 {
66874 IntType zero(0);
66875
66876
66877 if(den == zero)
66878 {
66879 if(r.den == zero && sign()*r.sign() < 0)
66880 throw bad_rational();
66881 return *this;
66882 }
66883 if(r.den == zero)
66884 {
66885 assign(r.num, zero, false);
66886 return *this;
66887 }
66888 # 439 "../include/vigra/rational.hxx"
66889 IntType r_num = r.num;
66890 IntType r_den = r.den;
66891
66892 IntType g = gcd(den, r_den);
66893 den /= g;
66894 num = num * (r_den / g) + r_num * den;
66895 g = gcd(num, g);
66896 num /= g;
66897 den *= r_den/g;
66898
66899 return *this;
66900 }
66901
66902 template <typename IntType>
66903 Rational<IntType>& Rational<IntType>::operator-= (const Rational<IntType>& r)
66904 {
66905 IntType zero(0);
66906
66907
66908 if(den == zero)
66909 {
66910 if(r.den == zero && sign()*r.sign() > 0)
66911 throw bad_rational();
66912 return *this;
66913 }
66914 if(r.den == zero)
66915 {
66916 assign(-r.num, zero, false);
66917 return *this;
66918 }
66919
66920
66921 IntType r_num = r.num;
66922 IntType r_den = r.den;
66923
66924
66925
66926 IntType g = gcd(den, r_den);
66927 den /= g;
66928 num = num * (r_den / g) - r_num * den;
66929 g = gcd(num, g);
66930 num /= g;
66931 den *= r_den/g;
66932
66933 return *this;
66934 }
66935
66936 template <typename IntType>
66937 Rational<IntType>& Rational<IntType>::operator*= (const Rational<IntType>& r)
66938 {
66939 IntType zero(0);
66940
66941
66942 if(den == zero)
66943 {
66944 if(r.num == zero)
66945 throw bad_rational();
66946 num *= r.sign();
66947 return *this;
66948 }
66949 if(r.den == zero)
66950 {
66951 if(num == zero)
66952 throw bad_rational();
66953 num = r.num * sign();
66954 den = zero;
66955 return *this;
66956 }
66957
66958
66959 IntType r_num = r.num;
66960 IntType r_den = r.den;
66961
66962
66963 IntType gcd1 = gcd<IntType>(num, r_den);
66964 IntType gcd2 = gcd<IntType>(r_num, den);
66965 num = (num/gcd1) * (r_num/gcd2);
66966 den = (den/gcd2) * (r_den/gcd1);
66967 return *this;
66968 }
66969
66970 template <typename IntType>
66971 Rational<IntType>& Rational<IntType>::operator/= (const Rational<IntType>& r)
66972 {
66973 IntType zero(0);
66974
66975
66976 if(den == zero)
66977 {
66978 if(r.den == zero)
66979 throw bad_rational();
66980 if(r.num != zero)
66981 num *= r.sign();
66982 return *this;
66983 }
66984 if(r.num == zero)
66985 {
66986 if(num == zero)
66987 throw bad_rational();
66988 num = IntType(sign());
66989 den = zero;
66990 return *this;
66991 }
66992
66993 if (num == zero)
66994 return *this;
66995
66996
66997 IntType r_num = r.num;
66998 IntType r_den = r.den;
66999
67000
67001 IntType gcd1 = gcd<IntType>(num, r_num);
67002 IntType gcd2 = gcd<IntType>(r_den, den);
67003 num = (num/gcd1) * (r_den/gcd2);
67004 den = (den/gcd2) * (r_num/gcd1);
67005
67006 if (den < zero) {
67007 num = -num;
67008 den = -den;
67009 }
67010 return *this;
67011 }
67012
67013
67014 template <typename IntType>
67015 inline Rational<IntType>&
67016 Rational<IntType>::operator+= (param_type i)
67017 {
67018 num += i * den;
67019 return *this;
67020 }
67021
67022 template <typename IntType>
67023 inline Rational<IntType>&
67024 Rational<IntType>::operator-= (param_type i)
67025 {
67026 num -= i * den;
67027 return *this;
67028 }
67029
67030 template <typename IntType>
67031 Rational<IntType>&
67032 Rational<IntType>::operator*= (param_type i)
67033 {
67034 if(i == IntType(1))
67035 return *this;
67036 IntType zero(0);
67037 if(i == zero)
67038 {
67039 if(den == zero)
67040 {
67041 throw bad_rational();
67042 }
67043 else
67044 {
67045 num = zero;
67046 den = IntType(1);
67047 return *this;
67048 }
67049 }
67050
67051 IntType g = gcd(i, den);
67052 den /= g;
67053 num *= i / g;
67054 return *this;
67055 }
67056
67057 template <typename IntType>
67058 Rational<IntType>&
67059 Rational<IntType>::operator/= (param_type i)
67060 {
67061 if(i == IntType(1))
67062 return *this;
67063
67064 IntType zero(0);
67065 if(i == zero)
67066 {
67067 if(num == zero)
67068 throw bad_rational();
67069 num = IntType(sign());
67070 den = zero;
67071 return *this;
67072 }
67073
67074 IntType g = gcd(i, num);
67075 if(i < zero)
67076 {
67077 num /= -g;
67078 den *= -i / g;
67079 }
67080 else
67081 {
67082 num /= g;
67083 den *= i / g;
67084 }
67085 return *this;
67086 }
67087
67088
67089 template <typename IntType>
67090 inline Rational<IntType>& Rational<IntType>::operator++()
67091 {
67092
67093 num += den;
67094 return *this;
67095 }
67096
67097 template <typename IntType>
67098 inline Rational<IntType>& Rational<IntType>::operator--()
67099 {
67100
67101 num -= den;
67102 return *this;
67103 }
67104
67105
67106 template <typename IntType>
67107 void Rational<IntType>::normalize()
67108 {
67109
67110 IntType zero(0);
67111
67112 if (den == zero)
67113 {
67114 if(num == zero)
67115 throw bad_rational();
67116 if(num < zero)
67117 num = IntType(-1);
67118 else
67119 num = IntType(1);
67120 return;
67121 }
67122
67123
67124 if (num == zero) {
67125 den = IntType(1);
67126 return;
67127 }
67128
67129 IntType g = gcd<IntType>(num, den);
67130
67131 num /= g;
67132 den /= g;
67133
67134
67135 if (den < zero) {
67136 num = -num;
67137 den = -den;
67138 }
67139 }
67140 # 741 "../include/vigra/rational.hxx"
67141 template<class T>
67142 struct NumericTraits<Rational<T> >
67143 {
67144 typedef Rational<T> Type;
67145 typedef Rational<typename NumericTraits<T>::Promote> Promote;
67146 typedef Rational<typename NumericTraits<T>::RealPromote> RealPromote;
67147 typedef std::complex<Rational<RealPromote> > ComplexPromote;
67148 typedef T ValueType;
67149
67150 typedef typename NumericTraits<T>::isIntegral isIntegral;
67151 typedef VigraTrueType isScalar;
67152 typedef typename NumericTraits<T>::isSigned isSigned;
67153 typedef VigraTrueType isOrdered;
67154 typedef VigraFalseType isComplex;
67155
67156 static Type zero() { return Type(0); }
67157 static Type one() { return Type(1); }
67158 static Type nonZero() { return one(); }
67159
67160 static Promote toPromote(Type const & v)
67161 { return Promote(v.numerator(), v.denominator(), false); }
67162 static RealPromote toRealPromote(Type const & v)
67163 { return RealPromote(v.numerator(), v.denominator(), false); }
67164 static Type fromPromote(Promote const & v)
67165 { return Type(NumericTraits<T>::fromPromote(v.numerator()),
67166 NumericTraits<T>::fromPromote(v.denominator()), false); }
67167 static Type fromRealPromote(RealPromote const & v)
67168 { return Type(NumericTraits<T>::fromRealPromote(v.numerator()),
67169 NumericTraits<T>::fromRealPromote(v.denominator()), false); }
67170 };
67171
67172 template<class T>
67173 struct NormTraits<Rational<T> >
67174 {
67175 typedef Rational<T> Type;
67176 typedef typename NumericTraits<Type>::Promote SquaredNormType;
67177 typedef Type NormType;
67178 };
67179
67180 template <class T>
67181 struct PromoteTraits<Rational<T>, Rational<T> >
67182 {
67183 typedef Rational<typename PromoteTraits<T, T>::Promote> Promote;
67184 static Promote toPromote(Rational<T> const & v) { return v; }
67185 };
67186
67187 template <class T1, class T2>
67188 struct PromoteTraits<Rational<T1>, Rational<T2> >
67189 {
67190 typedef Rational<typename PromoteTraits<T1, T2>::Promote> Promote;
67191 static Promote toPromote(Rational<T1> const & v) { return v; }
67192 static Promote toPromote(Rational<T2> const & v) { return v; }
67193 };
67194
67195 template <class T1, class T2>
67196 struct PromoteTraits<Rational<T1>, T2 >
67197 {
67198 typedef Rational<typename PromoteTraits<T1, T2>::Promote> Promote;
67199 static Promote toPromote(Rational<T1> const & v) { return v; }
67200 static Promote toPromote(T2 const & v) { return Promote(v); }
67201 };
67202
67203 template <class T1, class T2>
67204 struct PromoteTraits<T1, Rational<T2> >
67205 {
67206 typedef Rational<typename PromoteTraits<T1, T2>::Promote> Promote;
67207 static Promote toPromote(T1 const & v) { return Promote(v); }
67208 static Promote toPromote(Rational<T2> const & v) { return v; }
67209 };
67210 # 838 "../include/vigra/rational.hxx"
67211 template <typename IntType>
67212 inline Rational<IntType> operator+ (const Rational<IntType>& r)
67213 {
67214 return r;
67215 }
67216
67217
67218 template <typename IntType>
67219 inline Rational<IntType> operator- (const Rational<IntType>& r)
67220 {
67221 return Rational<IntType>(-r.numerator(), r.denominator(), false);
67222 }
67223
67224
67225 template <typename IntType>
67226 inline Rational<IntType> operator+(Rational<IntType> l, Rational<IntType> const & r)
67227 {
67228 return l += r;
67229 }
67230
67231
67232 template <typename IntType>
67233 inline Rational<IntType> operator-(Rational<IntType> l, Rational<IntType> const & r)
67234 {
67235 return l -= r;
67236 }
67237
67238
67239 template <typename IntType>
67240 inline Rational<IntType> operator*(Rational<IntType> l, Rational<IntType> const & r)
67241 {
67242 return l *= r;
67243 }
67244
67245
67246 template <typename IntType>
67247 inline Rational<IntType> operator/(Rational<IntType> l, Rational<IntType> const & r)
67248 {
67249 return l /= r;
67250 }
67251
67252
67253 template <typename IntType>
67254 inline Rational<IntType>
67255 operator+(Rational<IntType> l, typename Rational<IntType>::param_type r)
67256 {
67257 return l += r;
67258 }
67259
67260
67261 template <typename IntType>
67262 inline Rational<IntType>
67263 operator-(Rational<IntType> l, typename Rational<IntType>::param_type r)
67264 {
67265 return l -= r;
67266 }
67267
67268
67269 template <typename IntType>
67270 inline Rational<IntType>
67271 operator*(Rational<IntType> l, typename Rational<IntType>::param_type r)
67272 {
67273 return l *= r;
67274 }
67275
67276
67277 template <typename IntType>
67278 inline Rational<IntType>
67279 operator/(Rational<IntType> l, typename Rational<IntType>::param_type r)
67280 {
67281 return l /= r;
67282 }
67283
67284
67285 template <typename IntType>
67286 inline Rational<IntType>
67287 operator+(typename Rational<IntType>::param_type l, Rational<IntType> r)
67288 {
67289 return r += l;
67290 }
67291
67292
67293 template <typename IntType>
67294 inline Rational<IntType>
67295 operator-(typename Rational<IntType>::param_type l, Rational<IntType> const & r)
67296 {
67297 return (-r) += l;
67298 }
67299
67300
67301 template <typename IntType>
67302 inline Rational<IntType>
67303 operator*(typename Rational<IntType>::param_type l, Rational<IntType> r)
67304 {
67305 return r *= l;
67306 }
67307
67308
67309 template <typename IntType>
67310 inline Rational<IntType>
67311 operator/(typename Rational<IntType>::param_type l, Rational<IntType> const & r)
67312 {
67313 if(r.numerator() < IntType(0))
67314 return Rational<IntType>(-r.denominator(), -r.numerator(), false) *= l;
67315 else
67316 return Rational<IntType>(r.denominator(), r.numerator(), false) *= l;
67317 }
67318 # 954 "../include/vigra/rational.hxx"
67319 template <typename IntType1, typename IntType2>
67320 inline bool
67321 operator== (const Rational<IntType1> & l, const Rational<IntType2>& r)
67322 {
67323 return l.denominator() == r.denominator() &&
67324 l.numerator() == r.numerator();
67325
67326 }
67327
67328
67329 template <typename IntType1, typename IntType2>
67330 inline bool
67331 operator== (const Rational<IntType1> & l, IntType2 const & i)
67332 {
67333 return ((l.denominator() == IntType1(1)) && (l.numerator() == i));
67334 }
67335
67336
67337 template <typename IntType1, typename IntType2>
67338 inline bool
67339 operator==(IntType1 const & l, Rational<IntType2> const & r)
67340 {
67341 return r == l;
67342 }
67343
67344
67345 template <typename IntType1, typename IntType2>
67346 inline bool
67347 operator!=(Rational<IntType1> const & l, Rational<IntType2> const & r)
67348 {
67349 return l.denominator() != r.denominator() ||
67350 l.numerator() != r.numerator();
67351
67352 }
67353
67354
67355 template <typename IntType1, typename IntType2>
67356 inline bool
67357 operator!= (const Rational<IntType1> & l, IntType2 const & i)
67358 {
67359 return ((l.denominator() != IntType1(1)) || (l.numerator() != i));
67360 }
67361
67362
67363 template <typename IntType1, typename IntType2>
67364 inline bool
67365 operator!=(IntType1 const & l, Rational<IntType2> const & r)
67366 {
67367 return r != l;
67368 }
67369
67370
67371 template <typename IntType1, typename IntType2>
67372 bool
67373 operator< (const Rational<IntType1> & l, const Rational<IntType2>& r)
67374 {
67375
67376 typedef typename PromoteTraits<IntType1, IntType2>::Promote IntType;
67377 IntType zero(0);
67378
67379
67380
67381 if(l.denominator() == zero)
67382 if(r.denominator() == zero)
67383
67384 return l.numerator() < r.numerator();
67385 else
67386
67387
67388 return l.numerator() < zero;
67389 if(r.denominator() == zero)
67390
67391
67392 return r.numerator() > zero;
67393
67394 if(l.numerator() >= zero && r.numerator() <= zero)
67395 return false;
67396
67397 if(l.numerator() <= zero && r.numerator() >= zero)
67398 return true;
67399
67400
67401
67402 IntType gcd1 = gcd<IntType>(l.numerator(), r.numerator());
67403 IntType gcd2 = gcd<IntType>(r.denominator(), l.denominator());
67404 return (l.numerator()/gcd1) * (r.denominator()/gcd2) <
67405 (l.denominator()/gcd2) * (r.numerator()/gcd1);
67406 }
67407
67408
67409 template <typename IntType1, typename IntType2>
67410 bool
67411 operator< (const Rational<IntType1> & l, IntType2 const & i)
67412 {
67413
67414 typedef typename PromoteTraits<IntType1, IntType2>::Promote IntType;
67415 IntType zero(0);
67416
67417
67418
67419 if(l.denominator() == zero)
67420
67421
67422 return l.numerator() < zero;
67423
67424 if(l.numerator() >= zero && i <= zero)
67425 return false;
67426
67427 if(l.numerator() <= zero && i >= zero)
67428 return true;
67429
67430
67431
67432
67433
67434 if (l.numerator() > zero)
67435 return (l.numerator()/l.denominator()) < i;
67436 else
67437 return -i < (-l.numerator()/l.denominator());
67438 }
67439
67440
67441 template <typename IntType1, typename IntType2>
67442 inline bool
67443 operator<(IntType1 const & l, Rational<IntType2> const & r)
67444 {
67445 return r > l;
67446 }
67447
67448
67449 template <typename IntType1, typename IntType2>
67450 inline bool
67451 operator>(Rational<IntType1> const & l, Rational<IntType2> const & r)
67452 {
67453 return r < l;
67454 }
67455
67456
67457 template <typename IntType1, typename IntType2>
67458 bool
67459 operator> (const Rational<IntType1> & l, IntType2 const & i)
67460 {
67461
67462 if (l.numerator() == i && l.denominator() == IntType1(1))
67463 return false;
67464
67465
67466 return !(l < i);
67467 }
67468
67469
67470 template <typename IntType1, typename IntType2>
67471 inline bool
67472 operator>(IntType1 const & l, Rational<IntType2> const & r)
67473 {
67474 return r < l;
67475 }
67476
67477
67478 template <typename IntType1, typename IntType2>
67479 inline bool
67480 operator<=(Rational<IntType1> const & l, Rational<IntType2> const & r)
67481 {
67482 return !(r < l);
67483 }
67484
67485
67486 template <typename IntType1, typename IntType2>
67487 inline bool
67488 operator<=(Rational<IntType1> const & l, IntType2 const & r)
67489 {
67490 return !(l > r);
67491 }
67492
67493
67494 template <typename IntType1, typename IntType2>
67495 inline bool
67496 operator<=(IntType1 const & l, Rational<IntType2> const & r)
67497 {
67498 return r >= l;
67499 }
67500
67501
67502 template <typename IntType1, typename IntType2>
67503 inline bool
67504 operator>=(Rational<IntType1> const & l, Rational<IntType2> const & r)
67505 {
67506 return !(l < r);
67507 }
67508
67509
67510 template <typename IntType1, typename IntType2>
67511 inline bool
67512 operator>=(Rational<IntType1> const & l, IntType2 const & r)
67513 {
67514 return !(l < r);
67515 }
67516
67517
67518 template <typename IntType1, typename IntType2>
67519 inline bool
67520 operator>=(IntType1 const & l, Rational<IntType2> const & r)
67521 {
67522 return r <= l;
67523 }
67524 # 1167 "../include/vigra/rational.hxx"
67525 template <typename IntType>
67526 inline Rational<IntType>
67527 abs(const Rational<IntType>& r)
67528 {
67529 if (r.numerator() >= IntType(0))
67530 return r;
67531
67532 return Rational<IntType>(-r.numerator(), r.denominator(), false);
67533 }
67534
67535
67536 template <typename IntType>
67537 inline Rational<IntType>
67538 norm(const Rational<IntType>& r)
67539 {
67540 return abs(r);
67541 }
67542
67543
67544 template <typename IntType>
67545 inline typename NormTraits<Rational<IntType> >::SquaredNormType
67546 squaredNorm(const Rational<IntType>& r)
67547 {
67548 return typename NormTraits<Rational<IntType> >::SquaredNormType(sq(r.numerator()), sq(r.denominator()), false);
67549 }
67550
67551
67552
67553
67554
67555 template <typename IntType>
67556 Rational<IntType>
67557 pow(const Rational<IntType>& r, int e)
67558 {
67559 IntType zero(0);
67560 int ae;
67561 if(e == 0)
67562 {
67563 if(r.denominator() == zero)
67564 throw bad_rational();
67565 return Rational<IntType>(IntType(1));
67566 }
67567 else if(e < 0)
67568 {
67569 if(r.numerator() == zero)
67570 return Rational<IntType>(IntType(1), zero, false);
67571 if(r.denominator() == zero)
67572 return Rational<IntType>(zero);
67573 ae = -e;
67574 }
67575 else
67576 {
67577 if(r.denominator() == zero || r.numerator() == zero)
67578 return r;
67579 ae = e;
67580 }
67581
67582 IntType nold = r.numerator(), dold = r.denominator(),
67583 nnew = IntType(1), dnew = IntType(1);
67584 for(; ae != 0; ae >>= 1, nold *= nold, dold *= dold)
67585 {
67586 if(ae % 2 != 0)
67587 {
67588 nnew *= nold;
67589 dnew *= dold;
67590 }
67591 }
67592 if(e < 0)
67593 {
67594 if(nnew < zero)
67595 return Rational<IntType>(-dnew, -nnew, false);
67596 else
67597 return Rational<IntType>(dnew, nnew, false);
67598 }
67599 else
67600 return Rational<IntType>(nnew, dnew, false);
67601 }
67602
67603
67604 template <typename IntType>
67605 Rational<IntType>
67606 floor(const Rational<IntType>& r)
67607 {
67608 IntType zero(0), one(1);
67609 if(r.denominator() == zero || r.denominator() == one)
67610 return r;
67611 return r.numerator() < zero ?
67612 Rational<IntType>(r.numerator() / r.denominator() - one)
67613 : Rational<IntType>(r.numerator() / r.denominator());
67614 }
67615
67616
67617 template <typename IntType>
67618 Rational<IntType>
67619 ceil(const Rational<IntType>& r)
67620 {
67621 IntType zero(0), one(1);
67622 if(r.denominator() == zero || r.denominator() == one)
67623 return r;
67624 return r.numerator() < IntType(0) ?
67625 Rational<IntType>(r.numerator() / r.denominator())
67626 : Rational<IntType>(r.numerator() / r.denominator() + one);
67627 }
67628 # 1287 "../include/vigra/rational.hxx"
67629 template <typename T, typename IntType>
67630 inline T rational_cast(const Rational<IntType>& src)
67631 {
67632 return static_cast<T>(src.numerator())/src.denominator();
67633 }
67634
67635 template <class T>
67636 inline T const & rational_cast(T const & v)
67637 {
67638 return v;
67639 }
67640
67641
67642
67643 template <typename IntType>
67644 std::ostream& operator<< (std::ostream& os, const vigra::Rational<IntType>& r)
67645 {
67646 os << r.numerator() << '/' << r.denominator();
67647 return os;
67648 }
67649
67650 }
67651 # 44 "../include/vigra/resampling_convolution.hxx" 2
67652
67653
67654 namespace vigra {
67655
67656 namespace resampling_detail
67657 {
67658
67659 struct MapTargetToSourceCoordinate
67660 {
67661 MapTargetToSourceCoordinate(Rational<int> const & samplingRatio,
67662 Rational<int> const & offset)
67663 : a(samplingRatio.denominator()*offset.denominator()),
67664 b(samplingRatio.numerator()*offset.numerator()),
67665 c(samplingRatio.numerator()*offset.denominator())
67666 {}
67667
67668
67669
67670
67671
67672 int operator()(int i) const
67673 {
67674 return (i * a + b) / c;
67675 }
67676
67677 double toDouble(int i) const
67678 {
67679 return double(i * a + b) / c;
67680 }
67681
67682 Rational<int> toRational(int i) const
67683 {
67684 return Rational<int>(i * a + b, c);
67685 }
67686
67687 int a, b, c;
67688 };
67689
67690 }
67691
67692 template <>
67693 class FunctorTraits<resampling_detail::MapTargetToSourceCoordinate>
67694 : public FunctorTraitsBase<resampling_detail::MapTargetToSourceCoordinate>
67695 {
67696 public:
67697 typedef VigraTrueType isUnaryFunctor;
67698 };
67699
67700 template <class SrcIter, class SrcAcc,
67701 class DestIter, class DestAcc,
67702 class KernelArray,
67703 class Functor>
67704 void
67705 resamplingConvolveLine(SrcIter s, SrcIter send, SrcAcc src,
67706 DestIter d, DestIter dend, DestAcc dest,
67707 KernelArray const & kernels,
67708 Functor mapTargetToSourceCoordinate)
67709 {
67710 typedef typename
67711 NumericTraits<typename SrcAcc::value_type>::RealPromote
67712 TmpType;
67713 typedef typename KernelArray::value_type Kernel;
67714 typedef typename Kernel::const_iterator KernelIter;
67715
67716 int wo = send - s;
67717 int wn = dend - d;
67718 int wo2 = 2*wo - 2;
67719
67720 int i;
67721 typename KernelArray::const_iterator kernel = kernels.begin();
67722 for(i=0; i<wn; ++i, ++d, ++kernel)
67723 {
67724
67725 if(kernel == kernels.end())
67726 kernel = kernels.begin();
67727
67728
67729 int is = mapTargetToSourceCoordinate(i);
67730
67731 TmpType sum = NumericTraits<TmpType>::zero();
67732
67733 int lbound = is - kernel->right(),
67734 hbound = is - kernel->left();
67735
67736 KernelIter k = kernel->center() + kernel->right();
67737 if(lbound < 0 || hbound >= wo)
67738 {
67739 vigra::throw_precondition_error((-lbound < wo && wo2 - hbound >= 0), "resamplingConvolveLine(): kernel or offset larger than image.");
67740
67741 for(int m=lbound; m <= hbound; ++m, --k)
67742 {
67743 int mm = (m < 0) ?
67744 -m :
67745 (m >= wo) ?
67746 wo2 - m :
67747 m;
67748 sum += *k * src(s, mm);
67749 }
67750 }
67751 else
67752 {
67753 SrcIter ss = s + lbound;
67754 SrcIter ssend = s + hbound;
67755
67756 for(; ss <= ssend; ++ss, --k)
67757 {
67758 sum += *k * src(ss);
67759 }
67760 }
67761
67762 dest.set(sum, d);
67763 }
67764 }
67765
67766 template <class Kernel, class MapCoordinate, class KernelArray>
67767 void
67768 createResamplingKernels(Kernel const & kernel,
67769 MapCoordinate const & mapCoordinate, KernelArray & kernels)
67770 {
67771 for(unsigned int idest = 0; idest < kernels.size(); ++idest)
67772 {
67773 int isrc = mapCoordinate(idest);
67774 double idsrc = mapCoordinate.toDouble(idest);
67775 double offset = idsrc - isrc;
67776 double radius = kernel.radius();
67777 int left = int(ceil(-radius - offset));
67778 int right = int(floor(radius - offset));
67779 kernels[idest].initExplicitly(left, right);
67780
67781 double x = left + offset;
67782 for(int i = left; i <= right; ++i, ++x)
67783 kernels[idest][i] = kernel(x);
67784 kernels[idest].normalize(1.0, kernel.derivativeOrder(), offset);
67785 }
67786 }
67787 # 280 "../include/vigra/resampling_convolution.hxx"
67788 template <class SrcIter, class SrcAcc,
67789 class DestIter, class DestAcc,
67790 class Kernel>
67791 void
67792 resamplingConvolveX(SrcIter sul, SrcIter slr, SrcAcc src,
67793 DestIter dul, DestIter dlr, DestAcc dest,
67794 Kernel const & kernel,
67795 Rational<int> const & samplingRatio, Rational<int> const & offset)
67796 {
67797 int wold = slr.x - sul.x;
67798 int wnew = dlr.x - dul.x;
67799
67800 vigra::throw_precondition_error((!samplingRatio.is_inf() && samplingRatio > 0), "resamplingConvolveX(): sampling ratio must be > 0 and < infinity");
67801
67802 vigra::throw_precondition_error((!offset.is_inf()), "resamplingConvolveX(): offset must be < infinity");
67803
67804
67805 int period = lcm(samplingRatio.numerator(), samplingRatio.denominator());
67806 resampling_detail::MapTargetToSourceCoordinate mapCoordinate(samplingRatio, offset);
67807
67808 ArrayVector<Kernel1D<double> > kernels(period);
67809
67810 createResamplingKernels(kernel, mapCoordinate, kernels);
67811
67812 for(; sul.y < slr.y; ++sul.y, ++dul.y)
67813 {
67814 typename SrcIter::row_iterator sr = sul.rowIterator();
67815 typename DestIter::row_iterator dr = dul.rowIterator();
67816 resamplingConvolveLine(sr, sr+wold, src, dr, dr+wnew, dest,
67817 kernels, mapCoordinate);
67818 }
67819 }
67820
67821 template <class SrcIter, class SrcAcc,
67822 class DestIter, class DestAcc,
67823 class Kernel>
67824 inline void
67825 resamplingConvolveX(triple<SrcIter, SrcIter, SrcAcc> src,
67826 triple<DestIter, DestIter, DestAcc> dest,
67827 Kernel const & kernel,
67828 Rational<int> const & samplingRatio, Rational<int> const & offset)
67829 {
67830 resamplingConvolveX(src.first, src.second, src.third,
67831 dest.first, dest.second, dest.third,
67832 kernel, samplingRatio, offset);
67833 }
67834 # 417 "../include/vigra/resampling_convolution.hxx"
67835 template <class SrcIter, class SrcAcc,
67836 class DestIter, class DestAcc,
67837 class Kernel>
67838 void
67839 resamplingConvolveY(SrcIter sul, SrcIter slr, SrcAcc src,
67840 DestIter dul, DestIter dlr, DestAcc dest,
67841 Kernel const & kernel,
67842 Rational<int> const & samplingRatio, Rational<int> const & offset)
67843 {
67844 int hold = slr.y - sul.y;
67845 int hnew = dlr.y - dul.y;
67846
67847 vigra::throw_precondition_error((!samplingRatio.is_inf() && samplingRatio > 0), "resamplingConvolveY(): sampling ratio must be > 0 and < infinity");
67848
67849 vigra::throw_precondition_error((!offset.is_inf()), "resamplingConvolveY(): offset must be < infinity");
67850
67851
67852 int period = lcm(samplingRatio.numerator(), samplingRatio.denominator());
67853
67854 resampling_detail::MapTargetToSourceCoordinate mapCoordinate(samplingRatio, offset);
67855
67856 ArrayVector<Kernel1D<double> > kernels(period);
67857
67858 createResamplingKernels(kernel, mapCoordinate, kernels);
67859
67860 for(; sul.x < slr.x; ++sul.x, ++dul.x)
67861 {
67862 typename SrcIter::column_iterator sc = sul.columnIterator();
67863 typename DestIter::column_iterator dc = dul.columnIterator();
67864 resamplingConvolveLine(sc, sc+hold, src, dc, dc+hnew, dest,
67865 kernels, mapCoordinate);
67866 }
67867 }
67868
67869 template <class SrcIter, class SrcAcc,
67870 class DestIter, class DestAcc,
67871 class Kernel>
67872 inline void
67873 resamplingConvolveY(triple<SrcIter, SrcIter, SrcAcc> src,
67874 triple<DestIter, DestIter, DestAcc> dest,
67875 Kernel const & kernel,
67876 Rational<int> const & samplingRatio, Rational<int> const & offset)
67877 {
67878 resamplingConvolveY(src.first, src.second, src.third,
67879 dest.first, dest.second, dest.third,
67880 kernel, samplingRatio, offset);
67881 }
67882 # 536 "../include/vigra/resampling_convolution.hxx"
67883 template <class SrcIterator, class SrcAccessor,
67884 class DestIterator, class DestAccessor,
67885 class KernelX, class KernelY>
67886 void resamplingConvolveImage(SrcIterator sul,SrcIterator slr, SrcAccessor src,
67887 DestIterator dul, DestIterator dlr, DestAccessor dest,
67888 KernelX const & kx,
67889 Rational<int> const & samplingRatioX, Rational<int> const & offsetX,
67890 KernelY const & ky,
67891 Rational<int> const & samplingRatioY, Rational<int> const & offsetY)
67892 {
67893 typedef typename
67894 NumericTraits<typename SrcAccessor::value_type>::RealPromote
67895 TmpType;
67896
67897 BasicImage<TmpType> tmp(dlr.x - dul.x, slr.y - sul.y);
67898
67899 resamplingConvolveX(srcIterRange(sul, slr, src),
67900 destImageRange(tmp),
67901 kx, samplingRatioX, offsetX);
67902 resamplingConvolveY(srcImageRange(tmp),
67903 destIterRange(dul, dlr, dest),
67904 ky, samplingRatioY, offsetY);
67905 }
67906
67907 template <class SrcIterator, class SrcAccessor,
67908 class DestIterator, class DestAccessor,
67909 class KernelX, class KernelY>
67910 inline void
67911 resamplingConvolveImage(triple<SrcIterator, SrcIterator, SrcAccessor> src,
67912 triple<DestIterator, DestIterator, DestAccessor> dest,
67913 KernelX const & kx,
67914 Rational<int> const & samplingRatioX, Rational<int> const & offsetX,
67915 KernelY const & ky,
67916 Rational<int> const & samplingRatioY, Rational<int> const & offsetY)
67917 {
67918 resamplingConvolveImage(src.first, src.second, src.third,
67919 dest.first, dest.second, dest.third,
67920 kx, samplingRatioX, offsetX,
67921 ky, samplingRatioY, offsetY);
67922 }
67923
67924 }
67925 # 48 "../include/vigra/resizeimage.hxx" 2
67926 # 1 "../include/vigra/splines.hxx" 1
67927 # 43 "../include/vigra/splines.hxx"
67928 # 1 "../include/vigra/polynomial.hxx" 1
67929 # 50 "../include/vigra/polynomial.hxx"
67930 namespace vigra {
67931
67932 template <class T> class Polynomial;
67933 template <unsigned int MAXORDER, class T> class StaticPolynomial;
67934 # 73 "../include/vigra/polynomial.hxx"
67935 template <class T>
67936 class PolynomialView
67937 {
67938 public:
67939
67940
67941
67942 typedef T value_type;
67943
67944
67945
67946
67947 typedef typename NumericTraits<T>::RealPromote RealPromote;
67948
67949
67950
67951 typedef typename NumericTraits<RealPromote>::ValueType Real;
67952
67953
67954
67955 typedef typename NumericTraits<RealPromote>::ComplexPromote Complex;
67956
67957
67958
67959 typedef T * iterator;
67960
67961
67962
67963 typedef T const * const_iterator;
67964
67965 typedef Polynomial<Real> RealPolynomial;
67966 typedef Polynomial<Complex> ComplexPolynomial;
67967 # 121 "../include/vigra/polynomial.hxx"
67968 PolynomialView(T * coeffs, unsigned int order, double epsilon = 1.0e-14)
67969 : coeffs_(coeffs),
67970 order_(order),
67971 epsilon_(epsilon)
67972 {}
67973
67974
67975 T & operator[](unsigned int i)
67976 { return coeffs_[i]; }
67977
67978
67979 T const & operator[](unsigned int i) const
67980 { return coeffs_[i]; }
67981 # 142 "../include/vigra/polynomial.hxx"
67982 template <class V>
67983 typename PromoteTraits<T, V>::Promote
67984 operator()(V v) const;
67985
67986
67987
67988 void differentiate(unsigned int n = 1);
67989 # 157 "../include/vigra/polynomial.hxx"
67990 void deflate(T const & r, unsigned int multiplicity = 1);
67991
67992
67993
67994
67995
67996
67997
67998 void forwardDeflate(T const & v);
67999 # 174 "../include/vigra/polynomial.hxx"
68000 void forwardBackwardDeflate(T v);
68001
68002
68003
68004
68005
68006
68007
68008 void backwardDeflate(T v);
68009
68010
68011
68012
68013
68014
68015
68016 void deflateConjugatePair(Complex const & v);
68017
68018
68019
68020
68021
68022 void minimizeOrder(double epsilon = 0.0);
68023
68024
68025
68026 void normalize();
68027
68028 void balance();
68029
68030
68031
68032 iterator begin()
68033 { return coeffs_; }
68034
68035
68036
68037 iterator end()
68038 { return begin() + size(); }
68039
68040
68041
68042 const_iterator begin() const
68043 { return coeffs_; }
68044
68045
68046
68047 const_iterator end() const
68048 { return begin() + size(); }
68049
68050
68051
68052 unsigned int size() const
68053 { return order_ + 1; }
68054
68055
68056
68057 unsigned int order() const
68058 { return order_; }
68059
68060
68061
68062
68063 double epsilon() const
68064 { return epsilon_; }
68065
68066
68067
68068
68069 void setEpsilon(double eps)
68070 { epsilon_ = eps; }
68071
68072 protected:
68073 PolynomialView(double epsilon = 1e-14)
68074 : coeffs_(0),
68075 order_(0),
68076 epsilon_(epsilon)
68077 {}
68078
68079 void setCoeffs(T * coeffs, unsigned int order)
68080 {
68081 coeffs_ = coeffs;
68082 order_ = order;
68083 }
68084
68085 T * coeffs_;
68086 unsigned int order_;
68087 double epsilon_;
68088 };
68089
68090 template <class T>
68091 template <class U>
68092 typename PromoteTraits<T, U>::Promote
68093 PolynomialView<T>::operator()(U v) const
68094 {
68095 typename PromoteTraits<T, U>::Promote p(coeffs_[order_]);
68096 for(int i = order_ - 1; i >= 0; --i)
68097 {
68098 p = v * p + coeffs_[i];
68099 }
68100 return p;
68101 }
68102 # 291 "../include/vigra/polynomial.hxx"
68103 template <class T>
68104 void
68105 PolynomialView<T>::differentiate(unsigned int n)
68106 {
68107 if(n == 0)
68108 return;
68109 if(order_ == 0)
68110 {
68111 coeffs_[0] = 0.0;
68112 return;
68113 }
68114 for(unsigned int i = 1; i <= order_; ++i)
68115 {
68116 coeffs_[i-1] = double(i)*coeffs_[i];
68117 }
68118 --order_;
68119 if(n > 1)
68120 differentiate(n-1);
68121 }
68122
68123 template <class T>
68124 void
68125 PolynomialView<T>::deflate(T const & v, unsigned int multiplicity)
68126 {
68127 vigra::throw_precondition_error((order_ > 0), "PolynomialView<T>::deflate(): cannot deflate 0th order polynomial.");
68128
68129 if(v == 0.0)
68130 {
68131 ++coeffs_;
68132 --order_;
68133 }
68134 else
68135 {
68136
68137
68138
68139 forwardBackwardDeflate(v);
68140 }
68141 if(multiplicity > 1)
68142 deflate(v, multiplicity-1);
68143 }
68144
68145 template <class T>
68146 void
68147 PolynomialView<T>::forwardDeflate(T const & v)
68148 {
68149 for(int i = order_-1; i > 0; --i)
68150 {
68151 coeffs_[i] += v * coeffs_[i+1];
68152 }
68153 ++coeffs_;
68154 --order_;
68155 }
68156
68157 template <class T>
68158 void
68159 PolynomialView<T>::forwardBackwardDeflate(T v)
68160 {
68161 unsigned int order2 = order_ / 2;
68162 T tmp = coeffs_[order_];
68163 for(unsigned int i = order_-1; i >= order2; --i)
68164 {
68165 T tmp1 = coeffs_[i];
68166 coeffs_[i] = tmp;
68167 tmp = tmp1 + v * tmp;
68168 }
68169 v = -1.0 / v;
68170 coeffs_[0] *= v;
68171 for(unsigned int i = 1; i < order2; ++i)
68172 {
68173 coeffs_[i] = v * (coeffs_[i] - coeffs_[i-1]);
68174 }
68175 --order_;
68176 }
68177
68178 template <class T>
68179 void
68180 PolynomialView<T>::backwardDeflate(T v)
68181 {
68182 v = -1.0 / v;
68183 coeffs_[0] *= v;
68184 for(unsigned int i = 1; i < order_; ++i)
68185 {
68186 coeffs_[i] = v * (coeffs_[i] - coeffs_[i-1]);
68187 }
68188 --order_;
68189 }
68190
68191 template <class T>
68192 void
68193 PolynomialView<T>::deflateConjugatePair(Complex const & v)
68194 {
68195 vigra::throw_precondition_error((order_ > 1), "PolynomialView<T>::deflateConjugatePair(): cannot deflate 2 roots " "from 1st order polynomial.");
68196
68197
68198 Real a = 2.0*v.real();
68199 Real b = -sq(v.real()) - sq(v.imag());
68200 coeffs_[order_-1] += a * coeffs_[order_];
68201 for(int i = order_-2; i > 1; --i)
68202 {
68203 coeffs_[i] += a * coeffs_[i+1] + b*coeffs_[i+2];
68204 }
68205 coeffs_ += 2;
68206 order_ -= 2;
68207 }
68208
68209 template <class T>
68210 void
68211 PolynomialView<T>::minimizeOrder(double epsilon)
68212 {
68213 while(std::abs(coeffs_[order_]) <= epsilon && order_ > 0)
68214 --order_;
68215 }
68216
68217 template <class T>
68218 void
68219 PolynomialView<T>::normalize()
68220 {
68221 for(unsigned int i = 0; i<order_; ++i)
68222 coeffs_[i] /= coeffs_[order_];
68223 coeffs_[order_] = T(1.0);
68224 }
68225
68226 template <class T>
68227 void
68228 PolynomialView<T>::balance()
68229 {
68230 Real p0 = abs(coeffs_[0]), po = abs(coeffs_[order_]);
68231 Real norm = (p0 > 0.0)
68232 ? std::sqrt(p0*po)
68233 : po;
68234 for(unsigned int i = 0; i<=order_; ++i)
68235 coeffs_[i] /= norm;
68236 }
68237 # 443 "../include/vigra/polynomial.hxx"
68238 template <class T>
68239 class Polynomial
68240 : public PolynomialView<T>
68241 {
68242 typedef PolynomialView<T> BaseType;
68243 public:
68244 typedef typename BaseType::Real Real;
68245 typedef typename BaseType::Complex Complex;
68246 typedef Polynomial<Real> RealPolynomial;
68247 typedef Polynomial<Complex> ComplexPolynomial;
68248
68249 typedef T value_type;
68250 typedef T * iterator;
68251 typedef T const * const_iterator;
68252
68253
68254
68255
68256
68257
68258
68259 Polynomial(unsigned int order = 0, double epsilon = 1.0e-14)
68260 : BaseType(epsilon),
68261 polynomial_(order + 1, T())
68262 {
68263 this->setCoeffs(&polynomial_[0], order);
68264 }
68265
68266
68267
68268 Polynomial(Polynomial const & p)
68269 : BaseType(p.epsilon()),
68270 polynomial_(p.begin(), p.end())
68271 {
68272 this->setCoeffs(&polynomial_[0], p.order());
68273 }
68274
68275
68276
68277 template <class ITER>
68278 Polynomial(ITER i, unsigned int order)
68279 : BaseType(),
68280 polynomial_(i, i + order + 1)
68281 {
68282 this->setCoeffs(&polynomial_[0], order);
68283 }
68284
68285
68286
68287
68288
68289
68290 template <class ITER>
68291 Polynomial(ITER i, unsigned int order, double epsilon)
68292 : BaseType(epsilon),
68293 polynomial_(i, i + order + 1)
68294 {
68295 this->setCoeffs(&polynomial_[0], order);
68296 }
68297
68298
68299
68300 Polynomial & operator=(Polynomial const & p)
68301 {
68302 if(this == &p)
68303 return *this;
68304 ArrayVector<T> tmp(p.begin(), p.end());
68305 polynomial_.swap(tmp);
68306 this->setCoeffs(&polynomial_[0], p.order());
68307 this->epsilon_ = p.epsilon_;
68308 return *this;
68309 }
68310
68311
68312
68313
68314 Polynomial<T> getDerivative(unsigned int n = 1) const
68315 {
68316 Polynomial<T> res(*this);
68317 res.differentiate(n);
68318 return res;
68319 }
68320
68321
68322
68323
68324 Polynomial<T>
68325 getDeflated(Real r) const
68326 {
68327 Polynomial<T> res(*this);
68328 res.deflate(r);
68329 return res;
68330 }
68331
68332
68333
68334
68335
68336
68337 Polynomial<Complex>
68338 getDeflated(Complex const & r) const
68339 {
68340 Polynomial<Complex> res(this->begin(), this->order(), this->epsilon());
68341 res.deflate(r);
68342 return res;
68343 }
68344
68345 protected:
68346 ArrayVector<T> polynomial_;
68347 };
68348 # 574 "../include/vigra/polynomial.hxx"
68349 template <unsigned int MAXORDER, class T>
68350 class StaticPolynomial
68351 : public PolynomialView<T>
68352 {
68353 typedef PolynomialView<T> BaseType;
68354
68355 public:
68356 typedef typename BaseType::Real Real;
68357 typedef typename BaseType::Complex Complex;
68358 typedef StaticPolynomial<MAXORDER, Real> RealPolynomial;
68359 typedef StaticPolynomial<MAXORDER, Complex> ComplexPolynomial;
68360
68361 typedef T value_type;
68362 typedef T * iterator;
68363 typedef T const * const_iterator;
68364 # 597 "../include/vigra/polynomial.hxx"
68365 StaticPolynomial(unsigned int order = 0, double epsilon = 1.0e-14)
68366 : BaseType(epsilon)
68367 {
68368 vigra::throw_precondition_error((order <= MAXORDER), "StaticPolynomial(): order exceeds MAXORDER.");
68369
68370 std::fill_n(polynomial_, order+1, T());
68371 this->setCoeffs(polynomial_, order);
68372 }
68373
68374
68375
68376 StaticPolynomial(StaticPolynomial const & p)
68377 : BaseType(p.epsilon())
68378 {
68379 std::copy(p.begin(), p.end(), polynomial_);
68380 this->setCoeffs(polynomial_, p.order());
68381 }
68382
68383
68384
68385
68386 template <class ITER>
68387 StaticPolynomial(ITER i, unsigned int order)
68388 : BaseType()
68389 {
68390 vigra::throw_precondition_error((order <= MAXORDER), "StaticPolynomial(): order exceeds MAXORDER.");
68391
68392 std::copy(i, i + order + 1, polynomial_);
68393 this->setCoeffs(polynomial_, order);
68394 }
68395
68396
68397
68398
68399
68400
68401 template <class ITER>
68402 StaticPolynomial(ITER i, unsigned int order, double epsilon)
68403 : BaseType(epsilon)
68404 {
68405 vigra::throw_precondition_error((order <= MAXORDER), "StaticPolynomial(): order exceeds MAXORDER.");
68406
68407 std::copy(i, i + order + 1, polynomial_);
68408 this->setCoeffs(polynomial_, order);
68409 }
68410
68411
68412
68413 StaticPolynomial & operator=(StaticPolynomial const & p)
68414 {
68415 if(this == &p)
68416 return *this;
68417 std::copy(p.begin(), p.end(), polynomial_);
68418 this->setCoeffs(polynomial_, p.order());
68419 this->epsilon_ = p.epsilon_;
68420 return *this;
68421 }
68422
68423
68424
68425
68426 StaticPolynomial getDerivative(unsigned int n = 1) const
68427 {
68428 StaticPolynomial res(*this);
68429 res.differentiate(n);
68430 return res;
68431 }
68432
68433
68434
68435
68436 StaticPolynomial
68437 getDeflated(Real r) const
68438 {
68439 StaticPolynomial res(*this);
68440 res.deflate(r);
68441 return res;
68442 }
68443
68444
68445
68446
68447
68448
68449 StaticPolynomial<MAXORDER, Complex>
68450 getDeflated(Complex const & r) const
68451 {
68452 StaticPolynomial<MAXORDER, Complex> res(this->begin(), this->order(), this->epsilon());
68453 res.deflate(r);
68454 return res;
68455 }
68456
68457 void setOrder(unsigned int order)
68458 {
68459 vigra::throw_precondition_error((order <= MAXORDER), "taticPolynomial::setOrder(): order exceeds MAXORDER.");
68460
68461 this->order_ = order;
68462 }
68463
68464 protected:
68465 T polynomial_[MAXORDER+1];
68466 };
68467
68468
68469
68470 namespace detail {
68471
68472
68473
68474 template <class T>
68475 std::complex<T> complexDiv(std::complex<T> const & a, std::complex<T> const & b)
68476 {
68477 const double abs_breal = b.real() < 0 ? -b.real() : b.real();
68478 const double abs_bimag = b.imag() < 0 ? -b.imag() : b.imag();
68479
68480 if (abs_breal >= abs_bimag)
68481 {
68482
68483 if (abs_breal == 0.0)
68484 {
68485 return std::complex<T>(a.real() / abs_breal, a.imag() / abs_breal);
68486 }
68487 else
68488 {
68489 const double ratio = b.imag() / b.real();
68490 const double denom = b.real() + b.imag() * ratio;
68491 return std::complex<T>((a.real() + a.imag() * ratio) / denom,
68492 (a.imag() - a.real() * ratio) / denom);
68493 }
68494 }
68495 else
68496 {
68497
68498 const double ratio = b.real() / b.imag();
68499 const double denom = b.real() * ratio + b.imag();
68500 return std::complex<T>((a.real() * ratio + a.imag()) / denom,
68501 (a.imag() * ratio - a.real()) / denom);
68502 }
68503 }
68504
68505 template <class T>
68506 std::complex<T> deleteBelowEpsilon(std::complex<T> const & x, double eps)
68507 {
68508 return std::abs(x.imag()) <= 2.0*eps*std::abs(x.real())
68509 ? std::complex<T>(x.real())
68510 : std::abs(x.real()) <= 2.0*eps*std::abs(x.imag())
68511 ? std::complex<T>(NumericTraits<T>::zero(), x.imag())
68512 : x;
68513 }
68514
68515 template <class POLYNOMIAL>
68516 typename POLYNOMIAL::value_type
68517 laguerreStartingGuess(POLYNOMIAL const & p)
68518 {
68519 double N = p.order();
68520 typename POLYNOMIAL::value_type centroid = -p[p.order()-1] / N / p[p.order()];
68521 double dist = std::pow(std::abs(p(centroid) / p[p.order()]), 1.0 / N);
68522 return centroid + dist;
68523 }
68524
68525 template <class POLYNOMIAL, class Complex>
68526 int laguerre1Root(POLYNOMIAL const & p, Complex & x, unsigned int multiplicity)
68527 {
68528 typedef typename NumericTraits<Complex>::ValueType Real;
68529
68530 static double frac[] = {0.0, 0.5, 0.25, 0.75, 0.13, 0.38, 0.62, 0.88, 1.0};
68531 int maxiter = 80,
68532 count;
68533 double N = p.order();
68534 double eps = p.epsilon(),
68535 eps2 = std::sqrt(eps);
68536
68537 if(multiplicity == 0)
68538 x = laguerreStartingGuess(p);
68539
68540 bool mayTryDerivative = true;
68541
68542 for(count = 0; count < maxiter; ++count)
68543 {
68544
68545
68546 Complex p0(p[p.order()]);
68547 Complex p1(0.0);
68548 Complex p2(0.0);
68549 Real ax = std::abs(x);
68550 Real err = std::abs(p0);
68551 for(int i = p.order()-1; i >= 0; --i)
68552 {
68553 p2 = p2 * x + p1;
68554 p1 = p1 * x + p0;
68555 p0 = p0 * x + p[i];
68556 err = err * ax + std::abs(p0);
68557 }
68558 p2 *= 2.0;
68559 err *= eps;
68560 Real ap0 = std::abs(p0);
68561 if(ap0 <= err)
68562 {
68563 break;
68564 }
68565 Complex g = complexDiv(p1, p0);
68566 Complex g2 = g * g;
68567 Complex h = g2 - complexDiv(p2, p0);
68568
68569 if(g2 != 0.0)
68570 {
68571 multiplicity = (unsigned int)std::floor(N /
68572 (std::abs(N * complexDiv(h, g2) - 1.0) + 1.0) + 0.5);
68573 if(multiplicity < 1)
68574 multiplicity = 1;
68575 }
68576
68577
68578
68579 if(mayTryDerivative && multiplicity > 1 && ap0 < eps2)
68580 {
68581 Complex x1 = x;
68582 int derivativeMultiplicity = laguerre1Root(p.getDerivative(), x1, multiplicity-1);
68583 if(derivativeMultiplicity && std::abs(p(x1)) < std::abs(p(x)))
68584 {
68585
68586 x = x1;
68587 return derivativeMultiplicity + 1;
68588 }
68589 else
68590 {
68591
68592 mayTryDerivative = false;
68593 }
68594 }
68595 Complex sq = std::sqrt((N - 1.0) * (N * h - g2));
68596 Complex gp = g + sq;
68597 Complex gm = g - sq;
68598 if(std::abs(gp) < std::abs(gm))
68599 gp = gm;
68600 Complex dx;
68601 if(gp != 0.0)
68602 {
68603 dx = complexDiv(Complex(N) , gp);
68604 }
68605 else
68606 {
68607
68608 dx = (1.0 + ax) * Complex(std::cos(double(count)), std::sin(double(count)));
68609 }
68610 Complex x1 = x - dx;
68611
68612 if(x1 - x == 0.0)
68613 {
68614 break;
68615 }
68616 if((count + 1) % 10)
68617 x = x1;
68618 else
68619
68620 x = x - frac[(count+1)/10] * dx;
68621 }
68622 return count < maxiter ?
68623 multiplicity :
68624 0;
68625 }
68626
68627 template <class Real>
68628 struct PolynomialRootCompare
68629 {
68630 Real epsilon;
68631
68632 PolynomialRootCompare(Real eps)
68633 : epsilon(eps)
68634 {}
68635
68636 template <class T>
68637 bool operator()(T const & l, T const & r)
68638 {
68639 return closeAtTolerance(l.real(), r.real(), epsilon)
68640 ? l.imag() < r.imag()
68641 : l.real() < r.real();
68642 }
68643 };
68644
68645 }
68646 # 939 "../include/vigra/polynomial.hxx"
68647 template <class POLYNOMIAL, class VECTOR>
68648 bool polynomialRoots(POLYNOMIAL const & poriginal, VECTOR & roots, bool polishRoots)
68649 {
68650 typedef typename POLYNOMIAL::value_type T;
68651 typedef typename POLYNOMIAL::Real Real;
68652 typedef typename POLYNOMIAL::Complex Complex;
68653 typedef typename POLYNOMIAL::ComplexPolynomial WorkPolynomial;
68654
68655 double eps = poriginal.epsilon();
68656
68657 WorkPolynomial p(poriginal.begin(), poriginal.order(), eps);
68658 p.minimizeOrder();
68659 if(p.order() == 0)
68660 return true;
68661
68662 Complex x = detail::laguerreStartingGuess(p);
68663
68664 unsigned int multiplicity = 1;
68665 bool triedConjugate = false;
68666
68667
68668 while(p.order() > 2)
68669 {
68670 p.balance();
68671
68672
68673
68674 multiplicity = detail::laguerre1Root(p, x, multiplicity);
68675
68676 if(multiplicity == 0)
68677 return false;
68678
68679
68680 if(polishRoots && !detail::laguerre1Root(poriginal, x, multiplicity))
68681 return false;
68682 x = detail::deleteBelowEpsilon(x, eps);
68683 roots.push_back(x);
68684 p.deflate(x);
68685
68686 if(multiplicity > 1)
68687 {
68688
68689 --multiplicity;
68690 triedConjugate = false;
68691 }
68692 else
68693 {
68694
68695 if(x.imag() != 0.0 && !triedConjugate)
68696 {
68697
68698
68699 triedConjugate = true;
68700 x = conj(x);
68701 }
68702 else
68703 {
68704
68705 triedConjugate = false;
68706 x = detail::laguerreStartingGuess(p);
68707 }
68708 }
68709 }
68710
68711
68712 if(p.order() == 2)
68713 {
68714 Complex a = p[2];
68715 Complex b = p[1];
68716 Complex c = p[0];
68717 Complex b2 = std::sqrt(b*b - 4.0*a*c);
68718 Complex q;
68719 if((conj(b)*b2).real() >= 0.0)
68720 q = -0.5 * (b + b2);
68721 else
68722 q = -0.5 * (b - b2);
68723 x = detail::complexDiv(q, a);
68724 if(polishRoots)
68725 detail::laguerre1Root(poriginal, x, 1);
68726 roots.push_back(detail::deleteBelowEpsilon(x, eps));
68727 x = detail::complexDiv(c, q);
68728 if(polishRoots)
68729 detail::laguerre1Root(poriginal, x, 1);
68730 roots.push_back(detail::deleteBelowEpsilon(x, eps));
68731 }
68732 else if(p.order() == 1)
68733 {
68734 x = detail::complexDiv(-p[0], p[1]);
68735 if(polishRoots)
68736 detail::laguerre1Root(poriginal, x, 1);
68737 roots.push_back(detail::deleteBelowEpsilon(x, eps));
68738 }
68739 std::sort(roots.begin(), roots.end(), detail::PolynomialRootCompare<Real>(eps));
68740 return true;
68741 }
68742
68743 template <class POLYNOMIAL, class VECTOR>
68744 inline bool
68745 polynomialRoots(POLYNOMIAL const & poriginal, VECTOR & roots)
68746 {
68747 return polynomialRoots(poriginal, roots, true);
68748 }
68749 # 1077 "../include/vigra/polynomial.hxx"
68750 template <class POLYNOMIAL, class VECTOR>
68751 bool polynomialRealRoots(POLYNOMIAL const & p, VECTOR & roots, bool polishRoots)
68752 {
68753 typedef typename NumericTraits<typename VECTOR::value_type>::ComplexPromote Complex;
68754 ArrayVector<Complex> croots;
68755 if(!polynomialRoots(p, croots, polishRoots))
68756 return false;
68757 for(unsigned int i = 0; i < croots.size(); ++i)
68758 if(croots[i].imag() == 0.0)
68759 roots.push_back(croots[i].real());
68760 return true;
68761 }
68762
68763 template <class POLYNOMIAL, class VECTOR>
68764 inline bool
68765 polynomialRealRoots(POLYNOMIAL const & poriginal, VECTOR & roots)
68766 {
68767 return polynomialRealRoots(poriginal, roots, true);
68768 }
68769
68770
68771
68772 }
68773
68774 namespace std {
68775
68776 template <class T>
68777 ostream & operator<<(ostream & o, vigra::PolynomialView<T> const & p)
68778 {
68779 for(unsigned int k=0; k < p.order(); ++k)
68780 o << p[k] << " ";
68781 o << p[p.order()];
68782 return o;
68783 }
68784
68785 }
68786 # 44 "../include/vigra/splines.hxx" 2
68787
68788 # 1 "../include/vigra/fixedpoint.hxx" 1
68789 # 45 "../include/vigra/fixedpoint.hxx"
68790 namespace vigra {
68791
68792 template <unsigned IntBits, unsigned FractionalBits>
68793 class FixedPoint;
68794
68795 struct Error_FixedPointTraits_not_specialized_for_this_case;
68796
68797 template <class T1, class T2>
68798 class FixedPointTraits
68799 {
68800 public:
68801 typedef Error_FixedPointTraits_not_specialized_for_this_case PlusType;
68802 typedef Error_FixedPointTraits_not_specialized_for_this_case MinusType;
68803 typedef Error_FixedPointTraits_not_specialized_for_this_case MultipliesType;
68804
68805 };
68806
68807
68808
68809
68810
68811 template <unsigned IntBits1, unsigned FracBits1, unsigned IntBits2, unsigned FracBits2>
68812 class FixedPointTraits<FixedPoint<IntBits1, FracBits1>, FixedPoint<IntBits2, FracBits2> >
68813 {
68814 enum { MaxIntBits = (IntBits1 < IntBits2) ? IntBits2 : IntBits1,
68815 MaxFracBits = (FracBits1 < FracBits2) ? FracBits2 : FracBits1,
68816 PlusMinusIntBits = (MaxIntBits + 1 + MaxFracBits < 32) ?
68817 MaxIntBits + 1 : MaxIntBits,
68818 MultipliesFracBits = (IntBits1 + IntBits2 < 31)
68819 ? (FracBits1 + FracBits2) > (31 - IntBits1 - IntBits2)
68820 ? 31 - IntBits1 - IntBits2
68821 : FracBits1 + FracBits2
68822 : 0
68823 };
68824 public:
68825 typedef FixedPoint<PlusMinusIntBits, MaxFracBits> PlusType;
68826 typedef FixedPoint<PlusMinusIntBits, MaxFracBits> MinusType;
68827 typedef FixedPoint<IntBits1 + IntBits2, MultipliesFracBits> MultipliesType;
68828
68829 };
68830
68831 template <unsigned IntBits, unsigned FracBits>
68832 struct SquareRootTraits<FixedPoint<IntBits, FracBits> >
68833 {
68834 enum { SRTotalBits = (IntBits + FracBits + 1) / 2,
68835 SRIntBits = (IntBits + 1) / 2,
68836 SRFracBits = SRTotalBits - SRIntBits
68837 };
68838 public:
68839 typedef FixedPoint<IntBits, FracBits> Type;
68840 typedef FixedPoint<SRIntBits, SRFracBits> SquareRootResult;
68841 typedef Type SquareRootArgument;
68842 };
68843
68844
68845
68846
68847 template <int N>
68848 struct FixedPoint_overflow_error__More_than_31_bits_requested
68849 : staticAssert::AssertBool<(N < 32)>
68850 {};
68851
68852
68853
68854
68855
68856 template <bool Predicate>
68857 struct FixedPoint_assignment_error__Target_object_has_too_few_integer_bits
68858 : staticAssert::AssertBool<Predicate>
68859 {};
68860
68861 enum FixedPointNoShift { FPNoShift };
68862
68863 namespace detail {
68864
68865 template <bool MustRound>
68866 struct FPAssignWithRound;
68867
68868 template <>
68869 struct FPAssignWithRound<false>
68870 {
68871 template <int N>
68872 static inline int exec(int v) { return v << (-N); }
68873 };
68874
68875 template <>
68876 struct FPAssignWithRound<true>
68877 {
68878 template <int N>
68879 static inline int exec(int const v)
68880 {
68881 return (v + (1 << (N - 1))) >> (N);
68882 }
68883 };
68884
68885 template <bool MustRound>
68886 struct FPMulImplementation;
68887
68888 template <>
68889 struct FPMulImplementation<false>
68890 {
68891 template <int N>
68892 static inline int exec(int l, int r) { return (l * r) << (-N); }
68893 };
68894
68895 template <>
68896 struct FPMulImplementation<true>
68897 {
68898 template <int N>
68899 static inline int exec(int l, int r)
68900 {
68901
68902
68903 enum { diffl = N / 2, diffr = N - diffl, maskl = (1 << diffl) - 1, maskr = (1 << diffr) - 1 };
68904 int shiftl = l >> diffl;
68905 int shiftr = r >> diffr;
68906
68907 return shiftl * shiftr + (((l & maskl) * shiftr) >> diffl) +
68908 (((r & maskr) * shiftl) >> diffr);
68909 }
68910 };
68911
68912 }
68913 # 217 "../include/vigra/fixedpoint.hxx"
68914 template <unsigned IntBits, unsigned FractionalBits>
68915 class FixedPoint
68916 {
68917 public:
68918 enum {
68919 INT_BITS = IntBits,
68920 FRACTIONAL_BITS = FractionalBits,
68921 TOTAL_BITS = IntBits + FractionalBits,
68922 MAX = (int)(((unsigned)1 << TOTAL_BITS) - 1),
68923 ONE = 1 << FractionalBits,
68924 ONE_HALF = ONE >> 1,
68925 FRACTIONAL_MASK = ONE - 1,
68926 INT_MASK = MAX ^ FRACTIONAL_MASK
68927 };
68928
68929 Int32 value;
68930
68931 FixedPoint()
68932 {
68933 enum { vigra_assertion_in_line_236 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (FixedPoint_overflow_error__More_than_31_bits_requested<(IntBits + FractionalBits)>))0, 1 ) ) ) };
68934 }
68935
68936
68937
68938 explicit FixedPoint(int v)
68939 : value(v << FractionalBits)
68940 {
68941 enum { vigra_assertion_in_line_244 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (FixedPoint_overflow_error__More_than_31_bits_requested<(IntBits + FractionalBits)>))0, 1 ) ) ) };
68942 }
68943
68944
68945
68946 FixedPoint(int v, FixedPointNoShift)
68947 : value(v)
68948 {
68949 enum { vigra_assertion_in_line_252 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (FixedPoint_overflow_error__More_than_31_bits_requested<(IntBits + FractionalBits)>))0, 1 ) ) ) };
68950 }
68951
68952
68953
68954
68955
68956 explicit FixedPoint(double rhs)
68957 : value((int)round(rhs * ONE))
68958 {
68959 enum { vigra_assertion_in_line_262 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (FixedPoint_overflow_error__More_than_31_bits_requested<(IntBits + FractionalBits)>))0, 1 ) ) ) };
68960 vigra::throw_precondition_error((abs(rhs * ONE) <= (double)MAX), "FixedPoint(double rhs): Too few integer bits to convert rhs.");
68961
68962 }
68963
68964
68965
68966 FixedPoint(const FixedPoint &other)
68967 : value(other.value)
68968 {}
68969
68970
68971
68972
68973 template <unsigned Int2, unsigned Frac2>
68974 FixedPoint(const FixedPoint<Int2, Frac2> &other)
68975 : value(detail::FPAssignWithRound<(Frac2 > FractionalBits)>::template exec<Frac2 - FractionalBits>(other.value))
68976 {
68977 enum { vigra_assertion_in_line_280 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (FixedPoint_overflow_error__More_than_31_bits_requested<(IntBits + FractionalBits)>))0, 1 ) ) ) };
68978 enum { vigra_assertion_in_line_281 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (FixedPoint_assignment_error__Target_object_has_too_few_integer_bits<(IntBits >= Int2)>))0, 1 ) ) ) };
68979 }
68980
68981
68982
68983
68984
68985 FixedPoint &operator=(int rhs)
68986 {
68987 vigra::throw_precondition_error((abs(rhs) < (1 << IntBits)), "FixedPoint::operator=(int rhs): Too few integer bits to represent rhs.");
68988
68989 value = rhs << FractionalBits;
68990 return *this;
68991 }
68992
68993
68994
68995
68996
68997 FixedPoint &operator=(double rhs)
68998 {
68999 vigra::throw_precondition_error((abs(rhs) <= ((1 << IntBits) - 1)), "FixedPoint::operator=(double rhs): Too few integer bits to convert rhs.");
69000
69001 value = (int)round(rhs * ONE);
69002 return *this;
69003 }
69004
69005
69006
69007 FixedPoint & operator=(const FixedPoint &other)
69008 {
69009 value = other.value;
69010 return *this;
69011 }
69012
69013
69014
69015
69016 template <unsigned Int2, unsigned Frac2>
69017 FixedPoint & operator=(const FixedPoint<Int2, Frac2> &other)
69018 {
69019 enum { vigra_assertion_in_line_322 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (FixedPoint_assignment_error__Target_object_has_too_few_integer_bits<(IntBits >= Int2)>))0, 1 ) ) ) };
69020 value = detail::FPAssignWithRound<(Frac2 > FractionalBits)>::template exec<Frac2 - FractionalBits>(other.value);
69021 return *this;
69022 }
69023
69024
69025
69026 FixedPoint operator-() const
69027 {
69028 return FixedPoint(-value, FPNoShift);
69029 }
69030
69031
69032
69033 FixedPoint & operator++()
69034 {
69035 value += ONE;
69036 return *this;
69037 }
69038
69039
69040
69041 FixedPoint operator++(int)
69042 {
69043 FixedPoint old(*this);
69044 value += ONE;
69045 return old;
69046 }
69047
69048
69049
69050 FixedPoint & operator--()
69051 {
69052 value -= ONE;
69053 return *this;
69054 }
69055
69056
69057
69058 FixedPoint operator--(int)
69059 {
69060 FixedPoint old(*this);
69061 value -= ONE;
69062 return old;
69063 }
69064
69065
69066
69067
69068 template <unsigned Int2, unsigned Frac2>
69069 FixedPoint & operator+=(const FixedPoint<Int2, Frac2> &other)
69070 {
69071 enum { vigra_assertion_in_line_374 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (FixedPoint_assignment_error__Target_object_has_too_few_integer_bits<(IntBits >= Int2)>))0, 1 ) ) ) };
69072 value += detail::FPAssignWithRound<(Frac2 > FractionalBits)>::template exec<Frac2 - FractionalBits>(other.value);
69073 return *this;
69074 }
69075
69076
69077
69078
69079 template <unsigned Int2, unsigned Frac2>
69080 FixedPoint & operator-=(const FixedPoint<Int2, Frac2> &other)
69081 {
69082 enum { vigra_assertion_in_line_385 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (FixedPoint_assignment_error__Target_object_has_too_few_integer_bits<(IntBits >= Int2)>))0, 1 ) ) ) };
69083 value -= detail::FPAssignWithRound<(Frac2 > FractionalBits)>::template exec<Frac2 - FractionalBits>(other.value);
69084 return *this;
69085 }
69086
69087
69088
69089
69090 template <unsigned Int2, unsigned Frac2>
69091 FixedPoint & operator*=(const FixedPoint<Int2, Frac2> &other)
69092 {
69093 enum { vigra_assertion_in_line_396 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (FixedPoint_assignment_error__Target_object_has_too_few_integer_bits<(IntBits >= Int2)>))0, 1 ) ) ) };
69094 value = detail::FPMulImplementation<(Frac2 > 0)>::template exec<Frac2>(value, other.value);
69095 return *this;
69096 }
69097 };
69098
69099
69100
69101
69102
69103
69104
69105 inline FixedPoint<8, 0> fixedPoint(unsigned char t) { return FixedPoint<8, 0>(t, FPNoShift); }
69106 inline FixedPoint<7, 0> fixedPoint(signed char t) { return FixedPoint<7, 0>(t, FPNoShift); }
69107 inline FixedPoint<16, 0> fixedPoint(unsigned short t) { return FixedPoint<16, 0>(t, FPNoShift); }
69108 inline FixedPoint<15, 0> fixedPoint(signed short t) { return FixedPoint<15, 0>(t, FPNoShift); }
69109 inline FixedPoint<31, 0> fixedPoint(int t) { return FixedPoint<31, 0>(t, FPNoShift); }
69110
69111
69112
69113 template <class T>
69114 struct FixedPointCast;
69115 # 430 "../include/vigra/fixedpoint.hxx"
69116 template <> struct FixedPointCast<Int8> { template <unsigned IntBits, unsigned FracBits> static Int8 cast(FixedPoint<IntBits, FracBits> v) { return round(v); } };
69117 template <> struct FixedPointCast<UInt8> { template <unsigned IntBits, unsigned FracBits> static UInt8 cast(FixedPoint<IntBits, FracBits> v) { return round(v); } };
69118 template <> struct FixedPointCast<Int16> { template <unsigned IntBits, unsigned FracBits> static Int16 cast(FixedPoint<IntBits, FracBits> v) { return round(v); } };
69119 template <> struct FixedPointCast<UInt16> { template <unsigned IntBits, unsigned FracBits> static UInt16 cast(FixedPoint<IntBits, FracBits> v) { return round(v); } };
69120 template <> struct FixedPointCast<Int32> { template <unsigned IntBits, unsigned FracBits> static Int32 cast(FixedPoint<IntBits, FracBits> v) { return round(v); } };
69121 template <> struct FixedPointCast<UInt32> { template <unsigned IntBits, unsigned FracBits> static UInt32 cast(FixedPoint<IntBits, FracBits> v) { return round(v); } };
69122
69123
69124
69125 template <>
69126 struct FixedPointCast<float>
69127 {
69128 template <unsigned IntBits, unsigned FracBits>
69129 static float cast(FixedPoint<IntBits, FracBits> v)
69130 {
69131 return (float)v.value / FixedPoint<IntBits, FracBits>::ONE;
69132 }
69133 };
69134
69135 template <>
69136 struct FixedPointCast<double>
69137 {
69138 template <unsigned IntBits, unsigned FracBits>
69139 static double cast(FixedPoint<IntBits, FracBits> v)
69140 {
69141 return (double)v.value / FixedPoint<IntBits, FracBits>::ONE;
69142 }
69143 };
69144 # 486 "../include/vigra/fixedpoint.hxx"
69145 template <class TARGET, unsigned IntBits, unsigned FracBits>
69146 TARGET fixed_point_cast(FixedPoint<IntBits, FracBits> v)
69147 {
69148 return FixedPointCast<TARGET>::cast(v);
69149 }
69150
69151
69152 template <unsigned IntBits1, unsigned FracBits1, unsigned IntBits2, unsigned FracBits2>
69153 inline
69154 bool operator==(FixedPoint<IntBits1, FracBits1> l, FixedPoint<IntBits2, FracBits2> r)
69155 {
69156 enum { MaxFracBits = (FracBits1 < FracBits2) ? FracBits2 : FracBits1 };
69157 return (l.value << (MaxFracBits - FracBits1)) == (r.value << (MaxFracBits - FracBits2));
69158 }
69159
69160
69161 template <unsigned IntBits1, unsigned FracBits1, unsigned IntBits2, unsigned FracBits2>
69162 inline
69163 bool operator!=(FixedPoint<IntBits1, FracBits1> l, FixedPoint<IntBits2, FracBits2> r)
69164 {
69165 enum { MaxFracBits = (FracBits1 < FracBits2) ? FracBits2 : FracBits1 };
69166 return (l.value << (MaxFracBits - FracBits1)) != (r.value << (MaxFracBits - FracBits2));
69167 }
69168
69169
69170 template <unsigned IntBits1, unsigned FracBits1, unsigned IntBits2, unsigned FracBits2>
69171 inline
69172 bool operator<(FixedPoint<IntBits1, FracBits1> l, FixedPoint<IntBits2, FracBits2> r)
69173 {
69174 enum { MaxFracBits = (FracBits1 < FracBits2) ? FracBits2 : FracBits1 };
69175 return (l.value << (MaxFracBits - FracBits1)) < (r.value << (MaxFracBits - FracBits2));
69176 }
69177
69178
69179 template <unsigned IntBits1, unsigned FracBits1, unsigned IntBits2, unsigned FracBits2>
69180 inline
69181 bool operator<=(FixedPoint<IntBits1, FracBits1> l, FixedPoint<IntBits2, FracBits2> r)
69182 {
69183 enum { MaxFracBits = (FracBits1 < FracBits2) ? FracBits2 : FracBits1 };
69184 return (l.value << (MaxFracBits - FracBits1)) <= (r.value << (MaxFracBits - FracBits2));
69185 }
69186
69187
69188 template <unsigned IntBits1, unsigned FracBits1, unsigned IntBits2, unsigned FracBits2>
69189 inline
69190 bool operator>(FixedPoint<IntBits1, FracBits1> l, FixedPoint<IntBits2, FracBits2> r)
69191 {
69192 enum { MaxFracBits = (FracBits1 < FracBits2) ? FracBits2 : FracBits1 };
69193 return (l.value << (MaxFracBits - FracBits1)) > (r.value << (MaxFracBits - FracBits2));
69194 }
69195
69196
69197 template <unsigned IntBits1, unsigned FracBits1, unsigned IntBits2, unsigned FracBits2>
69198 inline
69199 bool operator>=(FixedPoint<IntBits1, FracBits1> l, FixedPoint<IntBits2, FracBits2> r)
69200 {
69201 enum { MaxFracBits = (FracBits1 < FracBits2) ? FracBits2 : FracBits1 };
69202 return (l.value << (MaxFracBits - FracBits1)) >= (r.value << (MaxFracBits - FracBits2));
69203 }
69204
69205
69206 template <unsigned IntBits1, unsigned FracBits1, unsigned IntBits2, unsigned FracBits2>
69207 inline
69208 typename FixedPointTraits<FixedPoint<IntBits1, FracBits1>, FixedPoint<IntBits2, FracBits2> >::PlusType
69209 operator+(FixedPoint<IntBits1, FracBits1> l, FixedPoint<IntBits2, FracBits2> r)
69210 {
69211 enum { MaxFracBits = (FracBits1 < FracBits2) ? FracBits2 : FracBits1 };
69212 return typename
69213 FixedPointTraits<FixedPoint<IntBits1, FracBits1>, FixedPoint<IntBits2, FracBits2> >::
69214 PlusType((l.value << (MaxFracBits - FracBits1)) + (r.value << (MaxFracBits - FracBits2)), FPNoShift);
69215 }
69216
69217
69218 template <unsigned IntBits1, unsigned FracBits1, unsigned IntBits2, unsigned FracBits2,
69219 unsigned IntBits3, unsigned FracBits3>
69220 inline void
69221 add(FixedPoint<IntBits1, FracBits1> l, FixedPoint<IntBits2, FracBits2> r,
69222 FixedPoint<IntBits3, FracBits3> & result)
69223 {
69224 result = l + r;
69225 }
69226
69227
69228 template <unsigned IntBits1, unsigned FracBits1, unsigned IntBits2, unsigned FracBits2>
69229 inline
69230 typename FixedPointTraits<FixedPoint<IntBits1, FracBits1>, FixedPoint<IntBits2, FracBits2> >::MinusType
69231 operator-(FixedPoint<IntBits1, FracBits1> l, FixedPoint<IntBits2, FracBits2> r)
69232 {
69233 enum { MaxFracBits = (FracBits1 < FracBits2) ? FracBits2 : FracBits1 };
69234 return typename
69235 FixedPointTraits<FixedPoint<IntBits1, FracBits1>, FixedPoint<IntBits2, FracBits2> >::
69236 MinusType((l.value << (MaxFracBits - FracBits1)) - (r.value << (MaxFracBits - FracBits2)), FPNoShift);
69237 }
69238
69239
69240 template <unsigned IntBits1, unsigned FracBits1, unsigned IntBits2, unsigned FracBits2,
69241 unsigned IntBits3, unsigned FracBits3>
69242 inline void
69243 sub(FixedPoint<IntBits1, FracBits1> l, FixedPoint<IntBits2, FracBits2> r,
69244 FixedPoint<IntBits3, FracBits3> & result)
69245 {
69246 result = l - r;
69247 }
69248
69249
69250 template <unsigned IntBits1, unsigned FracBits1, unsigned IntBits2, unsigned FracBits2>
69251 inline
69252 typename FixedPointTraits<FixedPoint<IntBits1, FracBits1>, FixedPoint<IntBits2, FracBits2> >::MultipliesType
69253 operator*(FixedPoint<IntBits1, FracBits1> l, FixedPoint<IntBits2, FracBits2> r)
69254 {
69255 typename FixedPointTraits<FixedPoint<IntBits1, FracBits1>, FixedPoint<IntBits2, FracBits2> >::
69256 MultipliesType res;
69257 mul(l, r, res);
69258 return res;
69259 }
69260
69261
69262 template <unsigned IntBits1, unsigned FracBits1, unsigned IntBits2, unsigned FracBits2,
69263 unsigned IntBits3, unsigned FracBits3>
69264 inline void
69265 mul(FixedPoint<IntBits1, FracBits1> l, FixedPoint<IntBits2, FracBits2> r,
69266 FixedPoint<IntBits3, FracBits3> & result)
69267 {
69268 enum { vigra_assertion_in_line_609 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (FixedPoint_assignment_error__Target_object_has_too_few_integer_bits<(IntBits1 + IntBits2 <= IntBits3)>))0, 1 ) ) ) };
69269 enum { diff = FracBits1 + FracBits2 - FracBits3 };
69270 result.value = detail::FPMulImplementation<(diff > 0)>::template exec<diff>(l.value, r.value);
69271 }
69272
69273
69274 template <unsigned IntBits, unsigned FracBits>
69275 inline typename SquareRootTraits<FixedPoint<IntBits, FracBits> >::SquareRootResult
69276 sqrt(FixedPoint<IntBits, FracBits> v)
69277 {
69278 return typename SquareRootTraits<FixedPoint<IntBits, FracBits> >::SquareRootResult(sqrti(v.value), FPNoShift);
69279 }
69280
69281
69282 template <unsigned IntBits, unsigned FracBits>
69283 inline FixedPoint<IntBits, FracBits>
69284 abs(FixedPoint<IntBits, FracBits> v)
69285 {
69286 return FixedPoint<IntBits, FracBits>(abs(v.value), FPNoShift);
69287 }
69288
69289
69290 template <unsigned IntBits, unsigned FracBits>
69291 inline
69292 typename FixedPointTraits<FixedPoint<IntBits, FracBits>, FixedPoint<IntBits, FracBits> >::MultipliesType
69293 squaredNorm(FixedPoint<IntBits, FracBits> v)
69294 {
69295 return v*v;
69296 }
69297
69298
69299 template <unsigned IntBits, unsigned FracBits>
69300 inline
69301 FixedPoint<IntBits, FracBits>
69302 norm(FixedPoint<IntBits, FracBits> const & v)
69303 {
69304 return abs(v);
69305 }
69306
69307
69308 template <unsigned IntBits, unsigned FracBits>
69309 inline FixedPoint<0, FracBits>
69310 frac(FixedPoint<IntBits, FracBits> v)
69311 {
69312 return FixedPoint<0, FracBits>(v.value & FixedPoint<IntBits, FracBits>::FRACTIONAL_MASK, FPNoShift);
69313 }
69314
69315
69316 template <unsigned IntBits, unsigned FracBits>
69317 inline FixedPoint<0, FracBits>
69318 dual_frac(FixedPoint<IntBits, FracBits> v)
69319 {
69320 return FixedPoint<0, FracBits>(FixedPoint<0, FracBits>::ONE -
69321 (v.value & FixedPoint<IntBits, FracBits>::FRACTIONAL_MASK), FPNoShift);
69322 }
69323
69324
69325 template <unsigned IntBits, unsigned FracBits>
69326 inline int
69327 floor(FixedPoint<IntBits, FracBits> v)
69328 {
69329 return(v.value >> FracBits);
69330 }
69331
69332
69333 template <unsigned IntBits, unsigned FracBits>
69334 inline int
69335 ceil(FixedPoint<IntBits, FracBits> v)
69336 {
69337 return((v.value + FixedPoint<IntBits, FracBits>::FRACTIONAL_MASK) >> FracBits);
69338 }
69339
69340
69341 template <unsigned IntBits, unsigned FracBits>
69342 inline int
69343 round(FixedPoint<IntBits, FracBits> v)
69344 {
69345 return((v.value + FixedPoint<IntBits, FracBits>::ONE_HALF) >> FracBits);
69346 }
69347 # 764 "../include/vigra/fixedpoint.hxx"
69348 template <unsigned IntBits, unsigned FracBits>
69349 struct NumericTraits<FixedPoint<IntBits, FracBits> >
69350 {
69351 typedef FixedPoint<IntBits, FracBits> Type;
69352
69353
69354
69355 typedef Type ValueType;
69356
69357 typedef VigraFalseType isIntegral;
69358 typedef VigraTrueType isScalar;
69359 typedef VigraTrueType isSigned;
69360 typedef VigraTrueType isOrdered;
69361 typedef VigraFalseType isComplex;
69362
69363 static Type zero() { return Type(0, FPNoShift); }
69364 static Type one() { return Type(Type::ONE, FPNoShift); }
69365 static Type nonZero() { return one(); }
69366 static Type epsilon() { return Type(1, FPNoShift); }
69367 static Type smallestPositive() { return Type(1, FPNoShift); }
69368 static Type max() { return Type( Type::MAX, FPNoShift); }
69369 static Type min() { return -max(); }
69370 };
69371
69372 template <unsigned IntBits, unsigned FracBits>
69373 struct NormTraits<FixedPoint<IntBits, FracBits> >
69374 {
69375 typedef FixedPoint<IntBits, FracBits> Type;
69376 typedef typename
69377 FixedPointTraits<FixedPoint<IntBits, FracBits>, FixedPoint<IntBits, FracBits> >::MultipliesType
69378 SquaredNormType;
69379 typedef Type NormType;
69380 };
69381
69382 template <unsigned IntBits1, unsigned FracBits1, unsigned IntBits2, unsigned FracBits2>
69383 struct PromoteTraits<FixedPoint<IntBits1, FracBits1>,
69384 FixedPoint<IntBits2, FracBits2> >
69385 {
69386 typedef typename
69387 FixedPointTraits<FixedPoint<IntBits1, FracBits1>, FixedPoint<IntBits2, FracBits2> >::PlusType
69388 Promote;
69389 };
69390
69391 }
69392 # 46 "../include/vigra/splines.hxx" 2
69393
69394 namespace vigra {
69395 # 83 "../include/vigra/splines.hxx"
69396 template <int ORDER, class T = double>
69397 class BSplineBase
69398 {
69399 public:
69400
69401
69402
69403 typedef T value_type;
69404
69405
69406 typedef T argument_type;
69407
69408
69409 typedef T first_argument_type;
69410
69411
69412 typedef unsigned int second_argument_type;
69413
69414
69415 typedef T result_type;
69416
69417
69418 enum StaticOrder { order = ORDER };
69419
69420
69421
69422
69423 explicit BSplineBase(unsigned int derivativeOrder = 0)
69424 : s1_(derivativeOrder)
69425 {}
69426
69427
69428
69429
69430
69431
69432 result_type operator()(argument_type x) const
69433 {
69434 return exec(x, derivativeOrder());
69435 }
69436
69437
69438
69439
69440
69441
69442 result_type operator()(first_argument_type x, second_argument_type derivative_order) const
69443 {
69444 return exec(x, derivativeOrder() + derivative_order);
69445 }
69446
69447
69448
69449 value_type operator[](value_type x) const
69450 { return operator()(x); }
69451
69452
69453
69454
69455 double radius() const
69456 { return (ORDER + 1) * 0.5; }
69457
69458
69459
69460 unsigned int derivativeOrder() const
69461 { return s1_.derivativeOrder(); }
69462 # 158 "../include/vigra/splines.hxx"
69463 ArrayVector<double> const & prefilterCoefficients() const
69464 {
69465 static ArrayVector<double> const & b = calculatePrefilterCoefficients();
69466 return b;
69467 }
69468
69469 static ArrayVector<double> const & calculatePrefilterCoefficients();
69470
69471 typedef T WeightMatrix[ORDER+1][ORDER+1];
69472
69473
69474
69475
69476
69477
69478 static WeightMatrix & weights()
69479 {
69480 static WeightMatrix & b = calculateWeightMatrix();
69481 return b;
69482 }
69483
69484 static WeightMatrix & calculateWeightMatrix();
69485
69486 protected:
69487 result_type exec(first_argument_type x, second_argument_type derivative_order) const;
69488
69489 BSplineBase<ORDER-1, T> s1_;
69490 };
69491
69492 template <int ORDER, class T>
69493 typename BSplineBase<ORDER, T>::result_type
69494 BSplineBase<ORDER, T>::exec(first_argument_type x, second_argument_type derivative_order) const
69495 {
69496 if(derivative_order == 0)
69497 {
69498 T n12 = (ORDER + 1.0) / 2.0;
69499 return ((n12 + x) * s1_(x + 0.5) + (n12 - x) * s1_(x - 0.5)) / ORDER;
69500 }
69501 else
69502 {
69503 --derivative_order;
69504 return s1_(x + 0.5, derivative_order) - s1_(x - 0.5, derivative_order);
69505 }
69506 }
69507
69508 template <int ORDER, class T>
69509 ArrayVector<double> const & BSplineBase<ORDER, T>::calculatePrefilterCoefficients()
69510 {
69511 static ArrayVector<double> b;
69512 if(ORDER > 1)
69513 {
69514 static const int r = ORDER / 2;
69515 StaticPolynomial<2*r, double> p(2*r);
69516 BSplineBase spline;
69517 for(int i = 0; i <= 2*r; ++i)
69518 p[i] = spline(T(i-r));
69519 ArrayVector<double> roots;
69520 polynomialRealRoots(p, roots);
69521 for(unsigned int i = 0; i < roots.size(); ++i)
69522 if(std::fabs(roots[i]) < 1.0)
69523 b.push_back(roots[i]);
69524 }
69525 return b;
69526 }
69527
69528 template <int ORDER, class T>
69529 typename BSplineBase<ORDER, T>::WeightMatrix &
69530 BSplineBase<ORDER, T>::calculateWeightMatrix()
69531 {
69532 static WeightMatrix b;
69533 double faculty = 1.0;
69534 for(int d = 0; d <= ORDER; ++d)
69535 {
69536 if(d > 1)
69537 faculty *= d;
69538 double x = ORDER / 2;
69539 BSplineBase spline;
69540 for(int i = 0; i <= ORDER; ++i, --x)
69541 b[d][i] = spline(x, d) / faculty;
69542 }
69543 return b;
69544 }
69545 # 252 "../include/vigra/splines.hxx"
69546 template <int ORDER, class T = double>
69547 class BSpline
69548 : public BSplineBase<ORDER, T>
69549 {
69550 public:
69551
69552
69553 explicit BSpline(unsigned int derivativeOrder = 0)
69554 : BSplineBase<ORDER, T>(derivativeOrder)
69555 {}
69556 };
69557
69558
69559
69560
69561
69562
69563
69564 template <class T>
69565 class BSplineBase<0, T>
69566 {
69567 public:
69568
69569 typedef T value_type;
69570 typedef T argument_type;
69571 typedef T first_argument_type;
69572 typedef unsigned int second_argument_type;
69573 typedef T result_type;
69574 enum StaticOrder { order = 0 };
69575
69576 explicit BSplineBase(unsigned int derivativeOrder = 0)
69577 : derivativeOrder_(derivativeOrder)
69578 {}
69579
69580 result_type operator()(argument_type x) const
69581 {
69582 return exec(x, derivativeOrder_);
69583 }
69584
69585 template <unsigned int IntBits, unsigned int FracBits>
69586 FixedPoint<IntBits, FracBits> operator()(FixedPoint<IntBits, FracBits> x) const
69587 {
69588 typedef FixedPoint<IntBits, FracBits> Value;
69589 return x.value < Value::ONE_HALF && -Value::ONE_HALF <= x.value
69590 ? Value(Value::ONE, FPNoShift)
69591 : Value(0, FPNoShift);
69592 }
69593
69594 result_type operator()(first_argument_type x, second_argument_type derivative_order) const
69595 {
69596 return exec(x, derivativeOrder_ + derivative_order);
69597 }
69598
69599 value_type operator[](value_type x) const
69600 { return operator()(x); }
69601
69602 double radius() const
69603 { return 0.5; }
69604
69605 unsigned int derivativeOrder() const
69606 { return derivativeOrder_; }
69607
69608 ArrayVector<double> const & prefilterCoefficients() const
69609 {
69610 static ArrayVector<double> b;
69611 return b;
69612 }
69613
69614 typedef T WeightMatrix[1][1];
69615 static WeightMatrix & weights()
69616 {
69617 static T b[1][1] = {{ 1.0}};
69618 return b;
69619 }
69620
69621 protected:
69622 result_type exec(first_argument_type x, second_argument_type derivative_order) const
69623 {
69624 if(derivative_order == 0)
69625 return x < 0.5 && -0.5 <= x ?
69626 1.0
69627 : 0.0;
69628 else
69629 return 0.0;
69630 }
69631
69632 unsigned int derivativeOrder_;
69633 };
69634
69635
69636
69637
69638
69639
69640
69641 template <class T>
69642 class BSpline<1, T>
69643 {
69644 public:
69645
69646 typedef T value_type;
69647 typedef T argument_type;
69648 typedef T first_argument_type;
69649 typedef unsigned int second_argument_type;
69650 typedef T result_type;
69651 enum StaticOrder { order = 1 };
69652
69653 explicit BSpline(unsigned int derivativeOrder = 0)
69654 : derivativeOrder_(derivativeOrder)
69655 {}
69656
69657 result_type operator()(argument_type x) const
69658 {
69659 return exec(x, derivativeOrder_);
69660 }
69661
69662 template <unsigned int IntBits, unsigned int FracBits>
69663 FixedPoint<IntBits, FracBits> operator()(FixedPoint<IntBits, FracBits> x) const
69664 {
69665 typedef FixedPoint<IntBits, FracBits> Value;
69666 int v = abs(x.value);
69667 return v < Value::ONE ?
69668 Value(Value::ONE - v, FPNoShift)
69669 : Value(0, FPNoShift);
69670 }
69671
69672 result_type operator()(first_argument_type x, second_argument_type derivative_order) const
69673 {
69674 return exec(x, derivativeOrder_ + derivative_order);
69675 }
69676
69677 value_type operator[](value_type x) const
69678 { return operator()(x); }
69679
69680 double radius() const
69681 { return 1.0; }
69682
69683 unsigned int derivativeOrder() const
69684 { return derivativeOrder_; }
69685
69686 ArrayVector<double> const & prefilterCoefficients() const
69687 {
69688 static ArrayVector<double> b;
69689 return b;
69690 }
69691
69692 typedef T WeightMatrix[2][2];
69693 static WeightMatrix & weights()
69694 {
69695 static T b[2][2] = {{ 1.0, 0.0}, {-1.0, 1.0}};
69696 return b;
69697 }
69698
69699 protected:
69700 T exec(T x, unsigned int derivative_order) const;
69701
69702 unsigned int derivativeOrder_;
69703 };
69704
69705 template <class T>
69706 T BSpline<1, T>::exec(T x, unsigned int derivative_order) const
69707 {
69708 switch(derivative_order)
69709 {
69710 case 0:
69711 {
69712 x = std::fabs(x);
69713 return x < 1.0 ?
69714 1.0 - x
69715 : 0.0;
69716 }
69717 case 1:
69718 {
69719 return x < 0.0 ?
69720 -1.0 <= x ?
69721 1.0
69722 : 0.0
69723 : x < 1.0 ?
69724 -1.0
69725 : 0.0;
69726 }
69727 default:
69728 return 0.0;
69729 }
69730 }
69731
69732
69733
69734
69735
69736
69737
69738 template <class T>
69739 class BSpline<2, T>
69740 {
69741 public:
69742
69743 typedef T value_type;
69744 typedef T argument_type;
69745 typedef T first_argument_type;
69746 typedef unsigned int second_argument_type;
69747 typedef T result_type;
69748 enum StaticOrder { order = 2 };
69749
69750 explicit BSpline(unsigned int derivativeOrder = 0)
69751 : derivativeOrder_(derivativeOrder)
69752 {}
69753
69754 result_type operator()(argument_type x) const
69755 {
69756 return exec(x, derivativeOrder_);
69757 }
69758
69759 template <unsigned int IntBits, unsigned int FracBits>
69760 FixedPoint<IntBits, FracBits> operator()(FixedPoint<IntBits, FracBits> x) const
69761 {
69762 typedef FixedPoint<IntBits, FracBits> Value;
69763 enum { ONE_HALF = Value::ONE_HALF, THREE_HALVES = ONE_HALF * 3, THREE_QUARTERS = THREE_HALVES / 2,
69764 PREMULTIPLY_SHIFT1 = FracBits <= 16 ? 0 : FracBits - 16,
69765 PREMULTIPLY_SHIFT2 = FracBits - 1 <= 16 ? 0 : FracBits - 17,
69766 POSTMULTIPLY_SHIFT1 = FracBits - 2*PREMULTIPLY_SHIFT1,
69767 POSTMULTIPLY_SHIFT2 = FracBits - 2*PREMULTIPLY_SHIFT2 };
69768 int v = abs(x.value);
69769 return v == ONE_HALF
69770 ? Value(ONE_HALF, FPNoShift)
69771 : v <= ONE_HALF
69772 ? Value(THREE_QUARTERS -
69773 (int)(sq((unsigned)v >> PREMULTIPLY_SHIFT2) >> POSTMULTIPLY_SHIFT2), FPNoShift)
69774 : v < THREE_HALVES
69775 ? Value((int)(sq((unsigned)(THREE_HALVES-v) >> PREMULTIPLY_SHIFT1) >> (POSTMULTIPLY_SHIFT1 + 1)), FPNoShift)
69776 : Value(0, FPNoShift);
69777 }
69778
69779 result_type operator()(first_argument_type x, second_argument_type derivative_order) const
69780 {
69781 return exec(x, derivativeOrder_ + derivative_order);
69782 }
69783
69784 value_type operator[](value_type x) const
69785 { return operator()(x); }
69786
69787 double radius() const
69788 { return 1.5; }
69789
69790 unsigned int derivativeOrder() const
69791 { return derivativeOrder_; }
69792
69793 ArrayVector<double> const & prefilterCoefficients() const
69794 {
69795 static ArrayVector<double> b(1, 2.0*1.41421356237309504880 - 3.0);
69796 return b;
69797 }
69798
69799 typedef T WeightMatrix[3][3];
69800 static WeightMatrix & weights()
69801 {
69802 static T b[3][3] = {{ 0.125, 0.75, 0.125},
69803 {-0.5, 0.0, 0.5},
69804 { 0.5, -1.0, 0.5}};
69805 return b;
69806 }
69807
69808 protected:
69809 result_type exec(first_argument_type x, second_argument_type derivative_order) const;
69810
69811 unsigned int derivativeOrder_;
69812 };
69813
69814 template <class T>
69815 typename BSpline<2, T>::result_type
69816 BSpline<2, T>::exec(first_argument_type x, second_argument_type derivative_order) const
69817 {
69818 switch(derivative_order)
69819 {
69820 case 0:
69821 {
69822 x = std::fabs(x);
69823 return x < 0.5 ?
69824 0.75 - x*x
69825 : x < 1.5 ?
69826 0.5 * sq(1.5 - x)
69827 : 0.0;
69828 }
69829 case 1:
69830 {
69831 return x >= -0.5 ?
69832 x <= 0.5 ?
69833 -2.0 * x
69834 : x < 1.5 ?
69835 x - 1.5
69836 : 0.0
69837 : x > -1.5 ?
69838 x + 1.5
69839 : 0.0;
69840 }
69841 case 2:
69842 {
69843 return x >= -0.5 ?
69844 x < 0.5 ?
69845 -2.0
69846 : x < 1.5 ?
69847 1.0
69848 : 0.0
69849 : x >= -1.5 ?
69850 1.0
69851 : 0.0;
69852 }
69853 default:
69854 return 0.0;
69855 }
69856 }
69857
69858
69859
69860
69861
69862
69863
69864 template <class T>
69865 class BSpline<3, T>
69866 {
69867 public:
69868
69869 typedef T value_type;
69870 typedef T argument_type;
69871 typedef T first_argument_type;
69872 typedef unsigned int second_argument_type;
69873 typedef T result_type;
69874 enum StaticOrder { order = 3 };
69875
69876 explicit BSpline(unsigned int derivativeOrder = 0)
69877 : derivativeOrder_(derivativeOrder)
69878 {}
69879
69880 result_type operator()(argument_type x) const
69881 {
69882 return exec(x, derivativeOrder_);
69883 }
69884
69885 template <unsigned int IntBits, unsigned int FracBits>
69886 FixedPoint<IntBits, FracBits> operator()(FixedPoint<IntBits, FracBits> x) const
69887 {
69888 typedef FixedPoint<IntBits, FracBits> Value;
69889 enum { ONE = Value::ONE, TWO = 2 * ONE, TWO_THIRDS = TWO / 3, ONE_SIXTH = ONE / 6,
69890 PREMULTIPLY_SHIFT = FracBits <= 16 ? 0 : FracBits - 16,
69891 POSTMULTIPLY_SHIFT = FracBits - 2*PREMULTIPLY_SHIFT };
69892 int v = abs(x.value);
69893 return v == ONE
69894 ? Value(ONE_SIXTH, FPNoShift)
69895 : v < ONE
69896 ? Value(TWO_THIRDS +
69897 (((int)(sq((unsigned)v >> PREMULTIPLY_SHIFT) >> (POSTMULTIPLY_SHIFT + PREMULTIPLY_SHIFT))
69898 * (((v >> 1) - ONE) >> PREMULTIPLY_SHIFT)) >> POSTMULTIPLY_SHIFT), FPNoShift)
69899 : v < TWO
69900 ? Value((int)((sq((unsigned)(TWO-v) >> PREMULTIPLY_SHIFT) >> (POSTMULTIPLY_SHIFT + PREMULTIPLY_SHIFT))
69901 * ((unsigned)(TWO-v) >> PREMULTIPLY_SHIFT) / 6) >> POSTMULTIPLY_SHIFT, FPNoShift)
69902 : Value(0, FPNoShift);
69903 }
69904
69905 result_type operator()(first_argument_type x, second_argument_type derivative_order) const
69906 {
69907 return exec(x, derivativeOrder_ + derivative_order);
69908 }
69909
69910 result_type dx(argument_type x) const
69911 { return operator()(x, 1); }
69912
69913 result_type dxx(argument_type x) const
69914 { return operator()(x, 2); }
69915
69916 value_type operator[](value_type x) const
69917 { return operator()(x); }
69918
69919 double radius() const
69920 { return 2.0; }
69921
69922 unsigned int derivativeOrder() const
69923 { return derivativeOrder_; }
69924
69925 ArrayVector<double> const & prefilterCoefficients() const
69926 {
69927 static ArrayVector<double> b(1, std::sqrt(3.0) - 2.0);
69928 return b;
69929 }
69930
69931 typedef T WeightMatrix[4][4];
69932 static WeightMatrix & weights()
69933 {
69934 static T b[4][4] = {{ 1.0 / 6.0, 2.0 / 3.0, 1.0 / 6.0, 0.0},
69935 {-0.5, 0.0, 0.5, 0.0},
69936 { 0.5, -1.0, 0.5, 0.0},
69937 {-1.0 / 6.0, 0.5, -0.5, 1.0 / 6.0}};
69938 return b;
69939 }
69940
69941 protected:
69942 result_type exec(first_argument_type x, second_argument_type derivative_order) const;
69943
69944 unsigned int derivativeOrder_;
69945 };
69946
69947 template <class T>
69948 typename BSpline<3, T>::result_type
69949 BSpline<3, T>::exec(first_argument_type x, second_argument_type derivative_order) const
69950 {
69951 switch(derivative_order)
69952 {
69953 case 0:
69954 {
69955 x = std::fabs(x);
69956 if(x < 1.0)
69957 {
69958 return 2.0/3.0 + x*x*(-1.0 + 0.5*x);
69959 }
69960 else if(x < 2.0)
69961 {
69962 x = 2.0 - x;
69963 return x*x*x/6.0;
69964 }
69965 else
69966 return 0.0;
69967 }
69968 case 1:
69969 {
69970 double s = x < 0.0 ?
69971 -1.0
69972 : 1.0;
69973 x = std::fabs(x);
69974 return x < 1.0 ?
69975 s*x*(-2.0 + 1.5*x)
69976 : x < 2.0 ?
69977 -0.5*s*sq(2.0 - x)
69978 : 0.0;
69979 }
69980 case 2:
69981 {
69982 x = std::fabs(x);
69983 return x < 1.0 ?
69984 3.0*x - 2.0
69985 : x < 2.0 ?
69986 2.0 - x
69987 : 0.0;
69988 }
69989 case 3:
69990 {
69991 return x < 0.0 ?
69992 x < -1.0 ?
69993 x < -2.0 ?
69994 0.0
69995 : 1.0
69996 : -3.0
69997 : x < 1.0 ?
69998 3.0
69999 : x < 2.0 ?
70000 -1.0
70001 : 0.0;
70002 }
70003 default:
70004 return 0.0;
70005 }
70006 }
70007
70008 typedef BSpline<3, double> CubicBSplineKernel;
70009
70010
70011
70012
70013
70014
70015
70016 template <class T>
70017 class BSpline<5, T>
70018 {
70019 public:
70020
70021 typedef T value_type;
70022 typedef T argument_type;
70023 typedef T first_argument_type;
70024 typedef unsigned int second_argument_type;
70025 typedef T result_type;
70026 enum StaticOrder { order = 5 };
70027
70028 explicit BSpline(unsigned int derivativeOrder = 0)
70029 : derivativeOrder_(derivativeOrder)
70030 {}
70031
70032 result_type operator()(argument_type x) const
70033 {
70034 return exec(x, derivativeOrder_);
70035 }
70036
70037 result_type operator()(first_argument_type x, second_argument_type derivative_order) const
70038 {
70039 return exec(x, derivativeOrder_ + derivative_order);
70040 }
70041
70042 result_type dx(argument_type x) const
70043 { return operator()(x, 1); }
70044
70045 result_type dxx(argument_type x) const
70046 { return operator()(x, 2); }
70047
70048 result_type dx3(argument_type x) const
70049 { return operator()(x, 3); }
70050
70051 result_type dx4(argument_type x) const
70052 { return operator()(x, 4); }
70053
70054 value_type operator[](value_type x) const
70055 { return operator()(x); }
70056
70057 double radius() const
70058 { return 3.0; }
70059
70060 unsigned int derivativeOrder() const
70061 { return derivativeOrder_; }
70062
70063 ArrayVector<double> const & prefilterCoefficients() const
70064 {
70065 static ArrayVector<double> const & b = initPrefilterCoefficients();
70066 return b;
70067 }
70068
70069 static ArrayVector<double> const & initPrefilterCoefficients()
70070 {
70071 static ArrayVector<double> b(2);
70072 b[0] = -0.43057534709997114;
70073 b[1] = -0.043096288203264652;
70074 return b;
70075 }
70076
70077 typedef T WeightMatrix[6][6];
70078 static WeightMatrix & weights()
70079 {
70080 static T b[6][6] = {{ 1.0/120.0, 13.0/60.0, 11.0/20.0, 13.0/60.0, 1.0/120.0, 0.0},
70081 {-1.0/24.0, -5.0/12.0, 0.0, 5.0/12.0, 1.0/24.0, 0.0},
70082 { 1.0/12.0, 1.0/6.0, -0.5, 1.0/6.0, 1.0/12.0, 0.0},
70083 {-1.0/12.0, 1.0/6.0, 0.0, -1.0/6.0, 1.0/12.0, 0.0},
70084 { 1.0/24.0, -1.0/6.0, 0.25, -1.0/6.0, 1.0/24.0, 0.0},
70085 {-1.0/120.0, 1.0/24.0, -1.0/12.0, 1.0/12.0, -1.0/24.0, 1.0/120.0}};
70086 return b;
70087 }
70088
70089 protected:
70090 result_type exec(first_argument_type x, second_argument_type derivative_order) const;
70091
70092 unsigned int derivativeOrder_;
70093 };
70094
70095 template <class T>
70096 typename BSpline<5, T>::result_type
70097 BSpline<5, T>::exec(first_argument_type x, second_argument_type derivative_order) const
70098 {
70099 switch(derivative_order)
70100 {
70101 case 0:
70102 {
70103 x = std::fabs(x);
70104 if(x <= 1.0)
70105 {
70106 return 0.55 + x*x*(-0.5 + x*x*(0.25 - x/12.0));
70107 }
70108 else if(x < 2.0)
70109 {
70110 return 17.0/40.0 + x*(0.625 + x*(-1.75 + x*(1.25 + x*(-0.375 + x/24.0))));
70111 }
70112 else if(x < 3.0)
70113 {
70114 x = 3.0 - x;
70115 return x*sq(x*x) / 120.0;
70116 }
70117 else
70118 return 0.0;
70119 }
70120 case 1:
70121 {
70122 double s = x < 0.0 ?
70123 -1.0 :
70124 1.0;
70125 x = std::fabs(x);
70126 if(x <= 1.0)
70127 {
70128 return s*x*(-1.0 + x*x*(1.0 - 5.0/12.0*x));
70129 }
70130 else if(x < 2.0)
70131 {
70132 return s*(0.625 + x*(-3.5 + x*(3.75 + x*(-1.5 + 5.0/24.0*x))));
70133 }
70134 else if(x < 3.0)
70135 {
70136 x = 3.0 - x;
70137 return s*sq(x*x) / -24.0;
70138 }
70139 else
70140 return 0.0;
70141 }
70142 case 2:
70143 {
70144 x = std::fabs(x);
70145 if(x <= 1.0)
70146 {
70147 return -1.0 + x*x*(3.0 -5.0/3.0*x);
70148 }
70149 else if(x < 2.0)
70150 {
70151 return -3.5 + x*(7.5 + x*(-4.5 + 5.0/6.0*x));
70152 }
70153 else if(x < 3.0)
70154 {
70155 x = 3.0 - x;
70156 return x*x*x / 6.0;
70157 }
70158 else
70159 return 0.0;
70160 }
70161 case 3:
70162 {
70163 double s = x < 0.0 ?
70164 -1.0 :
70165 1.0;
70166 x = std::fabs(x);
70167 if(x <= 1.0)
70168 {
70169 return s*x*(6.0 - 5.0*x);
70170 }
70171 else if(x < 2.0)
70172 {
70173 return s*(7.5 + x*(-9.0 + 2.5*x));
70174 }
70175 else if(x < 3.0)
70176 {
70177 x = 3.0 - x;
70178 return -0.5*s*x*x;
70179 }
70180 else
70181 return 0.0;
70182 }
70183 case 4:
70184 {
70185 x = std::fabs(x);
70186 if(x <= 1.0)
70187 {
70188 return 6.0 - 10.0*x;
70189 }
70190 else if(x < 2.0)
70191 {
70192 return -9.0 + 5.0*x;
70193 }
70194 else if(x < 3.0)
70195 {
70196 return 3.0 - x;
70197 }
70198 else
70199 return 0.0;
70200 }
70201 case 5:
70202 {
70203 return x < 0.0 ?
70204 x < -2.0 ?
70205 x < -3.0 ?
70206 0.0
70207 : 1.0
70208 : x < -1.0 ?
70209 -5.0
70210 : 10.0
70211 : x < 2.0 ?
70212 x < 1.0 ?
70213 -10.0
70214 : 5.0
70215 : x < 3.0 ?
70216 -1.0
70217 : 0.0;
70218 }
70219 default:
70220 return 0.0;
70221 }
70222 }
70223
70224 typedef BSpline<5, double> QuinticBSplineKernel;
70225 # 960 "../include/vigra/splines.hxx"
70226 template <class T = double>
70227 class CatmullRomSpline
70228 {
70229 public:
70230
70231
70232 typedef T value_type;
70233
70234
70235 typedef T argument_type;
70236
70237
70238 typedef T result_type;
70239
70240
70241 enum StaticOrder { order = 3 };
70242
70243
70244
70245 result_type operator()(argument_type x) const;
70246
70247
70248
70249 T operator[] (T x) const
70250 { return operator()(x); }
70251
70252
70253
70254
70255 int radius() const
70256 {return 2;}
70257
70258
70259
70260 unsigned int derivativeOrder() const
70261 { return 0; }
70262
70263
70264
70265
70266 ArrayVector<double> const & prefilterCoefficients() const
70267 {
70268 static ArrayVector<double> b;
70269 return b;
70270 }
70271 };
70272
70273
70274 template <class T>
70275 typename CatmullRomSpline<T>::result_type
70276 CatmullRomSpline<T>::operator()(argument_type x) const
70277 {
70278 x = std::fabs(x);
70279 if (x <= 1.0)
70280 {
70281 return 1.0 + x * x * (-2.5 + 1.5 * x);
70282 }
70283 else if (x >= 2.0)
70284 {
70285 return 0.0;
70286 }
70287 else
70288 {
70289 return 2.0 + x * (-4.0 + x * (2.5 - 0.5 * x));
70290 }
70291 }
70292
70293
70294
70295
70296 }
70297 # 49 "../include/vigra/resizeimage.hxx" 2
70298
70299 namespace vigra {
70300 # 81 "../include/vigra/resizeimage.hxx"
70301 template <class T>
70302 class CoscotFunction
70303 {
70304 public:
70305
70306
70307
70308 typedef T value_type;
70309
70310
70311 typedef T argument_type;
70312
70313
70314 typedef T result_type;
70315
70316 CoscotFunction(unsigned int m = 3, double h = 0.5)
70317 : m_(m),
70318 h_(h)
70319 {}
70320
70321
70322
70323 result_type operator()(argument_type x) const
70324 {
70325 return x == 0.0 ?
70326 1.0
70327 : abs(x) < m_ ?
70328 std::sin(3.14159265358979323846*x) / std::tan(3.14159265358979323846 * x / 2.0 / m_) *
70329 (h_ + (1.0 - h_) * std::cos(3.14159265358979323846 * x / m_)) / 2.0 / m_
70330 : 0.0;
70331 }
70332
70333
70334
70335 value_type operator[](value_type x) const
70336 { return operator()(x); }
70337
70338
70339
70340
70341 double radius() const
70342 { return m_; }
70343
70344
70345
70346 unsigned int derivativeOrder() const
70347 { return 0; }
70348
70349
70350
70351
70352 ArrayVector<double> const & prefilterCoefficients() const
70353 {
70354 static ArrayVector<double> b;
70355 return b;
70356 }
70357
70358 protected:
70359
70360 unsigned int m_;
70361 double h_;
70362 };
70363 # 161 "../include/vigra/resizeimage.hxx"
70364 template <class SrcIterator, class SrcAccessor,
70365 class DestIterator, class DestAccessor>
70366 void
70367 resizeLineNoInterpolation(SrcIterator i1, SrcIterator iend, SrcAccessor as,
70368 DestIterator id, DestIterator idend, DestAccessor ad)
70369 {
70370 int wold = iend - i1;
70371 int wnew = idend - id;
70372
70373 if((wold <= 1) || (wnew <= 1)) return;
70374
70375 ad.set(as(i1), id);
70376 ++id;
70377
70378 --iend, --idend;
70379 ad.set(as(iend), idend);
70380
70381 double dx = (double)(wold - 1) / (wnew - 1);
70382 double x = dx;
70383
70384 for(; id != idend; ++id, x += dx)
70385 {
70386 if(x >= 1.0)
70387 {
70388 int xx = (int)x;
70389 i1 += xx;
70390 x -= (double)xx;
70391 }
70392
70393 ad.set(as(i1), id);
70394 }
70395 }
70396 # 274 "../include/vigra/resizeimage.hxx"
70397 template <class SrcIterator, class SrcAccessor,
70398 class DestIterator, class DestAccessor>
70399 void
70400 resizeImageNoInterpolation(SrcIterator is, SrcIterator iend, SrcAccessor sa,
70401 DestIterator id, DestIterator idend, DestAccessor da)
70402 {
70403 int w = iend.x - is.x;
70404 int h = iend.y - is.y;
70405
70406 int wnew = idend.x - id.x;
70407 int hnew = idend.y - id.y;
70408
70409 vigra::throw_precondition_error(((w > 1) && (h > 1)), "resizeImageNoInterpolation(): " "Source image to small.\n");
70410
70411
70412 vigra::throw_precondition_error(((wnew > 1) && (hnew > 1)), "resizeImageNoInterpolation(): " "Destination image to small.\n");
70413
70414
70415
70416 typedef BasicImage<typename SrcAccessor::value_type> TmpImage;
70417 typedef typename TmpImage::traverser TmpImageIterator;
70418
70419 TmpImage tmp(w, hnew);
70420
70421 TmpImageIterator yt = tmp.upperLeft();
70422
70423 for(int x=0; x<w; ++x, ++is.x, ++yt.x)
70424 {
70425 typename SrcIterator::column_iterator c1 = is.columnIterator();
70426 typename TmpImageIterator::column_iterator ct = yt.columnIterator();
70427
70428 resizeLineNoInterpolation(c1, c1 + h, sa, ct, ct + hnew, tmp.accessor());
70429 }
70430
70431 yt = tmp.upperLeft();
70432
70433 for(int y=0; y < hnew; ++y, ++yt.y, ++id.y)
70434 {
70435 typename DestIterator::row_iterator rd = id.rowIterator();
70436 typename TmpImageIterator::row_iterator rt = yt.rowIterator();
70437
70438 resizeLineNoInterpolation(rt, rt + w, tmp.accessor(), rd, rd + wnew, da);
70439 }
70440 }
70441
70442 template <class SrcIterator, class SrcAccessor,
70443 class DestIterator, class DestAccessor>
70444 inline
70445 void
70446 resizeImageNoInterpolation(triple<SrcIterator, SrcIterator, SrcAccessor> src,
70447 triple<DestIterator, DestIterator, DestAccessor> dest)
70448 {
70449 resizeImageNoInterpolation(src.first, src.second, src.third,
70450 dest.first, dest.second, dest.third);
70451 }
70452
70453
70454
70455
70456
70457
70458
70459 template <class SrcIterator, class SrcAccessor,
70460 class DestIterator, class DestAccessor>
70461 void
70462 resizeLineLinearInterpolation(SrcIterator i1, SrcIterator iend, SrcAccessor as,
70463 DestIterator id, DestIterator idend, DestAccessor ad)
70464 {
70465 int wold = iend - i1;
70466 int wnew = idend - id;
70467
70468 if((wold <= 1) || (wnew <= 1)) return;
70469
70470 typedef
70471 NumericTraits<typename DestAccessor::value_type> DestTraits;
70472
70473 ad.set(DestTraits::fromRealPromote(as(i1)), id);
70474 ++id;
70475
70476 --iend, --idend;
70477 ad.set(DestTraits::fromRealPromote(as(iend)), idend);
70478
70479 double dx = (double)(wold - 1) / (wnew - 1);
70480 double x = dx;
70481
70482 for(; id != idend; ++id, x += dx)
70483 {
70484 if(x >= 1.0)
70485 {
70486 int xx = (int)x;
70487 i1 += xx;
70488 x -= (double)xx;
70489 }
70490 double x1 = 1.0 - x;
70491
70492 ad.set(DestTraits::fromRealPromote(x1 * as(i1) + x * as(i1, 1)), id);
70493 }
70494 }
70495 # 466 "../include/vigra/resizeimage.hxx"
70496 template <class SrcIterator, class SrcAccessor,
70497 class DestIterator, class DestAccessor>
70498 void
70499 resizeImageLinearInterpolation(SrcIterator is, SrcIterator iend, SrcAccessor sa,
70500 DestIterator id, DestIterator idend, DestAccessor da)
70501 {
70502 int w = iend.x - is.x;
70503 int h = iend.y - is.y;
70504
70505 int wnew = idend.x - id.x;
70506 int hnew = idend.y - id.y;
70507
70508 vigra::throw_precondition_error(((w > 1) && (h > 1)), "resizeImageLinearInterpolation(): " "Source image to small.\n");
70509
70510
70511 vigra::throw_precondition_error(((wnew > 1) && (hnew > 1)), "resizeImageLinearInterpolation(): " "Destination image to small.\n");
70512
70513
70514
70515 double const scale = 2.0;
70516
70517 typedef typename SrcAccessor::value_type SRCVT;
70518 typedef typename NumericTraits<SRCVT>::RealPromote TMPTYPE;
70519 typedef BasicImage<TMPTYPE> TmpImage;
70520 typedef typename TmpImage::traverser TmpImageIterator;
70521
70522 BasicImage<TMPTYPE> tmp(w, hnew);
70523 BasicImage<TMPTYPE> line((h > w) ? h : w, 1);
70524
70525 int x,y;
70526
70527 typename BasicImage<TMPTYPE>::Iterator yt = tmp.upperLeft();
70528 typename TmpImageIterator::row_iterator lt = line.upperLeft().rowIterator();
70529
70530 for(x=0; x<w; ++x, ++is.x, ++yt.x)
70531 {
70532 typename SrcIterator::column_iterator c1 = is.columnIterator();
70533 typename TmpImageIterator::column_iterator ct = yt.columnIterator();
70534
70535 if(hnew < h)
70536 {
70537 recursiveSmoothLine(c1, c1 + h, sa,
70538 lt, line.accessor(), (double)h/hnew/scale);
70539
70540 resizeLineLinearInterpolation(lt, lt + h, line.accessor(),
70541 ct, ct + hnew, tmp.accessor());
70542 }
70543 else
70544 {
70545 resizeLineLinearInterpolation(c1, c1 + h, sa,
70546 ct, ct + hnew, tmp.accessor());
70547 }
70548 }
70549
70550 yt = tmp.upperLeft();
70551
70552 for(y=0; y < hnew; ++y, ++yt.y, ++id.y)
70553 {
70554 typename DestIterator::row_iterator rd = id.rowIterator();
70555 typename TmpImageIterator::row_iterator rt = yt.rowIterator();
70556
70557 if(wnew < w)
70558 {
70559 recursiveSmoothLine(rt, rt + w, tmp.accessor(),
70560 lt, line.accessor(), (double)w/wnew/scale);
70561
70562 resizeLineLinearInterpolation(lt, lt + w, line.accessor(),
70563 rd, rd + wnew, da);
70564 }
70565 else
70566 {
70567 resizeLineLinearInterpolation(rt, rt + w, tmp.accessor(),
70568 rd, rd + wnew, da);
70569 }
70570 }
70571 }
70572
70573 template <class SrcIterator, class SrcAccessor,
70574 class DestIterator, class DestAccessor>
70575 inline
70576 void
70577 resizeImageLinearInterpolation(triple<SrcIterator, SrcIterator, SrcAccessor> src,
70578 triple<DestIterator, DestIterator, DestAccessor> dest)
70579 {
70580 resizeImageLinearInterpolation(src.first, src.second, src.third,
70581 dest.first, dest.second, dest.third);
70582 }
70583 # 668 "../include/vigra/resizeimage.hxx"
70584 template <class SrcIterator, class SrcAccessor,
70585 class DestIterator, class DestAccessor,
70586 class SPLINE>
70587 void
70588 resizeImageSplineInterpolation(
70589 SrcIterator src_iter, SrcIterator src_iter_end, SrcAccessor src_acc,
70590 DestIterator dest_iter, DestIterator dest_iter_end, DestAccessor dest_acc,
70591 SPLINE const & spline)
70592 {
70593
70594 int width_old = src_iter_end.x - src_iter.x;
70595 int height_old = src_iter_end.y - src_iter.y;
70596
70597 int width_new = dest_iter_end.x - dest_iter.x;
70598 int height_new = dest_iter_end.y - dest_iter.y;
70599
70600 vigra::throw_precondition_error(((width_old > 1) && (height_old > 1)), "resizeImageSplineInterpolation(): " "Source image to small.\n");
70601
70602
70603
70604 vigra::throw_precondition_error(((width_new > 1) && (height_new > 1)), "resizeImageSplineInterpolation(): " "Destination image to small.\n");
70605
70606
70607
70608 Rational<int> xratio(width_new - 1, width_old - 1);
70609 Rational<int> yratio(height_new - 1, height_old - 1);
70610 Rational<int> offset(0);
70611 resampling_detail::MapTargetToSourceCoordinate xmapCoordinate(xratio, offset);
70612 resampling_detail::MapTargetToSourceCoordinate ymapCoordinate(yratio, offset);
70613 int xperiod = lcm(xratio.numerator(), xratio.denominator());
70614 int yperiod = lcm(yratio.numerator(), yratio.denominator());
70615
70616 double const scale = 2.0;
70617
70618 typedef typename SrcAccessor::value_type SRCVT;
70619 typedef typename NumericTraits<SRCVT>::RealPromote TMPTYPE;
70620 typedef BasicImage<TMPTYPE> TmpImage;
70621 typedef typename TmpImage::traverser TmpImageIterator;
70622
70623 BasicImage<TMPTYPE> tmp(width_old, height_new);
70624
70625 BasicImage<TMPTYPE> line((height_old > width_old) ? height_old : width_old, 1);
70626 typename BasicImage<TMPTYPE>::Accessor tmp_acc = tmp.accessor();
70627 ArrayVector<double> const & prefilterCoeffs = spline.prefilterCoefficients();
70628
70629 int x,y;
70630
70631 ArrayVector<Kernel1D<double> > kernels(yperiod);
70632 createResamplingKernels(spline, ymapCoordinate, kernels);
70633
70634 typename BasicImage<TMPTYPE>::Iterator y_tmp = tmp.upperLeft();
70635 typename TmpImageIterator::row_iterator line_tmp = line.upperLeft().rowIterator();
70636
70637 for(x=0; x<width_old; ++x, ++src_iter.x, ++y_tmp.x)
70638 {
70639
70640 typename SrcIterator::column_iterator c_src = src_iter.columnIterator();
70641 typename TmpImageIterator::column_iterator c_tmp = y_tmp.columnIterator();
70642
70643 if(prefilterCoeffs.size() == 0)
70644 {
70645 if(height_new >= height_old)
70646 {
70647 resamplingConvolveLine(c_src, c_src + height_old, src_acc,
70648 c_tmp, c_tmp + height_new, tmp_acc,
70649 kernels, ymapCoordinate);
70650 }
70651 else
70652 {
70653 recursiveSmoothLine(c_src, c_src + height_old, src_acc,
70654 line_tmp, line.accessor(), (double)height_old/height_new/scale);
70655 resamplingConvolveLine(line_tmp, line_tmp + height_old, line.accessor(),
70656 c_tmp, c_tmp + height_new, tmp_acc,
70657 kernels, ymapCoordinate);
70658 }
70659 }
70660 else
70661 {
70662 recursiveFilterLine(c_src, c_src + height_old, src_acc,
70663 line_tmp, line.accessor(),
70664 prefilterCoeffs[0], BORDER_TREATMENT_REFLECT);
70665 for(unsigned int b = 1; b < prefilterCoeffs.size(); ++b)
70666 {
70667 recursiveFilterLine(line_tmp, line_tmp + height_old, line.accessor(),
70668 line_tmp, line.accessor(),
70669 prefilterCoeffs[b], BORDER_TREATMENT_REFLECT);
70670 }
70671 if(height_new < height_old)
70672 {
70673 recursiveSmoothLine(line_tmp, line_tmp + height_old, line.accessor(),
70674 line_tmp, line.accessor(), (double)height_old/height_new/scale);
70675 }
70676 resamplingConvolveLine(line_tmp, line_tmp + height_old, line.accessor(),
70677 c_tmp, c_tmp + height_new, tmp_acc,
70678 kernels, ymapCoordinate);
70679 }
70680 }
70681
70682 y_tmp = tmp.upperLeft();
70683
70684 DestIterator dest = dest_iter;
70685
70686 kernels.resize(xperiod);
70687 createResamplingKernels(spline, xmapCoordinate, kernels);
70688
70689 for(y=0; y < height_new; ++y, ++y_tmp.y, ++dest_iter.y)
70690 {
70691 typename DestIterator::row_iterator r_dest = dest_iter.rowIterator();
70692 typename TmpImageIterator::row_iterator r_tmp = y_tmp.rowIterator();
70693
70694 if(prefilterCoeffs.size() == 0)
70695 {
70696 if(width_new >= width_old)
70697 {
70698 resamplingConvolveLine(r_tmp, r_tmp + width_old, tmp.accessor(),
70699 r_dest, r_dest + width_new, dest_acc,
70700 kernels, xmapCoordinate);
70701 }
70702 else
70703 {
70704 recursiveSmoothLine(r_tmp, r_tmp + width_old, tmp.accessor(),
70705 line_tmp, line.accessor(), (double)width_old/width_new/scale);
70706 resamplingConvolveLine(line_tmp, line_tmp + width_old, line.accessor(),
70707 r_dest, r_dest + width_new, dest_acc,
70708 kernels, xmapCoordinate);
70709 }
70710 }
70711 else
70712 {
70713 recursiveFilterLine(r_tmp, r_tmp + width_old, tmp.accessor(),
70714 line_tmp, line.accessor(),
70715 prefilterCoeffs[0], BORDER_TREATMENT_REFLECT);
70716 for(unsigned int b = 1; b < prefilterCoeffs.size(); ++b)
70717 {
70718 recursiveFilterLine(line_tmp, line_tmp + width_old, line.accessor(),
70719 line_tmp, line.accessor(),
70720 prefilterCoeffs[b], BORDER_TREATMENT_REFLECT);
70721 }
70722 if(width_new < width_old)
70723 {
70724 recursiveSmoothLine(line_tmp, line_tmp + width_old, line.accessor(),
70725 line_tmp, line.accessor(), (double)width_old/width_new/scale);
70726 }
70727 resamplingConvolveLine(line_tmp, line_tmp + width_old, line.accessor(),
70728 r_dest, r_dest + width_new, dest_acc,
70729 kernels, xmapCoordinate);
70730 }
70731 }
70732 }
70733
70734 template <class SrcIterator, class SrcAccessor,
70735 class DestIterator, class DestAccessor,
70736 class SPLINE>
70737 inline
70738 void
70739 resizeImageSplineInterpolation(triple<SrcIterator, SrcIterator, SrcAccessor> src,
70740 triple<DestIterator, DestIterator, DestAccessor> dest,
70741 SPLINE const & spline)
70742 {
70743 resizeImageSplineInterpolation(src.first, src.second, src.third,
70744 dest.first, dest.second, dest.third, spline);
70745 }
70746
70747 template <class SrcIterator, class SrcAccessor,
70748 class DestIterator, class DestAccessor>
70749 void
70750 resizeImageSplineInterpolation(SrcIterator is, SrcIterator iend, SrcAccessor sa,
70751 DestIterator id, DestIterator idend, DestAccessor da)
70752 {
70753 resizeImageSplineInterpolation(is, iend, sa, id, idend, da, BSpline<3, double>());
70754 }
70755
70756 template <class SrcIterator, class SrcAccessor,
70757 class DestIterator, class DestAccessor>
70758 inline
70759 void
70760 resizeImageSplineInterpolation(triple<SrcIterator, SrcIterator, SrcAccessor> src,
70761 triple<DestIterator, DestIterator, DestAccessor> dest)
70762 {
70763 resizeImageSplineInterpolation(src.first, src.second, src.third,
70764 dest.first, dest.second, dest.third);
70765 }
70766 # 894 "../include/vigra/resizeimage.hxx"
70767 template <class SrcIterator, class SrcAccessor,
70768 class DestIterator, class DestAccessor>
70769 void
70770 resizeImageCatmullRomInterpolation(SrcIterator src_iter, SrcIterator src_iter_end, SrcAccessor src_acc,
70771 DestIterator dest_iter, DestIterator dest_iter_end, DestAccessor dest_acc)
70772 {
70773 resizeImageSplineInterpolation(src_iter, src_iter_end, src_acc, dest_iter, dest_iter_end, dest_acc,
70774 CatmullRomSpline<double>());
70775 }
70776
70777 template <class SrcIterator, class SrcAccessor,
70778 class DestIterator, class DestAccessor>
70779 inline
70780 void
70781 resizeImageCatmullRomInterpolation(triple<SrcIterator, SrcIterator, SrcAccessor> src,
70782 triple<DestIterator, DestIterator, DestAccessor> dest)
70783 {
70784 resizeImageCatmullRomInterpolation(src.first, src.second, src.third,
70785 dest.first, dest.second, dest.third);
70786 }
70787 # 998 "../include/vigra/resizeimage.hxx"
70788 template <class SrcIterator, class SrcAccessor,
70789 class DestIterator, class DestAccessor>
70790 void
70791 resizeImageCoscotInterpolation(SrcIterator src_iter, SrcIterator src_iter_end, SrcAccessor src_acc,
70792 DestIterator dest_iter, DestIterator dest_iter_end, DestAccessor dest_acc)
70793 {
70794 resizeImageSplineInterpolation(src_iter, src_iter_end, src_acc, dest_iter, dest_iter_end, dest_acc,
70795 CoscotFunction<double>());
70796 }
70797
70798 template <class SrcIterator, class SrcAccessor,
70799 class DestIterator, class DestAccessor>
70800 inline
70801 void
70802 resizeImageCoscotInterpolation(triple<SrcIterator, SrcIterator, SrcAccessor> src,
70803 triple<DestIterator, DestIterator, DestAccessor> dest)
70804 {
70805 resizeImageCoscotInterpolation(src.first, src.second, src.third,
70806 dest.first, dest.second, dest.third);
70807 }
70808 # 1398 "../include/vigra/resizeimage.hxx"
70809 }
70810 # 94 "../include/vigra/stdimagefunctions.hxx" 2
70811 # 43 "../include/vigra/nonlineardiffusion.hxx" 2
70812
70813
70814
70815 namespace vigra {
70816
70817 template <class SrcIterator, class SrcAccessor,
70818 class CoeffIterator, class DestIterator>
70819 void internalNonlinearDiffusionDiagonalSolver(
70820 SrcIterator sbegin, SrcIterator send, SrcAccessor sa,
70821 CoeffIterator diag, CoeffIterator upper, CoeffIterator lower,
70822 DestIterator dbegin)
70823 {
70824 int w = send - sbegin - 1;
70825
70826 int i;
70827
70828 for(i=0; i<w; ++i)
70829 {
70830 lower[i] = lower[i] / diag[i];
70831
70832 diag[i+1] = diag[i+1] - lower[i] * upper[i];
70833 }
70834
70835 dbegin[0] = sa(sbegin);
70836
70837 for(i=1; i<=w; ++i)
70838 {
70839 dbegin[i] = sa(sbegin, i) - lower[i-1] * dbegin[i-1];
70840 }
70841
70842 dbegin[w] = dbegin[w] / diag[w];
70843
70844 for(i=w-1; i>=0; --i)
70845 {
70846 dbegin[i] = (dbegin[i] - upper[i] * dbegin[i+1]) / diag[i];
70847 }
70848 }
70849
70850
70851 template <class SrcIterator, class SrcAccessor,
70852 class WeightIterator, class WeightAccessor,
70853 class DestIterator, class DestAccessor>
70854 void internalNonlinearDiffusionAOSStep(
70855 SrcIterator sul, SrcIterator slr, SrcAccessor as,
70856 WeightIterator wul, WeightAccessor aw,
70857 DestIterator dul, DestAccessor ad, double timestep)
70858 {
70859
70860 typedef typename
70861 NumericTraits<typename DestAccessor::value_type>::RealPromote
70862 DestType;
70863
70864 typedef typename
70865 NumericTraits<typename WeightAccessor::value_type>::RealPromote
70866 WeightType;
70867
70868
70869 int w = slr.x - sul.x;
70870 int h = slr.y - sul.y;
70871 int d = (w < h) ? h : w;
70872
70873 std::vector<WeightType> lower(d),
70874 diag(d),
70875 upper(d);
70876
70877 std::vector<DestType> res(d);
70878
70879 int x,y;
70880
70881 WeightType one = NumericTraits<WeightType>::one();
70882
70883
70884 SrcIterator ys = sul;
70885 WeightIterator yw = wul;
70886 DestIterator yd = dul;
70887
70888
70889 for(y=0; y<h; ++y, ++ys.y, ++yd.y, ++yw.y)
70890 {
70891 typename SrcIterator::row_iterator xs = ys.rowIterator();
70892 typename WeightIterator::row_iterator xw = yw.rowIterator();
70893 typename DestIterator::row_iterator xd = yd.rowIterator();
70894
70895
70896
70897 diag[0] = one + timestep * (aw(xw) + aw(xw, 1));
70898 for(x=1; x<w-1; ++x)
70899 {
70900 diag[x] = one + timestep * (2.0 * aw(xw, x) + aw(xw, x+1) + aw(xw, x-1));
70901 }
70902 diag[w-1] = one + timestep * (aw(xw, w-1) + aw(xw, w-2));
70903
70904 for(x=0; x<w-1; ++x)
70905 {
70906 lower[x] = -timestep * (aw(xw, x) + aw(xw, x+1));
70907 upper[x] = lower[x];
70908 }
70909
70910 internalNonlinearDiffusionDiagonalSolver(xs, xs+w, as,
70911 diag.begin(), upper.begin(), lower.begin(), res.begin());
70912
70913 for(x=0; x<w; ++x, ++xd)
70914 {
70915 ad.set(res[x], xd);
70916 }
70917 }
70918
70919
70920 ys = sul;
70921 yw = wul;
70922 yd = dul;
70923
70924 for(x=0; x<w; ++x, ++ys.x, ++yd.x, ++yw.x)
70925 {
70926 typename SrcIterator::column_iterator xs = ys.columnIterator();
70927 typename WeightIterator::column_iterator xw = yw.columnIterator();
70928 typename DestIterator::column_iterator xd = yd.columnIterator();
70929
70930
70931
70932 diag[0] = one + timestep * (aw(xw) + aw(xw, 1));
70933 for(y=1; y<h-1; ++y)
70934 {
70935 diag[y] = one + timestep * (2.0 * aw(xw, y) + aw(xw, y+1) + aw(xw, y-1));
70936 }
70937 diag[h-1] = one + timestep * (aw(xw, h-1) + aw(xw, h-2));
70938
70939 for(y=0; y<h-1; ++y)
70940 {
70941 lower[y] = -timestep * (aw(xw, y) + aw(xw, y+1));
70942 upper[y] = lower[y];
70943 }
70944
70945 internalNonlinearDiffusionDiagonalSolver(xs, xs+h, as,
70946 diag.begin(), upper.begin(), lower.begin(), res.begin());
70947
70948 for(y=0; y<h; ++y, ++xd)
70949 {
70950 ad.set(0.5 * (ad(xd) + res[y]), xd);
70951 }
70952 }
70953 }
70954 # 306 "../include/vigra/nonlineardiffusion.hxx"
70955 template <class SrcIterator, class SrcAccessor,
70956 class DestIterator, class DestAccessor,
70957 class DiffusivityFunc>
70958 void nonlinearDiffusion(SrcIterator sul, SrcIterator slr, SrcAccessor as,
70959 DestIterator dul, DestAccessor ad,
70960 DiffusivityFunc const & weight, double scale)
70961 {
70962 vigra::throw_precondition_error((scale > 0.0), "nonlinearDiffusion(): scale must be > 0");
70963
70964 double total_time = scale*scale/2.0;
70965 static const double time_step = 5.0;
70966 int number_of_steps = (int)(total_time / time_step);
70967 double rest_time = total_time - time_step * number_of_steps;
70968
70969 Size2D size(slr.x - sul.x, slr.y - sul.y);
70970
70971 typedef typename
70972 NumericTraits<typename SrcAccessor::value_type>::RealPromote
70973 TmpType;
70974 typedef typename DiffusivityFunc::value_type WeightType;
70975
70976 BasicImage<TmpType> smooth1(size);
70977 BasicImage<TmpType> smooth2(size);
70978
70979 BasicImage<WeightType> weights(size);
70980
70981 typename BasicImage<TmpType>::Iterator s1 = smooth1.upperLeft(),
70982 s2 = smooth2.upperLeft();
70983 typename BasicImage<TmpType>::Accessor a = smooth1.accessor();
70984
70985 typename BasicImage<WeightType>::Iterator wi = weights.upperLeft();
70986 typename BasicImage<WeightType>::Accessor wa = weights.accessor();
70987
70988 gradientBasedTransform(sul, slr, as, wi, wa, weight);
70989
70990 internalNonlinearDiffusionAOSStep(sul, slr, as, wi, wa, s1, a, rest_time);
70991
70992 for(int i = 0; i < number_of_steps; ++i)
70993 {
70994 gradientBasedTransform(s1, s1+size, a, wi, wa, weight);
70995
70996 internalNonlinearDiffusionAOSStep(s1, s1+size, a, wi, wa, s2, a, time_step);
70997
70998 std::swap(s1, s2);
70999 }
71000
71001 copyImage(s1, s1+size, a, dul, ad);
71002 }
71003
71004 template <class SrcIterator, class SrcAccessor,
71005 class DestIterator, class DestAccessor,
71006 class DiffusivityFunc>
71007 inline
71008 void nonlinearDiffusion(
71009 triple<SrcIterator, SrcIterator, SrcAccessor> src,
71010 pair<DestIterator, DestAccessor> dest,
71011 DiffusivityFunc const & weight, double scale)
71012 {
71013 nonlinearDiffusion(src.first, src.second, src.third,
71014 dest.first, dest.second,
71015 weight, scale);
71016 }
71017
71018 template <class SrcIterator, class SrcAccessor,
71019 class WeightIterator, class WeightAccessor,
71020 class DestIterator, class DestAccessor>
71021 void internalNonlinearDiffusionExplicitStep(
71022 SrcIterator sul, SrcIterator slr, SrcAccessor as,
71023 WeightIterator wul, WeightAccessor aw,
71024 DestIterator dul, DestAccessor ad,
71025 double time_step)
71026 {
71027
71028 typedef typename
71029 NumericTraits<typename SrcAccessor::value_type>::RealPromote
71030 SumType;
71031
71032 typedef typename
71033 NumericTraits<typename WeightAccessor::value_type>::RealPromote
71034 WeightType;
71035
71036
71037 int w = slr.x - sul.x;
71038 int h = slr.y - sul.y;
71039
71040 int x,y;
71041
71042 static const Diff2D left(-1, 0);
71043 static const Diff2D right(1, 0);
71044 static const Diff2D top(0, -1);
71045 static const Diff2D bottom(0, 1);
71046
71047 WeightType gt, gb, gl, gr, g0;
71048 WeightType one = NumericTraits<WeightType>::one();
71049 SumType sum;
71050
71051 time_step /= 2.0;
71052
71053
71054 SrcIterator ys = sul;
71055 WeightIterator yw = wul;
71056 DestIterator yd = dul;
71057
71058 SrcIterator xs = ys;
71059 WeightIterator xw = yw;
71060 DestIterator xd = yd;
71061
71062 gt = (aw(xw) + aw(xw, bottom)) * time_step;
71063 gb = (aw(xw) + aw(xw, bottom)) * time_step;
71064 gl = (aw(xw) + aw(xw, right)) * time_step;
71065 gr = (aw(xw) + aw(xw, right)) * time_step;
71066 g0 = one - gt - gb - gr - gl;
71067
71068 sum = g0 * as(xs);
71069 sum += gt * as(xs, bottom);
71070 sum += gb * as(xs, bottom);
71071 sum += gl * as(xs, right);
71072 sum += gr * as(xs, right);
71073
71074 ad.set(sum, xd);
71075
71076 for(x=2, ++xs.x, ++xd.x, ++xw.x; x<w; ++x, ++xs.x, ++xd.x, ++xw.x)
71077 {
71078 gt = (aw(xw) + aw(xw, bottom)) * time_step;
71079 gb = (aw(xw) + aw(xw, bottom)) * time_step;
71080 gl = (aw(xw) + aw(xw, left)) * time_step;
71081 gr = (aw(xw) + aw(xw, right)) * time_step;
71082 g0 = one - gt - gb - gr - gl;
71083
71084 sum = g0 * as(xs);
71085 sum += gt * as(xs, bottom);
71086 sum += gb * as(xs, bottom);
71087 sum += gl * as(xs, left);
71088 sum += gr * as(xs, right);
71089
71090 ad.set(sum, xd);
71091 }
71092
71093 gt = (aw(xw) + aw(xw, bottom)) * time_step;
71094 gb = (aw(xw) + aw(xw, bottom)) * time_step;
71095 gl = (aw(xw) + aw(xw, left)) * time_step;
71096 gr = (aw(xw) + aw(xw, left)) * time_step;
71097 g0 = one - gt - gb - gr - gl;
71098
71099 sum = g0 * as(xs);
71100 sum += gt * as(xs, bottom);
71101 sum += gb * as(xs, bottom);
71102 sum += gl * as(xs, left);
71103 sum += gr * as(xs, left);
71104
71105 ad.set(sum, xd);
71106
71107 for(y=2, ++ys.y, ++yd.y, ++yw.y; y<h; ++y, ++ys.y, ++yd.y, ++yw.y)
71108 {
71109 xs = ys;
71110 xd = yd;
71111 xw = yw;
71112
71113 gt = (aw(xw) + aw(xw, top)) * time_step;
71114 gb = (aw(xw) + aw(xw, bottom)) * time_step;
71115 gl = (aw(xw) + aw(xw, right)) * time_step;
71116 gr = (aw(xw) + aw(xw, right)) * time_step;
71117 g0 = one - gt - gb - gr - gl;
71118
71119 sum = g0 * as(xs);
71120 sum += gt * as(xs, top);
71121 sum += gb * as(xs, bottom);
71122 sum += gl * as(xs, right);
71123 sum += gr * as(xs, right);
71124
71125 ad.set(sum, xd);
71126
71127 for(x=2, ++xs.x, ++xd.x, ++xw.x; x<w; ++x, ++xs.x, ++xd.x, ++xw.x)
71128 {
71129 gt = (aw(xw) + aw(xw, top)) * time_step;
71130 gb = (aw(xw) + aw(xw, bottom)) * time_step;
71131 gl = (aw(xw) + aw(xw, left)) * time_step;
71132 gr = (aw(xw) + aw(xw, right)) * time_step;
71133 g0 = one - gt - gb - gr - gl;
71134
71135 sum = g0 * as(xs);
71136 sum += gt * as(xs, top);
71137 sum += gb * as(xs, bottom);
71138 sum += gl * as(xs, left);
71139 sum += gr * as(xs, right);
71140
71141 ad.set(sum, xd);
71142 }
71143
71144 gt = (aw(xw) + aw(xw, top)) * time_step;
71145 gb = (aw(xw) + aw(xw, bottom)) * time_step;
71146 gl = (aw(xw) + aw(xw, left)) * time_step;
71147 gr = (aw(xw) + aw(xw, left)) * time_step;
71148 g0 = one - gt - gb - gr - gl;
71149
71150 sum = g0 * as(xs);
71151 sum += gt * as(xs, top);
71152 sum += gb * as(xs, bottom);
71153 sum += gl * as(xs, left);
71154 sum += gr * as(xs, left);
71155
71156 ad.set(sum, xd);
71157 }
71158
71159 xs = ys;
71160 xd = yd;
71161 xw = yw;
71162
71163 gt = (aw(xw) + aw(xw, top)) * time_step;
71164 gb = (aw(xw) + aw(xw, top)) * time_step;
71165 gl = (aw(xw) + aw(xw, right)) * time_step;
71166 gr = (aw(xw) + aw(xw, right)) * time_step;
71167 g0 = one - gt - gb - gr - gl;
71168
71169 sum = g0 * as(xs);
71170 sum += gt * as(xs, top);
71171 sum += gb * as(xs, top);
71172 sum += gl * as(xs, right);
71173 sum += gr * as(xs, right);
71174
71175 ad.set(sum, xd);
71176
71177 for(x=2, ++xs.x, ++xd.x, ++xw.x; x<w; ++x, ++xs.x, ++xd.x, ++xw.x)
71178 {
71179 gt = (aw(xw) + aw(xw, top)) * time_step;
71180 gb = (aw(xw) + aw(xw, top)) * time_step;
71181 gl = (aw(xw) + aw(xw, left)) * time_step;
71182 gr = (aw(xw) + aw(xw, right)) * time_step;
71183 g0 = one - gt - gb - gr - gl;
71184
71185 sum = g0 * as(xs);
71186 sum += gt * as(xs, top);
71187 sum += gb * as(xs, top);
71188 sum += gl * as(xs, left);
71189 sum += gr * as(xs, right);
71190
71191 ad.set(sum, xd);
71192 }
71193
71194 gt = (aw(xw) + aw(xw, top)) * time_step;
71195 gb = (aw(xw) + aw(xw, top)) * time_step;
71196 gl = (aw(xw) + aw(xw, left)) * time_step;
71197 gr = (aw(xw) + aw(xw, left)) * time_step;
71198 g0 = one - gt - gb - gr - gl;
71199
71200 sum = g0 * as(xs);
71201 sum += gt * as(xs, top);
71202 sum += gb * as(xs, top);
71203 sum += gl * as(xs, left);
71204 sum += gr * as(xs, left);
71205
71206 ad.set(sum, xd);
71207 }
71208
71209 template <class SrcIterator, class SrcAccessor,
71210 class DestIterator, class DestAccessor,
71211 class DiffusivityFunc>
71212 void nonlinearDiffusionExplicit(SrcIterator sul, SrcIterator slr, SrcAccessor as,
71213 DestIterator dul, DestAccessor ad,
71214 DiffusivityFunc const & weight, double scale)
71215 {
71216 vigra::throw_precondition_error((scale > 0.0), "nonlinearDiffusionExplicit(): scale must be > 0");
71217
71218 double total_time = scale*scale/2.0;
71219 static const double time_step = 0.25;
71220 int number_of_steps = total_time / time_step;
71221 double rest_time = total_time - time_step * number_of_steps;
71222
71223 Size2D size(slr.x - sul.x, slr.y - sul.y);
71224
71225 typedef typename
71226 NumericTraits<typename SrcAccessor::value_type>::RealPromote
71227 TmpType;
71228 typedef typename DiffusivityFunc::value_type WeightType;
71229
71230 BasicImage<TmpType> smooth1(size);
71231 BasicImage<TmpType> smooth2(size);
71232
71233 BasicImage<WeightType> weights(size);
71234
71235 typename BasicImage<TmpType>::Iterator s1 = smooth1.upperLeft(),
71236 s2 = smooth2.upperLeft();
71237 typename BasicImage<TmpType>::Accessor a = smooth1.accessor();
71238
71239 typename BasicImage<WeightType>::Iterator wi = weights.upperLeft();
71240 typename BasicImage<WeightType>::Accessor wa = weights.accessor();
71241
71242 gradientBasedTransform(sul, slr, as, wi, wa, weight);
71243
71244 internalNonlinearDiffusionExplicitStep(sul, slr, as, wi, wa, s1, a, rest_time);
71245
71246 for(int i = 0; i < number_of_steps; ++i)
71247 {
71248 gradientBasedTransform(s1, s1+size, a, wi, wa, weight);
71249
71250 internalNonlinearDiffusionExplicitStep(s1, s1+size, a, wi, wa, s2, a, time_step);
71251
71252 swap(s1, s2);
71253 }
71254
71255 copyImage(s1, s1+size, a, dul, ad);
71256 }
71257
71258 template <class SrcIterator, class SrcAccessor,
71259 class DestIterator, class DestAccessor,
71260 class DiffusivityFunc>
71261 inline
71262 void nonlinearDiffusionExplicit(
71263 triple<SrcIterator, SrcIterator, SrcAccessor> src,
71264 pair<DestIterator, DestAccessor> dest,
71265 DiffusivityFunc const & weight, double scale)
71266 {
71267 nonlinearDiffusionExplicit(src.first, src.second, src.third,
71268 dest.first, dest.second,
71269 weight, scale);
71270 }
71271 # 643 "../include/vigra/nonlineardiffusion.hxx"
71272 template <class Value>
71273 class DiffusivityFunctor
71274 {
71275 public:
71276
71277
71278
71279
71280 typedef Value first_argument_type;
71281
71282
71283
71284
71285
71286 typedef Value second_argument_type;
71287
71288
71289
71290 typedef typename NumericTraits<Value>::RealPromote result_type;
71291
71292
71293
71294 typedef Value value_type;
71295
71296
71297
71298 DiffusivityFunctor(Value const & thresh)
71299 : weight_(thresh*thresh),
71300 one_(NumericTraits<result_type>::one()),
71301 zero_(NumericTraits<result_type>::zero())
71302 {}
71303
71304
71305
71306 result_type operator()(first_argument_type const & gx, second_argument_type const & gy) const
71307 {
71308 Value mag = (gx*gx + gy*gy) / weight_;
71309
71310 return (mag == zero_) ? one_ : one_ - std::exp(-3.315 / mag / mag);
71311 }
71312
71313
71314
71315 result_type operator()(RGBValue<Value> const & gx, RGBValue<Value> const & gy) const
71316 {
71317 result_type mag = (gx.red()*gx.red() +
71318 gx.green()*gx.green() +
71319 gx.blue()*gx.blue() +
71320 gy.red()*gy.red() +
71321 gy.green()*gy.green() +
71322 gy.blue()*gy.blue()) / weight_;
71323
71324 return (mag == zero_) ? one_ : one_ - std::exp(-3.315 / mag / mag);
71325 }
71326
71327 result_type weight_;
71328 result_type one_;
71329 result_type zero_;
71330 };
71331
71332 template <class ValueType>
71333 class FunctorTraits<DiffusivityFunctor<ValueType> >
71334 : public FunctorTraitsBase<DiffusivityFunctor<ValueType> >
71335 {
71336 public:
71337 typedef VigraTrueType isBinaryFunctor;
71338 };
71339
71340
71341
71342
71343 }
71344 # 46 "../include/vigra/convolution.hxx" 2
71345 # 209 "../include/vigra/convolution.hxx"
71346 namespace vigra {
71347 # 289 "../include/vigra/convolution.hxx"
71348 template <class SrcIterator, class SrcAccessor,
71349 class DestIterator, class DestAccessor,
71350 class T>
71351 void convolveImage(SrcIterator supperleft,
71352 SrcIterator slowerright, SrcAccessor sa,
71353 DestIterator dupperleft, DestAccessor da,
71354 Kernel1D<T> const & kx, Kernel1D<T> const & ky)
71355 {
71356 typedef typename
71357 NumericTraits<typename SrcAccessor::value_type>::RealPromote
71358 TmpType;
71359 BasicImage<TmpType> tmp(slowerright - supperleft);
71360
71361 separableConvolveX(srcIterRange(supperleft, slowerright, sa),
71362 destImage(tmp), kernel1d(kx));
71363 separableConvolveY(srcImageRange(tmp),
71364 destIter(dupperleft, da), kernel1d(ky));
71365 }
71366
71367 template <class SrcIterator, class SrcAccessor,
71368 class DestIterator, class DestAccessor,
71369 class T>
71370 inline void
71371 convolveImage(triple<SrcIterator, SrcIterator, SrcAccessor> src,
71372 pair<DestIterator, DestAccessor> dest,
71373 Kernel1D<T> const & kx, Kernel1D<T> const & ky)
71374 {
71375 convolveImage(src.first, src.second, src.third,
71376 dest.first, dest.second, kx, ky);
71377 }
71378 # 391 "../include/vigra/convolution.hxx"
71379 template <class SrcIterator, class SrcAccessor,
71380 class DestIterator, class DestAccessor>
71381 void simpleSharpening(SrcIterator src_ul, SrcIterator src_lr, SrcAccessor src_acc,
71382 DestIterator dest_ul, DestAccessor dest_acc, double sharpening_factor)
71383 {
71384
71385 vigra::throw_precondition_error((sharpening_factor >= 0.0), "simpleSharpening(): amount of sharpening must be >= 0.");
71386
71387
71388 Kernel2D<double> kernel;
71389
71390 kernel.initExplicitly(Diff2D(-1,-1), Diff2D(1,1)) = -sharpening_factor/16.0, -sharpening_factor/8.0, -sharpening_factor/16.0,
71391 -sharpening_factor/8.0, 1.0+sharpening_factor*0.75, -sharpening_factor/8.0,
71392 -sharpening_factor/16.0, -sharpening_factor/8.0, -sharpening_factor/16.0;
71393
71394 convolveImage(src_ul, src_lr, src_acc, dest_ul, dest_acc,
71395 kernel.center(), kernel.accessor(),
71396 kernel.upperLeft(), kernel.lowerRight() , BORDER_TREATMENT_REFLECT );
71397 }
71398
71399 template <class SrcIterator, class SrcAccessor,
71400 class DestIterator, class DestAccessor>
71401 inline
71402 void simpleSharpening(triple<SrcIterator, SrcIterator, SrcAccessor> src,
71403 pair<DestIterator, DestAccessor> dest, double sharpening_factor)
71404 {
71405 simpleSharpening(src.first, src.second, src.third,
71406 dest.first, dest.second, sharpening_factor);
71407 }
71408 # 489 "../include/vigra/convolution.hxx"
71409 template <class SrcIterator, class SrcAccessor,
71410 class DestIterator, class DestAccessor>
71411 void gaussianSharpening(SrcIterator src_ul, SrcIterator src_lr, SrcAccessor src_acc,
71412 DestIterator dest_ul, DestAccessor dest_acc, double sharpening_factor,
71413 double scale)
71414 {
71415 vigra::throw_precondition_error((sharpening_factor >= 0.0), "gaussianSharpening(): amount of sharpening must be >= 0");
71416
71417 vigra::throw_precondition_error((scale >= 0.0), "gaussianSharpening(): scale parameter should be >= 0.");
71418
71419
71420 typedef typename NumericTraits<typename SrcAccessor::value_type>::RealPromote ValueType;
71421
71422 BasicImage<ValueType> tmp(src_lr - src_ul);
71423
71424 gaussianSmoothing(src_ul, src_lr, src_acc, tmp.upperLeft(), tmp.accessor(), scale);
71425
71426 SrcIterator i_src = src_ul;
71427 DestIterator i_dest = dest_ul;
71428 typename BasicImage<ValueType>::traverser tmp_ul = tmp.upperLeft();
71429 typename BasicImage<ValueType>::traverser i_tmp = tmp_ul;
71430 typename BasicImage<ValueType>::Accessor tmp_acc = tmp.accessor();
71431
71432 for(; i_src.y != src_lr.y ; i_src.y++, i_dest.y++, i_tmp.y++ )
71433 {
71434 for (;i_src.x != src_lr.x ; i_src.x++, i_dest.x++, i_tmp.x++ )
71435 {
71436 dest_acc.set((1.0 + sharpening_factor)*src_acc(i_src) - sharpening_factor*tmp_acc(i_tmp), i_dest);
71437 }
71438 i_src.x = src_ul.x;
71439 i_dest.x = dest_ul.x;
71440 i_tmp.x = tmp_ul.x;
71441 }
71442 }
71443
71444 template <class SrcIterator, class SrcAccessor,
71445 class DestIterator, class DestAccessor>
71446 void gaussianSharpening(triple<SrcIterator, SrcIterator, SrcAccessor> src,
71447 pair<DestIterator, DestAccessor> dest, double sharpening_factor,
71448 double scale)
71449 {
71450 gaussianSharpening(src.first, src.second, src.third,
71451 dest.first, dest.second,
71452 sharpening_factor, scale);
71453 }
71454 # 593 "../include/vigra/convolution.hxx"
71455 template <class SrcIterator, class SrcAccessor,
71456 class DestIterator, class DestAccessor>
71457 void gaussianSmoothing(SrcIterator supperleft,
71458 SrcIterator slowerright, SrcAccessor sa,
71459 DestIterator dupperleft, DestAccessor da,
71460 double scale)
71461 {
71462 typedef typename
71463 NumericTraits<typename SrcAccessor::value_type>::RealPromote
71464 TmpType;
71465 BasicImage<TmpType> tmp(slowerright - supperleft);
71466
71467 Kernel1D<double> smooth;
71468 smooth.initGaussian(scale);
71469 smooth.setBorderTreatment(BORDER_TREATMENT_REFLECT);
71470
71471 separableConvolveX(srcIterRange(supperleft, slowerright, sa),
71472 destImage(tmp), kernel1d(smooth));
71473 separableConvolveY(srcImageRange(tmp),
71474 destIter(dupperleft, da), kernel1d(smooth));
71475 }
71476
71477 template <class SrcIterator, class SrcAccessor,
71478 class DestIterator, class DestAccessor>
71479 inline void
71480 gaussianSmoothing(triple<SrcIterator, SrcIterator, SrcAccessor> src,
71481 pair<DestIterator, DestAccessor> dest,
71482 double scale)
71483 {
71484 gaussianSmoothing(src.first, src.second, src.third,
71485 dest.first, dest.second, scale);
71486 }
71487 # 707 "../include/vigra/convolution.hxx"
71488 template <class SrcIterator, class SrcAccessor,
71489 class DestIteratorX, class DestAccessorX,
71490 class DestIteratorY, class DestAccessorY>
71491 void gaussianGradient(SrcIterator supperleft,
71492 SrcIterator slowerright, SrcAccessor sa,
71493 DestIteratorX dupperleftx, DestAccessorX dax,
71494 DestIteratorY dupperlefty, DestAccessorY day,
71495 double scale)
71496 {
71497 typedef typename
71498 NumericTraits<typename SrcAccessor::value_type>::RealPromote
71499 TmpType;
71500 BasicImage<TmpType> tmp(slowerright - supperleft);
71501
71502 Kernel1D<double> smooth, grad;
71503 smooth.initGaussian(scale);
71504 grad.initGaussianDerivative(scale, 1);
71505
71506 separableConvolveX(srcIterRange(supperleft, slowerright, sa),
71507 destImage(tmp), kernel1d(grad));
71508 separableConvolveY(srcImageRange(tmp),
71509 destIter(dupperleftx, dax), kernel1d(smooth));
71510 separableConvolveX(srcIterRange(supperleft, slowerright, sa),
71511 destImage(tmp), kernel1d(smooth));
71512 separableConvolveY(srcImageRange(tmp),
71513 destIter(dupperlefty, day), kernel1d(grad));
71514 }
71515
71516 template <class SrcIterator, class SrcAccessor,
71517 class DestIterator, class DestAccessor>
71518 void gaussianGradient(SrcIterator supperleft,
71519 SrcIterator slowerright, SrcAccessor src,
71520 DestIterator dupperleft, DestAccessor dest,
71521 double scale)
71522 {
71523 VectorElementAccessor<DestAccessor> gradx(0, dest), grady(1, dest);
71524 gaussianGradient(supperleft, slowerright, src,
71525 dupperleft, gradx, dupperleft, grady, scale);
71526 }
71527
71528 template <class SrcIterator, class SrcAccessor,
71529 class DestIteratorX, class DestAccessorX,
71530 class DestIteratorY, class DestAccessorY>
71531 inline void
71532 gaussianGradient(triple<SrcIterator, SrcIterator, SrcAccessor> src,
71533 pair<DestIteratorX, DestAccessorX> destx,
71534 pair<DestIteratorY, DestAccessorY> desty,
71535 double scale)
71536 {
71537 gaussianGradient(src.first, src.second, src.third,
71538 destx.first, destx.second, desty.first, desty.second, scale);
71539 }
71540
71541 template <class SrcIterator, class SrcAccessor,
71542 class DestIterator, class DestAccessor>
71543 inline void
71544 gaussianGradient(triple<SrcIterator, SrcIterator, SrcAccessor> src,
71545 pair<DestIterator, DestAccessor> dest,
71546 double scale)
71547 {
71548 gaussianGradient(src.first, src.second, src.third,
71549 dest.first, dest.second, scale);
71550 }
71551 # 827 "../include/vigra/convolution.hxx"
71552 template <class SrcIterator, class SrcAccessor,
71553 class DestIterator, class DestAccessor>
71554 void laplacianOfGaussian(SrcIterator supperleft,
71555 SrcIterator slowerright, SrcAccessor sa,
71556 DestIterator dupperleft, DestAccessor da,
71557 double scale)
71558 {
71559 typedef typename
71560 NumericTraits<typename SrcAccessor::value_type>::RealPromote
71561 TmpType;
71562 BasicImage<TmpType> tmp(slowerright - supperleft),
71563 tmpx(slowerright - supperleft),
71564 tmpy(slowerright - supperleft);
71565
71566 Kernel1D<double> smooth, deriv;
71567 smooth.initGaussian(scale);
71568 deriv.initGaussianDerivative(scale, 2);
71569
71570 separableConvolveX(srcIterRange(supperleft, slowerright, sa),
71571 destImage(tmp), kernel1d(deriv));
71572 separableConvolveY(srcImageRange(tmp),
71573 destImage(tmpx), kernel1d(smooth));
71574 separableConvolveX(srcIterRange(supperleft, slowerright, sa),
71575 destImage(tmp), kernel1d(smooth));
71576 separableConvolveY(srcImageRange(tmp),
71577 destImage(tmpy), kernel1d(deriv));
71578 combineTwoImages(srcImageRange(tmpx), srcImage(tmpy),
71579 destIter(dupperleft, da), std::plus<TmpType>());
71580 }
71581
71582 template <class SrcIterator, class SrcAccessor,
71583 class DestIterator, class DestAccessor>
71584 inline void
71585 laplacianOfGaussian(triple<SrcIterator, SrcIterator, SrcAccessor> src,
71586 pair<DestIterator, DestAccessor> dest,
71587 double scale)
71588 {
71589 laplacianOfGaussian(src.first, src.second, src.third,
71590 dest.first, dest.second, scale);
71591 }
71592 # 949 "../include/vigra/convolution.hxx"
71593 template <class SrcIterator, class SrcAccessor,
71594 class DestIteratorX, class DestAccessorX,
71595 class DestIteratorXY, class DestAccessorXY,
71596 class DestIteratorY, class DestAccessorY>
71597 void hessianMatrixOfGaussian(SrcIterator supperleft,
71598 SrcIterator slowerright, SrcAccessor sa,
71599 DestIteratorX dupperleftx, DestAccessorX dax,
71600 DestIteratorXY dupperleftxy, DestAccessorXY daxy,
71601 DestIteratorY dupperlefty, DestAccessorY day,
71602 double scale)
71603 {
71604 typedef typename
71605 NumericTraits<typename SrcAccessor::value_type>::RealPromote
71606 TmpType;
71607 BasicImage<TmpType> tmp(slowerright - supperleft);
71608
71609 Kernel1D<double> smooth, deriv1, deriv2;
71610 smooth.initGaussian(scale);
71611 deriv1.initGaussianDerivative(scale, 1);
71612 deriv2.initGaussianDerivative(scale, 2);
71613
71614 separableConvolveX(srcIterRange(supperleft, slowerright, sa),
71615 destImage(tmp), kernel1d(deriv2));
71616 separableConvolveY(srcImageRange(tmp),
71617 destIter(dupperleftx, dax), kernel1d(smooth));
71618 separableConvolveX(srcIterRange(supperleft, slowerright, sa),
71619 destImage(tmp), kernel1d(smooth));
71620 separableConvolveY(srcImageRange(tmp),
71621 destIter(dupperlefty, day), kernel1d(deriv2));
71622 separableConvolveX(srcIterRange(supperleft, slowerright, sa),
71623 destImage(tmp), kernel1d(deriv1));
71624 separableConvolveY(srcImageRange(tmp),
71625 destIter(dupperleftxy, daxy), kernel1d(deriv1));
71626 }
71627
71628 template <class SrcIterator, class SrcAccessor,
71629 class DestIteratorX, class DestAccessorX,
71630 class DestIteratorXY, class DestAccessorXY,
71631 class DestIteratorY, class DestAccessorY>
71632 inline void
71633 hessianMatrixOfGaussian(triple<SrcIterator, SrcIterator, SrcAccessor> src,
71634 pair<DestIteratorX, DestAccessorX> destx,
71635 pair<DestIteratorXY, DestAccessorXY> destxy,
71636 pair<DestIteratorY, DestAccessorY> desty,
71637 double scale)
71638 {
71639 hessianMatrixOfGaussian(src.first, src.second, src.third,
71640 destx.first, destx.second,
71641 destxy.first, destxy.second,
71642 desty.first, desty.second,
71643 scale);
71644 }
71645 # 1088 "../include/vigra/convolution.hxx"
71646 template <class SrcIterator, class SrcAccessor,
71647 class DestIteratorX, class DestAccessorX,
71648 class DestIteratorXY, class DestAccessorXY,
71649 class DestIteratorY, class DestAccessorY>
71650 void structureTensor(SrcIterator supperleft,
71651 SrcIterator slowerright, SrcAccessor sa,
71652 DestIteratorX dupperleftx, DestAccessorX dax,
71653 DestIteratorXY dupperleftxy, DestAccessorXY daxy,
71654 DestIteratorY dupperlefty, DestAccessorY day,
71655 double inner_scale, double outer_scale)
71656 {
71657 typedef typename
71658 NumericTraits<typename SrcAccessor::value_type>::RealPromote
71659 TmpType;
71660 BasicImage<TmpType> tmp(slowerright - supperleft),
71661 tmpx(slowerright - supperleft),
71662 tmpy(slowerright - supperleft);
71663
71664 gaussianGradient(srcIterRange(supperleft, slowerright, sa),
71665 destImage(tmpx), destImage(tmpy), inner_scale);
71666 combineTwoImages(srcImageRange(tmpx), srcImage(tmpx),
71667 destImage(tmp), std::multiplies<TmpType>());
71668 gaussianSmoothing(srcImageRange(tmp),
71669 destIter(dupperleftx, dax), outer_scale);
71670 combineTwoImages(srcImageRange(tmpy), srcImage(tmpy),
71671 destImage(tmp), std::multiplies<TmpType>());
71672 gaussianSmoothing(srcImageRange(tmp),
71673 destIter(dupperlefty, day), outer_scale);
71674 combineTwoImages(srcImageRange(tmpx), srcImage(tmpy),
71675 destImage(tmp), std::multiplies<TmpType>());
71676 gaussianSmoothing(srcImageRange(tmp),
71677 destIter(dupperleftxy, daxy), outer_scale);
71678 }
71679
71680 template <class SrcIterator, class SrcAccessor,
71681 class DestIteratorX, class DestAccessorX,
71682 class DestIteratorXY, class DestAccessorXY,
71683 class DestIteratorY, class DestAccessorY>
71684 inline void
71685 structureTensor(triple<SrcIterator, SrcIterator, SrcAccessor> src,
71686 pair<DestIteratorX, DestAccessorX> destx,
71687 pair<DestIteratorXY, DestAccessorXY> destxy,
71688 pair<DestIteratorY, DestAccessorY> desty,
71689 double inner_scale, double outer_scale)
71690 {
71691 structureTensor(src.first, src.second, src.third,
71692 destx.first, destx.second,
71693 destxy.first, destxy.second,
71694 desty.first, desty.second,
71695 inner_scale, outer_scale);
71696 }
71697
71698
71699
71700 }
71701 # 31 "pyramid.h" 2
71702
71703
71704
71705 # 1 "../include/vigra/rgbvalue.hxx" 1
71706 # 35 "pyramid.h" 2
71707 # 1 "../include/vigra/sized_int.hxx" 1
71708 # 36 "pyramid.h" 2
71709
71710
71711
71712
71713 using std::cout;
71714 using std::vector;
71715
71716 using vigra::linearRangeMapping;
71717 using vigra::NumericTraits;
71718 using vigra::transformImage;
71719 using vigra::triple;
71720 using vigra::UInt16;
71721 using vigra::UInt16Image;
71722 using vigra::UInt16RGBImage;
71723
71724 namespace enblend {
71725 # 63 "pyramid.h"
71726 template <typename ImagePixelComponentType>
71727 unsigned int filterHalfWidth(const unsigned int levels) {
71728
71729
71730
71731 vigra::throw_precondition_error(((levels >= 1 && levels <= 29)), "filterHalfWidth: levels outside of range [1,29]");
71732
71733
71734
71735 int halfWidth = (levels == 1) ? 0 : ((1 << (levels+1)) - 4);
71736
71737 return halfWidth;
71738 }
71739 # 168 "pyramid.h"
71740 template <typename SKIPSMImagePixelType, typename SKIPSMAlphaPixelType,
71741 typename SrcImageIterator, typename SrcAccessor,
71742 typename AlphaIterator, typename AlphaAccessor,
71743 typename DestImageIterator, typename DestAccessor,
71744 typename DestAlphaIterator, typename DestAlphaAccessor>
71745 inline void reduce(bool wraparound,
71746 SrcImageIterator src_upperleft,
71747 SrcImageIterator src_lowerright,
71748 SrcAccessor sa,
71749 AlphaIterator alpha_upperleft,
71750 AlphaAccessor aa,
71751 DestImageIterator dest_upperleft,
71752 DestImageIterator dest_lowerright,
71753 DestAccessor da,
71754 DestAlphaIterator dest_alpha_upperleft,
71755 DestAlphaIterator dest_alpha_lowerright,
71756 DestAlphaAccessor daa) {
71757
71758 typedef typename DestAccessor::value_type DestPixelType;
71759 typedef typename DestAlphaAccessor::value_type DestAlphaPixelType;
71760
71761 int src_w = src_lowerright.x - src_upperleft.x;
71762 int src_h = src_lowerright.y - src_upperleft.y;
71763 int dst_w = dest_lowerright.x - dest_upperleft.x;
71764
71765
71766 vigra::throw_precondition_error((src_w > 1 && src_h > 1), "src image too small in reduce");
71767
71768
71769
71770 SKIPSMImagePixelType isr0, isr1, isrp;
71771 SKIPSMImagePixelType *isc0 = new SKIPSMImagePixelType[dst_w + 1];
71772 SKIPSMImagePixelType *isc1 = new SKIPSMImagePixelType[dst_w + 1];
71773 SKIPSMImagePixelType *iscp = new SKIPSMImagePixelType[dst_w + 1];
71774
71775
71776 SKIPSMAlphaPixelType asr0, asr1, asrp;
71777 SKIPSMAlphaPixelType *asc0 = new SKIPSMAlphaPixelType[dst_w + 1];
71778 SKIPSMAlphaPixelType *asc1 = new SKIPSMAlphaPixelType[dst_w + 1];
71779 SKIPSMAlphaPixelType *ascp = new SKIPSMAlphaPixelType[dst_w + 1];
71780
71781
71782 const SKIPSMImagePixelType SKIPSMImageZero(NumericTraits<SKIPSMImagePixelType>::zero());
71783 const SKIPSMAlphaPixelType SKIPSMAlphaZero(NumericTraits<SKIPSMAlphaPixelType>::zero());
71784 const SKIPSMAlphaPixelType SKIPSMAlphaOne(NumericTraits<SKIPSMAlphaPixelType>::one());
71785 const DestPixelType DestImageZero(NumericTraits<DestPixelType>::zero());
71786 const DestAlphaPixelType DestAlphaZero(NumericTraits<DestAlphaPixelType>::zero());
71787 const DestAlphaPixelType DestAlphaMax(NumericTraits<DestAlphaPixelType>::max());
71788
71789 DestImageIterator dy = dest_upperleft;
71790 DestImageIterator dx = dy;
71791 SrcImageIterator sy = src_upperleft;
71792 SrcImageIterator sx = sy;
71793 AlphaIterator ay = alpha_upperleft;
71794 AlphaIterator ax = ay;
71795 DestAlphaIterator day = dest_alpha_upperleft;
71796 DestAlphaIterator dax = day;
71797
71798 bool evenY = true;
71799 bool evenX = true;
71800 int srcy = 0;
71801 int srcx = 0;
71802
71803 int dstx = 0;
71804
71805
71806 {
71807 if (wraparound) {
71808 asr0 = aa(ay, Diff2D(src_w-2, 0)) ? SKIPSMAlphaOne : SKIPSMAlphaZero;
71809 asr1 = SKIPSMAlphaZero;
71810 asrp = aa(ay, Diff2D(src_w-1, 0)) ? (SKIPSMAlphaOne * 4) : SKIPSMAlphaZero;
71811 isr0 = aa(ay, Diff2D(src_w-2, 0)) ? SKIPSMImagePixelType(sa(sy, Diff2D(src_w-2, 0))) : SKIPSMImageZero;
71812 isr1 = SKIPSMImageZero;
71813 isrp = aa(ay, Diff2D(src_w-1, 0)) ? (SKIPSMImagePixelType(sa(sy, Diff2D(src_w-1, 0))) * 4) : SKIPSMImageZero;
71814 } else {
71815 asr0 = SKIPSMAlphaZero;
71816 asr1 = SKIPSMAlphaZero;
71817 asrp = SKIPSMAlphaZero;
71818 isr0 = SKIPSMImageZero;
71819 isr1 = SKIPSMImageZero;
71820 isrp = SKIPSMImageZero;
71821 }
71822
71823 for (sx = sy, ax = ay, evenX = true, srcx = 0, dstx = 0; srcx < src_w; ++srcx, ++sx.x, ++ax.x) {
71824 SKIPSMAlphaPixelType mcurrent(aa(ax) ? SKIPSMAlphaOne : SKIPSMAlphaZero);
71825 SKIPSMImagePixelType icurrent(aa(ax) ? SKIPSMImagePixelType(sa(sx)) : SKIPSMImageZero);
71826 if (evenX) {
71827 asc1[dstx] = SKIPSMAlphaZero;
71828 asc0[dstx] = asr1 + (asr0 * SKIPSMAlphaPixelType(6)) + asrp + mcurrent;
71829 asr1 = asr0 + asrp;
71830 asr0 = mcurrent;
71831 isc1[dstx] = SKIPSMImageZero;
71832 isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + icurrent;
71833 isr1 = isr0 + isrp;
71834 isr0 = icurrent;
71835 }
71836 else {
71837 asrp = mcurrent * 4;
71838 isrp = icurrent * 4;
71839 ++dstx;
71840 }
71841 evenX = !evenX;
71842 }
71843
71844
71845 if (!evenX) {
71846
71847 ++dstx;
71848 if (wraparound) {
71849 asc1[dstx] = SKIPSMAlphaZero;
71850 asc0[dstx] = asr1 + (asr0 * SKIPSMAlphaPixelType(6)) + (aa(ay) ? (SKIPSMAlphaOne * 4) : SKIPSMAlphaZero) + (aa(ay, Diff2D(1,0)) ? SKIPSMAlphaOne : SKIPSMAlphaZero);
71851 isc1[dstx] = SKIPSMImageZero;
71852 isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + (aa(ay) ? (SKIPSMImagePixelType(sa(sy)) * 4) : SKIPSMImageZero)
71853 + (aa(ay, Diff2D(1,0)) ? SKIPSMImagePixelType(sa(sy, Diff2D(1,0))) : SKIPSMImageZero);
71854 } else {
71855 asc1[dstx] = SKIPSMAlphaZero;
71856 asc0[dstx] = asr1 + (asr0 * SKIPSMAlphaPixelType(6));
71857 isc1[dstx] = SKIPSMImageZero;
71858 isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6));
71859 }
71860 }
71861 else {
71862
71863 if (wraparound) {
71864 asc1[dstx] = SKIPSMAlphaZero;
71865 asc0[dstx] = asr1 + (asr0 * SKIPSMAlphaPixelType(6)) + asrp + (aa(ay) ? SKIPSMAlphaOne : SKIPSMAlphaZero);
71866 isc1[dstx] = SKIPSMImageZero;
71867 isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + (aa(ay) ? SKIPSMImagePixelType(sa(sy)) : SKIPSMImageZero);
71868 } else {
71869 asc1[dstx] = SKIPSMAlphaZero;
71870 asc0[dstx] = asr1 + (asr0 * SKIPSMAlphaPixelType(6)) + asrp;
71871 isc1[dstx] = SKIPSMImageZero;
71872 isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp;
71873 }
71874 }
71875 }
71876 ++sy.y;
71877 ++ay.y;
71878
71879
71880 {
71881 for (evenY = false, srcy = 1; srcy < src_h; ++srcy, ++sy.y, ++ay.y) {
71882
71883 if (wraparound) {
71884 asr0 = aa(ay, Diff2D(src_w-2, 0)) ? SKIPSMAlphaOne : SKIPSMAlphaZero;
71885 asr1 = SKIPSMAlphaZero;
71886 asrp = aa(ay, Diff2D(src_w-1, 0)) ? (SKIPSMAlphaOne * 4) : SKIPSMAlphaZero;
71887 isr0 = aa(ay, Diff2D(src_w-2, 0)) ? SKIPSMImagePixelType(sa(sy, Diff2D(src_w-2,0))) : SKIPSMImageZero;
71888 isr1 = SKIPSMImageZero;
71889 isrp = aa(ay, Diff2D(src_w-1, 0)) ? (SKIPSMImagePixelType(sa(sy, Diff2D(src_w-1,0))) * 4) : SKIPSMImageZero;
71890 } else {
71891 asr0 = SKIPSMAlphaZero;
71892 asr1 = SKIPSMAlphaZero;
71893 asrp = SKIPSMAlphaZero;
71894 isr0 = SKIPSMImageZero;
71895 isr1 = SKIPSMImageZero;
71896 isrp = SKIPSMImageZero;
71897 }
71898
71899 if (evenY) {
71900
71901
71902
71903 sx = sy;
71904 ax = ay;
71905 if (wraparound) {
71906 asr1 = asr0 + asrp;
71907 isr1 = isr0 + isrp;
71908 }
71909 asr0 = aa(ax) ? SKIPSMAlphaOne : SKIPSMAlphaZero;
71910 isr0 = aa(ax) ? SKIPSMImagePixelType(sa(sx)) : SKIPSMImageZero;
71911
71912 ++sx.x;
71913 ++ax.x;
71914 dx = dy;
71915 dax = day;
71916
71917
71918 for (evenX = false, srcx = 1, dstx = 0; srcx < src_w; ++srcx, ++sx.x, ++ax.x) {
71919 SKIPSMAlphaPixelType mcurrent(aa(ax) ? SKIPSMAlphaOne : SKIPSMAlphaZero);
71920 SKIPSMImagePixelType icurrent(aa(ax) ? SKIPSMImagePixelType(sa(sx)) : SKIPSMImageZero);
71921 if (evenX) {
71922 SKIPSMAlphaPixelType ap = asc1[dstx] + (asc0[dstx] * SKIPSMAlphaPixelType(6)) + ascp[dstx];
71923 asc1[dstx] = asc0[dstx] + ascp[dstx];
71924 asc0[dstx] = asr1 + (asr0 * SKIPSMAlphaPixelType(6)) + asrp + mcurrent;
71925 asr1 = asr0 + asrp;
71926 asr0 = mcurrent;
71927 ap += asc0[dstx];
71928
71929 SKIPSMImagePixelType ip = isc1[dstx] + (isc0[dstx] * SKIPSMImagePixelType(6)) + iscp[dstx];
71930 isc1[dstx] = isc0[dstx] + iscp[dstx];
71931 isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + icurrent;
71932 isr1 = isr0 + isrp;
71933 isr0 = icurrent;
71934 if (ap) {
71935 ip += isc0[dstx];
71936 ip /= SKIPSMImagePixelType(ap);
71937 da.set(DestPixelType(ip), dx);
71938 daa.set(DestAlphaMax, dax);
71939 } else {
71940 da.set(DestImageZero, dx);
71941 daa.set(DestAlphaZero, dax);
71942 }
71943
71944 ++dx.x;
71945 ++dax.x;
71946 }
71947 else {
71948 asrp = mcurrent * 4;
71949 isrp = icurrent * 4;
71950 ++dstx;
71951 }
71952 evenX = !evenX;
71953 }
71954
71955
71956 if (!evenX) {
71957
71958 ++dstx;
71959
71960 SKIPSMAlphaPixelType ap = asc1[dstx] + (asc0[dstx] * SKIPSMAlphaPixelType(6)) + ascp[dstx];
71961 asc1[dstx] = asc0[dstx] + ascp[dstx];
71962 if (wraparound) {
71963 asc0[dstx] = asr1 + (asr0 * SKIPSMAlphaPixelType(6)) + (aa(ay) ? (SKIPSMAlphaOne * 4) : SKIPSMAlphaZero) + (aa(ay, Diff2D(1,0)) ? SKIPSMAlphaOne : SKIPSMAlphaZero);
71964 } else {
71965 asc0[dstx] = asr1 + (asr0 * SKIPSMAlphaPixelType(6));
71966 }
71967 ap += asc0[dstx];
71968
71969 SKIPSMImagePixelType ip = isc1[dstx] + (isc0[dstx] * SKIPSMImagePixelType(6)) + iscp[dstx];
71970 isc1[dstx] = isc0[dstx] + iscp[dstx];
71971 if (wraparound) {
71972 isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + (aa(ay) ? (SKIPSMImagePixelType(sa(sy)) * 4) : SKIPSMImageZero)
71973 + (aa(ay, Diff2D(1,0)) ? SKIPSMImagePixelType(sa(sy, Diff2D(1,0))) : SKIPSMImageZero);
71974 } else {
71975 isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6));
71976 }
71977 if (ap) {
71978 ip += isc0[dstx];
71979 ip /= SKIPSMImagePixelType(ap);
71980 da.set(DestPixelType(ip), dx);
71981 daa.set(DestAlphaMax, dax);
71982 } else {
71983 da.set(DestImageZero, dx);
71984 daa.set(DestAlphaZero, dax);
71985 }
71986 }
71987 else {
71988
71989 SKIPSMAlphaPixelType ap = asc1[dstx] + (asc0[dstx] * SKIPSMAlphaPixelType(6)) + ascp[dstx];
71990 asc1[dstx] = asc0[dstx] + ascp[dstx];
71991 if (wraparound) {
71992 asc0[dstx] = asr1 + (asr0 * SKIPSMAlphaPixelType(6)) + asrp + (aa(ay) ? SKIPSMAlphaOne : SKIPSMAlphaZero);
71993 } else {
71994 asc0[dstx] = asr1 + (asr0 * SKIPSMAlphaPixelType(6)) + asrp;
71995 }
71996 ap += asc0[dstx];
71997
71998 SKIPSMImagePixelType ip = isc1[dstx] + (isc0[dstx] * SKIPSMImagePixelType(6)) + iscp[dstx];
71999 isc1[dstx] = isc0[dstx] + iscp[dstx];
72000 if (wraparound) {
72001 isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + (aa(ay) ? SKIPSMImagePixelType(sa(sy)) : SKIPSMImageZero);
72002 } else {
72003 isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp;
72004 }
72005 if (ap) {
72006 ip += isc0[dstx];
72007 ip /= SKIPSMImagePixelType(ap);
72008 da.set(DestPixelType(ip), dx);
72009 daa.set(DestAlphaMax, dax);
72010 } else {
72011 da.set(DestImageZero, dx);
72012 daa.set(DestAlphaZero, dax);
72013 }
72014 }
72015
72016 ++dy.y;
72017 ++day.y;
72018
72019 }
72020 else {
72021
72022 sx = sy;
72023 ax = ay;
72024 if (wraparound) {
72025 asr1 = asr0 + asrp;
72026 isr1 = isr0 + isrp;
72027 }
72028 asr0 = aa(ax) ? SKIPSMAlphaOne : SKIPSMAlphaZero;
72029 isr0 = aa(ax) ? SKIPSMImagePixelType(sa(sx)) : SKIPSMImageZero;
72030
72031 ++sx.x;
72032 ++ax.x;
72033
72034
72035 for (evenX = false, srcx = 1, dstx = 0; srcx < src_w; ++srcx, ++sx.x, ++ax.x) {
72036 SKIPSMAlphaPixelType mcurrent(aa(ax) ? SKIPSMAlphaOne : SKIPSMAlphaZero);
72037 SKIPSMImagePixelType icurrent(aa(ax) ? SKIPSMImagePixelType(sa(sx)) : SKIPSMImageZero);
72038 if (evenX) {
72039 ascp[dstx] = (asr1 + (asr0 * SKIPSMAlphaPixelType(6)) + asrp + mcurrent) * 4;
72040 asr1 = asr0 + asrp;
72041 asr0 = mcurrent;
72042 iscp[dstx] = (isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + icurrent) * 4;
72043 isr1 = isr0 + isrp;
72044 isr0 = icurrent;
72045 }
72046 else {
72047 asrp = mcurrent * 4;
72048 isrp = icurrent * 4;
72049 ++dstx;
72050 }
72051 evenX = !evenX;
72052 }
72053
72054
72055 if (!evenX) {
72056
72057 ++dstx;
72058 if (wraparound) {
72059 ascp[dstx] = (asr1 + (asr0 * SKIPSMAlphaPixelType(6)) + (aa(ay) ? (SKIPSMAlphaOne * 4) : SKIPSMAlphaZero)
72060 + (aa(ay, Diff2D(1,0)) ? SKIPSMAlphaOne : SKIPSMAlphaZero)
72061 ) * 4;
72062 iscp[dstx] = (isr1 + (isr0 * SKIPSMImagePixelType(6)) + (aa(ay) ? (SKIPSMImagePixelType(sa(sy)) * 4) : SKIPSMImageZero)
72063 + (aa(ay, Diff2D(1,0)) ? SKIPSMImagePixelType(sa(sy, Diff2D(1,0))) : SKIPSMImageZero)
72064 ) * 4;
72065 } else {
72066 ascp[dstx] = (asr1 + (asr0 * SKIPSMAlphaPixelType(6))) * 4;
72067 iscp[dstx] = (isr1 + (isr0 * SKIPSMImagePixelType(6))) * 4;
72068 }
72069 }
72070 else {
72071
72072 if (wraparound) {
72073 ascp[dstx] = (asr1 + (asr0 * SKIPSMAlphaPixelType(6)) + asrp + (aa(ay) ? SKIPSMAlphaOne : SKIPSMAlphaZero)) * 4;
72074 iscp[dstx] = (isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + (aa(ay) ? SKIPSMImagePixelType(sa(sy)) : SKIPSMImageZero)) * 4;
72075 } else {
72076 ascp[dstx] = (asr1 + (asr0 * SKIPSMAlphaPixelType(6)) + asrp) * 4;
72077 iscp[dstx] = (isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp) * 4;
72078 }
72079 }
72080 }
72081 evenY = !evenY;
72082 }
72083 }
72084
72085
72086 {
72087 if (!evenY) {
72088
72089
72090
72091
72092
72093
72094 for (dstx = 1, dx = dy, dax = day; dstx < (dst_w + 1); ++dstx, ++dx.x, ++dax.x) {
72095 SKIPSMAlphaPixelType ap = asc1[dstx] + (asc0[dstx] * SKIPSMAlphaPixelType(6));
72096 if (ap) {
72097 SKIPSMImagePixelType ip = (isc1[dstx] + (isc0[dstx] * SKIPSMImagePixelType(6))) / SKIPSMImagePixelType(ap);
72098 da.set(DestPixelType(ip), dx);
72099 daa.set(DestAlphaMax, dax);
72100 } else {
72101 da.set(DestImageZero, dx);
72102 daa.set(DestAlphaZero, dax);
72103 }
72104 }
72105 }
72106 else {
72107
72108
72109
72110
72111
72112 for (dstx = 1, dx = dy, dax = day; dstx < (dst_w + 1); ++dstx, ++dx.x, ++dax.x) {
72113 SKIPSMAlphaPixelType ap = asc1[dstx] + (asc0[dstx] * SKIPSMAlphaPixelType(6)) + ascp[dstx];
72114 if (ap) {
72115 SKIPSMImagePixelType ip = (isc1[dstx] + (isc0[dstx] * SKIPSMImagePixelType(6)) + iscp[dstx]) / SKIPSMImagePixelType(ap);
72116 da.set(DestPixelType(ip), dx);
72117 daa.set(DestAlphaMax, dax);
72118 } else {
72119 da.set(DestImageZero, dx);
72120 daa.set(DestAlphaZero, dax);
72121 }
72122 }
72123 }
72124 }
72125
72126 delete[] isc0;
72127 delete[] isc1;
72128 delete[] iscp;
72129
72130 delete[] asc0;
72131 delete[] asc1;
72132 delete[] ascp;
72133
72134 };
72135
72136
72137 template <typename SKIPSMImagePixelType, typename SKIPSMAlphaPixelType,
72138 typename SrcImageIterator, typename SrcAccessor,
72139 typename AlphaIterator, typename AlphaAccessor,
72140 typename DestImageIterator, typename DestAccessor,
72141 typename DestAlphaIterator, typename DestAlphaAccessor>
72142 inline void reduce(bool wraparound,
72143 triple<SrcImageIterator, SrcImageIterator, SrcAccessor> src,
72144 pair<AlphaIterator, AlphaAccessor> mask,
72145 triple<DestImageIterator, DestImageIterator, DestAccessor> dest,
72146 triple<DestAlphaIterator, DestAlphaIterator, DestAlphaAccessor> destMask) {
72147 reduce<SKIPSMImagePixelType, SKIPSMAlphaPixelType>(wraparound,
72148 src.first, src.second, src.third,
72149 mask.first, mask.second,
72150 dest.first, dest.second, dest.third,
72151 destMask.first, destMask.second, destMask.third);
72152 };
72153
72154
72155
72156
72157 template <typename SKIPSMImagePixelType,
72158 typename SrcImageIterator, typename SrcAccessor,
72159 typename DestImageIterator, typename DestAccessor>
72160 inline void reduce(bool wraparound,
72161 SrcImageIterator src_upperleft,
72162 SrcImageIterator src_lowerright,
72163 SrcAccessor sa,
72164 DestImageIterator dest_upperleft,
72165 DestImageIterator dest_lowerright,
72166 DestAccessor da) {
72167
72168 typedef typename DestAccessor::value_type DestPixelType;
72169
72170 int src_w = src_lowerright.x - src_upperleft.x;
72171 int src_h = src_lowerright.y - src_upperleft.y;
72172 int dst_w = dest_lowerright.x - dest_upperleft.x;
72173
72174
72175 vigra::throw_precondition_error((src_w > 1 && src_h > 1), "src image too small in reduce");
72176
72177
72178
72179 SKIPSMImagePixelType isr0, isr1, isrp;
72180 SKIPSMImagePixelType *isc0 = new SKIPSMImagePixelType[dst_w + 1];
72181 SKIPSMImagePixelType *isc1 = new SKIPSMImagePixelType[dst_w + 1];
72182 SKIPSMImagePixelType *iscp = new SKIPSMImagePixelType[dst_w + 1];
72183
72184
72185 const SKIPSMImagePixelType SKIPSMImageZero(NumericTraits<SKIPSMImagePixelType>::zero());
72186
72187 DestImageIterator dy = dest_upperleft;
72188 DestImageIterator dx = dy;
72189 SrcImageIterator sy = src_upperleft;
72190 SrcImageIterator sx = sy;
72191
72192 bool evenY = true;
72193 bool evenX = true;
72194 int srcy = 0;
72195 int srcx = 0;
72196
72197 int dstx = 0;
72198
72199
72200 {
72201 if (wraparound) {
72202 isr0 = SKIPSMImagePixelType(sa(sy, Diff2D(src_w-2, 0)));
72203 isr1 = SKIPSMImageZero;
72204 isrp = SKIPSMImagePixelType(sa(sy, Diff2D(src_w-1, 0))) * 4;
72205 } else {
72206 isr0 = SKIPSMImagePixelType(sa(sy));
72207 isr1 = SKIPSMImageZero;
72208 isrp = SKIPSMImagePixelType(sa(sy)) * 4;
72209 }
72210
72211
72212 for (sx = sy, evenX = true, srcx = 0, dstx = 0; srcx < src_w; ++srcx, ++sx.x) {
72213 SKIPSMImagePixelType icurrent(SKIPSMImagePixelType(sa(sx)));
72214 if (evenX) {
72215 isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + icurrent;
72216 isc1[dstx] = (isc0[dstx] * SKIPSMImagePixelType(5));
72217 isr1 = isr0 + isrp;
72218 isr0 = icurrent;
72219 }
72220 else {
72221 isrp = icurrent * 4;
72222 ++dstx;
72223 }
72224 evenX = !evenX;
72225 }
72226
72227
72228 if (!evenX) {
72229
72230 ++dstx;
72231 if (wraparound) {
72232 isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + (SKIPSMImagePixelType(sa(sy)) * 4)
72233 + SKIPSMImagePixelType(sa(sy, Diff2D(1,0)));
72234 isc1[dstx] = (isc0[dstx] * SKIPSMImagePixelType(5));
72235 } else {
72236 isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(11));
72237 isc1[dstx] = (isc0[dstx] * SKIPSMImagePixelType(5));
72238 }
72239 }
72240 else {
72241
72242 if (wraparound) {
72243 isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + SKIPSMImagePixelType(sa(sy));
72244 isc1[dstx] = (isc0[dstx] * SKIPSMImagePixelType(5));
72245 } else {
72246 isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + (isrp / 4);
72247 isc1[dstx] = (isc0[dstx] * SKIPSMImagePixelType(5));
72248 }
72249 }
72250 }
72251 ++sy.y;
72252
72253
72254 {
72255 for (evenY = false, srcy = 1; srcy < src_h; ++srcy, ++sy.y) {
72256
72257 if (wraparound) {
72258 isr0 = SKIPSMImagePixelType(sa(sy, Diff2D(src_w-2,0)));
72259 isr1 = SKIPSMImageZero;
72260 isrp = SKIPSMImagePixelType(sa(sy, Diff2D(src_w-1,0))) * 4;
72261 } else {
72262 isr0 = SKIPSMImagePixelType(sa(sy));
72263 isr1 = SKIPSMImageZero;
72264 isrp = SKIPSMImagePixelType(sa(sy)) * 4;
72265 }
72266
72267 if (evenY) {
72268
72269
72270
72271 sx = sy;
72272 isr1 = isr0 + isrp;
72273 isr0 = SKIPSMImagePixelType(sa(sx));
72274
72275 ++sx.x;
72276 dx = dy;
72277
72278
72279 for (evenX = false, srcx = 1, dstx = 0; srcx < src_w; ++srcx, ++sx.x) {
72280 SKIPSMImagePixelType icurrent(SKIPSMImagePixelType(sa(sx)));
72281 if (evenX) {
72282 SKIPSMImagePixelType ip = isc1[dstx] + (isc0[dstx] * SKIPSMImagePixelType(6)) + iscp[dstx];
72283 isc1[dstx] = isc0[dstx] + iscp[dstx];
72284 isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + icurrent;
72285 isr1 = isr0 + isrp;
72286 isr0 = icurrent;
72287 ip += isc0[dstx];
72288 ip /= 256;
72289 da.set(DestPixelType(ip), dx);
72290 ++dx.x;
72291 }
72292 else {
72293 isrp = icurrent * 4;
72294 ++dstx;
72295 }
72296 evenX = !evenX;
72297 }
72298
72299
72300 if (!evenX) {
72301
72302 ++dstx;
72303
72304 SKIPSMImagePixelType ip = isc1[dstx] + (isc0[dstx] * SKIPSMImagePixelType(6)) + iscp[dstx];
72305 isc1[dstx] = isc0[dstx] + iscp[dstx];
72306 if (wraparound) {
72307 isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + (SKIPSMImagePixelType(sa(sy)) * 4)
72308 + SKIPSMImagePixelType(sa(sy, Diff2D(1,0)));
72309 } else {
72310 isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(11));
72311 }
72312 ip += isc0[dstx];
72313 ip /= 256;
72314 da.set(DestPixelType(ip), dx);
72315 }
72316 else {
72317
72318 SKIPSMImagePixelType ip = isc1[dstx] + (isc0[dstx] * SKIPSMImagePixelType(6)) + iscp[dstx];
72319 isc1[dstx] = isc0[dstx] + iscp[dstx];
72320 if (wraparound) {
72321 isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + SKIPSMImagePixelType(sa(sy));
72322 } else {
72323 isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + (isrp / 4);
72324 }
72325 ip += isc0[dstx];
72326 ip /= 256;
72327 da.set(DestPixelType(ip), dx);
72328 }
72329
72330 ++dy.y;
72331 }
72332 else {
72333
72334 sx = sy;
72335 isr1 = isr0 + isrp;
72336 isr0 = SKIPSMImagePixelType(sa(sx));
72337
72338 ++sx.x;
72339
72340
72341 for (evenX = false, srcx = 1, dstx = 0; srcx < src_w; ++srcx, ++sx.x) {
72342 SKIPSMImagePixelType icurrent(SKIPSMImagePixelType(sa(sx)));
72343 if (evenX) {
72344 iscp[dstx] = (isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + icurrent) * 4;
72345 isr1 = isr0 + isrp;
72346 isr0 = icurrent;
72347 }
72348 else {
72349 isrp = icurrent * 4;
72350 ++dstx;
72351 }
72352 evenX = !evenX;
72353 }
72354
72355 if (!evenX) {
72356
72357 ++dstx;
72358 if (wraparound) {
72359 iscp[dstx] = (isr1 + (isr0 * SKIPSMImagePixelType(6)) + (SKIPSMImagePixelType(sa(sy)) * 4)
72360 + SKIPSMImagePixelType(sa(sy, Diff2D(1,0)))
72361 ) * 4;
72362 } else {
72363 iscp[dstx] = (isr1 + (isr0 * SKIPSMImagePixelType(11))) * 4;
72364 }
72365 }
72366 else {
72367
72368 if (wraparound) {
72369 iscp[dstx] = (isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + SKIPSMImagePixelType(sa(sy))) * 4;
72370 } else {
72371 iscp[dstx] = (isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + (isrp / 4)) * 4;
72372 }
72373 }
72374 }
72375 evenY = !evenY;
72376 }
72377 }
72378
72379
72380 {
72381 if (!evenY) {
72382
72383
72384
72385
72386
72387
72388 for (dstx = 1, dx = dy; dstx < (dst_w + 1); ++dstx, ++dx.x) {
72389 SKIPSMImagePixelType ip = (isc1[dstx] + (isc0[dstx] * SKIPSMImagePixelType(11))) / 256;
72390 da.set(DestPixelType(ip), dx);
72391 }
72392 }
72393 else {
72394
72395
72396
72397
72398
72399 for (dstx = 1, dx = dy; dstx < (dst_w + 1); ++dstx, ++dx.x) {
72400 SKIPSMImagePixelType ip = (isc1[dstx] + (isc0[dstx] * SKIPSMImagePixelType(6)) + iscp[dstx] + (iscp[dstx] / 4)) / 256;
72401 da.set(DestPixelType(ip), dx);
72402 }
72403 }
72404 }
72405
72406 delete[] isc0;
72407 delete[] isc1;
72408 delete[] iscp;
72409
72410 };
72411
72412
72413 template <typename SKIPSMImagePixelType,
72414 typename SrcImageIterator, typename SrcAccessor,
72415 typename DestImageIterator, typename DestAccessor>
72416 inline void reduce(bool wraparound,
72417 triple<SrcImageIterator, SrcImageIterator, SrcAccessor> src,
72418 triple<DestImageIterator, DestImageIterator, DestAccessor> dest) {
72419 reduce<SKIPSMImagePixelType>(wraparound,
72420 src.first, src.second, src.third,
72421 dest.first, dest.second, dest.third);
72422 };
72423 # 1076 "pyramid.h"
72424 template <typename SKIPSMImagePixelType,
72425 typename SrcImageIterator, typename SrcAccessor,
72426 typename DestImageIterator, typename DestAccessor,
72427 typename CombineFunctor>
72428 void expand(bool add, bool wraparound,
72429 SrcImageIterator src_upperleft,
72430 SrcImageIterator src_lowerright,
72431 SrcAccessor sa,
72432 DestImageIterator dest_upperleft,
72433 DestImageIterator dest_lowerright,
72434 DestAccessor da,
72435 CombineFunctor cf) {
72436
72437 int src_w = src_lowerright.x - src_upperleft.x;
72438 int src_h = src_lowerright.y - src_upperleft.y;
72439 int dst_w = dest_lowerright.x - dest_upperleft.x;
72440 int dst_h = dest_lowerright.y - dest_upperleft.y;
72441
72442
72443 SKIPSMImagePixelType current;
72444 SKIPSMImagePixelType out00, out10, out01, out11;
72445 SKIPSMImagePixelType sr0, sr1;
72446 SKIPSMImagePixelType *sc0a = new SKIPSMImagePixelType[src_w + 1];
72447 SKIPSMImagePixelType *sc0b = new SKIPSMImagePixelType[src_w + 1];
72448 SKIPSMImagePixelType *sc1a = new SKIPSMImagePixelType[src_w + 1];
72449 SKIPSMImagePixelType *sc1b = new SKIPSMImagePixelType[src_w + 1];
72450
72451
72452 const SKIPSMImagePixelType SKIPSMImageZero(NumericTraits<SKIPSMImagePixelType>::zero());
72453
72454 DestImageIterator dy = dest_upperleft;
72455 DestImageIterator dyy = dest_upperleft;
72456 DestImageIterator dx = dy;
72457 DestImageIterator dxx = dyy;
72458 SrcImageIterator sy = src_upperleft;
72459 SrcImageIterator sx = sy;
72460
72461 int srcy = 0;
72462 int srcx = 0;
72463
72464
72465
72466
72467 {
72468 if (wraparound) {
72469 sr0 = SKIPSMImagePixelType(sa(sy, Diff2D(src_w-1,0)));
72470 sr1 = SKIPSMImagePixelType(sa(sy, Diff2D(src_w-2,0)));
72471 } else {
72472 sr0 = SKIPSMImageZero;
72473 sr1 = SKIPSMImageZero;
72474 }
72475
72476 for (sx = sy, srcx = 0; srcx < src_w; ++srcx, ++sx.x) {
72477 current = SKIPSMImagePixelType(sa(sx));
72478 sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)) + current;
72479 sc0b[srcx] = (sr0 + current) * 4;
72480 sc1a[srcx] = SKIPSMImageZero;
72481 sc1b[srcx] = SKIPSMImageZero;
72482 sr1 = sr0;
72483 sr0 = current;
72484 }
72485
72486
72487 if (wraparound) {
72488 sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)) + SKIPSMImagePixelType(sa(sy));
72489 sc0b[srcx] = (sr0 + SKIPSMImagePixelType(sa(sy))) * 4;
72490 } else {
72491 sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6));
72492 sc0b[srcx] = sr0 * 4;
72493 }
72494 sc1a[srcx] = SKIPSMImageZero;
72495 sc1b[srcx] = SKIPSMImageZero;
72496 }
72497
72498
72499
72500 ++dyy.y;
72501
72502 srcy = 1;
72503 ++sy.y;
72504
72505
72506 if (src_h > 1) {
72507
72508 srcx = 0;
72509 sx = sy;
72510 sr0 = SKIPSMImagePixelType(sa(sx));
72511 if (wraparound) {
72512 sr1 = SKIPSMImagePixelType(sa(sy, Diff2D(src_w-1,0)));
72513 } else {
72514 sr1 = SKIPSMImageZero;
72515 }
72516
72517
72518 srcx = 1;
72519 ++sx.x;
72520 dx = dy;
72521 dxx = dyy;
72522
72523
72524 if (src_w > 1) {
72525 if (wraparound) {
72526 current = SKIPSMImagePixelType(sa(sx)); out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out01 = sc0a[srcx]; out11 = sc0b[srcx]; sc1a[srcx] = sc0a[srcx]; sc1b[srcx] = sc0b[srcx]; sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)) + current; sc0b[srcx] = (sr0 + current) * 4; sr1 = sr0; sr0 = current; out00 += sc0a[srcx]; out10 += sc0b[srcx]; out01 += sc0a[srcx]; out11 += sc0b[srcx]; out00 /= SKIPSMImagePixelType(56); out10 /= SKIPSMImagePixelType(56); out01 /= SKIPSMImagePixelType(16); out11 /= SKIPSMImagePixelType(16); da.set(cf(SKIPSMImagePixelType(da(dx)), out00), dx); ++dx.x; da.set(cf(SKIPSMImagePixelType(da(dx)), out10), dx); ++dx.x; da.set(cf(SKIPSMImagePixelType(da(dxx)), out01), dxx); ++dxx.x; da.set(cf(SKIPSMImagePixelType(da(dxx)), out11), dxx); ++dxx.x;
72527 } else {
72528 current = SKIPSMImagePixelType(sa(sx)); out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out01 = sc0a[srcx]; out11 = sc0b[srcx]; sc1a[srcx] = sc0a[srcx]; sc1b[srcx] = sc0b[srcx]; sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)) + current; sc0b[srcx] = (sr0 + current) * 4; sr1 = sr0; sr0 = current; out00 += sc0a[srcx]; out10 += sc0b[srcx]; out01 += sc0a[srcx]; out11 += sc0b[srcx]; out00 /= SKIPSMImagePixelType(49); out10 /= SKIPSMImagePixelType(56); out01 /= SKIPSMImagePixelType(14); out11 /= SKIPSMImagePixelType(16); da.set(cf(SKIPSMImagePixelType(da(dx)), out00), dx); ++dx.x; da.set(cf(SKIPSMImagePixelType(da(dx)), out10), dx); ++dx.x; da.set(cf(SKIPSMImagePixelType(da(dxx)), out01), dxx); ++dxx.x; da.set(cf(SKIPSMImagePixelType(da(dxx)), out11), dxx); ++dxx.x;
72529 }
72530
72531
72532 for (srcx = 2, ++sx.x; srcx < src_w; ++srcx, ++sx.x) {
72533 current = SKIPSMImagePixelType(sa(sx)); out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out01 = sc0a[srcx]; out11 = sc0b[srcx]; sc1a[srcx] = sc0a[srcx]; sc1b[srcx] = sc0b[srcx]; sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)) + current; sc0b[srcx] = (sr0 + current) * 4; sr1 = sr0; sr0 = current; out00 += sc0a[srcx]; out10 += sc0b[srcx]; out01 += sc0a[srcx]; out11 += sc0b[srcx]; out00 /= SKIPSMImagePixelType(56); out10 /= SKIPSMImagePixelType(56); out01 /= SKIPSMImagePixelType(16); out11 /= SKIPSMImagePixelType(16); da.set(cf(SKIPSMImagePixelType(da(dx)), out00), dx); ++dx.x; da.set(cf(SKIPSMImagePixelType(da(dx)), out10), dx); ++dx.x; da.set(cf(SKIPSMImagePixelType(da(dxx)), out01), dxx); ++dxx.x; da.set(cf(SKIPSMImagePixelType(da(dxx)), out11), dxx); ++dxx.x;
72534 }
72535
72536
72537 if (wraparound) {
72538 out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out01 = sc0a[srcx]; out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out11 = sc0b[srcx]; sc1a[srcx] = sc0a[srcx]; sc1b[srcx] = sc0b[srcx]; sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)) + SKIPSMImagePixelType(sa(sy)); sc0b[srcx] = (sr0 + SKIPSMImagePixelType(sa(sy))) * 4; out00 += sc0a[srcx]; out01 += sc0a[srcx]; out00 /= SKIPSMImagePixelType(56); out01 /= SKIPSMImagePixelType(16); da.set(cf(da(dx), out00), dx); da.set(cf(da(dxx), out01), dxx); if ((dst_w & 1) == 0) { ++dx.x; ++dxx.x; out10 += sc0b[srcx]; out11 += sc0b[srcx]; out10 /= SKIPSMImagePixelType(56); out11 /= SKIPSMImagePixelType(16); da.set(cf(da(dx), out10), dx); da.set(cf(da(dxx), out11), dxx); }
72539 } else {
72540 out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out01 = sc0a[srcx]; out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out11 = sc0b[srcx]; sc1a[srcx] = sc0a[srcx]; sc1b[srcx] = sc0b[srcx]; sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)); sc0b[srcx] = sr0 * 4; out00 += sc0a[srcx]; out01 += sc0a[srcx]; out00 /= SKIPSMImagePixelType(49); out01 /= SKIPSMImagePixelType(14); da.set(cf(da(dx), out00), dx); da.set(cf(da(dxx), out01), dxx); if ((dst_w & 1) == 0) { ++dx.x; ++dxx.x; out10 += sc0b[srcx]; out11 += sc0b[srcx]; out10 /= SKIPSMImagePixelType(28); out11 /= SKIPSMImagePixelType(8); da.set(cf(da(dx), out10), dx); da.set(cf(da(dxx), out11), dxx); }
72541 }
72542 }
72543 else {
72544
72545 out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out01 = sc0a[srcx]; out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out11 = sc0b[srcx]; sc1a[srcx] = sc0a[srcx]; sc1b[srcx] = sc0b[srcx]; sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)); sc0b[srcx] = sr0 * 4; out00 += sc0a[srcx]; out01 += sc0a[srcx]; out00 /= SKIPSMImagePixelType(42); out01 /= SKIPSMImagePixelType(12); da.set(cf(da(dx), out00), dx); da.set(cf(da(dxx), out01), dxx); if ((dst_w & 1) == 0) { ++dx.x; ++dxx.x; out10 += sc0b[srcx]; out11 += sc0b[srcx]; out10 /= SKIPSMImagePixelType(28); out11 /= SKIPSMImagePixelType(8); da.set(cf(da(dx), out10), dx); da.set(cf(da(dxx), out11), dxx); }
72546 }
72547
72548 }
72549 else {
72550
72551
72552 srcx = 0;
72553 sr0 = SKIPSMImageZero;
72554 sr1 = SKIPSMImageZero;
72555
72556 dx = dy;
72557 dxx = dyy;
72558
72559 if (src_w > 1) {
72560
72561 srcx = 1;
72562 if (wraparound) {
72563 out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out00 /= SKIPSMImagePixelType(48); out10 /= SKIPSMImagePixelType(48); da.set(cf(da(dx), out00), dx); ++dx.x; da.set(cf(da(dx), out10), dx); ++dx.x; if ((dst_h & 1) == 0) { out01 = sc0a[srcx]; out11 = sc0b[srcx]; out01 /= SKIPSMImagePixelType(8); out11 /= SKIPSMImagePixelType(8); da.set(cf(da(dxx), out01), dxx); ++dxx.x; da.set(cf(da(dxx), out11), dxx); ++dxx.x; }
72564 } else {
72565 out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out00 /= SKIPSMImagePixelType(42); out10 /= SKIPSMImagePixelType(48); da.set(cf(da(dx), out00), dx); ++dx.x; da.set(cf(da(dx), out10), dx); ++dx.x; if ((dst_h & 1) == 0) { out01 = sc0a[srcx]; out11 = sc0b[srcx]; out01 /= SKIPSMImagePixelType(7); out11 /= SKIPSMImagePixelType(8); da.set(cf(da(dxx), out01), dxx); ++dxx.x; da.set(cf(da(dxx), out11), dxx); ++dxx.x; }
72566 }
72567
72568
72569 for (srcx = 2; srcx < src_w; ++srcx) {
72570 out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out00 /= SKIPSMImagePixelType(48); out10 /= SKIPSMImagePixelType(48); da.set(cf(da(dx), out00), dx); ++dx.x; da.set(cf(da(dx), out10), dx); ++dx.x; if ((dst_h & 1) == 0) { out01 = sc0a[srcx]; out11 = sc0b[srcx]; out01 /= SKIPSMImagePixelType(8); out11 /= SKIPSMImagePixelType(8); da.set(cf(da(dxx), out01), dxx); ++dxx.x; da.set(cf(da(dxx), out11), dxx); ++dxx.x; }
72571 }
72572
72573
72574 if (wraparound) {
72575 out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out00 /= SKIPSMImagePixelType(48); da.set(cf(da(dx), out00), dx); if ((dst_w & 1) == 0) { out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out10 /= SKIPSMImagePixelType(48); ++dx.x; da.set(cf(da(dx), out10), dx); } if ((dst_h & 1) == 0) { out01 = sc0a[srcx]; out01 /= SKIPSMImagePixelType(8); da.set(cf(da(dxx), out01), dxx); if ((dst_w & 1) == 0) { out11 = sc0b[srcx]; out11 /= SKIPSMImagePixelType(8); ++dxx.x; da.set(cf(da(dxx), out11), dxx); } }
72576 } else {
72577 out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out00 /= SKIPSMImagePixelType(42); da.set(cf(da(dx), out00), dx); if ((dst_w & 1) == 0) { out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out10 /= SKIPSMImagePixelType(24); ++dx.x; da.set(cf(da(dx), out10), dx); } if ((dst_h & 1) == 0) { out01 = sc0a[srcx]; out01 /= SKIPSMImagePixelType(7); da.set(cf(da(dxx), out01), dxx); if ((dst_w & 1) == 0) { out11 = sc0b[srcx]; out11 /= SKIPSMImagePixelType(4); ++dxx.x; da.set(cf(da(dxx), out11), dxx); } }
72578 }
72579 }
72580 else {
72581
72582
72583 out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out00 /= SKIPSMImagePixelType(36); da.set(cf(da(dx), out00), dx); if ((dst_w & 1) == 0) { out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out10 /= SKIPSMImagePixelType(24); ++dx.x; da.set(cf(da(dx), out10), dx); } if ((dst_h & 1) == 0) { out01 = sc0a[srcx]; out01 /= SKIPSMImagePixelType(6); da.set(cf(da(dxx), out01), dxx); if ((dst_w & 1) == 0) { out11 = sc0b[srcx]; out11 /= SKIPSMImagePixelType(4); ++dxx.x; da.set(cf(da(dxx), out11), dxx); } }
72584 }
72585
72586 delete[] sc0a;
72587 delete[] sc0b;
72588 delete[] sc1a;
72589 delete[] sc1b;
72590
72591 return;
72592 }
72593
72594
72595
72596 dy.y += 2;
72597 dyy.y += 2;
72598
72599 srcy = 2;
72600 ++sy.y;
72601
72602
72603 for (srcy = 2, sx = sy; srcy < src_h; ++srcy, ++sy.y, dy.y += 2, dyy.y += 2) {
72604
72605 srcx = 0;
72606 sx = sy;
72607 sr0 = SKIPSMImagePixelType(sa(sx));
72608 if (wraparound) {
72609 sr1 = SKIPSMImagePixelType(sa(sy, Diff2D(src_w-1,0)));
72610 } else {
72611 sr1 = SKIPSMImageZero;
72612 }
72613
72614
72615 srcx = 1;
72616 ++sx.x;
72617 dx = dy;
72618 dxx = dyy;
72619
72620
72621 if (src_w > 1) {
72622 if (wraparound) {
72623 current = SKIPSMImagePixelType(sa(sx)); out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out01 = sc0a[srcx]; out11 = sc0b[srcx]; sc1a[srcx] = sc0a[srcx]; sc1b[srcx] = sc0b[srcx]; sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)) + current; sc0b[srcx] = (sr0 + current) * 4; sr1 = sr0; sr0 = current; out00 += sc0a[srcx]; out10 += sc0b[srcx]; out01 += sc0a[srcx]; out11 += sc0b[srcx]; out00 /= 64; out10 /= 64; out01 /= 16; out11 /= 16; da.set(cf(SKIPSMImagePixelType(da(dx)), out00), dx); ++dx.x; da.set(cf(SKIPSMImagePixelType(da(dx)), out10), dx); ++dx.x; da.set(cf(SKIPSMImagePixelType(da(dxx)), out01), dxx); ++dxx.x; da.set(cf(SKIPSMImagePixelType(da(dxx)), out11), dxx); ++dxx.x;
72624 } else {
72625 current = SKIPSMImagePixelType(sa(sx)); out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out01 = sc0a[srcx]; out11 = sc0b[srcx]; sc1a[srcx] = sc0a[srcx]; sc1b[srcx] = sc0b[srcx]; sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)) + current; sc0b[srcx] = (sr0 + current) * 4; sr1 = sr0; sr0 = current; out00 += sc0a[srcx]; out10 += sc0b[srcx]; out01 += sc0a[srcx]; out11 += sc0b[srcx]; out00 /= SKIPSMImagePixelType(56); out10 /= SKIPSMImagePixelType(64); out01 /= SKIPSMImagePixelType(14); out11 /= SKIPSMImagePixelType(16); da.set(cf(SKIPSMImagePixelType(da(dx)), out00), dx); ++dx.x; da.set(cf(SKIPSMImagePixelType(da(dx)), out10), dx); ++dx.x; da.set(cf(SKIPSMImagePixelType(da(dxx)), out01), dxx); ++dxx.x; da.set(cf(SKIPSMImagePixelType(da(dxx)), out11), dxx); ++dxx.x;
72626 }
72627
72628
72629 for (srcx = 2, ++sx.x; srcx < src_w; ++srcx, ++sx.x) {
72630
72631 current = SKIPSMImagePixelType(sa(sx)); out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out01 = sc0a[srcx]; out11 = sc0b[srcx]; sc1a[srcx] = sc0a[srcx]; sc1b[srcx] = sc0b[srcx]; sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)) + current; sc0b[srcx] = (sr0 + current) * 4; sr1 = sr0; sr0 = current; out00 += sc0a[srcx]; out10 += sc0b[srcx]; out01 += sc0a[srcx]; out11 += sc0b[srcx]; out00 /= 64; out10 /= 64; out01 /= 16; out11 /= 16; da.set(cf(SKIPSMImagePixelType(da(dx)), out00), dx); ++dx.x; da.set(cf(SKIPSMImagePixelType(da(dx)), out10), dx); ++dx.x; da.set(cf(SKIPSMImagePixelType(da(dxx)), out01), dxx); ++dxx.x; da.set(cf(SKIPSMImagePixelType(da(dxx)), out11), dxx); ++dxx.x;
72632 }
72633
72634
72635 if (wraparound) {
72636 out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out01 = sc0a[srcx]; out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out11 = sc0b[srcx]; sc1a[srcx] = sc0a[srcx]; sc1b[srcx] = sc0b[srcx]; sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)) + SKIPSMImagePixelType(sa(sy)); sc0b[srcx] = (sr0 + SKIPSMImagePixelType(sa(sy))) * 4; out00 += sc0a[srcx]; out01 += sc0a[srcx]; out00 /= SKIPSMImagePixelType(64); out01 /= SKIPSMImagePixelType(16); da.set(cf(da(dx), out00), dx); da.set(cf(da(dxx), out01), dxx); if ((dst_w & 1) == 0) { ++dx.x; ++dxx.x; out10 += sc0b[srcx]; out11 += sc0b[srcx]; out10 /= SKIPSMImagePixelType(64); out11 /= SKIPSMImagePixelType(16); da.set(cf(da(dx), out10), dx); da.set(cf(da(dxx), out11), dxx); }
72637 } else {
72638 out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out01 = sc0a[srcx]; out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out11 = sc0b[srcx]; sc1a[srcx] = sc0a[srcx]; sc1b[srcx] = sc0b[srcx]; sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)); sc0b[srcx] = sr0 * 4; out00 += sc0a[srcx]; out01 += sc0a[srcx]; out00 /= SKIPSMImagePixelType(56); out01 /= SKIPSMImagePixelType(14); da.set(cf(da(dx), out00), dx); da.set(cf(da(dxx), out01), dxx); if ((dst_w & 1) == 0) { ++dx.x; ++dxx.x; out10 += sc0b[srcx]; out11 += sc0b[srcx]; out10 /= SKIPSMImagePixelType(32); out11 /= SKIPSMImagePixelType(8); da.set(cf(da(dx), out10), dx); da.set(cf(da(dxx), out11), dxx); }
72639 }
72640 }
72641 else {
72642
72643
72644
72645 out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out01 = sc0a[srcx]; out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out11 = sc0b[srcx]; sc1a[srcx] = sc0a[srcx]; sc1b[srcx] = sc0b[srcx]; sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)); sc0b[srcx] = sr0 * 4; out00 += sc0a[srcx]; out01 += sc0a[srcx]; out00 /= SKIPSMImagePixelType(48); out01 /= SKIPSMImagePixelType(12); da.set(cf(da(dx), out00), dx); da.set(cf(da(dxx), out01), dxx); if ((dst_w & 1) == 0) { ++dx.x; ++dxx.x; out10 += sc0b[srcx]; out11 += sc0b[srcx]; out10 /= SKIPSMImagePixelType(32); out11 /= SKIPSMImagePixelType(8); da.set(cf(da(dx), out10), dx); da.set(cf(da(dxx), out11), dxx); }
72646 }
72647 }
72648
72649
72650 {
72651 srcx = 0;
72652 sr0 = SKIPSMImageZero;
72653 sr1 = SKIPSMImageZero;
72654
72655 dx = dy;
72656 dxx = dyy;
72657
72658 if (src_w > 1) {
72659
72660 srcx = 1;
72661 if (wraparound) {
72662 out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out00 /= SKIPSMImagePixelType(56); out10 /= SKIPSMImagePixelType(56); da.set(cf(da(dx), out00), dx); ++dx.x; da.set(cf(da(dx), out10), dx); ++dx.x; if ((dst_h & 1) == 0) { out01 = sc0a[srcx]; out11 = sc0b[srcx]; out01 /= SKIPSMImagePixelType(8); out11 /= SKIPSMImagePixelType(8); da.set(cf(da(dxx), out01), dxx); ++dxx.x; da.set(cf(da(dxx), out11), dxx); ++dxx.x; }
72663 } else {
72664 out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out00 /= SKIPSMImagePixelType(49); out10 /= SKIPSMImagePixelType(56); da.set(cf(da(dx), out00), dx); ++dx.x; da.set(cf(da(dx), out10), dx); ++dx.x; if ((dst_h & 1) == 0) { out01 = sc0a[srcx]; out11 = sc0b[srcx]; out01 /= SKIPSMImagePixelType(7); out11 /= SKIPSMImagePixelType(8); da.set(cf(da(dxx), out01), dxx); ++dxx.x; da.set(cf(da(dxx), out11), dxx); ++dxx.x; }
72665 }
72666
72667
72668 for (srcx = 2; srcx < src_w; ++srcx) {
72669 out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out00 /= SKIPSMImagePixelType(56); out10 /= SKIPSMImagePixelType(56); da.set(cf(da(dx), out00), dx); ++dx.x; da.set(cf(da(dx), out10), dx); ++dx.x; if ((dst_h & 1) == 0) { out01 = sc0a[srcx]; out11 = sc0b[srcx]; out01 /= SKIPSMImagePixelType(8); out11 /= SKIPSMImagePixelType(8); da.set(cf(da(dxx), out01), dxx); ++dxx.x; da.set(cf(da(dxx), out11), dxx); ++dxx.x; }
72670 }
72671
72672
72673 if (wraparound) {
72674 out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out00 /= SKIPSMImagePixelType(56); da.set(cf(da(dx), out00), dx); if ((dst_w & 1) == 0) { out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out10 /= SKIPSMImagePixelType(56); ++dx.x; da.set(cf(da(dx), out10), dx); } if ((dst_h & 1) == 0) { out01 = sc0a[srcx]; out01 /= SKIPSMImagePixelType(8); da.set(cf(da(dxx), out01), dxx); if ((dst_w & 1) == 0) { out11 = sc0b[srcx]; out11 /= SKIPSMImagePixelType(8); ++dxx.x; da.set(cf(da(dxx), out11), dxx); } }
72675 } else {
72676 out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out00 /= SKIPSMImagePixelType(49); da.set(cf(da(dx), out00), dx); if ((dst_w & 1) == 0) { out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out10 /= SKIPSMImagePixelType(28); ++dx.x; da.set(cf(da(dx), out10), dx); } if ((dst_h & 1) == 0) { out01 = sc0a[srcx]; out01 /= SKIPSMImagePixelType(7); da.set(cf(da(dxx), out01), dxx); if ((dst_w & 1) == 0) { out11 = sc0b[srcx]; out11 /= SKIPSMImagePixelType(4); ++dxx.x; da.set(cf(da(dxx), out11), dxx); } }
72677 }
72678 }
72679 else {
72680
72681
72682 out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out00 /= SKIPSMImagePixelType(42); da.set(cf(da(dx), out00), dx); if ((dst_w & 1) == 0) { out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out10 /= SKIPSMImagePixelType(28); ++dx.x; da.set(cf(da(dx), out10), dx); } if ((dst_h & 1) == 0) { out01 = sc0a[srcx]; out01 /= SKIPSMImagePixelType(6); da.set(cf(da(dxx), out01), dxx); if ((dst_w & 1) == 0) { out11 = sc0b[srcx]; out11 /= SKIPSMImagePixelType(4); ++dxx.x; da.set(cf(da(dxx), out11), dxx); } }
72683 }
72684 }
72685
72686 delete[] sc0a;
72687 delete[] sc0b;
72688 delete[] sc1a;
72689 delete[] sc1b;
72690
72691 };
72692
72693
72694
72695
72696 template<typename T1, typename T2, typename T3>
72697 struct FromPromotePlusFunctorWrapper : public std::binary_function<T1, T2, T3> {
72698 inline T3 operator()(const T1 &a, const T2 &b) const {
72699 return NumericTraits<T3>::fromPromote(a + b);
72700 }
72701 };
72702
72703
72704 template <typename SKIPSMImagePixelType,
72705 typename SrcImageIterator, typename SrcAccessor,
72706 typename DestImageIterator, typename DestAccessor>
72707 inline void expand(bool add, bool wraparound,
72708 triple<SrcImageIterator, SrcImageIterator, SrcAccessor> src,
72709 triple<DestImageIterator, DestImageIterator, DestAccessor> dest) {
72710
72711 typedef typename DestAccessor::value_type DestPixelType;
72712
72713 if (add) {
72714 expand<SKIPSMImagePixelType>(add, wraparound,
72715 src.first, src.second, src.third,
72716 dest.first, dest.second, dest.third,
72717 FromPromotePlusFunctorWrapper<DestPixelType, SKIPSMImagePixelType, DestPixelType>());
72718 }
72719 else {
72720 expand<SKIPSMImagePixelType>(add, wraparound,
72721 src.first, src.second, src.third,
72722 dest.first, dest.second, dest.third,
72723 std::minus<SKIPSMImagePixelType>());
72724 }
72725
72726 };
72727
72728
72729 template <typename SrcImageType, typename AlphaImageType, typename PyramidImageType,
72730 int PyramidIntegerBits, int PyramidFractionBits,
72731 typename SKIPSMImagePixelType, typename SKIPSMAlphaPixelType>
72732 vector<PyramidImageType*> *gaussianPyramid(unsigned int numLevels,
72733 bool wraparound,
72734 typename SrcImageType::const_traverser src_upperleft,
72735 typename SrcImageType::const_traverser src_lowerright,
72736 typename SrcImageType::ConstAccessor sa,
72737 typename AlphaImageType::const_traverser alpha_upperleft,
72738 typename AlphaImageType::ConstAccessor aa) {
72739
72740 vector<PyramidImageType*> *gp = new vector<PyramidImageType*>();
72741
72742
72743 int w = src_lowerright.x - src_upperleft.x;
72744 int h = src_lowerright.y - src_upperleft.y;
72745
72746
72747 PyramidImageType *gp0 = new PyramidImageType(w, h);
72748
72749
72750 copyToPyramidImage<SrcImageType, PyramidImageType, PyramidIntegerBits, PyramidFractionBits>(
72751 src_upperleft, src_lowerright, sa, gp0->upperLeft(), gp0->accessor());
72752
72753 gp->push_back(gp0);
72754
72755 if (Verbose > 0) {
72756 cout << "Generating Gaussian pyramid: g0";
72757 }
72758
72759
72760 PyramidImageType *lastGP = gp0;
72761 AlphaImageType *lastA = __null;
72762 for (unsigned int l = 1; l < numLevels; l++) {
72763
72764 if (Verbose > 0) {
72765 cout << " g" << l;
72766 cout.flush();
72767 }
72768
72769
72770 w = (w + 1) >> 1;
72771 h = (h + 1) >> 1;
72772
72773
72774 PyramidImageType *gpn = new PyramidImageType(w, h);
72775 AlphaImageType *nextA = new AlphaImageType(w, h);
72776
72777 if (lastA == __null) {
72778 reduce<SKIPSMImagePixelType, SKIPSMAlphaPixelType>(wraparound,
72779 srcImageRange(*lastGP), maskIter(alpha_upperleft, aa),
72780 destImageRange(*gpn), destImageRange(*nextA));
72781 } else {
72782 reduce<SKIPSMImagePixelType, SKIPSMAlphaPixelType>(wraparound,
72783 srcImageRange(*lastGP), maskImage(*lastA),
72784 destImageRange(*gpn), destImageRange(*nextA));
72785 }
72786
72787 gp->push_back(gpn);
72788 lastGP = gpn;
72789 delete lastA;
72790 lastA = nextA;
72791 }
72792
72793 delete lastA;
72794
72795 if (Verbose > 0) {
72796 cout << endl;
72797 }
72798
72799 return gp;
72800
72801 };
72802
72803
72804 template <typename SrcImageType, typename AlphaImageType, typename PyramidImageType,
72805 int PyramidIntegerBits, int PyramidFractionBits,
72806 typename SKIPSMImagePixelType, typename SKIPSMAlphaPixelType>
72807 inline vector<PyramidImageType*> *gaussianPyramid(unsigned int numLevels,
72808 bool wraparound,
72809 triple<typename SrcImageType::const_traverser, typename SrcImageType::const_traverser, typename SrcImageType::ConstAccessor> src,
72810 pair<typename AlphaImageType::const_traverser, typename AlphaImageType::ConstAccessor> alpha) {
72811 return gaussianPyramid<SrcImageType, AlphaImageType, PyramidImageType,
72812 PyramidIntegerBits, PyramidFractionBits,
72813 SKIPSMImagePixelType, SKIPSMAlphaPixelType>(
72814 numLevels, wraparound,
72815 src.first, src.second, src.third,
72816 alpha.first, alpha.second);
72817 };
72818
72819
72820 template <typename SrcImageType, typename PyramidImageType,
72821 int PyramidIntegerBits, int PyramidFractionBits,
72822 typename SKIPSMImagePixelType>
72823 vector<PyramidImageType*> *gaussianPyramid(unsigned int numLevels,
72824 bool wraparound,
72825 typename SrcImageType::const_traverser src_upperleft,
72826 typename SrcImageType::const_traverser src_lowerright,
72827 typename SrcImageType::ConstAccessor sa) {
72828
72829 vector<PyramidImageType*> *gp = new vector<PyramidImageType*>();
72830
72831
72832 int w = src_lowerright.x - src_upperleft.x;
72833 int h = src_lowerright.y - src_upperleft.y;
72834
72835
72836 PyramidImageType *gp0 = new PyramidImageType(w, h);
72837
72838
72839 copyToPyramidImage<SrcImageType, PyramidImageType, PyramidIntegerBits, PyramidFractionBits>(
72840 src_upperleft, src_lowerright, sa,
72841 gp0->upperLeft(), gp0->accessor());
72842
72843 gp->push_back(gp0);
72844
72845 if (Verbose > 0) {
72846 cout << "Generating Gaussian pyramid: g0";
72847 }
72848
72849
72850 PyramidImageType *lastGP = gp0;
72851 for (unsigned int l = 1; l < numLevels; l++) {
72852
72853 if (Verbose > 0) {
72854 cout << " g" << l;
72855 cout.flush();
72856 }
72857
72858
72859 w = (w + 1) >> 1;
72860 h = (h + 1) >> 1;
72861
72862
72863 PyramidImageType *gpn = new PyramidImageType(w, h);
72864
72865 reduce<SKIPSMImagePixelType>(wraparound, srcImageRange(*lastGP), destImageRange(*gpn));
72866
72867 gp->push_back(gpn);
72868 lastGP = gpn;
72869 }
72870
72871 if (Verbose > 0) {
72872 cout << endl;
72873 }
72874
72875 return gp;
72876 };
72877
72878
72879 template <typename SrcImageType, typename PyramidImageType,
72880 int PyramidIntegerBits, int PyramidFractionBits,
72881 typename SKIPSMImagePixelType>
72882 inline vector<PyramidImageType*> *gaussianPyramid(unsigned int numLevels,
72883 bool wraparound,
72884 triple<typename SrcImageType::const_traverser, typename SrcImageType::const_traverser, typename SrcImageType::ConstAccessor> src) {
72885 return gaussianPyramid<SrcImageType, PyramidImageType,
72886 PyramidIntegerBits, PyramidFractionBits, SKIPSMImagePixelType>(
72887 numLevels,
72888 wraparound,
72889 src.first, src.second, src.third);
72890 };
72891
72892
72893 template <typename SrcImageType, typename AlphaImageType, typename PyramidImageType,
72894 int PyramidIntegerBits, int PyramidFractionBits,
72895 typename SKIPSMImagePixelType, typename SKIPSMAlphaPixelType>
72896 vector<PyramidImageType*> *laplacianPyramid(const char* exportName, unsigned int numLevels,
72897 bool wraparound,
72898 typename SrcImageType::const_traverser src_upperleft,
72899 typename SrcImageType::const_traverser src_lowerright,
72900 typename SrcImageType::ConstAccessor sa,
72901 typename AlphaImageType::const_traverser alpha_upperleft,
72902 typename AlphaImageType::ConstAccessor aa) {
72903
72904
72905 vector <PyramidImageType*> *gp =
72906 gaussianPyramid<SrcImageType, AlphaImageType, PyramidImageType,
72907 PyramidIntegerBits, PyramidFractionBits,
72908 SKIPSMImagePixelType, SKIPSMAlphaPixelType>(
72909 numLevels, wraparound,
72910 src_upperleft, src_lowerright, sa,
72911 alpha_upperleft, aa);
72912
72913
72914
72915 if (Verbose > 0) {
72916 cout << "Generating Laplacian pyramid:";
72917 cout.flush();
72918 }
72919
72920
72921
72922 for (unsigned int l = 0; l < (numLevels-1); l++) {
72923
72924 if (Verbose > 0) {
72925 cout << " l" << l;
72926 cout.flush();
72927 }
72928
72929 expand<SKIPSMImagePixelType>(false, wraparound,
72930 srcImageRange(*((*gp)[l+1])),
72931 destImageRange(*((*gp)[l])));
72932 }
72933
72934 if (Verbose > 0) {
72935 cout << " l" << (numLevels-1) << endl;
72936 }
72937
72938
72939
72940 return gp;
72941 };
72942
72943
72944 template <typename SrcImageType, typename AlphaImageType, typename PyramidImageType,
72945 int PyramidIntegerBits, int PyramidFractionBits,
72946 typename SKIPSMImagePixelType, typename SKIPSMAlphaPixelType>
72947 inline vector<PyramidImageType*> *laplacianPyramid(const char* exportName, unsigned int numLevels,
72948 bool wraparound,
72949 triple<typename SrcImageType::const_traverser, typename SrcImageType::const_traverser, typename SrcImageType::ConstAccessor> src,
72950 pair<typename AlphaImageType::const_traverser, typename AlphaImageType::ConstAccessor> alpha) {
72951 return laplacianPyramid<SrcImageType, AlphaImageType, PyramidImageType,
72952 PyramidIntegerBits, PyramidFractionBits,
72953 SKIPSMImagePixelType, SKIPSMAlphaPixelType>(
72954 exportName,
72955 numLevels, wraparound,
72956 src.first, src.second, src.third,
72957 alpha.first, alpha.second);
72958 };
72959
72960
72961 template <typename SKIPSMImagePixelType, typename PyramidImageType>
72962 void collapsePyramid(bool wraparound, vector<PyramidImageType*> *p) {
72963
72964 if (Verbose > 0) {
72965 cout << "Collapsing Laplacian pyramid: "
72966 << "l" << p->size()-1;
72967 cout.flush();
72968 }
72969
72970
72971
72972 for (int l = (p->size()-2); l >= 0; l--) {
72973
72974 if (Verbose > 0) {
72975 cout << " l" << l;
72976 cout.flush();
72977 }
72978
72979 expand<SKIPSMImagePixelType>(true, wraparound,
72980 srcImageRange(*((*p)[l+1])),
72981 destImageRange(*((*p)[l])));
72982 }
72983
72984 if (Verbose > 0) {
72985 cout << endl;
72986 }
72987
72988 };
72989
72990
72991 template <typename PyramidImageType>
72992 void exportPyramid(vector<PyramidImageType*> *v, const char *prefix, VigraTrueType) {
72993 typedef typename PyramidImageType::value_type PyramidValueType;
72994
72995
72996
72997
72998
72999
73000
73001 for (unsigned int i = 0; i < v->size(); i++) {
73002 char filenameBuf[512];
73003 snprintf(filenameBuf, 512, "%s%04u.tif", prefix, i);
73004
73005
73006 UInt16Image usPyramid((*v)[i]->width(), (*v)[i]->height());
73007 transformImage(srcImageRange(*((*v)[i])), destImage(usPyramid),
73008 linearRangeMapping(NumericTraits<PyramidValueType>::min(),
73009 NumericTraits<PyramidValueType>::max(),
73010 NumericTraits<UInt16>::min(),
73011 NumericTraits<UInt16>::max()));
73012
73013 ImageExportInfo info(filenameBuf);
73014 exportImage(srcImageRange(usPyramid), info);
73015 }
73016 };
73017
73018
73019 template <typename PyramidImageType>
73020 void exportPyramid(vector<PyramidImageType*> *v, const char *prefix, VigraFalseType) {
73021 typedef typename PyramidImageType::value_type PyramidVectorType;
73022 typedef typename PyramidVectorType::value_type PyramidValueType;
73023
73024 for (unsigned int i = 0; i < (v->size() - 1); i++) {
73025
73026 initImage(destImageRange(*((*v)[i])), NumericTraits<PyramidValueType>::zero());
73027 }
73028 collapsePyramid(false, v);
73029
73030 for (unsigned int i = 0; i < v->size(); i++) {
73031 char filenameBuf[512];
73032 snprintf(filenameBuf, 512, "%s%04u.tif", prefix, i);
73033
73034
73035 UInt16RGBImage usPyramid((*v)[i]->width(), (*v)[i]->height());
73036 transformImage(srcImageRange(*((*v)[i])), destImage(usPyramid),
73037 linearRangeMapping(PyramidVectorType(NumericTraits<PyramidValueType>::min()),
73038 PyramidVectorType(NumericTraits<PyramidValueType>::max()),
73039 typename UInt16RGBImage::value_type(NumericTraits<UInt16>::min()),
73040 typename UInt16RGBImage::value_type(NumericTraits<UInt16>::max())));
73041
73042 ImageExportInfo info(filenameBuf);
73043 exportImage(srcImageRange(usPyramid), info);
73044 }
73045 };
73046
73047
73048 template <typename PyramidImageType>
73049 void exportPyramid(vector<PyramidImageType*> *v, const char *prefix) {
73050 typedef typename NumericTraits<typename PyramidImageType::value_type>::isScalar pyramid_is_scalar;
73051 exportPyramid(v, prefix, pyramid_is_scalar());
73052 };
73053
73054 }
73055 # 29 "bounds.h" 2
73056
73057 using std::cerr;
73058 using std::cout;
73059 using std::endl;
73060 using std::min;
73061
73062 using vigra::Point2D;
73063
73064 namespace enblend {
73065
73066
73067
73068
73069
73070
73071 template <typename SrcImageIterator, typename SrcAccessor>
73072 Overlap inspectOverlap(
73073 SrcImageIterator src1_upperleft,
73074 SrcImageIterator src1_lowerright,
73075 SrcAccessor s1a,
73076 SrcImageIterator src2_upperleft,
73077 SrcAccessor s2a) {
73078
73079 SrcImageIterator s1y = src1_upperleft;
73080 SrcImageIterator s2y = src2_upperleft;
73081 SrcImageIterator send = src1_lowerright;
73082
73083 bool foundOverlap = false;
73084 bool foundDistinctS2 = false;
73085
73086 for (; s1y.y < send.y; ++s1y.y, ++s2y.y) {
73087
73088 SrcImageIterator s1x = s1y;
73089 SrcImageIterator s2x = s2y;
73090
73091 for (; s1x.x < send.x; ++s1x.x, ++s2x.x) {
73092 if (s1a(s1x) && s2a(s2x)) {
73093 foundOverlap = true;
73094 } else if (s2a(s2x)) {
73095 foundDistinctS2 = true;
73096 }
73097 if (foundOverlap && foundDistinctS2) {
73098
73099
73100
73101 return PartialOverlap;
73102 }
73103 }
73104 }
73105
73106 if (foundOverlap) {
73107 return CompleteOverlap;
73108 } else {
73109 return NoOverlap;
73110 }
73111
73112 };
73113
73114
73115 template <typename SrcImageIterator, typename SrcAccessor>
73116 Overlap inspectOverlap(
73117 triple<SrcImageIterator, SrcImageIterator, SrcAccessor> src1,
73118 pair<SrcImageIterator, SrcAccessor> src2) {
73119 return inspectOverlap(src1.first, src1.second, src1.third,
73120 src2.first, src2.second);
73121 };
73122
73123
73124
73125
73126
73127
73128 template <typename ImagePixelComponentType>
73129 unsigned int roiBounds(const Rect2D &inputUnion,
73130 const Rect2D &iBB,
73131 const Rect2D &mBB,
73132 const Rect2D &uBB,
73133 Rect2D &roiBB,
73134 bool wraparoundForMask) {
73135
73136 unsigned int levels = 1;
73137
73138 if (ExactLevels == 0) {
73139
73140
73141
73142
73143
73144 unsigned int shortDimension = min(iBB.width(), iBB.height());
73145 while (levels < 30) {
73146 unsigned int extent = filterHalfWidth<ImagePixelComponentType>(levels + 1);
73147 if ((2 * extent) > shortDimension) {
73148
73149 break;
73150 }
73151 levels++;
73152 }
73153
73154 if (levels == 1) {
73155 cerr << "enblend: overlap region is too small to make "
73156 << "more than one pyramid level."
73157 << endl;
73158 }
73159
73160 } else {
73161 levels = ExactLevels;
73162 }
73163
73164 unsigned int extent = filterHalfWidth<ImagePixelComponentType>(levels);
73165 roiBB = mBB;
73166 roiBB.addBorder(extent);
73167
73168 if (wraparoundForMask &&
73169 (roiBB.left() < 0 || roiBB.right() > uBB.right())) {
73170
73171
73172
73173
73174 roiBB.setUpperLeft(Point2D(0, roiBB.top()));
73175 roiBB.setLowerRight(Point2D(uBB.right(), roiBB.bottom()));
73176 }
73177
73178
73179 roiBB &= uBB;
73180
73181
73182 unsigned int roiShortDimension = min(roiBB.width(), roiBB.height());
73183 unsigned int allowableLevels;
73184 for (allowableLevels = 1; allowableLevels < levels; allowableLevels++) {
73185 if (roiShortDimension <= 8) {
73186
73187 break;
73188 }
73189 roiShortDimension = (roiShortDimension + 1) >> 1;
73190 }
73191
73192 if (allowableLevels < ExactLevels) {
73193 cerr << "enblend: image geometry precludes using more than "
73194 << allowableLevels
73195 << " levels." << endl;
73196 }
73197
73198 if (Verbose > 0) {
73199 cout << "Using " << allowableLevels << " blending levels" << endl;
73200 }
73201 if (Verbose > 1) {
73202 cout << "Region of Interest bounding box: " << roiBB << endl;
73203 }
73204
73205 return allowableLevels;
73206 }
73207
73208 }
73209 # 39 "enblend.h" 2
73210 # 1 "mask.h" 1
73211 # 24 "mask.h"
73212 # 1 "../config.h" 1
73213 # 25 "mask.h" 2
73214
73215
73216
73217
73218
73219
73220 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/slist" 1 3
73221 # 58 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/slist" 3
73222 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
73223
73224 using std::size_t;
73225 using std::ptrdiff_t;
73226 using std::_Construct;
73227 using std::_Destroy;
73228 using std::allocator;
73229 using std::__true_type;
73230 using std::__false_type;
73231
73232 struct _Slist_node_base
73233 {
73234 _Slist_node_base* _M_next;
73235 };
73236
73237 inline _Slist_node_base*
73238 __slist_make_link(_Slist_node_base* __prev_node,
73239 _Slist_node_base* __new_node)
73240 {
73241 __new_node->_M_next = __prev_node->_M_next;
73242 __prev_node->_M_next = __new_node;
73243 return __new_node;
73244 }
73245
73246 inline _Slist_node_base*
73247 __slist_previous(_Slist_node_base* __head,
73248 const _Slist_node_base* __node)
73249 {
73250 while (__head && __head->_M_next != __node)
73251 __head = __head->_M_next;
73252 return __head;
73253 }
73254
73255 inline const _Slist_node_base*
73256 __slist_previous(const _Slist_node_base* __head,
73257 const _Slist_node_base* __node)
73258 {
73259 while (__head && __head->_M_next != __node)
73260 __head = __head->_M_next;
73261 return __head;
73262 }
73263
73264 inline void
73265 __slist_splice_after(_Slist_node_base* __pos,
73266 _Slist_node_base* __before_first,
73267 _Slist_node_base* __before_last)
73268 {
73269 if (__pos != __before_first && __pos != __before_last)
73270 {
73271 _Slist_node_base* __first = __before_first->_M_next;
73272 _Slist_node_base* __after = __pos->_M_next;
73273 __before_first->_M_next = __before_last->_M_next;
73274 __pos->_M_next = __first;
73275 __before_last->_M_next = __after;
73276 }
73277 }
73278
73279 inline void
73280 __slist_splice_after(_Slist_node_base* __pos, _Slist_node_base* __head)
73281 {
73282 _Slist_node_base* __before_last = __slist_previous(__head, 0);
73283 if (__before_last != __head)
73284 {
73285 _Slist_node_base* __after = __pos->_M_next;
73286 __pos->_M_next = __head->_M_next;
73287 __head->_M_next = 0;
73288 __before_last->_M_next = __after;
73289 }
73290 }
73291
73292 inline _Slist_node_base*
73293 __slist_reverse(_Slist_node_base* __node)
73294 {
73295 _Slist_node_base* __result = __node;
73296 __node = __node->_M_next;
73297 __result->_M_next = 0;
73298 while(__node)
73299 {
73300 _Slist_node_base* __next = __node->_M_next;
73301 __node->_M_next = __result;
73302 __result = __node;
73303 __node = __next;
73304 }
73305 return __result;
73306 }
73307
73308 inline size_t
73309 __slist_size(_Slist_node_base* __node)
73310 {
73311 size_t __result = 0;
73312 for (; __node != 0; __node = __node->_M_next)
73313 ++__result;
73314 return __result;
73315 }
73316
73317 template <class _Tp>
73318 struct _Slist_node : public _Slist_node_base
73319 {
73320 _Tp _M_data;
73321 };
73322
73323 struct _Slist_iterator_base
73324 {
73325 typedef size_t size_type;
73326 typedef ptrdiff_t difference_type;
73327 typedef std::forward_iterator_tag iterator_category;
73328
73329 _Slist_node_base* _M_node;
73330
73331 _Slist_iterator_base(_Slist_node_base* __x)
73332 : _M_node(__x) {}
73333
73334 void
73335 _M_incr()
73336 { _M_node = _M_node->_M_next; }
73337
73338 bool
73339 operator==(const _Slist_iterator_base& __x) const
73340 { return _M_node == __x._M_node; }
73341
73342 bool
73343 operator!=(const _Slist_iterator_base& __x) const
73344 { return _M_node != __x._M_node; }
73345 };
73346
73347 template <class _Tp, class _Ref, class _Ptr>
73348 struct _Slist_iterator : public _Slist_iterator_base
73349 {
73350 typedef _Slist_iterator<_Tp, _Tp&, _Tp*> iterator;
73351 typedef _Slist_iterator<_Tp, const _Tp&, const _Tp*> const_iterator;
73352 typedef _Slist_iterator<_Tp, _Ref, _Ptr> _Self;
73353
73354 typedef _Tp value_type;
73355 typedef _Ptr pointer;
73356 typedef _Ref reference;
73357 typedef _Slist_node<_Tp> _Node;
73358
73359 explicit
73360 _Slist_iterator(_Node* __x)
73361 : _Slist_iterator_base(__x) {}
73362
73363 _Slist_iterator()
73364 : _Slist_iterator_base(0) {}
73365
73366 _Slist_iterator(const iterator& __x)
73367 : _Slist_iterator_base(__x._M_node) {}
73368
73369 reference
73370 operator*() const
73371 { return ((_Node*) _M_node)->_M_data; }
73372
73373 pointer
73374 operator->() const
73375 { return &(operator*()); }
73376
73377 _Self&
73378 operator++()
73379 {
73380 _M_incr();
73381 return *this;
73382 }
73383
73384 _Self
73385 operator++(int)
73386 {
73387 _Self __tmp = *this;
73388 _M_incr();
73389 return __tmp;
73390 }
73391 };
73392
73393 template <class _Tp, class _Alloc>
73394 struct _Slist_base
73395 : public _Alloc::template rebind<_Slist_node<_Tp> >::other
73396 {
73397 typedef typename _Alloc::template rebind<_Slist_node<_Tp> >::other
73398 _Node_alloc;
73399 typedef _Alloc allocator_type;
73400
73401 allocator_type
73402 get_allocator() const
73403 { return *static_cast<const _Node_alloc*>(this); }
73404
73405 _Slist_base(const allocator_type& __a)
73406 : _Node_alloc(__a)
73407 { this->_M_head._M_next = 0; }
73408
73409 ~_Slist_base()
73410 { _M_erase_after(&this->_M_head, 0); }
73411
73412 protected:
73413 _Slist_node_base _M_head;
73414
73415 _Slist_node<_Tp>*
73416 _M_get_node()
73417 { return _Node_alloc::allocate(1); }
73418
73419 void
73420 _M_put_node(_Slist_node<_Tp>* __p)
73421 { _Node_alloc::deallocate(__p, 1); }
73422
73423 protected:
73424 _Slist_node_base* _M_erase_after(_Slist_node_base* __pos)
73425 {
73426 _Slist_node<_Tp>* __next = (_Slist_node<_Tp>*) (__pos->_M_next);
73427 _Slist_node_base* __next_next = __next->_M_next;
73428 __pos->_M_next = __next_next;
73429 get_allocator().destroy(&__next->_M_data);
73430 _M_put_node(__next);
73431 return __next_next;
73432 }
73433 _Slist_node_base* _M_erase_after(_Slist_node_base*, _Slist_node_base*);
73434 };
73435
73436 template <class _Tp, class _Alloc>
73437 _Slist_node_base*
73438 _Slist_base<_Tp,_Alloc>::_M_erase_after(_Slist_node_base* __before_first,
73439 _Slist_node_base* __last_node)
73440 {
73441 _Slist_node<_Tp>* __cur = (_Slist_node<_Tp>*) (__before_first->_M_next);
73442 while (__cur != __last_node)
73443 {
73444 _Slist_node<_Tp>* __tmp = __cur;
73445 __cur = (_Slist_node<_Tp>*) __cur->_M_next;
73446 get_allocator().destroy(&__tmp->_M_data);
73447 _M_put_node(__tmp);
73448 }
73449 __before_first->_M_next = __last_node;
73450 return __last_node;
73451 }
73452
73453
73454
73455
73456
73457
73458 template <class _Tp, class _Alloc = allocator<_Tp> >
73459 class slist : private _Slist_base<_Tp,_Alloc>
73460 {
73461
73462
73463
73464 private:
73465 typedef _Slist_base<_Tp,_Alloc> _Base;
73466
73467 public:
73468 typedef _Tp value_type;
73469 typedef value_type* pointer;
73470 typedef const value_type* const_pointer;
73471 typedef value_type& reference;
73472 typedef const value_type& const_reference;
73473 typedef size_t size_type;
73474 typedef ptrdiff_t difference_type;
73475
73476 typedef _Slist_iterator<_Tp, _Tp&, _Tp*> iterator;
73477 typedef _Slist_iterator<_Tp, const _Tp&, const _Tp*> const_iterator;
73478
73479 typedef typename _Base::allocator_type allocator_type;
73480
73481 allocator_type
73482 get_allocator() const
73483 { return _Base::get_allocator(); }
73484
73485 private:
73486 typedef _Slist_node<_Tp> _Node;
73487 typedef _Slist_node_base _Node_base;
73488 typedef _Slist_iterator_base _Iterator_base;
73489
73490 _Node*
73491 _M_create_node(const value_type& __x)
73492 {
73493 _Node* __node = this->_M_get_node();
73494 try
73495 {
73496 get_allocator().construct(&__node->_M_data, __x);
73497 __node->_M_next = 0;
73498 }
73499 catch(...)
73500 {
73501 this->_M_put_node(__node);
73502 throw;
73503 }
73504 return __node;
73505 }
73506
73507 _Node*
73508 _M_create_node()
73509 {
73510 _Node* __node = this->_M_get_node();
73511 try
73512 {
73513 get_allocator().construct(&__node->_M_data, value_type());
73514 __node->_M_next = 0;
73515 }
73516 catch(...)
73517 {
73518 this->_M_put_node(__node);
73519 throw;
73520 }
73521 return __node;
73522 }
73523
73524 public:
73525 explicit
73526 slist(const allocator_type& __a = allocator_type())
73527 : _Base(__a) {}
73528
73529 slist(size_type __n, const value_type& __x,
73530 const allocator_type& __a = allocator_type())
73531 : _Base(__a)
73532 { _M_insert_after_fill(&this->_M_head, __n, __x); }
73533
73534 explicit
73535 slist(size_type __n)
73536 : _Base(allocator_type())
73537 { _M_insert_after_fill(&this->_M_head, __n, value_type()); }
73538
73539
73540
73541 template <class _InputIterator>
73542 slist(_InputIterator __first, _InputIterator __last,
73543 const allocator_type& __a = allocator_type())
73544 : _Base(__a)
73545 { _M_insert_after_range(&this->_M_head, __first, __last); }
73546
73547 slist(const slist& __x)
73548 : _Base(__x.get_allocator())
73549 { _M_insert_after_range(&this->_M_head, __x.begin(), __x.end()); }
73550
73551 slist&
73552 operator= (const slist& __x);
73553
73554 ~slist() {}
73555
73556 public:
73557
73558
73559
73560
73561
73562 void
73563 assign(size_type __n, const _Tp& __val)
73564 { _M_fill_assign(__n, __val); }
73565
73566 void
73567 _M_fill_assign(size_type __n, const _Tp& __val);
73568
73569 template <class _InputIterator>
73570 void
73571 assign(_InputIterator __first, _InputIterator __last)
73572 {
73573 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
73574 _M_assign_dispatch(__first, __last, _Integral());
73575 }
73576
73577 template <class _Integer>
73578 void
73579 _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
73580 { _M_fill_assign((size_type) __n, (_Tp) __val); }
73581
73582 template <class _InputIterator>
73583 void
73584 _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
73585 __false_type);
73586
73587 public:
73588
73589 iterator
73590 begin()
73591 { return iterator((_Node*)this->_M_head._M_next); }
73592
73593 const_iterator
73594 begin() const
73595 { return const_iterator((_Node*)this->_M_head._M_next);}
73596
73597 iterator
73598 end()
73599 { return iterator(0); }
73600
73601 const_iterator
73602 end() const
73603 { return const_iterator(0); }
73604 # 448 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/slist" 3
73605 iterator
73606 before_begin()
73607 { return iterator((_Node*) &this->_M_head); }
73608
73609 const_iterator
73610 before_begin() const
73611 { return const_iterator((_Node*) &this->_M_head); }
73612
73613 size_type
73614 size() const
73615 { return __slist_size(this->_M_head._M_next); }
73616
73617 size_type
73618 max_size() const
73619 { return size_type(-1); }
73620
73621 bool
73622 empty() const
73623 { return this->_M_head._M_next == 0; }
73624
73625 void
73626 swap(slist& __x)
73627 { std::swap(this->_M_head._M_next, __x._M_head._M_next); }
73628
73629 public:
73630
73631 reference
73632 front()
73633 { return ((_Node*) this->_M_head._M_next)->_M_data; }
73634
73635 const_reference
73636 front() const
73637 { return ((_Node*) this->_M_head._M_next)->_M_data; }
73638
73639 void
73640 push_front(const value_type& __x)
73641 { __slist_make_link(&this->_M_head, _M_create_node(__x)); }
73642
73643 void
73644 push_front()
73645 { __slist_make_link(&this->_M_head, _M_create_node()); }
73646
73647 void
73648 pop_front()
73649 {
73650 _Node* __node = (_Node*) this->_M_head._M_next;
73651 this->_M_head._M_next = __node->_M_next;
73652 get_allocator().destroy(&__node->_M_data);
73653 this->_M_put_node(__node);
73654 }
73655
73656 iterator
73657 previous(const_iterator __pos)
73658 { return iterator((_Node*) __slist_previous(&this->_M_head,
73659 __pos._M_node)); }
73660
73661 const_iterator
73662 previous(const_iterator __pos) const
73663 { return const_iterator((_Node*) __slist_previous(&this->_M_head,
73664 __pos._M_node)); }
73665
73666 private:
73667 _Node*
73668 _M_insert_after(_Node_base* __pos, const value_type& __x)
73669 { return (_Node*) (__slist_make_link(__pos, _M_create_node(__x))); }
73670
73671 _Node*
73672 _M_insert_after(_Node_base* __pos)
73673 { return (_Node*) (__slist_make_link(__pos, _M_create_node())); }
73674
73675 void
73676 _M_insert_after_fill(_Node_base* __pos,
73677 size_type __n, const value_type& __x)
73678 {
73679 for (size_type __i = 0; __i < __n; ++__i)
73680 __pos = __slist_make_link(__pos, _M_create_node(__x));
73681 }
73682
73683
73684 template <class _InIterator>
73685 void
73686 _M_insert_after_range(_Node_base* __pos,
73687 _InIterator __first, _InIterator __last)
73688 {
73689 typedef typename std::__is_integer<_InIterator>::__type _Integral;
73690 _M_insert_after_range(__pos, __first, __last, _Integral());
73691 }
73692
73693 template <class _Integer>
73694 void
73695 _M_insert_after_range(_Node_base* __pos, _Integer __n, _Integer __x,
73696 __true_type)
73697 { _M_insert_after_fill(__pos, __n, __x); }
73698
73699 template <class _InIterator>
73700 void
73701 _M_insert_after_range(_Node_base* __pos,
73702 _InIterator __first, _InIterator __last,
73703 __false_type)
73704 {
73705 while (__first != __last)
73706 {
73707 __pos = __slist_make_link(__pos, _M_create_node(*__first));
73708 ++__first;
73709 }
73710 }
73711
73712 public:
73713 iterator
73714 insert_after(iterator __pos, const value_type& __x)
73715 { return iterator(_M_insert_after(__pos._M_node, __x)); }
73716
73717 iterator
73718 insert_after(iterator __pos)
73719 { return insert_after(__pos, value_type()); }
73720
73721 void
73722 insert_after(iterator __pos, size_type __n, const value_type& __x)
73723 { _M_insert_after_fill(__pos._M_node, __n, __x); }
73724
73725
73726
73727 template <class _InIterator>
73728 void
73729 insert_after(iterator __pos, _InIterator __first, _InIterator __last)
73730 { _M_insert_after_range(__pos._M_node, __first, __last); }
73731
73732 iterator
73733 insert(iterator __pos, const value_type& __x)
73734 { return iterator(_M_insert_after(__slist_previous(&this->_M_head,
73735 __pos._M_node),
73736 __x)); }
73737
73738 iterator
73739 insert(iterator __pos)
73740 { return iterator(_M_insert_after(__slist_previous(&this->_M_head,
73741 __pos._M_node),
73742 value_type())); }
73743
73744 void
73745 insert(iterator __pos, size_type __n, const value_type& __x)
73746 { _M_insert_after_fill(__slist_previous(&this->_M_head, __pos._M_node),
73747 __n, __x); }
73748
73749
73750
73751 template <class _InIterator>
73752 void
73753 insert(iterator __pos, _InIterator __first, _InIterator __last)
73754 { _M_insert_after_range(__slist_previous(&this->_M_head, __pos._M_node),
73755 __first, __last); }
73756
73757 public:
73758 iterator
73759 erase_after(iterator __pos)
73760 { return iterator((_Node*) this->_M_erase_after(__pos._M_node)); }
73761
73762 iterator
73763 erase_after(iterator __before_first, iterator __last)
73764 {
73765 return iterator((_Node*) this->_M_erase_after(__before_first._M_node,
73766 __last._M_node));
73767 }
73768
73769 iterator
73770 erase(iterator __pos)
73771 {
73772 return iterator((_Node*) this->_M_erase_after
73773 (__slist_previous(&this->_M_head, __pos._M_node)));
73774 }
73775
73776 iterator
73777 erase(iterator __first, iterator __last)
73778 {
73779 return iterator((_Node*) this->_M_erase_after
73780 (__slist_previous(&this->_M_head, __first._M_node),
73781 __last._M_node));
73782 }
73783
73784 void
73785 resize(size_type new_size, const _Tp& __x);
73786
73787 void
73788 resize(size_type new_size)
73789 { resize(new_size, _Tp()); }
73790
73791 void
73792 clear()
73793 { this->_M_erase_after(&this->_M_head, 0); }
73794
73795 public:
73796
73797
73798 void
73799 splice_after(iterator __pos,
73800 iterator __before_first, iterator __before_last)
73801 {
73802 if (__before_first != __before_last)
73803 __slist_splice_after(__pos._M_node, __before_first._M_node,
73804 __before_last._M_node);
73805 }
73806
73807
73808
73809 void
73810 splice_after(iterator __pos, iterator __prev)
73811 { __slist_splice_after(__pos._M_node,
73812 __prev._M_node, __prev._M_node->_M_next); }
73813
73814
73815
73816
73817 void
73818 splice_after(iterator __pos, slist& __x)
73819 { __slist_splice_after(__pos._M_node, &__x._M_head); }
73820
73821
73822 void
73823 splice(iterator __pos, slist& __x)
73824 {
73825 if (__x._M_head._M_next)
73826 __slist_splice_after(__slist_previous(&this->_M_head, __pos._M_node),
73827 &__x._M_head,
73828 __slist_previous(&__x._M_head, 0)); }
73829
73830
73831 void
73832 splice(iterator __pos, slist& __x, iterator __i)
73833 { __slist_splice_after(__slist_previous(&this->_M_head, __pos._M_node),
73834 __slist_previous(&__x._M_head, __i._M_node),
73835 __i._M_node); }
73836
73837
73838
73839 void
73840 splice(iterator __pos, slist& __x, iterator __first, iterator __last)
73841 {
73842 if (__first != __last)
73843 __slist_splice_after(__slist_previous(&this->_M_head, __pos._M_node),
73844 __slist_previous(&__x._M_head, __first._M_node),
73845 __slist_previous(__first._M_node,
73846 __last._M_node));
73847 }
73848
73849 public:
73850 void
73851 reverse()
73852 {
73853 if (this->_M_head._M_next)
73854 this->_M_head._M_next = __slist_reverse(this->_M_head._M_next);
73855 }
73856
73857 void
73858 remove(const _Tp& __val);
73859
73860 void
73861 unique();
73862
73863 void
73864 merge(slist& __x);
73865
73866 void
73867 sort();
73868
73869 template <class _Predicate>
73870 void
73871 remove_if(_Predicate __pred);
73872
73873 template <class _BinaryPredicate>
73874 void
73875 unique(_BinaryPredicate __pred);
73876
73877 template <class _StrictWeakOrdering>
73878 void
73879 merge(slist&, _StrictWeakOrdering);
73880
73881 template <class _StrictWeakOrdering>
73882 void
73883 sort(_StrictWeakOrdering __comp);
73884 };
73885
73886 template <class _Tp, class _Alloc>
73887 slist<_Tp, _Alloc>&
73888 slist<_Tp, _Alloc>::operator=(const slist<_Tp, _Alloc>& __x)
73889 {
73890 if (&__x != this)
73891 {
73892 _Node_base* __p1 = &this->_M_head;
73893 _Node* __n1 = (_Node*) this->_M_head._M_next;
73894 const _Node* __n2 = (const _Node*) __x._M_head._M_next;
73895 while (__n1 && __n2)
73896 {
73897 __n1->_M_data = __n2->_M_data;
73898 __p1 = __n1;
73899 __n1 = (_Node*) __n1->_M_next;
73900 __n2 = (const _Node*) __n2->_M_next;
73901 }
73902 if (__n2 == 0)
73903 this->_M_erase_after(__p1, 0);
73904 else
73905 _M_insert_after_range(__p1, const_iterator((_Node*)__n2),
73906 const_iterator(0));
73907 }
73908 return *this;
73909 }
73910
73911 template <class _Tp, class _Alloc>
73912 void
73913 slist<_Tp, _Alloc>::_M_fill_assign(size_type __n, const _Tp& __val)
73914 {
73915 _Node_base* __prev = &this->_M_head;
73916 _Node* __node = (_Node*) this->_M_head._M_next;
73917 for (; __node != 0 && __n > 0; --__n)
73918 {
73919 __node->_M_data = __val;
73920 __prev = __node;
73921 __node = (_Node*) __node->_M_next;
73922 }
73923 if (__n > 0)
73924 _M_insert_after_fill(__prev, __n, __val);
73925 else
73926 this->_M_erase_after(__prev, 0);
73927 }
73928
73929 template <class _Tp, class _Alloc>
73930 template <class _InputIterator>
73931 void
73932 slist<_Tp, _Alloc>::_M_assign_dispatch(_InputIterator __first,
73933 _InputIterator __last,
73934 __false_type)
73935 {
73936 _Node_base* __prev = &this->_M_head;
73937 _Node* __node = (_Node*) this->_M_head._M_next;
73938 while (__node != 0 && __first != __last)
73939 {
73940 __node->_M_data = *__first;
73941 __prev = __node;
73942 __node = (_Node*) __node->_M_next;
73943 ++__first;
73944 }
73945 if (__first != __last)
73946 _M_insert_after_range(__prev, __first, __last);
73947 else
73948 this->_M_erase_after(__prev, 0);
73949 }
73950
73951 template <class _Tp, class _Alloc>
73952 inline bool
73953 operator==(const slist<_Tp, _Alloc>& _SL1, const slist<_Tp, _Alloc>& _SL2)
73954 {
73955 typedef typename slist<_Tp,_Alloc>::const_iterator const_iterator;
73956 const_iterator __end1 = _SL1.end();
73957 const_iterator __end2 = _SL2.end();
73958
73959 const_iterator __i1 = _SL1.begin();
73960 const_iterator __i2 = _SL2.begin();
73961 while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2)
73962 {
73963 ++__i1;
73964 ++__i2;
73965 }
73966 return __i1 == __end1 && __i2 == __end2;
73967 }
73968
73969
73970 template <class _Tp, class _Alloc>
73971 inline bool
73972 operator<(const slist<_Tp, _Alloc>& _SL1, const slist<_Tp, _Alloc>& _SL2)
73973 { return std::lexicographical_compare(_SL1.begin(), _SL1.end(),
73974 _SL2.begin(), _SL2.end()); }
73975
73976 template <class _Tp, class _Alloc>
73977 inline bool
73978 operator!=(const slist<_Tp, _Alloc>& _SL1, const slist<_Tp, _Alloc>& _SL2)
73979 { return !(_SL1 == _SL2); }
73980
73981 template <class _Tp, class _Alloc>
73982 inline bool
73983 operator>(const slist<_Tp, _Alloc>& _SL1, const slist<_Tp, _Alloc>& _SL2)
73984 { return _SL2 < _SL1; }
73985
73986 template <class _Tp, class _Alloc>
73987 inline bool
73988 operator<=(const slist<_Tp, _Alloc>& _SL1, const slist<_Tp, _Alloc>& _SL2)
73989 { return !(_SL2 < _SL1); }
73990
73991 template <class _Tp, class _Alloc>
73992 inline bool
73993 operator>=(const slist<_Tp, _Alloc>& _SL1, const slist<_Tp, _Alloc>& _SL2)
73994 { return !(_SL1 < _SL2); }
73995
73996 template <class _Tp, class _Alloc>
73997 inline void
73998 swap(slist<_Tp, _Alloc>& __x, slist<_Tp, _Alloc>& __y)
73999 { __x.swap(__y); }
74000
74001 template <class _Tp, class _Alloc>
74002 void
74003 slist<_Tp, _Alloc>::resize(size_type __len, const _Tp& __x)
74004 {
74005 _Node_base* __cur = &this->_M_head;
74006 while (__cur->_M_next != 0 && __len > 0)
74007 {
74008 --__len;
74009 __cur = __cur->_M_next;
74010 }
74011 if (__cur->_M_next)
74012 this->_M_erase_after(__cur, 0);
74013 else
74014 _M_insert_after_fill(__cur, __len, __x);
74015 }
74016
74017 template <class _Tp, class _Alloc>
74018 void
74019 slist<_Tp, _Alloc>::remove(const _Tp& __val)
74020 {
74021 _Node_base* __cur = &this->_M_head;
74022 while (__cur && __cur->_M_next)
74023 {
74024 if (((_Node*) __cur->_M_next)->_M_data == __val)
74025 this->_M_erase_after(__cur);
74026 else
74027 __cur = __cur->_M_next;
74028 }
74029 }
74030
74031 template <class _Tp, class _Alloc>
74032 void
74033 slist<_Tp, _Alloc>::unique()
74034 {
74035 _Node_base* __cur = this->_M_head._M_next;
74036 if (__cur)
74037 {
74038 while (__cur->_M_next)
74039 {
74040 if (((_Node*)__cur)->_M_data
74041 == ((_Node*)(__cur->_M_next))->_M_data)
74042 this->_M_erase_after(__cur);
74043 else
74044 __cur = __cur->_M_next;
74045 }
74046 }
74047 }
74048
74049 template <class _Tp, class _Alloc>
74050 void
74051 slist<_Tp, _Alloc>::merge(slist<_Tp, _Alloc>& __x)
74052 {
74053 _Node_base* __n1 = &this->_M_head;
74054 while (__n1->_M_next && __x._M_head._M_next)
74055 {
74056 if (((_Node*) __x._M_head._M_next)->_M_data
74057 < ((_Node*) __n1->_M_next)->_M_data)
74058 __slist_splice_after(__n1, &__x._M_head, __x._M_head._M_next);
74059 __n1 = __n1->_M_next;
74060 }
74061 if (__x._M_head._M_next)
74062 {
74063 __n1->_M_next = __x._M_head._M_next;
74064 __x._M_head._M_next = 0;
74065 }
74066 }
74067
74068 template <class _Tp, class _Alloc>
74069 void
74070 slist<_Tp, _Alloc>::sort()
74071 {
74072 if (this->_M_head._M_next && this->_M_head._M_next->_M_next)
74073 {
74074 slist __carry;
74075 slist __counter[64];
74076 int __fill = 0;
74077 while (!empty())
74078 {
74079 __slist_splice_after(&__carry._M_head,
74080 &this->_M_head, this->_M_head._M_next);
74081 int __i = 0;
74082 while (__i < __fill && !__counter[__i].empty())
74083 {
74084 __counter[__i].merge(__carry);
74085 __carry.swap(__counter[__i]);
74086 ++__i;
74087 }
74088 __carry.swap(__counter[__i]);
74089 if (__i == __fill)
74090 ++__fill;
74091 }
74092
74093 for (int __i = 1; __i < __fill; ++__i)
74094 __counter[__i].merge(__counter[__i-1]);
74095 this->swap(__counter[__fill-1]);
74096 }
74097 }
74098
74099 template <class _Tp, class _Alloc>
74100 template <class _Predicate>
74101 void slist<_Tp, _Alloc>::remove_if(_Predicate __pred)
74102 {
74103 _Node_base* __cur = &this->_M_head;
74104 while (__cur->_M_next)
74105 {
74106 if (__pred(((_Node*) __cur->_M_next)->_M_data))
74107 this->_M_erase_after(__cur);
74108 else
74109 __cur = __cur->_M_next;
74110 }
74111 }
74112
74113 template <class _Tp, class _Alloc>
74114 template <class _BinaryPredicate>
74115 void
74116 slist<_Tp, _Alloc>::unique(_BinaryPredicate __pred)
74117 {
74118 _Node* __cur = (_Node*) this->_M_head._M_next;
74119 if (__cur)
74120 {
74121 while (__cur->_M_next)
74122 {
74123 if (__pred(((_Node*)__cur)->_M_data,
74124 ((_Node*)(__cur->_M_next))->_M_data))
74125 this->_M_erase_after(__cur);
74126 else
74127 __cur = (_Node*) __cur->_M_next;
74128 }
74129 }
74130 }
74131
74132 template <class _Tp, class _Alloc>
74133 template <class _StrictWeakOrdering>
74134 void
74135 slist<_Tp, _Alloc>::merge(slist<_Tp, _Alloc>& __x,
74136 _StrictWeakOrdering __comp)
74137 {
74138 _Node_base* __n1 = &this->_M_head;
74139 while (__n1->_M_next && __x._M_head._M_next)
74140 {
74141 if (__comp(((_Node*) __x._M_head._M_next)->_M_data,
74142 ((_Node*) __n1->_M_next)->_M_data))
74143 __slist_splice_after(__n1, &__x._M_head, __x._M_head._M_next);
74144 __n1 = __n1->_M_next;
74145 }
74146 if (__x._M_head._M_next)
74147 {
74148 __n1->_M_next = __x._M_head._M_next;
74149 __x._M_head._M_next = 0;
74150 }
74151 }
74152
74153 template <class _Tp, class _Alloc>
74154 template <class _StrictWeakOrdering>
74155 void
74156 slist<_Tp, _Alloc>::sort(_StrictWeakOrdering __comp)
74157 {
74158 if (this->_M_head._M_next && this->_M_head._M_next->_M_next)
74159 {
74160 slist __carry;
74161 slist __counter[64];
74162 int __fill = 0;
74163 while (!empty())
74164 {
74165 __slist_splice_after(&__carry._M_head,
74166 &this->_M_head, this->_M_head._M_next);
74167 int __i = 0;
74168 while (__i < __fill && !__counter[__i].empty())
74169 {
74170 __counter[__i].merge(__carry, __comp);
74171 __carry.swap(__counter[__i]);
74172 ++__i;
74173 }
74174 __carry.swap(__counter[__i]);
74175 if (__i == __fill)
74176 ++__fill;
74177 }
74178
74179 for (int __i = 1; __i < __fill; ++__i)
74180 __counter[__i].merge(__counter[__i-1], __comp);
74181 this->swap(__counter[__fill-1]);
74182 }
74183 }
74184
74185 }
74186
74187 namespace std __attribute__ ((__visibility__ ("default"))) {
74188
74189
74190
74191 template <class _Tp, class _Alloc>
74192 class insert_iterator<__gnu_cxx::slist<_Tp, _Alloc> >
74193 {
74194 protected:
74195 typedef __gnu_cxx::slist<_Tp, _Alloc> _Container;
74196 _Container* container;
74197 typename _Container::iterator iter;
74198
74199 public:
74200 typedef _Container container_type;
74201 typedef output_iterator_tag iterator_category;
74202 typedef void value_type;
74203 typedef void difference_type;
74204 typedef void pointer;
74205 typedef void reference;
74206
74207 insert_iterator(_Container& __x, typename _Container::iterator __i)
74208 : container(&__x)
74209 {
74210 if (__i == __x.begin())
74211 iter = __x.before_begin();
74212 else
74213 iter = __x.previous(__i);
74214 }
74215
74216 insert_iterator<_Container>&
74217 operator=(const typename _Container::value_type& __value)
74218 {
74219 iter = container->insert_after(iter, __value);
74220 return *this;
74221 }
74222
74223 insert_iterator<_Container>&
74224 operator*()
74225 { return *this; }
74226
74227 insert_iterator<_Container>&
74228 operator++()
74229 { return *this; }
74230
74231 insert_iterator<_Container>&
74232 operator++(int)
74233 { return *this; }
74234 };
74235
74236 }
74237 # 32 "mask.h" 2
74238
74239
74240
74241 # 1 "anneal.h" 1
74242 # 24 "anneal.h"
74243 # 1 "../config.h" 1
74244 # 25 "anneal.h" 2
74245
74246
74247 # 1 "/usr/include/boost/lambda/lambda.hpp" 1 3 4
74248 # 14 "/usr/include/boost/lambda/lambda.hpp" 3 4
74249 # 1 "/usr/include/boost/lambda/core.hpp" 1 3 4
74250 # 25 "/usr/include/boost/lambda/core.hpp" 3 4
74251 # 1 "/usr/include/boost/type_traits/transform_traits.hpp" 1 3 4
74252 # 15 "/usr/include/boost/type_traits/transform_traits.hpp" 3 4
74253 # 1 "/usr/include/boost/type_traits/add_pointer.hpp" 1 3 4
74254 # 12 "/usr/include/boost/type_traits/add_pointer.hpp" 3 4
74255 # 1 "/usr/include/boost/type_traits/remove_reference.hpp" 1 3 4
74256 # 12 "/usr/include/boost/type_traits/remove_reference.hpp" 3 4
74257 # 1 "/usr/include/boost/type_traits/broken_compiler_spec.hpp" 1 3 4
74258 # 12 "/usr/include/boost/type_traits/broken_compiler_spec.hpp" 3 4
74259 # 1 "/usr/include/boost/mpl/aux_/lambda_support.hpp" 1 3 4
74260 # 17 "/usr/include/boost/mpl/aux_/lambda_support.hpp" 3 4
74261 # 1 "/usr/include/boost/mpl/aux_/config/lambda.hpp" 1 3 4
74262 # 17 "/usr/include/boost/mpl/aux_/config/lambda.hpp" 3 4
74263 # 1 "/usr/include/boost/mpl/aux_/config/ttp.hpp" 1 3 4
74264 # 17 "/usr/include/boost/mpl/aux_/config/ttp.hpp" 3 4
74265 # 1 "/usr/include/boost/mpl/aux_/config/msvc.hpp" 1 3 4
74266 # 18 "/usr/include/boost/mpl/aux_/config/ttp.hpp" 2 3 4
74267 # 1 "/usr/include/boost/mpl/aux_/config/gcc.hpp" 1 3 4
74268 # 19 "/usr/include/boost/mpl/aux_/config/ttp.hpp" 2 3 4
74269 # 1 "/usr/include/boost/mpl/aux_/config/workaround.hpp" 1 3 4
74270 # 20 "/usr/include/boost/mpl/aux_/config/ttp.hpp" 2 3 4
74271 # 18 "/usr/include/boost/mpl/aux_/config/lambda.hpp" 2 3 4
74272 # 1 "/usr/include/boost/mpl/aux_/config/ctps.hpp" 1 3 4
74273 # 19 "/usr/include/boost/mpl/aux_/config/lambda.hpp" 2 3 4
74274 # 18 "/usr/include/boost/mpl/aux_/lambda_support.hpp" 2 3 4
74275 # 13 "/usr/include/boost/type_traits/broken_compiler_spec.hpp" 2 3 4
74276 # 95 "/usr/include/boost/type_traits/broken_compiler_spec.hpp" 3 4
74277
74278
74279
74280
74281
74282
74283
74284
74285
74286
74287
74288
74289
74290
74291
74292 # 13 "/usr/include/boost/type_traits/remove_reference.hpp" 2 3 4
74293 # 21 "/usr/include/boost/type_traits/remove_reference.hpp" 3 4
74294 # 1 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 1 3 4
74295 # 14 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 3 4
74296 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
74297 # 10 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 3 4
74298 # 1 "/usr/include/boost/mpl/int.hpp" 1 3 4
74299 # 17 "/usr/include/boost/mpl/int.hpp" 3 4
74300 # 1 "/usr/include/boost/mpl/int_fwd.hpp" 1 3 4
74301 # 17 "/usr/include/boost/mpl/int_fwd.hpp" 3 4
74302 # 1 "/usr/include/boost/mpl/aux_/adl_barrier.hpp" 1 3 4
74303 # 17 "/usr/include/boost/mpl/aux_/adl_barrier.hpp" 3 4
74304 # 1 "/usr/include/boost/mpl/aux_/config/adl.hpp" 1 3 4
74305 # 18 "/usr/include/boost/mpl/aux_/config/adl.hpp" 3 4
74306 # 1 "/usr/include/boost/mpl/aux_/config/intel.hpp" 1 3 4
74307 # 19 "/usr/include/boost/mpl/aux_/config/adl.hpp" 2 3 4
74308 # 18 "/usr/include/boost/mpl/aux_/adl_barrier.hpp" 2 3 4
74309 # 33 "/usr/include/boost/mpl/aux_/adl_barrier.hpp" 3 4
74310 namespace mpl_ { namespace aux {} }
74311 namespace boost { namespace mpl { using namespace mpl_;
74312 namespace aux { using namespace mpl_::aux; }
74313 }}
74314 # 18 "/usr/include/boost/mpl/int_fwd.hpp" 2 3 4
74315 # 1 "/usr/include/boost/mpl/aux_/nttp_decl.hpp" 1 3 4
74316 # 17 "/usr/include/boost/mpl/aux_/nttp_decl.hpp" 3 4
74317 # 1 "/usr/include/boost/mpl/aux_/config/nttp.hpp" 1 3 4
74318 # 18 "/usr/include/boost/mpl/aux_/nttp_decl.hpp" 2 3 4
74319 # 19 "/usr/include/boost/mpl/int_fwd.hpp" 2 3 4
74320
74321 namespace mpl_ {
74322
74323 template< int N > struct int_;
74324
74325 }
74326 namespace boost { namespace mpl { using ::mpl_::int_; } }
74327 # 18 "/usr/include/boost/mpl/int.hpp" 2 3 4
74328
74329
74330 # 1 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 1 3 4
74331 # 16 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 3 4
74332 # 1 "/usr/include/boost/mpl/integral_c_tag.hpp" 1 3 4
74333 # 19 "/usr/include/boost/mpl/integral_c_tag.hpp" 3 4
74334 # 1 "/usr/include/boost/mpl/aux_/config/static_constant.hpp" 1 3 4
74335 # 20 "/usr/include/boost/mpl/integral_c_tag.hpp" 2 3 4
74336
74337 namespace mpl_ {
74338 struct integral_c_tag { static const int value = 0; };
74339 }
74340 namespace boost { namespace mpl { using ::mpl_::integral_c_tag; } }
74341 # 17 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 2 3 4
74342 # 1 "/usr/include/boost/mpl/aux_/static_cast.hpp" 1 3 4
74343 # 18 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 2 3 4
74344
74345
74346
74347
74348 # 1 "/usr/include/boost/preprocessor/cat.hpp" 1 3 4
74349 # 17 "/usr/include/boost/preprocessor/cat.hpp" 3 4
74350 # 1 "/usr/include/boost/preprocessor/config/config.hpp" 1 3 4
74351 # 18 "/usr/include/boost/preprocessor/cat.hpp" 2 3 4
74352 # 23 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 2 3 4
74353 # 40 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 3 4
74354 namespace mpl_ {
74355
74356 template< int N >
74357 struct int_
74358 {
74359 static const int value = N;
74360
74361
74362
74363
74364
74365 typedef int_ type;
74366
74367 typedef int value_type;
74368 typedef integral_c_tag tag;
74369 # 72 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 3 4
74370 typedef mpl_::int_< static_cast<int>((value + 1)) > next;
74371 typedef mpl_::int_< static_cast<int>((value - 1)) > prior;
74372
74373
74374
74375
74376
74377
74378 operator int() const { return static_cast<int>(this->value); }
74379 };
74380
74381
74382 template< int N >
74383 int const mpl_::int_< N >::value;
74384
74385
74386 }
74387 # 21 "/usr/include/boost/mpl/int.hpp" 2 3 4
74388 # 11 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 2 3 4
74389 # 1 "/usr/include/boost/mpl/aux_/template_arity_fwd.hpp" 1 3 4
74390 # 17 "/usr/include/boost/mpl/aux_/template_arity_fwd.hpp" 3 4
74391 namespace boost { namespace mpl { namespace aux {
74392
74393 template< typename F > struct template_arity;
74394
74395 }}}
74396 # 12 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 2 3 4
74397 # 1 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 1 3 4
74398 # 17 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 3 4
74399 # 1 "/usr/include/boost/mpl/aux_/config/preprocessor.hpp" 1 3 4
74400 # 18 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 2 3 4
74401 # 45 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 3 4
74402 # 1 "/usr/include/boost/preprocessor/comma_if.hpp" 1 3 4
74403 # 15 "/usr/include/boost/preprocessor/comma_if.hpp" 3 4
74404 # 1 "/usr/include/boost/preprocessor/punctuation/comma_if.hpp" 1 3 4
74405 # 18 "/usr/include/boost/preprocessor/punctuation/comma_if.hpp" 3 4
74406 # 1 "/usr/include/boost/preprocessor/control/if.hpp" 1 3 4
74407 # 18 "/usr/include/boost/preprocessor/control/if.hpp" 3 4
74408 # 1 "/usr/include/boost/preprocessor/control/iif.hpp" 1 3 4
74409 # 19 "/usr/include/boost/preprocessor/control/if.hpp" 2 3 4
74410 # 1 "/usr/include/boost/preprocessor/logical/bool.hpp" 1 3 4
74411 # 20 "/usr/include/boost/preprocessor/control/if.hpp" 2 3 4
74412 # 19 "/usr/include/boost/preprocessor/punctuation/comma_if.hpp" 2 3 4
74413 # 1 "/usr/include/boost/preprocessor/facilities/empty.hpp" 1 3 4
74414 # 20 "/usr/include/boost/preprocessor/punctuation/comma_if.hpp" 2 3 4
74415 # 1 "/usr/include/boost/preprocessor/punctuation/comma.hpp" 1 3 4
74416 # 21 "/usr/include/boost/preprocessor/punctuation/comma_if.hpp" 2 3 4
74417 # 16 "/usr/include/boost/preprocessor/comma_if.hpp" 2 3 4
74418 # 46 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 2 3 4
74419 # 1 "/usr/include/boost/preprocessor/repeat.hpp" 1 3 4
74420 # 15 "/usr/include/boost/preprocessor/repeat.hpp" 3 4
74421 # 1 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 1 3 4
74422 # 19 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 3 4
74423 # 1 "/usr/include/boost/preprocessor/debug/error.hpp" 1 3 4
74424 # 20 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 2 3 4
74425 # 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4
74426 # 21 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 2 3 4
74427 # 1 "/usr/include/boost/preprocessor/tuple/eat.hpp" 1 3 4
74428 # 22 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 2 3 4
74429 # 16 "/usr/include/boost/preprocessor/repeat.hpp" 2 3 4
74430 # 47 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 2 3 4
74431 # 1 "/usr/include/boost/preprocessor/inc.hpp" 1 3 4
74432 # 15 "/usr/include/boost/preprocessor/inc.hpp" 3 4
74433 # 1 "/usr/include/boost/preprocessor/arithmetic/inc.hpp" 1 3 4
74434 # 16 "/usr/include/boost/preprocessor/inc.hpp" 2 3 4
74435 # 48 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 2 3 4
74436 # 13 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 2 3 4
74437
74438 # 1 "/usr/include/boost/mpl/aux_/config/overload_resolution.hpp" 1 3 4
74439 # 15 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 2 3 4
74440 # 15 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 2 3 4
74441 # 22 "/usr/include/boost/type_traits/remove_reference.hpp" 2 3 4
74442
74443 namespace boost {
74444
74445
74446
74447 template< typename T > struct remove_reference { typedef T type; };
74448 template< typename T > struct remove_reference<T&> { typedef T type; };
74449 # 46 "/usr/include/boost/type_traits/remove_reference.hpp" 3 4
74450 }
74451
74452 # 1 "/usr/include/boost/type_traits/detail/type_trait_undef.hpp" 1 3 4
74453 # 49 "/usr/include/boost/type_traits/remove_reference.hpp" 2 3 4
74454 # 13 "/usr/include/boost/type_traits/add_pointer.hpp" 2 3 4
74455
74456
74457 # 1 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 1 3 4
74458 # 14 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 3 4
74459 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
74460 # 15 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 2 3 4
74461 # 16 "/usr/include/boost/type_traits/add_pointer.hpp" 2 3 4
74462
74463 namespace boost {
74464
74465 namespace detail {
74466 # 55 "/usr/include/boost/type_traits/add_pointer.hpp" 3 4
74467 template <typename T>
74468 struct add_pointer_impl
74469 {
74470 typedef typename remove_reference<T>::type no_ref_type;
74471 typedef no_ref_type* type;
74472 };
74473
74474
74475
74476 }
74477
74478 template< typename T > struct add_pointer { typedef typename boost::detail::add_pointer_impl<T>::type type; };
74479
74480 }
74481
74482 # 1 "/usr/include/boost/type_traits/detail/type_trait_undef.hpp" 1 3 4
74483 # 71 "/usr/include/boost/type_traits/add_pointer.hpp" 2 3 4
74484 # 16 "/usr/include/boost/type_traits/transform_traits.hpp" 2 3 4
74485 # 1 "/usr/include/boost/type_traits/add_reference.hpp" 1 3 4
74486 # 12 "/usr/include/boost/type_traits/add_reference.hpp" 3 4
74487 # 1 "/usr/include/boost/type_traits/is_reference.hpp" 1 3 4
74488 # 24 "/usr/include/boost/type_traits/is_reference.hpp" 3 4
74489 # 1 "/usr/include/boost/type_traits/config.hpp" 1 3 4
74490 # 25 "/usr/include/boost/type_traits/is_reference.hpp" 2 3 4
74491
74492
74493
74494
74495
74496
74497
74498 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
74499 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
74500 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
74501 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
74502 # 1 "/usr/include/boost/type_traits/integral_constant.hpp" 1 3 4
74503 # 10 "/usr/include/boost/type_traits/integral_constant.hpp" 3 4
74504 # 1 "/usr/include/boost/mpl/bool.hpp" 1 3 4
74505 # 17 "/usr/include/boost/mpl/bool.hpp" 3 4
74506 # 1 "/usr/include/boost/mpl/bool_fwd.hpp" 1 3 4
74507 # 19 "/usr/include/boost/mpl/bool_fwd.hpp" 3 4
74508 namespace mpl_ {
74509
74510 template< bool C_ > struct bool_;
74511
74512
74513 typedef bool_<true> true_;
74514 typedef bool_<false> false_;
74515
74516 }
74517
74518 namespace boost { namespace mpl { using ::mpl_::bool_; } }
74519 namespace boost { namespace mpl { using ::mpl_::true_; } }
74520 namespace boost { namespace mpl { using ::mpl_::false_; } }
74521 # 18 "/usr/include/boost/mpl/bool.hpp" 2 3 4
74522
74523
74524
74525 namespace mpl_ {
74526
74527 template< bool C_ > struct bool_
74528 {
74529 static const bool value = C_;
74530 typedef integral_c_tag tag;
74531 typedef bool_ type;
74532 typedef bool value_type;
74533 operator bool() const { return this->value; }
74534 };
74535
74536
74537 template< bool C_ >
74538 bool const bool_<C_>::value;
74539
74540
74541 }
74542 # 11 "/usr/include/boost/type_traits/integral_constant.hpp" 2 3 4
74543 # 1 "/usr/include/boost/mpl/integral_c.hpp" 1 3 4
74544 # 17 "/usr/include/boost/mpl/integral_c.hpp" 3 4
74545 # 1 "/usr/include/boost/mpl/integral_c_fwd.hpp" 1 3 4
74546 # 20 "/usr/include/boost/mpl/integral_c_fwd.hpp" 3 4
74547 namespace mpl_ {
74548
74549
74550
74551
74552
74553 template< typename T, T N > struct integral_c;
74554
74555
74556 }
74557 namespace boost { namespace mpl { using ::mpl_::integral_c; } }
74558 # 18 "/usr/include/boost/mpl/integral_c.hpp" 2 3 4
74559 # 32 "/usr/include/boost/mpl/integral_c.hpp" 3 4
74560 # 1 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 1 3 4
74561 # 40 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 3 4
74562 namespace mpl_ {
74563
74564 template< typename T, T N >
74565 struct integral_c
74566 {
74567 static const T value = N;
74568
74569
74570
74571
74572
74573 typedef integral_c type;
74574
74575 typedef T value_type;
74576 typedef integral_c_tag tag;
74577 # 72 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 3 4
74578 typedef integral_c< T, static_cast<T>((value + 1)) > next;
74579 typedef integral_c< T, static_cast<T>((value - 1)) > prior;
74580
74581
74582
74583
74584
74585
74586 operator T() const { return static_cast<T>(this->value); }
74587 };
74588
74589
74590 template< typename T, T N >
74591 T const integral_c< T, N >::value;
74592
74593
74594 }
74595 # 33 "/usr/include/boost/mpl/integral_c.hpp" 2 3 4
74596
74597
74598
74599
74600 namespace mpl_ {
74601
74602 template< bool C >
74603 struct integral_c<bool, C>
74604 {
74605 static const bool value = C;
74606 typedef integral_c_tag tag;
74607 typedef integral_c type;
74608 typedef bool value_type;
74609 operator bool() const { return this->value; }
74610 };
74611 }
74612 # 12 "/usr/include/boost/type_traits/integral_constant.hpp" 2 3 4
74613
74614 namespace boost{
74615
74616
74617
74618
74619 template <class T, T val>
74620
74621 struct integral_constant : public mpl::integral_c<T, val>
74622 {
74623 typedef integral_constant<T,val> type;
74624 };
74625
74626 template<> struct integral_constant<bool,true> : public mpl::true_
74627 {
74628
74629
74630
74631
74632
74633
74634
74635 typedef integral_constant<bool,true> type;
74636 };
74637 template<> struct integral_constant<bool,false> : public mpl::false_
74638 {
74639
74640
74641
74642
74643
74644
74645
74646 typedef integral_constant<bool,false> type;
74647 };
74648
74649 typedef integral_constant<bool,true> true_type;
74650 typedef integral_constant<bool,false> false_type;
74651
74652 }
74653 # 16 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
74654 # 33 "/usr/include/boost/type_traits/is_reference.hpp" 2 3 4
74655
74656 namespace boost {
74657
74658
74659
74660 template< typename T > struct is_reference : ::boost::integral_constant<bool,false> { };
74661 template< typename T > struct is_reference< T& > : ::boost::integral_constant<bool,true> { };
74662 # 111 "/usr/include/boost/type_traits/is_reference.hpp" 3 4
74663 }
74664
74665 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
74666 # 114 "/usr/include/boost/type_traits/is_reference.hpp" 2 3 4
74667 # 13 "/usr/include/boost/type_traits/add_reference.hpp" 2 3 4
74668
74669
74670
74671
74672 # 1 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 1 3 4
74673 # 14 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 3 4
74674 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
74675 # 15 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 2 3 4
74676 # 18 "/usr/include/boost/type_traits/add_reference.hpp" 2 3 4
74677
74678 namespace boost {
74679
74680 namespace detail {
74681 # 55 "/usr/include/boost/type_traits/add_reference.hpp" 3 4
74682 template <typename T>
74683 struct add_reference_impl
74684 {
74685 typedef T& type;
74686 };
74687
74688
74689 template< typename T > struct add_reference_impl<T&> { typedef T& type; };
74690
74691
74692
74693
74694
74695 template<> struct add_reference_impl<void> { typedef void type; };
74696
74697 template<> struct add_reference_impl<void const> { typedef void const type; };
74698 template<> struct add_reference_impl<void volatile> { typedef void volatile type; };
74699 template<> struct add_reference_impl<void const volatile> { typedef void const volatile type; };
74700
74701
74702 }
74703
74704 template< typename T > struct add_reference { typedef typename boost::detail::add_reference_impl<T>::type type; };
74705
74706
74707
74708
74709
74710
74711
74712 }
74713
74714 # 1 "/usr/include/boost/type_traits/detail/type_trait_undef.hpp" 1 3 4
74715 # 88 "/usr/include/boost/type_traits/add_reference.hpp" 2 3 4
74716 # 17 "/usr/include/boost/type_traits/transform_traits.hpp" 2 3 4
74717 # 1 "/usr/include/boost/type_traits/remove_bounds.hpp" 1 3 4
74718 # 21 "/usr/include/boost/type_traits/remove_bounds.hpp" 3 4
74719 # 1 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 1 3 4
74720 # 14 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 3 4
74721 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
74722 # 15 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 2 3 4
74723 # 22 "/usr/include/boost/type_traits/remove_bounds.hpp" 2 3 4
74724
74725
74726
74727 namespace boost {
74728
74729 template< typename T > struct remove_bounds { typedef T type; };
74730
74731
74732 template< typename T, std::size_t N > struct remove_bounds<T[N]> { typedef T type; };
74733 template< typename T, std::size_t N > struct remove_bounds<T const[N]> { typedef T const type; };
74734 template< typename T, std::size_t N > struct remove_bounds<T volatile[N]> { typedef T volatile type; };
74735 template< typename T, std::size_t N > struct remove_bounds<T const volatile[N]> { typedef T const volatile type; };
74736
74737 template< typename T > struct remove_bounds<T[]> { typedef T type; };
74738 template< typename T > struct remove_bounds<T const[]> { typedef T const type; };
74739 template< typename T > struct remove_bounds<T volatile[]> { typedef T volatile type; };
74740 template< typename T > struct remove_bounds<T const volatile[]> { typedef T const volatile type; };
74741
74742
74743
74744 }
74745
74746
74747
74748 # 1 "/usr/include/boost/type_traits/detail/type_trait_undef.hpp" 1 3 4
74749 # 47 "/usr/include/boost/type_traits/remove_bounds.hpp" 2 3 4
74750 # 18 "/usr/include/boost/type_traits/transform_traits.hpp" 2 3 4
74751 # 1 "/usr/include/boost/type_traits/remove_pointer.hpp" 1 3 4
74752 # 21 "/usr/include/boost/type_traits/remove_pointer.hpp" 3 4
74753 # 1 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 1 3 4
74754 # 14 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 3 4
74755 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
74756 # 15 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 2 3 4
74757 # 22 "/usr/include/boost/type_traits/remove_pointer.hpp" 2 3 4
74758
74759 namespace boost {
74760
74761
74762
74763 template< typename T > struct remove_pointer { typedef T type; };
74764 template< typename T > struct remove_pointer<T*> { typedef T type; };
74765 template< typename T > struct remove_pointer<T* const> { typedef T type; };
74766 template< typename T > struct remove_pointer<T* volatile> { typedef T type; };
74767 template< typename T > struct remove_pointer<T* const volatile> { typedef T type; };
74768
74769
74770
74771
74772
74773
74774
74775 }
74776
74777 # 1 "/usr/include/boost/type_traits/detail/type_trait_undef.hpp" 1 3 4
74778 # 42 "/usr/include/boost/type_traits/remove_pointer.hpp" 2 3 4
74779 # 19 "/usr/include/boost/type_traits/transform_traits.hpp" 2 3 4
74780 # 26 "/usr/include/boost/lambda/core.hpp" 2 3 4
74781 # 1 "/usr/include/boost/type_traits/cv_traits.hpp" 1 3 4
74782 # 15 "/usr/include/boost/type_traits/cv_traits.hpp" 3 4
74783 # 1 "/usr/include/boost/type_traits/add_const.hpp" 1 3 4
74784 # 16 "/usr/include/boost/type_traits/add_const.hpp" 3 4
74785 # 1 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 1 3 4
74786 # 14 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 3 4
74787 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
74788 # 15 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 2 3 4
74789 # 17 "/usr/include/boost/type_traits/add_const.hpp" 2 3 4
74790
74791 namespace boost {
74792 # 33 "/usr/include/boost/type_traits/add_const.hpp" 3 4
74793 template< typename T > struct add_const { typedef T const type; };
74794
74795
74796
74797
74798
74799
74800 template< typename T > struct add_const<T&> { typedef T& type; };
74801
74802
74803 }
74804
74805 # 1 "/usr/include/boost/type_traits/detail/type_trait_undef.hpp" 1 3 4
74806 # 46 "/usr/include/boost/type_traits/add_const.hpp" 2 3 4
74807 # 16 "/usr/include/boost/type_traits/cv_traits.hpp" 2 3 4
74808 # 1 "/usr/include/boost/type_traits/add_volatile.hpp" 1 3 4
74809 # 16 "/usr/include/boost/type_traits/add_volatile.hpp" 3 4
74810 # 1 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 1 3 4
74811 # 14 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 3 4
74812 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
74813 # 15 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 2 3 4
74814 # 17 "/usr/include/boost/type_traits/add_volatile.hpp" 2 3 4
74815
74816 namespace boost {
74817 # 33 "/usr/include/boost/type_traits/add_volatile.hpp" 3 4
74818 template< typename T > struct add_volatile { typedef T volatile type; };
74819
74820
74821
74822
74823
74824
74825 template< typename T > struct add_volatile<T&> { typedef T& type; };
74826
74827
74828 }
74829
74830 # 1 "/usr/include/boost/type_traits/detail/type_trait_undef.hpp" 1 3 4
74831 # 46 "/usr/include/boost/type_traits/add_volatile.hpp" 2 3 4
74832 # 17 "/usr/include/boost/type_traits/cv_traits.hpp" 2 3 4
74833 # 1 "/usr/include/boost/type_traits/add_cv.hpp" 1 3 4
74834 # 17 "/usr/include/boost/type_traits/add_cv.hpp" 3 4
74835 # 1 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 1 3 4
74836 # 14 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 3 4
74837 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
74838 # 15 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 2 3 4
74839 # 18 "/usr/include/boost/type_traits/add_cv.hpp" 2 3 4
74840
74841 namespace boost {
74842 # 34 "/usr/include/boost/type_traits/add_cv.hpp" 3 4
74843 template< typename T > struct add_cv { typedef T const volatile type; };
74844
74845
74846
74847
74848
74849
74850 template< typename T > struct add_cv<T&> { typedef T& type; };
74851
74852
74853 }
74854
74855 # 1 "/usr/include/boost/type_traits/detail/type_trait_undef.hpp" 1 3 4
74856 # 47 "/usr/include/boost/type_traits/add_cv.hpp" 2 3 4
74857 # 18 "/usr/include/boost/type_traits/cv_traits.hpp" 2 3 4
74858 # 1 "/usr/include/boost/type_traits/is_const.hpp" 1 3 4
74859 # 28 "/usr/include/boost/type_traits/is_const.hpp" 3 4
74860 # 1 "/usr/include/boost/type_traits/detail/cv_traits_impl.hpp" 1 3 4
74861 # 23 "/usr/include/boost/type_traits/detail/cv_traits_impl.hpp" 3 4
74862 namespace boost {
74863 namespace detail {
74864
74865
74866
74867
74868
74869
74870
74871 template <typename T> struct cv_traits_imp {};
74872
74873 template <typename T>
74874 struct cv_traits_imp<T*>
74875 {
74876 static const bool is_const = false;
74877 static const bool is_volatile = false;
74878 typedef T unqualified_type;
74879 };
74880
74881 template <typename T>
74882 struct cv_traits_imp<const T*>
74883 {
74884 static const bool is_const = true;
74885 static const bool is_volatile = false;
74886 typedef T unqualified_type;
74887 };
74888
74889 template <typename T>
74890 struct cv_traits_imp<volatile T*>
74891 {
74892 static const bool is_const = false;
74893 static const bool is_volatile = true;
74894 typedef T unqualified_type;
74895 };
74896
74897 template <typename T>
74898 struct cv_traits_imp<const volatile T*>
74899 {
74900 static const bool is_const = true;
74901 static const bool is_volatile = true;
74902 typedef T unqualified_type;
74903 };
74904 # 92 "/usr/include/boost/type_traits/detail/cv_traits_impl.hpp" 3 4
74905 }
74906 }
74907 # 29 "/usr/include/boost/type_traits/is_const.hpp" 2 3 4
74908 # 43 "/usr/include/boost/type_traits/is_const.hpp" 3 4
74909 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
74910 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
74911 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
74912 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
74913 # 44 "/usr/include/boost/type_traits/is_const.hpp" 2 3 4
74914
74915 namespace boost {
74916
74917
74918
74919
74920
74921
74922
74923 template< typename T > struct is_const : ::boost::integral_constant<bool,::boost::detail::cv_traits_imp<T*>::is_const> { };
74924
74925 template< typename T > struct is_const< T& > : ::boost::integral_constant<bool,false> { };
74926 # 137 "/usr/include/boost/type_traits/is_const.hpp" 3 4
74927 }
74928
74929 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
74930 # 140 "/usr/include/boost/type_traits/is_const.hpp" 2 3 4
74931 # 19 "/usr/include/boost/type_traits/cv_traits.hpp" 2 3 4
74932 # 1 "/usr/include/boost/type_traits/is_volatile.hpp" 1 3 4
74933 # 40 "/usr/include/boost/type_traits/is_volatile.hpp" 3 4
74934 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
74935 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
74936 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
74937 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
74938 # 41 "/usr/include/boost/type_traits/is_volatile.hpp" 2 3 4
74939
74940 namespace boost {
74941
74942
74943
74944
74945
74946
74947
74948 template< typename T > struct is_volatile : ::boost::integral_constant<bool,::boost::detail::cv_traits_imp<T*>::is_volatile> { };
74949
74950 template< typename T > struct is_volatile< T& > : ::boost::integral_constant<bool,false> { };
74951 # 127 "/usr/include/boost/type_traits/is_volatile.hpp" 3 4
74952 }
74953
74954 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
74955 # 130 "/usr/include/boost/type_traits/is_volatile.hpp" 2 3 4
74956 # 20 "/usr/include/boost/type_traits/cv_traits.hpp" 2 3 4
74957 # 1 "/usr/include/boost/type_traits/remove_const.hpp" 1 3 4
74958 # 27 "/usr/include/boost/type_traits/remove_const.hpp" 3 4
74959 # 1 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 1 3 4
74960 # 14 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 3 4
74961 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
74962 # 15 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 2 3 4
74963 # 28 "/usr/include/boost/type_traits/remove_const.hpp" 2 3 4
74964
74965 namespace boost {
74966
74967
74968
74969 namespace detail {
74970
74971 template <typename T, bool is_vol>
74972 struct remove_const_helper
74973 {
74974 typedef T type;
74975 };
74976
74977 template <typename T>
74978 struct remove_const_helper<T, true>
74979 {
74980 typedef T volatile type;
74981 };
74982
74983
74984 template <typename T>
74985 struct remove_const_impl
74986 {
74987 typedef typename remove_const_helper<
74988 typename cv_traits_imp<T*>::unqualified_type
74989 , ::boost::is_volatile<T>::value
74990 >::type type;
74991 };
74992
74993 }
74994
74995
74996
74997 template< typename T > struct remove_const { typedef typename boost::detail::remove_const_impl<T>::type type; };
74998 template< typename T > struct remove_const<T&> { typedef T& type; };
74999
75000 template< typename T, std::size_t N > struct remove_const<T const[N]> { typedef T type[N]; };
75001 template< typename T, std::size_t N > struct remove_const<T const volatile[N]> { typedef T volatile type[N]; };
75002 # 74 "/usr/include/boost/type_traits/remove_const.hpp" 3 4
75003 }
75004
75005 # 1 "/usr/include/boost/type_traits/detail/type_trait_undef.hpp" 1 3 4
75006 # 77 "/usr/include/boost/type_traits/remove_const.hpp" 2 3 4
75007 # 21 "/usr/include/boost/type_traits/cv_traits.hpp" 2 3 4
75008 # 1 "/usr/include/boost/type_traits/remove_volatile.hpp" 1 3 4
75009 # 27 "/usr/include/boost/type_traits/remove_volatile.hpp" 3 4
75010 # 1 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 1 3 4
75011 # 14 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 3 4
75012 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
75013 # 15 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 2 3 4
75014 # 28 "/usr/include/boost/type_traits/remove_volatile.hpp" 2 3 4
75015
75016 namespace boost {
75017
75018
75019
75020 namespace detail {
75021
75022 template <typename T, bool is_const>
75023 struct remove_volatile_helper
75024 {
75025 typedef T type;
75026 };
75027
75028 template <typename T>
75029 struct remove_volatile_helper<T,true>
75030 {
75031 typedef T const type;
75032 };
75033
75034 template <typename T>
75035 struct remove_volatile_impl
75036 {
75037 typedef typename remove_volatile_helper<
75038 typename cv_traits_imp<T*>::unqualified_type
75039 , ::boost::is_const<T>::value
75040 >::type type;
75041 };
75042
75043 }
75044
75045
75046
75047 template< typename T > struct remove_volatile { typedef typename boost::detail::remove_volatile_impl<T>::type type; };
75048 template< typename T > struct remove_volatile<T&> { typedef T& type; };
75049
75050 template< typename T, std::size_t N > struct remove_volatile<T volatile[N]> { typedef T type[N]; };
75051 template< typename T, std::size_t N > struct remove_volatile<T const volatile[N]> { typedef T const type[N]; };
75052 # 73 "/usr/include/boost/type_traits/remove_volatile.hpp" 3 4
75053 }
75054
75055 # 1 "/usr/include/boost/type_traits/detail/type_trait_undef.hpp" 1 3 4
75056 # 76 "/usr/include/boost/type_traits/remove_volatile.hpp" 2 3 4
75057 # 22 "/usr/include/boost/type_traits/cv_traits.hpp" 2 3 4
75058 # 1 "/usr/include/boost/type_traits/remove_cv.hpp" 1 3 4
75059 # 26 "/usr/include/boost/type_traits/remove_cv.hpp" 3 4
75060 # 1 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 1 3 4
75061 # 14 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 3 4
75062 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
75063 # 15 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 2 3 4
75064 # 27 "/usr/include/boost/type_traits/remove_cv.hpp" 2 3 4
75065
75066 namespace boost {
75067
75068
75069
75070
75071 template< typename T > struct remove_cv { typedef typename boost::detail::cv_traits_imp<T*>::unqualified_type type; };
75072 template< typename T > struct remove_cv<T&> { typedef T& type; };
75073
75074 template< typename T, std::size_t N > struct remove_cv<T const[N]> { typedef T type[N]; };
75075 template< typename T, std::size_t N > struct remove_cv<T volatile[N]> { typedef T type[N]; };
75076 template< typename T, std::size_t N > struct remove_cv<T const volatile[N]> { typedef T type[N]; };
75077 # 57 "/usr/include/boost/type_traits/remove_cv.hpp" 3 4
75078 }
75079
75080 # 1 "/usr/include/boost/type_traits/detail/type_trait_undef.hpp" 1 3 4
75081 # 60 "/usr/include/boost/type_traits/remove_cv.hpp" 2 3 4
75082 # 23 "/usr/include/boost/type_traits/cv_traits.hpp" 2 3 4
75083 # 27 "/usr/include/boost/lambda/core.hpp" 2 3 4
75084
75085 # 1 "/usr/include/boost/tuple/tuple.hpp" 1 3 4
75086 # 32 "/usr/include/boost/tuple/tuple.hpp" 3 4
75087 # 1 "/usr/include/boost/ref.hpp" 1 3 4
75088 # 11 "/usr/include/boost/ref.hpp" 3 4
75089 # 1 "/usr/include/boost/utility/addressof.hpp" 1 3 4
75090 # 17 "/usr/include/boost/utility/addressof.hpp" 3 4
75091 namespace boost {
75092 # 32 "/usr/include/boost/utility/addressof.hpp" 3 4
75093 template <typename T> T*
75094
75095 addressof(T& v)
75096 {
75097 return reinterpret_cast<T*>(
75098 &const_cast<char&>(reinterpret_cast<const volatile char &>(v)));
75099 }
75100 # 56 "/usr/include/boost/utility/addressof.hpp" 3 4
75101 }
75102 # 12 "/usr/include/boost/ref.hpp" 2 3 4
75103 # 29 "/usr/include/boost/ref.hpp" 3 4
75104 namespace boost
75105 {
75106
75107 template<class T> class reference_wrapper
75108 {
75109 public:
75110 typedef T type;
75111
75112
75113
75114
75115
75116
75117
75118 explicit reference_wrapper(T& t): t_(boost::addressof(t)) {}
75119
75120
75121
75122 operator T& () const { return *t_; }
75123
75124 T& get() const { return *t_; }
75125
75126 T* get_pointer() const { return t_; }
75127
75128 private:
75129
75130 T* t_;
75131 };
75132
75133
75134
75135
75136
75137
75138
75139 template<class T> inline reference_wrapper<T> const ref(T & t)
75140 {
75141 return reference_wrapper<T>(t);
75142 }
75143
75144 template<class T> inline reference_wrapper<T const> const cref(T const & t)
75145 {
75146 return reference_wrapper<T const>(t);
75147 }
75148
75149
75150
75151
75152
75153 template<typename T>
75154 class is_reference_wrapper
75155 : public mpl::false_
75156 {
75157 };
75158
75159 template<typename T>
75160 class unwrap_reference
75161 {
75162 public:
75163 typedef T type;
75164 };
75165 # 106 "/usr/include/boost/ref.hpp" 3 4
75166 template<typename T> class is_reference_wrapper< reference_wrapper<T> > : public mpl::true_ { }; template<typename T> class unwrap_reference< reference_wrapper<T> > { public: typedef T type; };
75167
75168 template<typename T> class is_reference_wrapper< reference_wrapper<T> const > : public mpl::true_ { }; template<typename T> class unwrap_reference< reference_wrapper<T> const > { public: typedef T type; };
75169 template<typename T> class is_reference_wrapper< reference_wrapper<T> volatile > : public mpl::true_ { }; template<typename T> class unwrap_reference< reference_wrapper<T> volatile > { public: typedef T type; };
75170 template<typename T> class is_reference_wrapper< reference_wrapper<T> const volatile > : public mpl::true_ { }; template<typename T> class unwrap_reference< reference_wrapper<T> const volatile > { public: typedef T type; };
75171 # 176 "/usr/include/boost/ref.hpp" 3 4
75172 }
75173 # 33 "/usr/include/boost/tuple/tuple.hpp" 2 3 4
75174 # 1 "/usr/include/boost/tuple/detail/tuple_basic.hpp" 1 3 4
75175 # 38 "/usr/include/boost/tuple/detail/tuple_basic.hpp" 3 4
75176 # 1 "/usr/include/boost/type_traits/cv_traits.hpp" 1 3 4
75177 # 39 "/usr/include/boost/tuple/detail/tuple_basic.hpp" 2 3 4
75178 # 1 "/usr/include/boost/type_traits/function_traits.hpp" 1 3 4
75179 # 13 "/usr/include/boost/type_traits/function_traits.hpp" 3 4
75180 # 1 "/usr/include/boost/type_traits/is_function.hpp" 1 3 4
75181 # 15 "/usr/include/boost/type_traits/is_function.hpp" 3 4
75182 # 1 "/usr/include/boost/type_traits/detail/false_result.hpp" 1 3 4
75183 # 14 "/usr/include/boost/type_traits/detail/false_result.hpp" 3 4
75184 namespace boost {
75185 namespace type_traits {
75186
75187
75188 struct false_result
75189 {
75190 template <typename T> struct result_
75191 {
75192 static const bool value = false;
75193 };
75194 };
75195
75196 }}
75197 # 16 "/usr/include/boost/type_traits/is_function.hpp" 2 3 4
75198
75199
75200
75201 # 1 "/usr/include/boost/type_traits/detail/is_function_ptr_helper.hpp" 1 3 4
75202 # 26 "/usr/include/boost/type_traits/detail/is_function_ptr_helper.hpp" 3 4
75203 namespace boost {
75204 namespace type_traits {
75205
75206 template <class R>
75207 struct is_function_ptr_helper
75208 {
75209 static const bool value = false;
75210 };
75211
75212
75213
75214
75215 template <class R >
75216 struct is_function_ptr_helper<R (*)()> { static const bool value = true; };
75217
75218 template <class R >
75219 struct is_function_ptr_helper<R (*)( ...)> { static const bool value = true; };
75220
75221 template <class R , class T0>
75222 struct is_function_ptr_helper<R (*)( T0)> { static const bool value = true; };
75223
75224 template <class R , class T0>
75225 struct is_function_ptr_helper<R (*)( T0 ...)> { static const bool value = true; };
75226
75227 template <class R , class T0 , class T1>
75228 struct is_function_ptr_helper<R (*)( T0 , T1)> { static const bool value = true; };
75229
75230 template <class R , class T0 , class T1>
75231 struct is_function_ptr_helper<R (*)( T0 , T1 ...)> { static const bool value = true; };
75232
75233 template <class R , class T0 , class T1 , class T2>
75234 struct is_function_ptr_helper<R (*)( T0 , T1 , T2)> { static const bool value = true; };
75235
75236 template <class R , class T0 , class T1 , class T2>
75237 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 ...)> { static const bool value = true; };
75238
75239 template <class R , class T0 , class T1 , class T2 , class T3>
75240 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3)> { static const bool value = true; };
75241
75242 template <class R , class T0 , class T1 , class T2 , class T3>
75243 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 ...)> { static const bool value = true; };
75244
75245 template <class R , class T0 , class T1 , class T2 , class T3 , class T4>
75246 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4)> { static const bool value = true; };
75247
75248 template <class R , class T0 , class T1 , class T2 , class T3 , class T4>
75249 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 ...)> { static const bool value = true; };
75250
75251 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5>
75252 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5)> { static const bool value = true; };
75253
75254 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5>
75255 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 ...)> { static const bool value = true; };
75256
75257 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6>
75258 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)> { static const bool value = true; };
75259
75260 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6>
75261 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...)> { static const bool value = true; };
75262
75263 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7>
75264 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)> { static const bool value = true; };
75265
75266 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7>
75267 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...)> { static const bool value = true; };
75268
75269 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8>
75270 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)> { static const bool value = true; };
75271
75272 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8>
75273 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...)> { static const bool value = true; };
75274
75275 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9>
75276 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)> { static const bool value = true; };
75277
75278 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9>
75279 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...)> { static const bool value = true; };
75280
75281 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10>
75282 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)> { static const bool value = true; };
75283
75284 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10>
75285 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...)> { static const bool value = true; };
75286
75287 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11>
75288 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)> { static const bool value = true; };
75289
75290 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11>
75291 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...)> { static const bool value = true; };
75292
75293 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12>
75294 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)> { static const bool value = true; };
75295
75296 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12>
75297 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...)> { static const bool value = true; };
75298
75299 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13>
75300 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)> { static const bool value = true; };
75301
75302 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13>
75303 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...)> { static const bool value = true; };
75304
75305 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14>
75306 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)> { static const bool value = true; };
75307
75308 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14>
75309 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...)> { static const bool value = true; };
75310
75311 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15>
75312 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)> { static const bool value = true; };
75313
75314 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15>
75315 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...)> { static const bool value = true; };
75316
75317 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16>
75318 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)> { static const bool value = true; };
75319
75320 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16>
75321 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...)> { static const bool value = true; };
75322
75323 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17>
75324 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)> { static const bool value = true; };
75325
75326 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17>
75327 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...)> { static const bool value = true; };
75328
75329 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18>
75330 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)> { static const bool value = true; };
75331
75332 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18>
75333 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...)> { static const bool value = true; };
75334
75335 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19>
75336 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)> { static const bool value = true; };
75337
75338 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19>
75339 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...)> { static const bool value = true; };
75340
75341 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20>
75342 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)> { static const bool value = true; };
75343
75344 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20>
75345 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...)> { static const bool value = true; };
75346
75347 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21>
75348 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)> { static const bool value = true; };
75349
75350 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21>
75351 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...)> { static const bool value = true; };
75352
75353 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22>
75354 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)> { static const bool value = true; };
75355
75356 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22>
75357 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...)> { static const bool value = true; };
75358
75359 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23>
75360 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)> { static const bool value = true; };
75361
75362 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23>
75363 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...)> { static const bool value = true; };
75364
75365 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24>
75366 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)> { static const bool value = true; };
75367
75368 template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24>
75369 struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...)> { static const bool value = true; };
75370 # 203 "/usr/include/boost/type_traits/detail/is_function_ptr_helper.hpp" 3 4
75371 }
75372 }
75373 # 20 "/usr/include/boost/type_traits/is_function.hpp" 2 3 4
75374
75375
75376
75377
75378
75379
75380 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
75381 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
75382 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
75383 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
75384 # 27 "/usr/include/boost/type_traits/is_function.hpp" 2 3 4
75385
75386
75387
75388
75389
75390
75391
75392 namespace boost {
75393 namespace detail {
75394
75395
75396 template<bool is_ref = true>
75397 struct is_function_chooser
75398 : ::boost::type_traits::false_result
75399 {
75400 };
75401
75402 template <>
75403 struct is_function_chooser<false>
75404 {
75405 template< typename T > struct result_
75406 : ::boost::type_traits::is_function_ptr_helper<T*>
75407 {
75408 };
75409 };
75410
75411 template <typename T>
75412 struct is_function_impl
75413 : is_function_chooser< ::boost::is_reference<T>::value >
75414 ::template result_<T>
75415 {
75416 };
75417 # 80 "/usr/include/boost/type_traits/is_function.hpp" 3 4
75418 }
75419
75420 template< typename T > struct is_function : ::boost::integral_constant<bool,::boost::detail::is_function_impl<T>::value> { };
75421
75422 }
75423
75424 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
75425 # 87 "/usr/include/boost/type_traits/is_function.hpp" 2 3 4
75426 # 14 "/usr/include/boost/type_traits/function_traits.hpp" 2 3 4
75427
75428
75429 namespace boost {
75430
75431
75432 namespace detail {
75433
75434 template<typename Function> struct function_traits_helper;
75435
75436 template<typename R>
75437 struct function_traits_helper<R (*)(void)>
75438 {
75439 static const int arity = 0;
75440 typedef R result_type;
75441 };
75442
75443 template<typename R, typename T1>
75444 struct function_traits_helper<R (*)(T1)>
75445 {
75446 static const int arity = 1;
75447 typedef R result_type;
75448 typedef T1 arg1_type;
75449 typedef T1 argument_type;
75450 };
75451
75452 template<typename R, typename T1, typename T2>
75453 struct function_traits_helper<R (*)(T1, T2)>
75454 {
75455 static const int arity = 2;
75456 typedef R result_type;
75457 typedef T1 arg1_type;
75458 typedef T2 arg2_type;
75459 typedef T1 first_argument_type;
75460 typedef T2 second_argument_type;
75461 };
75462
75463 template<typename R, typename T1, typename T2, typename T3>
75464 struct function_traits_helper<R (*)(T1, T2, T3)>
75465 {
75466 static const int arity = 3;
75467 typedef R result_type;
75468 typedef T1 arg1_type;
75469 typedef T2 arg2_type;
75470 typedef T3 arg3_type;
75471 };
75472
75473 template<typename R, typename T1, typename T2, typename T3, typename T4>
75474 struct function_traits_helper<R (*)(T1, T2, T3, T4)>
75475 {
75476 static const int arity = 4;
75477 typedef R result_type;
75478 typedef T1 arg1_type;
75479 typedef T2 arg2_type;
75480 typedef T3 arg3_type;
75481 typedef T4 arg4_type;
75482 };
75483
75484 template<typename R, typename T1, typename T2, typename T3, typename T4,
75485 typename T5>
75486 struct function_traits_helper<R (*)(T1, T2, T3, T4, T5)>
75487 {
75488 static const int arity = 5;
75489 typedef R result_type;
75490 typedef T1 arg1_type;
75491 typedef T2 arg2_type;
75492 typedef T3 arg3_type;
75493 typedef T4 arg4_type;
75494 typedef T5 arg5_type;
75495 };
75496
75497 template<typename R, typename T1, typename T2, typename T3, typename T4,
75498 typename T5, typename T6>
75499 struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6)>
75500 {
75501 static const int arity = 6;
75502 typedef R result_type;
75503 typedef T1 arg1_type;
75504 typedef T2 arg2_type;
75505 typedef T3 arg3_type;
75506 typedef T4 arg4_type;
75507 typedef T5 arg5_type;
75508 typedef T6 arg6_type;
75509 };
75510
75511 template<typename R, typename T1, typename T2, typename T3, typename T4,
75512 typename T5, typename T6, typename T7>
75513 struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6, T7)>
75514 {
75515 static const int arity = 7;
75516 typedef R result_type;
75517 typedef T1 arg1_type;
75518 typedef T2 arg2_type;
75519 typedef T3 arg3_type;
75520 typedef T4 arg4_type;
75521 typedef T5 arg5_type;
75522 typedef T6 arg6_type;
75523 typedef T7 arg7_type;
75524 };
75525
75526 template<typename R, typename T1, typename T2, typename T3, typename T4,
75527 typename T5, typename T6, typename T7, typename T8>
75528 struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6, T7, T8)>
75529 {
75530 static const int arity = 8;
75531 typedef R result_type;
75532 typedef T1 arg1_type;
75533 typedef T2 arg2_type;
75534 typedef T3 arg3_type;
75535 typedef T4 arg4_type;
75536 typedef T5 arg5_type;
75537 typedef T6 arg6_type;
75538 typedef T7 arg7_type;
75539 typedef T8 arg8_type;
75540 };
75541
75542 template<typename R, typename T1, typename T2, typename T3, typename T4,
75543 typename T5, typename T6, typename T7, typename T8, typename T9>
75544 struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6, T7, T8, T9)>
75545 {
75546 static const int arity = 9;
75547 typedef R result_type;
75548 typedef T1 arg1_type;
75549 typedef T2 arg2_type;
75550 typedef T3 arg3_type;
75551 typedef T4 arg4_type;
75552 typedef T5 arg5_type;
75553 typedef T6 arg6_type;
75554 typedef T7 arg7_type;
75555 typedef T8 arg8_type;
75556 typedef T9 arg9_type;
75557 };
75558
75559 template<typename R, typename T1, typename T2, typename T3, typename T4,
75560 typename T5, typename T6, typename T7, typename T8, typename T9,
75561 typename T10>
75562 struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)>
75563 {
75564 static const int arity = 10;
75565 typedef R result_type;
75566 typedef T1 arg1_type;
75567 typedef T2 arg2_type;
75568 typedef T3 arg3_type;
75569 typedef T4 arg4_type;
75570 typedef T5 arg5_type;
75571 typedef T6 arg6_type;
75572 typedef T7 arg7_type;
75573 typedef T8 arg8_type;
75574 typedef T9 arg9_type;
75575 typedef T10 arg10_type;
75576 };
75577
75578 }
75579
75580 template<typename Function>
75581 struct function_traits :
75582 public detail::function_traits_helper<typename boost::add_pointer<Function>::type>
75583 {
75584 };
75585 # 234 "/usr/include/boost/type_traits/function_traits.hpp" 3 4
75586 }
75587 # 40 "/usr/include/boost/tuple/detail/tuple_basic.hpp" 2 3 4
75588
75589
75590
75591 namespace boost {
75592 namespace tuples {
75593
75594
75595 struct null_type {};
75596
75597
75598 namespace detail {
75599 inline const null_type cnull() { return null_type(); }
75600
75601
75602
75603
75604
75605 template <bool If, class Then, class Else> struct IF { typedef Then RET; };
75606
75607 template <class Then, class Else> struct IF<false, Then, Else> {
75608 typedef Else RET;
75609 };
75610
75611 }
75612
75613
75614 template <class HT, class TT> struct cons;
75615
75616
75617
75618 template <
75619 class T0 = null_type, class T1 = null_type, class T2 = null_type,
75620 class T3 = null_type, class T4 = null_type, class T5 = null_type,
75621 class T6 = null_type, class T7 = null_type, class T8 = null_type,
75622 class T9 = null_type>
75623 class tuple;
75624
75625
75626 template<class T> struct length;
75627
75628
75629
75630 namespace detail {
75631
75632
75633
75634 template<class T>
75635 class generate_error;
75636
75637
75638
75639
75640 template< int N >
75641 struct get_class {
75642 template<class RET, class HT, class TT >
75643 inline static RET get(const cons<HT, TT>& t)
75644 {
75645
75646
75647
75648
75649
75650 return get_class<N-1>::template get<RET>(t.tail);
75651
75652 }
75653 template<class RET, class HT, class TT >
75654 inline static RET get(cons<HT, TT>& t)
75655 {
75656
75657
75658
75659 return get_class<N-1>::template get<RET>(t.tail);
75660
75661 }
75662 };
75663
75664 template<>
75665 struct get_class<0> {
75666 template<class RET, class HT, class TT>
75667 inline static RET get(const cons<HT, TT>& t)
75668 {
75669 return t.head;
75670 }
75671 template<class RET, class HT, class TT>
75672 inline static RET get(cons<HT, TT>& t)
75673 {
75674 return t.head;
75675 }
75676 };
75677
75678 }
75679 # 140 "/usr/include/boost/tuple/detail/tuple_basic.hpp" 3 4
75680 template<int N, class T>
75681 struct element
75682 {
75683 private:
75684 typedef typename T::tail_type Next;
75685 public:
75686 typedef typename element<N-1, Next>::type type;
75687 };
75688 template<class T>
75689 struct element<0,T>
75690 {
75691 typedef typename T::head_type type;
75692 };
75693
75694 template<int N, class T>
75695 struct element<N, const T>
75696 {
75697 private:
75698 typedef typename T::tail_type Next;
75699 typedef typename element<N-1, Next>::type unqualified_type;
75700 public:
75701
75702
75703
75704 typedef typename boost::add_const<unqualified_type>::type type;
75705
75706
75707 };
75708 template<class T>
75709 struct element<0,const T>
75710 {
75711
75712
75713
75714 typedef typename boost::add_const<typename T::head_type>::type type;
75715
75716 };
75717 # 233 "/usr/include/boost/tuple/detail/tuple_basic.hpp" 3 4
75718 template <class T> struct access_traits {
75719 typedef const T& const_type;
75720 typedef T& non_const_type;
75721
75722 typedef const typename boost::remove_cv<T>::type& parameter_type;
75723
75724
75725
75726
75727
75728
75729 };
75730
75731 template <class T> struct access_traits<T&> {
75732
75733 typedef T& const_type;
75734 typedef T& non_const_type;
75735
75736 typedef T& parameter_type;
75737 };
75738
75739
75740
75741 template<int N, class HT, class TT>
75742 inline typename access_traits<
75743 typename element<N, cons<HT, TT> >::type
75744 >::non_const_type
75745 get(cons<HT, TT>& c ) {
75746
75747
75748
75749 return detail::get_class<N>::template
75750
75751 get<
75752 typename access_traits<
75753 typename element<N, cons<HT, TT> >::type
75754 >::non_const_type,
75755 HT,TT
75756 >(c);
75757 }
75758
75759
75760
75761
75762 template<int N, class HT, class TT>
75763 inline typename access_traits<
75764 typename element<N, cons<HT, TT> >::type
75765 >::const_type
75766 get(const cons<HT, TT>& c ) {
75767
75768
75769
75770 return detail::get_class<N>::template
75771
75772 get<
75773 typename access_traits<
75774 typename element<N, cons<HT, TT> >::type
75775 >::const_type,
75776 HT,TT
75777 >(c);
75778 }
75779
75780
75781 namespace detail {
75782
75783
75784
75785
75786
75787
75788
75789 template <class T> class non_storeable_type {
75790 non_storeable_type();
75791 };
75792
75793 template <class T> struct wrap_non_storeable_type {
75794 typedef typename IF<
75795 ::boost::is_function<T>::value, non_storeable_type<T>, T
75796 >::RET type;
75797 };
75798 template <> struct wrap_non_storeable_type<void> {
75799 typedef non_storeable_type<void> type;
75800 };
75801
75802 }
75803
75804 template <class HT, class TT>
75805 struct cons {
75806
75807 typedef HT head_type;
75808 typedef TT tail_type;
75809
75810 typedef typename
75811 detail::wrap_non_storeable_type<head_type>::type stored_head_type;
75812
75813 stored_head_type head;
75814 tail_type tail;
75815
75816 typename access_traits<stored_head_type>::non_const_type
75817 get_head() { return head; }
75818
75819 typename access_traits<tail_type>::non_const_type
75820 get_tail() { return tail; }
75821
75822 typename access_traits<stored_head_type>::const_type
75823 get_head() const { return head; }
75824
75825 typename access_traits<tail_type>::const_type
75826 get_tail() const { return tail; }
75827
75828 cons() : head(), tail() {}
75829
75830
75831
75832
75833
75834
75835
75836 cons(typename access_traits<stored_head_type>::parameter_type h,
75837 const tail_type& t)
75838 : head (h), tail(t) {}
75839
75840 template <class T1, class T2, class T3, class T4, class T5,
75841 class T6, class T7, class T8, class T9, class T10>
75842 cons( T1& t1, T2& t2, T3& t3, T4& t4, T5& t5,
75843 T6& t6, T7& t7, T8& t8, T9& t9, T10& t10 )
75844 : head (t1),
75845 tail (t2, t3, t4, t5, t6, t7, t8, t9, t10, detail::cnull())
75846 {}
75847
75848 template <class T2, class T3, class T4, class T5,
75849 class T6, class T7, class T8, class T9, class T10>
75850 cons( const null_type& , T2& t2, T3& t3, T4& t4, T5& t5,
75851 T6& t6, T7& t7, T8& t8, T9& t9, T10& t10 )
75852 : head (),
75853 tail (t2, t3, t4, t5, t6, t7, t8, t9, t10, detail::cnull())
75854 {}
75855
75856
75857 template <class HT2, class TT2>
75858 cons( const cons<HT2, TT2>& u ) : head(u.head), tail(u.tail) {}
75859
75860 template <class HT2, class TT2>
75861 cons& operator=( const cons<HT2, TT2>& u ) {
75862 head=u.head; tail=u.tail; return *this;
75863 }
75864
75865
75866
75867 cons& operator=(const cons& u) {
75868 head = u.head; tail = u.tail; return *this;
75869 }
75870
75871 template <class T1, class T2>
75872 cons& operator=( const std::pair<T1, T2>& u ) {
75873 typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( length<cons>::value == 2 ) >)> boost_static_assert_typedef_388;
75874 head = u.first; tail.head = u.second; return *this;
75875 }
75876
75877
75878 template <int N>
75879 typename access_traits<
75880 typename element<N, cons<HT, TT> >::type
75881 >::non_const_type
75882 get() {
75883 return boost::tuples::get<N>(*this);
75884 }
75885
75886 template <int N>
75887 typename access_traits<
75888 typename element<N, cons<HT, TT> >::type
75889 >::const_type
75890 get() const {
75891 return boost::tuples::get<N>(*this);
75892 }
75893 };
75894
75895 template <class HT>
75896 struct cons<HT, null_type> {
75897
75898 typedef HT head_type;
75899 typedef null_type tail_type;
75900 typedef cons<HT, null_type> self_type;
75901
75902 typedef typename
75903 detail::wrap_non_storeable_type<head_type>::type stored_head_type;
75904 stored_head_type head;
75905
75906 typename access_traits<stored_head_type>::non_const_type
75907 get_head() { return head; }
75908
75909 null_type get_tail() { return null_type(); }
75910
75911 typename access_traits<stored_head_type>::const_type
75912 get_head() const { return head; }
75913
75914 const null_type get_tail() const { return null_type(); }
75915
75916
75917 cons() : head() {}
75918
75919 cons(typename access_traits<stored_head_type>::parameter_type h,
75920 const null_type& = null_type())
75921 : head (h) {}
75922
75923 template<class T1>
75924 cons(T1& t1, const null_type&, const null_type&, const null_type&,
75925 const null_type&, const null_type&, const null_type&,
75926 const null_type&, const null_type&, const null_type&)
75927 : head (t1) {}
75928
75929 cons(const null_type&,
75930 const null_type&, const null_type&, const null_type&,
75931 const null_type&, const null_type&, const null_type&,
75932 const null_type&, const null_type&, const null_type&)
75933 : head () {}
75934
75935 template <class HT2>
75936 cons( const cons<HT2, null_type>& u ) : head(u.head) {}
75937
75938 template <class HT2>
75939 cons& operator=(const cons<HT2, null_type>& u )
75940 { head = u.head; return *this; }
75941
75942
75943
75944 cons& operator=(const cons& u) { head = u.head; return *this; }
75945
75946 template <int N>
75947 typename access_traits<
75948 typename element<N, self_type>::type
75949 >::non_const_type
75950 get() {
75951 return boost::tuples::get<N>(*this);
75952 }
75953
75954 template <int N>
75955 typename access_traits<
75956 typename element<N, self_type>::type
75957 >::const_type
75958 get() const {
75959 return boost::tuples::get<N>(*this);
75960 }
75961
75962 };
75963
75964
75965
75966 template<class T>
75967 struct length {
75968 static const int value = 1 + length<typename T::tail_type>::value;
75969 };
75970
75971 template<>
75972 struct length<tuple<> > {
75973 static const int value = 0;
75974 };
75975
75976 template<>
75977 struct length<null_type> {
75978 static const int value = 0;
75979 };
75980
75981
75982 namespace detail {
75983
75984
75985 template <class T0, class T1, class T2, class T3, class T4,
75986 class T5, class T6, class T7, class T8, class T9>
75987 struct map_tuple_to_cons
75988 {
75989 typedef cons<T0,
75990 typename map_tuple_to_cons<T1, T2, T3, T4, T5,
75991 T6, T7, T8, T9, null_type>::type
75992 > type;
75993 };
75994
75995
75996 template <>
75997 struct map_tuple_to_cons<null_type, null_type, null_type, null_type, null_type, null_type, null_type, null_type, null_type, null_type>
75998 {
75999 typedef null_type type;
76000 };
76001
76002 }
76003
76004
76005
76006 template <class T0, class T1, class T2, class T3, class T4,
76007 class T5, class T6, class T7, class T8, class T9>
76008
76009 class tuple :
76010 public detail::map_tuple_to_cons<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>::type
76011 {
76012 public:
76013 typedef typename
76014 detail::map_tuple_to_cons<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>::type inherited;
76015 typedef typename inherited::head_type head_type;
76016 typedef typename inherited::tail_type tail_type;
76017
76018
76019
76020 tuple() {}
76021
76022 tuple(typename access_traits<T0>::parameter_type t0)
76023 : inherited(t0, detail::cnull(), detail::cnull(), detail::cnull(),
76024 detail::cnull(), detail::cnull(), detail::cnull(),
76025 detail::cnull(), detail::cnull(), detail::cnull()) {}
76026
76027 tuple(typename access_traits<T0>::parameter_type t0,
76028 typename access_traits<T1>::parameter_type t1)
76029 : inherited(t0, t1, detail::cnull(), detail::cnull(),
76030 detail::cnull(), detail::cnull(), detail::cnull(),
76031 detail::cnull(), detail::cnull(), detail::cnull()) {}
76032
76033 tuple(typename access_traits<T0>::parameter_type t0,
76034 typename access_traits<T1>::parameter_type t1,
76035 typename access_traits<T2>::parameter_type t2)
76036 : inherited(t0, t1, t2, detail::cnull(), detail::cnull(),
76037 detail::cnull(), detail::cnull(), detail::cnull(),
76038 detail::cnull(), detail::cnull()) {}
76039
76040 tuple(typename access_traits<T0>::parameter_type t0,
76041 typename access_traits<T1>::parameter_type t1,
76042 typename access_traits<T2>::parameter_type t2,
76043 typename access_traits<T3>::parameter_type t3)
76044 : inherited(t0, t1, t2, t3, detail::cnull(), detail::cnull(),
76045 detail::cnull(), detail::cnull(), detail::cnull(),
76046 detail::cnull()) {}
76047
76048 tuple(typename access_traits<T0>::parameter_type t0,
76049 typename access_traits<T1>::parameter_type t1,
76050 typename access_traits<T2>::parameter_type t2,
76051 typename access_traits<T3>::parameter_type t3,
76052 typename access_traits<T4>::parameter_type t4)
76053 : inherited(t0, t1, t2, t3, t4, detail::cnull(), detail::cnull(),
76054 detail::cnull(), detail::cnull(), detail::cnull()) {}
76055
76056 tuple(typename access_traits<T0>::parameter_type t0,
76057 typename access_traits<T1>::parameter_type t1,
76058 typename access_traits<T2>::parameter_type t2,
76059 typename access_traits<T3>::parameter_type t3,
76060 typename access_traits<T4>::parameter_type t4,
76061 typename access_traits<T5>::parameter_type t5)
76062 : inherited(t0, t1, t2, t3, t4, t5, detail::cnull(), detail::cnull(),
76063 detail::cnull(), detail::cnull()) {}
76064
76065 tuple(typename access_traits<T0>::parameter_type t0,
76066 typename access_traits<T1>::parameter_type t1,
76067 typename access_traits<T2>::parameter_type t2,
76068 typename access_traits<T3>::parameter_type t3,
76069 typename access_traits<T4>::parameter_type t4,
76070 typename access_traits<T5>::parameter_type t5,
76071 typename access_traits<T6>::parameter_type t6)
76072 : inherited(t0, t1, t2, t3, t4, t5, t6, detail::cnull(),
76073 detail::cnull(), detail::cnull()) {}
76074
76075 tuple(typename access_traits<T0>::parameter_type t0,
76076 typename access_traits<T1>::parameter_type t1,
76077 typename access_traits<T2>::parameter_type t2,
76078 typename access_traits<T3>::parameter_type t3,
76079 typename access_traits<T4>::parameter_type t4,
76080 typename access_traits<T5>::parameter_type t5,
76081 typename access_traits<T6>::parameter_type t6,
76082 typename access_traits<T7>::parameter_type t7)
76083 : inherited(t0, t1, t2, t3, t4, t5, t6, t7, detail::cnull(),
76084 detail::cnull()) {}
76085
76086 tuple(typename access_traits<T0>::parameter_type t0,
76087 typename access_traits<T1>::parameter_type t1,
76088 typename access_traits<T2>::parameter_type t2,
76089 typename access_traits<T3>::parameter_type t3,
76090 typename access_traits<T4>::parameter_type t4,
76091 typename access_traits<T5>::parameter_type t5,
76092 typename access_traits<T6>::parameter_type t6,
76093 typename access_traits<T7>::parameter_type t7,
76094 typename access_traits<T8>::parameter_type t8)
76095 : inherited(t0, t1, t2, t3, t4, t5, t6, t7, t8, detail::cnull()) {}
76096
76097 tuple(typename access_traits<T0>::parameter_type t0,
76098 typename access_traits<T1>::parameter_type t1,
76099 typename access_traits<T2>::parameter_type t2,
76100 typename access_traits<T3>::parameter_type t3,
76101 typename access_traits<T4>::parameter_type t4,
76102 typename access_traits<T5>::parameter_type t5,
76103 typename access_traits<T6>::parameter_type t6,
76104 typename access_traits<T7>::parameter_type t7,
76105 typename access_traits<T8>::parameter_type t8,
76106 typename access_traits<T9>::parameter_type t9)
76107 : inherited(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) {}
76108
76109
76110 template<class U1, class U2>
76111 tuple(const cons<U1, U2>& p) : inherited(p) {}
76112
76113 template <class U1, class U2>
76114 tuple& operator=(const cons<U1, U2>& k) {
76115 inherited::operator=(k);
76116 return *this;
76117 }
76118
76119 template <class U1, class U2>
76120 tuple& operator=(const std::pair<U1, U2>& k) {
76121 typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( length<tuple>::value == 2 ) >)> boost_static_assert_typedef_636;
76122 this->head = k.first;
76123 this->tail.head = k.second;
76124 return *this;
76125 }
76126
76127 };
76128
76129
76130 template <>
76131 class tuple<null_type, null_type, null_type, null_type, null_type, null_type, null_type, null_type, null_type, null_type> :
76132 public null_type
76133 {
76134 public:
76135 typedef null_type inherited;
76136 };
76137
76138
76139
76140 namespace detail {
76141
76142 struct swallow_assign {
76143
76144 template<typename T>
76145 swallow_assign const& operator=(const T&) const {
76146 return *this;
76147 }
76148 };
76149
76150 }
76151
76152
76153 detail::swallow_assign const ignore = detail::swallow_assign();
76154 # 687 "/usr/include/boost/tuple/detail/tuple_basic.hpp" 3 4
76155 template<class T>
76156 struct make_tuple_traits {
76157 typedef T type;
76158
76159
76160
76161
76162
76163
76164
76165 };
76166 # 711 "/usr/include/boost/tuple/detail/tuple_basic.hpp" 3 4
76167 template<class T>
76168 struct make_tuple_traits<T&> {
76169 typedef typename
76170 detail::generate_error<T&>::
76171 do_not_use_with_reference_type error;
76172 };
76173
76174
76175
76176
76177
76178 template<class T, int n> struct make_tuple_traits <T[n]> {
76179 typedef const T (&type)[n];
76180 };
76181
76182 template<class T, int n>
76183 struct make_tuple_traits<const T[n]> {
76184 typedef const T (&type)[n];
76185 };
76186
76187 template<class T, int n> struct make_tuple_traits<volatile T[n]> {
76188 typedef const volatile T (&type)[n];
76189 };
76190
76191 template<class T, int n>
76192 struct make_tuple_traits<const volatile T[n]> {
76193 typedef const volatile T (&type)[n];
76194 };
76195
76196 template<class T>
76197 struct make_tuple_traits<reference_wrapper<T> >{
76198 typedef T& type;
76199 };
76200
76201 template<class T>
76202 struct make_tuple_traits<const reference_wrapper<T> >{
76203 typedef T& type;
76204 };
76205
76206
76207
76208
76209 namespace detail {
76210
76211
76212
76213 template <
76214 class T0 = null_type, class T1 = null_type, class T2 = null_type,
76215 class T3 = null_type, class T4 = null_type, class T5 = null_type,
76216 class T6 = null_type, class T7 = null_type, class T8 = null_type,
76217 class T9 = null_type
76218 >
76219 struct make_tuple_mapper {
76220 typedef
76221 tuple<typename make_tuple_traits<T0>::type,
76222 typename make_tuple_traits<T1>::type,
76223 typename make_tuple_traits<T2>::type,
76224 typename make_tuple_traits<T3>::type,
76225 typename make_tuple_traits<T4>::type,
76226 typename make_tuple_traits<T5>::type,
76227 typename make_tuple_traits<T6>::type,
76228 typename make_tuple_traits<T7>::type,
76229 typename make_tuple_traits<T8>::type,
76230 typename make_tuple_traits<T9>::type> type;
76231 };
76232
76233 }
76234
76235
76236 inline tuple<> make_tuple() {
76237 return tuple<>();
76238 }
76239
76240 template<class T0>
76241 inline typename detail::make_tuple_mapper<T0>::type
76242 make_tuple(const T0& t0) {
76243 typedef typename detail::make_tuple_mapper<T0>::type t;
76244 return t(t0);
76245 }
76246
76247 template<class T0, class T1>
76248 inline typename detail::make_tuple_mapper<T0, T1>::type
76249 make_tuple(const T0& t0, const T1& t1) {
76250 typedef typename detail::make_tuple_mapper<T0, T1>::type t;
76251 return t(t0, t1);
76252 }
76253
76254 template<class T0, class T1, class T2>
76255 inline typename detail::make_tuple_mapper<T0, T1, T2>::type
76256 make_tuple(const T0& t0, const T1& t1, const T2& t2) {
76257 typedef typename detail::make_tuple_mapper<T0, T1, T2>::type t;
76258 return t(t0, t1, t2);
76259 }
76260
76261 template<class T0, class T1, class T2, class T3>
76262 inline typename detail::make_tuple_mapper<T0, T1, T2, T3>::type
76263 make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3) {
76264 typedef typename detail::make_tuple_mapper<T0, T1, T2, T3>::type t;
76265 return t(t0, t1, t2, t3);
76266 }
76267
76268 template<class T0, class T1, class T2, class T3, class T4>
76269 inline typename detail::make_tuple_mapper<T0, T1, T2, T3, T4>::type
76270 make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3,
76271 const T4& t4) {
76272 typedef typename detail::make_tuple_mapper<T0, T1, T2, T3, T4>::type t;
76273 return t(t0, t1, t2, t3, t4);
76274 }
76275
76276 template<class T0, class T1, class T2, class T3, class T4, class T5>
76277 inline typename detail::make_tuple_mapper<T0, T1, T2, T3, T4, T5>::type
76278 make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3,
76279 const T4& t4, const T5& t5) {
76280 typedef typename detail::make_tuple_mapper<T0, T1, T2, T3, T4, T5>::type t;
76281 return t(t0, t1, t2, t3, t4, t5);
76282 }
76283
76284 template<class T0, class T1, class T2, class T3, class T4, class T5, class T6>
76285 inline typename detail::make_tuple_mapper<T0, T1, T2, T3, T4, T5, T6>::type
76286 make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3,
76287 const T4& t4, const T5& t5, const T6& t6) {
76288 typedef typename detail::make_tuple_mapper
76289 <T0, T1, T2, T3, T4, T5, T6>::type t;
76290 return t(t0, t1, t2, t3, t4, t5, t6);
76291 }
76292
76293 template<class T0, class T1, class T2, class T3, class T4, class T5, class T6,
76294 class T7>
76295 inline typename detail::make_tuple_mapper<T0, T1, T2, T3, T4, T5, T6, T7>::type
76296 make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3,
76297 const T4& t4, const T5& t5, const T6& t6, const T7& t7) {
76298 typedef typename detail::make_tuple_mapper
76299 <T0, T1, T2, T3, T4, T5, T6, T7>::type t;
76300 return t(t0, t1, t2, t3, t4, t5, t6, t7);
76301 }
76302
76303 template<class T0, class T1, class T2, class T3, class T4, class T5, class T6,
76304 class T7, class T8>
76305 inline typename detail::make_tuple_mapper
76306 <T0, T1, T2, T3, T4, T5, T6, T7, T8>::type
76307 make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3,
76308 const T4& t4, const T5& t5, const T6& t6, const T7& t7,
76309 const T8& t8) {
76310 typedef typename detail::make_tuple_mapper
76311 <T0, T1, T2, T3, T4, T5, T6, T7, T8>::type t;
76312 return t(t0, t1, t2, t3, t4, t5, t6, t7, t8);
76313 }
76314
76315 template<class T0, class T1, class T2, class T3, class T4, class T5, class T6,
76316 class T7, class T8, class T9>
76317 inline typename detail::make_tuple_mapper
76318 <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>::type
76319 make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3,
76320 const T4& t4, const T5& t5, const T6& t6, const T7& t7,
76321 const T8& t8, const T9& t9) {
76322 typedef typename detail::make_tuple_mapper
76323 <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>::type t;
76324 return t(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9);
76325 }
76326
76327
76328
76329
76330 template<class T1>
76331 inline tuple<T1&> tie(T1& t1) {
76332 return tuple<T1&> (t1);
76333 }
76334
76335 template<class T1, class T2>
76336 inline tuple<T1&, T2&> tie(T1& t1, T2& t2) {
76337 return tuple<T1&, T2&> (t1, t2);
76338 }
76339
76340 template<class T1, class T2, class T3>
76341 inline tuple<T1&, T2&, T3&> tie(T1& t1, T2& t2, T3& t3) {
76342 return tuple<T1&, T2&, T3&> (t1, t2, t3);
76343 }
76344
76345 template<class T1, class T2, class T3, class T4>
76346 inline tuple<T1&, T2&, T3&, T4&> tie(T1& t1, T2& t2, T3& t3, T4& t4) {
76347 return tuple<T1&, T2&, T3&, T4&> (t1, t2, t3, t4);
76348 }
76349
76350 template<class T1, class T2, class T3, class T4, class T5>
76351 inline tuple<T1&, T2&, T3&, T4&, T5&>
76352 tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5) {
76353 return tuple<T1&, T2&, T3&, T4&, T5&> (t1, t2, t3, t4, t5);
76354 }
76355
76356 template<class T1, class T2, class T3, class T4, class T5, class T6>
76357 inline tuple<T1&, T2&, T3&, T4&, T5&, T6&>
76358 tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6) {
76359 return tuple<T1&, T2&, T3&, T4&, T5&, T6&> (t1, t2, t3, t4, t5, t6);
76360 }
76361
76362 template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
76363 inline tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&>
76364 tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7) {
76365 return tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&> (t1, t2, t3, t4, t5, t6, t7);
76366 }
76367
76368 template<class T1, class T2, class T3, class T4, class T5, class T6, class T7,
76369 class T8>
76370 inline tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&, T8&>
76371 tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8) {
76372 return tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&, T8&>
76373 (t1, t2, t3, t4, t5, t6, t7, t8);
76374 }
76375
76376 template<class T1, class T2, class T3, class T4, class T5, class T6, class T7,
76377 class T8, class T9>
76378 inline tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&, T8&, T9&>
76379 tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8,
76380 T9& t9) {
76381 return tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&, T8&, T9&>
76382 (t1, t2, t3, t4, t5, t6, t7, t8, t9);
76383 }
76384
76385 template<class T1, class T2, class T3, class T4, class T5, class T6, class T7,
76386 class T8, class T9, class T10>
76387 inline tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&, T8&, T9&, T10&>
76388 tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8,
76389 T9& t9, T10& t10) {
76390 return tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&, T8&, T9&, T10&>
76391 (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10);
76392 }
76393
76394 }
76395 }
76396 # 34 "/usr/include/boost/tuple/tuple.hpp" 2 3 4
76397
76398
76399
76400 namespace boost {
76401
76402 using tuples::tuple;
76403 using tuples::make_tuple;
76404 using tuples::tie;
76405
76406 using tuples::get;
76407 # 87 "/usr/include/boost/tuple/tuple.hpp" 3 4
76408 }
76409 # 29 "/usr/include/boost/lambda/core.hpp" 2 3 4
76410
76411
76412 namespace boost {
76413 namespace lambda {
76414
76415 using ::boost::tuples::tuple;
76416 using ::boost::tuples::null_type;
76417
76418 }
76419 }
76420
76421 # 1 "/usr/include/boost/lambda/detail/lambda_config.hpp" 1 3 4
76422 # 41 "/usr/include/boost/lambda/core.hpp" 2 3 4
76423 # 1 "/usr/include/boost/lambda/detail/lambda_fwd.hpp" 1 3 4
76424 # 16 "/usr/include/boost/lambda/detail/lambda_fwd.hpp" 3 4
76425 namespace boost {
76426 namespace lambda {
76427
76428 namespace detail {
76429
76430 template<class T> struct generate_error;
76431
76432 }
76433
76434
76435 template <int I> struct placeholder;
76436
76437
76438 template <class Func>
76439 struct function_adaptor;
76440
76441 template <int I, class Act> class action;
76442
76443 template <class Base>
76444 class lambda_functor;
76445
76446 template <class Act, class Args>
76447 class lambda_functor_base;
76448
76449 }
76450 }
76451 # 57 "/usr/include/boost/lambda/detail/lambda_fwd.hpp" 3 4
76452 namespace boost {
76453 namespace lambda {
76454 namespace detail {
76455
76456 template<class A1, class A2, class A3, class A4>
76457 void do_nothing(A1&, A2&, A3&, A4&) {}
76458
76459 }
76460 }
76461 }
76462 # 42 "/usr/include/boost/lambda/core.hpp" 2 3 4
76463
76464 # 1 "/usr/include/boost/lambda/detail/arity_code.hpp" 1 3 4
76465 # 16 "/usr/include/boost/lambda/detail/arity_code.hpp" 3 4
76466 # 1 "/usr/include/boost/type_traits/cv_traits.hpp" 1 3 4
76467 # 17 "/usr/include/boost/lambda/detail/arity_code.hpp" 2 3 4
76468 # 1 "/usr/include/boost/type_traits/transform_traits.hpp" 1 3 4
76469 # 18 "/usr/include/boost/lambda/detail/arity_code.hpp" 2 3 4
76470
76471 namespace boost {
76472 namespace lambda {
76473 # 30 "/usr/include/boost/lambda/detail/arity_code.hpp" 3 4
76474 enum { NONE = 0x00,
76475 FIRST = 0x01,
76476 SECOND = 0x02,
76477 THIRD = 0x04,
76478 EXCEPTION = 0x08,
76479 RETHROW = 0x10};
76480
76481
76482 template<class T>
76483 struct get_tuple_arity;
76484
76485 namespace detail {
76486
76487 template <class T> struct get_arity_;
76488
76489 }
76490
76491 template <class T> struct get_arity {
76492
76493 static const int value = detail::get_arity_<typename boost::remove_cv<typename boost::remove_reference<T>::type>::type>::value;
76494
76495 };
76496
76497 namespace detail {
76498
76499 template<class T>
76500 struct get_arity_ {
76501 static const int value = 0;
76502 };
76503
76504 template<class T>
76505 struct get_arity_<lambda_functor<T> > {
76506 static const int value = get_arity<T>::value;
76507 };
76508
76509 template<class Action, class Args>
76510 struct get_arity_<lambda_functor_base<Action, Args> > {
76511 static const int value = get_tuple_arity<Args>::value;
76512 };
76513
76514 template<int I>
76515 struct get_arity_<placeholder<I> > {
76516 static const int value = I;
76517 };
76518
76519 }
76520
76521 template<class T>
76522 struct get_tuple_arity {
76523 static const int value = get_arity<typename T::head_type>::value | get_tuple_arity<typename T::tail_type>::value;
76524 };
76525
76526
76527 template<>
76528 struct get_tuple_arity<null_type> {
76529 static const int value = 0;
76530 };
76531
76532
76533
76534
76535 template<class T, int I>
76536 struct has_placeholder {
76537 static const bool value = (get_arity<T>::value & I) != 0;
76538 };
76539
76540 template<int I, int J>
76541 struct includes_placeholder {
76542 static const bool value = (J & I) != 0;
76543 };
76544
76545 template<int I, int J>
76546 struct lacks_placeholder {
76547 static const bool value = ((J & I) == 0);
76548 };
76549
76550
76551 }
76552 }
76553 # 44 "/usr/include/boost/lambda/core.hpp" 2 3 4
76554 # 1 "/usr/include/boost/lambda/detail/actions.hpp" 1 3 4
76555 # 16 "/usr/include/boost/lambda/detail/actions.hpp" 3 4
76556 namespace boost {
76557 namespace lambda {
76558
76559
76560
76561 template<int Arity, class Act> class action;
76562
76563
76564
76565
76566 class assignment_action {};
76567 class subscript_action {};
76568
76569 template <class Action> class other_action;
76570
76571
76572 template <class RET> class explicit_return_type_action {};
76573
76574
76575 struct protect_action {};
76576
76577
76578 struct comma_action {};
76579
76580
76581
76582
76583
76584 template <class Action> struct is_protectable {
76585 static const bool value = false;
76586 };
76587
76588
76589
76590
76591 template<> struct is_protectable<other_action<comma_action> > {
76592 static const bool value = true;
76593 };
76594
76595
76596 namespace detail {
76597
76598
76599
76600
76601 class unspecified {};
76602 }
76603
76604
76605
76606
76607
76608
76609
76610 template <int I, class Result_type = detail::unspecified>
76611 class function_action {};
76612
76613 template<class T> class function_action<1, T> {
76614 public:
76615 template<class RET, class A1>
76616 static RET apply(A1& a1) {
76617 return function_adaptor<typename boost::remove_cv<A1>::type>::
76618 template apply<RET>(a1);
76619 }
76620 };
76621
76622 template<class T> class function_action<2, T> {
76623 public:
76624 template<class RET, class A1, class A2>
76625 static RET apply(A1& a1, A2& a2) {
76626 return function_adaptor<typename boost::remove_cv<A1>::type>::
76627 template apply<RET>(a1, a2);
76628 }
76629 };
76630
76631 template<class T> class function_action<3, T> {
76632 public:
76633 template<class RET, class A1, class A2, class A3>
76634 static RET apply(A1& a1, A2& a2, A3& a3) {
76635 return function_adaptor<typename boost::remove_cv<A1>::type>::
76636 template apply<RET>(a1, a2, a3);
76637 }
76638 };
76639
76640 template<class T> class function_action<4, T> {
76641 public:
76642 template<class RET, class A1, class A2, class A3, class A4>
76643 static RET apply(A1& a1, A2& a2, A3& a3, A4& a4) {
76644 return function_adaptor<typename boost::remove_cv<A1>::type>::
76645 template apply<RET>(a1, a2, a3, a4);
76646 }
76647 };
76648
76649 template<class T> class function_action<5, T> {
76650 public:
76651 template<class RET, class A1, class A2, class A3, class A4, class A5>
76652 static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) {
76653 return function_adaptor<typename boost::remove_cv<A1>::type>::
76654 template apply<RET>(a1, a2, a3, a4, a5);
76655 }
76656 };
76657
76658 template<class T> class function_action<6, T> {
76659 public:
76660 template<class RET, class A1, class A2, class A3, class A4, class A5,
76661 class A6>
76662 static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) {
76663 return function_adaptor<typename boost::remove_cv<A1>::type>::
76664 template apply<RET>(a1, a2, a3, a4, a5, a6);
76665 }
76666 };
76667
76668 template<class T> class function_action<7, T> {
76669 public:
76670 template<class RET, class A1, class A2, class A3, class A4, class A5,
76671 class A6, class A7>
76672 static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) {
76673 return function_adaptor<typename boost::remove_cv<A1>::type>::
76674 template apply<RET>(a1, a2, a3, a4, a5, a6, a7);
76675 }
76676 };
76677
76678 template<class T> class function_action<8, T> {
76679 public:
76680 template<class RET, class A1, class A2, class A3, class A4, class A5,
76681 class A6, class A7, class A8>
76682 static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7,
76683 A8& a8) {
76684 return function_adaptor<typename boost::remove_cv<A1>::type>::
76685 template apply<RET>(a1, a2, a3, a4, a5, a6, a7, a8);
76686 }
76687 };
76688
76689 template<class T> class function_action<9, T> {
76690 public:
76691 template<class RET, class A1, class A2, class A3, class A4, class A5,
76692 class A6, class A7, class A8, class A9>
76693 static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7,
76694 A8& a8, A9& a9) {
76695 return function_adaptor<typename boost::remove_cv<A1>::type>::
76696 template apply<RET>(a1, a2, a3, a4, a5, a6, a7, a8, a9);
76697 }
76698 };
76699
76700 template<class T> class function_action<10, T> {
76701 public:
76702 template<class RET, class A1, class A2, class A3, class A4, class A5,
76703 class A6, class A7, class A8, class A9, class A10>
76704 static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7,
76705 A8& a8, A9& a9, A10& a10) {
76706 return function_adaptor<typename boost::remove_cv<A1>::type>::
76707 template apply<RET>(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
76708 }
76709 };
76710
76711 }
76712 }
76713 # 45 "/usr/include/boost/lambda/core.hpp" 2 3 4
76714
76715 # 1 "/usr/include/boost/lambda/detail/lambda_traits.hpp" 1 3 4
76716 # 17 "/usr/include/boost/lambda/detail/lambda_traits.hpp" 3 4
76717 # 1 "/usr/include/boost/type_traits/function_traits.hpp" 1 3 4
76718 # 18 "/usr/include/boost/lambda/detail/lambda_traits.hpp" 2 3 4
76719 # 1 "/usr/include/boost/type_traits/object_traits.hpp" 1 3 4
76720 # 17 "/usr/include/boost/type_traits/object_traits.hpp" 3 4
76721 # 1 "/usr/include/boost/type_traits/has_trivial_assign.hpp" 1 3 4
76722 # 13 "/usr/include/boost/type_traits/has_trivial_assign.hpp" 3 4
76723 # 1 "/usr/include/boost/type_traits/intrinsics.hpp" 1 3 4
76724 # 14 "/usr/include/boost/type_traits/has_trivial_assign.hpp" 2 3 4
76725 # 1 "/usr/include/boost/type_traits/is_pod.hpp" 1 3 4
76726 # 13 "/usr/include/boost/type_traits/is_pod.hpp" 3 4
76727 # 1 "/usr/include/boost/type_traits/is_void.hpp" 1 3 4
76728 # 15 "/usr/include/boost/type_traits/is_void.hpp" 3 4
76729 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
76730 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
76731 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
76732 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
76733 # 16 "/usr/include/boost/type_traits/is_void.hpp" 2 3 4
76734
76735 namespace boost {
76736
76737
76738 template< typename T > struct is_void : ::boost::integral_constant<bool,false> { };
76739 template<> struct is_void< void > : ::boost::integral_constant<bool,true> { };
76740
76741
76742 template<> struct is_void< void const > : ::boost::integral_constant<bool,true> { };
76743 template<> struct is_void< void volatile > : ::boost::integral_constant<bool,true> { };
76744 template<> struct is_void< void const volatile > : ::boost::integral_constant<bool,true> { };
76745
76746
76747 }
76748
76749 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
76750 # 32 "/usr/include/boost/type_traits/is_void.hpp" 2 3 4
76751 # 14 "/usr/include/boost/type_traits/is_pod.hpp" 2 3 4
76752 # 1 "/usr/include/boost/type_traits/is_scalar.hpp" 1 3 4
76753 # 12 "/usr/include/boost/type_traits/is_scalar.hpp" 3 4
76754 # 1 "/usr/include/boost/type_traits/is_arithmetic.hpp" 1 3 4
76755 # 12 "/usr/include/boost/type_traits/is_arithmetic.hpp" 3 4
76756 # 1 "/usr/include/boost/type_traits/is_integral.hpp" 1 3 4
76757 # 15 "/usr/include/boost/type_traits/is_integral.hpp" 3 4
76758 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
76759 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
76760 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
76761 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
76762 # 16 "/usr/include/boost/type_traits/is_integral.hpp" 2 3 4
76763
76764 namespace boost {
76765
76766
76767
76768
76769 template< typename T > struct is_integral : ::boost::integral_constant<bool,false> { };
76770
76771 template<> struct is_integral< unsigned char > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< unsigned char const > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< unsigned char volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< unsigned char const volatile > : ::boost::integral_constant<bool,true> { };
76772 template<> struct is_integral< unsigned short > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< unsigned short const > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< unsigned short volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< unsigned short const volatile > : ::boost::integral_constant<bool,true> { };
76773 template<> struct is_integral< unsigned int > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< unsigned int const > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< unsigned int volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< unsigned int const volatile > : ::boost::integral_constant<bool,true> { };
76774 template<> struct is_integral< unsigned long > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< unsigned long const > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< unsigned long volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< unsigned long const volatile > : ::boost::integral_constant<bool,true> { };
76775
76776 template<> struct is_integral< signed char > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< signed char const > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< signed char volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< signed char const volatile > : ::boost::integral_constant<bool,true> { };
76777 template<> struct is_integral< signed short > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< signed short const > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< signed short volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< signed short const volatile > : ::boost::integral_constant<bool,true> { };
76778 template<> struct is_integral< signed int > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< signed int const > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< signed int volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< signed int const volatile > : ::boost::integral_constant<bool,true> { };
76779 template<> struct is_integral< signed long > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< signed long const > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< signed long volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< signed long const volatile > : ::boost::integral_constant<bool,true> { };
76780
76781 template<> struct is_integral< bool > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< bool const > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< bool volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< bool const volatile > : ::boost::integral_constant<bool,true> { };
76782 template<> struct is_integral< char > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< char const > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< char volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< char const volatile > : ::boost::integral_constant<bool,true> { };
76783
76784
76785
76786
76787
76788 template<> struct is_integral< wchar_t > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< wchar_t const > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< wchar_t volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< wchar_t const volatile > : ::boost::integral_constant<bool,true> { };
76789 # 60 "/usr/include/boost/type_traits/is_integral.hpp" 3 4
76790 template<> struct is_integral< ::boost::ulong_long_type > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< ::boost::ulong_long_type const > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< ::boost::ulong_long_type volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< ::boost::ulong_long_type const volatile > : ::boost::integral_constant<bool,true> { };
76791 template<> struct is_integral< ::boost::long_long_type > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< ::boost::long_long_type const > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< ::boost::long_long_type volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_integral< ::boost::long_long_type const volatile > : ::boost::integral_constant<bool,true> { };
76792
76793
76794
76795
76796
76797 }
76798
76799 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
76800 # 70 "/usr/include/boost/type_traits/is_integral.hpp" 2 3 4
76801 # 13 "/usr/include/boost/type_traits/is_arithmetic.hpp" 2 3 4
76802 # 1 "/usr/include/boost/type_traits/is_float.hpp" 1 3 4
76803 # 13 "/usr/include/boost/type_traits/is_float.hpp" 3 4
76804 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
76805 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
76806 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
76807 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
76808 # 14 "/usr/include/boost/type_traits/is_float.hpp" 2 3 4
76809
76810 namespace boost {
76811
76812
76813 template< typename T > struct is_float : ::boost::integral_constant<bool,false> { };
76814 template<> struct is_float< float > : ::boost::integral_constant<bool,true> { }; template<> struct is_float< float const > : ::boost::integral_constant<bool,true> { }; template<> struct is_float< float volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_float< float const volatile > : ::boost::integral_constant<bool,true> { };
76815 template<> struct is_float< double > : ::boost::integral_constant<bool,true> { }; template<> struct is_float< double const > : ::boost::integral_constant<bool,true> { }; template<> struct is_float< double volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_float< double const volatile > : ::boost::integral_constant<bool,true> { };
76816 template<> struct is_float< long double > : ::boost::integral_constant<bool,true> { }; template<> struct is_float< long double const > : ::boost::integral_constant<bool,true> { }; template<> struct is_float< long double volatile > : ::boost::integral_constant<bool,true> { }; template<> struct is_float< long double const volatile > : ::boost::integral_constant<bool,true> { };
76817
76818 }
76819
76820 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
76821 # 26 "/usr/include/boost/type_traits/is_float.hpp" 2 3 4
76822 # 14 "/usr/include/boost/type_traits/is_arithmetic.hpp" 2 3 4
76823
76824
76825
76826
76827 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
76828 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
76829 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
76830 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
76831 # 19 "/usr/include/boost/type_traits/is_arithmetic.hpp" 2 3 4
76832
76833 namespace boost {
76834
76835 namespace detail {
76836
76837 template< typename T >
76838 struct is_arithmetic_impl
76839 {
76840 static const bool value = (::boost::type_traits::ice_or< ::boost::is_integral<T>::value, ::boost::is_float<T>::value >::value);
76841
76842
76843
76844
76845 };
76846
76847 }
76848
76849
76850 template< typename T > struct is_arithmetic : ::boost::integral_constant<bool,::boost::detail::is_arithmetic_impl<T>::value> { };
76851
76852 }
76853
76854 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
76855 # 42 "/usr/include/boost/type_traits/is_arithmetic.hpp" 2 3 4
76856 # 13 "/usr/include/boost/type_traits/is_scalar.hpp" 2 3 4
76857 # 1 "/usr/include/boost/type_traits/is_enum.hpp" 1 3 4
76858 # 17 "/usr/include/boost/type_traits/is_enum.hpp" 3 4
76859 # 1 "/usr/include/boost/type_traits/is_convertible.hpp" 1 3 4
76860 # 17 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4
76861 # 1 "/usr/include/boost/type_traits/is_array.hpp" 1 3 4
76862 # 27 "/usr/include/boost/type_traits/is_array.hpp" 3 4
76863 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
76864 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
76865 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
76866 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
76867 # 28 "/usr/include/boost/type_traits/is_array.hpp" 2 3 4
76868
76869 namespace boost {
76870
76871
76872
76873 template< typename T > struct is_array : ::boost::integral_constant<bool,false> { };
76874
76875 template< typename T, std::size_t N > struct is_array< T[N] > : ::boost::integral_constant<bool,true> { };
76876 template< typename T, std::size_t N > struct is_array< T const[N] > : ::boost::integral_constant<bool,true> { };
76877 template< typename T, std::size_t N > struct is_array< T volatile[N] > : ::boost::integral_constant<bool,true> { };
76878 template< typename T, std::size_t N > struct is_array< T const volatile[N] > : ::boost::integral_constant<bool,true> { };
76879
76880 template< typename T > struct is_array< T[] > : ::boost::integral_constant<bool,true> { };
76881 template< typename T > struct is_array< T const[] > : ::boost::integral_constant<bool,true> { };
76882 template< typename T > struct is_array< T volatile[] > : ::boost::integral_constant<bool,true> { };
76883 template< typename T > struct is_array< T const volatile[] > : ::boost::integral_constant<bool,true> { };
76884 # 86 "/usr/include/boost/type_traits/is_array.hpp" 3 4
76885 }
76886
76887 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
76888 # 89 "/usr/include/boost/type_traits/is_array.hpp" 2 3 4
76889 # 18 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4
76890
76891
76892
76893
76894
76895 # 1 "/usr/include/boost/type_traits/is_abstract.hpp" 1 3 4
76896 # 53 "/usr/include/boost/type_traits/is_abstract.hpp" 3 4
76897 # 1 "/usr/include/boost/type_traits/is_class.hpp" 1 3 4
76898 # 14 "/usr/include/boost/type_traits/is_class.hpp" 3 4
76899 # 1 "/usr/include/boost/type_traits/is_union.hpp" 1 3 4
76900 # 19 "/usr/include/boost/type_traits/is_union.hpp" 3 4
76901 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
76902 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
76903 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
76904 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
76905 # 20 "/usr/include/boost/type_traits/is_union.hpp" 2 3 4
76906
76907 namespace boost {
76908
76909 namespace detail {
76910 # 36 "/usr/include/boost/type_traits/is_union.hpp" 3 4
76911 template <typename T> struct is_union_impl
76912 {
76913 static const bool value = false;
76914 };
76915
76916 }
76917
76918 template< typename T > struct is_union : ::boost::integral_constant<bool,::boost::detail::is_union_impl<T>::value> { };
76919
76920 }
76921
76922 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
76923 # 48 "/usr/include/boost/type_traits/is_union.hpp" 2 3 4
76924 # 15 "/usr/include/boost/type_traits/is_class.hpp" 2 3 4
76925 # 33 "/usr/include/boost/type_traits/is_class.hpp" 3 4
76926 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
76927 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
76928 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
76929 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
76930 # 34 "/usr/include/boost/type_traits/is_class.hpp" 2 3 4
76931
76932 namespace boost {
76933
76934 namespace detail {
76935 # 53 "/usr/include/boost/type_traits/is_class.hpp" 3 4
76936 template <class U> ::boost::type_traits::yes_type is_class_tester(void(U::*)(void));
76937 template <class U> ::boost::type_traits::no_type is_class_tester(...);
76938
76939 template <typename T>
76940 struct is_class_impl
76941 {
76942
76943 static const bool value = (::boost::type_traits::ice_and< sizeof(is_class_tester<T>(0)) == sizeof(::boost::type_traits::yes_type), ::boost::type_traits::ice_not< ::boost::is_union<T>::value >::value >::value);
76944
76945
76946
76947
76948
76949 };
76950 # 115 "/usr/include/boost/type_traits/is_class.hpp" 3 4
76951 }
76952
76953
76954
76955
76956
76957 template< typename T > struct is_class : ::boost::integral_constant<bool,::boost::detail::is_class_impl<T>::value> { };
76958
76959
76960 }
76961
76962 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
76963 # 127 "/usr/include/boost/type_traits/is_class.hpp" 2 3 4
76964 # 54 "/usr/include/boost/type_traits/is_abstract.hpp" 2 3 4
76965
76966
76967
76968
76969
76970 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
76971 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
76972 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
76973 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
76974 # 60 "/usr/include/boost/type_traits/is_abstract.hpp" 2 3 4
76975
76976
76977 namespace boost {
76978 namespace detail{
76979
76980
76981 template<class T>
76982 struct is_abstract_imp2
76983 {
76984
76985
76986
76987
76988 template<class U>
76989 static type_traits::no_type check_sig(U (*)[1]);
76990 template<class U>
76991 static type_traits::yes_type check_sig(...);
76992
76993
76994
76995
76996 typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( sizeof(T) != 0 ) >)> boost_static_assert_typedef_81;
76997
76998
76999
77000
77001 static const unsigned s1 = sizeof(is_abstract_imp2<T>::template check_sig<T>(0));
77002
77003
77004
77005
77006 static const bool value = (s1 == sizeof(type_traits::yes_type));
77007
77008 };
77009
77010 template <bool v>
77011 struct is_abstract_select
77012 {
77013 template <class T>
77014 struct rebind
77015 {
77016 typedef is_abstract_imp2<T> type;
77017 };
77018 };
77019 template <>
77020 struct is_abstract_select<false>
77021 {
77022 template <class T>
77023 struct rebind
77024 {
77025 typedef false_type type;
77026 };
77027 };
77028
77029 template <class T>
77030 struct is_abstract_imp
77031 {
77032 typedef is_abstract_select< ::boost::is_class<T>::value> selector;
77033 typedef typename selector::template rebind<T> binder;
77034 typedef typename binder::type type;
77035
77036 static const bool value = type::value;
77037 };
77038
77039
77040 }
77041
77042
77043 template< typename T > struct is_abstract : ::boost::integral_constant<bool,::boost::detail::is_abstract_imp<T>::value> { };
77044
77045
77046
77047
77048 }
77049
77050 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
77051 # 136 "/usr/include/boost/type_traits/is_abstract.hpp" 2 3 4
77052 # 24 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4
77053 # 32 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4
77054 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
77055 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
77056 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
77057 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
77058 # 33 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4
77059
77060 namespace boost {
77061 # 46 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4
77062 namespace detail {
77063 # 113 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4
77064 struct any_conversion
77065 {
77066 template <typename T> any_conversion(const volatile T&);
77067 template <typename T> any_conversion(T&);
77068 };
77069
77070 template <typename T> struct checker
77071 {
77072 static boost::type_traits::no_type _m_check(any_conversion ...);
77073 static boost::type_traits::yes_type _m_check(T, int);
77074 };
77075
77076 template <typename From, typename To>
77077 struct is_convertible_basic_impl
77078 {
77079 static From _m_from;
77080 static bool const value = sizeof( detail::checker<To>::_m_check(_m_from, 0) )
77081 == sizeof(::boost::type_traits::yes_type);
77082 };
77083 # 282 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4
77084 template <typename From, typename To>
77085 struct is_convertible_impl
77086 {
77087 typedef typename add_reference<From>::type ref_type;
77088 static const bool value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::detail::is_convertible_basic_impl<ref_type,To>::value, ::boost::is_void<To>::value >::value, ::boost::type_traits::ice_not< ::boost::is_array<To>::value >::value >::value);
77089 # 297 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4
77090 };
77091
77092
77093 template <bool trivial1, bool trivial2, bool abstract_target>
77094 struct is_convertible_impl_select
77095 {
77096 template <class From, class To>
77097 struct rebind
77098 {
77099 typedef is_convertible_impl<From, To> type;
77100 };
77101 };
77102
77103 template <>
77104 struct is_convertible_impl_select<true, true, false>
77105 {
77106 template <class From, class To>
77107 struct rebind
77108 {
77109 typedef true_type type;
77110 };
77111 };
77112
77113 template <>
77114 struct is_convertible_impl_select<false, false, true>
77115 {
77116 template <class From, class To>
77117 struct rebind
77118 {
77119 typedef false_type type;
77120 };
77121 };
77122
77123 template <>
77124 struct is_convertible_impl_select<true, false, true>
77125 {
77126 template <class From, class To>
77127 struct rebind
77128 {
77129 typedef false_type type;
77130 };
77131 };
77132
77133 template <typename From, typename To>
77134 struct is_convertible_impl_dispatch_base
77135 {
77136
77137 typedef is_convertible_impl_select<
77138 ::boost::is_arithmetic<From>::value,
77139 ::boost::is_arithmetic<To>::value,
77140
77141 ::boost::is_abstract<To>::value
77142
77143
77144
77145 > selector;
77146
77147
77148
77149 typedef typename selector::template rebind<From, To> isc_binder;
77150 typedef typename isc_binder::type type;
77151 };
77152
77153 template <typename From, typename To>
77154 struct is_convertible_impl_dispatch
77155 : public is_convertible_impl_dispatch_base<From, To>::type
77156 {};
77157 # 385 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4
77158 template<> struct is_convertible_impl< void,void > { static const bool value = (true); }; template<> struct is_convertible_impl< void,void const > { static const bool value = (true); }; template<> struct is_convertible_impl< void,void volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void,void const volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void const,void > { static const bool value = (true); }; template<> struct is_convertible_impl< void const,void const > { static const bool value = (true); }; template<> struct is_convertible_impl< void const,void volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void const,void const volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void > { static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void const > { static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void const volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void > { static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void const > { static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void const volatile > { static const bool value = (true); };
77159 # 395 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4
77160 template< typename To > struct is_convertible_impl< void,To > { static const bool value = (false); };
77161 template< typename From > struct is_convertible_impl< From,void > { static const bool value = (true); };
77162
77163 template< typename To > struct is_convertible_impl< void const,To > { static const bool value = (false); };
77164 template< typename To > struct is_convertible_impl< void volatile,To > { static const bool value = (false); };
77165 template< typename To > struct is_convertible_impl< void const volatile,To > { static const bool value = (false); };
77166 template< typename From > struct is_convertible_impl< From,void const > { static const bool value = (true); };
77167 template< typename From > struct is_convertible_impl< From,void volatile > { static const bool value = (true); };
77168 template< typename From > struct is_convertible_impl< From,void const volatile > { static const bool value = (true); };
77169
77170
77171
77172 }
77173
77174 template< typename From, typename To > struct is_convertible : ::boost::integral_constant<bool,(::boost::detail::is_convertible_impl_dispatch<From,To>::value)> { };
77175
77176 }
77177
77178 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
77179 # 414 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4
77180 # 18 "/usr/include/boost/type_traits/is_enum.hpp" 2 3 4
77181 # 30 "/usr/include/boost/type_traits/is_enum.hpp" 3 4
77182 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
77183 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
77184 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
77185 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
77186 # 31 "/usr/include/boost/type_traits/is_enum.hpp" 2 3 4
77187
77188 namespace boost {
77189
77190
77191
77192 namespace detail {
77193
77194
77195
77196 template <typename T>
77197 struct is_class_or_union
77198 {
77199 static const bool value = (::boost::type_traits::ice_or< ::boost::is_class<T>::value , ::boost::is_union<T>::value >::value);
77200
77201
77202
77203
77204 };
77205 # 75 "/usr/include/boost/type_traits/is_enum.hpp" 3 4
77206 struct int_convertible
77207 {
77208 int_convertible(int);
77209 };
77210
77211
77212
77213 template <bool is_typename_arithmetic_or_reference = true>
77214 struct is_enum_helper
77215 {
77216 template <typename T> struct type
77217 {
77218 static const bool value = false;
77219 };
77220 };
77221
77222 template <>
77223 struct is_enum_helper<false>
77224 {
77225 template <typename T> struct type
77226 : ::boost::is_convertible<typename boost::add_reference<T>::type,::boost::detail::int_convertible>
77227 {
77228 };
77229 };
77230
77231 template <typename T> struct is_enum_impl
77232 {
77233 # 112 "/usr/include/boost/type_traits/is_enum.hpp" 3 4
77234 static const bool selector = (::boost::type_traits::ice_or< ::boost::is_arithmetic<T>::value , ::boost::is_reference<T>::value , ::boost::is_function<T>::value , is_class_or_union<T>::value , is_array<T>::value >::value);
77235 # 149 "/usr/include/boost/type_traits/is_enum.hpp" 3 4
77236 typedef ::boost::detail::is_enum_helper<selector> se_t;
77237
77238
77239 typedef typename se_t::template type<T> helper;
77240 static const bool value = helper::value;
77241 };
77242
77243
77244 template<> struct is_enum_impl< void > { static const bool value = (false); };
77245
77246 template<> struct is_enum_impl< void const > { static const bool value = (false); };
77247 template<> struct is_enum_impl< void volatile > { static const bool value = (false); };
77248 template<> struct is_enum_impl< void const volatile > { static const bool value = (false); };
77249
77250
77251 }
77252
77253 template< typename T > struct is_enum : ::boost::integral_constant<bool,::boost::detail::is_enum_impl<T>::value> { };
77254 # 176 "/usr/include/boost/type_traits/is_enum.hpp" 3 4
77255 }
77256
77257 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
77258 # 179 "/usr/include/boost/type_traits/is_enum.hpp" 2 3 4
77259 # 14 "/usr/include/boost/type_traits/is_scalar.hpp" 2 3 4
77260 # 1 "/usr/include/boost/type_traits/is_pointer.hpp" 1 3 4
77261 # 24 "/usr/include/boost/type_traits/is_pointer.hpp" 3 4
77262 # 1 "/usr/include/boost/type_traits/is_member_pointer.hpp" 1 3 4
77263 # 28 "/usr/include/boost/type_traits/is_member_pointer.hpp" 3 4
77264 # 1 "/usr/include/boost/type_traits/is_member_function_pointer.hpp" 1 3 4
77265 # 24 "/usr/include/boost/type_traits/is_member_function_pointer.hpp" 3 4
77266 # 1 "/usr/include/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp" 1 3 4
77267 # 25 "/usr/include/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp" 3 4
77268 namespace boost {
77269 namespace type_traits {
77270
77271 template <typename T>
77272 struct is_mem_fun_pointer_impl
77273 {
77274 static const bool value = false;
77275 };
77276
77277
77278
77279
77280
77281 template <class R, class T >
77282 struct is_mem_fun_pointer_impl<R (T::*)() > { static const bool value = true; };
77283
77284 template <class R, class T >
77285 struct is_mem_fun_pointer_impl<R (T::*)( ...) > { static const bool value = true; };
77286
77287
77288
77289 template <class R, class T >
77290 struct is_mem_fun_pointer_impl<R (T::*)() const > { static const bool value = true; };
77291
77292 template <class R, class T >
77293 struct is_mem_fun_pointer_impl<R (T::*)() volatile > { static const bool value = true; };
77294
77295 template <class R, class T >
77296 struct is_mem_fun_pointer_impl<R (T::*)() const volatile > { static const bool value = true; };
77297
77298
77299 template <class R, class T >
77300 struct is_mem_fun_pointer_impl<R (T::*)( ...) const > { static const bool value = true; };
77301
77302 template <class R, class T >
77303 struct is_mem_fun_pointer_impl<R (T::*)( ...) volatile > { static const bool value = true; };
77304
77305 template <class R, class T >
77306 struct is_mem_fun_pointer_impl<R (T::*)( ...) const volatile > { static const bool value = true; };
77307
77308
77309 template <class R, class T , class T0>
77310 struct is_mem_fun_pointer_impl<R (T::*)( T0) > { static const bool value = true; };
77311
77312 template <class R, class T , class T0>
77313 struct is_mem_fun_pointer_impl<R (T::*)( T0 ...) > { static const bool value = true; };
77314
77315
77316
77317 template <class R, class T , class T0>
77318 struct is_mem_fun_pointer_impl<R (T::*)( T0) const > { static const bool value = true; };
77319
77320 template <class R, class T , class T0>
77321 struct is_mem_fun_pointer_impl<R (T::*)( T0) volatile > { static const bool value = true; };
77322
77323 template <class R, class T , class T0>
77324 struct is_mem_fun_pointer_impl<R (T::*)( T0) const volatile > { static const bool value = true; };
77325
77326
77327 template <class R, class T , class T0>
77328 struct is_mem_fun_pointer_impl<R (T::*)( T0 ...) const > { static const bool value = true; };
77329
77330 template <class R, class T , class T0>
77331 struct is_mem_fun_pointer_impl<R (T::*)( T0 ...) volatile > { static const bool value = true; };
77332
77333 template <class R, class T , class T0>
77334 struct is_mem_fun_pointer_impl<R (T::*)( T0 ...) const volatile > { static const bool value = true; };
77335
77336
77337 template <class R, class T , class T0 , class T1>
77338 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1) > { static const bool value = true; };
77339
77340 template <class R, class T , class T0 , class T1>
77341 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 ...) > { static const bool value = true; };
77342
77343
77344
77345 template <class R, class T , class T0 , class T1>
77346 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1) const > { static const bool value = true; };
77347
77348 template <class R, class T , class T0 , class T1>
77349 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1) volatile > { static const bool value = true; };
77350
77351 template <class R, class T , class T0 , class T1>
77352 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1) const volatile > { static const bool value = true; };
77353
77354
77355 template <class R, class T , class T0 , class T1>
77356 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 ...) const > { static const bool value = true; };
77357
77358 template <class R, class T , class T0 , class T1>
77359 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 ...) volatile > { static const bool value = true; };
77360
77361 template <class R, class T , class T0 , class T1>
77362 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 ...) const volatile > { static const bool value = true; };
77363
77364
77365 template <class R, class T , class T0 , class T1 , class T2>
77366 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2) > { static const bool value = true; };
77367
77368 template <class R, class T , class T0 , class T1 , class T2>
77369 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 ...) > { static const bool value = true; };
77370
77371
77372
77373 template <class R, class T , class T0 , class T1 , class T2>
77374 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2) const > { static const bool value = true; };
77375
77376 template <class R, class T , class T0 , class T1 , class T2>
77377 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2) volatile > { static const bool value = true; };
77378
77379 template <class R, class T , class T0 , class T1 , class T2>
77380 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2) const volatile > { static const bool value = true; };
77381
77382
77383 template <class R, class T , class T0 , class T1 , class T2>
77384 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 ...) const > { static const bool value = true; };
77385
77386 template <class R, class T , class T0 , class T1 , class T2>
77387 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 ...) volatile > { static const bool value = true; };
77388
77389 template <class R, class T , class T0 , class T1 , class T2>
77390 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 ...) const volatile > { static const bool value = true; };
77391
77392
77393 template <class R, class T , class T0 , class T1 , class T2 , class T3>
77394 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3) > { static const bool value = true; };
77395
77396 template <class R, class T , class T0 , class T1 , class T2 , class T3>
77397 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 ...) > { static const bool value = true; };
77398
77399
77400
77401 template <class R, class T , class T0 , class T1 , class T2 , class T3>
77402 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3) const > { static const bool value = true; };
77403
77404 template <class R, class T , class T0 , class T1 , class T2 , class T3>
77405 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3) volatile > { static const bool value = true; };
77406
77407 template <class R, class T , class T0 , class T1 , class T2 , class T3>
77408 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3) const volatile > { static const bool value = true; };
77409
77410
77411 template <class R, class T , class T0 , class T1 , class T2 , class T3>
77412 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 ...) const > { static const bool value = true; };
77413
77414 template <class R, class T , class T0 , class T1 , class T2 , class T3>
77415 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 ...) volatile > { static const bool value = true; };
77416
77417 template <class R, class T , class T0 , class T1 , class T2 , class T3>
77418 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 ...) const volatile > { static const bool value = true; };
77419
77420
77421 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4>
77422 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4) > { static const bool value = true; };
77423
77424 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4>
77425 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 ...) > { static const bool value = true; };
77426
77427
77428
77429 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4>
77430 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4) const > { static const bool value = true; };
77431
77432 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4>
77433 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4) volatile > { static const bool value = true; };
77434
77435 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4>
77436 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4) const volatile > { static const bool value = true; };
77437
77438
77439 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4>
77440 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 ...) const > { static const bool value = true; };
77441
77442 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4>
77443 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 ...) volatile > { static const bool value = true; };
77444
77445 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4>
77446 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 ...) const volatile > { static const bool value = true; };
77447
77448
77449 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5>
77450 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5) > { static const bool value = true; };
77451
77452 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5>
77453 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 ...) > { static const bool value = true; };
77454
77455
77456
77457 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5>
77458 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5) const > { static const bool value = true; };
77459
77460 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5>
77461 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5) volatile > { static const bool value = true; };
77462
77463 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5>
77464 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile > { static const bool value = true; };
77465
77466
77467 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5>
77468 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const > { static const bool value = true; };
77469
77470 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5>
77471 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 ...) volatile > { static const bool value = true; };
77472
77473 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5>
77474 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const volatile > { static const bool value = true; };
77475
77476
77477 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6>
77478 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) > { static const bool value = true; };
77479
77480 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6>
77481 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) > { static const bool value = true; };
77482
77483
77484
77485 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6>
77486 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const > { static const bool value = true; };
77487
77488 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6>
77489 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile > { static const bool value = true; };
77490
77491 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6>
77492 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile > { static const bool value = true; };
77493
77494
77495 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6>
77496 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const > { static const bool value = true; };
77497
77498 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6>
77499 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) volatile > { static const bool value = true; };
77500
77501 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6>
77502 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const volatile > { static const bool value = true; };
77503
77504
77505 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7>
77506 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) > { static const bool value = true; };
77507
77508 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7>
77509 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) > { static const bool value = true; };
77510
77511
77512
77513 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7>
77514 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const > { static const bool value = true; };
77515
77516 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7>
77517 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile > { static const bool value = true; };
77518
77519 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7>
77520 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile > { static const bool value = true; };
77521
77522
77523 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7>
77524 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const > { static const bool value = true; };
77525
77526 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7>
77527 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) volatile > { static const bool value = true; };
77528
77529 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7>
77530 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const volatile > { static const bool value = true; };
77531
77532
77533 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8>
77534 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) > { static const bool value = true; };
77535
77536 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8>
77537 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) > { static const bool value = true; };
77538
77539
77540
77541 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8>
77542 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const > { static const bool value = true; };
77543
77544 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8>
77545 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile > { static const bool value = true; };
77546
77547 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8>
77548 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile > { static const bool value = true; };
77549
77550
77551 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8>
77552 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const > { static const bool value = true; };
77553
77554 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8>
77555 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) volatile > { static const bool value = true; };
77556
77557 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8>
77558 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const volatile > { static const bool value = true; };
77559
77560
77561 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9>
77562 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) > { static const bool value = true; };
77563
77564 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9>
77565 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) > { static const bool value = true; };
77566
77567
77568
77569 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9>
77570 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const > { static const bool value = true; };
77571
77572 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9>
77573 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile > { static const bool value = true; };
77574
77575 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9>
77576 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile > { static const bool value = true; };
77577
77578
77579 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9>
77580 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const > { static const bool value = true; };
77581
77582 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9>
77583 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) volatile > { static const bool value = true; };
77584
77585 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9>
77586 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const volatile > { static const bool value = true; };
77587
77588
77589 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10>
77590 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) > { static const bool value = true; };
77591
77592 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10>
77593 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) > { static const bool value = true; };
77594
77595
77596
77597 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10>
77598 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const > { static const bool value = true; };
77599
77600 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10>
77601 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile > { static const bool value = true; };
77602
77603 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10>
77604 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile > { static const bool value = true; };
77605
77606
77607 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10>
77608 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const > { static const bool value = true; };
77609
77610 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10>
77611 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) volatile > { static const bool value = true; };
77612
77613 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10>
77614 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const volatile > { static const bool value = true; };
77615
77616
77617 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11>
77618 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) > { static const bool value = true; };
77619
77620 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11>
77621 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) > { static const bool value = true; };
77622
77623
77624
77625 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11>
77626 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const > { static const bool value = true; };
77627
77628 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11>
77629 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile > { static const bool value = true; };
77630
77631 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11>
77632 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile > { static const bool value = true; };
77633
77634
77635 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11>
77636 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const > { static const bool value = true; };
77637
77638 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11>
77639 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) volatile > { static const bool value = true; };
77640
77641 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11>
77642 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const volatile > { static const bool value = true; };
77643
77644
77645 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12>
77646 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) > { static const bool value = true; };
77647
77648 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12>
77649 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) > { static const bool value = true; };
77650
77651
77652
77653 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12>
77654 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const > { static const bool value = true; };
77655
77656 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12>
77657 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile > { static const bool value = true; };
77658
77659 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12>
77660 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile > { static const bool value = true; };
77661
77662
77663 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12>
77664 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const > { static const bool value = true; };
77665
77666 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12>
77667 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) volatile > { static const bool value = true; };
77668
77669 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12>
77670 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const volatile > { static const bool value = true; };
77671
77672
77673 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13>
77674 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) > { static const bool value = true; };
77675
77676 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13>
77677 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) > { static const bool value = true; };
77678
77679
77680
77681 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13>
77682 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const > { static const bool value = true; };
77683
77684 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13>
77685 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile > { static const bool value = true; };
77686
77687 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13>
77688 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile > { static const bool value = true; };
77689
77690
77691 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13>
77692 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const > { static const bool value = true; };
77693
77694 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13>
77695 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) volatile > { static const bool value = true; };
77696
77697 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13>
77698 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const volatile > { static const bool value = true; };
77699
77700
77701 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14>
77702 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) > { static const bool value = true; };
77703
77704 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14>
77705 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) > { static const bool value = true; };
77706
77707
77708
77709 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14>
77710 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const > { static const bool value = true; };
77711
77712 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14>
77713 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile > { static const bool value = true; };
77714
77715 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14>
77716 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile > { static const bool value = true; };
77717
77718
77719 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14>
77720 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const > { static const bool value = true; };
77721
77722 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14>
77723 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) volatile > { static const bool value = true; };
77724
77725 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14>
77726 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const volatile > { static const bool value = true; };
77727
77728
77729 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15>
77730 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) > { static const bool value = true; };
77731
77732 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15>
77733 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) > { static const bool value = true; };
77734
77735
77736
77737 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15>
77738 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const > { static const bool value = true; };
77739
77740 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15>
77741 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) volatile > { static const bool value = true; };
77742
77743 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15>
77744 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile > { static const bool value = true; };
77745
77746
77747 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15>
77748 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const > { static const bool value = true; };
77749
77750 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15>
77751 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) volatile > { static const bool value = true; };
77752
77753 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15>
77754 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const volatile > { static const bool value = true; };
77755
77756
77757 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16>
77758 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) > { static const bool value = true; };
77759
77760 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16>
77761 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) > { static const bool value = true; };
77762
77763
77764
77765 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16>
77766 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const > { static const bool value = true; };
77767
77768 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16>
77769 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) volatile > { static const bool value = true; };
77770
77771 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16>
77772 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile > { static const bool value = true; };
77773
77774
77775 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16>
77776 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const > { static const bool value = true; };
77777
77778 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16>
77779 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) volatile > { static const bool value = true; };
77780
77781 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16>
77782 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const volatile > { static const bool value = true; };
77783
77784
77785 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17>
77786 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) > { static const bool value = true; };
77787
77788 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17>
77789 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) > { static const bool value = true; };
77790
77791
77792
77793 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17>
77794 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const > { static const bool value = true; };
77795
77796 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17>
77797 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) volatile > { static const bool value = true; };
77798
77799 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17>
77800 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile > { static const bool value = true; };
77801
77802
77803 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17>
77804 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const > { static const bool value = true; };
77805
77806 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17>
77807 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) volatile > { static const bool value = true; };
77808
77809 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17>
77810 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const volatile > { static const bool value = true; };
77811
77812
77813 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18>
77814 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) > { static const bool value = true; };
77815
77816 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18>
77817 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) > { static const bool value = true; };
77818
77819
77820
77821 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18>
77822 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const > { static const bool value = true; };
77823
77824 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18>
77825 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) volatile > { static const bool value = true; };
77826
77827 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18>
77828 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile > { static const bool value = true; };
77829
77830
77831 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18>
77832 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const > { static const bool value = true; };
77833
77834 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18>
77835 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) volatile > { static const bool value = true; };
77836
77837 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18>
77838 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const volatile > { static const bool value = true; };
77839
77840
77841 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19>
77842 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) > { static const bool value = true; };
77843
77844 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19>
77845 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) > { static const bool value = true; };
77846
77847
77848
77849 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19>
77850 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const > { static const bool value = true; };
77851
77852 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19>
77853 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) volatile > { static const bool value = true; };
77854
77855 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19>
77856 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile > { static const bool value = true; };
77857
77858
77859 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19>
77860 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const > { static const bool value = true; };
77861
77862 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19>
77863 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) volatile > { static const bool value = true; };
77864
77865 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19>
77866 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const volatile > { static const bool value = true; };
77867
77868
77869 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20>
77870 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) > { static const bool value = true; };
77871
77872 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20>
77873 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) > { static const bool value = true; };
77874
77875
77876
77877 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20>
77878 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const > { static const bool value = true; };
77879
77880 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20>
77881 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) volatile > { static const bool value = true; };
77882
77883 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20>
77884 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile > { static const bool value = true; };
77885
77886
77887 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20>
77888 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const > { static const bool value = true; };
77889
77890 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20>
77891 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) volatile > { static const bool value = true; };
77892
77893 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20>
77894 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const volatile > { static const bool value = true; };
77895
77896
77897 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21>
77898 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) > { static const bool value = true; };
77899
77900 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21>
77901 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) > { static const bool value = true; };
77902
77903
77904
77905 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21>
77906 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const > { static const bool value = true; };
77907
77908 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21>
77909 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) volatile > { static const bool value = true; };
77910
77911 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21>
77912 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile > { static const bool value = true; };
77913
77914
77915 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21>
77916 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const > { static const bool value = true; };
77917
77918 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21>
77919 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) volatile > { static const bool value = true; };
77920
77921 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21>
77922 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const volatile > { static const bool value = true; };
77923
77924
77925 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22>
77926 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) > { static const bool value = true; };
77927
77928 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22>
77929 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) > { static const bool value = true; };
77930
77931
77932
77933 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22>
77934 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const > { static const bool value = true; };
77935
77936 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22>
77937 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) volatile > { static const bool value = true; };
77938
77939 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22>
77940 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile > { static const bool value = true; };
77941
77942
77943 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22>
77944 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const > { static const bool value = true; };
77945
77946 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22>
77947 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) volatile > { static const bool value = true; };
77948
77949 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22>
77950 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const volatile > { static const bool value = true; };
77951
77952
77953 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23>
77954 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) > { static const bool value = true; };
77955
77956 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23>
77957 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) > { static const bool value = true; };
77958
77959
77960
77961 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23>
77962 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const > { static const bool value = true; };
77963
77964 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23>
77965 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) volatile > { static const bool value = true; };
77966
77967 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23>
77968 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile > { static const bool value = true; };
77969
77970
77971 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23>
77972 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const > { static const bool value = true; };
77973
77974 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23>
77975 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) volatile > { static const bool value = true; };
77976
77977 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23>
77978 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const volatile > { static const bool value = true; };
77979
77980
77981 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24>
77982 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) > { static const bool value = true; };
77983
77984 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24>
77985 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) > { static const bool value = true; };
77986
77987
77988
77989 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24>
77990 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const > { static const bool value = true; };
77991
77992 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24>
77993 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) volatile > { static const bool value = true; };
77994
77995 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24>
77996 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile > { static const bool value = true; };
77997
77998
77999 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24>
78000 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const > { static const bool value = true; };
78001
78002 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24>
78003 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) volatile > { static const bool value = true; };
78004
78005 template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24>
78006 struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const volatile > { static const bool value = true; };
78007 # 776 "/usr/include/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp" 3 4
78008 }
78009 }
78010 # 25 "/usr/include/boost/type_traits/is_member_function_pointer.hpp" 2 3 4
78011 # 35 "/usr/include/boost/type_traits/is_member_function_pointer.hpp" 3 4
78012 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
78013 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
78014 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
78015 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
78016 # 36 "/usr/include/boost/type_traits/is_member_function_pointer.hpp" 2 3 4
78017
78018 namespace boost {
78019
78020
78021
78022 template< typename T > struct is_member_function_pointer : ::boost::integral_constant<bool,::boost::type_traits::is_mem_fun_pointer_impl<T>::value> { };
78023 # 122 "/usr/include/boost/type_traits/is_member_function_pointer.hpp" 3 4
78024 }
78025
78026 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
78027 # 125 "/usr/include/boost/type_traits/is_member_function_pointer.hpp" 2 3 4
78028 # 29 "/usr/include/boost/type_traits/is_member_pointer.hpp" 2 3 4
78029 # 39 "/usr/include/boost/type_traits/is_member_pointer.hpp" 3 4
78030 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
78031 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
78032 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
78033 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
78034 # 40 "/usr/include/boost/type_traits/is_member_pointer.hpp" 2 3 4
78035
78036 namespace boost {
78037
78038
78039
78040
78041
78042
78043 template< typename T > struct is_member_pointer : ::boost::integral_constant<bool,::boost::is_member_function_pointer<T>::value> { };
78044 template< typename T, typename U > struct is_member_pointer< U T::* > : ::boost::integral_constant<bool,true> { };
78045 # 104 "/usr/include/boost/type_traits/is_member_pointer.hpp" 3 4
78046 }
78047
78048 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
78049 # 107 "/usr/include/boost/type_traits/is_member_pointer.hpp" 2 3 4
78050 # 25 "/usr/include/boost/type_traits/is_pointer.hpp" 2 3 4
78051 # 38 "/usr/include/boost/type_traits/is_pointer.hpp" 3 4
78052 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
78053 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
78054 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
78055 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
78056 # 39 "/usr/include/boost/type_traits/is_pointer.hpp" 2 3 4
78057
78058 namespace boost {
78059
78060
78061
78062 namespace detail {
78063
78064 template< typename T > struct is_pointer_helper
78065 {
78066 static const bool value = false;
78067 };
78068 # 58 "/usr/include/boost/type_traits/is_pointer.hpp" 3 4
78069 template< typename T > struct is_pointer_helper<T*> { static const bool value = true; };
78070 template< typename T > struct is_pointer_helper<T* const> { static const bool value = true; };
78071 template< typename T > struct is_pointer_helper<T* volatile> { static const bool value = true; };
78072 template< typename T > struct is_pointer_helper<T* const volatile> { static const bool value = true; };
78073
78074
78075
78076 template< typename T >
78077 struct is_pointer_impl
78078 {
78079 static const bool value = (::boost::type_traits::ice_and< ::boost::detail::is_pointer_helper<T>::value , ::boost::type_traits::ice_not< ::boost::is_member_pointer<T>::value >::value >::value);
78080
78081
78082
78083
78084
78085
78086
78087 };
78088
78089 }
78090
78091 template< typename T > struct is_pointer : ::boost::integral_constant<bool,::boost::detail::is_pointer_impl<T>::value> { };
78092 # 145 "/usr/include/boost/type_traits/is_pointer.hpp" 3 4
78093 }
78094
78095 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
78096 # 148 "/usr/include/boost/type_traits/is_pointer.hpp" 2 3 4
78097 # 15 "/usr/include/boost/type_traits/is_scalar.hpp" 2 3 4
78098
78099
78100
78101
78102
78103 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
78104 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
78105 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
78106 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
78107 # 21 "/usr/include/boost/type_traits/is_scalar.hpp" 2 3 4
78108
78109 namespace boost {
78110
78111 namespace detail {
78112
78113 template <typename T>
78114 struct is_scalar_impl
78115 {
78116 static const bool value = (::boost::type_traits::ice_or< ::boost::is_arithmetic<T>::value, ::boost::is_enum<T>::value, ::boost::is_pointer<T>::value, ::boost::is_member_pointer<T>::value >::value);
78117
78118
78119
78120
78121
78122
78123 };
78124
78125
78126
78127 template <> struct is_scalar_impl<void>{ static const bool value = false; };
78128
78129 template <> struct is_scalar_impl<void const>{ static const bool value = false; };
78130 template <> struct is_scalar_impl<void volatile>{ static const bool value = false; };
78131 template <> struct is_scalar_impl<void const volatile>{ static const bool value = false; };
78132
78133
78134 }
78135
78136 template< typename T > struct is_scalar : ::boost::integral_constant<bool,::boost::detail::is_scalar_impl<T>::value> { };
78137
78138 }
78139
78140 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
78141 # 54 "/usr/include/boost/type_traits/is_scalar.hpp" 2 3 4
78142 # 15 "/usr/include/boost/type_traits/is_pod.hpp" 2 3 4
78143
78144
78145
78146
78147
78148
78149 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
78150 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
78151 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
78152 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
78153 # 22 "/usr/include/boost/type_traits/is_pod.hpp" 2 3 4
78154
78155 namespace boost {
78156
78157
78158 template< typename T > struct is_POD;
78159
78160 namespace detail {
78161
78162
78163
78164 template <typename T> struct is_pod_impl
78165 {
78166 static const bool value = (::boost::type_traits::ice_or< ::boost::is_scalar<T>::value, ::boost::is_void<T>::value, false >::value);
78167
78168
78169
78170
78171
78172
78173 };
78174
78175
78176 template <typename T, std::size_t sz>
78177 struct is_pod_impl<T[sz]>
78178 : is_pod_impl<T>
78179 {
78180 };
78181 # 118 "/usr/include/boost/type_traits/is_pod.hpp" 3 4
78182 template<> struct is_pod_impl< void > { static const bool value = (true); };
78183
78184
78185 template<> struct is_pod_impl< void const > { static const bool value = (true); };
78186 template<> struct is_pod_impl< void volatile > { static const bool value = (true); };
78187 template<> struct is_pod_impl< void const volatile > { static const bool value = (true); };
78188
78189
78190 }
78191
78192 template< typename T > struct is_POD : ::boost::integral_constant<bool,::boost::detail::is_pod_impl<T>::value> { };
78193 template< typename T > struct is_pod : ::boost::integral_constant<bool,::boost::detail::is_pod_impl<T>::value> { };
78194
78195 }
78196
78197 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
78198 # 134 "/usr/include/boost/type_traits/is_pod.hpp" 2 3 4
78199 # 15 "/usr/include/boost/type_traits/has_trivial_assign.hpp" 2 3 4
78200
78201
78202
78203
78204
78205
78206
78207 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
78208 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
78209 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
78210 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
78211 # 23 "/usr/include/boost/type_traits/has_trivial_assign.hpp" 2 3 4
78212
78213 namespace boost {
78214
78215 namespace detail {
78216
78217 template <typename T>
78218 struct has_trivial_assign_impl
78219 {
78220 static const bool value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::is_pod<T>::value, false >::value, ::boost::type_traits::ice_not< ::boost::is_const<T>::value >::value, ::boost::type_traits::ice_not< ::boost::is_volatile<T>::value >::value >::value);
78221 # 40 "/usr/include/boost/type_traits/has_trivial_assign.hpp" 3 4
78222 };
78223
78224 }
78225
78226 template< typename T > struct has_trivial_assign : ::boost::integral_constant<bool,::boost::detail::has_trivial_assign_impl<T>::value> { };
78227
78228 }
78229
78230 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
78231 # 49 "/usr/include/boost/type_traits/has_trivial_assign.hpp" 2 3 4
78232 # 18 "/usr/include/boost/type_traits/object_traits.hpp" 2 3 4
78233 # 1 "/usr/include/boost/type_traits/has_trivial_constructor.hpp" 1 3 4
78234 # 18 "/usr/include/boost/type_traits/has_trivial_constructor.hpp" 3 4
78235 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
78236 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
78237 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
78238 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
78239 # 19 "/usr/include/boost/type_traits/has_trivial_constructor.hpp" 2 3 4
78240
78241 namespace boost {
78242
78243 namespace detail {
78244
78245 template <typename T>
78246 struct has_trivial_ctor_impl
78247 {
78248 static const bool value = (::boost::type_traits::ice_or< ::boost::is_pod<T>::value, false >::value);
78249
78250
78251
78252
78253 };
78254
78255 }
78256
78257 template< typename T > struct has_trivial_constructor : ::boost::integral_constant<bool,::boost::detail::has_trivial_ctor_impl<T>::value> { };
78258
78259 }
78260
78261 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
78262 # 41 "/usr/include/boost/type_traits/has_trivial_constructor.hpp" 2 3 4
78263 # 19 "/usr/include/boost/type_traits/object_traits.hpp" 2 3 4
78264 # 1 "/usr/include/boost/type_traits/has_trivial_copy.hpp" 1 3 4
78265 # 21 "/usr/include/boost/type_traits/has_trivial_copy.hpp" 3 4
78266 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
78267 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
78268 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
78269 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
78270 # 22 "/usr/include/boost/type_traits/has_trivial_copy.hpp" 2 3 4
78271
78272 namespace boost {
78273
78274 namespace detail {
78275
78276 template <typename T>
78277 struct has_trivial_copy_impl
78278 {
78279 static const bool value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::is_pod<T>::value, false >::value, ::boost::type_traits::ice_not< ::boost::is_volatile<T>::value >::value >::value);
78280
78281
78282
78283
78284
78285
78286
78287 };
78288
78289 }
78290
78291 template< typename T > struct has_trivial_copy : ::boost::integral_constant<bool,::boost::detail::has_trivial_copy_impl<T>::value> { };
78292
78293 }
78294
78295 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
78296 # 47 "/usr/include/boost/type_traits/has_trivial_copy.hpp" 2 3 4
78297 # 20 "/usr/include/boost/type_traits/object_traits.hpp" 2 3 4
78298 # 1 "/usr/include/boost/type_traits/has_trivial_destructor.hpp" 1 3 4
78299 # 18 "/usr/include/boost/type_traits/has_trivial_destructor.hpp" 3 4
78300 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
78301 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
78302 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
78303 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
78304 # 19 "/usr/include/boost/type_traits/has_trivial_destructor.hpp" 2 3 4
78305
78306 namespace boost {
78307
78308 namespace detail {
78309
78310 template <typename T>
78311 struct has_trivial_dtor_impl
78312 {
78313 static const bool value = (::boost::type_traits::ice_or< ::boost::is_pod<T>::value, false >::value);
78314
78315
78316
78317
78318 };
78319
78320 }
78321
78322 template< typename T > struct has_trivial_destructor : ::boost::integral_constant<bool,::boost::detail::has_trivial_dtor_impl<T>::value> { };
78323
78324 }
78325
78326 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
78327 # 41 "/usr/include/boost/type_traits/has_trivial_destructor.hpp" 2 3 4
78328 # 21 "/usr/include/boost/type_traits/object_traits.hpp" 2 3 4
78329 # 1 "/usr/include/boost/type_traits/has_nothrow_constructor.hpp" 1 3 4
78330 # 15 "/usr/include/boost/type_traits/has_nothrow_constructor.hpp" 3 4
78331 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
78332 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
78333 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
78334 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
78335 # 16 "/usr/include/boost/type_traits/has_nothrow_constructor.hpp" 2 3 4
78336
78337 namespace boost {
78338
78339 namespace detail{
78340
78341 template <class T>
78342 struct has_nothrow_constructor_imp{
78343 static const bool value = (::boost::type_traits::ice_or< ::boost::has_trivial_constructor<T>::value, false >::value);
78344
78345
78346
78347
78348 };
78349
78350 }
78351
78352 template< typename T > struct has_nothrow_constructor : ::boost::integral_constant<bool,::boost::detail::has_nothrow_constructor_imp<T>::value> { };
78353
78354 }
78355
78356 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
78357 # 37 "/usr/include/boost/type_traits/has_nothrow_constructor.hpp" 2 3 4
78358 # 22 "/usr/include/boost/type_traits/object_traits.hpp" 2 3 4
78359 # 1 "/usr/include/boost/type_traits/has_nothrow_copy.hpp" 1 3 4
78360 # 15 "/usr/include/boost/type_traits/has_nothrow_copy.hpp" 3 4
78361 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
78362 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
78363 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
78364 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
78365 # 16 "/usr/include/boost/type_traits/has_nothrow_copy.hpp" 2 3 4
78366
78367 namespace boost {
78368
78369 namespace detail{
78370
78371 template <class T>
78372 struct has_nothrow_copy_imp{
78373 static const bool value = (::boost::type_traits::ice_or< ::boost::has_trivial_copy<T>::value, false >::value);
78374
78375
78376
78377
78378 };
78379
78380 }
78381
78382 template< typename T > struct has_nothrow_copy : ::boost::integral_constant<bool,::boost::detail::has_nothrow_copy_imp<T>::value> { };
78383
78384 }
78385
78386 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
78387 # 37 "/usr/include/boost/type_traits/has_nothrow_copy.hpp" 2 3 4
78388 # 23 "/usr/include/boost/type_traits/object_traits.hpp" 2 3 4
78389 # 1 "/usr/include/boost/type_traits/has_nothrow_assign.hpp" 1 3 4
78390 # 15 "/usr/include/boost/type_traits/has_nothrow_assign.hpp" 3 4
78391 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
78392 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
78393 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
78394 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
78395 # 16 "/usr/include/boost/type_traits/has_nothrow_assign.hpp" 2 3 4
78396
78397 namespace boost {
78398
78399 namespace detail{
78400
78401 template <class T>
78402 struct has_nothrow_assign_imp{
78403 static const bool value = (::boost::type_traits::ice_or< ::boost::has_trivial_assign<T>::value, false >::value);
78404
78405
78406
78407
78408 };
78409
78410 }
78411
78412 template< typename T > struct has_nothrow_assign : ::boost::integral_constant<bool,::boost::detail::has_nothrow_assign_imp<T>::value> { };
78413
78414 }
78415
78416 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
78417 # 37 "/usr/include/boost/type_traits/has_nothrow_assign.hpp" 2 3 4
78418 # 24 "/usr/include/boost/type_traits/object_traits.hpp" 2 3 4
78419 # 1 "/usr/include/boost/type_traits/is_base_and_derived.hpp" 1 3 4
78420 # 13 "/usr/include/boost/type_traits/is_base_and_derived.hpp" 3 4
78421 # 1 "/usr/include/boost/type_traits/is_same.hpp" 1 3 4
78422 # 31 "/usr/include/boost/type_traits/is_same.hpp" 3 4
78423 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
78424 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
78425 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
78426 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
78427 # 32 "/usr/include/boost/type_traits/is_same.hpp" 2 3 4
78428
78429 namespace boost {
78430
78431
78432
78433 template< typename T, typename U > struct is_same : ::boost::integral_constant<bool,false> { };
78434 template< typename T > struct is_same< T,T > : ::boost::integral_constant<bool,true> { };
78435 # 98 "/usr/include/boost/type_traits/is_same.hpp" 3 4
78436 }
78437
78438 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
78439 # 101 "/usr/include/boost/type_traits/is_same.hpp" 2 3 4
78440 # 14 "/usr/include/boost/type_traits/is_base_and_derived.hpp" 2 3 4
78441
78442
78443
78444
78445
78446
78447 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
78448 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
78449 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
78450 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
78451 # 21 "/usr/include/boost/type_traits/is_base_and_derived.hpp" 2 3 4
78452
78453 namespace boost {
78454
78455 namespace detail {
78456 # 110 "/usr/include/boost/type_traits/is_base_and_derived.hpp" 3 4
78457 template <typename B, typename D>
78458 struct bd_helper
78459 {
78460
78461
78462
78463
78464
78465
78466 template <typename T>
78467 static type_traits::yes_type check_sig(D const volatile *, T);
78468 static type_traits::no_type check_sig(B const volatile *, int);
78469
78470
78471
78472
78473 };
78474
78475 template<typename B, typename D>
78476 struct is_base_and_derived_impl2
78477 {
78478 struct Host
78479 {
78480
78481 operator B const volatile *() const;
78482
78483
78484
78485 operator D const volatile *();
78486 };
78487
78488 static const bool value = sizeof(bd_helper<B,D>::check_sig(Host(), 0)) == sizeof(type_traits::yes_type);
78489
78490 };
78491 # 161 "/usr/include/boost/type_traits/is_base_and_derived.hpp" 3 4
78492 template <typename B, typename D>
78493 struct is_base_and_derived_impl3
78494 {
78495 static const bool value = false;
78496 };
78497
78498 template <bool ic1, bool ic2, bool iss>
78499 struct is_base_and_derived_select
78500 {
78501 template <class T, class U>
78502 struct rebind
78503 {
78504 typedef is_base_and_derived_impl3<T,U> type;
78505 };
78506 };
78507
78508 template <>
78509 struct is_base_and_derived_select<true,true,false>
78510 {
78511 template <class T, class U>
78512 struct rebind
78513 {
78514 typedef is_base_and_derived_impl2<T,U> type;
78515 };
78516 };
78517
78518 template <typename B, typename D>
78519 struct is_base_and_derived_impl
78520 {
78521 typedef typename remove_cv<B>::type ncvB;
78522 typedef typename remove_cv<D>::type ncvD;
78523
78524 typedef is_base_and_derived_select<
78525 ::boost::is_class<B>::value,
78526 ::boost::is_class<D>::value,
78527 ::boost::is_same<B,D>::value> selector;
78528 typedef typename selector::template rebind<ncvB,ncvD> binder;
78529 typedef typename binder::type bound_type;
78530
78531 static const bool value = bound_type::value;
78532 };
78533
78534 }
78535
78536 template< typename Base, typename Derived > struct is_base_and_derived : ::boost::integral_constant<bool,(::boost::detail::is_base_and_derived_impl<Base,Derived>::value)> { };
78537
78538
78539
78540
78541
78542
78543
78544 template< typename Base, typename Derived > struct is_base_and_derived< Base&,Derived > : ::boost::integral_constant<bool,false> { };
78545 template< typename Base, typename Derived > struct is_base_and_derived< Base,Derived& > : ::boost::integral_constant<bool,false> { };
78546 template< typename Base, typename Derived > struct is_base_and_derived< Base&,Derived& > : ::boost::integral_constant<bool,false> { };
78547
78548
78549 }
78550
78551 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
78552 # 221 "/usr/include/boost/type_traits/is_base_and_derived.hpp" 2 3 4
78553 # 25 "/usr/include/boost/type_traits/object_traits.hpp" 2 3 4
78554
78555 # 1 "/usr/include/boost/type_traits/is_compound.hpp" 1 3 4
78556 # 13 "/usr/include/boost/type_traits/is_compound.hpp" 3 4
78557 # 1 "/usr/include/boost/type_traits/is_fundamental.hpp" 1 3 4
78558 # 17 "/usr/include/boost/type_traits/is_fundamental.hpp" 3 4
78559 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
78560 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
78561 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
78562 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
78563 # 18 "/usr/include/boost/type_traits/is_fundamental.hpp" 2 3 4
78564
78565 namespace boost {
78566
78567 namespace detail {
78568
78569 template <typename T>
78570 struct is_fundamental_impl
78571 : ::boost::type_traits::ice_or<
78572 ::boost::is_arithmetic<T>::value
78573 , ::boost::is_void<T>::value
78574 >
78575 {
78576 };
78577
78578 }
78579
78580
78581 template< typename T > struct is_fundamental : ::boost::integral_constant<bool,::boost::detail::is_fundamental_impl<T>::value> { };
78582
78583 }
78584
78585 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
78586 # 40 "/usr/include/boost/type_traits/is_fundamental.hpp" 2 3 4
78587 # 14 "/usr/include/boost/type_traits/is_compound.hpp" 2 3 4
78588
78589
78590
78591 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
78592 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
78593 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
78594 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
78595 # 18 "/usr/include/boost/type_traits/is_compound.hpp" 2 3 4
78596
78597 namespace boost {
78598
78599 namespace detail {
78600
78601 template <typename T>
78602 struct is_compound_impl
78603 {
78604 static const bool value = (::boost::type_traits::ice_not< ::boost::is_fundamental<T>::value >::value);
78605
78606
78607
78608 };
78609
78610 }
78611
78612 template< typename T > struct is_compound : ::boost::integral_constant<bool,::boost::detail::is_compound_impl<T>::value> { };
78613
78614 }
78615
78616 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
78617 # 39 "/usr/include/boost/type_traits/is_compound.hpp" 2 3 4
78618 # 27 "/usr/include/boost/type_traits/object_traits.hpp" 2 3 4
78619 # 1 "/usr/include/boost/type_traits/is_empty.hpp" 1 3 4
78620 # 32 "/usr/include/boost/type_traits/is_empty.hpp" 3 4
78621 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
78622 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
78623 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
78624 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
78625 # 33 "/usr/include/boost/type_traits/is_empty.hpp" 2 3 4
78626
78627 namespace boost {
78628
78629 namespace detail {
78630
78631
78632 template <typename T>
78633 struct empty_helper_t1 : public T
78634 {
78635 empty_helper_t1();
78636 int i[256];
78637 private:
78638
78639 empty_helper_t1(const empty_helper_t1&);
78640 empty_helper_t1& operator=(const empty_helper_t1&);
78641 };
78642
78643 struct empty_helper_t2 { int i[256]; };
78644
78645
78646
78647 template <typename T, bool is_a_class = false>
78648 struct empty_helper
78649 {
78650 static const bool value = false;
78651 };
78652
78653 template <typename T>
78654 struct empty_helper<T, true>
78655 {
78656 static const bool value = (sizeof(empty_helper_t1<T>) == sizeof(empty_helper_t2));
78657
78658
78659 };
78660
78661 template <typename T>
78662 struct is_empty_impl
78663 {
78664 typedef typename remove_cv<T>::type cvt;
78665 static const bool value = ( ::boost::type_traits::ice_or< ::boost::detail::empty_helper<cvt,::boost::is_class<T>::value>::value , false >::value );
78666
78667
78668
78669
78670
78671
78672 };
78673 # 195 "/usr/include/boost/type_traits/is_empty.hpp" 3 4
78674 template<> struct is_empty_impl< void > { static const bool value = (false); };
78675
78676 template<> struct is_empty_impl< void const > { static const bool value = (false); };
78677 template<> struct is_empty_impl< void volatile > { static const bool value = (false); };
78678 template<> struct is_empty_impl< void const volatile > { static const bool value = (false); };
78679
78680
78681 }
78682
78683 template< typename T > struct is_empty : ::boost::integral_constant<bool,::boost::detail::is_empty_impl<T>::value> { };
78684
78685 }
78686
78687 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
78688 # 209 "/usr/include/boost/type_traits/is_empty.hpp" 2 3 4
78689 # 28 "/usr/include/boost/type_traits/object_traits.hpp" 2 3 4
78690 # 1 "/usr/include/boost/type_traits/is_object.hpp" 1 3 4
78691 # 20 "/usr/include/boost/type_traits/is_object.hpp" 3 4
78692 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
78693 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
78694 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
78695 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
78696 # 21 "/usr/include/boost/type_traits/is_object.hpp" 2 3 4
78697
78698 namespace boost {
78699
78700 namespace detail {
78701
78702 template <typename T>
78703 struct is_object_impl
78704 {
78705
78706 static const bool value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_not< ::boost::is_reference<T>::value>::value, ::boost::type_traits::ice_not< ::boost::is_void<T>::value>::value, ::boost::type_traits::ice_not< ::boost::is_function<T>::value>::value >::value);
78707 # 43 "/usr/include/boost/type_traits/is_object.hpp" 3 4
78708 };
78709
78710 }
78711
78712 template< typename T > struct is_object : ::boost::integral_constant<bool,::boost::detail::is_object_impl<T>::value> { };
78713
78714 }
78715
78716 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
78717 # 52 "/usr/include/boost/type_traits/is_object.hpp" 2 3 4
78718 # 29 "/usr/include/boost/type_traits/object_traits.hpp" 2 3 4
78719
78720
78721 # 1 "/usr/include/boost/type_traits/is_stateless.hpp" 1 3 4
78722 # 21 "/usr/include/boost/type_traits/is_stateless.hpp" 3 4
78723 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
78724 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
78725 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
78726 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
78727 # 22 "/usr/include/boost/type_traits/is_stateless.hpp" 2 3 4
78728
78729 namespace boost {
78730
78731 namespace detail {
78732
78733 template <typename T>
78734 struct is_stateless_impl
78735 {
78736 static const bool value = (::boost::type_traits::ice_and< ::boost::has_trivial_constructor<T>::value, ::boost::has_trivial_copy<T>::value, ::boost::has_trivial_destructor<T>::value, ::boost::is_class<T>::value, ::boost::is_empty<T>::value >::value);
78737
78738
78739
78740
78741
78742
78743
78744 };
78745
78746 }
78747
78748 template< typename T > struct is_stateless : ::boost::integral_constant<bool,::boost::detail::is_stateless_impl<T>::value> { };
78749
78750 }
78751
78752 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
78753 # 47 "/usr/include/boost/type_traits/is_stateless.hpp" 2 3 4
78754 # 32 "/usr/include/boost/type_traits/object_traits.hpp" 2 3 4
78755 # 19 "/usr/include/boost/lambda/detail/lambda_traits.hpp" 2 3 4
78756
78757 namespace boost {
78758 namespace lambda {
78759
78760
78761
78762
78763 namespace detail {
78764
78765 template <bool If, class Then, class Else> struct IF { typedef Then RET; };
78766
78767 template <class Then, class Else> struct IF<false, Then, Else> {
78768 typedef Else RET;
78769 };
78770 # 42 "/usr/include/boost/lambda/detail/lambda_traits.hpp" 3 4
78771 template<class T>
78772 struct IF_type_
78773 {
78774 typedef typename T::type type;
78775 };
78776
78777
78778 template<bool C, class T, class E>
78779 struct IF_type
78780 {
78781 typedef typename
78782 IF_type_<typename IF<C, T, E>::RET >::type type;
78783 };
78784
78785
78786 template <class T> struct identity_mapping { typedef T type; };
78787
78788
78789
78790
78791
78792
78793 template<class T>
78794 struct IF_value_
78795 {
78796 static const int value = T::value;
78797 };
78798
78799
78800 template<bool C, class T, class E>
78801 struct IF_value
78802 {
78803 static const int value = (IF_value_<typename IF<C, T, E>::RET>::value);
78804 };
78805
78806
78807
78808
78809
78810 template<class T> class remove_reference_if_valid
78811 {
78812
78813 typedef typename boost::remove_reference<T>::type plainT;
78814 public:
78815 typedef typename IF<
78816 boost::is_function<plainT>::value,
78817 T,
78818 plainT
78819 >::RET type;
78820
78821 };
78822
78823
78824 template<class T> struct remove_reference_and_cv {
78825 typedef typename boost::remove_cv<
78826 typename boost::remove_reference<T>::type
78827 >::type type;
78828 };
78829
78830
78831
78832
78833 template<int N, class T> struct tuple_element_as_reference {
78834 typedef typename
78835 boost::tuples::access_traits<
78836 typename boost::tuples::element<N, T>::type
78837 >::non_const_type type;
78838 };
78839
78840
78841 template<int N, class T> struct tuple_element_stripped {
78842 typedef typename
78843 remove_reference_and_cv<
78844 typename boost::tuples::element<N, T>::type
78845 >::type type;
78846 };
78847
78848
78849
78850 template <class T> struct is_lambda_functor_ {
78851 static const bool value = false;
78852 };
78853
78854 template <class Arg> struct is_lambda_functor_<lambda_functor<Arg> > {
78855 static const bool value = true;
78856 };
78857
78858 }
78859
78860
78861 template <class T> struct is_lambda_functor {
78862 static const bool value = detail::is_lambda_functor_< typename detail::remove_reference_and_cv<T>::type >::value;
78863
78864
78865
78866
78867 };
78868
78869
78870 namespace detail {
78871 # 158 "/usr/include/boost/lambda/detail/lambda_traits.hpp" 3 4
78872 template<class T1, class T2>
78873 struct parameter_traits_ {
78874 typedef T2 type;
78875 };
78876
78877
78878 template<class T, class Any> struct parameter_traits_<T&, Any> {
78879 typedef typename
78880 generate_error<T&>::
78881 parameter_traits_class_instantiated_with_reference_type type;
78882 };
78883
78884
78885 template<class T, int n, class Any> struct parameter_traits_<T[n], Any> {
78886 typedef T (&type)[n];
78887 };
78888
78889 template<class T, int n, class Any>
78890 struct parameter_traits_<const T[n], Any> {
78891 typedef const T (&type)[n];
78892 };
78893
78894 template<class T, int n, class Any>
78895 struct parameter_traits_<volatile T[n], Any> {
78896 typedef volatile T (&type)[n];
78897 };
78898 template<class T, int n, class Any>
78899 struct parameter_traits_<const volatile T[n], Any> {
78900 typedef const volatile T (&type)[n];
78901 };
78902
78903
78904 template<class T, class Any>
78905 struct parameter_traits_<boost::reference_wrapper<T>, Any >{
78906 typedef T& type;
78907 };
78908
78909 template<class T, class Any>
78910 struct parameter_traits_<const boost::reference_wrapper<T>, Any >{
78911 typedef T& type;
78912 };
78913
78914 template<class T, class Any>
78915 struct parameter_traits_<volatile boost::reference_wrapper<T>, Any >{
78916 typedef T& type;
78917 };
78918
78919 template<class T, class Any>
78920 struct parameter_traits_<const volatile boost::reference_wrapper<T>, Any >{
78921 typedef T& type;
78922 };
78923
78924 template<class Any>
78925 struct parameter_traits_<void, Any> {
78926 typedef void type;
78927 };
78928
78929 template<class Arg, class Any>
78930 struct parameter_traits_<lambda_functor<Arg>, Any > {
78931 typedef lambda_functor<Arg> type;
78932 };
78933
78934 template<class Arg, class Any>
78935 struct parameter_traits_<const lambda_functor<Arg>, Any > {
78936 typedef lambda_functor<Arg> type;
78937 };
78938
78939
78940 template<class Arg, class Any>
78941 struct parameter_traits_<volatile lambda_functor<Arg>, Any > {
78942 typedef lambda_functor<Arg> type;
78943 };
78944
78945 template<class Arg, class Any>
78946 struct parameter_traits_<const volatile lambda_functor<Arg>, Any > {
78947 typedef lambda_functor<Arg> type;
78948 };
78949
78950 }
78951 # 250 "/usr/include/boost/lambda/detail/lambda_traits.hpp" 3 4
78952 template<class T>
78953 struct const_copy_argument {
78954 typedef typename
78955 detail::parameter_traits_<
78956 T,
78957 typename detail::IF<boost::is_function<T>::value, T&, const T>::RET
78958 >::type type;
78959 };
78960 # 266 "/usr/include/boost/lambda/detail/lambda_traits.hpp" 3 4
78961 template<class T, int n> struct const_copy_argument <T[n]> {
78962 typedef const T (&type)[n];
78963 };
78964 template<class T, int n> struct const_copy_argument <volatile T[n]> {
78965 typedef const volatile T (&type)[n];
78966 };
78967
78968 template<class T>
78969 struct const_copy_argument<T&> {};
78970
78971
78972
78973
78974 template<>
78975 struct const_copy_argument<void> {
78976 typedef void type;
78977 };
78978
78979
78980
78981 template<class T>
78982 struct bound_argument_conversion {
78983 typedef typename const_copy_argument<T>::type type;
78984 };
78985
78986 template<class T>
78987 struct bound_argument_conversion<T&> {
78988 typedef T& type;
78989 };
78990
78991
78992
78993
78994
78995
78996 template<class T>
78997 struct reference_argument {
78998 typedef typename detail::parameter_traits_<T, T&>::type type;
78999 };
79000
79001 template<class T>
79002 struct reference_argument<T&> {
79003 typedef typename detail::generate_error<T&>::references_not_allowed type;
79004 };
79005
79006 template<class Arg>
79007 struct reference_argument<lambda_functor<Arg> > {
79008 typedef lambda_functor<Arg> type;
79009 };
79010
79011 template<class Arg>
79012 struct reference_argument<const lambda_functor<Arg> > {
79013 typedef lambda_functor<Arg> type;
79014 };
79015
79016
79017 template<class Arg>
79018 struct reference_argument<volatile lambda_functor<Arg> > {
79019 typedef lambda_functor<Arg> type;
79020 };
79021
79022 template<class Arg>
79023 struct reference_argument<const volatile lambda_functor<Arg> > {
79024 typedef lambda_functor<Arg> type;
79025 };
79026
79027 template<>
79028 struct reference_argument<void> {
79029 typedef void type;
79030 };
79031
79032 namespace detail {
79033
79034
79035 template <class T>
79036 struct array_to_pointer {
79037 typedef T type;
79038 };
79039
79040 template <class T, int N>
79041 struct array_to_pointer <const T[N]> {
79042 typedef const T* type;
79043 };
79044 template <class T, int N>
79045 struct array_to_pointer <T[N]> {
79046 typedef T* type;
79047 };
79048
79049 template <class T, int N>
79050 struct array_to_pointer <const T (&) [N]> {
79051 typedef const T* type;
79052 };
79053 template <class T, int N>
79054 struct array_to_pointer <T (&) [N]> {
79055 typedef T* type;
79056 };
79057 # 387 "/usr/include/boost/lambda/detail/lambda_traits.hpp" 3 4
79058 template<class T>
79059 struct bind_traits {
79060 typedef const T type;
79061 };
79062
79063 template<class T>
79064 struct bind_traits<T&> {
79065 typedef T& type;
79066 };
79067
79068
79069
79070 template<>
79071 struct bind_traits<null_type> {
79072 typedef null_type type;
79073 };
79074
79075
79076
79077 template<>
79078 struct bind_traits<const null_type> {
79079 typedef null_type type;
79080 };
79081
79082
79083
79084
79085
79086 template<class T, int n> struct bind_traits <T[n]> {
79087 typedef const T (&type)[n];
79088 };
79089
79090 template<class T, int n>
79091 struct bind_traits<const T[n]> {
79092 typedef const T (&type)[n];
79093 };
79094
79095 template<class T, int n> struct bind_traits<volatile T[n]> {
79096 typedef const volatile T (&type)[n];
79097 };
79098
79099 template<class T, int n>
79100 struct bind_traits<const volatile T[n]> {
79101 typedef const volatile T (&type)[n];
79102 };
79103
79104 template<class T>
79105 struct bind_traits<reference_wrapper<T> >{
79106 typedef T& type;
79107 };
79108
79109 template<class T>
79110 struct bind_traits<const reference_wrapper<T> >{
79111 typedef T& type;
79112 };
79113
79114 template<>
79115 struct bind_traits<void> {
79116 typedef void type;
79117 };
79118
79119
79120
79121 template <
79122 class T0 = null_type, class T1 = null_type, class T2 = null_type,
79123 class T3 = null_type, class T4 = null_type, class T5 = null_type,
79124 class T6 = null_type, class T7 = null_type, class T8 = null_type,
79125 class T9 = null_type
79126 >
79127 struct bind_tuple_mapper {
79128 typedef
79129 tuple<typename bind_traits<T0>::type,
79130 typename bind_traits<T1>::type,
79131 typename bind_traits<T2>::type,
79132 typename bind_traits<T3>::type,
79133 typename bind_traits<T4>::type,
79134 typename bind_traits<T5>::type,
79135 typename bind_traits<T6>::type,
79136 typename bind_traits<T7>::type,
79137 typename bind_traits<T8>::type,
79138 typename bind_traits<T9>::type> type;
79139 };
79140
79141
79142
79143
79144 template <class T> struct remove_const_reference {
79145 typedef typename bind_traits<T>::type type;
79146 };
79147
79148 template <class T> struct remove_const_reference<const T&> {
79149 typedef const T type;
79150 };
79151
79152
79153
79154 template <
79155 class T0 = null_type, class T1 = null_type, class T2 = null_type,
79156 class T3 = null_type, class T4 = null_type, class T5 = null_type,
79157 class T6 = null_type, class T7 = null_type, class T8 = null_type,
79158 class T9 = null_type
79159 >
79160 class bind_type_generator {
79161
79162 typedef typename
79163 detail::bind_tuple_mapper<
79164 T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
79165 >::type args_t;
79166
79167 static const int nof_elems = boost::tuples::length<args_t>::value;
79168
79169 typedef
79170 action<
79171 nof_elems,
79172 function_action<nof_elems>
79173 > action_type;
79174
79175 public:
79176 typedef
79177 lambda_functor<
79178 lambda_functor_base<
79179 action_type,
79180 args_t
79181 >
79182 > type;
79183
79184 };
79185
79186
79187
79188 }
79189
79190 template <class T> inline const T& make_const(const T& t) { return t; }
79191
79192
79193 }
79194 }
79195 # 47 "/usr/include/boost/lambda/core.hpp" 2 3 4
79196
79197 # 1 "/usr/include/boost/lambda/detail/function_adaptors.hpp" 1 3 4
79198 # 15 "/usr/include/boost/lambda/detail/function_adaptors.hpp" 3 4
79199 # 1 "/usr/include/boost/type_traits/same_traits.hpp" 1 3 4
79200 # 16 "/usr/include/boost/lambda/detail/function_adaptors.hpp" 2 3 4
79201
79202 namespace boost {
79203 namespace lambda {
79204
79205 template <class Func> struct function_adaptor {
79206
79207
79208 template <class Args> class sig {
79209 typedef typename Args::head_type F;
79210 typedef typename detail::remove_reference_and_cv<Func>::type plainF;
79211 public:
79212
79213
79214
79215
79216
79217 typedef typename plainF::template sig<Args>::type type;
79218 };
79219
79220 template<class RET, class A1>
79221 static RET apply(A1& a1) {
79222 return a1();
79223 }
79224 template<class RET, class A1, class A2>
79225 static RET apply(A1& a1, A2& a2) {
79226 return a1(a2);
79227 }
79228 template<class RET, class A1, class A2, class A3>
79229 static RET apply(A1& a1, A2& a2, A3& a3) {
79230 return a1(a2, a3);
79231 }
79232 template<class RET, class A1, class A2, class A3, class A4>
79233 static RET apply(A1& a1, A2& a2, A3& a3, A4& a4) {
79234 return a1(a2, a3, a4);
79235 }
79236 template<class RET, class A1, class A2, class A3, class A4, class A5>
79237 static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) {
79238 return a1(a2, a3, a4, a5);
79239 }
79240 template<class RET, class A1, class A2, class A3, class A4, class A5, class A6>
79241 static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) {
79242 return a1(a2, a3, a4, a5, a6);
79243 }
79244 template<class RET, class A1, class A2, class A3, class A4, class A5, class A6,
79245 class A7>
79246 static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6,
79247 A7& a7) {
79248 return a1(a2, a3, a4, a5, a6, a7);
79249 }
79250 template<class RET, class A1, class A2, class A3, class A4, class A5, class A6,
79251 class A7, class A8>
79252 static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6,
79253 A7& a7, A8& a8) {
79254 return a1(a2, a3, a4, a5, a6, a7, a8);
79255 }
79256 template<class RET, class A1, class A2, class A3, class A4, class A5, class A6,
79257 class A7, class A8, class A9>
79258 static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6,
79259 A7& a7, A8& a8, A9& a9) {
79260 return a1(a2, a3, a4, a5, a6, a7, a8, a9);
79261 }
79262 template<class RET, class A1, class A2, class A3, class A4, class A5, class A6,
79263 class A7, class A8, class A9, class A10>
79264 static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6,
79265 A7& a7, A8& a8, A9& a9, A10& a10) {
79266 return a1(a2, a3, a4, a5, a6, a7, a8, a9, a10);
79267 }
79268 };
79269
79270 template <class Func> struct function_adaptor<const Func>;
79271
79272
79273 template <class Object, class T>
79274 struct function_adaptor<T Object::*> {
79275
79276
79277
79278
79279
79280
79281 template<class Args> class sig {
79282 typedef typename boost::tuples::element<1, Args>::type argument_type;
79283
79284 typedef typename detail::IF<boost::is_const<argument_type>::value,
79285 typename boost::add_const<T>::type,
79286 T
79287 >::RET properly_consted_return_type;
79288
79289 typedef typename detail::IF<
79290 boost::is_volatile<properly_consted_return_type>::value,
79291 typename boost::add_volatile<properly_consted_return_type>::type,
79292 properly_consted_return_type
79293 >::RET properly_cvd_return_type;
79294
79295
79296 public:
79297 typedef typename
79298 boost::add_reference<properly_cvd_return_type>::type type;
79299 };
79300
79301 template <class RET>
79302 static RET apply( T Object::*data, Object& o) {
79303 return o.*data;
79304 }
79305 template <class RET>
79306 static RET apply( T Object::*data, const Object& o) {
79307 return o.*data;
79308 }
79309 template <class RET>
79310 static RET apply( T Object::*data, volatile Object& o) {
79311 return o.*data;
79312 }
79313 template <class RET>
79314 static RET apply( T Object::*data, const volatile Object& o) {
79315 return o.*data;
79316 }
79317 template <class RET>
79318 static RET apply( T Object::*data, Object* o) {
79319 return o->*data;
79320 }
79321 template <class RET>
79322 static RET apply( T Object::*data, const Object* o) {
79323 return o->*data;
79324 }
79325 template <class RET>
79326 static RET apply( T Object::*data, volatile Object* o) {
79327 return o->*data;
79328 }
79329 template <class RET>
79330 static RET apply( T Object::*data, const volatile Object* o) {
79331 return o->*data;
79332 }
79333 };
79334
79335
79336
79337 template <class Result>
79338 struct function_adaptor<Result (void)> {
79339
79340 template<class T> struct sig { typedef Result type; };
79341 template <class RET>
79342 static Result apply(Result (*func)()) {
79343 return func();
79344 }
79345 };
79346
79347 template <class Result>
79348 struct function_adaptor<Result (*)(void)> {
79349
79350 template<class T> struct sig { typedef Result type; };
79351 template <class RET>
79352 static Result apply(Result (*func)()) {
79353 return func();
79354 }
79355 };
79356
79357
79358
79359 template <class Object, class Result>
79360 struct function_adaptor<Result (Object::*)() const> {
79361
79362 template<class T> struct sig { typedef Result type; };
79363 template <class RET>
79364 static Result apply( Result (Object::*func)() const, const Object* o) {
79365 return (o->*func)();
79366 }
79367 template <class RET>
79368 static Result apply( Result (Object::*func)() const, const Object& o) {
79369 return (o.*func)();
79370 }
79371 };
79372
79373 template <class Object, class Result>
79374 struct function_adaptor<Result (Object::*)()> {
79375
79376 template<class T> struct sig { typedef Result type; };
79377 template <class RET>
79378 static Result apply( Result (Object::*func)(), Object* o) {
79379 return (o->*func)();
79380 }
79381 template <class RET>
79382 static Result apply( Result (Object::*func)(), Object& o) {
79383 return (o.*func)();
79384 }
79385 };
79386
79387 template <class Arg1, class Result>
79388 struct function_adaptor<Result (Arg1)> {
79389
79390 template<class T> struct sig { typedef Result type; };
79391 template <class RET, class A1>
79392 static Result apply(Result (*func)(Arg1), A1& a1) {
79393 return func(a1);
79394 }
79395 };
79396
79397 template <class Arg1, class Result>
79398 struct function_adaptor<Result (*)(Arg1)> {
79399
79400 template<class T> struct sig { typedef Result type; };
79401 template <class RET, class A1>
79402 static Result apply(Result (*func)(Arg1), A1& a1) {
79403 return func(a1);
79404 }
79405 };
79406
79407
79408
79409 template <class Object, class Arg1, class Result>
79410 struct function_adaptor<Result (Object::*)(Arg1) const> {
79411
79412 template<class T> struct sig { typedef Result type; };
79413 template <class RET, class A1>
79414 static Result apply( Result (Object::*func)(Arg1) const, const Object* o,
79415 A1& a1) {
79416 return (o->*func)(a1);
79417 }
79418 template <class RET, class A1>
79419 static Result apply( Result (Object::*func)(Arg1) const, const Object& o,
79420 A1& a1) {
79421 return (o.*func)(a1);
79422 }
79423 };
79424
79425 template <class Object, class Arg1, class Result>
79426 struct function_adaptor<Result (Object::*)(Arg1)> {
79427
79428 template<class T> struct sig { typedef Result type; };
79429 template <class RET, class A1>
79430 static Result apply( Result (Object::*func)(Arg1), Object* o, A1& a1) {
79431 return (o->*func)(a1);
79432 }
79433 template <class RET, class A1>
79434 static Result apply( Result (Object::*func)(Arg1), Object& o, A1& a1) {
79435 return (o.*func)(a1);
79436 }
79437 };
79438
79439 template <class Arg1, class Arg2, class Result>
79440 struct function_adaptor<Result (Arg1, Arg2)> {
79441
79442 template<class T> struct sig { typedef Result type; };
79443 template <class RET, class A1, class A2>
79444 static Result apply(Result (*func)(Arg1, Arg2), A1& a1, A2& a2) {
79445 return func(a1, a2);
79446 }
79447 };
79448
79449 template <class Arg1, class Arg2, class Result>
79450 struct function_adaptor<Result (*)(Arg1, Arg2)> {
79451
79452 template<class T> struct sig { typedef Result type; };
79453 template <class RET, class A1, class A2>
79454 static Result apply(Result (*func)(Arg1, Arg2), A1& a1, A2& a2) {
79455 return func(a1, a2);
79456 }
79457 };
79458
79459
79460
79461 template <class Object, class Arg1, class Arg2, class Result>
79462 struct function_adaptor<Result (Object::*)(Arg1, Arg2) const> {
79463
79464 template<class T> struct sig { typedef Result type; };
79465 template <class RET, class A1, class A2>
79466 static Result apply( Result (Object::*func)(Arg1, Arg2) const, const Object* o, A1& a1, A2& a2) {
79467 return (o->*func)(a1, a2);
79468 }
79469 template <class RET, class A1, class A2>
79470 static Result apply( Result (Object::*func)(Arg1, Arg2) const, const Object& o, A1& a1, A2& a2) {
79471 return (o.*func)(a1, a2);
79472 }
79473 };
79474
79475 template <class Object, class Arg1, class Arg2, class Result>
79476 struct function_adaptor<Result (Object::*)(Arg1, Arg2)> {
79477
79478 template<class T> struct sig { typedef Result type; };
79479 template <class RET, class A1, class A2>
79480 static Result apply( Result (Object::*func)(Arg1, Arg2), Object* o, A1& a1, A2& a2) {
79481 return (o->*func)(a1, a2);
79482 }
79483 template <class RET, class A1, class A2>
79484 static Result apply( Result (Object::*func)(Arg1, Arg2), Object& o, A1& a1, A2& a2) {
79485 return (o.*func)(a1, a2);
79486 }
79487 };
79488
79489 template <class Arg1, class Arg2, class Arg3, class Result>
79490 struct function_adaptor<Result (Arg1, Arg2, Arg3)> {
79491
79492 template<class T> struct sig { typedef Result type; };
79493 template <class RET, class A1, class A2, class A3>
79494 static Result apply(Result (*func)(Arg1, Arg2, Arg3), A1& a1, A2& a2, A3& a3) {
79495 return func(a1, a2, a3);
79496 }
79497 };
79498
79499 template <class Arg1, class Arg2, class Arg3, class Result>
79500 struct function_adaptor<Result (*)(Arg1, Arg2, Arg3)> {
79501
79502 template<class T> struct sig { typedef Result type; };
79503 template <class RET, class A1, class A2, class A3>
79504 static Result apply(Result (*func)(Arg1, Arg2, Arg3), A1& a1, A2& a2, A3& a3) {
79505 return func(a1, a2, a3);
79506 }
79507 };
79508
79509
79510
79511 template <class Object, class Arg1, class Arg2, class Arg3, class Result>
79512 struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3) const> {
79513
79514 template<class T> struct sig { typedef Result type; };
79515 template <class RET, class A1, class A2, class A3>
79516 static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3) const, const Object* o, A1& a1, A2& a2, A3& a3) {
79517 return (o->*func)(a1, a2, a3);
79518 }
79519 template <class RET, class A1, class A2, class A3>
79520 static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3) const, const Object& o, A1& a1, A2& a2, A3& a3) {
79521 return (o.*func)(a1, a2, a3);
79522 }
79523 };
79524
79525 template <class Object, class Arg1, class Arg2, class Arg3, class Result>
79526 struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3)> {
79527
79528 template<class T> struct sig { typedef Result type; };
79529 template <class RET, class A1, class A2, class A3>
79530 static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3), Object* o, A1& a1, A2& a2, A3& a3) {
79531 return (o->*func)(a1, a2, a3);
79532 }
79533 template <class RET, class A1, class A2, class A3>
79534 static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3), Object& o, A1& a1, A2& a2, A3& a3) {
79535 return (o.*func)(a1, a2, a3);
79536 }
79537 };
79538
79539 template <class Arg1, class Arg2, class Arg3, class Arg4, class Result>
79540 struct function_adaptor<Result (Arg1, Arg2, Arg3, Arg4)> {
79541
79542 template<class T> struct sig { typedef Result type; };
79543 template <class RET, class A1, class A2, class A3, class A4>
79544 static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4), A1& a1, A2& a2, A3& a3, A4& a4) {
79545 return func(a1, a2, a3, a4);
79546 }
79547 };
79548
79549 template <class Arg1, class Arg2, class Arg3, class Arg4, class Result>
79550 struct function_adaptor<Result (*)(Arg1, Arg2, Arg3, Arg4)> {
79551
79552 template<class T> struct sig { typedef Result type; };
79553 template <class RET, class A1, class A2, class A3, class A4>
79554 static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4), A1& a1, A2& a2, A3& a3, A4& a4) {
79555 return func(a1, a2, a3, a4);
79556 }
79557 };
79558
79559
79560
79561 template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Result>
79562 struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4) const> {
79563
79564 template<class T> struct sig { typedef Result type; };
79565 template <class RET, class A1, class A2, class A3, class A4>
79566 static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4) const, const Object* o, A1& a1, A2& a2, A3& a3, A4& a4) {
79567 return (o->*func)(a1, a2, a3, a4);
79568 }
79569 template <class RET, class A1, class A2, class A3, class A4>
79570 static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4) const, const Object& o, A1& a1, A2& a2, A3& a3, A4& a4) {
79571 return (o.*func)(a1, a2, a3, a4);
79572 }
79573 };
79574
79575 template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Result>
79576 struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4)> {
79577
79578 template<class T> struct sig { typedef Result type; };
79579 template <class RET, class A1, class A2, class A3, class A4>
79580 static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4), Object* o, A1& a1, A2& a2, A3& a3, A4& a4) {
79581 return (o->*func)(a1, a2, a3, a4);
79582 }
79583 template <class RET, class A1, class A2, class A3, class A4>
79584 static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4), Object& o, A1& a1, A2& a2, A3& a3, A4& a4) {
79585 return (o.*func)(a1, a2, a3, a4);
79586 }
79587 };
79588
79589 template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Result>
79590 struct function_adaptor<Result (Arg1, Arg2, Arg3, Arg4, Arg5)> {
79591
79592 template<class T> struct sig { typedef Result type; };
79593 template <class RET, class A1, class A2, class A3, class A4, class A5>
79594 static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) {
79595 return func(a1, a2, a3, a4, a5);
79596 }
79597 };
79598
79599 template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Result>
79600 struct function_adaptor<Result (*)(Arg1, Arg2, Arg3, Arg4, Arg5)> {
79601
79602 template<class T> struct sig { typedef Result type; };
79603 template <class RET, class A1, class A2, class A3, class A4, class A5>
79604 static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) {
79605 return func(a1, a2, a3, a4, a5);
79606 }
79607 };
79608
79609
79610
79611 template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Result>
79612 struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4, Arg5) const> {
79613
79614 template<class T> struct sig { typedef Result type; };
79615 template <class RET, class A1, class A2, class A3, class A4, class A5>
79616 static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5) const, const Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) {
79617 return (o->*func)(a1, a2, a3, a4, a5);
79618 }
79619 template <class RET, class A1, class A2, class A3, class A4, class A5>
79620 static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5) const, const Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) {
79621 return (o.*func)(a1, a2, a3, a4, a5);
79622 }
79623 };
79624
79625 template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Result>
79626 struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4, Arg5)> {
79627
79628 template<class T> struct sig { typedef Result type; };
79629 template <class RET, class A1, class A2, class A3, class A4, class A5>
79630 static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5), Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) {
79631 return (o->*func)(a1, a2, a3, a4, a5);
79632 }
79633 template <class RET, class A1, class A2, class A3, class A4, class A5>
79634 static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5), Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) {
79635 return (o.*func)(a1, a2, a3, a4, a5);
79636 }
79637 };
79638
79639 template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Result>
79640 struct function_adaptor<Result (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6)> {
79641
79642 template<class T> struct sig { typedef Result type; };
79643 template <class RET, class A1, class A2, class A3, class A4, class A5, class A6>
79644 static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) {
79645 return func(a1, a2, a3, a4, a5, a6);
79646 }
79647 };
79648
79649 template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Result>
79650 struct function_adaptor<Result (*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6)> {
79651
79652 template<class T> struct sig { typedef Result type; };
79653 template <class RET, class A1, class A2, class A3, class A4, class A5, class A6>
79654 static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) {
79655 return func(a1, a2, a3, a4, a5, a6);
79656 }
79657 };
79658
79659
79660
79661 template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Result>
79662 struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6) const> {
79663
79664 template<class T> struct sig { typedef Result type; };
79665 template <class RET, class A1, class A2, class A3, class A4, class A5, class A6>
79666 static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6) const, const Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) {
79667 return (o->*func)(a1, a2, a3, a4, a5, a6);
79668 }
79669 template <class RET, class A1, class A2, class A3, class A4, class A5, class A6>
79670 static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6) const, const Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) {
79671 return (o.*func)(a1, a2, a3, a4, a5, a6);
79672 }
79673 };
79674
79675 template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Result>
79676 struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6)> {
79677
79678 template<class T> struct sig { typedef Result type; };
79679 template <class RET, class A1, class A2, class A3, class A4, class A5, class A6>
79680 static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6), Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) {
79681 return (o->*func)(a1, a2, a3, a4, a5, a6);
79682 }
79683 template <class RET, class A1, class A2, class A3, class A4, class A5, class A6>
79684 static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6), Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) {
79685 return (o.*func)(a1, a2, a3, a4, a5, a6);
79686 }
79687 };
79688
79689 template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Result>
79690 struct function_adaptor<Result (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7)> {
79691
79692 template<class T> struct sig { typedef Result type; };
79693 template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
79694 static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) {
79695 return func(a1, a2, a3, a4, a5, a6, a7);
79696 }
79697 };
79698
79699 template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Result>
79700 struct function_adaptor<Result (*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7)> {
79701
79702 template<class T> struct sig { typedef Result type; };
79703 template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
79704 static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) {
79705 return func(a1, a2, a3, a4, a5, a6, a7);
79706 }
79707 };
79708
79709
79710
79711 template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Result>
79712 struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7) const> {
79713
79714 template<class T> struct sig { typedef Result type; };
79715 template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
79716 static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7) const, const Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) {
79717 return (o->*func)(a1, a2, a3, a4, a5, a6, a7);
79718 }
79719 template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
79720 static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7) const, const Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) {
79721 return (o.*func)(a1, a2, a3, a4, a5, a6, a7);
79722 }
79723 };
79724
79725 template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Result>
79726 struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7)> {
79727
79728 template<class T> struct sig { typedef Result type; };
79729 template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
79730 static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7), Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) {
79731 return (o->*func)(a1, a2, a3, a4, a5, a6, a7);
79732 }
79733 template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
79734 static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7), Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) {
79735 return (o.*func)(a1, a2, a3, a4, a5, a6, a7);
79736 }
79737 };
79738
79739 template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Result>
79740 struct function_adaptor<Result (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8)> {
79741
79742 template<class T> struct sig { typedef Result type; };
79743 template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
79744 static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) {
79745 return func(a1, a2, a3, a4, a5, a6, a7, a8);
79746 }
79747 };
79748
79749 template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Result>
79750 struct function_adaptor<Result (*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8)> {
79751
79752 template<class T> struct sig { typedef Result type; };
79753 template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
79754 static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) {
79755 return func(a1, a2, a3, a4, a5, a6, a7, a8);
79756 }
79757 };
79758
79759
79760
79761 template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Result>
79762 struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8) const> {
79763
79764 template<class T> struct sig { typedef Result type; };
79765 template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
79766 static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8) const, const Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) {
79767 return (o->*func)(a1, a2, a3, a4, a5, a6, a7, a8);
79768 }
79769 template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
79770 static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8) const, const Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) {
79771 return (o.*func)(a1, a2, a3, a4, a5, a6, a7, a8);
79772 }
79773 };
79774
79775 template <class Object, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Result>
79776 struct function_adaptor<Result (Object::*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8)> {
79777
79778 template<class T> struct sig { typedef Result type; };
79779 template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
79780 static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8), Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) {
79781 return (o->*func)(a1, a2, a3, a4, a5, a6, a7, a8);
79782 }
79783 template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
79784 static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8), Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) {
79785 return (o.*func)(a1, a2, a3, a4, a5, a6, a7, a8);
79786 }
79787 };
79788
79789 template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Arg9, class Result>
79790 struct function_adaptor<Result (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9)> {
79791
79792 template<class T> struct sig { typedef Result type; };
79793 template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
79794 static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8, A9& a9) {
79795 return func(a1, a2, a3, a4, a5, a6, a7, a8, a9);
79796 }
79797 };
79798
79799 template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Arg9, class Result>
79800 struct function_adaptor<Result (*)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9)> {
79801
79802 template<class T> struct sig { typedef Result type; };
79803 template <class RET, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
79804 static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8, A9& a9) {
79805 return func(a1, a2, a3, a4, a5, a6, a7, a8, a9);
79806 }
79807 };
79808
79809 }
79810 }
79811 # 49 "/usr/include/boost/lambda/core.hpp" 2 3 4
79812 # 1 "/usr/include/boost/lambda/detail/return_type_traits.hpp" 1 3 4
79813 # 15 "/usr/include/boost/lambda/detail/return_type_traits.hpp" 3 4
79814 # 1 "/usr/include/boost/mpl/has_xxx.hpp" 1 3 4
79815 # 19 "/usr/include/boost/mpl/has_xxx.hpp" 3 4
79816 # 1 "/usr/include/boost/mpl/aux_/type_wrapper.hpp" 1 3 4
79817 # 20 "/usr/include/boost/mpl/aux_/type_wrapper.hpp" 3 4
79818 namespace boost { namespace mpl { namespace aux {
79819
79820 template< typename T > struct type_wrapper
79821 {
79822 typedef T type;
79823 };
79824
79825
79826
79827
79828
79829
79830 template< typename T > struct wrapped_type;
79831
79832 template< typename T > struct wrapped_type< type_wrapper<T> >
79833 {
79834 typedef T type;
79835 };
79836
79837
79838
79839
79840
79841
79842
79843 }}}
79844 # 20 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4
79845 # 1 "/usr/include/boost/mpl/aux_/yes_no.hpp" 1 3 4
79846 # 18 "/usr/include/boost/mpl/aux_/yes_no.hpp" 3 4
79847 # 1 "/usr/include/boost/mpl/aux_/config/arrays.hpp" 1 3 4
79848 # 19 "/usr/include/boost/mpl/aux_/yes_no.hpp" 2 3 4
79849
79850
79851
79852
79853 namespace boost { namespace mpl { namespace aux {
79854
79855 typedef char (&no_tag)[1];
79856 typedef char (&yes_tag)[2];
79857
79858 template< bool C_ > struct yes_no_tag
79859 {
79860 typedef no_tag type;
79861 };
79862
79863 template<> struct yes_no_tag<true>
79864 {
79865 typedef yes_tag type;
79866 };
79867
79868
79869 template< long n > struct weighted_tag
79870 {
79871
79872 typedef char (&type)[n];
79873
79874
79875
79876
79877 };
79878 # 56 "/usr/include/boost/mpl/aux_/yes_no.hpp" 3 4
79879 }}}
79880 # 21 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4
79881 # 1 "/usr/include/boost/mpl/aux_/config/has_xxx.hpp" 1 3 4
79882 # 22 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4
79883 # 1 "/usr/include/boost/mpl/aux_/config/msvc_typename.hpp" 1 3 4
79884 # 23 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4
79885 # 16 "/usr/include/boost/lambda/detail/return_type_traits.hpp" 2 3 4
79886
79887
79888
79889 namespace boost {
79890 namespace lambda {
79891
79892 using ::boost::type_traits::ice_and;
79893 using ::boost::type_traits::ice_or;
79894 using ::boost::type_traits::ice_not;
79895
79896
79897
79898
79899
79900 template <class Act, class A1> struct return_type_1;
79901 template <class Act, class A1, class A2> struct return_type_2;
79902 template <class Act, class Args> struct return_type_N;
79903
79904 template <class Act, class A1> struct return_type_1_prot;
79905 template <class Act, class A1, class A2> struct return_type_2_prot;
79906 template <class Act, class A1> struct return_type_N_prot;
79907
79908
79909 namespace detail {
79910
79911 template<class> class return_type_deduction_failure {};
79912 # 60 "/usr/include/boost/lambda/detail/return_type_traits.hpp" 3 4
79913 }
79914 # 76 "/usr/include/boost/lambda/detail/return_type_traits.hpp" 3 4
79915 template <class Act, class A> struct return_type_1_prot {
79916 public:
79917 typedef typename
79918 detail::IF<
79919
79920 ice_and<is_protectable<Act>::value, is_lambda_functor<A>::value>::value,
79921 lambda_functor<
79922 lambda_functor_base<
79923 Act,
79924 tuple<typename detail::remove_reference_and_cv<A>::type>
79925 >
79926 >,
79927 typename return_type_1<Act, A>::type
79928 >::RET type;
79929 };
79930
79931
79932 template<class Act> struct return_type_1_prot<Act, null_type> {
79933 typedef null_type type;
79934 };
79935
79936
79937
79938 template<class Act, class A> struct return_type_1 {
79939 typedef typename
79940 detail::return_type_deduction_failure<return_type_1> type;
79941 };
79942
79943
79944 namespace detail {
79945
79946 template <class T>
79947 class protect_conversion {
79948 typedef typename boost::remove_reference<T>::type non_ref_T;
79949 public:
79950
79951
79952
79953 typedef typename detail::IF_type<
79954
79955 ice_and<boost::is_reference<T>::value,
79956 ice_not<boost::is_const<non_ref_T>::value>::value>::value,
79957 detail::identity_mapping<T>,
79958 const_copy_argument<non_ref_T>
79959 >::type type;
79960 };
79961
79962 }
79963
79964 template <class Act, class A, class B> struct return_type_2_prot {
79965 # 146 "/usr/include/boost/lambda/detail/return_type_traits.hpp" 3 4
79966 typedef typename boost::remove_reference<A>::type non_ref_A;
79967 typedef typename boost::remove_reference<B>::type non_ref_B;
79968
79969 typedef typename
79970 detail::IF<
79971
79972
79973 ice_and<is_protectable<Act>::value,
79974 ice_or<is_lambda_functor<A>::value,
79975 is_lambda_functor<B>::value>::value>::value,
79976 lambda_functor<
79977 lambda_functor_base<
79978 Act,
79979 tuple<typename detail::protect_conversion<A>::type,
79980 typename detail::protect_conversion<B>::type>
79981 >
79982 >,
79983 typename return_type_2<Act, non_ref_A, non_ref_B>::type
79984 >::RET type;
79985 };
79986
79987
79988 template<class Act> struct return_type_2_prot<Act, null_type, null_type> {
79989 typedef null_type type;
79990 };
79991
79992 template<class Act, class Other> struct return_type_2_prot<Act, Other, null_type> {
79993 typedef null_type type;
79994 };
79995
79996 template<class Act, class Other> struct return_type_2_prot<Act, null_type, Other> {
79997 typedef null_type type;
79998 };
79999
80000
80001
80002 template<class A, class B>
80003 struct return_type_2_comma
80004 {
80005 typedef typename boost::remove_reference<A>::type non_ref_A;
80006 typedef typename boost::remove_reference<B>::type non_ref_B;
80007
80008 typedef typename
80009 detail::IF<
80010
80011
80012 ice_and<is_protectable<other_action<comma_action> >::value,
80013 ice_or<is_lambda_functor<A>::value,
80014 is_lambda_functor<B>::value>::value>::value,
80015 lambda_functor<
80016 lambda_functor_base<
80017 other_action<comma_action>,
80018 tuple<typename detail::protect_conversion<A>::type,
80019 typename detail::protect_conversion<B>::type>
80020 >
80021 >,
80022 typename
80023 return_type_2<other_action<comma_action>, non_ref_A, non_ref_B>::type
80024 >::RET type1;
80025
80026
80027
80028 typedef typename
80029 detail::IF<
80030 boost::is_same<type1, detail::unspecified>::value,
80031 B,
80032 type1
80033 >::RET type;
80034
80035 };
80036
80037
80038
80039
80040
80041
80042 template<class Act, class Args> struct return_type_N_prot {
80043 typedef typename return_type_N<Act, Args>::type type;
80044 };
80045
80046
80047 template<class Act> struct return_type_N_prot<Act, null_type> {
80048 typedef null_type type;
80049 };
80050
80051
80052
80053
80054 template<int I, class Args, class Ret>
80055 struct return_type_N<function_action<I, Ret>, Args> {
80056 typedef Ret type;
80057 };
80058
80059
80060
80061 namespace detail
80062 {
80063
80064 template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_result_type { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::result_type>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; };
80065
80066 template<class F> struct get_result_type
80067 {
80068 typedef typename F::result_type type;
80069 };
80070
80071 template<class F, class A> struct get_sig
80072 {
80073 typedef typename function_adaptor<F>::template sig<A>::type type;
80074 };
80075
80076 }
80077
80078
80079 template<int I, class Args>
80080 struct return_type_N<function_action<I, detail::unspecified>, Args > {
80081
80082
80083
80084 typedef typename Args::head_type Func;
80085 typedef typename detail::remove_reference_and_cv<Func>::type plain_Func;
80086
80087 public:
80088
80089
80090 typedef typename detail::IF<
80091 detail::has_result_type<plain_Func>::value,
80092 detail::get_result_type<plain_Func>,
80093 detail::get_sig<plain_Func, Args>
80094 >::RET::type type;
80095 };
80096
80097
80098 }
80099 }
80100 # 50 "/usr/include/boost/lambda/core.hpp" 2 3 4
80101
80102 # 1 "/usr/include/boost/lambda/detail/select_functions.hpp" 1 3 4
80103 # 15 "/usr/include/boost/lambda/detail/select_functions.hpp" 3 4
80104 namespace boost {
80105 namespace lambda {
80106 namespace detail {
80107
80108
80109
80110 template<class Any, class A, class B, class C, class Env>
80111 inline Any& select(Any& any, A& a, B& b, C& c, Env& env) { ::boost::lambda::detail::do_nothing(a, b, c, env); return any; }
80112
80113
80114 template<class Arg, class A, class B, class C, class Env>
80115 inline typename Arg::template sig<tuple<A&, B&, C&, Env&> >::type
80116 select ( const lambda_functor<Arg>& op, A& a, B& b, C& c, Env& env ) {
80117 return op.template call<
80118 typename Arg::template sig<tuple<A&, B&, C&, Env&> >::type
80119 >(a, b, c, env);
80120 }
80121 template<class Arg, class A, class B, class C, class Env>
80122 inline typename Arg::template sig<tuple<A&, B&, C&, Env&> >::type
80123 select ( lambda_functor<Arg>& op, A& a, B& b, C& c, Env& env) {
80124 return op.template call<
80125 typename Arg::template sig<tuple<A&, B&, C&, Env&> >::type
80126 >(a, b, c, env);
80127 }
80128 # 50 "/usr/include/boost/lambda/detail/select_functions.hpp" 3 4
80129 template<class RET> struct r_select {
80130
80131
80132 template<class Any, class A, class B, class C, class Env>
80133 static
80134 inline RET go (Any& any, A& a, B& b, C& c, Env& env) { ::boost::lambda::detail::do_nothing(a, b, c, env); return any; }
80135
80136
80137 template<class Arg, class A, class B, class C, class Env>
80138 static
80139 inline RET go (const lambda_functor<Arg>& op, A& a, B& b, C& c, Env& env ) {
80140 return op.template call<RET>(a, b, c, env);
80141 }
80142 template<class Arg, class A, class B, class C, class Env>
80143 static
80144 inline RET go (lambda_functor<Arg>& op, A& a, B& b, C& c, Env& env ) {
80145 return op.template call<RET>(a, b, c, env);
80146 }
80147 };
80148
80149 }
80150 }
80151 }
80152 # 52 "/usr/include/boost/lambda/core.hpp" 2 3 4
80153
80154 # 1 "/usr/include/boost/lambda/detail/lambda_functor_base.hpp" 1 3 4
80155 # 16 "/usr/include/boost/lambda/detail/lambda_functor_base.hpp" 3 4
80156 namespace boost {
80157 namespace lambda {
80158
80159
80160
80161
80162 template <class T>
80163 class identity {
80164
80165 T elem;
80166 public:
80167
80168 typedef T element_t;
80169
80170
80171
80172 typedef typename boost::add_reference<
80173 typename boost::add_const<T>::type
80174 >::type par_t;
80175
80176 explicit identity(par_t t) : elem(t) {}
80177
80178 template <typename SigArgs>
80179 struct sig { typedef element_t type; };
80180
80181 template<class RET, class A, class B, class C, class Env>
80182 RET call(A& a, B& b, C& c, Env& env) const { ::boost::lambda::detail::do_nothing(a, b, c, env); return elem; }
80183 };
80184
80185 template <class T>
80186 inline lambda_functor<identity<T&> > var(T& t) { return identity<T&>(t); }
80187
80188
80189
80190
80191 template <class T>
80192 lambda_functor<T> var(const lambda_functor<T>& t) { return t; }
80193
80194 template <class T> struct var_type {
80195 typedef lambda_functor<identity<T&> > type;
80196 };
80197
80198
80199 template <class T>
80200 inline
80201 lambda_functor<identity<typename bound_argument_conversion<const T>::type> >
80202 constant(const T& t) {
80203 return identity<typename bound_argument_conversion<const T>::type>(t);
80204 }
80205 template <class T>
80206 lambda_functor<T> constant(const lambda_functor<T>& t) { return t; }
80207
80208 template <class T> struct constant_type {
80209 typedef
80210 lambda_functor<
80211 identity<typename bound_argument_conversion<const T>::type>
80212 > type;
80213 };
80214
80215
80216
80217 template <class T>
80218 inline lambda_functor<identity<const T&> > constant_ref(const T& t) {
80219 return identity<const T&>(t);
80220 }
80221 template <class T>
80222 lambda_functor<T> constant_ref(const lambda_functor<T>& t) { return t; }
80223
80224 template <class T> struct constant_ref_type {
80225 typedef
80226 lambda_functor<identity<const T&> > type;
80227 };
80228
80229
80230
80231
80232
80233 template <class T>
80234 struct as_lambda_functor {
80235 typedef typename
80236 detail::remove_reference_and_cv<T>::type plain_T;
80237 typedef typename
80238 detail::IF<is_lambda_functor<plain_T>::value,
80239 plain_T,
80240 lambda_functor<
80241 identity<typename bound_argument_conversion<T>::type>
80242 >
80243 >::RET type;
80244 };
80245
80246
80247 template <class T>
80248 inline
80249 lambda_functor<identity<typename bound_argument_conversion<const T>::type> >
80250 to_lambda_functor(const T& t) {
80251 return identity<typename bound_argument_conversion<const T>::type>(t);
80252 }
80253
80254 template <class T>
80255 inline lambda_functor<T>
80256 to_lambda_functor(const lambda_functor<T>& t) {
80257 return t;
80258 }
80259
80260 namespace detail {
80261 # 130 "/usr/include/boost/lambda/detail/lambda_functor_base.hpp" 3 4
80262 template <class T> struct constify_rvals {
80263 template<class U>
80264 static inline const U& go(const U& u) { return u; }
80265 };
80266
80267 template <class T> struct constify_rvals<T&> {
80268 template<class U>
80269 static inline U& go(U& u) { return u; }
80270 };
80271
80272
80273
80274
80275
80276 template <class T> struct is_null_type
80277 { static const bool value = false; };
80278
80279 template <> struct is_null_type<null_type>
80280 { static const bool value = true; };
80281
80282 template<class Tuple> struct has_null_type {
80283 static const bool value = (is_null_type<typename Tuple::head_type>::value || has_null_type<typename Tuple::tail_type>::value);
80284 };
80285 template<> struct has_null_type<null_type> {
80286 static const bool value = false;
80287 };
80288
80289
80290
80291
80292
80293 template<class Args, class SigArgs>
80294 class deduce_argument_types_ {
80295 typedef typename as_lambda_functor<typename Args::head_type>::type lf_t;
80296 typedef typename lf_t::inherited::template sig<SigArgs>::type el_t;
80297 public:
80298 typedef
80299 boost::tuples::cons<
80300 el_t,
80301 typename deduce_argument_types_<typename Args::tail_type, SigArgs>::type
80302 > type;
80303 };
80304
80305 template<class SigArgs>
80306 class deduce_argument_types_<null_type, SigArgs> {
80307 public:
80308 typedef null_type type;
80309 };
80310 # 188 "/usr/include/boost/lambda/detail/lambda_functor_base.hpp" 3 4
80311 template<class Args, class SigArgs>
80312 class deduce_non_ref_argument_types_ {
80313 typedef typename as_lambda_functor<typename Args::head_type>::type lf_t;
80314 typedef typename lf_t::inherited::template sig<SigArgs>::type el_t;
80315 public:
80316 typedef
80317 boost::tuples::cons<
80318
80319 typename boost::remove_reference<el_t>::type,
80320 typename deduce_non_ref_argument_types_<typename Args::tail_type, SigArgs>::type
80321 > type;
80322 };
80323
80324 template<class SigArgs>
80325 class deduce_non_ref_argument_types_<null_type, SigArgs> {
80326 public:
80327 typedef null_type type;
80328 };
80329
80330
80331
80332
80333
80334 template<class Args, class SigArgs>
80335 class deduce_argument_types {
80336 typedef typename deduce_argument_types_<Args, SigArgs>::type t1;
80337 public:
80338 typedef typename detail::IF<
80339 has_null_type<t1>::value, null_type, t1
80340 >::RET type;
80341 };
80342
80343
80344
80345
80346 template<class Args, class SigArgs>
80347 class deduce_non_ref_argument_types {
80348 typedef typename deduce_non_ref_argument_types_<Args, SigArgs>::type t1;
80349 public:
80350 typedef typename detail::IF<
80351 has_null_type<t1>::value, null_type, t1
80352 >::RET type;
80353 };
80354
80355 template <int N, class Args, class SigArgs>
80356 struct nth_return_type_sig {
80357 typedef typename
80358 as_lambda_functor<
80359 typename boost::tuples::element<N, Args>::type
80360
80361 >::type lf_type;
80362
80363 typedef typename lf_type::inherited::template sig<SigArgs>::type type;
80364 };
80365
80366 template<int N, class Tuple> struct element_or_null {
80367 typedef typename boost::tuples::element<N, Tuple>::type type;
80368 };
80369
80370 template<int N> struct element_or_null<N, null_type> {
80371 typedef null_type type;
80372 };
80373
80374
80375
80376
80377 }
80378
80379
80380
80381
80382 template<class RET, class Args>
80383 class lambda_functor_base<explicit_return_type_action<RET>, Args>
80384 {
80385 public:
80386 Args args;
80387
80388 explicit lambda_functor_base(const Args& a) : args(a) {}
80389
80390 template <class SigArgs> struct sig { typedef RET type; };
80391
80392 template<class RET_, class A, class B, class C, class Env>
80393 RET call(A& a, B& b, C& c, Env& env) const
80394 {
80395 return detail::constify_rvals<RET>::go(
80396 detail::r_select<RET>::go(boost::tuples::get<0>(args), a, b, c, env));
80397 }
80398 };
80399
80400
80401 template<class Args>
80402 class lambda_functor_base<protect_action, Args>
80403 {
80404 public:
80405 Args args;
80406 public:
80407
80408 explicit lambda_functor_base(const Args& a) : args(a) {}
80409
80410
80411 template<class RET, class A, class B, class C, class Env>
80412 RET call(A& a, B& b, C& c, Env& env) const
80413 {
80414 ::boost::lambda::detail::do_nothing(a, b, c, env);
80415 return boost::tuples::get<0>(args);
80416 }
80417
80418 template<class SigArgs> struct sig {
80419
80420 typedef typename boost::tuples::element<0, Args>::type type;
80421 };
80422 };
80423
80424
80425 class do_nothing_action {};
80426
80427 template<class Args>
80428 class lambda_functor_base<do_nothing_action, Args> {
80429
80430 public:
80431
80432 lambda_functor_base() {}
80433
80434
80435 template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const {
80436 return ::boost::lambda::detail::do_nothing(a, b, c, env);
80437 }
80438
80439 template<class SigArgs> struct sig { typedef void type; };
80440 };
80441 # 335 "/usr/include/boost/lambda/detail/lambda_functor_base.hpp" 3 4
80442 template<class Act, class Args>
80443 class lambda_functor_base<action<0, Act>, Args>
80444 {
80445 public:
80446
80447 explicit lambda_functor_base(const Args& a) {}
80448
80449 template<class SigArgs> struct sig {
80450 typedef typename return_type_N<Act, null_type>::type type;
80451 };
80452
80453 template<class RET, class A, class B, class C, class Env>
80454 RET call(A& a, B& b, C& c, Env& env) const {
80455 ::boost::lambda::detail::do_nothing(a, b, c, env);
80456 return Act::template apply<RET>();
80457 }
80458 };
80459 # 385 "/usr/include/boost/lambda/detail/lambda_functor_base.hpp" 3 4
80460 template<class Act, class Args> class lambda_functor_base<action<1, Act>, Args> { public: Args args; explicit lambda_functor_base(const Args& a) : args(a) {} template<class SigArgs> struct sig { typedef typename detail::deduce_non_ref_argument_types<Args, SigArgs>::type rets_t; public: typedef typename return_type_N_prot<Act, rets_t>::type type; }; template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { using boost::tuples::get; using detail::constify_rvals; using detail::r_select; using detail::element_or_null; using detail::deduce_argument_types;
80461
80462 typedef typename
80463 deduce_argument_types<Args, tuple<A&, B&, C&, Env&> >::type rets_t;
80464 typedef typename element_or_null<0, rets_t>::type rt0;
80465
80466 return Act::template apply<RET>(
80467 constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), a, b, c, env))
80468 );
80469 }
80470 };
80471
80472
80473 template<class Act, class Args> class lambda_functor_base<action<2, Act>, Args> { public: Args args; explicit lambda_functor_base(const Args& a) : args(a) {} template<class SigArgs> struct sig { typedef typename detail::deduce_non_ref_argument_types<Args, SigArgs>::type rets_t; public: typedef typename return_type_N_prot<Act, rets_t>::type type; }; template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { using boost::tuples::get; using detail::constify_rvals; using detail::r_select; using detail::element_or_null; using detail::deduce_argument_types;
80474
80475 typedef typename
80476 deduce_argument_types<Args, tuple<A&, B&, C&, Env&> >::type rets_t;
80477 typedef typename element_or_null<0, rets_t>::type rt0;
80478 typedef typename element_or_null<1, rets_t>::type rt1;
80479
80480 return Act::template apply<RET>(
80481 constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), a, b, c, env)),
80482 constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), a, b, c, env))
80483 );
80484 }
80485 };
80486
80487 template<class Act, class Args> class lambda_functor_base<action<3, Act>, Args> { public: Args args; explicit lambda_functor_base(const Args& a) : args(a) {} template<class SigArgs> struct sig { typedef typename detail::deduce_non_ref_argument_types<Args, SigArgs>::type rets_t; public: typedef typename return_type_N_prot<Act, rets_t>::type type; }; template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { using boost::tuples::get; using detail::constify_rvals; using detail::r_select; using detail::element_or_null; using detail::deduce_argument_types;
80488
80489 typedef typename
80490 deduce_argument_types<Args, tuple<A&, B&, C&, Env&> >::type rets_t;
80491
80492 typedef typename element_or_null<0, rets_t>::type rt0;
80493 typedef typename element_or_null<1, rets_t>::type rt1;
80494 typedef typename element_or_null<2, rets_t>::type rt2;
80495
80496 return Act::template apply<RET>(
80497 constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), a, b, c, env)),
80498 constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), a, b, c, env)),
80499 constify_rvals<rt2>::go(r_select<rt2>::go(get<2>(args), a, b, c, env))
80500 );
80501 }
80502 };
80503
80504 template<class Act, class Args> class lambda_functor_base<action<4, Act>, Args> { public: Args args; explicit lambda_functor_base(const Args& a) : args(a) {} template<class SigArgs> struct sig { typedef typename detail::deduce_non_ref_argument_types<Args, SigArgs>::type rets_t; public: typedef typename return_type_N_prot<Act, rets_t>::type type; }; template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { using boost::tuples::get; using detail::constify_rvals; using detail::r_select; using detail::element_or_null; using detail::deduce_argument_types;
80505 typedef typename
80506 deduce_argument_types<Args, tuple<A&, B&, C&, Env&> >::type rets_t;
80507 typedef typename element_or_null<0, rets_t>::type rt0;
80508 typedef typename element_or_null<1, rets_t>::type rt1;
80509 typedef typename element_or_null<2, rets_t>::type rt2;
80510 typedef typename element_or_null<3, rets_t>::type rt3;
80511
80512 return Act::template apply<RET>(
80513 constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), a, b, c, env)),
80514 constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), a, b, c, env)),
80515 constify_rvals<rt2>::go(r_select<rt2>::go(get<2>(args), a, b, c, env)),
80516 constify_rvals<rt3>::go(r_select<rt3>::go(get<3>(args), a, b, c, env))
80517 );
80518 }
80519 };
80520
80521 template<class Act, class Args> class lambda_functor_base<action<5, Act>, Args> { public: Args args; explicit lambda_functor_base(const Args& a) : args(a) {} template<class SigArgs> struct sig { typedef typename detail::deduce_non_ref_argument_types<Args, SigArgs>::type rets_t; public: typedef typename return_type_N_prot<Act, rets_t>::type type; }; template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { using boost::tuples::get; using detail::constify_rvals; using detail::r_select; using detail::element_or_null; using detail::deduce_argument_types;
80522 typedef typename
80523 deduce_argument_types<Args, tuple<A&, B&, C&, Env&> >::type rets_t;
80524 typedef typename element_or_null<0, rets_t>::type rt0;
80525 typedef typename element_or_null<1, rets_t>::type rt1;
80526 typedef typename element_or_null<2, rets_t>::type rt2;
80527 typedef typename element_or_null<3, rets_t>::type rt3;
80528 typedef typename element_or_null<4, rets_t>::type rt4;
80529
80530 return Act::template apply<RET>(
80531 constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), a, b, c, env)),
80532 constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), a, b, c, env)),
80533 constify_rvals<rt2>::go(r_select<rt2>::go(get<2>(args), a, b, c, env)),
80534 constify_rvals<rt3>::go(r_select<rt3>::go(get<3>(args), a, b, c, env)),
80535 constify_rvals<rt4>::go(r_select<rt4>::go(get<4>(args), a, b, c, env))
80536 );
80537 }
80538 };
80539
80540 template<class Act, class Args> class lambda_functor_base<action<6, Act>, Args> { public: Args args; explicit lambda_functor_base(const Args& a) : args(a) {} template<class SigArgs> struct sig { typedef typename detail::deduce_non_ref_argument_types<Args, SigArgs>::type rets_t; public: typedef typename return_type_N_prot<Act, rets_t>::type type; }; template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { using boost::tuples::get; using detail::constify_rvals; using detail::r_select; using detail::element_or_null; using detail::deduce_argument_types;
80541
80542 typedef typename
80543 deduce_argument_types<Args, tuple<A&, B&, C&, Env&> >::type rets_t;
80544 typedef typename element_or_null<0, rets_t>::type rt0;
80545 typedef typename element_or_null<1, rets_t>::type rt1;
80546 typedef typename element_or_null<2, rets_t>::type rt2;
80547 typedef typename element_or_null<3, rets_t>::type rt3;
80548 typedef typename element_or_null<4, rets_t>::type rt4;
80549 typedef typename element_or_null<5, rets_t>::type rt5;
80550
80551
80552 return Act::template apply<RET>(
80553 constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), a, b, c, env)),
80554 constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), a, b, c, env)),
80555 constify_rvals<rt2>::go(r_select<rt2>::go(get<2>(args), a, b, c, env)),
80556 constify_rvals<rt3>::go(r_select<rt3>::go(get<3>(args), a, b, c, env)),
80557 constify_rvals<rt4>::go(r_select<rt4>::go(get<4>(args), a, b, c, env)),
80558 constify_rvals<rt5>::go(r_select<rt5>::go(get<5>(args), a, b, c, env))
80559 );
80560 }
80561 };
80562
80563 template<class Act, class Args> class lambda_functor_base<action<7, Act>, Args> { public: Args args; explicit lambda_functor_base(const Args& a) : args(a) {} template<class SigArgs> struct sig { typedef typename detail::deduce_non_ref_argument_types<Args, SigArgs>::type rets_t; public: typedef typename return_type_N_prot<Act, rets_t>::type type; }; template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { using boost::tuples::get; using detail::constify_rvals; using detail::r_select; using detail::element_or_null; using detail::deduce_argument_types;
80564 typedef typename
80565 deduce_argument_types<Args, tuple<A&, B&, C&, Env&> >::type rets_t;
80566 typedef typename element_or_null<0, rets_t>::type rt0;
80567 typedef typename element_or_null<1, rets_t>::type rt1;
80568 typedef typename element_or_null<2, rets_t>::type rt2;
80569 typedef typename element_or_null<3, rets_t>::type rt3;
80570 typedef typename element_or_null<4, rets_t>::type rt4;
80571 typedef typename element_or_null<5, rets_t>::type rt5;
80572 typedef typename element_or_null<6, rets_t>::type rt6;
80573
80574
80575 return Act::template apply<RET>(
80576 constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), a, b, c, env)),
80577 constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), a, b, c, env)),
80578 constify_rvals<rt2>::go(r_select<rt2>::go(get<2>(args), a, b, c, env)),
80579 constify_rvals<rt3>::go(r_select<rt3>::go(get<3>(args), a, b, c, env)),
80580 constify_rvals<rt4>::go(r_select<rt4>::go(get<4>(args), a, b, c, env)),
80581 constify_rvals<rt5>::go(r_select<rt5>::go(get<5>(args), a, b, c, env)),
80582 constify_rvals<rt6>::go(r_select<rt6>::go(get<6>(args), a, b, c, env))
80583 );
80584 }
80585 };
80586
80587 template<class Act, class Args> class lambda_functor_base<action<8, Act>, Args> { public: Args args; explicit lambda_functor_base(const Args& a) : args(a) {} template<class SigArgs> struct sig { typedef typename detail::deduce_non_ref_argument_types<Args, SigArgs>::type rets_t; public: typedef typename return_type_N_prot<Act, rets_t>::type type; }; template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { using boost::tuples::get; using detail::constify_rvals; using detail::r_select; using detail::element_or_null; using detail::deduce_argument_types;
80588 typedef typename
80589 deduce_argument_types<Args, tuple<A&, B&, C&, Env&> >::type rets_t;
80590 typedef typename element_or_null<0, rets_t>::type rt0;
80591 typedef typename element_or_null<1, rets_t>::type rt1;
80592 typedef typename element_or_null<2, rets_t>::type rt2;
80593 typedef typename element_or_null<3, rets_t>::type rt3;
80594 typedef typename element_or_null<4, rets_t>::type rt4;
80595 typedef typename element_or_null<5, rets_t>::type rt5;
80596 typedef typename element_or_null<6, rets_t>::type rt6;
80597 typedef typename element_or_null<7, rets_t>::type rt7;
80598
80599 return Act::template apply<RET>(
80600 constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), a, b, c, env)),
80601 constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), a, b, c, env)),
80602 constify_rvals<rt2>::go(r_select<rt2>::go(get<2>(args), a, b, c, env)),
80603 constify_rvals<rt3>::go(r_select<rt3>::go(get<3>(args), a, b, c, env)),
80604 constify_rvals<rt4>::go(r_select<rt4>::go(get<4>(args), a, b, c, env)),
80605 constify_rvals<rt5>::go(r_select<rt5>::go(get<5>(args), a, b, c, env)),
80606 constify_rvals<rt6>::go(r_select<rt6>::go(get<6>(args), a, b, c, env)),
80607 constify_rvals<rt7>::go(r_select<rt7>::go(get<7>(args), a, b, c, env))
80608 );
80609 }
80610 };
80611
80612 template<class Act, class Args> class lambda_functor_base<action<9, Act>, Args> { public: Args args; explicit lambda_functor_base(const Args& a) : args(a) {} template<class SigArgs> struct sig { typedef typename detail::deduce_non_ref_argument_types<Args, SigArgs>::type rets_t; public: typedef typename return_type_N_prot<Act, rets_t>::type type; }; template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { using boost::tuples::get; using detail::constify_rvals; using detail::r_select; using detail::element_or_null; using detail::deduce_argument_types;
80613 typedef typename
80614 deduce_argument_types<Args, tuple<A&, B&, C&, Env&> >::type rets_t;
80615 typedef typename element_or_null<0, rets_t>::type rt0;
80616 typedef typename element_or_null<1, rets_t>::type rt1;
80617 typedef typename element_or_null<2, rets_t>::type rt2;
80618 typedef typename element_or_null<3, rets_t>::type rt3;
80619 typedef typename element_or_null<4, rets_t>::type rt4;
80620 typedef typename element_or_null<5, rets_t>::type rt5;
80621 typedef typename element_or_null<6, rets_t>::type rt6;
80622 typedef typename element_or_null<7, rets_t>::type rt7;
80623 typedef typename element_or_null<8, rets_t>::type rt8;
80624
80625 return Act::template apply<RET>(
80626 constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), a, b, c, env)),
80627 constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), a, b, c, env)),
80628 constify_rvals<rt2>::go(r_select<rt2>::go(get<2>(args), a, b, c, env)),
80629 constify_rvals<rt3>::go(r_select<rt3>::go(get<3>(args), a, b, c, env)),
80630 constify_rvals<rt4>::go(r_select<rt4>::go(get<4>(args), a, b, c, env)),
80631 constify_rvals<rt5>::go(r_select<rt5>::go(get<5>(args), a, b, c, env)),
80632 constify_rvals<rt6>::go(r_select<rt6>::go(get<6>(args), a, b, c, env)),
80633 constify_rvals<rt7>::go(r_select<rt7>::go(get<7>(args), a, b, c, env)),
80634 constify_rvals<rt8>::go(r_select<rt8>::go(get<8>(args), a, b, c, env))
80635 );
80636 }
80637 };
80638
80639 template<class Act, class Args> class lambda_functor_base<action<10, Act>, Args> { public: Args args; explicit lambda_functor_base(const Args& a) : args(a) {} template<class SigArgs> struct sig { typedef typename detail::deduce_non_ref_argument_types<Args, SigArgs>::type rets_t; public: typedef typename return_type_N_prot<Act, rets_t>::type type; }; template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { using boost::tuples::get; using detail::constify_rvals; using detail::r_select; using detail::element_or_null; using detail::deduce_argument_types;
80640 typedef typename
80641 deduce_argument_types<Args, tuple<A&, B&, C&, Env&> >::type rets_t;
80642 typedef typename element_or_null<0, rets_t>::type rt0;
80643 typedef typename element_or_null<1, rets_t>::type rt1;
80644 typedef typename element_or_null<2, rets_t>::type rt2;
80645 typedef typename element_or_null<3, rets_t>::type rt3;
80646 typedef typename element_or_null<4, rets_t>::type rt4;
80647 typedef typename element_or_null<5, rets_t>::type rt5;
80648 typedef typename element_or_null<6, rets_t>::type rt6;
80649 typedef typename element_or_null<7, rets_t>::type rt7;
80650 typedef typename element_or_null<8, rets_t>::type rt8;
80651 typedef typename element_or_null<9, rets_t>::type rt9;
80652
80653 return Act::template apply<RET>(
80654 constify_rvals<rt0>::go(r_select<rt0>::go(get<0>(args), a, b, c, env)),
80655 constify_rvals<rt1>::go(r_select<rt1>::go(get<1>(args), a, b, c, env)),
80656 constify_rvals<rt2>::go(r_select<rt2>::go(get<2>(args), a, b, c, env)),
80657 constify_rvals<rt3>::go(r_select<rt3>::go(get<3>(args), a, b, c, env)),
80658 constify_rvals<rt4>::go(r_select<rt4>::go(get<4>(args), a, b, c, env)),
80659 constify_rvals<rt5>::go(r_select<rt5>::go(get<5>(args), a, b, c, env)),
80660 constify_rvals<rt6>::go(r_select<rt6>::go(get<6>(args), a, b, c, env)),
80661 constify_rvals<rt7>::go(r_select<rt7>::go(get<7>(args), a, b, c, env)),
80662 constify_rvals<rt8>::go(r_select<rt8>::go(get<8>(args), a, b, c, env)),
80663 constify_rvals<rt9>::go(r_select<rt9>::go(get<9>(args), a, b, c, env))
80664 );
80665 }
80666 };
80667
80668
80669
80670
80671 }
80672 }
80673 # 54 "/usr/include/boost/lambda/core.hpp" 2 3 4
80674
80675 # 1 "/usr/include/boost/lambda/detail/lambda_functors.hpp" 1 3 4
80676 # 16 "/usr/include/boost/lambda/detail/lambda_functors.hpp" 3 4
80677 namespace boost {
80678 namespace lambda {
80679
80680
80681
80682
80683
80684
80685 namespace detail {
80686 namespace {
80687
80688 static const null_type constant_null_type = null_type();
80689
80690 }
80691 }
80692
80693 class unused {};
80694
80695
80696
80697
80698
80699
80700
80701 namespace detail {
80702 template<int N, class Tuple> struct get_element_or_null_type {
80703 typedef typename
80704 detail::tuple_element_as_reference<N, Tuple>::type type;
80705 };
80706 template<int N> struct get_element_or_null_type<N, null_type> {
80707 typedef null_type type;
80708 };
80709 }
80710
80711 template <int I> struct placeholder;
80712
80713 template<> struct placeholder<FIRST> {
80714
80715 template<class SigArgs> struct sig {
80716 typedef typename detail::get_element_or_null_type<0, SigArgs>::type type;
80717 };
80718
80719 template<class RET, class A, class B, class C, class Env>
80720 RET call(A& a, B& b, C& c, Env& env) const {
80721 typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( boost::is_reference<RET>::value ) >)> boost_static_assert_typedef_60;
80722 ::boost::lambda::detail::do_nothing(a, b, c, env);
80723 return a;
80724 }
80725 };
80726
80727 template<> struct placeholder<SECOND> {
80728
80729 template<class SigArgs> struct sig {
80730 typedef typename detail::get_element_or_null_type<1, SigArgs>::type type;
80731 };
80732
80733 template<class RET, class A, class B, class C, class Env>
80734 RET call(A& a, B& b, C& c, Env& env) const { ::boost::lambda::detail::do_nothing(a, b, c, env); return b; }
80735 };
80736
80737 template<> struct placeholder<THIRD> {
80738
80739 template<class SigArgs> struct sig {
80740 typedef typename detail::get_element_or_null_type<2, SigArgs>::type type;
80741 };
80742
80743 template<class RET, class A, class B, class C, class Env>
80744 RET call(A& a, B& b, C& c, Env& env) const { ::boost::lambda::detail::do_nothing(a, b, c, env); return c; }
80745 };
80746
80747 template<> struct placeholder<EXCEPTION> {
80748
80749 template<class SigArgs> struct sig {
80750 typedef typename detail::get_element_or_null_type<3, SigArgs>::type type;
80751 };
80752
80753 template<class RET, class A, class B, class C, class Env>
80754 RET call(A& a, B& b, C& c, Env& env) const { ::boost::lambda::detail::do_nothing(a, b, c, env); return env; }
80755 };
80756
80757 typedef const lambda_functor<placeholder<FIRST> > placeholder1_type;
80758 typedef const lambda_functor<placeholder<SECOND> > placeholder2_type;
80759 typedef const lambda_functor<placeholder<THIRD> > placeholder3_type;
80760 # 111 "/usr/include/boost/lambda/detail/lambda_functors.hpp" 3 4
80761 template <class T>
80762 class lambda_functor : public T
80763 {
80764
80765 static const int arity_bits = get_arity<T>::value;
80766
80767 public:
80768 typedef T inherited;
80769
80770 lambda_functor() {}
80771 lambda_functor(const lambda_functor& l) : inherited(l) {}
80772
80773 lambda_functor(const T& t) : inherited(t) {}
80774
80775 template <class SigArgs> struct sig {
80776 typedef typename inherited::template
80777 sig<typename SigArgs::tail_type>::type type;
80778 };
80779
80780
80781
80782
80783 typedef typename
80784 inherited::template sig<null_type>::type
80785 nullary_return_type;
80786
80787 nullary_return_type operator()() const {
80788 return inherited::template
80789 call<nullary_return_type>
80790 (detail::constant_null_type, detail::constant_null_type, detail::constant_null_type, detail::constant_null_type);
80791 }
80792
80793 template<class A>
80794 typename inherited::template sig<tuple<A&> >::type
80795 operator()(A& a) const {
80796 return inherited::template call<
80797 typename inherited::template sig<tuple<A&> >::type
80798 >(a, detail::constant_null_type, detail::constant_null_type, detail::constant_null_type);
80799 }
80800
80801 template<class A, class B>
80802 typename inherited::template sig<tuple<A&, B&> >::type
80803 operator()(A& a, B& b) const {
80804 return inherited::template call<
80805 typename inherited::template sig<tuple<A&, B&> >::type
80806 >(a, b, detail::constant_null_type, detail::constant_null_type);
80807 }
80808
80809 template<class A, class B, class C>
80810 typename inherited::template sig<tuple<A&, B&, C&> >::type
80811 operator()(A& a, B& b, C& c) const
80812 {
80813 return inherited::template call<
80814 typename inherited::template sig<tuple<A&, B&, C&> >::type
80815 >(a, b, c, detail::constant_null_type);
80816 }
80817
80818
80819 template<class A, class B, class C, class Env>
80820 typename inherited::template sig<tuple<A&, B&, C&, Env&> >::type
80821 internal_call(A& a, B& b, C& c, Env& env) const {
80822 return inherited::template
80823 call<typename inherited::template
80824 sig<tuple<A&, B&, C&, Env&> >::type>(a, b, c, env);
80825 }
80826
80827 template<class A>
80828 const lambda_functor<lambda_functor_base<
80829 other_action<assignment_action>,
80830 boost::tuple<lambda_functor,
80831 typename const_copy_argument <const A>::type> > >
80832 operator=(const A& a) const {
80833 return lambda_functor_base<
80834 other_action<assignment_action>,
80835 boost::tuple<lambda_functor,
80836 typename const_copy_argument <const A>::type> >
80837 ( boost::tuple<lambda_functor,
80838 typename const_copy_argument <const A>::type>(*this, a) );
80839 }
80840
80841 template<class A>
80842 const lambda_functor<lambda_functor_base<
80843 other_action<subscript_action>,
80844 boost::tuple<lambda_functor,
80845 typename const_copy_argument <const A>::type> > >
80846 operator[](const A& a) const {
80847 return lambda_functor_base<
80848 other_action<subscript_action>,
80849 boost::tuple<lambda_functor,
80850 typename const_copy_argument <const A>::type> >
80851 ( boost::tuple<lambda_functor,
80852 typename const_copy_argument <const A>::type>(*this, a ) );
80853 }
80854 };
80855
80856
80857 }
80858 }
80859 # 56 "/usr/include/boost/lambda/core.hpp" 2 3 4
80860
80861 # 1 "/usr/include/boost/lambda/detail/ret.hpp" 1 3 4
80862 # 15 "/usr/include/boost/lambda/detail/ret.hpp" 3 4
80863 namespace boost {
80864 namespace lambda {
80865 # 38 "/usr/include/boost/lambda/detail/ret.hpp" 3 4
80866 template<class RET, class Arg>
80867 inline const
80868 lambda_functor<
80869 lambda_functor_base<
80870 explicit_return_type_action<RET>,
80871 tuple<lambda_functor<Arg> >
80872 >
80873 >
80874 ret(const lambda_functor<Arg>& a1)
80875 {
80876 return
80877 lambda_functor_base<
80878 explicit_return_type_action<RET>,
80879 tuple<lambda_functor<Arg> >
80880 >
80881 (tuple<lambda_functor<Arg> >(a1));
80882 }
80883
80884
80885
80886
80887 template <class T>
80888 inline const T& protect(const T& t) { return t; }
80889
80890 template<class Arg>
80891 inline const
80892 lambda_functor<
80893 lambda_functor_base<
80894 protect_action,
80895 tuple<lambda_functor<Arg> >
80896 >
80897 >
80898 protect(const lambda_functor<Arg>& a1)
80899 {
80900 return
80901 lambda_functor_base<
80902 protect_action,
80903 tuple<lambda_functor<Arg> >
80904 >
80905 (tuple<lambda_functor<Arg> >(a1));
80906 }
80907 # 90 "/usr/include/boost/lambda/detail/ret.hpp" 3 4
80908 template <class LambdaFunctor>
80909 class non_lambda_functor
80910 {
80911 LambdaFunctor lf;
80912 public:
80913
80914
80915
80916
80917 template <class SigArgs> struct sig {
80918 typedef typename
80919 LambdaFunctor::inherited::
80920 template sig<typename SigArgs::tail_type>::type type;
80921 };
80922
80923 explicit non_lambda_functor(const LambdaFunctor& a) : lf(a) {}
80924
80925 typename LambdaFunctor::nullary_return_type
80926 operator()() const {
80927 return lf.template
80928 call<typename LambdaFunctor::nullary_return_type>
80929 (detail::constant_null_type, detail::constant_null_type, detail::constant_null_type, detail::constant_null_type);
80930 }
80931
80932 template<class A>
80933 typename sig<tuple<const non_lambda_functor, A&> >::type
80934 operator()(A& a) const {
80935 return lf.template call<typename sig<tuple<const non_lambda_functor, A&> >::type >(a, detail::constant_null_type, detail::constant_null_type, detail::constant_null_type);
80936 }
80937
80938 template<class A, class B>
80939 typename sig<tuple<const non_lambda_functor, A&, B&> >::type
80940 operator()(A& a, B& b) const {
80941 return lf.template call<typename sig<tuple<const non_lambda_functor, A&, B&> >::type >(a, b, detail::constant_null_type, detail::constant_null_type);
80942 }
80943
80944 template<class A, class B, class C>
80945 typename sig<tuple<const non_lambda_functor, A&, B&, C&> >::type
80946 operator()(A& a, B& b, C& c) const {
80947 return lf.template call<typename sig<tuple<const non_lambda_functor, A&, B&, C&> >::type>(a, b, c, detail::constant_null_type);
80948 }
80949 };
80950
80951 template <class Arg>
80952 inline const Arg& unlambda(const Arg& a) { return a; }
80953
80954 template <class Arg>
80955 inline const non_lambda_functor<lambda_functor<Arg> >
80956 unlambda(const lambda_functor<Arg>& a)
80957 {
80958 return non_lambda_functor<lambda_functor<Arg> >(a);
80959 }
80960 # 155 "/usr/include/boost/lambda/detail/ret.hpp" 3 4
80961 template <class LambdaFunctor>
80962 struct const_incorrect_lambda_functor {
80963 LambdaFunctor lf;
80964 public:
80965
80966 explicit const_incorrect_lambda_functor(const LambdaFunctor& a) : lf(a) {}
80967
80968 template <class SigArgs> struct sig {
80969 typedef typename
80970 LambdaFunctor::inherited::template
80971 sig<typename SigArgs::tail_type>::type type;
80972 };
80973
80974
80975
80976 template<class A>
80977 typename sig<tuple<const const_incorrect_lambda_functor, A&> >::type
80978 operator()(const A& a) const {
80979 return lf.template call<typename sig<tuple<const const_incorrect_lambda_functor, A&> >::type >(const_cast<A&>(a), detail::constant_null_type, detail::constant_null_type, detail::constant_null_type);
80980 }
80981
80982 template<class A, class B>
80983 typename sig<tuple<const const_incorrect_lambda_functor, A&, B&> >::type
80984 operator()(const A& a, const B& b) const {
80985 return lf.template call<typename sig<tuple<const const_incorrect_lambda_functor, A&, B&> >::type >(const_cast<A&>(a), const_cast<B&>(b), detail::constant_null_type, detail::constant_null_type);
80986 }
80987
80988 template<class A, class B, class C>
80989 typename sig<tuple<const const_incorrect_lambda_functor, A&, B&, C&> >::type
80990 operator()(const A& a, const B& b, const C& c) const {
80991 return lf.template call<typename sig<tuple<const const_incorrect_lambda_functor, A&, B&, C&> >::type>(const_cast<A&>(a), const_cast<B&>(b), const_cast<C&>(c), detail::constant_null_type);
80992 }
80993 };
80994 # 196 "/usr/include/boost/lambda/detail/ret.hpp" 3 4
80995 template <class LambdaFunctor>
80996 struct const_parameter_lambda_functor {
80997 LambdaFunctor lf;
80998 public:
80999
81000 explicit const_parameter_lambda_functor(const LambdaFunctor& a) : lf(a) {}
81001
81002 template <class SigArgs> struct sig {
81003 typedef typename
81004 LambdaFunctor::inherited::template
81005 sig<typename SigArgs::tail_type>::type type;
81006 };
81007
81008
81009
81010 template<class A>
81011 typename sig<tuple<const const_parameter_lambda_functor, const A&> >::type
81012 operator()(const A& a) const {
81013 return lf.template call<typename sig<tuple<const const_parameter_lambda_functor, const A&> >::type >(a, detail::constant_null_type, detail::constant_null_type, detail::constant_null_type);
81014 }
81015
81016 template<class A, class B>
81017 typename sig<tuple<const const_parameter_lambda_functor, const A&, const B&> >::type
81018 operator()(const A& a, const B& b) const {
81019 return lf.template call<typename sig<tuple<const const_parameter_lambda_functor, const A&, const B&> >::type >(a, b, detail::constant_null_type, detail::constant_null_type);
81020 }
81021
81022 template<class A, class B, class C>
81023 typename sig<tuple<const const_parameter_lambda_functor, const A&, const B&, const C&>
81024 >::type
81025 operator()(const A& a, const B& b, const C& c) const {
81026 return lf.template call<typename sig<tuple<const const_parameter_lambda_functor, const A&, const B&, const C&> >::type>(a, b, c, detail::constant_null_type);
81027 }
81028 };
81029
81030 template <class Arg>
81031 inline const const_incorrect_lambda_functor<lambda_functor<Arg> >
81032 break_const(const lambda_functor<Arg>& lf)
81033 {
81034 return const_incorrect_lambda_functor<lambda_functor<Arg> >(lf);
81035 }
81036
81037
81038 template <class Arg>
81039 inline const const_parameter_lambda_functor<lambda_functor<Arg> >
81040 const_parameters(const lambda_functor<Arg>& lf)
81041 {
81042 return const_parameter_lambda_functor<lambda_functor<Arg> >(lf);
81043 }
81044 # 254 "/usr/include/boost/lambda/detail/ret.hpp" 3 4
81045 struct voidifier_action {
81046 template<class Ret, class A> static void apply(A&) {}
81047 };
81048
81049 template<class Args> struct return_type_N<voidifier_action, Args> {
81050 typedef void type;
81051 };
81052
81053 template<class Arg1>
81054 inline const
81055 lambda_functor<
81056 lambda_functor_base<
81057 action<1, voidifier_action>,
81058 tuple<lambda_functor<Arg1> >
81059 >
81060 >
81061 make_void(const lambda_functor<Arg1>& a1) {
81062 return
81063 lambda_functor_base<
81064 action<1, voidifier_action>,
81065 tuple<lambda_functor<Arg1> >
81066 >
81067 (tuple<lambda_functor<Arg1> > (a1));
81068 }
81069
81070
81071
81072
81073 template<class Arg1>
81074 inline const
81075 lambda_functor<
81076 lambda_functor_base<do_nothing_action, null_type>
81077 >
81078 make_void(const Arg1& a1) {
81079 return
81080 lambda_functor_base<do_nothing_action, null_type>();
81081 }
81082 # 305 "/usr/include/boost/lambda/detail/ret.hpp" 3 4
81083 template<class T>
81084 struct result_type_to_sig : public T {
81085 template<class Args> struct sig { typedef typename T::result_type type; };
81086 result_type_to_sig(const T& t) : T(t) {}
81087 };
81088
81089 template<class F>
81090 inline result_type_to_sig<F> std_functor(const F& f) { return f; }
81091
81092
81093 }
81094 }
81095 # 58 "/usr/include/boost/lambda/core.hpp" 2 3 4
81096
81097 namespace boost {
81098 namespace lambda {
81099
81100 namespace {
81101
81102
81103 boost::lambda::placeholder1_type free1 = boost::lambda::placeholder1_type();
81104 boost::lambda::placeholder2_type free2 = boost::lambda::placeholder2_type();
81105 boost::lambda::placeholder3_type free3 = boost::lambda::placeholder3_type();
81106
81107 boost::lambda::placeholder1_type& _1 = free1;
81108 boost::lambda::placeholder2_type& _2 = free2;
81109 boost::lambda::placeholder3_type& _3 = free3;
81110
81111 }
81112
81113 }
81114 }
81115 # 15 "/usr/include/boost/lambda/lambda.hpp" 2 3 4
81116
81117
81118
81119
81120
81121
81122 # 1 "/usr/include/boost/lambda/detail/operator_actions.hpp" 1 3 4
81123 # 14 "/usr/include/boost/lambda/detail/operator_actions.hpp" 3 4
81124 namespace boost {
81125 namespace lambda {
81126
81127
81128
81129
81130 class plus_action {};
81131 class minus_action {};
81132 class multiply_action {};
81133 class divide_action {};
81134 class remainder_action {};
81135
81136
81137
81138 class leftshift_action {};
81139 class rightshift_action {};
81140 class xor_action {};
81141
81142
81143
81144
81145 class and_action {};
81146 class or_action {};
81147 class not_action {};
81148
81149
81150
81151 class less_action {};
81152 class greater_action {};
81153 class lessorequal_action {};
81154 class greaterorequal_action {};
81155 class equal_action {};
81156 class notequal_action {};
81157
81158
81159
81160 class increment_action {};
81161 class decrement_action {};
81162
81163
81164
81165
81166
81167 class addressof_action {};
81168
81169 class contentsof_action {};
81170
81171
81172
81173
81174
81175 template <class Action> class arithmetic_action;
81176 template <class Action> class bitwise_action;
81177 template <class Action> class logical_action;
81178 template <class Action> class relational_action;
81179 template <class Action> class arithmetic_assignment_action;
81180 template <class Action> class bitwise_assignment_action;
81181 template <class Action> class unary_arithmetic_action;
81182 template <class Action> class pre_increment_decrement_action;
81183 template <class Action> class post_increment_decrement_action;
81184
81185
81186
81187
81188
81189
81190 template <class Act> struct is_protectable<arithmetic_action<Act> > {
81191 static const bool value = true;
81192 };
81193 template <class Act> struct is_protectable<bitwise_action<Act> > {
81194 static const bool value = true;
81195 };
81196 template <class Act> struct is_protectable<logical_action<Act> > {
81197 static const bool value = true;
81198 };
81199 template <class Act> struct is_protectable<relational_action<Act> > {
81200 static const bool value = true;
81201 };
81202 template <class Act>
81203 struct is_protectable<arithmetic_assignment_action<Act> > {
81204 static const bool value = true;
81205 };
81206 template <class Act> struct is_protectable<bitwise_assignment_action<Act> > {
81207 static const bool value = true;
81208 };
81209 template <class Act> struct is_protectable<unary_arithmetic_action<Act> > {
81210 static const bool value = true;
81211 };
81212 template <class Act>
81213 struct is_protectable<pre_increment_decrement_action<Act> > {
81214 static const bool value = true;
81215 };
81216 template <class Act> struct
81217 is_protectable<post_increment_decrement_action<Act> > {
81218 static const bool value = true;
81219 };
81220
81221 template <> struct is_protectable<other_action<addressof_action> > {
81222 static const bool value = true;
81223 };
81224 template <> struct is_protectable<other_action<contentsof_action> > {
81225 static const bool value = true;
81226 };
81227
81228 template<> struct is_protectable<other_action<subscript_action> > {
81229 static const bool value = true;
81230 };
81231 template<> struct is_protectable<other_action<assignment_action> > {
81232 static const bool value = true;
81233 };
81234
81235
81236
81237
81238
81239 }
81240 }
81241 # 22 "/usr/include/boost/lambda/lambda.hpp" 2 3 4
81242 # 1 "/usr/include/boost/lambda/detail/operator_lambda_func_base.hpp" 1 3 4
81243 # 16 "/usr/include/boost/lambda/detail/operator_lambda_func_base.hpp" 3 4
81244 namespace boost {
81245 namespace lambda {
81246
81247
81248
81249
81250
81251
81252
81253 template<class Args>
81254 class lambda_functor_base<other_action<comma_action>, Args> {
81255 public:
81256 Args args;
81257 public:
81258 explicit lambda_functor_base(const Args& a) : args(a) {}
81259
81260 template<class RET, class A, class B, class C, class Env>
81261 RET call(A& a, B& b, C& c, Env& env) const {
81262 return detail::select(boost::tuples::get<0>(args), a, b, c, env),
81263 detail::select(boost::tuples::get<1>(args), a, b, c, env);
81264 }
81265
81266
81267 template<class SigArgs> struct sig {
81268 private:
81269 typedef typename
81270 detail::deduce_argument_types<Args, SigArgs>::type rets_t;
81271 public:
81272 typedef typename return_type_2_comma<
81273 typename detail::element_or_null<0, rets_t>::type,
81274 typename detail::element_or_null<1, rets_t>::type
81275 >::type type;
81276 };
81277
81278 };
81279
81280 namespace detail {
81281
81282
81283
81284
81285 template<class Action, class Bound, class Open> class binary_rt {
81286 private:
81287 typedef typename
81288 detail::deduce_argument_types<Bound, Open>::type rets_t;
81289 public:
81290 typedef typename return_type_2_prot<
81291 Action,
81292 typename detail::element_or_null<0, rets_t>::type,
81293 typename detail::element_or_null<1, rets_t>::type
81294 >::type type;
81295 };
81296
81297
81298
81299 template<class Action, class Bound, class Open> class unary_rt {
81300 private:
81301 typedef typename
81302 detail::deduce_argument_types<Bound, Open>::type rets_t;
81303 public:
81304 typedef typename return_type_1_prot<
81305 Action,
81306 typename detail::element_or_null<0, rets_t>::type
81307 >::type type;
81308 };
81309
81310
81311 }
81312
81313
81314
81315 template<class Args>
81316 class lambda_functor_base<logical_action<and_action>, Args> {
81317 public:
81318 Args args;
81319 public:
81320 explicit lambda_functor_base(const Args& a) : args(a) {}
81321
81322 template<class RET, class A, class B, class C, class Env>
81323 RET call(A& a, B& b, C& c, Env& env) const {
81324 return detail::select(boost::tuples::get<0>(args), a, b, c, env) &&
81325 detail::select(boost::tuples::get<1>(args), a, b, c, env);
81326 }
81327 template<class SigArgs> struct sig {
81328 typedef typename
81329 detail::binary_rt<logical_action<and_action>, Args, SigArgs>::type type;
81330 };
81331 };
81332
81333
81334
81335 template<class Args>
81336 class lambda_functor_base<logical_action< or_action>, Args> {
81337 public:
81338 Args args;
81339 public:
81340 explicit lambda_functor_base(const Args& a) : args(a) {}
81341
81342 template<class RET, class A, class B, class C, class Env>
81343 RET call(A& a, B& b, C& c, Env& env) const {
81344 return detail::select(boost::tuples::get<0>(args), a, b, c, env) ||
81345 detail::select(boost::tuples::get<1>(args), a, b, c, env);
81346 }
81347
81348 template<class SigArgs> struct sig {
81349 typedef typename
81350 detail::binary_rt<logical_action<or_action>, Args, SigArgs>::type type;
81351 };
81352 };
81353
81354
81355 template<class Args>
81356 class lambda_functor_base<other_action<subscript_action>, Args> {
81357 public:
81358 Args args;
81359 public:
81360 explicit lambda_functor_base(const Args& a) : args(a) {}
81361
81362 template<class RET, class A, class B, class C, class Env>
81363 RET call(A& a, B& b, C& c, Env& env) const {
81364 return detail::select(boost::tuples::get<0>(args), a, b, c, env)
81365 [detail::select(boost::tuples::get<1>(args), a, b, c, env)];
81366 }
81367
81368 template<class SigArgs> struct sig {
81369 typedef typename
81370 detail::binary_rt<other_action<subscript_action>, Args, SigArgs>::type
81371 type;
81372 };
81373 };
81374 # 206 "/usr/include/boost/lambda/detail/operator_lambda_func_base.hpp" 3 4
81375 template<class Args> class lambda_functor_base<arithmetic_action<plus_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) + detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<arithmetic_action<plus_action>, Args, SigArgs>::type type; }; };
81376 template<class Args> class lambda_functor_base<arithmetic_action<minus_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) - detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<arithmetic_action<minus_action>, Args, SigArgs>::type type; }; };
81377 template<class Args> class lambda_functor_base<arithmetic_action<multiply_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) * detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<arithmetic_action<multiply_action>, Args, SigArgs>::type type; }; };
81378 template<class Args> class lambda_functor_base<arithmetic_action<divide_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) / detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<arithmetic_action<divide_action>, Args, SigArgs>::type type; }; };
81379 template<class Args> class lambda_functor_base<arithmetic_action<remainder_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) % detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<arithmetic_action<remainder_action>, Args, SigArgs>::type type; }; };
81380
81381 template<class Args> class lambda_functor_base<bitwise_action<leftshift_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) << detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<bitwise_action<leftshift_action>, Args, SigArgs>::type type; }; };
81382 template<class Args> class lambda_functor_base<bitwise_action<rightshift_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) >> detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<bitwise_action<rightshift_action>, Args, SigArgs>::type type; }; };
81383 template<class Args> class lambda_functor_base<bitwise_action<and_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) & detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<bitwise_action<and_action>, Args, SigArgs>::type type; }; };
81384 template<class Args> class lambda_functor_base<bitwise_action<or_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) | detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<bitwise_action<or_action>, Args, SigArgs>::type type; }; };
81385 template<class Args> class lambda_functor_base<bitwise_action<xor_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) ^ detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<bitwise_action<xor_action>, Args, SigArgs>::type type; }; };
81386
81387 template<class Args> class lambda_functor_base<relational_action<less_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) < detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<relational_action<less_action>, Args, SigArgs>::type type; }; };
81388 template<class Args> class lambda_functor_base<relational_action<greater_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) > detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<relational_action<greater_action>, Args, SigArgs>::type type; }; };
81389 template<class Args> class lambda_functor_base<relational_action<lessorequal_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) <= detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<relational_action<lessorequal_action>, Args, SigArgs>::type type; }; };
81390 template<class Args> class lambda_functor_base<relational_action<greaterorequal_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) >= detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<relational_action<greaterorequal_action>, Args, SigArgs>::type type; }; };
81391 template<class Args> class lambda_functor_base<relational_action<equal_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) == detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<relational_action<equal_action>, Args, SigArgs>::type type; }; };
81392 template<class Args> class lambda_functor_base<relational_action<notequal_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) != detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<relational_action<notequal_action>, Args, SigArgs>::type type; }; };
81393
81394 template<class Args> class lambda_functor_base<arithmetic_assignment_action<plus_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) += detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<arithmetic_assignment_action<plus_action>, Args, SigArgs>::type type; }; };
81395 template<class Args> class lambda_functor_base<arithmetic_assignment_action<minus_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) -= detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<arithmetic_assignment_action<minus_action>, Args, SigArgs>::type type; }; };
81396 template<class Args> class lambda_functor_base<arithmetic_assignment_action<multiply_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) *= detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<arithmetic_assignment_action<multiply_action>, Args, SigArgs>::type type; }; };
81397 template<class Args> class lambda_functor_base<arithmetic_assignment_action<divide_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) /= detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<arithmetic_assignment_action<divide_action>, Args, SigArgs>::type type; }; };
81398 template<class Args> class lambda_functor_base<arithmetic_assignment_action<remainder_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) %= detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<arithmetic_assignment_action<remainder_action>, Args, SigArgs>::type type; }; };
81399
81400 template<class Args> class lambda_functor_base<bitwise_assignment_action<leftshift_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) <<= detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<bitwise_assignment_action<leftshift_action>, Args, SigArgs>::type type; }; };
81401 template<class Args> class lambda_functor_base<bitwise_assignment_action<rightshift_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) >>= detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<bitwise_assignment_action<rightshift_action>, Args, SigArgs>::type type; }; };
81402 template<class Args> class lambda_functor_base<bitwise_assignment_action<and_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) &= detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<bitwise_assignment_action<and_action>, Args, SigArgs>::type type; }; };
81403 template<class Args> class lambda_functor_base<bitwise_assignment_action<or_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) |= detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<bitwise_assignment_action<or_action>, Args, SigArgs>::type type; }; };
81404 template<class Args> class lambda_functor_base<bitwise_assignment_action<xor_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) ^= detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<bitwise_assignment_action<xor_action>, Args, SigArgs>::type type; }; };
81405
81406 template<class Args> class lambda_functor_base<other_action< assignment_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) = detail::select(boost::tuples::get<1>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::binary_rt<other_action< assignment_action>, Args, SigArgs>::type type; }; };
81407
81408
81409 template<class Args> class lambda_functor_base<unary_arithmetic_action<plus_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return + detail::select(boost::tuples::get<0>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::unary_rt<unary_arithmetic_action<plus_action>, Args, SigArgs>::type type; }; };
81410 template<class Args> class lambda_functor_base<unary_arithmetic_action<minus_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return - detail::select(boost::tuples::get<0>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::unary_rt<unary_arithmetic_action<minus_action>, Args, SigArgs>::type type; }; };
81411 template<class Args> class lambda_functor_base<bitwise_action<not_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return ~ detail::select(boost::tuples::get<0>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::unary_rt<bitwise_action<not_action>, Args, SigArgs>::type type; }; };
81412 template<class Args> class lambda_functor_base<logical_action<not_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return ! detail::select(boost::tuples::get<0>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::unary_rt<logical_action<not_action>, Args, SigArgs>::type type; }; };
81413 template<class Args> class lambda_functor_base<pre_increment_decrement_action<increment_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return ++ detail::select(boost::tuples::get<0>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::unary_rt<pre_increment_decrement_action<increment_action>, Args, SigArgs>::type type; }; };
81414 template<class Args> class lambda_functor_base<pre_increment_decrement_action<decrement_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return -- detail::select(boost::tuples::get<0>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::unary_rt<pre_increment_decrement_action<decrement_action>, Args, SigArgs>::type type; }; };
81415
81416 template<class Args> class lambda_functor_base<other_action<addressof_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return & detail::select(boost::tuples::get<0>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::unary_rt<other_action<addressof_action>, Args, SigArgs>::type type; }; };
81417 template<class Args> class lambda_functor_base<other_action<contentsof_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return * detail::select(boost::tuples::get<0>(args), a, b, c, env); } template<class SigArgs> struct sig { typedef typename detail::unary_rt<other_action<contentsof_action>, Args, SigArgs>::type type; }; };
81418
81419 template<class Args> class lambda_functor_base<post_increment_decrement_action<increment_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) ++; } template<class SigArgs> struct sig { typedef typename detail::unary_rt<post_increment_decrement_action<increment_action>, Args, SigArgs>::type type; }; };
81420 template<class Args> class lambda_functor_base<post_increment_decrement_action<decrement_action>, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template<class RET, class A, class B, class C, class Env> RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) --; } template<class SigArgs> struct sig { typedef typename detail::unary_rt<post_increment_decrement_action<decrement_action>, Args, SigArgs>::type type; }; };
81421
81422
81423
81424
81425
81426
81427 }
81428 }
81429 # 23 "/usr/include/boost/lambda/lambda.hpp" 2 3 4
81430 # 1 "/usr/include/boost/lambda/detail/operator_return_type_traits.hpp" 1 3 4
81431 # 14 "/usr/include/boost/lambda/detail/operator_return_type_traits.hpp" 3 4
81432 # 1 "/usr/include/boost/lambda/detail/is_instance_of.hpp" 1 3 4
81433 # 17 "/usr/include/boost/lambda/detail/is_instance_of.hpp" 3 4
81434 # 1 "/usr/include/boost/type_traits/conversion_traits.hpp" 1 3 4
81435 # 18 "/usr/include/boost/lambda/detail/is_instance_of.hpp" 2 3 4
81436 # 1 "/usr/include/boost/preprocessor/enum_shifted_params.hpp" 1 3 4
81437 # 15 "/usr/include/boost/preprocessor/enum_shifted_params.hpp" 3 4
81438 # 1 "/usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp" 1 3 4
81439 # 17 "/usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp" 3 4
81440 # 1 "/usr/include/boost/preprocessor/arithmetic/dec.hpp" 1 3 4
81441 # 18 "/usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp" 2 3 4
81442 # 16 "/usr/include/boost/preprocessor/enum_shifted_params.hpp" 2 3 4
81443 # 19 "/usr/include/boost/lambda/detail/is_instance_of.hpp" 2 3 4
81444 # 1 "/usr/include/boost/preprocessor/repeat_2nd.hpp" 1 3 4
81445 # 20 "/usr/include/boost/lambda/detail/is_instance_of.hpp" 2 3 4
81446 # 51 "/usr/include/boost/lambda/detail/is_instance_of.hpp" 3 4
81447 namespace boost {
81448 namespace lambda {
81449 # 85 "/usr/include/boost/lambda/detail/is_instance_of.hpp" 3 4
81450 namespace detail { template <template< class> class F> struct conversion_tester_1 { template< class A0> conversion_tester_1 (const F< A0>&); }; } template <class From, template < class> class To> struct is_instance_of_1 { private: typedef ::boost::is_convertible< From, detail::conversion_tester_1<To> > helper_type; public: static const bool value = helper_type::value; }; namespace detail { template <template< class , class> class F> struct conversion_tester_2 { template< class A0 , class A1> conversion_tester_2 (const F< A0 , A1>&); }; } template <class From, template < class , class> class To> struct is_instance_of_2 { private: typedef ::boost::is_convertible< From, detail::conversion_tester_2<To> > helper_type; public: static const bool value = helper_type::value; }; namespace detail { template <template< class , class , class> class F> struct conversion_tester_3 { template< class A0 , class A1 , class A2> conversion_tester_3 (const F< A0 , A1 , A2>&); }; } template <class From, template < class , class , class> class To> struct is_instance_of_3 { private: typedef ::boost::is_convertible< From, detail::conversion_tester_3<To> > helper_type; public: static const bool value = helper_type::value; }; namespace detail { template <template< class , class , class , class> class F> struct conversion_tester_4 { template< class A0 , class A1 , class A2 , class A3> conversion_tester_4 (const F< A0 , A1 , A2 , A3>&); }; } template <class From, template < class , class , class , class> class To> struct is_instance_of_4 { private: typedef ::boost::is_convertible< From, detail::conversion_tester_4<To> > helper_type; public: static const bool value = helper_type::value; };
81451 # 96 "/usr/include/boost/lambda/detail/is_instance_of.hpp" 3 4
81452 }
81453 }
81454 # 15 "/usr/include/boost/lambda/detail/operator_return_type_traits.hpp" 2 3 4
81455
81456
81457 # 1 "/usr/include/boost/indirect_reference.hpp" 1 3 4
81458 # 14 "/usr/include/boost/indirect_reference.hpp" 3 4
81459 # 1 "/usr/include/boost/detail/is_incrementable.hpp" 1 3 4
81460
81461
81462
81463
81464
81465
81466 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
81467 # 8 "/usr/include/boost/detail/is_incrementable.hpp" 2 3 4
81468
81469
81470
81471
81472
81473
81474 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4
81475 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4
81476 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4
81477 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4
81478 # 15 "/usr/include/boost/detail/is_incrementable.hpp" 2 3 4
81479
81480 namespace boost { namespace detail {
81481 # 25 "/usr/include/boost/detail/is_incrementable.hpp" 3 4
81482 namespace is_incrementable_
81483 {
81484
81485
81486 struct tag {};
81487
81488
81489
81490
81491 struct any { template <class T> any(T const&); };
81492 # 53 "/usr/include/boost/detail/is_incrementable.hpp" 3 4
81493 tag operator++(any const&);
81494 tag operator++(any const&,int);
81495 # 63 "/usr/include/boost/detail/is_incrementable.hpp" 3 4
81496 tag operator,(tag,int);
81497
81498
81499
81500
81501 char (& check(tag) )[2];
81502
81503 template <class T>
81504 char check(T const&);
81505
81506
81507 template <class T>
81508 struct impl
81509 {
81510 static typename boost::remove_cv<T>::type& x;
81511
81512 static const bool value = sizeof(is_incrementable_::check((++x,0))) == 1;
81513
81514
81515
81516 };
81517
81518 template <class T>
81519 struct postfix_impl
81520 {
81521 static typename boost::remove_cv<T>::type& x;
81522
81523 static const bool value = sizeof(is_incrementable_::check((x++,0))) == 1;
81524
81525
81526
81527 };
81528 }
81529
81530
81531
81532 template<typename T>
81533 struct is_incrementable
81534 : ::boost::integral_constant<bool,::boost::detail::is_incrementable_::impl<T>::value>
81535 {
81536
81537
81538 };
81539
81540 template<typename T>
81541 struct is_postfix_incrementable
81542 : ::boost::integral_constant<bool,::boost::detail::is_incrementable_::impl<T>::value>
81543 {
81544
81545
81546 };
81547
81548 }
81549
81550
81551
81552
81553 }
81554
81555 # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4
81556 # 123 "/usr/include/boost/detail/is_incrementable.hpp" 2 3 4
81557 # 15 "/usr/include/boost/indirect_reference.hpp" 2 3 4
81558 # 1 "/usr/include/boost/iterator/iterator_traits.hpp" 1 3 4
81559
81560
81561
81562
81563
81564
81565
81566 # 1 "/usr/include/boost/detail/iterator.hpp" 1 3 4
81567 # 77 "/usr/include/boost/detail/iterator.hpp" 3 4
81568 namespace boost { namespace detail {
81569
81570
81571 template <class Iterator>
81572 struct iterator_traits
81573 : std::iterator_traits<Iterator>
81574 {};
81575 using std::distance;
81576
81577 }}
81578 # 9 "/usr/include/boost/iterator/iterator_traits.hpp" 2 3 4
81579
81580
81581 namespace boost {
81582 # 27 "/usr/include/boost/iterator/iterator_traits.hpp" 3 4
81583 template <class Iterator>
81584 struct iterator_value
81585 {
81586 typedef typename detail::iterator_traits<Iterator>::value_type type;
81587 };
81588
81589 template <class Iterator>
81590 struct iterator_reference
81591 {
81592 typedef typename detail::iterator_traits<Iterator>::reference type;
81593 };
81594
81595
81596 template <class Iterator>
81597 struct iterator_pointer
81598 {
81599 typedef typename detail::iterator_traits<Iterator>::pointer type;
81600 };
81601
81602 template <class Iterator>
81603 struct iterator_difference
81604 {
81605 typedef typename detail::iterator_traits<Iterator>::difference_type type;
81606 };
81607
81608 template <class Iterator>
81609 struct iterator_category
81610 {
81611 typedef typename detail::iterator_traits<Iterator>::iterator_category type;
81612 };
81613 # 90 "/usr/include/boost/iterator/iterator_traits.hpp" 3 4
81614 }
81615 # 16 "/usr/include/boost/indirect_reference.hpp" 2 3 4
81616
81617 # 1 "/usr/include/boost/mpl/eval_if.hpp" 1 3 4
81618 # 17 "/usr/include/boost/mpl/eval_if.hpp" 3 4
81619 # 1 "/usr/include/boost/mpl/if.hpp" 1 3 4
81620 # 17 "/usr/include/boost/mpl/if.hpp" 3 4
81621 # 1 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 1 3 4
81622 # 18 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 3 4
81623 # 1 "/usr/include/boost/mpl/aux_/config/integral.hpp" 1 3 4
81624 # 19 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 2 3 4
81625 # 1 "/usr/include/boost/mpl/aux_/config/eti.hpp" 1 3 4
81626 # 20 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 2 3 4
81627 # 73 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 3 4
81628 namespace boost { namespace mpl { namespace aux {
81629
81630 template< typename T > struct value_type_wknd
81631 {
81632 typedef typename T::value_type type;
81633 };
81634 # 87 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 3 4
81635 }}}
81636 # 18 "/usr/include/boost/mpl/if.hpp" 2 3 4
81637
81638 # 1 "/usr/include/boost/mpl/aux_/na_spec.hpp" 1 3 4
81639 # 18 "/usr/include/boost/mpl/aux_/na_spec.hpp" 3 4
81640 # 1 "/usr/include/boost/mpl/lambda_fwd.hpp" 1 3 4
81641 # 17 "/usr/include/boost/mpl/lambda_fwd.hpp" 3 4
81642 # 1 "/usr/include/boost/mpl/void_fwd.hpp" 1 3 4
81643 # 19 "/usr/include/boost/mpl/void_fwd.hpp" 3 4
81644 namespace mpl_ {
81645
81646 struct void_;
81647
81648 }
81649 namespace boost { namespace mpl { using ::mpl_::void_; } }
81650 # 18 "/usr/include/boost/mpl/lambda_fwd.hpp" 2 3 4
81651 # 1 "/usr/include/boost/mpl/aux_/na.hpp" 1 3 4
81652 # 18 "/usr/include/boost/mpl/aux_/na.hpp" 3 4
81653 # 1 "/usr/include/boost/mpl/aux_/na_fwd.hpp" 1 3 4
81654 # 19 "/usr/include/boost/mpl/aux_/na_fwd.hpp" 3 4
81655 namespace mpl_ {
81656
81657
81658 struct na
81659 {
81660 typedef na type;
81661 enum { value = 0 };
81662 };
81663
81664 }
81665 namespace boost { namespace mpl { using ::mpl_::na; } }
81666 # 19 "/usr/include/boost/mpl/aux_/na.hpp" 2 3 4
81667
81668
81669
81670 namespace boost { namespace mpl {
81671
81672 template< typename T >
81673 struct is_na
81674 : false_
81675 {
81676
81677
81678
81679 };
81680
81681 template<>
81682 struct is_na<na>
81683 : true_
81684 {
81685
81686
81687
81688 };
81689
81690 template< typename T >
81691 struct is_not_na
81692 : true_
81693 {
81694
81695
81696
81697 };
81698
81699 template<>
81700 struct is_not_na<na>
81701 : false_
81702 {
81703
81704
81705
81706 };
81707
81708
81709 template< typename T, typename U > struct if_na
81710 {
81711 typedef T type;
81712 };
81713
81714 template< typename U > struct if_na<na,U>
81715 {
81716 typedef U type;
81717 };
81718 # 93 "/usr/include/boost/mpl/aux_/na.hpp" 3 4
81719 }}
81720 # 19 "/usr/include/boost/mpl/lambda_fwd.hpp" 2 3 4
81721
81722
81723
81724
81725
81726 # 1 "/usr/include/boost/mpl/aux_/lambda_arity_param.hpp" 1 3 4
81727 # 25 "/usr/include/boost/mpl/lambda_fwd.hpp" 2 3 4
81728
81729
81730 namespace boost { namespace mpl {
81731
81732 template<
81733 typename T = na
81734 , typename Tag = void_
81735 , typename Arity = int_< aux::template_arity<T>::value >
81736
81737
81738 >
81739 struct lambda;
81740
81741 }}
81742 # 19 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4
81743
81744
81745
81746 # 1 "/usr/include/boost/mpl/aux_/arity.hpp" 1 3 4
81747 # 17 "/usr/include/boost/mpl/aux_/arity.hpp" 3 4
81748 # 1 "/usr/include/boost/mpl/aux_/config/dtp.hpp" 1 3 4
81749 # 18 "/usr/include/boost/mpl/aux_/arity.hpp" 2 3 4
81750 # 23 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4
81751
81752
81753
81754
81755 # 1 "/usr/include/boost/mpl/aux_/preprocessor/enum.hpp" 1 3 4
81756 # 28 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4
81757 # 1 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 1 3 4
81758 # 17 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 3 4
81759 # 1 "/usr/include/boost/mpl/limits/arity.hpp" 1 3 4
81760 # 18 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4
81761
81762
81763
81764
81765 # 1 "/usr/include/boost/preprocessor/logical/and.hpp" 1 3 4
81766 # 19 "/usr/include/boost/preprocessor/logical/and.hpp" 3 4
81767 # 1 "/usr/include/boost/preprocessor/logical/bitand.hpp" 1 3 4
81768 # 20 "/usr/include/boost/preprocessor/logical/and.hpp" 2 3 4
81769 # 23 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4
81770 # 1 "/usr/include/boost/preprocessor/identity.hpp" 1 3 4
81771 # 15 "/usr/include/boost/preprocessor/identity.hpp" 3 4
81772 # 1 "/usr/include/boost/preprocessor/facilities/identity.hpp" 1 3 4
81773 # 16 "/usr/include/boost/preprocessor/identity.hpp" 2 3 4
81774 # 24 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4
81775 # 1 "/usr/include/boost/preprocessor/empty.hpp" 1 3 4
81776 # 25 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4
81777 # 66 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 3 4
81778 # 1 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 1 3 4
81779 # 20 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 3 4
81780 # 1 "/usr/include/boost/preprocessor/control/while.hpp" 1 3 4
81781 # 20 "/usr/include/boost/preprocessor/control/while.hpp" 3 4
81782 # 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4
81783 # 21 "/usr/include/boost/preprocessor/control/while.hpp" 2 3 4
81784 # 1 "/usr/include/boost/preprocessor/list/fold_left.hpp" 1 3 4
81785 # 18 "/usr/include/boost/preprocessor/list/fold_left.hpp" 3 4
81786 # 1 "/usr/include/boost/preprocessor/control/while.hpp" 1 3 4
81787 # 19 "/usr/include/boost/preprocessor/list/fold_left.hpp" 2 3 4
81788
81789 # 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4
81790 # 21 "/usr/include/boost/preprocessor/list/fold_left.hpp" 2 3 4
81791 # 41 "/usr/include/boost/preprocessor/list/fold_left.hpp" 3 4
81792 # 1 "/usr/include/boost/preprocessor/list/detail/fold_left.hpp" 1 3 4
81793 # 17 "/usr/include/boost/preprocessor/list/detail/fold_left.hpp" 3 4
81794 # 1 "/usr/include/boost/preprocessor/control/expr_iif.hpp" 1 3 4
81795 # 18 "/usr/include/boost/preprocessor/list/detail/fold_left.hpp" 2 3 4
81796
81797 # 1 "/usr/include/boost/preprocessor/list/adt.hpp" 1 3 4
81798 # 18 "/usr/include/boost/preprocessor/list/adt.hpp" 3 4
81799 # 1 "/usr/include/boost/preprocessor/detail/is_binary.hpp" 1 3 4
81800 # 16 "/usr/include/boost/preprocessor/detail/is_binary.hpp" 3 4
81801 # 1 "/usr/include/boost/preprocessor/detail/check.hpp" 1 3 4
81802 # 17 "/usr/include/boost/preprocessor/detail/is_binary.hpp" 2 3 4
81803 # 19 "/usr/include/boost/preprocessor/list/adt.hpp" 2 3 4
81804 # 1 "/usr/include/boost/preprocessor/logical/compl.hpp" 1 3 4
81805 # 20 "/usr/include/boost/preprocessor/list/adt.hpp" 2 3 4
81806 # 20 "/usr/include/boost/preprocessor/list/detail/fold_left.hpp" 2 3 4
81807 # 42 "/usr/include/boost/preprocessor/list/fold_left.hpp" 2 3 4
81808 # 22 "/usr/include/boost/preprocessor/control/while.hpp" 2 3 4
81809 # 1 "/usr/include/boost/preprocessor/list/fold_right.hpp" 1 3 4
81810 # 20 "/usr/include/boost/preprocessor/list/fold_right.hpp" 3 4
81811 # 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4
81812 # 21 "/usr/include/boost/preprocessor/list/fold_right.hpp" 2 3 4
81813 # 37 "/usr/include/boost/preprocessor/list/fold_right.hpp" 3 4
81814 # 1 "/usr/include/boost/preprocessor/list/detail/fold_right.hpp" 1 3 4
81815 # 18 "/usr/include/boost/preprocessor/list/detail/fold_right.hpp" 3 4
81816 # 1 "/usr/include/boost/preprocessor/list/reverse.hpp" 1 3 4
81817 # 19 "/usr/include/boost/preprocessor/list/detail/fold_right.hpp" 2 3 4
81818 # 38 "/usr/include/boost/preprocessor/list/fold_right.hpp" 2 3 4
81819 # 23 "/usr/include/boost/preprocessor/control/while.hpp" 2 3 4
81820 # 48 "/usr/include/boost/preprocessor/control/while.hpp" 3 4
81821 # 1 "/usr/include/boost/preprocessor/control/detail/while.hpp" 1 3 4
81822 # 49 "/usr/include/boost/preprocessor/control/while.hpp" 2 3 4
81823 # 21 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 2 3 4
81824 # 1 "/usr/include/boost/preprocessor/tuple/elem.hpp" 1 3 4
81825 # 22 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 2 3 4
81826 # 67 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4
81827 # 1 "/usr/include/boost/preprocessor/arithmetic/sub.hpp" 1 3 4
81828 # 68 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4
81829 # 29 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4
81830 # 20 "/usr/include/boost/mpl/if.hpp" 2 3 4
81831
81832
81833
81834
81835
81836 namespace boost { namespace mpl {
81837
81838
81839
81840 template<
81841 bool C
81842 , typename T1
81843 , typename T2
81844 >
81845 struct if_c
81846 {
81847 typedef T1 type;
81848 };
81849
81850 template<
81851 typename T1
81852 , typename T2
81853 >
81854 struct if_c<false,T1,T2>
81855 {
81856 typedef T2 type;
81857 };
81858
81859
81860
81861 template<
81862 typename T1 = na
81863 , typename T2 = na
81864 , typename T3 = na
81865 >
81866 struct if_
81867 {
81868 private:
81869
81870 typedef if_c<
81871
81872
81873
81874 static_cast<bool>(T1::value)
81875
81876 , T2
81877 , T3
81878 > almost_type_;
81879
81880 public:
81881 typedef typename almost_type_::type type;
81882
81883
81884 };
81885 # 131 "/usr/include/boost/mpl/if.hpp" 3 4
81886 template<> struct if_< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : if_< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< if_< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef if_< na , na , na > result_; typedef if_< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< if_< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< if_< na , na , na > > : int_<-1> { }; }
81887
81888 }}
81889 # 18 "/usr/include/boost/mpl/eval_if.hpp" 2 3 4
81890
81891
81892
81893
81894
81895
81896 namespace boost { namespace mpl {
81897
81898 template<
81899 typename C = na
81900 , typename F1 = na
81901 , typename F2 = na
81902 >
81903 struct eval_if
81904
81905
81906
81907
81908 {
81909 typedef typename if_<C,F1,F2>::type f_;
81910 typedef typename f_::type type;
81911
81912
81913
81914
81915
81916 };
81917
81918
81919
81920 template<
81921 bool C
81922 , typename F1
81923 , typename F2
81924 >
81925 struct eval_if_c
81926
81927
81928
81929
81930 {
81931 typedef typename if_c<C,F1,F2>::type f_;
81932 typedef typename f_::type type;
81933
81934
81935
81936
81937 };
81938
81939 template<> struct eval_if< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : eval_if< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< eval_if< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef eval_if< na , na , na > result_; typedef eval_if< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< eval_if< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< eval_if< na , na , na > > : int_<-1> { }; }
81940
81941 }}
81942 # 18 "/usr/include/boost/indirect_reference.hpp" 2 3 4
81943 # 1 "/usr/include/boost/pointee.hpp" 1 3 4
81944 # 23 "/usr/include/boost/pointee.hpp" 3 4
81945 namespace boost {
81946
81947 namespace detail
81948 {
81949 template <class P>
81950 struct smart_ptr_pointee
81951 {
81952 typedef typename P::element_type type;
81953 };
81954
81955 template <class Iterator>
81956 struct iterator_pointee
81957 {
81958 typedef typename iterator_traits<Iterator>::value_type value_type;
81959
81960 struct impl
81961 {
81962 template <class T>
81963 static char test(T const&);
81964
81965 static char (& test(value_type&) )[2];
81966
81967 static Iterator& x;
81968 };
81969
81970 static const bool is_constant = sizeof(impl::test(*impl::x)) == 1;
81971
81972 typedef typename mpl::if_c<
81973
81974
81975
81976 is_constant
81977
81978 , typename add_const<value_type>::type
81979 , value_type
81980 >::type type;
81981 };
81982 }
81983
81984 template <class P>
81985 struct pointee
81986 : mpl::eval_if<
81987 detail::is_incrementable<P>
81988 , detail::iterator_pointee<P>
81989 , detail::smart_ptr_pointee<P>
81990 >
81991 {
81992 };
81993
81994 }
81995 # 19 "/usr/include/boost/indirect_reference.hpp" 2 3 4
81996
81997 namespace boost {
81998
81999 namespace detail
82000 {
82001 template <class P>
82002 struct smart_ptr_reference
82003 {
82004 typedef typename boost::pointee<P>::type& type;
82005 };
82006 }
82007
82008 template <class P>
82009 struct indirect_reference
82010 : mpl::eval_if<
82011 detail::is_incrementable<P>
82012 , iterator_reference<P>
82013 , detail::smart_ptr_reference<P>
82014 >
82015 {
82016 };
82017
82018 }
82019 # 18 "/usr/include/boost/lambda/detail/operator_return_type_traits.hpp" 2 3 4
82020
82021
82022
82023
82024
82025
82026 namespace boost {
82027 namespace lambda {
82028 namespace detail {
82029
82030
82031
82032
82033
82034 template <class A> struct promote_code { static const int value = -1; };
82035
82036
82037
82038
82039 template <> struct promote_code<bool> { static const int value = 10; };
82040 template <> struct promote_code<char> { static const int value = 20; };
82041 template <> struct promote_code<unsigned char> { static const int value = 30; };
82042 template <> struct promote_code<signed char> { static const int value = 40; };
82043 template <> struct promote_code<short int> { static const int value = 50; };
82044
82045
82046 template <> struct promote_code<int> { static const int value = 100; };
82047 template <> struct promote_code<unsigned int> { static const int value = 200; };
82048 template <> struct promote_code<long> { static const int value = 300; };
82049 template <> struct promote_code<unsigned long> { static const int value = 400; };
82050
82051 template <> struct promote_code<float> { static const int value = 500; };
82052 template <> struct promote_code<double> { static const int value = 600; };
82053 template <> struct promote_code<long double> { static const int value = 700; };
82054
82055
82056
82057
82058
82059 }
82060 }
82061 }
82062
82063 namespace std {
82064 template<class T> class complex;
82065 }
82066
82067 namespace boost {
82068 namespace lambda {
82069 namespace detail {
82070
82071 template <> struct promote_code< std::complex<float> > { static const int value = 800; };
82072 template <> struct promote_code< std::complex<double> > { static const int value = 900; };
82073 template <> struct promote_code< std::complex<long double> > { static const int value = 1000; };
82074
82075
82076 template <class T> struct promote_to_int { typedef T type; };
82077
82078 template <> struct promote_to_int<bool> { typedef int type; };
82079 template <> struct promote_to_int<char> { typedef int type; };
82080 template <> struct promote_to_int<unsigned char> { typedef int type; };
82081 template <> struct promote_to_int<signed char> { typedef int type; };
82082 template <> struct promote_to_int<short int> { typedef int type; };
82083
82084
82085
82086
82087 template <> struct promote_to_int<unsigned short int>
82088 {
82089 typedef
82090 detail::IF<sizeof(int) <= sizeof(unsigned short int),
82091
82092 unsigned int,
82093 int>::RET type;
82094 };
82095
82096
82097
82098
82099 }
82100
82101
82102
82103
82104
82105 template<class Act, class A>
82106 struct plain_return_type_1 {
82107 typedef detail::unspecified type;
82108 };
82109
82110
82111
82112 template<class Act, class A>
82113 struct plain_return_type_1<unary_arithmetic_action<Act>, A> {
82114 typedef A type;
82115 };
82116
82117 template<class Act, class A>
82118 struct return_type_1<unary_arithmetic_action<Act>, A> {
82119 typedef
82120 typename plain_return_type_1<
82121 unary_arithmetic_action<Act>,
82122 typename detail::remove_reference_and_cv<A>::type
82123 >::type type;
82124 };
82125
82126
82127 template<class A>
82128 struct plain_return_type_1<bitwise_action<not_action>, A> {
82129 typedef A type;
82130 };
82131
82132
82133 template<class A> struct return_type_1<bitwise_action<not_action>, A> {
82134 typedef
82135 typename plain_return_type_1<
82136 bitwise_action<not_action>,
82137 typename detail::remove_reference_and_cv<A>::type
82138 >::type type;
82139 };
82140
82141
82142
82143
82144 template<class Act, class A>
82145 struct plain_return_type_1<pre_increment_decrement_action<Act>, A> {
82146 typedef A& type;
82147 };
82148
82149 template<class Act, class A>
82150 struct return_type_1<pre_increment_decrement_action<Act>, A> {
82151 typedef
82152 typename plain_return_type_1<
82153 pre_increment_decrement_action<Act>,
82154 typename detail::remove_reference_and_cv<A>::type
82155 >::type type;
82156 };
82157
82158
82159 template<class Act, class A>
82160 struct plain_return_type_1<post_increment_decrement_action<Act>, A> {
82161 typedef A type;
82162 };
82163
82164 template<class Act, class A>
82165 struct return_type_1<post_increment_decrement_action<Act>, A>
82166 {
82167 typedef
82168 typename plain_return_type_1<
82169 post_increment_decrement_action<Act>,
82170 typename detail::remove_reference_and_cv<A>::type
82171 >::type type;
82172 };
82173
82174
82175 template<class A>
82176 struct plain_return_type_1<logical_action<not_action>, A> {
82177 typedef bool type;
82178 };
82179
82180 template<class A>
82181 struct return_type_1<logical_action<not_action>, A> {
82182 typedef
82183 typename plain_return_type_1<
82184 logical_action<not_action>,
82185 typename detail::remove_reference_and_cv<A>::type
82186 >::type type;
82187 };
82188
82189
82190
82191
82192 template<class A>
82193 struct return_type_1<other_action<addressof_action>, A> {
82194 typedef
82195 typename plain_return_type_1<
82196 other_action<addressof_action>,
82197 typename detail::remove_reference_and_cv<A>::type
82198 >::type type1;
82199
82200
82201
82202 typedef typename detail::IF<
82203 boost::is_same<type1, detail::unspecified>::value,
82204 typename boost::remove_reference<A>::type*,
82205 type1
82206 >::RET type;
82207 };
82208 # 217 "/usr/include/boost/lambda/detail/operator_return_type_traits.hpp" 3 4
82209 namespace detail {
82210
82211
82212 template <class A> struct contentsof_type {
82213 typedef typename boost::indirect_reference<A>::type type;
82214 };
82215
82216
82217 template <> struct contentsof_type<null_type> {
82218 typedef detail::unspecified type;
82219 };
82220
82221
82222 template <class A> struct contentsof_type<const A> {
82223 typedef typename contentsof_type<A>::type type1;
82224
82225
82226
82227
82228 typedef typename detail::IF<
82229 is_reference<type1>::value,
82230 const typename boost::remove_reference<type1>::type &,
82231 const type1
82232 >::RET type;
82233 };
82234
82235 template <class A> struct contentsof_type<volatile A> {
82236 typedef typename contentsof_type<A>::type type1;
82237 typedef typename detail::IF<
82238 is_reference<type1>::value,
82239 volatile typename boost::remove_reference<type1>::type &,
82240 volatile type1
82241 >::RET type;
82242 };
82243
82244 template <class A> struct contentsof_type<const volatile A> {
82245 typedef typename contentsof_type<A>::type type1;
82246 typedef typename detail::IF<
82247 is_reference<type1>::value,
82248 const volatile typename boost::remove_reference<type1>::type &,
82249 const volatile type1
82250 >::RET type;
82251 };
82252
82253
82254
82255
82256 template <class A> struct contentsof_type<A*> {
82257 typedef A& type;
82258 };
82259 template <class A> struct contentsof_type<A* const> {
82260 typedef A& type;
82261 };
82262 template <class A> struct contentsof_type<A* volatile> {
82263 typedef A& type;
82264 };
82265 template <class A> struct contentsof_type<A* const volatile> {
82266 typedef A& type;
82267 };
82268
82269 template<class A, int N> struct contentsof_type<A[N]> {
82270 typedef A& type;
82271 };
82272 template<class A, int N> struct contentsof_type<const A[N]> {
82273 typedef const A& type;
82274 };
82275 template<class A, int N> struct contentsof_type<volatile A[N]> {
82276 typedef volatile A& type;
82277 };
82278 template<class A, int N> struct contentsof_type<const volatile A[N]> {
82279 typedef const volatile A& type;
82280 };
82281
82282
82283
82284
82285
82286 }
82287
82288 template<class A>
82289 struct return_type_1<other_action<contentsof_action>, A> {
82290
82291 typedef
82292 typename plain_return_type_1<
82293 other_action<contentsof_action>,
82294 typename detail::remove_reference_and_cv<A>::type
82295 >::type type1;
82296
82297
82298
82299 typedef typename
82300 detail::IF_type<
82301 boost::is_same<type1, detail::unspecified>::value,
82302 detail::contentsof_type<
82303 typename boost::remove_reference<A>::type
82304 >,
82305 detail::identity_mapping<type1>
82306 >::type type;
82307 };
82308
82309
82310
82311
82312
82313
82314
82315 template <class Act, class A, class B>
82316 struct plain_return_type_2 {
82317 typedef detail::unspecified type;
82318 };
82319
82320 namespace detail {
82321
82322
82323 class illegal_pointer_arithmetic{};
82324
82325
82326
82327
82328
82329
82330
82331 template<class Act, class A, class B>
82332 struct pointer_arithmetic_traits { static const bool value = false; };
82333
82334 template<class A, class B>
82335 struct pointer_arithmetic_traits<plus_action, A, B> {
82336
82337 typedef typename
82338 array_to_pointer<typename boost::remove_reference<A>::type>::type AP;
82339 typedef typename
82340 array_to_pointer<typename boost::remove_reference<B>::type>::type BP;
82341
82342 static const bool is_pointer_A = boost::is_pointer<AP>::value;
82343 static const bool is_pointer_B = boost::is_pointer<BP>::value;
82344
82345 static const bool value = is_pointer_A || is_pointer_B;
82346
82347
82348
82349
82350
82351
82352 typedef typename
82353 detail::IF<
82354 is_pointer_A && is_pointer_B,
82355 detail::return_type_deduction_failure<
82356 detail::illegal_pointer_arithmetic
82357 >,
82358 typename detail::IF<is_pointer_A, AP, BP>::RET
82359 >::RET type;
82360
82361 };
82362
82363 template<class A, class B>
82364 struct pointer_arithmetic_traits<minus_action, A, B> {
82365 typedef typename
82366 array_to_pointer<typename boost::remove_reference<A>::type>::type AP;
82367 typedef typename
82368 array_to_pointer<typename boost::remove_reference<B>::type>::type BP;
82369
82370 static const bool is_pointer_A = boost::is_pointer<AP>::value;
82371 static const bool is_pointer_B = boost::is_pointer<BP>::value;
82372
82373 static const bool value = is_pointer_A || is_pointer_B;
82374
82375 static const bool same_pointer_type =
82376 is_pointer_A && is_pointer_B &&
82377 boost::is_same<
82378 typename boost::remove_const<
82379 typename boost::remove_pointer<
82380 typename boost::remove_const<AP>::type
82381 >::type
82382 >::type,
82383 typename boost::remove_const<
82384 typename boost::remove_pointer<
82385 typename boost::remove_const<BP>::type
82386 >::type
82387 >::type
82388 >::value;
82389
82390
82391
82392
82393
82394
82395 typedef typename
82396 detail::IF<
82397 same_pointer_type, const std::ptrdiff_t,
82398 typename detail::IF<
82399 is_pointer_A,
82400 AP,
82401 detail::return_type_deduction_failure<detail::illegal_pointer_arithmetic>
82402 >::RET
82403 >::RET type;
82404 };
82405
82406 }
82407
82408
82409
82410 namespace detail {
82411
82412 template<bool is_pointer_arithmetic, class Act, class A, class B>
82413 struct return_type_2_arithmetic_phase_1;
82414
82415 template<class A, class B> struct return_type_2_arithmetic_phase_2;
82416 template<class A, class B> struct return_type_2_arithmetic_phase_3;
82417
82418 }
82419
82420
82421
82422 template<class A, class B, class Act>
82423 struct return_type_2<arithmetic_action<Act>, A, B>
82424 {
82425 typedef typename detail::remove_reference_and_cv<A>::type plain_A;
82426 typedef typename detail::remove_reference_and_cv<B>::type plain_B;
82427
82428 typedef typename
82429 plain_return_type_2<arithmetic_action<Act>, plain_A, plain_B>::type type1;
82430
82431
82432 typedef typename
82433 detail::IF_type<
82434 boost::is_same<type1, detail::unspecified>::value,
82435 detail::return_type_2_arithmetic_phase_1<
82436 detail::pointer_arithmetic_traits<Act, A, B>::value, Act, A, B
82437 >,
82438 plain_return_type_2<arithmetic_action<Act>, plain_A, plain_B>
82439 >::type type;
82440 };
82441
82442 namespace detail {
82443
82444
82445 template<bool is_pointer_arithmetic, class Act, class A, class B>
82446 struct return_type_2_arithmetic_phase_1
82447 {
82448 typedef typename
82449 return_type_2_arithmetic_phase_2<
82450 typename remove_reference_and_cv<A>::type,
82451 typename remove_reference_and_cv<B>::type
82452 >::type type;
82453 };
82454
82455
82456 template<class Act, class A, class B>
82457 struct return_type_2_arithmetic_phase_1<true, Act, A, B>
82458 {
82459 typedef typename
82460 pointer_arithmetic_traits<Act, A, B>::type type;
82461 };
82462
82463 template<class A, class B>
82464 struct return_type_2_arithmetic_phase_2 {
82465 typedef typename
82466 return_type_2_arithmetic_phase_3<
82467 typename promote_to_int<A>::type,
82468 typename promote_to_int<B>::type
82469 >::type type;
82470 };
82471 # 488 "/usr/include/boost/lambda/detail/operator_return_type_traits.hpp" 3 4
82472 struct promotion_of_unsigned_int
82473 {
82474 typedef
82475 detail::IF<sizeof(long) <= sizeof(unsigned int),
82476 unsigned long,
82477 long>::RET type;
82478 };
82479
82480 template<>
82481 struct return_type_2_arithmetic_phase_2<unsigned int, long>
82482 {
82483 typedef promotion_of_unsigned_int::type type;
82484 };
82485 template<>
82486 struct return_type_2_arithmetic_phase_2<long, unsigned int>
82487 {
82488 typedef promotion_of_unsigned_int::type type;
82489 };
82490
82491
82492 template<class A, class B> struct return_type_2_arithmetic_phase_3 {
82493 enum { promote_code_A_value = promote_code<A>::value,
82494 promote_code_B_value = promote_code<B>::value };
82495 typedef typename
82496 detail::IF<
82497 promote_code_A_value == -1 || promote_code_B_value == -1,
82498 detail::return_type_deduction_failure<return_type_2_arithmetic_phase_3>,
82499 typename detail::IF<
82500 ((int)promote_code_A_value > (int)promote_code_B_value),
82501 A,
82502 B
82503 >::RET
82504 >::RET type;
82505 };
82506
82507 }
82508
82509
82510
82511
82512
82513 template<class A, class B, class Act>
82514 struct return_type_2<bitwise_action<Act>, A, B>
82515 {
82516
82517 typedef typename detail::remove_reference_and_cv<A>::type plain_A;
82518 typedef typename detail::remove_reference_and_cv<B>::type plain_B;
82519
82520 typedef typename
82521 plain_return_type_2<bitwise_action<Act>, plain_A, plain_B>::type type1;
82522
82523
82524 typedef typename
82525 detail::IF_type<
82526 boost::is_same<type1, detail::unspecified>::value,
82527 return_type_2<arithmetic_action<plus_action>, A, B>,
82528 plain_return_type_2<bitwise_action<Act>, plain_A, plain_B>
82529 >::type type;
82530 # 555 "/usr/include/boost/lambda/detail/operator_return_type_traits.hpp" 3 4
82531 typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( !(boost::is_float<plain_A>::value && boost::is_float<plain_B>::value) ) >)> boost_static_assert_typedef_555;
82532
82533 };
82534
82535 namespace detail {
82536 # 592 "/usr/include/boost/lambda/detail/operator_return_type_traits.hpp" 3 4
82537 template <class T> struct get_ostream_type {
82538 typedef std::basic_ostream<typename T::char_type,
82539 typename T::traits_type>& type;
82540 };
82541
82542 template <class T> struct get_istream_type {
82543 typedef std::basic_istream<typename T::char_type,
82544 typename T::traits_type>& type;
82545 };
82546
82547 template<class A, class B>
82548 struct leftshift_type {
82549 private:
82550 typedef typename boost::remove_reference<A>::type plainA;
82551 public:
82552 typedef typename detail::IF_type<
82553 is_instance_of_2<plainA, std::basic_ostream>::value,
82554 get_ostream_type<plainA>,
82555 detail::remove_reference_and_cv<A>
82556 >::type type;
82557 };
82558
82559 template<class A, class B>
82560 struct rightshift_type {
82561 private:
82562 typedef typename boost::remove_reference<A>::type plainA;
82563 public:
82564 typedef typename detail::IF_type<
82565 is_instance_of_2<plainA, std::basic_istream>::value,
82566 get_istream_type<plainA>,
82567 detail::remove_reference_and_cv<A>
82568 >::type type;
82569 };
82570
82571
82572
82573
82574 }
82575
82576
82577 template<class A, class B>
82578 struct return_type_2<bitwise_action<leftshift_action>, A, B>
82579 {
82580 typedef typename detail::remove_reference_and_cv<A>::type plain_A;
82581 typedef typename detail::remove_reference_and_cv<B>::type plain_B;
82582
82583 typedef typename
82584 plain_return_type_2<bitwise_action<leftshift_action>, plain_A, plain_B>::type type1;
82585
82586
82587 typedef typename
82588 detail::IF_type<
82589 boost::is_same<type1, detail::unspecified>::value,
82590 detail::leftshift_type<A, B>,
82591 plain_return_type_2<bitwise_action<leftshift_action>, plain_A, plain_B>
82592 >::type type;
82593 };
82594
82595
82596 template<class A, class B>
82597 struct return_type_2<bitwise_action<rightshift_action>, A, B>
82598 {
82599 typedef typename detail::remove_reference_and_cv<A>::type plain_A;
82600 typedef typename detail::remove_reference_and_cv<B>::type plain_B;
82601
82602 typedef typename
82603 plain_return_type_2<bitwise_action<rightshift_action>, plain_A, plain_B>::type type1;
82604
82605
82606 typedef typename
82607 detail::IF_type<
82608 boost::is_same<type1, detail::unspecified>::value,
82609 detail::rightshift_type<A, B>,
82610 plain_return_type_2<bitwise_action<rightshift_action>, plain_A, plain_B>
82611 >::type type;
82612 };
82613
82614
82615
82616
82617 template<class A, class B, class Act>
82618 struct plain_return_type_2<logical_action<Act>, A, B> {
82619 typedef bool type;
82620 };
82621
82622 template<class A, class B, class Act>
82623 struct return_type_2<logical_action<Act>, A, B> {
82624
82625 typedef typename detail::remove_reference_and_cv<A>::type plain_A;
82626 typedef typename detail::remove_reference_and_cv<B>::type plain_B;
82627
82628 typedef typename
82629 plain_return_type_2<logical_action<Act>, plain_A, plain_B>::type type;
82630
82631 };
82632
82633
82634
82635
82636
82637 template<class A, class B, class Act>
82638 struct plain_return_type_2<relational_action<Act>, A, B> {
82639 typedef bool type;
82640 };
82641
82642 template<class A, class B, class Act>
82643 struct return_type_2<relational_action<Act>, A, B> {
82644
82645 typedef typename detail::remove_reference_and_cv<A>::type plain_A;
82646 typedef typename detail::remove_reference_and_cv<B>::type plain_B;
82647
82648 typedef typename
82649 plain_return_type_2<relational_action<Act>, plain_A, plain_B>::type type;
82650 };
82651 # 715 "/usr/include/boost/lambda/detail/operator_return_type_traits.hpp" 3 4
82652 template<class A, class B, class Act>
82653 struct return_type_2<arithmetic_assignment_action<Act>, A, B> {
82654
82655 typedef typename detail::remove_reference_and_cv<A>::type plain_A;
82656 typedef typename detail::remove_reference_and_cv<B>::type plain_B;
82657
82658 typedef typename
82659 plain_return_type_2<
82660 arithmetic_assignment_action<Act>, plain_A, plain_B
82661 >::type type1;
82662
82663 typedef typename
82664 detail::IF<
82665 boost::is_same<type1, detail::unspecified>::value,
82666 typename boost::add_reference<A>::type,
82667 type1
82668 >::RET type;
82669 };
82670
82671 template<class A, class B, class Act>
82672 struct return_type_2<bitwise_assignment_action<Act>, A, B> {
82673
82674 typedef typename detail::remove_reference_and_cv<A>::type plain_A;
82675 typedef typename detail::remove_reference_and_cv<B>::type plain_B;
82676
82677 typedef typename
82678 plain_return_type_2<
82679 bitwise_assignment_action<Act>, plain_A, plain_B
82680 >::type type1;
82681
82682 typedef typename
82683 detail::IF<
82684 boost::is_same<type1, detail::unspecified>::value,
82685 typename boost::add_reference<A>::type,
82686 type1
82687 >::RET type;
82688 };
82689
82690 template<class A, class B>
82691 struct return_type_2<other_action<assignment_action>, A, B> {
82692 typedef typename detail::remove_reference_and_cv<A>::type plain_A;
82693 typedef typename detail::remove_reference_and_cv<B>::type plain_B;
82694
82695 typedef typename
82696 plain_return_type_2<
82697 other_action<assignment_action>, plain_A, plain_B
82698 >::type type1;
82699
82700 typedef typename
82701 detail::IF<
82702 boost::is_same<type1, detail::unspecified>::value,
82703 typename boost::add_reference<A>::type,
82704 type1
82705 >::RET type;
82706 };
82707 # 781 "/usr/include/boost/lambda/detail/operator_return_type_traits.hpp" 3 4
82708 template<class A, class B>
82709 struct return_type_2<other_action<comma_action>, A, B> {
82710
82711 typedef typename detail::remove_reference_and_cv<A>::type plain_A;
82712 typedef typename detail::remove_reference_and_cv<B>::type plain_B;
82713
82714 typedef typename
82715 plain_return_type_2<
82716 other_action<comma_action>, plain_A, plain_B
82717 >::type type;
82718 };
82719
82720
82721
82722
82723 namespace detail {
82724
82725 template <class A, class B> struct subscript_type {
82726 typedef detail::unspecified type;
82727 };
82728
82729 template <class A, class B> struct subscript_type<A*, B> {
82730 typedef A& type;
82731 };
82732 template <class A, class B> struct subscript_type<A* const, B> {
82733 typedef A& type;
82734 };
82735 template <class A, class B> struct subscript_type<A* volatile, B> {
82736 typedef A& type;
82737 };
82738 template <class A, class B> struct subscript_type<A* const volatile, B> {
82739 typedef A& type;
82740 };
82741
82742
82743 template<class A, class B, int N> struct subscript_type<A[N], B> {
82744 typedef A& type;
82745 };
82746
82747
82748 template<class A, class B, int N> struct subscript_type<const A[N], B> {
82749 typedef const A& type;
82750 };
82751 template<class A, class B, int N> struct subscript_type<volatile A[N], B> {
82752 typedef volatile A& type;
82753 };
82754 template<class A, class B, int N> struct subscript_type<const volatile A[N], B> {
82755 typedef const volatile A& type;
82756 };
82757
82758 }
82759
82760 template<class A, class B>
82761 struct return_type_2<other_action<subscript_action>, A, B> {
82762
82763 typedef typename detail::remove_reference_and_cv<A>::type plain_A;
82764 typedef typename detail::remove_reference_and_cv<B>::type plain_B;
82765
82766 typedef typename boost::remove_reference<A>::type nonref_A;
82767 typedef typename boost::remove_reference<B>::type nonref_B;
82768
82769 typedef typename
82770 plain_return_type_2<
82771 other_action<subscript_action>, plain_A, plain_B
82772 >::type type1;
82773
82774 typedef typename
82775 detail::IF_type<
82776 boost::is_same<type1, detail::unspecified>::value,
82777 detail::subscript_type<nonref_A, nonref_B>,
82778 plain_return_type_2<other_action<subscript_action>, plain_A, plain_B>
82779 >::type type;
82780
82781 };
82782
82783
82784 }
82785 }
82786 # 874 "/usr/include/boost/lambda/detail/operator_return_type_traits.hpp" 3 4
82787 namespace std {
82788 template <class T, class Allocator> class deque;
82789 }
82790
82791
82792
82793 namespace std {
82794 template <class Char, class Traits, class Allocator> class basic_string;
82795 template <class T, class Allocator> class vector;
82796 template <class Key, class T, class Cmp, class Allocator> class map;
82797 template <class Key, class T, class Cmp, class Allocator> class multimap;
82798 }
82799
82800
82801
82802
82803
82804 namespace boost {
82805 namespace lambda {
82806
82807 template<class Key, class T, class Cmp, class Allocator, class B>
82808 struct plain_return_type_2<other_action<subscript_action>, std::map<Key, T, Cmp, Allocator>, B> {
82809 typedef T& type;
82810
82811 };
82812
82813 template<class Key, class T, class Cmp, class Allocator, class B>
82814 struct plain_return_type_2<other_action<subscript_action>, std::multimap<Key, T, Cmp, Allocator>, B> {
82815 typedef T& type;
82816
82817 };
82818
82819
82820 template<class T, class Allocator, class B>
82821 struct plain_return_type_2<other_action<subscript_action>, std::deque<T, Allocator>, B> {
82822 typedef typename std::deque<T, Allocator>::reference type;
82823 };
82824 template<class T, class Allocator, class B>
82825 struct plain_return_type_2<other_action<subscript_action>, const std::deque<T, Allocator>, B> {
82826 typedef typename std::deque<T, Allocator>::const_reference type;
82827 };
82828
82829
82830 template<class T, class Allocator, class B>
82831 struct plain_return_type_2<other_action<subscript_action>, std::vector<T, Allocator>, B> {
82832 typedef typename std::vector<T, Allocator>::reference type;
82833 };
82834 template<class T, class Allocator, class B>
82835 struct plain_return_type_2<other_action<subscript_action>, const std::vector<T, Allocator>, B> {
82836 typedef typename std::vector<T, Allocator>::const_reference type;
82837 };
82838
82839
82840 template<class Char, class Traits, class Allocator, class B>
82841 struct plain_return_type_2<other_action<subscript_action>, std::basic_string<Char, Traits, Allocator>, B> {
82842 typedef typename std::basic_string<Char, Traits, Allocator>::reference type;
82843 };
82844 template<class Char, class Traits, class Allocator, class B>
82845 struct plain_return_type_2<other_action<subscript_action>, const std::basic_string<Char, Traits, Allocator>, B> {
82846 typedef typename std::basic_string<Char, Traits, Allocator>::const_reference type;
82847 };
82848
82849
82850 }
82851 }
82852 # 24 "/usr/include/boost/lambda/lambda.hpp" 2 3 4
82853
82854
82855 # 1 "/usr/include/boost/lambda/detail/operators.hpp" 1 3 4
82856 # 18 "/usr/include/boost/lambda/detail/operators.hpp" 3 4
82857 namespace boost {
82858 namespace lambda {
82859 # 109 "/usr/include/boost/lambda/detail/operators.hpp" 3 4
82860 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< arithmetic_action<plus_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > > operator+ (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< arithmetic_action<plus_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< arithmetic_action<plus_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > > operator+ (const A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< arithmetic_action<plus_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > (tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< arithmetic_action<plus_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator+ (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< arithmetic_action<plus_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82861 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< arithmetic_action<minus_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > > operator- (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< arithmetic_action<minus_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< arithmetic_action<minus_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > > operator- (const A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< arithmetic_action<minus_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > (tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< arithmetic_action<minus_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator- (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< arithmetic_action<minus_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82862 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< arithmetic_action<multiply_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > > operator* (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< arithmetic_action<multiply_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< arithmetic_action<multiply_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > > operator* (const A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< arithmetic_action<multiply_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > (tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< arithmetic_action<multiply_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator* (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< arithmetic_action<multiply_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82863 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< arithmetic_action<divide_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > > operator/ (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< arithmetic_action<divide_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< arithmetic_action<divide_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > > operator/ (const A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< arithmetic_action<divide_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > (tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< arithmetic_action<divide_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator/ (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< arithmetic_action<divide_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82864 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< arithmetic_action<remainder_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > > operator% (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< arithmetic_action<remainder_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< arithmetic_action<remainder_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > > operator% (const A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< arithmetic_action<remainder_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > (tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< arithmetic_action<remainder_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator% (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< arithmetic_action<remainder_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82865 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< bitwise_action<leftshift_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > > operator<< (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< bitwise_action<leftshift_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< bitwise_action<leftshift_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > > operator<< (const A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< bitwise_action<leftshift_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > (tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< bitwise_action<leftshift_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator<< (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< bitwise_action<leftshift_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82866 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< bitwise_action<rightshift_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > > operator>> (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< bitwise_action<rightshift_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< bitwise_action<rightshift_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > > operator>> (const A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< bitwise_action<rightshift_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > (tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< bitwise_action<rightshift_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator>> (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< bitwise_action<rightshift_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82867 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< bitwise_action<and_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > > operator& (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< bitwise_action<and_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< bitwise_action<and_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > > operator& (const A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< bitwise_action<and_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > (tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< bitwise_action<and_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator& (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< bitwise_action<and_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82868 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< bitwise_action<or_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > > operator| (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< bitwise_action<or_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< bitwise_action<or_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > > operator| (const A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< bitwise_action<or_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > (tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< bitwise_action<or_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator| (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< bitwise_action<or_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82869 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< bitwise_action<xor_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > > operator^ (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< bitwise_action<xor_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< bitwise_action<xor_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > > operator^ (const A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< bitwise_action<xor_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > (tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< bitwise_action<xor_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator^ (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< bitwise_action<xor_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82870 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< logical_action<and_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > > operator&& (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< logical_action<and_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< logical_action<and_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > > operator&& (const A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< logical_action<and_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > (tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< logical_action<and_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator&& (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< logical_action<and_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82871 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< logical_action<or_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > > operator|| (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< logical_action<or_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< logical_action<or_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > > operator|| (const A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< logical_action<or_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > (tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< logical_action<or_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator|| (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< logical_action<or_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82872 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< relational_action<less_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > > operator< (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< relational_action<less_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< relational_action<less_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > > operator< (const A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< relational_action<less_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > (tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< relational_action<less_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator< (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< relational_action<less_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82873 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< relational_action<greater_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > > operator> (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< relational_action<greater_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< relational_action<greater_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > > operator> (const A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< relational_action<greater_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > (tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< relational_action<greater_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator> (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< relational_action<greater_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82874 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< relational_action<lessorequal_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > > operator<= (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< relational_action<lessorequal_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< relational_action<lessorequal_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > > operator<= (const A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< relational_action<lessorequal_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > (tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< relational_action<lessorequal_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator<= (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< relational_action<lessorequal_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82875 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< relational_action<greaterorequal_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > > operator>= (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< relational_action<greaterorequal_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< relational_action<greaterorequal_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > > operator>= (const A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< relational_action<greaterorequal_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > (tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< relational_action<greaterorequal_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator>= (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< relational_action<greaterorequal_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82876 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< relational_action<equal_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > > operator== (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< relational_action<equal_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< relational_action<equal_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > > operator== (const A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< relational_action<equal_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > (tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< relational_action<equal_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator== (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< relational_action<equal_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82877 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< relational_action<notequal_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > > operator!= (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< relational_action<notequal_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< relational_action<notequal_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > > operator!= (const A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< relational_action<notequal_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > (tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< relational_action<notequal_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator!= (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< relational_action<notequal_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82878
82879 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action<plus_action>, tuple<lambda_functor<Arg>, typename reference_argument <const B>::type> > > operator+= (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< arithmetic_assignment_action<plus_action>, tuple<lambda_functor<Arg>, typename reference_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename reference_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action<plus_action>, tuple<typename reference_argument <A>::type, lambda_functor<Arg> > > > operator+= (A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< arithmetic_assignment_action<plus_action>, tuple<typename reference_argument <A>::type, lambda_functor<Arg> > > (tuple<typename reference_argument <A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action<plus_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator+= (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< arithmetic_assignment_action<plus_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82880 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action<minus_action>, tuple<lambda_functor<Arg>, typename reference_argument <const B>::type> > > operator-= (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< arithmetic_assignment_action<minus_action>, tuple<lambda_functor<Arg>, typename reference_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename reference_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action<minus_action>, tuple<typename reference_argument <A>::type, lambda_functor<Arg> > > > operator-= (A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< arithmetic_assignment_action<minus_action>, tuple<typename reference_argument <A>::type, lambda_functor<Arg> > > (tuple<typename reference_argument <A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action<minus_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator-= (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< arithmetic_assignment_action<minus_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82881 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action<multiply_action>, tuple<lambda_functor<Arg>, typename reference_argument <const B>::type> > > operator*= (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< arithmetic_assignment_action<multiply_action>, tuple<lambda_functor<Arg>, typename reference_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename reference_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action<multiply_action>, tuple<typename reference_argument <A>::type, lambda_functor<Arg> > > > operator*= (A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< arithmetic_assignment_action<multiply_action>, tuple<typename reference_argument <A>::type, lambda_functor<Arg> > > (tuple<typename reference_argument <A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action<multiply_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator*= (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< arithmetic_assignment_action<multiply_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82882 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action<divide_action>, tuple<lambda_functor<Arg>, typename reference_argument <const B>::type> > > operator/= (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< arithmetic_assignment_action<divide_action>, tuple<lambda_functor<Arg>, typename reference_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename reference_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action<divide_action>, tuple<typename reference_argument <A>::type, lambda_functor<Arg> > > > operator/= (A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< arithmetic_assignment_action<divide_action>, tuple<typename reference_argument <A>::type, lambda_functor<Arg> > > (tuple<typename reference_argument <A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action<divide_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator/= (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< arithmetic_assignment_action<divide_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82883 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action<remainder_action>, tuple<lambda_functor<Arg>, typename reference_argument <const B>::type> > > operator%= (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< arithmetic_assignment_action<remainder_action>, tuple<lambda_functor<Arg>, typename reference_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename reference_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action<remainder_action>, tuple<typename reference_argument <A>::type, lambda_functor<Arg> > > > operator%= (A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< arithmetic_assignment_action<remainder_action>, tuple<typename reference_argument <A>::type, lambda_functor<Arg> > > (tuple<typename reference_argument <A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action<remainder_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator%= (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< arithmetic_assignment_action<remainder_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82884 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< bitwise_assignment_action<leftshift_action>, tuple<lambda_functor<Arg>, typename reference_argument <const B>::type> > > operator<<= (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< bitwise_assignment_action<leftshift_action>, tuple<lambda_functor<Arg>, typename reference_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename reference_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< bitwise_assignment_action<leftshift_action>, tuple<typename reference_argument <A>::type, lambda_functor<Arg> > > > operator<<= (A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< bitwise_assignment_action<leftshift_action>, tuple<typename reference_argument <A>::type, lambda_functor<Arg> > > (tuple<typename reference_argument <A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< bitwise_assignment_action<leftshift_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator<<= (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< bitwise_assignment_action<leftshift_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82885 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< bitwise_assignment_action<rightshift_action>, tuple<lambda_functor<Arg>, typename reference_argument <const B>::type> > > operator>>= (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< bitwise_assignment_action<rightshift_action>, tuple<lambda_functor<Arg>, typename reference_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename reference_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< bitwise_assignment_action<rightshift_action>, tuple<typename reference_argument <A>::type, lambda_functor<Arg> > > > operator>>= (A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< bitwise_assignment_action<rightshift_action>, tuple<typename reference_argument <A>::type, lambda_functor<Arg> > > (tuple<typename reference_argument <A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< bitwise_assignment_action<rightshift_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator>>= (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< bitwise_assignment_action<rightshift_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82886 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< bitwise_assignment_action<and_action>, tuple<lambda_functor<Arg>, typename reference_argument <const B>::type> > > operator&= (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< bitwise_assignment_action<and_action>, tuple<lambda_functor<Arg>, typename reference_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename reference_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< bitwise_assignment_action<and_action>, tuple<typename reference_argument <A>::type, lambda_functor<Arg> > > > operator&= (A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< bitwise_assignment_action<and_action>, tuple<typename reference_argument <A>::type, lambda_functor<Arg> > > (tuple<typename reference_argument <A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< bitwise_assignment_action<and_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator&= (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< bitwise_assignment_action<and_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82887 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< bitwise_assignment_action<or_action>, tuple<lambda_functor<Arg>, typename reference_argument <const B>::type> > > operator|= (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< bitwise_assignment_action<or_action>, tuple<lambda_functor<Arg>, typename reference_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename reference_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< bitwise_assignment_action<or_action>, tuple<typename reference_argument <A>::type, lambda_functor<Arg> > > > operator|= (A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< bitwise_assignment_action<or_action>, tuple<typename reference_argument <A>::type, lambda_functor<Arg> > > (tuple<typename reference_argument <A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< bitwise_assignment_action<or_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator|= (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< bitwise_assignment_action<or_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82888 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< bitwise_assignment_action<xor_action>, tuple<lambda_functor<Arg>, typename reference_argument <const B>::type> > > operator^= (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< bitwise_assignment_action<xor_action>, tuple<lambda_functor<Arg>, typename reference_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename reference_argument <const B>::type>(a, b)); } template<class A, class Arg> inline const lambda_functor< lambda_functor_base< bitwise_assignment_action<xor_action>, tuple<typename reference_argument <A>::type, lambda_functor<Arg> > > > operator^= (A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< bitwise_assignment_action<xor_action>, tuple<typename reference_argument <A>::type, lambda_functor<Arg> > > (tuple<typename reference_argument <A>::type, lambda_functor<Arg> >(a, b)); } template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< bitwise_assignment_action<xor_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator^= (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< bitwise_assignment_action<xor_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82889 # 147 "/usr/include/boost/lambda/detail/operators.hpp" 3 4
82890 template<class Arg, class B> inline const lambda_functor< lambda_functor_base< other_action<comma_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > > operator, (const lambda_functor<Arg>& a, const B& b) { return lambda_functor_base< other_action<comma_action>, tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type> > (tuple<lambda_functor<Arg>, typename const_copy_argument <const B>::type>(a, b)); }
82891 template<class A, class Arg> inline const lambda_functor< lambda_functor_base< other_action<comma_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > > operator, (const A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< other_action<comma_action>, tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> > > (tuple<typename const_copy_argument <const A>::type, lambda_functor<Arg> >(a, b)); }
82892 template<class ArgA, class ArgB> inline const lambda_functor< lambda_functor_base< other_action<comma_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > > operator, (const lambda_functor<ArgA>& a, const lambda_functor<ArgB>& b) { return lambda_functor_base< other_action<comma_action>, tuple<lambda_functor<ArgA>, lambda_functor<ArgB> > > (tuple<lambda_functor<ArgA>, lambda_functor<ArgB> >(a, b)); }
82893
82894
82895
82896 namespace detail {
82897 # 182 "/usr/include/boost/lambda/detail/operators.hpp" 3 4
82898 template<class T> struct convert_ostream_to_ref_others_to_c_plain_by_default {
82899 typedef typename detail::IF<
82900 is_instance_of_2<
82901 T, std::basic_ostream
82902 >::value,
82903 T&,
82904 typename const_copy_argument <T>::type
82905 >::RET type;
82906 };
82907
82908 template<class T> struct convert_istream_to_ref_others_to_c_plain_by_default {
82909 typedef typename detail::IF<
82910 is_instance_of_2<
82911 T, std::basic_istream
82912 >::value,
82913 T&,
82914 typename const_copy_argument <T>::type
82915 >::RET type;
82916 };
82917
82918
82919 }
82920
82921 template<class A, class Arg> inline const lambda_functor< lambda_functor_base< bitwise_action< leftshift_action>, tuple<typename detail::convert_ostream_to_ref_others_to_c_plain_by_default <A>::type, lambda_functor<Arg> > > > operator<< (A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< bitwise_action< leftshift_action>, tuple<typename detail::convert_ostream_to_ref_others_to_c_plain_by_default <A>::type, lambda_functor<Arg> > > (tuple<typename detail::convert_ostream_to_ref_others_to_c_plain_by_default <A>::type, lambda_functor<Arg> >(a, b)); }
82922 template<class A, class Arg> inline const lambda_functor< lambda_functor_base< bitwise_action< rightshift_action>, tuple<typename detail::convert_istream_to_ref_others_to_c_plain_by_default <A>::type, lambda_functor<Arg> > > > operator>> (A& a, const lambda_functor<Arg>& b) { return lambda_functor_base< bitwise_action< rightshift_action>, tuple<typename detail::convert_istream_to_ref_others_to_c_plain_by_default <A>::type, lambda_functor<Arg> > > (tuple<typename detail::convert_istream_to_ref_others_to_c_plain_by_default <A>::type, lambda_functor<Arg> >(a, b)); }
82923
82924
82925
82926
82927
82928
82929
82930 template<class Arg, class Ret, class ManipArg>
82931 inline const
82932 lambda_functor<
82933 lambda_functor_base<
82934 bitwise_action<leftshift_action>,
82935 tuple<lambda_functor<Arg>, Ret(&)(ManipArg)>
82936 >
82937 >
82938 operator<<(const lambda_functor<Arg>& a, Ret(&b)(ManipArg))
82939 {
82940 return
82941 lambda_functor_base<
82942 bitwise_action<leftshift_action>,
82943 tuple<lambda_functor<Arg>, Ret(&)(ManipArg)>
82944 >
82945 ( tuple<lambda_functor<Arg>, Ret(&)(ManipArg)>(a, b) );
82946 }
82947
82948 template<class Arg, class Ret, class ManipArg>
82949 inline const
82950 lambda_functor<
82951 lambda_functor_base<
82952 bitwise_action<rightshift_action>,
82953 tuple<lambda_functor<Arg>, Ret(&)(ManipArg)>
82954 >
82955 >
82956 operator>>(const lambda_functor<Arg>& a, Ret(&b)(ManipArg))
82957 {
82958 return
82959 lambda_functor_base<
82960 bitwise_action<rightshift_action>,
82961 tuple<lambda_functor<Arg>, Ret(&)(ManipArg)>
82962 >
82963 ( tuple<lambda_functor<Arg>, Ret(&)(ManipArg)>(a, b) );
82964 }
82965 # 293 "/usr/include/boost/lambda/detail/operators.hpp" 3 4
82966 template<class Arg, int N, class B> inline const lambda_functor< lambda_functor_base<arithmetic_action<plus_action>, tuple<lambda_functor<Arg>, B(&)[N]> > > operator+ (const lambda_functor<Arg>& a, B(&b)[N]) { return lambda_functor< lambda_functor_base<arithmetic_action<plus_action>, tuple<lambda_functor<Arg>, B(&)[N]> > >(tuple<lambda_functor<Arg>, B(&)[N]>(a, b)); }
82967 template<int N, class A, class Arg> inline const lambda_functor< lambda_functor_base<arithmetic_action<plus_action>, tuple<A(&)[N], lambda_functor<Arg> > > > operator+ (A(&a)[N], const lambda_functor<Arg>& b) { return lambda_functor_base<arithmetic_action<plus_action>, tuple<A(&)[N], lambda_functor<Arg> > > (tuple<A(&)[N], lambda_functor<Arg> >(a, b)); }
82968 template<class Arg, int N, class B> inline const lambda_functor< lambda_functor_base<arithmetic_action<plus_action>, tuple<lambda_functor<Arg>, const B(&)[N]> > > operator+ (const lambda_functor<Arg>& a, const B(&b)[N]) { return lambda_functor< lambda_functor_base<arithmetic_action<plus_action>, tuple<lambda_functor<Arg>, const B(&)[N]> > >(tuple<lambda_functor<Arg>, const B(&)[N]>(a, b)); }
82969 template<int N, class A, class Arg> inline const lambda_functor< lambda_functor_base<arithmetic_action<plus_action>, tuple<const A(&)[N], lambda_functor<Arg> > > > operator+ (const A(&a)[N], const lambda_functor<Arg>& b) { return lambda_functor_base<arithmetic_action<plus_action>, tuple<const A(&)[N], lambda_functor<Arg> > > (tuple<const A(&)[N], lambda_functor<Arg> >(a, b)); }
82970
82971
82972
82973
82974
82975 template<int N, class A, class Arg> inline const lambda_functor< lambda_functor_base<arithmetic_action<minus_action>, tuple<A(&)[N], lambda_functor<Arg> > > > operator- (A(&a)[N], const lambda_functor<Arg>& b) { return lambda_functor_base<arithmetic_action<minus_action>, tuple<A(&)[N], lambda_functor<Arg> > > (tuple<A(&)[N], lambda_functor<Arg> >(a, b)); }
82976 template<int N, class A, class Arg> inline const lambda_functor< lambda_functor_base<arithmetic_action<minus_action>, tuple<const A(&)[N], lambda_functor<Arg> > > > operator- (const A(&a)[N], const lambda_functor<Arg>& b) { return lambda_functor_base<arithmetic_action<minus_action>, tuple<const A(&)[N], lambda_functor<Arg> > > (tuple<const A(&)[N], lambda_functor<Arg> >(a, b)); }
82977 # 336 "/usr/include/boost/lambda/detail/operators.hpp" 3 4
82978 template<class Arg> inline const lambda_functor<lambda_functor_base<unary_arithmetic_action<plus_action>, tuple<lambda_functor<Arg> > > > operator+ (const lambda_functor<Arg>& a) { return lambda_functor_base<unary_arithmetic_action<plus_action>, tuple<lambda_functor<Arg> > > ( tuple<lambda_functor<Arg> >(a) ); }
82979 template<class Arg> inline const lambda_functor<lambda_functor_base<unary_arithmetic_action<minus_action>, tuple<lambda_functor<Arg> > > > operator- (const lambda_functor<Arg>& a) { return lambda_functor_base<unary_arithmetic_action<minus_action>, tuple<lambda_functor<Arg> > > ( tuple<lambda_functor<Arg> >(a) ); }
82980 template<class Arg> inline const lambda_functor<lambda_functor_base<bitwise_action<not_action>, tuple<lambda_functor<Arg> > > > operator~ (const lambda_functor<Arg>& a) { return lambda_functor_base<bitwise_action<not_action>, tuple<lambda_functor<Arg> > > ( tuple<lambda_functor<Arg> >(a) ); }
82981 template<class Arg> inline const lambda_functor<lambda_functor_base<logical_action<not_action>, tuple<lambda_functor<Arg> > > > operator! (const lambda_functor<Arg>& a) { return lambda_functor_base<logical_action<not_action>, tuple<lambda_functor<Arg> > > ( tuple<lambda_functor<Arg> >(a) ); }
82982 template<class Arg> inline const lambda_functor<lambda_functor_base<pre_increment_decrement_action<increment_action>, tuple<lambda_functor<Arg> > > > operator++ (const lambda_functor<Arg>& a) { return lambda_functor_base<pre_increment_decrement_action<increment_action>, tuple<lambda_functor<Arg> > > ( tuple<lambda_functor<Arg> >(a) ); }
82983 template<class Arg> inline const lambda_functor<lambda_functor_base<pre_increment_decrement_action<decrement_action>, tuple<lambda_functor<Arg> > > > operator-- (const lambda_functor<Arg>& a) { return lambda_functor_base<pre_increment_decrement_action<decrement_action>, tuple<lambda_functor<Arg> > > ( tuple<lambda_functor<Arg> >(a) ); }
82984 template<class Arg> inline const lambda_functor<lambda_functor_base<other_action<contentsof_action>, tuple<lambda_functor<Arg> > > > operator* (const lambda_functor<Arg>& a) { return lambda_functor_base<other_action<contentsof_action>, tuple<lambda_functor<Arg> > > ( tuple<lambda_functor<Arg> >(a) ); }
82985 template<class Arg> inline const lambda_functor<lambda_functor_base<other_action<addressof_action>, tuple<lambda_functor<Arg> > > > operator& (const lambda_functor<Arg>& a) { return lambda_functor_base<other_action<addressof_action>, tuple<lambda_functor<Arg> > > ( tuple<lambda_functor<Arg> >(a) ); }
82986 # 361 "/usr/include/boost/lambda/detail/operators.hpp" 3 4
82987 template<class Arg> inline const lambda_functor<lambda_functor_base<post_increment_decrement_action<increment_action>, tuple<lambda_functor<Arg> > > > operator++ (const lambda_functor<Arg>& a, int) { return lambda_functor_base<post_increment_decrement_action<increment_action>, tuple<lambda_functor<Arg> > > ( tuple<lambda_functor<Arg> >(a) ); }
82988 template<class Arg> inline const lambda_functor<lambda_functor_base<post_increment_decrement_action<decrement_action>, tuple<lambda_functor<Arg> > > > operator-- (const lambda_functor<Arg>& a, int) { return lambda_functor_base<post_increment_decrement_action<decrement_action>, tuple<lambda_functor<Arg> > > ( tuple<lambda_functor<Arg> >(a) ); }
82989
82990
82991
82992
82993 }
82994 }
82995 # 27 "/usr/include/boost/lambda/lambda.hpp" 2 3 4
82996
82997
82998
82999 # 1 "/usr/include/boost/lambda/detail/member_ptr.hpp" 1 3 4
83000 # 17 "/usr/include/boost/lambda/detail/member_ptr.hpp" 3 4
83001 namespace boost {
83002 namespace lambda {
83003
83004
83005 class member_pointer_action {};
83006
83007
83008 namespace detail {
83009
83010
83011
83012 template<class T>
83013 struct member_pointer {
83014 typedef typename boost::add_reference<T>::type type;
83015 typedef detail::unspecified class_type;
83016 typedef detail::unspecified qualified_class_type;
83017 static const bool is_data_member = false;
83018 static const bool is_function_member = false;
83019 };
83020
83021 template<class T, class U>
83022 struct member_pointer<T U::*> {
83023 typedef typename boost::add_reference<T>::type type;
83024 typedef U class_type;
83025 typedef U qualified_class_type;
83026 static const bool is_data_member = true;
83027 static const bool is_function_member = false;
83028 };
83029
83030 template<class T, class U>
83031 struct member_pointer<const T U::*> {
83032 typedef typename boost::add_reference<const T>::type type;
83033 typedef U class_type;
83034 typedef const U qualified_class_type;
83035 static const bool is_data_member = true;
83036 static const bool is_function_member = false;
83037 };
83038
83039 template<class T, class U>
83040 struct member_pointer<volatile T U::*> {
83041 typedef typename boost::add_reference<volatile T>::type type;
83042 typedef U class_type;
83043 typedef volatile U qualified_class_type;
83044 static const bool is_data_member = true;
83045 static const bool is_function_member = false;
83046 };
83047
83048 template<class T, class U>
83049 struct member_pointer<const volatile T U::*> {
83050 typedef typename boost::add_reference<const volatile T>::type type;
83051 typedef U class_type;
83052 typedef const volatile U qualified_class_type;
83053 static const bool is_data_member = true;
83054 static const bool is_function_member = false;
83055 };
83056
83057
83058 template<class T, class U>
83059 struct member_pointer<T (U::*)()> {
83060 typedef T type;
83061 typedef U class_type;
83062 typedef U qualified_class_type;
83063 static const bool is_data_member = false;
83064 static const bool is_function_member = true;
83065 };
83066 template<class T, class U, class A1>
83067 struct member_pointer<T (U::*)(A1)> {
83068 typedef T type;
83069 typedef U class_type;
83070 typedef U qualified_class_type;
83071 static const bool is_data_member = false;
83072 static const bool is_function_member = true;
83073 };
83074 template<class T, class U, class A1, class A2>
83075 struct member_pointer<T (U::*)(A1, A2)> {
83076 typedef T type;
83077 typedef U class_type;
83078 typedef U qualified_class_type;
83079 static const bool is_data_member = false;
83080 static const bool is_function_member = true;
83081 };
83082 template<class T, class U, class A1, class A2, class A3>
83083 struct member_pointer<T (U::*)(A1, A2, A3)> {
83084 typedef T type;
83085 typedef U class_type;
83086 typedef U qualified_class_type;
83087 static const bool is_data_member = false;
83088 static const bool is_function_member = true;
83089 };
83090 template<class T, class U, class A1, class A2, class A3, class A4>
83091 struct member_pointer<T (U::*)(A1, A2, A3, A4)> {
83092 typedef T type;
83093 typedef U class_type;
83094 typedef U qualified_class_type;
83095 static const bool is_data_member = false;
83096 static const bool is_function_member = true;
83097 };
83098 template<class T, class U, class A1, class A2, class A3, class A4, class A5>
83099 struct member_pointer<T (U::*)(A1, A2, A3, A4, A5)> {
83100 typedef T type;
83101 typedef U class_type;
83102 typedef U qualified_class_type;
83103 static const bool is_data_member = false;
83104 static const bool is_function_member = true;
83105 };
83106 template<class T, class U, class A1, class A2, class A3, class A4, class A5,
83107 class A6>
83108 struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6)> {
83109 typedef T type;
83110 typedef U class_type;
83111 typedef U qualified_class_type;
83112 static const bool is_data_member = false;
83113 static const bool is_function_member = true;
83114 };
83115 template<class T, class U, class A1, class A2, class A3, class A4, class A5,
83116 class A6, class A7>
83117 struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7)> {
83118 typedef T type;
83119 typedef U class_type;
83120 typedef U qualified_class_type;
83121 static const bool is_data_member = false;
83122 static const bool is_function_member = true;
83123 };
83124 template<class T, class U, class A1, class A2, class A3, class A4, class A5,
83125 class A6, class A7, class A8>
83126 struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7, A8)> {
83127 typedef T type;
83128 typedef U class_type;
83129 typedef U qualified_class_type;
83130 static const bool is_data_member = false;
83131 static const bool is_function_member = true;
83132 };
83133 template<class T, class U, class A1, class A2, class A3, class A4, class A5,
83134 class A6, class A7, class A8, class A9>
83135 struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7, A8, A9)> {
83136 typedef T type;
83137 typedef U class_type;
83138 typedef U qualified_class_type;
83139 static const bool is_data_member = false;
83140 static const bool is_function_member = true;
83141 };
83142
83143 template<class T, class U>
83144 struct member_pointer<T (U::*)() const> {
83145 typedef T type;
83146 typedef U class_type;
83147 typedef const U qualified_class_type;
83148 static const bool is_data_member = false;
83149 static const bool is_function_member = true;
83150 };
83151 template<class T, class U, class A1>
83152 struct member_pointer<T (U::*)(A1) const> {
83153 typedef T type;
83154 typedef U class_type;
83155 typedef const U qualified_class_type;
83156 static const bool is_data_member = false;
83157 static const bool is_function_member = true;
83158 };
83159 template<class T, class U, class A1, class A2>
83160 struct member_pointer<T (U::*)(A1, A2) const> {
83161 typedef T type;
83162 typedef U class_type;
83163 typedef const U qualified_class_type;
83164 static const bool is_data_member = false;
83165 static const bool is_function_member = true;
83166 };
83167 template<class T, class U, class A1, class A2, class A3>
83168 struct member_pointer<T (U::*)(A1, A2, A3) const> {
83169 typedef T type;
83170 typedef U class_type;
83171 typedef const U qualified_class_type;
83172 static const bool is_data_member = false;
83173 static const bool is_function_member = true;
83174 };
83175 template<class T, class U, class A1, class A2, class A3, class A4>
83176 struct member_pointer<T (U::*)(A1, A2, A3, A4) const> {
83177 typedef T type;
83178 typedef U class_type;
83179 typedef const U qualified_class_type;
83180 static const bool is_data_member = false;
83181 static const bool is_function_member = true;
83182 };
83183 template<class T, class U, class A1, class A2, class A3, class A4, class A5>
83184 struct member_pointer<T (U::*)(A1, A2, A3, A4, A5) const> {
83185 typedef T type;
83186 typedef U class_type;
83187 typedef const U qualified_class_type;
83188 static const bool is_data_member = false;
83189 static const bool is_function_member = true;
83190 };
83191 template<class T, class U, class A1, class A2, class A3, class A4, class A5,
83192 class A6>
83193 struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6) const> {
83194 typedef T type;
83195 typedef U class_type;
83196 typedef const U qualified_class_type;
83197 static const bool is_data_member = false;
83198 static const bool is_function_member = true;
83199 };
83200 template<class T, class U, class A1, class A2, class A3, class A4, class A5,
83201 class A6, class A7>
83202 struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7) const> {
83203 typedef T type;
83204 typedef U class_type;
83205 typedef const U qualified_class_type;
83206 static const bool is_data_member = false;
83207 static const bool is_function_member = true;
83208 };
83209 template<class T, class U, class A1, class A2, class A3, class A4, class A5,
83210 class A6, class A7, class A8>
83211 struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7, A8) const> {
83212 typedef T type;
83213 typedef U class_type;
83214 typedef const U qualified_class_type;
83215 static const bool is_data_member = false;
83216 static const bool is_function_member = true;
83217 };
83218 template<class T, class U, class A1, class A2, class A3, class A4, class A5,
83219 class A6, class A7, class A8, class A9>
83220 struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7, A8, A9) const> {
83221 typedef T type;
83222 typedef U class_type;
83223 typedef const U qualified_class_type;
83224 static const bool is_data_member = false;
83225 static const bool is_function_member = true;
83226 };
83227
83228 template<class T, class U>
83229 struct member_pointer<T (U::*)() volatile> {
83230 typedef T type;
83231 typedef U class_type;
83232 typedef volatile U qualified_class_type;
83233 static const bool is_data_member = false;
83234 static const bool is_function_member = true;
83235 };
83236 template<class T, class U, class A1>
83237 struct member_pointer<T (U::*)(A1) volatile> {
83238 typedef T type;
83239 typedef U class_type;
83240 typedef volatile U qualified_class_type;
83241 static const bool is_data_member = false;
83242 static const bool is_function_member = true;
83243 };
83244 template<class T, class U, class A1, class A2>
83245 struct member_pointer<T (U::*)(A1, A2) volatile> {
83246 typedef T type;
83247 typedef U class_type;
83248 typedef volatile U qualified_class_type;
83249 static const bool is_data_member = false;
83250 static const bool is_function_member = true;
83251 };
83252 template<class T, class U, class A1, class A2, class A3>
83253 struct member_pointer<T (U::*)(A1, A2, A3) volatile> {
83254 typedef T type;
83255 typedef U class_type;
83256 typedef volatile U qualified_class_type;
83257 static const bool is_data_member = false;
83258 static const bool is_function_member = true;
83259 };
83260 template<class T, class U, class A1, class A2, class A3, class A4>
83261 struct member_pointer<T (U::*)(A1, A2, A3, A4) volatile> {
83262 typedef T type;
83263 typedef U class_type;
83264 typedef volatile U qualified_class_type;
83265 static const bool is_data_member = false;
83266 static const bool is_function_member = true;
83267 };
83268 template<class T, class U, class A1, class A2, class A3, class A4, class A5>
83269 struct member_pointer<T (U::*)(A1, A2, A3, A4, A5) volatile> {
83270 typedef T type;
83271 typedef U class_type;
83272 typedef volatile U qualified_class_type;
83273 static const bool is_data_member = false;
83274 static const bool is_function_member = true;
83275 };
83276 template<class T, class U, class A1, class A2, class A3, class A4, class A5,
83277 class A6>
83278 struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6) volatile> {
83279 typedef T type;
83280 typedef U class_type;
83281 typedef volatile U qualified_class_type;
83282 static const bool is_data_member = false;
83283 static const bool is_function_member = true;
83284 };
83285 template<class T, class U, class A1, class A2, class A3, class A4, class A5,
83286 class A6, class A7>
83287 struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7) volatile> {
83288 typedef T type;
83289 typedef U class_type;
83290 typedef volatile U qualified_class_type;
83291 static const bool is_data_member = false;
83292 static const bool is_function_member = true;
83293 };
83294 template<class T, class U, class A1, class A2, class A3, class A4, class A5,
83295 class A6, class A7, class A8>
83296 struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7, A8) volatile> {
83297 typedef T type;
83298 typedef U class_type;
83299 typedef volatile U qualified_class_type;
83300 static const bool is_data_member = false;
83301 static const bool is_function_member = true;
83302 };
83303 template<class T, class U, class A1, class A2, class A3, class A4, class A5,
83304 class A6, class A7, class A8, class A9>
83305 struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7, A8, A9) volatile> {
83306 typedef T type;
83307 typedef U class_type;
83308 typedef volatile U qualified_class_type;
83309 static const bool is_data_member = false;
83310 static const bool is_function_member = true;
83311 };
83312
83313 template<class T, class U>
83314 struct member_pointer<T (U::*)() const volatile> {
83315 typedef T type;
83316 typedef U class_type;
83317 typedef const volatile U qualified_class_type;
83318 static const bool is_data_member = false;
83319 static const bool is_function_member = true;
83320 };
83321 template<class T, class U, class A1>
83322 struct member_pointer<T (U::*)(A1) const volatile> {
83323 typedef T type;
83324 typedef U class_type;
83325 typedef const volatile U qualified_class_type;
83326 static const bool is_data_member = false;
83327 static const bool is_function_member = true;
83328 };
83329 template<class T, class U, class A1, class A2>
83330 struct member_pointer<T (U::*)(A1, A2) const volatile> {
83331 typedef T type;
83332 typedef U class_type;
83333 typedef const volatile U qualified_class_type;
83334 static const bool is_data_member = false;
83335 static const bool is_function_member = true;
83336 };
83337 template<class T, class U, class A1, class A2, class A3>
83338 struct member_pointer<T (U::*)(A1, A2, A3) const volatile> {
83339 typedef T type;
83340 typedef U class_type;
83341 typedef const volatile U qualified_class_type;
83342 static const bool is_data_member = false;
83343 static const bool is_function_member = true;
83344 };
83345 template<class T, class U, class A1, class A2, class A3, class A4>
83346 struct member_pointer<T (U::*)(A1, A2, A3, A4) const volatile> {
83347 typedef T type;
83348 typedef U class_type;
83349 typedef const volatile U qualified_class_type;
83350 };
83351 template<class T, class U, class A1, class A2, class A3, class A4, class A5>
83352 struct member_pointer<T (U::*)(A1, A2, A3, A4, A5) const volatile> {
83353 typedef T type;
83354 typedef U class_type;
83355 typedef const volatile U qualified_class_type;
83356 static const bool is_data_member = false;
83357 static const bool is_function_member = true;
83358 };
83359 template<class T, class U, class A1, class A2, class A3, class A4, class A5,
83360 class A6>
83361 struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6) const volatile> {
83362 typedef T type;
83363 typedef U class_type;
83364 typedef const volatile U qualified_class_type;
83365 static const bool is_data_member = false;
83366 static const bool is_function_member = true;
83367 };
83368 template<class T, class U, class A1, class A2, class A3, class A4, class A5,
83369 class A6, class A7>
83370 struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7) const volatile> {
83371 typedef T type;
83372 typedef U class_type;
83373 typedef const volatile U qualified_class_type;
83374 static const bool is_data_member = false;
83375 static const bool is_function_member = true;
83376 };
83377 template<class T, class U, class A1, class A2, class A3, class A4, class A5,
83378 class A6, class A7, class A8>
83379 struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7, A8) const volatile> {
83380 typedef T type;
83381 typedef U class_type;
83382 typedef const volatile U qualified_class_type;
83383 static const bool is_data_member = false;
83384 static const bool is_function_member = true;
83385 };
83386 template<class T, class U, class A1, class A2, class A3, class A4, class A5,
83387 class A6, class A7, class A8, class A9>
83388 struct member_pointer<T (U::*)(A1, A2, A3, A4, A5, A6, A7, A8, A9) const volatile> {
83389 typedef T type;
83390 typedef U class_type;
83391 typedef const volatile U qualified_class_type;
83392 static const bool is_data_member = false;
83393 static const bool is_function_member = true;
83394 };
83395
83396 }
83397
83398 namespace detail {
83399 # 432 "/usr/include/boost/lambda/detail/member_ptr.hpp" 3 4
83400 template<class RET, class A, class B>
83401 class member_pointer_caller {
83402 A a; B b;
83403
83404 public:
83405 member_pointer_caller(const A& aa, const B& bb) : a(aa), b(bb) {}
83406
83407 RET operator()() const { return (a->*b)(); }
83408
83409 template<class A1>
83410 RET operator()(const A1& a1) const { return (a->*b)(a1); }
83411
83412 template<class A1, class A2>
83413 RET operator()(const A1& a1, const A2& a2) const { return (a->*b)(a1, a2); }
83414
83415 template<class A1, class A2, class A3>
83416 RET operator()(const A1& a1, const A2& a2, const A3& a3) const {
83417 return (a->*b)(a1, a2, a3);
83418 }
83419
83420 template<class A1, class A2, class A3, class A4>
83421 RET operator()(const A1& a1, const A2& a2, const A3& a3,
83422 const A4& a4) const {
83423 return (a->*b)(a1, a2, a3, a4);
83424 }
83425
83426 template<class A1, class A2, class A3, class A4, class A5>
83427 RET operator()(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
83428 const A5& a5) const {
83429 return (a->*b)(a1, a2, a3, a4, a5);
83430 }
83431
83432 template<class A1, class A2, class A3, class A4, class A5, class A6>
83433 RET operator()(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
83434 const A5& a5, const A6& a6) const {
83435 return (a->*b)(a1, a2, a3, a4, a5, a6);
83436 }
83437
83438 template<class A1, class A2, class A3, class A4, class A5, class A6,
83439 class A7>
83440 RET operator()(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
83441 const A5& a5, const A6& a6, const A7& a7) const {
83442 return (a->*b)(a1, a2, a3, a4, a5, a6, a7);
83443 }
83444
83445 template<class A1, class A2, class A3, class A4, class A5, class A6,
83446 class A7, class A8>
83447 RET operator()(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
83448 const A5& a5, const A6& a6, const A7& a7,
83449 const A8& a8) const {
83450 return (a->*b)(a1, a2, a3, a4, a5, a6, a7, a8);
83451 }
83452
83453 template<class A1, class A2, class A3, class A4, class A5, class A6,
83454 class A7, class A8, class A9>
83455 RET operator()(const A1& a1, const A2& a2, const A3& a3, const A4& a4,
83456 const A5& a5, const A6& a6, const A7& a7,
83457 const A8& a8, const A9& a9) const {
83458 return (a->*b)(a1, a2, a3, a4, a5, a6, a7, a8, a9);
83459 }
83460
83461 };
83462
83463
83464
83465
83466
83467 template <bool Is_data_member, bool Is_function_member>
83468 struct member_pointer_action_helper;
83469
83470
83471
83472
83473
83474 template <>
83475 struct member_pointer_action_helper<true, false> {
83476 public:
83477
83478 template<class RET, class A, class B>
83479 static RET apply(A& a, B& b) {
83480 return a->*b;
83481 }
83482
83483 template<class A, class B>
83484 struct return_type {
83485 private:
83486 typedef typename detail::remove_reference_and_cv<B>::type plainB;
83487
83488 typedef typename detail::member_pointer<plainB>::type type0;
83489
83490 typedef typename boost::remove_reference<type0>::type type1;
83491
83492
83493
83494 typedef typename
83495 detail::remove_reference_and_cv<A>::type non_ref_A;
83496
83497
83498 typedef typename ::boost::remove_pointer<non_ref_A>::type non_pointer_A;
83499
83500 public:
83501
83502
83503
83504
83505 typedef typename detail::IF<
83506 ::boost::is_const<non_pointer_A>::value,
83507 typename ::boost::add_const<type1>::type,
83508 type1
83509 >::RET type2;
83510 typedef typename detail::IF<
83511 ::boost::is_volatile<non_pointer_A>::value,
83512 typename ::boost::add_volatile<type2>::type,
83513 type2
83514 >::RET type3;
83515
83516 typedef typename ::boost::add_reference<type3>::type type;
83517 };
83518 };
83519
83520
83521 template <>
83522 struct member_pointer_action_helper<false, false> {
83523 public:
83524 template<class RET, class A, class B>
83525 static RET apply(A& a, B& b) {
83526
83527 return a->*b;
83528 }
83529
83530
83531
83532
83533 template<class A, class B>
83534 struct return_type {
83535
83536 typedef typename plain_return_type_2<
83537 other_action<member_pointer_action>, A, B
83538 >::type type;
83539 };
83540
83541 };
83542
83543
83544
83545
83546
83547
83548
83549 template <>
83550 struct member_pointer_action_helper<false, true> {
83551 public:
83552
83553 template<class RET, class A, class B>
83554 static RET apply(A& a, B& b) {
83555 typedef typename ::boost::remove_cv<B>::type plainB;
83556 typedef typename detail::member_pointer<plainB>::type ret_t;
83557 typedef typename ::boost::remove_cv<A>::type plainA;
83558
83559
83560
83561
83562
83563 return detail::member_pointer_caller<ret_t, plainA, plainB>(a, b);
83564 }
83565
83566 template<class A, class B>
83567 struct return_type {
83568 typedef typename detail::remove_reference_and_cv<B>::type plainB;
83569 typedef typename detail::member_pointer<plainB>::type ret_t;
83570 typedef typename detail::remove_reference_and_cv<A>::type plainA;
83571
83572 typedef detail::member_pointer_caller<ret_t, plainA, plainB> type;
83573 };
83574 };
83575
83576 }
83577
83578 template<> class other_action<member_pointer_action> {
83579 public:
83580 template<class RET, class A, class B>
83581 static RET apply(A& a, B& b) {
83582 typedef typename
83583 ::boost::remove_cv<B>::type plainB;
83584
83585 return detail::member_pointer_action_helper<
83586 boost::is_pointer<A>::value &&
83587 detail::member_pointer<plainB>::is_data_member,
83588 boost::is_pointer<A>::value &&
83589 detail::member_pointer<plainB>::is_function_member
83590 >::template apply<RET>(a, b);
83591 }
83592 };
83593 # 642 "/usr/include/boost/lambda/detail/member_ptr.hpp" 3 4
83594 template<class A, class B>
83595 struct return_type_2<other_action<member_pointer_action>, A, B> {
83596 private:
83597 typedef typename
83598 detail::remove_reference_and_cv<B>::type plainB;
83599 public:
83600 typedef typename
83601 detail::member_pointer_action_helper<
83602 detail::member_pointer<plainB>::is_data_member,
83603 detail::member_pointer<plainB>::is_function_member
83604 >::template return_type<A, B>::type type;
83605 };
83606
83607
83608
83609
83610 template<class Args>
83611 struct return_type_N<other_action<member_pointer_action>, Args> {
83612 typedef typename boost::tuples::element<0, Args>::type A;
83613 typedef typename boost::tuples::element<1, Args>::type B;
83614 typedef typename
83615 return_type_2<other_action<member_pointer_action>,
83616 typename boost::remove_reference<A>::type,
83617 typename boost::remove_reference<B>::type
83618 >::type type;
83619 };
83620
83621
83622 template<class Arg1, class Arg2>
83623 inline const
83624 lambda_functor<
83625 lambda_functor_base<
83626 action<2, other_action<member_pointer_action> >,
83627 tuple<lambda_functor<Arg1>, typename const_copy_argument<Arg2>::type>
83628 >
83629 >
83630 operator->*(const lambda_functor<Arg1>& a1, const Arg2& a2)
83631 {
83632 return
83633 lambda_functor_base<
83634 action<2, other_action<member_pointer_action> >,
83635 tuple<lambda_functor<Arg1>, typename const_copy_argument<Arg2>::type>
83636 >
83637 (tuple<lambda_functor<Arg1>,
83638 typename const_copy_argument<Arg2>::type>(a1, a2));
83639 }
83640
83641 template<class Arg1, class Arg2>
83642 inline const
83643 lambda_functor<
83644 lambda_functor_base<
83645 action<2, other_action<member_pointer_action> >,
83646 tuple<lambda_functor<Arg1>, lambda_functor<Arg2> >
83647 >
83648 >
83649 operator->*(const lambda_functor<Arg1>& a1, const lambda_functor<Arg2>& a2)
83650 {
83651 return
83652 lambda_functor_base<
83653 action<2, other_action<member_pointer_action> >,
83654 tuple<lambda_functor<Arg1>, lambda_functor<Arg2> >
83655 >
83656 (tuple<lambda_functor<Arg1>, lambda_functor<Arg2> >(a1, a2));
83657 }
83658
83659 template<class Arg1, class Arg2>
83660 inline const
83661 lambda_functor<
83662 lambda_functor_base<
83663 action<2, other_action<member_pointer_action> >,
83664 tuple<typename const_copy_argument<Arg1>::type, lambda_functor<Arg2> >
83665 >
83666 >
83667 operator->*(const Arg1& a1, const lambda_functor<Arg2>& a2)
83668 {
83669 return
83670 lambda_functor_base<
83671 action<2, other_action<member_pointer_action> >,
83672 tuple<typename const_copy_argument<Arg1>::type, lambda_functor<Arg2> >
83673 >
83674 (tuple<typename const_copy_argument<Arg1>::type,
83675 lambda_functor<Arg2> >(a1, a2));
83676 }
83677
83678
83679 }
83680 }
83681 # 31 "/usr/include/boost/lambda/lambda.hpp" 2 3 4
83682 # 28 "anneal.h" 2
83683 # 1 "/usr/include/boost/lambda/bind.hpp" 1 3 4
83684 # 17 "/usr/include/boost/lambda/bind.hpp" 3 4
83685 # 1 "/usr/include/boost/lambda/detail/bind_functions.hpp" 1 3 4
83686 # 17 "/usr/include/boost/lambda/detail/bind_functions.hpp" 3 4
83687 namespace boost {
83688 namespace lambda {
83689 # 40 "/usr/include/boost/lambda/detail/bind_functions.hpp" 3 4
83690 template <class Result>
83691 inline const
83692 lambda_functor<
83693 lambda_functor_base<
83694 action<1, function_action<1, Result> >,
83695 typename detail::bind_tuple_mapper<Result(&)()>::type
83696 >
83697 >
83698
83699 bind(Result(& a1)()) {
83700 return
83701 lambda_functor_base<
83702 action<1, function_action<1, Result> >,
83703 typename detail::bind_tuple_mapper<Result(&)()>::type
83704 >
83705 ( typename detail::bind_tuple_mapper<Result(&)()>::type
83706 (a1)
83707 );
83708 }
83709
83710
83711
83712 template <class Arg1>
83713 inline const
83714 lambda_functor<
83715 lambda_functor_base<
83716 action<1, function_action<1> >,
83717 typename detail::bind_tuple_mapper<const Arg1>::type
83718 >
83719 >
83720
83721 bind(const Arg1& a1) {
83722 return
83723 lambda_functor_base<
83724 action<1, function_action<1> >,
83725 typename detail::bind_tuple_mapper<const Arg1>::type
83726 >
83727 ( typename detail::bind_tuple_mapper<const Arg1>::type
83728 (a1)
83729 );
83730 }
83731
83732 template <class Result, class Arg1>
83733 inline const
83734 lambda_functor<
83735 lambda_functor_base<
83736 action<1, function_action<1, Result> >,
83737 typename detail::bind_tuple_mapper<const Arg1>::type
83738 >
83739 >
83740
83741 bind(const Arg1& a1) {
83742 return
83743 lambda_functor_base<
83744 action<1, function_action<1, Result> >,
83745 typename detail::bind_tuple_mapper<const Arg1>::type
83746 >
83747 ( typename detail::bind_tuple_mapper<const Arg1>::type
83748 (a1)
83749 );
83750 }
83751 # 181 "/usr/include/boost/lambda/detail/bind_functions.hpp" 3 4
83752 template <class Result, class Par1, class Arg2>
83753 inline const
83754 lambda_functor<
83755 lambda_functor_base<
83756 action<2, function_action<2, Result> >,
83757 typename detail::bind_tuple_mapper<Result(&)(Par1), const Arg2>::type
83758 >
83759 >
83760
83761 bind(Result(&a1)(Par1), const Arg2& a2) {
83762 return
83763 lambda_functor_base<
83764 action<2, function_action<2, Result> >,
83765 typename detail::bind_tuple_mapper<Result(&)(Par1), const Arg2>::type
83766 >
83767 ( typename detail::bind_tuple_mapper<Result(&)(Par1), const Arg2>::type
83768 (a1, a2)
83769 );
83770 }
83771
83772
83773
83774 template <class Arg1, class Arg2>
83775 inline const
83776 lambda_functor<
83777 lambda_functor_base<
83778 action<2, function_action<2> >,
83779 typename detail::bind_tuple_mapper<const Arg1, const Arg2>::type
83780 >
83781 >
83782
83783 bind(const Arg1& a1, const Arg2& a2) {
83784 return
83785 lambda_functor_base<
83786 action<2, function_action<2> >,
83787 typename detail::bind_tuple_mapper<const Arg1, const Arg2>::type
83788 >
83789 ( typename detail::bind_tuple_mapper<const Arg1, const Arg2>::type
83790 (a1, a2)
83791 );
83792 }
83793
83794 template <class Result, class Arg1, class Arg2>
83795 inline const
83796 lambda_functor<
83797 lambda_functor_base<
83798 action<2, function_action<2, Result> >,
83799 typename detail::bind_tuple_mapper<const Arg1, const Arg2>::type
83800 >
83801 >
83802
83803 bind(const Arg1& a1, const Arg2& a2) {
83804 return
83805 lambda_functor_base<
83806 action<2, function_action<2, Result> >,
83807 typename detail::bind_tuple_mapper<const Arg1, const Arg2>::type
83808 >
83809 ( typename detail::bind_tuple_mapper<const Arg1, const Arg2>::type
83810 (a1, a2)
83811 );
83812 }
83813 # 322 "/usr/include/boost/lambda/detail/bind_functions.hpp" 3 4
83814 template <class Result, class Par1, class Par2, class Arg2, class Arg3>
83815 inline const
83816 lambda_functor<
83817 lambda_functor_base<
83818 action<3, function_action<3, Result> >,
83819 typename detail::bind_tuple_mapper<
83820 Result(&)(Par1, Par2), const Arg2, const Arg3
83821 >::type
83822 >
83823 >
83824
83825 bind(Result(&a1)(Par1, Par2), const Arg2& a2, const Arg3& a3) {
83826 return
83827 lambda_functor_base<
83828 action<3, function_action<3, Result> >,
83829 typename detail::bind_tuple_mapper<
83830 Result(&)(Par1, Par2), const Arg2, const Arg3
83831 >::type
83832 >
83833 ( typename detail::bind_tuple_mapper<
83834 Result(&)(Par1, Par2), const Arg2, const Arg3
83835 >::type
83836 (a1, a2, a3)
83837 );
83838 }
83839
83840
83841
83842 template <class Arg1, class Arg2, class Arg3>
83843 inline const
83844 lambda_functor<
83845 lambda_functor_base<
83846 action<3, function_action<3> >,
83847 typename detail::bind_tuple_mapper<
83848 const Arg1, const Arg2, const Arg3
83849 >::type
83850 >
83851 >
83852
83853 bind(const Arg1& a1, const Arg2& a2, const Arg3& a3) {
83854 return
83855 lambda_functor_base<
83856 action<3, function_action<3> >,
83857 typename detail::bind_tuple_mapper<
83858 const Arg1, const Arg2, const Arg3
83859 >::type
83860 >
83861 ( typename detail::bind_tuple_mapper<
83862 const Arg1, const Arg2, const Arg3
83863 >::type
83864 (a1, a2, a3)
83865 );
83866 }
83867
83868 template <class Result, class Arg1, class Arg2, class Arg3>
83869 inline const
83870 lambda_functor<
83871 lambda_functor_base<
83872 action<3, function_action<3, Result> >,
83873 typename detail::bind_tuple_mapper<
83874 const Arg1, const Arg2, const Arg3
83875 >::type
83876 >
83877 >
83878
83879 bind(const Arg1& a1, const Arg2& a2, const Arg3& a3) {
83880 return
83881 lambda_functor_base<
83882 action<3, function_action<3, Result> >,
83883 typename detail::bind_tuple_mapper<
83884 const Arg1, const Arg2, const Arg3
83885 >::type
83886 >
83887 ( typename detail::bind_tuple_mapper<
83888 const Arg1, const Arg2, const Arg3
83889 >::type
83890 (a1, a2, a3)
83891 );
83892 }
83893 # 491 "/usr/include/boost/lambda/detail/bind_functions.hpp" 3 4
83894 template <class Result, class Par1, class Par2, class Par3, class Arg2,
83895 class Arg3, class Arg4>
83896 inline const
83897 lambda_functor<
83898 lambda_functor_base<
83899 action<4, function_action<4, Result> >,
83900 typename detail::bind_tuple_mapper<
83901 Result(&)(Par1, Par2, Par3), const Arg2, const Arg3, const Arg4
83902 >::type
83903 >
83904 >
83905
83906 bind(Result(&a1)(Par1, Par2, Par3), const Arg2& a2, const Arg3& a3,
83907 const Arg4& a4) {
83908 return
83909 lambda_functor_base<
83910 action<4, function_action<4, Result> >,
83911 typename detail::bind_tuple_mapper<
83912 Result(&)(Par1, Par2, Par3), const Arg2, const Arg3, const Arg4
83913 >::type
83914 >
83915 ( typename detail::bind_tuple_mapper<
83916 Result(&)(Par1, Par2, Par3), const Arg2, const Arg3, const Arg4
83917 >::type
83918 (a1, a2, a3, a4)
83919 );
83920 }
83921
83922
83923
83924 template <class Arg1, class Arg2, class Arg3, class Arg4>
83925 inline const
83926 lambda_functor<
83927 lambda_functor_base<
83928 action<4, function_action<4> >,
83929 typename detail::bind_tuple_mapper<
83930 const Arg1, const Arg2, const Arg3, const Arg4
83931 >::type
83932 >
83933 >
83934
83935 bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4) {
83936 return
83937 lambda_functor_base<
83938 action<4, function_action<4> >,
83939 typename detail::bind_tuple_mapper<
83940 const Arg1, const Arg2, const Arg3, const Arg4
83941 >::type
83942 >
83943 ( typename detail::bind_tuple_mapper<
83944 const Arg1, const Arg2, const Arg3, const Arg4
83945 >::type
83946 (a1, a2, a3, a4)
83947 );
83948 }
83949
83950 template <class Result, class Arg1, class Arg2, class Arg3, class Arg4>
83951 inline const
83952 lambda_functor<
83953 lambda_functor_base<
83954 action<4, function_action<4, Result> >,
83955 typename detail::bind_tuple_mapper<
83956 const Arg1, const Arg2, const Arg3, const Arg4
83957 >::type
83958 >
83959 >
83960
83961 bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4) {
83962 return
83963 lambda_functor_base<
83964 action<4, function_action<4, Result> >,
83965 typename detail::bind_tuple_mapper<
83966 const Arg1, const Arg2, const Arg3, const Arg4
83967 >::type
83968 >
83969 ( typename detail::bind_tuple_mapper<
83970 const Arg1, const Arg2, const Arg3, const Arg4
83971 >::type
83972 (a1, a2, a3, a4)
83973 );
83974 }
83975 # 666 "/usr/include/boost/lambda/detail/bind_functions.hpp" 3 4
83976 template <class Result, class Par1, class Par2, class Par3, class Par4,
83977 class Arg2, class Arg3, class Arg4, class Arg5>
83978 inline const
83979 lambda_functor<
83980 lambda_functor_base<
83981 action<5, function_action<5, Result> >,
83982 typename detail::bind_tuple_mapper<
83983 Result(&)(Par1, Par2, Par3, Par4), const Arg2, const Arg3, const Arg4,
83984 const Arg5
83985 >::type
83986 >
83987 >
83988
83989 bind(Result(&a1)(Par1, Par2, Par3, Par4), const Arg2& a2, const Arg3& a3,
83990 const Arg4& a4, const Arg5& a5) {
83991 return
83992 lambda_functor_base<
83993 action<5, function_action<5, Result> >,
83994 typename detail::bind_tuple_mapper<
83995 Result(&)(Par1, Par2, Par3, Par4), const Arg2, const Arg3, const Arg4,
83996 const Arg5
83997 >::type
83998 >
83999 ( typename detail::bind_tuple_mapper<
84000 Result(&)(Par1, Par2, Par3, Par4), const Arg2, const Arg3, const Arg4,
84001 const Arg5
84002 >::type
84003 (a1, a2, a3, a4, a5)
84004 );
84005 }
84006
84007
84008
84009 template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5>
84010 inline const
84011 lambda_functor<
84012 lambda_functor_base<
84013 action<5, function_action<5> >,
84014 typename detail::bind_tuple_mapper<
84015 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5
84016 >::type
84017 >
84018 >
84019
84020 bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
84021 const Arg5& a5) {
84022 return
84023 lambda_functor_base<
84024 action<5, function_action<5> >,
84025 typename detail::bind_tuple_mapper<
84026 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5
84027 >::type
84028 >
84029 ( typename detail::bind_tuple_mapper<
84030 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5
84031 >::type
84032 (a1, a2, a3, a4, a5)
84033 );
84034 }
84035
84036 template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
84037 class Arg5>
84038 inline const
84039 lambda_functor<
84040 lambda_functor_base<
84041 action<5, function_action<5, Result> >,
84042 typename detail::bind_tuple_mapper<
84043 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5
84044 >::type
84045 >
84046 >
84047
84048 bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
84049 const Arg5& a5) {
84050 return
84051 lambda_functor_base<
84052 action<5, function_action<5, Result> >,
84053 typename detail::bind_tuple_mapper<
84054 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5
84055 >::type
84056 >
84057 ( typename detail::bind_tuple_mapper<
84058 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5
84059 >::type
84060 (a1, a2, a3, a4, a5)
84061 );
84062 }
84063 # 853 "/usr/include/boost/lambda/detail/bind_functions.hpp" 3 4
84064 template <class Result, class Par1, class Par2, class Par3, class Par4,
84065 class Par5, class Arg2, class Arg3, class Arg4, class Arg5,
84066 class Arg6>
84067 inline const
84068 lambda_functor<
84069 lambda_functor_base<
84070 action<6, function_action<6, Result> >,
84071 typename detail::bind_tuple_mapper<
84072 Result(&)(Par1, Par2, Par3, Par4, Par5), const Arg2, const Arg3,
84073 const Arg4, const Arg5, const Arg6
84074 >::type
84075 >
84076 >
84077
84078 bind(Result(&a1)(Par1, Par2, Par3, Par4, Par5), const Arg2& a2,
84079 const Arg3& a3, const Arg4& a4, const Arg5& a5, const Arg6& a6) {
84080 return
84081 lambda_functor_base<
84082 action<6, function_action<6, Result> >,
84083 typename detail::bind_tuple_mapper<
84084 Result(&)(Par1, Par2, Par3, Par4, Par5), const Arg2, const Arg3,
84085 const Arg4, const Arg5, const Arg6
84086 >::type
84087 >
84088 ( typename detail::bind_tuple_mapper<
84089 Result(&)(Par1, Par2, Par3, Par4, Par5), const Arg2, const Arg3,
84090 const Arg4, const Arg5, const Arg6
84091 >::type
84092 (a1, a2, a3, a4, a5, a6)
84093 );
84094 }
84095
84096
84097
84098 template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5,
84099 class Arg6>
84100 inline const
84101 lambda_functor<
84102 lambda_functor_base<
84103 action<6, function_action<6> >,
84104 typename detail::bind_tuple_mapper<
84105 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6
84106 >::type
84107 >
84108 >
84109
84110 bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
84111 const Arg5& a5, const Arg6& a6) {
84112 return
84113 lambda_functor_base<
84114 action<6, function_action<6> >,
84115 typename detail::bind_tuple_mapper<
84116 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6
84117 >::type
84118 >
84119 ( typename detail::bind_tuple_mapper<
84120 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6
84121 >::type
84122 (a1, a2, a3, a4, a5, a6)
84123 );
84124 }
84125
84126 template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
84127 class Arg5, class Arg6>
84128 inline const
84129 lambda_functor<
84130 lambda_functor_base<
84131 action<6, function_action<6, Result> >,
84132 typename detail::bind_tuple_mapper<
84133 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6
84134 >::type
84135 >
84136 >
84137
84138 bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
84139 const Arg5& a5, const Arg6& a6) {
84140 return
84141 lambda_functor_base<
84142 action<6, function_action<6, Result> >,
84143 typename detail::bind_tuple_mapper<
84144 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6
84145 >::type
84146 >
84147 ( typename detail::bind_tuple_mapper<
84148 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6
84149 >::type
84150 (a1, a2, a3, a4, a5, a6)
84151 );
84152 }
84153 # 1044 "/usr/include/boost/lambda/detail/bind_functions.hpp" 3 4
84154 template <class Result, class Par1, class Par2, class Par3, class Par4,
84155 class Par5, class Par6, class Arg2, class Arg3, class Arg4,
84156 class Arg5, class Arg6, class Arg7>
84157 inline const
84158 lambda_functor<
84159 lambda_functor_base<
84160 action<7, function_action<7, Result> >,
84161 typename detail::bind_tuple_mapper<
84162 Result(&)(Par1, Par2, Par3, Par4, Par5, Par6), const Arg2, const Arg3,
84163 const Arg4, const Arg5, const Arg6, const Arg7
84164 >::type
84165 >
84166 >
84167
84168 bind(Result(&a1)(Par1, Par2, Par3, Par4, Par5, Par6), const Arg2& a2,
84169 const Arg3& a3, const Arg4& a4, const Arg5& a5, const Arg6& a6,
84170 const Arg7& a7) {
84171 return
84172 lambda_functor_base<
84173 action<7, function_action<7, Result> >,
84174 typename detail::bind_tuple_mapper<
84175 Result(&)(Par1, Par2, Par3, Par4, Par5, Par6), const Arg2, const Arg3,
84176 const Arg4, const Arg5, const Arg6, const Arg7
84177 >::type
84178 >
84179 ( typename detail::bind_tuple_mapper<
84180 Result(&)(Par1, Par2, Par3, Par4, Par5, Par6), const Arg2, const Arg3,
84181 const Arg4, const Arg5, const Arg6, const Arg7
84182 >::type
84183 (a1, a2, a3, a4, a5, a6, a7)
84184 );
84185 }
84186
84187
84188
84189 template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5,
84190 class Arg6, class Arg7>
84191 inline const
84192 lambda_functor<
84193 lambda_functor_base<
84194 action<7, function_action<7> >,
84195 typename detail::bind_tuple_mapper<
84196 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
84197 const Arg7
84198 >::type
84199 >
84200 >
84201
84202 bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
84203 const Arg5& a5, const Arg6& a6, const Arg7& a7) {
84204 return
84205 lambda_functor_base<
84206 action<7, function_action<7> >,
84207 typename detail::bind_tuple_mapper<
84208 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
84209 const Arg6, const Arg7
84210 >::type
84211 >
84212 ( typename detail::bind_tuple_mapper<
84213 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
84214 const Arg6, const Arg7
84215 >::type
84216 (a1, a2, a3, a4, a5, a6, a7)
84217 );
84218 }
84219
84220 template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
84221 class Arg5, class Arg6, class Arg7>
84222 inline const
84223 lambda_functor<
84224 lambda_functor_base<
84225 action<7, function_action<7, Result> >,
84226 typename detail::bind_tuple_mapper<
84227 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
84228 const Arg7
84229 >::type
84230 >
84231 >
84232
84233 bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
84234 const Arg5& a5, const Arg6& a6, const Arg7& a7) {
84235 return
84236 lambda_functor_base<
84237 action<7, function_action<7, Result> >,
84238 typename detail::bind_tuple_mapper<
84239 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
84240 const Arg6, const Arg7
84241 >::type
84242 >
84243 ( typename detail::bind_tuple_mapper<
84244 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
84245 const Arg6, const Arg7
84246 >::type
84247 (a1, a2, a3, a4, a5, a6, a7)
84248 );
84249 }
84250 # 1243 "/usr/include/boost/lambda/detail/bind_functions.hpp" 3 4
84251 template <class Result, class Par1, class Par2, class Par3, class Par4,
84252 class Par5, class Par6, class Par7, class Arg2, class Arg3,
84253 class Arg4, class Arg5, class Arg6, class Arg7, class Arg8>
84254 inline const
84255 lambda_functor<
84256 lambda_functor_base<
84257 action<8, function_action<8, Result> >,
84258 typename detail::bind_tuple_mapper<
84259 Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7), const Arg2,
84260 const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
84261 >::type
84262 >
84263 >
84264
84265 bind(Result(&a1)(Par1, Par2, Par3, Par4, Par5, Par6, Par7), const Arg2& a2,
84266 const Arg3& a3, const Arg4& a4, const Arg5& a5, const Arg6& a6,
84267 const Arg7& a7, const Arg8& a8) {
84268 return
84269 lambda_functor_base<
84270 action<8, function_action<8, Result> >,
84271 typename detail::bind_tuple_mapper<
84272 Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7), const Arg2,
84273 const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
84274 >::type
84275 >
84276 ( typename detail::bind_tuple_mapper<
84277 Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7), const Arg2,
84278 const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
84279 >::type
84280 (a1, a2, a3, a4, a5, a6, a7, a8)
84281 );
84282 }
84283
84284
84285
84286 template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5,
84287 class Arg6, class Arg7, class Arg8>
84288 inline const
84289 lambda_functor<
84290 lambda_functor_base<
84291 action<8, function_action<8> >,
84292 typename detail::bind_tuple_mapper<
84293 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
84294 const Arg7, const Arg8
84295 >::type
84296 >
84297 >
84298
84299 bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
84300 const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8) {
84301 return
84302 lambda_functor_base<
84303 action<8, function_action<8> >,
84304 typename detail::bind_tuple_mapper<
84305 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
84306 const Arg6, const Arg7, const Arg8
84307 >::type
84308 >
84309 ( typename detail::bind_tuple_mapper<
84310 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
84311 const Arg6, const Arg7, const Arg8
84312 >::type
84313 (a1, a2, a3, a4, a5, a6, a7, a8)
84314 );
84315 }
84316
84317 template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
84318 class Arg5, class Arg6, class Arg7, class Arg8>
84319 inline const
84320 lambda_functor<
84321 lambda_functor_base<
84322 action<8, function_action<8, Result> >,
84323 typename detail::bind_tuple_mapper<
84324 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
84325 const Arg7, const Arg8
84326 >::type
84327 >
84328 >
84329
84330 bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
84331 const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8) {
84332 return
84333 lambda_functor_base<
84334 action<8, function_action<8, Result> >,
84335 typename detail::bind_tuple_mapper<
84336 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
84337 const Arg6, const Arg7, const Arg8
84338 >::type
84339 >
84340 ( typename detail::bind_tuple_mapper<
84341 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
84342 const Arg6, const Arg7, const Arg8
84343 >::type
84344 (a1, a2, a3, a4, a5, a6, a7, a8)
84345 );
84346 }
84347 # 1442 "/usr/include/boost/lambda/detail/bind_functions.hpp" 3 4
84348 template <class Result, class Par1, class Par2, class Par3, class Par4,
84349 class Par5, class Par6, class Par7, class Par8, class Arg2,
84350 class Arg3, class Arg4, class Arg5, class Arg6, class Arg7,
84351 class Arg8, class Arg9>
84352 inline const
84353 lambda_functor<
84354 lambda_functor_base<
84355 action<9, function_action<9, Result> >,
84356 typename detail::bind_tuple_mapper<
84357 Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8), const Arg2,
84358 const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8,
84359 const Arg9
84360 >::type
84361 >
84362 >
84363
84364 bind(Result(&a1)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8),
84365 const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5,
84366 const Arg6& a6, const Arg7& a7, const Arg8& a8, const Arg9& a9) {
84367 return
84368 lambda_functor_base<
84369 action<9, function_action<9, Result> >,
84370 typename detail::bind_tuple_mapper<
84371 Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8), const Arg2,
84372 const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
84373 const Arg8, const Arg9
84374 >::type
84375 >
84376 ( typename detail::bind_tuple_mapper<
84377 Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8), const Arg2,
84378 const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
84379 const Arg8, const Arg9
84380 >::type
84381 (a1, a2, a3, a4, a5, a6, a7, a8, a9)
84382 );
84383 }
84384
84385
84386
84387 template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5,
84388 class Arg6, class Arg7, class Arg8, class Arg9>
84389 inline const
84390 lambda_functor<
84391 lambda_functor_base<
84392 action<9, function_action<9> >,
84393 typename detail::bind_tuple_mapper<
84394 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
84395 const Arg7, const Arg8, const Arg9
84396 >::type
84397 >
84398 >
84399
84400 bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
84401 const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8,
84402 const Arg9& a9) {
84403 return
84404 lambda_functor_base<
84405 action<9, function_action<9> >,
84406 typename detail::bind_tuple_mapper<
84407 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
84408 const Arg6, const Arg7, const Arg8, const Arg9
84409 >::type
84410 >
84411 ( typename detail::bind_tuple_mapper<
84412 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
84413 const Arg6, const Arg7, const Arg8, const Arg9
84414 >::type
84415 (a1, a2, a3, a4, a5, a6, a7, a8, a9)
84416 );
84417 }
84418
84419 template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
84420 class Arg5, class Arg6, class Arg7, class Arg8, class Arg9>
84421 inline const
84422 lambda_functor<
84423 lambda_functor_base<
84424 action<9, function_action<9, Result> >,
84425 typename detail::bind_tuple_mapper<
84426 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
84427 const Arg7, const Arg8, const Arg9
84428 >::type
84429 >
84430 >
84431
84432 bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
84433 const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8,
84434 const Arg9& a9) {
84435 return
84436 lambda_functor_base<
84437 action<9, function_action<9, Result> >,
84438 typename detail::bind_tuple_mapper<
84439 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
84440 const Arg6, const Arg7, const Arg8, const Arg9
84441 >::type
84442 >
84443 ( typename detail::bind_tuple_mapper<
84444 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
84445 const Arg6, const Arg7, const Arg8, const Arg9
84446 >::type
84447 (a1, a2, a3, a4, a5, a6, a7, a8, a9)
84448 );
84449 }
84450 # 1657 "/usr/include/boost/lambda/detail/bind_functions.hpp" 3 4
84451 template <class Result, class Par1, class Par2, class Par3, class Par4,
84452 class Par5, class Par6, class Par7, class Par8, class Par9,
84453 class Arg2, class Arg3, class Arg4, class Arg5, class Arg6,
84454 class Arg7, class Arg8, class Arg9, class Arg10>
84455 inline const
84456 lambda_functor<
84457 lambda_functor_base<
84458 action<10, function_action<10, Result> >,
84459 typename detail::bind_tuple_mapper<
84460 Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8, Par9),
84461 const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
84462 const Arg8, const Arg9, const Arg10
84463 >::type
84464 >
84465 >
84466
84467 bind(Result(&a1)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8, Par9),
84468 const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5,
84469 const Arg6& a6, const Arg7& a7, const Arg8& a8, const Arg9& a9,
84470 const Arg10& a10) {
84471 return
84472 lambda_functor_base<
84473 action<10, function_action<10, Result> >,
84474 typename detail::bind_tuple_mapper<
84475 Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8, Par9),
84476 const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
84477 const Arg7, const Arg8, const Arg9, const Arg10
84478 >::type
84479 >
84480 ( typename detail::bind_tuple_mapper<
84481 Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8, Par9),
84482 const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
84483 const Arg7, const Arg8, const Arg9, const Arg10
84484 >::type
84485 (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
84486 );
84487 }
84488
84489
84490
84491 template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5,
84492 class Arg6, class Arg7, class Arg8, class Arg9, class Arg10>
84493 inline const
84494 lambda_functor<
84495 lambda_functor_base<
84496 action<10, function_action<10> >,
84497 typename detail::bind_tuple_mapper<
84498 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
84499 const Arg7, const Arg8, const Arg9, const Arg10
84500 >::type
84501 >
84502 >
84503
84504 bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
84505 const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8,
84506 const Arg9& a9, const Arg10& a10) {
84507 return
84508 lambda_functor_base<
84509 action<10, function_action<10> >,
84510 typename detail::bind_tuple_mapper<
84511 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
84512 const Arg6, const Arg7, const Arg8, const Arg9, const Arg10
84513 >::type
84514 >
84515 ( typename detail::bind_tuple_mapper<
84516 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
84517 const Arg6, const Arg7, const Arg8, const Arg9, const Arg10
84518 >::type
84519 (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
84520 );
84521 }
84522
84523 template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
84524 class Arg5, class Arg6, class Arg7, class Arg8, class Arg9,
84525 class Arg10>
84526 inline const
84527 lambda_functor<
84528 lambda_functor_base<
84529 action<10, function_action<10, Result> >,
84530 typename detail::bind_tuple_mapper<
84531 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
84532 const Arg7, const Arg8, const Arg9, const Arg10
84533 >::type
84534 >
84535 >
84536
84537 bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
84538 const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8,
84539 const Arg9& a9, const Arg10& a10) {
84540 return
84541 lambda_functor_base<
84542 action<10, function_action<10, Result> >,
84543 typename detail::bind_tuple_mapper<
84544 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
84545 const Arg6, const Arg7, const Arg8, const Arg9, const Arg10
84546 >::type
84547 >
84548 ( typename detail::bind_tuple_mapper<
84549 const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
84550 const Arg6, const Arg7, const Arg8, const Arg9, const Arg10
84551 >::type
84552 (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
84553 );
84554 }
84555 # 1876 "/usr/include/boost/lambda/detail/bind_functions.hpp" 3 4
84556 }
84557 }
84558 # 18 "/usr/include/boost/lambda/bind.hpp" 2 3 4
84559 # 29 "anneal.h" 2
84560 # 1 "/usr/include/boost/lambda/construct.hpp" 1 3 4
84561 # 17 "/usr/include/boost/lambda/construct.hpp" 3 4
84562 namespace boost {
84563 namespace lambda {
84564
84565
84566
84567
84568
84569 template<class T> struct constructor {
84570
84571 template <class U> struct sig { typedef T type; };
84572
84573 T operator()() const {
84574 return T();
84575 }
84576
84577 template<class A1>
84578 T operator()(A1& a1) const {
84579 return T(a1);
84580 }
84581
84582 template<class A1, class A2>
84583 T operator()(A1& a1, A2& a2) const {
84584 return T(a1, a2);
84585 }
84586
84587 template<class A1, class A2, class A3>
84588 T operator()(A1& a1, A2& a2, A3& a3) const {
84589 return T(a1, a2, a3);
84590 }
84591
84592 template<class A1, class A2, class A3, class A4>
84593 T operator()(A1& a1, A2& a2, A3& a3, A4& a4) const {
84594 return T(a1, a2, a3, a4);
84595 }
84596
84597 template<class A1, class A2, class A3, class A4, class A5>
84598 T operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) const {
84599 return T(a1, a2, a3, a4, a5);
84600 }
84601
84602 template<class A1, class A2, class A3, class A4, class A5, class A6>
84603 T operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) const {
84604 return T(a1, a2, a3, a4, a5, a6);
84605 }
84606
84607 template<class A1, class A2, class A3, class A4, class A5, class A6, class A7>
84608 T operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) const {
84609 return T(a1, a2, a3, a4, a5, a6, a7);
84610 }
84611
84612 template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
84613 T operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) const {
84614 return T(a1, a2, a3, a4, a5, a6, a7, a8);
84615 }
84616
84617 template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
84618 T operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8, A9& a9) const {
84619 return T(a1, a2, a3, a4, a5, a6, a7, a8, a9);
84620 }
84621
84622 template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10>
84623 T operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8, A9& a9, A10& a10) const {
84624 return T(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
84625 }
84626
84627 };
84628
84629
84630 namespace detail {
84631
84632
84633
84634
84635
84636
84637 template <bool IsPointer>
84638 struct destructor_helper {
84639
84640 template<class A1>
84641 static void exec(A1& a1) {
84642
84643 typedef typename boost::remove_cv<A1>::type plainA1;
84644 a1.~plainA1();
84645 }
84646 };
84647
84648 template <>
84649 struct destructor_helper<true> {
84650
84651 template<class A1>
84652 static void exec(A1* a1) {
84653 typedef typename boost::remove_cv<A1>::type plainA1;
84654 (*a1).~plainA1();
84655 }
84656 };
84657
84658 }
84659
84660
84661 struct destructor {
84662
84663 template <class T> struct sig { typedef void type; };
84664
84665 template<class A1>
84666 void operator()(A1& a1) const {
84667 typedef typename boost::remove_cv<A1>::type plainA1;
84668 detail::destructor_helper<boost::is_pointer<plainA1>::value>::exec(a1);
84669 }
84670 };
84671
84672
84673
84674
84675
84676
84677
84678 template<class T> struct new_ptr {
84679
84680 template <class U> struct sig { typedef T* type; };
84681
84682 T* operator()() const {
84683 return new T();
84684 }
84685
84686 template<class A1>
84687 T* operator()(A1& a1) const {
84688 return new T(a1);
84689 }
84690
84691 template<class A1, class A2>
84692 T* operator()(A1& a1, A2& a2) const {
84693 return new T(a1, a2);
84694 }
84695
84696 template<class A1, class A2, class A3>
84697 T* operator()(A1& a1, A2& a2, A3& a3) const {
84698 return new T(a1, a2, a3);
84699 }
84700
84701 template<class A1, class A2, class A3, class A4>
84702 T* operator()(A1& a1, A2& a2, A3& a3, A4& a4) const {
84703 return new T(a1, a2, a3, a4);
84704 }
84705
84706 template<class A1, class A2, class A3, class A4, class A5>
84707 T* operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) const {
84708 return new T(a1, a2, a3, a4, a5);
84709 }
84710
84711 template<class A1, class A2, class A3, class A4, class A5, class A6>
84712 T* operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) const {
84713 return new T(a1, a2, a3, a4, a5, a6);
84714 }
84715
84716 template<class A1, class A2, class A3, class A4, class A5, class A6, class A7>
84717 T* operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) const {
84718 return new T(a1, a2, a3, a4, a5, a6, a7);
84719 }
84720
84721 template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
84722 T* operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) const {
84723 return new T(a1, a2, a3, a4, a5, a6, a7, a8);
84724 }
84725
84726 template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
84727 T* operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8, A9& a9) const {
84728 return new T(a1, a2, a3, a4, a5, a6, a7, a8, a9);
84729 }
84730
84731 template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10>
84732 T* operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8, A9& a9, A10& a10) const {
84733 return new T(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
84734 }
84735
84736 };
84737
84738
84739
84740 struct delete_ptr {
84741
84742 template <class U> struct sig { typedef void type; };
84743
84744 template <class A1>
84745 void operator()(A1& a1) const {
84746 delete a1;
84747 }
84748
84749 };
84750
84751
84752
84753
84754 template<class T> struct new_array {
84755
84756 template <class U> struct sig { typedef T* type; };
84757
84758 T* operator()(int size) const {
84759 return new T[size];
84760 }
84761 };
84762
84763
84764
84765
84766 struct delete_array {
84767
84768 template <class U> struct sig { typedef void type; };
84769
84770 template <class A1>
84771 void operator()(A1& a1) const {
84772 delete[] a1;
84773 }
84774
84775 };
84776
84777
84778
84779 }
84780 }
84781 # 30 "anneal.h" 2
84782 # 45 "anneal.h"
84783 # 1 "gpu.h" 1
84784 # 24 "gpu.h"
84785 # 1 "../config.h" 1
84786 # 25 "gpu.h" 2
84787
84788
84789
84790 # 1 "/usr/include/GL/glew.h" 1 3 4
84791 # 180 "/usr/include/GL/glew.h" 3 4
84792 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4
84793 # 181 "/usr/include/GL/glew.h" 2 3 4
84794 # 197 "/usr/include/GL/glew.h" 3 4
84795 extern "C" {
84796 # 212 "/usr/include/GL/glew.h" 3 4
84797 typedef unsigned int GLenum;
84798 typedef unsigned int GLbitfield;
84799 typedef unsigned int GLuint;
84800 typedef int GLint;
84801 typedef int GLsizei;
84802
84803 typedef unsigned char GLboolean;
84804 typedef signed char GLbyte;
84805 typedef short GLshort;
84806 typedef unsigned char GLubyte;
84807 typedef unsigned short GLushort;
84808 typedef float GLfloat;
84809 typedef float GLclampf;
84810 typedef double GLdouble;
84811 typedef double GLclampd;
84812 typedef void GLvoid;
84813 # 237 "/usr/include/GL/glew.h" 3 4
84814 typedef signed long long GLint64EXT;
84815 typedef unsigned long long GLuint64EXT;
84816 # 776 "/usr/include/GL/glew.h" 3 4
84817 extern void glAccum (GLenum op, GLfloat value);
84818 extern void glAlphaFunc (GLenum func, GLclampf ref);
84819 extern GLboolean glAreTexturesResident (GLsizei n, const GLuint *textures, GLboolean *residences);
84820 extern void glArrayElement (GLint i);
84821 extern void glBegin (GLenum mode);
84822 extern void glBindTexture (GLenum target, GLuint texture);
84823 extern void glBitmap (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap);
84824 extern void glBlendFunc (GLenum sfactor, GLenum dfactor);
84825 extern void glCallList (GLuint list);
84826 extern void glCallLists (GLsizei n, GLenum type, const GLvoid *lists);
84827 extern void glClear (GLbitfield mask);
84828 extern void glClearAccum (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
84829 extern void glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
84830 extern void glClearDepth (GLclampd depth);
84831 extern void glClearIndex (GLfloat c);
84832 extern void glClearStencil (GLint s);
84833 extern void glClipPlane (GLenum plane, const GLdouble *equation);
84834 extern void glColor3b (GLbyte red, GLbyte green, GLbyte blue);
84835 extern void glColor3bv (const GLbyte *v);
84836 extern void glColor3d (GLdouble red, GLdouble green, GLdouble blue);
84837 extern void glColor3dv (const GLdouble *v);
84838 extern void glColor3f (GLfloat red, GLfloat green, GLfloat blue);
84839 extern void glColor3fv (const GLfloat *v);
84840 extern void glColor3i (GLint red, GLint green, GLint blue);
84841 extern void glColor3iv (const GLint *v);
84842 extern void glColor3s (GLshort red, GLshort green, GLshort blue);
84843 extern void glColor3sv (const GLshort *v);
84844 extern void glColor3ub (GLubyte red, GLubyte green, GLubyte blue);
84845 extern void glColor3ubv (const GLubyte *v);
84846 extern void glColor3ui (GLuint red, GLuint green, GLuint blue);
84847 extern void glColor3uiv (const GLuint *v);
84848 extern void glColor3us (GLushort red, GLushort green, GLushort blue);
84849 extern void glColor3usv (const GLushort *v);
84850 extern void glColor4b (GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
84851 extern void glColor4bv (const GLbyte *v);
84852 extern void glColor4d (GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
84853 extern void glColor4dv (const GLdouble *v);
84854 extern void glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
84855 extern void glColor4fv (const GLfloat *v);
84856 extern void glColor4i (GLint red, GLint green, GLint blue, GLint alpha);
84857 extern void glColor4iv (const GLint *v);
84858 extern void glColor4s (GLshort red, GLshort green, GLshort blue, GLshort alpha);
84859 extern void glColor4sv (const GLshort *v);
84860 extern void glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
84861 extern void glColor4ubv (const GLubyte *v);
84862 extern void glColor4ui (GLuint red, GLuint green, GLuint blue, GLuint alpha);
84863 extern void glColor4uiv (const GLuint *v);
84864 extern void glColor4us (GLushort red, GLushort green, GLushort blue, GLushort alpha);
84865 extern void glColor4usv (const GLushort *v);
84866 extern void glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
84867 extern void glColorMaterial (GLenum face, GLenum mode);
84868 extern void glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
84869 extern void glCopyPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
84870 extern void glCopyTexImage1D (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border);
84871 extern void glCopyTexImage2D (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
84872 extern void glCopyTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
84873 extern void glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
84874 extern void glCullFace (GLenum mode);
84875 extern void glDeleteLists (GLuint list, GLsizei range);
84876 extern void glDeleteTextures (GLsizei n, const GLuint *textures);
84877 extern void glDepthFunc (GLenum func);
84878 extern void glDepthMask (GLboolean flag);
84879 extern void glDepthRange (GLclampd zNear, GLclampd zFar);
84880 extern void glDisable (GLenum cap);
84881 extern void glDisableClientState (GLenum array);
84882 extern void glDrawArrays (GLenum mode, GLint first, GLsizei count);
84883 extern void glDrawBuffer (GLenum mode);
84884 extern void glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
84885 extern void glDrawPixels (GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
84886 extern void glEdgeFlag (GLboolean flag);
84887 extern void glEdgeFlagPointer (GLsizei stride, const GLvoid *pointer);
84888 extern void glEdgeFlagv (const GLboolean *flag);
84889 extern void glEnable (GLenum cap);
84890 extern void glEnableClientState (GLenum array);
84891 extern void glEnd (void);
84892 extern void glEndList (void);
84893 extern void glEvalCoord1d (GLdouble u);
84894 extern void glEvalCoord1dv (const GLdouble *u);
84895 extern void glEvalCoord1f (GLfloat u);
84896 extern void glEvalCoord1fv (const GLfloat *u);
84897 extern void glEvalCoord2d (GLdouble u, GLdouble v);
84898 extern void glEvalCoord2dv (const GLdouble *u);
84899 extern void glEvalCoord2f (GLfloat u, GLfloat v);
84900 extern void glEvalCoord2fv (const GLfloat *u);
84901 extern void glEvalMesh1 (GLenum mode, GLint i1, GLint i2);
84902 extern void glEvalMesh2 (GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
84903 extern void glEvalPoint1 (GLint i);
84904 extern void glEvalPoint2 (GLint i, GLint j);
84905 extern void glFeedbackBuffer (GLsizei size, GLenum type, GLfloat *buffer);
84906 extern void glFinish (void);
84907 extern void glFlush (void);
84908 extern void glFogf (GLenum pname, GLfloat param);
84909 extern void glFogfv (GLenum pname, const GLfloat *params);
84910 extern void glFogi (GLenum pname, GLint param);
84911 extern void glFogiv (GLenum pname, const GLint *params);
84912 extern void glFrontFace (GLenum mode);
84913 extern void glFrustum (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
84914 extern GLuint glGenLists (GLsizei range);
84915 extern void glGenTextures (GLsizei n, GLuint *textures);
84916 extern void glGetBooleanv (GLenum pname, GLboolean *params);
84917 extern void glGetClipPlane (GLenum plane, GLdouble *equation);
84918 extern void glGetDoublev (GLenum pname, GLdouble *params);
84919 extern GLenum glGetError (void);
84920 extern void glGetFloatv (GLenum pname, GLfloat *params);
84921 extern void glGetIntegerv (GLenum pname, GLint *params);
84922 extern void glGetLightfv (GLenum light, GLenum pname, GLfloat *params);
84923 extern void glGetLightiv (GLenum light, GLenum pname, GLint *params);
84924 extern void glGetMapdv (GLenum target, GLenum query, GLdouble *v);
84925 extern void glGetMapfv (GLenum target, GLenum query, GLfloat *v);
84926 extern void glGetMapiv (GLenum target, GLenum query, GLint *v);
84927 extern void glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params);
84928 extern void glGetMaterialiv (GLenum face, GLenum pname, GLint *params);
84929 extern void glGetPixelMapfv (GLenum map, GLfloat *values);
84930 extern void glGetPixelMapuiv (GLenum map, GLuint *values);
84931 extern void glGetPixelMapusv (GLenum map, GLushort *values);
84932 extern void glGetPointerv (GLenum pname, GLvoid* *params);
84933 extern void glGetPolygonStipple (GLubyte *mask);
84934 extern const GLubyte * glGetString (GLenum name);
84935 extern void glGetTexEnvfv (GLenum target, GLenum pname, GLfloat *params);
84936 extern void glGetTexEnviv (GLenum target, GLenum pname, GLint *params);
84937 extern void glGetTexGendv (GLenum coord, GLenum pname, GLdouble *params);
84938 extern void glGetTexGenfv (GLenum coord, GLenum pname, GLfloat *params);
84939 extern void glGetTexGeniv (GLenum coord, GLenum pname, GLint *params);
84940 extern void glGetTexImage (GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
84941 extern void glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params);
84942 extern void glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params);
84943 extern void glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
84944 extern void glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
84945 extern void glHint (GLenum target, GLenum mode);
84946 extern void glIndexMask (GLuint mask);
84947 extern void glIndexPointer (GLenum type, GLsizei stride, const GLvoid *pointer);
84948 extern void glIndexd (GLdouble c);
84949 extern void glIndexdv (const GLdouble *c);
84950 extern void glIndexf (GLfloat c);
84951 extern void glIndexfv (const GLfloat *c);
84952 extern void glIndexi (GLint c);
84953 extern void glIndexiv (const GLint *c);
84954 extern void glIndexs (GLshort c);
84955 extern void glIndexsv (const GLshort *c);
84956 extern void glIndexub (GLubyte c);
84957 extern void glIndexubv (const GLubyte *c);
84958 extern void glInitNames (void);
84959 extern void glInterleavedArrays (GLenum format, GLsizei stride, const GLvoid *pointer);
84960 extern GLboolean glIsEnabled (GLenum cap);
84961 extern GLboolean glIsList (GLuint list);
84962 extern GLboolean glIsTexture (GLuint texture);
84963 extern void glLightModelf (GLenum pname, GLfloat param);
84964 extern void glLightModelfv (GLenum pname, const GLfloat *params);
84965 extern void glLightModeli (GLenum pname, GLint param);
84966 extern void glLightModeliv (GLenum pname, const GLint *params);
84967 extern void glLightf (GLenum light, GLenum pname, GLfloat param);
84968 extern void glLightfv (GLenum light, GLenum pname, const GLfloat *params);
84969 extern void glLighti (GLenum light, GLenum pname, GLint param);
84970 extern void glLightiv (GLenum light, GLenum pname, const GLint *params);
84971 extern void glLineStipple (GLint factor, GLushort pattern);
84972 extern void glLineWidth (GLfloat width);
84973 extern void glListBase (GLuint base);
84974 extern void glLoadIdentity (void);
84975 extern void glLoadMatrixd (const GLdouble *m);
84976 extern void glLoadMatrixf (const GLfloat *m);
84977 extern void glLoadName (GLuint name);
84978 extern void glLogicOp (GLenum opcode);
84979 extern void glMap1d (GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
84980 extern void glMap1f (GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
84981 extern void glMap2d (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
84982 extern void glMap2f (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
84983 extern void glMapGrid1d (GLint un, GLdouble u1, GLdouble u2);
84984 extern void glMapGrid1f (GLint un, GLfloat u1, GLfloat u2);
84985 extern void glMapGrid2d (GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
84986 extern void glMapGrid2f (GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
84987 extern void glMaterialf (GLenum face, GLenum pname, GLfloat param);
84988 extern void glMaterialfv (GLenum face, GLenum pname, const GLfloat *params);
84989 extern void glMateriali (GLenum face, GLenum pname, GLint param);
84990 extern void glMaterialiv (GLenum face, GLenum pname, const GLint *params);
84991 extern void glMatrixMode (GLenum mode);
84992 extern void glMultMatrixd (const GLdouble *m);
84993 extern void glMultMatrixf (const GLfloat *m);
84994 extern void glNewList (GLuint list, GLenum mode);
84995 extern void glNormal3b (GLbyte nx, GLbyte ny, GLbyte nz);
84996 extern void glNormal3bv (const GLbyte *v);
84997 extern void glNormal3d (GLdouble nx, GLdouble ny, GLdouble nz);
84998 extern void glNormal3dv (const GLdouble *v);
84999 extern void glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz);
85000 extern void glNormal3fv (const GLfloat *v);
85001 extern void glNormal3i (GLint nx, GLint ny, GLint nz);
85002 extern void glNormal3iv (const GLint *v);
85003 extern void glNormal3s (GLshort nx, GLshort ny, GLshort nz);
85004 extern void glNormal3sv (const GLshort *v);
85005 extern void glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer);
85006 extern void glOrtho (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
85007 extern void glPassThrough (GLfloat token);
85008 extern void glPixelMapfv (GLenum map, GLsizei mapsize, const GLfloat *values);
85009 extern void glPixelMapuiv (GLenum map, GLsizei mapsize, const GLuint *values);
85010 extern void glPixelMapusv (GLenum map, GLsizei mapsize, const GLushort *values);
85011 extern void glPixelStoref (GLenum pname, GLfloat param);
85012 extern void glPixelStorei (GLenum pname, GLint param);
85013 extern void glPixelTransferf (GLenum pname, GLfloat param);
85014 extern void glPixelTransferi (GLenum pname, GLint param);
85015 extern void glPixelZoom (GLfloat xfactor, GLfloat yfactor);
85016 extern void glPointSize (GLfloat size);
85017 extern void glPolygonMode (GLenum face, GLenum mode);
85018 extern void glPolygonOffset (GLfloat factor, GLfloat units);
85019 extern void glPolygonStipple (const GLubyte *mask);
85020 extern void glPopAttrib (void);
85021 extern void glPopClientAttrib (void);
85022 extern void glPopMatrix (void);
85023 extern void glPopName (void);
85024 extern void glPrioritizeTextures (GLsizei n, const GLuint *textures, const GLclampf *priorities);
85025 extern void glPushAttrib (GLbitfield mask);
85026 extern void glPushClientAttrib (GLbitfield mask);
85027 extern void glPushMatrix (void);
85028 extern void glPushName (GLuint name);
85029 extern void glRasterPos2d (GLdouble x, GLdouble y);
85030 extern void glRasterPos2dv (const GLdouble *v);
85031 extern void glRasterPos2f (GLfloat x, GLfloat y);
85032 extern void glRasterPos2fv (const GLfloat *v);
85033 extern void glRasterPos2i (GLint x, GLint y);
85034 extern void glRasterPos2iv (const GLint *v);
85035 extern void glRasterPos2s (GLshort x, GLshort y);
85036 extern void glRasterPos2sv (const GLshort *v);
85037 extern void glRasterPos3d (GLdouble x, GLdouble y, GLdouble z);
85038 extern void glRasterPos3dv (const GLdouble *v);
85039 extern void glRasterPos3f (GLfloat x, GLfloat y, GLfloat z);
85040 extern void glRasterPos3fv (const GLfloat *v);
85041 extern void glRasterPos3i (GLint x, GLint y, GLint z);
85042 extern void glRasterPos3iv (const GLint *v);
85043 extern void glRasterPos3s (GLshort x, GLshort y, GLshort z);
85044 extern void glRasterPos3sv (const GLshort *v);
85045 extern void glRasterPos4d (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
85046 extern void glRasterPos4dv (const GLdouble *v);
85047 extern void glRasterPos4f (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
85048 extern void glRasterPos4fv (const GLfloat *v);
85049 extern void glRasterPos4i (GLint x, GLint y, GLint z, GLint w);
85050 extern void glRasterPos4iv (const GLint *v);
85051 extern void glRasterPos4s (GLshort x, GLshort y, GLshort z, GLshort w);
85052 extern void glRasterPos4sv (const GLshort *v);
85053 extern void glReadBuffer (GLenum mode);
85054 extern void glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
85055 extern void glRectd (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
85056 extern void glRectdv (const GLdouble *v1, const GLdouble *v2);
85057 extern void glRectf (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
85058 extern void glRectfv (const GLfloat *v1, const GLfloat *v2);
85059 extern void glRecti (GLint x1, GLint y1, GLint x2, GLint y2);
85060 extern void glRectiv (const GLint *v1, const GLint *v2);
85061 extern void glRects (GLshort x1, GLshort y1, GLshort x2, GLshort y2);
85062 extern void glRectsv (const GLshort *v1, const GLshort *v2);
85063 extern GLint glRenderMode (GLenum mode);
85064 extern void glRotated (GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
85065 extern void glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
85066 extern void glScaled (GLdouble x, GLdouble y, GLdouble z);
85067 extern void glScalef (GLfloat x, GLfloat y, GLfloat z);
85068 extern void glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
85069 extern void glSelectBuffer (GLsizei size, GLuint *buffer);
85070 extern void glShadeModel (GLenum mode);
85071 extern void glStencilFunc (GLenum func, GLint ref, GLuint mask);
85072 extern void glStencilMask (GLuint mask);
85073 extern void glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
85074 extern void glTexCoord1d (GLdouble s);
85075 extern void glTexCoord1dv (const GLdouble *v);
85076 extern void glTexCoord1f (GLfloat s);
85077 extern void glTexCoord1fv (const GLfloat *v);
85078 extern void glTexCoord1i (GLint s);
85079 extern void glTexCoord1iv (const GLint *v);
85080 extern void glTexCoord1s (GLshort s);
85081 extern void glTexCoord1sv (const GLshort *v);
85082 extern void glTexCoord2d (GLdouble s, GLdouble t);
85083 extern void glTexCoord2dv (const GLdouble *v);
85084 extern void glTexCoord2f (GLfloat s, GLfloat t);
85085 extern void glTexCoord2fv (const GLfloat *v);
85086 extern void glTexCoord2i (GLint s, GLint t);
85087 extern void glTexCoord2iv (const GLint *v);
85088 extern void glTexCoord2s (GLshort s, GLshort t);
85089 extern void glTexCoord2sv (const GLshort *v);
85090 extern void glTexCoord3d (GLdouble s, GLdouble t, GLdouble r);
85091 extern void glTexCoord3dv (const GLdouble *v);
85092 extern void glTexCoord3f (GLfloat s, GLfloat t, GLfloat r);
85093 extern void glTexCoord3fv (const GLfloat *v);
85094 extern void glTexCoord3i (GLint s, GLint t, GLint r);
85095 extern void glTexCoord3iv (const GLint *v);
85096 extern void glTexCoord3s (GLshort s, GLshort t, GLshort r);
85097 extern void glTexCoord3sv (const GLshort *v);
85098 extern void glTexCoord4d (GLdouble s, GLdouble t, GLdouble r, GLdouble q);
85099 extern void glTexCoord4dv (const GLdouble *v);
85100 extern void glTexCoord4f (GLfloat s, GLfloat t, GLfloat r, GLfloat q);
85101 extern void glTexCoord4fv (const GLfloat *v);
85102 extern void glTexCoord4i (GLint s, GLint t, GLint r, GLint q);
85103 extern void glTexCoord4iv (const GLint *v);
85104 extern void glTexCoord4s (GLshort s, GLshort t, GLshort r, GLshort q);
85105 extern void glTexCoord4sv (const GLshort *v);
85106 extern void glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
85107 extern void glTexEnvf (GLenum target, GLenum pname, GLfloat param);
85108 extern void glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params);
85109 extern void glTexEnvi (GLenum target, GLenum pname, GLint param);
85110 extern void glTexEnviv (GLenum target, GLenum pname, const GLint *params);
85111 extern void glTexGend (GLenum coord, GLenum pname, GLdouble param);
85112 extern void glTexGendv (GLenum coord, GLenum pname, const GLdouble *params);
85113 extern void glTexGenf (GLenum coord, GLenum pname, GLfloat param);
85114 extern void glTexGenfv (GLenum coord, GLenum pname, const GLfloat *params);
85115 extern void glTexGeni (GLenum coord, GLenum pname, GLint param);
85116 extern void glTexGeniv (GLenum coord, GLenum pname, const GLint *params);
85117 extern void glTexImage1D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
85118 extern void glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
85119 extern void glTexParameterf (GLenum target, GLenum pname, GLfloat param);
85120 extern void glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
85121 extern void glTexParameteri (GLenum target, GLenum pname, GLint param);
85122 extern void glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
85123 extern void glTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
85124 extern void glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
85125 extern void glTranslated (GLdouble x, GLdouble y, GLdouble z);
85126 extern void glTranslatef (GLfloat x, GLfloat y, GLfloat z);
85127 extern void glVertex2d (GLdouble x, GLdouble y);
85128 extern void glVertex2dv (const GLdouble *v);
85129 extern void glVertex2f (GLfloat x, GLfloat y);
85130 extern void glVertex2fv (const GLfloat *v);
85131 extern void glVertex2i (GLint x, GLint y);
85132 extern void glVertex2iv (const GLint *v);
85133 extern void glVertex2s (GLshort x, GLshort y);
85134 extern void glVertex2sv (const GLshort *v);
85135 extern void glVertex3d (GLdouble x, GLdouble y, GLdouble z);
85136 extern void glVertex3dv (const GLdouble *v);
85137 extern void glVertex3f (GLfloat x, GLfloat y, GLfloat z);
85138 extern void glVertex3fv (const GLfloat *v);
85139 extern void glVertex3i (GLint x, GLint y, GLint z);
85140 extern void glVertex3iv (const GLint *v);
85141 extern void glVertex3s (GLshort x, GLshort y, GLshort z);
85142 extern void glVertex3sv (const GLshort *v);
85143 extern void glVertex4d (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
85144 extern void glVertex4dv (const GLdouble *v);
85145 extern void glVertex4f (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
85146 extern void glVertex4fv (const GLfloat *v);
85147 extern void glVertex4i (GLint x, GLint y, GLint z, GLint w);
85148 extern void glVertex4iv (const GLint *v);
85149 extern void glVertex4s (GLshort x, GLshort y, GLshort z, GLshort w);
85150 extern void glVertex4sv (const GLshort *v);
85151 extern void glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
85152 extern void glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
85153 # 1123 "/usr/include/GL/glew.h" 3 4
85154 # 1 "/usr/include/GL/glu.h" 1 3 4
85155 # 37 "/usr/include/GL/glu.h" 3 4
85156 # 1 "/usr/include/GL/gl.h" 1 3 4
85157 # 38 "/usr/include/GL/glu.h" 2 3 4
85158 # 65 "/usr/include/GL/glu.h" 3 4
85159 extern "C" {
85160 # 270 "/usr/include/GL/glu.h" 3 4
85161 class GLUnurbs;
85162 class GLUquadric;
85163 class GLUtesselator;
85164
85165
85166
85167
85168
85169
85170 typedef GLUnurbs GLUnurbsObj;
85171 typedef GLUquadric GLUquadricObj;
85172 typedef GLUtesselator GLUtesselatorObj;
85173 typedef GLUtesselator GLUtriangulatorObj;
85174
85175
85176
85177
85178 typedef void ( * _GLUfuncptr)();
85179
85180 extern void gluBeginCurve (GLUnurbs* nurb);
85181 extern void gluBeginPolygon (GLUtesselator* tess);
85182 extern void gluBeginSurface (GLUnurbs* nurb);
85183 extern void gluBeginTrim (GLUnurbs* nurb);
85184 extern GLint gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
85185 extern GLint gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
85186 extern GLint gluBuild2DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
85187 extern GLint gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
85188 extern GLint gluBuild3DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
85189 extern GLint gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
85190 extern GLboolean gluCheckExtension (const GLubyte *extName, const GLubyte *extString);
85191 extern void gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
85192 extern void gluDeleteNurbsRenderer (GLUnurbs* nurb);
85193 extern void gluDeleteQuadric (GLUquadric* quad);
85194 extern void gluDeleteTess (GLUtesselator* tess);
85195 extern void gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
85196 extern void gluEndCurve (GLUnurbs* nurb);
85197 extern void gluEndPolygon (GLUtesselator* tess);
85198 extern void gluEndSurface (GLUnurbs* nurb);
85199 extern void gluEndTrim (GLUnurbs* nurb);
85200 extern const GLubyte * gluErrorString (GLenum error);
85201 extern void gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
85202 extern const GLubyte * gluGetString (GLenum name);
85203 extern void gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
85204 extern void gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
85205 extern void gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
85206 extern GLUnurbs* gluNewNurbsRenderer (void);
85207 extern GLUquadric* gluNewQuadric (void);
85208 extern GLUtesselator* gluNewTess (void);
85209 extern void gluNextContour (GLUtesselator* tess, GLenum type);
85210 extern void gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
85211 extern void gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
85212 extern void gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData);
85213 extern void gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
85214 extern void gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
85215 extern void gluNurbsSurface (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type);
85216 extern void gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
85217 extern void gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
85218 extern void gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
85219 extern void gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
85220 extern GLint gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ);
85221 extern void gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
85222 extern void gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
85223 extern void gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
85224 extern void gluQuadricNormals (GLUquadric* quad, GLenum normal);
85225 extern void gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
85226 extern void gluQuadricTexture (GLUquadric* quad, GLboolean texture);
85227 extern GLint gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
85228 extern void gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
85229 extern void gluTessBeginContour (GLUtesselator* tess);
85230 extern void gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
85231 extern void gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
85232 extern void gluTessEndContour (GLUtesselator* tess);
85233 extern void gluTessEndPolygon (GLUtesselator* tess);
85234 extern void gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
85235 extern void gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
85236 extern void gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
85237 extern GLint gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ);
85238 extern GLint gluUnProject4 (GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble nearVal, GLdouble farVal, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW);
85239
85240
85241 }
85242 # 1124 "/usr/include/GL/glew.h" 2 3 4
85243 # 1173 "/usr/include/GL/glew.h" 3 4
85244 typedef void ( * PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
85245 typedef void ( * PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
85246 typedef void ( * PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
85247 typedef void ( * PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
85248 # 1289 "/usr/include/GL/glew.h" 3 4
85249 typedef void ( * PFNGLACTIVETEXTUREPROC) (GLenum texture);
85250 typedef void ( * PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
85251 typedef void ( * PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
85252 typedef void ( * PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
85253 typedef void ( * PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
85254 typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
85255 typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
85256 typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
85257 typedef void ( * PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint lod, GLvoid *img);
85258 typedef void ( * PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble m[16]);
85259 typedef void ( * PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat m[16]);
85260 typedef void ( * PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble m[16]);
85261 typedef void ( * PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat m[16]);
85262 typedef void ( * PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
85263 typedef void ( * PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
85264 typedef void ( * PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
85265 typedef void ( * PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
85266 typedef void ( * PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
85267 typedef void ( * PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
85268 typedef void ( * PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
85269 typedef void ( * PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
85270 typedef void ( * PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
85271 typedef void ( * PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
85272 typedef void ( * PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
85273 typedef void ( * PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
85274 typedef void ( * PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
85275 typedef void ( * PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
85276 typedef void ( * PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
85277 typedef void ( * PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
85278 typedef void ( * PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
85279 typedef void ( * PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
85280 typedef void ( * PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
85281 typedef void ( * PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
85282 typedef void ( * PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
85283 typedef void ( * PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
85284 typedef void ( * PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
85285 typedef void ( * PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
85286 typedef void ( * PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
85287 typedef void ( * PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
85288 typedef void ( * PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
85289 typedef void ( * PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
85290 typedef void ( * PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
85291 typedef void ( * PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
85292 typedef void ( * PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
85293 typedef void ( * PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
85294 typedef void ( * PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
85295 # 1432 "/usr/include/GL/glew.h" 3 4
85296 typedef void ( * PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
85297 typedef void ( * PFNGLBLENDEQUATIONPROC) (GLenum mode);
85298 typedef void ( * PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
85299 typedef void ( * PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
85300 typedef void ( * PFNGLFOGCOORDDPROC) (GLdouble coord);
85301 typedef void ( * PFNGLFOGCOORDDVPROC) (const GLdouble *coord);
85302 typedef void ( * PFNGLFOGCOORDFPROC) (GLfloat coord);
85303 typedef void ( * PFNGLFOGCOORDFVPROC) (const GLfloat *coord);
85304 typedef void ( * PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
85305 typedef void ( * PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount);
85306 typedef void ( * PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);
85307 typedef void ( * PFNGLPOINTPARAMETERFVPROC) (GLenum pname, GLfloat *params);
85308 typedef void ( * PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue);
85309 typedef void ( * PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v);
85310 typedef void ( * PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue);
85311 typedef void ( * PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v);
85312 typedef void ( * PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue);
85313 typedef void ( * PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v);
85314 typedef void ( * PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue);
85315 typedef void ( * PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v);
85316 typedef void ( * PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue);
85317 typedef void ( * PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v);
85318 typedef void ( * PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue);
85319 typedef void ( * PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v);
85320 typedef void ( * PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue);
85321 typedef void ( * PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);
85322 typedef void ( * PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);
85323 typedef void ( * PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);
85324 typedef void ( * PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, GLvoid *pointer);
85325 typedef void ( * PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);
85326 typedef void ( * PFNGLWINDOWPOS2DVPROC) (const GLdouble *p);
85327 typedef void ( * PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);
85328 typedef void ( * PFNGLWINDOWPOS2FVPROC) (const GLfloat *p);
85329 typedef void ( * PFNGLWINDOWPOS2IPROC) (GLint x, GLint y);
85330 typedef void ( * PFNGLWINDOWPOS2IVPROC) (const GLint *p);
85331 typedef void ( * PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y);
85332 typedef void ( * PFNGLWINDOWPOS2SVPROC) (const GLshort *p);
85333 typedef void ( * PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z);
85334 typedef void ( * PFNGLWINDOWPOS3DVPROC) (const GLdouble *p);
85335 typedef void ( * PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z);
85336 typedef void ( * PFNGLWINDOWPOS3FVPROC) (const GLfloat *p);
85337 typedef void ( * PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z);
85338 typedef void ( * PFNGLWINDOWPOS3IVPROC) (const GLint *p);
85339 typedef void ( * PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z);
85340 typedef void ( * PFNGLWINDOWPOS3SVPROC) (const GLshort *p);
85341 # 1584 "/usr/include/GL/glew.h" 3 4
85342 typedef ptrdiff_t GLsizeiptr;
85343 typedef ptrdiff_t GLintptr;
85344
85345 typedef void ( * PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);
85346 typedef void ( * PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
85347 typedef void ( * PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
85348 typedef void ( * PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
85349 typedef void ( * PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint* buffers);
85350 typedef void ( * PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint* ids);
85351 typedef void ( * PFNGLENDQUERYPROC) (GLenum target);
85352 typedef void ( * PFNGLGENBUFFERSPROC) (GLsizei n, GLuint* buffers);
85353 typedef void ( * PFNGLGENQUERIESPROC) (GLsizei n, GLuint* ids);
85354 typedef void ( * PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint* params);
85355 typedef void ( * PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid** params);
85356 typedef void ( * PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid* data);
85357 typedef void ( * PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint* params);
85358 typedef void ( * PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint* params);
85359 typedef void ( * PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint* params);
85360 typedef GLboolean ( * PFNGLISBUFFERPROC) (GLuint buffer);
85361 typedef GLboolean ( * PFNGLISQUERYPROC) (GLuint id);
85362 typedef GLvoid* ( * PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
85363 typedef GLboolean ( * PFNGLUNMAPBUFFERPROC) (GLenum target);
85364 # 1721 "/usr/include/GL/glew.h" 3 4
85365 typedef char GLchar;
85366
85367 typedef void ( * PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
85368 typedef void ( * PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar* name);
85369 typedef void ( * PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum, GLenum);
85370 typedef void ( * PFNGLCOMPILESHADERPROC) (GLuint shader);
85371 typedef GLuint ( * PFNGLCREATEPROGRAMPROC) (void);
85372 typedef GLuint ( * PFNGLCREATESHADERPROC) (GLenum type);
85373 typedef void ( * PFNGLDELETEPROGRAMPROC) (GLuint program);
85374 typedef void ( * PFNGLDELETESHADERPROC) (GLuint shader);
85375 typedef void ( * PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
85376 typedef void ( * PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint);
85377 typedef void ( * PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum* bufs);
85378 typedef void ( * PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint);
85379 typedef void ( * PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei maxLength, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
85380 typedef void ( * PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei maxLength, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
85381 typedef void ( * PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei* count, GLuint* shaders);
85382 typedef GLint ( * PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar* name);
85383 typedef void ( * PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei* length, GLchar* infoLog);
85384 typedef void ( * PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint* param);
85385 typedef void ( * PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei* length, GLchar* infoLog);
85386 typedef void ( * PFNGLGETSHADERSOURCEPROC) (GLint obj, GLsizei maxLength, GLsizei* length, GLchar* source);
85387 typedef void ( * PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint* param);
85388 typedef GLint ( * PFNGLGETUNIFORMLOCATIONPROC) (GLint programObj, const GLchar* name);
85389 typedef void ( * PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat* params);
85390 typedef void ( * PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint* params);
85391 typedef void ( * PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint, GLenum, GLvoid*);
85392 typedef void ( * PFNGLGETVERTEXATTRIBDVPROC) (GLuint, GLenum, GLdouble*);
85393 typedef void ( * PFNGLGETVERTEXATTRIBFVPROC) (GLuint, GLenum, GLfloat*);
85394 typedef void ( * PFNGLGETVERTEXATTRIBIVPROC) (GLuint, GLenum, GLint*);
85395 typedef GLboolean ( * PFNGLISPROGRAMPROC) (GLuint program);
85396 typedef GLboolean ( * PFNGLISSHADERPROC) (GLuint shader);
85397 typedef void ( * PFNGLLINKPROGRAMPROC) (GLuint program);
85398 typedef void ( * PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar** strings, const GLint* lengths);
85399 typedef void ( * PFNGLSTENCILFUNCSEPARATEPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
85400 typedef void ( * PFNGLSTENCILMASKSEPARATEPROC) (GLenum, GLuint);
85401 typedef void ( * PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
85402 typedef void ( * PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
85403 typedef void ( * PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat* value);
85404 typedef void ( * PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
85405 typedef void ( * PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint* value);
85406 typedef void ( * PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
85407 typedef void ( * PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat* value);
85408 typedef void ( * PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
85409 typedef void ( * PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint* value);
85410 typedef void ( * PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
85411 typedef void ( * PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat* value);
85412 typedef void ( * PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
85413 typedef void ( * PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint* value);
85414 typedef void ( * PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
85415 typedef void ( * PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat* value);
85416 typedef void ( * PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
85417 typedef void ( * PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint* value);
85418 typedef void ( * PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
85419 typedef void ( * PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
85420 typedef void ( * PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
85421 typedef void ( * PFNGLUSEPROGRAMPROC) (GLuint program);
85422 typedef void ( * PFNGLVALIDATEPROGRAMPROC) (GLuint program);
85423 typedef void ( * PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);
85424 typedef void ( * PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble* v);
85425 typedef void ( * PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
85426 typedef void ( * PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat* v);
85427 typedef void ( * PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);
85428 typedef void ( * PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort* v);
85429 typedef void ( * PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);
85430 typedef void ( * PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble* v);
85431 typedef void ( * PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
85432 typedef void ( * PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat* v);
85433 typedef void ( * PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);
85434 typedef void ( * PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort* v);
85435 typedef void ( * PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
85436 typedef void ( * PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble* v);
85437 typedef void ( * PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
85438 typedef void ( * PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat* v);
85439 typedef void ( * PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
85440 typedef void ( * PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort* v);
85441 typedef void ( * PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte* v);
85442 typedef void ( * PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint* v);
85443 typedef void ( * PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort* v);
85444 typedef void ( * PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
85445 typedef void ( * PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte* v);
85446 typedef void ( * PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint* v);
85447 typedef void ( * PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort* v);
85448 typedef void ( * PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte* v);
85449 typedef void ( * PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
85450 typedef void ( * PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble* v);
85451 typedef void ( * PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
85452 typedef void ( * PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat* v);
85453 typedef void ( * PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint* v);
85454 typedef void ( * PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
85455 typedef void ( * PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort* v);
85456 typedef void ( * PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte* v);
85457 typedef void ( * PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint* v);
85458 typedef void ( * PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort* v);
85459 typedef void ( * PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* pointer);
85460 # 1938 "/usr/include/GL/glew.h" 3 4
85461 typedef void ( * PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
85462 typedef void ( * PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
85463 typedef void ( * PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
85464 typedef void ( * PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
85465 typedef void ( * PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
85466 typedef void ( * PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
85467 # 1975 "/usr/include/GL/glew.h" 3 4
85468 typedef void ( * PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);
85469 # 2015 "/usr/include/GL/glew.h" 3 4
85470 typedef void ( * PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count);
85471 typedef void ( * PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);
85472 typedef void ( * PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const void* pointer);
85473 typedef void ( * PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint* first, const GLsizei *count, GLsizei primcount);
85474 typedef void ( * PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint* first, const GLsizei *count, GLsizei primcount);
85475 # 2039 "/usr/include/GL/glew.h" 3 4
85476 typedef void ( * PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint* fences);
85477 typedef void ( * PFNGLFINISHFENCEAPPLEPROC) (GLuint fence);
85478 typedef void ( * PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
85479 typedef void ( * PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint* fences);
85480 typedef GLboolean ( * PFNGLISFENCEAPPLEPROC) (GLuint fence);
85481 typedef void ( * PFNGLSETFENCEAPPLEPROC) (GLuint fence);
85482 typedef GLboolean ( * PFNGLTESTFENCEAPPLEPROC) (GLuint fence);
85483 typedef GLboolean ( * PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name);
85484 # 2119 "/usr/include/GL/glew.h" 3 4
85485 typedef void ( * PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC) (GLenum target, GLenum pname, GLvoid **params);
85486 typedef void ( * PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, GLvoid *pointer);
85487 # 2147 "/usr/include/GL/glew.h" 3 4
85488 typedef void ( * PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
85489 typedef void ( * PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint* arrays);
85490 typedef void ( * PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint* arrays);
85491 typedef GLboolean ( * PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
85492 # 2174 "/usr/include/GL/glew.h" 3 4
85493 typedef void ( * PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void* pointer);
85494 typedef void ( * PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param);
85495 typedef void ( * PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void* pointer);
85496 # 2210 "/usr/include/GL/glew.h" 3 4
85497 typedef void ( * PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
85498 # 2256 "/usr/include/GL/glew.h" 3 4
85499 typedef void ( * PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum* bufs);
85500 # 2405 "/usr/include/GL/glew.h" 3 4
85501 typedef void ( * PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
85502 typedef void ( * PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
85503 typedef void ( * PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
85504 typedef void ( * PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
85505 typedef void ( * PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
85506 typedef void ( * PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
85507 typedef void ( * PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
85508 typedef void ( * PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
85509 typedef void ( * PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
85510 typedef void ( * PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
85511 typedef void ( * PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
85512 typedef void ( * PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
85513 typedef void ( * PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
85514 typedef void ( * PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
85515 typedef void ( * PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
85516 typedef void ( * PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
85517 typedef void ( * PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
85518 typedef void ( * PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
85519 typedef void ( * PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
85520 typedef void ( * PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
85521 typedef void ( * PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
85522 typedef void ( * PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
85523 typedef void ( * PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
85524 typedef void ( * PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum types, GLvoid *values);
85525 typedef void ( * PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
85526 typedef void ( * PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
85527 typedef void ( * PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
85528 typedef void ( * PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
85529 typedef void ( * PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
85530 typedef void ( * PFNGLRESETHISTOGRAMPROC) (GLenum target);
85531 typedef void ( * PFNGLRESETMINMAXPROC) (GLenum target);
85532 typedef void ( * PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
85533 # 2491 "/usr/include/GL/glew.h" 3 4
85534 typedef void ( * PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index);
85535 typedef void ( * PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, GLvoid *pointer);
85536 typedef void ( * PFNGLMATRIXINDEXUBVARBPROC) (GLint size, GLubyte *indices);
85537 typedef void ( * PFNGLMATRIXINDEXUIVARBPROC) (GLint size, GLuint *indices);
85538 typedef void ( * PFNGLMATRIXINDEXUSVARBPROC) (GLint size, GLushort *indices);
85539 # 2522 "/usr/include/GL/glew.h" 3 4
85540 typedef void ( * PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert);
85541 # 2571 "/usr/include/GL/glew.h" 3 4
85542 typedef void ( * PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
85543 typedef void ( * PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
85544 typedef void ( * PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
85545 typedef void ( * PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
85546 typedef void ( * PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
85547 typedef void ( * PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
85548 typedef void ( * PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
85549 typedef void ( * PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
85550 typedef void ( * PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
85551 typedef void ( * PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
85552 typedef void ( * PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
85553 typedef void ( * PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
85554 typedef void ( * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
85555 typedef void ( * PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
85556 typedef void ( * PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
85557 typedef void ( * PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
85558 typedef void ( * PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
85559 typedef void ( * PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
85560 typedef void ( * PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
85561 typedef void ( * PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
85562 typedef void ( * PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
85563 typedef void ( * PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
85564 typedef void ( * PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
85565 typedef void ( * PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
85566 typedef void ( * PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
85567 typedef void ( * PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
85568 typedef void ( * PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
85569 typedef void ( * PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
85570 typedef void ( * PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
85571 typedef void ( * PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
85572 typedef void ( * PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
85573 typedef void ( * PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
85574 typedef void ( * PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
85575 typedef void ( * PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
85576 # 2656 "/usr/include/GL/glew.h" 3 4
85577 typedef void ( * PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id);
85578 typedef void ( * PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint* ids);
85579 typedef void ( * PFNGLENDQUERYARBPROC) (GLenum target);
85580 typedef void ( * PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint* ids);
85581 typedef void ( * PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint* params);
85582 typedef void ( * PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint* params);
85583 typedef void ( * PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint* params);
85584 typedef GLboolean ( * PFNGLISQUERYARBPROC) (GLuint id);
85585 # 2702 "/usr/include/GL/glew.h" 3 4
85586 typedef void ( * PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);
85587 typedef void ( * PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, GLfloat* params);
85588 # 2764 "/usr/include/GL/glew.h" 3 4
85589 typedef char GLcharARB;
85590 typedef unsigned int GLhandleARB;
85591
85592 typedef void ( * PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);
85593 typedef void ( * PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);
85594 typedef GLhandleARB ( * PFNGLCREATEPROGRAMOBJECTARBPROC) (void);
85595 typedef GLhandleARB ( * PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);
85596 typedef void ( * PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);
85597 typedef void ( * PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj);
85598 typedef void ( * PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei* length, GLint *size, GLenum *type, GLcharARB *name);
85599 typedef void ( * PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei* count, GLhandleARB *obj);
85600 typedef GLhandleARB ( * PFNGLGETHANDLEARBPROC) (GLenum pname);
85601 typedef void ( * PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei* length, GLcharARB *infoLog);
85602 typedef void ( * PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat* params);
85603 typedef void ( * PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint* params);
85604 typedef void ( * PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei* length, GLcharARB *source);
85605 typedef GLint ( * PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB* name);
85606 typedef void ( * PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat* params);
85607 typedef void ( * PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint* params);
85608 typedef void ( * PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);
85609 typedef void ( * PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB ** string, const GLint *length);
85610 typedef void ( * PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);
85611 typedef void ( * PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat* value);
85612 typedef void ( * PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);
85613 typedef void ( * PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint* value);
85614 typedef void ( * PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);
85615 typedef void ( * PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat* value);
85616 typedef void ( * PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);
85617 typedef void ( * PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint* value);
85618 typedef void ( * PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
85619 typedef void ( * PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat* value);
85620 typedef void ( * PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);
85621 typedef void ( * PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint* value);
85622 typedef void ( * PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
85623 typedef void ( * PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat* value);
85624 typedef void ( * PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
85625 typedef void ( * PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint* value);
85626 typedef void ( * PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
85627 typedef void ( * PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
85628 typedef void ( * PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
85629 typedef void ( * PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);
85630 typedef void ( * PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj);
85631 # 2914 "/usr/include/GL/glew.h" 3 4
85632 typedef void ( * PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void* data);
85633 typedef void ( * PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data);
85634 typedef void ( * PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data);
85635 typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void* data);
85636 typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
85637 typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data);
85638 typedef void ( * PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, void* img);
85639 # 3094 "/usr/include/GL/glew.h" 3 4
85640 typedef void ( * PFNGLLOADTRANSPOSEMATRIXDARBPROC) (GLdouble m[16]);
85641 typedef void ( * PFNGLLOADTRANSPOSEMATRIXFARBPROC) (GLfloat m[16]);
85642 typedef void ( * PFNGLMULTTRANSPOSEMATRIXDARBPROC) (GLdouble m[16]);
85643 typedef void ( * PFNGLMULTTRANSPOSEMATRIXFARBPROC) (GLfloat m[16]);
85644 # 3156 "/usr/include/GL/glew.h" 3 4
85645 typedef void ( * PFNGLVERTEXBLENDARBPROC) (GLint count);
85646 typedef void ( * PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, GLvoid *pointer);
85647 typedef void ( * PFNGLWEIGHTBVARBPROC) (GLint size, GLbyte *weights);
85648 typedef void ( * PFNGLWEIGHTDVARBPROC) (GLint size, GLdouble *weights);
85649 typedef void ( * PFNGLWEIGHTFVARBPROC) (GLint size, GLfloat *weights);
85650 typedef void ( * PFNGLWEIGHTIVARBPROC) (GLint size, GLint *weights);
85651 typedef void ( * PFNGLWEIGHTSVARBPROC) (GLint size, GLshort *weights);
85652 typedef void ( * PFNGLWEIGHTUBVARBPROC) (GLint size, GLubyte *weights);
85653 typedef void ( * PFNGLWEIGHTUIVARBPROC) (GLint size, GLuint *weights);
85654 typedef void ( * PFNGLWEIGHTUSVARBPROC) (GLint size, GLushort *weights);
85655 # 3219 "/usr/include/GL/glew.h" 3 4
85656 typedef ptrdiff_t GLsizeiptrARB;
85657 typedef ptrdiff_t GLintptrARB;
85658
85659 typedef void ( * PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
85660 typedef void ( * PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid* data, GLenum usage);
85661 typedef void ( * PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid* data);
85662 typedef void ( * PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint* buffers);
85663 typedef void ( * PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint* buffers);
85664 typedef void ( * PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint* params);
85665 typedef void ( * PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid** params);
85666 typedef void ( * PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid* data);
85667 typedef GLboolean ( * PFNGLISBUFFERARBPROC) (GLuint buffer);
85668 typedef GLvoid * ( * PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);
85669 typedef GLboolean ( * PFNGLUNMAPBUFFERARBPROC) (GLenum target);
85670 # 3335 "/usr/include/GL/glew.h" 3 4
85671 typedef void ( * PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);
85672 typedef void ( * PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint* programs);
85673 typedef void ( * PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
85674 typedef void ( * PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
85675 typedef void ( * PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint* programs);
85676 typedef void ( * PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble* params);
85677 typedef void ( * PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat* params);
85678 typedef void ( * PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble* params);
85679 typedef void ( * PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat* params);
85680 typedef void ( * PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, void* string);
85681 typedef void ( * PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint* params);
85682 typedef void ( * PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid** pointer);
85683 typedef void ( * PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble* params);
85684 typedef void ( * PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat* params);
85685 typedef void ( * PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint* params);
85686 typedef GLboolean ( * PFNGLISPROGRAMARBPROC) (GLuint program);
85687 typedef void ( * PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
85688 typedef void ( * PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble* params);
85689 typedef void ( * PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
85690 typedef void ( * PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat* params);
85691 typedef void ( * PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
85692 typedef void ( * PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble* params);
85693 typedef void ( * PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
85694 typedef void ( * PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat* params);
85695 typedef void ( * PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const void* string);
85696 typedef void ( * PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);
85697 typedef void ( * PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble* v);
85698 typedef void ( * PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);
85699 typedef void ( * PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat* v);
85700 typedef void ( * PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);
85701 typedef void ( * PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort* v);
85702 typedef void ( * PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);
85703 typedef void ( * PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble* v);
85704 typedef void ( * PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);
85705 typedef void ( * PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat* v);
85706 typedef void ( * PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);
85707 typedef void ( * PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort* v);
85708 typedef void ( * PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
85709 typedef void ( * PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble* v);
85710 typedef void ( * PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
85711 typedef void ( * PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat* v);
85712 typedef void ( * PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
85713 typedef void ( * PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort* v);
85714 typedef void ( * PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte* v);
85715 typedef void ( * PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint* v);
85716 typedef void ( * PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort* v);
85717 typedef void ( * PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
85718 typedef void ( * PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte* v);
85719 typedef void ( * PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint* v);
85720 typedef void ( * PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort* v);
85721 typedef void ( * PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte* v);
85722 typedef void ( * PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
85723 typedef void ( * PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble* v);
85724 typedef void ( * PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
85725 typedef void ( * PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat* v);
85726 typedef void ( * PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint* v);
85727 typedef void ( * PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
85728 typedef void ( * PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort* v);
85729 typedef void ( * PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte* v);
85730 typedef void ( * PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint* v);
85731 typedef void ( * PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort* v);
85732 typedef void ( * PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* pointer);
85733 # 3478 "/usr/include/GL/glew.h" 3 4
85734 typedef void ( * PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB* name);
85735 typedef void ( * PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei* length, GLint *size, GLenum *type, GLcharARB *name);
85736 typedef GLint ( * PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB* name);
85737 # 3495 "/usr/include/GL/glew.h" 3 4
85738 typedef void ( * PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y);
85739 typedef void ( * PFNGLWINDOWPOS2DVARBPROC) (const GLdouble* p);
85740 typedef void ( * PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y);
85741 typedef void ( * PFNGLWINDOWPOS2FVARBPROC) (const GLfloat* p);
85742 typedef void ( * PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y);
85743 typedef void ( * PFNGLWINDOWPOS2IVARBPROC) (const GLint* p);
85744 typedef void ( * PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y);
85745 typedef void ( * PFNGLWINDOWPOS2SVARBPROC) (const GLshort* p);
85746 typedef void ( * PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z);
85747 typedef void ( * PFNGLWINDOWPOS3DVARBPROC) (const GLdouble* p);
85748 typedef void ( * PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z);
85749 typedef void ( * PFNGLWINDOWPOS3FVARBPROC) (const GLfloat* p);
85750 typedef void ( * PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z);
85751 typedef void ( * PFNGLWINDOWPOS3IVARBPROC) (const GLint* p);
85752 typedef void ( * PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z);
85753 typedef void ( * PFNGLWINDOWPOS3SVARBPROC) (const GLshort* p);
85754 # 3602 "/usr/include/GL/glew.h" 3 4
85755 typedef void ( * PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum* bufs);
85756 # 3619 "/usr/include/GL/glew.h" 3 4
85757 typedef void ( * PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count);
85758 typedef void ( * PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count);
85759 typedef void ( * PFNGLELEMENTPOINTERATIPROC) (GLenum type, const void* pointer);
85760 # 3645 "/usr/include/GL/glew.h" 3 4
85761 typedef void ( * PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);
85762 typedef void ( * PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);
85763 typedef void ( * PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);
85764 typedef void ( * PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);
85765 # 3719 "/usr/include/GL/glew.h" 3 4
85766 typedef void ( * PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
85767 typedef void ( * PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
85768 typedef void ( * PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
85769 typedef void ( * PFNGLBEGINFRAGMENTSHADERATIPROC) (void);
85770 typedef void ( * PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id);
85771 typedef void ( * PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
85772 typedef void ( * PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
85773 typedef void ( * PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
85774 typedef void ( * PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id);
85775 typedef void ( * PFNGLENDFRAGMENTSHADERATIPROC) (void);
85776 typedef GLuint ( * PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range);
85777 typedef void ( * PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle);
85778 typedef void ( * PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle);
85779 typedef void ( * PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat* value);
85780 # 3758 "/usr/include/GL/glew.h" 3 4
85781 typedef void* ( * PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer);
85782 typedef void ( * PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer);
85783 # 3783 "/usr/include/GL/glew.h" 3 4
85784 typedef void ( * PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);
85785 typedef void ( * PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);
85786 # 3803 "/usr/include/GL/glew.h" 3 4
85787 typedef void ( * PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
85788 typedef void ( * PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
85789 # 3896 "/usr/include/GL/glew.h" 3 4
85790 typedef void ( * PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
85791 typedef void ( * PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer);
85792 typedef void ( * PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat* params);
85793 typedef void ( * PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint* params);
85794 typedef void ( * PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat* params);
85795 typedef void ( * PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint* params);
85796 typedef void ( * PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat* params);
85797 typedef void ( * PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint* params);
85798 typedef GLboolean ( * PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);
85799 typedef GLuint ( * PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const void* pointer, GLenum usage);
85800 typedef void ( * PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const void* pointer, GLenum preserve);
85801 typedef void ( * PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
85802 # 3931 "/usr/include/GL/glew.h" 3 4
85803 typedef void ( * PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat* params);
85804 typedef void ( * PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint* params);
85805 typedef void ( * PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);
85806 # 3959 "/usr/include/GL/glew.h" 3 4
85807 typedef void ( * PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream);
85808 typedef void ( * PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte x, GLbyte y, GLbyte z);
85809 typedef void ( * PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *v);
85810 typedef void ( * PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
85811 typedef void ( * PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *v);
85812 typedef void ( * PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
85813 typedef void ( * PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *v);
85814 typedef void ( * PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);
85815 typedef void ( * PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *v);
85816 typedef void ( * PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);
85817 typedef void ( * PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *v);
85818 typedef void ( * PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param);
85819 typedef void ( * PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param);
85820 typedef void ( * PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y);
85821 typedef void ( * PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *v);
85822 typedef void ( * PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y);
85823 typedef void ( * PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *v);
85824 typedef void ( * PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y);
85825 typedef void ( * PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *v);
85826 typedef void ( * PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y);
85827 typedef void ( * PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *v);
85828 typedef void ( * PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
85829 typedef void ( * PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *v);
85830 typedef void ( * PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
85831 typedef void ( * PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *v);
85832 typedef void ( * PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);
85833 typedef void ( * PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *v);
85834 typedef void ( * PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);
85835 typedef void ( * PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *v);
85836 typedef void ( * PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
85837 typedef void ( * PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *v);
85838 typedef void ( * PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
85839 typedef void ( * PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *v);
85840 typedef void ( * PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w);
85841 typedef void ( * PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *v);
85842 typedef void ( * PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
85843 typedef void ( * PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *v);
85844 # 4100 "/usr/include/GL/glew.h" 3 4
85845 typedef GLint ( * PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location);
85846 typedef GLintptr ( * PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location);
85847 typedef void ( * PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer);
85848 # 4123 "/usr/include/GL/glew.h" 3 4
85849 typedef void ( * PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
85850 # 4139 "/usr/include/GL/glew.h" 3 4
85851 typedef void ( * PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha);
85852 # 4157 "/usr/include/GL/glew.h" 3 4
85853 typedef void ( * PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
85854 # 4184 "/usr/include/GL/glew.h" 3 4
85855 typedef void ( * PFNGLBLENDEQUATIONEXTPROC) (GLenum mode);
85856 # 4234 "/usr/include/GL/glew.h" 3 4
85857 typedef void ( * PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void* data);
85858 typedef void ( * PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
85859 # 4249 "/usr/include/GL/glew.h" 3 4
85860 typedef void ( * PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);
85861 typedef void ( * PFNGLUNLOCKARRAYSEXTPROC) (void);
85862 # 4285 "/usr/include/GL/glew.h" 3 4
85863 typedef void ( * PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void* image);
85864 typedef void ( * PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* image);
85865 typedef void ( * PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param);
85866 typedef void ( * PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat* params);
85867 typedef void ( * PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param);
85868 typedef void ( * PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint* params);
85869 typedef void ( * PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
85870 typedef void ( * PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
85871 typedef void ( * PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void* image);
85872 typedef void ( * PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat* params);
85873 typedef void ( * PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint* params);
85874 typedef void ( * PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void* row, void* column, void* span);
85875 typedef void ( * PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* row, const void* column);
85876 # 4337 "/usr/include/GL/glew.h" 3 4
85877 typedef void ( * PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, void* pointer);
85878 typedef void ( * PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, void* pointer);
85879 # 4352 "/usr/include/GL/glew.h" 3 4
85880 typedef void ( * PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
85881 typedef void ( * PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
85882 typedef void ( * PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
85883 typedef void ( * PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
85884 typedef void ( * PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
85885 # 4373 "/usr/include/GL/glew.h" 3 4
85886 typedef void ( * PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble* params);
85887 typedef void ( * PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat* params);
85888 # 4391 "/usr/include/GL/glew.h" 3 4
85889 typedef void ( * PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax);
85890 # 4404 "/usr/include/GL/glew.h" 3 4
85891 typedef void ( * PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
85892 typedef void ( * PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
85893 typedef void ( * PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index);
85894 typedef void ( * PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data);
85895 typedef void ( * PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data);
85896 typedef GLboolean ( * PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index);
85897 # 4427 "/usr/include/GL/glew.h" 3 4
85898 typedef void ( * PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
85899 typedef void ( * PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
85900 # 4445 "/usr/include/GL/glew.h" 3 4
85901 typedef void ( * PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
85902 # 4467 "/usr/include/GL/glew.h" 3 4
85903 typedef void ( * PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
85904 typedef void ( * PFNGLFOGCOORDDEXTPROC) (GLdouble coord);
85905 typedef void ( * PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);
85906 typedef void ( * PFNGLFOGCOORDFEXTPROC) (GLfloat coord);
85907 typedef void ( * PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);
85908 # 4503 "/usr/include/GL/glew.h" 3 4
85909 typedef void ( * PFNGLFRAGMENTCOLORMATERIALEXTPROC) (GLenum face, GLenum mode);
85910 typedef void ( * PFNGLFRAGMENTLIGHTMODELFEXTPROC) (GLenum pname, GLfloat param);
85911 typedef void ( * PFNGLFRAGMENTLIGHTMODELFVEXTPROC) (GLenum pname, GLfloat* params);
85912 typedef void ( * PFNGLFRAGMENTLIGHTMODELIEXTPROC) (GLenum pname, GLint param);
85913 typedef void ( * PFNGLFRAGMENTLIGHTMODELIVEXTPROC) (GLenum pname, GLint* params);
85914 typedef void ( * PFNGLFRAGMENTLIGHTFEXTPROC) (GLenum light, GLenum pname, GLfloat param);
85915 typedef void ( * PFNGLFRAGMENTLIGHTFVEXTPROC) (GLenum light, GLenum pname, GLfloat* params);
85916 typedef void ( * PFNGLFRAGMENTLIGHTIEXTPROC) (GLenum light, GLenum pname, GLint param);
85917 typedef void ( * PFNGLFRAGMENTLIGHTIVEXTPROC) (GLenum light, GLenum pname, GLint* params);
85918 typedef void ( * PFNGLFRAGMENTMATERIALFEXTPROC) (GLenum face, GLenum pname, const GLfloat param);
85919 typedef void ( * PFNGLFRAGMENTMATERIALFVEXTPROC) (GLenum face, GLenum pname, const GLfloat* params);
85920 typedef void ( * PFNGLFRAGMENTMATERIALIEXTPROC) (GLenum face, GLenum pname, const GLint param);
85921 typedef void ( * PFNGLFRAGMENTMATERIALIVEXTPROC) (GLenum face, GLenum pname, const GLint* params);
85922 typedef void ( * PFNGLGETFRAGMENTLIGHTFVEXTPROC) (GLenum light, GLenum pname, GLfloat* params);
85923 typedef void ( * PFNGLGETFRAGMENTLIGHTIVEXTPROC) (GLenum light, GLenum pname, GLint* params);
85924 typedef void ( * PFNGLGETFRAGMENTMATERIALFVEXTPROC) (GLenum face, GLenum pname, const GLfloat* params);
85925 typedef void ( * PFNGLGETFRAGMENTMATERIALIVEXTPROC) (GLenum face, GLenum pname, const GLint* params);
85926 typedef void ( * PFNGLLIGHTENVIEXTPROC) (GLenum pname, GLint param);
85927 # 4555 "/usr/include/GL/glew.h" 3 4
85928 typedef void ( * PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
85929 # 4570 "/usr/include/GL/glew.h" 3 4
85930 typedef void ( * PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
85931 # 4635 "/usr/include/GL/glew.h" 3 4
85932 typedef void ( * PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
85933 typedef void ( * PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
85934 typedef GLenum ( * PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
85935 typedef void ( * PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint* framebuffers);
85936 typedef void ( * PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint* renderbuffers);
85937 typedef void ( * PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
85938 typedef void ( * PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
85939 typedef void ( * PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
85940 typedef void ( * PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
85941 typedef void ( * PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint* framebuffers);
85942 typedef void ( * PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint* renderbuffers);
85943 typedef void ( * PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
85944 typedef void ( * PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint* params);
85945 typedef void ( * PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint* params);
85946 typedef GLboolean ( * PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
85947 typedef GLboolean ( * PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
85948 typedef void ( * PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
85949 # 4713 "/usr/include/GL/glew.h" 3 4
85950 typedef void ( * PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
85951 typedef void ( * PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
85952 typedef void ( * PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
85953 typedef void ( * PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
85954 # 4759 "/usr/include/GL/glew.h" 3 4
85955 typedef void ( * PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);
85956 typedef GLint ( * PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name);
85957 typedef void ( * PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params);
85958 typedef void ( * PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params);
85959 typedef void ( * PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params);
85960 typedef void ( * PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0);
85961 typedef void ( * PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
85962 typedef void ( * PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1);
85963 typedef void ( * PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
85964 typedef void ( * PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
85965 typedef void ( * PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
85966 typedef void ( * PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
85967 typedef void ( * PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);
85968 typedef void ( * PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x);
85969 typedef void ( * PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v);
85970 typedef void ( * PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x);
85971 typedef void ( * PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v);
85972 typedef void ( * PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y);
85973 typedef void ( * PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v);
85974 typedef void ( * PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y);
85975 typedef void ( * PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v);
85976 typedef void ( * PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z);
85977 typedef void ( * PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v);
85978 typedef void ( * PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
85979 typedef void ( * PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v);
85980 typedef void ( * PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v);
85981 typedef void ( * PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
85982 typedef void ( * PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v);
85983 typedef void ( * PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v);
85984 typedef void ( * PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v);
85985 typedef void ( * PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
85986 typedef void ( * PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v);
85987 typedef void ( * PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v);
85988 typedef void ( * PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
85989 # 4852 "/usr/include/GL/glew.h" 3 4
85990 typedef void ( * PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void* values);
85991 typedef void ( * PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat* params);
85992 typedef void ( * PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint* params);
85993 typedef void ( * PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void* values);
85994 typedef void ( * PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat* params);
85995 typedef void ( * PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint* params);
85996 typedef void ( * PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
85997 typedef void ( * PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink);
85998 typedef void ( * PFNGLRESETHISTOGRAMEXTPROC) (GLenum target);
85999 typedef void ( * PFNGLRESETMINMAXEXTPROC) (GLenum target);
86000 # 4892 "/usr/include/GL/glew.h" 3 4
86001 typedef void ( * PFNGLINDEXFUNCEXTPROC) (GLenum func, GLfloat ref);
86002 # 4905 "/usr/include/GL/glew.h" 3 4
86003 typedef void ( * PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);
86004 # 4938 "/usr/include/GL/glew.h" 3 4
86005 typedef void ( * PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode);
86006 typedef void ( * PFNGLTEXTURELIGHTEXTPROC) (GLenum pname);
86007 typedef void ( * PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode);
86008 # 4964 "/usr/include/GL/glew.h" 3 4
86009 typedef void ( * PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint* first, GLsizei *count, GLsizei primcount);
86010 typedef void ( * PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, GLsizei* count, GLenum type, const GLvoid **indices, GLsizei primcount);
86011 # 4997 "/usr/include/GL/glew.h" 3 4
86012 typedef void ( * PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);
86013 typedef void ( * PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);
86014 # 5078 "/usr/include/GL/glew.h" 3 4
86015 typedef void ( * PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void* data);
86016 typedef void ( * PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, void* data);
86017 typedef void ( * PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat* params);
86018 typedef void ( * PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint* params);
86019 # 5121 "/usr/include/GL/glew.h" 3 4
86020 typedef void ( * PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat* params);
86021 typedef void ( * PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint* params);
86022 typedef void ( * PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, const GLfloat param);
86023 typedef void ( * PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat* params);
86024 typedef void ( * PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, const GLint param);
86025 typedef void ( * PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint* params);
86026 # 5158 "/usr/include/GL/glew.h" 3 4
86027 typedef void ( * PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
86028 typedef void ( * PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, GLfloat* params);
86029 # 5177 "/usr/include/GL/glew.h" 3 4
86030 typedef void ( * PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias);
86031 # 5199 "/usr/include/GL/glew.h" 3 4
86032 typedef void ( * PFNGLBEGINSCENEEXTPROC) (void);
86033 typedef void ( * PFNGLENDSCENEEXTPROC) (void);
86034 # 5222 "/usr/include/GL/glew.h" 3 4
86035 typedef void ( * PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);
86036 typedef void ( * PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);
86037 typedef void ( * PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);
86038 typedef void ( * PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);
86039 typedef void ( * PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);
86040 typedef void ( * PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
86041 typedef void ( * PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);
86042 typedef void ( * PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);
86043 typedef void ( * PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);
86044 typedef void ( * PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);
86045 typedef void ( * PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
86046 typedef void ( * PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);
86047 typedef void ( * PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);
86048 typedef void ( * PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);
86049 typedef void ( * PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);
86050 typedef void ( * PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);
86051 typedef void ( * PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLvoid *pointer);
86052 # 5315 "/usr/include/GL/glew.h" 3 4
86053 typedef void ( * PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);
86054 # 5340 "/usr/include/GL/glew.h" 3 4
86055 typedef void ( * PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void* pixels);
86056 typedef void ( * PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels);
86057 typedef void ( * PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels);
86058 # 5419 "/usr/include/GL/glew.h" 3 4
86059 typedef void ( * PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels);
86060 # 5456 "/usr/include/GL/glew.h" 3 4
86061 typedef void ( * PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
86062 # 5689 "/usr/include/GL/glew.h" 3 4
86063 typedef void ( * PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha);
86064 typedef void ( * PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);
86065 typedef void ( * PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
86066 typedef void ( * PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
86067 typedef void ( * PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
86068 typedef void ( * PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
86069 # 5744 "/usr/include/GL/glew.h" 3 4
86070 typedef GLboolean ( * PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint* textures, GLboolean* residences);
86071 typedef void ( * PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture);
86072 typedef void ( * PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint* textures);
86073 typedef void ( * PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint* textures);
86074 typedef GLboolean ( * PFNGLISTEXTUREEXTPROC) (GLuint texture);
86075 typedef void ( * PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint* textures, const GLclampf* priorities);
86076 # 5770 "/usr/include/GL/glew.h" 3 4
86077 typedef void ( * PFNGLTEXTURENORMALEXTPROC) (GLenum mode);
86078 # 5838 "/usr/include/GL/glew.h" 3 4
86079 typedef void ( * PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params);
86080 typedef void ( * PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params);
86081 # 5887 "/usr/include/GL/glew.h" 3 4
86082 typedef void ( * PFNGLARRAYELEMENTEXTPROC) (GLint i);
86083 typedef void ( * PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void* pointer);
86084 typedef void ( * PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);
86085 typedef void ( * PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean* pointer);
86086 typedef void ( * PFNGLGETPOINTERVEXTPROC) (GLenum pname, void** params);
86087 typedef void ( * PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void* pointer);
86088 typedef void ( * PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void* pointer);
86089 typedef void ( * PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void* pointer);
86090 typedef void ( * PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void* pointer);
86091 # 6027 "/usr/include/GL/glew.h" 3 4
86092 typedef void ( * PFNGLBEGINVERTEXSHADEREXTPROC) (void);
86093 typedef GLuint ( * PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value);
86094 typedef GLuint ( * PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value);
86095 typedef GLuint ( * PFNGLBINDPARAMETEREXTPROC) (GLenum value);
86096 typedef GLuint ( * PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value);
86097 typedef GLuint ( * PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value);
86098 typedef void ( * PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id);
86099 typedef void ( * PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id);
86100 typedef void ( * PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
86101 typedef void ( * PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
86102 typedef void ( * PFNGLENDVERTEXSHADEREXTPROC) (void);
86103 typedef void ( * PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
86104 typedef GLuint ( * PFNGLGENSYMBOLSEXTPROC) (GLenum dataType, GLenum storageType, GLenum range, GLuint components);
86105 typedef GLuint ( * PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range);
86106 typedef void ( * PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
86107 typedef void ( * PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
86108 typedef void ( * PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
86109 typedef void ( * PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
86110 typedef void ( * PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
86111 typedef void ( * PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
86112 typedef void ( * PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
86113 typedef void ( * PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
86114 typedef void ( * PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
86115 typedef void ( * PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid **data);
86116 typedef void ( * PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
86117 typedef GLboolean ( * PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap);
86118 typedef void ( * PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, GLvoid *addr);
86119 typedef void ( * PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, GLvoid *addr);
86120 typedef void ( * PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1);
86121 typedef void ( * PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
86122 typedef void ( * PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
86123 typedef void ( * PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
86124 typedef void ( * PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, GLvoid *addr);
86125 typedef void ( * PFNGLVARIANTBVEXTPROC) (GLuint id, GLbyte *addr);
86126 typedef void ( * PFNGLVARIANTDVEXTPROC) (GLuint id, GLdouble *addr);
86127 typedef void ( * PFNGLVARIANTFVEXTPROC) (GLuint id, GLfloat *addr);
86128 typedef void ( * PFNGLVARIANTIVEXTPROC) (GLuint id, GLint *addr);
86129 typedef void ( * PFNGLVARIANTSVEXTPROC) (GLuint id, GLshort *addr);
86130 typedef void ( * PFNGLVARIANTUBVEXTPROC) (GLuint id, GLubyte *addr);
86131 typedef void ( * PFNGLVARIANTUIVEXTPROC) (GLuint id, GLuint *addr);
86132 typedef void ( * PFNGLVARIANTUSVEXTPROC) (GLuint id, GLushort *addr);
86133 typedef void ( * PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
86134 # 6136 "/usr/include/GL/glew.h" 3 4
86135 typedef void ( * PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, void* pointer);
86136 typedef void ( * PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);
86137 typedef void ( * PFNGLVERTEXWEIGHTFVEXTPROC) (GLfloat* weight);
86138 # 6153 "/usr/include/GL/glew.h" 3 4
86139 typedef void ( * PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const void* string);
86140 # 6175 "/usr/include/GL/glew.h" 3 4
86141 typedef void ( * PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat* params);
86142 typedef void ( * PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint* params);
86143 typedef void ( * PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, const GLfloat param);
86144 typedef void ( * PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat* params);
86145 typedef void ( * PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, const GLint param);
86146 typedef void ( * PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint* params);
86147 # 6230 "/usr/include/GL/glew.h" 3 4
86148 typedef void ( * PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum* mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
86149 typedef void ( * PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum* mode, const GLsizei *count, GLenum type, const GLvoid * const *indices, GLsizei primcount, GLint modestride);
86150 # 6296 "/usr/include/GL/glew.h" 3 4
86151 typedef void ( * PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid ** pointer, GLint ptrstride);
86152 typedef void ( * PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean ** pointer, GLint ptrstride);
86153 typedef void ( * PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid ** pointer, GLint ptrstride);
86154 typedef void ( * PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid ** pointer, GLint ptrstride);
86155 typedef void ( * PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid ** pointer, GLint ptrstride);
86156 typedef void ( * PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid ** pointer, GLint ptrstride);
86157 typedef void ( * PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid ** pointer, GLint ptrstride);
86158 typedef void ( * PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid ** pointer, GLint ptrstride);
86159 # 6358 "/usr/include/GL/glew.h" 3 4
86160 typedef void ( * PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const void** pointer);
86161 typedef void ( * PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const void** pointer);
86162 typedef void ( * PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const void** pointer);
86163 typedef void ( * PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const void** pointer);
86164 # 6377 "/usr/include/GL/glew.h" 3 4
86165 typedef void ( * PFNGLTEXSCISSORFUNCINTELPROC) (GLenum target, GLenum lfunc, GLenum hfunc);
86166 typedef void ( * PFNGLTEXSCISSORINTELPROC) (GLenum target, GLclampf tlow, GLclampf thigh);
86167 # 6397 "/usr/include/GL/glew.h" 3 4
86168 typedef GLuint ( * PFNGLBUFFERREGIONENABLEDEXTPROC) (void);
86169 typedef void ( * PFNGLDELETEBUFFERREGIONEXTPROC) (GLenum region);
86170 typedef void ( * PFNGLDRAWBUFFERREGIONEXTPROC) (GLuint region, GLint x, GLint y, GLsizei width, GLsizei height, GLint xDest, GLint yDest);
86171 typedef GLuint ( * PFNGLNEWBUFFERREGIONEXTPROC) (GLenum region);
86172 typedef void ( * PFNGLREADBUFFERREGIONEXTPROC) (GLuint region, GLint x, GLint y, GLsizei width, GLsizei height);
86173 # 6445 "/usr/include/GL/glew.h" 3 4
86174 typedef void ( * PFNGLRESIZEBUFFERSMESAPROC) (void);
86175 # 6458 "/usr/include/GL/glew.h" 3 4
86176 typedef void ( * PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y);
86177 typedef void ( * PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble* p);
86178 typedef void ( * PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y);
86179 typedef void ( * PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat* p);
86180 typedef void ( * PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y);
86181 typedef void ( * PFNGLWINDOWPOS2IVMESAPROC) (const GLint* p);
86182 typedef void ( * PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y);
86183 typedef void ( * PFNGLWINDOWPOS2SVMESAPROC) (const GLshort* p);
86184 typedef void ( * PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z);
86185 typedef void ( * PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble* p);
86186 typedef void ( * PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z);
86187 typedef void ( * PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat* p);
86188 typedef void ( * PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z);
86189 typedef void ( * PFNGLWINDOWPOS3IVMESAPROC) (const GLint* p);
86190 typedef void ( * PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z);
86191 typedef void ( * PFNGLWINDOWPOS3SVMESAPROC) (const GLshort* p);
86192 typedef void ( * PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble);
86193 typedef void ( * PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble* p);
86194 typedef void ( * PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
86195 typedef void ( * PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat* p);
86196 typedef void ( * PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w);
86197 typedef void ( * PFNGLWINDOWPOS4IVMESAPROC) (const GLint* p);
86198 typedef void ( * PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w);
86199 typedef void ( * PFNGLWINDOWPOS4SVMESAPROC) (const GLshort* p);
86200 # 6556 "/usr/include/GL/glew.h" 3 4
86201 typedef void ( * PFNGLCLEARDEPTHDNVPROC) (GLdouble depth);
86202 typedef void ( * PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax);
86203 typedef void ( * PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar);
86204 # 6609 "/usr/include/GL/glew.h" 3 4
86205 typedef void ( * PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);
86206 typedef void ( * PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat* params);
86207 typedef void ( * PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint* params);
86208 typedef void ( * PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void* points);
86209 typedef void ( * PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat* params);
86210 typedef void ( * PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint* params);
86211 typedef void ( * PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void* points);
86212 typedef void ( * PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat* params);
86213 typedef void ( * PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint* params);
86214 # 6642 "/usr/include/GL/glew.h" 3 4
86215 typedef void ( * PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint* fences);
86216 typedef void ( * PFNGLFINISHFENCENVPROC) (GLuint fence);
86217 typedef void ( * PFNGLGENFENCESNVPROC) (GLsizei n, GLuint* fences);
86218 typedef void ( * PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint* params);
86219 typedef GLboolean ( * PFNGLISFENCENVPROC) (GLuint fence);
86220 typedef void ( * PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
86221 typedef GLboolean ( * PFNGLTESTFENCENVPROC) (GLuint fence);
86222 # 6712 "/usr/include/GL/glew.h" 3 4
86223 typedef void ( * PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte* name, GLdouble *params);
86224 typedef void ( * PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte* name, GLfloat *params);
86225 typedef void ( * PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte* name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
86226 typedef void ( * PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte* name, const GLdouble v[]);
86227 typedef void ( * PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte* name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
86228 typedef void ( * PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte* name, const GLfloat v[]);
86229 # 6775 "/usr/include/GL/glew.h" 3 4
86230 typedef void ( * PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);
86231 # 6792 "/usr/include/GL/glew.h" 3 4
86232 typedef void ( * PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit);
86233 # 6814 "/usr/include/GL/glew.h" 3 4
86234 typedef void ( * PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
86235 typedef void ( * PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
86236 typedef void ( * PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
86237 typedef void ( * PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
86238 typedef void ( * PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
86239 typedef void ( * PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
86240 typedef void ( * PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);
86241 typedef void ( * PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);
86242 typedef void ( * PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
86243 typedef void ( * PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);
86244 typedef void ( * PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);
86245 typedef void ( * PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);
86246 # 6851 "/usr/include/GL/glew.h" 3 4
86247 typedef unsigned short GLhalf;
86248
86249 typedef void ( * PFNGLCOLOR3HNVPROC) (GLhalf red, GLhalf green, GLhalf blue);
86250 typedef void ( * PFNGLCOLOR3HVNVPROC) (const GLhalf* v);
86251 typedef void ( * PFNGLCOLOR4HNVPROC) (GLhalf red, GLhalf green, GLhalf blue, GLhalf alpha);
86252 typedef void ( * PFNGLCOLOR4HVNVPROC) (const GLhalf* v);
86253 typedef void ( * PFNGLFOGCOORDHNVPROC) (GLhalf fog);
86254 typedef void ( * PFNGLFOGCOORDHVNVPROC) (const GLhalf* fog);
86255 typedef void ( * PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalf s);
86256 typedef void ( * PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalf* v);
86257 typedef void ( * PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalf s, GLhalf t);
86258 typedef void ( * PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalf* v);
86259 typedef void ( * PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalf s, GLhalf t, GLhalf r);
86260 typedef void ( * PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalf* v);
86261 typedef void ( * PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalf s, GLhalf t, GLhalf r, GLhalf q);
86262 typedef void ( * PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalf* v);
86263 typedef void ( * PFNGLNORMAL3HNVPROC) (GLhalf nx, GLhalf ny, GLhalf nz);
86264 typedef void ( * PFNGLNORMAL3HVNVPROC) (const GLhalf* v);
86265 typedef void ( * PFNGLSECONDARYCOLOR3HNVPROC) (GLhalf red, GLhalf green, GLhalf blue);
86266 typedef void ( * PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalf* v);
86267 typedef void ( * PFNGLTEXCOORD1HNVPROC) (GLhalf s);
86268 typedef void ( * PFNGLTEXCOORD1HVNVPROC) (const GLhalf* v);
86269 typedef void ( * PFNGLTEXCOORD2HNVPROC) (GLhalf s, GLhalf t);
86270 typedef void ( * PFNGLTEXCOORD2HVNVPROC) (const GLhalf* v);
86271 typedef void ( * PFNGLTEXCOORD3HNVPROC) (GLhalf s, GLhalf t, GLhalf r);
86272 typedef void ( * PFNGLTEXCOORD3HVNVPROC) (const GLhalf* v);
86273 typedef void ( * PFNGLTEXCOORD4HNVPROC) (GLhalf s, GLhalf t, GLhalf r, GLhalf q);
86274 typedef void ( * PFNGLTEXCOORD4HVNVPROC) (const GLhalf* v);
86275 typedef void ( * PFNGLVERTEX2HNVPROC) (GLhalf x, GLhalf y);
86276 typedef void ( * PFNGLVERTEX2HVNVPROC) (const GLhalf* v);
86277 typedef void ( * PFNGLVERTEX3HNVPROC) (GLhalf x, GLhalf y, GLhalf z);
86278 typedef void ( * PFNGLVERTEX3HVNVPROC) (const GLhalf* v);
86279 typedef void ( * PFNGLVERTEX4HNVPROC) (GLhalf x, GLhalf y, GLhalf z, GLhalf w);
86280 typedef void ( * PFNGLVERTEX4HVNVPROC) (const GLhalf* v);
86281 typedef void ( * PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalf x);
86282 typedef void ( * PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalf* v);
86283 typedef void ( * PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalf x, GLhalf y);
86284 typedef void ( * PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalf* v);
86285 typedef void ( * PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalf x, GLhalf y, GLhalf z);
86286 typedef void ( * PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalf* v);
86287 typedef void ( * PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalf x, GLhalf y, GLhalf z, GLhalf w);
86288 typedef void ( * PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalf* v);
86289 typedef void ( * PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalf* v);
86290 typedef void ( * PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalf* v);
86291 typedef void ( * PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalf* v);
86292 typedef void ( * PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalf* v);
86293 typedef void ( * PFNGLVERTEXWEIGHTHNVPROC) (GLhalf weight);
86294 typedef void ( * PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalf* weight);
86295 # 6984 "/usr/include/GL/glew.h" 3 4
86296 typedef void ( * PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);
86297 typedef void ( * PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint* ids);
86298 typedef void ( * PFNGLENDOCCLUSIONQUERYNVPROC) (void);
86299 typedef void ( * PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint* ids);
86300 typedef void ( * PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint* params);
86301 typedef void ( * PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint* params);
86302 typedef GLboolean ( * PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);
86303 # 7027 "/usr/include/GL/glew.h" 3 4
86304 typedef void ( * PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params);
86305 typedef void ( * PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params);
86306 typedef void ( * PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params);
86307 # 7051 "/usr/include/GL/glew.h" 3 4
86308 typedef void ( * PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target);
86309 typedef void ( * PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, void* pointer);
86310 # 7070 "/usr/include/GL/glew.h" 3 4
86311 typedef void ( * PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param);
86312 typedef void ( * PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint* params);
86313 # 7088 "/usr/include/GL/glew.h" 3 4
86314 typedef void ( * PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index);
86315 typedef void ( * PFNGLPRIMITIVERESTARTNVPROC) (void);
86316 # 7155 "/usr/include/GL/glew.h" 3 4
86317 typedef void ( * PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
86318 typedef void ( * PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
86319 typedef void ( * PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
86320 typedef void ( * PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat* params);
86321 typedef void ( * PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
86322 typedef void ( * PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint* params);
86323 typedef void ( * PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
86324 typedef void ( * PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat* params);
86325 typedef void ( * PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint* params);
86326 typedef void ( * PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat* params);
86327 typedef void ( * PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint* params);
86328 typedef void ( * PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat* params);
86329 typedef void ( * PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint* params);
86330 # 7194 "/usr/include/GL/glew.h" 3 4
86331 typedef void ( * PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat* params);
86332 typedef void ( * PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat* params);
86333 # 7454 "/usr/include/GL/glew.h" 3 4
86334 typedef void ( * PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name);
86335 typedef void ( * PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode);
86336 typedef void ( * PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer);
86337 typedef void ( * PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
86338 typedef void ( * PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
86339 typedef void ( * PFNGLENDTRANSFORMFEEDBACKNVPROC) (void);
86340 typedef void ( * PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
86341 typedef void ( * PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location);
86342 typedef GLint ( * PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name);
86343 typedef void ( * PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode);
86344 typedef void ( * PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
86345 # 7493 "/usr/include/GL/glew.h" 3 4
86346 typedef void ( * PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);
86347 typedef void ( * PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, void* pointer);
86348 # 7603 "/usr/include/GL/glew.h" 3 4
86349 typedef GLboolean ( * PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint* ids, GLboolean *residences);
86350 typedef void ( * PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);
86351 typedef void ( * PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint* ids);
86352 typedef void ( * PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat* params);
86353 typedef void ( * PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint* ids);
86354 typedef void ( * PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble* params);
86355 typedef void ( * PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat* params);
86356 typedef void ( * PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte* program);
86357 typedef void ( * PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint* params);
86358 typedef void ( * PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint* params);
86359 typedef void ( * PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid** pointer);
86360 typedef void ( * PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble* params);
86361 typedef void ( * PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat* params);
86362 typedef void ( * PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint* params);
86363 typedef GLboolean ( * PFNGLISPROGRAMNVPROC) (GLuint id);
86364 typedef void ( * PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte* program);
86365 typedef void ( * PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
86366 typedef void ( * PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble* params);
86367 typedef void ( * PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
86368 typedef void ( * PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat* params);
86369 typedef void ( * PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint num, const GLdouble* params);
86370 typedef void ( * PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint num, const GLfloat* params);
86371 typedef void ( * PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, GLuint* ids);
86372 typedef void ( * PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);
86373 typedef void ( * PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);
86374 typedef void ( * PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble* v);
86375 typedef void ( * PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);
86376 typedef void ( * PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat* v);
86377 typedef void ( * PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);
86378 typedef void ( * PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort* v);
86379 typedef void ( * PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);
86380 typedef void ( * PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble* v);
86381 typedef void ( * PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);
86382 typedef void ( * PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat* v);
86383 typedef void ( * PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);
86384 typedef void ( * PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort* v);
86385 typedef void ( * PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
86386 typedef void ( * PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble* v);
86387 typedef void ( * PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
86388 typedef void ( * PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat* v);
86389 typedef void ( * PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
86390 typedef void ( * PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort* v);
86391 typedef void ( * PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
86392 typedef void ( * PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble* v);
86393 typedef void ( * PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
86394 typedef void ( * PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat* v);
86395 typedef void ( * PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
86396 typedef void ( * PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort* v);
86397 typedef void ( * PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
86398 typedef void ( * PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte* v);
86399 typedef void ( * PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void* pointer);
86400 typedef void ( * PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei n, const GLdouble* v);
86401 typedef void ( * PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei n, const GLfloat* v);
86402 typedef void ( * PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei n, const GLshort* v);
86403 typedef void ( * PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei n, const GLdouble* v);
86404 typedef void ( * PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei n, const GLfloat* v);
86405 typedef void ( * PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei n, const GLshort* v);
86406 typedef void ( * PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei n, const GLdouble* v);
86407 typedef void ( * PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei n, const GLfloat* v);
86408 typedef void ( * PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei n, const GLshort* v);
86409 typedef void ( * PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei n, const GLdouble* v);
86410 typedef void ( * PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei n, const GLfloat* v);
86411 typedef void ( * PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei n, const GLshort* v);
86412 typedef void ( * PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei n, const GLubyte* v);
86413 # 7835 "/usr/include/GL/glew.h" 3 4
86414 typedef void ( * PFNGLCLEARDEPTHFOESPROC) (GLclampd depth);
86415 typedef void ( * PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat* equation);
86416 typedef void ( * PFNGLDEPTHRANGEFOESPROC) (GLclampf n, GLclampf f);
86417 typedef void ( * PFNGLFRUSTUMFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
86418 typedef void ( * PFNGLGETCLIPPLANEFOESPROC) (GLenum plane, GLfloat* equation);
86419 typedef void ( * PFNGLORTHOFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
86420 # 8007 "/usr/include/GL/glew.h" 3 4
86421 typedef void ( * PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat* points);
86422 typedef void ( * PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat* points);
86423 # 8022 "/usr/include/GL/glew.h" 3 4
86424 typedef void ( * PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat* points);
86425 typedef void ( * PFNGLGETFOGFUNCSGISPROC) (GLfloat* points);
86426 # 8067 "/usr/include/GL/glew.h" 3 4
86427 typedef void ( * PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert);
86428 typedef void ( * PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern);
86429 # 8091 "/usr/include/GL/glew.h" 3 4
86430 typedef void ( * PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat* points);
86431 typedef void ( * PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat* points);
86432 # 8106 "/usr/include/GL/glew.h" 3 4
86433 typedef void ( * PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLint border, GLenum format, GLenum type, const void* pixels);
86434 typedef void ( * PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLenum format, GLenum type, const void* pixels);
86435 # 8143 "/usr/include/GL/glew.h" 3 4
86436 typedef void ( * PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat* weights);
86437 typedef void ( * PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat* weights);
86438 # 8183 "/usr/include/GL/glew.h" 3 4
86439 typedef void ( * PFNGLASYNCMARKERSGIXPROC) (GLuint marker);
86440 typedef void ( * PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);
86441 typedef GLint ( * PFNGLFINISHASYNCSGIXPROC) (GLuint* markerp);
86442 typedef GLuint ( * PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);
86443 typedef GLboolean ( * PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);
86444 typedef GLint ( * PFNGLPOLLASYNCSGIXPROC) (GLuint* markerp);
86445 # 8268 "/usr/include/GL/glew.h" 3 4
86446 typedef void ( * PFNGLFLUSHRASTERSGIXPROC) (void);
86447 # 8297 "/usr/include/GL/glew.h" 3 4
86448 typedef void ( * PFNGLTEXTUREFOGSGIXPROC) (GLenum pname);
86449 # 8310 "/usr/include/GL/glew.h" 3 4
86450 typedef void ( * PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode);
86451 typedef void ( * PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param);
86452 typedef void ( * PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, GLfloat* params);
86453 typedef void ( * PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param);
86454 typedef void ( * PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, GLint* params);
86455 typedef void ( * PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param);
86456 typedef void ( * PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat* params);
86457 typedef void ( * PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param);
86458 typedef void ( * PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint* params);
86459 typedef void ( * PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, const GLfloat param);
86460 typedef void ( * PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat* params);
86461 typedef void ( * PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, const GLint param);
86462 typedef void ( * PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint* params);
86463 typedef void ( * PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum value, GLfloat* data);
86464 typedef void ( * PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum value, GLint* data);
86465 typedef void ( * PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat* data);
86466 typedef void ( * PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint* data);
86467 # 8355 "/usr/include/GL/glew.h" 3 4
86468 typedef void ( * PFNGLFRAMEZOOMSGIXPROC) (GLint factor);
86469 # 8397 "/usr/include/GL/glew.h" 3 4
86470 typedef void ( * PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);
86471 # 8419 "/usr/include/GL/glew.h" 3 4
86472 typedef void ( * PFNGLREFERENCEPLANESGIXPROC) (const GLdouble* equation);
86473 # 8472 "/usr/include/GL/glew.h" 3 4
86474 typedef void ( * PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param);
86475 typedef void ( * PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, GLfloat* params);
86476 typedef void ( * PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param);
86477 typedef void ( * PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, GLint* params);
86478 # 8491 "/usr/include/GL/glew.h" 3 4
86479 typedef void ( * PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);
86480 # 8669 "/usr/include/GL/glew.h" 3 4
86481 typedef void ( * PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat* params);
86482 typedef void ( * PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint* params);
86483 typedef void ( * PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void* table);
86484 typedef void ( * PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
86485 typedef void ( * PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat* params);
86486 typedef void ( * PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint* params);
86487 typedef void ( * PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, void* table);
86488 # 8709 "/usr/include/GL/glew.h" 3 4
86489 typedef void ( * PFNGLFINISHTEXTURESUNXPROC) (void);
86490 # 8736 "/usr/include/GL/glew.h" 3 4
86491 typedef void ( * PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor);
86492 typedef void ( * PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor);
86493 typedef void ( * PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor);
86494 typedef void ( * PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor);
86495 typedef void ( * PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor);
86496 typedef void ( * PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor);
86497 typedef void ( * PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor);
86498 typedef void ( * PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor);
86499 # 8775 "/usr/include/GL/glew.h" 3 4
86500 typedef void ( * PFNGLREADVIDEOPIXELSSUNPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
86501 # 8817 "/usr/include/GL/glew.h" 3 4
86502 typedef void ( * PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const void* pointer);
86503 typedef void ( * PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code);
86504 typedef void ( * PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte* code);
86505 typedef void ( * PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code);
86506 typedef void ( * PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint* code);
86507 typedef void ( * PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code);
86508 typedef void ( * PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort* code);
86509 # 8842 "/usr/include/GL/glew.h" 3 4
86510 typedef void ( * PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
86511 typedef void ( * PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat* c, const GLfloat *v);
86512 typedef void ( * PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
86513 typedef void ( * PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat* c, const GLfloat *n, const GLfloat *v);
86514 typedef void ( * PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
86515 typedef void ( * PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte* c, const GLfloat *v);
86516 typedef void ( * PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
86517 typedef void ( * PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte* c, const GLfloat *v);
86518 typedef void ( * PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
86519 typedef void ( * PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat* n, const GLfloat *v);
86520 typedef void ( * PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
86521 typedef void ( * PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *c, const GLfloat *v);
86522 typedef void ( * PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
86523 typedef void ( * PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
86524 typedef void ( * PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
86525 typedef void ( * PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint* rc, const GLubyte *c, const GLfloat *v);
86526 typedef void ( * PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
86527 typedef void ( * PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *n, const GLfloat *v);
86528 typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
86529 typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
86530 typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
86531 typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
86532 typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
86533 typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *tc, const GLfloat *v);
86534 typedef void ( * PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z);
86535 typedef void ( * PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *v);
86536 typedef void ( * PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
86537 typedef void ( * PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat* tc, const GLfloat *c, const GLfloat *v);
86538 typedef void ( * PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
86539 typedef void ( * PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat* tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
86540 typedef void ( * PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
86541 typedef void ( * PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat* tc, const GLubyte *c, const GLfloat *v);
86542 typedef void ( * PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
86543 typedef void ( * PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat* tc, const GLfloat *n, const GLfloat *v);
86544 typedef void ( * PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
86545 typedef void ( * PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat* tc, const GLfloat *v);
86546 typedef void ( * PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
86547 typedef void ( * PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat* tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
86548 typedef void ( * PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
86549 typedef void ( * PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat* tc, const GLfloat *v);
86550 # 8956 "/usr/include/GL/glew.h" 3 4
86551 typedef void ( * PFNGLADDSWAPHINTRECTWINPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
86552 # 8983 "/usr/include/GL/glew.h" 3 4
86553 extern PFNGLCOPYTEXSUBIMAGE3DPROC __glewCopyTexSubImage3D;
86554 extern PFNGLDRAWRANGEELEMENTSPROC __glewDrawRangeElements;
86555 extern PFNGLTEXIMAGE3DPROC __glewTexImage3D;
86556 extern PFNGLTEXSUBIMAGE3DPROC __glewTexSubImage3D;
86557
86558 extern PFNGLACTIVETEXTUREPROC __glewActiveTexture;
86559 extern PFNGLCLIENTACTIVETEXTUREPROC __glewClientActiveTexture;
86560 extern PFNGLCOMPRESSEDTEXIMAGE1DPROC __glewCompressedTexImage1D;
86561 extern PFNGLCOMPRESSEDTEXIMAGE2DPROC __glewCompressedTexImage2D;
86562 extern PFNGLCOMPRESSEDTEXIMAGE3DPROC __glewCompressedTexImage3D;
86563 extern PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC __glewCompressedTexSubImage1D;
86564 extern PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC __glewCompressedTexSubImage2D;
86565 extern PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC __glewCompressedTexSubImage3D;
86566 extern PFNGLGETCOMPRESSEDTEXIMAGEPROC __glewGetCompressedTexImage;
86567 extern PFNGLLOADTRANSPOSEMATRIXDPROC __glewLoadTransposeMatrixd;
86568 extern PFNGLLOADTRANSPOSEMATRIXFPROC __glewLoadTransposeMatrixf;
86569 extern PFNGLMULTTRANSPOSEMATRIXDPROC __glewMultTransposeMatrixd;
86570 extern PFNGLMULTTRANSPOSEMATRIXFPROC __glewMultTransposeMatrixf;
86571 extern PFNGLMULTITEXCOORD1DPROC __glewMultiTexCoord1d;
86572 extern PFNGLMULTITEXCOORD1DVPROC __glewMultiTexCoord1dv;
86573 extern PFNGLMULTITEXCOORD1FPROC __glewMultiTexCoord1f;
86574 extern PFNGLMULTITEXCOORD1FVPROC __glewMultiTexCoord1fv;
86575 extern PFNGLMULTITEXCOORD1IPROC __glewMultiTexCoord1i;
86576 extern PFNGLMULTITEXCOORD1IVPROC __glewMultiTexCoord1iv;
86577 extern PFNGLMULTITEXCOORD1SPROC __glewMultiTexCoord1s;
86578 extern PFNGLMULTITEXCOORD1SVPROC __glewMultiTexCoord1sv;
86579 extern PFNGLMULTITEXCOORD2DPROC __glewMultiTexCoord2d;
86580 extern PFNGLMULTITEXCOORD2DVPROC __glewMultiTexCoord2dv;
86581 extern PFNGLMULTITEXCOORD2FPROC __glewMultiTexCoord2f;
86582 extern PFNGLMULTITEXCOORD2FVPROC __glewMultiTexCoord2fv;
86583 extern PFNGLMULTITEXCOORD2IPROC __glewMultiTexCoord2i;
86584 extern PFNGLMULTITEXCOORD2IVPROC __glewMultiTexCoord2iv;
86585 extern PFNGLMULTITEXCOORD2SPROC __glewMultiTexCoord2s;
86586 extern PFNGLMULTITEXCOORD2SVPROC __glewMultiTexCoord2sv;
86587 extern PFNGLMULTITEXCOORD3DPROC __glewMultiTexCoord3d;
86588 extern PFNGLMULTITEXCOORD3DVPROC __glewMultiTexCoord3dv;
86589 extern PFNGLMULTITEXCOORD3FPROC __glewMultiTexCoord3f;
86590 extern PFNGLMULTITEXCOORD3FVPROC __glewMultiTexCoord3fv;
86591 extern PFNGLMULTITEXCOORD3IPROC __glewMultiTexCoord3i;
86592 extern PFNGLMULTITEXCOORD3IVPROC __glewMultiTexCoord3iv;
86593 extern PFNGLMULTITEXCOORD3SPROC __glewMultiTexCoord3s;
86594 extern PFNGLMULTITEXCOORD3SVPROC __glewMultiTexCoord3sv;
86595 extern PFNGLMULTITEXCOORD4DPROC __glewMultiTexCoord4d;
86596 extern PFNGLMULTITEXCOORD4DVPROC __glewMultiTexCoord4dv;
86597 extern PFNGLMULTITEXCOORD4FPROC __glewMultiTexCoord4f;
86598 extern PFNGLMULTITEXCOORD4FVPROC __glewMultiTexCoord4fv;
86599 extern PFNGLMULTITEXCOORD4IPROC __glewMultiTexCoord4i;
86600 extern PFNGLMULTITEXCOORD4IVPROC __glewMultiTexCoord4iv;
86601 extern PFNGLMULTITEXCOORD4SPROC __glewMultiTexCoord4s;
86602 extern PFNGLMULTITEXCOORD4SVPROC __glewMultiTexCoord4sv;
86603 extern PFNGLSAMPLECOVERAGEPROC __glewSampleCoverage;
86604
86605 extern PFNGLBLENDCOLORPROC __glewBlendColor;
86606 extern PFNGLBLENDEQUATIONPROC __glewBlendEquation;
86607 extern PFNGLBLENDFUNCSEPARATEPROC __glewBlendFuncSeparate;
86608 extern PFNGLFOGCOORDPOINTERPROC __glewFogCoordPointer;
86609 extern PFNGLFOGCOORDDPROC __glewFogCoordd;
86610 extern PFNGLFOGCOORDDVPROC __glewFogCoorddv;
86611 extern PFNGLFOGCOORDFPROC __glewFogCoordf;
86612 extern PFNGLFOGCOORDFVPROC __glewFogCoordfv;
86613 extern PFNGLMULTIDRAWARRAYSPROC __glewMultiDrawArrays;
86614 extern PFNGLMULTIDRAWELEMENTSPROC __glewMultiDrawElements;
86615 extern PFNGLPOINTPARAMETERFPROC __glewPointParameterf;
86616 extern PFNGLPOINTPARAMETERFVPROC __glewPointParameterfv;
86617 extern PFNGLSECONDARYCOLOR3BPROC __glewSecondaryColor3b;
86618 extern PFNGLSECONDARYCOLOR3BVPROC __glewSecondaryColor3bv;
86619 extern PFNGLSECONDARYCOLOR3DPROC __glewSecondaryColor3d;
86620 extern PFNGLSECONDARYCOLOR3DVPROC __glewSecondaryColor3dv;
86621 extern PFNGLSECONDARYCOLOR3FPROC __glewSecondaryColor3f;
86622 extern PFNGLSECONDARYCOLOR3FVPROC __glewSecondaryColor3fv;
86623 extern PFNGLSECONDARYCOLOR3IPROC __glewSecondaryColor3i;
86624 extern PFNGLSECONDARYCOLOR3IVPROC __glewSecondaryColor3iv;
86625 extern PFNGLSECONDARYCOLOR3SPROC __glewSecondaryColor3s;
86626 extern PFNGLSECONDARYCOLOR3SVPROC __glewSecondaryColor3sv;
86627 extern PFNGLSECONDARYCOLOR3UBPROC __glewSecondaryColor3ub;
86628 extern PFNGLSECONDARYCOLOR3UBVPROC __glewSecondaryColor3ubv;
86629 extern PFNGLSECONDARYCOLOR3UIPROC __glewSecondaryColor3ui;
86630 extern PFNGLSECONDARYCOLOR3UIVPROC __glewSecondaryColor3uiv;
86631 extern PFNGLSECONDARYCOLOR3USPROC __glewSecondaryColor3us;
86632 extern PFNGLSECONDARYCOLOR3USVPROC __glewSecondaryColor3usv;
86633 extern PFNGLSECONDARYCOLORPOINTERPROC __glewSecondaryColorPointer;
86634 extern PFNGLWINDOWPOS2DPROC __glewWindowPos2d;
86635 extern PFNGLWINDOWPOS2DVPROC __glewWindowPos2dv;
86636 extern PFNGLWINDOWPOS2FPROC __glewWindowPos2f;
86637 extern PFNGLWINDOWPOS2FVPROC __glewWindowPos2fv;
86638 extern PFNGLWINDOWPOS2IPROC __glewWindowPos2i;
86639 extern PFNGLWINDOWPOS2IVPROC __glewWindowPos2iv;
86640 extern PFNGLWINDOWPOS2SPROC __glewWindowPos2s;
86641 extern PFNGLWINDOWPOS2SVPROC __glewWindowPos2sv;
86642 extern PFNGLWINDOWPOS3DPROC __glewWindowPos3d;
86643 extern PFNGLWINDOWPOS3DVPROC __glewWindowPos3dv;
86644 extern PFNGLWINDOWPOS3FPROC __glewWindowPos3f;
86645 extern PFNGLWINDOWPOS3FVPROC __glewWindowPos3fv;
86646 extern PFNGLWINDOWPOS3IPROC __glewWindowPos3i;
86647 extern PFNGLWINDOWPOS3IVPROC __glewWindowPos3iv;
86648 extern PFNGLWINDOWPOS3SPROC __glewWindowPos3s;
86649 extern PFNGLWINDOWPOS3SVPROC __glewWindowPos3sv;
86650
86651 extern PFNGLBEGINQUERYPROC __glewBeginQuery;
86652 extern PFNGLBINDBUFFERPROC __glewBindBuffer;
86653 extern PFNGLBUFFERDATAPROC __glewBufferData;
86654 extern PFNGLBUFFERSUBDATAPROC __glewBufferSubData;
86655 extern PFNGLDELETEBUFFERSPROC __glewDeleteBuffers;
86656 extern PFNGLDELETEQUERIESPROC __glewDeleteQueries;
86657 extern PFNGLENDQUERYPROC __glewEndQuery;
86658 extern PFNGLGENBUFFERSPROC __glewGenBuffers;
86659 extern PFNGLGENQUERIESPROC __glewGenQueries;
86660 extern PFNGLGETBUFFERPARAMETERIVPROC __glewGetBufferParameteriv;
86661 extern PFNGLGETBUFFERPOINTERVPROC __glewGetBufferPointerv;
86662 extern PFNGLGETBUFFERSUBDATAPROC __glewGetBufferSubData;
86663 extern PFNGLGETQUERYOBJECTIVPROC __glewGetQueryObjectiv;
86664 extern PFNGLGETQUERYOBJECTUIVPROC __glewGetQueryObjectuiv;
86665 extern PFNGLGETQUERYIVPROC __glewGetQueryiv;
86666 extern PFNGLISBUFFERPROC __glewIsBuffer;
86667 extern PFNGLISQUERYPROC __glewIsQuery;
86668 extern PFNGLMAPBUFFERPROC __glewMapBuffer;
86669 extern PFNGLUNMAPBUFFERPROC __glewUnmapBuffer;
86670
86671 extern PFNGLATTACHSHADERPROC __glewAttachShader;
86672 extern PFNGLBINDATTRIBLOCATIONPROC __glewBindAttribLocation;
86673 extern PFNGLBLENDEQUATIONSEPARATEPROC __glewBlendEquationSeparate;
86674 extern PFNGLCOMPILESHADERPROC __glewCompileShader;
86675 extern PFNGLCREATEPROGRAMPROC __glewCreateProgram;
86676 extern PFNGLCREATESHADERPROC __glewCreateShader;
86677 extern PFNGLDELETEPROGRAMPROC __glewDeleteProgram;
86678 extern PFNGLDELETESHADERPROC __glewDeleteShader;
86679 extern PFNGLDETACHSHADERPROC __glewDetachShader;
86680 extern PFNGLDISABLEVERTEXATTRIBARRAYPROC __glewDisableVertexAttribArray;
86681 extern PFNGLDRAWBUFFERSPROC __glewDrawBuffers;
86682 extern PFNGLENABLEVERTEXATTRIBARRAYPROC __glewEnableVertexAttribArray;
86683 extern PFNGLGETACTIVEATTRIBPROC __glewGetActiveAttrib;
86684 extern PFNGLGETACTIVEUNIFORMPROC __glewGetActiveUniform;
86685 extern PFNGLGETATTACHEDSHADERSPROC __glewGetAttachedShaders;
86686 extern PFNGLGETATTRIBLOCATIONPROC __glewGetAttribLocation;
86687 extern PFNGLGETPROGRAMINFOLOGPROC __glewGetProgramInfoLog;
86688 extern PFNGLGETPROGRAMIVPROC __glewGetProgramiv;
86689 extern PFNGLGETSHADERINFOLOGPROC __glewGetShaderInfoLog;
86690 extern PFNGLGETSHADERSOURCEPROC __glewGetShaderSource;
86691 extern PFNGLGETSHADERIVPROC __glewGetShaderiv;
86692 extern PFNGLGETUNIFORMLOCATIONPROC __glewGetUniformLocation;
86693 extern PFNGLGETUNIFORMFVPROC __glewGetUniformfv;
86694 extern PFNGLGETUNIFORMIVPROC __glewGetUniformiv;
86695 extern PFNGLGETVERTEXATTRIBPOINTERVPROC __glewGetVertexAttribPointerv;
86696 extern PFNGLGETVERTEXATTRIBDVPROC __glewGetVertexAttribdv;
86697 extern PFNGLGETVERTEXATTRIBFVPROC __glewGetVertexAttribfv;
86698 extern PFNGLGETVERTEXATTRIBIVPROC __glewGetVertexAttribiv;
86699 extern PFNGLISPROGRAMPROC __glewIsProgram;
86700 extern PFNGLISSHADERPROC __glewIsShader;
86701 extern PFNGLLINKPROGRAMPROC __glewLinkProgram;
86702 extern PFNGLSHADERSOURCEPROC __glewShaderSource;
86703 extern PFNGLSTENCILFUNCSEPARATEPROC __glewStencilFuncSeparate;
86704 extern PFNGLSTENCILMASKSEPARATEPROC __glewStencilMaskSeparate;
86705 extern PFNGLSTENCILOPSEPARATEPROC __glewStencilOpSeparate;
86706 extern PFNGLUNIFORM1FPROC __glewUniform1f;
86707 extern PFNGLUNIFORM1FVPROC __glewUniform1fv;
86708 extern PFNGLUNIFORM1IPROC __glewUniform1i;
86709 extern PFNGLUNIFORM1IVPROC __glewUniform1iv;
86710 extern PFNGLUNIFORM2FPROC __glewUniform2f;
86711 extern PFNGLUNIFORM2FVPROC __glewUniform2fv;
86712 extern PFNGLUNIFORM2IPROC __glewUniform2i;
86713 extern PFNGLUNIFORM2IVPROC __glewUniform2iv;
86714 extern PFNGLUNIFORM3FPROC __glewUniform3f;
86715 extern PFNGLUNIFORM3FVPROC __glewUniform3fv;
86716 extern PFNGLUNIFORM3IPROC __glewUniform3i;
86717 extern PFNGLUNIFORM3IVPROC __glewUniform3iv;
86718 extern PFNGLUNIFORM4FPROC __glewUniform4f;
86719 extern PFNGLUNIFORM4FVPROC __glewUniform4fv;
86720 extern PFNGLUNIFORM4IPROC __glewUniform4i;
86721 extern PFNGLUNIFORM4IVPROC __glewUniform4iv;
86722 extern PFNGLUNIFORMMATRIX2FVPROC __glewUniformMatrix2fv;
86723 extern PFNGLUNIFORMMATRIX3FVPROC __glewUniformMatrix3fv;
86724 extern PFNGLUNIFORMMATRIX4FVPROC __glewUniformMatrix4fv;
86725 extern PFNGLUSEPROGRAMPROC __glewUseProgram;
86726 extern PFNGLVALIDATEPROGRAMPROC __glewValidateProgram;
86727 extern PFNGLVERTEXATTRIB1DPROC __glewVertexAttrib1d;
86728 extern PFNGLVERTEXATTRIB1DVPROC __glewVertexAttrib1dv;
86729 extern PFNGLVERTEXATTRIB1FPROC __glewVertexAttrib1f;
86730 extern PFNGLVERTEXATTRIB1FVPROC __glewVertexAttrib1fv;
86731 extern PFNGLVERTEXATTRIB1SPROC __glewVertexAttrib1s;
86732 extern PFNGLVERTEXATTRIB1SVPROC __glewVertexAttrib1sv;
86733 extern PFNGLVERTEXATTRIB2DPROC __glewVertexAttrib2d;
86734 extern PFNGLVERTEXATTRIB2DVPROC __glewVertexAttrib2dv;
86735 extern PFNGLVERTEXATTRIB2FPROC __glewVertexAttrib2f;
86736 extern PFNGLVERTEXATTRIB2FVPROC __glewVertexAttrib2fv;
86737 extern PFNGLVERTEXATTRIB2SPROC __glewVertexAttrib2s;
86738 extern PFNGLVERTEXATTRIB2SVPROC __glewVertexAttrib2sv;
86739 extern PFNGLVERTEXATTRIB3DPROC __glewVertexAttrib3d;
86740 extern PFNGLVERTEXATTRIB3DVPROC __glewVertexAttrib3dv;
86741 extern PFNGLVERTEXATTRIB3FPROC __glewVertexAttrib3f;
86742 extern PFNGLVERTEXATTRIB3FVPROC __glewVertexAttrib3fv;
86743 extern PFNGLVERTEXATTRIB3SPROC __glewVertexAttrib3s;
86744 extern PFNGLVERTEXATTRIB3SVPROC __glewVertexAttrib3sv;
86745 extern PFNGLVERTEXATTRIB4NBVPROC __glewVertexAttrib4Nbv;
86746 extern PFNGLVERTEXATTRIB4NIVPROC __glewVertexAttrib4Niv;
86747 extern PFNGLVERTEXATTRIB4NSVPROC __glewVertexAttrib4Nsv;
86748 extern PFNGLVERTEXATTRIB4NUBPROC __glewVertexAttrib4Nub;
86749 extern PFNGLVERTEXATTRIB4NUBVPROC __glewVertexAttrib4Nubv;
86750 extern PFNGLVERTEXATTRIB4NUIVPROC __glewVertexAttrib4Nuiv;
86751 extern PFNGLVERTEXATTRIB4NUSVPROC __glewVertexAttrib4Nusv;
86752 extern PFNGLVERTEXATTRIB4BVPROC __glewVertexAttrib4bv;
86753 extern PFNGLVERTEXATTRIB4DPROC __glewVertexAttrib4d;
86754 extern PFNGLVERTEXATTRIB4DVPROC __glewVertexAttrib4dv;
86755 extern PFNGLVERTEXATTRIB4FPROC __glewVertexAttrib4f;
86756 extern PFNGLVERTEXATTRIB4FVPROC __glewVertexAttrib4fv;
86757 extern PFNGLVERTEXATTRIB4IVPROC __glewVertexAttrib4iv;
86758 extern PFNGLVERTEXATTRIB4SPROC __glewVertexAttrib4s;
86759 extern PFNGLVERTEXATTRIB4SVPROC __glewVertexAttrib4sv;
86760 extern PFNGLVERTEXATTRIB4UBVPROC __glewVertexAttrib4ubv;
86761 extern PFNGLVERTEXATTRIB4UIVPROC __glewVertexAttrib4uiv;
86762 extern PFNGLVERTEXATTRIB4USVPROC __glewVertexAttrib4usv;
86763 extern PFNGLVERTEXATTRIBPOINTERPROC __glewVertexAttribPointer;
86764
86765 extern PFNGLUNIFORMMATRIX2X3FVPROC __glewUniformMatrix2x3fv;
86766 extern PFNGLUNIFORMMATRIX2X4FVPROC __glewUniformMatrix2x4fv;
86767 extern PFNGLUNIFORMMATRIX3X2FVPROC __glewUniformMatrix3x2fv;
86768 extern PFNGLUNIFORMMATRIX3X4FVPROC __glewUniformMatrix3x4fv;
86769 extern PFNGLUNIFORMMATRIX4X2FVPROC __glewUniformMatrix4x2fv;
86770 extern PFNGLUNIFORMMATRIX4X3FVPROC __glewUniformMatrix4x3fv;
86771
86772 extern PFNGLTBUFFERMASK3DFXPROC __glewTbufferMask3DFX;
86773
86774 extern PFNGLDRAWELEMENTARRAYAPPLEPROC __glewDrawElementArrayAPPLE;
86775 extern PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC __glewDrawRangeElementArrayAPPLE;
86776 extern PFNGLELEMENTPOINTERAPPLEPROC __glewElementPointerAPPLE;
86777 extern PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC __glewMultiDrawElementArrayAPPLE;
86778 extern PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC __glewMultiDrawRangeElementArrayAPPLE;
86779
86780 extern PFNGLDELETEFENCESAPPLEPROC __glewDeleteFencesAPPLE;
86781 extern PFNGLFINISHFENCEAPPLEPROC __glewFinishFenceAPPLE;
86782 extern PFNGLFINISHOBJECTAPPLEPROC __glewFinishObjectAPPLE;
86783 extern PFNGLGENFENCESAPPLEPROC __glewGenFencesAPPLE;
86784 extern PFNGLISFENCEAPPLEPROC __glewIsFenceAPPLE;
86785 extern PFNGLSETFENCEAPPLEPROC __glewSetFenceAPPLE;
86786 extern PFNGLTESTFENCEAPPLEPROC __glewTestFenceAPPLE;
86787 extern PFNGLTESTOBJECTAPPLEPROC __glewTestObjectAPPLE;
86788
86789 extern PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC __glewGetTexParameterPointervAPPLE;
86790 extern PFNGLTEXTURERANGEAPPLEPROC __glewTextureRangeAPPLE;
86791
86792 extern PFNGLBINDVERTEXARRAYAPPLEPROC __glewBindVertexArrayAPPLE;
86793 extern PFNGLDELETEVERTEXARRAYSAPPLEPROC __glewDeleteVertexArraysAPPLE;
86794 extern PFNGLGENVERTEXARRAYSAPPLEPROC __glewGenVertexArraysAPPLE;
86795 extern PFNGLISVERTEXARRAYAPPLEPROC __glewIsVertexArrayAPPLE;
86796
86797 extern PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC __glewFlushVertexArrayRangeAPPLE;
86798 extern PFNGLVERTEXARRAYPARAMETERIAPPLEPROC __glewVertexArrayParameteriAPPLE;
86799 extern PFNGLVERTEXARRAYRANGEAPPLEPROC __glewVertexArrayRangeAPPLE;
86800
86801 extern PFNGLCLAMPCOLORARBPROC __glewClampColorARB;
86802
86803 extern PFNGLDRAWBUFFERSARBPROC __glewDrawBuffersARB;
86804
86805 extern PFNGLCOLORSUBTABLEPROC __glewColorSubTable;
86806 extern PFNGLCOLORTABLEPROC __glewColorTable;
86807 extern PFNGLCOLORTABLEPARAMETERFVPROC __glewColorTableParameterfv;
86808 extern PFNGLCOLORTABLEPARAMETERIVPROC __glewColorTableParameteriv;
86809 extern PFNGLCONVOLUTIONFILTER1DPROC __glewConvolutionFilter1D;
86810 extern PFNGLCONVOLUTIONFILTER2DPROC __glewConvolutionFilter2D;
86811 extern PFNGLCONVOLUTIONPARAMETERFPROC __glewConvolutionParameterf;
86812 extern PFNGLCONVOLUTIONPARAMETERFVPROC __glewConvolutionParameterfv;
86813 extern PFNGLCONVOLUTIONPARAMETERIPROC __glewConvolutionParameteri;
86814 extern PFNGLCONVOLUTIONPARAMETERIVPROC __glewConvolutionParameteriv;
86815 extern PFNGLCOPYCOLORSUBTABLEPROC __glewCopyColorSubTable;
86816 extern PFNGLCOPYCOLORTABLEPROC __glewCopyColorTable;
86817 extern PFNGLCOPYCONVOLUTIONFILTER1DPROC __glewCopyConvolutionFilter1D;
86818 extern PFNGLCOPYCONVOLUTIONFILTER2DPROC __glewCopyConvolutionFilter2D;
86819 extern PFNGLGETCOLORTABLEPROC __glewGetColorTable;
86820 extern PFNGLGETCOLORTABLEPARAMETERFVPROC __glewGetColorTableParameterfv;
86821 extern PFNGLGETCOLORTABLEPARAMETERIVPROC __glewGetColorTableParameteriv;
86822 extern PFNGLGETCONVOLUTIONFILTERPROC __glewGetConvolutionFilter;
86823 extern PFNGLGETCONVOLUTIONPARAMETERFVPROC __glewGetConvolutionParameterfv;
86824 extern PFNGLGETCONVOLUTIONPARAMETERIVPROC __glewGetConvolutionParameteriv;
86825 extern PFNGLGETHISTOGRAMPROC __glewGetHistogram;
86826 extern PFNGLGETHISTOGRAMPARAMETERFVPROC __glewGetHistogramParameterfv;
86827 extern PFNGLGETHISTOGRAMPARAMETERIVPROC __glewGetHistogramParameteriv;
86828 extern PFNGLGETMINMAXPROC __glewGetMinmax;
86829 extern PFNGLGETMINMAXPARAMETERFVPROC __glewGetMinmaxParameterfv;
86830 extern PFNGLGETMINMAXPARAMETERIVPROC __glewGetMinmaxParameteriv;
86831 extern PFNGLGETSEPARABLEFILTERPROC __glewGetSeparableFilter;
86832 extern PFNGLHISTOGRAMPROC __glewHistogram;
86833 extern PFNGLMINMAXPROC __glewMinmax;
86834 extern PFNGLRESETHISTOGRAMPROC __glewResetHistogram;
86835 extern PFNGLRESETMINMAXPROC __glewResetMinmax;
86836 extern PFNGLSEPARABLEFILTER2DPROC __glewSeparableFilter2D;
86837
86838 extern PFNGLCURRENTPALETTEMATRIXARBPROC __glewCurrentPaletteMatrixARB;
86839 extern PFNGLMATRIXINDEXPOINTERARBPROC __glewMatrixIndexPointerARB;
86840 extern PFNGLMATRIXINDEXUBVARBPROC __glewMatrixIndexubvARB;
86841 extern PFNGLMATRIXINDEXUIVARBPROC __glewMatrixIndexuivARB;
86842 extern PFNGLMATRIXINDEXUSVARBPROC __glewMatrixIndexusvARB;
86843
86844 extern PFNGLSAMPLECOVERAGEARBPROC __glewSampleCoverageARB;
86845
86846 extern PFNGLACTIVETEXTUREARBPROC __glewActiveTextureARB;
86847 extern PFNGLCLIENTACTIVETEXTUREARBPROC __glewClientActiveTextureARB;
86848 extern PFNGLMULTITEXCOORD1DARBPROC __glewMultiTexCoord1dARB;
86849 extern PFNGLMULTITEXCOORD1DVARBPROC __glewMultiTexCoord1dvARB;
86850 extern PFNGLMULTITEXCOORD1FARBPROC __glewMultiTexCoord1fARB;
86851 extern PFNGLMULTITEXCOORD1FVARBPROC __glewMultiTexCoord1fvARB;
86852 extern PFNGLMULTITEXCOORD1IARBPROC __glewMultiTexCoord1iARB;
86853 extern PFNGLMULTITEXCOORD1IVARBPROC __glewMultiTexCoord1ivARB;
86854 extern PFNGLMULTITEXCOORD1SARBPROC __glewMultiTexCoord1sARB;
86855 extern PFNGLMULTITEXCOORD1SVARBPROC __glewMultiTexCoord1svARB;
86856 extern PFNGLMULTITEXCOORD2DARBPROC __glewMultiTexCoord2dARB;
86857 extern PFNGLMULTITEXCOORD2DVARBPROC __glewMultiTexCoord2dvARB;
86858 extern PFNGLMULTITEXCOORD2FARBPROC __glewMultiTexCoord2fARB;
86859 extern PFNGLMULTITEXCOORD2FVARBPROC __glewMultiTexCoord2fvARB;
86860 extern PFNGLMULTITEXCOORD2IARBPROC __glewMultiTexCoord2iARB;
86861 extern PFNGLMULTITEXCOORD2IVARBPROC __glewMultiTexCoord2ivARB;
86862 extern PFNGLMULTITEXCOORD2SARBPROC __glewMultiTexCoord2sARB;
86863 extern PFNGLMULTITEXCOORD2SVARBPROC __glewMultiTexCoord2svARB;
86864 extern PFNGLMULTITEXCOORD3DARBPROC __glewMultiTexCoord3dARB;
86865 extern PFNGLMULTITEXCOORD3DVARBPROC __glewMultiTexCoord3dvARB;
86866 extern PFNGLMULTITEXCOORD3FARBPROC __glewMultiTexCoord3fARB;
86867 extern PFNGLMULTITEXCOORD3FVARBPROC __glewMultiTexCoord3fvARB;
86868 extern PFNGLMULTITEXCOORD3IARBPROC __glewMultiTexCoord3iARB;
86869 extern PFNGLMULTITEXCOORD3IVARBPROC __glewMultiTexCoord3ivARB;
86870 extern PFNGLMULTITEXCOORD3SARBPROC __glewMultiTexCoord3sARB;
86871 extern PFNGLMULTITEXCOORD3SVARBPROC __glewMultiTexCoord3svARB;
86872 extern PFNGLMULTITEXCOORD4DARBPROC __glewMultiTexCoord4dARB;
86873 extern PFNGLMULTITEXCOORD4DVARBPROC __glewMultiTexCoord4dvARB;
86874 extern PFNGLMULTITEXCOORD4FARBPROC __glewMultiTexCoord4fARB;
86875 extern PFNGLMULTITEXCOORD4FVARBPROC __glewMultiTexCoord4fvARB;
86876 extern PFNGLMULTITEXCOORD4IARBPROC __glewMultiTexCoord4iARB;
86877 extern PFNGLMULTITEXCOORD4IVARBPROC __glewMultiTexCoord4ivARB;
86878 extern PFNGLMULTITEXCOORD4SARBPROC __glewMultiTexCoord4sARB;
86879 extern PFNGLMULTITEXCOORD4SVARBPROC __glewMultiTexCoord4svARB;
86880
86881 extern PFNGLBEGINQUERYARBPROC __glewBeginQueryARB;
86882 extern PFNGLDELETEQUERIESARBPROC __glewDeleteQueriesARB;
86883 extern PFNGLENDQUERYARBPROC __glewEndQueryARB;
86884 extern PFNGLGENQUERIESARBPROC __glewGenQueriesARB;
86885 extern PFNGLGETQUERYOBJECTIVARBPROC __glewGetQueryObjectivARB;
86886 extern PFNGLGETQUERYOBJECTUIVARBPROC __glewGetQueryObjectuivARB;
86887 extern PFNGLGETQUERYIVARBPROC __glewGetQueryivARB;
86888 extern PFNGLISQUERYARBPROC __glewIsQueryARB;
86889
86890 extern PFNGLPOINTPARAMETERFARBPROC __glewPointParameterfARB;
86891 extern PFNGLPOINTPARAMETERFVARBPROC __glewPointParameterfvARB;
86892
86893 extern PFNGLATTACHOBJECTARBPROC __glewAttachObjectARB;
86894 extern PFNGLCOMPILESHADERARBPROC __glewCompileShaderARB;
86895 extern PFNGLCREATEPROGRAMOBJECTARBPROC __glewCreateProgramObjectARB;
86896 extern PFNGLCREATESHADEROBJECTARBPROC __glewCreateShaderObjectARB;
86897 extern PFNGLDELETEOBJECTARBPROC __glewDeleteObjectARB;
86898 extern PFNGLDETACHOBJECTARBPROC __glewDetachObjectARB;
86899 extern PFNGLGETACTIVEUNIFORMARBPROC __glewGetActiveUniformARB;
86900 extern PFNGLGETATTACHEDOBJECTSARBPROC __glewGetAttachedObjectsARB;
86901 extern PFNGLGETHANDLEARBPROC __glewGetHandleARB;
86902 extern PFNGLGETINFOLOGARBPROC __glewGetInfoLogARB;
86903 extern PFNGLGETOBJECTPARAMETERFVARBPROC __glewGetObjectParameterfvARB;
86904 extern PFNGLGETOBJECTPARAMETERIVARBPROC __glewGetObjectParameterivARB;
86905 extern PFNGLGETSHADERSOURCEARBPROC __glewGetShaderSourceARB;
86906 extern PFNGLGETUNIFORMLOCATIONARBPROC __glewGetUniformLocationARB;
86907 extern PFNGLGETUNIFORMFVARBPROC __glewGetUniformfvARB;
86908 extern PFNGLGETUNIFORMIVARBPROC __glewGetUniformivARB;
86909 extern PFNGLLINKPROGRAMARBPROC __glewLinkProgramARB;
86910 extern PFNGLSHADERSOURCEARBPROC __glewShaderSourceARB;
86911 extern PFNGLUNIFORM1FARBPROC __glewUniform1fARB;
86912 extern PFNGLUNIFORM1FVARBPROC __glewUniform1fvARB;
86913 extern PFNGLUNIFORM1IARBPROC __glewUniform1iARB;
86914 extern PFNGLUNIFORM1IVARBPROC __glewUniform1ivARB;
86915 extern PFNGLUNIFORM2FARBPROC __glewUniform2fARB;
86916 extern PFNGLUNIFORM2FVARBPROC __glewUniform2fvARB;
86917 extern PFNGLUNIFORM2IARBPROC __glewUniform2iARB;
86918 extern PFNGLUNIFORM2IVARBPROC __glewUniform2ivARB;
86919 extern PFNGLUNIFORM3FARBPROC __glewUniform3fARB;
86920 extern PFNGLUNIFORM3FVARBPROC __glewUniform3fvARB;
86921 extern PFNGLUNIFORM3IARBPROC __glewUniform3iARB;
86922 extern PFNGLUNIFORM3IVARBPROC __glewUniform3ivARB;
86923 extern PFNGLUNIFORM4FARBPROC __glewUniform4fARB;
86924 extern PFNGLUNIFORM4FVARBPROC __glewUniform4fvARB;
86925 extern PFNGLUNIFORM4IARBPROC __glewUniform4iARB;
86926 extern PFNGLUNIFORM4IVARBPROC __glewUniform4ivARB;
86927 extern PFNGLUNIFORMMATRIX2FVARBPROC __glewUniformMatrix2fvARB;
86928 extern PFNGLUNIFORMMATRIX3FVARBPROC __glewUniformMatrix3fvARB;
86929 extern PFNGLUNIFORMMATRIX4FVARBPROC __glewUniformMatrix4fvARB;
86930 extern PFNGLUSEPROGRAMOBJECTARBPROC __glewUseProgramObjectARB;
86931 extern PFNGLVALIDATEPROGRAMARBPROC __glewValidateProgramARB;
86932
86933 extern PFNGLCOMPRESSEDTEXIMAGE1DARBPROC __glewCompressedTexImage1DARB;
86934 extern PFNGLCOMPRESSEDTEXIMAGE2DARBPROC __glewCompressedTexImage2DARB;
86935 extern PFNGLCOMPRESSEDTEXIMAGE3DARBPROC __glewCompressedTexImage3DARB;
86936 extern PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC __glewCompressedTexSubImage1DARB;
86937 extern PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC __glewCompressedTexSubImage2DARB;
86938 extern PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC __glewCompressedTexSubImage3DARB;
86939 extern PFNGLGETCOMPRESSEDTEXIMAGEARBPROC __glewGetCompressedTexImageARB;
86940
86941 extern PFNGLLOADTRANSPOSEMATRIXDARBPROC __glewLoadTransposeMatrixdARB;
86942 extern PFNGLLOADTRANSPOSEMATRIXFARBPROC __glewLoadTransposeMatrixfARB;
86943 extern PFNGLMULTTRANSPOSEMATRIXDARBPROC __glewMultTransposeMatrixdARB;
86944 extern PFNGLMULTTRANSPOSEMATRIXFARBPROC __glewMultTransposeMatrixfARB;
86945
86946 extern PFNGLVERTEXBLENDARBPROC __glewVertexBlendARB;
86947 extern PFNGLWEIGHTPOINTERARBPROC __glewWeightPointerARB;
86948 extern PFNGLWEIGHTBVARBPROC __glewWeightbvARB;
86949 extern PFNGLWEIGHTDVARBPROC __glewWeightdvARB;
86950 extern PFNGLWEIGHTFVARBPROC __glewWeightfvARB;
86951 extern PFNGLWEIGHTIVARBPROC __glewWeightivARB;
86952 extern PFNGLWEIGHTSVARBPROC __glewWeightsvARB;
86953 extern PFNGLWEIGHTUBVARBPROC __glewWeightubvARB;
86954 extern PFNGLWEIGHTUIVARBPROC __glewWeightuivARB;
86955 extern PFNGLWEIGHTUSVARBPROC __glewWeightusvARB;
86956
86957 extern PFNGLBINDBUFFERARBPROC __glewBindBufferARB;
86958 extern PFNGLBUFFERDATAARBPROC __glewBufferDataARB;
86959 extern PFNGLBUFFERSUBDATAARBPROC __glewBufferSubDataARB;
86960 extern PFNGLDELETEBUFFERSARBPROC __glewDeleteBuffersARB;
86961 extern PFNGLGENBUFFERSARBPROC __glewGenBuffersARB;
86962 extern PFNGLGETBUFFERPARAMETERIVARBPROC __glewGetBufferParameterivARB;
86963 extern PFNGLGETBUFFERPOINTERVARBPROC __glewGetBufferPointervARB;
86964 extern PFNGLGETBUFFERSUBDATAARBPROC __glewGetBufferSubDataARB;
86965 extern PFNGLISBUFFERARBPROC __glewIsBufferARB;
86966 extern PFNGLMAPBUFFERARBPROC __glewMapBufferARB;
86967 extern PFNGLUNMAPBUFFERARBPROC __glewUnmapBufferARB;
86968
86969 extern PFNGLBINDPROGRAMARBPROC __glewBindProgramARB;
86970 extern PFNGLDELETEPROGRAMSARBPROC __glewDeleteProgramsARB;
86971 extern PFNGLDISABLEVERTEXATTRIBARRAYARBPROC __glewDisableVertexAttribArrayARB;
86972 extern PFNGLENABLEVERTEXATTRIBARRAYARBPROC __glewEnableVertexAttribArrayARB;
86973 extern PFNGLGENPROGRAMSARBPROC __glewGenProgramsARB;
86974 extern PFNGLGETPROGRAMENVPARAMETERDVARBPROC __glewGetProgramEnvParameterdvARB;
86975 extern PFNGLGETPROGRAMENVPARAMETERFVARBPROC __glewGetProgramEnvParameterfvARB;
86976 extern PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC __glewGetProgramLocalParameterdvARB;
86977 extern PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC __glewGetProgramLocalParameterfvARB;
86978 extern PFNGLGETPROGRAMSTRINGARBPROC __glewGetProgramStringARB;
86979 extern PFNGLGETPROGRAMIVARBPROC __glewGetProgramivARB;
86980 extern PFNGLGETVERTEXATTRIBPOINTERVARBPROC __glewGetVertexAttribPointervARB;
86981 extern PFNGLGETVERTEXATTRIBDVARBPROC __glewGetVertexAttribdvARB;
86982 extern PFNGLGETVERTEXATTRIBFVARBPROC __glewGetVertexAttribfvARB;
86983 extern PFNGLGETVERTEXATTRIBIVARBPROC __glewGetVertexAttribivARB;
86984 extern PFNGLISPROGRAMARBPROC __glewIsProgramARB;
86985 extern PFNGLPROGRAMENVPARAMETER4DARBPROC __glewProgramEnvParameter4dARB;
86986 extern PFNGLPROGRAMENVPARAMETER4DVARBPROC __glewProgramEnvParameter4dvARB;
86987 extern PFNGLPROGRAMENVPARAMETER4FARBPROC __glewProgramEnvParameter4fARB;
86988 extern PFNGLPROGRAMENVPARAMETER4FVARBPROC __glewProgramEnvParameter4fvARB;
86989 extern PFNGLPROGRAMLOCALPARAMETER4DARBPROC __glewProgramLocalParameter4dARB;
86990 extern PFNGLPROGRAMLOCALPARAMETER4DVARBPROC __glewProgramLocalParameter4dvARB;
86991 extern PFNGLPROGRAMLOCALPARAMETER4FARBPROC __glewProgramLocalParameter4fARB;
86992 extern PFNGLPROGRAMLOCALPARAMETER4FVARBPROC __glewProgramLocalParameter4fvARB;
86993 extern PFNGLPROGRAMSTRINGARBPROC __glewProgramStringARB;
86994 extern PFNGLVERTEXATTRIB1DARBPROC __glewVertexAttrib1dARB;
86995 extern PFNGLVERTEXATTRIB1DVARBPROC __glewVertexAttrib1dvARB;
86996 extern PFNGLVERTEXATTRIB1FARBPROC __glewVertexAttrib1fARB;
86997 extern PFNGLVERTEXATTRIB1FVARBPROC __glewVertexAttrib1fvARB;
86998 extern PFNGLVERTEXATTRIB1SARBPROC __glewVertexAttrib1sARB;
86999 extern PFNGLVERTEXATTRIB1SVARBPROC __glewVertexAttrib1svARB;
87000 extern PFNGLVERTEXATTRIB2DARBPROC __glewVertexAttrib2dARB;
87001 extern PFNGLVERTEXATTRIB2DVARBPROC __glewVertexAttrib2dvARB;
87002 extern PFNGLVERTEXATTRIB2FARBPROC __glewVertexAttrib2fARB;
87003 extern PFNGLVERTEXATTRIB2FVARBPROC __glewVertexAttrib2fvARB;
87004 extern PFNGLVERTEXATTRIB2SARBPROC __glewVertexAttrib2sARB;
87005 extern PFNGLVERTEXATTRIB2SVARBPROC __glewVertexAttrib2svARB;
87006 extern PFNGLVERTEXATTRIB3DARBPROC __glewVertexAttrib3dARB;
87007 extern PFNGLVERTEXATTRIB3DVARBPROC __glewVertexAttrib3dvARB;
87008 extern PFNGLVERTEXATTRIB3FARBPROC __glewVertexAttrib3fARB;
87009 extern PFNGLVERTEXATTRIB3FVARBPROC __glewVertexAttrib3fvARB;
87010 extern PFNGLVERTEXATTRIB3SARBPROC __glewVertexAttrib3sARB;
87011 extern PFNGLVERTEXATTRIB3SVARBPROC __glewVertexAttrib3svARB;
87012 extern PFNGLVERTEXATTRIB4NBVARBPROC __glewVertexAttrib4NbvARB;
87013 extern PFNGLVERTEXATTRIB4NIVARBPROC __glewVertexAttrib4NivARB;
87014 extern PFNGLVERTEXATTRIB4NSVARBPROC __glewVertexAttrib4NsvARB;
87015 extern PFNGLVERTEXATTRIB4NUBARBPROC __glewVertexAttrib4NubARB;
87016 extern PFNGLVERTEXATTRIB4NUBVARBPROC __glewVertexAttrib4NubvARB;
87017 extern PFNGLVERTEXATTRIB4NUIVARBPROC __glewVertexAttrib4NuivARB;
87018 extern PFNGLVERTEXATTRIB4NUSVARBPROC __glewVertexAttrib4NusvARB;
87019 extern PFNGLVERTEXATTRIB4BVARBPROC __glewVertexAttrib4bvARB;
87020 extern PFNGLVERTEXATTRIB4DARBPROC __glewVertexAttrib4dARB;
87021 extern PFNGLVERTEXATTRIB4DVARBPROC __glewVertexAttrib4dvARB;
87022 extern PFNGLVERTEXATTRIB4FARBPROC __glewVertexAttrib4fARB;
87023 extern PFNGLVERTEXATTRIB4FVARBPROC __glewVertexAttrib4fvARB;
87024 extern PFNGLVERTEXATTRIB4IVARBPROC __glewVertexAttrib4ivARB;
87025 extern PFNGLVERTEXATTRIB4SARBPROC __glewVertexAttrib4sARB;
87026 extern PFNGLVERTEXATTRIB4SVARBPROC __glewVertexAttrib4svARB;
87027 extern PFNGLVERTEXATTRIB4UBVARBPROC __glewVertexAttrib4ubvARB;
87028 extern PFNGLVERTEXATTRIB4UIVARBPROC __glewVertexAttrib4uivARB;
87029 extern PFNGLVERTEXATTRIB4USVARBPROC __glewVertexAttrib4usvARB;
87030 extern PFNGLVERTEXATTRIBPOINTERARBPROC __glewVertexAttribPointerARB;
87031
87032 extern PFNGLBINDATTRIBLOCATIONARBPROC __glewBindAttribLocationARB;
87033 extern PFNGLGETACTIVEATTRIBARBPROC __glewGetActiveAttribARB;
87034 extern PFNGLGETATTRIBLOCATIONARBPROC __glewGetAttribLocationARB;
87035
87036 extern PFNGLWINDOWPOS2DARBPROC __glewWindowPos2dARB;
87037 extern PFNGLWINDOWPOS2DVARBPROC __glewWindowPos2dvARB;
87038 extern PFNGLWINDOWPOS2FARBPROC __glewWindowPos2fARB;
87039 extern PFNGLWINDOWPOS2FVARBPROC __glewWindowPos2fvARB;
87040 extern PFNGLWINDOWPOS2IARBPROC __glewWindowPos2iARB;
87041 extern PFNGLWINDOWPOS2IVARBPROC __glewWindowPos2ivARB;
87042 extern PFNGLWINDOWPOS2SARBPROC __glewWindowPos2sARB;
87043 extern PFNGLWINDOWPOS2SVARBPROC __glewWindowPos2svARB;
87044 extern PFNGLWINDOWPOS3DARBPROC __glewWindowPos3dARB;
87045 extern PFNGLWINDOWPOS3DVARBPROC __glewWindowPos3dvARB;
87046 extern PFNGLWINDOWPOS3FARBPROC __glewWindowPos3fARB;
87047 extern PFNGLWINDOWPOS3FVARBPROC __glewWindowPos3fvARB;
87048 extern PFNGLWINDOWPOS3IARBPROC __glewWindowPos3iARB;
87049 extern PFNGLWINDOWPOS3IVARBPROC __glewWindowPos3ivARB;
87050 extern PFNGLWINDOWPOS3SARBPROC __glewWindowPos3sARB;
87051 extern PFNGLWINDOWPOS3SVARBPROC __glewWindowPos3svARB;
87052
87053 extern PFNGLDRAWBUFFERSATIPROC __glewDrawBuffersATI;
87054
87055 extern PFNGLDRAWELEMENTARRAYATIPROC __glewDrawElementArrayATI;
87056 extern PFNGLDRAWRANGEELEMENTARRAYATIPROC __glewDrawRangeElementArrayATI;
87057 extern PFNGLELEMENTPOINTERATIPROC __glewElementPointerATI;
87058
87059 extern PFNGLGETTEXBUMPPARAMETERFVATIPROC __glewGetTexBumpParameterfvATI;
87060 extern PFNGLGETTEXBUMPPARAMETERIVATIPROC __glewGetTexBumpParameterivATI;
87061 extern PFNGLTEXBUMPPARAMETERFVATIPROC __glewTexBumpParameterfvATI;
87062 extern PFNGLTEXBUMPPARAMETERIVATIPROC __glewTexBumpParameterivATI;
87063
87064 extern PFNGLALPHAFRAGMENTOP1ATIPROC __glewAlphaFragmentOp1ATI;
87065 extern PFNGLALPHAFRAGMENTOP2ATIPROC __glewAlphaFragmentOp2ATI;
87066 extern PFNGLALPHAFRAGMENTOP3ATIPROC __glewAlphaFragmentOp3ATI;
87067 extern PFNGLBEGINFRAGMENTSHADERATIPROC __glewBeginFragmentShaderATI;
87068 extern PFNGLBINDFRAGMENTSHADERATIPROC __glewBindFragmentShaderATI;
87069 extern PFNGLCOLORFRAGMENTOP1ATIPROC __glewColorFragmentOp1ATI;
87070 extern PFNGLCOLORFRAGMENTOP2ATIPROC __glewColorFragmentOp2ATI;
87071 extern PFNGLCOLORFRAGMENTOP3ATIPROC __glewColorFragmentOp3ATI;
87072 extern PFNGLDELETEFRAGMENTSHADERATIPROC __glewDeleteFragmentShaderATI;
87073 extern PFNGLENDFRAGMENTSHADERATIPROC __glewEndFragmentShaderATI;
87074 extern PFNGLGENFRAGMENTSHADERSATIPROC __glewGenFragmentShadersATI;
87075 extern PFNGLPASSTEXCOORDATIPROC __glewPassTexCoordATI;
87076 extern PFNGLSAMPLEMAPATIPROC __glewSampleMapATI;
87077 extern PFNGLSETFRAGMENTSHADERCONSTANTATIPROC __glewSetFragmentShaderConstantATI;
87078
87079 extern PFNGLMAPOBJECTBUFFERATIPROC __glewMapObjectBufferATI;
87080 extern PFNGLUNMAPOBJECTBUFFERATIPROC __glewUnmapObjectBufferATI;
87081
87082 extern PFNGLPNTRIANGLESFATIPROC __glPNTrianglewesfATI;
87083 extern PFNGLPNTRIANGLESIATIPROC __glPNTrianglewesiATI;
87084
87085 extern PFNGLSTENCILFUNCSEPARATEATIPROC __glewStencilFuncSeparateATI;
87086 extern PFNGLSTENCILOPSEPARATEATIPROC __glewStencilOpSeparateATI;
87087
87088 extern PFNGLARRAYOBJECTATIPROC __glewArrayObjectATI;
87089 extern PFNGLFREEOBJECTBUFFERATIPROC __glewFreeObjectBufferATI;
87090 extern PFNGLGETARRAYOBJECTFVATIPROC __glewGetArrayObjectfvATI;
87091 extern PFNGLGETARRAYOBJECTIVATIPROC __glewGetArrayObjectivATI;
87092 extern PFNGLGETOBJECTBUFFERFVATIPROC __glewGetObjectBufferfvATI;
87093 extern PFNGLGETOBJECTBUFFERIVATIPROC __glewGetObjectBufferivATI;
87094 extern PFNGLGETVARIANTARRAYOBJECTFVATIPROC __glewGetVariantArrayObjectfvATI;
87095 extern PFNGLGETVARIANTARRAYOBJECTIVATIPROC __glewGetVariantArrayObjectivATI;
87096 extern PFNGLISOBJECTBUFFERATIPROC __glewIsObjectBufferATI;
87097 extern PFNGLNEWOBJECTBUFFERATIPROC __glewNewObjectBufferATI;
87098 extern PFNGLUPDATEOBJECTBUFFERATIPROC __glewUpdateObjectBufferATI;
87099 extern PFNGLVARIANTARRAYOBJECTATIPROC __glewVariantArrayObjectATI;
87100
87101 extern PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC __glewGetVertexAttribArrayObjectfvATI;
87102 extern PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC __glewGetVertexAttribArrayObjectivATI;
87103 extern PFNGLVERTEXATTRIBARRAYOBJECTATIPROC __glewVertexAttribArrayObjectATI;
87104
87105 extern PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC __glewClientActiveVertexStreamATI;
87106 extern PFNGLNORMALSTREAM3BATIPROC __glewNormalStream3bATI;
87107 extern PFNGLNORMALSTREAM3BVATIPROC __glewNormalStream3bvATI;
87108 extern PFNGLNORMALSTREAM3DATIPROC __glewNormalStream3dATI;
87109 extern PFNGLNORMALSTREAM3DVATIPROC __glewNormalStream3dvATI;
87110 extern PFNGLNORMALSTREAM3FATIPROC __glewNormalStream3fATI;
87111 extern PFNGLNORMALSTREAM3FVATIPROC __glewNormalStream3fvATI;
87112 extern PFNGLNORMALSTREAM3IATIPROC __glewNormalStream3iATI;
87113 extern PFNGLNORMALSTREAM3IVATIPROC __glewNormalStream3ivATI;
87114 extern PFNGLNORMALSTREAM3SATIPROC __glewNormalStream3sATI;
87115 extern PFNGLNORMALSTREAM3SVATIPROC __glewNormalStream3svATI;
87116 extern PFNGLVERTEXBLENDENVFATIPROC __glewVertexBlendEnvfATI;
87117 extern PFNGLVERTEXBLENDENVIATIPROC __glewVertexBlendEnviATI;
87118 extern PFNGLVERTEXSTREAM2DATIPROC __glewVertexStream2dATI;
87119 extern PFNGLVERTEXSTREAM2DVATIPROC __glewVertexStream2dvATI;
87120 extern PFNGLVERTEXSTREAM2FATIPROC __glewVertexStream2fATI;
87121 extern PFNGLVERTEXSTREAM2FVATIPROC __glewVertexStream2fvATI;
87122 extern PFNGLVERTEXSTREAM2IATIPROC __glewVertexStream2iATI;
87123 extern PFNGLVERTEXSTREAM2IVATIPROC __glewVertexStream2ivATI;
87124 extern PFNGLVERTEXSTREAM2SATIPROC __glewVertexStream2sATI;
87125 extern PFNGLVERTEXSTREAM2SVATIPROC __glewVertexStream2svATI;
87126 extern PFNGLVERTEXSTREAM3DATIPROC __glewVertexStream3dATI;
87127 extern PFNGLVERTEXSTREAM3DVATIPROC __glewVertexStream3dvATI;
87128 extern PFNGLVERTEXSTREAM3FATIPROC __glewVertexStream3fATI;
87129 extern PFNGLVERTEXSTREAM3FVATIPROC __glewVertexStream3fvATI;
87130 extern PFNGLVERTEXSTREAM3IATIPROC __glewVertexStream3iATI;
87131 extern PFNGLVERTEXSTREAM3IVATIPROC __glewVertexStream3ivATI;
87132 extern PFNGLVERTEXSTREAM3SATIPROC __glewVertexStream3sATI;
87133 extern PFNGLVERTEXSTREAM3SVATIPROC __glewVertexStream3svATI;
87134 extern PFNGLVERTEXSTREAM4DATIPROC __glewVertexStream4dATI;
87135 extern PFNGLVERTEXSTREAM4DVATIPROC __glewVertexStream4dvATI;
87136 extern PFNGLVERTEXSTREAM4FATIPROC __glewVertexStream4fATI;
87137 extern PFNGLVERTEXSTREAM4FVATIPROC __glewVertexStream4fvATI;
87138 extern PFNGLVERTEXSTREAM4IATIPROC __glewVertexStream4iATI;
87139 extern PFNGLVERTEXSTREAM4IVATIPROC __glewVertexStream4ivATI;
87140 extern PFNGLVERTEXSTREAM4SATIPROC __glewVertexStream4sATI;
87141 extern PFNGLVERTEXSTREAM4SVATIPROC __glewVertexStream4svATI;
87142
87143 extern PFNGLGETUNIFORMBUFFERSIZEEXTPROC __glewGetUniformBufferSizeEXT;
87144 extern PFNGLGETUNIFORMOFFSETEXTPROC __glewGetUniformOffsetEXT;
87145 extern PFNGLUNIFORMBUFFEREXTPROC __glewUniformBufferEXT;
87146
87147 extern PFNGLBLENDCOLOREXTPROC __glewBlendColorEXT;
87148
87149 extern PFNGLBLENDEQUATIONSEPARATEEXTPROC __glewBlendEquationSeparateEXT;
87150
87151 extern PFNGLBLENDFUNCSEPARATEEXTPROC __glewBlendFuncSeparateEXT;
87152
87153 extern PFNGLBLENDEQUATIONEXTPROC __glewBlendEquationEXT;
87154
87155 extern PFNGLCOLORSUBTABLEEXTPROC __glewColorSubTableEXT;
87156 extern PFNGLCOPYCOLORSUBTABLEEXTPROC __glewCopyColorSubTableEXT;
87157
87158 extern PFNGLLOCKARRAYSEXTPROC __glewLockArraysEXT;
87159 extern PFNGLUNLOCKARRAYSEXTPROC __glewUnlockArraysEXT;
87160
87161 extern PFNGLCONVOLUTIONFILTER1DEXTPROC __glewConvolutionFilter1DEXT;
87162 extern PFNGLCONVOLUTIONFILTER2DEXTPROC __glewConvolutionFilter2DEXT;
87163 extern PFNGLCONVOLUTIONPARAMETERFEXTPROC __glewConvolutionParameterfEXT;
87164 extern PFNGLCONVOLUTIONPARAMETERFVEXTPROC __glewConvolutionParameterfvEXT;
87165 extern PFNGLCONVOLUTIONPARAMETERIEXTPROC __glewConvolutionParameteriEXT;
87166 extern PFNGLCONVOLUTIONPARAMETERIVEXTPROC __glewConvolutionParameterivEXT;
87167 extern PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC __glewCopyConvolutionFilter1DEXT;
87168 extern PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC __glewCopyConvolutionFilter2DEXT;
87169 extern PFNGLGETCONVOLUTIONFILTEREXTPROC __glewGetConvolutionFilterEXT;
87170 extern PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC __glewGetConvolutionParameterfvEXT;
87171 extern PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC __glewGetConvolutionParameterivEXT;
87172 extern PFNGLGETSEPARABLEFILTEREXTPROC __glewGetSeparableFilterEXT;
87173 extern PFNGLSEPARABLEFILTER2DEXTPROC __glewSeparableFilter2DEXT;
87174
87175 extern PFNGLBINORMALPOINTEREXTPROC __glewBinormalPointerEXT;
87176 extern PFNGLTANGENTPOINTEREXTPROC __glewTangentPointerEXT;
87177
87178 extern PFNGLCOPYTEXIMAGE1DEXTPROC __glewCopyTexImage1DEXT;
87179 extern PFNGLCOPYTEXIMAGE2DEXTPROC __glewCopyTexImage2DEXT;
87180 extern PFNGLCOPYTEXSUBIMAGE1DEXTPROC __glewCopyTexSubImage1DEXT;
87181 extern PFNGLCOPYTEXSUBIMAGE2DEXTPROC __glewCopyTexSubImage2DEXT;
87182 extern PFNGLCOPYTEXSUBIMAGE3DEXTPROC __glewCopyTexSubImage3DEXT;
87183
87184 extern PFNGLCULLPARAMETERDVEXTPROC __glewCullParameterdvEXT;
87185 extern PFNGLCULLPARAMETERFVEXTPROC __glewCullParameterfvEXT;
87186
87187 extern PFNGLDEPTHBOUNDSEXTPROC __glewDepthBoundsEXT;
87188
87189 extern PFNGLCOLORMASKINDEXEDEXTPROC __glewColorMaskIndexedEXT;
87190 extern PFNGLDISABLEINDEXEDEXTPROC __glewDisableIndexedEXT;
87191 extern PFNGLENABLEINDEXEDEXTPROC __glewEnableIndexedEXT;
87192 extern PFNGLGETBOOLEANINDEXEDVEXTPROC __glewGetBooleanIndexedvEXT;
87193 extern PFNGLGETINTEGERINDEXEDVEXTPROC __glewGetIntegerIndexedvEXT;
87194 extern PFNGLISENABLEDINDEXEDEXTPROC __glewIsEnabledIndexedEXT;
87195
87196 extern PFNGLDRAWARRAYSINSTANCEDEXTPROC __glewDrawArraysInstancedEXT;
87197 extern PFNGLDRAWELEMENTSINSTANCEDEXTPROC __glewDrawElementsInstancedEXT;
87198
87199 extern PFNGLDRAWRANGEELEMENTSEXTPROC __glewDrawRangeElementsEXT;
87200
87201 extern PFNGLFOGCOORDPOINTEREXTPROC __glewFogCoordPointerEXT;
87202 extern PFNGLFOGCOORDDEXTPROC __glewFogCoorddEXT;
87203 extern PFNGLFOGCOORDDVEXTPROC __glewFogCoorddvEXT;
87204 extern PFNGLFOGCOORDFEXTPROC __glewFogCoordfEXT;
87205 extern PFNGLFOGCOORDFVEXTPROC __glewFogCoordfvEXT;
87206
87207 extern PFNGLFRAGMENTCOLORMATERIALEXTPROC __glewFragmentColorMaterialEXT;
87208 extern PFNGLFRAGMENTLIGHTMODELFEXTPROC __glewFragmentLightModelfEXT;
87209 extern PFNGLFRAGMENTLIGHTMODELFVEXTPROC __glewFragmentLightModelfvEXT;
87210 extern PFNGLFRAGMENTLIGHTMODELIEXTPROC __glewFragmentLightModeliEXT;
87211 extern PFNGLFRAGMENTLIGHTMODELIVEXTPROC __glewFragmentLightModelivEXT;
87212 extern PFNGLFRAGMENTLIGHTFEXTPROC __glewFragmentLightfEXT;
87213 extern PFNGLFRAGMENTLIGHTFVEXTPROC __glewFragmentLightfvEXT;
87214 extern PFNGLFRAGMENTLIGHTIEXTPROC __glewFragmentLightiEXT;
87215 extern PFNGLFRAGMENTLIGHTIVEXTPROC __glewFragmentLightivEXT;
87216 extern PFNGLFRAGMENTMATERIALFEXTPROC __glewFragmentMaterialfEXT;
87217 extern PFNGLFRAGMENTMATERIALFVEXTPROC __glewFragmentMaterialfvEXT;
87218 extern PFNGLFRAGMENTMATERIALIEXTPROC __glewFragmentMaterialiEXT;
87219 extern PFNGLFRAGMENTMATERIALIVEXTPROC __glewFragmentMaterialivEXT;
87220 extern PFNGLGETFRAGMENTLIGHTFVEXTPROC __glewGetFragmentLightfvEXT;
87221 extern PFNGLGETFRAGMENTLIGHTIVEXTPROC __glewGetFragmentLightivEXT;
87222 extern PFNGLGETFRAGMENTMATERIALFVEXTPROC __glewGetFragmentMaterialfvEXT;
87223 extern PFNGLGETFRAGMENTMATERIALIVEXTPROC __glewGetFragmentMaterialivEXT;
87224 extern PFNGLLIGHTENVIEXTPROC __glewLightEnviEXT;
87225
87226 extern PFNGLBLITFRAMEBUFFEREXTPROC __glewBlitFramebufferEXT;
87227
87228 extern PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC __glewRenderbufferStorageMultisampleEXT;
87229
87230 extern PFNGLBINDFRAMEBUFFEREXTPROC __glewBindFramebufferEXT;
87231 extern PFNGLBINDRENDERBUFFEREXTPROC __glewBindRenderbufferEXT;
87232 extern PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC __glewCheckFramebufferStatusEXT;
87233 extern PFNGLDELETEFRAMEBUFFERSEXTPROC __glewDeleteFramebuffersEXT;
87234 extern PFNGLDELETERENDERBUFFERSEXTPROC __glewDeleteRenderbuffersEXT;
87235 extern PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC __glewFramebufferRenderbufferEXT;
87236 extern PFNGLFRAMEBUFFERTEXTURE1DEXTPROC __glewFramebufferTexture1DEXT;
87237 extern PFNGLFRAMEBUFFERTEXTURE2DEXTPROC __glewFramebufferTexture2DEXT;
87238 extern PFNGLFRAMEBUFFERTEXTURE3DEXTPROC __glewFramebufferTexture3DEXT;
87239 extern PFNGLGENFRAMEBUFFERSEXTPROC __glewGenFramebuffersEXT;
87240 extern PFNGLGENRENDERBUFFERSEXTPROC __glewGenRenderbuffersEXT;
87241 extern PFNGLGENERATEMIPMAPEXTPROC __glewGenerateMipmapEXT;
87242 extern PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC __glewGetFramebufferAttachmentParameterivEXT;
87243 extern PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC __glewGetRenderbufferParameterivEXT;
87244 extern PFNGLISFRAMEBUFFEREXTPROC __glewIsFramebufferEXT;
87245 extern PFNGLISRENDERBUFFEREXTPROC __glewIsRenderbufferEXT;
87246 extern PFNGLRENDERBUFFERSTORAGEEXTPROC __glewRenderbufferStorageEXT;
87247
87248 extern PFNGLFRAMEBUFFERTEXTUREEXTPROC __glewFramebufferTextureEXT;
87249 extern PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC __glewFramebufferTextureFaceEXT;
87250 extern PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC __glewFramebufferTextureLayerEXT;
87251 extern PFNGLPROGRAMPARAMETERIEXTPROC __glewProgramParameteriEXT;
87252
87253 extern PFNGLBINDFRAGDATALOCATIONEXTPROC __glewBindFragDataLocationEXT;
87254 extern PFNGLGETFRAGDATALOCATIONEXTPROC __glewGetFragDataLocationEXT;
87255 extern PFNGLGETUNIFORMUIVEXTPROC __glewGetUniformuivEXT;
87256 extern PFNGLGETVERTEXATTRIBIIVEXTPROC __glewGetVertexAttribIivEXT;
87257 extern PFNGLGETVERTEXATTRIBIUIVEXTPROC __glewGetVertexAttribIuivEXT;
87258 extern PFNGLUNIFORM1UIEXTPROC __glewUniform1uiEXT;
87259 extern PFNGLUNIFORM1UIVEXTPROC __glewUniform1uivEXT;
87260 extern PFNGLUNIFORM2UIEXTPROC __glewUniform2uiEXT;
87261 extern PFNGLUNIFORM2UIVEXTPROC __glewUniform2uivEXT;
87262 extern PFNGLUNIFORM3UIEXTPROC __glewUniform3uiEXT;
87263 extern PFNGLUNIFORM3UIVEXTPROC __glewUniform3uivEXT;
87264 extern PFNGLUNIFORM4UIEXTPROC __glewUniform4uiEXT;
87265 extern PFNGLUNIFORM4UIVEXTPROC __glewUniform4uivEXT;
87266 extern PFNGLVERTEXATTRIBI1IEXTPROC __glewVertexAttribI1iEXT;
87267 extern PFNGLVERTEXATTRIBI1IVEXTPROC __glewVertexAttribI1ivEXT;
87268 extern PFNGLVERTEXATTRIBI1UIEXTPROC __glewVertexAttribI1uiEXT;
87269 extern PFNGLVERTEXATTRIBI1UIVEXTPROC __glewVertexAttribI1uivEXT;
87270 extern PFNGLVERTEXATTRIBI2IEXTPROC __glewVertexAttribI2iEXT;
87271 extern PFNGLVERTEXATTRIBI2IVEXTPROC __glewVertexAttribI2ivEXT;
87272 extern PFNGLVERTEXATTRIBI2UIEXTPROC __glewVertexAttribI2uiEXT;
87273 extern PFNGLVERTEXATTRIBI2UIVEXTPROC __glewVertexAttribI2uivEXT;
87274 extern PFNGLVERTEXATTRIBI3IEXTPROC __glewVertexAttribI3iEXT;
87275 extern PFNGLVERTEXATTRIBI3IVEXTPROC __glewVertexAttribI3ivEXT;
87276 extern PFNGLVERTEXATTRIBI3UIEXTPROC __glewVertexAttribI3uiEXT;
87277 extern PFNGLVERTEXATTRIBI3UIVEXTPROC __glewVertexAttribI3uivEXT;
87278 extern PFNGLVERTEXATTRIBI4BVEXTPROC __glewVertexAttribI4bvEXT;
87279 extern PFNGLVERTEXATTRIBI4IEXTPROC __glewVertexAttribI4iEXT;
87280 extern PFNGLVERTEXATTRIBI4IVEXTPROC __glewVertexAttribI4ivEXT;
87281 extern PFNGLVERTEXATTRIBI4SVEXTPROC __glewVertexAttribI4svEXT;
87282 extern PFNGLVERTEXATTRIBI4UBVEXTPROC __glewVertexAttribI4ubvEXT;
87283 extern PFNGLVERTEXATTRIBI4UIEXTPROC __glewVertexAttribI4uiEXT;
87284 extern PFNGLVERTEXATTRIBI4UIVEXTPROC __glewVertexAttribI4uivEXT;
87285 extern PFNGLVERTEXATTRIBI4USVEXTPROC __glewVertexAttribI4usvEXT;
87286 extern PFNGLVERTEXATTRIBIPOINTEREXTPROC __glewVertexAttribIPointerEXT;
87287
87288 extern PFNGLGETHISTOGRAMEXTPROC __glewGetHistogramEXT;
87289 extern PFNGLGETHISTOGRAMPARAMETERFVEXTPROC __glewGetHistogramParameterfvEXT;
87290 extern PFNGLGETHISTOGRAMPARAMETERIVEXTPROC __glewGetHistogramParameterivEXT;
87291 extern PFNGLGETMINMAXEXTPROC __glewGetMinmaxEXT;
87292 extern PFNGLGETMINMAXPARAMETERFVEXTPROC __glewGetMinmaxParameterfvEXT;
87293 extern PFNGLGETMINMAXPARAMETERIVEXTPROC __glewGetMinmaxParameterivEXT;
87294 extern PFNGLHISTOGRAMEXTPROC __glewHistogramEXT;
87295 extern PFNGLMINMAXEXTPROC __glewMinmaxEXT;
87296 extern PFNGLRESETHISTOGRAMEXTPROC __glewResetHistogramEXT;
87297 extern PFNGLRESETMINMAXEXTPROC __glewResetMinmaxEXT;
87298
87299 extern PFNGLINDEXFUNCEXTPROC __glewIndexFuncEXT;
87300
87301 extern PFNGLINDEXMATERIALEXTPROC __glewIndexMaterialEXT;
87302
87303 extern PFNGLAPPLYTEXTUREEXTPROC __glewApplyTextureEXT;
87304 extern PFNGLTEXTURELIGHTEXTPROC __glewTextureLightEXT;
87305 extern PFNGLTEXTUREMATERIALEXTPROC __glewTextureMaterialEXT;
87306
87307 extern PFNGLMULTIDRAWARRAYSEXTPROC __glewMultiDrawArraysEXT;
87308 extern PFNGLMULTIDRAWELEMENTSEXTPROC __glewMultiDrawElementsEXT;
87309
87310 extern PFNGLSAMPLEMASKEXTPROC __glewSampleMaskEXT;
87311 extern PFNGLSAMPLEPATTERNEXTPROC __glewSamplePatternEXT;
87312
87313 extern PFNGLCOLORTABLEEXTPROC __glewColorTableEXT;
87314 extern PFNGLGETCOLORTABLEEXTPROC __glewGetColorTableEXT;
87315 extern PFNGLGETCOLORTABLEPARAMETERFVEXTPROC __glewGetColorTableParameterfvEXT;
87316 extern PFNGLGETCOLORTABLEPARAMETERIVEXTPROC __glewGetColorTableParameterivEXT;
87317
87318 extern PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC __glewGetPixelTransformParameterfvEXT;
87319 extern PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC __glewGetPixelTransformParameterivEXT;
87320 extern PFNGLPIXELTRANSFORMPARAMETERFEXTPROC __glewPixelTransformParameterfEXT;
87321 extern PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC __glewPixelTransformParameterfvEXT;
87322 extern PFNGLPIXELTRANSFORMPARAMETERIEXTPROC __glewPixelTransformParameteriEXT;
87323 extern PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC __glewPixelTransformParameterivEXT;
87324
87325 extern PFNGLPOINTPARAMETERFEXTPROC __glewPointParameterfEXT;
87326 extern PFNGLPOINTPARAMETERFVEXTPROC __glewPointParameterfvEXT;
87327
87328 extern PFNGLPOLYGONOFFSETEXTPROC __glewPolygonOffsetEXT;
87329
87330 extern PFNGLBEGINSCENEEXTPROC __glewBeginSceneEXT;
87331 extern PFNGLENDSCENEEXTPROC __glewEndSceneEXT;
87332
87333 extern PFNGLSECONDARYCOLOR3BEXTPROC __glewSecondaryColor3bEXT;
87334 extern PFNGLSECONDARYCOLOR3BVEXTPROC __glewSecondaryColor3bvEXT;
87335 extern PFNGLSECONDARYCOLOR3DEXTPROC __glewSecondaryColor3dEXT;
87336 extern PFNGLSECONDARYCOLOR3DVEXTPROC __glewSecondaryColor3dvEXT;
87337 extern PFNGLSECONDARYCOLOR3FEXTPROC __glewSecondaryColor3fEXT;
87338 extern PFNGLSECONDARYCOLOR3FVEXTPROC __glewSecondaryColor3fvEXT;
87339 extern PFNGLSECONDARYCOLOR3IEXTPROC __glewSecondaryColor3iEXT;
87340 extern PFNGLSECONDARYCOLOR3IVEXTPROC __glewSecondaryColor3ivEXT;
87341 extern PFNGLSECONDARYCOLOR3SEXTPROC __glewSecondaryColor3sEXT;
87342 extern PFNGLSECONDARYCOLOR3SVEXTPROC __glewSecondaryColor3svEXT;
87343 extern PFNGLSECONDARYCOLOR3UBEXTPROC __glewSecondaryColor3ubEXT;
87344 extern PFNGLSECONDARYCOLOR3UBVEXTPROC __glewSecondaryColor3ubvEXT;
87345 extern PFNGLSECONDARYCOLOR3UIEXTPROC __glewSecondaryColor3uiEXT;
87346 extern PFNGLSECONDARYCOLOR3UIVEXTPROC __glewSecondaryColor3uivEXT;
87347 extern PFNGLSECONDARYCOLOR3USEXTPROC __glewSecondaryColor3usEXT;
87348 extern PFNGLSECONDARYCOLOR3USVEXTPROC __glewSecondaryColor3usvEXT;
87349 extern PFNGLSECONDARYCOLORPOINTEREXTPROC __glewSecondaryColorPointerEXT;
87350
87351 extern PFNGLACTIVESTENCILFACEEXTPROC __glewActiveStencilFaceEXT;
87352
87353 extern PFNGLTEXSUBIMAGE1DEXTPROC __glewTexSubImage1DEXT;
87354 extern PFNGLTEXSUBIMAGE2DEXTPROC __glewTexSubImage2DEXT;
87355 extern PFNGLTEXSUBIMAGE3DEXTPROC __glewTexSubImage3DEXT;
87356
87357 extern PFNGLTEXIMAGE3DEXTPROC __glewTexImage3DEXT;
87358
87359 extern PFNGLTEXBUFFEREXTPROC __glewTexBufferEXT;
87360
87361 extern PFNGLCLEARCOLORIIEXTPROC __glewClearColorIiEXT;
87362 extern PFNGLCLEARCOLORIUIEXTPROC __glewClearColorIuiEXT;
87363 extern PFNGLGETTEXPARAMETERIIVEXTPROC __glewGetTexParameterIivEXT;
87364 extern PFNGLGETTEXPARAMETERIUIVEXTPROC __glewGetTexParameterIuivEXT;
87365 extern PFNGLTEXPARAMETERIIVEXTPROC __glewTexParameterIivEXT;
87366 extern PFNGLTEXPARAMETERIUIVEXTPROC __glewTexParameterIuivEXT;
87367
87368 extern PFNGLARETEXTURESRESIDENTEXTPROC __glewAreTexturesResidentEXT;
87369 extern PFNGLBINDTEXTUREEXTPROC __glewBindTextureEXT;
87370 extern PFNGLDELETETEXTURESEXTPROC __glewDeleteTexturesEXT;
87371 extern PFNGLGENTEXTURESEXTPROC __glewGenTexturesEXT;
87372 extern PFNGLISTEXTUREEXTPROC __glewIsTextureEXT;
87373 extern PFNGLPRIORITIZETEXTURESEXTPROC __glewPrioritizeTexturesEXT;
87374
87375 extern PFNGLTEXTURENORMALEXTPROC __glewTextureNormalEXT;
87376
87377 extern PFNGLGETQUERYOBJECTI64VEXTPROC __glewGetQueryObjecti64vEXT;
87378 extern PFNGLGETQUERYOBJECTUI64VEXTPROC __glewGetQueryObjectui64vEXT;
87379
87380 extern PFNGLARRAYELEMENTEXTPROC __glewArrayElementEXT;
87381 extern PFNGLCOLORPOINTEREXTPROC __glewColorPointerEXT;
87382 extern PFNGLDRAWARRAYSEXTPROC __glewDrawArraysEXT;
87383 extern PFNGLEDGEFLAGPOINTEREXTPROC __glewEdgeFlagPointerEXT;
87384 extern PFNGLGETPOINTERVEXTPROC __glewGetPointervEXT;
87385 extern PFNGLINDEXPOINTEREXTPROC __glewIndexPointerEXT;
87386 extern PFNGLNORMALPOINTEREXTPROC __glewNormalPointerEXT;
87387 extern PFNGLTEXCOORDPOINTEREXTPROC __glewTexCoordPointerEXT;
87388 extern PFNGLVERTEXPOINTEREXTPROC __glewVertexPointerEXT;
87389
87390 extern PFNGLBEGINVERTEXSHADEREXTPROC __glewBeginVertexShaderEXT;
87391 extern PFNGLBINDLIGHTPARAMETEREXTPROC __glewBindLightParameterEXT;
87392 extern PFNGLBINDMATERIALPARAMETEREXTPROC __glewBindMaterialParameterEXT;
87393 extern PFNGLBINDPARAMETEREXTPROC __glewBindParameterEXT;
87394 extern PFNGLBINDTEXGENPARAMETEREXTPROC __glewBindTexGenParameterEXT;
87395 extern PFNGLBINDTEXTUREUNITPARAMETEREXTPROC __glewBindTextureUnitParameterEXT;
87396 extern PFNGLBINDVERTEXSHADEREXTPROC __glewBindVertexShaderEXT;
87397 extern PFNGLDELETEVERTEXSHADEREXTPROC __glewDeleteVertexShaderEXT;
87398 extern PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC __glewDisableVariantClientStateEXT;
87399 extern PFNGLENABLEVARIANTCLIENTSTATEEXTPROC __glewEnableVariantClientStateEXT;
87400 extern PFNGLENDVERTEXSHADEREXTPROC __glewEndVertexShaderEXT;
87401 extern PFNGLEXTRACTCOMPONENTEXTPROC __glewExtractComponentEXT;
87402 extern PFNGLGENSYMBOLSEXTPROC __glewGenSymbolsEXT;
87403 extern PFNGLGENVERTEXSHADERSEXTPROC __glewGenVertexShadersEXT;
87404 extern PFNGLGETINVARIANTBOOLEANVEXTPROC __glewGetInvariantBooleanvEXT;
87405 extern PFNGLGETINVARIANTFLOATVEXTPROC __glewGetInvariantFloatvEXT;
87406 extern PFNGLGETINVARIANTINTEGERVEXTPROC __glewGetInvariantIntegervEXT;
87407 extern PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC __glewGetLocalConstantBooleanvEXT;
87408 extern PFNGLGETLOCALCONSTANTFLOATVEXTPROC __glewGetLocalConstantFloatvEXT;
87409 extern PFNGLGETLOCALCONSTANTINTEGERVEXTPROC __glewGetLocalConstantIntegervEXT;
87410 extern PFNGLGETVARIANTBOOLEANVEXTPROC __glewGetVariantBooleanvEXT;
87411 extern PFNGLGETVARIANTFLOATVEXTPROC __glewGetVariantFloatvEXT;
87412 extern PFNGLGETVARIANTINTEGERVEXTPROC __glewGetVariantIntegervEXT;
87413 extern PFNGLGETVARIANTPOINTERVEXTPROC __glewGetVariantPointervEXT;
87414 extern PFNGLINSERTCOMPONENTEXTPROC __glewInsertComponentEXT;
87415 extern PFNGLISVARIANTENABLEDEXTPROC __glewIsVariantEnabledEXT;
87416 extern PFNGLSETINVARIANTEXTPROC __glewSetInvariantEXT;
87417 extern PFNGLSETLOCALCONSTANTEXTPROC __glewSetLocalConstantEXT;
87418 extern PFNGLSHADEROP1EXTPROC __glewShaderOp1EXT;
87419 extern PFNGLSHADEROP2EXTPROC __glewShaderOp2EXT;
87420 extern PFNGLSHADEROP3EXTPROC __glewShaderOp3EXT;
87421 extern PFNGLSWIZZLEEXTPROC __glewSwizzleEXT;
87422 extern PFNGLVARIANTPOINTEREXTPROC __glewVariantPointerEXT;
87423 extern PFNGLVARIANTBVEXTPROC __glewVariantbvEXT;
87424 extern PFNGLVARIANTDVEXTPROC __glewVariantdvEXT;
87425 extern PFNGLVARIANTFVEXTPROC __glewVariantfvEXT;
87426 extern PFNGLVARIANTIVEXTPROC __glewVariantivEXT;
87427 extern PFNGLVARIANTSVEXTPROC __glewVariantsvEXT;
87428 extern PFNGLVARIANTUBVEXTPROC __glewVariantubvEXT;
87429 extern PFNGLVARIANTUIVEXTPROC __glewVariantuivEXT;
87430 extern PFNGLVARIANTUSVEXTPROC __glewVariantusvEXT;
87431 extern PFNGLWRITEMASKEXTPROC __glewWriteMaskEXT;
87432
87433 extern PFNGLVERTEXWEIGHTPOINTEREXTPROC __glewVertexWeightPointerEXT;
87434 extern PFNGLVERTEXWEIGHTFEXTPROC __glewVertexWeightfEXT;
87435 extern PFNGLVERTEXWEIGHTFVEXTPROC __glewVertexWeightfvEXT;
87436
87437 extern PFNGLSTRINGMARKERGREMEDYPROC __glewStringMarkerGREMEDY;
87438
87439 extern PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC __glewGetImageTransformParameterfvHP;
87440 extern PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC __glewGetImageTransformParameterivHP;
87441 extern PFNGLIMAGETRANSFORMPARAMETERFHPPROC __glewImageTransformParameterfHP;
87442 extern PFNGLIMAGETRANSFORMPARAMETERFVHPPROC __glewImageTransformParameterfvHP;
87443 extern PFNGLIMAGETRANSFORMPARAMETERIHPPROC __glewImageTransformParameteriHP;
87444 extern PFNGLIMAGETRANSFORMPARAMETERIVHPPROC __glewImageTransformParameterivHP;
87445
87446 extern PFNGLMULTIMODEDRAWARRAYSIBMPROC __glewMultiModeDrawArraysIBM;
87447 extern PFNGLMULTIMODEDRAWELEMENTSIBMPROC __glewMultiModeDrawElementsIBM;
87448
87449 extern PFNGLCOLORPOINTERLISTIBMPROC __glewColorPointerListIBM;
87450 extern PFNGLEDGEFLAGPOINTERLISTIBMPROC __glewEdgeFlagPointerListIBM;
87451 extern PFNGLFOGCOORDPOINTERLISTIBMPROC __glewFogCoordPointerListIBM;
87452 extern PFNGLINDEXPOINTERLISTIBMPROC __glewIndexPointerListIBM;
87453 extern PFNGLNORMALPOINTERLISTIBMPROC __glewNormalPointerListIBM;
87454 extern PFNGLSECONDARYCOLORPOINTERLISTIBMPROC __glewSecondaryColorPointerListIBM;
87455 extern PFNGLTEXCOORDPOINTERLISTIBMPROC __glewTexCoordPointerListIBM;
87456 extern PFNGLVERTEXPOINTERLISTIBMPROC __glewVertexPointerListIBM;
87457
87458 extern PFNGLCOLORPOINTERVINTELPROC __glewColorPointervINTEL;
87459 extern PFNGLNORMALPOINTERVINTELPROC __glewNormalPointervINTEL;
87460 extern PFNGLTEXCOORDPOINTERVINTELPROC __glewTexCoordPointervINTEL;
87461 extern PFNGLVERTEXPOINTERVINTELPROC __glewVertexPointervINTEL;
87462
87463 extern PFNGLTEXSCISSORFUNCINTELPROC __glewTexScissorFuncINTEL;
87464 extern PFNGLTEXSCISSORINTELPROC __glewTexScissorINTEL;
87465
87466 extern PFNGLBUFFERREGIONENABLEDEXTPROC __glewBufferRegionEnabledEXT;
87467 extern PFNGLDELETEBUFFERREGIONEXTPROC __glewDeleteBufferRegionEXT;
87468 extern PFNGLDRAWBUFFERREGIONEXTPROC __glewDrawBufferRegionEXT;
87469 extern PFNGLNEWBUFFERREGIONEXTPROC __glewNewBufferRegionEXT;
87470 extern PFNGLREADBUFFERREGIONEXTPROC __glewReadBufferRegionEXT;
87471
87472 extern PFNGLRESIZEBUFFERSMESAPROC __glewResizeBuffersMESA;
87473
87474 extern PFNGLWINDOWPOS2DMESAPROC __glewWindowPos2dMESA;
87475 extern PFNGLWINDOWPOS2DVMESAPROC __glewWindowPos2dvMESA;
87476 extern PFNGLWINDOWPOS2FMESAPROC __glewWindowPos2fMESA;
87477 extern PFNGLWINDOWPOS2FVMESAPROC __glewWindowPos2fvMESA;
87478 extern PFNGLWINDOWPOS2IMESAPROC __glewWindowPos2iMESA;
87479 extern PFNGLWINDOWPOS2IVMESAPROC __glewWindowPos2ivMESA;
87480 extern PFNGLWINDOWPOS2SMESAPROC __glewWindowPos2sMESA;
87481 extern PFNGLWINDOWPOS2SVMESAPROC __glewWindowPos2svMESA;
87482 extern PFNGLWINDOWPOS3DMESAPROC __glewWindowPos3dMESA;
87483 extern PFNGLWINDOWPOS3DVMESAPROC __glewWindowPos3dvMESA;
87484 extern PFNGLWINDOWPOS3FMESAPROC __glewWindowPos3fMESA;
87485 extern PFNGLWINDOWPOS3FVMESAPROC __glewWindowPos3fvMESA;
87486 extern PFNGLWINDOWPOS3IMESAPROC __glewWindowPos3iMESA;
87487 extern PFNGLWINDOWPOS3IVMESAPROC __glewWindowPos3ivMESA;
87488 extern PFNGLWINDOWPOS3SMESAPROC __glewWindowPos3sMESA;
87489 extern PFNGLWINDOWPOS3SVMESAPROC __glewWindowPos3svMESA;
87490 extern PFNGLWINDOWPOS4DMESAPROC __glewWindowPos4dMESA;
87491 extern PFNGLWINDOWPOS4DVMESAPROC __glewWindowPos4dvMESA;
87492 extern PFNGLWINDOWPOS4FMESAPROC __glewWindowPos4fMESA;
87493 extern PFNGLWINDOWPOS4FVMESAPROC __glewWindowPos4fvMESA;
87494 extern PFNGLWINDOWPOS4IMESAPROC __glewWindowPos4iMESA;
87495 extern PFNGLWINDOWPOS4IVMESAPROC __glewWindowPos4ivMESA;
87496 extern PFNGLWINDOWPOS4SMESAPROC __glewWindowPos4sMESA;
87497 extern PFNGLWINDOWPOS4SVMESAPROC __glewWindowPos4svMESA;
87498
87499 extern PFNGLCLEARDEPTHDNVPROC __glewClearDepthdNV;
87500 extern PFNGLDEPTHBOUNDSDNVPROC __glewDepthBoundsdNV;
87501 extern PFNGLDEPTHRANGEDNVPROC __glewDepthRangedNV;
87502
87503 extern PFNGLEVALMAPSNVPROC __glewEvalMapsNV;
87504 extern PFNGLGETMAPATTRIBPARAMETERFVNVPROC __glewGetMapAttribParameterfvNV;
87505 extern PFNGLGETMAPATTRIBPARAMETERIVNVPROC __glewGetMapAttribParameterivNV;
87506 extern PFNGLGETMAPCONTROLPOINTSNVPROC __glewGetMapControlPointsNV;
87507 extern PFNGLGETMAPPARAMETERFVNVPROC __glewGetMapParameterfvNV;
87508 extern PFNGLGETMAPPARAMETERIVNVPROC __glewGetMapParameterivNV;
87509 extern PFNGLMAPCONTROLPOINTSNVPROC __glewMapControlPointsNV;
87510 extern PFNGLMAPPARAMETERFVNVPROC __glewMapParameterfvNV;
87511 extern PFNGLMAPPARAMETERIVNVPROC __glewMapParameterivNV;
87512
87513 extern PFNGLDELETEFENCESNVPROC __glewDeleteFencesNV;
87514 extern PFNGLFINISHFENCENVPROC __glewFinishFenceNV;
87515 extern PFNGLGENFENCESNVPROC __glewGenFencesNV;
87516 extern PFNGLGETFENCEIVNVPROC __glewGetFenceivNV;
87517 extern PFNGLISFENCENVPROC __glewIsFenceNV;
87518 extern PFNGLSETFENCENVPROC __glewSetFenceNV;
87519 extern PFNGLTESTFENCENVPROC __glewTestFenceNV;
87520
87521 extern PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC __glewGetProgramNamedParameterdvNV;
87522 extern PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC __glewGetProgramNamedParameterfvNV;
87523 extern PFNGLPROGRAMNAMEDPARAMETER4DNVPROC __glewProgramNamedParameter4dNV;
87524 extern PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC __glewProgramNamedParameter4dvNV;
87525 extern PFNGLPROGRAMNAMEDPARAMETER4FNVPROC __glewProgramNamedParameter4fNV;
87526 extern PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC __glewProgramNamedParameter4fvNV;
87527
87528 extern PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC __glewRenderbufferStorageMultisampleCoverageNV;
87529
87530 extern PFNGLPROGRAMVERTEXLIMITNVPROC __glewProgramVertexLimitNV;
87531
87532 extern PFNGLPROGRAMENVPARAMETERI4INVPROC __glewProgramEnvParameterI4iNV;
87533 extern PFNGLPROGRAMENVPARAMETERI4IVNVPROC __glewProgramEnvParameterI4ivNV;
87534 extern PFNGLPROGRAMENVPARAMETERI4UINVPROC __glewProgramEnvParameterI4uiNV;
87535 extern PFNGLPROGRAMENVPARAMETERI4UIVNVPROC __glewProgramEnvParameterI4uivNV;
87536 extern PFNGLPROGRAMENVPARAMETERSI4IVNVPROC __glewProgramEnvParametersI4ivNV;
87537 extern PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC __glewProgramEnvParametersI4uivNV;
87538 extern PFNGLPROGRAMLOCALPARAMETERI4INVPROC __glewProgramLocalParameterI4iNV;
87539 extern PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC __glewProgramLocalParameterI4ivNV;
87540 extern PFNGLPROGRAMLOCALPARAMETERI4UINVPROC __glewProgramLocalParameterI4uiNV;
87541 extern PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC __glewProgramLocalParameterI4uivNV;
87542 extern PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC __glewProgramLocalParametersI4ivNV;
87543 extern PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC __glewProgramLocalParametersI4uivNV;
87544
87545 extern PFNGLCOLOR3HNVPROC __glewColor3hNV;
87546 extern PFNGLCOLOR3HVNVPROC __glewColor3hvNV;
87547 extern PFNGLCOLOR4HNVPROC __glewColor4hNV;
87548 extern PFNGLCOLOR4HVNVPROC __glewColor4hvNV;
87549 extern PFNGLFOGCOORDHNVPROC __glewFogCoordhNV;
87550 extern PFNGLFOGCOORDHVNVPROC __glewFogCoordhvNV;
87551 extern PFNGLMULTITEXCOORD1HNVPROC __glewMultiTexCoord1hNV;
87552 extern PFNGLMULTITEXCOORD1HVNVPROC __glewMultiTexCoord1hvNV;
87553 extern PFNGLMULTITEXCOORD2HNVPROC __glewMultiTexCoord2hNV;
87554 extern PFNGLMULTITEXCOORD2HVNVPROC __glewMultiTexCoord2hvNV;
87555 extern PFNGLMULTITEXCOORD3HNVPROC __glewMultiTexCoord3hNV;
87556 extern PFNGLMULTITEXCOORD3HVNVPROC __glewMultiTexCoord3hvNV;
87557 extern PFNGLMULTITEXCOORD4HNVPROC __glewMultiTexCoord4hNV;
87558 extern PFNGLMULTITEXCOORD4HVNVPROC __glewMultiTexCoord4hvNV;
87559 extern PFNGLNORMAL3HNVPROC __glewNormal3hNV;
87560 extern PFNGLNORMAL3HVNVPROC __glewNormal3hvNV;
87561 extern PFNGLSECONDARYCOLOR3HNVPROC __glewSecondaryColor3hNV;
87562 extern PFNGLSECONDARYCOLOR3HVNVPROC __glewSecondaryColor3hvNV;
87563 extern PFNGLTEXCOORD1HNVPROC __glewTexCoord1hNV;
87564 extern PFNGLTEXCOORD1HVNVPROC __glewTexCoord1hvNV;
87565 extern PFNGLTEXCOORD2HNVPROC __glewTexCoord2hNV;
87566 extern PFNGLTEXCOORD2HVNVPROC __glewTexCoord2hvNV;
87567 extern PFNGLTEXCOORD3HNVPROC __glewTexCoord3hNV;
87568 extern PFNGLTEXCOORD3HVNVPROC __glewTexCoord3hvNV;
87569 extern PFNGLTEXCOORD4HNVPROC __glewTexCoord4hNV;
87570 extern PFNGLTEXCOORD4HVNVPROC __glewTexCoord4hvNV;
87571 extern PFNGLVERTEX2HNVPROC __glewVertex2hNV;
87572 extern PFNGLVERTEX2HVNVPROC __glewVertex2hvNV;
87573 extern PFNGLVERTEX3HNVPROC __glewVertex3hNV;
87574 extern PFNGLVERTEX3HVNVPROC __glewVertex3hvNV;
87575 extern PFNGLVERTEX4HNVPROC __glewVertex4hNV;
87576 extern PFNGLVERTEX4HVNVPROC __glewVertex4hvNV;
87577 extern PFNGLVERTEXATTRIB1HNVPROC __glewVertexAttrib1hNV;
87578 extern PFNGLVERTEXATTRIB1HVNVPROC __glewVertexAttrib1hvNV;
87579 extern PFNGLVERTEXATTRIB2HNVPROC __glewVertexAttrib2hNV;
87580 extern PFNGLVERTEXATTRIB2HVNVPROC __glewVertexAttrib2hvNV;
87581 extern PFNGLVERTEXATTRIB3HNVPROC __glewVertexAttrib3hNV;
87582 extern PFNGLVERTEXATTRIB3HVNVPROC __glewVertexAttrib3hvNV;
87583 extern PFNGLVERTEXATTRIB4HNVPROC __glewVertexAttrib4hNV;
87584 extern PFNGLVERTEXATTRIB4HVNVPROC __glewVertexAttrib4hvNV;
87585 extern PFNGLVERTEXATTRIBS1HVNVPROC __glewVertexAttribs1hvNV;
87586 extern PFNGLVERTEXATTRIBS2HVNVPROC __glewVertexAttribs2hvNV;
87587 extern PFNGLVERTEXATTRIBS3HVNVPROC __glewVertexAttribs3hvNV;
87588 extern PFNGLVERTEXATTRIBS4HVNVPROC __glewVertexAttribs4hvNV;
87589 extern PFNGLVERTEXWEIGHTHNVPROC __glewVertexWeighthNV;
87590 extern PFNGLVERTEXWEIGHTHVNVPROC __glewVertexWeighthvNV;
87591
87592 extern PFNGLBEGINOCCLUSIONQUERYNVPROC __glewBeginOcclusionQueryNV;
87593 extern PFNGLDELETEOCCLUSIONQUERIESNVPROC __glewDeleteOcclusionQueriesNV;
87594 extern PFNGLENDOCCLUSIONQUERYNVPROC __glewEndOcclusionQueryNV;
87595 extern PFNGLGENOCCLUSIONQUERIESNVPROC __glewGenOcclusionQueriesNV;
87596 extern PFNGLGETOCCLUSIONQUERYIVNVPROC __glewGetOcclusionQueryivNV;
87597 extern PFNGLGETOCCLUSIONQUERYUIVNVPROC __glewGetOcclusionQueryuivNV;
87598 extern PFNGLISOCCLUSIONQUERYNVPROC __glewIsOcclusionQueryNV;
87599
87600 extern PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC __glewProgramBufferParametersIivNV;
87601 extern PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC __glewProgramBufferParametersIuivNV;
87602 extern PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC __glewProgramBufferParametersfvNV;
87603
87604 extern PFNGLFLUSHPIXELDATARANGENVPROC __glewFlushPixelDataRangeNV;
87605 extern PFNGLPIXELDATARANGENVPROC __glewPixelDataRangeNV;
87606
87607 extern PFNGLPOINTPARAMETERINVPROC __glewPointParameteriNV;
87608 extern PFNGLPOINTPARAMETERIVNVPROC __glewPointParameterivNV;
87609
87610 extern PFNGLPRIMITIVERESTARTINDEXNVPROC __glewPrimitiveRestartIndexNV;
87611 extern PFNGLPRIMITIVERESTARTNVPROC __glewPrimitiveRestartNV;
87612
87613 extern PFNGLCOMBINERINPUTNVPROC __glewCombinerInputNV;
87614 extern PFNGLCOMBINEROUTPUTNVPROC __glewCombinerOutputNV;
87615 extern PFNGLCOMBINERPARAMETERFNVPROC __glewCombinerParameterfNV;
87616 extern PFNGLCOMBINERPARAMETERFVNVPROC __glewCombinerParameterfvNV;
87617 extern PFNGLCOMBINERPARAMETERINVPROC __glewCombinerParameteriNV;
87618 extern PFNGLCOMBINERPARAMETERIVNVPROC __glewCombinerParameterivNV;
87619 extern PFNGLFINALCOMBINERINPUTNVPROC __glewFinalCombinerInputNV;
87620 extern PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC __glewGetCombinerInputParameterfvNV;
87621 extern PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC __glewGetCombinerInputParameterivNV;
87622 extern PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC __glewGetCombinerOutputParameterfvNV;
87623 extern PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC __glewGetCombinerOutputParameterivNV;
87624 extern PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC __glewGetFinalCombinerInputParameterfvNV;
87625 extern PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC __glewGetFinalCombinerInputParameterivNV;
87626
87627 extern PFNGLCOMBINERSTAGEPARAMETERFVNVPROC __glewCombinerStageParameterfvNV;
87628 extern PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC __glewGetCombinerStageParameterfvNV;
87629
87630 extern PFNGLACTIVEVARYINGNVPROC __glewActiveVaryingNV;
87631 extern PFNGLBEGINTRANSFORMFEEDBACKNVPROC __glewBeginTransformFeedbackNV;
87632 extern PFNGLBINDBUFFERBASENVPROC __glewBindBufferBaseNV;
87633 extern PFNGLBINDBUFFEROFFSETNVPROC __glewBindBufferOffsetNV;
87634 extern PFNGLBINDBUFFERRANGENVPROC __glewBindBufferRangeNV;
87635 extern PFNGLENDTRANSFORMFEEDBACKNVPROC __glewEndTransformFeedbackNV;
87636 extern PFNGLGETACTIVEVARYINGNVPROC __glewGetActiveVaryingNV;
87637 extern PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC __glewGetTransformFeedbackVaryingNV;
87638 extern PFNGLGETVARYINGLOCATIONNVPROC __glewGetVaryingLocationNV;
87639 extern PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC __glewTransformFeedbackAttribsNV;
87640 extern PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC __glewTransformFeedbackVaryingsNV;
87641
87642 extern PFNGLFLUSHVERTEXARRAYRANGENVPROC __glewFlushVertexArrayRangeNV;
87643 extern PFNGLVERTEXARRAYRANGENVPROC __glewVertexArrayRangeNV;
87644
87645 extern PFNGLAREPROGRAMSRESIDENTNVPROC __glewAreProgramsResidentNV;
87646 extern PFNGLBINDPROGRAMNVPROC __glewBindProgramNV;
87647 extern PFNGLDELETEPROGRAMSNVPROC __glewDeleteProgramsNV;
87648 extern PFNGLEXECUTEPROGRAMNVPROC __glewExecuteProgramNV;
87649 extern PFNGLGENPROGRAMSNVPROC __glewGenProgramsNV;
87650 extern PFNGLGETPROGRAMPARAMETERDVNVPROC __glewGetProgramParameterdvNV;
87651 extern PFNGLGETPROGRAMPARAMETERFVNVPROC __glewGetProgramParameterfvNV;
87652 extern PFNGLGETPROGRAMSTRINGNVPROC __glewGetProgramStringNV;
87653 extern PFNGLGETPROGRAMIVNVPROC __glewGetProgramivNV;
87654 extern PFNGLGETTRACKMATRIXIVNVPROC __glewGetTrackMatrixivNV;
87655 extern PFNGLGETVERTEXATTRIBPOINTERVNVPROC __glewGetVertexAttribPointervNV;
87656 extern PFNGLGETVERTEXATTRIBDVNVPROC __glewGetVertexAttribdvNV;
87657 extern PFNGLGETVERTEXATTRIBFVNVPROC __glewGetVertexAttribfvNV;
87658 extern PFNGLGETVERTEXATTRIBIVNVPROC __glewGetVertexAttribivNV;
87659 extern PFNGLISPROGRAMNVPROC __glewIsProgramNV;
87660 extern PFNGLLOADPROGRAMNVPROC __glewLoadProgramNV;
87661 extern PFNGLPROGRAMPARAMETER4DNVPROC __glewProgramParameter4dNV;
87662 extern PFNGLPROGRAMPARAMETER4DVNVPROC __glewProgramParameter4dvNV;
87663 extern PFNGLPROGRAMPARAMETER4FNVPROC __glewProgramParameter4fNV;
87664 extern PFNGLPROGRAMPARAMETER4FVNVPROC __glewProgramParameter4fvNV;
87665 extern PFNGLPROGRAMPARAMETERS4DVNVPROC __glewProgramParameters4dvNV;
87666 extern PFNGLPROGRAMPARAMETERS4FVNVPROC __glewProgramParameters4fvNV;
87667 extern PFNGLREQUESTRESIDENTPROGRAMSNVPROC __glewRequestResidentProgramsNV;
87668 extern PFNGLTRACKMATRIXNVPROC __glewTrackMatrixNV;
87669 extern PFNGLVERTEXATTRIB1DNVPROC __glewVertexAttrib1dNV;
87670 extern PFNGLVERTEXATTRIB1DVNVPROC __glewVertexAttrib1dvNV;
87671 extern PFNGLVERTEXATTRIB1FNVPROC __glewVertexAttrib1fNV;
87672 extern PFNGLVERTEXATTRIB1FVNVPROC __glewVertexAttrib1fvNV;
87673 extern PFNGLVERTEXATTRIB1SNVPROC __glewVertexAttrib1sNV;
87674 extern PFNGLVERTEXATTRIB1SVNVPROC __glewVertexAttrib1svNV;
87675 extern PFNGLVERTEXATTRIB2DNVPROC __glewVertexAttrib2dNV;
87676 extern PFNGLVERTEXATTRIB2DVNVPROC __glewVertexAttrib2dvNV;
87677 extern PFNGLVERTEXATTRIB2FNVPROC __glewVertexAttrib2fNV;
87678 extern PFNGLVERTEXATTRIB2FVNVPROC __glewVertexAttrib2fvNV;
87679 extern PFNGLVERTEXATTRIB2SNVPROC __glewVertexAttrib2sNV;
87680 extern PFNGLVERTEXATTRIB2SVNVPROC __glewVertexAttrib2svNV;
87681 extern PFNGLVERTEXATTRIB3DNVPROC __glewVertexAttrib3dNV;
87682 extern PFNGLVERTEXATTRIB3DVNVPROC __glewVertexAttrib3dvNV;
87683 extern PFNGLVERTEXATTRIB3FNVPROC __glewVertexAttrib3fNV;
87684 extern PFNGLVERTEXATTRIB3FVNVPROC __glewVertexAttrib3fvNV;
87685 extern PFNGLVERTEXATTRIB3SNVPROC __glewVertexAttrib3sNV;
87686 extern PFNGLVERTEXATTRIB3SVNVPROC __glewVertexAttrib3svNV;
87687 extern PFNGLVERTEXATTRIB4DNVPROC __glewVertexAttrib4dNV;
87688 extern PFNGLVERTEXATTRIB4DVNVPROC __glewVertexAttrib4dvNV;
87689 extern PFNGLVERTEXATTRIB4FNVPROC __glewVertexAttrib4fNV;
87690 extern PFNGLVERTEXATTRIB4FVNVPROC __glewVertexAttrib4fvNV;
87691 extern PFNGLVERTEXATTRIB4SNVPROC __glewVertexAttrib4sNV;
87692 extern PFNGLVERTEXATTRIB4SVNVPROC __glewVertexAttrib4svNV;
87693 extern PFNGLVERTEXATTRIB4UBNVPROC __glewVertexAttrib4ubNV;
87694 extern PFNGLVERTEXATTRIB4UBVNVPROC __glewVertexAttrib4ubvNV;
87695 extern PFNGLVERTEXATTRIBPOINTERNVPROC __glewVertexAttribPointerNV;
87696 extern PFNGLVERTEXATTRIBS1DVNVPROC __glewVertexAttribs1dvNV;
87697 extern PFNGLVERTEXATTRIBS1FVNVPROC __glewVertexAttribs1fvNV;
87698 extern PFNGLVERTEXATTRIBS1SVNVPROC __glewVertexAttribs1svNV;
87699 extern PFNGLVERTEXATTRIBS2DVNVPROC __glewVertexAttribs2dvNV;
87700 extern PFNGLVERTEXATTRIBS2FVNVPROC __glewVertexAttribs2fvNV;
87701 extern PFNGLVERTEXATTRIBS2SVNVPROC __glewVertexAttribs2svNV;
87702 extern PFNGLVERTEXATTRIBS3DVNVPROC __glewVertexAttribs3dvNV;
87703 extern PFNGLVERTEXATTRIBS3FVNVPROC __glewVertexAttribs3fvNV;
87704 extern PFNGLVERTEXATTRIBS3SVNVPROC __glewVertexAttribs3svNV;
87705 extern PFNGLVERTEXATTRIBS4DVNVPROC __glewVertexAttribs4dvNV;
87706 extern PFNGLVERTEXATTRIBS4FVNVPROC __glewVertexAttribs4fvNV;
87707 extern PFNGLVERTEXATTRIBS4SVNVPROC __glewVertexAttribs4svNV;
87708 extern PFNGLVERTEXATTRIBS4UBVNVPROC __glewVertexAttribs4ubvNV;
87709
87710 extern PFNGLCLEARDEPTHFOESPROC __glewClearDepthfOES;
87711 extern PFNGLCLIPPLANEFOESPROC __glewClipPlanefOES;
87712 extern PFNGLDEPTHRANGEFOESPROC __glewDepthRangefOES;
87713 extern PFNGLFRUSTUMFOESPROC __glewFrustumfOES;
87714 extern PFNGLGETCLIPPLANEFOESPROC __glewGetClipPlanefOES;
87715 extern PFNGLORTHOFOESPROC __glewOrthofOES;
87716
87717 extern PFNGLDETAILTEXFUNCSGISPROC __glewDetailTexFuncSGIS;
87718 extern PFNGLGETDETAILTEXFUNCSGISPROC __glewGetDetailTexFuncSGIS;
87719
87720 extern PFNGLFOGFUNCSGISPROC __glewFogFuncSGIS;
87721 extern PFNGLGETFOGFUNCSGISPROC __glewGetFogFuncSGIS;
87722
87723 extern PFNGLSAMPLEMASKSGISPROC __glewSampleMaskSGIS;
87724 extern PFNGLSAMPLEPATTERNSGISPROC __glewSamplePatternSGIS;
87725
87726 extern PFNGLGETSHARPENTEXFUNCSGISPROC __glewGetSharpenTexFuncSGIS;
87727 extern PFNGLSHARPENTEXFUNCSGISPROC __glewSharpenTexFuncSGIS;
87728
87729 extern PFNGLTEXIMAGE4DSGISPROC __glewTexImage4DSGIS;
87730 extern PFNGLTEXSUBIMAGE4DSGISPROC __glewTexSubImage4DSGIS;
87731
87732 extern PFNGLGETTEXFILTERFUNCSGISPROC __glewGetTexFilterFuncSGIS;
87733 extern PFNGLTEXFILTERFUNCSGISPROC __glewTexFilterFuncSGIS;
87734
87735 extern PFNGLASYNCMARKERSGIXPROC __glewAsyncMarkerSGIX;
87736 extern PFNGLDELETEASYNCMARKERSSGIXPROC __glewDeleteAsyncMarkersSGIX;
87737 extern PFNGLFINISHASYNCSGIXPROC __glewFinishAsyncSGIX;
87738 extern PFNGLGENASYNCMARKERSSGIXPROC __glewGenAsyncMarkersSGIX;
87739 extern PFNGLISASYNCMARKERSGIXPROC __glewIsAsyncMarkerSGIX;
87740 extern PFNGLPOLLASYNCSGIXPROC __glewPollAsyncSGIX;
87741
87742 extern PFNGLFLUSHRASTERSGIXPROC __glewFlushRasterSGIX;
87743
87744 extern PFNGLTEXTUREFOGSGIXPROC __glewTextureFogSGIX;
87745
87746 extern PFNGLFRAGMENTCOLORMATERIALSGIXPROC __glewFragmentColorMaterialSGIX;
87747 extern PFNGLFRAGMENTLIGHTMODELFSGIXPROC __glewFragmentLightModelfSGIX;
87748 extern PFNGLFRAGMENTLIGHTMODELFVSGIXPROC __glewFragmentLightModelfvSGIX;
87749 extern PFNGLFRAGMENTLIGHTMODELISGIXPROC __glewFragmentLightModeliSGIX;
87750 extern PFNGLFRAGMENTLIGHTMODELIVSGIXPROC __glewFragmentLightModelivSGIX;
87751 extern PFNGLFRAGMENTLIGHTFSGIXPROC __glewFragmentLightfSGIX;
87752 extern PFNGLFRAGMENTLIGHTFVSGIXPROC __glewFragmentLightfvSGIX;
87753 extern PFNGLFRAGMENTLIGHTISGIXPROC __glewFragmentLightiSGIX;
87754 extern PFNGLFRAGMENTLIGHTIVSGIXPROC __glewFragmentLightivSGIX;
87755 extern PFNGLFRAGMENTMATERIALFSGIXPROC __glewFragmentMaterialfSGIX;
87756 extern PFNGLFRAGMENTMATERIALFVSGIXPROC __glewFragmentMaterialfvSGIX;
87757 extern PFNGLFRAGMENTMATERIALISGIXPROC __glewFragmentMaterialiSGIX;
87758 extern PFNGLFRAGMENTMATERIALIVSGIXPROC __glewFragmentMaterialivSGIX;
87759 extern PFNGLGETFRAGMENTLIGHTFVSGIXPROC __glewGetFragmentLightfvSGIX;
87760 extern PFNGLGETFRAGMENTLIGHTIVSGIXPROC __glewGetFragmentLightivSGIX;
87761 extern PFNGLGETFRAGMENTMATERIALFVSGIXPROC __glewGetFragmentMaterialfvSGIX;
87762 extern PFNGLGETFRAGMENTMATERIALIVSGIXPROC __glewGetFragmentMaterialivSGIX;
87763
87764 extern PFNGLFRAMEZOOMSGIXPROC __glewFrameZoomSGIX;
87765
87766 extern PFNGLPIXELTEXGENSGIXPROC __glewPixelTexGenSGIX;
87767
87768 extern PFNGLREFERENCEPLANESGIXPROC __glewReferencePlaneSGIX;
87769
87770 extern PFNGLSPRITEPARAMETERFSGIXPROC __glewSpriteParameterfSGIX;
87771 extern PFNGLSPRITEPARAMETERFVSGIXPROC __glewSpriteParameterfvSGIX;
87772 extern PFNGLSPRITEPARAMETERISGIXPROC __glewSpriteParameteriSGIX;
87773 extern PFNGLSPRITEPARAMETERIVSGIXPROC __glewSpriteParameterivSGIX;
87774
87775 extern PFNGLTAGSAMPLEBUFFERSGIXPROC __glewTagSampleBufferSGIX;
87776
87777 extern PFNGLCOLORTABLEPARAMETERFVSGIPROC __glewColorTableParameterfvSGI;
87778 extern PFNGLCOLORTABLEPARAMETERIVSGIPROC __glewColorTableParameterivSGI;
87779 extern PFNGLCOLORTABLESGIPROC __glewColorTableSGI;
87780 extern PFNGLCOPYCOLORTABLESGIPROC __glewCopyColorTableSGI;
87781 extern PFNGLGETCOLORTABLEPARAMETERFVSGIPROC __glewGetColorTableParameterfvSGI;
87782 extern PFNGLGETCOLORTABLEPARAMETERIVSGIPROC __glewGetColorTableParameterivSGI;
87783 extern PFNGLGETCOLORTABLESGIPROC __glewGetColorTableSGI;
87784
87785 extern PFNGLFINISHTEXTURESUNXPROC __glewFinishTextureSUNX;
87786
87787 extern PFNGLGLOBALALPHAFACTORBSUNPROC __glewGlobalAlphaFactorbSUN;
87788 extern PFNGLGLOBALALPHAFACTORDSUNPROC __glewGlobalAlphaFactordSUN;
87789 extern PFNGLGLOBALALPHAFACTORFSUNPROC __glewGlobalAlphaFactorfSUN;
87790 extern PFNGLGLOBALALPHAFACTORISUNPROC __glewGlobalAlphaFactoriSUN;
87791 extern PFNGLGLOBALALPHAFACTORSSUNPROC __glewGlobalAlphaFactorsSUN;
87792 extern PFNGLGLOBALALPHAFACTORUBSUNPROC __glewGlobalAlphaFactorubSUN;
87793 extern PFNGLGLOBALALPHAFACTORUISUNPROC __glewGlobalAlphaFactoruiSUN;
87794 extern PFNGLGLOBALALPHAFACTORUSSUNPROC __glewGlobalAlphaFactorusSUN;
87795
87796 extern PFNGLREADVIDEOPIXELSSUNPROC __glewReadVideoPixelsSUN;
87797
87798 extern PFNGLREPLACEMENTCODEPOINTERSUNPROC __glewReplacementCodePointerSUN;
87799 extern PFNGLREPLACEMENTCODEUBSUNPROC __glewReplacementCodeubSUN;
87800 extern PFNGLREPLACEMENTCODEUBVSUNPROC __glewReplacementCodeubvSUN;
87801 extern PFNGLREPLACEMENTCODEUISUNPROC __glewReplacementCodeuiSUN;
87802 extern PFNGLREPLACEMENTCODEUIVSUNPROC __glewReplacementCodeuivSUN;
87803 extern PFNGLREPLACEMENTCODEUSSUNPROC __glewReplacementCodeusSUN;
87804 extern PFNGLREPLACEMENTCODEUSVSUNPROC __glewReplacementCodeusvSUN;
87805
87806 extern PFNGLCOLOR3FVERTEX3FSUNPROC __glewColor3fVertex3fSUN;
87807 extern PFNGLCOLOR3FVERTEX3FVSUNPROC __glewColor3fVertex3fvSUN;
87808 extern PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC __glewColor4fNormal3fVertex3fSUN;
87809 extern PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC __glewColor4fNormal3fVertex3fvSUN;
87810 extern PFNGLCOLOR4UBVERTEX2FSUNPROC __glewColor4ubVertex2fSUN;
87811 extern PFNGLCOLOR4UBVERTEX2FVSUNPROC __glewColor4ubVertex2fvSUN;
87812 extern PFNGLCOLOR4UBVERTEX3FSUNPROC __glewColor4ubVertex3fSUN;
87813 extern PFNGLCOLOR4UBVERTEX3FVSUNPROC __glewColor4ubVertex3fvSUN;
87814 extern PFNGLNORMAL3FVERTEX3FSUNPROC __glewNormal3fVertex3fSUN;
87815 extern PFNGLNORMAL3FVERTEX3FVSUNPROC __glewNormal3fVertex3fvSUN;
87816 extern PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC __glewReplacementCodeuiColor3fVertex3fSUN;
87817 extern PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC __glewReplacementCodeuiColor3fVertex3fvSUN;
87818 extern PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC __glewReplacementCodeuiColor4fNormal3fVertex3fSUN;
87819 extern PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC __glewReplacementCodeuiColor4fNormal3fVertex3fvSUN;
87820 extern PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC __glewReplacementCodeuiColor4ubVertex3fSUN;
87821 extern PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC __glewReplacementCodeuiColor4ubVertex3fvSUN;
87822 extern PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC __glewReplacementCodeuiNormal3fVertex3fSUN;
87823 extern PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC __glewReplacementCodeuiNormal3fVertex3fvSUN;
87824 extern PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC __glewReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN;
87825 extern PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC __glewReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN;
87826 extern PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC __glewReplacementCodeuiTexCoord2fNormal3fVertex3fSUN;
87827 extern PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC __glewReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN;
87828 extern PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC __glewReplacementCodeuiTexCoord2fVertex3fSUN;
87829 extern PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC __glewReplacementCodeuiTexCoord2fVertex3fvSUN;
87830 extern PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC __glewReplacementCodeuiVertex3fSUN;
87831 extern PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC __glewReplacementCodeuiVertex3fvSUN;
87832 extern PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC __glewTexCoord2fColor3fVertex3fSUN;
87833 extern PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC __glewTexCoord2fColor3fVertex3fvSUN;
87834 extern PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC __glewTexCoord2fColor4fNormal3fVertex3fSUN;
87835 extern PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC __glewTexCoord2fColor4fNormal3fVertex3fvSUN;
87836 extern PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC __glewTexCoord2fColor4ubVertex3fSUN;
87837 extern PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC __glewTexCoord2fColor4ubVertex3fvSUN;
87838 extern PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC __glewTexCoord2fNormal3fVertex3fSUN;
87839 extern PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC __glewTexCoord2fNormal3fVertex3fvSUN;
87840 extern PFNGLTEXCOORD2FVERTEX3FSUNPROC __glewTexCoord2fVertex3fSUN;
87841 extern PFNGLTEXCOORD2FVERTEX3FVSUNPROC __glewTexCoord2fVertex3fvSUN;
87842 extern PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC __glewTexCoord4fColor4fNormal3fVertex4fSUN;
87843 extern PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC __glewTexCoord4fColor4fNormal3fVertex4fvSUN;
87844 extern PFNGLTEXCOORD4FVERTEX4FSUNPROC __glewTexCoord4fVertex4fSUN;
87845 extern PFNGLTEXCOORD4FVERTEX4FVSUNPROC __glewTexCoord4fVertex4fvSUN;
87846
87847 extern PFNGLADDSWAPHINTRECTWINPROC __glewAddSwapHintRectWIN;
87848
87849
87850
87851
87852
87853
87854 extern GLboolean __GLEW_VERSION_1_1;
87855 extern GLboolean __GLEW_VERSION_1_2;
87856 extern GLboolean __GLEW_VERSION_1_3;
87857 extern GLboolean __GLEW_VERSION_1_4;
87858 extern GLboolean __GLEW_VERSION_1_5;
87859 extern GLboolean __GLEW_VERSION_2_0;
87860 extern GLboolean __GLEW_VERSION_2_1;
87861 extern GLboolean __GLEW_3DFX_multisample;
87862 extern GLboolean __GLEW_3DFX_tbuffer;
87863 extern GLboolean __GLEW_3DFX_texture_compression_FXT1;
87864 extern GLboolean __GLEW_APPLE_client_storage;
87865 extern GLboolean __GLEW_APPLE_element_array;
87866 extern GLboolean __GLEW_APPLE_fence;
87867 extern GLboolean __GLEW_APPLE_float_pixels;
87868 extern GLboolean __GLEW_APPLE_pixel_buffer;
87869 extern GLboolean __GLEW_APPLE_specular_vector;
87870 extern GLboolean __GLEW_APPLE_texture_range;
87871 extern GLboolean __GLEW_APPLE_transform_hint;
87872 extern GLboolean __GLEW_APPLE_vertex_array_object;
87873 extern GLboolean __GLEW_APPLE_vertex_array_range;
87874 extern GLboolean __GLEW_APPLE_ycbcr_422;
87875 extern GLboolean __GLEW_ARB_color_buffer_float;
87876 extern GLboolean __GLEW_ARB_depth_texture;
87877 extern GLboolean __GLEW_ARB_draw_buffers;
87878 extern GLboolean __GLEW_ARB_fragment_program;
87879 extern GLboolean __GLEW_ARB_fragment_program_shadow;
87880 extern GLboolean __GLEW_ARB_fragment_shader;
87881 extern GLboolean __GLEW_ARB_half_float_pixel;
87882 extern GLboolean __GLEW_ARB_imaging;
87883 extern GLboolean __GLEW_ARB_matrix_palette;
87884 extern GLboolean __GLEW_ARB_multisample;
87885 extern GLboolean __GLEW_ARB_multitexture;
87886 extern GLboolean __GLEW_ARB_occlusion_query;
87887 extern GLboolean __GLEW_ARB_pixel_buffer_object;
87888 extern GLboolean __GLEW_ARB_point_parameters;
87889 extern GLboolean __GLEW_ARB_point_sprite;
87890 extern GLboolean __GLEW_ARB_shader_objects;
87891 extern GLboolean __GLEW_ARB_shading_language_100;
87892 extern GLboolean __GLEW_ARB_shadow;
87893 extern GLboolean __GLEW_ARB_shadow_ambient;
87894 extern GLboolean __GLEW_ARB_texture_border_clamp;
87895 extern GLboolean __GLEW_ARB_texture_compression;
87896 extern GLboolean __GLEW_ARB_texture_cube_map;
87897 extern GLboolean __GLEW_ARB_texture_env_add;
87898 extern GLboolean __GLEW_ARB_texture_env_combine;
87899 extern GLboolean __GLEW_ARB_texture_env_crossbar;
87900 extern GLboolean __GLEW_ARB_texture_env_dot3;
87901 extern GLboolean __GLEW_ARB_texture_float;
87902 extern GLboolean __GLEW_ARB_texture_mirrored_repeat;
87903 extern GLboolean __GLEW_ARB_texture_non_power_of_two;
87904 extern GLboolean __GLEW_ARB_texture_rectangle;
87905 extern GLboolean __GLEW_ARB_transpose_matrix;
87906 extern GLboolean __GLEW_ARB_vertex_blend;
87907 extern GLboolean __GLEW_ARB_vertex_buffer_object;
87908 extern GLboolean __GLEW_ARB_vertex_program;
87909 extern GLboolean __GLEW_ARB_vertex_shader;
87910 extern GLboolean __GLEW_ARB_window_pos;
87911 extern GLboolean __GLEW_ATIX_point_sprites;
87912 extern GLboolean __GLEW_ATIX_texture_env_combine3;
87913 extern GLboolean __GLEW_ATIX_texture_env_route;
87914 extern GLboolean __GLEW_ATIX_vertex_shader_output_point_size;
87915 extern GLboolean __GLEW_ATI_draw_buffers;
87916 extern GLboolean __GLEW_ATI_element_array;
87917 extern GLboolean __GLEW_ATI_envmap_bumpmap;
87918 extern GLboolean __GLEW_ATI_fragment_shader;
87919 extern GLboolean __GLEW_ATI_map_object_buffer;
87920 extern GLboolean __GLEW_ATI_pn_triangles;
87921 extern GLboolean __GLEW_ATI_separate_stencil;
87922 extern GLboolean __GLEW_ATI_text_fragment_shader;
87923 extern GLboolean __GLEW_ATI_texture_compression_3dc;
87924 extern GLboolean __GLEW_ATI_texture_env_combine3;
87925 extern GLboolean __GLEW_ATI_texture_float;
87926 extern GLboolean __GLEW_ATI_texture_mirror_once;
87927 extern GLboolean __GLEW_ATI_vertex_array_object;
87928 extern GLboolean __GLEW_ATI_vertex_attrib_array_object;
87929 extern GLboolean __GLEW_ATI_vertex_streams;
87930 extern GLboolean __GLEW_EXT_422_pixels;
87931 extern GLboolean __GLEW_EXT_Cg_shader;
87932 extern GLboolean __GLEW_EXT_abgr;
87933 extern GLboolean __GLEW_EXT_bgra;
87934 extern GLboolean __GLEW_EXT_bindable_uniform;
87935 extern GLboolean __GLEW_EXT_blend_color;
87936 extern GLboolean __GLEW_EXT_blend_equation_separate;
87937 extern GLboolean __GLEW_EXT_blend_func_separate;
87938 extern GLboolean __GLEW_EXT_blend_logic_op;
87939 extern GLboolean __GLEW_EXT_blend_minmax;
87940 extern GLboolean __GLEW_EXT_blend_subtract;
87941 extern GLboolean __GLEW_EXT_clip_volume_hint;
87942 extern GLboolean __GLEW_EXT_cmyka;
87943 extern GLboolean __GLEW_EXT_color_subtable;
87944 extern GLboolean __GLEW_EXT_compiled_vertex_array;
87945 extern GLboolean __GLEW_EXT_convolution;
87946 extern GLboolean __GLEW_EXT_coordinate_frame;
87947 extern GLboolean __GLEW_EXT_copy_texture;
87948 extern GLboolean __GLEW_EXT_cull_vertex;
87949 extern GLboolean __GLEW_EXT_depth_bounds_test;
87950 extern GLboolean __GLEW_EXT_draw_buffers2;
87951 extern GLboolean __GLEW_EXT_draw_instanced;
87952 extern GLboolean __GLEW_EXT_draw_range_elements;
87953 extern GLboolean __GLEW_EXT_fog_coord;
87954 extern GLboolean __GLEW_EXT_fragment_lighting;
87955 extern GLboolean __GLEW_EXT_framebuffer_blit;
87956 extern GLboolean __GLEW_EXT_framebuffer_multisample;
87957 extern GLboolean __GLEW_EXT_framebuffer_object;
87958 extern GLboolean __GLEW_EXT_framebuffer_sRGB;
87959 extern GLboolean __GLEW_EXT_geometry_shader4;
87960 extern GLboolean __GLEW_EXT_gpu_shader4;
87961 extern GLboolean __GLEW_EXT_histogram;
87962 extern GLboolean __GLEW_EXT_index_array_formats;
87963 extern GLboolean __GLEW_EXT_index_func;
87964 extern GLboolean __GLEW_EXT_index_material;
87965 extern GLboolean __GLEW_EXT_index_texture;
87966 extern GLboolean __GLEW_EXT_light_texture;
87967 extern GLboolean __GLEW_EXT_misc_attribute;
87968 extern GLboolean __GLEW_EXT_multi_draw_arrays;
87969 extern GLboolean __GLEW_EXT_multisample;
87970 extern GLboolean __GLEW_EXT_packed_depth_stencil;
87971 extern GLboolean __GLEW_EXT_packed_float;
87972 extern GLboolean __GLEW_EXT_packed_pixels;
87973 extern GLboolean __GLEW_EXT_paletted_texture;
87974 extern GLboolean __GLEW_EXT_pixel_buffer_object;
87975 extern GLboolean __GLEW_EXT_pixel_transform;
87976 extern GLboolean __GLEW_EXT_pixel_transform_color_table;
87977 extern GLboolean __GLEW_EXT_point_parameters;
87978 extern GLboolean __GLEW_EXT_polygon_offset;
87979 extern GLboolean __GLEW_EXT_rescale_normal;
87980 extern GLboolean __GLEW_EXT_scene_marker;
87981 extern GLboolean __GLEW_EXT_secondary_color;
87982 extern GLboolean __GLEW_EXT_separate_specular_color;
87983 extern GLboolean __GLEW_EXT_shadow_funcs;
87984 extern GLboolean __GLEW_EXT_shared_texture_palette;
87985 extern GLboolean __GLEW_EXT_stencil_clear_tag;
87986 extern GLboolean __GLEW_EXT_stencil_two_side;
87987 extern GLboolean __GLEW_EXT_stencil_wrap;
87988 extern GLboolean __GLEW_EXT_subtexture;
87989 extern GLboolean __GLEW_EXT_texture;
87990 extern GLboolean __GLEW_EXT_texture3D;
87991 extern GLboolean __GLEW_EXT_texture_array;
87992 extern GLboolean __GLEW_EXT_texture_buffer_object;
87993 extern GLboolean __GLEW_EXT_texture_compression_dxt1;
87994 extern GLboolean __GLEW_EXT_texture_compression_latc;
87995 extern GLboolean __GLEW_EXT_texture_compression_rgtc;
87996 extern GLboolean __GLEW_EXT_texture_compression_s3tc;
87997 extern GLboolean __GLEW_EXT_texture_cube_map;
87998 extern GLboolean __GLEW_EXT_texture_edge_clamp;
87999 extern GLboolean __GLEW_EXT_texture_env;
88000 extern GLboolean __GLEW_EXT_texture_env_add;
88001 extern GLboolean __GLEW_EXT_texture_env_combine;
88002 extern GLboolean __GLEW_EXT_texture_env_dot3;
88003 extern GLboolean __GLEW_EXT_texture_filter_anisotropic;
88004 extern GLboolean __GLEW_EXT_texture_integer;
88005 extern GLboolean __GLEW_EXT_texture_lod_bias;
88006 extern GLboolean __GLEW_EXT_texture_mirror_clamp;
88007 extern GLboolean __GLEW_EXT_texture_object;
88008 extern GLboolean __GLEW_EXT_texture_perturb_normal;
88009 extern GLboolean __GLEW_EXT_texture_rectangle;
88010 extern GLboolean __GLEW_EXT_texture_sRGB;
88011 extern GLboolean __GLEW_EXT_texture_shared_exponent;
88012 extern GLboolean __GLEW_EXT_timer_query;
88013 extern GLboolean __GLEW_EXT_vertex_array;
88014 extern GLboolean __GLEW_EXT_vertex_shader;
88015 extern GLboolean __GLEW_EXT_vertex_weighting;
88016 extern GLboolean __GLEW_GREMEDY_string_marker;
88017 extern GLboolean __GLEW_HP_convolution_border_modes;
88018 extern GLboolean __GLEW_HP_image_transform;
88019 extern GLboolean __GLEW_HP_occlusion_test;
88020 extern GLboolean __GLEW_HP_texture_lighting;
88021 extern GLboolean __GLEW_IBM_cull_vertex;
88022 extern GLboolean __GLEW_IBM_multimode_draw_arrays;
88023 extern GLboolean __GLEW_IBM_rasterpos_clip;
88024 extern GLboolean __GLEW_IBM_static_data;
88025 extern GLboolean __GLEW_IBM_texture_mirrored_repeat;
88026 extern GLboolean __GLEW_IBM_vertex_array_lists;
88027 extern GLboolean __GLEW_INGR_color_clamp;
88028 extern GLboolean __GLEW_INGR_interlace_read;
88029 extern GLboolean __GLEW_INTEL_parallel_arrays;
88030 extern GLboolean __GLEW_INTEL_texture_scissor;
88031 extern GLboolean __GLEW_KTX_buffer_region;
88032 extern GLboolean __GLEW_MESAX_texture_stack;
88033 extern GLboolean __GLEW_MESA_pack_invert;
88034 extern GLboolean __GLEW_MESA_resize_buffers;
88035 extern GLboolean __GLEW_MESA_window_pos;
88036 extern GLboolean __GLEW_MESA_ycbcr_texture;
88037 extern GLboolean __GLEW_NV_blend_square;
88038 extern GLboolean __GLEW_NV_copy_depth_to_color;
88039 extern GLboolean __GLEW_NV_depth_buffer_float;
88040 extern GLboolean __GLEW_NV_depth_clamp;
88041 extern GLboolean __GLEW_NV_evaluators;
88042 extern GLboolean __GLEW_NV_fence;
88043 extern GLboolean __GLEW_NV_float_buffer;
88044 extern GLboolean __GLEW_NV_fog_distance;
88045 extern GLboolean __GLEW_NV_fragment_program;
88046 extern GLboolean __GLEW_NV_fragment_program2;
88047 extern GLboolean __GLEW_NV_fragment_program4;
88048 extern GLboolean __GLEW_NV_fragment_program_option;
88049 extern GLboolean __GLEW_NV_framebuffer_multisample_coverage;
88050 extern GLboolean __GLEW_NV_geometry_program4;
88051 extern GLboolean __GLEW_NV_gpu_program4;
88052 extern GLboolean __GLEW_NV_half_float;
88053 extern GLboolean __GLEW_NV_light_max_exponent;
88054 extern GLboolean __GLEW_NV_multisample_filter_hint;
88055 extern GLboolean __GLEW_NV_occlusion_query;
88056 extern GLboolean __GLEW_NV_packed_depth_stencil;
88057 extern GLboolean __GLEW_NV_parameter_buffer_object;
88058 extern GLboolean __GLEW_NV_pixel_data_range;
88059 extern GLboolean __GLEW_NV_point_sprite;
88060 extern GLboolean __GLEW_NV_primitive_restart;
88061 extern GLboolean __GLEW_NV_register_combiners;
88062 extern GLboolean __GLEW_NV_register_combiners2;
88063 extern GLboolean __GLEW_NV_texgen_emboss;
88064 extern GLboolean __GLEW_NV_texgen_reflection;
88065 extern GLboolean __GLEW_NV_texture_compression_vtc;
88066 extern GLboolean __GLEW_NV_texture_env_combine4;
88067 extern GLboolean __GLEW_NV_texture_expand_normal;
88068 extern GLboolean __GLEW_NV_texture_rectangle;
88069 extern GLboolean __GLEW_NV_texture_shader;
88070 extern GLboolean __GLEW_NV_texture_shader2;
88071 extern GLboolean __GLEW_NV_texture_shader3;
88072 extern GLboolean __GLEW_NV_transform_feedback;
88073 extern GLboolean __GLEW_NV_vertex_array_range;
88074 extern GLboolean __GLEW_NV_vertex_array_range2;
88075 extern GLboolean __GLEW_NV_vertex_program;
88076 extern GLboolean __GLEW_NV_vertex_program1_1;
88077 extern GLboolean __GLEW_NV_vertex_program2;
88078 extern GLboolean __GLEW_NV_vertex_program2_option;
88079 extern GLboolean __GLEW_NV_vertex_program3;
88080 extern GLboolean __GLEW_NV_vertex_program4;
88081 extern GLboolean __GLEW_OES_byte_coordinates;
88082 extern GLboolean __GLEW_OES_compressed_paletted_texture;
88083 extern GLboolean __GLEW_OES_read_format;
88084 extern GLboolean __GLEW_OES_single_precision;
88085 extern GLboolean __GLEW_OML_interlace;
88086 extern GLboolean __GLEW_OML_resample;
88087 extern GLboolean __GLEW_OML_subsample;
88088 extern GLboolean __GLEW_PGI_misc_hints;
88089 extern GLboolean __GLEW_PGI_vertex_hints;
88090 extern GLboolean __GLEW_REND_screen_coordinates;
88091 extern GLboolean __GLEW_S3_s3tc;
88092 extern GLboolean __GLEW_SGIS_color_range;
88093 extern GLboolean __GLEW_SGIS_detail_texture;
88094 extern GLboolean __GLEW_SGIS_fog_function;
88095 extern GLboolean __GLEW_SGIS_generate_mipmap;
88096 extern GLboolean __GLEW_SGIS_multisample;
88097 extern GLboolean __GLEW_SGIS_pixel_texture;
88098 extern GLboolean __GLEW_SGIS_sharpen_texture;
88099 extern GLboolean __GLEW_SGIS_texture4D;
88100 extern GLboolean __GLEW_SGIS_texture_border_clamp;
88101 extern GLboolean __GLEW_SGIS_texture_edge_clamp;
88102 extern GLboolean __GLEW_SGIS_texture_filter4;
88103 extern GLboolean __GLEW_SGIS_texture_lod;
88104 extern GLboolean __GLEW_SGIS_texture_select;
88105 extern GLboolean __GLEW_SGIX_async;
88106 extern GLboolean __GLEW_SGIX_async_histogram;
88107 extern GLboolean __GLEW_SGIX_async_pixel;
88108 extern GLboolean __GLEW_SGIX_blend_alpha_minmax;
88109 extern GLboolean __GLEW_SGIX_clipmap;
88110 extern GLboolean __GLEW_SGIX_depth_texture;
88111 extern GLboolean __GLEW_SGIX_flush_raster;
88112 extern GLboolean __GLEW_SGIX_fog_offset;
88113 extern GLboolean __GLEW_SGIX_fog_texture;
88114 extern GLboolean __GLEW_SGIX_fragment_specular_lighting;
88115 extern GLboolean __GLEW_SGIX_framezoom;
88116 extern GLboolean __GLEW_SGIX_interlace;
88117 extern GLboolean __GLEW_SGIX_ir_instrument1;
88118 extern GLboolean __GLEW_SGIX_list_priority;
88119 extern GLboolean __GLEW_SGIX_pixel_texture;
88120 extern GLboolean __GLEW_SGIX_pixel_texture_bits;
88121 extern GLboolean __GLEW_SGIX_reference_plane;
88122 extern GLboolean __GLEW_SGIX_resample;
88123 extern GLboolean __GLEW_SGIX_shadow;
88124 extern GLboolean __GLEW_SGIX_shadow_ambient;
88125 extern GLboolean __GLEW_SGIX_sprite;
88126 extern GLboolean __GLEW_SGIX_tag_sample_buffer;
88127 extern GLboolean __GLEW_SGIX_texture_add_env;
88128 extern GLboolean __GLEW_SGIX_texture_coordinate_clamp;
88129 extern GLboolean __GLEW_SGIX_texture_lod_bias;
88130 extern GLboolean __GLEW_SGIX_texture_multi_buffer;
88131 extern GLboolean __GLEW_SGIX_texture_range;
88132 extern GLboolean __GLEW_SGIX_texture_scale_bias;
88133 extern GLboolean __GLEW_SGIX_vertex_preclip;
88134 extern GLboolean __GLEW_SGIX_vertex_preclip_hint;
88135 extern GLboolean __GLEW_SGIX_ycrcb;
88136 extern GLboolean __GLEW_SGI_color_matrix;
88137 extern GLboolean __GLEW_SGI_color_table;
88138 extern GLboolean __GLEW_SGI_texture_color_table;
88139 extern GLboolean __GLEW_SUNX_constant_data;
88140 extern GLboolean __GLEW_SUN_convolution_border_modes;
88141 extern GLboolean __GLEW_SUN_global_alpha;
88142 extern GLboolean __GLEW_SUN_mesh_array;
88143 extern GLboolean __GLEW_SUN_read_video_pixels;
88144 extern GLboolean __GLEW_SUN_slice_accum;
88145 extern GLboolean __GLEW_SUN_triangle_list;
88146 extern GLboolean __GLEW_SUN_vertex;
88147 extern GLboolean __GLEW_WIN_phong_shading;
88148 extern GLboolean __GLEW_WIN_specular_fog;
88149 extern GLboolean __GLEW_WIN_swap_hint;
88150 # 10618 "/usr/include/GL/glew.h" 3 4
88151 extern GLenum glewInit ();
88152 extern GLboolean glewIsSupported (const char* name);
88153
88154
88155
88156
88157
88158
88159
88160 extern GLboolean glewExperimental;
88161 extern GLboolean glewGetExtension (const char* name);
88162 extern const GLubyte* glewGetErrorString (GLenum error);
88163 extern const GLubyte* glewGetString (GLenum name);
88164
88165
88166 }
88167 # 29 "gpu.h" 2
88168 # 1 "/usr/include/GL/glut.h" 1 3 4
88169 # 14 "/usr/include/GL/glut.h" 3 4
88170 extern "C" {
88171 # 370 "/usr/include/GL/glut.h" 3 4
88172 extern void *glutStrokeRoman;
88173 extern void *glutStrokeMonoRoman;
88174
88175
88176
88177
88178
88179
88180 extern void *glutBitmap9By15;
88181 extern void *glutBitmap8By13;
88182 extern void *glutBitmapTimesRoman10;
88183 extern void *glutBitmapTimesRoman24;
88184 extern void *glutBitmapHelvetica10;
88185 extern void *glutBitmapHelvetica12;
88186 extern void *glutBitmapHelvetica18;
88187 # 533 "/usr/include/GL/glut.h" 3 4
88188 extern void glutInit(int *argcp, char **argv);
88189
88190
88191
88192
88193
88194
88195
88196 extern void glutInitDisplayMode(unsigned int mode);
88197
88198 extern void glutInitDisplayString(const char *string);
88199
88200 extern void glutInitWindowPosition(int x, int y);
88201 extern void glutInitWindowSize(int width, int height);
88202 extern void glutMainLoop(void);
88203
88204
88205 extern int glutCreateWindow(const char *title);
88206
88207
88208
88209
88210
88211
88212
88213 extern int glutCreateSubWindow(int win, int x, int y, int width, int height);
88214 extern void glutDestroyWindow(int win);
88215 extern void glutPostRedisplay(void);
88216
88217 extern void glutPostWindowRedisplay(int win);
88218
88219 extern void glutSwapBuffers(void);
88220 extern int glutGetWindow(void);
88221 extern void glutSetWindow(int win);
88222 extern void glutSetWindowTitle(const char *title);
88223 extern void glutSetIconTitle(const char *title);
88224 extern void glutPositionWindow(int x, int y);
88225 extern void glutReshapeWindow(int width, int height);
88226 extern void glutPopWindow(void);
88227 extern void glutPushWindow(void);
88228 extern void glutIconifyWindow(void);
88229 extern void glutShowWindow(void);
88230 extern void glutHideWindow(void);
88231
88232 extern void glutFullScreen(void);
88233 extern void glutSetCursor(int cursor);
88234
88235 extern void glutWarpPointer(int x, int y);
88236
88237
88238
88239 extern void glutEstablishOverlay(void);
88240 extern void glutRemoveOverlay(void);
88241 extern void glutUseLayer(GLenum layer);
88242 extern void glutPostOverlayRedisplay(void);
88243
88244 extern void glutPostWindowOverlayRedisplay(int win);
88245
88246 extern void glutShowOverlay(void);
88247 extern void glutHideOverlay(void);
88248
88249
88250
88251 extern int glutCreateMenu(void ( *func)(int));
88252
88253
88254
88255
88256
88257
88258
88259 extern void glutDestroyMenu(int menu);
88260 extern int glutGetMenu(void);
88261 extern void glutSetMenu(int menu);
88262 extern void glutAddMenuEntry(const char *label, int value);
88263 extern void glutAddSubMenu(const char *label, int submenu);
88264 extern void glutChangeToMenuEntry(int item, const char *label, int value);
88265 extern void glutChangeToSubMenu(int item, const char *label, int submenu);
88266 extern void glutRemoveMenuItem(int item);
88267 extern void glutAttachMenu(int button);
88268 extern void glutDetachMenu(int button);
88269
88270
88271 extern void glutDisplayFunc(void ( *func)(void));
88272 extern void glutReshapeFunc(void ( *func)(int width, int height));
88273 extern void glutKeyboardFunc(void ( *func)(unsigned char key, int x, int y));
88274 extern void glutMouseFunc(void ( *func)(int button, int state, int x, int y));
88275 extern void glutMotionFunc(void ( *func)(int x, int y));
88276 extern void glutPassiveMotionFunc(void ( *func)(int x, int y));
88277 extern void glutEntryFunc(void ( *func)(int state));
88278 extern void glutVisibilityFunc(void ( *func)(int state));
88279 extern void glutIdleFunc(void ( *func)(void));
88280 extern void glutTimerFunc(unsigned int millis, void ( *func)(int value), int value);
88281 extern void glutMenuStateFunc(void ( *func)(int state));
88282
88283 extern void glutSpecialFunc(void ( *func)(int key, int x, int y));
88284 extern void glutSpaceballMotionFunc(void ( *func)(int x, int y, int z));
88285 extern void glutSpaceballRotateFunc(void ( *func)(int x, int y, int z));
88286 extern void glutSpaceballButtonFunc(void ( *func)(int button, int state));
88287 extern void glutButtonBoxFunc(void ( *func)(int button, int state));
88288 extern void glutDialsFunc(void ( *func)(int dial, int value));
88289 extern void glutTabletMotionFunc(void ( *func)(int x, int y));
88290 extern void glutTabletButtonFunc(void ( *func)(int button, int state, int x, int y));
88291
88292 extern void glutMenuStatusFunc(void ( *func)(int status, int x, int y));
88293 extern void glutOverlayDisplayFunc(void ( *func)(void));
88294
88295 extern void glutWindowStatusFunc(void ( *func)(int state));
88296
88297
88298 extern void glutKeyboardUpFunc(void ( *func)(unsigned char key, int x, int y));
88299 extern void glutSpecialUpFunc(void ( *func)(int key, int x, int y));
88300 extern void glutJoystickFunc(void ( *func)(unsigned int buttonMask, int x, int y, int z), int pollInterval);
88301
88302
88303
88304
88305
88306 extern void glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue);
88307 extern GLfloat glutGetColor(int ndx, int component);
88308 extern void glutCopyColormap(int win);
88309
88310
88311 extern int glutGet(GLenum type);
88312 extern int glutDeviceGet(GLenum type);
88313
88314
88315 extern int glutExtensionSupported(const char *name);
88316
88317
88318 extern int glutGetModifiers(void);
88319 extern int glutLayerGet(GLenum type);
88320
88321
88322 extern void * glutGetProcAddress(const char *procName);
88323
88324
88325
88326 extern void glutBitmapCharacter(void *font, int character);
88327 extern int glutBitmapWidth(void *font, int character);
88328 extern void glutStrokeCharacter(void *font, int character);
88329 extern int glutStrokeWidth(void *font, int character);
88330
88331 extern int glutBitmapLength(void *font, const unsigned char *string);
88332 extern int glutStrokeLength(void *font, const unsigned char *string);
88333
88334
88335
88336 extern void glutWireSphere(GLdouble radius, GLint slices, GLint stacks);
88337 extern void glutSolidSphere(GLdouble radius, GLint slices, GLint stacks);
88338 extern void glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
88339 extern void glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
88340 extern void glutWireCube(GLdouble size);
88341 extern void glutSolidCube(GLdouble size);
88342 extern void glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
88343 extern void glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
88344 extern void glutWireDodecahedron(void);
88345 extern void glutSolidDodecahedron(void);
88346 extern void glutWireTeapot(GLdouble size);
88347 extern void glutSolidTeapot(GLdouble size);
88348 extern void glutWireOctahedron(void);
88349 extern void glutSolidOctahedron(void);
88350 extern void glutWireTetrahedron(void);
88351 extern void glutSolidTetrahedron(void);
88352 extern void glutWireIcosahedron(void);
88353 extern void glutSolidIcosahedron(void);
88354
88355
88356
88357 extern int glutVideoResizeGet(GLenum param);
88358 extern void glutSetupVideoResizing(void);
88359 extern void glutStopVideoResizing(void);
88360 extern void glutVideoResize(int x, int y, int width, int height);
88361 extern void glutVideoPan(int x, int y, int width, int height);
88362
88363
88364 extern void glutReportErrors(void);
88365 # 725 "/usr/include/GL/glut.h" 3 4
88366 extern void glutIgnoreKeyRepeat(int ignore);
88367 extern void glutSetKeyRepeat(int repeatMode);
88368 extern void glutForceJoystickFunc(void);
88369 # 739 "/usr/include/GL/glut.h" 3 4
88370 extern void glutGameModeString(const char *string);
88371 extern int glutEnterGameMode(void);
88372 extern void glutLeaveGameMode(void);
88373 extern int glutGameModeGet(GLenum mode);
88374
88375
88376
88377 }
88378 # 30 "gpu.h" 2
88379
88380
88381
88382 void checkGLErrors(int line, char *file);
88383 void printInfoLog(GLhandleARB obj);
88384 bool checkFramebufferStatus();
88385
88386 bool initGPU(void);
88387 bool configureGPUTextures(unsigned int k, unsigned int vars);
88388 bool gpuGDAKernel(unsigned int k, unsigned int vars, double t, float *packedEData, float *packedPiData, float *packedOutData);
88389 bool clearGPUTextures();
88390 bool wrapupGPU(void);
88391 # 46 "anneal.h" 2
88392 # 1 "../include/vigra/diff2d.hxx" 1
88393 # 47 "anneal.h" 2
88394 # 1 "../include/vigra/iteratoradapter.hxx" 1
88395 # 48 "anneal.h" 2
88396 # 1 "../include/vigra_ext/XMIWrapper.h" 1
88397 # 23 "../include/vigra_ext/XMIWrapper.h"
88398 extern "C" {
88399 # 1 "/usr/include/xmi.h" 1 3 4
88400 # 74 "/usr/include/xmi.h" 3 4
88401 extern const char mi_libxmi_ver[8];
88402 # 138 "/usr/include/xmi.h" 3 4
88403 typedef struct
88404 {
88405 int x, y;
88406 } miPoint;
88407 # 151 "/usr/include/xmi.h" 3 4
88408 typedef unsigned int miPixel;
88409 # 165 "/usr/include/xmi.h" 3 4
88410 typedef struct lib_miPaintedSet miPaintedSet;
88411
88412
88413 extern miPaintedSet * miNewPaintedSet (void);
88414 extern void miDeletePaintedSet (miPaintedSet *paintedSet);
88415
88416
88417 extern void miClearPaintedSet (miPaintedSet *paintedSet);
88418
88419
88420
88421
88422
88423
88424 typedef struct lib_miGC miGC;
88425
88426
88427 extern miGC * miNewGC (int npixels, const miPixel *pixels);
88428 extern void miDeleteGC (miGC *pGC);
88429 extern miGC * miCopyGC (const miGC *pGC);
88430
88431
88432 enum { MI_LINE_SOLID, MI_LINE_ON_OFF_DASH, MI_LINE_DOUBLE_DASH };
88433
88434
88435 enum { MI_JOIN_MITER, MI_JOIN_ROUND, MI_JOIN_BEVEL, MI_JOIN_TRIANGULAR };
88436
88437
88438
88439
88440
88441 enum { MI_CAP_NOT_LAST, MI_CAP_BUTT, MI_CAP_ROUND, MI_CAP_PROJECTING, MI_CAP_TRIANGULAR };
88442
88443
88444 enum { MI_EVEN_ODD_RULE, MI_WINDING_RULE };
88445
88446
88447 enum { MI_ARC_CHORD, MI_ARC_PIE_SLICE };
88448
88449
88450
88451 typedef enum { MI_GC_FILL_RULE, MI_GC_JOIN_STYLE, MI_GC_CAP_STYLE, MI_GC_LINE_STYLE, MI_GC_ARC_MODE, MI_GC_LINE_WIDTH } miGCAttribute;
88452
88453
88454
88455
88456 extern void miSetGCAttrib (miGC *pGC, miGCAttribute attribute, int value);
88457
88458
88459 extern void miSetGCAttribs (miGC *pGC, int nattributes, const miGCAttribute *attributes, const int *values);
88460
88461
88462
88463 extern void miSetGCDashes (miGC *pGC, int ndashes, const unsigned int *dashes, int offset);
88464 extern void miSetGCMiterLimit (miGC *pGC, double miter_limit);
88465 extern void miSetGCPixels (miGC *pGC, int npixels, const miPixel *pixels);
88466
88467
88468
88469
88470 extern void miSetGCPaintSolid (void);
88471 extern void miSetGCPaintInterpParallel (miPoint pts[2], miPixel pixels[2]);
88472 extern void miSetGCPaintInterpTriangular (miPoint pts[3], miPixel pixels[3]);
88473 extern void miSetGCPaintInterpElliptical (void);
88474 # 261 "/usr/include/xmi.h" 3 4
88475 typedef enum { MI_COORD_MODE_ORIGIN, MI_COORD_MODE_PREVIOUS } miCoordMode;
88476
88477
88478
88479
88480
88481 typedef enum { MI_SHAPE_GENERAL, MI_SHAPE_CONVEX } miPolygonShape;
88482
88483 extern "C" {
88484
88485 extern void miDrawPoints (miPaintedSet *paintedSet, const miGC *pGC, miCoordMode mode, int npts, const miPoint *pPts);
88486 extern void miDrawLines (miPaintedSet *paintedSet, const miGC *pGC, miCoordMode mode, int npts, const miPoint *pPts);
88487 extern void miFillPolygon (miPaintedSet *paintedSet, const miGC *pGC, miPolygonShape shape, miCoordMode mode, int npts, const miPoint *pPts);
88488 # 282 "/usr/include/xmi.h" 3 4
88489 typedef struct
88490 {
88491 int x, y;
88492 unsigned int width, height;
88493 } miRectangle;
88494
88495 extern void miDrawRectangles (miPaintedSet *paintedSet, const miGC *pGC, int nrects, const miRectangle *pRects);
88496 extern void miFillRectangles (miPaintedSet *paintedSet, const miGC *pGC, int nrects, const miRectangle *pRects);
88497 # 311 "/usr/include/xmi.h" 3 4
88498 typedef struct
88499 {
88500 int x, y;
88501 unsigned int width, height;
88502 int angle1, angle2;
88503 } miArc;
88504
88505 extern void miDrawArcs (miPaintedSet *paintedSet, const miGC *pGC, int narcs, const miArc *parcs);
88506 extern void miFillArcs (miPaintedSet *paintedSet, const miGC *pGC, int narcs, const miArc *parcs);
88507 # 334 "/usr/include/xmi.h" 3 4
88508 typedef struct lib_miEllipseCache miEllipseCache;
88509 extern miEllipseCache * miNewEllipseCache (void);
88510 extern void miDeleteEllipseCache (miEllipseCache *ellipseCache);
88511
88512 extern void miDrawArcs_r (miPaintedSet *paintedSet, const miGC *pGC, int narcs, const miArc *parcs, miEllipseCache *ellipseCache);
88513
88514 }
88515 # 353 "/usr/include/xmi.h" 3 4
88516 typedef miPixel (*miPixelMerge2) (miPixel source, miPixel destination);
88517
88518
88519
88520
88521 typedef miPixel (*miPixelMerge3) (miPixel texture, miPixel source, miPixel destination);
88522
88523
88524
88525 typedef struct
88526 {
88527 int **bitmap;
88528 unsigned int width;
88529 unsigned int height;
88530 }
88531 miBitmap;
88532
88533 typedef struct
88534 {
88535 miPixel **pixmap;
88536 unsigned int width;
88537 unsigned int height;
88538 }
88539 miPixmap;
88540 # 385 "/usr/include/xmi.h" 3 4
88541 typedef miPixmap miCanvasPixmap;
88542
88543
88544
88545 typedef struct
88546 {
88547
88548 miCanvasPixmap *drawable;
88549
88550
88551
88552
88553 miBitmap *stipple;
88554 miPoint stippleOrigin;
88555
88556
88557
88558
88559 miPixmap *texture;
88560 miPoint textureOrigin;
88561
88562
88563
88564
88565 miPixelMerge2 pixelMerge2;
88566
88567
88568
88569
88570
88571 miPixelMerge3 pixelMerge3;
88572
88573 } miCanvas;
88574
88575
88576
88577
88578 extern void miCopyPaintedSetToCanvas (const miPaintedSet *paintedSet, miCanvas *canvas, miPoint origin);
88579 # 446 "/usr/include/xmi.h" 3 4
88580 extern void miSetCanvasStipple (miCanvas *pCanvas, const miBitmap *pStipple, miPoint stippleOrigin);
88581 extern void miSetCanvasTexture (miCanvas *pCanvas, const miPixmap *pTexture, miPoint textureOrigin);
88582
88583
88584
88585
88586 extern void miSetPixelMerge2 (miCanvas *pCanvas, miPixelMerge2 pixelMerge2);
88587 extern void miSetPixelMerge3 (miCanvas *pCanvas, miPixelMerge3 pixelMerge3);
88588 # 476 "/usr/include/xmi.h" 3 4
88589 extern miCanvas * miNewCanvas (unsigned int width, unsigned int height, miPixel initPixel);
88590 extern void miDeleteCanvas (miCanvas *pCanvas);
88591 extern miCanvas * miCopyCanvas (const miCanvas *pCanvas);
88592 # 25 "../include/vigra_ext/XMIWrapper.h" 2
88593 }
88594 # 34 "../include/vigra_ext/XMIWrapper.h"
88595 typedef struct
88596 {
88597 int count;
88598 miPoint *points;
88599 unsigned int *widths;
88600 } Spans;
88601
88602
88603
88604
88605
88606
88607
88608 typedef struct
88609 {
88610 miPixel pixel;
88611 Spans *group;
88612 int size;
88613 int count;
88614 int ymin, ymax;
88615 } SpanGroup;
88616
88617
88618
88619
88620
88621 typedef struct lib_miPaintedSet
88622 {
88623 SpanGroup **groups;
88624 int size;
88625 int ngroups;
88626 } _miPaintedSet;
88627
88628 namespace vigra_ext {
88629
88630 template<class DestIterator, class DestAccessor>
88631 void copyPaintedSetToImage(DestIterator dest_upperleft,
88632 DestIterator dest_lowerright,
88633 DestAccessor da,
88634 const miPaintedSet *paintedSet,
88635 const Diff2D offset) {
88636
88637 int dst_w = dest_lowerright.x - dest_upperleft.x;
88638 int dst_h = dest_lowerright.y - dest_upperleft.y;
88639
88640
88641 for (int group = 0; group < paintedSet->ngroups; group++) {
88642
88643 if (paintedSet->groups[group]->group[0].count > 0) {
88644 miPixel pixel = paintedSet->groups[group]->pixel;
88645 int spans = paintedSet->groups[group]->group[0].count;
88646
88647 const miPoint *ppt = paintedSet->groups[group]->group[0].points;
88648 unsigned int *pwidth = paintedSet->groups[group]->group[0].widths;
88649
88650
88651
88652 if (ppt[0].y + offset.y >= dst_h) continue;
88653 if (ppt[spans-1].y + offset.y < 0) continue;
88654
88655 for (int i = 0; i < spans; i++) {
88656 int y = ppt[i].y + offset.y;
88657
88658 if (y < 0) continue;
88659
88660 if (y >= dst_h) continue;
88661
88662 int width = pwidth[i];
88663 int xstart = ppt[i].x + offset.x;
88664 int xend = xstart + width - 1;
88665
88666 int xstart_clip = (xstart < 0) ? 0 : xstart;
88667 int xend_clip = (xend >= dst_w) ? (dst_w-1) : xend;
88668
88669
88670 DestIterator dx = dest_upperleft + Diff2D(xstart_clip, y);
88671 for (int x = xstart_clip; x <= xend_clip; ++x, ++dx.x) {
88672 da.set(pixel, dx);
88673
88674 }
88675
88676 }
88677 }
88678 }
88679
88680 };
88681
88682 template<class DestIterator, class DestAccessor>
88683 void copyPaintedSetToImage(vigra::triple<DestIterator, DestIterator, DestAccessor> image,
88684 const miPaintedSet *paintedSet,
88685 const Diff2D offset) {
88686 copyPaintedSetToImage(image.first, image.second, image.third, paintedSet, offset);
88687 };
88688
88689 }
88690 # 49 "anneal.h" 2
88691
88692 using std::for_each;
88693 using std::pair;
88694 using std::vector;
88695
88696
88697
88698
88699 using __gnu_cxx::slist;
88700
88701
88702 using boost::lambda::bind;
88703 using boost::lambda::_1;
88704 using boost::lambda::delete_ptr;
88705
88706 using vigra::LineIterator;
88707 using vigra::Point2D;
88708 using vigra::Rect2D;
88709
88710 using vigra_ext::copyPaintedSetToImage;
88711
88712 namespace enblend {
88713
88714 template <typename CostImage>
88715 void drawDottedLine(CostImage & i, vector<Point2D> & l, typename CostImage::PixelType p) {
88716 typedef typename CostImage::PixelType CostImagePixelType;
88717
88718 miPixel pixels[2];
88719 pixels[0] = p;
88720 pixels[1] = p;
88721 miGC *pGC = miNewGC(2, pixels);
88722 miPaintedSet *paintedSet = miNewPaintedSet();
88723 miPoint *mip = new miPoint[l.size()];
88724
88725 int index = 0;
88726 for (vector<Point2D>::iterator points = l.begin(); points != l.end(); ++points, ++index) {
88727 mip[index].x = (*points).x;
88728 mip[index].y = (*points).y;
88729 }
88730
88731 miDrawLines(paintedSet, pGC, MI_COORD_MODE_ORIGIN, index, mip);
88732 copyPaintedSetToImage(destImageRange(i), paintedSet, Diff2D(0,0));
88733 miClearPaintedSet(paintedSet);
88734
88735 p = (p > (NumericTraits<CostImagePixelType>::max() / 2))
88736 ? NumericTraits<CostImagePixelType>::zero()
88737 : NumericTraits<CostImagePixelType>::max();
88738 pixels[0] = p;
88739 pixels[1] = p;
88740 miSetGCPixels(pGC, 2, pixels);
88741
88742 miDrawPoints(paintedSet, pGC, MI_COORD_MODE_ORIGIN, index, mip);
88743 copyPaintedSetToImage(destImageRange(i), paintedSet, Diff2D(0,0));
88744
88745 miDeleteGC(pGC);
88746 miDeletePaintedSet(paintedSet);
88747 delete[] mip;
88748 }
88749
88750 template <typename CostImage, typename VisualizeImage>
88751 class GDAConfiguration {
88752 public:
88753 typedef typename CostImage::PixelType CostImagePixelType;
88754 typedef typename CostImage::const_traverser CostIterator;
88755
88756 GDAConfiguration(const CostImage* const d, slist<pair<bool, Point2D> > *v, VisualizeImage* const vi)
88757 : costImage(d),
88758 visualizeStateSpaceImage(vi),
88759 E(__null), Pi(__null), EF(__null), PiF(__null) {
88760
88761 kMax = 1;
88762
88763 int costImageShortDimension = std::min(costImage->width(), costImage->height());
88764
88765 int stateSpaceWidth = costImageShortDimension / 3;
88766
88767 slist<pair<bool, Point2D> >::iterator last = v->previous(v->end());
88768 Point2D previousPoint = last->second;
88769 for (slist<pair<bool, Point2D> >::iterator current = v->begin(); current != v->end(); ) {
88770
88771 bool currentMoveable = current->first;
88772 Point2D currentPoint = current->second;
88773 ++current;
88774 Point2D nextPoint = (current == v->end()) ? v->begin()->second : current->second;
88775
88776 mfEstimates.push_back(currentPoint);
88777
88778 vector<Point2D> *stateSpace = new vector<Point2D>();
88779 pointStateSpaces.push_back(stateSpace);
88780
88781 vector<int> *stateDistances = new vector<int>();
88782 pointStateDistances.push_back(stateDistances);
88783
88784 if (currentMoveable) {
88785
88786 Diff2D vp(currentPoint.x - previousPoint.x, currentPoint.y - previousPoint.y);
88787
88788 Diff2D vn(nextPoint.x - currentPoint.x, nextPoint.y - currentPoint.y);
88789
88790 Diff2D np(-vp.y, vp.x);
88791
88792 Diff2D nn(-vn.y, vn.x);
88793
88794
88795
88796 Diff2D normal = np + nn;
88797 normal *= (stateSpaceWidth / normal.magnitude());
88798
88799 Diff2D leftPoint = currentPoint + normal;
88800 Diff2D rightPoint = currentPoint - normal;
88801
88802
88803 int lineLength = std::max(std::abs(rightPoint.x - leftPoint.x),
88804 std::abs(rightPoint.y - leftPoint.y));
88805 int spaceBetweenPoints = static_cast<int>(ceil(lineLength / (double)GDAKmax));
88806
88807 LineIterator<Diff2D> linePoint(currentPoint, leftPoint);
88808 for (int i = 0; i < (lineLength+1)/2; ++i, ++linePoint) {
88809
88810 if (!costImage->isInside(*linePoint)) break;
88811 else if ((*costImage)[*linePoint] == NumericTraits<CostImagePixelType>::max()) break;
88812 else if ((i % spaceBetweenPoints) == 0) {
88813 stateSpace->push_back(Point2D(*linePoint));
88814 stateDistances->push_back(std::max(std::abs(linePoint->x - currentPoint.x),
88815 std::abs(linePoint->y - currentPoint.y)) / 2);
88816 if (visualizeStateSpaceImage) (*visualizeStateSpaceImage)[*linePoint].setBlue(255);
88817 }
88818 }
88819 linePoint = LineIterator<Diff2D>(currentPoint, rightPoint);
88820 ++linePoint;
88821 for (int i=1; i < 1+(lineLength/2); ++i, ++linePoint) {
88822
88823 if (!costImage->isInside(*linePoint)) break;
88824 else if ((*costImage)[*linePoint] == NumericTraits<CostImagePixelType>::max()) break;
88825 else if ((i % spaceBetweenPoints) == 0) {
88826 stateSpace->push_back(Point2D(*linePoint));
88827 stateDistances->push_back(std::max(std::abs(linePoint->x - currentPoint.x),
88828 std::abs(linePoint->y - currentPoint.y)) / 2);
88829 if (visualizeStateSpaceImage) (*visualizeStateSpaceImage)[*linePoint].setBlue(255);
88830 }
88831 }
88832 # 204 "anneal.h"
88833 }
88834
88835 if (stateSpace->size() == 0) {
88836 stateSpace->push_back(currentPoint);
88837 stateDistances->push_back(0);
88838 if (visualizeStateSpaceImage && costImage->isInside(currentPoint)) {
88839 (*visualizeStateSpaceImage)[currentPoint].setBlue(200);
88840 }
88841 }
88842
88843 unsigned int localK = stateSpace->size();
88844
88845 if (localK > GDAKmax) {
88846 cerr << "enblend: localK=" << localK << " > GDAKmax=" << GDAKmax << endl;
88847 exit(1);
88848 }
88849
88850 kMax = std::max(kMax, localK);
88851
88852 pointStateProbabilities.push_back(new vector<double>(localK, 1.0 / localK));
88853
88854 convergedPoints.push_back(localK < 2);
88855
88856 previousPoint = currentPoint;
88857 }
88858
88859 if (UseGPU) {
88860 EF = new float[kMax * mfEstimates.size()];
88861 PiF = new float[kMax * mfEstimates.size()];
88862 } else {
88863 E = new int[kMax];
88864 Pi = new double[kMax];
88865 }
88866
88867
88868
88869
88870 int kMaxOrig = kMax;
88871 if (kMax <= 2) kMax = 15;
88872 tau = 0.75;
88873 deltaEMax = 7000.0;
88874 deltaEMin = 5.0;
88875 double epsilon = 1.0 / (kMax * kMax);
88876 tInitial = ceil(deltaEMax / log((kMax - 1 + (kMax * kMax * epsilon)) / (kMax - 1 - (kMax * kMax * epsilon))));
88877
88878 tFinal = deltaEMin / log((kMax - (kMax * epsilon) - 1) / (kMax * epsilon));
88879
88880 kMax = kMaxOrig;
88881
88882 if (Verbose > 2) {
88883 cout << endl << "tInitial=" << tInitial << " tFinal=" << tFinal << " epsilon=" << epsilon << " kMax=" << kMax;
88884 cout.flush();
88885 }
88886 }
88887
88888 ~GDAConfiguration() {
88889 for_each(pointStateSpaces.begin(), pointStateSpaces.end(), bind(delete_ptr(),_1));
88890 for_each(pointStateProbabilities.begin(), pointStateProbabilities.end(), bind(delete_ptr(),_1));
88891 for_each(pointStateDistances.begin(), pointStateDistances.end(), bind(delete_ptr(),_1));
88892 delete[] E;
88893 delete[] Pi;
88894 delete[] EF;
88895 delete[] PiF;
88896 }
88897
88898 void run() {
88899 int progressIndicator = 1;
88900 int numIterations = (int)ceil(log(tFinal/tInitial)/log(tau));
88901 int iterationCount = 0;
88902 int iterationsPerTick = (numIterations+3) / 4;
88903
88904 if (UseGPU) configureGPUTextures(kMax, pointStateSpaces.size());
88905
88906 tCurrent = tInitial;
88907
88908 if (Verbose > 2) {
88909 cout << endl << "tInitial=" << tCurrent << " numIterations=" << numIterations;
88910 cout.flush();
88911 }
88912
88913 while (tCurrent > tFinal) {
88914 double epsilon = 1.0 / kMax;
88915 unsigned int eta = (unsigned int)ceil(log(epsilon)
88916 / log(((kMax - 2.0) / (2.0 * kMax) * exp(-tCurrent / deltaEMax)) + 0.5));
88917
88918 if (Verbose > 2) {
88919 cout << endl << "tCurrent=" << tCurrent << " eta=" << eta << " kMax=" << kMax;
88920 cout.flush();
88921 }
88922
88923 for (unsigned int i = 0; i < eta; i++) iterate();
88924
88925 tCurrent *= tau;
88926
88927 if (Verbose > 2) {
88928 int numConvergedPoints = 0;
88929 for (unsigned int i = 0; i < convergedPoints.size(); i++) {
88930 if (convergedPoints[i]) numConvergedPoints++;
88931 }
88932 cout << " converged=" << numConvergedPoints << "/" << convergedPoints.size();
88933 cout.flush();
88934 }
88935 else if ((Verbose > 0) && (iterationCount % iterationsPerTick) == 0) {
88936 cout << " " << progressIndicator++ << "/4";
88937 cout.flush();
88938 }
88939
88940 iterationCount++;
88941
88942 }
88943
88944 if (UseGPU) clearGPUTextures();
88945
88946 if (visualizeStateSpaceImage) {
88947
88948 for (unsigned int i = 0; i < pointStateSpaces.size(); ++i) {
88949 vector<Point2D> *stateSpace = pointStateSpaces[i];
88950 for (unsigned int j = 0; j < stateSpace->size(); ++j) {
88951 Point2D point = (*stateSpace)[j];
88952 if (visualizeStateSpaceImage->isInside(point)) (*visualizeStateSpaceImage)[point].setGreen(255);
88953 }
88954 }
88955
88956
88957 }
88958
88959 if (Verbose > 2) {
88960 cout << endl;
88961 for (unsigned int i = 0; i < convergedPoints.size(); i++) {
88962 if (!convergedPoints[i]) {
88963 cout << "Unconverged point:" << endl;
88964 vector<Point2D> *stateSpace = pointStateSpaces[i];
88965 vector<double> *stateProbabilities = pointStateProbabilities[i];
88966 unsigned int localK = stateSpace->size();
88967 for (unsigned int state = 0; state < localK; ++state) {
88968 cout << " state " << (*stateSpace)[state]
88969 << " weight=" << (*stateProbabilities)[state] << endl;
88970 }
88971 cout << " mfEstimate=" << mfEstimates[i] << endl;
88972 }
88973 }
88974 }
88975
88976 }
88977
88978 vector<Point2D> & getCurrentPoints() { return mfEstimates; }
88979
88980 protected:
88981
88982
88983 inline void calculateStateProbabilities() {
88984
88985 unsigned int lastIndex = mfEstimates.size() - 1;
88986 for (unsigned int index = 0; index < mfEstimates.size(); ++index) {
88987
88988 if (convergedPoints[index]) continue;
88989
88990 vector<Point2D> *stateSpace = pointStateSpaces[index];
88991 vector<double> *stateProbabilities = pointStateProbabilities[index];
88992 vector<int> *stateDistances = pointStateDistances[index];
88993 unsigned int localK = stateSpace->size();
88994
88995 unsigned int nextIndex = (index + 1) % mfEstimates.size();
88996 Point2D lastPointEstimate = mfEstimates[lastIndex];
88997 bool lastPointInCostImage = costImage->isInside(lastPointEstimate);
88998 Point2D nextPointEstimate = mfEstimates[nextIndex];
88999 bool nextPointInCostImage = costImage->isInside(nextPointEstimate);
89000 lastIndex = index;
89001
89002
89003
89004
89005 double exp_a = 1512775 / tCurrent;
89006 for (unsigned int i = 0; i < localK; ++i) {
89007 Point2D currentPoint = (*stateSpace)[i];
89008 E[i] = (*stateDistances)[i];
89009 if (lastPointInCostImage) E[i] += costImageCost(lastPointEstimate, currentPoint);
89010 if (nextPointInCostImage) E[i] += costImageCost(currentPoint, nextPointEstimate);
89011 E[i] = NumericTraits<int>::fromRealPromote(E[i] * exp_a);
89012 Pi[i] = 0.0;
89013 }
89014
89015
89016
89017
89018
89019
89020 union {
89021 double d;
89022
89023 struct { int i, j; } n;
89024
89025
89026
89027 } eco;
89028 eco.n.j = 0;
89029
89030
89031
89032 for (unsigned int j = 0; j < localK; ++j) {
89033 double piTj = (*stateProbabilities)[j];
89034 Pi[j] += piTj;
89035 int ej = E[j];
89036 for (unsigned int i = (j+1); i < localK; ++i) {
89037 double piT = (*stateProbabilities)[i] + piTj;
89038 eco.n.i = (ej - E[i]) + (1072693248 - 60801);
89039
89040 double piTAn = piT / (1 + eco.d);
89041
89042
89043
89044
89045
89046
89047
89048 if (isnan(piTAn)) {
89049
89050 if (ej > E[i]) piTAn = 0.0;
89051 else piTAn = piT;
89052 }
89053 Pi[j] += piTAn;
89054 Pi[i] += piT - piTAn;
89055 }
89056 double result = Pi[j] / localK;
89057
89058
89059
89060
89061
89062
89063
89064 (*stateProbabilities)[j] = result;
89065 }
89066 }
89067
89068 }
89069
89070
89071 inline void calculateStateProbabilitiesGPU() {
89072
89073 unsigned int unconvergedPoints = 0;
89074 unsigned int lastIndex = mfEstimates.size() - 1;
89075 for (unsigned int index = 0; index < mfEstimates.size(); ++index) {
89076
89077 if (convergedPoints[index]) continue;
89078
89079 unsigned int rowIndex = unconvergedPoints / 4;
89080 unsigned int vectorIndex = unconvergedPoints % 4;
89081 float *EFbase = &(EF[(rowIndex * kMax * 4) + vectorIndex]);
89082 float *PiFbase = &(PiF[(rowIndex * kMax * 4) + vectorIndex]);
89083
89084 vector<Point2D> *stateSpace = pointStateSpaces[index];
89085 vector<double> *stateProbabilities = pointStateProbabilities[index];
89086 vector<int> *stateDistances = pointStateDistances[index];
89087 unsigned int localK = stateSpace->size();
89088
89089 unsigned int nextIndex = (index + 1) % mfEstimates.size();
89090 Point2D lastPointEstimate = mfEstimates[lastIndex];
89091 bool lastPointInCostImage = costImage->isInside(lastPointEstimate);
89092 Point2D nextPointEstimate = mfEstimates[nextIndex];
89093 bool nextPointInCostImage = costImage->isInside(nextPointEstimate);
89094 lastIndex = index;
89095
89096
89097 for (unsigned int i = 0; i < localK; ++i) {
89098 Point2D currentPoint = (*stateSpace)[i];
89099 EFbase[4*i] = (*stateDistances)[i];
89100 if (lastPointInCostImage) EFbase[4*i] += costImageCost(lastPointEstimate, currentPoint);
89101 if (nextPointInCostImage) EFbase[4*i] += costImageCost(currentPoint, nextPointEstimate);
89102 PiFbase[4*i] = static_cast<float>((*stateProbabilities)[i]);
89103 # 505 "anneal.h"
89104 }
89105 for (unsigned int i = localK; i < kMax; ++i) {
89106 PiFbase[4*i] = 0.0f;
89107 }
89108
89109 unconvergedPoints++;
89110 }
89111
89112
89113 gpuGDAKernel(kMax, unconvergedPoints, tCurrent, EF, PiF, PiF);
89114
89115
89116 unconvergedPoints = 0;
89117 for (unsigned int index = 0; index < mfEstimates.size(); ++index) {
89118
89119 if (convergedPoints[index]) continue;
89120
89121 unsigned int rowIndex = unconvergedPoints / 4;
89122 unsigned int vectorIndex = unconvergedPoints % 4;
89123 float *PiFbase = &(PiF[(rowIndex * kMax * 4) + vectorIndex]);
89124
89125 vector<double> *stateProbabilities = pointStateProbabilities[index];
89126 unsigned int localK = stateProbabilities->size();
89127 # 538 "anneal.h"
89128 for (unsigned int i = 0; i < localK; ++i) {
89129
89130
89131
89132 (*stateProbabilities)[i] = static_cast<double>(PiFbase[4*i]);
89133 # 576 "anneal.h"
89134 }
89135
89136 unconvergedPoints++;
89137 }
89138
89139 }
89140
89141
89142 void iterate() {
89143
89144 if (UseGPU) {
89145 calculateStateProbabilitiesGPU();
89146 # 611 "anneal.h"
89147 } else {
89148 calculateStateProbabilities();
89149 }
89150
89151 kMax = 1;
89152 for (unsigned int index = 0; index < pointStateSpaces.size(); ++index) {
89153 if (convergedPoints[index]) continue;
89154
89155 vector<Point2D> *stateSpace = pointStateSpaces[index];
89156 vector<double> *stateProbabilities = pointStateProbabilities[index];
89157 vector<int> *stateDistances = pointStateDistances[index];
89158 unsigned int localK = stateSpace->size();
89159 double estimateX = 0.0;
89160 double estimateY = 0.0;
89161
89162
89163 double totalWeight = 0.0;
89164 bool hasHighWeightState = false;
89165 for (unsigned int k = 0; k < localK; ++k) {
89166 double weight = (*stateProbabilities)[k];
89167 totalWeight += weight;
89168 if (weight > 0.99) hasHighWeightState = true;
89169 Point2D state = (*stateSpace)[k];
89170 estimateX += weight * (double)state.x;
89171 estimateY += weight * (double)state.y;
89172 }
89173 estimateX /= totalWeight;
89174 estimateY /= totalWeight;
89175
89176 Point2D newEstimate(NumericTraits<int>::fromRealPromote(estimateX),
89177 NumericTraits<int>::fromRealPromote(estimateY));
89178
89179
89180 if (!costImage->isInside(newEstimate)) {
89181 # 653 "anneal.h"
89182 cout << endl << "enblend: optimizer warning: new mean field estimate is outside cost image." << endl;
89183 for (unsigned int state = 0; state < localK; ++state) {
89184 cout << " state " << (*stateSpace)[state]
89185 << " weight = ";
89186 cout << (*stateProbabilities)[state] << endl;
89187
89188
89189
89190 }
89191 cout << " new estimate = " << newEstimate << endl;
89192
89193 convergedPoints[index] = true;
89194 continue;
89195 }
89196
89197 mfEstimates[index] = newEstimate;
89198
89199
89200 double totalWeights = 0.0;
89201 double cutoffWeight = hasHighWeightState ? 0.50 : 0.00001;
89202 for (unsigned int k = 0; k < stateSpace->size(); ) {
89203 double weight = (*stateProbabilities)[k];
89204 if (weight < cutoffWeight) {
89205
89206 (*stateProbabilities)[k] = (*stateProbabilities)[stateProbabilities->size() - 1];
89207 (*stateSpace)[k] = (*stateSpace)[stateSpace->size() - 1];
89208 (*stateDistances)[k] = (*stateDistances)[stateDistances->size() - 1];
89209
89210
89211 stateProbabilities->pop_back();
89212 stateSpace->pop_back();
89213 stateDistances->pop_back();
89214 } else {
89215 totalWeights += weight;
89216 ++k;
89217 }
89218 }
89219
89220
89221 for (unsigned int k = 0; k < stateSpace->size(); ++k) {
89222 (*stateProbabilities)[k] /= totalWeights;
89223 }
89224
89225 localK = stateSpace->size();
89226 if (localK < 2) convergedPoints[index] = true;
89227 kMax = std::max((size_t)kMax, stateProbabilities->size());
89228
89229 }
89230
89231 }
89232
89233
89234 inline int costImageCost(const Point2D &start, const Point2D &end) {
89235
89236
89237
89238
89239
89240 int cost = 0;
89241
89242 int lineLength = std::max(std::abs(end.x - start.x), std::abs(end.y - start.y));
89243
89244 if (lineLength > 0) {
89245 LineIterator<CostIterator> lineStart(costImage->upperLeft() + start, costImage->upperLeft() + end);
89246 for (int i = 0; i < lineLength; ++i) {
89247 cost += *lineStart;
89248 ++lineStart;
89249 }
89250 }
89251
89252 if (lineLength < 8) cost += NumericTraits<CostImagePixelType>::max() * (8 - lineLength);
89253
89254 return cost;
89255 }
89256
89257 bool segmentIntersect(const Point2D & l1a, const Point2D & l1b, const Point2D & l2a, const Point2D & l2b) {
89258 int denom = (l2b.y - l2a.y)*(l1b.x - l1a.x) - (l2b.x - l2a.x)*(l1b.y - l1a.y);
89259 if (denom == 0) return false;
89260 int uaNum = (l2b.x - l2a.x)*(l1a.y - l2a.y) - (l2b.y - l2a.y)*(l1a.x - l2a.x);
89261 int ubNum = (l1b.x - l1a.x)*(l1a.y - l2a.y) - (l1b.y - l1a.y)*(l1a.x - l2a.x);
89262 if (denom < 0) { uaNum *= -1; ubNum *= -1; denom *= -1; }
89263 if (uaNum > 0 && uaNum < denom && ubNum > 0 && ubNum < denom) return true;
89264 return false;
89265 }
89266
89267 const CostImage *costImage;
89268 VisualizeImage *visualizeStateSpaceImage;
89269
89270
89271 vector<Point2D> mfEstimates;
89272
89273
89274 vector<vector<Point2D>* > pointStateSpaces;
89275
89276
89277 vector<vector<double>* > pointStateProbabilities;
89278
89279 vector<vector<int>* > pointStateDistances;
89280
89281
89282 vector<bool> convergedPoints;
89283
89284
89285 double tInitial;
89286
89287
89288 double tFinal;
89289
89290
89291 double tCurrent;
89292
89293
89294 double tau;
89295
89296
89297 double deltaEMax;
89298
89299
89300 double deltaEMin;
89301
89302
89303 unsigned int kMax;
89304
89305
89306 int *E;
89307 double *Pi;
89308
89309
89310 float *EF;
89311 float *PiF;
89312
89313 };
89314
89315 template <typename CostImage, typename VisualizeImage>
89316 void annealSnake(const CostImage* const ci, slist<pair<bool, Point2D> > *snake, VisualizeImage* const vi) {
89317
89318 GDAConfiguration<CostImage, VisualizeImage> cfg(ci, snake, vi);
89319
89320 cfg.run();
89321
89322 slist<pair<bool, Point2D> >::iterator snakePoint = snake->begin();
89323 vector<Point2D>::iterator annealedPoint = cfg.getCurrentPoints().begin();
89324 for (; snakePoint != snake->end(); ++snakePoint, ++annealedPoint) {
89325 snakePoint->second = *annealedPoint;
89326 }
89327
89328 };
89329
89330 }
89331 # 36 "mask.h" 2
89332 # 1 "nearest.h" 1
89333 # 24 "nearest.h"
89334 # 1 "../config.h" 1
89335 # 25 "nearest.h" 2
89336 # 37 "nearest.h"
89337 # 1 "../include/vigra/stdcachedfileimage.hxx" 1
89338 # 25 "../include/vigra/stdcachedfileimage.hxx"
89339 # 1 "../include/vigra/tuple.hxx" 1
89340 # 26 "../include/vigra/stdcachedfileimage.hxx" 2
89341 # 1 "../include/vigra/iteratortraits.hxx" 1
89342 # 27 "../include/vigra/stdcachedfileimage.hxx" 2
89343
89344 # 1 "../include/vigra/rgbvalue.hxx" 1
89345 # 29 "../include/vigra/stdcachedfileimage.hxx" 2
89346 # 1 "../include/vigra/sized_int.hxx" 1
89347 # 30 "../include/vigra/stdcachedfileimage.hxx" 2
89348 # 1 "../include/vigra/cachedfileimage.hxx" 1
89349 # 31 "../include/vigra/stdcachedfileimage.hxx" 2
89350
89351 namespace vigra {
89352 # 105 "../include/vigra/stdcachedfileimage.hxx"
89353 template<> struct IteratorTraits< CachedFileImageIterator<UInt8 > > { typedef CachedFileImageIterator<UInt8 > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor<UInt8 > default_accessor; typedef StandardValueAccessor<UInt8 > DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator<UInt8 > > { typedef ConstCachedFileImageIterator<UInt8 > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor<UInt8 > default_accessor; typedef StandardConstValueAccessor<UInt8 > DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator<UInt8 > > { typedef StridedCachedFileImageIterator<UInt8 > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor<UInt8 > default_accessor; typedef StandardValueAccessor<UInt8 > DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator<UInt8 > > { typedef ConstStridedCachedFileImageIterator<UInt8 > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor<UInt8 > default_accessor; typedef StandardConstValueAccessor<UInt8 > DefaultAccessor; };
89354 typedef CachedFileImage<UInt8> UInt8CFImage;
89355
89356 template<> struct IteratorTraits< CachedFileImageIterator<Int8 > > { typedef CachedFileImageIterator<Int8 > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor<Int8 > default_accessor; typedef StandardValueAccessor<Int8 > DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator<Int8 > > { typedef ConstCachedFileImageIterator<Int8 > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor<Int8 > default_accessor; typedef StandardConstValueAccessor<Int8 > DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator<Int8 > > { typedef StridedCachedFileImageIterator<Int8 > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor<Int8 > default_accessor; typedef StandardValueAccessor<Int8 > DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator<Int8 > > { typedef ConstStridedCachedFileImageIterator<Int8 > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor<Int8 > default_accessor; typedef StandardConstValueAccessor<Int8 > DefaultAccessor; };
89357 typedef CachedFileImage<Int8> Int8CFImage;
89358
89359 template<> struct IteratorTraits< CachedFileImageIterator<UInt16 > > { typedef CachedFileImageIterator<UInt16 > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor<UInt16 > default_accessor; typedef StandardValueAccessor<UInt16 > DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator<UInt16 > > { typedef ConstCachedFileImageIterator<UInt16 > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor<UInt16 > default_accessor; typedef StandardConstValueAccessor<UInt16 > DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator<UInt16 > > { typedef StridedCachedFileImageIterator<UInt16 > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor<UInt16 > default_accessor; typedef StandardValueAccessor<UInt16 > DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator<UInt16 > > { typedef ConstStridedCachedFileImageIterator<UInt16 > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor<UInt16 > default_accessor; typedef StandardConstValueAccessor<UInt16 > DefaultAccessor; };
89360 typedef CachedFileImage<UInt16> UInt16CFImage;
89361
89362 template<> struct IteratorTraits< CachedFileImageIterator<Int16 > > { typedef CachedFileImageIterator<Int16 > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor<Int16 > default_accessor; typedef StandardValueAccessor<Int16 > DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator<Int16 > > { typedef ConstCachedFileImageIterator<Int16 > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor<Int16 > default_accessor; typedef StandardConstValueAccessor<Int16 > DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator<Int16 > > { typedef StridedCachedFileImageIterator<Int16 > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor<Int16 > default_accessor; typedef StandardValueAccessor<Int16 > DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator<Int16 > > { typedef ConstStridedCachedFileImageIterator<Int16 > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor<Int16 > default_accessor; typedef StandardConstValueAccessor<Int16 > DefaultAccessor; };
89363 typedef CachedFileImage<Int16> Int16CFImage;
89364
89365 template<> struct IteratorTraits< CachedFileImageIterator<UInt32 > > { typedef CachedFileImageIterator<UInt32 > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor<UInt32 > default_accessor; typedef StandardValueAccessor<UInt32 > DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator<UInt32 > > { typedef ConstCachedFileImageIterator<UInt32 > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor<UInt32 > default_accessor; typedef StandardConstValueAccessor<UInt32 > DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator<UInt32 > > { typedef StridedCachedFileImageIterator<UInt32 > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor<UInt32 > default_accessor; typedef StandardValueAccessor<UInt32 > DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator<UInt32 > > { typedef ConstStridedCachedFileImageIterator<UInt32 > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor<UInt32 > default_accessor; typedef StandardConstValueAccessor<UInt32 > DefaultAccessor; };
89366 typedef CachedFileImage<UInt32> UInt32CFImage;
89367
89368 template<> struct IteratorTraits< CachedFileImageIterator<Int32 > > { typedef CachedFileImageIterator<Int32 > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor<Int32 > default_accessor; typedef StandardValueAccessor<Int32 > DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator<Int32 > > { typedef ConstCachedFileImageIterator<Int32 > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor<Int32 > default_accessor; typedef StandardConstValueAccessor<Int32 > DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator<Int32 > > { typedef StridedCachedFileImageIterator<Int32 > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor<Int32 > default_accessor; typedef StandardValueAccessor<Int32 > DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator<Int32 > > { typedef ConstStridedCachedFileImageIterator<Int32 > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor<Int32 > default_accessor; typedef StandardConstValueAccessor<Int32 > DefaultAccessor; };
89369 typedef CachedFileImage<Int32> Int32CFImage;
89370
89371 template<> struct IteratorTraits< CachedFileImageIterator<float > > { typedef CachedFileImageIterator<float > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor<float > default_accessor; typedef StandardValueAccessor<float > DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator<float > > { typedef ConstCachedFileImageIterator<float > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor<float > default_accessor; typedef StandardConstValueAccessor<float > DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator<float > > { typedef StridedCachedFileImageIterator<float > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor<float > default_accessor; typedef StandardValueAccessor<float > DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator<float > > { typedef ConstStridedCachedFileImageIterator<float > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor<float > default_accessor; typedef StandardConstValueAccessor<float > DefaultAccessor; };
89372 typedef CachedFileImage<float> FCFImage;
89373
89374 template<> struct IteratorTraits< CachedFileImageIterator<double > > { typedef CachedFileImageIterator<double > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor<double > default_accessor; typedef StandardValueAccessor<double > DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator<double > > { typedef ConstCachedFileImageIterator<double > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor<double > default_accessor; typedef StandardConstValueAccessor<double > DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator<double > > { typedef StridedCachedFileImageIterator<double > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor<double > default_accessor; typedef StandardValueAccessor<double > DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator<double > > { typedef ConstStridedCachedFileImageIterator<double > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor<double > default_accessor; typedef StandardConstValueAccessor<double > DefaultAccessor; };
89375 typedef CachedFileImage<double> DCFImage;
89376
89377 template<> struct IteratorTraits< CachedFileImageIterator<RGBValue<UInt8> > > { typedef CachedFileImageIterator<RGBValue<UInt8> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<UInt8> > default_accessor; typedef RGBAccessor<RGBValue<UInt8> > DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator<RGBValue<UInt8> > > { typedef ConstCachedFileImageIterator<RGBValue<UInt8> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<UInt8> > default_accessor; typedef RGBAccessor<RGBValue<UInt8> > DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator<RGBValue<UInt8> > > { typedef StridedCachedFileImageIterator<RGBValue<UInt8> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<UInt8> > default_accessor; typedef RGBAccessor<RGBValue<UInt8> > DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator<RGBValue<UInt8> > > { typedef ConstStridedCachedFileImageIterator<RGBValue<UInt8> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<UInt8> > default_accessor; typedef RGBAccessor<RGBValue<UInt8> > DefaultAccessor; };
89378 typedef CachedFileImage<RGBValue<UInt8> > UInt8RGBCFImage;
89379
89380 template<> struct IteratorTraits< CachedFileImageIterator<RGBValue<Int8> > > { typedef CachedFileImageIterator<RGBValue<Int8> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<Int8> > default_accessor; typedef RGBAccessor<RGBValue<Int8> > DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator<RGBValue<Int8> > > { typedef ConstCachedFileImageIterator<RGBValue<Int8> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<Int8> > default_accessor; typedef RGBAccessor<RGBValue<Int8> > DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator<RGBValue<Int8> > > { typedef StridedCachedFileImageIterator<RGBValue<Int8> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<Int8> > default_accessor; typedef RGBAccessor<RGBValue<Int8> > DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator<RGBValue<Int8> > > { typedef ConstStridedCachedFileImageIterator<RGBValue<Int8> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<Int8> > default_accessor; typedef RGBAccessor<RGBValue<Int8> > DefaultAccessor; };
89381 typedef CachedFileImage<RGBValue<Int8> > Int8RGBCFImage;
89382
89383 template<> struct IteratorTraits< CachedFileImageIterator<RGBValue<UInt16> > > { typedef CachedFileImageIterator<RGBValue<UInt16> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<UInt16> > default_accessor; typedef RGBAccessor<RGBValue<UInt16> > DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator<RGBValue<UInt16> > > { typedef ConstCachedFileImageIterator<RGBValue<UInt16> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<UInt16> > default_accessor; typedef RGBAccessor<RGBValue<UInt16> > DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator<RGBValue<UInt16> > > { typedef StridedCachedFileImageIterator<RGBValue<UInt16> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<UInt16> > default_accessor; typedef RGBAccessor<RGBValue<UInt16> > DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator<RGBValue<UInt16> > > { typedef ConstStridedCachedFileImageIterator<RGBValue<UInt16> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<UInt16> > default_accessor; typedef RGBAccessor<RGBValue<UInt16> > DefaultAccessor; };
89384 typedef CachedFileImage<RGBValue<UInt16> > UInt16RGBCFImage;
89385
89386 template<> struct IteratorTraits< CachedFileImageIterator<RGBValue<Int16> > > { typedef CachedFileImageIterator<RGBValue<Int16> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<Int16> > default_accessor; typedef RGBAccessor<RGBValue<Int16> > DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator<RGBValue<Int16> > > { typedef ConstCachedFileImageIterator<RGBValue<Int16> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<Int16> > default_accessor; typedef RGBAccessor<RGBValue<Int16> > DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator<RGBValue<Int16> > > { typedef StridedCachedFileImageIterator<RGBValue<Int16> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<Int16> > default_accessor; typedef RGBAccessor<RGBValue<Int16> > DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator<RGBValue<Int16> > > { typedef ConstStridedCachedFileImageIterator<RGBValue<Int16> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<Int16> > default_accessor; typedef RGBAccessor<RGBValue<Int16> > DefaultAccessor; };
89387 typedef CachedFileImage<RGBValue<Int16> > Int16RGBCFImage;
89388
89389 template<> struct IteratorTraits< CachedFileImageIterator<RGBValue<UInt32> > > { typedef CachedFileImageIterator<RGBValue<UInt32> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<UInt32> > default_accessor; typedef RGBAccessor<RGBValue<UInt32> > DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator<RGBValue<UInt32> > > { typedef ConstCachedFileImageIterator<RGBValue<UInt32> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<UInt32> > default_accessor; typedef RGBAccessor<RGBValue<UInt32> > DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator<RGBValue<UInt32> > > { typedef StridedCachedFileImageIterator<RGBValue<UInt32> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<UInt32> > default_accessor; typedef RGBAccessor<RGBValue<UInt32> > DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator<RGBValue<UInt32> > > { typedef ConstStridedCachedFileImageIterator<RGBValue<UInt32> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<UInt32> > default_accessor; typedef RGBAccessor<RGBValue<UInt32> > DefaultAccessor; };
89390 typedef CachedFileImage<RGBValue<UInt32> > UInt32RGBCFImage;
89391
89392 template<> struct IteratorTraits< CachedFileImageIterator<RGBValue<Int32> > > { typedef CachedFileImageIterator<RGBValue<Int32> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<Int32> > default_accessor; typedef RGBAccessor<RGBValue<Int32> > DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator<RGBValue<Int32> > > { typedef ConstCachedFileImageIterator<RGBValue<Int32> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<Int32> > default_accessor; typedef RGBAccessor<RGBValue<Int32> > DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator<RGBValue<Int32> > > { typedef StridedCachedFileImageIterator<RGBValue<Int32> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<Int32> > default_accessor; typedef RGBAccessor<RGBValue<Int32> > DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator<RGBValue<Int32> > > { typedef ConstStridedCachedFileImageIterator<RGBValue<Int32> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<Int32> > default_accessor; typedef RGBAccessor<RGBValue<Int32> > DefaultAccessor; };
89393 typedef CachedFileImage<RGBValue<Int32> > Int32RGBCFImage;
89394
89395 template<> struct IteratorTraits< CachedFileImageIterator<RGBValue<float> > > { typedef CachedFileImageIterator<RGBValue<float> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<float> > default_accessor; typedef RGBAccessor<RGBValue<float> > DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator<RGBValue<float> > > { typedef ConstCachedFileImageIterator<RGBValue<float> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<float> > default_accessor; typedef RGBAccessor<RGBValue<float> > DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator<RGBValue<float> > > { typedef StridedCachedFileImageIterator<RGBValue<float> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<float> > default_accessor; typedef RGBAccessor<RGBValue<float> > DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator<RGBValue<float> > > { typedef ConstStridedCachedFileImageIterator<RGBValue<float> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<float> > default_accessor; typedef RGBAccessor<RGBValue<float> > DefaultAccessor; };
89396 typedef CachedFileImage<RGBValue<float> > FRGBCFImage;
89397
89398 template<> struct IteratorTraits< CachedFileImageIterator<RGBValue<double> > > { typedef CachedFileImageIterator<RGBValue<double> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<double> > default_accessor; typedef RGBAccessor<RGBValue<double> > DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator<RGBValue<double> > > { typedef ConstCachedFileImageIterator<RGBValue<double> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<double> > default_accessor; typedef RGBAccessor<RGBValue<double> > DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator<RGBValue<double> > > { typedef StridedCachedFileImageIterator<RGBValue<double> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<double> > default_accessor; typedef RGBAccessor<RGBValue<double> > DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator<RGBValue<double> > > { typedef ConstStridedCachedFileImageIterator<RGBValue<double> > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor<RGBValue<double> > default_accessor; typedef RGBAccessor<RGBValue<double> > DefaultAccessor; };
89399 typedef CachedFileImage<RGBValue<double> > DRGBCFImage;
89400
89401
89402
89403
89404
89405 template <class T>
89406 struct IteratorTraits<CachedFileImageIterator<T> >
89407 {
89408 typedef CachedFileImageIterator<T> Iterator;
89409 typedef Iterator iterator;
89410 typedef typename iterator::iterator_category iterator_category;
89411 typedef typename iterator::value_type value_type;
89412 typedef typename iterator::reference reference;
89413 typedef typename iterator::index_reference index_reference;
89414 typedef typename iterator::pointer pointer;
89415 typedef typename iterator::difference_type difference_type;
89416 typedef typename iterator::row_iterator row_iterator;
89417 typedef typename iterator::column_iterator column_iterator;
89418 typedef StandardAccessor<T> DefaultAccessor;
89419 typedef StandardAccessor<T> default_accessor;
89420 };
89421
89422 template <class T>
89423 struct IteratorTraits<ConstCachedFileImageIterator<T> >
89424 {
89425 typedef ConstCachedFileImageIterator<T> Iterator;
89426 typedef Iterator iterator;
89427 typedef typename iterator::iterator_category iterator_category;
89428 typedef typename iterator::value_type value_type;
89429 typedef typename iterator::reference reference;
89430 typedef typename iterator::index_reference index_reference;
89431 typedef typename iterator::pointer pointer;
89432 typedef typename iterator::difference_type difference_type;
89433 typedef typename iterator::row_iterator row_iterator;
89434 typedef typename iterator::column_iterator column_iterator;
89435 typedef StandardConstAccessor<T> DefaultAccessor;
89436 typedef StandardConstAccessor<T> default_accessor;
89437 };
89438
89439
89440
89441 }
89442 # 38 "nearest.h" 2
89443
89444 using std::cerr;
89445 using std::cout;
89446 using std::endl;
89447 using std::pair;
89448
89449 using vigra::NumericTraits;
89450 using vigra::triple;
89451
89452 namespace enblend {
89453
89454
89455
89456
89457 template <typename dist_t>
89458 inline dist_t _nftDistance(dist_t deltaX, dist_t deltaY) {
89459
89460 return (deltaY == NumericTraits<dist_t>::max())
89461 ? deltaY
89462 : (deltaY + (deltaX * deltaX));
89463 # 69 "nearest.h"
89464 };
89465
89466
89467 template <typename dist_t>
89468 inline dist_t _nftDistance(dist_t deltaY) {
89469
89470 return deltaY * deltaY;
89471 # 85 "nearest.h"
89472 };
89473
89474
89475
89476
89477
89478 template <typename T>
89479 class FeatureList {
89480
89481 struct Node {
89482 T value;
89483 Node *prev;
89484 };
89485
89486
89487 Node *array;
89488
89489
89490 Node *firstUnused;
89491
89492
89493 Node *last;
89494
89495 Node *iterator;
89496
89497 public:
89498
89499 FeatureList(int size) {
89500 array = new Node[size];
89501 firstUnused = array;
89502 last = __null;
89503 iterator = __null;
89504 }
89505
89506 ~FeatureList() {
89507 delete [] array;
89508 }
89509
89510 void clear() {
89511 firstUnused = array;
89512 last = __null;
89513 iterator = __null;
89514 }
89515
89516 void push_back(const T& value) {
89517 firstUnused->value = value;
89518 firstUnused->prev = last;
89519 last = firstUnused;
89520 firstUnused++;
89521 }
89522
89523 void move_to_beginning() {
89524 iterator = array;
89525 }
89526
89527 void move_to_end() {
89528 iterator = last;
89529 }
89530
89531 bool has_previous() const {
89532 return (iterator->prev != __null);
89533 }
89534
89535 void erase_previous() {
89536 iterator->prev = iterator->prev->prev;
89537 }
89538
89539 T get_current() {
89540 return iterator->value;
89541 }
89542
89543 T get_previous() {
89544 return iterator->prev->value;
89545 }
89546
89547 void move_backwards() {
89548 iterator = iterator->prev;
89549 }
89550
89551 bool empty() {
89552 return (last == __null);
89553 }
89554
89555 };
89556
89557
89558
89559
89560
89561
89562 template <class SrcImageIterator, class SrcAccessor,
89563 class DestImageIterator, class DestAccessor>
89564 void nearestFeatureTransform(bool wraparound,
89565 SrcImageIterator src_upperleft,
89566 SrcImageIterator src_lowerright,
89567 SrcAccessor sa,
89568 DestImageIterator dest_upperleft,
89569 DestAccessor da,
89570 typename SrcAccessor::value_type featurelessPixel) {
89571
89572 typedef typename EnblendNumericTraits<UInt32>::ImageType DNFImage;
89573 typedef typename DNFImage::traverser DnfIterator;
89574 typedef typename SrcAccessor::value_type SrcValueType;
89575
89576 SrcImageIterator sx, sy, send, smidpoint;
89577 DnfIterator dnfcx, dnfcy;
89578 DnfIterator dnflx, dnfly;
89579 DestImageIterator dx, dy;
89580
89581 int w = src_lowerright.x - src_upperleft.x;
89582 int h = src_lowerright.y - src_upperleft.y;
89583
89584
89585 DNFImage *dnfColumn = new DNFImage(w, h);
89586
89587
89588 DNFImage *dnfLeft = new DNFImage(w, h);
89589
89590
89591
89592
89593 SrcValueType* lastFeature = new SrcValueType[w];
89594 bool* foundFirstFeature = new bool[w];
89595 UInt32* lastFeatureDeltaY = new UInt32[w];
89596
89597
89598
89599 if (Verbose > 0) {
89600 if (wraparound) cout << "Creating blend mask: 1/6";
89601 else cout << "Creating blend mask: 1/4";
89602 cout.flush();
89603 }
89604
89605 for (int i = 0; i < w; i++) {
89606
89607
89608
89609 foundFirstFeature[i] = false;
89610
89611 }
89612 sy = src_upperleft;
89613 send = src_lowerright;
89614 dnfcy = dnfColumn->upperLeft();
89615 dy = dest_upperleft;
89616 for (; sy.y < send.y; ++sy.y, ++dnfcy.y, ++dy.y) {
89617 sx = sy;
89618 dnfcx = dnfcy;
89619 dx = dy;
89620
89621 for (int xIndex = 0; sx.x < send.x; ++sx.x, ++dnfcx.x, ++dx.x, ++xIndex) {
89622 if (sa(sx) != featurelessPixel) {
89623
89624 lastFeature[xIndex] = sa(sx);
89625 foundFirstFeature[xIndex] = true;
89626
89627 *dnfcx = 0;
89628 lastFeatureDeltaY[xIndex] = 0;
89629
89630 da.set(lastFeature[xIndex], dx);
89631 }
89632 else if (foundFirstFeature[xIndex]) {
89633
89634 *dnfcx = _nftDistance(lastFeatureDeltaY[xIndex]);
89635 da.set(lastFeature[xIndex], dx);
89636 }
89637 else {
89638 *dnfcx = NumericTraits<UInt32>::max();
89639 }
89640 ++lastFeatureDeltaY[xIndex];
89641 }
89642 }
89643
89644
89645
89646
89647
89648 if (Verbose > 0) {
89649 if (wraparound) cout << " 2/6";
89650 else cout << " 2/4";
89651 cout.flush();
89652 }
89653
89654 for (int i = 0; i < w; i++) {
89655
89656
89657
89658 foundFirstFeature[i] = false;
89659
89660
89661
89662 }
89663 sy = src_lowerright;
89664 send = src_upperleft;
89665 dnfcy = dnfColumn->lowerRight();
89666 dy = dest_upperleft + Diff2D(w, h);
89667 for (; sy.y > send.y;) {
89668 --sy.y;
89669 --dnfcy.y;
89670 --dy.y;
89671
89672 sx = sy;
89673 dnfcx = dnfcy;
89674 dx = dy;
89675
89676 for (int xIndex = w-1; sx.x > send.x; --xIndex) {
89677 --sx.x;
89678 --dnfcx.x;
89679 --dx.x;
89680
89681 if (sa(sx) != featurelessPixel) {
89682
89683 lastFeature[xIndex] = sa(sx);
89684 foundFirstFeature[xIndex] = true;
89685
89686 *dnfcx = 0;
89687 lastFeatureDeltaY[xIndex] = 0;
89688
89689
89690
89691
89692 }
89693 else if (foundFirstFeature[xIndex]) {
89694
89695 UInt32 distLastFeature = _nftDistance(lastFeatureDeltaY[xIndex]);
89696 if (distLastFeature < *dnfcx) {
89697
89698 *dnfcx = distLastFeature;
89699 da.set(lastFeature[xIndex], dx);
89700 }
89701 }
89702
89703 ++lastFeatureDeltaY[xIndex];
89704 }
89705 }
89706
89707
89708
89709 FeatureList<typename DnfIterator::MoveX> potentialFeatureList((wraparound) ? w*2 : w);
89710
89711
89712 if (Verbose > 0) {
89713 if (wraparound) cout << " 3/6";
89714 else cout << " 3/4";
89715 cout.flush();
89716 }
89717 sy = src_upperleft;
89718 send = src_lowerright;
89719 smidpoint = src_upperleft + Diff2D(w/2, h/2);
89720 dnfcy = dnfColumn->upperLeft();
89721 dnfly = dnfLeft->upperLeft();
89722 dy = dest_upperleft;
89723 for (; sy.y < send.y; ++sy.y, ++dnfcy.y, ++dnfly.y, ++dy.y) {
89724
89725
89726 if (Verbose > 0
89727 && wraparound && (sy.y == smidpoint.y)) {
89728 cout << " 4/6";
89729 cout.flush();
89730 }
89731
89732 potentialFeatureList.clear();
89733
89734
89735
89736
89737 for (int twiceAround = (wraparound?1:0); twiceAround >= 0; twiceAround--) {
89738 sx = sy;
89739 dnfcx = dnfcy;
89740 dnflx = dnfly;
89741 dx = dy;
89742
89743 for (; sx.x < send.x; ++sx.x, ++dnfcx.x, ++dnflx.x, ++dx.x) {
89744
89745 UInt32 distPotentialFeature = *dnfcx;
89746
89747 if (distPotentialFeature == NumericTraits<UInt32>::max()) {
89748
89749
89750 if (potentialFeatureList.empty()) {
89751
89752 *dnflx = distPotentialFeature;
89753 continue;
89754 }
89755
89756 potentialFeatureList.move_to_end();
89757 typename DnfIterator::MoveX firstFeature = potentialFeatureList.get_current();
89758 int deltaX = (dnfcx.x - firstFeature) % w;
89759 if (deltaX < 0) deltaX += w;
89760 distPotentialFeature = _nftDistance((UInt32)deltaX, dnfcx(firstFeature - dnfcx.x, 0));
89761 }
89762 else {
89763
89764 potentialFeatureList.push_back(dnfcx.x);
89765
89766
89767
89768
89769
89770 potentialFeatureList.move_to_end();
89771 }
89772
89773 while (potentialFeatureList.has_previous()) {
89774
89775 typename DnfIterator::MoveX previousFeature = potentialFeatureList.get_previous();
89776
89777
89778
89779
89780
89781 int deltaX = (dnfcx.x - previousFeature) % w;
89782 if (deltaX < 0) deltaX += w;
89783
89784
89785 UInt32 distPreviousFeature =
89786 _nftDistance((UInt32)deltaX, dnfcx(previousFeature - dnfcx.x, 0));
89787
89788 if (distPreviousFeature >= distPotentialFeature) {
89789
89790
89791 potentialFeatureList.erase_previous();
89792 } else {
89793
89794 potentialFeatureList.move_backwards();
89795 distPotentialFeature = distPreviousFeature;
89796 }
89797 }
89798
89799
89800
89801 *dnflx = distPotentialFeature;
89802
89803
89804 da.set(dx((potentialFeatureList.get_current() - dnfcx.x), 0), dx);
89805 }
89806 }
89807 }
89808
89809
89810
89811
89812 if (Verbose > 0) {
89813 if (wraparound) cout << " 5/6";
89814 else cout << " 4/4";
89815 cout.flush();
89816 }
89817 sy = src_lowerright;
89818 send = src_upperleft;
89819 smidpoint = src_upperleft + Diff2D(w/2, h/2);
89820 dnfcy = dnfColumn->lowerRight();
89821 dnfly = dnfLeft->lowerRight();
89822 dy = dest_upperleft + Diff2D(w, h);
89823 for (; sy.y > send.y;) {
89824 --sy.y;
89825 --dnfcy.y;
89826 --dnfly.y;
89827 --dy.y;
89828
89829
89830 if (Verbose > 0
89831 && wraparound && (sy.y == smidpoint.y)) {
89832 cout << " 6/6";
89833 cout.flush();
89834 }
89835
89836 potentialFeatureList.clear();
89837
89838
89839
89840
89841 for (int twiceAround = (wraparound?1:0); twiceAround >= 0; twiceAround--) {
89842 sx = sy;
89843 dnfcx = dnfcy;
89844 dnflx = dnfly;
89845 dx = dy;
89846
89847 for (; sx.x > send.x;) {
89848 --sx.x;
89849 --dnfcx.x;
89850 --dnflx.x;
89851 --dx.x;
89852
89853 UInt32 distPotentialFeature = *dnfcx;
89854
89855 if (distPotentialFeature == NumericTraits<UInt32>::max()) {
89856
89857
89858 if (potentialFeatureList.empty()) {
89859
89860 continue;
89861 }
89862
89863 potentialFeatureList.move_to_end();
89864 typename DnfIterator::MoveX firstFeature = potentialFeatureList.get_current();
89865 int deltaX = (firstFeature - dnfcx.x) % w;
89866 if (deltaX < 0) deltaX += w;
89867 distPotentialFeature = _nftDistance((UInt32)deltaX, dnfcx(firstFeature - dnfcx.x, 0));
89868 }
89869 else {
89870
89871 potentialFeatureList.push_back(dnfcx.x);
89872
89873
89874 potentialFeatureList.move_to_end();
89875 }
89876
89877 while (potentialFeatureList.has_previous()) {
89878
89879 typename DnfIterator::MoveX previousFeature = potentialFeatureList.get_previous();
89880
89881
89882
89883
89884
89885 int deltaX = (previousFeature - dnfcx.x) % w;
89886 if (deltaX < 0) deltaX += w;
89887
89888
89889 UInt32 distPreviousFeature =
89890 _nftDistance((UInt32)deltaX, dnfcx(previousFeature - dnfcx.x, 0));
89891
89892 if (distPreviousFeature >= distPotentialFeature) {
89893
89894 potentialFeatureList.erase_previous();
89895 } else {
89896
89897 potentialFeatureList.move_backwards();
89898 distPotentialFeature = distPreviousFeature;
89899 }
89900 }
89901
89902
89903 if (*dnflx > distPotentialFeature) {
89904
89905
89906
89907 da.set(dx((potentialFeatureList.get_current() - dnfcx.x), 0), dx);
89908 }
89909 }
89910 }
89911 }
89912
89913 delete dnfColumn;
89914 delete dnfLeft;
89915 delete [] lastFeature;
89916 delete [] foundFirstFeature;
89917 delete [] lastFeatureDeltaY;
89918
89919 if (Verbose > 0) {
89920 cout << endl;
89921 }
89922
89923 return;
89924 };
89925
89926
89927 template <class SrcImageIterator, class SrcAccessor,
89928 class DestImageIterator, class DestAccessor>
89929 inline void nearestFeatureTransform(bool wraparound,
89930 triple<SrcImageIterator, SrcImageIterator, SrcAccessor> src,
89931 pair<DestImageIterator, DestAccessor> dest,
89932 typename SrcAccessor::value_type featurelessPixel) {
89933
89934 nearestFeatureTransform(wraparound,
89935 src.first, src.second, src.third,
89936 dest.first, dest.second, featurelessPixel);
89937
89938 };
89939
89940 }
89941 # 37 "mask.h" 2
89942 # 1 "path.h" 1
89943 # 24 "path.h"
89944 # 1 "../config.h" 1
89945 # 25 "path.h" 2
89946
89947
89948 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/queue" 1 3
89949 # 63 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/queue" 3
89950
89951 # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/queue" 3
89952 # 73 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/queue" 3
89953 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/deque" 1 3
89954 # 63 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/deque" 3
89955
89956 # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/deque" 3
89957
89958
89959
89960
89961
89962
89963 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 1 3
89964 # 69 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
89965 namespace std __attribute__ ((__visibility__ ("default"))) {
89966 # 83 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
89967 inline size_t
89968 __deque_buf_size(size_t __size)
89969 { return __size < 512 ? size_t(512 / __size) : size_t(1); }
89970 # 101 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
89971 template<typename _Tp, typename _Ref, typename _Ptr>
89972 struct _Deque_iterator
89973 {
89974 typedef _Deque_iterator<_Tp, _Tp&, _Tp*> iterator;
89975 typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator;
89976
89977 static size_t _S_buffer_size()
89978 { return __deque_buf_size(sizeof(_Tp)); }
89979
89980 typedef std::random_access_iterator_tag iterator_category;
89981 typedef _Tp value_type;
89982 typedef _Ptr pointer;
89983 typedef _Ref reference;
89984 typedef size_t size_type;
89985 typedef ptrdiff_t difference_type;
89986 typedef _Tp** _Map_pointer;
89987 typedef _Deque_iterator _Self;
89988
89989 _Tp* _M_cur;
89990 _Tp* _M_first;
89991 _Tp* _M_last;
89992 _Map_pointer _M_node;
89993
89994 _Deque_iterator(_Tp* __x, _Map_pointer __y)
89995 : _M_cur(__x), _M_first(*__y),
89996 _M_last(*__y + _S_buffer_size()), _M_node(__y) {}
89997
89998 _Deque_iterator() : _M_cur(0), _M_first(0), _M_last(0), _M_node(0) {}
89999
90000 _Deque_iterator(const iterator& __x)
90001 : _M_cur(__x._M_cur), _M_first(__x._M_first),
90002 _M_last(__x._M_last), _M_node(__x._M_node) {}
90003
90004 reference
90005 operator*() const
90006 { return *_M_cur; }
90007
90008 pointer
90009 operator->() const
90010 { return _M_cur; }
90011
90012 _Self&
90013 operator++()
90014 {
90015 ++_M_cur;
90016 if (_M_cur == _M_last)
90017 {
90018 _M_set_node(_M_node + 1);
90019 _M_cur = _M_first;
90020 }
90021 return *this;
90022 }
90023
90024 _Self
90025 operator++(int)
90026 {
90027 _Self __tmp = *this;
90028 ++*this;
90029 return __tmp;
90030 }
90031
90032 _Self&
90033 operator--()
90034 {
90035 if (_M_cur == _M_first)
90036 {
90037 _M_set_node(_M_node - 1);
90038 _M_cur = _M_last;
90039 }
90040 --_M_cur;
90041 return *this;
90042 }
90043
90044 _Self
90045 operator--(int)
90046 {
90047 _Self __tmp = *this;
90048 --*this;
90049 return __tmp;
90050 }
90051
90052 _Self&
90053 operator+=(difference_type __n)
90054 {
90055 const difference_type __offset = __n + (_M_cur - _M_first);
90056 if (__offset >= 0 && __offset < difference_type(_S_buffer_size()))
90057 _M_cur += __n;
90058 else
90059 {
90060 const difference_type __node_offset =
90061 __offset > 0 ? __offset / difference_type(_S_buffer_size())
90062 : -difference_type((-__offset - 1)
90063 / _S_buffer_size()) - 1;
90064 _M_set_node(_M_node + __node_offset);
90065 _M_cur = _M_first + (__offset - __node_offset
90066 * difference_type(_S_buffer_size()));
90067 }
90068 return *this;
90069 }
90070
90071 _Self
90072 operator+(difference_type __n) const
90073 {
90074 _Self __tmp = *this;
90075 return __tmp += __n;
90076 }
90077
90078 _Self&
90079 operator-=(difference_type __n)
90080 { return *this += -__n; }
90081
90082 _Self
90083 operator-(difference_type __n) const
90084 {
90085 _Self __tmp = *this;
90086 return __tmp -= __n;
90087 }
90088
90089 reference
90090 operator[](difference_type __n) const
90091 { return *(*this + __n); }
90092
90093
90094
90095
90096
90097
90098
90099 void
90100 _M_set_node(_Map_pointer __new_node)
90101 {
90102 _M_node = __new_node;
90103 _M_first = *__new_node;
90104 _M_last = _M_first + difference_type(_S_buffer_size());
90105 }
90106 };
90107
90108
90109
90110
90111 template<typename _Tp, typename _Ref, typename _Ptr>
90112 inline bool
90113 operator==(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
90114 const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
90115 { return __x._M_cur == __y._M_cur; }
90116
90117 template<typename _Tp, typename _RefL, typename _PtrL,
90118 typename _RefR, typename _PtrR>
90119 inline bool
90120 operator==(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
90121 const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
90122 { return __x._M_cur == __y._M_cur; }
90123
90124 template<typename _Tp, typename _Ref, typename _Ptr>
90125 inline bool
90126 operator!=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
90127 const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
90128 { return !(__x == __y); }
90129
90130 template<typename _Tp, typename _RefL, typename _PtrL,
90131 typename _RefR, typename _PtrR>
90132 inline bool
90133 operator!=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
90134 const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
90135 { return !(__x == __y); }
90136
90137 template<typename _Tp, typename _Ref, typename _Ptr>
90138 inline bool
90139 operator<(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
90140 const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
90141 { return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur)
90142 : (__x._M_node < __y._M_node); }
90143
90144 template<typename _Tp, typename _RefL, typename _PtrL,
90145 typename _RefR, typename _PtrR>
90146 inline bool
90147 operator<(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
90148 const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
90149 { return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur)
90150 : (__x._M_node < __y._M_node); }
90151
90152 template<typename _Tp, typename _Ref, typename _Ptr>
90153 inline bool
90154 operator>(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
90155 const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
90156 { return __y < __x; }
90157
90158 template<typename _Tp, typename _RefL, typename _PtrL,
90159 typename _RefR, typename _PtrR>
90160 inline bool
90161 operator>(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
90162 const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
90163 { return __y < __x; }
90164
90165 template<typename _Tp, typename _Ref, typename _Ptr>
90166 inline bool
90167 operator<=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
90168 const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
90169 { return !(__y < __x); }
90170
90171 template<typename _Tp, typename _RefL, typename _PtrL,
90172 typename _RefR, typename _PtrR>
90173 inline bool
90174 operator<=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
90175 const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
90176 { return !(__y < __x); }
90177
90178 template<typename _Tp, typename _Ref, typename _Ptr>
90179 inline bool
90180 operator>=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
90181 const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
90182 { return !(__x < __y); }
90183
90184 template<typename _Tp, typename _RefL, typename _PtrL,
90185 typename _RefR, typename _PtrR>
90186 inline bool
90187 operator>=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
90188 const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
90189 { return !(__x < __y); }
90190
90191
90192
90193
90194
90195 template<typename _Tp, typename _Ref, typename _Ptr>
90196 inline typename _Deque_iterator<_Tp, _Ref, _Ptr>::difference_type
90197 operator-(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
90198 const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
90199 {
90200 return typename _Deque_iterator<_Tp, _Ref, _Ptr>::difference_type
90201 (_Deque_iterator<_Tp, _Ref, _Ptr>::_S_buffer_size())
90202 * (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first)
90203 + (__y._M_last - __y._M_cur);
90204 }
90205
90206 template<typename _Tp, typename _RefL, typename _PtrL,
90207 typename _RefR, typename _PtrR>
90208 inline typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type
90209 operator-(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
90210 const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
90211 {
90212 return typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type
90213 (_Deque_iterator<_Tp, _RefL, _PtrL>::_S_buffer_size())
90214 * (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first)
90215 + (__y._M_last - __y._M_cur);
90216 }
90217
90218 template<typename _Tp, typename _Ref, typename _Ptr>
90219 inline _Deque_iterator<_Tp, _Ref, _Ptr>
90220 operator+(ptrdiff_t __n, const _Deque_iterator<_Tp, _Ref, _Ptr>& __x)
90221 { return __x + __n; }
90222
90223 template<typename _Tp>
90224 void
90225 fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>& __first,
90226 const _Deque_iterator<_Tp, _Tp&, _Tp*>& __last, const _Tp& __value);
90227 # 370 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90228 template<typename _Tp, typename _Alloc>
90229 class _Deque_base
90230 {
90231 public:
90232 typedef _Alloc allocator_type;
90233
90234 allocator_type
90235 get_allocator() const
90236 { return allocator_type(_M_get_Tp_allocator()); }
90237
90238 typedef _Deque_iterator<_Tp, _Tp&, _Tp*> iterator;
90239 typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator;
90240
90241 _Deque_base(const allocator_type& __a, size_t __num_elements)
90242 : _M_impl(__a)
90243 { _M_initialize_map(__num_elements); }
90244
90245 _Deque_base(const allocator_type& __a)
90246 : _M_impl(__a)
90247 { }
90248
90249 ~_Deque_base();
90250
90251 protected:
90252
90253
90254
90255 typedef typename _Alloc::template rebind<_Tp*>::other _Map_alloc_type;
90256
90257 typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type;
90258
90259 struct _Deque_impl
90260 : public _Tp_alloc_type
90261 {
90262 _Tp** _M_map;
90263 size_t _M_map_size;
90264 iterator _M_start;
90265 iterator _M_finish;
90266
90267 _Deque_impl(const _Tp_alloc_type& __a)
90268 : _Tp_alloc_type(__a), _M_map(0), _M_map_size(0),
90269 _M_start(), _M_finish()
90270 { }
90271 };
90272
90273 _Tp_alloc_type&
90274 _M_get_Tp_allocator()
90275 { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); }
90276
90277 const _Tp_alloc_type&
90278 _M_get_Tp_allocator() const
90279 { return *static_cast<const _Tp_alloc_type*>(&this->_M_impl); }
90280
90281 _Map_alloc_type
90282 _M_get_map_allocator() const
90283 { return _Map_alloc_type(_M_get_Tp_allocator()); }
90284
90285 _Tp*
90286 _M_allocate_node()
90287 {
90288 return _M_impl._Tp_alloc_type::allocate(__deque_buf_size(sizeof(_Tp)));
90289 }
90290
90291 void
90292 _M_deallocate_node(_Tp* __p)
90293 {
90294 _M_impl._Tp_alloc_type::deallocate(__p, __deque_buf_size(sizeof(_Tp)));
90295 }
90296
90297 _Tp**
90298 _M_allocate_map(size_t __n)
90299 { return _M_get_map_allocator().allocate(__n); }
90300
90301 void
90302 _M_deallocate_map(_Tp** __p, size_t __n)
90303 { _M_get_map_allocator().deallocate(__p, __n); }
90304
90305 protected:
90306 void _M_initialize_map(size_t);
90307 void _M_create_nodes(_Tp** __nstart, _Tp** __nfinish);
90308 void _M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish);
90309 enum { _S_initial_map_size = 8 };
90310
90311 _Deque_impl _M_impl;
90312 };
90313
90314 template<typename _Tp, typename _Alloc>
90315 _Deque_base<_Tp, _Alloc>::
90316 ~_Deque_base()
90317 {
90318 if (this->_M_impl._M_map)
90319 {
90320 _M_destroy_nodes(this->_M_impl._M_start._M_node,
90321 this->_M_impl._M_finish._M_node + 1);
90322 _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size);
90323 }
90324 }
90325 # 478 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90326 template<typename _Tp, typename _Alloc>
90327 void
90328 _Deque_base<_Tp, _Alloc>::
90329 _M_initialize_map(size_t __num_elements)
90330 {
90331 const size_t __num_nodes = (__num_elements/ __deque_buf_size(sizeof(_Tp))
90332 + 1);
90333
90334 this->_M_impl._M_map_size = std::max((size_t) _S_initial_map_size,
90335 size_t(__num_nodes + 2));
90336 this->_M_impl._M_map = _M_allocate_map(this->_M_impl._M_map_size);
90337
90338
90339
90340
90341
90342
90343 _Tp** __nstart = (this->_M_impl._M_map
90344 + (this->_M_impl._M_map_size - __num_nodes) / 2);
90345 _Tp** __nfinish = __nstart + __num_nodes;
90346
90347 try
90348 { _M_create_nodes(__nstart, __nfinish); }
90349 catch(...)
90350 {
90351 _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size);
90352 this->_M_impl._M_map = 0;
90353 this->_M_impl._M_map_size = 0;
90354 throw;
90355 }
90356
90357 this->_M_impl._M_start._M_set_node(__nstart);
90358 this->_M_impl._M_finish._M_set_node(__nfinish - 1);
90359 this->_M_impl._M_start._M_cur = _M_impl._M_start._M_first;
90360 this->_M_impl._M_finish._M_cur = (this->_M_impl._M_finish._M_first
90361 + __num_elements
90362 % __deque_buf_size(sizeof(_Tp)));
90363 }
90364
90365 template<typename _Tp, typename _Alloc>
90366 void
90367 _Deque_base<_Tp, _Alloc>::
90368 _M_create_nodes(_Tp** __nstart, _Tp** __nfinish)
90369 {
90370 _Tp** __cur;
90371 try
90372 {
90373 for (__cur = __nstart; __cur < __nfinish; ++__cur)
90374 *__cur = this->_M_allocate_node();
90375 }
90376 catch(...)
90377 {
90378 _M_destroy_nodes(__nstart, __cur);
90379 throw;
90380 }
90381 }
90382
90383 template<typename _Tp, typename _Alloc>
90384 void
90385 _Deque_base<_Tp, _Alloc>::
90386 _M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish)
90387 {
90388 for (_Tp** __n = __nstart; __n < __nfinish; ++__n)
90389 _M_deallocate_node(*__n);
90390 }
90391 # 628 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90392 template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
90393 class deque : protected _Deque_base<_Tp, _Alloc>
90394 {
90395
90396 typedef typename _Alloc::value_type _Alloc_value_type;
90397
90398
90399
90400 typedef _Deque_base<_Tp, _Alloc> _Base;
90401 typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
90402
90403 public:
90404 typedef _Tp value_type;
90405 typedef typename _Tp_alloc_type::pointer pointer;
90406 typedef typename _Tp_alloc_type::const_pointer const_pointer;
90407 typedef typename _Tp_alloc_type::reference reference;
90408 typedef typename _Tp_alloc_type::const_reference const_reference;
90409 typedef typename _Base::iterator iterator;
90410 typedef typename _Base::const_iterator const_iterator;
90411 typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
90412 typedef std::reverse_iterator<iterator> reverse_iterator;
90413 typedef size_t size_type;
90414 typedef ptrdiff_t difference_type;
90415 typedef _Alloc allocator_type;
90416
90417 protected:
90418 typedef pointer* _Map_pointer;
90419
90420 static size_t _S_buffer_size()
90421 { return __deque_buf_size(sizeof(_Tp)); }
90422
90423
90424 using _Base::_M_initialize_map;
90425 using _Base::_M_create_nodes;
90426 using _Base::_M_destroy_nodes;
90427 using _Base::_M_allocate_node;
90428 using _Base::_M_deallocate_node;
90429 using _Base::_M_allocate_map;
90430 using _Base::_M_deallocate_map;
90431 using _Base::_M_get_Tp_allocator;
90432
90433
90434
90435
90436
90437
90438 using _Base::_M_impl;
90439
90440 public:
90441
90442
90443
90444
90445
90446 explicit
90447 deque(const allocator_type& __a = allocator_type())
90448 : _Base(__a, 0) {}
90449 # 693 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90450 explicit
90451 deque(size_type __n, const value_type& __value = value_type(),
90452 const allocator_type& __a = allocator_type())
90453 : _Base(__a, __n)
90454 { _M_fill_initialize(__value); }
90455 # 706 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90456 deque(const deque& __x)
90457 : _Base(__x._M_get_Tp_allocator(), __x.size())
90458 { std::__uninitialized_copy_a(__x.begin(), __x.end(),
90459 this->_M_impl._M_start,
90460 _M_get_Tp_allocator()); }
90461 # 726 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90462 template<typename _InputIterator>
90463 deque(_InputIterator __first, _InputIterator __last,
90464 const allocator_type& __a = allocator_type())
90465 : _Base(__a)
90466 {
90467
90468 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
90469 _M_initialize_dispatch(__first, __last, _Integral());
90470 }
90471
90472
90473
90474
90475
90476
90477 ~deque()
90478 { _M_destroy_data(begin(), end(), _M_get_Tp_allocator()); }
90479 # 751 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90480 deque&
90481 operator=(const deque& __x);
90482 # 764 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90483 void
90484 assign(size_type __n, const value_type& __val)
90485 { _M_fill_assign(__n, __val); }
90486 # 780 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90487 template<typename _InputIterator>
90488 void
90489 assign(_InputIterator __first, _InputIterator __last)
90490 {
90491 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
90492 _M_assign_dispatch(__first, __last, _Integral());
90493 }
90494
90495
90496 allocator_type
90497 get_allocator() const
90498 { return _Base::get_allocator(); }
90499
90500
90501
90502
90503
90504
90505 iterator
90506 begin()
90507 { return this->_M_impl._M_start; }
90508
90509
90510
90511
90512
90513 const_iterator
90514 begin() const
90515 { return this->_M_impl._M_start; }
90516
90517
90518
90519
90520
90521
90522 iterator
90523 end()
90524 { return this->_M_impl._M_finish; }
90525
90526
90527
90528
90529
90530
90531 const_iterator
90532 end() const
90533 { return this->_M_impl._M_finish; }
90534
90535
90536
90537
90538
90539
90540 reverse_iterator
90541 rbegin()
90542 { return reverse_iterator(this->_M_impl._M_finish); }
90543
90544
90545
90546
90547
90548
90549 const_reverse_iterator
90550 rbegin() const
90551 { return const_reverse_iterator(this->_M_impl._M_finish); }
90552
90553
90554
90555
90556
90557
90558 reverse_iterator
90559 rend()
90560 { return reverse_iterator(this->_M_impl._M_start); }
90561
90562
90563
90564
90565
90566
90567 const_reverse_iterator
90568 rend() const
90569 { return const_reverse_iterator(this->_M_impl._M_start); }
90570
90571
90572
90573 size_type
90574 size() const
90575 { return this->_M_impl._M_finish - this->_M_impl._M_start; }
90576
90577
90578 size_type
90579 max_size() const
90580 { return _M_get_Tp_allocator().max_size(); }
90581 # 886 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90582 void
90583 resize(size_type __new_size, value_type __x = value_type())
90584 {
90585 const size_type __len = size();
90586 if (__new_size < __len)
90587 _M_erase_at_end(this->_M_impl._M_start + difference_type(__new_size));
90588 else
90589 insert(this->_M_impl._M_finish, __new_size - __len, __x);
90590 }
90591
90592
90593
90594
90595
90596 bool
90597 empty() const
90598 { return this->_M_impl._M_finish == this->_M_impl._M_start; }
90599 # 916 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90600 reference
90601 operator[](size_type __n)
90602 { return this->_M_impl._M_start[difference_type(__n)]; }
90603 # 931 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90604 const_reference
90605 operator[](size_type __n) const
90606 { return this->_M_impl._M_start[difference_type(__n)]; }
90607
90608 protected:
90609
90610 void
90611 _M_range_check(size_type __n) const
90612 {
90613 if (__n >= this->size())
90614 __throw_out_of_range(("deque::_M_range_check"));
90615 }
90616
90617 public:
90618 # 956 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90619 reference
90620 at(size_type __n)
90621 {
90622 _M_range_check(__n);
90623 return (*this)[__n];
90624 }
90625 # 974 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90626 const_reference
90627 at(size_type __n) const
90628 {
90629 _M_range_check(__n);
90630 return (*this)[__n];
90631 }
90632
90633
90634
90635
90636
90637 reference
90638 front()
90639 { return *begin(); }
90640
90641
90642
90643
90644
90645 const_reference
90646 front() const
90647 { return *begin(); }
90648
90649
90650
90651
90652
90653 reference
90654 back()
90655 {
90656 iterator __tmp = end();
90657 --__tmp;
90658 return *__tmp;
90659 }
90660
90661
90662
90663
90664
90665 const_reference
90666 back() const
90667 {
90668 const_iterator __tmp = end();
90669 --__tmp;
90670 return *__tmp;
90671 }
90672 # 1031 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90673 void
90674 push_front(const value_type& __x)
90675 {
90676 if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first)
90677 {
90678 this->_M_impl.construct(this->_M_impl._M_start._M_cur - 1, __x);
90679 --this->_M_impl._M_start._M_cur;
90680 }
90681 else
90682 _M_push_front_aux(__x);
90683 }
90684 # 1052 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90685 void
90686 push_back(const value_type& __x)
90687 {
90688 if (this->_M_impl._M_finish._M_cur
90689 != this->_M_impl._M_finish._M_last - 1)
90690 {
90691 this->_M_impl.construct(this->_M_impl._M_finish._M_cur, __x);
90692 ++this->_M_impl._M_finish._M_cur;
90693 }
90694 else
90695 _M_push_back_aux(__x);
90696 }
90697 # 1073 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90698 void
90699 pop_front()
90700 {
90701 if (this->_M_impl._M_start._M_cur
90702 != this->_M_impl._M_start._M_last - 1)
90703 {
90704 this->_M_impl.destroy(this->_M_impl._M_start._M_cur);
90705 ++this->_M_impl._M_start._M_cur;
90706 }
90707 else
90708 _M_pop_front_aux();
90709 }
90710 # 1094 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90711 void
90712 pop_back()
90713 {
90714 if (this->_M_impl._M_finish._M_cur
90715 != this->_M_impl._M_finish._M_first)
90716 {
90717 --this->_M_impl._M_finish._M_cur;
90718 this->_M_impl.destroy(this->_M_impl._M_finish._M_cur);
90719 }
90720 else
90721 _M_pop_back_aux();
90722 }
90723 # 1116 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90724 iterator
90725 insert(iterator __position, const value_type& __x);
90726 # 1128 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90727 void
90728 insert(iterator __position, size_type __n, const value_type& __x)
90729 { _M_fill_insert(__position, __n, __x); }
90730 # 1142 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90731 template<typename _InputIterator>
90732 void
90733 insert(iterator __position, _InputIterator __first,
90734 _InputIterator __last)
90735 {
90736
90737 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
90738 _M_insert_dispatch(__position, __first, __last, _Integral());
90739 }
90740 # 1165 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90741 iterator
90742 erase(iterator __position);
90743 # 1184 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90744 iterator
90745 erase(iterator __first, iterator __last);
90746 # 1196 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90747 void
90748 swap(deque& __x)
90749 {
90750 std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
90751 std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
90752 std::swap(this->_M_impl._M_map, __x._M_impl._M_map);
90753 std::swap(this->_M_impl._M_map_size, __x._M_impl._M_map_size);
90754
90755
90756
90757 std::__alloc_swap<_Tp_alloc_type>::_S_do_it(_M_get_Tp_allocator(),
90758 __x._M_get_Tp_allocator());
90759 }
90760
90761
90762
90763
90764
90765
90766
90767 void
90768 clear()
90769 { _M_erase_at_end(begin()); }
90770
90771 protected:
90772
90773
90774
90775 template<typename _Integer>
90776 void
90777 _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
90778 {
90779 _M_initialize_map(__n);
90780 _M_fill_initialize(__x);
90781 }
90782
90783
90784 template<typename _InputIterator>
90785 void
90786 _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
90787 __false_type)
90788 {
90789 typedef typename std::iterator_traits<_InputIterator>::
90790 iterator_category _IterCategory;
90791 _M_range_initialize(__first, __last, _IterCategory());
90792 }
90793 # 1257 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90794 template<typename _InputIterator>
90795 void
90796 _M_range_initialize(_InputIterator __first, _InputIterator __last,
90797 std::input_iterator_tag);
90798
90799
90800 template<typename _ForwardIterator>
90801 void
90802 _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last,
90803 std::forward_iterator_tag);
90804 # 1281 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90805 void
90806 _M_fill_initialize(const value_type& __value);
90807
90808
90809
90810
90811
90812 template<typename _Integer>
90813 void
90814 _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
90815 {
90816 _M_fill_assign(static_cast<size_type>(__n),
90817 static_cast<value_type>(__val));
90818 }
90819
90820
90821 template<typename _InputIterator>
90822 void
90823 _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
90824 __false_type)
90825 {
90826 typedef typename std::iterator_traits<_InputIterator>::
90827 iterator_category _IterCategory;
90828 _M_assign_aux(__first, __last, _IterCategory());
90829 }
90830
90831
90832 template<typename _InputIterator>
90833 void
90834 _M_assign_aux(_InputIterator __first, _InputIterator __last,
90835 std::input_iterator_tag);
90836
90837
90838 template<typename _ForwardIterator>
90839 void
90840 _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
90841 std::forward_iterator_tag)
90842 {
90843 const size_type __len = std::distance(__first, __last);
90844 if (__len > size())
90845 {
90846 _ForwardIterator __mid = __first;
90847 std::advance(__mid, size());
90848 std::copy(__first, __mid, begin());
90849 insert(end(), __mid, __last);
90850 }
90851 else
90852 _M_erase_at_end(std::copy(__first, __last, begin()));
90853 }
90854
90855
90856
90857 void
90858 _M_fill_assign(size_type __n, const value_type& __val)
90859 {
90860 if (__n > size())
90861 {
90862 std::fill(begin(), end(), __val);
90863 insert(end(), __n - size(), __val);
90864 }
90865 else
90866 {
90867 _M_erase_at_end(begin() + difference_type(__n));
90868 std::fill(begin(), end(), __val);
90869 }
90870 }
90871
90872
90873
90874
90875
90876
90877
90878 void _M_push_back_aux(const value_type&);
90879
90880 void _M_push_front_aux(const value_type&);
90881
90882 void _M_pop_back_aux();
90883
90884 void _M_pop_front_aux();
90885
90886
90887
90888
90889
90890
90891 template<typename _Integer>
90892 void
90893 _M_insert_dispatch(iterator __pos,
90894 _Integer __n, _Integer __x, __true_type)
90895 {
90896 _M_fill_insert(__pos, static_cast<size_type>(__n),
90897 static_cast<value_type>(__x));
90898 }
90899
90900
90901 template<typename _InputIterator>
90902 void
90903 _M_insert_dispatch(iterator __pos,
90904 _InputIterator __first, _InputIterator __last,
90905 __false_type)
90906 {
90907 typedef typename std::iterator_traits<_InputIterator>::
90908 iterator_category _IterCategory;
90909 _M_range_insert_aux(__pos, __first, __last, _IterCategory());
90910 }
90911
90912
90913 template<typename _InputIterator>
90914 void
90915 _M_range_insert_aux(iterator __pos, _InputIterator __first,
90916 _InputIterator __last, std::input_iterator_tag);
90917
90918
90919 template<typename _ForwardIterator>
90920 void
90921 _M_range_insert_aux(iterator __pos, _ForwardIterator __first,
90922 _ForwardIterator __last, std::forward_iterator_tag);
90923
90924
90925
90926
90927 void
90928 _M_fill_insert(iterator __pos, size_type __n, const value_type& __x);
90929
90930
90931 iterator
90932 _M_insert_aux(iterator __pos, const value_type& __x);
90933
90934
90935 void
90936 _M_insert_aux(iterator __pos, size_type __n, const value_type& __x);
90937
90938
90939 template<typename _ForwardIterator>
90940 void
90941 _M_insert_aux(iterator __pos,
90942 _ForwardIterator __first, _ForwardIterator __last,
90943 size_type __n);
90944
90945
90946
90947
90948 void
90949 _M_destroy_data_aux(iterator __first, iterator __last);
90950
90951 void
90952 _M_destroy_data_dispatch(iterator, iterator, __true_type) { }
90953
90954 void
90955 _M_destroy_data_dispatch(iterator __first, iterator __last, __false_type)
90956 { _M_destroy_data_aux(__first, __last); }
90957
90958
90959
90960 template<typename _Alloc1>
90961 void
90962 _M_destroy_data(iterator __first, iterator __last, const _Alloc1&)
90963 { _M_destroy_data_aux(__first, __last); }
90964
90965 void
90966 _M_destroy_data(iterator __first, iterator __last,
90967 const std::allocator<_Tp>&)
90968 {
90969 typedef typename std::__is_scalar<value_type>::__type
90970 _Has_trivial_destructor;
90971 _M_destroy_data_dispatch(__first, __last, _Has_trivial_destructor());
90972 }
90973
90974
90975 void
90976 _M_erase_at_begin(iterator __pos)
90977 {
90978 _M_destroy_data(begin(), __pos, _M_get_Tp_allocator());
90979 _M_destroy_nodes(this->_M_impl._M_start._M_node, __pos._M_node);
90980 this->_M_impl._M_start = __pos;
90981 }
90982
90983
90984
90985 void
90986 _M_erase_at_end(iterator __pos)
90987 {
90988 _M_destroy_data(__pos, end(), _M_get_Tp_allocator());
90989 _M_destroy_nodes(__pos._M_node + 1,
90990 this->_M_impl._M_finish._M_node + 1);
90991 this->_M_impl._M_finish = __pos;
90992 }
90993 # 1477 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
90994 iterator
90995 _M_reserve_elements_at_front(size_type __n)
90996 {
90997 const size_type __vacancies = this->_M_impl._M_start._M_cur
90998 - this->_M_impl._M_start._M_first;
90999 if (__n > __vacancies)
91000 _M_new_elements_at_front(__n - __vacancies);
91001 return this->_M_impl._M_start - difference_type(__n);
91002 }
91003
91004 iterator
91005 _M_reserve_elements_at_back(size_type __n)
91006 {
91007 const size_type __vacancies = (this->_M_impl._M_finish._M_last
91008 - this->_M_impl._M_finish._M_cur) - 1;
91009 if (__n > __vacancies)
91010 _M_new_elements_at_back(__n - __vacancies);
91011 return this->_M_impl._M_finish + difference_type(__n);
91012 }
91013
91014 void
91015 _M_new_elements_at_front(size_type __new_elements);
91016
91017 void
91018 _M_new_elements_at_back(size_type __new_elements);
91019 # 1515 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
91020 void
91021 _M_reserve_map_at_back(size_type __nodes_to_add = 1)
91022 {
91023 if (__nodes_to_add + 1 > this->_M_impl._M_map_size
91024 - (this->_M_impl._M_finish._M_node - this->_M_impl._M_map))
91025 _M_reallocate_map(__nodes_to_add, false);
91026 }
91027
91028 void
91029 _M_reserve_map_at_front(size_type __nodes_to_add = 1)
91030 {
91031 if (__nodes_to_add > size_type(this->_M_impl._M_start._M_node
91032 - this->_M_impl._M_map))
91033 _M_reallocate_map(__nodes_to_add, true);
91034 }
91035
91036 void
91037 _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front);
91038
91039 };
91040 # 1547 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
91041 template<typename _Tp, typename _Alloc>
91042 inline bool
91043 operator==(const deque<_Tp, _Alloc>& __x,
91044 const deque<_Tp, _Alloc>& __y)
91045 { return __x.size() == __y.size()
91046 && std::equal(__x.begin(), __x.end(), __y.begin()); }
91047 # 1565 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3
91048 template<typename _Tp, typename _Alloc>
91049 inline bool
91050 operator<(const deque<_Tp, _Alloc>& __x,
91051 const deque<_Tp, _Alloc>& __y)
91052 { return std::lexicographical_compare(__x.begin(), __x.end(),
91053 __y.begin(), __y.end()); }
91054
91055
91056 template<typename _Tp, typename _Alloc>
91057 inline bool
91058 operator!=(const deque<_Tp, _Alloc>& __x,
91059 const deque<_Tp, _Alloc>& __y)
91060 { return !(__x == __y); }
91061
91062
91063 template<typename _Tp, typename _Alloc>
91064 inline bool
91065 operator>(const deque<_Tp, _Alloc>& __x,
91066 const deque<_Tp, _Alloc>& __y)
91067 { return __y < __x; }
91068
91069
91070 template<typename _Tp, typename _Alloc>
91071 inline bool
91072 operator<=(const deque<_Tp, _Alloc>& __x,
91073 const deque<_Tp, _Alloc>& __y)
91074 { return !(__y < __x); }
91075
91076
91077 template<typename _Tp, typename _Alloc>
91078 inline bool
91079 operator>=(const deque<_Tp, _Alloc>& __x,
91080 const deque<_Tp, _Alloc>& __y)
91081 { return !(__x < __y); }
91082
91083
91084 template<typename _Tp, typename _Alloc>
91085 inline void
91086 swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y)
91087 { __x.swap(__y); }
91088
91089 }
91090 # 71 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/deque" 2 3
91091
91092
91093 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/deque.tcc" 1 3
91094 # 65 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/deque.tcc" 3
91095 namespace std __attribute__ ((__visibility__ ("default"))) {
91096
91097 template <typename _Tp, typename _Alloc>
91098 deque<_Tp, _Alloc>&
91099 deque<_Tp, _Alloc>::
91100 operator=(const deque& __x)
91101 {
91102 const size_type __len = size();
91103 if (&__x != this)
91104 {
91105 if (__len >= __x.size())
91106 _M_erase_at_end(std::copy(__x.begin(), __x.end(),
91107 this->_M_impl._M_start));
91108 else
91109 {
91110 const_iterator __mid = __x.begin() + difference_type(__len);
91111 std::copy(__x.begin(), __mid, this->_M_impl._M_start);
91112 insert(this->_M_impl._M_finish, __mid, __x.end());
91113 }
91114 }
91115 return *this;
91116 }
91117
91118 template <typename _Tp, typename _Alloc>
91119 typename deque<_Tp, _Alloc>::iterator
91120 deque<_Tp, _Alloc>::
91121 insert(iterator __position, const value_type& __x)
91122 {
91123 if (__position._M_cur == this->_M_impl._M_start._M_cur)
91124 {
91125 push_front(__x);
91126 return this->_M_impl._M_start;
91127 }
91128 else if (__position._M_cur == this->_M_impl._M_finish._M_cur)
91129 {
91130 push_back(__x);
91131 iterator __tmp = this->_M_impl._M_finish;
91132 --__tmp;
91133 return __tmp;
91134 }
91135 else
91136 return _M_insert_aux(__position, __x);
91137 }
91138
91139 template <typename _Tp, typename _Alloc>
91140 typename deque<_Tp, _Alloc>::iterator
91141 deque<_Tp, _Alloc>::
91142 erase(iterator __position)
91143 {
91144 iterator __next = __position;
91145 ++__next;
91146 const difference_type __index = __position - begin();
91147 if (static_cast<size_type>(__index) < (size() >> 1))
91148 {
91149 if (__position != begin())
91150 std::copy_backward(begin(), __position, __next);
91151 pop_front();
91152 }
91153 else
91154 {
91155 if (__next != end())
91156 std::copy(__next, end(), __position);
91157 pop_back();
91158 }
91159 return begin() + __index;
91160 }
91161
91162 template <typename _Tp, typename _Alloc>
91163 typename deque<_Tp, _Alloc>::iterator
91164 deque<_Tp, _Alloc>::
91165 erase(iterator __first, iterator __last)
91166 {
91167 if (__first == begin() && __last == end())
91168 {
91169 clear();
91170 return end();
91171 }
91172 else
91173 {
91174 const difference_type __n = __last - __first;
91175 const difference_type __elems_before = __first - begin();
91176 if (static_cast<size_type>(__elems_before) <= (size() - __n) / 2)
91177 {
91178 if (__first != begin())
91179 std::copy_backward(begin(), __first, __last);
91180 _M_erase_at_begin(begin() + __n);
91181 }
91182 else
91183 {
91184 if (__last != end())
91185 std::copy(__last, end(), __first);
91186 _M_erase_at_end(end() - __n);
91187 }
91188 return begin() + __elems_before;
91189 }
91190 }
91191
91192 template <typename _Tp, class _Alloc>
91193 template <typename _InputIterator>
91194 void
91195 deque<_Tp, _Alloc>::
91196 _M_assign_aux(_InputIterator __first, _InputIterator __last,
91197 std::input_iterator_tag)
91198 {
91199 iterator __cur = begin();
91200 for (; __first != __last && __cur != end(); ++__cur, ++__first)
91201 *__cur = *__first;
91202 if (__first == __last)
91203 _M_erase_at_end(__cur);
91204 else
91205 insert(end(), __first, __last);
91206 }
91207
91208 template <typename _Tp, typename _Alloc>
91209 void
91210 deque<_Tp, _Alloc>::
91211 _M_fill_insert(iterator __pos, size_type __n, const value_type& __x)
91212 {
91213 if (__pos._M_cur == this->_M_impl._M_start._M_cur)
91214 {
91215 iterator __new_start = _M_reserve_elements_at_front(__n);
91216 try
91217 {
91218 std::__uninitialized_fill_a(__new_start, this->_M_impl._M_start,
91219 __x, _M_get_Tp_allocator());
91220 this->_M_impl._M_start = __new_start;
91221 }
91222 catch(...)
91223 {
91224 _M_destroy_nodes(__new_start._M_node,
91225 this->_M_impl._M_start._M_node);
91226 throw;
91227 }
91228 }
91229 else if (__pos._M_cur == this->_M_impl._M_finish._M_cur)
91230 {
91231 iterator __new_finish = _M_reserve_elements_at_back(__n);
91232 try
91233 {
91234 std::__uninitialized_fill_a(this->_M_impl._M_finish,
91235 __new_finish, __x,
91236 _M_get_Tp_allocator());
91237 this->_M_impl._M_finish = __new_finish;
91238 }
91239 catch(...)
91240 {
91241 _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
91242 __new_finish._M_node + 1);
91243 throw;
91244 }
91245 }
91246 else
91247 _M_insert_aux(__pos, __n, __x);
91248 }
91249
91250 template <typename _Tp, typename _Alloc>
91251 void
91252 deque<_Tp, _Alloc>::
91253 _M_fill_initialize(const value_type& __value)
91254 {
91255 _Map_pointer __cur;
91256 try
91257 {
91258 for (__cur = this->_M_impl._M_start._M_node;
91259 __cur < this->_M_impl._M_finish._M_node;
91260 ++__cur)
91261 std::__uninitialized_fill_a(*__cur, *__cur + _S_buffer_size(),
91262 __value, _M_get_Tp_allocator());
91263 std::__uninitialized_fill_a(this->_M_impl._M_finish._M_first,
91264 this->_M_impl._M_finish._M_cur,
91265 __value, _M_get_Tp_allocator());
91266 }
91267 catch(...)
91268 {
91269 std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur),
91270 _M_get_Tp_allocator());
91271 throw;
91272 }
91273 }
91274
91275 template <typename _Tp, typename _Alloc>
91276 template <typename _InputIterator>
91277 void
91278 deque<_Tp, _Alloc>::
91279 _M_range_initialize(_InputIterator __first, _InputIterator __last,
91280 std::input_iterator_tag)
91281 {
91282 this->_M_initialize_map(0);
91283 try
91284 {
91285 for (; __first != __last; ++__first)
91286 push_back(*__first);
91287 }
91288 catch(...)
91289 {
91290 clear();
91291 throw;
91292 }
91293 }
91294
91295 template <typename _Tp, typename _Alloc>
91296 template <typename _ForwardIterator>
91297 void
91298 deque<_Tp, _Alloc>::
91299 _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last,
91300 std::forward_iterator_tag)
91301 {
91302 const size_type __n = std::distance(__first, __last);
91303 this->_M_initialize_map(__n);
91304
91305 _Map_pointer __cur_node;
91306 try
91307 {
91308 for (__cur_node = this->_M_impl._M_start._M_node;
91309 __cur_node < this->_M_impl._M_finish._M_node;
91310 ++__cur_node)
91311 {
91312 _ForwardIterator __mid = __first;
91313 std::advance(__mid, _S_buffer_size());
91314 std::__uninitialized_copy_a(__first, __mid, *__cur_node,
91315 _M_get_Tp_allocator());
91316 __first = __mid;
91317 }
91318 std::__uninitialized_copy_a(__first, __last,
91319 this->_M_impl._M_finish._M_first,
91320 _M_get_Tp_allocator());
91321 }
91322 catch(...)
91323 {
91324 std::_Destroy(this->_M_impl._M_start,
91325 iterator(*__cur_node, __cur_node),
91326 _M_get_Tp_allocator());
91327 throw;
91328 }
91329 }
91330
91331
91332 template <typename _Tp, typename _Alloc>
91333 void
91334 deque<_Tp, _Alloc>::
91335 _M_push_back_aux(const value_type& __t)
91336 {
91337 value_type __t_copy = __t;
91338 _M_reserve_map_at_back();
91339 *(this->_M_impl._M_finish._M_node + 1) = this->_M_allocate_node();
91340 try
91341 {
91342 this->_M_impl.construct(this->_M_impl._M_finish._M_cur, __t_copy);
91343 this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node
91344 + 1);
91345 this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_first;
91346 }
91347 catch(...)
91348 {
91349 _M_deallocate_node(*(this->_M_impl._M_finish._M_node + 1));
91350 throw;
91351 }
91352 }
91353
91354
91355 template <typename _Tp, typename _Alloc>
91356 void
91357 deque<_Tp, _Alloc>::
91358 _M_push_front_aux(const value_type& __t)
91359 {
91360 value_type __t_copy = __t;
91361 _M_reserve_map_at_front();
91362 *(this->_M_impl._M_start._M_node - 1) = this->_M_allocate_node();
91363 try
91364 {
91365 this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node
91366 - 1);
91367 this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_last - 1;
91368 this->_M_impl.construct(this->_M_impl._M_start._M_cur, __t_copy);
91369 }
91370 catch(...)
91371 {
91372 ++this->_M_impl._M_start;
91373 _M_deallocate_node(*(this->_M_impl._M_start._M_node - 1));
91374 throw;
91375 }
91376 }
91377
91378
91379 template <typename _Tp, typename _Alloc>
91380 void deque<_Tp, _Alloc>::
91381 _M_pop_back_aux()
91382 {
91383 _M_deallocate_node(this->_M_impl._M_finish._M_first);
91384 this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node - 1);
91385 this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_last - 1;
91386 this->_M_impl.destroy(this->_M_impl._M_finish._M_cur);
91387 }
91388
91389
91390
91391
91392
91393
91394 template <typename _Tp, typename _Alloc>
91395 void deque<_Tp, _Alloc>::
91396 _M_pop_front_aux()
91397 {
91398 this->_M_impl.destroy(this->_M_impl._M_start._M_cur);
91399 _M_deallocate_node(this->_M_impl._M_start._M_first);
91400 this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node + 1);
91401 this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_first;
91402 }
91403
91404 template <typename _Tp, typename _Alloc>
91405 template <typename _InputIterator>
91406 void
91407 deque<_Tp, _Alloc>::
91408 _M_range_insert_aux(iterator __pos,
91409 _InputIterator __first, _InputIterator __last,
91410 std::input_iterator_tag)
91411 { std::copy(__first, __last, std::inserter(*this, __pos)); }
91412
91413 template <typename _Tp, typename _Alloc>
91414 template <typename _ForwardIterator>
91415 void
91416 deque<_Tp, _Alloc>::
91417 _M_range_insert_aux(iterator __pos,
91418 _ForwardIterator __first, _ForwardIterator __last,
91419 std::forward_iterator_tag)
91420 {
91421 const size_type __n = std::distance(__first, __last);
91422 if (__pos._M_cur == this->_M_impl._M_start._M_cur)
91423 {
91424 iterator __new_start = _M_reserve_elements_at_front(__n);
91425 try
91426 {
91427 std::__uninitialized_copy_a(__first, __last, __new_start,
91428 _M_get_Tp_allocator());
91429 this->_M_impl._M_start = __new_start;
91430 }
91431 catch(...)
91432 {
91433 _M_destroy_nodes(__new_start._M_node,
91434 this->_M_impl._M_start._M_node);
91435 throw;
91436 }
91437 }
91438 else if (__pos._M_cur == this->_M_impl._M_finish._M_cur)
91439 {
91440 iterator __new_finish = _M_reserve_elements_at_back(__n);
91441 try
91442 {
91443 std::__uninitialized_copy_a(__first, __last,
91444 this->_M_impl._M_finish,
91445 _M_get_Tp_allocator());
91446 this->_M_impl._M_finish = __new_finish;
91447 }
91448 catch(...)
91449 {
91450 _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
91451 __new_finish._M_node + 1);
91452 throw;
91453 }
91454 }
91455 else
91456 _M_insert_aux(__pos, __first, __last, __n);
91457 }
91458
91459 template <typename _Tp, typename _Alloc>
91460 typename deque<_Tp, _Alloc>::iterator
91461 deque<_Tp, _Alloc>::
91462 _M_insert_aux(iterator __pos, const value_type& __x)
91463 {
91464 difference_type __index = __pos - this->_M_impl._M_start;
91465 value_type __x_copy = __x;
91466 if (static_cast<size_type>(__index) < size() / 2)
91467 {
91468 push_front(front());
91469 iterator __front1 = this->_M_impl._M_start;
91470 ++__front1;
91471 iterator __front2 = __front1;
91472 ++__front2;
91473 __pos = this->_M_impl._M_start + __index;
91474 iterator __pos1 = __pos;
91475 ++__pos1;
91476 std::copy(__front2, __pos1, __front1);
91477 }
91478 else
91479 {
91480 push_back(back());
91481 iterator __back1 = this->_M_impl._M_finish;
91482 --__back1;
91483 iterator __back2 = __back1;
91484 --__back2;
91485 __pos = this->_M_impl._M_start + __index;
91486 std::copy_backward(__pos, __back2, __back1);
91487 }
91488 *__pos = __x_copy;
91489 return __pos;
91490 }
91491
91492 template <typename _Tp, typename _Alloc>
91493 void
91494 deque<_Tp, _Alloc>::
91495 _M_insert_aux(iterator __pos, size_type __n, const value_type& __x)
91496 {
91497 const difference_type __elems_before = __pos - this->_M_impl._M_start;
91498 const size_type __length = this->size();
91499 value_type __x_copy = __x;
91500 if (__elems_before < difference_type(__length / 2))
91501 {
91502 iterator __new_start = _M_reserve_elements_at_front(__n);
91503 iterator __old_start = this->_M_impl._M_start;
91504 __pos = this->_M_impl._M_start + __elems_before;
91505 try
91506 {
91507 if (__elems_before >= difference_type(__n))
91508 {
91509 iterator __start_n = (this->_M_impl._M_start
91510 + difference_type(__n));
91511 std::__uninitialized_copy_a(this->_M_impl._M_start,
91512 __start_n, __new_start,
91513 _M_get_Tp_allocator());
91514 this->_M_impl._M_start = __new_start;
91515 std::copy(__start_n, __pos, __old_start);
91516 std::fill(__pos - difference_type(__n), __pos, __x_copy);
91517 }
91518 else
91519 {
91520 std::__uninitialized_copy_fill(this->_M_impl._M_start,
91521 __pos, __new_start,
91522 this->_M_impl._M_start,
91523 __x_copy,
91524 _M_get_Tp_allocator());
91525 this->_M_impl._M_start = __new_start;
91526 std::fill(__old_start, __pos, __x_copy);
91527 }
91528 }
91529 catch(...)
91530 {
91531 _M_destroy_nodes(__new_start._M_node,
91532 this->_M_impl._M_start._M_node);
91533 throw;
91534 }
91535 }
91536 else
91537 {
91538 iterator __new_finish = _M_reserve_elements_at_back(__n);
91539 iterator __old_finish = this->_M_impl._M_finish;
91540 const difference_type __elems_after =
91541 difference_type(__length) - __elems_before;
91542 __pos = this->_M_impl._M_finish - __elems_after;
91543 try
91544 {
91545 if (__elems_after > difference_type(__n))
91546 {
91547 iterator __finish_n = (this->_M_impl._M_finish
91548 - difference_type(__n));
91549 std::__uninitialized_copy_a(__finish_n,
91550 this->_M_impl._M_finish,
91551 this->_M_impl._M_finish,
91552 _M_get_Tp_allocator());
91553 this->_M_impl._M_finish = __new_finish;
91554 std::copy_backward(__pos, __finish_n, __old_finish);
91555 std::fill(__pos, __pos + difference_type(__n), __x_copy);
91556 }
91557 else
91558 {
91559 std::__uninitialized_fill_copy(this->_M_impl._M_finish,
91560 __pos + difference_type(__n),
91561 __x_copy, __pos,
91562 this->_M_impl._M_finish,
91563 _M_get_Tp_allocator());
91564 this->_M_impl._M_finish = __new_finish;
91565 std::fill(__pos, __old_finish, __x_copy);
91566 }
91567 }
91568 catch(...)
91569 {
91570 _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
91571 __new_finish._M_node + 1);
91572 throw;
91573 }
91574 }
91575 }
91576
91577 template <typename _Tp, typename _Alloc>
91578 template <typename _ForwardIterator>
91579 void
91580 deque<_Tp, _Alloc>::
91581 _M_insert_aux(iterator __pos,
91582 _ForwardIterator __first, _ForwardIterator __last,
91583 size_type __n)
91584 {
91585 const difference_type __elemsbefore = __pos - this->_M_impl._M_start;
91586 const size_type __length = size();
91587 if (static_cast<size_type>(__elemsbefore) < __length / 2)
91588 {
91589 iterator __new_start = _M_reserve_elements_at_front(__n);
91590 iterator __old_start = this->_M_impl._M_start;
91591 __pos = this->_M_impl._M_start + __elemsbefore;
91592 try
91593 {
91594 if (__elemsbefore >= difference_type(__n))
91595 {
91596 iterator __start_n = (this->_M_impl._M_start
91597 + difference_type(__n));
91598 std::__uninitialized_copy_a(this->_M_impl._M_start,
91599 __start_n, __new_start,
91600 _M_get_Tp_allocator());
91601 this->_M_impl._M_start = __new_start;
91602 std::copy(__start_n, __pos, __old_start);
91603 std::copy(__first, __last, __pos - difference_type(__n));
91604 }
91605 else
91606 {
91607 _ForwardIterator __mid = __first;
91608 std::advance(__mid, difference_type(__n) - __elemsbefore);
91609 std::__uninitialized_copy_copy(this->_M_impl._M_start,
91610 __pos, __first, __mid,
91611 __new_start,
91612 _M_get_Tp_allocator());
91613 this->_M_impl._M_start = __new_start;
91614 std::copy(__mid, __last, __old_start);
91615 }
91616 }
91617 catch(...)
91618 {
91619 _M_destroy_nodes(__new_start._M_node,
91620 this->_M_impl._M_start._M_node);
91621 throw;
91622 }
91623 }
91624 else
91625 {
91626 iterator __new_finish = _M_reserve_elements_at_back(__n);
91627 iterator __old_finish = this->_M_impl._M_finish;
91628 const difference_type __elemsafter =
91629 difference_type(__length) - __elemsbefore;
91630 __pos = this->_M_impl._M_finish - __elemsafter;
91631 try
91632 {
91633 if (__elemsafter > difference_type(__n))
91634 {
91635 iterator __finish_n = (this->_M_impl._M_finish
91636 - difference_type(__n));
91637 std::__uninitialized_copy_a(__finish_n,
91638 this->_M_impl._M_finish,
91639 this->_M_impl._M_finish,
91640 _M_get_Tp_allocator());
91641 this->_M_impl._M_finish = __new_finish;
91642 std::copy_backward(__pos, __finish_n, __old_finish);
91643 std::copy(__first, __last, __pos);
91644 }
91645 else
91646 {
91647 _ForwardIterator __mid = __first;
91648 std::advance(__mid, __elemsafter);
91649 std::__uninitialized_copy_copy(__mid, __last, __pos,
91650 this->_M_impl._M_finish,
91651 this->_M_impl._M_finish,
91652 _M_get_Tp_allocator());
91653 this->_M_impl._M_finish = __new_finish;
91654 std::copy(__first, __mid, __pos);
91655 }
91656 }
91657 catch(...)
91658 {
91659 _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
91660 __new_finish._M_node + 1);
91661 throw;
91662 }
91663 }
91664 }
91665
91666 template<typename _Tp, typename _Alloc>
91667 void
91668 deque<_Tp, _Alloc>::
91669 _M_destroy_data_aux(iterator __first, iterator __last)
91670 {
91671 for (_Map_pointer __node = __first._M_node + 1;
91672 __node < __last._M_node; ++__node)
91673 std::_Destroy(*__node, *__node + _S_buffer_size(),
91674 _M_get_Tp_allocator());
91675
91676 if (__first._M_node != __last._M_node)
91677 {
91678 std::_Destroy(__first._M_cur, __first._M_last,
91679 _M_get_Tp_allocator());
91680 std::_Destroy(__last._M_first, __last._M_cur,
91681 _M_get_Tp_allocator());
91682 }
91683 else
91684 std::_Destroy(__first._M_cur, __last._M_cur,
91685 _M_get_Tp_allocator());
91686 }
91687
91688 template <typename _Tp, typename _Alloc>
91689 void
91690 deque<_Tp, _Alloc>::
91691 _M_new_elements_at_front(size_type __new_elems)
91692 {
91693 if (this->max_size() - this->size() < __new_elems)
91694 __throw_length_error(("deque::_M_new_elements_at_front"));
91695
91696 const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1)
91697 / _S_buffer_size());
91698 _M_reserve_map_at_front(__new_nodes);
91699 size_type __i;
91700 try
91701 {
91702 for (__i = 1; __i <= __new_nodes; ++__i)
91703 *(this->_M_impl._M_start._M_node - __i) = this->_M_allocate_node();
91704 }
91705 catch(...)
91706 {
91707 for (size_type __j = 1; __j < __i; ++__j)
91708 _M_deallocate_node(*(this->_M_impl._M_start._M_node - __j));
91709 throw;
91710 }
91711 }
91712
91713 template <typename _Tp, typename _Alloc>
91714 void
91715 deque<_Tp, _Alloc>::
91716 _M_new_elements_at_back(size_type __new_elems)
91717 {
91718 if (this->max_size() - this->size() < __new_elems)
91719 __throw_length_error(("deque::_M_new_elements_at_back"));
91720
91721 const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1)
91722 / _S_buffer_size());
91723 _M_reserve_map_at_back(__new_nodes);
91724 size_type __i;
91725 try
91726 {
91727 for (__i = 1; __i <= __new_nodes; ++__i)
91728 *(this->_M_impl._M_finish._M_node + __i) = this->_M_allocate_node();
91729 }
91730 catch(...)
91731 {
91732 for (size_type __j = 1; __j < __i; ++__j)
91733 _M_deallocate_node(*(this->_M_impl._M_finish._M_node + __j));
91734 throw;
91735 }
91736 }
91737
91738 template <typename _Tp, typename _Alloc>
91739 void
91740 deque<_Tp, _Alloc>::
91741 _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front)
91742 {
91743 const size_type __old_num_nodes
91744 = this->_M_impl._M_finish._M_node - this->_M_impl._M_start._M_node + 1;
91745 const size_type __new_num_nodes = __old_num_nodes + __nodes_to_add;
91746
91747 _Map_pointer __new_nstart;
91748 if (this->_M_impl._M_map_size > 2 * __new_num_nodes)
91749 {
91750 __new_nstart = this->_M_impl._M_map + (this->_M_impl._M_map_size
91751 - __new_num_nodes) / 2
91752 + (__add_at_front ? __nodes_to_add : 0);
91753 if (__new_nstart < this->_M_impl._M_start._M_node)
91754 std::copy(this->_M_impl._M_start._M_node,
91755 this->_M_impl._M_finish._M_node + 1,
91756 __new_nstart);
91757 else
91758 std::copy_backward(this->_M_impl._M_start._M_node,
91759 this->_M_impl._M_finish._M_node + 1,
91760 __new_nstart + __old_num_nodes);
91761 }
91762 else
91763 {
91764 size_type __new_map_size = this->_M_impl._M_map_size
91765 + std::max(this->_M_impl._M_map_size,
91766 __nodes_to_add) + 2;
91767
91768 _Map_pointer __new_map = this->_M_allocate_map(__new_map_size);
91769 __new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2
91770 + (__add_at_front ? __nodes_to_add : 0);
91771 std::copy(this->_M_impl._M_start._M_node,
91772 this->_M_impl._M_finish._M_node + 1,
91773 __new_nstart);
91774 _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size);
91775
91776 this->_M_impl._M_map = __new_map;
91777 this->_M_impl._M_map_size = __new_map_size;
91778 }
91779
91780 this->_M_impl._M_start._M_set_node(__new_nstart);
91781 this->_M_impl._M_finish._M_set_node(__new_nstart + __old_num_nodes - 1);
91782 }
91783
91784
91785
91786 template<typename _Tp>
91787 void
91788 fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>& __first,
91789 const _Deque_iterator<_Tp, _Tp&, _Tp*>& __last, const _Tp& __value)
91790 {
91791 typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self;
91792
91793 for (typename _Self::_Map_pointer __node = __first._M_node + 1;
91794 __node < __last._M_node; ++__node)
91795 std::fill(*__node, *__node + _Self::_S_buffer_size(), __value);
91796
91797 if (__first._M_node != __last._M_node)
91798 {
91799 std::fill(__first._M_cur, __first._M_last, __value);
91800 std::fill(__last._M_first, __last._M_cur, __value);
91801 }
91802 else
91803 std::fill(__first._M_cur, __last._M_cur, __value);
91804 }
91805
91806 }
91807 # 74 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/deque" 2 3
91808 # 74 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/queue" 2 3
91809
91810 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_queue.h" 1 3
91811 # 68 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_queue.h" 3
91812 namespace std __attribute__ ((__visibility__ ("default"))) {
91813 # 94 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_queue.h" 3
91814 template<typename _Tp, typename _Sequence = deque<_Tp> >
91815 class queue
91816 {
91817
91818 typedef typename _Sequence::value_type _Sequence_value_type;
91819
91820
91821
91822
91823
91824 template<typename _Tp1, typename _Seq1>
91825 friend bool
91826 operator==(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&);
91827
91828 template<typename _Tp1, typename _Seq1>
91829 friend bool
91830 operator<(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&);
91831
91832 public:
91833 typedef typename _Sequence::value_type value_type;
91834 typedef typename _Sequence::reference reference;
91835 typedef typename _Sequence::const_reference const_reference;
91836 typedef typename _Sequence::size_type size_type;
91837 typedef _Sequence container_type;
91838
91839 protected:
91840 # 128 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_queue.h" 3
91841 _Sequence c;
91842
91843 public:
91844
91845
91846
91847 explicit
91848 queue(const _Sequence& __c = _Sequence()) : c(__c) {}
91849
91850
91851
91852
91853 bool
91854 empty() const
91855 { return c.empty(); }
91856
91857
91858 size_type
91859 size() const
91860 { return c.size(); }
91861
91862
91863
91864
91865
91866 reference
91867 front()
91868 {
91869 ;
91870 return c.front();
91871 }
91872
91873
91874
91875
91876
91877 const_reference
91878 front() const
91879 {
91880 ;
91881 return c.front();
91882 }
91883
91884
91885
91886
91887
91888 reference
91889 back()
91890 {
91891 ;
91892 return c.back();
91893 }
91894
91895
91896
91897
91898
91899 const_reference
91900 back() const
91901 {
91902 ;
91903 return c.back();
91904 }
91905 # 202 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_queue.h" 3
91906 void
91907 push(const value_type& __x)
91908 { c.push_back(__x); }
91909 # 217 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_queue.h" 3
91910 void
91911 pop()
91912 {
91913 ;
91914 c.pop_front();
91915 }
91916 };
91917 # 237 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_queue.h" 3
91918 template<typename _Tp, typename _Seq>
91919 inline bool
91920 operator==(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
91921 { return __x.c == __y.c; }
91922 # 255 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_queue.h" 3
91923 template<typename _Tp, typename _Seq>
91924 inline bool
91925 operator<(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
91926 { return __x.c < __y.c; }
91927
91928
91929 template<typename _Tp, typename _Seq>
91930 inline bool
91931 operator!=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
91932 { return !(__x == __y); }
91933
91934
91935 template<typename _Tp, typename _Seq>
91936 inline bool
91937 operator>(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
91938 { return __y < __x; }
91939
91940
91941 template<typename _Tp, typename _Seq>
91942 inline bool
91943 operator<=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
91944 { return !(__y < __x); }
91945
91946
91947 template<typename _Tp, typename _Seq>
91948 inline bool
91949 operator>=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
91950 { return !(__x < __y); }
91951 # 320 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_queue.h" 3
91952 template<typename _Tp, typename _Sequence = vector<_Tp>,
91953 typename _Compare = less<typename _Sequence::value_type> >
91954 class priority_queue
91955 {
91956
91957 typedef typename _Sequence::value_type _Sequence_value_type;
91958
91959
91960
91961
91962
91963
91964
91965 public:
91966 typedef typename _Sequence::value_type value_type;
91967 typedef typename _Sequence::reference reference;
91968 typedef typename _Sequence::const_reference const_reference;
91969 typedef typename _Sequence::size_type size_type;
91970 typedef _Sequence container_type;
91971
91972 protected:
91973
91974 _Sequence c;
91975 _Compare comp;
91976
91977 public:
91978
91979
91980
91981 explicit
91982 priority_queue(const _Compare& __x = _Compare(),
91983 const _Sequence& __s = _Sequence())
91984 : c(__s), comp(__x)
91985 { std::make_heap(c.begin(), c.end(), comp); }
91986 # 370 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_queue.h" 3
91987 template<typename _InputIterator>
91988 priority_queue(_InputIterator __first, _InputIterator __last,
91989 const _Compare& __x = _Compare(),
91990 const _Sequence& __s = _Sequence())
91991 : c(__s), comp(__x)
91992 {
91993 ;
91994 c.insert(c.end(), __first, __last);
91995 std::make_heap(c.begin(), c.end(), comp);
91996 }
91997
91998
91999
92000
92001 bool
92002 empty() const
92003 { return c.empty(); }
92004
92005
92006 size_type
92007 size() const
92008 { return c.size(); }
92009
92010
92011
92012
92013
92014 const_reference
92015 top() const
92016 {
92017 ;
92018 return c.front();
92019 }
92020 # 412 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_queue.h" 3
92021 void
92022 push(const value_type& __x)
92023 {
92024 c.push_back(__x);
92025 std::push_heap(c.begin(), c.end(), comp);
92026 }
92027 # 430 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_queue.h" 3
92028 void
92029 pop()
92030 {
92031 ;
92032 std::pop_heap(c.begin(), c.end(), comp);
92033 c.pop_back();
92034 }
92035 };
92036
92037
92038
92039 }
92040 # 76 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/queue" 2 3
92041 # 28 "path.h" 2
92042
92043
92044 using std::priority_queue;
92045 using std::vector;
92046
92047 using vigra::Point2D;
92048 using vigra::UInt8Image;
92049
92050 namespace enblend {
92051
92052 template <typename Point, typename Image>
92053 class PathCompareFunctor {
92054 public:
92055 PathCompareFunctor(Image *i) : image(i) {}
92056 bool operator()(const Point &a, const Point &b) {
92057
92058
92059
92060 return ((*image)[a] > (*image)[b]);
92061 }
92062 protected:
92063 Image *image;
92064 };
92065
92066 template <class CostImageIterator, class CostAccessor>
92067 vector<Point2D> *minCostPath(CostImageIterator cost_upperleft,
92068 CostImageIterator cost_lowerright,
92069 CostAccessor ca,
92070 Point2D startingPoint,
92071 Point2D endingPoint) {
92072
92073 typedef typename CostAccessor::value_type CostPixelType;
92074 typedef typename NumericTraits<CostPixelType>::Promote WorkingPixelType;
92075 typedef BasicImage<WorkingPixelType> WorkingImageType;
92076 typedef typename WorkingImageType::traverser WorkingImageIterator;
92077 typedef priority_queue<Point2D, vector<Point2D>, PathCompareFunctor<Point2D, WorkingImageType> > PQ;
92078
92079 int w = cost_lowerright.x - cost_upperleft.x;
92080 int h = cost_lowerright.y - cost_upperleft.y;
92081
92082
92083
92084
92085
92086
92087 const UInt8 neighborArray[] = {0xA, 1, 6, 8, 5, 2, 9, 4};
92088
92089 const UInt8 neighborArrayInverse[] = {5, 2, 9, 4, 0xA, 1, 6, 8};
92090
92091 UInt8Image *pathNextHop = new UInt8Image(w, h, UInt8(0));
92092 WorkingImageType *costSoFar = new WorkingImageType(w, h, NumericTraits<WorkingPixelType>::max());
92093 PQ *pq = new PQ(PathCompareFunctor<Point2D, WorkingImageType>(costSoFar));
92094 vector<Point2D> *result = new vector<Point2D>;
92095
92096
92097
92098
92099
92100 (*costSoFar)[endingPoint] = std::max(NumericTraits<WorkingPixelType>::one(),
92101 NumericTraits<CostPixelType>::toPromote(ca(cost_upperleft + endingPoint)));
92102 pq->push(endingPoint);
92103
92104 while (!pq->empty()) {
92105 Point2D top = pq->top();
92106 pq->pop();
92107
92108
92109
92110 if (top != startingPoint) {
92111 WorkingPixelType costToTop = (*costSoFar)[top];
92112
92113
92114
92115
92116 for (int i = 0; i < 8; i++) {
92117
92118 UInt8 neighborDirection = neighborArray[i];
92119 Point2D neighborPoint = top;
92120 if (neighborDirection & 0x8) --neighborPoint.y;
92121 if (neighborDirection & 0x4) ++neighborPoint.y;
92122 if (neighborDirection & 0x2) --neighborPoint.x;
92123 if (neighborDirection & 0x1) ++neighborPoint.x;
92124
92125
92126 if ((neighborPoint.y < 0) || (neighborPoint.y >= h)
92127 || (neighborPoint.x < 0) || (neighborPoint.x >= w)) continue;
92128
92129
92130
92131
92132
92133
92134 WorkingPixelType neighborPreviousCost = (*costSoFar)[neighborPoint];
92135
92136 if (neighborPreviousCost != NumericTraits<WorkingPixelType>::max()) continue;
92137
92138 WorkingPixelType neighborCost = std::max(NumericTraits<WorkingPixelType>::one(),
92139 NumericTraits<CostPixelType>::toPromote(ca(cost_upperleft + neighborPoint)));
92140
92141 if (neighborCost == NumericTraits<CostPixelType>::max()) neighborCost <<= 16;
92142
92143 if ((i & 1) == 0) {
92144
92145 neighborCost = WorkingPixelType(double(neighborCost) * 1.4);
92146 }
92147
92148 WorkingPixelType newNeighborCost = neighborCost + costToTop;
92149 if (newNeighborCost < neighborPreviousCost) {
92150
92151 (*costSoFar)[neighborPoint] = newNeighborCost;
92152 (*pathNextHop)[neighborPoint] = neighborArrayInverse[i];
92153 pq->push(neighborPoint);
92154 }
92155 }
92156 }
92157 else {
92158
92159
92160 UInt8 nextHop = (*pathNextHop)[top];
92161 while (nextHop != 0) {
92162 if (nextHop & 0x8) --top.y;
92163 if (nextHop & 0x4) ++top.y;
92164 if (nextHop & 0x2) --top.x;
92165 if (nextHop & 0x1) ++top.x;
92166 nextHop = (*pathNextHop)[top];
92167 if (nextHop != 0) result->push_back(top);
92168 }
92169 break;
92170 }
92171 }
92172
92173 delete pathNextHop;
92174 delete costSoFar;
92175 delete pq;
92176
92177 return result;
92178 };
92179
92180 template <class CostImageIterator, class CostAccessor>
92181 vector<Point2D> *minCostPath(triple<CostImageIterator, CostImageIterator, CostAccessor> cost,
92182 Point2D startingPoint, Point2D endingPoint) {
92183 return minCostPath(cost.first, cost.second, cost.third, startingPoint, endingPoint);
92184 };
92185
92186 }
92187 # 38 "mask.h" 2
92188
92189 # 1 "../include/vigra/contourcirculator.hxx" 1
92190 # 41 "../include/vigra/contourcirculator.hxx"
92191 # 1 "../include/vigra/pixelneighborhood.hxx" 1
92192 # 42 "../include/vigra/pixelneighborhood.hxx"
92193 namespace vigra {
92194 # 68 "../include/vigra/pixelneighborhood.hxx"
92195 enum AtImageBorder
92196 {
92197 NotAtBorder = 0,
92198 RightBorder = 1,
92199 LeftBorder = 2,
92200 TopBorder = 4,
92201 BottomBorder = 8,
92202 TopRightBorder = TopBorder | RightBorder,
92203 TopLeftBorder = TopBorder | LeftBorder,
92204 BottomLeftBorder = BottomBorder | LeftBorder,
92205 BottomRightBorder = BottomBorder | RightBorder
92206 };
92207 # 91 "../include/vigra/pixelneighborhood.hxx"
92208 inline AtImageBorder isAtImageBorder(int x, int y, int width, int height)
92209 {
92210 return static_cast<AtImageBorder>((x == 0
92211 ? LeftBorder
92212 : x == width-1
92213 ? RightBorder
92214 : NotAtBorder) |
92215 (y == 0
92216 ? TopBorder
92217 : y == height-1
92218 ? BottomBorder
92219 : NotAtBorder));
92220 }
92221 # 112 "../include/vigra/pixelneighborhood.hxx"
92222 namespace FourNeighborhood
92223 {
92224 # 145 "../include/vigra/pixelneighborhood.hxx"
92225 class NeighborCode
92226 {
92227 public:
92228 # 156 "../include/vigra/pixelneighborhood.hxx"
92229 enum Direction {
92230 Error = -1,
92231 East = 0,
92232 North,
92233 West,
92234 South,
92235 DirectionCount,
92236 CausalFirst = North,
92237 CausalLast = West,
92238 AntiCausalFirst = South,
92239 AntiCausalLast = East
92240 };
92241
92242 static unsigned int directionBit(Direction d)
92243 {
92244 static unsigned int b[] = {1 << (East + 1),
92245 1 << (North + 1),
92246 1 << (West + 1),
92247 1 << (South + 1)};
92248 return b[d];
92249 };
92250
92251
92252
92253 static unsigned int nearBorderDirectionCount(AtImageBorder b)
92254 {
92255 static unsigned int c[] = { 4, 3, 3, 0, 3, 2, 2, 0, 3, 2, 2};
92256 return c[b];
92257 }
92258
92259
92260
92261
92262 static Direction nearBorderDirections(AtImageBorder b, int index)
92263 {
92264 static Direction c[11][4] = {
92265 { East, North, West, South},
92266 { North, West, South, Error},
92267 { East, North, South, Error},
92268 { Error, Error, Error, Error},
92269 { East, West, South, Error},
92270 { West, South, Error, Error},
92271 { East, South, Error, Error},
92272 { Error, Error, Error, Error},
92273 { East, North, West, Error},
92274 { North, West, Error, Error},
92275 { East, North, Error, Error}
92276 };
92277 return c[b][index];
92278 }
92279
92280
92281
92282
92283 static Diff2D const & diff(Direction code)
92284 {
92285 static Diff2D d[] = {
92286 Diff2D(1, 0), Diff2D(0, -1), Diff2D(-1, 0), Diff2D(0, 1)
92287 };
92288 return d[code];
92289 }
92290
92291
92292
92293
92294 static Diff2D const & diff(int code) { return diff(static_cast<Direction>(code)); }
92295
92296
92297
92298
92299
92300 static Diff2D const & relativeDiff(Direction fromCode, Direction toCode)
92301 {
92302 static Diff2D d[][4] = {
92303 { Diff2D(0, 0), Diff2D(-1, -1), Diff2D(-2, 0), Diff2D(-1, 1) },
92304 { Diff2D(1, 1), Diff2D(0, 0), Diff2D(-1, 1), Diff2D(0, 2) },
92305 { Diff2D(2, 0), Diff2D(1, -1), Diff2D(0, 0), Diff2D(1, 1) },
92306 { Diff2D(1, -1), Diff2D(0, -2), Diff2D(-1, -1), Diff2D(0, 0) }
92307 };
92308
92309 return d[fromCode][toCode];
92310 }
92311
92312
92313
92314
92315 static Diff2D const & relativeDiff(int fromCode, int toCode)
92316 {
92317 return relativeDiff(static_cast<Direction>(fromCode), static_cast<Direction>(toCode));
92318 }
92319
92320
92321 static int dX(Direction code) { return diff(code).x; }
92322
92323 static int dY(Direction code) { return diff(code).y; }
92324
92325 static int dX(int code) { return diff(code).x; }
92326
92327 static int dY(int code) { return diff(code).y; }
92328
92329
92330
92331
92332
92333 static Direction code(Diff2D const & diff)
92334 {
92335 switch(diff.x)
92336 {
92337 case 0:
92338 {
92339 switch(diff.y)
92340 {
92341 case 1:
92342 return South;
92343 case -1:
92344 return North;
92345 default:
92346 return Error;
92347 }
92348 }
92349 case -1:
92350 {
92351 return (diff.y == 0) ?
92352 West :
92353 Error;
92354 }
92355 case 1:
92356 {
92357 return (diff.y == 0) ?
92358 East :
92359 Error;
92360 }
92361 }
92362 return Error;
92363 }
92364
92365
92366
92367
92368
92369 static bool isDiagonal(Direction) { return false; }
92370
92371 static Diff2D const & right() { return diff(East); }
92372 static Diff2D const & top() { return diff(North); }
92373 static Diff2D const & left() { return diff(West); }
92374 static Diff2D const & bottom() { return diff(South); }
92375
92376 static Diff2D const & east() { return diff(East); }
92377 static Diff2D const & north() { return diff(North); }
92378 static Diff2D const & west() { return diff(West); }
92379 static Diff2D const & south() { return diff(South); }
92380 };
92381
92382
92383
92384 typedef NeighborCode::Direction Direction;
92385
92386 static const Direction East = NeighborCode::East;
92387 static const Direction North = NeighborCode::North;
92388 static const Direction West = NeighborCode::West;
92389 static const Direction South = NeighborCode::South;
92390 static const Direction DirectionCount = NeighborCode::DirectionCount;
92391
92392 inline Diff2D const & east() { return NeighborCode::diff(East); }
92393 inline Diff2D const & north() { return NeighborCode::diff(North); }
92394 inline Diff2D const & west() { return NeighborCode::diff(West); }
92395 inline Diff2D const & south() { return NeighborCode::diff(South); }
92396
92397 }
92398
92399
92400
92401 typedef FourNeighborhood::NeighborCode FourNeighborCode;
92402 # 337 "../include/vigra/pixelneighborhood.hxx"
92403 namespace EightNeighborhood
92404 {
92405 # 369 "../include/vigra/pixelneighborhood.hxx"
92406 class NeighborCode
92407 {
92408 public:
92409 # 380 "../include/vigra/pixelneighborhood.hxx"
92410 enum Direction {
92411 Error = -1,
92412 East = 0,
92413 NorthEast,
92414 North,
92415 NorthWest,
92416 West,
92417 SouthWest,
92418 South,
92419 SouthEast,
92420 DirectionCount,
92421 CausalFirst = NorthEast,
92422 CausalLast = West,
92423 AntiCausalFirst = SouthWest,
92424 AntiCausalLast = East
92425 };
92426
92427 static unsigned int directionBit(Direction d)
92428 {
92429 static unsigned int b[] = {1 << (East + 1),
92430 1 << (NorthEast + 1),
92431 1 << (North + 1),
92432 1 << (NorthWest + 1),
92433 1 << (West + 1),
92434 1 << (SouthWest + 1),
92435 1 << (South + 1),
92436 1 << (SouthEast + 1)};
92437 return b[d];
92438 };
92439
92440
92441
92442 static unsigned int nearBorderDirectionCount(AtImageBorder b)
92443 {
92444 static unsigned int c[] = { 8, 5, 5, 0, 5, 3, 3, 0, 5, 3, 3};
92445 return c[b];
92446 }
92447
92448
92449
92450
92451 static Direction nearBorderDirections(AtImageBorder b, int index)
92452 {
92453 static Direction c[11][8] = {
92454 { East, NorthEast, North, NorthWest, West, SouthWest, South, SouthEast},
92455 { North, NorthWest, West, SouthWest, South, Error, Error, Error},
92456 { East, NorthEast, North, South, SouthEast, Error, Error, Error},
92457 { Error, Error, Error, Error, Error, Error, Error, Error},
92458 { East, West, SouthWest, South, SouthEast, Error, Error, Error},
92459 { West, SouthWest, South, Error, Error, Error, Error, Error},
92460 { East, South, SouthEast, Error, Error, Error, Error, Error},
92461 { Error, Error, Error, Error, Error, Error, Error, Error},
92462 { East, NorthEast, North, NorthWest, West, Error, Error, Error},
92463 { North, NorthWest, West, Error, Error, Error, Error, Error},
92464 { East, NorthEast, North, Error, Error, Error, Error, Error}
92465 };
92466 return c[b][index];
92467 }
92468
92469
92470
92471
92472 static Diff2D const & diff(Direction code)
92473 {
92474 static Diff2D d[] = {
92475 Diff2D(1, 0), Diff2D(1, -1), Diff2D(0, -1), Diff2D(-1, -1),
92476 Diff2D(-1, 0), Diff2D(-1, 1), Diff2D(0, 1), Diff2D(1, 1)
92477 };
92478 return d[code];
92479 }
92480
92481
92482
92483
92484 static Diff2D const & diff(int code) { return diff(static_cast<Direction>(code)); }
92485
92486
92487
92488
92489
92490 static Diff2D const & relativeDiff(Direction fromCode, Direction toCode)
92491 {
92492 static Diff2D d[][8] = {
92493 { Diff2D(0, 0), Diff2D(0, -1), Diff2D(-1, -1), Diff2D(-2, -1),
92494 Diff2D(-2, 0), Diff2D(-2, 1), Diff2D(-1, 1), Diff2D(0, 1) },
92495 { Diff2D(0, 1), Diff2D(0, 0), Diff2D(-1, 0), Diff2D(-2, 0),
92496 Diff2D(-2, 1), Diff2D(-2, 2), Diff2D(-1, 2), Diff2D(0, 2) },
92497 { Diff2D(1, 1), Diff2D(1, 0), Diff2D(0, 0), Diff2D(-1, 0),
92498 Diff2D(-1, 1), Diff2D(-1, 2), Diff2D(0, 2), Diff2D(1, 2) },
92499 { Diff2D(2, 1), Diff2D(2, 0), Diff2D(1, 0), Diff2D(0, 0),
92500 Diff2D(0, 1), Diff2D(0, 2), Diff2D(1, 2), Diff2D(2, 2) },
92501 { Diff2D(2, 0), Diff2D(2, -1), Diff2D(1, -1), Diff2D(0, -1),
92502 Diff2D(0, 0), Diff2D(0, 1), Diff2D(1, 1), Diff2D(2, 1) },
92503 { Diff2D(2, -1), Diff2D(2, -2), Diff2D(1, -2), Diff2D(0, -2),
92504 Diff2D(0, -1), Diff2D(0, 0), Diff2D(1, 0), Diff2D(2, 0) },
92505 { Diff2D(1, -1), Diff2D(1, -2), Diff2D(0, -2), Diff2D(-1, -2),
92506 Diff2D(-1, -1), Diff2D(-1, 0), Diff2D(0, 0), Diff2D(1, 0) },
92507 { Diff2D(0, -1), Diff2D(0, -2), Diff2D(-1, -2), Diff2D(-2, -2),
92508 Diff2D(-2, -1), Diff2D(-2, 0), Diff2D(-1, 0), Diff2D(0, 0) }
92509 };
92510
92511 return d[fromCode][toCode];
92512 }
92513
92514
92515
92516
92517 static Diff2D const & relativeDiff(int fromCode, int toCode)
92518 {
92519 return relativeDiff(static_cast<Direction>(fromCode), static_cast<Direction>(toCode));
92520 }
92521
92522
92523 static int dX(Direction code) { return diff(code).x; }
92524
92525 static int dY(Direction code) { return diff(code).y; }
92526
92527 static int dX(int code) { return diff(code).x; }
92528
92529 static int dY(int code) { return diff(code).y; }
92530
92531
92532
92533 static Direction code(FourNeighborhood::Direction d)
92534 { return static_cast<Direction>(2*d); }
92535
92536
92537
92538
92539
92540 static Direction code(Diff2D const & diff)
92541 {
92542 switch(diff.x)
92543 {
92544 case 0:
92545 {
92546 switch(diff.y)
92547 {
92548 case 1:
92549 return South;
92550 case -1:
92551 return North;
92552 default:
92553 return Error;
92554 }
92555 }
92556 case -1:
92557 {
92558 switch(diff.y)
92559 {
92560 case 0:
92561 return West;
92562 case 1:
92563 return SouthWest;
92564 case -1:
92565 return NorthWest;
92566 default:
92567 return Error;
92568 }
92569 }
92570 case 1:
92571 {
92572 switch(diff.y)
92573 {
92574 case 0:
92575 return East;
92576 case 1:
92577 return SouthEast;
92578 case -1:
92579 return NorthEast;
92580 default:
92581 return Error;
92582 }
92583 }
92584 }
92585 return Error;
92586 }
92587
92588
92589
92590
92591 static bool isDiagonal(Direction code) { return (code % 2) != 0; }
92592
92593 static Diff2D const & right() { return diff(East); }
92594 static Diff2D const & topRight() { return diff(NorthEast); }
92595 static Diff2D const & top() { return diff(North); }
92596 static Diff2D const & topLeft() { return diff(NorthWest); }
92597 static Diff2D const & left() { return diff(West); }
92598 static Diff2D const & bottomLeft() { return diff(SouthWest); }
92599 static Diff2D const & bottom() { return diff(South); }
92600 static Diff2D const & bottomRight() { return diff(SouthEast); }
92601
92602 static Diff2D const & east() { return diff(East); }
92603 static Diff2D const & northEast() { return diff(NorthEast); }
92604 static Diff2D const & north() { return diff(North); }
92605 static Diff2D const & northWest() { return diff(NorthWest); }
92606 static Diff2D const & west() { return diff(West); }
92607 static Diff2D const & southWest() { return diff(SouthWest); }
92608 static Diff2D const & south() { return diff(South); }
92609 static Diff2D const & southEast() { return diff(SouthEast); }
92610 };
92611
92612
92613
92614 typedef NeighborCode::Direction Direction;
92615
92616 static const Direction East = NeighborCode::East;
92617 static const Direction NorthEast = NeighborCode::NorthEast;
92618 static const Direction North = NeighborCode::North;
92619 static const Direction NorthWest = NeighborCode::NorthWest;
92620 static const Direction West = NeighborCode::West;
92621 static const Direction SouthWest = NeighborCode::SouthWest;
92622 static const Direction South = NeighborCode::South;
92623 static const Direction SouthEast = NeighborCode::SouthEast;
92624 static const Direction DirectionCount = NeighborCode::DirectionCount;
92625
92626 inline Diff2D const & east() { return NeighborCode::diff(East); }
92627 inline Diff2D const & northEast() { return NeighborCode::diff(NorthEast); }
92628 inline Diff2D const & north() { return NeighborCode::diff(North); }
92629 inline Diff2D const & northWest() { return NeighborCode::diff(NorthWest); }
92630 inline Diff2D const & west() { return NeighborCode::diff(West); }
92631 inline Diff2D const & southWest() { return NeighborCode::diff(SouthWest); }
92632 inline Diff2D const & south() { return NeighborCode::diff(South); }
92633 inline Diff2D const & southEast() { return NeighborCode::diff(SouthEast); }
92634
92635 }
92636
92637
92638
92639 typedef EightNeighborhood::NeighborCode EightNeighborCode;
92640 # 633 "../include/vigra/pixelneighborhood.hxx"
92641 template<class NEIGHBORCODE>
92642 class NeighborOffsetCirculator
92643 : public NEIGHBORCODE
92644 {
92645 public:
92646 typedef NEIGHBORCODE NeighborCode;
92647
92648
92649
92650 typedef typename NEIGHBORCODE::Direction Direction;
92651
92652
92653
92654 typedef Diff2D value_type;
92655
92656
92657
92658 typedef Diff2D const & reference;
92659
92660
92661
92662 typedef Diff2D const & index_reference;
92663
92664
92665
92666 typedef Diff2D const * pointer;
92667
92668
92669
92670 typedef int difference_type;
92671
92672
92673
92674 typedef random_access_circulator_tag iterator_category;
92675
92676 protected:
92677 Direction direction_;
92678
92679 public:
92680
92681
92682 NeighborOffsetCirculator(Direction dir = NEIGHBORCODE::East)
92683 : direction_(dir)
92684 {
92685 }
92686
92687
92688 NeighborOffsetCirculator & operator++()
92689 {
92690 direction_ = static_cast<Direction>((direction_+1) % NEIGHBORCODE::DirectionCount);
92691 return *this;
92692 }
92693
92694
92695 NeighborOffsetCirculator & operator--()
92696 {
92697 direction_ = static_cast<Direction>((direction_ + NEIGHBORCODE::DirectionCount-1) % NEIGHBORCODE::DirectionCount);
92698 return *this;
92699 }
92700
92701
92702 NeighborOffsetCirculator operator++(int)
92703 {
92704 NeighborOffsetCirculator ret(*this);
92705 operator++();
92706 return ret;
92707 }
92708
92709
92710 NeighborOffsetCirculator operator--(int)
92711 {
92712 NeighborOffsetCirculator ret(*this);
92713 operator--();
92714 return ret;
92715 }
92716
92717
92718 NeighborOffsetCirculator & operator+=(difference_type d)
92719 {
92720 direction_ = static_cast<Direction>((direction_ + d) % NEIGHBORCODE::DirectionCount);
92721 if(direction_ < 0)
92722 direction_ = static_cast<Direction>(direction_ + NEIGHBORCODE::DirectionCount);
92723 return *this;
92724 }
92725
92726
92727 NeighborOffsetCirculator & operator-=(difference_type d)
92728 {
92729 direction_ = static_cast<Direction>((direction_ - d) % NEIGHBORCODE::DirectionCount);
92730 if(direction_ < 0)
92731 direction_ = static_cast<Direction>(direction_ + NEIGHBORCODE::DirectionCount);
92732 return *this;
92733 }
92734
92735
92736 NeighborOffsetCirculator operator+(difference_type d) const
92737 {
92738 return NeighborOffsetCirculator(*this) += d;
92739 }
92740
92741
92742 NeighborOffsetCirculator operator-(difference_type d) const
92743 {
92744 return NeighborOffsetCirculator(*this) -= d;
92745 }
92746
92747
92748
92749
92750
92751 NeighborOffsetCirculator & turnRight()
92752 {
92753 direction_ = static_cast<Direction>((direction_ + NEIGHBORCODE::South) % NEIGHBORCODE::DirectionCount);
92754 return *this;
92755 }
92756
92757
92758
92759
92760
92761 NeighborOffsetCirculator & turnLeft()
92762 {
92763 direction_ = static_cast<Direction>((direction_ + NEIGHBORCODE::North) % NEIGHBORCODE::DirectionCount);
92764 return *this;
92765 }
92766
92767
92768
92769
92770
92771 NeighborOffsetCirculator & turnRound()
92772 {
92773 direction_ = opposite();
92774 return *this;
92775 }
92776
92777
92778
92779 NeighborOffsetCirculator & turnTo(Direction d)
92780 {
92781 direction_ = d;
92782 return *this;
92783 }
92784
92785
92786 bool operator==(NeighborOffsetCirculator const & o) const
92787 {
92788 return direction_ == o.direction_;
92789 }
92790
92791
92792 bool operator!=(NeighborOffsetCirculator const & o) const
92793 {
92794 return direction_ != o.direction_;
92795 }
92796
92797
92798 difference_type operator-(NeighborOffsetCirculator const & o) const
92799 {
92800 return direction_ - o.direction_;
92801 }
92802
92803
92804 reference operator*() const
92805 {
92806 return diff();
92807 }
92808
92809
92810 index_reference operator[](difference_type d) const
92811 {
92812 return NEIGHBORCODE::diff(direction(d));
92813 }
92814
92815
92816 pointer operator->() const
92817 {
92818 return &diff();
92819 }
92820
92821
92822
92823 Diff2D const & diff() const
92824 {
92825 return NEIGHBORCODE::diff(direction_);
92826 }
92827
92828
92829
92830 static Diff2D const & diff(Direction dir)
92831 {
92832 return NEIGHBORCODE::diff(dir);
92833 }
92834
92835
92836
92837
92838 Diff2D const &relativeDiff(difference_type offset) const
92839 {
92840 Direction toDir = static_cast<Direction>((direction_ + offset) % NEIGHBORCODE::DirectionCount);
92841 if(toDir < 0)
92842 toDir = static_cast<Direction>(toDir + NEIGHBORCODE::DirectionCount);
92843 return NEIGHBORCODE::relativeDiff(direction_, toDir);
92844 }
92845
92846
92847 int dX() const
92848 {
92849 return NEIGHBORCODE::dX(direction_);
92850 }
92851
92852
92853 int dY() const
92854 {
92855 return NEIGHBORCODE::dY(direction_);
92856 }
92857
92858
92859
92860 bool isDiagonal() const
92861 {
92862 return NEIGHBORCODE::isDiagonal(direction_);
92863 }
92864
92865
92866
92867 Direction direction() const
92868 {
92869 return direction_;
92870 }
92871
92872
92873
92874 unsigned int directionBit() const
92875 {
92876 return NEIGHBORCODE::directionBit(direction_);
92877 }
92878
92879
92880
92881 Direction opposite() const
92882 {
92883 return static_cast<Direction>((direction_ + NEIGHBORCODE::West) % NEIGHBORCODE::DirectionCount);
92884 }
92885
92886
92887
92888 unsigned int oppositeDirectionBit() const
92889 {
92890 return NEIGHBORCODE::directionBit(opposite());
92891 }
92892
92893
92894
92895 Direction direction(difference_type offset) const
92896 {
92897 int result = (direction_ + offset) % NEIGHBORCODE::DirectionCount;
92898 if(result < 0)
92899 result += NEIGHBORCODE::DirectionCount;
92900 return static_cast<Direction>(result);
92901 }
92902 };
92903
92904
92905
92906 typedef NeighborOffsetCirculator<EightNeighborCode> EightNeighborOffsetCirculator;
92907
92908
92909
92910 typedef NeighborOffsetCirculator<FourNeighborCode> FourNeighborOffsetCirculator;
92911 # 958 "../include/vigra/pixelneighborhood.hxx"
92912 template <class IMAGEITERATOR, class NEIGHBORCODE>
92913 class NeighborhoodCirculator : private IMAGEITERATOR
92914 {
92915 typedef NeighborOffsetCirculator<NEIGHBORCODE> NEIGHBOROFFSETCIRCULATOR;
92916
92917 public:
92918
92919
92920 typedef IMAGEITERATOR base_type;
92921
92922
92923
92924 typedef NEIGHBORCODE NeighborCode;
92925
92926
92927
92928 typedef typename IMAGEITERATOR::value_type value_type;
92929
92930
92931
92932 typedef typename NEIGHBORCODE::Direction Direction;
92933
92934
92935
92936 typedef typename IMAGEITERATOR::reference reference;
92937
92938
92939
92940 typedef typename IMAGEITERATOR::index_reference index_reference;
92941
92942
92943
92944 typedef typename IMAGEITERATOR::pointer pointer;
92945
92946
92947
92948 typedef typename NEIGHBOROFFSETCIRCULATOR::difference_type difference_type;
92949
92950
92951
92952 typedef typename NEIGHBOROFFSETCIRCULATOR::iterator_category iterator_category;
92953
92954
92955
92956
92957 NeighborhoodCirculator(IMAGEITERATOR const & center = IMAGEITERATOR(),
92958 Direction d = NEIGHBOROFFSETCIRCULATOR::East)
92959 : IMAGEITERATOR(center), neighborCode_(d)
92960 {
92961 IMAGEITERATOR::operator+=(neighborCode_.diff());
92962 }
92963
92964
92965 NeighborhoodCirculator & operator++()
92966 {
92967 return operator+=(1);
92968 }
92969
92970
92971 NeighborhoodCirculator operator++(int)
92972 {
92973 NeighborhoodCirculator ret(*this);
92974 operator++();
92975 return ret;
92976 }
92977
92978
92979 NeighborhoodCirculator & operator--()
92980 {
92981 return operator+=(-1);
92982 }
92983
92984
92985 NeighborhoodCirculator operator--(int)
92986 {
92987 NeighborhoodCirculator ret(*this);
92988 operator--();
92989 return ret;
92990 }
92991
92992
92993 NeighborhoodCirculator & operator+=(difference_type d)
92994 {
92995 IMAGEITERATOR::operator+=(neighborCode_.relativeDiff(d));
92996 neighborCode_+= d;
92997 return *this;
92998 }
92999
93000
93001 NeighborhoodCirculator & operator-=(difference_type d)
93002 {
93003 return operator+=(-d);
93004 }
93005
93006
93007 NeighborhoodCirculator operator+(difference_type d) const
93008 {
93009 NeighborhoodCirculator result(*this);
93010 result+= d;
93011 return result;
93012 }
93013
93014
93015 NeighborhoodCirculator operator-(difference_type d) const
93016 {
93017 NeighborhoodCirculator result(*this);
93018 result-= d;
93019 return result;
93020 }
93021
93022
93023
93024
93025
93026 NeighborhoodCirculator & turnRight()
93027 {
93028 Direction oldDirection = neighborCode_.direction();
93029 neighborCode_.turnRight();
93030 IMAGEITERATOR::operator+=(NeighborCode::relativeDiff
93031 (oldDirection, neighborCode_.direction()));
93032 return *this;
93033 }
93034
93035
93036
93037
93038
93039 NeighborhoodCirculator & turnLeft()
93040 {
93041 Direction oldDirection = neighborCode_.direction();
93042 neighborCode_.turnLeft();
93043 IMAGEITERATOR::operator+=(NeighborCode::relativeDiff
93044 (oldDirection, neighborCode_.direction()));
93045 return *this;
93046 }
93047
93048
93049
93050
93051
93052 NeighborhoodCirculator & turnRound()
93053 {
93054 Direction oldDirection = neighborCode_.direction();
93055 neighborCode_.turnRound();
93056 IMAGEITERATOR::operator+=(NeighborCode::relativeDiff
93057 (oldDirection, neighborCode_.direction()));
93058 return *this;
93059 }
93060
93061
93062
93063 NeighborhoodCirculator & turnTo(Direction d)
93064 {
93065 Direction oldDirection = neighborCode_.direction();
93066 neighborCode_.turnTo(d);
93067 IMAGEITERATOR::operator+=(NeighborCode::relativeDiff
93068 (oldDirection, neighborCode_.direction()));
93069 return *this;
93070 }
93071
93072
93073
93074
93075 NeighborhoodCirculator & moveCenterToNeighbor()
93076 {
93077 IMAGEITERATOR::operator+=(neighborCode_.diff());
93078 return *this;
93079 }
93080
93081
93082
93083
93084
93085 NeighborhoodCirculator & swapCenterNeighbor()
93086 {
93087 neighborCode_.turnRound();
93088 IMAGEITERATOR::operator+=(neighborCode_.diff());
93089 return *this;
93090 }
93091
93092
93093 bool operator==(NeighborhoodCirculator const & rhs) const
93094 {
93095 return neighborCode_ == rhs.neighborCode_ &&
93096 IMAGEITERATOR::operator==(rhs);
93097 }
93098
93099
93100 bool operator!=(NeighborhoodCirculator const & rhs) const
93101 {
93102 return neighborCode_ != rhs.neighborCode_ ||
93103 IMAGEITERATOR::operator!=(rhs);
93104 }
93105
93106
93107 difference_type operator-(NeighborhoodCirculator const & rhs) const
93108 {
93109 return neighborCode_ - rhs.neighborCode_;
93110 }
93111
93112
93113 reference operator*() const
93114 {
93115 return IMAGEITERATOR::operator*();
93116 }
93117
93118
93119 index_reference operator[](difference_type d) const
93120 {
93121 return IMAGEITERATOR::operator[](neighborCode_.relativeDiff(d));
93122 }
93123
93124
93125 pointer operator->() const
93126 {
93127 return IMAGEITERATOR::operator->();
93128 }
93129
93130
93131 base_type const & base() const
93132 {
93133 return *this;
93134 }
93135
93136
93137 base_type center() const
93138 {
93139 return (base_type)*this - neighborCode_.diff();
93140 }
93141
93142
93143 Direction direction() const
93144 {
93145 return neighborCode_.direction();
93146 }
93147
93148
93149 unsigned int directionBit() const
93150 {
93151 return neighborCode_.directionBit();
93152 }
93153
93154
93155 Diff2D const & diff() const
93156 {
93157 return neighborCode_.diff();
93158 }
93159
93160
93161 bool isDiagonal() const
93162 {
93163 return neighborCode_.isDiagonal();
93164 }
93165
93166 private:
93167 NEIGHBOROFFSETCIRCULATOR neighborCode_;
93168 };
93169 # 1264 "../include/vigra/pixelneighborhood.hxx"
93170 template <class IMAGEITERATOR, class NEIGHBORCODE>
93171 class RestrictedNeighborhoodCirculator
93172 : private NeighborhoodCirculator<IMAGEITERATOR, NEIGHBORCODE>
93173 {
93174 typedef NeighborhoodCirculator<IMAGEITERATOR, NEIGHBORCODE> BaseType;
93175
93176 public:
93177
93178
93179 typedef IMAGEITERATOR base_type;
93180
93181
93182
93183 typedef NEIGHBORCODE NeighborCode;
93184
93185
93186
93187 typedef typename BaseType::value_type value_type;
93188
93189
93190
93191 typedef typename BaseType::Direction Direction;
93192
93193
93194
93195 typedef typename BaseType::reference reference;
93196
93197
93198
93199 typedef typename BaseType::index_reference index_reference;
93200
93201
93202
93203 typedef typename BaseType::pointer pointer;
93204
93205
93206
93207 typedef typename BaseType::difference_type difference_type;
93208
93209
93210
93211 typedef typename BaseType::iterator_category iterator_category;
93212
93213
93214
93215
93216 RestrictedNeighborhoodCirculator(IMAGEITERATOR const & center = IMAGEITERATOR(),
93217 AtImageBorder atBorder = NotAtBorder)
93218 : BaseType(center, NEIGHBORCODE::nearBorderDirections(atBorder, 0)),
93219 whichBorder_(atBorder),
93220 count_(NEIGHBORCODE::nearBorderDirectionCount(atBorder)),
93221 current_(0)
93222 {}
93223
93224
93225 RestrictedNeighborhoodCirculator & operator++()
93226 {
93227 return operator+=(1);
93228 }
93229
93230
93231 RestrictedNeighborhoodCirculator operator++(int)
93232 {
93233 RestrictedNeighborhoodCirculator ret(*this);
93234 operator++();
93235 return ret;
93236 }
93237
93238
93239 RestrictedNeighborhoodCirculator & operator--()
93240 {
93241 return operator+=(-1);
93242 }
93243
93244
93245 RestrictedNeighborhoodCirculator operator--(int)
93246 {
93247 RestrictedNeighborhoodCirculator ret(*this);
93248 operator--();
93249 return ret;
93250 }
93251
93252
93253 RestrictedNeighborhoodCirculator & operator+=(difference_type d)
93254 {
93255 current_ = static_cast<Direction>((current_ + count_ + d) % count_);
93256 BaseType::turnTo(NEIGHBORCODE::nearBorderDirections(whichBorder_, current_));
93257 return *this;
93258 }
93259
93260
93261 RestrictedNeighborhoodCirculator & operator-=(difference_type d)
93262 {
93263 return operator+=(-d);
93264 }
93265
93266
93267 RestrictedNeighborhoodCirculator operator+(difference_type d) const
93268 {
93269 RestrictedNeighborhoodCirculator result(*this);
93270 result+= d;
93271 return result;
93272 }
93273
93274
93275 RestrictedNeighborhoodCirculator operator-(difference_type d) const
93276 {
93277 RestrictedNeighborhoodCirculator result(*this);
93278 result-= d;
93279 return result;
93280 }
93281
93282
93283 bool operator==(RestrictedNeighborhoodCirculator const & rhs) const
93284 {
93285 return current_ == rhs.current_;
93286 }
93287
93288
93289 bool operator!=(RestrictedNeighborhoodCirculator const & rhs) const
93290 {
93291 return current_ != rhs.current_;
93292 }
93293
93294
93295 difference_type operator-(RestrictedNeighborhoodCirculator const & rhs) const
93296 {
93297 return (current_ - rhs.current_) % count_;
93298 }
93299
93300
93301 reference operator*() const
93302 {
93303 return BaseType::operator*();
93304 }
93305
93306
93307 pointer operator->() const
93308 {
93309 return BaseType::operator->();
93310 }
93311
93312
93313 base_type const & base() const
93314 {
93315 return BaseType::base();
93316 }
93317
93318
93319 base_type center() const
93320 {
93321 return BaseType::center();
93322 }
93323
93324
93325 Direction direction() const
93326 {
93327 return BaseType::direction();
93328 }
93329
93330
93331 unsigned int directionBit() const
93332 {
93333 return BaseType::directionBit();
93334 }
93335
93336
93337 Diff2D const & diff() const
93338 {
93339 return BaseType::diff();
93340 }
93341
93342
93343 bool isDiagonal() const
93344 {
93345 return BaseType::isDiagonal();
93346 }
93347
93348 private:
93349 AtImageBorder whichBorder_;
93350 signed char count_, current_;
93351 };
93352
93353
93354
93355 }
93356 # 42 "../include/vigra/contourcirculator.hxx" 2
93357
93358 namespace vigra
93359 {
93360 # 93 "../include/vigra/contourcirculator.hxx"
93361 template <class IMAGEITERATOR>
93362 class CrackContourCirculator
93363 {
93364 typedef NeighborhoodCirculator<IMAGEITERATOR, EightNeighborCode>
93365 NEIGHBORHOODCIRCULATOR;
93366 typedef typename IMAGEITERATOR::value_type label_type;
93367
93368 protected:
93369 NEIGHBORHOODCIRCULATOR neighborCirc_;
93370 label_type label_;
93371 Point2D pos_;
93372
93373 CrackContourCirculator(NEIGHBORHOODCIRCULATOR const & circ)
93374 : neighborCirc_(circ),
93375 label_(*(circ.center())),
93376 pos_(0, 0)
93377 {}
93378
93379 public:
93380
93381
93382 typedef Point2D value_type;
93383
93384
93385
93386 typedef Point2D const & reference;
93387
93388
93389
93390 typedef Point2D const * pointer;
93391
93392
93393
93394 typedef forward_circulator_tag iterator_category;
93395 # 139 "../include/vigra/contourcirculator.hxx"
93396 CrackContourCirculator(IMAGEITERATOR const & in_the_region,
93397 vigra::FourNeighborCode::Direction dir = vigra::FourNeighborCode::West)
93398 : neighborCirc_(in_the_region, EightNeighborCode::code(dir)),
93399 label_(*in_the_region),
93400 pos_(0, 0)
93401 {
93402 neighborCirc_.turnLeft();
93403 }
93404
93405
93406
93407 CrackContourCirculator & operator++()
93408 {
93409 pos_ += neighborCirc_.diff();
93410
93411 neighborCirc_--;
93412
93413 if(*neighborCirc_ == label_)
93414 {
93415 neighborCirc_.moveCenterToNeighbor();
93416 --neighborCirc_;
93417 }
93418 else
93419 {
93420 neighborCirc_.moveCenterToNeighbor();
93421 neighborCirc_ += 3;
93422 if(*neighborCirc_ == label_)
93423 {
93424 neighborCirc_.moveCenterToNeighbor();
93425 neighborCirc_.turnRight();
93426 }
93427 else
93428 {
93429 neighborCirc_.moveCenterToNeighbor();
93430 neighborCirc_.turnLeft();
93431 neighborCirc_.moveCenterToNeighbor();
93432 neighborCirc_.turnRight();
93433 }
93434 }
93435
93436 return *this;
93437 }
93438
93439
93440
93441 CrackContourCirculator operator++(int)
93442 {
93443 CrackContourCirculator ret(*this);
93444 ++(*this);
93445 return ret;
93446 }
93447
93448
93449
93450 bool operator==(CrackContourCirculator const & o) const
93451 {
93452 return neighborCirc_ == o.neighborCirc_;
93453 }
93454
93455
93456
93457 bool operator!=(CrackContourCirculator const & o) const
93458 {
93459 return neighborCirc_ != o.neighborCirc_;
93460 }
93461
93462
93463
93464
93465 reference pos() const
93466 { return pos_; }
93467
93468
93469
93470 reference operator*() const
93471 { return pos_; }
93472
93473
93474
93475 pointer operator->() const
93476 { return &pos_; }
93477
93478
93479
93480
93481
93482
93483 IMAGEITERATOR outerPixel() const
93484 { return NEIGHBORHOODCIRCULATOR(neighborCirc_).turnRight().base(); }
93485
93486
93487
93488
93489 Diff2D const & diff() const
93490 { return neighborCirc_.diff(); }
93491 };
93492
93493
93494
93495 }
93496 # 40 "mask.h" 2
93497
93498 # 1 "../include/vigra/functorexpression.hxx" 1
93499 # 337 "../include/vigra/functorexpression.hxx"
93500 # 1 "../include/vigra/functortraits.hxx" 1
93501 # 338 "../include/vigra/functorexpression.hxx" 2
93502
93503
93504 namespace vigra {
93505
93506 namespace functor {
93507 # 351 "../include/vigra/functorexpression.hxx"
93508 struct ErrorType;
93509
93510 template <class Operation>
93511 struct ResultTraits0;
93512
93513 template <class Operation, class T1>
93514 struct ResultTraits1
93515 {
93516 typedef T1 Res;
93517 };
93518
93519 template <class Operation, class T1, class T2>
93520 struct ResultTraits2
93521 {
93522 typedef typename PromoteTraits<T1, T2>::Promote Res;
93523 };
93524
93525 template <class Operation, class T1, class T2, class T3>
93526 struct ResultTraits3
93527 {
93528 typedef typename PromoteTraits<T1, T2>::Promote P1;
93529 typedef typename PromoteTraits<P1, T3>::Promote Res;
93530 };
93531
93532 template <class EXPR>
93533 struct UnaryFunctor
93534 {
93535 UnaryFunctor(EXPR const & e)
93536 : expr_(e)
93537 {}
93538
93539
93540 typename ResultTraits0<EXPR>::Res
93541 operator()() const
93542 {
93543 return expr_();
93544 }
93545
93546 template <class T1>
93547 typename ResultTraits1<EXPR, T1>::Res
93548 operator()(T1 const & v) const
93549 {
93550 return expr_(v);
93551 }
93552
93553 template <class T1, class T2>
93554 typename ResultTraits2<EXPR, T1, T2>::Res
93555 operator()(T1 const & v1, T2 const & v2) const
93556 {
93557 return expr_(v1, v2);
93558 }
93559
93560 template <class T1, class T2, class T3>
93561 typename ResultTraits3<EXPR, T1, T2, T3>::Res
93562 operator()(T1 const & v1, T2 const & v2, T3 const & v3) const
93563 {
93564 return expr_(v1, v2, v3);
93565 }
93566
93567 protected:
93568 EXPR expr_;
93569 };
93570
93571 template <class Expr>
93572 struct ResultTraits0<UnaryFunctor<Expr> >
93573 {
93574 typedef typename ResultTraits0<Expr>::Res Res;
93575 };
93576
93577 template <class Expr, class T1>
93578 struct ResultTraits1<UnaryFunctor<Expr>, T1>
93579 {
93580 typedef typename ResultTraits1<Expr, T1>::Res Res;
93581 };
93582
93583 template <class Expr, class T1, class T2>
93584 struct ResultTraits2<UnaryFunctor<Expr>, T1, T2>
93585 {
93586 typedef typename ResultTraits2<Expr, T1, T2>::Res Res;
93587 };
93588
93589 template <class Expr, class T1, class T2, class T3>
93590 struct ResultTraits3<UnaryFunctor<Expr>, T1, T2, T3>
93591 {
93592 typedef typename ResultTraits3<Expr, T1, T2, T3>::Res Res;
93593 };
93594
93595
93596
93597
93598
93599
93600
93601 struct ArgumentFunctor1;
93602 struct ArgumentFunctor2;
93603 struct ArgumentFunctor3;
93604
93605 template <>
93606 struct UnaryFunctor<ArgumentFunctor1>
93607 {
93608 UnaryFunctor()
93609 {}
93610
93611 template <class T1>
93612 T1 const & operator()(T1 const & v1) const
93613 {
93614 return v1;
93615 }
93616
93617 template <class T1, class T2>
93618 T1 const & operator()(T1 const & v1, T2 const &) const
93619 {
93620 return v1;
93621 }
93622
93623 template <class T1, class T2, class T3>
93624 T1 const & operator()(T1 const & v1, T2 const &, T3 const &) const
93625 {
93626 return v1;
93627 }
93628 };
93629
93630 template <>
93631 struct ResultTraits0<UnaryFunctor<ArgumentFunctor1> >
93632 {
93633 typedef ErrorType Res;
93634 };
93635
93636 template <class T1>
93637 struct ResultTraits1<UnaryFunctor<ArgumentFunctor1>, T1>
93638 {
93639 typedef T1 Res;
93640 };
93641
93642 template <class T1, class T2>
93643 struct ResultTraits2<UnaryFunctor<ArgumentFunctor1>, T1, T2>
93644 {
93645 typedef T1 Res;
93646 };
93647
93648 template <class T1, class T2, class T3>
93649 struct ResultTraits3<UnaryFunctor<ArgumentFunctor1>, T1, T2, T3>
93650 {
93651 typedef T1 Res;
93652 };
93653
93654
93655
93656 inline
93657 UnaryFunctor<ArgumentFunctor1>
93658 Arg1()
93659 {
93660 return UnaryFunctor<ArgumentFunctor1>();
93661 }
93662
93663
93664
93665 template <>
93666 struct UnaryFunctor<ArgumentFunctor2>
93667 {
93668 UnaryFunctor()
93669 {}
93670
93671 template <class T1, class T2>
93672 T2 const & operator()(T1 const &, T2 const & v2) const
93673 {
93674 return v2;
93675 }
93676
93677 template <class T1, class T2, class T3>
93678 T2 const & operator()(T1 const &, T2 const & v2, T3 const &) const
93679 {
93680 return v2;
93681 }
93682 };
93683
93684 template <>
93685 struct ResultTraits0<UnaryFunctor<ArgumentFunctor2> >
93686 {
93687 typedef ErrorType Res;
93688 };
93689
93690 template <class T1>
93691 struct ResultTraits1<UnaryFunctor<ArgumentFunctor2>, T1>
93692 {
93693 typedef ErrorType Res;
93694 };
93695
93696 template <class T1, class T2>
93697 struct ResultTraits2<UnaryFunctor<ArgumentFunctor2>, T1, T2>
93698 {
93699 typedef T2 Res;
93700 };
93701
93702 template <class T1, class T2, class T3>
93703 struct ResultTraits3<UnaryFunctor<ArgumentFunctor2>, T1, T2, T3>
93704 {
93705 typedef T2 Res;
93706 };
93707
93708
93709
93710 inline
93711 UnaryFunctor<ArgumentFunctor2>
93712 Arg2()
93713 {
93714 return UnaryFunctor<ArgumentFunctor2>();
93715 }
93716
93717
93718
93719 template <>
93720 struct UnaryFunctor<ArgumentFunctor3>
93721 {
93722 UnaryFunctor()
93723 {}
93724
93725 template <class T1, class T2, class T3>
93726 T3 const & operator()(T1 const &, T2 const &, T3 const & v3) const
93727 {
93728 return v3;
93729 }
93730 };
93731
93732 template <>
93733 struct ResultTraits0<UnaryFunctor<ArgumentFunctor3> >
93734 {
93735 typedef ErrorType Res;
93736 };
93737
93738 template <class T1>
93739 struct ResultTraits1<UnaryFunctor<ArgumentFunctor3>, T1>
93740 {
93741 typedef ErrorType Res;
93742 };
93743
93744 template <class T1, class T2>
93745 struct ResultTraits2<UnaryFunctor<ArgumentFunctor3>, T1, T2>
93746 {
93747 typedef ErrorType Res;
93748 };
93749
93750 template <class T1, class T2, class T3>
93751 struct ResultTraits3<UnaryFunctor<ArgumentFunctor3>, T1, T2, T3>
93752 {
93753 typedef T3 Res;
93754 };
93755
93756
93757
93758 inline
93759 UnaryFunctor<ArgumentFunctor3>
93760 Arg3()
93761 {
93762 return UnaryFunctor<ArgumentFunctor3>();
93763 }
93764
93765
93766
93767
93768
93769
93770
93771 template <class T>
93772 struct ParameterFunctor
93773 {
93774 ParameterFunctor(T v)
93775 : value_(v)
93776 {}
93777
93778 T const & operator()() const
93779 {
93780 return value_;
93781 }
93782
93783 template <class U1>
93784 T const & operator()(U1 const &) const
93785 {
93786 return value_;
93787 }
93788
93789 template <class U1, class U2>
93790 T const & operator()(U1 const &, U2 const &) const
93791 {
93792 return value_;
93793 }
93794
93795 template <class U1, class U2, class U3>
93796 T const & operator()(U1 const &, U2 const &, U3 const &) const
93797 {
93798 return value_;
93799 }
93800
93801 protected:
93802 T value_;
93803 };
93804
93805 template <class T>
93806 struct ResultTraits0<ParameterFunctor<T> >
93807 {
93808 typedef T Res;
93809 };
93810
93811 template <class T, class T1>
93812 struct ResultTraits1<ParameterFunctor<T>, T1>
93813 {
93814 typedef T Res;
93815 };
93816
93817 template <class T, class T1, class T2>
93818 struct ResultTraits2<ParameterFunctor<T>, T1, T2>
93819 {
93820 typedef T Res;
93821 };
93822
93823 template <class T, class T1, class T2, class T3>
93824 struct ResultTraits3<ParameterFunctor<T>, T1, T2, T3>
93825 {
93826 typedef T Res;
93827 };
93828
93829 template <class T>
93830 UnaryFunctor<ParameterFunctor<T> >
93831 Param(T const & v)
93832 {
93833 ParameterFunctor<T> fv(v);
93834 return UnaryFunctor<ParameterFunctor<T> >(fv);
93835 }
93836 # 687 "../include/vigra/functorexpression.hxx"
93837 template <class EXPR>
93838 class UnaryAnalyser
93839 {
93840 public:
93841 UnaryAnalyser(EXPR const & e)
93842 : expr_(e)
93843 {}
93844
93845 void operator()() const
93846 {
93847 expr_();
93848 }
93849
93850 template <class T1>
93851 void operator()(T1 const & v) const
93852 {
93853 expr_(v);
93854 }
93855
93856 template <class T1, class T2>
93857 void operator()(T1 const & v1, T2 const & v2) const
93858 {
93859 expr_(v1, v2);
93860 }
93861
93862 template <class T1, class T2, class T3>
93863 void operator()(T1 const & v1, T2 const & v2, T3 const & v3) const
93864 {
93865 expr_(v1, v2, v3);
93866 }
93867 protected:
93868
93869 EXPR expr_;
93870 };
93871
93872
93873
93874
93875
93876
93877
93878 template <class T>
93879 struct VarFunctor;
93880
93881 template <class T>
93882 struct UnaryFunctor<VarFunctor<T> >;
93883 # 779 "../include/vigra/functorexpression.hxx"
93884 template <class V, class EXPR> struct AssignmentFunctor_assign { AssignmentFunctor_assign(UnaryFunctor<VarFunctor<V> > v, UnaryFunctor<EXPR> const & e) : value_(v.value_), expr_(e) {} V & operator()() const { const_cast<V &>(value_) = expr_(); return const_cast<V &>(value_); } template <class T1> V & operator()(T1 const & v1) const { const_cast<V &>(value_) = expr_(v1); return const_cast<V &>(value_); } template <class T1, class T2> V & operator()(T1 const & v1, T2 const & v2) const { const_cast<V &>(value_) = expr_(v1, v2); return const_cast<V &>(value_); } template <class T1, class T2, class T3> V & operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { const_cast<V &>(value_) = expr_(v1, v2, v3); return const_cast<V &>(value_); } private: V & value_; UnaryFunctor<EXPR> expr_; };
93885 template <class V, class EXPR> struct AssignmentFunctor_add { AssignmentFunctor_add(UnaryFunctor<VarFunctor<V> > v, UnaryFunctor<EXPR> const & e) : value_(v.value_), expr_(e) {} V & operator()() const { const_cast<V &>(value_) += expr_(); return const_cast<V &>(value_); } template <class T1> V & operator()(T1 const & v1) const { const_cast<V &>(value_) += expr_(v1); return const_cast<V &>(value_); } template <class T1, class T2> V & operator()(T1 const & v1, T2 const & v2) const { const_cast<V &>(value_) += expr_(v1, v2); return const_cast<V &>(value_); } template <class T1, class T2, class T3> V & operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { const_cast<V &>(value_) += expr_(v1, v2, v3); return const_cast<V &>(value_); } private: V & value_; UnaryFunctor<EXPR> expr_; };
93886 template <class V, class EXPR> struct AssignmentFunctor_subtract { AssignmentFunctor_subtract(UnaryFunctor<VarFunctor<V> > v, UnaryFunctor<EXPR> const & e) : value_(v.value_), expr_(e) {} V & operator()() const { const_cast<V &>(value_) -= expr_(); return const_cast<V &>(value_); } template <class T1> V & operator()(T1 const & v1) const { const_cast<V &>(value_) -= expr_(v1); return const_cast<V &>(value_); } template <class T1, class T2> V & operator()(T1 const & v1, T2 const & v2) const { const_cast<V &>(value_) -= expr_(v1, v2); return const_cast<V &>(value_); } template <class T1, class T2, class T3> V & operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { const_cast<V &>(value_) -= expr_(v1, v2, v3); return const_cast<V &>(value_); } private: V & value_; UnaryFunctor<EXPR> expr_; };
93887 template <class V, class EXPR> struct AssignmentFunctor_multiply { AssignmentFunctor_multiply(UnaryFunctor<VarFunctor<V> > v, UnaryFunctor<EXPR> const & e) : value_(v.value_), expr_(e) {} V & operator()() const { const_cast<V &>(value_) *= expr_(); return const_cast<V &>(value_); } template <class T1> V & operator()(T1 const & v1) const { const_cast<V &>(value_) *= expr_(v1); return const_cast<V &>(value_); } template <class T1, class T2> V & operator()(T1 const & v1, T2 const & v2) const { const_cast<V &>(value_) *= expr_(v1, v2); return const_cast<V &>(value_); } template <class T1, class T2, class T3> V & operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { const_cast<V &>(value_) *= expr_(v1, v2, v3); return const_cast<V &>(value_); } private: V & value_; UnaryFunctor<EXPR> expr_; };
93888 template <class V, class EXPR> struct AssignmentFunctor_divide { AssignmentFunctor_divide(UnaryFunctor<VarFunctor<V> > v, UnaryFunctor<EXPR> const & e) : value_(v.value_), expr_(e) {} V & operator()() const { const_cast<V &>(value_) /= expr_(); return const_cast<V &>(value_); } template <class T1> V & operator()(T1 const & v1) const { const_cast<V &>(value_) /= expr_(v1); return const_cast<V &>(value_); } template <class T1, class T2> V & operator()(T1 const & v1, T2 const & v2) const { const_cast<V &>(value_) /= expr_(v1, v2); return const_cast<V &>(value_); } template <class T1, class T2, class T3> V & operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { const_cast<V &>(value_) /= expr_(v1, v2, v3); return const_cast<V &>(value_); } private: V & value_; UnaryFunctor<EXPR> expr_; };
93889 # 793 "../include/vigra/functorexpression.hxx"
93890 template <class T>
93891 struct UnaryFunctor<VarFunctor<T> >
93892 {
93893 typedef T Res;
93894
93895 UnaryFunctor(T & v)
93896 : value_(v)
93897 {}
93898
93899 template <class EXPR>
93900 UnaryAnalyser< AssignmentFunctor_assign<T, UnaryFunctor<EXPR> > >
93901 operator=(UnaryFunctor<EXPR> const & e)
93902 {
93903 AssignmentFunctor_assign<T, UnaryFunctor<EXPR> > va(*this, e);
93904 return UnaryAnalyser< AssignmentFunctor_assign<T, UnaryFunctor<EXPR> > >(va);
93905 }
93906
93907 template <class EXPR>
93908 UnaryAnalyser< AssignmentFunctor_add<T, UnaryFunctor<EXPR> > >
93909 operator+=(UnaryFunctor<EXPR> const & e)
93910 {
93911 AssignmentFunctor_add<T, UnaryFunctor<EXPR> > va(*this, e);
93912 return UnaryAnalyser< AssignmentFunctor_add<T, UnaryFunctor<EXPR> > >(va);
93913 }
93914
93915 template <class EXPR>
93916 UnaryAnalyser< AssignmentFunctor_subtract<T, UnaryFunctor<EXPR> > >
93917 operator-=(UnaryFunctor<EXPR> const & e)
93918 {
93919 AssignmentFunctor_subtract<T, UnaryFunctor<EXPR> > va(*this, e);
93920 return UnaryAnalyser< AssignmentFunctor_subtract<T, UnaryFunctor<EXPR> > >(va);
93921 }
93922
93923 template <class EXPR>
93924 UnaryAnalyser< AssignmentFunctor_multiply<T, UnaryFunctor<EXPR> > >
93925 operator*=(UnaryFunctor<EXPR> const & e)
93926 {
93927 AssignmentFunctor_multiply<T, UnaryFunctor<EXPR> > va(*this, e);
93928 return UnaryAnalyser< AssignmentFunctor_multiply<T, UnaryFunctor<EXPR> > >(va);
93929 }
93930
93931 template <class EXPR>
93932 UnaryAnalyser< AssignmentFunctor_divide<T, UnaryFunctor<EXPR> > >
93933 operator/=(UnaryFunctor<EXPR> const & e)
93934 {
93935 AssignmentFunctor_divide<T, UnaryFunctor<EXPR> > va(*this, e);
93936 return UnaryAnalyser< AssignmentFunctor_divide<T, UnaryFunctor<EXPR> > >(va);
93937 }
93938
93939 T const & operator()() const
93940 {
93941 return value_;
93942 }
93943
93944 template <class U1>
93945 T const & operator()(U1 const &) const
93946 {
93947 return value_;
93948 }
93949
93950 template <class U1, class U2>
93951 T const & operator()(U1 const &, U2 const &) const
93952 {
93953 return value_;
93954 }
93955
93956 template <class U1, class U2, class U3>
93957 T const & operator()(U1 const &, U2 const &, U3 const &) const
93958 {
93959 return value_;
93960 }
93961
93962 T & value_;
93963 };
93964
93965 template <class T>
93966 struct ResultTraits0<UnaryFunctor<VarFunctor<T> > >
93967 {
93968 typedef T Res;
93969 };
93970
93971 template <class T, class T1>
93972 struct ResultTraits1<UnaryFunctor<VarFunctor<T> >, T1>
93973 {
93974 typedef T Res;
93975 };
93976
93977 template <class T, class T1, class T2>
93978 struct ResultTraits2<UnaryFunctor<VarFunctor<T> >, T1, T2>
93979 {
93980 typedef T Res;
93981 };
93982
93983 template <class T, class T1, class T2, class T3>
93984 struct ResultTraits3<UnaryFunctor<VarFunctor<T> >, T1, T2, T3>
93985 {
93986 typedef T Res;
93987 };
93988
93989 template <class T>
93990 UnaryFunctor<VarFunctor<T> >
93991 Var(T & v)
93992 {
93993 return UnaryFunctor<VarFunctor<T> >(v);
93994 }
93995
93996
93997
93998
93999
94000
94001
94002 template <class EXPR1, class EXPR2>
94003 struct IfThenFunctor
94004 {
94005 typedef void Res;
94006
94007 IfThenFunctor(EXPR1 const & e1, EXPR2 const & e2)
94008 : expr1_(e1), expr2_(e2)
94009 {}
94010
94011 void operator()() const
94012 {
94013 if( expr1_() ) expr2_();
94014 }
94015
94016 template <class T>
94017 void operator()(T const & v1) const
94018 {
94019 if( expr1_(v1) ) expr2_(v1);
94020 }
94021
94022 template <class T1, class T2>
94023 void operator()(T1 const & v1, T2 const & v2) const
94024 {
94025 if( expr1_(v1, v2) ) expr2_(v1, v2);
94026 }
94027
94028 template <class T1, class T2, class T3>
94029 void operator()(T1 const & v1, T2 const & v2, T3 const & v3) const
94030 {
94031 if( expr1_(v1, v2, v3) ) expr2_(v1, v2, v3);
94032 }
94033
94034 private:
94035
94036 EXPR1 expr1_;
94037 EXPR2 expr2_;
94038 };
94039
94040 template <class EXPR1, class EXPR2>
94041 UnaryAnalyser<IfThenFunctor<UnaryFunctor<EXPR1>,
94042 UnaryAnalyser<EXPR2> > >
94043 ifThen(UnaryFunctor<EXPR1> const & e1,
94044 UnaryAnalyser<EXPR2> const & e2)
94045 {
94046 IfThenFunctor<UnaryFunctor<EXPR1>,
94047 UnaryAnalyser<EXPR2> > p(e1, e2);
94048 return UnaryAnalyser<IfThenFunctor<UnaryFunctor<EXPR1>,
94049 UnaryAnalyser<EXPR2> > >(p);
94050 }
94051
94052
94053
94054
94055
94056
94057
94058 template <class EXPR1, class EXPR2, class EXPR3>
94059 struct IfThenElseFunctor;
94060
94061 template <class EXPR1, class EXPR2, class EXPR3>
94062 struct ResultTraits0<IfThenElseFunctor<EXPR1, EXPR2, EXPR3> >
94063 {
94064 typedef typename ResultTraits0<EXPR2>::Res R2;
94065 typedef typename ResultTraits0<EXPR3>::Res R3;
94066 typedef typename PromoteTraits<R2, R3>::Promote Res;
94067 };
94068
94069 template <class EXPR1, class EXPR2, class EXPR3, class T1>
94070 struct ResultTraits1<IfThenElseFunctor<EXPR1, EXPR2, EXPR3>, T1>
94071 {
94072 typedef typename ResultTraits1<EXPR2, T1>::Res R2;
94073 typedef typename ResultTraits1<EXPR3, T1>::Res R3;
94074 typedef typename PromoteTraits<R2, R3>::Promote Res;
94075 };
94076
94077 template <class EXPR1, class EXPR2, class EXPR3, class T1, class T2>
94078 struct ResultTraits2<IfThenElseFunctor<EXPR1, EXPR2, EXPR3>, T1, T2>
94079 {
94080 typedef typename ResultTraits2<EXPR2, T1, T2>::Res R2;
94081 typedef typename ResultTraits2<EXPR3, T1, T2>::Res R3;
94082 typedef typename PromoteTraits<R2, R3>::Promote Res;
94083 };
94084
94085 template <class EXPR1, class EXPR2, class EXPR3, class T1, class T2, class T3>
94086 struct ResultTraits3<IfThenElseFunctor<EXPR1, EXPR2, EXPR3>, T1, T2, T3>
94087 {
94088 typedef typename ResultTraits3<EXPR2, T1, T2, T3>::Res R2;
94089 typedef typename ResultTraits3<EXPR3, T1, T2, T3>::Res R3;
94090 typedef typename PromoteTraits<R2, R3>::Promote Res;
94091 };
94092
94093 template <class EXPR1, class EXPR2, class EXPR3>
94094 struct IfThenElseFunctor
94095 {
94096 IfThenElseFunctor(EXPR1 const & e1, EXPR2 const & e2, EXPR3 const & e3)
94097 : expr1_(e1), expr2_(e2), expr3_(e3)
94098 {}
94099
94100 typename ResultTraits0<IfThenElseFunctor>::Res
94101 operator()() const
94102 {
94103 typename
94104 ResultTraits0<IfThenElseFunctor>::Res
94105 r2(expr2_());
94106 typename
94107 ResultTraits0<IfThenElseFunctor>::Res
94108 r3(expr3_());
94109 return expr1_() ? r2 : r3;
94110 }
94111
94112 template <class T>
94113 typename ResultTraits1<IfThenElseFunctor, T>::Res
94114 operator()(T const & v1) const
94115 {
94116 typename
94117 ResultTraits1<IfThenElseFunctor, T>::Res
94118 r2(expr2_(v1));
94119 typename
94120 ResultTraits1<IfThenElseFunctor, T>::Res
94121 r3(expr3_(v1));
94122 return expr1_(v1) ? r2 : r3;
94123 }
94124
94125 template <class T1, class T2>
94126 typename ResultTraits2<IfThenElseFunctor, T1, T2>::Res
94127 operator()(T1 const & v1, T2 const & v2) const
94128 {
94129 typename
94130 ResultTraits2<IfThenElseFunctor, T1, T2>::Res
94131 r2(expr2_(v1, v2));
94132 typename
94133 ResultTraits2<IfThenElseFunctor, T1, T2>::Res
94134 r3(expr3_(v1, v2));
94135 return expr1_(v1, v2) ? r2 : r3;
94136 }
94137
94138 template <class T1, class T2, class T3>
94139 typename ResultTraits3<IfThenElseFunctor, T1, T2, T3>::Res
94140 operator()(T1 const & v1, T2 const & v2, T3 const & v3) const
94141 {
94142 typename
94143 ResultTraits3<IfThenElseFunctor, T1, T2, T3>::Res
94144 r2(expr2_(v1, v2, v3));
94145 typename
94146 ResultTraits3<IfThenElseFunctor, T1, T2, T3>::Res
94147 r3(expr3_(v1, v2, v3));
94148 return expr1_(v1, v2, v3) ? r2 : r3;
94149 }
94150
94151 private:
94152
94153 EXPR1 expr1_;
94154 EXPR2 expr2_;
94155 EXPR3 expr3_;
94156 };
94157
94158 template <class EXPR1, class EXPR2, class EXPR3>
94159 UnaryFunctor<IfThenElseFunctor<UnaryFunctor<EXPR1>,
94160 UnaryFunctor<EXPR2>,
94161 UnaryFunctor<EXPR3> > >
94162 ifThenElse(UnaryFunctor<EXPR1> const & e1,
94163 UnaryFunctor<EXPR2> const & e2,
94164 UnaryFunctor<EXPR3> const & e3)
94165 {
94166 IfThenElseFunctor<UnaryFunctor<EXPR1>,
94167 UnaryFunctor<EXPR2>,
94168 UnaryFunctor<EXPR3> > p(e1, e2, e3);
94169 return UnaryFunctor<IfThenElseFunctor<UnaryFunctor<EXPR1>,
94170 UnaryFunctor<EXPR2>,
94171 UnaryFunctor<EXPR3> > >(p);
94172 }
94173 # 1165 "../include/vigra/functorexpression.hxx"
94174 using std::sqrt; template <class EXPR> struct Functor_sqrt; template <class EXPR> struct ResultTraits0<Functor_sqrt<EXPR> > { typedef typename ResultTraits0<EXPR>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1> struct ResultTraits1<Functor_sqrt<EXPR>, T1> { typedef typename ResultTraits1<EXPR, T1>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1, class T2> struct ResultTraits2<Functor_sqrt<EXPR>, T1, T2> { typedef typename ResultTraits2<EXPR, T1, T2>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1, class T2, class T3> struct ResultTraits3<Functor_sqrt<EXPR>, T1, T2, T3> { typedef typename ResultTraits3<EXPR, T1, T2, T3>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR> struct Functor_sqrt { Functor_sqrt(EXPR const & e) : expr_(e) {} typename ResultTraits0<Functor_sqrt>::Res operator()() const { return sqrt(expr_()); } template <class T> typename ResultTraits1<Functor_sqrt, T>::Res operator()(T const & v1) const { return sqrt(expr_(v1)); } template <class T1, class T2> typename ResultTraits2<Functor_sqrt, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return sqrt(expr_(v1, v2)); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_sqrt, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return sqrt(expr_(v1, v2, v3)); } protected: EXPR expr_; }; template <class EXPR> UnaryFunctor<Functor_sqrt<UnaryFunctor<EXPR> > > sqrt(UnaryFunctor<EXPR> const & e) { Functor_sqrt<UnaryFunctor<EXPR> > p(e); return UnaryFunctor<Functor_sqrt<UnaryFunctor<EXPR> > >(p); }
94175 using std::exp; template <class EXPR> struct Functor_exp; template <class EXPR> struct ResultTraits0<Functor_exp<EXPR> > { typedef typename ResultTraits0<EXPR>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1> struct ResultTraits1<Functor_exp<EXPR>, T1> { typedef typename ResultTraits1<EXPR, T1>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1, class T2> struct ResultTraits2<Functor_exp<EXPR>, T1, T2> { typedef typename ResultTraits2<EXPR, T1, T2>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1, class T2, class T3> struct ResultTraits3<Functor_exp<EXPR>, T1, T2, T3> { typedef typename ResultTraits3<EXPR, T1, T2, T3>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR> struct Functor_exp { Functor_exp(EXPR const & e) : expr_(e) {} typename ResultTraits0<Functor_exp>::Res operator()() const { return exp(expr_()); } template <class T> typename ResultTraits1<Functor_exp, T>::Res operator()(T const & v1) const { return exp(expr_(v1)); } template <class T1, class T2> typename ResultTraits2<Functor_exp, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return exp(expr_(v1, v2)); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_exp, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return exp(expr_(v1, v2, v3)); } protected: EXPR expr_; }; template <class EXPR> UnaryFunctor<Functor_exp<UnaryFunctor<EXPR> > > exp(UnaryFunctor<EXPR> const & e) { Functor_exp<UnaryFunctor<EXPR> > p(e); return UnaryFunctor<Functor_exp<UnaryFunctor<EXPR> > >(p); }
94176 using std::log; template <class EXPR> struct Functor_log; template <class EXPR> struct ResultTraits0<Functor_log<EXPR> > { typedef typename ResultTraits0<EXPR>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1> struct ResultTraits1<Functor_log<EXPR>, T1> { typedef typename ResultTraits1<EXPR, T1>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1, class T2> struct ResultTraits2<Functor_log<EXPR>, T1, T2> { typedef typename ResultTraits2<EXPR, T1, T2>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1, class T2, class T3> struct ResultTraits3<Functor_log<EXPR>, T1, T2, T3> { typedef typename ResultTraits3<EXPR, T1, T2, T3>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR> struct Functor_log { Functor_log(EXPR const & e) : expr_(e) {} typename ResultTraits0<Functor_log>::Res operator()() const { return log(expr_()); } template <class T> typename ResultTraits1<Functor_log, T>::Res operator()(T const & v1) const { return log(expr_(v1)); } template <class T1, class T2> typename ResultTraits2<Functor_log, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return log(expr_(v1, v2)); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_log, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return log(expr_(v1, v2, v3)); } protected: EXPR expr_; }; template <class EXPR> UnaryFunctor<Functor_log<UnaryFunctor<EXPR> > > log(UnaryFunctor<EXPR> const & e) { Functor_log<UnaryFunctor<EXPR> > p(e); return UnaryFunctor<Functor_log<UnaryFunctor<EXPR> > >(p); }
94177 using std::log10; template <class EXPR> struct Functor_log10; template <class EXPR> struct ResultTraits0<Functor_log10<EXPR> > { typedef typename ResultTraits0<EXPR>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1> struct ResultTraits1<Functor_log10<EXPR>, T1> { typedef typename ResultTraits1<EXPR, T1>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1, class T2> struct ResultTraits2<Functor_log10<EXPR>, T1, T2> { typedef typename ResultTraits2<EXPR, T1, T2>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1, class T2, class T3> struct ResultTraits3<Functor_log10<EXPR>, T1, T2, T3> { typedef typename ResultTraits3<EXPR, T1, T2, T3>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR> struct Functor_log10 { Functor_log10(EXPR const & e) : expr_(e) {} typename ResultTraits0<Functor_log10>::Res operator()() const { return log10(expr_()); } template <class T> typename ResultTraits1<Functor_log10, T>::Res operator()(T const & v1) const { return log10(expr_(v1)); } template <class T1, class T2> typename ResultTraits2<Functor_log10, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return log10(expr_(v1, v2)); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_log10, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return log10(expr_(v1, v2, v3)); } protected: EXPR expr_; }; template <class EXPR> UnaryFunctor<Functor_log10<UnaryFunctor<EXPR> > > log10(UnaryFunctor<EXPR> const & e) { Functor_log10<UnaryFunctor<EXPR> > p(e); return UnaryFunctor<Functor_log10<UnaryFunctor<EXPR> > >(p); }
94178 using std::sin; template <class EXPR> struct Functor_sin; template <class EXPR> struct ResultTraits0<Functor_sin<EXPR> > { typedef typename ResultTraits0<EXPR>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1> struct ResultTraits1<Functor_sin<EXPR>, T1> { typedef typename ResultTraits1<EXPR, T1>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1, class T2> struct ResultTraits2<Functor_sin<EXPR>, T1, T2> { typedef typename ResultTraits2<EXPR, T1, T2>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1, class T2, class T3> struct ResultTraits3<Functor_sin<EXPR>, T1, T2, T3> { typedef typename ResultTraits3<EXPR, T1, T2, T3>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR> struct Functor_sin { Functor_sin(EXPR const & e) : expr_(e) {} typename ResultTraits0<Functor_sin>::Res operator()() const { return sin(expr_()); } template <class T> typename ResultTraits1<Functor_sin, T>::Res operator()(T const & v1) const { return sin(expr_(v1)); } template <class T1, class T2> typename ResultTraits2<Functor_sin, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return sin(expr_(v1, v2)); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_sin, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return sin(expr_(v1, v2, v3)); } protected: EXPR expr_; }; template <class EXPR> UnaryFunctor<Functor_sin<UnaryFunctor<EXPR> > > sin(UnaryFunctor<EXPR> const & e) { Functor_sin<UnaryFunctor<EXPR> > p(e); return UnaryFunctor<Functor_sin<UnaryFunctor<EXPR> > >(p); }
94179 using std::asin; template <class EXPR> struct Functor_asin; template <class EXPR> struct ResultTraits0<Functor_asin<EXPR> > { typedef typename ResultTraits0<EXPR>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1> struct ResultTraits1<Functor_asin<EXPR>, T1> { typedef typename ResultTraits1<EXPR, T1>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1, class T2> struct ResultTraits2<Functor_asin<EXPR>, T1, T2> { typedef typename ResultTraits2<EXPR, T1, T2>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1, class T2, class T3> struct ResultTraits3<Functor_asin<EXPR>, T1, T2, T3> { typedef typename ResultTraits3<EXPR, T1, T2, T3>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR> struct Functor_asin { Functor_asin(EXPR const & e) : expr_(e) {} typename ResultTraits0<Functor_asin>::Res operator()() const { return asin(expr_()); } template <class T> typename ResultTraits1<Functor_asin, T>::Res operator()(T const & v1) const { return asin(expr_(v1)); } template <class T1, class T2> typename ResultTraits2<Functor_asin, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return asin(expr_(v1, v2)); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_asin, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return asin(expr_(v1, v2, v3)); } protected: EXPR expr_; }; template <class EXPR> UnaryFunctor<Functor_asin<UnaryFunctor<EXPR> > > asin(UnaryFunctor<EXPR> const & e) { Functor_asin<UnaryFunctor<EXPR> > p(e); return UnaryFunctor<Functor_asin<UnaryFunctor<EXPR> > >(p); }
94180 using std::cos; template <class EXPR> struct Functor_cos; template <class EXPR> struct ResultTraits0<Functor_cos<EXPR> > { typedef typename ResultTraits0<EXPR>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1> struct ResultTraits1<Functor_cos<EXPR>, T1> { typedef typename ResultTraits1<EXPR, T1>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1, class T2> struct ResultTraits2<Functor_cos<EXPR>, T1, T2> { typedef typename ResultTraits2<EXPR, T1, T2>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1, class T2, class T3> struct ResultTraits3<Functor_cos<EXPR>, T1, T2, T3> { typedef typename ResultTraits3<EXPR, T1, T2, T3>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR> struct Functor_cos { Functor_cos(EXPR const & e) : expr_(e) {} typename ResultTraits0<Functor_cos>::Res operator()() const { return cos(expr_()); } template <class T> typename ResultTraits1<Functor_cos, T>::Res operator()(T const & v1) const { return cos(expr_(v1)); } template <class T1, class T2> typename ResultTraits2<Functor_cos, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return cos(expr_(v1, v2)); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_cos, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return cos(expr_(v1, v2, v3)); } protected: EXPR expr_; }; template <class EXPR> UnaryFunctor<Functor_cos<UnaryFunctor<EXPR> > > cos(UnaryFunctor<EXPR> const & e) { Functor_cos<UnaryFunctor<EXPR> > p(e); return UnaryFunctor<Functor_cos<UnaryFunctor<EXPR> > >(p); }
94181 using std::acos; template <class EXPR> struct Functor_acos; template <class EXPR> struct ResultTraits0<Functor_acos<EXPR> > { typedef typename ResultTraits0<EXPR>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1> struct ResultTraits1<Functor_acos<EXPR>, T1> { typedef typename ResultTraits1<EXPR, T1>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1, class T2> struct ResultTraits2<Functor_acos<EXPR>, T1, T2> { typedef typename ResultTraits2<EXPR, T1, T2>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1, class T2, class T3> struct ResultTraits3<Functor_acos<EXPR>, T1, T2, T3> { typedef typename ResultTraits3<EXPR, T1, T2, T3>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR> struct Functor_acos { Functor_acos(EXPR const & e) : expr_(e) {} typename ResultTraits0<Functor_acos>::Res operator()() const { return acos(expr_()); } template <class T> typename ResultTraits1<Functor_acos, T>::Res operator()(T const & v1) const { return acos(expr_(v1)); } template <class T1, class T2> typename ResultTraits2<Functor_acos, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return acos(expr_(v1, v2)); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_acos, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return acos(expr_(v1, v2, v3)); } protected: EXPR expr_; }; template <class EXPR> UnaryFunctor<Functor_acos<UnaryFunctor<EXPR> > > acos(UnaryFunctor<EXPR> const & e) { Functor_acos<UnaryFunctor<EXPR> > p(e); return UnaryFunctor<Functor_acos<UnaryFunctor<EXPR> > >(p); }
94182 using std::tan; template <class EXPR> struct Functor_tan; template <class EXPR> struct ResultTraits0<Functor_tan<EXPR> > { typedef typename ResultTraits0<EXPR>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1> struct ResultTraits1<Functor_tan<EXPR>, T1> { typedef typename ResultTraits1<EXPR, T1>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1, class T2> struct ResultTraits2<Functor_tan<EXPR>, T1, T2> { typedef typename ResultTraits2<EXPR, T1, T2>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1, class T2, class T3> struct ResultTraits3<Functor_tan<EXPR>, T1, T2, T3> { typedef typename ResultTraits3<EXPR, T1, T2, T3>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR> struct Functor_tan { Functor_tan(EXPR const & e) : expr_(e) {} typename ResultTraits0<Functor_tan>::Res operator()() const { return tan(expr_()); } template <class T> typename ResultTraits1<Functor_tan, T>::Res operator()(T const & v1) const { return tan(expr_(v1)); } template <class T1, class T2> typename ResultTraits2<Functor_tan, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return tan(expr_(v1, v2)); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_tan, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return tan(expr_(v1, v2, v3)); } protected: EXPR expr_; }; template <class EXPR> UnaryFunctor<Functor_tan<UnaryFunctor<EXPR> > > tan(UnaryFunctor<EXPR> const & e) { Functor_tan<UnaryFunctor<EXPR> > p(e); return UnaryFunctor<Functor_tan<UnaryFunctor<EXPR> > >(p); }
94183 using std::atan; template <class EXPR> struct Functor_atan; template <class EXPR> struct ResultTraits0<Functor_atan<EXPR> > { typedef typename ResultTraits0<EXPR>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1> struct ResultTraits1<Functor_atan<EXPR>, T1> { typedef typename ResultTraits1<EXPR, T1>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1, class T2> struct ResultTraits2<Functor_atan<EXPR>, T1, T2> { typedef typename ResultTraits2<EXPR, T1, T2>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1, class T2, class T3> struct ResultTraits3<Functor_atan<EXPR>, T1, T2, T3> { typedef typename ResultTraits3<EXPR, T1, T2, T3>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR> struct Functor_atan { Functor_atan(EXPR const & e) : expr_(e) {} typename ResultTraits0<Functor_atan>::Res operator()() const { return atan(expr_()); } template <class T> typename ResultTraits1<Functor_atan, T>::Res operator()(T const & v1) const { return atan(expr_(v1)); } template <class T1, class T2> typename ResultTraits2<Functor_atan, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return atan(expr_(v1, v2)); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_atan, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return atan(expr_(v1, v2, v3)); } protected: EXPR expr_; }; template <class EXPR> UnaryFunctor<Functor_atan<UnaryFunctor<EXPR> > > atan(UnaryFunctor<EXPR> const & e) { Functor_atan<UnaryFunctor<EXPR> > p(e); return UnaryFunctor<Functor_atan<UnaryFunctor<EXPR> > >(p); }
94184 using std::abs; template <class EXPR> struct Functor_abs; template <class EXPR> struct ResultTraits0<Functor_abs<EXPR> > { typedef typename ResultTraits0<EXPR>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1> struct ResultTraits1<Functor_abs<EXPR>, T1> { typedef typename ResultTraits1<EXPR, T1>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1, class T2> struct ResultTraits2<Functor_abs<EXPR>, T1, T2> { typedef typename ResultTraits2<EXPR, T1, T2>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1, class T2, class T3> struct ResultTraits3<Functor_abs<EXPR>, T1, T2, T3> { typedef typename ResultTraits3<EXPR, T1, T2, T3>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR> struct Functor_abs { Functor_abs(EXPR const & e) : expr_(e) {} typename ResultTraits0<Functor_abs>::Res operator()() const { return abs(expr_()); } template <class T> typename ResultTraits1<Functor_abs, T>::Res operator()(T const & v1) const { return abs(expr_(v1)); } template <class T1, class T2> typename ResultTraits2<Functor_abs, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return abs(expr_(v1, v2)); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_abs, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return abs(expr_(v1, v2, v3)); } protected: EXPR expr_; }; template <class EXPR> UnaryFunctor<Functor_abs<UnaryFunctor<EXPR> > > abs(UnaryFunctor<EXPR> const & e) { Functor_abs<UnaryFunctor<EXPR> > p(e); return UnaryFunctor<Functor_abs<UnaryFunctor<EXPR> > >(p); }
94185 using std::floor; template <class EXPR> struct Functor_floor; template <class EXPR> struct ResultTraits0<Functor_floor<EXPR> > { typedef typename ResultTraits0<EXPR>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1> struct ResultTraits1<Functor_floor<EXPR>, T1> { typedef typename ResultTraits1<EXPR, T1>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1, class T2> struct ResultTraits2<Functor_floor<EXPR>, T1, T2> { typedef typename ResultTraits2<EXPR, T1, T2>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1, class T2, class T3> struct ResultTraits3<Functor_floor<EXPR>, T1, T2, T3> { typedef typename ResultTraits3<EXPR, T1, T2, T3>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR> struct Functor_floor { Functor_floor(EXPR const & e) : expr_(e) {} typename ResultTraits0<Functor_floor>::Res operator()() const { return floor(expr_()); } template <class T> typename ResultTraits1<Functor_floor, T>::Res operator()(T const & v1) const { return floor(expr_(v1)); } template <class T1, class T2> typename ResultTraits2<Functor_floor, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return floor(expr_(v1, v2)); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_floor, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return floor(expr_(v1, v2, v3)); } protected: EXPR expr_; }; template <class EXPR> UnaryFunctor<Functor_floor<UnaryFunctor<EXPR> > > floor(UnaryFunctor<EXPR> const & e) { Functor_floor<UnaryFunctor<EXPR> > p(e); return UnaryFunctor<Functor_floor<UnaryFunctor<EXPR> > >(p); }
94186 using std::ceil; template <class EXPR> struct Functor_ceil; template <class EXPR> struct ResultTraits0<Functor_ceil<EXPR> > { typedef typename ResultTraits0<EXPR>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1> struct ResultTraits1<Functor_ceil<EXPR>, T1> { typedef typename ResultTraits1<EXPR, T1>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1, class T2> struct ResultTraits2<Functor_ceil<EXPR>, T1, T2> { typedef typename ResultTraits2<EXPR, T1, T2>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR, class T1, class T2, class T3> struct ResultTraits3<Functor_ceil<EXPR>, T1, T2, T3> { typedef typename ResultTraits3<EXPR, T1, T2, T3>::Res R1; typedef typename NumericTraits<R1>::RealPromote Res; }; template <class EXPR> struct Functor_ceil { Functor_ceil(EXPR const & e) : expr_(e) {} typename ResultTraits0<Functor_ceil>::Res operator()() const { return ceil(expr_()); } template <class T> typename ResultTraits1<Functor_ceil, T>::Res operator()(T const & v1) const { return ceil(expr_(v1)); } template <class T1, class T2> typename ResultTraits2<Functor_ceil, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return ceil(expr_(v1, v2)); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_ceil, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return ceil(expr_(v1, v2, v3)); } protected: EXPR expr_; }; template <class EXPR> UnaryFunctor<Functor_ceil<UnaryFunctor<EXPR> > > ceil(UnaryFunctor<EXPR> const & e) { Functor_ceil<UnaryFunctor<EXPR> > p(e); return UnaryFunctor<Functor_ceil<UnaryFunctor<EXPR> > >(p); }
94187 # 1264 "../include/vigra/functorexpression.hxx"
94188 template <class EXPR> struct Functor_minus; template <class EXPR> struct ResultTraits0<Functor_minus<EXPR> > { typedef typename ResultTraits0<EXPR>::Res Res; }; template <class EXPR, class T1> struct ResultTraits1<Functor_minus<EXPR>, T1> { typedef typename ResultTraits1<EXPR, T1>::Res Res; }; template <class EXPR, class T1, class T2> struct ResultTraits2<Functor_minus<EXPR>, T1, T2> { typedef typename ResultTraits2<EXPR, T1, T2>::Res Res; }; template <class EXPR, class T1, class T2, class T3> struct ResultTraits3<Functor_minus<EXPR>, T1, T2, T3> { typedef typename ResultTraits3<EXPR, T1, T2, T3>::Res Res; }; template <class EXPR> struct Functor_minus { Functor_minus(EXPR const & e) : expr_(e) {} typename ResultTraits0<Functor_minus>::Res operator()() const { return - expr_(); } template <class T> typename ResultTraits1<Functor_minus, T>::Res operator()(T const & v1) const { return - expr_(v1); } template <class T1, class T2> typename ResultTraits2<Functor_minus, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return - expr_(v1, v2); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_minus, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return - expr_(v1, v2, v3); } protected: EXPR expr_; }; template <class EXPR> UnaryFunctor<Functor_minus<UnaryFunctor<EXPR> > > operator -(UnaryFunctor<EXPR> const & e) { Functor_minus<UnaryFunctor<EXPR> > p(e); return UnaryFunctor<Functor_minus<UnaryFunctor<EXPR> > >(p); }
94189 template <class EXPR> struct Functor_negate; template <class EXPR> struct ResultTraits0<Functor_negate<EXPR> > { typedef typename ResultTraits0<EXPR>::Res Res; }; template <class EXPR, class T1> struct ResultTraits1<Functor_negate<EXPR>, T1> { typedef typename ResultTraits1<EXPR, T1>::Res Res; }; template <class EXPR, class T1, class T2> struct ResultTraits2<Functor_negate<EXPR>, T1, T2> { typedef typename ResultTraits2<EXPR, T1, T2>::Res Res; }; template <class EXPR, class T1, class T2, class T3> struct ResultTraits3<Functor_negate<EXPR>, T1, T2, T3> { typedef typename ResultTraits3<EXPR, T1, T2, T3>::Res Res; }; template <class EXPR> struct Functor_negate { Functor_negate(EXPR const & e) : expr_(e) {} typename ResultTraits0<Functor_negate>::Res operator()() const { return ! expr_(); } template <class T> typename ResultTraits1<Functor_negate, T>::Res operator()(T const & v1) const { return ! expr_(v1); } template <class T1, class T2> typename ResultTraits2<Functor_negate, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return ! expr_(v1, v2); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_negate, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return ! expr_(v1, v2, v3); } protected: EXPR expr_; }; template <class EXPR> UnaryFunctor<Functor_negate<UnaryFunctor<EXPR> > > operator !(UnaryFunctor<EXPR> const & e) { Functor_negate<UnaryFunctor<EXPR> > p(e); return UnaryFunctor<Functor_negate<UnaryFunctor<EXPR> > >(p); }
94190 template <class EXPR> struct Functor_bitNegate; template <class EXPR> struct ResultTraits0<Functor_bitNegate<EXPR> > { typedef typename ResultTraits0<EXPR>::Res Res; }; template <class EXPR, class T1> struct ResultTraits1<Functor_bitNegate<EXPR>, T1> { typedef typename ResultTraits1<EXPR, T1>::Res Res; }; template <class EXPR, class T1, class T2> struct ResultTraits2<Functor_bitNegate<EXPR>, T1, T2> { typedef typename ResultTraits2<EXPR, T1, T2>::Res Res; }; template <class EXPR, class T1, class T2, class T3> struct ResultTraits3<Functor_bitNegate<EXPR>, T1, T2, T3> { typedef typename ResultTraits3<EXPR, T1, T2, T3>::Res Res; }; template <class EXPR> struct Functor_bitNegate { Functor_bitNegate(EXPR const & e) : expr_(e) {} typename ResultTraits0<Functor_bitNegate>::Res operator()() const { return ~ expr_(); } template <class T> typename ResultTraits1<Functor_bitNegate, T>::Res operator()(T const & v1) const { return ~ expr_(v1); } template <class T1, class T2> typename ResultTraits2<Functor_bitNegate, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return ~ expr_(v1, v2); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_bitNegate, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return ~ expr_(v1, v2, v3); } protected: EXPR expr_; }; template <class EXPR> UnaryFunctor<Functor_bitNegate<UnaryFunctor<EXPR> > > operator ~(UnaryFunctor<EXPR> const & e) { Functor_bitNegate<UnaryFunctor<EXPR> > p(e); return UnaryFunctor<Functor_bitNegate<UnaryFunctor<EXPR> > >(p); }
94191 # 1368 "../include/vigra/functorexpression.hxx"
94192 using std::pow; template <class EXPR1, class EXPR2> struct Functor_pow; template <class EXPR1, class EXPR2> struct ResultTraits0<Functor_pow<EXPR1, EXPR2> > { typedef typename ResultTraits0<EXPR1>::Res R1; typedef typename ResultTraits0<EXPR2>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote R3; typedef typename NumericTraits<R3>::RealPromote Res; }; template <class EXPR1, class EXPR2, class T1> struct ResultTraits1<Functor_pow<EXPR1, EXPR2>, T1> { typedef typename ResultTraits1<EXPR1, T1>::Res R1; typedef typename ResultTraits1<EXPR2, T1>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote R3; typedef typename NumericTraits<R3>::RealPromote Res; }; template <class EXPR1, class EXPR2, class T1, class T2> struct ResultTraits2<Functor_pow<EXPR1, EXPR2>, T1, T2> { typedef typename ResultTraits2<EXPR1, T1, T2>::Res R1; typedef typename ResultTraits2<EXPR2, T1, T2>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote R3; typedef typename NumericTraits<R3>::RealPromote Res; }; template <class EXPR1, class EXPR2, class T1, class T2, class T3> struct ResultTraits3<Functor_pow<EXPR1, EXPR2>, T1, T2, T3> { typedef typename ResultTraits3<EXPR1, T1, T2, T3>::Res R1; typedef typename ResultTraits3<EXPR2, T1, T2, T3>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote R3; typedef typename NumericTraits<R3>::RealPromote Res; }; template <class EXPR1, class EXPR2> struct Functor_pow { Functor_pow(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0<Functor_pow>::Res operator()() const { return pow(expr1_(), expr2_()); } template <class T> typename ResultTraits1<Functor_pow, T>::Res operator()(T const & v1) const { return pow(expr1_(v1), expr2_(v1)); } template <class T1, class T2> typename ResultTraits2<Functor_pow, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return pow(expr1_(v1, v2), expr2_(v1, v2)); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_pow, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return pow(expr1_(v1, v2, v3), expr2_(v1, v2, v3)); } private: EXPR1 expr1_; EXPR2 expr2_; }; template <class EXPR1, class EXPR2> UnaryFunctor<Functor_pow<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > > pow(UnaryFunctor<EXPR1> const & e1, UnaryFunctor<EXPR2> const & e2) { Functor_pow<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > p(e1, e2); return UnaryFunctor<Functor_pow<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > >(p); }
94193 using std::atan2; template <class EXPR1, class EXPR2> struct Functor_atan2; template <class EXPR1, class EXPR2> struct ResultTraits0<Functor_atan2<EXPR1, EXPR2> > { typedef typename ResultTraits0<EXPR1>::Res R1; typedef typename ResultTraits0<EXPR2>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote R3; typedef typename NumericTraits<R3>::RealPromote Res; }; template <class EXPR1, class EXPR2, class T1> struct ResultTraits1<Functor_atan2<EXPR1, EXPR2>, T1> { typedef typename ResultTraits1<EXPR1, T1>::Res R1; typedef typename ResultTraits1<EXPR2, T1>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote R3; typedef typename NumericTraits<R3>::RealPromote Res; }; template <class EXPR1, class EXPR2, class T1, class T2> struct ResultTraits2<Functor_atan2<EXPR1, EXPR2>, T1, T2> { typedef typename ResultTraits2<EXPR1, T1, T2>::Res R1; typedef typename ResultTraits2<EXPR2, T1, T2>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote R3; typedef typename NumericTraits<R3>::RealPromote Res; }; template <class EXPR1, class EXPR2, class T1, class T2, class T3> struct ResultTraits3<Functor_atan2<EXPR1, EXPR2>, T1, T2, T3> { typedef typename ResultTraits3<EXPR1, T1, T2, T3>::Res R1; typedef typename ResultTraits3<EXPR2, T1, T2, T3>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote R3; typedef typename NumericTraits<R3>::RealPromote Res; }; template <class EXPR1, class EXPR2> struct Functor_atan2 { Functor_atan2(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0<Functor_atan2>::Res operator()() const { return atan2(expr1_(), expr2_()); } template <class T> typename ResultTraits1<Functor_atan2, T>::Res operator()(T const & v1) const { return atan2(expr1_(v1), expr2_(v1)); } template <class T1, class T2> typename ResultTraits2<Functor_atan2, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return atan2(expr1_(v1, v2), expr2_(v1, v2)); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_atan2, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return atan2(expr1_(v1, v2, v3), expr2_(v1, v2, v3)); } private: EXPR1 expr1_; EXPR2 expr2_; }; template <class EXPR1, class EXPR2> UnaryFunctor<Functor_atan2<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > > atan2(UnaryFunctor<EXPR1> const & e1, UnaryFunctor<EXPR2> const & e2) { Functor_atan2<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > p(e1, e2); return UnaryFunctor<Functor_atan2<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > >(p); }
94194 using std::fmod; template <class EXPR1, class EXPR2> struct Functor_fmod; template <class EXPR1, class EXPR2> struct ResultTraits0<Functor_fmod<EXPR1, EXPR2> > { typedef typename ResultTraits0<EXPR1>::Res R1; typedef typename ResultTraits0<EXPR2>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote R3; typedef typename NumericTraits<R3>::RealPromote Res; }; template <class EXPR1, class EXPR2, class T1> struct ResultTraits1<Functor_fmod<EXPR1, EXPR2>, T1> { typedef typename ResultTraits1<EXPR1, T1>::Res R1; typedef typename ResultTraits1<EXPR2, T1>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote R3; typedef typename NumericTraits<R3>::RealPromote Res; }; template <class EXPR1, class EXPR2, class T1, class T2> struct ResultTraits2<Functor_fmod<EXPR1, EXPR2>, T1, T2> { typedef typename ResultTraits2<EXPR1, T1, T2>::Res R1; typedef typename ResultTraits2<EXPR2, T1, T2>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote R3; typedef typename NumericTraits<R3>::RealPromote Res; }; template <class EXPR1, class EXPR2, class T1, class T2, class T3> struct ResultTraits3<Functor_fmod<EXPR1, EXPR2>, T1, T2, T3> { typedef typename ResultTraits3<EXPR1, T1, T2, T3>::Res R1; typedef typename ResultTraits3<EXPR2, T1, T2, T3>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote R3; typedef typename NumericTraits<R3>::RealPromote Res; }; template <class EXPR1, class EXPR2> struct Functor_fmod { Functor_fmod(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0<Functor_fmod>::Res operator()() const { return fmod(expr1_(), expr2_()); } template <class T> typename ResultTraits1<Functor_fmod, T>::Res operator()(T const & v1) const { return fmod(expr1_(v1), expr2_(v1)); } template <class T1, class T2> typename ResultTraits2<Functor_fmod, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return fmod(expr1_(v1, v2), expr2_(v1, v2)); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_fmod, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return fmod(expr1_(v1, v2, v3), expr2_(v1, v2, v3)); } private: EXPR1 expr1_; EXPR2 expr2_; }; template <class EXPR1, class EXPR2> UnaryFunctor<Functor_fmod<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > > fmod(UnaryFunctor<EXPR1> const & e1, UnaryFunctor<EXPR2> const & e2) { Functor_fmod<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > p(e1, e2); return UnaryFunctor<Functor_fmod<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > >(p); }
94195 # 1477 "../include/vigra/functorexpression.hxx"
94196 template <class EXPR1, class EXPR2> struct Functor_min; template <class EXPR1, class EXPR2> struct ResultTraits0<Functor_min<EXPR1, EXPR2> > { typedef typename ResultTraits0<EXPR1>::Res R1; typedef typename ResultTraits0<EXPR2>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1> struct ResultTraits1<Functor_min<EXPR1, EXPR2>, T1> { typedef typename ResultTraits1<EXPR1, T1>::Res R1; typedef typename ResultTraits1<EXPR2, T1>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1, class T2> struct ResultTraits2<Functor_min<EXPR1, EXPR2>, T1, T2> { typedef typename ResultTraits2<EXPR1, T1, T2>::Res R1; typedef typename ResultTraits2<EXPR2, T1, T2>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1, class T2, class T3> struct ResultTraits3<Functor_min<EXPR1, EXPR2>, T1, T2, T3> { typedef typename ResultTraits3<EXPR1, T1, T2, T3>::Res R1; typedef typename ResultTraits3<EXPR2, T1, T2, T3>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2> struct Functor_min { Functor_min(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0<Functor_min>::Res operator()() const { typename ResultTraits0<Functor_min<EXPR1, EXPR2> >::R1 r1(expr1_()); typename ResultTraits0<Functor_min<EXPR1, EXPR2> >::R2 r2(expr2_()); return (r1 < r2) ? r1 : r2; } template <class T> typename ResultTraits1<Functor_min, T>::Res operator()(T const & v1) const { typename ResultTraits1<Functor_min<EXPR1, EXPR2>, T>::R1 r1(expr1_(v1)); typename ResultTraits1<Functor_min<EXPR1, EXPR2>, T>::R2 r2(expr2_(v1)); return (r1 < r2) ? r1 : r2; } template <class T1, class T2> typename ResultTraits2<Functor_min, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { typename ResultTraits2<Functor_min<EXPR1, EXPR2>, T1, T2>::R1 r1(expr1_(v1, v2)); typename ResultTraits2<Functor_min<EXPR1, EXPR2>, T1, T2>::R2 r2(expr2_(v1, v2)); return (r1 < r2) ? r1 : r2; } template <class T1, class T2, class T3> typename ResultTraits3<Functor_min, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { typename ResultTraits3<Functor_min<EXPR1, EXPR2>, T1, T2, T3>::R1 r1(expr1_(v1, v2, v3)); typename ResultTraits3<Functor_min<EXPR1, EXPR2>, T1, T2, T3>::R2 r2(expr2_(v1, v2, v3)); return (r1 < r2) ? r1 : r2; } private: EXPR1 expr1_; EXPR2 expr2_; }; template <class EXPR1, class EXPR2> UnaryFunctor<Functor_min<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > > min(UnaryFunctor<EXPR1> const & e1, UnaryFunctor<EXPR2> const & e2) { Functor_min<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > p(e1, e2); return UnaryFunctor<Functor_min<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > >(p); }
94197 template <class EXPR1, class EXPR2> struct Functor_max; template <class EXPR1, class EXPR2> struct ResultTraits0<Functor_max<EXPR1, EXPR2> > { typedef typename ResultTraits0<EXPR1>::Res R1; typedef typename ResultTraits0<EXPR2>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1> struct ResultTraits1<Functor_max<EXPR1, EXPR2>, T1> { typedef typename ResultTraits1<EXPR1, T1>::Res R1; typedef typename ResultTraits1<EXPR2, T1>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1, class T2> struct ResultTraits2<Functor_max<EXPR1, EXPR2>, T1, T2> { typedef typename ResultTraits2<EXPR1, T1, T2>::Res R1; typedef typename ResultTraits2<EXPR2, T1, T2>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1, class T2, class T3> struct ResultTraits3<Functor_max<EXPR1, EXPR2>, T1, T2, T3> { typedef typename ResultTraits3<EXPR1, T1, T2, T3>::Res R1; typedef typename ResultTraits3<EXPR2, T1, T2, T3>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2> struct Functor_max { Functor_max(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0<Functor_max>::Res operator()() const { typename ResultTraits0<Functor_max<EXPR1, EXPR2> >::R1 r1(expr1_()); typename ResultTraits0<Functor_max<EXPR1, EXPR2> >::R2 r2(expr2_()); return (r1 > r2) ? r1 : r2; } template <class T> typename ResultTraits1<Functor_max, T>::Res operator()(T const & v1) const { typename ResultTraits1<Functor_max<EXPR1, EXPR2>, T>::R1 r1(expr1_(v1)); typename ResultTraits1<Functor_max<EXPR1, EXPR2>, T>::R2 r2(expr2_(v1)); return (r1 > r2) ? r1 : r2; } template <class T1, class T2> typename ResultTraits2<Functor_max, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { typename ResultTraits2<Functor_max<EXPR1, EXPR2>, T1, T2>::R1 r1(expr1_(v1, v2)); typename ResultTraits2<Functor_max<EXPR1, EXPR2>, T1, T2>::R2 r2(expr2_(v1, v2)); return (r1 > r2) ? r1 : r2; } template <class T1, class T2, class T3> typename ResultTraits3<Functor_max, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { typename ResultTraits3<Functor_max<EXPR1, EXPR2>, T1, T2, T3>::R1 r1(expr1_(v1, v2, v3)); typename ResultTraits3<Functor_max<EXPR1, EXPR2>, T1, T2, T3>::R2 r2(expr2_(v1, v2, v3)); return (r1 > r2) ? r1 : r2; } private: EXPR1 expr1_; EXPR2 expr2_; }; template <class EXPR1, class EXPR2> UnaryFunctor<Functor_max<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > > max(UnaryFunctor<EXPR1> const & e1, UnaryFunctor<EXPR2> const & e2) { Functor_max<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > p(e1, e2); return UnaryFunctor<Functor_max<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > >(p); }
94198 # 1575 "../include/vigra/functorexpression.hxx"
94199 template <class EXPR1, class EXPR2> struct Functor_add; template <class EXPR1, class EXPR2> struct ResultTraits0<Functor_add<EXPR1, EXPR2> > { typedef typename ResultTraits0<EXPR1>::Res R1; typedef typename ResultTraits0<EXPR2>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1> struct ResultTraits1<Functor_add<EXPR1, EXPR2>, T1> { typedef typename ResultTraits1<EXPR1, T1>::Res R1; typedef typename ResultTraits1<EXPR2, T1>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1, class T2> struct ResultTraits2<Functor_add<EXPR1, EXPR2>, T1, T2> { typedef typename ResultTraits2<EXPR1, T1, T2>::Res R1; typedef typename ResultTraits2<EXPR2, T1, T2>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1, class T2, class T3> struct ResultTraits3<Functor_add<EXPR1, EXPR2>, T1, T2, T3> { typedef typename ResultTraits3<EXPR1, T1, T2, T3>::Res R1; typedef typename ResultTraits3<EXPR2, T1, T2, T3>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2> struct Functor_add { Functor_add(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0<Functor_add>::Res operator()() const { return expr1_() + expr2_(); } template <class T> typename ResultTraits1<Functor_add, T>::Res operator()(T const & v1) const { return expr1_(v1) + expr2_(v1); } template <class T1, class T2> typename ResultTraits2<Functor_add, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) + expr2_(v1, v2); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_add, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) + expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template <class EXPR1, class EXPR2> UnaryFunctor<Functor_add<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > > operator +(UnaryFunctor<EXPR1> const & e1, UnaryFunctor<EXPR2> const & e2) { Functor_add<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > p(e1, e2); return UnaryFunctor<Functor_add<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > >(p); }
94200 template <class EXPR1, class EXPR2> struct Functor_subtract; template <class EXPR1, class EXPR2> struct ResultTraits0<Functor_subtract<EXPR1, EXPR2> > { typedef typename ResultTraits0<EXPR1>::Res R1; typedef typename ResultTraits0<EXPR2>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1> struct ResultTraits1<Functor_subtract<EXPR1, EXPR2>, T1> { typedef typename ResultTraits1<EXPR1, T1>::Res R1; typedef typename ResultTraits1<EXPR2, T1>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1, class T2> struct ResultTraits2<Functor_subtract<EXPR1, EXPR2>, T1, T2> { typedef typename ResultTraits2<EXPR1, T1, T2>::Res R1; typedef typename ResultTraits2<EXPR2, T1, T2>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1, class T2, class T3> struct ResultTraits3<Functor_subtract<EXPR1, EXPR2>, T1, T2, T3> { typedef typename ResultTraits3<EXPR1, T1, T2, T3>::Res R1; typedef typename ResultTraits3<EXPR2, T1, T2, T3>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2> struct Functor_subtract { Functor_subtract(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0<Functor_subtract>::Res operator()() const { return expr1_() - expr2_(); } template <class T> typename ResultTraits1<Functor_subtract, T>::Res operator()(T const & v1) const { return expr1_(v1) - expr2_(v1); } template <class T1, class T2> typename ResultTraits2<Functor_subtract, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) - expr2_(v1, v2); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_subtract, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) - expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template <class EXPR1, class EXPR2> UnaryFunctor<Functor_subtract<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > > operator -(UnaryFunctor<EXPR1> const & e1, UnaryFunctor<EXPR2> const & e2) { Functor_subtract<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > p(e1, e2); return UnaryFunctor<Functor_subtract<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > >(p); }
94201 template <class EXPR1, class EXPR2> struct Functor_multiply; template <class EXPR1, class EXPR2> struct ResultTraits0<Functor_multiply<EXPR1, EXPR2> > { typedef typename ResultTraits0<EXPR1>::Res R1; typedef typename ResultTraits0<EXPR2>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1> struct ResultTraits1<Functor_multiply<EXPR1, EXPR2>, T1> { typedef typename ResultTraits1<EXPR1, T1>::Res R1; typedef typename ResultTraits1<EXPR2, T1>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1, class T2> struct ResultTraits2<Functor_multiply<EXPR1, EXPR2>, T1, T2> { typedef typename ResultTraits2<EXPR1, T1, T2>::Res R1; typedef typename ResultTraits2<EXPR2, T1, T2>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1, class T2, class T3> struct ResultTraits3<Functor_multiply<EXPR1, EXPR2>, T1, T2, T3> { typedef typename ResultTraits3<EXPR1, T1, T2, T3>::Res R1; typedef typename ResultTraits3<EXPR2, T1, T2, T3>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2> struct Functor_multiply { Functor_multiply(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0<Functor_multiply>::Res operator()() const { return expr1_() * expr2_(); } template <class T> typename ResultTraits1<Functor_multiply, T>::Res operator()(T const & v1) const { return expr1_(v1) * expr2_(v1); } template <class T1, class T2> typename ResultTraits2<Functor_multiply, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) * expr2_(v1, v2); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_multiply, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) * expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template <class EXPR1, class EXPR2> UnaryFunctor<Functor_multiply<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > > operator *(UnaryFunctor<EXPR1> const & e1, UnaryFunctor<EXPR2> const & e2) { Functor_multiply<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > p(e1, e2); return UnaryFunctor<Functor_multiply<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > >(p); }
94202 template <class EXPR1, class EXPR2> struct Functor_divide; template <class EXPR1, class EXPR2> struct ResultTraits0<Functor_divide<EXPR1, EXPR2> > { typedef typename ResultTraits0<EXPR1>::Res R1; typedef typename ResultTraits0<EXPR2>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1> struct ResultTraits1<Functor_divide<EXPR1, EXPR2>, T1> { typedef typename ResultTraits1<EXPR1, T1>::Res R1; typedef typename ResultTraits1<EXPR2, T1>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1, class T2> struct ResultTraits2<Functor_divide<EXPR1, EXPR2>, T1, T2> { typedef typename ResultTraits2<EXPR1, T1, T2>::Res R1; typedef typename ResultTraits2<EXPR2, T1, T2>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1, class T2, class T3> struct ResultTraits3<Functor_divide<EXPR1, EXPR2>, T1, T2, T3> { typedef typename ResultTraits3<EXPR1, T1, T2, T3>::Res R1; typedef typename ResultTraits3<EXPR2, T1, T2, T3>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2> struct Functor_divide { Functor_divide(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0<Functor_divide>::Res operator()() const { return expr1_() / expr2_(); } template <class T> typename ResultTraits1<Functor_divide, T>::Res operator()(T const & v1) const { return expr1_(v1) / expr2_(v1); } template <class T1, class T2> typename ResultTraits2<Functor_divide, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) / expr2_(v1, v2); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_divide, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) / expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template <class EXPR1, class EXPR2> UnaryFunctor<Functor_divide<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > > operator /(UnaryFunctor<EXPR1> const & e1, UnaryFunctor<EXPR2> const & e2) { Functor_divide<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > p(e1, e2); return UnaryFunctor<Functor_divide<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > >(p); }
94203 template <class EXPR1, class EXPR2> struct Functor_modulo; template <class EXPR1, class EXPR2> struct ResultTraits0<Functor_modulo<EXPR1, EXPR2> > { typedef typename ResultTraits0<EXPR1>::Res R1; typedef typename ResultTraits0<EXPR2>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1> struct ResultTraits1<Functor_modulo<EXPR1, EXPR2>, T1> { typedef typename ResultTraits1<EXPR1, T1>::Res R1; typedef typename ResultTraits1<EXPR2, T1>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1, class T2> struct ResultTraits2<Functor_modulo<EXPR1, EXPR2>, T1, T2> { typedef typename ResultTraits2<EXPR1, T1, T2>::Res R1; typedef typename ResultTraits2<EXPR2, T1, T2>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1, class T2, class T3> struct ResultTraits3<Functor_modulo<EXPR1, EXPR2>, T1, T2, T3> { typedef typename ResultTraits3<EXPR1, T1, T2, T3>::Res R1; typedef typename ResultTraits3<EXPR2, T1, T2, T3>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2> struct Functor_modulo { Functor_modulo(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0<Functor_modulo>::Res operator()() const { return expr1_() % expr2_(); } template <class T> typename ResultTraits1<Functor_modulo, T>::Res operator()(T const & v1) const { return expr1_(v1) % expr2_(v1); } template <class T1, class T2> typename ResultTraits2<Functor_modulo, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) % expr2_(v1, v2); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_modulo, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) % expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template <class EXPR1, class EXPR2> UnaryFunctor<Functor_modulo<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > > operator %(UnaryFunctor<EXPR1> const & e1, UnaryFunctor<EXPR2> const & e2) { Functor_modulo<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > p(e1, e2); return UnaryFunctor<Functor_modulo<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > >(p); }
94204 template <class EXPR1, class EXPR2> struct Functor_bitAnd; template <class EXPR1, class EXPR2> struct ResultTraits0<Functor_bitAnd<EXPR1, EXPR2> > { typedef typename ResultTraits0<EXPR1>::Res R1; typedef typename ResultTraits0<EXPR2>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1> struct ResultTraits1<Functor_bitAnd<EXPR1, EXPR2>, T1> { typedef typename ResultTraits1<EXPR1, T1>::Res R1; typedef typename ResultTraits1<EXPR2, T1>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1, class T2> struct ResultTraits2<Functor_bitAnd<EXPR1, EXPR2>, T1, T2> { typedef typename ResultTraits2<EXPR1, T1, T2>::Res R1; typedef typename ResultTraits2<EXPR2, T1, T2>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1, class T2, class T3> struct ResultTraits3<Functor_bitAnd<EXPR1, EXPR2>, T1, T2, T3> { typedef typename ResultTraits3<EXPR1, T1, T2, T3>::Res R1; typedef typename ResultTraits3<EXPR2, T1, T2, T3>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2> struct Functor_bitAnd { Functor_bitAnd(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0<Functor_bitAnd>::Res operator()() const { return expr1_() & expr2_(); } template <class T> typename ResultTraits1<Functor_bitAnd, T>::Res operator()(T const & v1) const { return expr1_(v1) & expr2_(v1); } template <class T1, class T2> typename ResultTraits2<Functor_bitAnd, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) & expr2_(v1, v2); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_bitAnd, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) & expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template <class EXPR1, class EXPR2> UnaryFunctor<Functor_bitAnd<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > > operator &(UnaryFunctor<EXPR1> const & e1, UnaryFunctor<EXPR2> const & e2) { Functor_bitAnd<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > p(e1, e2); return UnaryFunctor<Functor_bitAnd<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > >(p); }
94205 template <class EXPR1, class EXPR2> struct Functor_bitOr; template <class EXPR1, class EXPR2> struct ResultTraits0<Functor_bitOr<EXPR1, EXPR2> > { typedef typename ResultTraits0<EXPR1>::Res R1; typedef typename ResultTraits0<EXPR2>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1> struct ResultTraits1<Functor_bitOr<EXPR1, EXPR2>, T1> { typedef typename ResultTraits1<EXPR1, T1>::Res R1; typedef typename ResultTraits1<EXPR2, T1>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1, class T2> struct ResultTraits2<Functor_bitOr<EXPR1, EXPR2>, T1, T2> { typedef typename ResultTraits2<EXPR1, T1, T2>::Res R1; typedef typename ResultTraits2<EXPR2, T1, T2>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1, class T2, class T3> struct ResultTraits3<Functor_bitOr<EXPR1, EXPR2>, T1, T2, T3> { typedef typename ResultTraits3<EXPR1, T1, T2, T3>::Res R1; typedef typename ResultTraits3<EXPR2, T1, T2, T3>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2> struct Functor_bitOr { Functor_bitOr(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0<Functor_bitOr>::Res operator()() const { return expr1_() | expr2_(); } template <class T> typename ResultTraits1<Functor_bitOr, T>::Res operator()(T const & v1) const { return expr1_(v1) | expr2_(v1); } template <class T1, class T2> typename ResultTraits2<Functor_bitOr, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) | expr2_(v1, v2); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_bitOr, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) | expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template <class EXPR1, class EXPR2> UnaryFunctor<Functor_bitOr<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > > operator |(UnaryFunctor<EXPR1> const & e1, UnaryFunctor<EXPR2> const & e2) { Functor_bitOr<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > p(e1, e2); return UnaryFunctor<Functor_bitOr<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > >(p); }
94206 template <class EXPR1, class EXPR2> struct Functor_bitXor; template <class EXPR1, class EXPR2> struct ResultTraits0<Functor_bitXor<EXPR1, EXPR2> > { typedef typename ResultTraits0<EXPR1>::Res R1; typedef typename ResultTraits0<EXPR2>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1> struct ResultTraits1<Functor_bitXor<EXPR1, EXPR2>, T1> { typedef typename ResultTraits1<EXPR1, T1>::Res R1; typedef typename ResultTraits1<EXPR2, T1>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1, class T2> struct ResultTraits2<Functor_bitXor<EXPR1, EXPR2>, T1, T2> { typedef typename ResultTraits2<EXPR1, T1, T2>::Res R1; typedef typename ResultTraits2<EXPR2, T1, T2>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2, class T1, class T2, class T3> struct ResultTraits3<Functor_bitXor<EXPR1, EXPR2>, T1, T2, T3> { typedef typename ResultTraits3<EXPR1, T1, T2, T3>::Res R1; typedef typename ResultTraits3<EXPR2, T1, T2, T3>::Res R2; typedef typename PromoteTraits<R1, R2>::Promote Res; }; template <class EXPR1, class EXPR2> struct Functor_bitXor { Functor_bitXor(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0<Functor_bitXor>::Res operator()() const { return expr1_() ^ expr2_(); } template <class T> typename ResultTraits1<Functor_bitXor, T>::Res operator()(T const & v1) const { return expr1_(v1) ^ expr2_(v1); } template <class T1, class T2> typename ResultTraits2<Functor_bitXor, T1, T2>::Res operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) ^ expr2_(v1, v2); } template <class T1, class T2, class T3> typename ResultTraits3<Functor_bitXor, T1, T2, T3>::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) ^ expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template <class EXPR1, class EXPR2> UnaryFunctor<Functor_bitXor<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > > operator ^(UnaryFunctor<EXPR1> const & e1, UnaryFunctor<EXPR2> const & e2) { Functor_bitXor<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > p(e1, e2); return UnaryFunctor<Functor_bitXor<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > >(p); }
94207 # 1663 "../include/vigra/functorexpression.hxx"
94208 template <class EXPR1, class EXPR2> struct Functor_equals; template <class EXPR1, class EXPR2> struct ResultTraits0<Functor_equals<EXPR1, EXPR2> > { typedef bool Res; }; template <class EXPR1, class EXPR2, class T1> struct ResultTraits1<Functor_equals<EXPR1, EXPR2>, T1> { typedef bool Res; }; template <class EXPR1, class EXPR2, class T1, class T2> struct ResultTraits2<Functor_equals<EXPR1, EXPR2>, T1, T2> { typedef bool Res; }; template <class EXPR1, class EXPR2, class T1, class T2, class T3> struct ResultTraits3<Functor_equals<EXPR1, EXPR2>, T1, T2, T3> { typedef bool Res; }; template <class EXPR1, class EXPR2> struct Functor_equals { Functor_equals(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} bool operator()() const { return expr1_() == expr2_(); } template <class T> bool operator()(T const & v1) const { return expr1_(v1) == expr2_(v1); } template <class T1, class T2> bool operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) == expr2_(v1, v2); } template <class T1, class T2, class T3> bool operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) == expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template <class EXPR1, class EXPR2> UnaryFunctor<Functor_equals<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > > operator ==(UnaryFunctor<EXPR1> const & e1, UnaryFunctor<EXPR2> const & e2) { Functor_equals<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > p(e1, e2); return UnaryFunctor<Functor_equals<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > >(p); }
94209 template <class EXPR1, class EXPR2> struct Functor_differs; template <class EXPR1, class EXPR2> struct ResultTraits0<Functor_differs<EXPR1, EXPR2> > { typedef bool Res; }; template <class EXPR1, class EXPR2, class T1> struct ResultTraits1<Functor_differs<EXPR1, EXPR2>, T1> { typedef bool Res; }; template <class EXPR1, class EXPR2, class T1, class T2> struct ResultTraits2<Functor_differs<EXPR1, EXPR2>, T1, T2> { typedef bool Res; }; template <class EXPR1, class EXPR2, class T1, class T2, class T3> struct ResultTraits3<Functor_differs<EXPR1, EXPR2>, T1, T2, T3> { typedef bool Res; }; template <class EXPR1, class EXPR2> struct Functor_differs { Functor_differs(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} bool operator()() const { return expr1_() != expr2_(); } template <class T> bool operator()(T const & v1) const { return expr1_(v1) != expr2_(v1); } template <class T1, class T2> bool operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) != expr2_(v1, v2); } template <class T1, class T2, class T3> bool operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) != expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template <class EXPR1, class EXPR2> UnaryFunctor<Functor_differs<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > > operator !=(UnaryFunctor<EXPR1> const & e1, UnaryFunctor<EXPR2> const & e2) { Functor_differs<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > p(e1, e2); return UnaryFunctor<Functor_differs<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > >(p); }
94210 template <class EXPR1, class EXPR2> struct Functor_less; template <class EXPR1, class EXPR2> struct ResultTraits0<Functor_less<EXPR1, EXPR2> > { typedef bool Res; }; template <class EXPR1, class EXPR2, class T1> struct ResultTraits1<Functor_less<EXPR1, EXPR2>, T1> { typedef bool Res; }; template <class EXPR1, class EXPR2, class T1, class T2> struct ResultTraits2<Functor_less<EXPR1, EXPR2>, T1, T2> { typedef bool Res; }; template <class EXPR1, class EXPR2, class T1, class T2, class T3> struct ResultTraits3<Functor_less<EXPR1, EXPR2>, T1, T2, T3> { typedef bool Res; }; template <class EXPR1, class EXPR2> struct Functor_less { Functor_less(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} bool operator()() const { return expr1_() < expr2_(); } template <class T> bool operator()(T const & v1) const { return expr1_(v1) < expr2_(v1); } template <class T1, class T2> bool operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) < expr2_(v1, v2); } template <class T1, class T2, class T3> bool operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) < expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template <class EXPR1, class EXPR2> UnaryFunctor<Functor_less<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > > operator <(UnaryFunctor<EXPR1> const & e1, UnaryFunctor<EXPR2> const & e2) { Functor_less<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > p(e1, e2); return UnaryFunctor<Functor_less<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > >(p); }
94211 template <class EXPR1, class EXPR2> struct Functor_lessEqual; template <class EXPR1, class EXPR2> struct ResultTraits0<Functor_lessEqual<EXPR1, EXPR2> > { typedef bool Res; }; template <class EXPR1, class EXPR2, class T1> struct ResultTraits1<Functor_lessEqual<EXPR1, EXPR2>, T1> { typedef bool Res; }; template <class EXPR1, class EXPR2, class T1, class T2> struct ResultTraits2<Functor_lessEqual<EXPR1, EXPR2>, T1, T2> { typedef bool Res; }; template <class EXPR1, class EXPR2, class T1, class T2, class T3> struct ResultTraits3<Functor_lessEqual<EXPR1, EXPR2>, T1, T2, T3> { typedef bool Res; }; template <class EXPR1, class EXPR2> struct Functor_lessEqual { Functor_lessEqual(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} bool operator()() const { return expr1_() <= expr2_(); } template <class T> bool operator()(T const & v1) const { return expr1_(v1) <= expr2_(v1); } template <class T1, class T2> bool operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) <= expr2_(v1, v2); } template <class T1, class T2, class T3> bool operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) <= expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template <class EXPR1, class EXPR2> UnaryFunctor<Functor_lessEqual<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > > operator <=(UnaryFunctor<EXPR1> const & e1, UnaryFunctor<EXPR2> const & e2) { Functor_lessEqual<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > p(e1, e2); return UnaryFunctor<Functor_lessEqual<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > >(p); }
94212 template <class EXPR1, class EXPR2> struct Functor_greater; template <class EXPR1, class EXPR2> struct ResultTraits0<Functor_greater<EXPR1, EXPR2> > { typedef bool Res; }; template <class EXPR1, class EXPR2, class T1> struct ResultTraits1<Functor_greater<EXPR1, EXPR2>, T1> { typedef bool Res; }; template <class EXPR1, class EXPR2, class T1, class T2> struct ResultTraits2<Functor_greater<EXPR1, EXPR2>, T1, T2> { typedef bool Res; }; template <class EXPR1, class EXPR2, class T1, class T2, class T3> struct ResultTraits3<Functor_greater<EXPR1, EXPR2>, T1, T2, T3> { typedef bool Res; }; template <class EXPR1, class EXPR2> struct Functor_greater { Functor_greater(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} bool operator()() const { return expr1_() > expr2_(); } template <class T> bool operator()(T const & v1) const { return expr1_(v1) > expr2_(v1); } template <class T1, class T2> bool operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) > expr2_(v1, v2); } template <class T1, class T2, class T3> bool operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) > expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template <class EXPR1, class EXPR2> UnaryFunctor<Functor_greater<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > > operator >(UnaryFunctor<EXPR1> const & e1, UnaryFunctor<EXPR2> const & e2) { Functor_greater<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > p(e1, e2); return UnaryFunctor<Functor_greater<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > >(p); }
94213 template <class EXPR1, class EXPR2> struct Functor_greaterEqual; template <class EXPR1, class EXPR2> struct ResultTraits0<Functor_greaterEqual<EXPR1, EXPR2> > { typedef bool Res; }; template <class EXPR1, class EXPR2, class T1> struct ResultTraits1<Functor_greaterEqual<EXPR1, EXPR2>, T1> { typedef bool Res; }; template <class EXPR1, class EXPR2, class T1, class T2> struct ResultTraits2<Functor_greaterEqual<EXPR1, EXPR2>, T1, T2> { typedef bool Res; }; template <class EXPR1, class EXPR2, class T1, class T2, class T3> struct ResultTraits3<Functor_greaterEqual<EXPR1, EXPR2>, T1, T2, T3> { typedef bool Res; }; template <class EXPR1, class EXPR2> struct Functor_greaterEqual { Functor_greaterEqual(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} bool operator()() const { return expr1_() >= expr2_(); } template <class T> bool operator()(T const & v1) const { return expr1_(v1) >= expr2_(v1); } template <class T1, class T2> bool operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) >= expr2_(v1, v2); } template <class T1, class T2, class T3> bool operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) >= expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template <class EXPR1, class EXPR2> UnaryFunctor<Functor_greaterEqual<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > > operator >=(UnaryFunctor<EXPR1> const & e1, UnaryFunctor<EXPR2> const & e2) { Functor_greaterEqual<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > p(e1, e2); return UnaryFunctor<Functor_greaterEqual<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > >(p); }
94214 template <class EXPR1, class EXPR2> struct Functor_and; template <class EXPR1, class EXPR2> struct ResultTraits0<Functor_and<EXPR1, EXPR2> > { typedef bool Res; }; template <class EXPR1, class EXPR2, class T1> struct ResultTraits1<Functor_and<EXPR1, EXPR2>, T1> { typedef bool Res; }; template <class EXPR1, class EXPR2, class T1, class T2> struct ResultTraits2<Functor_and<EXPR1, EXPR2>, T1, T2> { typedef bool Res; }; template <class EXPR1, class EXPR2, class T1, class T2, class T3> struct ResultTraits3<Functor_and<EXPR1, EXPR2>, T1, T2, T3> { typedef bool Res; }; template <class EXPR1, class EXPR2> struct Functor_and { Functor_and(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} bool operator()() const { return expr1_() && expr2_(); } template <class T> bool operator()(T const & v1) const { return expr1_(v1) && expr2_(v1); } template <class T1, class T2> bool operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) && expr2_(v1, v2); } template <class T1, class T2, class T3> bool operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) && expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template <class EXPR1, class EXPR2> UnaryFunctor<Functor_and<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > > operator &&(UnaryFunctor<EXPR1> const & e1, UnaryFunctor<EXPR2> const & e2) { Functor_and<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > p(e1, e2); return UnaryFunctor<Functor_and<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > >(p); }
94215 template <class EXPR1, class EXPR2> struct Functor_or; template <class EXPR1, class EXPR2> struct ResultTraits0<Functor_or<EXPR1, EXPR2> > { typedef bool Res; }; template <class EXPR1, class EXPR2, class T1> struct ResultTraits1<Functor_or<EXPR1, EXPR2>, T1> { typedef bool Res; }; template <class EXPR1, class EXPR2, class T1, class T2> struct ResultTraits2<Functor_or<EXPR1, EXPR2>, T1, T2> { typedef bool Res; }; template <class EXPR1, class EXPR2, class T1, class T2, class T3> struct ResultTraits3<Functor_or<EXPR1, EXPR2>, T1, T2, T3> { typedef bool Res; }; template <class EXPR1, class EXPR2> struct Functor_or { Functor_or(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} bool operator()() const { return expr1_() || expr2_(); } template <class T> bool operator()(T const & v1) const { return expr1_(v1) || expr2_(v1); } template <class T1, class T2> bool operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) || expr2_(v1, v2); } template <class T1, class T2, class T3> bool operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) || expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template <class EXPR1, class EXPR2> UnaryFunctor<Functor_or<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > > operator ||(UnaryFunctor<EXPR1> const & e1, UnaryFunctor<EXPR2> const & e2) { Functor_or<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > p(e1, e2); return UnaryFunctor<Functor_or<UnaryFunctor<EXPR1>, UnaryFunctor<EXPR2> > >(p); }
94216 # 1680 "../include/vigra/functorexpression.hxx"
94217 template <class EXPR, class RES, class ARG>
94218 struct UnaryFctPtrFunctor
94219 {
94220 UnaryFctPtrFunctor(EXPR const & e, RES (*fct)(ARG))
94221 : expr_(e), f_(fct)
94222 {}
94223
94224 RES operator()() const
94225 {
94226 return f_(expr_());
94227 }
94228
94229 template <class T>
94230 RES operator()(T const & v1) const
94231 {
94232 return f_(expr_(v1));
94233 }
94234
94235 template <class T1, class T2>
94236 RES operator()(T1 const & v1, T2 const & v2) const
94237 {
94238 return f_(expr_(v1, v2));
94239 }
94240
94241 template <class T1, class T2, class T3>
94242 RES operator()(T1 const & v1, T2 const & v2, T3 const & v3) const
94243 {
94244 return f_(expr_(v1, v2, v3));
94245 }
94246 protected:
94247
94248 EXPR expr_;
94249 RES (*f_)(ARG);
94250 };
94251
94252 template <class EXPR, class RES, class ARG>
94253 struct ResultTraits0<UnaryFctPtrFunctor<EXPR, RES, ARG> >
94254 {
94255 typedef RES Res;
94256 };
94257
94258 template <class EXPR, class RES, class ARG, class T1>
94259 struct ResultTraits1<UnaryFctPtrFunctor<EXPR, RES, ARG>, T1>
94260 {
94261 typedef RES Res;
94262 };
94263
94264 template <class EXPR, class RES, class ARG, class T1, class T2>
94265 struct ResultTraits2<UnaryFctPtrFunctor<EXPR, RES, ARG>, T1, T2>
94266 {
94267 typedef RES Res;
94268 };
94269
94270 template <class EXPR, class RES, class ARG, class T1, class T2, class T3>
94271 struct ResultTraits3<UnaryFctPtrFunctor<EXPR, RES, ARG>, T1, T2, T3>
94272 {
94273 typedef RES Res;
94274 };
94275
94276 template <class EXPR, class RES, class ARG>
94277 UnaryFunctor<UnaryFctPtrFunctor<UnaryFunctor<EXPR>, RES, ARG> >
94278 applyFct(RES (*f)(ARG), UnaryFunctor<EXPR> const & e)
94279 {
94280 UnaryFctPtrFunctor<UnaryFunctor<EXPR>, RES, ARG> p(e, f);
94281 return UnaryFunctor<UnaryFctPtrFunctor<UnaryFunctor<EXPR>, RES, ARG> >(p);
94282 }
94283
94284
94285
94286
94287
94288
94289
94290 template <class EXPR1, class EXPR2, class RES, class ARG1, class ARG2>
94291 struct BinaryFctPtrFunctor
94292 {
94293 BinaryFctPtrFunctor(EXPR1 const & e1, EXPR2 const & e2,
94294 RES (*f)(ARG1, ARG2))
94295 : expr1_(e1), expr2_(e2), f_(f)
94296 {}
94297
94298 RES operator()() const
94299 {
94300 return f_(expr1_(), expr2_());
94301 }
94302
94303 template <class T>
94304 RES operator()(T const & v1) const
94305 {
94306 return f_(expr1_(v1), expr2_(v1));
94307 }
94308
94309 template <class T1, class T2>
94310 RES operator()(T1 const & v1, T2 const & v2) const
94311 {
94312 return f_(expr1_(v1, v2), expr2_(v1, v2));
94313 }
94314
94315 template <class T1, class T2, class T3>
94316 RES operator()(T1 const & v1, T2 const & v2, T3 const & v3) const
94317 {
94318 return f_(expr1_(v1, v2, v3), expr2_(v1, v2, v3));
94319 }
94320 protected:
94321
94322 EXPR1 expr1_;
94323 EXPR2 expr2_;
94324 RES (*f_)(ARG1, ARG2);
94325 };
94326
94327 template <class EXPR1, class EXPR2, class RES, class ARG1, class ARG2>
94328 struct ResultTraits0<BinaryFctPtrFunctor<EXPR1, EXPR2, RES, ARG1, ARG2> >
94329 {
94330 typedef RES Res;
94331 };
94332
94333 template <class EXPR1, class EXPR2, class RES, class ARG1, class ARG2,
94334 class T1>
94335 struct ResultTraits1<BinaryFctPtrFunctor<EXPR1, EXPR2, RES, ARG1, ARG2>, T1>
94336 {
94337 typedef RES Res;
94338 };
94339
94340 template <class EXPR1, class EXPR2, class RES, class ARG1, class ARG2,
94341 class T1, class T2>
94342 struct ResultTraits2<BinaryFctPtrFunctor<EXPR1, EXPR2, RES, ARG1, ARG2>, T1, T2>
94343 {
94344 typedef RES Res;
94345 };
94346
94347 template <class EXPR1, class EXPR2, class RES, class ARG1, class ARG2,
94348 class T1, class T2, class T3>
94349 struct ResultTraits3<BinaryFctPtrFunctor<EXPR1, EXPR2, RES, ARG1, ARG2>, T1, T2, T3>
94350 {
94351 typedef RES Res;
94352 };
94353
94354 template <class EXPR1, class EXPR2, class RES, class ARG1, class ARG2>
94355 UnaryFunctor<BinaryFctPtrFunctor<UnaryFunctor<EXPR1>,
94356 UnaryFunctor<EXPR2>,
94357 RES, ARG1, ARG2> >
94358 applyFct(RES (*f)(ARG1, ARG2), UnaryFunctor<EXPR1> const & e1,
94359 UnaryFunctor<EXPR2> const & e2)
94360 {
94361 BinaryFctPtrFunctor<UnaryFunctor<EXPR1>,
94362 UnaryFunctor<EXPR2>,
94363 RES, ARG1, ARG2> p(e1, e2, f);
94364 return UnaryFunctor<BinaryFctPtrFunctor<UnaryFunctor<EXPR1>,
94365 UnaryFunctor<EXPR2>,
94366 RES, ARG1, ARG2> >(p);
94367 }
94368
94369
94370
94371
94372
94373
94374
94375 template <class EXPR1, class EXPR2>
94376 struct CommaFunctor
94377 {
94378 CommaFunctor(EXPR1 const & e1, EXPR2 const & e2)
94379 : expr1_(e1), expr2_(e2)
94380 {}
94381
94382 typename ResultTraits0<EXPR2>::Res
94383 operator()() const
94384 {
94385 expr1_();
94386 return expr2_();
94387 }
94388
94389 template <class T>
94390 typename ResultTraits1<EXPR2, T>::Res
94391 operator()(T const & v1) const
94392 {
94393 expr1_(v1);
94394 return expr2_(v1);
94395 }
94396
94397 template <class T1, class T2>
94398 typename ResultTraits2<EXPR2, T1, T2>::Res
94399 operator()(T1 const & v1, T2 const & v2) const
94400 {
94401 expr1_(v1, v2);
94402 return expr2_(v1, v2);
94403 }
94404
94405 template <class T1, class T2, class T3>
94406 typename ResultTraits3<EXPR2, T1, T2, T3>::Res
94407 operator()(T1 const & v1, T2 const & v2, T3 const & v3) const
94408 {
94409 expr1_(v1, v2, v3);
94410 return expr2_(v1, v2, v3);
94411 }
94412
94413 protected:
94414
94415 EXPR1 expr1_;
94416 EXPR2 expr2_;
94417 };
94418
94419 template <class Expr1, class Expr2>
94420 struct ResultTraits0<CommaFunctor<Expr1, Expr2> >
94421 {
94422 typedef typename ResultTraits0<Expr2>::Res Res;
94423 };
94424
94425 template <class Expr1, class Expr2, class T1>
94426 struct ResultTraits1<CommaFunctor<Expr1, Expr2>, T1>
94427 {
94428 typedef typename ResultTraits1<Expr2, T1>::Res Res;
94429 };
94430
94431 template <class Expr1, class Expr2, class T1, class T2>
94432 struct ResultTraits2<CommaFunctor<Expr1, Expr2>, T1, T2>
94433 {
94434 typedef typename ResultTraits2<Expr2, T1, T2>::Res Res;
94435 };
94436
94437 template <class Expr1, class Expr2, class T1, class T2, class T3>
94438 struct ResultTraits3<CommaFunctor<Expr1, Expr2>, T1, T2, T3>
94439 {
94440 typedef typename ResultTraits3<Expr2, T1, T2, T3>::Res Res;
94441 };
94442
94443 template <class EXPR1, class EXPR2>
94444 UnaryFunctor<CommaFunctor<UnaryAnalyser<EXPR1>,
94445 UnaryFunctor<EXPR2> > >
94446 operator,(UnaryAnalyser<EXPR1> const & e1,
94447 UnaryFunctor<EXPR2> const & e2)
94448 {
94449 CommaFunctor<UnaryAnalyser<EXPR1>,
94450 UnaryFunctor<EXPR2> > p(e1, e2);
94451 return UnaryFunctor<CommaFunctor<UnaryAnalyser<EXPR1>,
94452 UnaryFunctor<EXPR2> > >(p);
94453 }
94454
94455
94456
94457 template <class EXPR1, class EXPR2>
94458 struct CommaAnalyser
94459 {
94460 CommaAnalyser(EXPR1 const & e1, EXPR2 const & e2)
94461 : expr1_(e1), expr2_(e2)
94462 {}
94463
94464 void operator()() const
94465 {
94466 expr1_();
94467 expr2_();
94468 }
94469
94470 template <class T>
94471 void operator()(T const & v1) const
94472 {
94473 expr1_(v1);
94474 expr2_(v1);
94475 }
94476
94477 template <class T1, class T2>
94478 void operator()(T1 const & v1, T2 const & v2) const
94479 {
94480 expr1_(v1, v2);
94481 expr2_(v1, v2);
94482 }
94483
94484 template <class T1, class T2, class T3>
94485 void operator()(T1 const & v1, T2 const & v2, T3 const & v3) const
94486 {
94487 expr1_(v1, v2, v3);
94488 expr2_(v1, v2, v3);
94489 }
94490
94491 protected:
94492
94493 EXPR1 expr1_;
94494 EXPR2 expr2_;
94495 };
94496
94497 template <class EXPR1, class EXPR2>
94498 UnaryAnalyser<CommaAnalyser<UnaryAnalyser<EXPR1>,
94499 UnaryAnalyser<EXPR2> > >
94500 operator,(UnaryAnalyser<EXPR1> const & e1,
94501 UnaryAnalyser<EXPR2> const & e2)
94502 {
94503 CommaAnalyser<UnaryAnalyser<EXPR1>,
94504 UnaryAnalyser<EXPR2> > p(e1, e2);
94505 return UnaryAnalyser<CommaAnalyser<UnaryAnalyser<EXPR1>,
94506 UnaryAnalyser<EXPR2> > >(p);
94507 }
94508
94509 }
94510
94511 template <class T>
94512 class FunctorTraits<functor::UnaryFunctor<T> >
94513 : public FunctorTraitsBase<functor::UnaryFunctor<T> >
94514 {
94515 public:
94516 typedef VigraTrueType isInitializer;
94517 typedef VigraTrueType isUnaryFunctor;
94518 typedef VigraTrueType isBinaryFunctor;
94519 typedef VigraTrueType isTernaryFunctor;
94520 };
94521
94522 template <class T>
94523 class FunctorTraits<functor::UnaryAnalyser<T> >
94524 : public FunctorTraitsBase<functor::UnaryAnalyser<T> >
94525 {
94526 public:
94527 typedef VigraTrueType isUnaryAnalyser;
94528 typedef VigraTrueType isBinaryAnalyser;
94529 typedef VigraTrueType isTernaryAnalyser;
94530 };
94531
94532
94533
94534 }
94535 # 42 "mask.h" 2
94536 # 51 "mask.h"
94537 # 1 "/usr/include/boost/lambda/algorithm.hpp" 1 3 4
94538 # 20 "/usr/include/boost/lambda/algorithm.hpp" 3 4
94539 namespace boost {
94540 namespace lambda {
94541
94542 namespace ll {
94543
94544
94545
94546 struct for_each {
94547
94548 template <class Args>
94549 struct sig {
94550 typedef typename boost::remove_const<
94551 typename boost::tuples::element<3, Args>::type
94552 >::type type;
94553 };
94554
94555 template <class A, class C>
94556 C
94557 operator()(A a, A b, C c) const
94558 { return ::std::for_each(a, b, c); }
94559 };
94560
94561
94562
94563 struct find {
94564
94565 template <class Args>
94566 struct sig {
94567 typedef typename boost::remove_const<
94568 typename boost::tuples::element<1, Args>::type
94569 >::type type;
94570 };
94571
94572 template <class A, class C>
94573 A
94574 operator()(A a, A b, const C& c) const
94575 { return ::std::find(a, b, c); }
94576 };
94577
94578
94579
94580
94581 struct find_if {
94582
94583 template <class Args>
94584 struct sig {
94585 typedef typename boost::remove_const<
94586 typename boost::tuples::element<1, Args>::type
94587 >::type type;
94588 };
94589
94590 template <class A, class C>
94591 A
94592 operator()(A a, A b, C c) const
94593 { return ::std::find_if(a, b, c); }
94594 };
94595
94596
94597
94598 struct find_end {
94599
94600 template <class Args>
94601 struct sig {
94602 typedef typename boost::remove_const<
94603 typename boost::tuples::element<1, Args>::type
94604 >::type type;
94605 };
94606
94607 template <class A, class C>
94608 A
94609 operator()(A a, A b, C c, C d) const
94610 { return ::std::find_end(a, b, c, d); }
94611
94612 template <class A, class C, class E>
94613 A
94614 operator()(A a, A b, C c, C d, E e) const
94615 { return ::std::find_end(a, b, c, d, e); }
94616
94617 };
94618
94619
94620
94621 struct find_first_of {
94622
94623 template <class Args>
94624 struct sig {
94625 typedef typename boost::remove_const<
94626 typename boost::tuples::element<1, Args>::type
94627 >::type type;
94628 };
94629
94630 template <class A, class C>
94631 A
94632 operator()(A a, A b, C c, C d) const
94633 { return ::std::find_first_of(a, b, c, d); }
94634
94635 template <class A, class C, class E>
94636 A
94637 operator()(A a, A b, C c, C d, E e) const
94638 { return ::std::find_first_of(a, b, c, d, e); }
94639
94640 };
94641
94642
94643
94644 struct adjacent_find {
94645
94646 template <class Args>
94647 struct sig {
94648 typedef typename boost::remove_const<
94649 typename boost::tuples::element<1, Args>::type
94650 >::type type;
94651 };
94652
94653 template <class A>
94654 A
94655 operator()(A a, A b) const
94656 { return ::std::adjacent_find(a, b); }
94657
94658 template <class A, class C>
94659 A
94660 operator()(A a, A b, C c) const
94661 { return ::std::adjacent_find(a, b, c); }
94662
94663 };
94664
94665
94666
94667 struct count {
94668
94669 template <class Args>
94670 struct sig {
94671 typedef typename ::std::iterator_traits<
94672 typename boost::remove_const<
94673 typename boost::tuples::element<1, Args>::type
94674 >::type
94675 >::difference_type type;
94676 };
94677
94678 template <class A, class C >
94679 typename ::std::iterator_traits<A>::difference_type
94680 operator()(A a, A b, const C& c) const
94681 { return ::std::count(a, b, c); }
94682 };
94683
94684
94685
94686 struct count_if {
94687
94688 template <class Args>
94689 struct sig {
94690 typedef typename ::std::iterator_traits<
94691 typename boost::remove_const<
94692 typename boost::tuples::element<1, Args>::type
94693 >::type
94694 >::difference_type type;
94695 };
94696
94697 template <class A, class C >
94698 typename ::std::iterator_traits<A>::difference_type
94699 operator()(A a, A b, C c) const
94700 { return ::std::count_if(a, b, c); }
94701 };
94702
94703
94704
94705
94706 struct mismatch {
94707
94708 template <class Args>
94709 struct sig {
94710 typedef typename boost::remove_const<
94711 typename boost::tuples::element<1, Args>::type
94712 >::type element1_type;
94713
94714 typedef typename boost::remove_const<
94715 typename boost::tuples::element<3, Args>::type
94716 >::type element2_type;
94717
94718 typedef ::std::pair< element1_type, element2_type > type;
94719 };
94720
94721 template <class A, class C >
94722 ::std::pair<A,C>
94723 operator()(A a, A b, C c) const
94724 { return ::std::mismatch(a, b, c); }
94725
94726 template <class A, class C, class D>
94727 ::std::pair<A,C>
94728 operator()(A a, A b, C c, D d) const
94729 { return ::std::mismatch(a, b, c, d); }
94730
94731 };
94732
94733
94734
94735 struct equal {
94736
94737 template <class Args>
94738 struct sig {
94739 typedef bool type;
94740 };
94741
94742 template <class A, class C >
94743 bool
94744 operator()(A a, A b, C c) const
94745 { return ::std::equal(a, b, c); }
94746
94747 template <class A, class C, class D>
94748 bool
94749 operator()(A a, A b, C c, D d) const
94750 { return ::std::equal(a, b, c, d); }
94751
94752 };
94753
94754
94755
94756 struct search {
94757
94758 template <class Args>
94759 struct sig {
94760 typedef typename boost::remove_const<
94761 typename boost::tuples::element<1, Args>::type
94762 >::type type;
94763 };
94764
94765 template <class A, class C>
94766 A
94767 operator()(A a, A b, C c, C d) const
94768 { return std::search(a, b, c, d);}
94769
94770 template <class A, class C, class E>
94771 A
94772 operator()(A a, A b, C c, C d, E e) const
94773 { return std::search(a, b, c, d, e);}
94774
94775 };
94776
94777
94778
94779 struct copy {
94780
94781 template <class Args>
94782 struct sig {
94783 typedef typename boost::remove_const<
94784 typename boost::tuples::element<3, Args>::type
94785 >::type type;
94786 };
94787
94788 template <class A, class C>
94789 C
94790 operator()(A a, A b, C c) const
94791 { return ::std::copy(a, b, c); }
94792
94793 };
94794
94795
94796
94797 struct copy_backward {
94798
94799 template <class Args>
94800 struct sig {
94801 typedef typename boost::remove_const<
94802 typename boost::tuples::element<3, Args>::type
94803 >::type type;
94804 };
94805
94806 template <class A, class C>
94807 C
94808 operator()(A a, A b, C c) const
94809 { return ::std::copy_backward(a, b, c); }
94810
94811 };
94812
94813
94814
94815 struct swap {
94816
94817 template <class Args>
94818 struct sig {
94819 typedef void type;
94820 };
94821
94822 template <class A>
94823 void
94824 operator()(A a, A b) const
94825 { ::std::swap(a, b); }
94826
94827 };
94828
94829
94830
94831 struct swap_ranges {
94832
94833 template <class Args>
94834 struct sig {
94835 typedef typename boost::remove_const<
94836 typename boost::tuples::element<3, Args>::type
94837 >::type type;
94838 };
94839
94840 template <class A, class C>
94841 C
94842 operator()(A a, A b, C c) const
94843 { return ::std::swap_ranges(a, b, c); }
94844
94845 };
94846
94847
94848
94849 struct iter_swap {
94850
94851 template <class Args>
94852 struct sig {
94853 typedef void type;
94854 };
94855
94856 template <class A>
94857 void
94858 operator()(A a, A b) const
94859 { ::std::iter_swap(a, b); }
94860
94861 };
94862
94863
94864
94865
94866 struct transform {
94867
94868 template <class Args>
94869 struct sig {
94870 typedef typename boost::remove_const<
94871 typename boost::tuples::element<
94872 boost::tuples::length<Args>::value - 2,
94873 Args
94874 >::type
94875 >::type type;
94876 };
94877
94878 template <class A, class C, class D>
94879 C
94880 operator()(A a, A b, C c, D d) const
94881 { return std::transform(a, b, c, d);}
94882
94883 template <class A, class C, class D, class E>
94884 D
94885 operator()(A a, A b, C c, D d, E e) const
94886 { return std::transform(a, b, c, d, e);}
94887
94888 };
94889
94890
94891
94892 struct replace {
94893
94894 template <class Args>
94895 struct sig {
94896 typedef void type;
94897 };
94898
94899 template <class A, class C>
94900 void
94901 operator()(A a, A b, const C& c, const C& d) const
94902 { ::std::replace(a, b, c, d); }
94903
94904 };
94905
94906
94907
94908 struct replace_if {
94909
94910 template <class Args>
94911 struct sig {
94912 typedef void type;
94913 };
94914
94915 template <class A, class C, class D>
94916 void
94917 operator()(A a, A b, C c, const D& d) const
94918 { ::std::replace_if(a, b, c, d); }
94919
94920 };
94921
94922
94923
94924 struct replace_copy {
94925
94926 template <class Args>
94927 struct sig {
94928 typedef typename boost::remove_const<
94929 typename boost::tuples::element<3, Args>::type
94930 >::type type;
94931 };
94932
94933 template <class A, class C, class D>
94934 C
94935 operator()(A a, A b, C c, const D& d, const D& e) const
94936 { return ::std::replace_copy(a, b, c, d, e); }
94937
94938 };
94939
94940
94941
94942 struct replace_copy_if {
94943
94944 template <class Args>
94945 struct sig {
94946 typedef typename boost::remove_const<
94947 typename boost::tuples::element<3, Args>::type
94948 >::type type;
94949 };
94950
94951 template <class A, class C, class D, class E>
94952 C
94953 operator()(A a, A b, C c, D d, const E& e) const
94954 { return ::std::replace_copy_if(a, b, c, d, e); }
94955
94956 };
94957
94958
94959
94960 struct fill {
94961
94962 template <class Args>
94963 struct sig {
94964 typedef void type;
94965 };
94966
94967 template <class A, class C>
94968 void
94969 operator()(A a, A b, const C& c) const
94970 { ::std::fill(a, b, c); }
94971
94972 };
94973
94974
94975
94976 struct fill_n {
94977
94978 template <class Args>
94979 struct sig {
94980 typedef void type;
94981 };
94982
94983 template <class A, class B, class C>
94984 void
94985 operator()(A a, B b, const C& c) const
94986 { ::std::fill_n(a, b, c); }
94987
94988 };
94989
94990
94991
94992 struct generate {
94993
94994 template <class Args>
94995 struct sig {
94996 typedef void type;
94997 };
94998
94999 template <class A, class C>
95000 void
95001 operator()(A a, A b, C c) const
95002 { ::std::generate(a, b, c); }
95003
95004 };
95005
95006
95007
95008 struct generate_n {
95009
95010 template <class Args>
95011 struct sig {
95012 typedef void type;
95013 };
95014
95015 template <class A, class B, class C>
95016 void
95017 operator()(A a, B b, C c) const
95018 { ::std::generate_n(a, b, c); }
95019
95020 };
95021
95022
95023
95024 struct remove {
95025
95026 template <class Args>
95027 struct sig {
95028 typedef typename boost::remove_const<
95029 typename boost::tuples::element<1, Args>::type
95030 >::type type;
95031 };
95032
95033 template <class A, class C >
95034 A
95035 operator()(A a, A b, const C& c) const
95036 { return ::std::remove(a, b, c); }
95037 };
95038
95039
95040
95041 struct remove_if {
95042
95043 template <class Args>
95044 struct sig {
95045 typedef typename boost::remove_const<
95046 typename boost::tuples::element<1, Args>::type
95047 >::type type;
95048 };
95049
95050 template <class A, class C >
95051 A
95052 operator()(A a, A b, C c) const
95053 { return ::std::remove_if(a, b, c); }
95054 };
95055
95056
95057
95058 struct remove_copy {
95059
95060 template <class Args>
95061 struct sig {
95062 typedef typename boost::remove_const<
95063 typename boost::tuples::element<3, Args>::type
95064 >::type type;
95065 };
95066
95067 template <class A, class C, class D >
95068 C
95069 operator()(A a, A b, C c, const D& d) const
95070 { return ::std::remove_copy(a, b, c, d); }
95071 };
95072
95073
95074
95075 struct remove_copy_if {
95076
95077 template <class Args>
95078 struct sig {
95079 typedef typename boost::remove_const<
95080 typename boost::tuples::element<3, Args>::type
95081 >::type type;
95082 };
95083
95084 template <class A, class C, class D >
95085 C
95086 operator()(A a, A b, C c, D d) const
95087 { return ::std::remove_copy_if(a, b, c, d); }
95088 };
95089
95090
95091
95092 struct unique {
95093
95094 template <class Args>
95095 struct sig {
95096 typedef typename boost::remove_const<
95097 typename boost::tuples::element<1, Args>::type
95098 >::type type;
95099 };
95100
95101 template <class A>
95102 A
95103 operator()(A a, A b) const
95104 { return ::std::unique(a, b); }
95105
95106 template <class A, class C>
95107 A
95108 operator()(A a, A b, C c) const
95109 { return ::std::unique(a, b, c); }
95110
95111 };
95112
95113
95114
95115 struct unique_copy {
95116
95117 template <class Args>
95118 struct sig {
95119 typedef typename boost::remove_const<
95120 typename boost::tuples::element<3, Args>::type
95121 >::type type;
95122 };
95123
95124 template <class A, class C >
95125 C
95126 operator()(A a, A b, C c) const
95127 { return ::std::unique_copy(a, b, c); }
95128
95129 template <class A, class C, class D>
95130 C
95131 operator()(A a, A b, C c, D d) const
95132 { return ::std::unique_copy(a, b, c, d); }
95133
95134 };
95135
95136
95137
95138 struct reverse {
95139
95140 template <class Args>
95141 struct sig {
95142 typedef void type;
95143 };
95144
95145 template <class A>
95146 void
95147 operator()(A a, A b) const
95148 { ::std::reverse(a, b); }
95149
95150 };
95151
95152
95153
95154 struct reverse_copy {
95155
95156 template <class Args>
95157 struct sig {
95158 typedef typename boost::remove_const<
95159 typename boost::tuples::element<3, Args>::type
95160 >::type type;
95161 };
95162
95163 template <class A, class C >
95164 C
95165 operator()(A a, A b, C c) const
95166 { return ::std::reverse_copy(a, b, c); }
95167
95168 };
95169
95170
95171
95172 struct rotate {
95173
95174 template <class Args>
95175 struct sig {
95176 typedef void type;
95177 };
95178
95179 template <class A>
95180 void
95181 operator()(A a, A b, A c) const
95182 { ::std::rotate(a, b, c); }
95183
95184 };
95185
95186
95187
95188 struct rotate_copy {
95189
95190 template <class Args>
95191 struct sig {
95192 typedef typename boost::remove_const<
95193 typename boost::tuples::element<3, Args>::type
95194 >::type type;
95195 };
95196
95197 template <class A, class D>
95198 D
95199 operator()(A a, A b, A c, D d) const
95200 { return ::std::rotate_copy(a, b, c, d); }
95201
95202 };
95203
95204
95205
95206 struct random_shuffle {
95207
95208 template <class Args>
95209 struct sig {
95210 typedef void type;
95211 };
95212
95213 template <class A>
95214 void
95215 operator()(A a, A b) const
95216 { ::std::random_shuffle(a, b); }
95217
95218 template <class A, class C>
95219 void
95220 operator()(A a, A b, const C& c) const
95221 { ::std::random_shuffle(a, b, c); }
95222
95223 };
95224
95225
95226
95227
95228 struct partition {
95229
95230 template <class Args>
95231 struct sig {
95232 typedef typename boost::remove_const<
95233 typename boost::tuples::element<1, Args>::type
95234 >::type type;
95235 };
95236
95237 template <class A, class C>
95238 A
95239 operator()(A a, A b, C c) const
95240 { return ::std::partition(a, b, c); }
95241
95242 };
95243
95244
95245
95246 struct stable_partition {
95247
95248 template <class Args>
95249 struct sig {
95250 typedef typename boost::remove_const<
95251 typename boost::tuples::element<1, Args>::type
95252 >::type type;
95253 };
95254
95255 template <class A, class C>
95256 A
95257 operator()(A a, A b, C c) const
95258 { return ::std::stable_partition(a, b, c); }
95259
95260 };
95261
95262
95263
95264 struct sort {
95265
95266 template <class Args>
95267 struct sig {
95268 typedef void type;
95269 };
95270
95271 template <class A>
95272 void
95273 operator()(A a, A b) const
95274 { ::std::sort(a, b); }
95275
95276 template <class A, class C>
95277 void
95278 operator()(A a, A b, C c) const
95279 { ::std::sort(a, b, c); }
95280
95281 };
95282
95283
95284
95285 struct stable_sort {
95286
95287 template <class Args>
95288 struct sig {
95289 typedef void type;
95290 };
95291
95292 template <class A>
95293 void
95294 operator()(A a, A b) const
95295 { ::std::stable_sort(a, b); }
95296
95297 template <class A, class C>
95298 void
95299 operator()(A a, A b, C c) const
95300 { ::std::stable_sort(a, b, c); }
95301
95302 };
95303
95304
95305
95306 struct partial_sort {
95307
95308 template <class Args>
95309 struct sig {
95310 typedef void type;
95311 };
95312
95313 template <class A>
95314 void
95315 operator()(A a, A b, A c) const
95316 { ::std::partial_sort(a, b, c); }
95317
95318 template <class A, class D>
95319 void
95320 operator()(A a, A b, A c, D d) const
95321 { ::std::partial_sort(a, b, c, d); }
95322
95323 };
95324
95325
95326
95327 struct partial_sort_copy {
95328
95329 template <class Args>
95330 struct sig {
95331 typedef typename boost::remove_const<
95332 typename boost::tuples::element<3, Args>::type
95333 >::type type;
95334 };
95335
95336 template <class A, class C>
95337 C
95338 operator()(A a, A b, C c, C d) const
95339 { return ::std::partial_sort_copy(a, b, c, d); }
95340
95341 template <class A, class C, class E >
95342 C
95343 operator()(A a, A b, C c, C d, E e) const
95344 { return ::std::partial_sort_copy(a, b, c, d, e); }
95345 };
95346
95347
95348
95349 struct nth_element {
95350
95351 template <class Args>
95352 struct sig {
95353 typedef void type;
95354 };
95355
95356 template <class A>
95357 void
95358 operator()(A a, A b, A c) const
95359 { ::std::nth_element(a, b, c); }
95360
95361 template <class A, class D>
95362 void
95363 operator()(A a, A b, A c, D d) const
95364 { ::std::nth_element(a, b, c, d); }
95365
95366 };
95367
95368
95369
95370 struct lower_bound {
95371
95372 template <class Args>
95373 struct sig {
95374 typedef typename boost::remove_const<
95375 typename boost::tuples::element<1, Args>::type
95376 >::type type;
95377 };
95378
95379 template <class A, class C>
95380 A
95381 operator()(A a, A b, const C& c) const
95382 { return ::std::lower_bound(a, b, c); }
95383
95384 template <class A, class C, class D>
95385 A
95386 operator()(A a, A b, const C& c, D d) const
95387 { return ::std::lower_bound(a, b, c, d); }
95388
95389 };
95390
95391
95392
95393 struct upper_bound {
95394
95395 template <class Args>
95396 struct sig {
95397 typedef typename boost::remove_const<
95398 typename boost::tuples::element<1, Args>::type
95399 >::type type;
95400 };
95401
95402 template <class A, class C>
95403 A
95404 operator()(A a, A b, const C& c) const
95405 { return ::std::upper_bound(a, b, c); }
95406
95407 template <class A, class C, class D>
95408 A
95409 operator()(A a, A b, const C& c, D d) const
95410 { return ::std::upper_bound(a, b, c, d); }
95411
95412 };
95413
95414
95415
95416 struct equal_range {
95417
95418 template <class Args>
95419 struct sig {
95420 typedef typename boost::remove_const<
95421 typename boost::tuples::element<1, Args>::type
95422 >::type element_type;
95423
95424 typedef ::std::pair< element_type, element_type > type;
95425 };
95426
95427 template <class A, class C>
95428 ::std::pair<A,A>
95429 operator()(A a, A b, const C& c) const
95430 { return ::std::equal_range(a, b, c); }
95431
95432 template <class A, class C, class D>
95433 ::std::pair<A,A>
95434 operator()(A a, A b, const C& c, D d) const
95435 { return ::std::equal_range(a, b, c, d); }
95436
95437 };
95438
95439
95440
95441 struct binary_search {
95442
95443 template <class Args>
95444 struct sig {
95445 typedef bool type;
95446 };
95447
95448 template <class A, class C >
95449 bool
95450 operator()(A a, A b, const C& c) const
95451 { return ::std::binary_search(a, b, c); }
95452
95453 template <class A, class C, class D>
95454 bool
95455 operator()(A a, A b, const C& c, D d) const
95456 { return ::std::binary_search(a, b, c, d); }
95457
95458 };
95459
95460
95461
95462 struct merge {
95463
95464 template <class Args>
95465 struct sig {
95466 typedef typename boost::remove_const<
95467 typename boost::tuples::element<5, Args>::type
95468 >::type type;
95469 };
95470
95471 template <class A, class C, class E>
95472 E
95473 operator()(A a, A b, C c, C d, E e) const
95474 { return std::merge(a, b, c, d, e);}
95475
95476 template <class A, class C, class E, class F>
95477 E
95478 operator()(A a, A b, C c, C d, E e, F f) const
95479 { return std::merge(a, b, c, d, e, f);}
95480
95481 };
95482
95483
95484
95485 struct inplace_merge {
95486
95487 template <class Args>
95488 struct sig {
95489 typedef void type;
95490 };
95491
95492 template <class A>
95493 void
95494 operator()(A a, A b, A c) const
95495 { ::std::inplace_merge(a, b, c); }
95496
95497 template <class A, class D>
95498 void
95499 operator()(A a, A b, A c, D d) const
95500 { ::std::inplace_merge(a, b, c, d); }
95501
95502 };
95503
95504
95505
95506 struct includes {
95507
95508 template <class Args>
95509 struct sig {
95510 typedef bool type;
95511 };
95512
95513 template <class A, class C>
95514 bool
95515 operator()(A a, A b, C c, C d) const
95516 { return ::std::includes(a, b, c, d); }
95517
95518 template <class A, class C, class E>
95519 bool
95520 operator()(A a, A b, C c, C d, E e) const
95521 { return ::std::includes(a, b, c, d, e); }
95522
95523 };
95524
95525
95526
95527 struct set_union {
95528
95529 template <class Args>
95530 struct sig {
95531 typedef typename boost::remove_const<
95532 typename boost::tuples::element<5, Args>::type
95533 >::type type;
95534 };
95535
95536 template <class A, class C, class E>
95537 E
95538 operator()(A a, A b, C c, C d, E e) const
95539 { return std::set_union(a, b, c, d, e);}
95540
95541 template <class A, class C, class E, class F>
95542 E
95543 operator()(A a, A b, C c, C d, E e, F f) const
95544 { return std::set_union(a, b, c, d, e, f);}
95545
95546 };
95547
95548
95549
95550 struct set_intersection {
95551
95552 template <class Args>
95553 struct sig {
95554 typedef typename boost::remove_const<
95555 typename boost::tuples::element<5, Args>::type
95556 >::type type;
95557 };
95558
95559 template <class A, class C, class E>
95560 E
95561 operator()(A a, A b, C c, C d, E e) const
95562 { return std::set_intersection(a, b, c, d, e);}
95563
95564 template <class A, class C, class E, class F>
95565 E
95566 operator()(A a, A b, C c, C d, E e, F f) const
95567 { return std::set_intersection(a, b, c, d, e, f);}
95568
95569 };
95570
95571
95572
95573 struct set_difference {
95574
95575 template <class Args>
95576 struct sig {
95577 typedef typename boost::remove_const<
95578 typename boost::tuples::element<5, Args>::type
95579 >::type type;
95580 };
95581
95582 template <class A, class C, class E>
95583 E
95584 operator()(A a, A b, C c, C d, E e) const
95585 { return std::set_difference(a, b, c, d, e);}
95586
95587 template <class A, class C, class E, class F>
95588 E
95589 operator()(A a, A b, C c, C d, E e, F f) const
95590 { return std::set_difference(a, b, c, d, e, f);}
95591
95592 };
95593
95594
95595
95596
95597 struct set_symmetric_difference {
95598
95599 template <class Args>
95600 struct sig {
95601 typedef typename boost::remove_const<
95602 typename boost::tuples::element<5, Args>::type
95603 >::type type;
95604 };
95605
95606 template <class A, class C, class E>
95607 E
95608 operator()(A a, A b, C c, C d, E e) const
95609 { return std::set_symmetric_difference(a, b, c, d, e);}
95610
95611 template <class A, class C, class E, class F>
95612 E
95613 operator()(A a, A b, C c, C d, E e, F f) const
95614 { return std::set_symmetric_difference(a, b, c, d, e, f);}
95615
95616 };
95617
95618
95619
95620 struct push_heap {
95621
95622 template <class Args>
95623 struct sig {
95624 typedef void type;
95625 };
95626
95627 template <class A>
95628 void
95629 operator()(A a, A b) const
95630 { ::std::push_heap(a, b); }
95631
95632 template <class A, class C>
95633 void
95634 operator()(A a, A b, C c) const
95635 { ::std::push_heap(a, b, c); }
95636
95637 };
95638
95639
95640
95641 struct pop_heap {
95642
95643 template <class Args>
95644 struct sig {
95645 typedef void type;
95646 };
95647
95648 template <class A>
95649 void
95650 operator()(A a, A b) const
95651 { ::std::pop_heap(a, b); }
95652
95653 template <class A, class C>
95654 void
95655 operator()(A a, A b, C c) const
95656 { ::std::pop_heap(a, b, c); }
95657
95658 };
95659
95660
95661
95662
95663 struct make_heap {
95664
95665 template <class Args>
95666 struct sig {
95667 typedef void type;
95668 };
95669
95670 template <class A>
95671 void
95672 operator()(A a, A b) const
95673 { ::std::make_heap(a, b); }
95674
95675 template <class A, class C>
95676 void
95677 operator()(A a, A b, C c) const
95678 { ::std::make_heap(a, b, c); }
95679
95680 };
95681
95682
95683
95684 struct sort_heap {
95685
95686 template <class Args>
95687 struct sig {
95688 typedef void type;
95689 };
95690
95691 template <class A>
95692 void
95693 operator()(A a, A b) const
95694 { ::std::sort_heap(a, b); }
95695
95696 template <class A, class C>
95697 void
95698 operator()(A a, A b, C c) const
95699 { ::std::sort_heap(a, b, c); }
95700
95701 };
95702
95703
95704
95705 struct min {
95706
95707 template <class Args>
95708 struct sig {
95709 typedef typename boost::remove_const<
95710 typename boost::tuples::element<1, Args>::type
95711 >::type type;
95712 };
95713
95714 template <class A>
95715 A
95716 operator()(const A& a, const A& b) const
95717 { return (::std::min)(a, b); }
95718
95719 template <class A, class C>
95720 A
95721 operator()(const A& a, const A& b, C c) const
95722 { return (::std::min)(a, b, c); }
95723
95724 };
95725
95726
95727
95728 struct max {
95729
95730 template <class Args>
95731 struct sig {
95732 typedef typename boost::remove_const<
95733 typename boost::tuples::element<1, Args>::type
95734 >::type type;
95735 };
95736
95737 template <class A>
95738 A
95739 operator()(const A& a, const A& b) const
95740 { return (::std::max)(a, b); }
95741
95742 template <class A, class C>
95743 A
95744 operator()(const A& a, const A& b, C c) const
95745 { return (::std::max)(a, b, c); }
95746
95747 };
95748
95749 struct min_element {
95750
95751 template <class Args>
95752 struct sig {
95753 typedef typename boost::remove_const<
95754 typename boost::tuples::element<1, Args>::type
95755 >::type type;
95756 };
95757
95758 template <class A>
95759 A
95760 operator()(A a, A b) const
95761 { return ::std::min_element(a, b); }
95762
95763 template <class A, class C>
95764 A
95765 operator()(A a, A b, C c) const
95766 { return ::std::min_element(a, b, c); }
95767
95768 };
95769
95770
95771
95772 struct max_element {
95773
95774 template <class Args>
95775 struct sig {
95776 typedef typename boost::remove_const<
95777 typename boost::tuples::element<1, Args>::type
95778 >::type type;
95779 };
95780
95781 template <class A>
95782 A
95783 operator()(A a, A b) const
95784 { return ::std::max_element(a, b); }
95785
95786 template <class A, class C>
95787 A
95788 operator()(A a, A b, C c) const
95789 { return ::std::max_element(a, b, c); }
95790
95791 };
95792
95793
95794
95795
95796 struct lexicographical_compare {
95797
95798 template <class Args>
95799 struct sig {
95800 typedef bool type;
95801 };
95802
95803 template <class A, class C>
95804 bool
95805 operator()(A a, A b, C c, C d) const
95806 { return ::std::lexicographical_compare(a, b, c, d); }
95807
95808 template <class A, class C, class E>
95809 bool
95810 operator()(A a, A b, C c, C d, E e) const
95811 { return ::std::lexicographical_compare(a, b, c, d, e); }
95812
95813 };
95814
95815
95816
95817 struct next_permutation {
95818
95819 template <class Args>
95820 struct sig {
95821 typedef bool type;
95822 };
95823
95824 template <class A>
95825 bool
95826 operator()(A a, A b) const
95827 { return ::std::next_permutation(a, b); }
95828
95829 template <class A, class C >
95830 bool
95831 operator()(A a, A b, C c) const
95832 { return ::std::next_permutation(a, b, c); }
95833
95834 };
95835
95836
95837
95838 struct prev_permutation {
95839
95840 template <class Args>
95841 struct sig {
95842 typedef bool type;
95843 };
95844
95845 template <class A>
95846 bool
95847 operator()(A a, A b) const
95848 { return ::std::prev_permutation(a, b); }
95849
95850 template <class A, class C >
95851 bool
95852 operator()(A a, A b, C c) const
95853 { return ::std::prev_permutation(a, b, c); }
95854
95855 };
95856
95857
95858
95859
95860
95861 }
95862 # 1367 "/usr/include/boost/lambda/algorithm.hpp" 3 4
95863 struct call_begin { template <class Args> struct sig { typedef typename boost::remove_const< typename boost::tuples::element<1, Args>::type >::type::const_iterator type; }; template<class T> typename T::const_iterator operator()(const T& t) const { return t.begin(); } };
95864 struct call_end { template <class Args> struct sig { typedef typename boost::remove_const< typename boost::tuples::element<1, Args>::type >::type::const_iterator type; }; template<class T> typename T::const_iterator operator()(const T& t) const { return t.end(); } };
95865
95866
95867
95868 }
95869 }
95870 # 52 "mask.h" 2
95871
95872 # 1 "/usr/include/boost/lambda/if.hpp" 1 3 4
95873 # 24 "/usr/include/boost/lambda/if.hpp" 3 4
95874 namespace boost {
95875 namespace lambda {
95876
95877
95878
95879 class ifthen_action {};
95880 class ifthenelse_action {};
95881 class ifthenelsereturn_action {};
95882
95883
95884 template<class Args>
95885 class
95886 lambda_functor_base<ifthen_action, Args> {
95887 public:
95888 Args args;
95889 template <class T> struct sig { typedef void type; };
95890 public:
95891 explicit lambda_functor_base(const Args& a) : args(a) {}
95892
95893 template<class RET, class A, class B, class C, class Env>
95894 RET call(A& a, B& b, C& c, Env& env) const {
95895 if (detail::select(boost::tuples::get<0>(args), a, b, c, env))
95896 detail::select(boost::tuples::get<1>(args), a, b, c, env);
95897 }
95898 };
95899
95900
95901 template <class Arg1, class Arg2>
95902 inline const
95903 lambda_functor<
95904 lambda_functor_base<
95905 ifthen_action,
95906 tuple<lambda_functor<Arg1>, lambda_functor<Arg2> >
95907 >
95908 >
95909 if_then(const lambda_functor<Arg1>& a1, const lambda_functor<Arg2>& a2) {
95910 return
95911 lambda_functor_base<
95912 ifthen_action,
95913 tuple<lambda_functor<Arg1>, lambda_functor<Arg2> >
95914 >
95915 ( tuple<lambda_functor<Arg1>, lambda_functor<Arg2> >(a1, a2) );
95916 }
95917
95918
95919
95920 template<class Args>
95921 class
95922 lambda_functor_base<ifthenelse_action, Args> {
95923 public:
95924 Args args;
95925 template <class T> struct sig { typedef void type; };
95926 public:
95927 explicit lambda_functor_base(const Args& a) : args(a) {}
95928
95929 template<class RET, class A, class B, class C, class Env>
95930 RET call(A& a, B& b, C& c, Env& env) const {
95931 if (detail::select(boost::tuples::get<0>(args), a, b, c, env))
95932 detail::select(boost::tuples::get<1>(args), a, b, c, env);
95933 else
95934 detail::select(boost::tuples::get<2>(args), a, b, c, env);
95935 }
95936 };
95937
95938
95939
95940
95941
95942 template <class Arg1, class Arg2, class Arg3>
95943 inline const
95944 lambda_functor<
95945 lambda_functor_base<
95946 ifthenelse_action,
95947 tuple<lambda_functor<Arg1>, lambda_functor<Arg2>, lambda_functor<Arg3> >
95948 >
95949 >
95950 if_then_else(const lambda_functor<Arg1>& a1, const lambda_functor<Arg2>& a2,
95951 const lambda_functor<Arg3>& a3) {
95952 return
95953 lambda_functor_base<
95954 ifthenelse_action,
95955 tuple<lambda_functor<Arg1>, lambda_functor<Arg2>, lambda_functor<Arg3> >
95956 >
95957 (tuple<lambda_functor<Arg1>, lambda_functor<Arg2>, lambda_functor<Arg3> >
95958 (a1, a2, a3) );
95959 }
95960
95961
95962
95963 template <class Arg1, class Arg2, class Arg3>
95964 inline const
95965 lambda_functor<
95966 lambda_functor_base<
95967 other_action<ifthenelsereturn_action>,
95968 tuple<lambda_functor<Arg1>,
95969 typename const_copy_argument<Arg2>::type,
95970 typename const_copy_argument<Arg3>::type>
95971 >
95972 >
95973 if_then_else_return(const lambda_functor<Arg1>& a1,
95974 const Arg2 & a2,
95975 const Arg3 & a3) {
95976 return
95977 lambda_functor_base<
95978 other_action<ifthenelsereturn_action>,
95979 tuple<lambda_functor<Arg1>,
95980 typename const_copy_argument<Arg2>::type,
95981 typename const_copy_argument<Arg3>::type>
95982 > ( tuple<lambda_functor<Arg1>,
95983 typename const_copy_argument<Arg2>::type,
95984 typename const_copy_argument<Arg3>::type> (a1, a2, a3) );
95985 }
95986
95987 namespace detail {
95988
95989
95990
95991
95992
95993
95994 template<int Phase, bool AtoB, bool BtoA, bool SameType, class A, class B>
95995 struct return_type_2_ifthenelsereturn;
95996
95997
95998 template<int Phase, class A, class B>
95999 struct return_type_2_ifthenelsereturn<Phase, true, true, false, A, B> {
96000 typedef
96001 detail::return_type_deduction_failure<return_type_2_ifthenelsereturn> type;
96002
96003 };
96004
96005 template<int Phase, class A, class B>
96006 struct return_type_2_ifthenelsereturn<Phase, true, true, true, A, B> {
96007 typedef A type;
96008 };
96009
96010
96011
96012 template<int Phase, class A, class B>
96013 struct return_type_2_ifthenelsereturn<Phase, true, false, false, A, B> {
96014 typedef B type;
96015 };
96016
96017
96018 template<int Phase, class A, class B>
96019 struct return_type_2_ifthenelsereturn<Phase, false, true, false, A, B> {
96020 typedef A type;
96021 };
96022
96023
96024
96025 template<class A, class B>
96026 struct return_type_2_ifthenelsereturn<1, false, false, false, A, B> {
96027
96028
96029
96030 typedef const typename boost::remove_reference<A>::type plainA;
96031 typedef const typename boost::remove_reference<B>::type plainB;
96032
96033
96034 typedef typename
96035 return_type_2_ifthenelsereturn<
96036 2,
96037 boost::is_convertible<plainA,plainB>::value,
96038 boost::is_convertible<plainB,plainA>::value,
96039 boost::is_same<plainA,plainB>::value,
96040 plainA,
96041 plainB>::type type;
96042 };
96043
96044
96045 template<class A, class B>
96046 struct return_type_2_ifthenelsereturn<2, false, false, false, A, B> {
96047 typedef
96048 detail::return_type_deduction_failure<return_type_2_ifthenelsereturn> type;
96049
96050 };
96051
96052
96053
96054
96055 template<class A, class B>
96056 struct non_numeric_types {
96057 typedef typename
96058 return_type_2_ifthenelsereturn<
96059 1,
96060 is_convertible<A,B>::value,
96061 is_convertible<B,A>::value,
96062 is_same<A,B>::value,
96063 A,
96064 B>::type type;
96065 };
96066
96067
96068
96069
96070 template<int CodeA, int CodeB, class A, class B>
96071 struct arithmetic_or_not {
96072 typedef typename
96073 return_type_2<arithmetic_action<plus_action>, A, B>::type type;
96074
96075 };
96076
96077
96078
96079
96080 template<int CodeA, class A, class B>
96081 struct arithmetic_or_not<CodeA, CodeA, A, B> {
96082 typedef typename non_numeric_types<A, B>::type type;
96083 };
96084
96085
96086 template<class A, class B>
96087 struct arithmetic_or_not <-1, -1, A, B> {
96088 typedef typename non_numeric_types<A, B>::type type;
96089 };
96090 template<int CodeB, class A, class B>
96091 struct arithmetic_or_not <-1, CodeB, A, B> {
96092 typedef typename non_numeric_types<A, B>::type type;
96093 };
96094 template<int CodeA, class A, class B>
96095 struct arithmetic_or_not <CodeA, -1, A, B> {
96096 typedef typename non_numeric_types<A, B>::type type;
96097 };
96098
96099
96100
96101
96102
96103
96104 template <class A, class B>
96105 struct same_or_not {
96106 typedef typename detail::remove_reference_and_cv<A>::type plainA;
96107 typedef typename detail::remove_reference_and_cv<B>::type plainB;
96108
96109 typedef typename
96110 arithmetic_or_not<
96111 detail::promote_code<plainA>::value,
96112 detail::promote_code<plainB>::value,
96113 A,
96114 B>::type type;
96115 };
96116
96117 template <class A> struct same_or_not<A, A> {
96118 typedef A type;
96119 };
96120
96121 }
96122
96123
96124 template<class A, class B>
96125 struct return_type_2<other_action<ifthenelsereturn_action>, A, B> {
96126
96127 typedef typename detail::array_to_pointer<A>::type A1;
96128 typedef typename detail::array_to_pointer<B>::type B1;
96129
96130 typedef typename
96131 boost::add_const<typename detail::same_or_not<A1, B1>::type>::type type;
96132 };
96133 # 291 "/usr/include/boost/lambda/if.hpp" 3 4
96134 template<class Args>
96135 class
96136 lambda_functor_base<other_action<ifthenelsereturn_action>, Args> {
96137 public:
96138 Args args;
96139
96140 template <class SigArgs> struct sig {
96141 private:
96142 typedef typename detail::nth_return_type_sig<1, Args, SigArgs>::type ret1;
96143 typedef typename detail::nth_return_type_sig<2, Args, SigArgs>::type ret2;
96144 public:
96145 typedef typename return_type_2<
96146 other_action<ifthenelsereturn_action>, ret1, ret2
96147 >::type type;
96148 };
96149
96150 public:
96151 explicit lambda_functor_base(const Args& a) : args(a) {}
96152
96153 template<class RET, class A, class B, class C, class Env>
96154 RET call(A& a, B& b, C& c, Env& env) const {
96155 return (detail::select(boost::tuples::get<0>(args), a, b, c, env)) ?
96156 detail::select(boost::tuples::get<1>(args), a, b, c, env)
96157 :
96158 detail::select(boost::tuples::get<2>(args), a, b, c, env);
96159 }
96160 };
96161 # 352 "/usr/include/boost/lambda/if.hpp" 3 4
96162 template <typename CondT, typename ThenT, typename ElseT>
96163 struct if_then_else_composite {
96164
96165 typedef if_then_else_composite<CondT, ThenT, ElseT> self_t;
96166
96167 template <class SigArgs>
96168 struct sig { typedef void type; };
96169
96170 if_then_else_composite(
96171 CondT const& cond_,
96172 ThenT const& then_,
96173 ElseT const& else__)
96174 : cond(cond_), then(then_), else_(else__) {}
96175
96176 template <class Ret, class A, class B, class C, class Env>
96177 Ret call(A& a, B& b, C& c, Env& env) const
96178 {
96179 if (cond.internal_call(a, b, c, env))
96180 then.internal_call(a, b, c, env);
96181 else
96182 else_.internal_call(a, b, c, env);
96183 }
96184
96185 CondT cond; ThenT then; ElseT else_;
96186 };
96187
96188
96189 template <typename CondT, typename ThenT>
96190 struct else_gen {
96191
96192 else_gen(CondT const& cond_, ThenT const& then_)
96193 : cond(cond_), then(then_) {}
96194
96195 template <typename ElseT>
96196 lambda_functor<if_then_else_composite<CondT, ThenT,
96197 typename as_lambda_functor<ElseT>::type> >
96198 operator[](ElseT const& else_)
96199 {
96200 typedef if_then_else_composite<CondT, ThenT,
96201 typename as_lambda_functor<ElseT>::type>
96202 result;
96203
96204 return result(cond, then, to_lambda_functor(else_));
96205 }
96206
96207 CondT cond; ThenT then;
96208 };
96209
96210
96211 template <typename CondT, typename ThenT>
96212 struct if_then_composite {
96213
96214 template <class SigArgs>
96215 struct sig { typedef void type; };
96216
96217 if_then_composite(CondT const& cond_, ThenT const& then_)
96218 : cond(cond_), then(then_), else_(cond, then) {}
96219
96220 template <class Ret, class A, class B, class C, class Env>
96221 Ret call(A& a, B& b, C& c, Env& env) const
96222 {
96223 if (cond.internal_call(a, b, c, env))
96224 then.internal_call(a, b, c, env);
96225 }
96226
96227 CondT cond; ThenT then;
96228 else_gen<CondT, ThenT> else_;
96229 };
96230
96231
96232 template <typename CondT>
96233 struct if_gen {
96234
96235 if_gen(CondT const& cond_)
96236 : cond(cond_) {}
96237
96238 template <typename ThenT>
96239 lambda_functor<if_then_composite<
96240 typename as_lambda_functor<CondT>::type,
96241 typename as_lambda_functor<ThenT>::type> >
96242 operator[](ThenT const& then) const
96243 {
96244 typedef if_then_composite<
96245 typename as_lambda_functor<CondT>::type,
96246 typename as_lambda_functor<ThenT>::type>
96247 result;
96248
96249 return result(
96250 to_lambda_functor(cond),
96251 to_lambda_functor(then));
96252 }
96253
96254 CondT cond;
96255 };
96256
96257
96258 template <typename CondT>
96259 inline if_gen<CondT>
96260 if_(CondT const& cond)
96261 {
96262 return if_gen<CondT>(cond);
96263 }
96264
96265
96266
96267 }
96268 }
96269 # 54 "mask.h" 2
96270
96271 using std::make_pair;
96272 using std::vector;
96273
96274
96275
96276 using __gnu_cxx::slist;
96277
96278
96279 using vigra::combineThreeImages;
96280 using vigra::combineTwoImages;
96281 using vigra::CrackContourCirculator;
96282 using vigra::exportImage;
96283 using vigra::ImageExportInfo;
96284 using vigra::ImageImportInfo;
96285 using vigra::importImageAlpha;
96286 using vigra::initImageIf;
96287 using vigra::LinearIntensityTransform;
96288 using vigra::linearRangeMapping;
96289 using vigra::NumericTraits;
96290 using vigra::Point2D;
96291 using vigra::Rect2D;
96292 using vigra::RGBToGrayAccessor;
96293 using vigra::Size2D;
96294 using vigra::transformImage;
96295 using vigra::transformImageIf;
96296
96297 using vigra::functor::Arg1;
96298 using vigra::functor::Arg2;
96299 using vigra::functor::Arg3;
96300 using vigra::functor::ifThenElse;
96301 using vigra::functor::Param;
96302 using vigra::functor::UnaryFunctor;
96303
96304 using vigra_ext::copyPaintedSetToImage;
96305
96306 using boost::lambda::_1;
96307 using boost::lambda::_2;
96308 using boost::lambda::if_then_else_return;
96309 using boost::lambda::call_begin;
96310 using boost::lambda::call_end;
96311 using boost::lambda::constant;
96312 using boost::lambda::protect;
96313
96314 namespace enblend {
96315
96316
96317 typedef slist<pair<bool, Point2D> > Segment;
96318 typedef vector<Segment*> Contour;
96319 typedef vector<Contour*> ContourVector;
96320
96321 template <typename PixelType, typename ResultType>
96322 class PixelDifferenceFunctor
96323 {
96324 typedef typename EnblendNumericTraits<PixelType>::ImagePixelComponentType PixelComponentType;
96325 typedef typename EnblendNumericTraits<ResultType>::ImagePixelComponentType ResultPixelComponentType;
96326 typedef LinearIntensityTransform<ResultType> RangeMapper;
96327
96328 public:
96329
96330 PixelDifferenceFunctor() : rm(linearRangeMapping(NumericTraits<PixelComponentType>::min(),
96331 NumericTraits<PixelComponentType>::max(),
96332 ResultType(NumericTraits<ResultPixelComponentType>::min()),
96333 ResultType(NumericTraits<ResultPixelComponentType>::max()))) { }
96334
96335 inline ResultType operator()(const PixelType & a, const PixelType & b) const {
96336 typedef typename NumericTraits<PixelType>::isScalar src_is_scalar;
96337 return diff(a, b, src_is_scalar());
96338 }
96339
96340 protected:
96341 inline ResultType diff(const PixelType & a, const PixelType & b, VigraFalseType) const {
96342 PixelComponentType aLum = a.luminance();
96343 PixelComponentType bLum = b.luminance();
96344 PixelComponentType aHue = a.hue();
96345 PixelComponentType bHue = b.hue();
96346 PixelComponentType lumDiff = (aLum > bLum) ? (aLum - bLum) : (bLum - aLum);
96347 PixelComponentType hueDiff = (aHue > bHue) ? (aHue - bHue) : (bHue - aHue);
96348 if (hueDiff > (NumericTraits<PixelComponentType>::max() / 2)) hueDiff = NumericTraits<PixelComponentType>::max() - hueDiff;
96349 return rm(std::max(hueDiff, lumDiff));
96350 }
96351
96352 inline ResultType diff(const PixelType & a, const PixelType & b, VigraTrueType) const {
96353 typedef typename NumericTraits<PixelType>::isSigned src_is_signed;
96354 return scalar_diff(a, b, src_is_signed());
96355 }
96356
96357 inline ResultType scalar_diff(const PixelType & a, const PixelType & b, VigraTrueType) const {
96358 return rm(std::abs(a - b));
96359 }
96360
96361
96362 inline ResultType scalar_diff(const PixelType & a, const PixelType & b, VigraFalseType) const {
96363 return rm(std::abs(static_cast<int>(a) - static_cast<int>(b)));
96364 }
96365
96366 RangeMapper rm;
96367
96368 };
96369
96370 template <typename MaskType>
96371 void fillContour(MaskType *mask, Contour & contour, Diff2D offset) {
96372
96373 typedef typename MaskType::PixelType MaskPixelType;
96374
96375 miPixel pixels[2];
96376 pixels[0] = NumericTraits<MaskPixelType>::max();
96377 pixels[1] = NumericTraits<MaskPixelType>::max();
96378 miGC *pGC = miNewGC(2, pixels);
96379 miPaintedSet *paintedSet = miNewPaintedSet();
96380
96381 int totalPoints = 0;
96382 for (Contour::iterator currentSegment = contour.begin();
96383 currentSegment != contour.end();
96384 ++currentSegment) {
96385 totalPoints += (*currentSegment)->size();
96386 }
96387
96388 miPoint *points = new miPoint[totalPoints];
96389
96390 int i = 0;
96391 for (Contour::iterator currentSegment = contour.begin();
96392 currentSegment != contour.end();
96393 ++currentSegment) {
96394 for (Segment::iterator vertexIterator = (*currentSegment)->begin();
96395 vertexIterator != (*currentSegment)->end();
96396 ++vertexIterator) {
96397
96398 points[i].x = vertexIterator->second.x;
96399 points[i].y = vertexIterator->second.y;
96400 ++i;
96401 }
96402 }
96403
96404 miFillPolygon(paintedSet, pGC, MI_SHAPE_GENERAL, MI_COORD_MODE_ORIGIN, totalPoints, points);
96405
96406 delete[] points;
96407
96408 copyPaintedSetToImage(destImageRange(*mask), paintedSet, offset);
96409
96410 miDeleteGC(pGC);
96411 miDeletePaintedSet(paintedSet);
96412 }
96413
96414 template <typename MaskType>
96415 void maskBounds(MaskType *mask, Rect2D & uBB, Rect2D & mBB) {
96416
96417 typedef typename MaskType::PixelType MaskPixelType;
96418 typedef typename MaskType::traverser MaskIteratorType;
96419 typedef typename MaskType::Accessor MaskAccessor;
96420
96421
96422
96423 mBB = Rect2D(Point2D(mask->size()), Point2D(0,0));
96424
96425 MaskIteratorType myPrev = mask->upperLeft();
96426 MaskIteratorType my = mask->upperLeft() + Diff2D(0,1);
96427 MaskIteratorType mend = mask->lowerRight();
96428 MaskIteratorType mxLeft = myPrev;
96429 MaskIteratorType mx = myPrev + Diff2D(1,0);
96430 for (int x = 1; mx.x < mend.x; ++x, ++mx.x, ++mxLeft.x) {
96431 if (*mxLeft != *mx) mBB |= Rect2D(x-1, 0, x+1, 1);
96432 }
96433 for (int y = 1; my.y < mend.y; ++y, ++my.y, ++myPrev.y) {
96434 mxLeft = my;
96435 mx = my + Diff2D(1,0);
96436 MaskIteratorType mxUpLeft = myPrev;
96437 MaskIteratorType mxUp = myPrev + Diff2D(1,0);
96438
96439 if (*mxUpLeft != *mxLeft) {
96440
96441 mBB |= Rect2D(0, y-1, 1, y+1);
96442 }
96443
96444 for (int x = 1; mx.x < mend.x; ++x, ++mx.x, ++mxLeft.x, ++mxUp.x) {
96445 if (*mxLeft != *mx) mBB |= Rect2D(x-1, y, x+1, y+1);
96446 if (*mxUp != *mx) mBB |= Rect2D(x, y-1, x+1, y+1);
96447 }
96448 }
96449
96450
96451 if (mBB.isEmpty()) {
96452
96453
96454 if (*(mask->upperLeft()) == NumericTraits<MaskPixelType>::zero()) {
96455
96456
96457 throw std::runtime_error("Mask is entirely black, but white image was not identified as redundant.");
96458 }
96459 else {
96460
96461
96462
96463 mBB = uBB;
96464
96465 cerr << "enblend: the previous images are completely overlapped by the current images"
96466 << endl;
96467 }
96468 } else {
96469
96470
96471 mBB.moveBy(uBB.upperLeft());
96472 }
96473
96474 if (Verbose > 1) {
96475 cout << "Mask transition line bounding box: " << mBB << endl;
96476 }
96477
96478 }
96479
96480
96481
96482 template <typename ImageType, typename AlphaType, typename MaskType>
96483 MaskType *createMask(const ImageType* const white,
96484 const ImageType* const black,
96485 const AlphaType* const whiteAlpha,
96486 const AlphaType* const blackAlpha,
96487 const Rect2D& uBB,
96488 const Rect2D& iBB,
96489 const bool wraparound) {
96490
96491 typedef typename ImageType::PixelType ImagePixelType;
96492 typedef typename MaskType::PixelType MaskPixelType;
96493 typedef typename MaskType::traverser MaskIteratorType;
96494 typedef typename MaskType::Accessor MaskAccessor;
96495
96496 if (LoadMaskFileName != __null) {
96497
96498 MaskType *mask = new MaskType(uBB.size());
96499 ImageImportInfo maskInfo(LoadMaskFileName);
96500 if (maskInfo.width() != uBB.width() || maskInfo.height() != uBB.height()) {
96501 cerr << "enblend: load-mask warning: mask " << LoadMaskFileName << " has size "
96502 << "(" << maskInfo.width() << "x" << maskInfo.height() << ")"
96503 << " but image union has size " << uBB.size() << "."
96504 << " Make sure this is the right mask for the given images." << endl;
96505 }
96506 importImage(maskInfo, destImage(*mask));
96507 delete[] LoadMaskFileName;
96508 LoadMaskFileName = __null;
96509 return mask;
96510 }
96511
96512
96513 Size2D nftInputSize;
96514 Rect2D nftInputBB;
96515 int nftStride;
96516 if (CoarseMask) {
96517
96518
96519 nftInputSize = Size2D(((uBB.width() + 7) >> 3), ((uBB.height() + 7) >> 3));
96520 nftInputBB = Rect2D(Size2D(uBB.width() >> 3, uBB.height() >> 3));
96521 nftStride = 8;
96522 } else {
96523
96524 nftInputSize = uBB.size();
96525 nftInputBB = Rect2D(nftInputSize);
96526 nftStride = 1;
96527 }
96528
96529
96530
96531
96532
96533 MaskType *nftInputImage = new MaskType(nftInputSize);
96534
96535
96536
96537
96538
96539 combineTwoImages(stride(nftStride, nftStride, uBB.apply(srcImageRange(*whiteAlpha))),
96540 stride(nftStride, nftStride, uBB.apply(srcImage(*blackAlpha))),
96541 nftInputBB.apply(destImage(*nftInputImage)),
96542 ifThenElse(Arg1() ^ Arg2(),
96543 ifThenElse(Arg1(),
96544 Param(NumericTraits<MaskPixelType>::max()),
96545 Param(NumericTraits<MaskPixelType>::zero())),
96546 Param(NumericTraits<MaskPixelType>::one())));
96547
96548 Size2D nftOutputSize;
96549 Diff2D nftOutputOffset;
96550 if (!CoarseMask && !OptimizeMask) {
96551
96552 nftOutputSize = nftInputSize;
96553 nftOutputOffset = Diff2D(0,0);
96554 } else {
96555
96556 nftOutputSize = nftInputSize + Diff2D(2,2);
96557 nftOutputOffset = Diff2D(1,1);
96558 }
96559
96560 MaskType *nftOutputImage = new MaskType(nftOutputSize);
96561
96562
96563
96564
96565
96566
96567 nearestFeatureTransform(wraparound,
96568 srcImageRange(*nftInputImage),
96569 destIter(nftOutputImage->upperLeft() + nftOutputOffset),
96570 NumericTraits<MaskPixelType>::one());
96571
96572
96573
96574
96575
96576
96577 delete nftInputImage;
96578
96579
96580
96581
96582
96583
96584 if (!CoarseMask && !OptimizeMask) {
96585
96586 return nftOutputImage;
96587 }
96588
96589
96590 Contour rawSegments;
96591
96592 Point2D borderUL(1, 1);
96593 Point2D borderLR(nftOutputImage->width() - 1, nftOutputImage->height() - 1);
96594 MaskIteratorType my = nftOutputImage->upperLeft() + Diff2D(1, 1);
96595 MaskIteratorType mend = nftOutputImage->lowerRight() + Diff2D(-1, -1);
96596 for (int y = 1; my.y < mend.y; ++y, ++my.y) {
96597 MaskIteratorType mx = my;
96598 MaskPixelType lastColor = NumericTraits<MaskPixelType>::zero();
96599
96600 for (int x = 1; mx.x < mend.x; ++x, ++mx.x) {
96601 if ((*mx == NumericTraits<MaskPixelType>::max())
96602 && (lastColor == NumericTraits<MaskPixelType>::zero())) {
96603
96604
96605 vector<Point2D> excessPoints;
96606 Segment *snake = new Segment();
96607 rawSegments.push_back(snake);
96608
96609
96610 CrackContourCirculator<MaskIteratorType> crack(mx);
96611 CrackContourCirculator<MaskIteratorType> crackEnd(crack);
96612 bool lastPointFrozen = false;
96613 int distanceLastPoint = 0;
96614 do {
96615 Point2D currentPoint = *crack + Diff2D(x, y);
96616 crack++;
96617 Point2D nextPoint = *crack + Diff2D(x, y);
96618
96619
96620 if ((currentPoint.x == borderUL.x) || (currentPoint.x == borderLR.x)
96621 || (currentPoint.y == borderUL.y) || (currentPoint.y == borderLR.y)) {
96622
96623
96624 if ((currentPoint.x == borderUL.x && currentPoint.y == borderUL.y)
96625 || (currentPoint.x == borderUL.x && currentPoint.y == borderLR.y)
96626 || (currentPoint.x == borderLR.x && currentPoint.y == borderUL.y)
96627 || (currentPoint.x == borderLR.x && currentPoint.y == borderLR.y)) {
96628 snake->push_front(make_pair(false, currentPoint));
96629 distanceLastPoint = 0;
96630 }
96631 else if (!lastPointFrozen
96632 || ((nextPoint.x != borderUL.x) && (nextPoint.x != borderLR.x)
96633 && (nextPoint.y != borderUL.y) && (nextPoint.y != borderLR.y))) {
96634 snake->push_front(make_pair(false, currentPoint));
96635 distanceLastPoint = 0;
96636 }
96637 else {
96638 excessPoints.push_back(currentPoint);
96639 }
96640 lastPointFrozen = true;
96641 }
96642 else {
96643
96644 if ((distanceLastPoint % MaskVectorizeDistance) == 0) {
96645 snake->push_front(make_pair(true, currentPoint));
96646 distanceLastPoint = 0;
96647 } else {
96648 excessPoints.push_back(currentPoint);
96649 }
96650 lastPointFrozen = false;
96651 }
96652 distanceLastPoint++;
96653 } while (crack != crackEnd);
96654
96655
96656 for (Segment::iterator vertexIterator = snake->begin();
96657 vertexIterator != snake->end(); ++vertexIterator) {
96658 (*nftOutputImage)[vertexIterator->second] = NumericTraits<MaskPixelType>::one();
96659
96660
96661 vertexIterator->second = nftStride * (vertexIterator->second + Diff2D(-1, -1));
96662
96663
96664 if (vertexIterator->first
96665 && ((*whiteAlpha)[vertexIterator->second + uBB.upperLeft()] == NumericTraits<MaskPixelType>::zero())
96666 && ((*blackAlpha)[vertexIterator->second + uBB.upperLeft()] == NumericTraits<MaskPixelType>::zero())) {
96667
96668 vertexIterator->first = false;
96669 }
96670 }
96671 for (vector<Point2D>::iterator vertexIterator = excessPoints.begin();
96672 vertexIterator != excessPoints.end(); ++vertexIterator) {
96673
96674
96675
96676 (*nftOutputImage)[*vertexIterator] = NumericTraits<MaskPixelType>::one();
96677 }
96678
96679 }
96680
96681 lastColor = *mx;
96682 }
96683 }
96684
96685 delete nftOutputImage;
96686
96687
96688
96689 if (!OptimizeMask) {
96690
96691 MaskType *mask = new MaskType(uBB.size());
96692 fillContour(mask, rawSegments, Diff2D(0,0));
96693
96694 std::for_each(rawSegments.begin(), rawSegments.end(), bind(delete_ptr(), _1));
96695 return mask;
96696 }
96697
96698
96699 ContourVector contours;
96700 for (Contour::iterator segments = rawSegments.begin();
96701 segments != rawSegments.end(); ++segments) {
96702 Segment *snake = *segments;
96703
96704
96705 Contour *currentContour = new Contour();
96706 contours.push_back(currentContour);
96707
96708
96709 bool closedContour = true;
96710 Segment::iterator vertexIterator = snake->begin();
96711 for (Segment::iterator vertexIterator = snake->begin(); vertexIterator != snake->end(); ++vertexIterator) {
96712 if (!vertexIterator->first) {
96713 closedContour = false;
96714 break;
96715 }
96716 }
96717
96718
96719 if (closedContour) {
96720 currentContour->push_back(snake);
96721 continue;
96722 }
96723
96724 if (snake->front().first) {
96725
96726 Segment::iterator firstNonmoveableVertex = snake->begin();
96727 while (firstNonmoveableVertex->first) ++firstNonmoveableVertex;
96728
96729
96730 Segment::iterator firstNonmoveablePlusOne = firstNonmoveableVertex;
96731 ++firstNonmoveablePlusOne;
96732 snake->insert(snake->end(), snake->begin(), firstNonmoveablePlusOne);
96733
96734
96735 snake->erase(snake->begin(), firstNonmoveableVertex);
96736 }
96737
96738
96739 Segment::iterator lastMoveableVertex = snake->begin();
96740 for (Segment::iterator vertexIterator = snake->begin(); vertexIterator != snake->end(); ++vertexIterator) {
96741 if (vertexIterator->first) lastMoveableVertex = vertexIterator;
96742 }
96743
96744 Segment *currentSegment = __null;
96745 bool insideMoveableSegment = false;
96746 bool passedLastMoveableVertex = false;
96747 Segment::iterator lastNonmoveableVertex = snake->begin();
96748 for (Segment::iterator vertexIterator = snake->begin(); vertexIterator != snake->end(); ++vertexIterator) {
96749
96750
96751 if (currentSegment == __null) {
96752 currentSegment = new Segment();
96753 currentContour->push_back(currentSegment);
96754 }
96755
96756
96757
96758
96759 if (vertexIterator == lastMoveableVertex) passedLastMoveableVertex = true;
96760
96761
96762 if (!vertexIterator->first) lastNonmoveableVertex = vertexIterator;
96763
96764
96765
96766
96767
96768 if (vertexIterator->first && currentSegment->empty()) {
96769 currentSegment->push_front(*lastNonmoveableVertex);
96770 }
96771
96772
96773 currentSegment->push_front(*vertexIterator);
96774
96775 if (!insideMoveableSegment && vertexIterator->first) {
96776
96777 insideMoveableSegment = true;
96778 }
96779 else if (insideMoveableSegment && !vertexIterator->first && !passedLastMoveableVertex) {
96780
96781 insideMoveableSegment = false;
96782
96783 currentSegment->reverse();
96784
96785 currentSegment = __null;
96786 }
96787 }
96788
96789
96790 if (currentSegment != __null) currentSegment->reverse();
96791
96792 delete snake;
96793 }
96794
96795 rawSegments.clear();
96796
96797 int totalSegments = 0;
96798 for (ContourVector::iterator currentContour = contours.begin(); currentContour != contours.end(); ++currentContour) {
96799 totalSegments += (*currentContour)->size();
96800 }
96801
96802 if (Verbose > 0) {
96803 if (totalSegments == 1) {
96804 cout << "Optimizing 1 distinct seam." << endl;
96805 } else {
96806 cout << "Optimizing " << totalSegments << " distinct seams." << endl;
96807 }
96808 }
96809
96810
96811
96812 Rect2D vBB;
96813 bool initializedVBB = false;
96814 for (ContourVector::iterator currentContour = contours.begin();
96815 currentContour != contours.end();
96816 ++currentContour) {
96817
96818 for (Contour::iterator currentSegment = (*currentContour)->begin();
96819 currentSegment != (*currentContour)->end();
96820 ++currentSegment) {
96821
96822 Segment::iterator lastVertex = (*currentSegment)->begin();
96823 bool foundFirstMoveableVertex = false;
96824 for (Segment::iterator vertexIterator = (*currentSegment)->begin();
96825 vertexIterator != (*currentSegment)->end();
96826 ++vertexIterator) {
96827
96828 if (vertexIterator->first) {
96829 if (!initializedVBB) {
96830 vBB = Rect2D(vertexIterator->second, Size2D(1,1));
96831 initializedVBB = true;
96832 } else {
96833 vBB |= vertexIterator->second;
96834 }
96835
96836 if (!foundFirstMoveableVertex) vBB |= lastVertex->second;
96837
96838 foundFirstMoveableVertex = true;
96839 }
96840 else if (foundFirstMoveableVertex) {
96841
96842 vBB |= vertexIterator->second;
96843 break;
96844 }
96845
96846 lastVertex = vertexIterator;
96847 }
96848 }
96849 }
96850
96851
96852 vBB.moveBy(uBB.upperLeft());
96853
96854
96855
96856 Rect2D iBBPlus = iBB;
96857 iBBPlus.addBorder(1);
96858 vBB |= iBBPlus;
96859
96860
96861 Rect2D uvBB = vBB & uBB;
96862
96863
96864 Diff2D uvBBOffset = uvBB.upperLeft() - vBB.upperLeft();
96865
96866 Size2D mismatchImageSize;
96867 int mismatchImageStride;
96868 Diff2D uvBBStrideOffset;
96869
96870 if (CoarseMask) {
96871
96872
96873 if (uvBBOffset.x % 2) vBB.setUpperLeft(vBB.upperLeft() + Diff2D(-1, 0));
96874 if (uvBBOffset.y % 2) vBB.setUpperLeft(vBB.upperLeft() + Diff2D(0, -1));
96875 uvBBStrideOffset = (uvBB.upperLeft() - vBB.upperLeft()) / 2;
96876 mismatchImageStride = 2;
96877 mismatchImageSize = (vBB.size() + Diff2D(1, 1)) / 2;
96878 } else {
96879 uvBBStrideOffset = uvBBOffset;
96880 mismatchImageStride = 1;
96881 mismatchImageSize = vBB.size();
96882 }
96883
96884 typedef UInt8 MismatchImagePixelType;
96885 EnblendNumericTraits<MismatchImagePixelType>::ImageType mismatchImage(mismatchImageSize,
96886 NumericTraits<MismatchImagePixelType>::max());
96887
96888
96889 EnblendNumericTraits<RGBValue<MismatchImagePixelType> >::ImageType *visualizeImage = __null;
96890 if (VisualizeMaskFileName) {
96891 visualizeImage = new EnblendNumericTraits<RGBValue<MismatchImagePixelType> >::ImageType(mismatchImageSize);
96892 }
96893
96894
96895
96896
96897
96898
96899
96900 combineTwoImages(stride(mismatchImageStride, mismatchImageStride, uvBB.apply(srcImageRange(*white))),
96901 stride(mismatchImageStride, mismatchImageStride, uvBB.apply(srcImage(*black))),
96902 destIter(mismatchImage.upperLeft() + uvBBStrideOffset),
96903 PixelDifferenceFunctor<ImagePixelType, MismatchImagePixelType>());
96904
96905 if (visualizeImage) {
96906
96907 copyImage(srcImageRange(mismatchImage), destImage(*visualizeImage));
96908 }
96909
96910
96911 combineThreeImages(stride(mismatchImageStride, mismatchImageStride, uvBB.apply(srcImageRange(*whiteAlpha))),
96912 stride(mismatchImageStride, mismatchImageStride, uvBB.apply(srcImage(*blackAlpha))),
96913 srcIter(mismatchImage.upperLeft() + uvBBStrideOffset),
96914 destIter(mismatchImage.upperLeft() + uvBBStrideOffset),
96915 ifThenElse(Arg1() & Arg2(), Arg3(), Param(NumericTraits<MismatchImagePixelType>::max())));
96916
96917
96918 int segmentNumber = 0;
96919 for (ContourVector::iterator currentContour = contours.begin();
96920 currentContour != contours.end();
96921 ++currentContour) {
96922
96923 for (Contour::iterator currentSegment = (*currentContour)->begin();
96924 currentSegment != (*currentContour)->end();
96925 ++currentSegment) {
96926
96927 Segment *snake = *currentSegment;
96928
96929 if (Verbose > 0) {
96930 cout << "Strategy 1, s" << segmentNumber++ << ":";
96931 cout.flush();
96932 }
96933
96934
96935 for (Segment::iterator vertexIterator = snake->begin();
96936 vertexIterator != snake->end();
96937 ++vertexIterator) {
96938 vertexIterator->second = (vertexIterator->second + uBB.upperLeft() - vBB.upperLeft()) / mismatchImageStride;
96939 }
96940
96941 annealSnake(&mismatchImage, snake, visualizeImage);
96942
96943
96944 Segment::iterator lastVertex = snake->previous(snake->end());
96945 for (Segment::iterator vertexIterator = snake->begin();
96946 vertexIterator != snake->end(); ) {
96947
96948 if (vertexIterator->first &&
96949 (mismatchImage[vertexIterator->second] == NumericTraits<MismatchImagePixelType>::max())) {
96950
96951 if (vertexIterator == snake->begin()) {
96952 snake->pop_front();
96953 vertexIterator = snake->begin();
96954 } else {
96955 vertexIterator = snake->erase_after(lastVertex);
96956 }
96957
96958 bool needsBreak = false;
96959 if (vertexIterator == snake->end()) {
96960 vertexIterator = snake->begin();
96961 needsBreak = true;
96962 }
96963
96964
96965
96966
96967
96968 if (snake->empty()) break;
96969
96970 if (!(lastVertex->first || vertexIterator->first)) {
96971
96972
96973 if (vertexIterator == snake->begin()) {
96974 snake->push_front(make_pair(true, vertexIterator->second));
96975 lastVertex = snake->begin();
96976 } else {
96977 lastVertex = snake->insert_after(lastVertex, make_pair(true, vertexIterator->second));
96978 }
96979 }
96980
96981 if (needsBreak) break;
96982 }
96983 else {
96984 lastVertex = vertexIterator;
96985 ++vertexIterator;
96986 }
96987 }
96988
96989 if (Verbose > 0) {
96990 cout << endl;
96991 }
96992
96993
96994
96995
96996 if (snake->empty()) {
96997 cerr << endl
96998 << "enblend: Seam s" << (segmentNumber-1) << " is a tiny closed contour and was removed."
96999 << endl;
97000 }
97001 }
97002 }
97003
97004 if (Verbose > 0) {
97005 cout << "Strategy 2:";
97006 cout.flush();
97007 }
97008
97009
97010
97011 combineThreeImages(stride(mismatchImageStride, mismatchImageStride, uvBB.apply(srcImageRange(*whiteAlpha))),
97012 stride(mismatchImageStride, mismatchImageStride, uvBB.apply(srcImage(*blackAlpha))),
97013 srcIter(mismatchImage.upperLeft() + uvBBStrideOffset),
97014 destIter(mismatchImage.upperLeft() + uvBBStrideOffset),
97015 ifThenElse(!(Arg1() || Arg2()), Param(NumericTraits<MismatchImagePixelType>::one()), Arg3()));
97016
97017 if (visualizeImage) {
97018 combineThreeImages(stride(mismatchImageStride, mismatchImageStride, uvBB.apply(srcImageRange(*whiteAlpha))),
97019 stride(mismatchImageStride, mismatchImageStride, uvBB.apply(srcImage(*blackAlpha))),
97020 srcIter(visualizeImage->upperLeft() + uvBBStrideOffset),
97021 destIter(visualizeImage->upperLeft() + uvBBStrideOffset),
97022 ifThenElse(Arg1() ^ Arg2(), Param(RGBValue<MismatchImagePixelType>(128,0,0)), Arg3()));
97023 }
97024
97025 Rect2D withinMismatchImage(mismatchImageSize);
97026
97027
97028 segmentNumber = 0;
97029 for (ContourVector::iterator currentContour = contours.begin();
97030 currentContour != contours.end();
97031 ++currentContour) {
97032
97033 for (Contour::iterator currentSegment = (*currentContour)->begin();
97034 currentSegment != (*currentContour)->end();
97035 ++currentSegment) {
97036
97037 Segment *snake = *currentSegment;
97038
97039 if (Verbose > 0) {
97040 cout << " s" << segmentNumber++;
97041 cout.flush();
97042 }
97043
97044 for (Segment::iterator currentVertex = snake->begin(); ; ) {
97045 Segment::iterator nextVertex = currentVertex;
97046 ++nextVertex;
97047 if (nextVertex == snake->end()) nextVertex = snake->begin();
97048
97049 if (currentVertex->first || nextVertex->first) {
97050
97051 Point2D currentPoint = currentVertex->second;
97052 Point2D nextPoint = nextVertex->second;
97053
97054 Rect2D pointSurround(currentPoint, Size2D(1,1));
97055 pointSurround |= Rect2D(nextPoint, Size2D(1,1));
97056 pointSurround.addBorder(DijkstraRadius);
97057 pointSurround &= withinMismatchImage;
97058
97059
97060
97061 BasicImage<MismatchImagePixelType> mismatchROIImage(pointSurround.size());
97062 copyImage(pointSurround.apply(srcImageRange(mismatchImage)), destImage(mismatchROIImage));
97063
97064 vector<Point2D> *shortPath = minCostPath(srcImageRange(mismatchROIImage),
97065 Point2D(nextPoint - pointSurround.upperLeft()),
97066 Point2D(currentPoint - pointSurround.upperLeft()));
97067
97068 for (vector<Point2D>::iterator shortPathPoint = shortPath->begin();
97069 shortPathPoint != shortPath->end();
97070 ++shortPathPoint) {
97071 snake->insert_after(currentVertex, make_pair(false, *shortPathPoint + pointSurround.upperLeft()));
97072
97073 if (visualizeImage) {
97074 (*visualizeImage)[*shortPathPoint + pointSurround.upperLeft()] =
97075 RGBValue<MismatchImagePixelType>(255, 255, 0);
97076 }
97077 }
97078
97079 delete shortPath;
97080
97081 if (visualizeImage) {
97082 (*visualizeImage)[currentPoint] = RGBValue<MismatchImagePixelType>(0, currentVertex->first ? 200 : 230, 0);
97083 (*visualizeImage)[nextPoint] = RGBValue<MismatchImagePixelType>(0, nextVertex->first ? 200 : 230, 0);
97084 }
97085
97086 }
97087
97088 currentVertex = nextVertex;
97089 if (nextVertex == snake->begin()) break;
97090 }
97091
97092
97093 for (Segment::iterator currentVertex = snake->begin();
97094 currentVertex != snake->end();
97095 ++currentVertex) {
97096 currentVertex->second = (currentVertex->second * mismatchImageStride) + vBB.upperLeft() - uBB.upperLeft();
97097 }
97098 }
97099 }
97100
97101 if (Verbose > 0) {
97102 cout << endl;
97103 }
97104
97105 if (visualizeImage) {
97106 ImageExportInfo visualizeInfo(VisualizeMaskFileName);
97107 exportImage(srcImageRange(*visualizeImage), visualizeInfo);
97108 delete visualizeImage;
97109
97110
97111 }
97112
97113
97114 MaskType *mask = new MaskType(uBB.size());
97115 std::for_each(contours.begin(), contours.end(), bind(fillContour<MaskType>, mask, *_1, Diff2D(0,0)));
97116
97117
97118 std::for_each(contours.begin(), contours.end(),
97119 bind(boost::lambda::ll::for_each(), bind(call_begin(), (*_1)), bind(call_end(), (*_1)),
97120 protect(bind(delete_ptr(), _1))));
97121
97122 std::for_each(contours.begin(), contours.end(), bind(delete_ptr(), _1));
97123
97124 return mask;
97125 }
97126
97127 }
97128 # 40 "enblend.h" 2
97129
97130
97131
97132
97133
97134
97135
97136 using std::cout;
97137 using std::endl;
97138 using std::list;
97139 using std::pair;
97140
97141 using vigra::BasicImage;
97142 using vigra::CachedFileImage;
97143 using vigra::CachedFileImageDirector;
97144 using vigra::FindMinMax;
97145 using vigra::ImageExportInfo;
97146 using vigra::ImageImportInfo;
97147 using vigra::initImage;
97148 using vigra::initImageIf;
97149 using vigra::inspectImage;
97150 using vigra::NumericTraits;
97151 using vigra::VigraFalseType;
97152 using vigra::VigraTrueType;
97153
97154 namespace enblend {
97155
97156
97157
97158 template <typename ImagePixelType>
97159 void enblendMain(list<ImageImportInfo*> &imageInfoList,
97160 ImageExportInfo &outputImageInfo,
97161 Rect2D &inputUnion) {
97162
97163 typedef typename EnblendNumericTraits<ImagePixelType>::ImagePixelComponentType ImagePixelComponentType;
97164 typedef typename EnblendNumericTraits<ImagePixelType>::ImageType ImageType;
97165 typedef typename EnblendNumericTraits<ImagePixelType>::AlphaPixelType AlphaPixelType;
97166 typedef typename EnblendNumericTraits<ImagePixelType>::AlphaType AlphaType;
97167 typedef typename EnblendNumericTraits<ImagePixelType>::MaskPixelType MaskPixelType;
97168 typedef typename EnblendNumericTraits<ImagePixelType>::MaskType MaskType;
97169 typedef typename EnblendNumericTraits<ImagePixelType>::ImagePyramidPixelType ImagePyramidPixelType;
97170 typedef typename EnblendNumericTraits<ImagePixelType>::ImagePyramidType ImagePyramidType;
97171 typedef typename EnblendNumericTraits<ImagePixelType>::MaskPyramidPixelType MaskPyramidPixelType;
97172 typedef typename EnblendNumericTraits<ImagePixelType>::MaskPyramidType MaskPyramidType;
97173
97174 enum {ImagePyramidIntegerBits = EnblendNumericTraits<ImagePixelType>::ImagePyramidIntegerBits};
97175 enum {ImagePyramidFractionBits = EnblendNumericTraits<ImagePixelType>::ImagePyramidFractionBits};
97176 enum {MaskPyramidIntegerBits = EnblendNumericTraits<ImagePixelType>::MaskPyramidIntegerBits};
97177 enum {MaskPyramidFractionBits = EnblendNumericTraits<ImagePixelType>::MaskPyramidFractionBits};
97178 typedef typename EnblendNumericTraits<ImagePixelType>::SKIPSMImagePixelType SKIPSMImagePixelType;
97179 typedef typename EnblendNumericTraits<ImagePixelType>::SKIPSMAlphaPixelType SKIPSMAlphaPixelType;
97180 typedef typename EnblendNumericTraits<ImagePixelType>::SKIPSMMaskPixelType SKIPSMMaskPixelType;
97181
97182
97183
97184
97185
97186 Rect2D blackBB;
97187 pair<ImageType*, AlphaType*> blackPair =
97188 assemble<ImageType, AlphaType>(imageInfoList, inputUnion, blackBB);
97189
97190
97191
97192 if (Checkpoint) checkpoint(blackPair, outputImageInfo);
97193
97194
97195
97196
97197
97198
97199
97200 if (Verbose > 2) {
97201 CachedFileImageDirector &v = CachedFileImageDirector::v();
97202 cout << "Image cache statistics after loading black image:" << endl;
97203 v.printStats("blackImage", blackPair.first);
97204 v.printStats("blackAlpha", blackPair.second);
97205 v.printStats();
97206 v.resetCacheMisses();
97207 cout << "--------------------------------------------------------------------------------" << endl;
97208 }
97209
97210
97211
97212 while (!imageInfoList.empty()) {
97213
97214
97215 Rect2D whiteBB;
97216 pair<ImageType*, AlphaType*> whitePair =
97217 assemble<ImageType, AlphaType>(imageInfoList, inputUnion, whiteBB);
97218
97219
97220
97221
97222
97223
97224
97225 if (Verbose > 2) {
97226 CachedFileImageDirector &v = CachedFileImageDirector::v();
97227 cout << "Image cache statistics after loading white image:" << endl;
97228 v.printStats("blackImage", blackPair.first);
97229 v.printStats("blackAlpha", blackPair.second);
97230 v.printStats("whiteImage", whitePair.first);
97231 v.printStats("whiteAlpha", whitePair.second);
97232 v.printStats();
97233 v.resetCacheMisses();
97234 cout << "--------------------------------------------------------------------------------" << endl;
97235 }
97236
97237
97238
97239 Rect2D uBB = blackBB | whiteBB;
97240
97241 if (Verbose > 1) {
97242 cout << "image union bounding box: " << uBB << endl;
97243 }
97244
97245
97246 Rect2D iBB = blackBB & whiteBB;
97247 bool iBBValid = !iBB.isEmpty();
97248
97249 if (Verbose > 1) {
97250 if (iBBValid) {
97251 cout << "image intersection bounding box: " << iBB << endl;
97252 } else {
97253 cout << "image intersection bounding box: (no intersection)" << endl;
97254 }
97255 }
97256
97257
97258 Overlap overlap = inspectOverlap(uBB.apply(srcImageRange(*(blackPair.second))),
97259 uBB.apply(srcImage(*(whitePair.second))));
97260
97261
97262 if (overlap == CompleteOverlap) {
97263
97264 delete whitePair.first;
97265 delete whitePair.second;
97266 cerr << "enblend: some images are redundant and will not be blended."
97267 << endl;
97268 continue;
97269 }
97270 else if (overlap == NoOverlap && ExactLevels == 0) {
97271
97272 cerr << "enblend: images do not overlap - they will be combined without blending."
97273 << endl;
97274 cerr << "enblend: use the -l flag to force blending with a certain number of levels."
97275 << endl;
97276
97277
97278 copyImageIf(srcImageRange(*(whitePair.first)),
97279 maskImage(*(whitePair.second)),
97280 destImage(*(blackPair.first)));
97281 copyImageIf(srcImageRange(*(whitePair.second)),
97282 maskImage(*(whitePair.second)),
97283 destImage(*(blackPair.second)));
97284
97285 delete whitePair.first;
97286 delete whitePair.second;
97287
97288
97289 if (Checkpoint) {
97290 if (Verbose > 0) {
97291 if (imageInfoList.empty()) {
97292 cout << "Writing final output..." << endl;
97293 } else {
97294 cout << "Checkpointing..." << endl;
97295 }
97296 }
97297 checkpoint(blackPair, outputImageInfo);
97298 }
97299
97300 blackBB = uBB;
97301 continue;
97302 }
97303
97304
97305 if (Verbose > 1) {
97306 long long bytes = 0;
97307
97308
97309 bytes += 2 * uBB.area() * sizeof(ImagePixelType);
97310
97311
97312 bytes += 2 * uBB.area() * sizeof(AlphaPixelType);
97313
97314
97315 long long nftBytes = 0;
97316 if (LoadMaskFileName) {
97317 nftBytes = 0;
97318 } else if (CoarseMask) {
97319 nftBytes = 2 * 1/8 * uBB.area() * sizeof(MaskPixelType)
97320 + 2 * 1/8 * uBB.area() * sizeof(UInt32);
97321 } else {
97322 nftBytes = 2 * uBB.area() * sizeof(MaskPixelType)
97323 + 2 * uBB.area() * sizeof(UInt32);
97324 }
97325
97326 long long optBytes = 0;
97327 if (LoadMaskFileName) {
97328 optBytes = 0;
97329 } else if (!OptimizeMask) {
97330 optBytes = 0;
97331 } else if (CoarseMask) {
97332 optBytes = 1/2 * iBB.area() * sizeof(UInt8);
97333 } else {
97334 optBytes = iBB.area() * sizeof(UInt8);
97335 }
97336 if (VisualizeMaskFileName) optBytes *= 2;
97337
97338 long long bytesDuringMask = bytes + std::max(nftBytes, optBytes);
97339 long long bytesAfterMask = bytes + uBB.area() * sizeof(MaskPixelType);
97340
97341 bytes = std::max(bytesDuringMask, bytesAfterMask);
97342
97343 int mbytes = (int)ceil(bytes / 1000000.0);
97344 cout << "Estimated space required for mask generation: "
97345 << mbytes
97346 << "MB" << endl;
97347 }
97348
97349
97350 bool wraparoundForMask = Wraparound && (uBB.width() == inputUnion.width());
97351
97352 MaskType *mask = createMask<ImageType, AlphaType, MaskType>(
97353 whitePair.first, blackPair.first, whitePair.second, blackPair.second,
97354 uBB, iBB, wraparoundForMask);
97355
97356
97357 Rect2D mBB;
97358 maskBounds(mask, uBB, mBB);
97359
97360 if (SaveMaskFileName != __null) {
97361 ImageExportInfo maskInfo(SaveMaskFileName);
97362 maskInfo.setPosition(uBB.upperLeft());
97363 exportImage(srcImageRange(*mask), maskInfo);
97364 }
97365
97366
97367
97368
97369 if (Verbose > 2) {
97370 CachedFileImageDirector &v = CachedFileImageDirector::v();
97371 cout << "Image cache statistics after mask generation:" << endl;
97372 v.printStats("blackImage", blackPair.first);
97373 v.printStats("blackAlpha", blackPair.second);
97374 v.printStats("whiteImage", whitePair.first);
97375 v.printStats("whiteAlpha", whitePair.second);
97376 v.printStats("mask", mask);
97377 v.printStats();
97378 v.resetCacheMisses();
97379 cout << "--------------------------------------------------------------------------------" << endl;
97380 }
97381
97382
97383
97384
97385 Rect2D roiBB;
97386 unsigned int numLevels = roiBounds<ImagePixelComponentType>(inputUnion, iBB, mBB, uBB, roiBB, wraparoundForMask);
97387 bool wraparoundForBlend = Wraparound && (roiBB.width() == inputUnion.width());
97388
97389
97390 if (Verbose > 1) {
97391
97392
97393
97394
97395
97396
97397 long long bytes =
97398 inputUnion.area() * (sizeof(ImagePixelType) + 2*sizeof(AlphaPixelType))
97399 + (4/3) * roiBB.area() *
97400 (sizeof(MaskPyramidPixelType) + 2*sizeof(ImagePyramidPixelType))
97401 + (4 * roiBB.width()) * (sizeof(SKIPSMImagePixelType) + sizeof(SKIPSMAlphaPixelType));
97402
97403 int mbytes = (int)ceil(bytes / 1000000.0);
97404 cout << "Estimated space required for this blend step: "
97405 << mbytes
97406 << "MB" << endl;
97407 }
97408
97409
97410
97411
97412 Rect2D roiBB_uBB = roiBB;
97413 roiBB_uBB.moveBy(-uBB.upperLeft());
97414
97415
97416 vector<MaskPyramidType*> *maskGP = gaussianPyramid<MaskType, MaskPyramidType,
97417 MaskPyramidIntegerBits, MaskPyramidFractionBits,
97418 SKIPSMMaskPixelType>(
97419 numLevels, wraparoundForBlend, roiBB_uBB.apply(srcImageRange(*mask)));
97420
97421
97422
97423
97424
97425
97426 if (Verbose > 2) {
97427 CachedFileImageDirector &v = CachedFileImageDirector::v();
97428 cout << "Image cache statistics after calculating mask pyramid:" << endl;
97429 v.printStats("blackImage", blackPair.first);
97430 v.printStats("blackAlpha", blackPair.second);
97431 v.printStats("whiteImage", whitePair.first);
97432 v.printStats("whiteAlpha", whitePair.second);
97433 v.printStats("mask", mask);
97434 for (unsigned int i = 0; i < maskGP->size(); i++) {
97435 v.printStats("maskGP", i, (*maskGP)[i]);
97436 }
97437 v.printStats();
97438 v.resetCacheMisses();
97439 cout << "--------------------------------------------------------------------------------" << endl;
97440 }
97441
97442
97443
97444
97445
97446 initImage(roiBB_uBB.apply(destImageRange(*mask)),
97447 NumericTraits<MaskPyramidPixelType>::zero());
97448
97449
97450
97451
97452
97453 copyImageIf(uBB.apply(srcImageRange(*(whitePair.first))),
97454 maskImage(*mask),
97455 uBB.apply(destImage(*(blackPair.first))));
97456
97457
97458 delete mask;
97459
97460
97461
97462 vector<ImagePyramidType*> *whiteLP =
97463 laplacianPyramid<ImageType, AlphaType, ImagePyramidType,
97464 ImagePyramidIntegerBits, ImagePyramidFractionBits,
97465 SKIPSMImagePixelType, SKIPSMAlphaPixelType>(
97466 "whiteGP",
97467 numLevels, wraparoundForBlend,
97468 roiBB.apply(srcImageRange(*(whitePair.first))),
97469 roiBB.apply(maskImage(*(whitePair.second))));
97470
97471
97472 if (Verbose > 2) {
97473 CachedFileImageDirector &v = CachedFileImageDirector::v();
97474 cout << "Image cache statistics after calculating white pyramid:" << endl;
97475 v.printStats("blackImage", blackPair.first);
97476 v.printStats("blackAlpha", blackPair.second);
97477 v.printStats("whiteImage", whitePair.first);
97478 v.printStats("whiteAlpha", whitePair.second);
97479 for (unsigned int i = 0; i < maskGP->size(); i++) {
97480 v.printStats("maskGP", i, (*maskGP)[i]);
97481 }
97482 for (unsigned int i = 0; i < whiteLP->size(); i++) {
97483 v.printStats("whiteLP", i, (*whiteLP)[i]);
97484 }
97485 v.printStats();
97486 v.resetCacheMisses();
97487 cout << "--------------------------------------------------------------------------------" << endl;
97488 }
97489
97490
97491
97492
97493
97494
97495
97496 delete whitePair.first;
97497
97498
97499
97500
97501 vector<ImagePyramidType*> *blackLP =
97502 laplacianPyramid<ImageType, AlphaType, ImagePyramidType,
97503 ImagePyramidIntegerBits, ImagePyramidFractionBits,
97504 SKIPSMImagePixelType, SKIPSMAlphaPixelType>(
97505 "blackGP",
97506 numLevels, wraparoundForBlend,
97507 roiBB.apply(srcImageRange(*(blackPair.first))),
97508 roiBB.apply(maskImage(*(blackPair.second))));
97509
97510
97511 if (Verbose > 2) {
97512 CachedFileImageDirector &v = CachedFileImageDirector::v();
97513 cout << "Image cache statistics after calculating black pyramid:" << endl;
97514 v.printStats("blackImage", blackPair.first);
97515 v.printStats("blackAlpha", blackPair.second);
97516 v.printStats("whiteAlpha", whitePair.second);
97517 for (unsigned int i = 0; i < maskGP->size(); i++) {
97518 v.printStats("maskGP", i, (*maskGP)[i]);
97519 }
97520 for (unsigned int i = 0; i < whiteLP->size(); i++) {
97521 v.printStats("whiteLP", i, (*whiteLP)[i]);
97522 }
97523 for (unsigned int i = 0; i < blackLP->size(); i++) {
97524 v.printStats("blackLP", i, (*blackLP)[i]);
97525 }
97526 v.printStats();
97527 v.resetCacheMisses();
97528 cout << "--------------------------------------------------------------------------------" << endl;
97529 }
97530 # 453 "enblend.h"
97531 initImageIf(whiteBB.apply(destImageRange(*(blackPair.second))),
97532 whiteBB.apply(maskImage(*(whitePair.second))),
97533 NumericTraits<AlphaPixelType>::max());
97534
97535
97536 delete whitePair.second;
97537
97538
97539
97540
97541
97542 ConvertScalarToPyramidFunctor<MaskPixelType, MaskPyramidPixelType, MaskPyramidIntegerBits, MaskPyramidFractionBits> whiteMask;
97543 blend(maskGP, whiteLP, blackLP, whiteMask(NumericTraits<MaskPixelType>::max()));
97544
97545 if (Verbose > 2) {
97546 CachedFileImageDirector &v = CachedFileImageDirector::v();
97547 cout << "Image cache statistics after blending pyramids:" << endl;
97548 v.printStats("blackImage", blackPair.first);
97549 v.printStats("blackAlpha", blackPair.second);
97550 for (unsigned int i = 0; i < maskGP->size(); i++) {
97551 v.printStats("maskGP", i, (*maskGP)[i]);
97552 }
97553 for (unsigned int i = 0; i < whiteLP->size(); i++) {
97554 v.printStats("whiteLP", i, (*whiteLP)[i]);
97555 }
97556 for (unsigned int i = 0; i < blackLP->size(); i++) {
97557 v.printStats("blackLP", i, (*blackLP)[i]);
97558 }
97559 v.printStats();
97560 v.resetCacheMisses();
97561 cout << "--------------------------------------------------------------------------------" << endl;
97562 }
97563
97564
97565
97566
97567 for (unsigned int i = 0; i < maskGP->size(); i++) {
97568 delete (*maskGP)[i];
97569 }
97570 delete maskGP;
97571
97572
97573
97574
97575
97576 for (unsigned int i = 0; i < whiteLP->size(); i++) {
97577 delete (*whiteLP)[i];
97578 }
97579 delete whiteLP;
97580
97581
97582
97583
97584
97585 collapsePyramid<SKIPSMImagePixelType>(wraparoundForBlend, blackLP);
97586
97587 if (Verbose > 2) {
97588 CachedFileImageDirector &v = CachedFileImageDirector::v();
97589 cout << "Image cache statistics after collapsing black pyramid:" << endl;
97590 v.printStats("blackImage", blackPair.first);
97591 v.printStats("blackAlpha", blackPair.second);
97592 for (unsigned int i = 0; i < blackLP->size(); i++) {
97593 v.printStats("blackLP", i, (*blackLP)[i]);
97594 }
97595 v.printStats();
97596 v.resetCacheMisses();
97597 cout << "--------------------------------------------------------------------------------" << endl;
97598 }
97599
97600
97601
97602 copyFromPyramidImageIf<ImagePyramidType, MaskType, ImageType,
97603 ImagePyramidIntegerBits, ImagePyramidFractionBits>(
97604 srcImageRange(*((*blackLP)[0])),
97605 roiBB.apply(maskImage(*(blackPair.second))),
97606 roiBB.apply(destImage(*(blackPair.first))));
97607
97608
97609 for (unsigned int i = 0; i < blackLP->size(); i++) {
97610 delete (*blackLP)[i];
97611 }
97612 delete blackLP;
97613
97614
97615
97616
97617 if (Checkpoint) {
97618 if (Verbose > 0) {
97619 if (imageInfoList.empty()) {
97620 cout << "Writing final output..." << endl;
97621 } else {
97622 cout << "Checkpointing..." << endl;
97623 }
97624 }
97625 checkpoint(blackPair, outputImageInfo);
97626 }
97627
97628
97629 if (Verbose > 2) {
97630 CachedFileImageDirector &v = CachedFileImageDirector::v();
97631 cout << "Image cache statistics after checkpointing:" << endl;
97632 v.printStats("blackImage", blackPair.first);
97633 v.printStats("blackAlpha", blackPair.second);
97634 v.printStats();
97635 v.resetCacheMisses();
97636 cout << "--------------------------------------------------------------------------------" << endl;
97637 }
97638
97639
97640
97641 blackBB = uBB;
97642
97643 }
97644
97645 if (!Checkpoint) {
97646 if (Verbose > 0) {
97647 cout << "Writing final output..." << endl;
97648 }
97649 checkpoint(blackPair, outputImageInfo);
97650 }
97651
97652 delete blackPair.first;
97653 delete blackPair.second;
97654 };
97655
97656 }
97657 # 122 "enblend.cc" 2
97658
97659
97660
97661
97662
97663 # 1 "/usr/include/tiffio.h" 1 3 4
97664 # 33 "/usr/include/tiffio.h" 3 4
97665 # 1 "/usr/include/tiff.h" 1 3 4
97666 # 30 "/usr/include/tiff.h" 3 4
97667 # 1 "/usr/include/tiffconf.h" 1 3 4
97668 # 31 "/usr/include/tiff.h" 2 3 4
97669 # 65 "/usr/include/tiff.h" 3 4
97670 typedef signed char int8;
97671
97672 typedef unsigned char uint8;
97673
97674 typedef short int16;
97675
97676 typedef unsigned short uint16;
97677
97678
97679 typedef int int32;
97680
97681 typedef unsigned int uint32;
97682 # 85 "/usr/include/tiff.h" 3 4
97683 enum TIFFIgnoreSense
97684 {
97685 TIS_STORE,
97686 TIS_EXTRACT,
97687 TIS_EMPTY
97688 };
97689
97690
97691
97692
97693 typedef struct {
97694 uint16 tiff_magic;
97695
97696 uint16 tiff_version;
97697
97698 uint32 tiff_diroff;
97699
97700 } TIFFHeader;
97701 # 116 "/usr/include/tiff.h" 3 4
97702 typedef struct {
97703 uint16 tdir_tag;
97704 uint16 tdir_type;
97705 uint32 tdir_count;
97706 uint32 tdir_offset;
97707 } TIFFDirEntry;
97708 # 137 "/usr/include/tiff.h" 3 4
97709 typedef enum {
97710 TIFF_NOTYPE = 0,
97711 TIFF_BYTE = 1,
97712 TIFF_ASCII = 2,
97713 TIFF_SHORT = 3,
97714 TIFF_LONG = 4,
97715 TIFF_RATIONAL = 5,
97716 TIFF_SBYTE = 6,
97717 TIFF_UNDEFINED = 7,
97718 TIFF_SSHORT = 8,
97719 TIFF_SLONG = 9,
97720 TIFF_SRATIONAL = 10,
97721 TIFF_FLOAT = 11,
97722 TIFF_DOUBLE = 12,
97723 TIFF_IFD = 13
97724 } TIFFDataType;
97725 # 34 "/usr/include/tiffio.h" 2 3 4
97726 # 1 "/usr/include/tiffvers.h" 1 3 4
97727 # 35 "/usr/include/tiffio.h" 2 3 4
97728
97729
97730
97731
97732
97733 typedef struct tiff TIFF;
97734 # 61 "/usr/include/tiffio.h" 3 4
97735 typedef uint32 ttag_t;
97736 typedef uint16 tdir_t;
97737 typedef uint16 tsample_t;
97738 typedef uint32 tstrip_t;
97739 typedef uint32 ttile_t;
97740 typedef int32 tsize_t;
97741 typedef void* tdata_t;
97742 typedef uint32 toff_t;
97743 # 96 "/usr/include/tiffio.h" 3 4
97744 typedef void* thandle_t;
97745 # 132 "/usr/include/tiffio.h" 3 4
97746 typedef unsigned char TIFFRGBValue;
97747
97748 typedef struct {
97749 float d_mat[3][3];
97750 float d_YCR;
97751 float d_YCG;
97752 float d_YCB;
97753 uint32 d_Vrwr;
97754 uint32 d_Vrwg;
97755 uint32 d_Vrwb;
97756 float d_Y0R;
97757 float d_Y0G;
97758 float d_Y0B;
97759 float d_gammaR;
97760 float d_gammaG;
97761 float d_gammaB;
97762 } TIFFDisplay;
97763
97764 typedef struct {
97765 TIFFRGBValue* clamptab;
97766 int* Cr_r_tab;
97767 int* Cb_b_tab;
97768 int32* Cr_g_tab;
97769 int32* Cb_g_tab;
97770 int32* Y_tab;
97771 } TIFFYCbCrToRGB;
97772
97773 typedef struct {
97774 int range;
97775
97776 float rstep, gstep, bstep;
97777 float X0, Y0, Z0;
97778 TIFFDisplay display;
97779 float Yr2r[1500 + 1];
97780 float Yg2g[1500 + 1];
97781 float Yb2b[1500 + 1];
97782 } TIFFCIELabToRGB;
97783
97784
97785
97786
97787 typedef struct _TIFFRGBAImage TIFFRGBAImage;
97788 # 184 "/usr/include/tiffio.h" 3 4
97789 typedef void (*tileContigRoutine)
97790 (TIFFRGBAImage*, uint32*, uint32, uint32, uint32, uint32, int32, int32,
97791 unsigned char*);
97792 typedef void (*tileSeparateRoutine)
97793 (TIFFRGBAImage*, uint32*, uint32, uint32, uint32, uint32, int32, int32,
97794 unsigned char*, unsigned char*, unsigned char*, unsigned char*);
97795
97796
97797
97798 struct _TIFFRGBAImage {
97799 TIFF* tif;
97800 int stoponerr;
97801 int isContig;
97802 int alpha;
97803 uint32 width;
97804 uint32 height;
97805 uint16 bitspersample;
97806 uint16 samplesperpixel;
97807 uint16 orientation;
97808 uint16 req_orientation;
97809 uint16 photometric;
97810 uint16* redcmap;
97811 uint16* greencmap;
97812 uint16* bluecmap;
97813
97814 int (*get)(TIFFRGBAImage*, uint32*, uint32, uint32);
97815 union {
97816 void (*any)(TIFFRGBAImage*);
97817 tileContigRoutine contig;
97818 tileSeparateRoutine separate;
97819 } put;
97820 TIFFRGBValue* Map;
97821 uint32** BWmap;
97822 uint32** PALmap;
97823 TIFFYCbCrToRGB* ycbcr;
97824 TIFFCIELabToRGB* cielab;
97825
97826 int row_offset;
97827 int col_offset;
97828 };
97829 # 241 "/usr/include/tiffio.h" 3 4
97830 typedef int (*TIFFInitMethod)(TIFF*, int);
97831 typedef struct {
97832 char* name;
97833 uint16 scheme;
97834 TIFFInitMethod init;
97835 } TIFFCodec;
97836 # 257 "/usr/include/tiffio.h" 3 4
97837 extern "C" {
97838
97839 typedef void (*TIFFErrorHandler)(const char*, const char*, va_list);
97840 typedef void (*TIFFErrorHandlerExt)(thandle_t, const char*, const char*, va_list);
97841 typedef tsize_t (*TIFFReadWriteProc)(thandle_t, tdata_t, tsize_t);
97842 typedef toff_t (*TIFFSeekProc)(thandle_t, toff_t, int);
97843 typedef int (*TIFFCloseProc)(thandle_t);
97844 typedef toff_t (*TIFFSizeProc)(thandle_t);
97845 typedef int (*TIFFMapFileProc)(thandle_t, tdata_t*, toff_t*);
97846 typedef void (*TIFFUnmapFileProc)(thandle_t, tdata_t, toff_t);
97847 typedef void (*TIFFExtendProc)(TIFF*);
97848
97849 extern const char* TIFFGetVersion(void);
97850
97851 extern const TIFFCodec* TIFFFindCODEC(uint16);
97852 extern TIFFCodec* TIFFRegisterCODEC(uint16, const char*, TIFFInitMethod);
97853 extern void TIFFUnRegisterCODEC(TIFFCodec*);
97854 extern int TIFFIsCODECConfigured(uint16);
97855 extern TIFFCodec* TIFFGetConfiguredCODECs(void);
97856
97857
97858
97859
97860
97861 extern tdata_t _TIFFmalloc(tsize_t);
97862 extern tdata_t _TIFFrealloc(tdata_t, tsize_t);
97863 extern void _TIFFmemset(tdata_t, int, tsize_t);
97864 extern void _TIFFmemcpy(tdata_t, const tdata_t, tsize_t);
97865 extern int _TIFFmemcmp(const tdata_t, const tdata_t, tsize_t);
97866 extern void _TIFFfree(tdata_t);
97867
97868
97869
97870
97871 extern int TIFFGetTagListCount( TIFF * );
97872 extern ttag_t TIFFGetTagListEntry( TIFF *, int tag_index );
97873 # 301 "/usr/include/tiffio.h" 3 4
97874 typedef struct {
97875 ttag_t field_tag;
97876 short field_readcount;
97877 short field_writecount;
97878 TIFFDataType field_type;
97879 unsigned short field_bit;
97880 unsigned char field_oktochange;
97881 unsigned char field_passcount;
97882 char *field_name;
97883 } TIFFFieldInfo;
97884
97885 typedef struct _TIFFTagValue {
97886 const TIFFFieldInfo *info;
97887 int count;
97888 void *value;
97889 } TIFFTagValue;
97890
97891 extern void TIFFMergeFieldInfo(TIFF*, const TIFFFieldInfo[], int);
97892 extern const TIFFFieldInfo* TIFFFindFieldInfo(TIFF*, ttag_t, TIFFDataType);
97893 extern const TIFFFieldInfo* TIFFFindFieldInfoByName(TIFF* , const char *,
97894 TIFFDataType);
97895 extern const TIFFFieldInfo* TIFFFieldWithTag(TIFF*, ttag_t);
97896 extern const TIFFFieldInfo* TIFFFieldWithName(TIFF*, const char *);
97897
97898 typedef int (*TIFFVSetMethod)(TIFF*, ttag_t, va_list);
97899 typedef int (*TIFFVGetMethod)(TIFF*, ttag_t, va_list);
97900 typedef void (*TIFFPrintMethod)(TIFF*, FILE*, long);
97901
97902 typedef struct {
97903 TIFFVSetMethod vsetfield;
97904 TIFFVGetMethod vgetfield;
97905 TIFFPrintMethod printdir;
97906 } TIFFTagMethods;
97907
97908 extern TIFFTagMethods *TIFFAccessTagMethods( TIFF * );
97909 extern void *TIFFGetClientInfo( TIFF *, const char * );
97910 extern void TIFFSetClientInfo( TIFF *, void *, const char * );
97911
97912 extern void TIFFCleanup(TIFF*);
97913 extern void TIFFClose(TIFF*);
97914 extern int TIFFFlush(TIFF*);
97915 extern int TIFFFlushData(TIFF*);
97916 extern int TIFFGetField(TIFF*, ttag_t, ...);
97917 extern int TIFFVGetField(TIFF*, ttag_t, va_list);
97918 extern int TIFFGetFieldDefaulted(TIFF*, ttag_t, ...);
97919 extern int TIFFVGetFieldDefaulted(TIFF*, ttag_t, va_list);
97920 extern int TIFFReadDirectory(TIFF*);
97921 extern int TIFFReadCustomDirectory(TIFF*, toff_t, const TIFFFieldInfo[],
97922 size_t);
97923 extern int TIFFReadEXIFDirectory(TIFF*, toff_t);
97924 extern tsize_t TIFFScanlineSize(TIFF*);
97925 extern tsize_t TIFFRasterScanlineSize(TIFF*);
97926 extern tsize_t TIFFStripSize(TIFF*);
97927 extern tsize_t TIFFRawStripSize(TIFF*, tstrip_t);
97928 extern tsize_t TIFFVStripSize(TIFF*, uint32);
97929 extern tsize_t TIFFTileRowSize(TIFF*);
97930 extern tsize_t TIFFTileSize(TIFF*);
97931 extern tsize_t TIFFVTileSize(TIFF*, uint32);
97932 extern uint32 TIFFDefaultStripSize(TIFF*, uint32);
97933 extern void TIFFDefaultTileSize(TIFF*, uint32*, uint32*);
97934 extern int TIFFFileno(TIFF*);
97935 extern int TIFFSetFileno(TIFF*, int);
97936 extern thandle_t TIFFClientdata(TIFF*);
97937 extern thandle_t TIFFSetClientdata(TIFF*, thandle_t);
97938 extern int TIFFGetMode(TIFF*);
97939 extern int TIFFSetMode(TIFF*, int);
97940 extern int TIFFIsTiled(TIFF*);
97941 extern int TIFFIsByteSwapped(TIFF*);
97942 extern int TIFFIsUpSampled(TIFF*);
97943 extern int TIFFIsMSB2LSB(TIFF*);
97944 extern int TIFFIsBigEndian(TIFF*);
97945 extern TIFFReadWriteProc TIFFGetReadProc(TIFF*);
97946 extern TIFFReadWriteProc TIFFGetWriteProc(TIFF*);
97947 extern TIFFSeekProc TIFFGetSeekProc(TIFF*);
97948 extern TIFFCloseProc TIFFGetCloseProc(TIFF*);
97949 extern TIFFSizeProc TIFFGetSizeProc(TIFF*);
97950 extern TIFFMapFileProc TIFFGetMapFileProc(TIFF*);
97951 extern TIFFUnmapFileProc TIFFGetUnmapFileProc(TIFF*);
97952 extern uint32 TIFFCurrentRow(TIFF*);
97953 extern tdir_t TIFFCurrentDirectory(TIFF*);
97954 extern tdir_t TIFFNumberOfDirectories(TIFF*);
97955 extern uint32 TIFFCurrentDirOffset(TIFF*);
97956 extern tstrip_t TIFFCurrentStrip(TIFF*);
97957 extern ttile_t TIFFCurrentTile(TIFF*);
97958 extern int TIFFReadBufferSetup(TIFF*, tdata_t, tsize_t);
97959 extern int TIFFWriteBufferSetup(TIFF*, tdata_t, tsize_t);
97960 extern int TIFFSetupStrips(TIFF *);
97961 extern int TIFFWriteCheck(TIFF*, int, const char *);
97962 extern void TIFFFreeDirectory(TIFF*);
97963 extern int TIFFCreateDirectory(TIFF*);
97964 extern int TIFFLastDirectory(TIFF*);
97965 extern int TIFFSetDirectory(TIFF*, tdir_t);
97966 extern int TIFFSetSubDirectory(TIFF*, uint32);
97967 extern int TIFFUnlinkDirectory(TIFF*, tdir_t);
97968 extern int TIFFSetField(TIFF*, ttag_t, ...);
97969 extern int TIFFVSetField(TIFF*, ttag_t, va_list);
97970 extern int TIFFWriteDirectory(TIFF *);
97971 extern int TIFFCheckpointDirectory(TIFF *);
97972 extern int TIFFRewriteDirectory(TIFF *);
97973 extern int TIFFReassignTagToIgnore(enum TIFFIgnoreSense, int);
97974
97975
97976 extern void TIFFPrintDirectory(TIFF*, FILE*, long = 0);
97977 extern int TIFFReadScanline(TIFF*, tdata_t, uint32, tsample_t = 0);
97978 extern int TIFFWriteScanline(TIFF*, tdata_t, uint32, tsample_t = 0);
97979 extern int TIFFReadRGBAImage(TIFF*, uint32, uint32, uint32*, int = 0);
97980 extern int TIFFReadRGBAImageOriented(TIFF*, uint32, uint32, uint32*,
97981 int = 4, int = 0);
97982 # 417 "/usr/include/tiffio.h" 3 4
97983 extern int TIFFReadRGBAStrip(TIFF*, tstrip_t, uint32 * );
97984 extern int TIFFReadRGBATile(TIFF*, uint32, uint32, uint32 * );
97985 extern int TIFFRGBAImageOK(TIFF*, char [1024]);
97986 extern int TIFFRGBAImageBegin(TIFFRGBAImage*, TIFF*, int, char [1024]);
97987 extern int TIFFRGBAImageGet(TIFFRGBAImage*, uint32*, uint32, uint32);
97988 extern void TIFFRGBAImageEnd(TIFFRGBAImage*);
97989 extern TIFF* TIFFOpen(const char*, const char*);
97990
97991
97992
97993 extern TIFF* TIFFFdOpen(int, const char*, const char*);
97994 extern TIFF* TIFFClientOpen(const char*, const char*,
97995 thandle_t,
97996 TIFFReadWriteProc, TIFFReadWriteProc,
97997 TIFFSeekProc, TIFFCloseProc,
97998 TIFFSizeProc,
97999 TIFFMapFileProc, TIFFUnmapFileProc);
98000 extern const char* TIFFFileName(TIFF*);
98001 extern const char* TIFFSetFileName(TIFF*, const char *);
98002 extern void TIFFError(const char*, const char*, ...);
98003 extern void TIFFErrorExt(thandle_t, const char*, const char*, ...);
98004 extern void TIFFWarning(const char*, const char*, ...);
98005 extern void TIFFWarningExt(thandle_t, const char*, const char*, ...);
98006 extern TIFFErrorHandler TIFFSetErrorHandler(TIFFErrorHandler);
98007 extern TIFFErrorHandlerExt TIFFSetErrorHandlerExt(TIFFErrorHandlerExt);
98008 extern TIFFErrorHandler TIFFSetWarningHandler(TIFFErrorHandler);
98009 extern TIFFErrorHandlerExt TIFFSetWarningHandlerExt(TIFFErrorHandlerExt);
98010 extern TIFFExtendProc TIFFSetTagExtender(TIFFExtendProc);
98011 extern ttile_t TIFFComputeTile(TIFF*, uint32, uint32, uint32, tsample_t);
98012 extern int TIFFCheckTile(TIFF*, uint32, uint32, uint32, tsample_t);
98013 extern ttile_t TIFFNumberOfTiles(TIFF*);
98014 extern tsize_t TIFFReadTile(TIFF*,
98015 tdata_t, uint32, uint32, uint32, tsample_t);
98016 extern tsize_t TIFFWriteTile(TIFF*,
98017 tdata_t, uint32, uint32, uint32, tsample_t);
98018 extern tstrip_t TIFFComputeStrip(TIFF*, uint32, tsample_t);
98019 extern tstrip_t TIFFNumberOfStrips(TIFF*);
98020 extern tsize_t TIFFReadEncodedStrip(TIFF*, tstrip_t, tdata_t, tsize_t);
98021 extern tsize_t TIFFReadRawStrip(TIFF*, tstrip_t, tdata_t, tsize_t);
98022 extern tsize_t TIFFReadEncodedTile(TIFF*, ttile_t, tdata_t, tsize_t);
98023 extern tsize_t TIFFReadRawTile(TIFF*, ttile_t, tdata_t, tsize_t);
98024 extern tsize_t TIFFWriteEncodedStrip(TIFF*, tstrip_t, tdata_t, tsize_t);
98025 extern tsize_t TIFFWriteRawStrip(TIFF*, tstrip_t, tdata_t, tsize_t);
98026 extern tsize_t TIFFWriteEncodedTile(TIFF*, ttile_t, tdata_t, tsize_t);
98027 extern tsize_t TIFFWriteRawTile(TIFF*, ttile_t, tdata_t, tsize_t);
98028 extern int TIFFDataWidth(TIFFDataType);
98029 extern void TIFFSetWriteOffset(TIFF*, toff_t);
98030 extern void TIFFSwabShort(uint16*);
98031 extern void TIFFSwabLong(uint32*);
98032 extern void TIFFSwabDouble(double*);
98033 extern void TIFFSwabArrayOfShort(uint16*, unsigned long);
98034 extern void TIFFSwabArrayOfTriples(uint8*, unsigned long);
98035 extern void TIFFSwabArrayOfLong(uint32*, unsigned long);
98036 extern void TIFFSwabArrayOfDouble(double*, unsigned long);
98037 extern void TIFFReverseBits(unsigned char *, unsigned long);
98038 extern const unsigned char* TIFFGetBitRevTable(int);
98039
98040
98041
98042
98043
98044 extern double LogL16toY(int);
98045 extern double LogL10toY(int);
98046 extern void XYZtoRGB24(float*, uint8*);
98047 extern int uv_decode(double*, double*, int);
98048 extern void LogLuv24toXYZ(uint32, float*);
98049 extern void LogLuv32toXYZ(uint32, float*);
98050
98051 extern int LogL16fromY(double, int = 0);
98052 extern int LogL10fromY(double, int = 0);
98053 extern int uv_encode(double, double, int = 0);
98054 extern uint32 LogLuv24fromXYZ(float*, int = 0);
98055 extern uint32 LogLuv32fromXYZ(float*, int = 0);
98056 # 499 "/usr/include/tiffio.h" 3 4
98057 extern int TIFFCIELabToRGBInit(TIFFCIELabToRGB*, TIFFDisplay *, float*);
98058 extern void TIFFCIELabToXYZ(TIFFCIELabToRGB *, uint32, int32, int32,
98059 float *, float *, float *);
98060 extern void TIFFXYZToRGB(TIFFCIELabToRGB *, float, float, float,
98061 uint32 *, uint32 *, uint32 *);
98062
98063 extern int TIFFYCbCrToRGBInit(TIFFYCbCrToRGB*, float*, float*);
98064 extern void TIFFYCbCrtoRGB(TIFFYCbCrToRGB *, uint32, int32, int32,
98065 uint32 *, uint32 *, uint32 *);
98066
98067
98068 }
98069 # 128 "enblend.cc" 2
98070 using std::cerr;
98071 using std::cout;
98072 using std::endl;
98073 using std::list;
98074
98075 using vigra::CachedFileImageDirector;
98076 using vigra::Diff2D;
98077 using vigra::ImageExportInfo;
98078 using vigra::ImageImportInfo;
98079 using vigra::Rect2D;
98080 using vigra::StdException;
98081
98082 using enblend::enblendMain;
98083
98084
98085
98086
98087
98088
98089 void printUsageAndExit() {
98090 cout << "==== enblend, version " << "3.0" << " ====" << endl;
98091 cout << "Usage: enblend [options] -o OUTPUT INPUTS" << endl;
98092 cout << endl;
98093 cout << "Common options:" << endl;
98094 cout << " -a Pre-assemble non-overlapping images" << endl;
98095 cout << " -h Print this help message" << endl;
98096 cout << " -l number Number of levels to use (1 to 29)" << endl;
98097 cout << " -o filename Write output to file" << endl;
98098 cout << " -v Verbose" << endl;
98099 cout << " -w Blend across -180/+180 boundary" << endl;
98100 cout << " -z Use LZW compression" << endl;
98101 cout << " -x Checkpoint partial results" << endl;
98102
98103 cout << endl << "Extended options:" << endl;
98104 cout << " -b kilobytes Image cache block size (default=2MiB)" << endl;
98105 cout << " -c Use CIECAM02 to blend colors" << endl;
98106 cout << " -g Associated alpha hack for Gimp (ver. < 2) and Cinepaint" << endl;
98107 cout << " --gpu Use the graphics card to accelerate some computations." << endl;
98108 cout << " -f WIDTHxHEIGHT Manually set the size of the output image." << endl
98109 << " Useful for cropped and shifted input TIFF images," << endl
98110 << " such as those produced by Nona." << endl;
98111 cout << " -m megabytes Use this much memory before going to disk (default=1GiB)" << endl;
98112 cout << " --visualize=FILE Save the optimizer's results for debugging." << endl;
98113
98114 cout << endl << "Mask generation options:" << endl;
98115 cout << " --coarse-mask Use an approximation to speedup mask generation. Default." << endl;
98116 cout << " --fine-mask Enables detailed mask generation. Slow. Use this if you" << endl
98117 << " have very narrow overlap regions." << endl;
98118 cout << " --optimize Turn on mask optimization. This is the default." << endl;
98119 cout << " --no-optimize Turn off mask optimization." << endl;
98120 cout << " --save-mask=FILE Save the generated mask to the given file." << endl;
98121 cout << " --load-mask=FILE Use the mask in the given file instead of generating one." << endl;
98122
98123
98124
98125
98126 exit(1);
98127 }
98128
98129
98130
98131
98132
98133 void sigint_handler(int sig) {
98134 cout << endl << "Interrupted." << endl;
98135
98136
98137
98138 if (UseGPU) {
98139
98140
98141 wrapupGPU();
98142 }
98143
98144 struct sigaction action;
98145 action.__sigaction_handler.sa_handler = ((__sighandler_t) 0);
98146 sigemptyset(&(action.sa_mask));
98147 sigaction(2, &action, __null);
98148 raise(2);
98149
98150
98151
98152 }
98153
98154 int main(int argc, char** argv) {
98155
98156
98157
98158
98159
98160
98161
98162 fesetround(FE_TONEAREST);
98163
98164
98165
98166 sigemptyset(&SigintMask);
98167 sigaddset(&SigintMask, 2);
98168
98169 struct sigaction action;
98170 action.__sigaction_handler.sa_handler = sigint_handler;
98171 sigemptyset(&(action.sa_mask));
98172 sigaction(2, &action, __null);
98173 # 241 "enblend.cc"
98174 char *outputFileName = __null;
98175
98176
98177 list<char*> inputFileNameList;
98178 list<char*>::iterator inputFileNameIterator;
98179
98180 static struct option long_options[] = {
98181 {"gpu", 0, &UseGPU, 1},
98182 {"coarse-mask", 0, &CoarseMask, 1},
98183 {"fine-mask", 0, &CoarseMask, 0},
98184 {"optimize", 0, &OptimizeMask, 1},
98185 {"no-optimize", 0, &OptimizeMask, 0},
98186 {"save-mask", 1, 0, 0},
98187 {"load-mask", 1, 0, 0},
98188 {"visualize", 1, 0, 0},
98189 {"gda-kmax", 1, 0, 1},
98190 {"dijkstra-radius", 1, 0, 1},
98191 {"mask-vectorize-distance", 1, 0, 1},
98192 {0, 0, 0, 0}
98193 };
98194
98195
98196 int option_index = 0;
98197 int c;
98198 while ((c = getopt_long(argc, argv, "ab:cf:ghl:m:o:svwxz", long_options, &option_index)) != -1) {
98199 switch (c) {
98200 case 0: {
98201 if (long_options[option_index].flag != 0) break;
98202
98203 char **optionString = __null;
98204 switch (option_index) {
98205 case 5: optionString = &SaveMaskFileName; break;
98206 case 6: optionString = &LoadMaskFileName; break;
98207 case 7: optionString = &VisualizeMaskFileName; break;
98208 }
98209
98210 if (*optionString != __null) {
98211 cerr << "enblend: more than one "
98212 << long_options[option_index].name
98213 << " output file specified."
98214 << endl;
98215 printUsageAndExit();
98216 break;
98217 }
98218
98219 int len = strlen(optarg) + 1;
98220
98221 try {
98222 *optionString = new char[len];
98223 } catch (std::bad_alloc& e) {
98224 cerr << endl << "enblend: out of memory"
98225 << endl << e.what()
98226 << endl;
98227 exit(1);
98228 }
98229
98230 strncpy(*optionString, optarg, len);
98231
98232 break;
98233 }
98234 case 1: {
98235 if (long_options[option_index].flag != 0) break;
98236
98237 unsigned int *optionUInt = __null;
98238 switch (option_index) {
98239 case 8: optionUInt = &GDAKmax; break;
98240 case 9: optionUInt = &DijkstraRadius; break;
98241 case 10: optionUInt = &MaskVectorizeDistance; break;
98242 }
98243
98244 int value = atoi(optarg);
98245 if (value < 1) {
98246 cerr << "enblend: " << long_options[option_index].name
98247 << " must be 1 or more." << endl;
98248 printUsageAndExit();
98249 }
98250
98251 *optionUInt = static_cast<unsigned int>(value);
98252
98253 break;
98254 }
98255 case 'a': {
98256 OneAtATime = false;
98257 break;
98258 }
98259 case 'b': {
98260 int kilobytes = atoi(optarg);
98261 if (kilobytes < 1) {
98262 cerr << "enblend: cache block size must be 1 or more."
98263 << endl;
98264 printUsageAndExit();
98265 }
98266 CachedFileImageDirector::v().setBlockSize(
98267 (long long)kilobytes << 10);
98268 break;
98269 }
98270 case 'c': {
98271 UseCIECAM = true;
98272 break;
98273 }
98274 case 'f': {
98275 OutputSizeGiven = true;
98276 int nP = sscanf(optarg, "%dx%d", &OutputWidthCmdLine, &OutputHeightCmdLine);
98277 if (nP != 2) {
98278 cerr << "enblend: the -f option requires a parameter of the form WIDTHxHEIGHT"
98279 << endl;
98280 printUsageAndExit();
98281 }
98282 break;
98283 }
98284 case 'g': {
98285 GimpAssociatedAlphaHack = true;
98286 break;
98287 }
98288 case 'h': {
98289 printUsageAndExit();
98290 break;
98291 }
98292 case 'l': {
98293 int levels = atoi(optarg);
98294 if (levels < 1 || levels > 29) {
98295 cerr << "enblend: levels must in the range 1 to 29."
98296 << endl;
98297 printUsageAndExit();
98298 }
98299 ExactLevels = (unsigned int)levels;
98300 break;
98301 }
98302 case 'm': {
98303 int megabytes = atoi(optarg);
98304 if (megabytes < 1) {
98305 cerr << "enblend: memory limit must be 1 or more."
98306 << endl;
98307 printUsageAndExit();
98308 }
98309 CachedFileImageDirector::v().setAllocation(
98310 (long long)megabytes << 20);
98311 break;
98312 }
98313 case 'o': {
98314 if (outputFileName != __null) {
98315 cerr << "enblend: more than one output file specified."
98316 << endl;
98317 printUsageAndExit();
98318 break;
98319 }
98320 int len = strlen(optarg) + 1;
98321 try {
98322 outputFileName = new char[len];
98323 } catch (std::bad_alloc& e) {
98324 cerr << endl << "enblend: out of memory"
98325 << endl << e.what()
98326 << endl;
98327 exit(1);
98328 }
98329 strncpy(outputFileName, optarg, len);
98330 break;
98331 }
98332 case 's': {
98333
98334 OneAtATime = true;
98335 cerr << "enblend: the -s flag is deprecated." << endl;
98336 break;
98337 }
98338 case 'v': {
98339 Verbose++;
98340 break;
98341 }
98342 case 'w': {
98343 Wraparound = true;
98344 break;
98345 }
98346 case 'x': {
98347 Checkpoint = true;
98348 break;
98349 }
98350 case 'z': {
98351 UseLZW = true;
98352 break;
98353 }
98354 default: {
98355 printUsageAndExit();
98356 break;
98357 }
98358 }
98359 }
98360
98361
98362 if (outputFileName == __null) {
98363 cerr << "enblend: no output file specified." << endl;
98364 printUsageAndExit();
98365 }
98366
98367
98368 if (optind < argc) {
98369 while (optind < argc) {
98370 # 468 "enblend.cc"
98371 inputFileNameList.push_back(argv[optind++]);
98372
98373 }
98374 } else {
98375 cerr << "enblend: no input files specified." << endl;
98376 printUsageAndExit();
98377 }
98378
98379 if (UseGPU) {
98380 initGPU();
98381 }
98382
98383 if (MaskVectorizeDistance == 0) {
98384 MaskVectorizeDistance = CoarseMask ? 4 : 20;
98385 }
98386
98387
98388 if (inputFileNameList.size() <= 1) {
98389 cerr << "enblend: only one input file given. "
98390 << "Enblend needs two or more overlapping input images in order "
98391 << "to do blending calculations. The output will be the same as "
98392 << "the input."
98393 << endl;
98394 }
98395
98396
98397 list<ImageImportInfo*> imageInfoList;
98398 list<ImageImportInfo*>::iterator imageInfoIterator;
98399
98400 bool isColor = false;
98401 const char *pixelType = __null;
98402 ImageImportInfo::ICCProfile iccProfile;
98403 Rect2D inputUnion;
98404
98405
98406 inputFileNameIterator = inputFileNameList.begin();
98407 while (inputFileNameIterator != inputFileNameList.end()) {
98408
98409 ImageImportInfo *inputInfo = __null;
98410 try {
98411 inputInfo = new ImageImportInfo(*inputFileNameIterator);
98412 } catch (StdException& e) {
98413 cerr << endl << "enblend: error opening input file \""
98414 << *inputFileNameIterator << "\":"
98415 << endl << e.what()
98416 << endl;
98417 exit(1);
98418 }
98419
98420
98421 imageInfoList.push_back(inputInfo);
98422
98423 if (Verbose > 1) {
98424 cout << "Input image \""
98425 << *inputFileNameIterator
98426 << "\" ";
98427
98428 if (inputInfo->isColor()) cout << "RGB ";
98429
98430 if (!inputInfo->getICCProfile().empty()) cout << "ICC ";
98431
98432 cout << inputInfo->getPixelType() << " "
98433 << "position="
98434 << inputInfo->getPosition().x
98435 << "x"
98436 << inputInfo->getPosition().y
98437 << " "
98438 << "size="
98439 << inputInfo->width()
98440 << "x"
98441 << inputInfo->height()
98442 << endl;
98443 }
98444
98445 if (inputInfo->numExtraBands() < 1) {
98446
98447 cerr << "enblend: Input image \""
98448 << *inputFileNameIterator << "\" does not have an alpha "
98449 << "channel. This is required to determine which pixels "
98450 << "contribute to the final image."
98451 << endl;
98452 exit(1);
98453 }
98454
98455
98456 Rect2D imageROI(Point2D(inputInfo->getPosition()),
98457 Size2D(inputInfo->width(), inputInfo->height()));
98458
98459 if (inputFileNameIterator == inputFileNameList.begin()) {
98460
98461 inputUnion = imageROI;
98462 isColor = inputInfo->isColor();
98463 pixelType = inputInfo->getPixelType();
98464 iccProfile = inputInfo->getICCProfile();
98465 if (!iccProfile.empty()) {
98466 InputProfile = cmsOpenProfileFromMem(iccProfile.data(), iccProfile.size());
98467 if (InputProfile == __null) {
98468 cerr << endl << "enblend: error parsing ICC profile data from file\""
98469 << *inputFileNameIterator
98470 << "\"" << endl;
98471 exit(1);
98472 }
98473 }
98474 }
98475 else {
98476
98477 inputUnion |= imageROI;
98478
98479 if (isColor != inputInfo->isColor()) {
98480 cerr << "enblend: Input image \""
98481 << *inputFileNameIterator << "\" is "
98482 << (inputInfo->isColor() ? "color" : "grayscale")
98483 << " but previous images are "
98484 << (isColor ? "color" : "grayscale")
98485 << "." << endl;
98486 exit(1);
98487 }
98488 if (strcmp(pixelType, inputInfo->getPixelType())) {
98489 cerr << "enblend: Input image \""
98490 << *inputFileNameIterator << "\" has pixel type "
98491 << inputInfo->getPixelType()
98492 << " but previous images have pixel type "
98493 << pixelType
98494 << "." << endl;
98495 exit(1);
98496 }
98497 if (!std::equal(iccProfile.begin(), iccProfile.end(), inputInfo->getICCProfile().begin())) {
98498 ImageImportInfo::ICCProfile mismatchProfile = inputInfo->getICCProfile();
98499 cmsHPROFILE newProfile = __null;
98500 if (!mismatchProfile.empty()) {
98501 newProfile = cmsOpenProfileFromMem(mismatchProfile.data(), mismatchProfile.size());
98502 if (newProfile == __null) {
98503 cerr << endl << "enblend: error parsing ICC profile data from file\""
98504 << *inputFileNameIterator
98505 << "\"" << endl;
98506 exit(1);
98507 }
98508 }
98509
98510 cerr << endl << "enblend: Input image \""
98511 << *inputFileNameIterator
98512 << "\" has ";
98513 if (newProfile) {
98514 cerr << " ICC profile \""
98515 << cmsTakeProductName(newProfile)
98516 << " "
98517 << cmsTakeProductDesc(newProfile)
98518 << "\"";
98519 } else {
98520 cerr << " no ICC profile";
98521 }
98522 cerr << " but previous images have ";
98523 if (InputProfile) {
98524 cerr << " ICC profile \""
98525 << cmsTakeProductName(InputProfile)
98526 << " "
98527 << cmsTakeProductDesc(InputProfile)
98528 << "\"." << endl;
98529 } else {
98530 cerr << " no ICC profile." << endl;
98531 }
98532 cerr << "enblend: Blending images with different color spaces may have unexpected results."
98533 << endl;
98534
98535 }
98536 }
98537
98538 inputFileNameIterator++;
98539 }
98540
98541
98542 if (OutputSizeGiven) {
98543 inputUnion |= Rect2D(Size2D(OutputWidthCmdLine, OutputHeightCmdLine));
98544 }
98545
98546
98547 ImageExportInfo outputImageInfo(outputFileName);
98548 if (UseLZW) outputImageInfo.setCompression("LZW");
98549
98550
98551 outputImageInfo.setPixelType(pixelType);
98552
98553
98554 outputImageInfo.setICCProfile(iccProfile);
98555
98556 if (UseCIECAM) {
98557 if (InputProfile == __null) {
98558 cerr << "enblend: Input images do not have ICC profiles. Assuming sRGB." << endl;
98559 InputProfile = cmsCreate_sRGBProfile();
98560 }
98561 XYZProfile = cmsCreateXYZProfile();
98562
98563 InputToXYZTransform = cmsCreateTransform(InputProfile, (((4) << 16)|((3) << 3)|(0)),
98564 XYZProfile, (((9) << 16)|((3) << 3)|(0)),
98565 0, 0x0100);
98566 if (InputToXYZTransform == __null) {
98567 cerr << "enblend: Error building color transform from \""
98568 << cmsTakeProductName(InputProfile)
98569 << " "
98570 << cmsTakeProductDesc(InputProfile)
98571 << "\" to XYZ." << endl;
98572 exit(1);
98573 }
98574
98575 XYZToInputTransform = cmsCreateTransform(XYZProfile, (((9) << 16)|((3) << 3)|(0)),
98576 InputProfile, (((4) << 16)|((3) << 3)|(0)),
98577 0, 0x0100);
98578 if (XYZToInputTransform == __null) {
98579 cerr << "enblend: Error building color transform from XYZ to \""
98580 << cmsTakeProductName(InputProfile)
98581 << " "
98582 << cmsTakeProductDesc(InputProfile)
98583 << "\"." << endl;
98584 exit(1);
98585 }
98586
98587
98588 ViewingConditions.whitePoint.X = 96.42;
98589 ViewingConditions.whitePoint.Y = 100.0;
98590 ViewingConditions.whitePoint.Z = 82.49;
98591 ViewingConditions.Yb = 20.0;
98592 ViewingConditions.La = 31.83;
98593 ViewingConditions.surround = 1;
98594 ViewingConditions.D_value = 1.0;
98595
98596 CIECAMTransform = cmsCIECAM02Init(&ViewingConditions);
98597 if (!CIECAMTransform) {
98598 cerr << endl << "enblend: Error initializing CIECAM02 transform." << endl;
98599 exit(1);
98600 }
98601 }
98602
98603
98604 if (Verbose > 1) {
98605 cout << "Output image size: " << inputUnion << endl;
98606 }
98607
98608
98609 outputImageInfo.setXResolution(300.0);
98610 outputImageInfo.setYResolution(300.0);
98611 outputImageInfo.setPosition(inputUnion.upperLeft());
98612
98613
98614 try {
98615
98616
98617
98618 encoder(outputImageInfo);
98619 } catch (StdException & e) {
98620 cerr << endl << "enblend: error opening output file \""
98621 << outputFileName
98622 << "\":"
98623 << endl << e.what()
98624 << endl;
98625 exit(1);
98626 }
98627
98628
98629 if (LoadMaskFileName) try {
98630 ImageImportInfo maskInfo(LoadMaskFileName);
98631 } catch (StdException& e) {
98632 cerr << endl << "enblend: error opening load-mask input file \""
98633 << LoadMaskFileName << "\":"
98634 << endl << e.what()
98635 << endl;
98636 exit(1);
98637 }
98638
98639
98640 if (SaveMaskFileName) try {
98641 ImageExportInfo maskInfo(SaveMaskFileName);
98642 encoder(maskInfo);
98643 } catch (StdException& e) {
98644 cerr << endl << "enblend: error opening save-mask output file \""
98645 << SaveMaskFileName << "\":"
98646 << endl << e.what()
98647 << endl;
98648 exit(1);
98649 }
98650
98651
98652 if (VisualizeMaskFileName) try {
98653 ImageExportInfo maskInfo(VisualizeMaskFileName);
98654 encoder(maskInfo);
98655 } catch (StdException& e) {
98656 cerr << endl << "enblend: error opening visualize output file \""
98657 << VisualizeMaskFileName << "\":"
98658 << endl << e.what()
98659 << endl;
98660 exit(1);
98661 }
98662
98663 if (VisualizeMaskFileName && !OptimizeMask) {
98664 cerr << endl << "enblend: --visualize does nothing without --optimize."
98665 << endl;
98666 }
98667
98668
98669 try {
98670 if (isColor) {
98671 if (strcmp(pixelType, "UINT8" ) == 0) enblendMain<RGBValue<UInt8 > >(imageInfoList, outputImageInfo, inputUnion);
98672 else if (strcmp(pixelType, "INT8" ) == 0) enblendMain<RGBValue<Int8 > >(imageInfoList, outputImageInfo, inputUnion);
98673 else if (strcmp(pixelType, "UINT16") == 0) enblendMain<RGBValue<UInt16> >(imageInfoList, outputImageInfo, inputUnion);
98674 else if (strcmp(pixelType, "INT16" ) == 0) enblendMain<RGBValue<Int16 > >(imageInfoList, outputImageInfo, inputUnion);
98675 else if (strcmp(pixelType, "UINT32") == 0) enblendMain<RGBValue<UInt32> >(imageInfoList, outputImageInfo, inputUnion);
98676 else if (strcmp(pixelType, "INT32" ) == 0) enblendMain<RGBValue<Int32 > >(imageInfoList, outputImageInfo, inputUnion);
98677
98678
98679 else if (strcmp(pixelType, "FLOAT" ) == 0) enblendMain<RGBValue<float > >(imageInfoList, outputImageInfo, inputUnion);
98680 else if (strcmp(pixelType, "DOUBLE") == 0) enblendMain<RGBValue<double> >(imageInfoList, outputImageInfo, inputUnion);
98681 else {
98682 cerr << "enblend: images with pixel type \""
98683 << pixelType
98684 << "\" are not supported."
98685 << endl;
98686 exit(1);
98687 }
98688 } else {
98689 if (strcmp(pixelType, "UINT8" ) == 0) enblendMain<UInt8 >(imageInfoList, outputImageInfo, inputUnion);
98690 else if (strcmp(pixelType, "INT8" ) == 0) enblendMain<Int8 >(imageInfoList, outputImageInfo, inputUnion);
98691 else if (strcmp(pixelType, "UINT16") == 0) enblendMain<UInt16>(imageInfoList, outputImageInfo, inputUnion);
98692 else if (strcmp(pixelType, "INT16" ) == 0) enblendMain<Int16 >(imageInfoList, outputImageInfo, inputUnion);
98693 else if (strcmp(pixelType, "UINT32") == 0) enblendMain<UInt32>(imageInfoList, outputImageInfo, inputUnion);
98694 else if (strcmp(pixelType, "INT32" ) == 0) enblendMain<Int32 >(imageInfoList, outputImageInfo, inputUnion);
98695
98696
98697 else if (strcmp(pixelType, "FLOAT" ) == 0) enblendMain<float >(imageInfoList, outputImageInfo, inputUnion);
98698 else if (strcmp(pixelType, "DOUBLE") == 0) enblendMain<double>(imageInfoList, outputImageInfo, inputUnion);
98699 else {
98700 cerr << "enblend: images with pixel type \""
98701 << pixelType
98702 << "\" are not supported."
98703 << endl;
98704 exit(1);
98705 }
98706 }
98707
98708
98709
98710 imageInfoIterator = imageInfoList.begin();
98711 while (imageInfoIterator != imageInfoList.end()) {
98712 delete *imageInfoIterator++;
98713 }
98714
98715 delete[] outputFileName;
98716
98717 } catch (std::bad_alloc& e) {
98718 cerr << endl << "enblend: out of memory"
98719 << endl << e.what()
98720 << endl;
98721 exit(1);
98722 } catch (StdException& e) {
98723 cerr << endl << "enblend: an exception occured"
98724 << endl << e.what()
98725 << endl;
98726 exit(1);
98727 }
98728
98729 if (CIECAMTransform) cmsCIECAM02Done(CIECAMTransform);
98730 if (InputToXYZTransform) cmsDeleteTransform(InputToXYZTransform);
98731 if (XYZToInputTransform) cmsDeleteTransform(XYZToInputTransform);
98732 if (XYZProfile) cmsCloseProfile(XYZProfile);
98733 if (InputProfile) cmsCloseProfile(InputProfile);
98734
98735 if (UseGPU) {
98736 wrapupGPU();
98737 }
98738
98739 delete[] SaveMaskFileName;
98740 delete[] LoadMaskFileName;
98741 delete[] VisualizeMaskFileName;
98742
98743
98744 return 0;
98745 }