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