1*404b540aSrobert // Locale support -*- C++ -*- 2*404b540aSrobert 3*404b540aSrobert // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006 4*404b540aSrobert // Free Software Foundation, Inc. 5*404b540aSrobert // 6*404b540aSrobert // This file is part of the GNU ISO C++ Library. This library is free 7*404b540aSrobert // software; you can redistribute it and/or modify it under the 8*404b540aSrobert // terms of the GNU General Public License as published by the 9*404b540aSrobert // Free Software Foundation; either version 2, or (at your option) 10*404b540aSrobert // any later version. 11*404b540aSrobert 12*404b540aSrobert // This library is distributed in the hope that it will be useful, 13*404b540aSrobert // but WITHOUT ANY WARRANTY; without even the implied warranty of 14*404b540aSrobert // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15*404b540aSrobert // GNU General Public License for more details. 16*404b540aSrobert 17*404b540aSrobert // You should have received a copy of the GNU General Public License along 18*404b540aSrobert // with this library; see the file COPYING. If not, write to the Free 19*404b540aSrobert // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 20*404b540aSrobert // USA. 21*404b540aSrobert 22*404b540aSrobert // As a special exception, you may use this file as part of a free software 23*404b540aSrobert // library without restriction. Specifically, if other files instantiate 24*404b540aSrobert // templates or use macros or inline functions from this file, or you compile 25*404b540aSrobert // this file and link it with other files to produce an executable, this 26*404b540aSrobert // file does not by itself cause the resulting executable to be covered by 27*404b540aSrobert // the GNU General Public License. This exception does not however 28*404b540aSrobert // invalidate any other reasons why the executable file might be covered by 29*404b540aSrobert // the GNU General Public License. 30*404b540aSrobert 31*404b540aSrobert /** @file localefwd.h 32*404b540aSrobert * This is an internal header file, included by other library headers. 33*404b540aSrobert * You should not attempt to use it directly. 34*404b540aSrobert */ 35*404b540aSrobert 36*404b540aSrobert // 37*404b540aSrobert // ISO C++ 14882: 22.1 Locales 38*404b540aSrobert // 39*404b540aSrobert 40*404b540aSrobert #ifndef _LOCALE_FWD_H 41*404b540aSrobert #define _LOCALE_FWD_H 1 42*404b540aSrobert 43*404b540aSrobert #pragma GCC system_header 44*404b540aSrobert 45*404b540aSrobert #include <bits/c++config.h> 46*404b540aSrobert #include <bits/c++locale.h> // Defines __c_locale, config-specific includes 47*404b540aSrobert #include <iosfwd> // For ostreambuf_iterator, istreambuf_iterator 48*404b540aSrobert #include <bits/functexcept.h> 49*404b540aSrobert 50*404b540aSrobert _GLIBCXX_BEGIN_NAMESPACE(std) 51*404b540aSrobert 52*404b540aSrobert // 22.1.1 Locale 53*404b540aSrobert class locale; 54*404b540aSrobert 55*404b540aSrobert // 22.1.3 Convenience interfaces 56*404b540aSrobert template<typename _CharT> 57*404b540aSrobert inline bool 58*404b540aSrobert isspace(_CharT, const locale&); 59*404b540aSrobert 60*404b540aSrobert template<typename _CharT> 61*404b540aSrobert inline bool 62*404b540aSrobert isprint(_CharT, const locale&); 63*404b540aSrobert 64*404b540aSrobert template<typename _CharT> 65*404b540aSrobert inline bool 66*404b540aSrobert iscntrl(_CharT, const locale&); 67*404b540aSrobert 68*404b540aSrobert template<typename _CharT> 69*404b540aSrobert inline bool 70*404b540aSrobert isupper(_CharT, const locale&); 71*404b540aSrobert 72*404b540aSrobert template<typename _CharT> 73*404b540aSrobert inline bool 74*404b540aSrobert islower(_CharT, const locale&); 75*404b540aSrobert 76*404b540aSrobert template<typename _CharT> 77*404b540aSrobert inline bool 78*404b540aSrobert isalpha(_CharT, const locale&); 79*404b540aSrobert 80*404b540aSrobert template<typename _CharT> 81*404b540aSrobert inline bool 82*404b540aSrobert isdigit(_CharT, const locale&); 83*404b540aSrobert 84*404b540aSrobert template<typename _CharT> 85*404b540aSrobert inline bool 86*404b540aSrobert ispunct(_CharT, const locale&); 87*404b540aSrobert 88*404b540aSrobert template<typename _CharT> 89*404b540aSrobert inline bool 90*404b540aSrobert isxdigit(_CharT, const locale&); 91*404b540aSrobert 92*404b540aSrobert template<typename _CharT> 93*404b540aSrobert inline bool 94*404b540aSrobert isalnum(_CharT, const locale&); 95*404b540aSrobert 96*404b540aSrobert template<typename _CharT> 97*404b540aSrobert inline bool 98*404b540aSrobert isgraph(_CharT, const locale&); 99*404b540aSrobert 100*404b540aSrobert template<typename _CharT> 101*404b540aSrobert inline _CharT 102*404b540aSrobert toupper(_CharT, const locale&); 103*404b540aSrobert 104*404b540aSrobert template<typename _CharT> 105*404b540aSrobert inline _CharT 106*404b540aSrobert tolower(_CharT, const locale&); 107*404b540aSrobert 108*404b540aSrobert // 22.2.1 and 22.2.1.3 ctype 109*404b540aSrobert class ctype_base; 110*404b540aSrobert template<typename _CharT> 111*404b540aSrobert class ctype; 112*404b540aSrobert template<> class ctype<char>; 113*404b540aSrobert #ifdef _GLIBCXX_USE_WCHAR_T 114*404b540aSrobert template<> class ctype<wchar_t>; 115*404b540aSrobert #endif 116*404b540aSrobert template<typename _CharT> 117*404b540aSrobert class ctype_byname; 118*404b540aSrobert // NB: Specialized for char and wchar_t in locale_facets.h. 119*404b540aSrobert 120*404b540aSrobert class codecvt_base; 121*404b540aSrobert class __enc_traits; 122*404b540aSrobert template<typename _InternT, typename _ExternT, typename _StateT> 123*404b540aSrobert class codecvt; 124*404b540aSrobert template<> class codecvt<char, char, mbstate_t>; 125*404b540aSrobert #ifdef _GLIBCXX_USE_WCHAR_T 126*404b540aSrobert template<> class codecvt<wchar_t, char, mbstate_t>; 127*404b540aSrobert #endif 128*404b540aSrobert template<typename _InternT, typename _ExternT, typename _StateT> 129*404b540aSrobert class codecvt_byname; 130*404b540aSrobert 131*404b540aSrobert // 22.2.2 and 22.2.3 numeric 132*404b540aSrobert _GLIBCXX_BEGIN_LDBL_NAMESPACE 133*404b540aSrobert template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > 134*404b540aSrobert class num_get; 135*404b540aSrobert template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > 136*404b540aSrobert class num_put; 137*404b540aSrobert _GLIBCXX_END_LDBL_NAMESPACE 138*404b540aSrobert template<typename _CharT> class numpunct; 139*404b540aSrobert template<typename _CharT> class numpunct_byname; 140*404b540aSrobert 141*404b540aSrobert // 22.2.4 collation 142*404b540aSrobert template<typename _CharT> 143*404b540aSrobert class collate; 144*404b540aSrobert template<typename _CharT> class 145*404b540aSrobert collate_byname; 146*404b540aSrobert 147*404b540aSrobert // 22.2.5 date and time 148*404b540aSrobert class time_base; 149*404b540aSrobert template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > 150*404b540aSrobert class time_get; 151*404b540aSrobert template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > 152*404b540aSrobert class time_get_byname; 153*404b540aSrobert template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > 154*404b540aSrobert class time_put; 155*404b540aSrobert template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > 156*404b540aSrobert class time_put_byname; 157*404b540aSrobert 158*404b540aSrobert // 22.2.6 money 159*404b540aSrobert class money_base; 160*404b540aSrobert _GLIBCXX_BEGIN_LDBL_NAMESPACE 161*404b540aSrobert template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > 162*404b540aSrobert class money_get; 163*404b540aSrobert template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > 164*404b540aSrobert class money_put; 165*404b540aSrobert _GLIBCXX_END_LDBL_NAMESPACE 166*404b540aSrobert template<typename _CharT, bool _Intl = false> 167*404b540aSrobert class moneypunct; 168*404b540aSrobert template<typename _CharT, bool _Intl = false> 169*404b540aSrobert class moneypunct_byname; 170*404b540aSrobert 171*404b540aSrobert // 22.2.7 message retrieval 172*404b540aSrobert class messages_base; 173*404b540aSrobert template<typename _CharT> 174*404b540aSrobert class messages; 175*404b540aSrobert template<typename _CharT> 176*404b540aSrobert class messages_byname; 177*404b540aSrobert 178*404b540aSrobert template<typename _Facet> 179*404b540aSrobert bool 180*404b540aSrobert has_facet(const locale& __loc) throw(); 181*404b540aSrobert 182*404b540aSrobert template<typename _Facet> 183*404b540aSrobert const _Facet& 184*404b540aSrobert use_facet(const locale& __loc); 185*404b540aSrobert 186*404b540aSrobert template<typename _Facet> 187*404b540aSrobert inline const _Facet& __check_facet(const _Facet * __f)188*404b540aSrobert __check_facet(const _Facet* __f) 189*404b540aSrobert { 190*404b540aSrobert if (!__f) 191*404b540aSrobert __throw_bad_cast(); 192*404b540aSrobert return *__f; 193*404b540aSrobert } 194*404b540aSrobert 195*404b540aSrobert _GLIBCXX_END_NAMESPACE 196*404b540aSrobert 197*404b540aSrobert #endif 198