# localefwd.h

Go to the documentation of this file.

    00001 // Locale support -*- C++ -*-
    00002
    00003 // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006
    00004 // Free Software Foundation, Inc.
    00005 //
    00006 // This file is part of the GNU ISO C++ Library.  This library is free
    00007 // software; you can redistribute it and/or modify it under the
    00008 // terms of the GNU General Public License as published by the
    00009 // Free Software Foundation; either version 2, or (at your option)
    00010 // any later version.
    00011
    00012 // This library is distributed in the hope that it will be useful,
    00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00015 // GNU General Public License for more details.
    00016
    00017 // You should have received a copy of the GNU General Public License along
    00018 // with this library; see the file COPYING.  If not, write to the Free
    00019 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
    00020 // USA.
    00021
    00022 // As a special exception, you may use this file as part of a free software
    00023 // library without restriction.  Specifically, if other files instantiate
    00024 // templates or use macros or inline functions from this file, or you compile
    00025 // this file and link it with other files to produce an executable, this
    00026 // file does not by itself cause the resulting executable to be covered by
    00027 // the GNU General Public License.  This exception does not however
    00028 // invalidate any other reasons why the executable file might be covered by
    00029 // the GNU General Public License.
    00030
    00031 /** @file localefwd.h
    00032  *  This is an internal header file, included by other library headers.
    00033  *  You should not attempt to use it directly.
    00034  */
    00035
    00036 //
    00037 // ISO C++ 14882: 22.1  Locales
    00038 //
    00039
    00040 #ifndef _LOCALE_FWD_H
    00041 #define _LOCALE_FWD_H 1
    00042
    00043 #pragma GCC system_header
    00044
    00045 #include <bits/c++config.h>
    00046 #include <bits/c++locale.h>     // Defines __c_locale, config-specific includes
    00047 #include <iosfwd>       // For ostreambuf_iterator, istreambuf_iterator
    00048 #include <bits/functexcept.h>
    00049
    00050 _GLIBCXX_BEGIN_NAMESPACE(std)
    00051
    00052   // 22.1.1 Locale
    00053   class locale;
    00054
    00055   // 22.1.3 Convenience interfaces
    00056   template<typename _CharT>
    00057     inline bool
    00058     isspace(_CharT, const locale&);
    00059
    00060   template<typename _CharT>
    00061     inline bool
    00062     isprint(_CharT, const locale&);
    00063
    00064   template<typename _CharT>
    00065     inline bool
    00066     iscntrl(_CharT, const locale&);
    00067
    00068   template<typename _CharT>
    00069     inline bool
    00070     isupper(_CharT, const locale&);
    00071
    00072   template<typename _CharT>
    00073     inline bool
    00074     islower(_CharT, const locale&);
    00075
    00076   template<typename _CharT>
    00077     inline bool
    00078     isalpha(_CharT, const locale&);
    00079
    00080   template<typename _CharT>
    00081     inline bool
    00082     isdigit(_CharT, const locale&);
    00083
    00084   template<typename _CharT>
    00085     inline bool
    00086     ispunct(_CharT, const locale&);
    00087
    00088   template<typename _CharT>
    00089     inline bool
    00090     isxdigit(_CharT, const locale&);
    00091
    00092   template<typename _CharT>
    00093     inline bool
    00094     isalnum(_CharT, const locale&);
    00095
    00096   template<typename _CharT>
    00097     inline bool
    00098     isgraph(_CharT, const locale&);
    00099
    00100   template<typename _CharT>
    00101     inline _CharT
    00102     toupper(_CharT, const locale&);
    00103
    00104   template<typename _CharT>
    00105     inline _CharT
    00106     tolower(_CharT, const locale&);
    00107
    00108   // 22.2.1 and 22.2.1.3 ctype
    00109   class ctype_base;
    00110   template<typename _CharT>
    00111     class ctype;
    00112   template<> class ctype<char>;
    00113 #ifdef _GLIBCXX_USE_WCHAR_T
    00114   template<> class ctype<wchar_t>;
    00115 #endif
    00116   template<typename _CharT>
    00117     class ctype_byname;
    00118   // NB: Specialized for char and wchar_t in locale_facets.h.
    00119
    00120   class codecvt_base;
    00121   class __enc_traits;
    00122   template<typename _InternT, typename _ExternT, typename _StateT>
    00123     class codecvt;
    00124   template<> class codecvt<char, char, mbstate_t>;
    00125 #ifdef _GLIBCXX_USE_WCHAR_T
    00126   template<> class codecvt<wchar_t, char, mbstate_t>;
    00127 #endif
    00128   template<typename _InternT, typename _ExternT, typename _StateT>
    00129     class codecvt_byname;
    00130
    00131   // 22.2.2 and 22.2.3 numeric
    00132 _GLIBCXX_BEGIN_LDBL_NAMESPACE
    00133   template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
    00134     class num_get;
    00135   template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
    00136     class num_put;
    00137 _GLIBCXX_END_LDBL_NAMESPACE
    00138   template<typename _CharT> class numpunct;
    00139   template<typename _CharT> class numpunct_byname;
    00140
    00141   // 22.2.4 collation
    00142   template<typename _CharT>
    00143     class collate;
    00144   template<typename _CharT> class
    00145     collate_byname;
    00146
    00147   // 22.2.5 date and time
    00148   class time_base;
    00149   template<typename _CharT, typename _InIter =  istreambuf_iterator<_CharT> >
    00150     class time_get;
    00151   template<typename _CharT, typename _InIter =  istreambuf_iterator<_CharT> >
    00152     class time_get_byname;
    00153   template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
    00154     class time_put;
    00155   template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
    00156     class time_put_byname;
    00157
    00158   // 22.2.6 money
    00159   class money_base;
    00160 _GLIBCXX_BEGIN_LDBL_NAMESPACE
    00161   template<typename _CharT, typename _InIter =  istreambuf_iterator<_CharT> >
    00162     class money_get;
    00163   template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
    00164     class money_put;
    00165 _GLIBCXX_END_LDBL_NAMESPACE
    00166   template<typename _CharT, bool _Intl = false>
    00167     class moneypunct;
    00168   template<typename _CharT, bool _Intl = false>
    00169     class moneypunct_byname;
    00170
    00171   // 22.2.7 message retrieval
    00172   class messages_base;
    00173   template<typename _CharT>
    00174     class messages;
    00175   template<typename _CharT>
    00176     class messages_byname;
    00177
    00178   template<typename _Facet>
    00179     bool
    00180     has_facet(const locale& __loc) throw();
    00181
    00182   template<typename _Facet>
    00183     const _Facet&
    00184     use_facet(const locale& __loc);
    00185
    00186   template<typename _Facet>
    00187     inline const _Facet&
    00188     __check_facet(const _Facet* __f)
    00189     {
    00190       if (!__f)
    00191     __throw_bad_cast();
    00192       return *__f;
    00193     }
    00194
    00195 _GLIBCXX_END_NAMESPACE
    00196
    00197 #endif