locale-inst.cc

00001 // Locale support -*- C++ -*-
00002 
00003 // Copyright (C) 1999, 2000, 2001, 2002 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 <cassert>
00038 #include <locale>
00039 
00040 namespace std
00041 {
00042   // moneypunct, money_get, and money_put
00043   template class moneypunct<char, false>;
00044   template class moneypunct<char, true>;
00045   template class moneypunct_byname<char, false>;
00046   template class moneypunct_byname<char, true>;
00047   template class money_get<char, istreambuf_iterator<char> >;
00048   template class money_put<char, ostreambuf_iterator<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 #endif
00058 
00059   // numpunct, numpunct_byname, num_get, and num_put
00060   template class numpunct<char>;
00061   template class numpunct_byname<char>;
00062   template class num_get<char, istreambuf_iterator<char> >;
00063   template class num_put<char, ostreambuf_iterator<char> >; 
00064   template
00065     ostreambuf_iterator<char>
00066     num_put<char, ostreambuf_iterator<char> >::
00067     _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char, 
00068            long) const;
00069 
00070   template
00071     ostreambuf_iterator<char>
00072     num_put<char, ostreambuf_iterator<char> >::
00073     _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char, 
00074            unsigned long) const;
00075 
00076 #ifdef _GLIBCPP_USE_LONG_LONG
00077   template
00078     ostreambuf_iterator<char>
00079     num_put<char, ostreambuf_iterator<char> >::
00080     _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char, 
00081            long long) const;
00082 
00083   template
00084     ostreambuf_iterator<char>
00085     num_put<char, ostreambuf_iterator<char> >::
00086     _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char,
00087            unsigned long long) const;
00088 #endif
00089 
00090   template
00091     ostreambuf_iterator<char>
00092     num_put<char, ostreambuf_iterator<char> >::
00093     _M_convert_float(ostreambuf_iterator<char>, ios_base&, char, char, 
00094              double) const;
00095 
00096   template
00097     ostreambuf_iterator<char>
00098     num_put<char, ostreambuf_iterator<char> >::
00099     _M_convert_float(ostreambuf_iterator<char>, ios_base&, char, char, 
00100             long double) const;
00101 
00102 #ifdef _GLIBCPP_USE_WCHAR_T
00103   template class numpunct<wchar_t>;
00104   template class numpunct_byname<wchar_t>;
00105   template class num_get<wchar_t, istreambuf_iterator<wchar_t> >;
00106   template class num_put<wchar_t, ostreambuf_iterator<wchar_t> >;
00107 
00108   template
00109     ostreambuf_iterator<wchar_t>
00110     num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
00111     _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char, 
00112            char, long) const;
00113 
00114   template
00115     ostreambuf_iterator<wchar_t>
00116     num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
00117     _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char, 
00118            char, unsigned long) const;
00119 
00120 #ifdef _GLIBCPP_USE_LONG_LONG
00121   template
00122     ostreambuf_iterator<wchar_t>
00123     num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
00124     _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char, 
00125            char, long long) const;
00126 
00127   template
00128     ostreambuf_iterator<wchar_t>
00129     num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
00130     _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char, 
00131            char, unsigned long long) const;
00132 #endif
00133 
00134   template
00135     ostreambuf_iterator<wchar_t>
00136     num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
00137     _M_convert_float(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char, 
00138              double) const;
00139 
00140   template
00141     ostreambuf_iterator<wchar_t>
00142     num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
00143     _M_convert_float(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char, 
00144              long double) const;
00145 #endif
00146 
00147   // time_get and time_put
00148   template class __timepunct<char>;
00149   template class time_put<char, ostreambuf_iterator<char> >;
00150   template class time_put_byname<char, ostreambuf_iterator<char> >;
00151   template class time_get<char, istreambuf_iterator<char> >;
00152   template class time_get_byname<char, istreambuf_iterator<char> >;
00153 
00154 #ifdef _GLIBCPP_USE_WCHAR_T
00155   template class __timepunct<wchar_t>;
00156   template class time_put<wchar_t, ostreambuf_iterator<wchar_t> >;
00157   template class time_put_byname<wchar_t, ostreambuf_iterator<wchar_t> >;
00158   template class time_get<wchar_t, istreambuf_iterator<wchar_t> >;
00159   template class time_get_byname<wchar_t, istreambuf_iterator<wchar_t> >;
00160 #endif
00161 
00162   // messages
00163   template class messages<char>;
00164   template class messages_byname<char>;
00165 #ifdef _GLIBCPP_USE_WCHAR_T
00166   template class messages<wchar_t>;
00167   template class messages_byname<wchar_t>;
00168 #endif
00169   
00170   // ctype
00171   inline template class __ctype_abstract_base<char>;
00172   template class ctype_byname<char>;
00173 #ifdef _GLIBCPP_USE_WCHAR_T
00174   inline template class __ctype_abstract_base<wchar_t>;
00175   template class ctype_byname<wchar_t>;
00176 #endif
00177   
00178   // codecvt
00179   inline template class __codecvt_abstract_base<char, char, mbstate_t>;
00180   template class codecvt_byname<char, char, mbstate_t>;
00181 #ifdef _GLIBCPP_USE_WCHAR_T
00182   inline template class __codecvt_abstract_base<wchar_t, char, mbstate_t>;
00183   template class codecvt_byname<wchar_t, char, mbstate_t>;
00184 #endif
00185 
00186   // collate
00187   template class collate<char>;
00188   template class collate_byname<char>;
00189 #ifdef _GLIBCPP_USE_WCHAR_T
00190   template class collate<wchar_t>;
00191   template class collate_byname<wchar_t>;
00192 #endif
00193     
00194   // use_facet
00195   // NB: use_facet<ctype> is specialized
00196   template
00197     const codecvt<char, char, mbstate_t>& 
00198     use_facet<codecvt<char, char, mbstate_t> >(const locale&);
00199 
00200   template
00201     const collate<char>& 
00202     use_facet<collate<char> >(const locale&);
00203 
00204   template
00205     const numpunct<char>& 
00206     use_facet<numpunct<char> >(const locale&);
00207 
00208   template 
00209     const num_put<char>& 
00210     use_facet<num_put<char> >(const locale&);
00211 
00212   template 
00213     const num_get<char>& 
00214     use_facet<num_get<char> >(const locale&);
00215 
00216   template
00217     const moneypunct<char, true>& 
00218     use_facet<moneypunct<char, true> >(const locale&);
00219 
00220   template
00221     const moneypunct<char, false>& 
00222     use_facet<moneypunct<char, false> >(const locale&);
00223 
00224   template 
00225     const money_put<char>& 
00226     use_facet<money_put<char> >(const locale&);
00227 
00228   template 
00229     const money_get<char>& 
00230     use_facet<money_get<char> >(const locale&);
00231 
00232   template
00233     const __timepunct<char>& 
00234     use_facet<__timepunct<char> >(const locale&);
00235 
00236   template 
00237     const time_put<char>& 
00238     use_facet<time_put<char> >(const locale&);
00239 
00240   template 
00241     const time_get<char>& 
00242     use_facet<time_get<char> >(const locale&);
00243 
00244   template 
00245     const messages<char>& 
00246     use_facet<messages<char> >(const locale&);
00247 
00248 #ifdef _GLIBCPP_USE_WCHAR_T
00249   template
00250     const codecvt<wchar_t, char, mbstate_t>& 
00251     use_facet<codecvt<wchar_t, char, mbstate_t> >(locale const&);
00252 
00253   template
00254     const collate<wchar_t>& 
00255     use_facet<collate<wchar_t> >(const locale&);
00256 
00257   template
00258     const numpunct<wchar_t>& 
00259     use_facet<numpunct<wchar_t> >(const locale&);
00260 
00261   template 
00262     const num_put<wchar_t>& 
00263     use_facet<num_put<wchar_t> >(const locale&);
00264 
00265   template 
00266     const num_get<wchar_t>& 
00267     use_facet<num_get<wchar_t> >(const locale&);
00268 
00269   template
00270     const moneypunct<wchar_t, true>& 
00271     use_facet<moneypunct<wchar_t, true> >(const locale&);
00272 
00273   template
00274     const moneypunct<wchar_t, false>& 
00275     use_facet<moneypunct<wchar_t, false> >(const locale&);
00276  
00277   template 
00278     const money_put<wchar_t>& 
00279     use_facet<money_put<wchar_t> >(const locale&);
00280 
00281   template 
00282     const money_get<wchar_t>& 
00283     use_facet<money_get<wchar_t> >(const locale&);
00284 
00285   template
00286     const __timepunct<wchar_t>& 
00287     use_facet<__timepunct<wchar_t> >(const locale&);
00288 
00289   template 
00290     const time_put<wchar_t>& 
00291     use_facet<time_put<wchar_t> >(const locale&);
00292 
00293   template 
00294     const time_get<wchar_t>& 
00295     use_facet<time_get<wchar_t> >(const locale&);
00296 
00297   template 
00298     const messages<wchar_t>& 
00299     use_facet<messages<wchar_t> >(const locale&);
00300 #endif
00301 
00302   // has_facet
00303   template 
00304     bool
00305     has_facet<ctype<char> >(const locale&);
00306 
00307   template 
00308     bool
00309     has_facet<codecvt<char, char, mbstate_t> >(const locale&);
00310 
00311   template 
00312     bool
00313     has_facet<collate<char> >(const locale&);
00314 
00315   template 
00316     bool
00317     has_facet<numpunct<char> >(const locale&);
00318 
00319   template 
00320     bool
00321     has_facet<num_put<char> >(const locale&);
00322 
00323   template 
00324     bool
00325     has_facet<num_get<char> >(const locale&);
00326 
00327   template 
00328     bool
00329     has_facet<moneypunct<char> >(const locale&);
00330 
00331   template 
00332     bool
00333     has_facet<money_put<char> >(const locale&);
00334 
00335   template 
00336     bool
00337     has_facet<money_get<char> >(const locale&);
00338 
00339   template 
00340     bool
00341     has_facet<__timepunct<char> >(const locale&);
00342 
00343   template 
00344     bool
00345     has_facet<time_put<char> >(const locale&);
00346 
00347   template 
00348     bool
00349     has_facet<time_get<char> >(const locale&);
00350 
00351   template 
00352     bool
00353     has_facet<messages<char> >(const locale&);
00354 
00355 #ifdef _GLIBCPP_USE_WCHAR_T
00356  template 
00357     bool
00358     has_facet<ctype<wchar_t> >(const locale&);
00359 
00360   template 
00361     bool
00362     has_facet<codecvt<wchar_t, char, mbstate_t> >(const locale&);
00363 
00364   template 
00365     bool
00366     has_facet<collate<wchar_t> >(const locale&);
00367 
00368   template 
00369     bool
00370     has_facet<numpunct<wchar_t> >(const locale&);
00371 
00372   template 
00373     bool
00374     has_facet<num_put<wchar_t> >(const locale&);
00375 
00376   template 
00377     bool
00378     has_facet<num_get<wchar_t> >(const locale&);
00379 
00380   template 
00381     bool
00382     has_facet<moneypunct<wchar_t> >(const locale&);
00383 
00384   template 
00385     bool
00386     has_facet<money_put<wchar_t> >(const locale&);
00387 
00388   template 
00389     bool
00390     has_facet<money_get<wchar_t> >(const locale&);
00391 
00392   template 
00393     bool
00394     has_facet<__timepunct<wchar_t> >(const locale&);
00395 
00396   template 
00397     bool
00398     has_facet<time_put<wchar_t> >(const locale&);
00399 
00400   template 
00401     bool
00402     has_facet<time_get<wchar_t> >(const locale&);
00403 
00404   template 
00405     bool
00406     has_facet<messages<wchar_t> >(const locale&);
00407 #endif
00408 
00409   // locale
00410   template
00411     char*
00412     __add_grouping<char>(char*, char, char const*, char const*, 
00413              char const*, char const*);
00414 
00415   template
00416     bool
00417     __verify_grouping<char>(const basic_string<char>&, basic_string<char>&);
00418 
00419   template class __pad<char, char_traits<char> >;
00420 
00421 #ifdef _GLIBCPP_USE_WCHAR_T
00422   template
00423     wchar_t*
00424     __add_grouping<wchar_t>(wchar_t*, wchar_t, char const*, char const*, 
00425                 wchar_t const*, wchar_t const*);
00426   template
00427     bool
00428     __verify_grouping<wchar_t>(const basic_string<wchar_t>&, 
00429                    basic_string<wchar_t>&);
00430 
00431   template class __pad<wchar_t, char_traits<wchar_t> >;
00432 #endif 
00433 
00434   template
00435     int
00436     __convert_from_v(char*, const int, const char*, double, 
00437              const __c_locale&, int);
00438 
00439   template
00440     int
00441     __convert_from_v(char*, const int, const char*, long double, 
00442              const __c_locale&, int);
00443 
00444   template
00445     int
00446     __convert_from_v(char*, const int, const char*, long, 
00447              const __c_locale&, int);
00448 
00449   template
00450     int
00451     __convert_from_v(char*, const int, const char*, unsigned long, 
00452              const __c_locale&, int);
00453 
00454   template
00455     int
00456     __convert_from_v(char*, const int, const char*, long long, 
00457              const __c_locale&, int);
00458 
00459   template
00460     int
00461     __convert_from_v(char*, const int, const char*, unsigned long long, 
00462              const __c_locale&, int);
00463 } // namespace std

Generated on Thu Nov 21 03:12:48 2002 for libstdc++-v3 Source by doxygen1.2.18-20021030