locale-inst.cc

00001 // Locale support -*- C++ -*-
00002 
00003 // Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
00004 //
00005 // This file is part of the GNU ISO C++ Library.  This library is free
00006 // software; you can redistribute it and/or modify it under the
00007 // terms of the GNU General Public License as published by the
00008 // Free Software Foundation; either version 2, or (at your option)
00009 // any later version.
00010 
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 // GNU General Public License for more details.
00015 
00016 // You should have received a copy of the GNU General Public License along
00017 // with this library; see the file COPYING.  If not, write to the Free
00018 // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
00019 // USA.
00020 
00021 // As a special exception, you may use this file as part of a free software
00022 // library without restriction.  Specifically, if other files instantiate
00023 // templates or use macros or inline functions from this file, or you compile
00024 // this file and link it with other files to produce an executable, this
00025 // file does not by itself cause the resulting executable to be covered by
00026 // the GNU General Public License.  This exception does not however
00027 // invalidate any other reasons why the executable file might be covered by
00028 // the GNU General Public License.
00029 
00030 //
00031 // ISO C++ 14882: 22.1  Locales
00032 //
00033 
00034 #include <cstdlib>
00035 #include <clocale>
00036 #include <cstring>
00037 #include <locale>
00038 
00039 namespace std
00040 {
00041   // moneypunct, money_get, and money_put
00042   template class moneypunct<char, false>;
00043   template class moneypunct<char, true>;
00044   template class moneypunct_byname<char, false>;
00045   template class moneypunct_byname<char, true>;
00046   template class money_get<char, istreambuf_iterator<char> >;
00047   template class money_put<char, ostreambuf_iterator<char> >;
00048   template class __locale_cache<numpunct<char> >;
00049 
00050 #ifdef _GLIBCPP_USE_WCHAR_T
00051   template class moneypunct<wchar_t, false>;
00052   template class moneypunct<wchar_t, true>;
00053   template class moneypunct_byname<wchar_t, false>;
00054   template class moneypunct_byname<wchar_t, true>;
00055   template class money_get<wchar_t, istreambuf_iterator<wchar_t> >;
00056   template class money_put<wchar_t, ostreambuf_iterator<wchar_t> >;
00057   template class __locale_cache<numpunct<wchar_t> >;
00058 #endif
00059 
00060   // numpunct, numpunct_byname, num_get, and num_put
00061   template class numpunct<char>;
00062   template class numpunct_byname<char>;
00063   template class num_get<char, istreambuf_iterator<char> >;
00064   template class num_put<char, ostreambuf_iterator<char> >; 
00065   template
00066     ostreambuf_iterator<char>
00067     num_put<char, ostreambuf_iterator<char> >::
00068     _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, 
00069            long) const;
00070 
00071   template
00072     ostreambuf_iterator<char>
00073     num_put<char, ostreambuf_iterator<char> >::
00074     _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, 
00075            unsigned long) const;
00076 
00077 #ifdef _GLIBCPP_USE_LONG_LONG
00078   template
00079     ostreambuf_iterator<char>
00080     num_put<char, ostreambuf_iterator<char> >::
00081     _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, 
00082            long long) const;
00083 
00084   template
00085     ostreambuf_iterator<char>
00086     num_put<char, ostreambuf_iterator<char> >::
00087     _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, 
00088            unsigned long long) const;
00089 #endif
00090 
00091   template
00092     ostreambuf_iterator<char>
00093     num_put<char, ostreambuf_iterator<char> >::
00094     _M_convert_float(ostreambuf_iterator<char>, ios_base&, char, char, 
00095              double) const;
00096 
00097   template
00098     ostreambuf_iterator<char>
00099     num_put<char, ostreambuf_iterator<char> >::
00100     _M_convert_float(ostreambuf_iterator<char>, ios_base&, char, char, 
00101              long double) const;
00102   
00103 #ifdef _GLIBCPP_USE_WCHAR_T
00104   template class numpunct<wchar_t>;
00105   template class numpunct_byname<wchar_t>;
00106   template class num_get<wchar_t, istreambuf_iterator<wchar_t> >;
00107   template class num_put<wchar_t, ostreambuf_iterator<wchar_t> >;
00108 
00109   template
00110     ostreambuf_iterator<wchar_t>
00111     num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
00112     _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, 
00113            long) const;
00114 
00115   template
00116     ostreambuf_iterator<wchar_t>
00117     num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
00118     _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, 
00119            unsigned long) const;
00120 
00121 #ifdef _GLIBCPP_USE_LONG_LONG
00122   template
00123     ostreambuf_iterator<wchar_t>
00124     num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
00125     _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t,
00126            long long) const;
00127 
00128   template
00129     ostreambuf_iterator<wchar_t>
00130     num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
00131     _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t,
00132            unsigned long long) const;
00133 #endif
00134 
00135   template
00136     ostreambuf_iterator<wchar_t>
00137     num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
00138     _M_convert_float(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char, 
00139              double) const;
00140 
00141   template
00142     ostreambuf_iterator<wchar_t>
00143     num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
00144     _M_convert_float(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char, 
00145              long double) const;
00146 #endif
00147 
00148 #if 1
00149       // XXX GLIBCXX_ABI Deprecated, compatibility only.
00150   template
00151     ostreambuf_iterator<char>
00152     num_put<char, ostreambuf_iterator<char> >::
00153     _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char, 
00154            long) const;
00155 
00156   template
00157     ostreambuf_iterator<char>
00158     num_put<char, ostreambuf_iterator<char> >::
00159     _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char, 
00160            unsigned long) const;
00161 
00162 #ifdef _GLIBCPP_USE_LONG_LONG
00163   template
00164     ostreambuf_iterator<char>
00165     num_put<char, ostreambuf_iterator<char> >::
00166     _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char, 
00167            long long) const;
00168 
00169   template
00170     ostreambuf_iterator<char>
00171     num_put<char, ostreambuf_iterator<char> >::
00172     _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char,
00173            unsigned long long) const;
00174 #endif
00175 
00176 #ifdef _GLIBCPP_USE_WCHAR_T
00177   template
00178     ostreambuf_iterator<wchar_t>
00179     num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
00180     _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char, 
00181            char, long) const;
00182 
00183   template
00184     ostreambuf_iterator<wchar_t>
00185     num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
00186     _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char, 
00187            char, unsigned long) const;
00188 
00189 #ifdef _GLIBCPP_USE_LONG_LONG
00190   template
00191     ostreambuf_iterator<wchar_t>
00192     num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
00193     _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char, 
00194            char, long long) const;
00195 
00196   template
00197     ostreambuf_iterator<wchar_t>
00198     num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
00199     _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char, 
00200            char, unsigned long long) const;
00201 #endif
00202 #endif
00203 
00204 #endif
00205 
00206   // time_get and time_put
00207   template class __timepunct<char>;
00208   template class time_put<char, ostreambuf_iterator<char> >;
00209   template class time_put_byname<char, ostreambuf_iterator<char> >;
00210   template class time_get<char, istreambuf_iterator<char> >;
00211   template class time_get_byname<char, istreambuf_iterator<char> >;
00212 
00213 #ifdef _GLIBCPP_USE_WCHAR_T
00214   template class __timepunct<wchar_t>;
00215   template class time_put<wchar_t, ostreambuf_iterator<wchar_t> >;
00216   template class time_put_byname<wchar_t, ostreambuf_iterator<wchar_t> >;
00217   template class time_get<wchar_t, istreambuf_iterator<wchar_t> >;
00218   template class time_get_byname<wchar_t, istreambuf_iterator<wchar_t> >;
00219 #endif
00220 
00221   // messages
00222   template class messages<char>;
00223   template class messages_byname<char>;
00224 #ifdef _GLIBCPP_USE_WCHAR_T
00225   template class messages<wchar_t>;
00226   template class messages_byname<wchar_t>;
00227 #endif
00228   
00229   // ctype
00230   inline template class __ctype_abstract_base<char>;
00231   template class ctype_byname<char>;
00232 #ifdef _GLIBCPP_USE_WCHAR_T
00233   inline template class __ctype_abstract_base<wchar_t>;
00234   template class ctype_byname<wchar_t>;
00235 #endif
00236   
00237   // codecvt
00238   inline template class __codecvt_abstract_base<char, char, mbstate_t>;
00239   template class codecvt_byname<char, char, mbstate_t>;
00240 #ifdef _GLIBCPP_USE_WCHAR_T
00241   inline template class __codecvt_abstract_base<wchar_t, char, mbstate_t>;
00242   template class codecvt_byname<wchar_t, char, mbstate_t>;
00243 #endif
00244 
00245   // collate
00246   template class collate<char>;
00247   template class collate_byname<char>;
00248 #ifdef _GLIBCPP_USE_WCHAR_T
00249   template class collate<wchar_t>;
00250   template class collate_byname<wchar_t>;
00251 #endif
00252     
00253   // use_facet
00254   // NB: use_facet<ctype> is specialized
00255   template
00256     const codecvt<char, char, mbstate_t>& 
00257     use_facet<codecvt<char, char, mbstate_t> >(const locale&);
00258 
00259   template
00260     const collate<char>& 
00261     use_facet<collate<char> >(const locale&);
00262 
00263   template
00264     const numpunct<char>& 
00265     use_facet<numpunct<char> >(const locale&);
00266 
00267   template 
00268     const num_put<char>& 
00269     use_facet<num_put<char> >(const locale&);
00270 
00271   template 
00272     const num_get<char>& 
00273     use_facet<num_get<char> >(const locale&);
00274 
00275   template
00276     const moneypunct<char, true>& 
00277     use_facet<moneypunct<char, true> >(const locale&);
00278 
00279   template
00280     const moneypunct<char, false>& 
00281     use_facet<moneypunct<char, false> >(const locale&);
00282 
00283   template 
00284     const money_put<char>& 
00285     use_facet<money_put<char> >(const locale&);
00286 
00287   template 
00288     const money_get<char>& 
00289     use_facet<money_get<char> >(const locale&);
00290 
00291   template
00292     const __timepunct<char>& 
00293     use_facet<__timepunct<char> >(const locale&);
00294 
00295   template 
00296     const time_put<char>& 
00297     use_facet<time_put<char> >(const locale&);
00298 
00299   template 
00300     const time_get<char>& 
00301     use_facet<time_get<char> >(const locale&);
00302 
00303   template 
00304     const messages<char>& 
00305     use_facet<messages<char> >(const locale&);
00306 
00307 #ifdef _GLIBCPP_USE_WCHAR_T
00308   template
00309     const codecvt<wchar_t, char, mbstate_t>& 
00310     use_facet<codecvt<wchar_t, char, mbstate_t> >(locale const&);
00311 
00312   template
00313     const collate<wchar_t>& 
00314     use_facet<collate<wchar_t> >(const locale&);
00315 
00316   template
00317     const numpunct<wchar_t>& 
00318     use_facet<numpunct<wchar_t> >(const locale&);
00319 
00320   template 
00321     const num_put<wchar_t>& 
00322     use_facet<num_put<wchar_t> >(const locale&);
00323 
00324   template 
00325     const num_get<wchar_t>& 
00326     use_facet<num_get<wchar_t> >(const locale&);
00327 
00328   template
00329     const moneypunct<wchar_t, true>& 
00330     use_facet<moneypunct<wchar_t, true> >(const locale&);
00331 
00332   template
00333     const moneypunct<wchar_t, false>& 
00334     use_facet<moneypunct<wchar_t, false> >(const locale&);
00335  
00336   template 
00337     const money_put<wchar_t>& 
00338     use_facet<money_put<wchar_t> >(const locale&);
00339 
00340   template 
00341     const money_get<wchar_t>& 
00342     use_facet<money_get<wchar_t> >(const locale&);
00343 
00344   template
00345     const __timepunct<wchar_t>& 
00346     use_facet<__timepunct<wchar_t> >(const locale&);
00347 
00348   template 
00349     const time_put<wchar_t>& 
00350     use_facet<time_put<wchar_t> >(const locale&);
00351 
00352   template 
00353     const time_get<wchar_t>& 
00354     use_facet<time_get<wchar_t> >(const locale&);
00355 
00356   template 
00357     const messages<wchar_t>& 
00358     use_facet<messages<wchar_t> >(const locale&);
00359 #endif
00360 
00361   // has_facet
00362   template 
00363     bool
00364     has_facet<ctype<char> >(const locale&);
00365 
00366   template 
00367     bool
00368     has_facet<codecvt<char, char, mbstate_t> >(const locale&);
00369 
00370   template 
00371     bool
00372     has_facet<collate<char> >(const locale&);
00373 
00374   template 
00375     bool
00376     has_facet<numpunct<char> >(const locale&);
00377 
00378   template 
00379     bool
00380     has_facet<num_put<char> >(const locale&);
00381 
00382   template 
00383     bool
00384     has_facet<num_get<char> >(const locale&);
00385 
00386   template 
00387     bool
00388     has_facet<moneypunct<char> >(const locale&);
00389 
00390   template 
00391     bool
00392     has_facet<money_put<char> >(const locale&);
00393 
00394   template 
00395     bool
00396     has_facet<money_get<char> >(const locale&);
00397 
00398   template 
00399     bool
00400     has_facet<__timepunct<char> >(const locale&);
00401 
00402   template 
00403     bool
00404     has_facet<time_put<char> >(const locale&);
00405 
00406   template 
00407     bool
00408     has_facet<time_get<char> >(const locale&);
00409 
00410   template 
00411     bool
00412     has_facet<messages<char> >(const locale&);
00413 
00414 #ifdef _GLIBCPP_USE_WCHAR_T
00415  template 
00416     bool
00417     has_facet<ctype<wchar_t> >(const locale&);
00418 
00419   template 
00420     bool
00421     has_facet<codecvt<wchar_t, char, mbstate_t> >(const locale&);
00422 
00423   template 
00424     bool
00425     has_facet<collate<wchar_t> >(const locale&);
00426 
00427   template 
00428     bool
00429     has_facet<numpunct<wchar_t> >(const locale&);
00430 
00431   template 
00432     bool
00433     has_facet<num_put<wchar_t> >(const locale&);
00434 
00435   template 
00436     bool
00437     has_facet<num_get<wchar_t> >(const locale&);
00438 
00439   template 
00440     bool
00441     has_facet<moneypunct<wchar_t> >(const locale&);
00442 
00443   template 
00444     bool
00445     has_facet<money_put<wchar_t> >(const locale&);
00446 
00447   template 
00448     bool
00449     has_facet<money_get<wchar_t> >(const locale&);
00450 
00451   template 
00452     bool
00453     has_facet<__timepunct<wchar_t> >(const locale&);
00454 
00455   template 
00456     bool
00457     has_facet<time_put<wchar_t> >(const locale&);
00458 
00459   template 
00460     bool
00461     has_facet<time_get<wchar_t> >(const locale&);
00462 
00463   template 
00464     bool
00465     has_facet<messages<wchar_t> >(const locale&);
00466 #endif
00467 
00468   // __use_cache
00469   template
00470     const __locale_cache<numpunct<char> >&
00471     __use_cache<numpunct<char> >(const locale& __loc);
00472 
00473 #ifdef _GLIBCPP_USE_WCHAR_T
00474    template
00475     const __locale_cache<numpunct<wchar_t> >&
00476     __use_cache<numpunct<wchar_t> >(const locale& __loc);
00477 #endif
00478 
00479   // locale
00480   template
00481     char*
00482     __add_grouping<char>(char*, char, char const*, char const*, 
00483              char const*, char const*);
00484 
00485   template
00486     bool
00487     __verify_grouping<char>(const basic_string<char>&, basic_string<char>&);
00488 
00489   template class __pad<char, char_traits<char> >;
00490 
00491 #ifdef _GLIBCPP_USE_WCHAR_T
00492   template
00493     wchar_t*
00494     __add_grouping<wchar_t>(wchar_t*, wchar_t, char const*, char const*, 
00495                 wchar_t const*, wchar_t const*);
00496   template
00497     bool
00498     __verify_grouping<wchar_t>(const basic_string<wchar_t>&, 
00499                    basic_string<wchar_t>&);
00500 
00501   template class __pad<wchar_t, char_traits<wchar_t> >;
00502 #endif 
00503 
00504   template
00505     int
00506     __convert_from_v(char*, const int, const char*, double, 
00507              const __c_locale&, int);
00508 
00509   template
00510     int
00511     __convert_from_v(char*, const int, const char*, long double, 
00512              const __c_locale&, int);
00513 
00514   template
00515     int
00516     __convert_from_v(char*, const int, const char*, long, 
00517              const __c_locale&, int);
00518 
00519   template
00520     int
00521     __convert_from_v(char*, const int, const char*, unsigned long, 
00522              const __c_locale&, int);
00523 
00524 #ifdef _GLIBCPP_USE_LONG_LONG
00525   template
00526     int
00527     __convert_from_v(char*, const int, const char*, long long, 
00528              const __c_locale&, int);
00529 
00530   template
00531     int
00532     __convert_from_v(char*, const int, const char*, unsigned long long, 
00533              const __c_locale&, int);
00534 #endif
00535 
00536   template
00537     int
00538     __int_to_char(char*, const int, unsigned long, const char*, 
00539           ios_base::fmtflags, bool);
00540 
00541 #ifdef _GLIBCPP_USE_WCHAR_T
00542   template
00543     int
00544     __int_to_char(wchar_t*, const int, unsigned long, const wchar_t*, 
00545           ios_base::fmtflags, bool);
00546 #endif
00547 
00548 #ifdef _GLIBCPP_USE_LONG_LONG
00549   template
00550     int
00551     __int_to_char(char*, const int, unsigned long long, const char*, 
00552           ios_base::fmtflags, bool);
00553 
00554 #ifdef _GLIBCPP_USE_WCHAR_T
00555   template
00556     int
00557     __int_to_char(wchar_t*, const int, unsigned long long, const wchar_t*,
00558           ios_base::fmtflags, bool);
00559 #endif
00560 #endif
00561 } // namespace std

Generated on Thu Feb 10 23:22:56 2005 for libstdc++-v3 Source by  doxygen 1.4.0