1109998Smarkm// Locale support -*- C++ -*-
2296341Sdelphij
3296341Sdelphij// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006
4296341Sdelphij// Free Software Foundation, Inc.
5109998Smarkm//
6109998Smarkm// This file is part of the GNU ISO C++ Library.  This library is free
7109998Smarkm// software; you can redistribute it and/or modify it under the
8109998Smarkm// terms of the GNU General Public License as published by the
9109998Smarkm// Free Software Foundation; either version 2, or (at your option)
10109998Smarkm// any later version.
11109998Smarkm
12109998Smarkm// This library is distributed in the hope that it will be useful,
13109998Smarkm// but WITHOUT ANY WARRANTY; without even the implied warranty of
14296341Sdelphij// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15109998Smarkm// GNU General Public License for more details.
16109998Smarkm
17109998Smarkm// You should have received a copy of the GNU General Public License along
18109998Smarkm// with this library; see the file COPYING.  If not, write to the Free
19109998Smarkm// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
20109998Smarkm// USA.
21109998Smarkm
22109998Smarkm// As a special exception, you may use this file as part of a free software
23109998Smarkm// library without restriction.  Specifically, if other files instantiate
24109998Smarkm// templates or use macros or inline functions from this file, or you compile
25109998Smarkm// this file and link it with other files to produce an executable, this
26109998Smarkm// file does not by itself cause the resulting executable to be covered by
27109998Smarkm// the GNU General Public License.  This exception does not however
28109998Smarkm// invalidate any other reasons why the executable file might be covered by
29109998Smarkm// the GNU General Public License.
30109998Smarkm
31109998Smarkm/** @file localefwd.h
32109998Smarkm *  This is an internal header file, included by other library headers.
33109998Smarkm *  You should not attempt to use it directly.
34109998Smarkm */
35109998Smarkm
36109998Smarkm//
37109998Smarkm// ISO C++ 14882: 22.1  Locales
38109998Smarkm//
39109998Smarkm
40109998Smarkm#ifndef _LOCALE_FWD_H
41109998Smarkm#define _LOCALE_FWD_H 1
42109998Smarkm
43109998Smarkm#pragma GCC system_header
44109998Smarkm
45109998Smarkm#include <bits/c++config.h>
46109998Smarkm#include <bits/c++locale.h>     // Defines __c_locale, config-specific includes
47109998Smarkm#include <iosfwd>		// For ostreambuf_iterator, istreambuf_iterator
48109998Smarkm#include <bits/functexcept.h>
49109998Smarkm
50109998Smarkm_GLIBCXX_BEGIN_NAMESPACE(std)
51109998Smarkm
52109998Smarkm  // 22.1.1 Locale
53109998Smarkm  class locale;
54109998Smarkm
55109998Smarkm  // 22.1.3 Convenience interfaces
56109998Smarkm  template<typename _CharT>
57109998Smarkm    inline bool
58109998Smarkm    isspace(_CharT, const locale&);
59109998Smarkm
60109998Smarkm  template<typename _CharT>
61109998Smarkm    inline bool
62109998Smarkm    isprint(_CharT, const locale&);
63109998Smarkm
64296341Sdelphij  template<typename _CharT>
65296341Sdelphij    inline bool
66296341Sdelphij    iscntrl(_CharT, const locale&);
67109998Smarkm
68109998Smarkm  template<typename _CharT>
69109998Smarkm    inline bool
70296341Sdelphij    isupper(_CharT, const locale&);
71296341Sdelphij
72296341Sdelphij  template<typename _CharT>
73296341Sdelphij    inline bool
74    islower(_CharT, const locale&);
75
76  template<typename _CharT>
77    inline bool
78    isalpha(_CharT, const locale&);
79
80  template<typename _CharT>
81    inline bool
82    isdigit(_CharT, const locale&);
83
84  template<typename _CharT>
85    inline bool
86    ispunct(_CharT, const locale&);
87
88  template<typename _CharT>
89    inline bool
90    isxdigit(_CharT, const locale&);
91
92  template<typename _CharT>
93    inline bool
94    isalnum(_CharT, const locale&);
95
96  template<typename _CharT>
97    inline bool
98    isgraph(_CharT, const locale&);
99
100  template<typename _CharT>
101    inline _CharT
102    toupper(_CharT, const locale&);
103
104  template<typename _CharT>
105    inline _CharT
106    tolower(_CharT, const locale&);
107
108  // 22.2.1 and 22.2.1.3 ctype
109  class ctype_base;
110  template<typename _CharT>
111    class ctype;
112  template<> class ctype<char>;
113#ifdef _GLIBCXX_USE_WCHAR_T
114  template<> class ctype<wchar_t>;
115#endif
116  template<typename _CharT>
117    class ctype_byname;
118  // NB: Specialized for char and wchar_t in locale_facets.h.
119
120  class codecvt_base;
121  class __enc_traits;
122  template<typename _InternT, typename _ExternT, typename _StateT>
123    class codecvt;
124  template<> class codecvt<char, char, mbstate_t>;
125#ifdef _GLIBCXX_USE_WCHAR_T
126  template<> class codecvt<wchar_t, char, mbstate_t>;
127#endif
128  template<typename _InternT, typename _ExternT, typename _StateT>
129    class codecvt_byname;
130
131  // 22.2.2 and 22.2.3 numeric
132_GLIBCXX_BEGIN_LDBL_NAMESPACE
133  template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
134    class num_get;
135  template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
136    class num_put;
137_GLIBCXX_END_LDBL_NAMESPACE
138  template<typename _CharT> class numpunct;
139  template<typename _CharT> class numpunct_byname;
140
141  // 22.2.4 collation
142  template<typename _CharT>
143    class collate;
144  template<typename _CharT> class
145    collate_byname;
146
147  // 22.2.5 date and time
148  class time_base;
149  template<typename _CharT, typename _InIter =  istreambuf_iterator<_CharT> >
150    class time_get;
151  template<typename _CharT, typename _InIter =  istreambuf_iterator<_CharT> >
152    class time_get_byname;
153  template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
154    class time_put;
155  template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
156    class time_put_byname;
157
158  // 22.2.6 money
159  class money_base;
160_GLIBCXX_BEGIN_LDBL_NAMESPACE
161  template<typename _CharT, typename _InIter =  istreambuf_iterator<_CharT> >
162    class money_get;
163  template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
164    class money_put;
165_GLIBCXX_END_LDBL_NAMESPACE
166  template<typename _CharT, bool _Intl = false>
167    class moneypunct;
168  template<typename _CharT, bool _Intl = false>
169    class moneypunct_byname;
170
171  // 22.2.7 message retrieval
172  class messages_base;
173  template<typename _CharT>
174    class messages;
175  template<typename _CharT>
176    class messages_byname;
177
178  template<typename _Facet>
179    bool
180    has_facet(const locale& __loc) throw();
181
182  template<typename _Facet>
183    const _Facet&
184    use_facet(const locale& __loc);
185
186  template<typename _Facet>
187    inline const _Facet&
188    __check_facet(const _Facet* __f)
189    {
190      if (!__f)
191	__throw_bad_cast();
192      return *__f;
193    }
194
195_GLIBCXX_END_NAMESPACE
196
197#endif
198