locale-inst.cc revision 132720
197403Sobrien// Locale support -*- C++ -*-
297403Sobrien
3132720Skan// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
4132720Skan// Free Software Foundation, Inc.
597403Sobrien//
697403Sobrien// This file is part of the GNU ISO C++ Library.  This library is free
797403Sobrien// software; you can redistribute it and/or modify it under the
897403Sobrien// terms of the GNU General Public License as published by the
997403Sobrien// Free Software Foundation; either version 2, or (at your option)
1097403Sobrien// any later version.
1197403Sobrien
1297403Sobrien// This library is distributed in the hope that it will be useful,
1397403Sobrien// but WITHOUT ANY WARRANTY; without even the implied warranty of
1497403Sobrien// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1597403Sobrien// GNU General Public License for more details.
1697403Sobrien
1797403Sobrien// You should have received a copy of the GNU General Public License along
1897403Sobrien// with this library; see the file COPYING.  If not, write to the Free
1997403Sobrien// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2097403Sobrien// USA.
2197403Sobrien
2297403Sobrien// As a special exception, you may use this file as part of a free software
2397403Sobrien// library without restriction.  Specifically, if other files instantiate
2497403Sobrien// templates or use macros or inline functions from this file, or you compile
2597403Sobrien// this file and link it with other files to produce an executable, this
2697403Sobrien// file does not by itself cause the resulting executable to be covered by
2797403Sobrien// the GNU General Public License.  This exception does not however
2897403Sobrien// invalidate any other reasons why the executable file might be covered by
2997403Sobrien// the GNU General Public License.
3097403Sobrien
3197403Sobrien//
3297403Sobrien// ISO C++ 14882: 22.1  Locales
3397403Sobrien//
3497403Sobrien
3597403Sobrien#include <locale>
3697403Sobrien
37132720Skan// Instantiation configuration.
38132720Skan#ifndef C
39132720Skan# define C char
40132720Skan#endif
41132720Skan
4297403Sobriennamespace std
4397403Sobrien{
4497403Sobrien  // moneypunct, money_get, and money_put
45132720Skan  template class moneypunct<C, false>;
46132720Skan  template class moneypunct<C, true>;
47132720Skan  template struct __moneypunct_cache<C, false>;
48132720Skan  template struct __moneypunct_cache<C, true>;
49132720Skan  template class moneypunct_byname<C, false>;
50132720Skan  template class moneypunct_byname<C, true>;
51132720Skan  template class money_get<C, istreambuf_iterator<C> >;
52132720Skan  template class money_put<C, ostreambuf_iterator<C> >;
5397403Sobrien  template
54132720Skan    istreambuf_iterator<C>
55132720Skan    money_get<C, istreambuf_iterator<C> >::
56132720Skan    _M_extract<true>(istreambuf_iterator<C>, istreambuf_iterator<C>,
57132720Skan		     ios_base&, ios_base::iostate&, string&) const;
5897403Sobrien
5997403Sobrien  template
60132720Skan    istreambuf_iterator<C>
61132720Skan    money_get<C, istreambuf_iterator<C> >::
62132720Skan    _M_extract<false>(istreambuf_iterator<C>, istreambuf_iterator<C>,
63132720Skan		      ios_base&, ios_base::iostate&, string&) const;
6497403Sobrien
6597403Sobrien  template
66132720Skan    ostreambuf_iterator<C>
67132720Skan    money_put<C, ostreambuf_iterator<C> >::
68132720Skan    _M_insert<true>(ostreambuf_iterator<C>, ios_base&, C,
69132720Skan		    const string_type&) const;
7097403Sobrien
7197403Sobrien  template
72132720Skan    ostreambuf_iterator<C>
73132720Skan    money_put<C, ostreambuf_iterator<C> >::
74132720Skan    _M_insert<false>(ostreambuf_iterator<C>, ios_base&, C,
75132720Skan		     const string_type&) const;
7697403Sobrien
77132720Skan  // numpunct, numpunct_byname, num_get, and num_put
78132720Skan  template class numpunct<C>;
79132720Skan  template struct __numpunct_cache<C>;
80132720Skan  template class numpunct_byname<C>;
81132720Skan  template class num_get<C, istreambuf_iterator<C> >;
82132720Skan  template class num_put<C, ostreambuf_iterator<C> >;
8397403Sobrien  template
84132720Skan    istreambuf_iterator<C>
85132720Skan    num_get<C, istreambuf_iterator<C> >::
86132720Skan    _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
87132720Skan		   ios_base&, ios_base::iostate&,
88132720Skan		   long&) const;
8997403Sobrien
9097403Sobrien  template
91132720Skan    istreambuf_iterator<C>
92132720Skan    num_get<C, istreambuf_iterator<C> >::
93132720Skan    _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
94132720Skan		   ios_base&, ios_base::iostate&,
95132720Skan		   unsigned short&) const;
9697403Sobrien
9797403Sobrien  template
98132720Skan    istreambuf_iterator<C>
99132720Skan    num_get<C, istreambuf_iterator<C> >::
100132720Skan    _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
101132720Skan		   ios_base&, ios_base::iostate&,
102132720Skan		   unsigned int&) const;
10397403Sobrien
10497403Sobrien  template
105132720Skan    istreambuf_iterator<C>
106132720Skan    num_get<C, istreambuf_iterator<C> >::
107132720Skan    _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
108132720Skan		   ios_base&, ios_base::iostate&,
109132720Skan		   unsigned long&) const;
11097403Sobrien
111132720Skan#ifdef _GLIBCXX_USE_LONG_LONG
11297403Sobrien  template
113132720Skan    istreambuf_iterator<C>
114132720Skan    num_get<C, istreambuf_iterator<C> >::
115132720Skan    _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
116132720Skan		   ios_base&, ios_base::iostate&,
117132720Skan		   long long&) const;
11897403Sobrien
11997403Sobrien  template
120132720Skan    istreambuf_iterator<C>
121132720Skan    num_get<C, istreambuf_iterator<C> >::
122132720Skan    _M_extract_int(istreambuf_iterator<C>, istreambuf_iterator<C>,
123132720Skan		   ios_base&, ios_base::iostate&,
124132720Skan		   unsigned long long&) const;
12597403Sobrien#endif
12697403Sobrien
12797403Sobrien  template
128132720Skan    ostreambuf_iterator<C>
129132720Skan    num_put<C, ostreambuf_iterator<C> >::
130132720Skan    _M_insert_int(ostreambuf_iterator<C>, ios_base&, C,
131132720Skan		  long) const;
13297403Sobrien
13397403Sobrien  template
134132720Skan    ostreambuf_iterator<C>
135132720Skan    num_put<C, ostreambuf_iterator<C> >::
136132720Skan    _M_insert_int(ostreambuf_iterator<C>, ios_base&, C,
137132720Skan		  unsigned long) const;
13897403Sobrien
139132720Skan#ifdef _GLIBCXX_USE_LONG_LONG
140117397Skan  template
141132720Skan    ostreambuf_iterator<C>
142132720Skan    num_put<C, ostreambuf_iterator<C> >::
143132720Skan    _M_insert_int(ostreambuf_iterator<C>, ios_base&, C,
144132720Skan		  long long) const;
145117397Skan
146117397Skan  template
147132720Skan    ostreambuf_iterator<C>
148132720Skan    num_put<C, ostreambuf_iterator<C> >::
149132720Skan    _M_insert_int(ostreambuf_iterator<C>, ios_base&, C,
150132720Skan		  unsigned long long) const;
151117397Skan#endif
152117397Skan
153117397Skan  template
154132720Skan    ostreambuf_iterator<C>
155132720Skan    num_put<C, ostreambuf_iterator<C> >::
156132720Skan    _M_insert_float(ostreambuf_iterator<C>, ios_base&, C, char,
157132720Skan		    double) const;
158117397Skan
159117397Skan  template
160132720Skan    ostreambuf_iterator<C>
161132720Skan    num_put<C, ostreambuf_iterator<C> >::
162132720Skan    _M_insert_float(ostreambuf_iterator<C>, ios_base&, C, char,
163132720Skan		    long double) const;
164132720Skan
16597403Sobrien  // time_get and time_put
166132720Skan  template class __timepunct<C>;
167132720Skan  template struct __timepunct_cache<C>;
168132720Skan  template class time_put<C, ostreambuf_iterator<C> >;
169132720Skan  template class time_put_byname<C, ostreambuf_iterator<C> >;
170132720Skan  template class time_get<C, istreambuf_iterator<C> >;
171132720Skan  template class time_get_byname<C, istreambuf_iterator<C> >;
17297403Sobrien
17397403Sobrien  // messages
174132720Skan  template class messages<C>;
175132720Skan  template class messages_byname<C>;
17697403Sobrien
17797403Sobrien  // ctype
178132720Skan  inline template class __ctype_abstract_base<C>;
179132720Skan  template class ctype_byname<C>;
18097403Sobrien
18197403Sobrien  // codecvt
182132720Skan  inline template class __codecvt_abstract_base<C, char, mbstate_t>;
183132720Skan  template class codecvt_byname<C, char, mbstate_t>;
18497403Sobrien
18597403Sobrien  // collate
186132720Skan  template class collate<C>;
187132720Skan  template class collate_byname<C>;
18897403Sobrien
18997403Sobrien  // use_facet
19097403Sobrien  // NB: use_facet<ctype> is specialized
19197403Sobrien  template
192132720Skan    const codecvt<C, char, mbstate_t>&
193132720Skan    use_facet<codecvt<C, char, mbstate_t> >(const locale&);
19497403Sobrien
19597403Sobrien  template
196132720Skan    const collate<C>&
197132720Skan    use_facet<collate<C> >(const locale&);
19897403Sobrien
19997403Sobrien  template
200132720Skan    const numpunct<C>&
201132720Skan    use_facet<numpunct<C> >(const locale&);
20297403Sobrien
20397403Sobrien  template
204132720Skan    const num_put<C>&
205132720Skan    use_facet<num_put<C> >(const locale&);
20697403Sobrien
20797403Sobrien  template
208132720Skan    const num_get<C>&
209132720Skan    use_facet<num_get<C> >(const locale&);
21097403Sobrien
21197403Sobrien  template
212132720Skan    const moneypunct<C, true>&
213132720Skan    use_facet<moneypunct<C, true> >(const locale&);
21497403Sobrien
21597403Sobrien  template
216132720Skan    const moneypunct<C, false>&
217132720Skan    use_facet<moneypunct<C, false> >(const locale&);
21897403Sobrien
21997403Sobrien  template
220132720Skan    const money_put<C>&
221132720Skan    use_facet<money_put<C> >(const locale&);
22297403Sobrien
22397403Sobrien  template
224132720Skan    const money_get<C>&
225132720Skan    use_facet<money_get<C> >(const locale&);
22697403Sobrien
22797403Sobrien  template
228132720Skan    const __timepunct<C>&
229132720Skan    use_facet<__timepunct<C> >(const locale&);
23097403Sobrien
23197403Sobrien  template
232132720Skan    const time_put<C>&
233132720Skan    use_facet<time_put<C> >(const locale&);
23497403Sobrien
23597403Sobrien  template
236132720Skan    const time_get<C>&
237132720Skan    use_facet<time_get<C> >(const locale&);
23897403Sobrien
23997403Sobrien  template
240132720Skan    const messages<C>&
241132720Skan    use_facet<messages<C> >(const locale&);
24297403Sobrien
24397403Sobrien  // has_facet
24497403Sobrien  template
24597403Sobrien    bool
246132720Skan    has_facet<ctype<C> >(const locale&);
24797403Sobrien
24897403Sobrien  template
24997403Sobrien    bool
250132720Skan    has_facet<codecvt<C, char, mbstate_t> >(const locale&);
25197403Sobrien
25297403Sobrien  template
25397403Sobrien    bool
254132720Skan    has_facet<collate<C> >(const locale&);
25597403Sobrien
25697403Sobrien  template
25797403Sobrien    bool
258132720Skan    has_facet<numpunct<C> >(const locale&);
25997403Sobrien
26097403Sobrien  template
26197403Sobrien    bool
262132720Skan    has_facet<num_put<C> >(const locale&);
26397403Sobrien
26497403Sobrien  template
26597403Sobrien    bool
266132720Skan    has_facet<num_get<C> >(const locale&);
26797403Sobrien
26897403Sobrien  template
26997403Sobrien    bool
270132720Skan    has_facet<moneypunct<C> >(const locale&);
27197403Sobrien
27297403Sobrien  template
27397403Sobrien    bool
274132720Skan    has_facet<money_put<C> >(const locale&);
27597403Sobrien
27697403Sobrien  template
27797403Sobrien    bool
278132720Skan    has_facet<money_get<C> >(const locale&);
27997403Sobrien
28097403Sobrien  template
28197403Sobrien    bool
282132720Skan    has_facet<__timepunct<C> >(const locale&);
28397403Sobrien
28497403Sobrien  template
28597403Sobrien    bool
286132720Skan    has_facet<time_put<C> >(const locale&);
28797403Sobrien
28897403Sobrien  template
28997403Sobrien    bool
290132720Skan    has_facet<time_get<C> >(const locale&);
29197403Sobrien
29297403Sobrien  template
29397403Sobrien    bool
294132720Skan    has_facet<messages<C> >(const locale&);
29597403Sobrien
29697403Sobrien
297132720Skan  // locale functions.
298117397Skan  template
299132720Skan    C*
300132720Skan    __add_grouping<C>(C*, C, char const*, size_t,
301132720Skan			 C const*, C const*);
302117397Skan
303132720Skan  template class __pad<C, char_traits<C> >;
304117397Skan
30597403Sobrien  template
30697403Sobrien    int
307132720Skan    __int_to_char(C*, unsigned long, const C*,
308117397Skan		  ios_base::fmtflags, bool);
309117397Skan
310132720Skan#ifdef _GLIBCXX_USE_LONG_LONG
311117397Skan  template
312117397Skan    int
313132720Skan    __int_to_char(C*, unsigned long long, const C*,
314117397Skan		  ios_base::fmtflags, bool);
315117397Skan#endif
31697403Sobrien} // namespace std
317