1 // Locale support -*- C++ -*-
3 // Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
5 // This file is part of the GNU ISO C++ Library. This library is free
6 // software; you can redistribute it and/or modify it under the
7 // terms of the GNU General Public License as published by the
8 // Free Software Foundation; either version 2, or (at your option)
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License along
17 // with this library; see the file COPYING. If not, write to the Free
18 // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
21 // As a special exception, you may use this file as part of a free software
22 // library without restriction. Specifically, if other files instantiate
23 // templates or use macros or inline functions from this file, or you compile
24 // this file and link it with other files to produce an executable, this
25 // file does not by itself cause the resulting executable to be covered by
26 // the GNU General Public License. This exception does not however
27 // invalidate any other reasons why the executable file might be covered by
28 // the GNU General Public License.
31 // ISO C++ 14882: 22.1 Locales
41 // moneypunct, money_get, and money_put
42 template class moneypunct<char, false>;
43 template class moneypunct<char, true>;
44 template class moneypunct_byname<char, false>;
45 template class moneypunct_byname<char, true>;
46 template class money_get<char, istreambuf_iterator<char> >;
47 template class money_put<char, ostreambuf_iterator<char> >;
48 template class __locale_cache<numpunct<char> >;
50 #ifdef _GLIBCPP_USE_WCHAR_T
51 template class moneypunct<wchar_t, false>;
52 template class moneypunct<wchar_t, true>;
53 template class moneypunct_byname<wchar_t, false>;
54 template class moneypunct_byname<wchar_t, true>;
55 template class money_get<wchar_t, istreambuf_iterator<wchar_t> >;
56 template class money_put<wchar_t, ostreambuf_iterator<wchar_t> >;
57 template class __locale_cache<numpunct<wchar_t> >;
60 // numpunct, numpunct_byname, num_get, and num_put
61 template class numpunct<char>;
62 template class numpunct_byname<char>;
63 template class num_get<char, istreambuf_iterator<char> >;
64 template class num_put<char, ostreambuf_iterator<char> >;
66 ostreambuf_iterator<char>
67 num_put<char, ostreambuf_iterator<char> >::
68 _M_convert_int(ostreambuf_iterator<char>, ios_base&, char,
72 ostreambuf_iterator<char>
73 num_put<char, ostreambuf_iterator<char> >::
74 _M_convert_int(ostreambuf_iterator<char>, ios_base&, char,
77 #ifdef _GLIBCPP_USE_LONG_LONG
79 ostreambuf_iterator<char>
80 num_put<char, ostreambuf_iterator<char> >::
81 _M_convert_int(ostreambuf_iterator<char>, ios_base&, char,
85 ostreambuf_iterator<char>
86 num_put<char, ostreambuf_iterator<char> >::
87 _M_convert_int(ostreambuf_iterator<char>, ios_base&, char,
88 unsigned long long) const;
92 ostreambuf_iterator<char>
93 num_put<char, ostreambuf_iterator<char> >::
94 _M_convert_float(ostreambuf_iterator<char>, ios_base&, char, char,
98 ostreambuf_iterator<char>
99 num_put<char, ostreambuf_iterator<char> >::
100 _M_convert_float(ostreambuf_iterator<char>, ios_base&, char, char,
103 #ifdef _GLIBCPP_USE_WCHAR_T
104 template class numpunct<wchar_t>;
105 template class numpunct_byname<wchar_t>;
106 template class num_get<wchar_t, istreambuf_iterator<wchar_t> >;
107 template class num_put<wchar_t, ostreambuf_iterator<wchar_t> >;
110 ostreambuf_iterator<wchar_t>
111 num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
112 _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t,
116 ostreambuf_iterator<wchar_t>
117 num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
118 _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t,
119 unsigned long) const;
121 #ifdef _GLIBCPP_USE_LONG_LONG
123 ostreambuf_iterator<wchar_t>
124 num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
125 _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t,
129 ostreambuf_iterator<wchar_t>
130 num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
131 _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t,
132 unsigned long long) const;
136 ostreambuf_iterator<wchar_t>
137 num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
138 _M_convert_float(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
142 ostreambuf_iterator<wchar_t>
143 num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
144 _M_convert_float(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
149 // XXX GLIBCXX_ABI Deprecated, compatibility only.
151 ostreambuf_iterator<char>
152 num_put<char, ostreambuf_iterator<char> >::
153 _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char,
157 ostreambuf_iterator<char>
158 num_put<char, ostreambuf_iterator<char> >::
159 _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char,
160 unsigned long) const;
162 #ifdef _GLIBCPP_USE_LONG_LONG
164 ostreambuf_iterator<char>
165 num_put<char, ostreambuf_iterator<char> >::
166 _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char,
170 ostreambuf_iterator<char>
171 num_put<char, ostreambuf_iterator<char> >::
172 _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char,
173 unsigned long long) const;
176 #ifdef _GLIBCPP_USE_WCHAR_T
178 ostreambuf_iterator<wchar_t>
179 num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
180 _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
184 ostreambuf_iterator<wchar_t>
185 num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
186 _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
187 char, unsigned long) const;
189 #ifdef _GLIBCPP_USE_LONG_LONG
191 ostreambuf_iterator<wchar_t>
192 num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
193 _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
194 char, long long) const;
197 ostreambuf_iterator<wchar_t>
198 num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
199 _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
200 char, unsigned long long) const;
206 // time_get and time_put
207 template class __timepunct<char>;
208 template class time_put<char, ostreambuf_iterator<char> >;
209 template class time_put_byname<char, ostreambuf_iterator<char> >;
210 template class time_get<char, istreambuf_iterator<char> >;
211 template class time_get_byname<char, istreambuf_iterator<char> >;
213 #ifdef _GLIBCPP_USE_WCHAR_T
214 template class __timepunct<wchar_t>;
215 template class time_put<wchar_t, ostreambuf_iterator<wchar_t> >;
216 template class time_put_byname<wchar_t, ostreambuf_iterator<wchar_t> >;
217 template class time_get<wchar_t, istreambuf_iterator<wchar_t> >;
218 template class time_get_byname<wchar_t, istreambuf_iterator<wchar_t> >;
222 template class messages<char>;
223 template class messages_byname<char>;
224 #ifdef _GLIBCPP_USE_WCHAR_T
225 template class messages<wchar_t>;
226 template class messages_byname<wchar_t>;
230 inline template class __ctype_abstract_base<char>;
231 template class ctype_byname<char>;
232 #ifdef _GLIBCPP_USE_WCHAR_T
233 inline template class __ctype_abstract_base<wchar_t>;
234 template class ctype_byname<wchar_t>;
238 inline template class __codecvt_abstract_base<char, char, mbstate_t>;
239 template class codecvt_byname<char, char, mbstate_t>;
240 #ifdef _GLIBCPP_USE_WCHAR_T
241 inline template class __codecvt_abstract_base<wchar_t, char, mbstate_t>;
242 template class codecvt_byname<wchar_t, char, mbstate_t>;
246 template class collate<char>;
247 template class collate_byname<char>;
248 #ifdef _GLIBCPP_USE_WCHAR_T
249 template class collate<wchar_t>;
250 template class collate_byname<wchar_t>;
254 // NB: use_facet<ctype> is specialized
256 const codecvt<char, char, mbstate_t>&
257 use_facet<codecvt<char, char, mbstate_t> >(const locale&);
261 use_facet<collate<char> >(const locale&);
264 const numpunct<char>&
265 use_facet<numpunct<char> >(const locale&);
269 use_facet<num_put<char> >(const locale&);
273 use_facet<num_get<char> >(const locale&);
276 const moneypunct<char, true>&
277 use_facet<moneypunct<char, true> >(const locale&);
280 const moneypunct<char, false>&
281 use_facet<moneypunct<char, false> >(const locale&);
284 const money_put<char>&
285 use_facet<money_put<char> >(const locale&);
288 const money_get<char>&
289 use_facet<money_get<char> >(const locale&);
292 const __timepunct<char>&
293 use_facet<__timepunct<char> >(const locale&);
296 const time_put<char>&
297 use_facet<time_put<char> >(const locale&);
300 const time_get<char>&
301 use_facet<time_get<char> >(const locale&);
304 const messages<char>&
305 use_facet<messages<char> >(const locale&);
307 #ifdef _GLIBCPP_USE_WCHAR_T
309 const codecvt<wchar_t, char, mbstate_t>&
310 use_facet<codecvt<wchar_t, char, mbstate_t> >(locale const&);
313 const collate<wchar_t>&
314 use_facet<collate<wchar_t> >(const locale&);
317 const numpunct<wchar_t>&
318 use_facet<numpunct<wchar_t> >(const locale&);
321 const num_put<wchar_t>&
322 use_facet<num_put<wchar_t> >(const locale&);
325 const num_get<wchar_t>&
326 use_facet<num_get<wchar_t> >(const locale&);
329 const moneypunct<wchar_t, true>&
330 use_facet<moneypunct<wchar_t, true> >(const locale&);
333 const moneypunct<wchar_t, false>&
334 use_facet<moneypunct<wchar_t, false> >(const locale&);
337 const money_put<wchar_t>&
338 use_facet<money_put<wchar_t> >(const locale&);
341 const money_get<wchar_t>&
342 use_facet<money_get<wchar_t> >(const locale&);
345 const __timepunct<wchar_t>&
346 use_facet<__timepunct<wchar_t> >(const locale&);
349 const time_put<wchar_t>&
350 use_facet<time_put<wchar_t> >(const locale&);
353 const time_get<wchar_t>&
354 use_facet<time_get<wchar_t> >(const locale&);
357 const messages<wchar_t>&
358 use_facet<messages<wchar_t> >(const locale&);
364 has_facet<ctype<char> >(const locale&);
368 has_facet<codecvt<char, char, mbstate_t> >(const locale&);
372 has_facet<collate<char> >(const locale&);
376 has_facet<numpunct<char> >(const locale&);
380 has_facet<num_put<char> >(const locale&);
384 has_facet<num_get<char> >(const locale&);
388 has_facet<moneypunct<char> >(const locale&);
392 has_facet<money_put<char> >(const locale&);
396 has_facet<money_get<char> >(const locale&);
400 has_facet<__timepunct<char> >(const locale&);
404 has_facet<time_put<char> >(const locale&);
408 has_facet<time_get<char> >(const locale&);
412 has_facet<messages<char> >(const locale&);
414 #ifdef _GLIBCPP_USE_WCHAR_T
417 has_facet<ctype<wchar_t> >(const locale&);
421 has_facet<codecvt<wchar_t, char, mbstate_t> >(const locale&);
425 has_facet<collate<wchar_t> >(const locale&);
429 has_facet<numpunct<wchar_t> >(const locale&);
433 has_facet<num_put<wchar_t> >(const locale&);
437 has_facet<num_get<wchar_t> >(const locale&);
441 has_facet<moneypunct<wchar_t> >(const locale&);
445 has_facet<money_put<wchar_t> >(const locale&);
449 has_facet<money_get<wchar_t> >(const locale&);
453 has_facet<__timepunct<wchar_t> >(const locale&);
457 has_facet<time_put<wchar_t> >(const locale&);
461 has_facet<time_get<wchar_t> >(const locale&);
465 has_facet<messages<wchar_t> >(const locale&);
470 const __locale_cache<numpunct<char> >&
471 __use_cache<numpunct<char> >(const locale& __loc);
473 #ifdef _GLIBCPP_USE_WCHAR_T
475 const __locale_cache<numpunct<wchar_t> >&
476 __use_cache<numpunct<wchar_t> >(const locale& __loc);
482 __add_grouping<char>(char*, char, char const*, char const*,
483 char const*, char const*);
487 __verify_grouping<char>(const basic_string<char>&, basic_string<char>&);
489 template class __pad<char, char_traits<char> >;
491 #ifdef _GLIBCPP_USE_WCHAR_T
494 __add_grouping<wchar_t>(wchar_t*, wchar_t, char const*, char const*,
495 wchar_t const*, wchar_t const*);
498 __verify_grouping<wchar_t>(const basic_string<wchar_t>&,
499 basic_string<wchar_t>&);
501 template class __pad<wchar_t, char_traits<wchar_t> >;
506 __convert_from_v(char*, const int, const char*, double,
507 const __c_locale&, int);
511 __convert_from_v(char*, const int, const char*, long double,
512 const __c_locale&, int);
516 __convert_from_v(char*, const int, const char*, long,
517 const __c_locale&, int);
521 __convert_from_v(char*, const int, const char*, unsigned long,
522 const __c_locale&, int);
524 #ifdef _GLIBCPP_USE_LONG_LONG
527 __convert_from_v(char*, const int, const char*, long long,
528 const __c_locale&, int);
532 __convert_from_v(char*, const int, const char*, unsigned long long,
533 const __c_locale&, int);
538 __int_to_char(char*, const int, unsigned long, const char*,
539 ios_base::fmtflags, bool);
541 #ifdef _GLIBCPP_USE_WCHAR_T
544 __int_to_char(wchar_t*, const int, unsigned long, const wchar_t*,
545 ios_base::fmtflags, bool);
548 #ifdef _GLIBCPP_USE_LONG_LONG
551 __int_to_char(char*, const int, unsigned long long, const char*,
552 ios_base::fmtflags, bool);
554 #ifdef _GLIBCPP_USE_WCHAR_T
557 __int_to_char(wchar_t*, const int, unsigned long long, const wchar_t*,
558 ios_base::fmtflags, bool);