]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/libstdc++/include/bits/localefwd.h
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / libstdc++ / include / bits / localefwd.h
1 // Locale support -*- C++ -*-
2
3 // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006
4 // Free Software Foundation, Inc.
5 //
6 // This file is part of the GNU ISO C++ Library.  This library is free
7 // software; you can redistribute it and/or modify it under the
8 // terms of the GNU General Public License as published by the
9 // Free Software Foundation; either version 2, or (at your option)
10 // any later version.
11
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 // GNU General Public License for more details.
16
17 // You should have received a copy of the GNU General Public License along
18 // with this library; see the file COPYING.  If not, write to the Free
19 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
20 // USA.
21
22 // As a special exception, you may use this file as part of a free software
23 // library without restriction.  Specifically, if other files instantiate
24 // templates or use macros or inline functions from this file, or you compile
25 // this file and link it with other files to produce an executable, this
26 // file does not by itself cause the resulting executable to be covered by
27 // the GNU General Public License.  This exception does not however
28 // invalidate any other reasons why the executable file might be covered by
29 // the GNU General Public License.
30
31 /** @file localefwd.h
32  *  This is an internal header file, included by other library headers.
33  *  You should not attempt to use it directly.
34  */
35
36 //
37 // ISO C++ 14882: 22.1  Locales
38 //
39
40 #ifndef _LOCALE_FWD_H
41 #define _LOCALE_FWD_H 1
42
43 #pragma GCC system_header
44
45 #include <bits/c++config.h>
46 #include <bits/c++locale.h>     // Defines __c_locale, config-specific includes
47 #include <iosfwd>               // For ostreambuf_iterator, istreambuf_iterator
48 #include <bits/functexcept.h>
49
50 _GLIBCXX_BEGIN_NAMESPACE(std)
51
52   // 22.1.1 Locale
53   class locale;
54
55   // 22.1.3 Convenience interfaces
56   template<typename _CharT>
57     inline bool
58     isspace(_CharT, const locale&);
59
60   template<typename _CharT>
61     inline bool
62     isprint(_CharT, const locale&);
63
64   template<typename _CharT>
65     inline bool
66     iscntrl(_CharT, const locale&);
67
68   template<typename _CharT>
69     inline bool
70     isupper(_CharT, const locale&);
71
72   template<typename _CharT>
73     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