34 #ifndef _LOCALE_FACETS_H 35 #define _LOCALE_FACETS_H 1 37 #pragma GCC system_header 50 namespace std _GLIBCXX_VISIBILITY(default)
52 _GLIBCXX_BEGIN_NAMESPACE_VERSION
55 #ifdef _GLIBCXX_USE_WCHAR_T 56 # define _GLIBCXX_NUM_FACETS 28 57 # define _GLIBCXX_NUM_CXX11_FACETS 16 59 # define _GLIBCXX_NUM_FACETS 14 60 # define _GLIBCXX_NUM_CXX11_FACETS 8 62 #ifdef _GLIBCXX_USE_C99_STDINT_TR1 63 # define _GLIBCXX_NUM_UNICODE_FACETS 2 65 # define _GLIBCXX_NUM_UNICODE_FACETS 0 71 template<
typename _Tp>
74 const __c_locale&)
throw();
80 const __c_locale&)
throw();
85 const __c_locale&)
throw();
90 const __c_locale&)
throw();
94 template<
typename _CharT,
typename _Traits>
98 _S_pad(ios_base& __io, _CharT __fill, _CharT* __news,
107 template<
typename _CharT>
109 __add_grouping(_CharT* __s, _CharT __sep,
110 const char* __gbeg,
size_t __gsize,
111 const _CharT* __first,
const _CharT* __last);
116 template<
typename _CharT>
118 ostreambuf_iterator<_CharT>
119 __write(ostreambuf_iterator<_CharT> __s,
const _CharT* __ws,
int __len)
121 __s._M_put(__ws, __len);
126 template<
typename _CharT,
typename _OutIter>
129 __write(_OutIter __s,
const _CharT* __ws,
int __len)
131 for (
int __j = 0; __j < __len; __j++, ++__s)
149 template<
typename _CharT>
169 is(mask __m, char_type __c)
const 170 {
return this->do_is(__m, __c); }
186 is(
const char_type *__lo,
const char_type *__hi, mask *__vec)
const 187 {
return this->do_is(__lo, __hi, __vec); }
202 scan_is(mask __m,
const char_type* __lo,
const char_type* __hi)
const 203 {
return this->do_scan_is(__m, __lo, __hi); }
218 scan_not(mask __m,
const char_type* __lo,
const char_type* __hi)
const 219 {
return this->do_scan_not(__m, __lo, __hi); }
233 {
return this->do_toupper(__c); }
247 toupper(char_type *__lo,
const char_type* __hi)
const 248 {
return this->do_toupper(__lo, __hi); }
262 {
return this->do_tolower(__c); }
276 tolower(char_type* __lo,
const char_type* __hi)
const 277 {
return this->do_tolower(__lo, __hi); }
294 {
return this->do_widen(__c); }
312 widen(
const char* __lo,
const char* __hi, char_type* __to)
const 313 {
return this->do_widen(__lo, __hi, __to); }
331 narrow(char_type __c,
char __dfault)
const 332 {
return this->do_narrow(__c, __dfault); }
353 narrow(
const char_type* __lo,
const char_type* __hi,
354 char __dfault,
char* __to)
const 355 {
return this->do_narrow(__lo, __hi, __dfault, __to); }
378 do_is(mask __m, char_type __c)
const = 0;
396 virtual const char_type*
397 do_is(
const char_type* __lo,
const char_type* __hi,
398 mask* __vec)
const = 0;
415 virtual const char_type*
416 do_scan_is(mask __m,
const char_type* __lo,
417 const char_type* __hi)
const = 0;
434 virtual const char_type*
435 do_scan_not(mask __m,
const char_type* __lo,
436 const char_type* __hi)
const = 0;
453 do_toupper(char_type __c)
const = 0;
469 virtual const char_type*
470 do_toupper(char_type* __lo,
const char_type* __hi)
const = 0;
486 do_tolower(char_type __c)
const = 0;
502 virtual const char_type*
503 do_tolower(char_type* __lo,
const char_type* __hi)
const = 0;
522 do_widen(
char __c)
const = 0;
543 do_widen(
const char* __lo,
const char* __hi, char_type* __to)
const = 0;
564 do_narrow(char_type __c,
char __dfault)
const = 0;
588 virtual const char_type*
589 do_narrow(
const char_type* __lo,
const char_type* __hi,
590 char __dfault,
char* __to)
const = 0;
611 template<
typename _CharT>
617 typedef typename __ctype_abstract_base<_CharT>::mask mask;
630 do_is(mask __m, char_type __c)
const;
632 virtual const char_type*
633 do_is(
const char_type* __lo,
const char_type* __hi, mask* __vec)
const;
635 virtual const char_type*
636 do_scan_is(mask __m,
const char_type* __lo,
const char_type* __hi)
const;
638 virtual const char_type*
639 do_scan_not(mask __m,
const char_type* __lo,
640 const char_type* __hi)
const;
643 do_toupper(char_type __c)
const;
645 virtual const char_type*
646 do_toupper(char_type* __lo,
const char_type* __hi)
const;
649 do_tolower(char_type __c)
const;
651 virtual const char_type*
652 do_tolower(char_type* __lo,
const char_type* __hi)
const;
655 do_widen(
char __c)
const;
658 do_widen(
const char* __lo,
const char* __hi, char_type* __dest)
const;
661 do_narrow(char_type,
char __dfault)
const;
663 virtual const char_type*
664 do_narrow(
const char_type* __lo,
const char_type* __hi,
665 char __dfault,
char* __to)
const;
668 template<
typename _CharT>
690 __c_locale _M_c_locale_ctype;
692 __to_type _M_toupper;
693 __to_type _M_tolower;
694 const mask* _M_table;
695 mutable char _M_widen_ok;
696 mutable char _M_widen[1 +
static_cast<unsigned char>(-1)];
697 mutable char _M_narrow[1 +
static_cast<unsigned char>(-1)];
698 mutable char _M_narrow_ok;
705 static const size_t table_size = 1 +
static_cast<unsigned char>(-1);
718 ctype(
const mask* __table = 0,
bool __del =
false,
size_t __refs = 0);
731 ctype(__c_locale __cloc,
const mask* __table = 0,
bool __del =
false,
744 is(mask __m,
char __c)
const;
759 is(
const char* __lo,
const char* __hi, mask* __vec)
const;
773 scan_is(mask __m,
const char* __lo,
const char* __hi)
const;
787 scan_not(mask __m,
const char* __lo,
const char* __hi)
const;
803 {
return this->do_toupper(__c); }
819 toupper(char_type *__lo,
const char_type* __hi)
const 820 {
return this->do_toupper(__lo, __hi); }
836 {
return this->do_tolower(__c); }
852 tolower(char_type* __lo,
const char_type* __hi)
const 853 {
return this->do_tolower(__lo, __hi); }
875 return _M_widen[
static_cast<unsigned char>(__c)];
876 this->_M_widen_init();
877 return this->do_widen(__c);
899 widen(
const char* __lo,
const char* __hi, char_type* __to)
const 901 if (_M_widen_ok == 1)
903 if (__builtin_expect(__hi != __lo,
true))
904 __builtin_memcpy(__to, __lo, __hi - __lo);
909 return this->do_widen(__lo, __hi, __to);
931 narrow(char_type __c,
char __dfault)
const 933 if (_M_narrow[static_cast<unsigned char>(__c)])
934 return _M_narrow[
static_cast<unsigned char>(__c)];
935 const char __t = do_narrow(__c, __dfault);
937 _M_narrow[
static_cast<unsigned char>(__c)] = __t;
964 narrow(
const char_type* __lo,
const char_type* __hi,
965 char __dfault,
char* __to)
const 967 if (__builtin_expect(_M_narrow_ok == 1,
true))
969 if (__builtin_expect(__hi != __lo,
true))
970 __builtin_memcpy(__to, __lo, __hi - __lo);
975 return this->do_narrow(__lo, __hi, __dfault, __to);
988 classic_table()
throw();
1014 do_toupper(char_type __c)
const;
1030 virtual const char_type*
1031 do_toupper(char_type* __lo,
const char_type* __hi)
const;
1047 do_tolower(char_type __c)
const;
1063 virtual const char_type*
1064 do_tolower(char_type* __lo,
const char_type* __hi)
const;
1107 do_widen(
const char* __lo,
const char* __hi, char_type* __to)
const 1109 if (__builtin_expect(__hi != __lo,
true))
1110 __builtin_memcpy(__to, __lo, __hi - __lo);
1134 do_narrow(char_type __c,
char __dfault __attribute__((__unused__)))
const 1159 virtual const char_type*
1161 char __dfault __attribute__((__unused__)),
char* __to)
const 1163 if (__builtin_expect(__hi != __lo,
true))
1164 __builtin_memcpy(__to, __lo, __hi - __lo);
1169 void _M_narrow_init()
const;
1170 void _M_widen_init()
const;
1173 #ifdef _GLIBCXX_USE_WCHAR_T 1192 typedef wctype_t __wmask_type;
1195 __c_locale _M_c_locale_ctype;
1199 char _M_narrow[128];
1200 wint_t _M_widen[1 +
static_cast<unsigned char>(-1)];
1204 __wmask_type _M_wmask[16];
1219 ctype(
size_t __refs = 0);
1230 ctype(__c_locale __cloc,
size_t __refs = 0);
1234 _M_convert_to_wmask(
const mask __m)
const throw();
1254 do_is(mask __m, char_type __c)
const;
1272 virtual const char_type*
1273 do_is(
const char_type* __lo,
const char_type* __hi, mask* __vec)
const;
1290 virtual const char_type*
1291 do_scan_is(mask __m,
const char_type* __lo,
const char_type* __hi)
const;
1308 virtual const char_type*
1309 do_scan_not(mask __m,
const char_type* __lo,
1310 const char_type* __hi)
const;
1326 do_toupper(char_type __c)
const;
1342 virtual const char_type*
1343 do_toupper(char_type* __lo,
const char_type* __hi)
const;
1359 do_tolower(char_type __c)
const;
1375 virtual const char_type*
1376 do_tolower(char_type* __lo,
const char_type* __hi)
const;
1396 do_widen(
char __c)
const;
1418 do_widen(
const char* __lo,
const char* __hi, char_type* __to)
const;
1441 do_narrow(char_type __c,
char __dfault)
const;
1466 virtual const char_type*
1467 do_narrow(
const char_type* __lo,
const char_type* __hi,
1468 char __dfault,
char* __to)
const;
1472 _M_initialize_ctype() throw();
1474 #endif //_GLIBCXX_USE_WCHAR_T 1477 template<
typename _CharT>
1481 typedef typename ctype<_CharT>::mask mask;
1486 #if __cplusplus >= 201103L 1505 #if __cplusplus >= 201103L 1515 #ifdef _GLIBCXX_USE_WCHAR_T 1523 #if __cplusplus >= 201103L 1534 _GLIBCXX_END_NAMESPACE_VERSION
1540 namespace std _GLIBCXX_VISIBILITY(default)
1542 _GLIBCXX_BEGIN_NAMESPACE_VERSION
1557 _S_odigits_end = _S_odigits + 16,
1558 _S_oudigits = _S_odigits_end,
1559 _S_oudigits_end = _S_oudigits + 16,
1560 _S_oe = _S_odigits + 14,
1561 _S_oE = _S_oudigits + 14,
1562 _S_oend = _S_oudigits_end
1570 static const char* _S_atoms_out;
1574 static const char* _S_atoms_in;
1583 _S_ie = _S_izero + 14,
1584 _S_iE = _S_izero + 20,
1591 _S_format_float(
const ios_base& __io,
char* __fptr,
char __mod)
throw();
1594 template<
typename _CharT>
1597 const char* _M_grouping;
1598 size_t _M_grouping_size;
1599 bool _M_use_grouping;
1600 const _CharT* _M_truename;
1601 size_t _M_truename_size;
1602 const _CharT* _M_falsename;
1603 size_t _M_falsename_size;
1604 _CharT _M_decimal_point;
1605 _CharT _M_thousands_sep;
1611 _CharT _M_atoms_out[__num_base::_S_oend];
1617 _CharT _M_atoms_in[__num_base::_S_iend];
1621 __numpunct_cache(
size_t __refs = 0)
1622 : facet(__refs), _M_grouping(0), _M_grouping_size(0),
1623 _M_use_grouping(
false),
1624 _M_truename(0), _M_truename_size(0), _M_falsename(0),
1625 _M_falsename_size(0), _M_decimal_point(_CharT()),
1626 _M_thousands_sep(_CharT()), _M_allocated(
false)
1629 ~__numpunct_cache();
1632 _M_cache(
const locale& __loc);
1636 operator=(
const __numpunct_cache&);
1639 __numpunct_cache(
const __numpunct_cache&);
1642 template<
typename _CharT>
1643 __numpunct_cache<_CharT>::~__numpunct_cache()
1647 delete [] _M_grouping;
1648 delete [] _M_truename;
1649 delete [] _M_falsename;
1653 _GLIBCXX_BEGIN_NAMESPACE_CXX11
1669 template<
typename _CharT>
1679 typedef __numpunct_cache<_CharT> __cache_type;
1682 __cache_type* _M_data;
1695 : facet(__refs), _M_data(0)
1696 { _M_initialize_numpunct(); }
1709 : facet(__refs), _M_data(__cache)
1710 { _M_initialize_numpunct(); }
1723 : facet(__refs), _M_data(0)
1724 { _M_initialize_numpunct(__cloc); }
1737 {
return this->do_decimal_point(); }
1750 {
return this->do_thousands_sep(); }
1781 {
return this->do_grouping(); }
1794 {
return this->do_truename(); }
1807 {
return this->do_falsename(); }
1824 {
return _M_data->_M_decimal_point; }
1836 {
return _M_data->_M_thousands_sep; }
1849 {
return _M_data->_M_grouping; }
1862 {
return _M_data->_M_truename; }
1875 {
return _M_data->_M_falsename; }
1879 _M_initialize_numpunct(__c_locale __cloc = 0);
1882 template<
typename _CharT>
1892 #ifdef _GLIBCXX_USE_WCHAR_T 1902 template<
typename _CharT>
1906 typedef _CharT char_type;
1913 if (__builtin_strcmp(__s,
"C") != 0
1914 && __builtin_strcmp(__s,
"POSIX") != 0)
1917 this->_S_create_c_locale(__tmp, __s);
1918 this->_M_initialize_numpunct(__tmp);
1919 this->_S_destroy_c_locale(__tmp);
1923 #if __cplusplus >= 201103L 1934 _GLIBCXX_END_NAMESPACE_CXX11
1936 _GLIBCXX_BEGIN_NAMESPACE_LDBL
1951 template<
typename _CharT,
typename _InIter>
2000 ios_base::iostate& __err,
bool& __v)
const 2001 {
return this->do_get(__in, __end, __io, __err, __v); }
2037 ios_base::iostate& __err,
long& __v)
const 2038 {
return this->do_get(__in, __end, __io, __err, __v); }
2042 ios_base::iostate& __err,
unsigned short& __v)
const 2043 {
return this->do_get(__in, __end, __io, __err, __v); }
2047 ios_base::iostate& __err,
unsigned int& __v)
const 2048 {
return this->do_get(__in, __end, __io, __err, __v); }
2052 ios_base::iostate& __err,
unsigned long& __v)
const 2053 {
return this->do_get(__in, __end, __io, __err, __v); }
2055 #ifdef _GLIBCXX_USE_LONG_LONG 2058 ios_base::iostate& __err,
long long& __v)
const 2059 {
return this->do_get(__in, __end, __io, __err, __v); }
2063 ios_base::iostate& __err,
unsigned long long& __v)
const 2064 {
return this->do_get(__in, __end, __io, __err, __v); }
2097 ios_base::iostate& __err,
float& __v)
const 2098 {
return this->do_get(__in, __end, __io, __err, __v); }
2102 ios_base::iostate& __err,
double& __v)
const 2103 {
return this->do_get(__in, __end, __io, __err, __v); }
2107 ios_base::iostate& __err,
long double& __v)
const 2108 {
return this->do_get(__in, __end, __io, __err, __v); }
2140 ios_base::iostate& __err,
void*& __v)
const 2141 {
return this->do_get(__in, __end, __io, __err, __v); }
2147 _GLIBCXX_DEFAULT_ABI_TAG
2149 _M_extract_float(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2152 template<
typename _ValueT>
2153 _GLIBCXX_DEFAULT_ABI_TAG
2155 _M_extract_int(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2158 template<
typename _CharT2>
2159 typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
int>::__type
2160 _M_find(
const _CharT2*,
size_t __len, _CharT2 __c)
const 2165 if (__c >= _CharT2(
'0') && __c < _CharT2(_CharT2(
'0') + __len))
2166 __ret = __c - _CharT2(
'0');
2170 if (__c >= _CharT2(
'0') && __c <= _CharT2(
'9'))
2171 __ret = __c - _CharT2(
'0');
2172 else if (__c >= _CharT2(
'a') && __c <= _CharT2(
'f'))
2173 __ret = 10 + (__c - _CharT2(
'a'));
2174 else if (__c >= _CharT2(
'A') && __c <= _CharT2(
'F'))
2175 __ret = 10 + (__c - _CharT2(
'A'));
2180 template<
typename _CharT2>
2181 typename __gnu_cxx::__enable_if<!__is_char<_CharT2>::__value,
2183 _M_find(
const _CharT2* __zero,
size_t __len, _CharT2 __c)
const 2189 __ret = __q - __zero;
2212 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
bool&)
const;
2216 ios_base::iostate& __err,
long& __v)
const 2217 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2221 ios_base::iostate& __err,
unsigned short& __v)
const 2222 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2226 ios_base::iostate& __err,
unsigned int& __v)
const 2227 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2231 ios_base::iostate& __err,
unsigned long& __v)
const 2232 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2234 #ifdef _GLIBCXX_USE_LONG_LONG 2237 ios_base::iostate& __err,
long long& __v)
const 2238 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2242 ios_base::iostate& __err,
unsigned long long& __v)
const 2243 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2247 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
float&)
const;
2250 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2254 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ 2256 __do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2260 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2261 long double&)
const;
2265 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
void*&)
const;
2268 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ 2270 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2271 long double&)
const;
2276 template<
typename _CharT,
typename _InIter>
2292 template<
typename _CharT,
typename _OutIter>
2333 {
return this->do_put(__s, __io, __fill, __v); }
2375 {
return this->do_put(__s, __io, __fill, __v); }
2379 unsigned long __v)
const 2380 {
return this->do_put(__s, __io, __fill, __v); }
2382 #ifdef _GLIBCXX_USE_LONG_LONG 2384 put(iter_type __s,
ios_base& __io, char_type __fill,
long long __v)
const 2385 {
return this->do_put(__s, __io, __fill, __v); }
2389 unsigned long long __v)
const 2390 {
return this->do_put(__s, __io, __fill, __v); }
2437 put(iter_type __s,
ios_base& __io, char_type __fill,
double __v)
const 2438 {
return this->do_put(__s, __io, __fill, __v); }
2442 long double __v)
const 2443 {
return this->do_put(__s, __io, __fill, __v); }
2463 const void* __v)
const 2464 {
return this->do_put(__s, __io, __fill, __v); }
2467 template<
typename _ValueT>
2469 _M_insert_float(iter_type,
ios_base& __io, char_type __fill,
2470 char __mod, _ValueT __v)
const;
2473 _M_group_float(
const char* __grouping,
size_t __grouping_size,
2474 char_type __sep,
const char_type* __p, char_type* __new,
2475 char_type* __cs,
int& __len)
const;
2477 template<
typename _ValueT>
2479 _M_insert_int(iter_type,
ios_base& __io, char_type __fill,
2483 _M_group_int(
const char* __grouping,
size_t __grouping_size,
2484 char_type __sep,
ios_base& __io, char_type* __new,
2485 char_type* __cs,
int& __len)
const;
2489 char_type* __new,
const char_type* __cs,
int& __len)
const;
2510 do_put(iter_type __s,
ios_base& __io, char_type __fill,
bool __v)
const;
2514 {
return _M_insert_int(__s, __io, __fill, __v); }
2518 unsigned long __v)
const 2519 {
return _M_insert_int(__s, __io, __fill, __v); }
2521 #ifdef _GLIBCXX_USE_LONG_LONG 2524 long long __v)
const 2525 {
return _M_insert_int(__s, __io, __fill, __v); }
2529 unsigned long long __v)
const 2530 {
return _M_insert_int(__s, __io, __fill, __v); }
2534 do_put(iter_type,
ios_base&, char_type,
double)
const;
2537 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ 2539 __do_put(iter_type,
ios_base&, char_type,
double)
const;
2542 do_put(iter_type,
ios_base&, char_type,
long double)
const;
2546 do_put(iter_type,
ios_base&, char_type,
const void*)
const;
2549 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ 2551 do_put(iter_type,
ios_base&, char_type,
long double)
const;
2556 template <
typename _CharT,
typename _OutIter>
2559 _GLIBCXX_END_NAMESPACE_LDBL
2567 template<
typename _CharT>
2570 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::space, __c); }
2573 template<
typename _CharT>
2576 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::print, __c); }
2579 template<
typename _CharT>
2582 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::cntrl, __c); }
2585 template<
typename _CharT>
2588 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::upper, __c); }
2591 template<
typename _CharT>
2594 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::lower, __c); }
2597 template<
typename _CharT>
2600 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alpha, __c); }
2603 template<
typename _CharT>
2606 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::digit, __c); }
2609 template<
typename _CharT>
2612 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::punct, __c); }
2615 template<
typename _CharT>
2618 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::xdigit, __c); }
2621 template<
typename _CharT>
2624 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alnum, __c); }
2627 template<
typename _CharT>
2630 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::graph, __c); }
2632 #if __cplusplus >= 201103L 2634 template<
typename _CharT>
2637 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::blank, __c); }
2641 template<
typename _CharT>
2644 {
return use_facet<ctype<_CharT> >(__loc).
toupper(__c); }
2647 template<
typename _CharT>
2650 {
return use_facet<ctype<_CharT> >(__loc).
tolower(__c); }
2652 _GLIBCXX_END_NAMESPACE_VERSION
static locale::id id
The facet id for ctype<char_type>
numpunct(size_t __refs=0)
Numpunct constructor.
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, unsigned long long &__v) const
Numeric parsing.
char_type decimal_point() const
Return decimal point character.
Localization functionality base class.The facet class is the base class for a localization feature...
wchar_t char_type
Typedef for the template parameter wchar_t.
char_type tolower(char_type __c) const
Convert to lowercase.
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, unsigned long __v) const
Numeric formatting.
virtual char_type do_decimal_point() const
Return decimal point character.
Common base for ctype facet.
const char * widen(const char *__lo, const char *__hi, char_type *__to) const
Widen char array.
bool isspace(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::space, __c).
static locale::id id
The facet id for ctype<wchar_t>
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, unsigned long long __v) const
Numeric formatting.
bool iscntrl(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::cntrl, __c).
iter_type put(iter_type __s, ios_base &__io, char_type __fill, unsigned long __v) const
Numeric formatting.
Primary class template num_get.This facet encapsulates the code to parse and return a number from a s...
The base of the I/O class hierarchy.This class defines everything that can be defined about I/O that ...
bool isgraph(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::graph, __c).
const char_type * toupper(char_type *__lo, const char_type *__hi) const
Convert array to uppercase.
numpunct(__c_locale __cloc, size_t __refs=0)
Internal constructor. Not for general use.
bool islower(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::lower, __c).
iter_type put(iter_type __s, ios_base &__io, char_type __fill, long __v) const
Numeric formatting.
bool is(mask __m, char_type __c) const
Test char_type classification.
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, unsigned int &__v) const
Numeric parsing.
virtual string_type do_falsename() const
Return string representation of bool false.
string grouping() const
Return grouping specification.
char_type toupper(char_type __c) const
Convert to uppercase.
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, unsigned short &__v) const
Numeric parsing.
static locale::id id
Numpunct facet id.
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, long long &__v) const
Numeric parsing.
static locale::id id
Numpunct facet id.
static locale::id id
The facet id for ctype<char>
const char_type * narrow(const char_type *__lo, const char_type *__hi, char __dfault, char *__to) const
Narrow char array.
num_put(size_t __refs=0)
Constructor performs initialization.
numpunct(__cache_type *__cache, size_t __refs=0)
Internal constructor. Not for general use.
class numpunct_byname [22.2.3.2].
bool isdigit(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::digit, __c).
char_type widen(char __c) const
Widen char to char_type.
_CharT char_type
Public typedefs.
_InIter iter_type
Public typedefs.
const char_type * scan_not(mask __m, const char_type *__lo, const char_type *__hi) const
Find char_type not matching a mask.
const char_type * tolower(char_type *__lo, const char_type *__hi) const
Convert array to lowercase.
char_type thousands_sep() const
Return thousands separator character.
char_type tolower(char_type __c) const
Convert to lowercase.
virtual char_type do_thousands_sep() const
Return thousands separator character.
_CharT tolower(_CharT __c, const locale &__loc)
Convenience interface to ctype.tolower(__c).
static locale::id id
Numpunct facet id.
basic_string< _CharT > string_type
Public typedefs.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, double __v) const
Numeric formatting.
_CharT char_type
Typedef for the template parameter.
ISO C++ entities toplevel namespace is std.
const char_type * is(const char_type *__lo, const char_type *__hi, mask *__vec) const
Return a mask array.
virtual char do_narrow(char_type __c, char __dfault __attribute__((__unused__))) const
Narrow char.
_OutIter iter_type
Public typedefs.
Basis for explicit traits specializations.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, bool __v) const
Numeric formatting.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, long long __v) const
Numeric formatting.
virtual ~num_get()
Destructor.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, long double __v) const
Numeric formatting.
const _CharT * c_str() const noexcept
Return const pointer to null-terminated contents.
char_type toupper(char_type __c) const
Convert to uppercase.
char narrow(char_type __c, char __dfault) const
Narrow char.
bool isblank(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::blank, __c).
bool isalnum(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::alnum, __c).
_CharT char_type
Public typedefs.
const mask * table() const
Returns a pointer to the mask table provided to the constructor, or the default from classic_table() ...
virtual ~num_put()
Destructor.
const char_type * narrow(const char_type *__lo, const char_type *__hi, char __dfault, char *__to) const
Narrow array to char array.
bool isprint(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::print, __c).
virtual const char * do_widen(const char *__lo, const char *__hi, char_type *__to) const
Widen char array.
char narrow(char_type __c, char __dfault) const
Narrow char_type to char.
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, unsigned long &__v) const
Numeric parsing.
char char_type
Typedef for the template parameter char.
bool isupper(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::upper, __c).
const char_type * toupper(char_type *__lo, const char_type *__hi) const
Convert array to uppercase.
_Ios_Iostate iostate
This is a bitmask type.
bool ispunct(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::punct, __c).
const char_type * scan_is(mask __m, const char_type *__lo, const char_type *__hi) const
Find char_type matching a mask.
string_type falsename() const
Return string representation of bool false.
bool isalpha(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::alpha, __c).
virtual const char_type * do_narrow(const char_type *__lo, const char_type *__hi, char __dfault __attribute__((__unused__)), char *__to) const
Narrow char array to char array.
virtual string do_grouping() const
Return grouping specification.
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, long __v) const
Numeric formatting.
Container class for localization functionality.The locale class is first a class wrapper for C librar...
virtual string_type do_truename() const
Return string representation of bool true.
class ctype_byname [22.2.1.2].
const char * widen(const char *__lo, const char *__hi, char_type *__to) const
Widen array to char_type.
_CharT char_type
Public typedefs.
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, long long __v) const
Numeric formatting.
char_type widen(char __c) const
Widen char.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, const void *__v) const
Numeric formatting.
const char_type * tolower(char_type *__lo, const char_type *__hi) const
Convert array to lowercase.
Primary class template numpunct.This facet stores several pieces of information related to printing a...
Facet ID class.The ID class provides facets with an index used to identify them. Every facet class mu...
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, long &__v) const
Numeric parsing.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, unsigned long long __v) const
Numeric formatting.
bool isxdigit(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::xdigit, __c).
string_type truename() const
Return string representation of bool true.
num_get(size_t __refs=0)
Constructor performs initialization.
_CharT toupper(_CharT __c, const locale &__loc)
Convenience interface to ctype.toupper(__c).
Primary class template num_put.This facet encapsulates the code to convert a number to a string...
virtual char_type do_widen(char __c) const
Widen char.
Primary class template ctype facet.This template class defines classification and conversion function...
virtual ~numpunct()
Destructor.