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, 2010
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 bits/localefwd.h
28  * This is an internal header file, included by other library headers.
29  * Do not attempt to use it directly. @headername{locale}
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 namespace std _GLIBCXX_VISIBILITY(default)
47 {
48 _GLIBCXX_BEGIN_NAMESPACE_VERSION
49 
50  /**
51  * @defgroup locales Locales
52  *
53  * Classes and functions for internationalization and localization.
54  */
55 
56  // 22.1.1 Locale
57  class locale;
58 
59  template<typename _Facet>
60  bool
61  has_facet(const locale&) throw();
62 
63  template<typename _Facet>
64  const _Facet&
65  use_facet(const locale&);
66 
67  // 22.1.3 Convenience interfaces
68  template<typename _CharT>
69  bool
70  isspace(_CharT, const locale&);
71 
72  template<typename _CharT>
73  bool
74  isprint(_CharT, const locale&);
75 
76  template<typename _CharT>
77  bool
78  iscntrl(_CharT, const locale&);
79 
80  template<typename _CharT>
81  bool
82  isupper(_CharT, const locale&);
83 
84  template<typename _CharT>
85  bool
86  islower(_CharT, const locale&);
87 
88  template<typename _CharT>
89  bool
90  isalpha(_CharT, const locale&);
91 
92  template<typename _CharT>
93  bool
94  isdigit(_CharT, const locale&);
95 
96  template<typename _CharT>
97  bool
98  ispunct(_CharT, const locale&);
99 
100  template<typename _CharT>
101  bool
102  isxdigit(_CharT, const locale&);
103 
104  template<typename _CharT>
105  bool
106  isalnum(_CharT, const locale&);
107 
108  template<typename _CharT>
109  bool
110  isgraph(_CharT, const locale&);
111 
112  template<typename _CharT>
113  _CharT
114  toupper(_CharT, const locale&);
115 
116  template<typename _CharT>
117  _CharT
118  tolower(_CharT, const locale&);
119 
120  // 22.2.1 and 22.2.1.3 ctype
121  class ctype_base;
122  template<typename _CharT>
123  class ctype;
124  template<> class ctype<char>;
125 #ifdef _GLIBCXX_USE_WCHAR_T
126  template<> class ctype<wchar_t>;
127 #endif
128  template<typename _CharT>
129  class ctype_byname;
130  // NB: Specialized for char and wchar_t in locale_facets.h.
131 
132  class codecvt_base;
133  template<typename _InternT, typename _ExternT, typename _StateT>
134  class codecvt;
135  template<> class codecvt<char, char, mbstate_t>;
136 #ifdef _GLIBCXX_USE_WCHAR_T
137  template<> class codecvt<wchar_t, char, mbstate_t>;
138 #endif
139  template<typename _InternT, typename _ExternT, typename _StateT>
140  class codecvt_byname;
141 
142  // 22.2.2 and 22.2.3 numeric
143 _GLIBCXX_BEGIN_NAMESPACE_LDBL
144  template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
145  class num_get;
146  template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
147  class num_put;
148 _GLIBCXX_END_NAMESPACE_LDBL
149  template<typename _CharT> class numpunct;
150  template<typename _CharT> class numpunct_byname;
151 
152  // 22.2.4 collation
153  template<typename _CharT>
154  class collate;
155  template<typename _CharT> class
156  collate_byname;
157 
158  // 22.2.5 date and time
159  class time_base;
160  template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
161  class time_get;
162  template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
163  class time_get_byname;
164  template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
165  class time_put;
166  template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
167  class time_put_byname;
168 
169  // 22.2.6 money
170  class money_base;
171 _GLIBCXX_BEGIN_NAMESPACE_LDBL
172  template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
173  class money_get;
174  template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
175  class money_put;
176 _GLIBCXX_END_NAMESPACE_LDBL
177  template<typename _CharT, bool _Intl = false>
178  class moneypunct;
179  template<typename _CharT, bool _Intl = false>
180  class moneypunct_byname;
181 
182  // 22.2.7 message retrieval
183  class messages_base;
184  template<typename _CharT>
185  class messages;
186  template<typename _CharT>
187  class messages_byname;
188 
189 _GLIBCXX_END_NAMESPACE_VERSION
190 } // namespace
191 
192 #endif