]>
gcc.gnu.org Git - gcc.git/blob - libstdc++-v3/src/locale-inst.cc
1 // Locale support -*- C++ -*-
3 // Copyright (C) 1999, 2000, 2001 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
34 #include <bits/std_cstdlib.h>
35 #include <bits/std_clocale.h>
36 #include <bits/std_cstring.h>
37 #include <bits/std_cassert.h>
38 #include <bits/std_limits.h>
40 #include <bits/std_stdexcept.h>
41 #include <bits/std_locale.h>
42 #include <bits/locale_facets.tcc>
43 #include <bits/std_istream.h>
44 #include <bits/std_ostream.h>
48 typedef ostreambuf_iterator
<char, char_traits
<char> > obuf_iterator
;
49 typedef istreambuf_iterator
<char, char_traits
<char> > ibuf_iterator
;
50 typedef ostreambuf_iterator
<wchar_t, char_traits
<wchar_t> > wobuf_iterator
;
51 typedef istreambuf_iterator
<wchar_t, char_traits
<wchar_t> > wibuf_iterator
;
53 // moneypunct, money_get, and money_put
54 template class moneypunct
<char, false>;
55 template class moneypunct
<char, true>;
56 template class moneypunct_byname
<char, false>;
57 template class moneypunct_byname
<char, true>;
58 template class money_get
<char, ibuf_iterator
>;
59 template class money_put
<char, obuf_iterator
>;
61 #ifdef _GLIBCPP_USE_WCHAR_T
62 template class moneypunct
<wchar_t, false>;
63 template class moneypunct
<wchar_t, true>;
64 template class moneypunct_byname
<wchar_t, false>;
65 template class moneypunct_byname
<wchar_t, true>;
66 template class money_get
<wchar_t, wibuf_iterator
>;
67 template class money_put
<wchar_t, wobuf_iterator
>;
70 // numpunct, numpunct_byname, num_get, and num_put
71 template class numpunct
<char>;
72 template class numpunct_byname
<char>;
73 template class num_get
<char, ibuf_iterator
>;
74 template class num_put
<char, obuf_iterator
>;
77 num_put
<char, obuf_iterator
>::
78 _M_convert_int(obuf_iterator
, ios_base
&, char, char, char, long) const;
82 num_put
<char, obuf_iterator
>::
83 _M_convert_int(obuf_iterator
, ios_base
&, char, char, char,
86 #ifdef _GLIBCPP_USE_LONG_LONG
89 num_put
<char, obuf_iterator
>::
90 _M_convert_int(obuf_iterator
, ios_base
&, char, char, char,
95 num_put
<char, obuf_iterator
>::
96 _M_convert_int(obuf_iterator
, ios_base
&, char, char, char,
97 unsigned long long) const;
102 num_put
<char, obuf_iterator
>::
103 _M_convert_float(obuf_iterator
, ios_base
&, char, char, double) const;
107 num_put
<char, obuf_iterator
>::
108 _M_convert_float(obuf_iterator
, ios_base
&, char, char,
111 #ifdef _GLIBCPP_USE_WCHAR_T
112 template class numpunct
<wchar_t>;
113 template class numpunct_byname
<wchar_t>;
114 template class num_get
<wchar_t, wibuf_iterator
>;
115 template class num_put
<wchar_t, wobuf_iterator
>;
119 num_put
<wchar_t, wobuf_iterator
>::
120 _M_convert_int(wobuf_iterator
, ios_base
&, wchar_t, char, char, long) const;
124 num_put
<wchar_t, wobuf_iterator
>::
125 _M_convert_int(wobuf_iterator
, ios_base
&, wchar_t, char, char,
126 unsigned long) const;
128 #ifdef _GLIBCPP_USE_LONG_LONG
131 num_put
<wchar_t, wobuf_iterator
>::
132 _M_convert_int(wobuf_iterator
, ios_base
&, wchar_t, char, char,
137 num_put
<wchar_t, wobuf_iterator
>::
138 _M_convert_int(wobuf_iterator
, ios_base
&, wchar_t, char, char,
139 unsigned long long) const;
144 num_put
<wchar_t, wobuf_iterator
>::
145 _M_convert_float(wobuf_iterator
, ios_base
&, wchar_t, char,
150 num_put
<wchar_t, wobuf_iterator
>::
151 _M_convert_float(wobuf_iterator
, ios_base
&, wchar_t, char,
155 // time_get and time_put
156 template class __timepunct
<char>;
157 template class time_put
<char, obuf_iterator
>;
158 template class time_put_byname
<char, obuf_iterator
>;
159 template class time_get
<char, ibuf_iterator
>;
160 template class time_get_byname
<char, ibuf_iterator
>;
162 #ifdef _GLIBCPP_USE_WCHAR_T
163 template class __timepunct
<wchar_t>;
164 template class time_put
<wchar_t, wobuf_iterator
>;
165 template class time_put_byname
<wchar_t, wobuf_iterator
>;
166 template class time_get
<wchar_t, wibuf_iterator
>;
167 template class time_get_byname
<wchar_t, wibuf_iterator
>;
171 template class messages
<char>;
172 template class messages_byname
<char>;
173 #ifdef _GLIBCPP_USE_WCHAR_T
174 template class messages
<wchar_t>;
175 template class messages_byname
<wchar_t>;
179 template class __ctype_abstract_base
<char>;
180 template class ctype_byname
<char>;
181 #ifdef _GLIBCPP_USE_WCHAR_T
182 template class __ctype_abstract_base
<wchar_t>;
183 template class ctype_byname
<wchar_t>;
187 template class __codecvt_abstract_base
<char, char, mbstate_t>;
188 template class __codecvt_abstract_base
<wchar_t, char, mbstate_t>;
189 template class codecvt_byname
<char, char, mbstate_t>;
190 #ifdef _GLIBCPP_USE_WCHAR_T
191 template class codecvt_byname
<wchar_t, char, mbstate_t>;
195 template class collate
<char>;
196 template class collate_byname
<char>;
197 #ifdef _GLIBCPP_USE_WCHAR_T
198 template class collate
<wchar_t>;
199 template class collate_byname
<wchar_t>;
204 const numpunct
<char>&
205 use_facet
<numpunct
<char> >(const locale
&);
208 const num_put
<char, obuf_iterator
>&
209 use_facet
<num_put
<char, obuf_iterator
> >(const locale
&);
212 const num_get
<char, ibuf_iterator
>&
213 use_facet
<num_get
<char, ibuf_iterator
> >(const locale
&);
216 const codecvt
<char, char, mbstate_t>&
217 use_facet
<codecvt
<char, char, mbstate_t> >(const locale
&);
221 use_facet
<collate
<char> >(const locale
&);
224 const moneypunct
<char, true>&
225 use_facet
<moneypunct
<char, true> >(const locale
&);
228 const moneypunct
<char, false>&
229 use_facet
<moneypunct
<char, false> >(const locale
&);
232 const __timepunct
<char>&
233 use_facet
<__timepunct
<char> >(const locale
&);
235 #ifdef _GLIBCPP_USE_WCHAR_T
237 const numpunct
<wchar_t>&
238 use_facet
<numpunct
<wchar_t> >(const locale
&);
241 const num_put
<wchar_t, wobuf_iterator
>&
242 use_facet
<num_put
<wchar_t, wobuf_iterator
> >(const locale
&);
245 const num_get
<wchar_t, wibuf_iterator
>&
246 use_facet
<num_get
<wchar_t, wibuf_iterator
> >(const locale
&);
249 const codecvt
<wchar_t, char, mbstate_t>&
250 use_facet
<codecvt
<wchar_t, char, mbstate_t> >(locale
const&);
253 const collate
<wchar_t>&
254 use_facet
<collate
<wchar_t> >(const locale
&);
257 const moneypunct
<wchar_t, true>&
258 use_facet
<moneypunct
<wchar_t, true> >(const locale
&);
261 const moneypunct
<wchar_t, false>&
262 use_facet
<moneypunct
<wchar_t, false> >(const locale
&);
265 const __timepunct
<wchar_t>&
266 use_facet
<__timepunct
<wchar_t> >(const locale
&);
272 has_facet
<numpunct
<char> >(const locale
&);
275 has_facet
<num_put
<char> >(const locale
&);
278 has_facet
<num_get
<char> >(const locale
&);
281 has_facet
<ctype
<char> >(const locale
&);
283 #ifdef _GLIBCPP_USE_WCHAR_T
286 has_facet
<numpunct
<wchar_t> >(const locale
&);
289 has_facet
<num_put
<wchar_t> >(const locale
&);
292 has_facet
<num_get
<wchar_t> >(const locale
&);
295 has_facet
<ctype
<wchar_t> >(const locale
&);
301 typedef vector
<locale::facet
*> vec_pfacet
;
305 insert(vec_pfacet::iterator
, vec_pfacet::size_type
,
306 const vec_pfacet::value_type
&);
310 _M_fill_insert(vec_pfacet::iterator
, vec_pfacet::size_type
,
311 const vec_pfacet::value_type
&);
317 typedef istreambuf_iterator
<char, char_traits
<char> > istreambuf_iter
;
318 typedef ostreambuf_iterator
<char, char_traits
<char> > ostreambuf_iter
;
320 #ifdef _GLIBCPP_USE_WCHAR_T
321 typedef istreambuf_iterator
<wchar_t, char_traits
<wchar_t> > wistreambuf_iter
;
322 typedef ostreambuf_iterator
<wchar_t, char_traits
<wchar_t> > wostreambuf_iter
;
327 locale::operator()(const string
&, const string
&) const;
331 __add_grouping
<char>(char*, char, char const*, char const*,
332 char const*, char const*);
336 __verify_grouping
<char>(const basic_string
<char>&, basic_string
<char>&);
340 __pad
<char>(ios_base
&, char, char*, const char *, streamsize
,
341 streamsize
, const bool);
345 __pad
<char, char_traits
<char> >(ios_base
&, char, char*, const char *,
346 streamsize
, streamsize
, const bool);
348 #ifdef _GLIBCPP_USE_WCHAR_T
351 locale::operator()(const wstring
&, const wstring
&) const;
353 typedef ostreambuf_iterator
<wchar_t> wostreambuf_iter
;
357 __add_grouping
<wchar_t>(wchar_t*, wchar_t, char const*, char const*,
358 wchar_t const*, wchar_t const*);
361 __verify_grouping
<wchar_t>(const basic_string
<wchar_t>&,
362 basic_string
<wchar_t>&);
366 __pad
<wchar_t>(ios_base
&, wchar_t, wchar_t*, const wchar_t*,
367 streamsize
, streamsize
, const bool);
371 __pad
<wchar_t, char_traits
<wchar_t> >(ios_base
&, wchar_t, wchar_t*,
372 const wchar_t*, streamsize
,
373 streamsize
, const bool);
374 #endif // _GLIBCPP_USE_WCHAR_T
378 fill_n
<locale::facet
**, size_t, locale::facet
*>
379 (locale::facet
**, size_t, locale::facet
* const&);
382 __normal_iterator
<locale::facet
**, vector
<locale::facet
*> >
383 fill_n(__normal_iterator
<locale::facet
**, vector
<locale::facet
*> >,
384 size_t, locale::facet
* const&);
388 fill(__normal_iterator
<locale::facet
**, vector
<locale::facet
*> >,
389 __normal_iterator
<locale::facet
**, vector
<locale::facet
*> >,
390 locale::facet
* const&);
This page took 0.060615 seconds and 6 git commands to generate.