gccxml_gem 0.9.3-x86-darwin-10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (176) hide show
  1. data/Rakefile +84 -0
  2. data/bin/gccxml +0 -0
  3. data/bin/gccxml_cc1plus +0 -0
  4. data/gccxml.rb +57 -0
  5. data/share/doc/gccxml-0.9/Copyright.txt +55 -0
  6. data/share/doc/gccxml-0.9/gccxml.html +168 -0
  7. data/share/doc/gccxml-0.9/gccxml.txt +293 -0
  8. data/share/gccxml-0.9/GCC/2.95/algorithm +76 -0
  9. data/share/gccxml-0.9/GCC/2.95/bitset +17 -0
  10. data/share/gccxml-0.9/GCC/2.95/cctype +24 -0
  11. data/share/gccxml-0.9/GCC/2.95/clocale +14 -0
  12. data/share/gccxml-0.9/GCC/2.95/cmath +33 -0
  13. data/share/gccxml-0.9/GCC/2.95/complex +38 -0
  14. data/share/gccxml-0.9/GCC/2.95/csetjmp +13 -0
  15. data/share/gccxml-0.9/GCC/2.95/csignal +14 -0
  16. data/share/gccxml-0.9/GCC/2.95/cstdarg +12 -0
  17. data/share/gccxml-0.9/GCC/2.95/cstddef +13 -0
  18. data/share/gccxml-0.9/GCC/2.95/cstdio +55 -0
  19. data/share/gccxml-0.9/GCC/2.95/cstdlib +66 -0
  20. data/share/gccxml-0.9/GCC/2.95/cstring +34 -0
  21. data/share/gccxml-0.9/GCC/2.95/ctime +24 -0
  22. data/share/gccxml-0.9/GCC/2.95/cwchar +65 -0
  23. data/share/gccxml-0.9/GCC/2.95/cwctype +31 -0
  24. data/share/gccxml-0.9/GCC/2.95/deque +19 -0
  25. data/share/gccxml-0.9/GCC/2.95/exception +20 -0
  26. data/share/gccxml-0.9/GCC/2.95/fstream +23 -0
  27. data/share/gccxml-0.9/GCC/2.95/functional +64 -0
  28. data/share/gccxml-0.9/GCC/2.95/gccxml_bitset +1066 -0
  29. data/share/gccxml-0.9/GCC/2.95/iomanip +20 -0
  30. data/share/gccxml-0.9/GCC/2.95/iosfwd +20 -0
  31. data/share/gccxml-0.9/GCC/2.95/iostream +27 -0
  32. data/share/gccxml-0.9/GCC/2.95/iterator +39 -0
  33. data/share/gccxml-0.9/GCC/2.95/list +19 -0
  34. data/share/gccxml-0.9/GCC/2.95/map +20 -0
  35. data/share/gccxml-0.9/GCC/2.95/memory +21 -0
  36. data/share/gccxml-0.9/GCC/2.95/new +13 -0
  37. data/share/gccxml-0.9/GCC/2.95/numeric +15 -0
  38. data/share/gccxml-0.9/GCC/2.95/pthread.h +16 -0
  39. data/share/gccxml-0.9/GCC/2.95/queue +20 -0
  40. data/share/gccxml-0.9/GCC/2.95/set +20 -0
  41. data/share/gccxml-0.9/GCC/2.95/sstream +24 -0
  42. data/share/gccxml-0.9/GCC/2.95/stack +19 -0
  43. data/share/gccxml-0.9/GCC/2.95/std/bastring.cc +524 -0
  44. data/share/gccxml-0.9/GCC/2.95/std/complext.h +397 -0
  45. data/share/gccxml-0.9/GCC/2.95/std/dcomplex.h +92 -0
  46. data/share/gccxml-0.9/GCC/2.95/std/fcomplex.h +88 -0
  47. data/share/gccxml-0.9/GCC/2.95/std/gslice_array.h +170 -0
  48. data/share/gccxml-0.9/GCC/2.95/std/indirect_array.h +157 -0
  49. data/share/gccxml-0.9/GCC/2.95/std/ldcomplex.h +96 -0
  50. data/share/gccxml-0.9/GCC/2.95/std/mask_array.h +154 -0
  51. data/share/gccxml-0.9/GCC/2.95/std/slice_array.h +156 -0
  52. data/share/gccxml-0.9/GCC/2.95/std/std_valarray.h +728 -0
  53. data/share/gccxml-0.9/GCC/2.95/std/straits.h +162 -0
  54. data/share/gccxml-0.9/GCC/2.95/std/valarray_meta.h +1035 -0
  55. data/share/gccxml-0.9/GCC/2.95/stdexcept +17 -0
  56. data/share/gccxml-0.9/GCC/2.95/stl_alloc.h +1057 -0
  57. data/share/gccxml-0.9/GCC/2.95/stl_bvector.h +836 -0
  58. data/share/gccxml-0.9/GCC/2.95/stl_deque.h +1699 -0
  59. data/share/gccxml-0.9/GCC/2.95/stl_list.h +843 -0
  60. data/share/gccxml-0.9/GCC/2.95/stl_tree.h +1331 -0
  61. data/share/gccxml-0.9/GCC/2.95/stl_vector.h +828 -0
  62. data/share/gccxml-0.9/GCC/2.95/string +26 -0
  63. data/share/gccxml-0.9/GCC/2.95/strstream +23 -0
  64. data/share/gccxml-0.9/GCC/2.95/typeinfo +11 -0
  65. data/share/gccxml-0.9/GCC/2.95/utility +25 -0
  66. data/share/gccxml-0.9/GCC/2.95/valarray +52 -0
  67. data/share/gccxml-0.9/GCC/2.95/vector +19 -0
  68. data/share/gccxml-0.9/GCC/2.96/sstream +305 -0
  69. data/share/gccxml-0.9/GCC/3.0/pthread.h +16 -0
  70. data/share/gccxml-0.9/GCC/3.1/pthread.h +16 -0
  71. data/share/gccxml-0.9/GCC/3.2/bits/fstream.tcc +500 -0
  72. data/share/gccxml-0.9/GCC/3.2/bits/gthr-default.h +585 -0
  73. data/share/gccxml-0.9/GCC/3.2/bits/istream.tcc +1207 -0
  74. data/share/gccxml-0.9/GCC/3.2/bits/locale_facets.h +1810 -0
  75. data/share/gccxml-0.9/GCC/3.2/bits/locale_facets.tcc +2397 -0
  76. data/share/gccxml-0.9/GCC/3.2/bits/messages_members.h +108 -0
  77. data/share/gccxml-0.9/GCC/3.2/bits/ostream.tcc +713 -0
  78. data/share/gccxml-0.9/GCC/3.2/bits/sstream.tcc +241 -0
  79. data/share/gccxml-0.9/GCC/3.2/bits/stl_deque.h +1682 -0
  80. data/share/gccxml-0.9/GCC/3.2/bits/stl_list.h +989 -0
  81. data/share/gccxml-0.9/GCC/3.2/bits/stl_tree.h +1462 -0
  82. data/share/gccxml-0.9/GCC/3.2/bits/stl_vector.h +1085 -0
  83. data/share/gccxml-0.9/GCC/3.2/bits/valarray_meta.h +1063 -0
  84. data/share/gccxml-0.9/GCC/3.2/fstream +579 -0
  85. data/share/gccxml-0.9/GCC/3.2/pthread.h +16 -0
  86. data/share/gccxml-0.9/GCC/3.2/sstream +384 -0
  87. data/share/gccxml-0.9/GCC/3.3/bits/fstream.tcc +530 -0
  88. data/share/gccxml-0.9/GCC/3.3/bits/list.tcc +378 -0
  89. data/share/gccxml-0.9/GCC/3.3/bits/locale_facets.h +2050 -0
  90. data/share/gccxml-0.9/GCC/3.3/bits/messages_members.h +108 -0
  91. data/share/gccxml-0.9/GCC/3.3/bits/sstream.tcc +243 -0
  92. data/share/gccxml-0.9/GCC/3.3/bits/stl_deque.h +1603 -0
  93. data/share/gccxml-0.9/GCC/3.3/bits/stl_list.h +1167 -0
  94. data/share/gccxml-0.9/GCC/3.3/bits/stl_tree.h +1462 -0
  95. data/share/gccxml-0.9/GCC/3.3/bits/stl_vector.h +992 -0
  96. data/share/gccxml-0.9/GCC/3.3/bits/valarray_meta.h +1135 -0
  97. data/share/gccxml-0.9/GCC/3.3/fstream +842 -0
  98. data/share/gccxml-0.9/GCC/3.3/gccxml_builtins.h +22 -0
  99. data/share/gccxml-0.9/GCC/3.3/sstream +638 -0
  100. data/share/gccxml-0.9/GCC/3.4/bits/gthr-default.h +669 -0
  101. data/share/gccxml-0.9/GCC/3.4/gccxml_builtins.h +91 -0
  102. data/share/gccxml-0.9/GCC/4.0/emmintrin.h +5 -0
  103. data/share/gccxml-0.9/GCC/4.0/gccxml_apple_emmintrin.h +1037 -0
  104. data/share/gccxml-0.9/GCC/4.0/gccxml_apple_mmintrin.h +669 -0
  105. data/share/gccxml-0.9/GCC/4.0/gccxml_apple_xmmintrin.h +870 -0
  106. data/share/gccxml-0.9/GCC/4.0/gccxml_builtins.h +128 -0
  107. data/share/gccxml-0.9/GCC/4.0/gccxml_gnu_emmintrin.h +977 -0
  108. data/share/gccxml-0.9/GCC/4.0/gccxml_gnu_mmintrin.h +636 -0
  109. data/share/gccxml-0.9/GCC/4.0/gccxml_gnu_xmmintrin.h +833 -0
  110. data/share/gccxml-0.9/GCC/4.0/mmintrin.h +5 -0
  111. data/share/gccxml-0.9/GCC/4.0/xmmintrin.h +5 -0
  112. data/share/gccxml-0.9/GCC/4.1/bits/gthr-default.h +622 -0
  113. data/share/gccxml-0.9/GCC/4.1/emmintrin.h +5 -0
  114. data/share/gccxml-0.9/GCC/4.1/gccxml_apple_emmintrin.h +1509 -0
  115. data/share/gccxml-0.9/GCC/4.1/gccxml_apple_mmintrin.h +942 -0
  116. data/share/gccxml-0.9/GCC/4.1/gccxml_apple_xmmintrin.h +1192 -0
  117. data/share/gccxml-0.9/GCC/4.1/gccxml_builtins.h +131 -0
  118. data/share/gccxml-0.9/GCC/4.1/gccxml_gnu_emmintrin.h +1004 -0
  119. data/share/gccxml-0.9/GCC/4.1/gccxml_gnu_mmintrin.h +637 -0
  120. data/share/gccxml-0.9/GCC/4.1/gccxml_gnu_xmmintrin.h +834 -0
  121. data/share/gccxml-0.9/GCC/4.1/mmintrin.h +5 -0
  122. data/share/gccxml-0.9/GCC/4.1/xmmintrin.h +5 -0
  123. data/share/gccxml-0.9/GCC/4.2/emmintrin.h +5 -0
  124. data/share/gccxml-0.9/GCC/4.2/gccxml_apple_emmintrin.h +1509 -0
  125. data/share/gccxml-0.9/GCC/4.2/gccxml_apple_mmintrin.h +942 -0
  126. data/share/gccxml-0.9/GCC/4.2/gccxml_apple_xmmintrin.h +1192 -0
  127. data/share/gccxml-0.9/GCC/4.2/gccxml_builtins.h +131 -0
  128. data/share/gccxml-0.9/GCC/4.2/gccxml_gnu_emmintrin.h +1013 -0
  129. data/share/gccxml-0.9/GCC/4.2/gccxml_gnu_mmintrin.h +663 -0
  130. data/share/gccxml-0.9/GCC/4.2/gccxml_gnu_xmmintrin.h +860 -0
  131. data/share/gccxml-0.9/GCC/4.2/mmintrin.h +5 -0
  132. data/share/gccxml-0.9/GCC/4.2/xmmintrin.h +5 -0
  133. data/share/gccxml-0.9/GCC/4.3/emmintrin.h +1043 -0
  134. data/share/gccxml-0.9/GCC/4.3/gccxml_builtins.h +183 -0
  135. data/share/gccxml-0.9/GCC/4.3/mmintrin.h +663 -0
  136. data/share/gccxml-0.9/GCC/4.3/xmmintrin.h +867 -0
  137. data/share/gccxml-0.9/GCC/4.4/bits/c++config.h +1431 -0
  138. data/share/gccxml-0.9/GCC/4.4/emmintrin.h +1041 -0
  139. data/share/gccxml-0.9/GCC/4.4/gccxml_builtins.h +153 -0
  140. data/share/gccxml-0.9/GCC/4.4/mmintrin.h +662 -0
  141. data/share/gccxml-0.9/GCC/4.4/xmmintrin.h +864 -0
  142. data/share/gccxml-0.9/GCC/4.5/gccxml_builtins.h +154 -0
  143. data/share/gccxml-0.9/GCC/4.5/iomanip +349 -0
  144. data/share/gccxml-0.9/GCC/COPYING.RUNTIME +73 -0
  145. data/share/gccxml-0.9/GCC/COPYING3 +674 -0
  146. data/share/gccxml-0.9/IBM/8.0/adapt_headers.sh +34 -0
  147. data/share/gccxml-0.9/IBM/8.0/stdlib.h.patch +27 -0
  148. data/share/gccxml-0.9/IBM/8.0/xstring.patch +19 -0
  149. data/share/gccxml-0.9/IBM/README +8 -0
  150. data/share/gccxml-0.9/IBM/find_flags +51 -0
  151. data/share/gccxml-0.9/IBM/find_flags_common +48 -0
  152. data/share/gccxml-0.9/Intel/find_flags +56 -0
  153. data/share/gccxml-0.9/Intel/pthread.h +16 -0
  154. data/share/gccxml-0.9/MIPSpro/7.3/exception +9 -0
  155. data/share/gccxml-0.9/MIPSpro/7.3/gccxml_mpro_internals.h +21 -0
  156. data/share/gccxml-0.9/MIPSpro/7.3/iomanip +161 -0
  157. data/share/gccxml-0.9/MIPSpro/7.3/ostream +9 -0
  158. data/share/gccxml-0.9/MIPSpro/7.3/stddef.h +9 -0
  159. data/share/gccxml-0.9/MIPSpro/7.3/stl_config.h +9 -0
  160. data/share/gccxml-0.9/MIPSpro/7.3/stl_locale.h +17 -0
  161. data/share/gccxml-0.9/MIPSpro/7.3/stl_monetary.h +14 -0
  162. data/share/gccxml-0.9/MIPSpro/7.3/stl_numeric_facets.h +13 -0
  163. data/share/gccxml-0.9/MIPSpro/7.3/stl_threads.h +11 -0
  164. data/share/gccxml-0.9/MIPSpro/7.3/string +18 -0
  165. data/share/gccxml-0.9/MIPSpro/find_flags +70 -0
  166. data/share/gccxml-0.9/MIPSpro/mipspro_defs.cxx +63 -0
  167. data/share/gccxml-0.9/Sun/5.8/Cstd.patch +156 -0
  168. data/share/gccxml-0.9/Sun/5.8/adapt_headers.sh +32 -0
  169. data/share/gccxml-0.9/Sun/5.8/std-5.10.patch +22 -0
  170. data/share/gccxml-0.9/Sun/README +8 -0
  171. data/share/gccxml-0.9/Sun/find_flags +51 -0
  172. data/share/gccxml-0.9/Sun/find_flags_common +42 -0
  173. data/share/gccxml-0.9/gccxml_config +2 -0
  174. data/share/gccxml-0.9/gccxml_identify_compiler.cc +13 -0
  175. data/share/man/man1/gccxml.1 +246 -0
  176. metadata +245 -0
@@ -0,0 +1,154 @@
1
+ #define __builtin_apply(x,y,z) ((void*)0)
2
+ #define __builtin_nan(x) (0.0)
3
+ #define __builtin_nanf(x) (0.0f)
4
+ #define __builtin_nanl(x) (0.0l)
5
+ #define __builtin_huge_val(x) (0.0)
6
+ #define __builtin_huge_valf(x) (0.0f)
7
+ #define __builtin_huge_vall(x) (0.0l)
8
+ #define __builtin_apply_args(x) ((void*)0)
9
+ #define __builtin_types_compatible_p(x,y) 0
10
+ #define __builtin_choose_expr(x,y,z) int
11
+ #define __builtin_constant_p(x) 0
12
+ void* __builtin_memchr(void const*, int, unsigned int);
13
+ void __builtin_return (void *RESULT);
14
+ void * __builtin_return_address (unsigned int LEVEL);
15
+ void * __builtin_frame_address (unsigned int LEVEL);
16
+ long __builtin_expect (long EXP, long C);
17
+ void __builtin_prefetch (const void *ADDR, ...);
18
+ double __builtin_inf (void);
19
+ float __builtin_inff (void);
20
+ long double __builtin_infl (void);
21
+ double __builtin_nans (const char *str);
22
+ float __builtin_nansf (const char *str);
23
+ long double __builtin_nansl (const char *str);
24
+ double __builtin_acos(double);
25
+ float __builtin_acosf(float);
26
+ long double __builtin_acosl(long double);
27
+ double __builtin_asin(double);
28
+ float __builtin_asinf(float);
29
+ long double __builtin_asinl(long double);
30
+ double __builtin_atan(double);
31
+ double __builtin_atan2(double, double);
32
+ float __builtin_atan2f(float, float);
33
+ long double __builtin_atan2l(long double, long double);
34
+ float __builtin_atanf(float);
35
+ long double __builtin_atanl(long double);
36
+ double __builtin_ceil(double);
37
+ float __builtin_ceilf(float);
38
+ long double __builtin_ceill(long double);
39
+ double __builtin_cos(double);
40
+ float __builtin_cosf(float);
41
+ double __builtin_cosh(double);
42
+ float __builtin_coshf(float);
43
+ long double __builtin_coshl(long double);
44
+ long double __builtin_cosl(long double);
45
+ double __builtin_exp(double);
46
+ float __builtin_expf(float);
47
+ long double __builtin_expl(long double);
48
+ double __builtin_fabs(double);
49
+ float __builtin_fabsf(float);
50
+ long double __builtin_fabsl(long double);
51
+ double __builtin_floor(double);
52
+ float __builtin_floorf(float);
53
+ long double __builtin_floorl(long double);
54
+ float __builtin_fmodf(float, float);
55
+ long double __builtin_fmodl(long double, long double);
56
+ double __builtin_frexp(double, int*);
57
+ float __builtin_frexpf(float, int*);
58
+ long double __builtin_frexpl(long double, int*);
59
+ double __builtin_ldexp(double, int);
60
+ float __builtin_ldexpf(float, int);
61
+ long double __builtin_ldexpl(long double, int);
62
+ double __builtin_log(double);
63
+ double __builtin_log10(double);
64
+ float __builtin_log10f(float);
65
+ long double __builtin_log10l(long double);
66
+ float __builtin_logf(float);
67
+ long double __builtin_logl(long double);
68
+ float __builtin_modff(float, float*);
69
+ long double __builtin_modfl(long double, long double*);
70
+ float __builtin_powf(float, float);
71
+ long double __builtin_powl(long double, long double);
72
+ double __builtin_powi(double, int);
73
+ float __builtin_powif(float, int);
74
+ long double __builtin_powil(long double, int);
75
+ double __builtin_sin(double);
76
+ float __builtin_sinf(float);
77
+ double __builtin_sinh(double);
78
+ float __builtin_sinhf(float);
79
+ long double __builtin_sinhl(long double);
80
+ long double __builtin_sinl(long double);
81
+ double __builtin_sqrt(double);
82
+ float __builtin_sqrtf(float);
83
+ long double __builtin_sqrtl(long double);
84
+ double __builtin_tan(double);
85
+ float __builtin_tanf(float);
86
+ double __builtin_tanh(double);
87
+ float __builtin_tanhf(float);
88
+ long double __builtin_tanhl(long double);
89
+ long double __builtin_tanl(long double);
90
+ float __builtin_cabsf(float __complex__);
91
+ double __builtin_cabs(double __complex__);
92
+ long double __builtin_cabsl(long double __complex__);
93
+ float __builtin_cargf(float __complex__);
94
+ double __builtin_carg(double __complex__);
95
+ long double __builtin_cargl(long double __complex__);
96
+ int __builtin_ctz(int);
97
+ int __builtin_ctzl(long);
98
+ int __builtin_ctzll(long long);
99
+ int __builtin_popcount(int);
100
+ int __builtin_popcountl(long);
101
+ int __builtin_popcountll(long long);
102
+ float __complex__ __builtin_ccosf(float __complex__);
103
+ double __complex__ __builtin_ccos(double __complex__);
104
+ long double __complex__ __builtin_ccosl(long double __complex__);
105
+ float __complex__ __builtin_ccoshf(float __complex__);
106
+ double __complex__ __builtin_ccosh(double __complex__);
107
+ long double __complex__ __builtin_ccoshl(long double __complex__);
108
+ float __complex__ __builtin_cexpf(float __complex__);
109
+ double __complex__ __builtin_cexp(double __complex__);
110
+ long double __complex__ __builtin_cexpl(long double __complex__);
111
+ float __complex__ __builtin_clogf(float __complex__);
112
+ double __complex__ __builtin_clog(double __complex__);
113
+ long double __complex__ __builtin_clogl(long double __complex__);
114
+ float __complex__ __builtin_csinf(float __complex__);
115
+ double __complex__ __builtin_csin(double __complex__);
116
+ long double __complex__ __builtin_csinl(long double __complex__);
117
+ float __complex__ __builtin_csinhf(float __complex__);
118
+ double __complex__ __builtin_csinh(double __complex__);
119
+ long double __complex__ __builtin_csinhl(long double __complex__);
120
+ float __complex__ __builtin_csqrtf(float __complex__);
121
+ double __complex__ __builtin_csqrt(double __complex__);
122
+ long double __complex__ __builtin_csqrtl(long double __complex__);
123
+ float __complex__ __builtin_ctanf(float __complex__);
124
+ double __complex__ __builtin_ctan(double __complex__);
125
+ long double __complex__ __builtin_ctanl(long double __complex__);
126
+ float __complex__ __builtin_ctanhf(float __complex__);
127
+ double __complex__ __builtin_ctanh(double __complex__);
128
+ long double __complex__ __builtin_ctanhl(long double __complex__);
129
+ float __complex__ __builtin_cpowf(float __complex__, float __complex__);
130
+ double __complex__ __builtin_cpow(double __complex__, double __complex__);
131
+ long double __complex__ __builtin_cpowl(long double __complex__, long double __complex__);
132
+
133
+ /* The GCC 4.5 parser hard-codes handling of these, so they do not
134
+ have real signatures. */
135
+ bool __builtin_fpclassify(...);
136
+ bool __builtin_isfinite(...);
137
+ bool __builtin_isgreater(...);
138
+ bool __builtin_isgreaterequal(...);
139
+ bool __builtin_isinf(...);
140
+ bool __builtin_isinf_sign(...);
141
+ bool __builtin_isless(...);
142
+ bool __builtin_islessequal(...);
143
+ bool __builtin_islessgreater(...);
144
+ bool __builtin_isnan(...);
145
+ bool __builtin_isnormal(...);
146
+ bool __builtin_isunordered(...);
147
+ bool __builtin_va_arg_pack(...);
148
+ int __builtin_va_arg_pack_len(...);
149
+
150
+ /* We fake some constant expressions from GCC 4.5 parser. */
151
+ #define __is_pod(x) false
152
+ #define __is_empty(x) false
153
+ #define __has_trivial_destructor(x) false
154
+ #define __has_trivial_constructor(x) false
@@ -0,0 +1,349 @@
1
+ // Standard stream manipulators -*- C++ -*-
2
+
3
+ // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
4
+ // 2006, 2007, 2008, 2009, 2010
5
+ // Free Software Foundation, Inc.
6
+ //
7
+ // This file is part of the GNU ISO C++ Library. This library is free
8
+ // software; you can redistribute it and/or modify it under the
9
+ // terms of the GNU General Public License as published by the
10
+ // Free Software Foundation; either version 3, or (at your option)
11
+ // any later version.
12
+
13
+ // This library is distributed in the hope that it will be useful,
14
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ // GNU General Public License for more details.
17
+
18
+ // Under Section 7 of GPL version 3, you are granted additional
19
+ // permissions described in the GCC Runtime Library Exception, version
20
+ // 3.1, as published by the Free Software Foundation.
21
+
22
+ // You should have received a copy of the GNU General Public License and
23
+ // a copy of the GCC Runtime Library Exception along with this program;
24
+ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
25
+ // <http://www.gnu.org/licenses/>.
26
+
27
+ /** @file iomanip
28
+ * This is a Standard C++ Library header.
29
+ */
30
+
31
+ //
32
+ // ISO C++ 14882: 27.6.3 Standard manipulators
33
+ //
34
+
35
+ #ifndef _GLIBCXX_IOMANIP
36
+ #define _GLIBCXX_IOMANIP 1
37
+
38
+ #pragma GCC system_header
39
+
40
+ #include <bits/c++config.h>
41
+ #include <iosfwd>
42
+ #include <bits/ios_base.h>
43
+
44
+ #ifdef __GXX_EXPERIMENTAL_CXX0X__
45
+ #include <locale>
46
+ #endif
47
+
48
+ _GLIBCXX_BEGIN_NAMESPACE(std)
49
+
50
+ // [27.6.3] standard manipulators
51
+ // Also see DR 183.
52
+
53
+ struct _Resetiosflags { ios_base::fmtflags _M_mask; };
54
+
55
+ /**
56
+ * @brief Manipulator for @c setf.
57
+ * @param mask A format flags mask.
58
+ *
59
+ * Sent to a stream object, this manipulator resets the specified flags,
60
+ * via @e stream.setf(0,mask).
61
+ */
62
+ inline _Resetiosflags
63
+ resetiosflags(ios_base::fmtflags __mask)
64
+ { _Resetiosflags r = { __mask }; return r; }
65
+
66
+ template<typename _CharT, typename _Traits>
67
+ inline basic_istream<_CharT, _Traits>&
68
+ operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
69
+ {
70
+ __is.setf(ios_base::fmtflags(0), __f._M_mask);
71
+ return __is;
72
+ }
73
+
74
+ template<typename _CharT, typename _Traits>
75
+ inline basic_ostream<_CharT, _Traits>&
76
+ operator<<(basic_ostream<_CharT, _Traits>& __os, _Resetiosflags __f)
77
+ {
78
+ __os.setf(ios_base::fmtflags(0), __f._M_mask);
79
+ return __os;
80
+ }
81
+
82
+
83
+ struct _Setiosflags { ios_base::fmtflags _M_mask; };
84
+
85
+ /**
86
+ * @brief Manipulator for @c setf.
87
+ * @param mask A format flags mask.
88
+ *
89
+ * Sent to a stream object, this manipulator sets the format flags
90
+ * to @a mask.
91
+ */
92
+ inline _Setiosflags
93
+ setiosflags(ios_base::fmtflags __mask)
94
+ { _Setiosflags s = { __mask }; return s; }
95
+
96
+ template<typename _CharT, typename _Traits>
97
+ inline basic_istream<_CharT, _Traits>&
98
+ operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
99
+ {
100
+ __is.setf(__f._M_mask);
101
+ return __is;
102
+ }
103
+
104
+ template<typename _CharT, typename _Traits>
105
+ inline basic_ostream<_CharT, _Traits>&
106
+ operator<<(basic_ostream<_CharT, _Traits>& __os, _Setiosflags __f)
107
+ {
108
+ __os.setf(__f._M_mask);
109
+ return __os;
110
+ }
111
+
112
+
113
+ struct _Setbase { int _M_base; };
114
+
115
+ /**
116
+ * @brief Manipulator for @c setf.
117
+ * @param base A numeric base.
118
+ *
119
+ * Sent to a stream object, this manipulator changes the
120
+ * @c ios_base::basefield flags to @c oct, @c dec, or @c hex when @a base
121
+ * is 8, 10, or 16, accordingly, and to 0 if @a base is any other value.
122
+ */
123
+ inline _Setbase
124
+ setbase(int __base)
125
+ { _Setbase s = { __base }; return s; }
126
+
127
+ template<typename _CharT, typename _Traits>
128
+ inline basic_istream<_CharT, _Traits>&
129
+ operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
130
+ {
131
+ __is.setf(__f._M_base == 8 ? ios_base::oct :
132
+ __f._M_base == 10 ? ios_base::dec :
133
+ __f._M_base == 16 ? ios_base::hex :
134
+ ios_base::fmtflags(0), ios_base::basefield);
135
+ return __is;
136
+ }
137
+
138
+ template<typename _CharT, typename _Traits>
139
+ inline basic_ostream<_CharT, _Traits>&
140
+ operator<<(basic_ostream<_CharT, _Traits>& __os, _Setbase __f)
141
+ {
142
+ __os.setf(__f._M_base == 8 ? ios_base::oct :
143
+ __f._M_base == 10 ? ios_base::dec :
144
+ __f._M_base == 16 ? ios_base::hex :
145
+ ios_base::fmtflags(0), ios_base::basefield);
146
+ return __os;
147
+ }
148
+
149
+
150
+ template<typename _CharT>
151
+ struct _Setfill { _CharT _M_c; };
152
+
153
+ /**
154
+ * @brief Manipulator for @c fill.
155
+ * @param c The new fill character.
156
+ *
157
+ * Sent to a stream object, this manipulator calls @c fill(c) for that
158
+ * object.
159
+ */
160
+ template<typename _CharT>
161
+ inline _Setfill<_CharT>
162
+ setfill(_CharT __c)
163
+ { _Setfill<_CharT> s = { __c }; return s; }
164
+
165
+ template<typename _CharT, typename _Traits>
166
+ inline basic_istream<_CharT, _Traits>&
167
+ operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
168
+ {
169
+ __is.fill(__f._M_c);
170
+ return __is;
171
+ }
172
+
173
+ template<typename _CharT, typename _Traits>
174
+ inline basic_ostream<_CharT, _Traits>&
175
+ operator<<(basic_ostream<_CharT, _Traits>& __os, _Setfill<_CharT> __f)
176
+ {
177
+ __os.fill(__f._M_c);
178
+ return __os;
179
+ }
180
+
181
+
182
+ struct _Setprecision { int _M_n; };
183
+
184
+ /**
185
+ * @brief Manipulator for @c precision.
186
+ * @param n The new precision.
187
+ *
188
+ * Sent to a stream object, this manipulator calls @c precision(n) for
189
+ * that object.
190
+ */
191
+ inline _Setprecision
192
+ setprecision(int __n)
193
+ { _Setprecision s = { __n }; return s;}
194
+
195
+ template<typename _CharT, typename _Traits>
196
+ inline basic_istream<_CharT, _Traits>&
197
+ operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f)
198
+ {
199
+ __is.precision(__f._M_n);
200
+ return __is;
201
+ }
202
+
203
+ template<typename _CharT, typename _Traits>
204
+ inline basic_ostream<_CharT, _Traits>&
205
+ operator<<(basic_ostream<_CharT, _Traits>& __os, _Setprecision __f)
206
+ {
207
+ __os.precision(__f._M_n);
208
+ return __os;
209
+ }
210
+
211
+
212
+ struct _Setw { int _M_n; };
213
+
214
+ /**
215
+ * @brief Manipulator for @c width.
216
+ * @param n The new width.
217
+ *
218
+ * Sent to a stream object, this manipulator calls @c width(n) for
219
+ * that object.
220
+ */
221
+ inline _Setw
222
+ setw(int __n)
223
+ { _Setw s = {__n} ; return s; }
224
+
225
+ template<typename _CharT, typename _Traits>
226
+ inline basic_istream<_CharT, _Traits>&
227
+ operator>>(basic_istream<_CharT, _Traits>& __is, _Setw __f)
228
+ {
229
+ __is.width(__f._M_n);
230
+ return __is;
231
+ }
232
+
233
+ template<typename _CharT, typename _Traits>
234
+ inline basic_ostream<_CharT, _Traits>&
235
+ operator<<(basic_ostream<_CharT, _Traits>& __os, _Setw __f)
236
+ {
237
+ __os.width(__f._M_n);
238
+ return __os;
239
+ }
240
+
241
+ #ifdef __GXX_EXPERIMENTAL_CXX0X__
242
+
243
+ template<typename _MoneyT>
244
+ struct _Get_money { _MoneyT& _M_mon; bool _M_intl; };
245
+
246
+ /**
247
+ * @brief Extended manipulator for extracting money.
248
+ * @param mon Either long double or a specialization of @c basic_string.
249
+ * @param intl A bool indicating whether international format
250
+ * is to be used.
251
+ *
252
+ * Sent to a stream object, this manipulator extracts @a mon.
253
+ */
254
+ template<typename _MoneyT>
255
+ inline _Get_money<_MoneyT>
256
+ get_money(_MoneyT& __mon, bool __intl = false)
257
+ { return { __mon, __intl }; }
258
+
259
+ template<typename _CharT, typename _Traits, typename _MoneyT>
260
+ basic_istream<_CharT, _Traits>&
261
+ operator>>(basic_istream<_CharT, _Traits>& __is, _Get_money<_MoneyT> __f)
262
+ {
263
+ typedef istreambuf_iterator<_CharT, _Traits> _Iter;
264
+ typedef money_get<_CharT, _Iter> _MoneyGet;
265
+
266
+ ios_base::iostate __err = ios_base::goodbit;
267
+ const _MoneyGet& __mg = use_facet<_MoneyGet>(__is.getloc());
268
+
269
+ __mg.get(_Iter(__is.rdbuf()), _Iter(), __f._M_intl,
270
+ __is, __err, __f._M_mon);
271
+
272
+ if (ios_base::goodbit != __err)
273
+ __is.setstate(__err);
274
+
275
+ return __is;
276
+ }
277
+
278
+
279
+ template<typename _MoneyT>
280
+ struct _Put_money { const _MoneyT& _M_mon; bool _M_intl; };
281
+
282
+ /**
283
+ * @brief Extended manipulator for inserting money.
284
+ * @param mon Either long double or a specialization of @c basic_string.
285
+ * @param intl A bool indicating whether international format
286
+ * is to be used.
287
+ *
288
+ * Sent to a stream object, this manipulator inserts @a mon.
289
+ */
290
+ template<typename _MoneyT>
291
+ inline _Put_money<_MoneyT>
292
+ put_money(const _MoneyT& __mon, bool __intl = false)
293
+ { return { __mon, __intl }; }
294
+
295
+ template<typename _CharT, typename _Traits, typename _MoneyT>
296
+ basic_ostream<_CharT, _Traits>&
297
+ operator<<(basic_ostream<_CharT, _Traits>& __os, _Put_money<_MoneyT> __f)
298
+ {
299
+ typedef ostreambuf_iterator<_CharT, _Traits> _Iter;
300
+ typedef money_put<_CharT, _Iter> _MoneyPut;
301
+
302
+ const _MoneyPut& __mp = use_facet<_MoneyPut>(__os.getloc());
303
+ const _Iter __end = __mp.put(_Iter(__os.rdbuf()), __f._M_intl,
304
+ __os, __os.fill(), __f._M_mon);
305
+
306
+ if (__end.failed())
307
+ __os.setstate(ios_base::badbit);
308
+
309
+ return __os;
310
+ }
311
+
312
+ #endif
313
+
314
+ // Inhibit implicit instantiations for required instantiations,
315
+ // which are defined via explicit instantiations elsewhere.
316
+ // NB: This syntax is a GNU extension.
317
+ #if _GLIBCXX_EXTERN_TEMPLATE
318
+ extern template ostream& operator<<(ostream&, _Setfill<char>);
319
+ extern template ostream& operator<<(ostream&, _Setiosflags);
320
+ extern template ostream& operator<<(ostream&, _Resetiosflags);
321
+ extern template ostream& operator<<(ostream&, _Setbase);
322
+ extern template ostream& operator<<(ostream&, _Setprecision);
323
+ extern template ostream& operator<<(ostream&, _Setw);
324
+ extern template istream& operator>>(istream&, _Setfill<char>);
325
+ extern template istream& operator>>(istream&, _Setiosflags);
326
+ extern template istream& operator>>(istream&, _Resetiosflags);
327
+ extern template istream& operator>>(istream&, _Setbase);
328
+ extern template istream& operator>>(istream&, _Setprecision);
329
+ extern template istream& operator>>(istream&, _Setw);
330
+
331
+ #ifdef _GLIBCXX_USE_WCHAR_T
332
+ extern template wostream& operator<<(wostream&, _Setfill<wchar_t>);
333
+ extern template wostream& operator<<(wostream&, _Setiosflags);
334
+ extern template wostream& operator<<(wostream&, _Resetiosflags);
335
+ extern template wostream& operator<<(wostream&, _Setbase);
336
+ extern template wostream& operator<<(wostream&, _Setprecision);
337
+ extern template wostream& operator<<(wostream&, _Setw);
338
+ extern template wistream& operator>>(wistream&, _Setfill<wchar_t>);
339
+ extern template wistream& operator>>(wistream&, _Setiosflags);
340
+ extern template wistream& operator>>(wistream&, _Resetiosflags);
341
+ extern template wistream& operator>>(wistream&, _Setbase);
342
+ extern template wistream& operator>>(wistream&, _Setprecision);
343
+ extern template wistream& operator>>(wistream&, _Setw);
344
+ #endif
345
+ #endif
346
+
347
+ _GLIBCXX_END_NAMESPACE
348
+
349
+ #endif /* _GLIBCXX_IOMANIP */