localefwd.h revision 169691
1139823Simp// Locale support -*- C++ -*- 2133920Sandre 3133920Sandre// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006 4133920Sandre// Free Software Foundation, Inc. 5133920Sandre// 6133920Sandre// This file is part of the GNU ISO C++ Library. This library is free 7133920Sandre// software; you can redistribute it and/or modify it under the 8133920Sandre// terms of the GNU General Public License as published by the 9133920Sandre// Free Software Foundation; either version 2, or (at your option) 10133920Sandre// any later version. 11133920Sandre 12133920Sandre// This library is distributed in the hope that it will be useful, 13133920Sandre// but WITHOUT ANY WARRANTY; without even the implied warranty of 14133920Sandre// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15133920Sandre// GNU General Public License for more details. 16133920Sandre 17133920Sandre// You should have received a copy of the GNU General Public License along 18133920Sandre// with this library; see the file COPYING. If not, write to the Free 19133920Sandre// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 20133920Sandre// USA. 21133920Sandre 22133920Sandre// As a special exception, you may use this file as part of a free software 23133920Sandre// library without restriction. Specifically, if other files instantiate 24133920Sandre// templates or use macros or inline functions from this file, or you compile 25133920Sandre// this file and link it with other files to produce an executable, this 26133920Sandre// file does not by itself cause the resulting executable to be covered by 27133920Sandre// the GNU General Public License. This exception does not however 28133920Sandre// invalidate any other reasons why the executable file might be covered by 29134346Sru// the GNU General Public License. 30133920Sandre 31133920Sandre/** @file localefwd.h 32133920Sandre * This is an internal header file, included by other library headers. 33133920Sandre * You should not attempt to use it directly. 34133920Sandre */ 35133920Sandre 36134383Sandre// 37133920Sandre// ISO C++ 14882: 22.1 Locales 38133920Sandre// 39133920Sandre 40133920Sandre#ifndef _LOCALE_FWD_H 41133920Sandre#define _LOCALE_FWD_H 1 42133920Sandre 43133920Sandre#pragma GCC system_header 44133920Sandre 45133920Sandre#include <bits/c++config.h> 46133920Sandre#include <bits/c++locale.h> // Defines __c_locale, config-specific includes 47133920Sandre#include <iosfwd> // For ostreambuf_iterator, istreambuf_iterator 48133920Sandre#include <bits/functexcept.h> 49133920Sandre 50133920Sandre_GLIBCXX_BEGIN_NAMESPACE(std) 51133920Sandre 52133920Sandre // 22.1.1 Locale 53133920Sandre class locale; 54133920Sandre 55133920Sandre // 22.1.3 Convenience interfaces 56133920Sandre template<typename _CharT> 57133920Sandre inline bool 58133920Sandre isspace(_CharT, const locale&); 59133920Sandre 60133920Sandre template<typename _CharT> 61133920Sandre inline bool 62133920Sandre isprint(_CharT, const locale&); 63133920Sandre 64133920Sandre template<typename _CharT> 65133920Sandre inline bool 66133920Sandre iscntrl(_CharT, const locale&); 67133920Sandre 68133920Sandre template<typename _CharT> 69136714Sandre inline bool 70136714Sandre isupper(_CharT, const locale&); 71136714Sandre 72136714Sandre template<typename _CharT> 73136714Sandre inline bool 74133920Sandre islower(_CharT, const locale&); 75133920Sandre 76133920Sandre template<typename _CharT> 77133920Sandre inline bool 78135920Smlaier isalpha(_CharT, const locale&); 79135920Smlaier 80133920Sandre template<typename _CharT> 81133920Sandre inline bool 82133920Sandre isdigit(_CharT, const locale&); 83133920Sandre 84133920Sandre template<typename _CharT> 85133920Sandre inline bool 86133920Sandre ispunct(_CharT, const locale&); 87133920Sandre 88133920Sandre template<typename _CharT> 89133920Sandre inline bool 90133920Sandre isxdigit(_CharT, const locale&); 91134022Sandre 92134022Sandre template<typename _CharT> 93134022Sandre inline bool 94133920Sandre isalnum(_CharT, const locale&); 95133920Sandre 96138652Sglebius template<typename _CharT> 97138652Sglebius inline bool 98133920Sandre isgraph(_CharT, const locale&); 99133920Sandre 100133920Sandre template<typename _CharT> 101133920Sandre inline _CharT 102133920Sandre toupper(_CharT, const locale&); 103133920Sandre 104133920Sandre template<typename _CharT> 105133920Sandre inline _CharT 106135154Sandre tolower(_CharT, const locale&); 107133920Sandre 108135920Smlaier // 22.2.1 and 22.2.1.3 ctype 109133920Sandre class ctype_base; 110133920Sandre template<typename _CharT> 111133920Sandre class ctype; 112133920Sandre template<> class ctype<char>; 113133920Sandre#ifdef _GLIBCXX_USE_WCHAR_T 114133920Sandre template<> class ctype<wchar_t>; 115133920Sandre#endif 116133920Sandre template<typename _CharT> 117133920Sandre class ctype_byname; 118133920Sandre // NB: Specialized for char and wchar_t in locale_facets.h. 119133920Sandre 120133920Sandre class codecvt_base; 121133920Sandre class __enc_traits; 122133920Sandre template<typename _InternT, typename _ExternT, typename _StateT> 123133920Sandre class codecvt; 124133920Sandre template<> class codecvt<char, char, mbstate_t>; 125133920Sandre#ifdef _GLIBCXX_USE_WCHAR_T 126133920Sandre template<> class codecvt<wchar_t, char, mbstate_t>; 127133920Sandre#endif 128133920Sandre template<typename _InternT, typename _ExternT, typename _StateT> 129133920Sandre class codecvt_byname; 130133920Sandre 131133920Sandre // 22.2.2 and 22.2.3 numeric 132133920Sandre_GLIBCXX_BEGIN_LDBL_NAMESPACE 133133920Sandre template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > 134133920Sandre class num_get; 135135154Sandre template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > 136133920Sandre class num_put; 137133920Sandre_GLIBCXX_END_LDBL_NAMESPACE 138133920Sandre template<typename _CharT> class numpunct; 139133920Sandre template<typename _CharT> class numpunct_byname; 140133920Sandre 141133920Sandre // 22.2.4 collation 142133920Sandre template<typename _CharT> 143133920Sandre class collate; 144133920Sandre template<typename _CharT> class 145133920Sandre collate_byname; 146133920Sandre 147133920Sandre // 22.2.5 date and time 148133920Sandre class time_base; 149133920Sandre template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > 150133920Sandre class time_get; 151133920Sandre template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > 152133920Sandre class time_get_byname; 153133920Sandre template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > 154133920Sandre class time_put; 155133920Sandre template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > 156133920Sandre class time_put_byname; 157133920Sandre 158133920Sandre // 22.2.6 money 159133920Sandre class money_base; 160133920Sandre_GLIBCXX_BEGIN_LDBL_NAMESPACE 161133920Sandre template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > 162133920Sandre class money_get; 163135920Smlaier template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > 164135920Smlaier class money_put; 165133920Sandre_GLIBCXX_END_LDBL_NAMESPACE 166133920Sandre template<typename _CharT, bool _Intl = false> 167133920Sandre class moneypunct; 168133920Sandre template<typename _CharT, bool _Intl = false> 169133920Sandre class moneypunct_byname; 170133920Sandre 171133920Sandre // 22.2.7 message retrieval 172133920Sandre class messages_base; 173133920Sandre template<typename _CharT> 174133920Sandre class messages; 175133920Sandre template<typename _CharT> 176134022Sandre class messages_byname; 177134022Sandre 178134022Sandre template<typename _Facet> 179133920Sandre bool 180133920Sandre has_facet(const locale& __loc) throw(); 181138652Sglebius 182138652Sglebius template<typename _Facet> 183133920Sandre const _Facet& 184133920Sandre use_facet(const locale& __loc); 185133920Sandre 186133920Sandre template<typename _Facet> 187133920Sandre inline const _Facet& 188133920Sandre __check_facet(const _Facet* __f) 189133920Sandre { 190133920Sandre if (!__f) 191135154Sandre __throw_bad_cast(); 192133920Sandre return *__f; 193133920Sandre } 194135920Smlaier 195133920Sandre_GLIBCXX_END_NAMESPACE 196133920Sandre 197133920Sandre#endif 198133920Sandre