localefwd.h 4.9 KB

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