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 #define _GLIBCXX_NUM_UNICODE_FACETS 2 67 template<
typename _Tp>
70 const __c_locale&)
throw();
76 const __c_locale&)
throw();
81 const __c_locale&)
throw();
86 const __c_locale&)
throw();
90 template<
typename _CharT,
typename _Traits>
94 _S_pad(ios_base& __io, _CharT __fill, _CharT* __news,
103 template<
typename _CharT>
105 __add_grouping(_CharT* __s, _CharT __sep,
106 const char* __gbeg,
size_t __gsize,
107 const _CharT* __first,
const _CharT* __last);
112 template<
typename _CharT>
114 ostreambuf_iterator<_CharT>
115 __write(ostreambuf_iterator<_CharT> __s,
const _CharT* __ws,
int __len)
117 __s._M_put(__ws, __len);
122 template<
typename _CharT,
typename _OutIter>
125 __write(_OutIter __s,
const _CharT* __ws,
int __len)
127 for (
int __j = 0; __j < __len; __j++, ++__s)
145 template<
typename _CharT>
165 is(mask __m, char_type __c)
const 166 {
return this->do_is(__m, __c); }
182 is(
const char_type *__lo,
const char_type *__hi, mask *__vec)
const 183 {
return this->do_is(__lo, __hi, __vec); }
198 scan_is(mask __m,
const char_type* __lo,
const char_type* __hi)
const 199 {
return this->do_scan_is(__m, __lo, __hi); }
214 scan_not(mask __m,
const char_type* __lo,
const char_type* __hi)
const 215 {
return this->do_scan_not(__m, __lo, __hi); }
229 {
return this->do_toupper(__c); }
243 toupper(char_type *__lo,
const char_type* __hi)
const 244 {
return this->do_toupper(__lo, __hi); }
258 {
return this->do_tolower(__c); }
272 tolower(char_type* __lo,
const char_type* __hi)
const 273 {
return this->do_tolower(__lo, __hi); }
290 {
return this->do_widen(__c); }
308 widen(
const char* __lo,
const char* __hi, char_type* __to)
const 309 {
return this->do_widen(__lo, __hi, __to); }
327 narrow(char_type __c,
char __dfault)
const 328 {
return this->do_narrow(__c, __dfault); }
349 narrow(
const char_type* __lo,
const char_type* __hi,
350 char __dfault,
char* __to)
const 351 {
return this->do_narrow(__lo, __hi, __dfault, __to); }
374 do_is(mask __m, char_type __c)
const = 0;
392 virtual const char_type*
393 do_is(
const char_type* __lo,
const char_type* __hi,
394 mask* __vec)
const = 0;
411 virtual const char_type*
412 do_scan_is(mask __m,
const char_type* __lo,
413 const char_type* __hi)
const = 0;
430 virtual const char_type*
431 do_scan_not(mask __m,
const char_type* __lo,
432 const char_type* __hi)
const = 0;
449 do_toupper(char_type __c)
const = 0;
465 virtual const char_type*
466 do_toupper(char_type* __lo,
const char_type* __hi)
const = 0;
482 do_tolower(char_type __c)
const = 0;
498 virtual const char_type*
499 do_tolower(char_type* __lo,
const char_type* __hi)
const = 0;
518 do_widen(
char __c)
const = 0;
539 do_widen(
const char* __lo,
const char* __hi, char_type* __to)
const = 0;
560 do_narrow(char_type __c,
char __dfault)
const = 0;
584 virtual const char_type*
585 do_narrow(
const char_type* __lo,
const char_type* __hi,
586 char __dfault,
char* __to)
const = 0;
607 template<
typename _CharT>
613 typedef typename __ctype_abstract_base<_CharT>::mask mask;
626 do_is(mask __m, char_type __c)
const;
628 virtual const char_type*
629 do_is(
const char_type* __lo,
const char_type* __hi, mask* __vec)
const;
631 virtual const char_type*
632 do_scan_is(mask __m,
const char_type* __lo,
const char_type* __hi)
const;
634 virtual const char_type*
635 do_scan_not(mask __m,
const char_type* __lo,
636 const char_type* __hi)
const;
639 do_toupper(char_type __c)
const;
641 virtual const char_type*
642 do_toupper(char_type* __lo,
const char_type* __hi)
const;
645 do_tolower(char_type __c)
const;
647 virtual const char_type*
648 do_tolower(char_type* __lo,
const char_type* __hi)
const;
651 do_widen(
char __c)
const;
654 do_widen(
const char* __lo,
const char* __hi, char_type* __dest)
const;
657 do_narrow(char_type,
char __dfault)
const;
659 virtual const char_type*
660 do_narrow(
const char_type* __lo,
const char_type* __hi,
661 char __dfault,
char* __to)
const;
664 template<
typename _CharT>
686 __c_locale _M_c_locale_ctype;
688 __to_type _M_toupper;
689 __to_type _M_tolower;
690 const mask* _M_table;
691 mutable char _M_widen_ok;
692 mutable char _M_widen[1 +
static_cast<unsigned char>(-1)];
693 mutable char _M_narrow[1 +
static_cast<unsigned char>(-1)];
694 mutable char _M_narrow_ok;
701 static const size_t table_size = 1 +
static_cast<unsigned char>(-1);
714 ctype(
const mask* __table = 0,
bool __del =
false,
size_t __refs = 0);
727 ctype(__c_locale __cloc,
const mask* __table = 0,
bool __del =
false,
740 is(mask __m,
char __c)
const;
755 is(
const char* __lo,
const char* __hi, mask* __vec)
const;
769 scan_is(mask __m,
const char* __lo,
const char* __hi)
const;
783 scan_not(mask __m,
const char* __lo,
const char* __hi)
const;
799 {
return this->do_toupper(__c); }
815 toupper(char_type *__lo,
const char_type* __hi)
const 816 {
return this->do_toupper(__lo, __hi); }
832 {
return this->do_tolower(__c); }
848 tolower(char_type* __lo,
const char_type* __hi)
const 849 {
return this->do_tolower(__lo, __hi); }
871 return _M_widen[
static_cast<unsigned char>(__c)];
872 this->_M_widen_init();
873 return this->do_widen(__c);
895 widen(
const char* __lo,
const char* __hi, char_type* __to)
const 897 if (_M_widen_ok == 1)
899 __builtin_memcpy(__to, __lo, __hi - __lo);
904 return this->do_widen(__lo, __hi, __to);
926 narrow(char_type __c,
char __dfault)
const 928 if (_M_narrow[static_cast<unsigned char>(__c)])
929 return _M_narrow[
static_cast<unsigned char>(__c)];
930 const char __t = do_narrow(__c, __dfault);
932 _M_narrow[
static_cast<unsigned char>(__c)] = __t;
959 narrow(
const char_type* __lo,
const char_type* __hi,
960 char __dfault,
char* __to)
const 962 if (__builtin_expect(_M_narrow_ok == 1,
true))
964 __builtin_memcpy(__to, __lo, __hi - __lo);
969 return this->do_narrow(__lo, __hi, __dfault, __to);
982 classic_table()
throw();
1008 do_toupper(char_type __c)
const;
1024 virtual const char_type*
1025 do_toupper(char_type* __lo,
const char_type* __hi)
const;
1041 do_tolower(char_type __c)
const;
1057 virtual const char_type*
1058 do_tolower(char_type* __lo,
const char_type* __hi)
const;
1101 do_widen(
const char* __lo,
const char* __hi, char_type* __to)
const 1103 __builtin_memcpy(__to, __lo, __hi - __lo);
1127 do_narrow(char_type __c,
char __dfault __attribute__((__unused__)))
const 1152 virtual const char_type*
1154 char __dfault __attribute__((__unused__)),
char* __to)
const 1156 __builtin_memcpy(__to, __lo, __hi - __lo);
1161 void _M_narrow_init()
const;
1162 void _M_widen_init()
const;
1165 #ifdef _GLIBCXX_USE_WCHAR_T 1184 typedef wctype_t __wmask_type;
1187 __c_locale _M_c_locale_ctype;
1191 char _M_narrow[128];
1192 wint_t _M_widen[1 +
static_cast<unsigned char>(-1)];
1196 __wmask_type _M_wmask[16];
1211 ctype(
size_t __refs = 0);
1222 ctype(__c_locale __cloc,
size_t __refs = 0);
1226 _M_convert_to_wmask(
const mask __m)
const throw();
1246 do_is(mask __m, char_type __c)
const;
1264 virtual const char_type*
1265 do_is(
const char_type* __lo,
const char_type* __hi, mask* __vec)
const;
1282 virtual const char_type*
1283 do_scan_is(mask __m,
const char_type* __lo,
const char_type* __hi)
const;
1300 virtual const char_type*
1301 do_scan_not(mask __m,
const char_type* __lo,
1302 const char_type* __hi)
const;
1318 do_toupper(char_type __c)
const;
1334 virtual const char_type*
1335 do_toupper(char_type* __lo,
const char_type* __hi)
const;
1351 do_tolower(char_type __c)
const;
1367 virtual const char_type*
1368 do_tolower(char_type* __lo,
const char_type* __hi)
const;
1388 do_widen(
char __c)
const;
1410 do_widen(
const char* __lo,
const char* __hi, char_type* __to)
const;
1433 do_narrow(char_type __c,
char __dfault)
const;
1458 virtual const char_type*
1459 do_narrow(
const char_type* __lo,
const char_type* __hi,
1460 char __dfault,
char* __to)
const;
1464 _M_initialize_ctype() throw();
1466 #endif //_GLIBCXX_USE_WCHAR_T 1469 template<
typename _CharT>
1473 typedef typename ctype<_CharT>::mask mask;
1478 #if __cplusplus >= 201103L 1497 #if __cplusplus >= 201103L 1507 #ifdef _GLIBCXX_USE_WCHAR_T 1515 #if __cplusplus >= 201103L 1526 _GLIBCXX_END_NAMESPACE_VERSION
1532 namespace std _GLIBCXX_VISIBILITY(default)
1534 _GLIBCXX_BEGIN_NAMESPACE_VERSION
1549 _S_odigits_end = _S_odigits + 16,
1550 _S_oudigits = _S_odigits_end,
1551 _S_oudigits_end = _S_oudigits + 16,
1552 _S_oe = _S_odigits + 14,
1553 _S_oE = _S_oudigits + 14,
1554 _S_oend = _S_oudigits_end
1562 static const char* _S_atoms_out;
1566 static const char* _S_atoms_in;
1575 _S_ie = _S_izero + 14,
1576 _S_iE = _S_izero + 20,
1583 _S_format_float(
const ios_base& __io,
char* __fptr,
char __mod)
throw();
1586 template<
typename _CharT>
1589 const char* _M_grouping;
1590 size_t _M_grouping_size;
1591 bool _M_use_grouping;
1592 const _CharT* _M_truename;
1593 size_t _M_truename_size;
1594 const _CharT* _M_falsename;
1595 size_t _M_falsename_size;
1596 _CharT _M_decimal_point;
1597 _CharT _M_thousands_sep;
1603 _CharT _M_atoms_out[__num_base::_S_oend];
1609 _CharT _M_atoms_in[__num_base::_S_iend];
1613 __numpunct_cache(
size_t __refs = 0)
1614 : facet(__refs), _M_grouping(0), _M_grouping_size(0),
1615 _M_use_grouping(
false),
1616 _M_truename(0), _M_truename_size(0), _M_falsename(0),
1617 _M_falsename_size(0), _M_decimal_point(_CharT()),
1618 _M_thousands_sep(_CharT()), _M_allocated(
false)
1621 ~__numpunct_cache();
1624 _M_cache(
const locale& __loc);
1628 operator=(
const __numpunct_cache&);
1631 __numpunct_cache(
const __numpunct_cache&);
1634 template<
typename _CharT>
1635 __numpunct_cache<_CharT>::~__numpunct_cache()
1639 delete [] _M_grouping;
1640 delete [] _M_truename;
1641 delete [] _M_falsename;
1645 _GLIBCXX_BEGIN_NAMESPACE_CXX11
1661 template<
typename _CharT>
1671 typedef __numpunct_cache<_CharT> __cache_type;
1674 __cache_type* _M_data;
1687 : facet(__refs), _M_data(0)
1688 { _M_initialize_numpunct(); }
1701 : facet(__refs), _M_data(__cache)
1702 { _M_initialize_numpunct(); }
1715 : facet(__refs), _M_data(0)
1716 { _M_initialize_numpunct(__cloc); }
1729 {
return this->do_decimal_point(); }
1742 {
return this->do_thousands_sep(); }
1773 {
return this->do_grouping(); }
1786 {
return this->do_truename(); }
1799 {
return this->do_falsename(); }
1816 {
return _M_data->_M_decimal_point; }
1828 {
return _M_data->_M_thousands_sep; }
1841 {
return _M_data->_M_grouping; }
1854 {
return _M_data->_M_truename; }
1867 {
return _M_data->_M_falsename; }
1871 _M_initialize_numpunct(__c_locale __cloc = 0);
1874 template<
typename _CharT>
1884 #ifdef _GLIBCXX_USE_WCHAR_T 1894 template<
typename _CharT>
1898 typedef _CharT char_type;
1905 if (__builtin_strcmp(__s,
"C") != 0
1906 && __builtin_strcmp(__s,
"POSIX") != 0)
1909 this->_S_create_c_locale(__tmp, __s);
1910 this->_M_initialize_numpunct(__tmp);
1911 this->_S_destroy_c_locale(__tmp);
1915 #if __cplusplus >= 201103L 1926 _GLIBCXX_END_NAMESPACE_CXX11
1928 _GLIBCXX_BEGIN_NAMESPACE_LDBL
1943 template<
typename _CharT,
typename _InIter>
1992 ios_base::iostate& __err,
bool& __v)
const 1993 {
return this->do_get(__in, __end, __io, __err, __v); }
2029 ios_base::iostate& __err,
long& __v)
const 2030 {
return this->do_get(__in, __end, __io, __err, __v); }
2034 ios_base::iostate& __err,
unsigned short& __v)
const 2035 {
return this->do_get(__in, __end, __io, __err, __v); }
2039 ios_base::iostate& __err,
unsigned int& __v)
const 2040 {
return this->do_get(__in, __end, __io, __err, __v); }
2044 ios_base::iostate& __err,
unsigned long& __v)
const 2045 {
return this->do_get(__in, __end, __io, __err, __v); }
2047 #ifdef _GLIBCXX_USE_LONG_LONG 2050 ios_base::iostate& __err,
long long& __v)
const 2051 {
return this->do_get(__in, __end, __io, __err, __v); }
2055 ios_base::iostate& __err,
unsigned long long& __v)
const 2056 {
return this->do_get(__in, __end, __io, __err, __v); }
2089 ios_base::iostate& __err,
float& __v)
const 2090 {
return this->do_get(__in, __end, __io, __err, __v); }
2094 ios_base::iostate& __err,
double& __v)
const 2095 {
return this->do_get(__in, __end, __io, __err, __v); }
2099 ios_base::iostate& __err,
long double& __v)
const 2100 {
return this->do_get(__in, __end, __io, __err, __v); }
2132 ios_base::iostate& __err,
void*& __v)
const 2133 {
return this->do_get(__in, __end, __io, __err, __v); }
2139 _GLIBCXX_DEFAULT_ABI_TAG
2141 _M_extract_float(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2144 template<
typename _ValueT>
2145 _GLIBCXX_DEFAULT_ABI_TAG
2147 _M_extract_int(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2150 template<
typename _CharT2>
2151 typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
int>::__type
2152 _M_find(
const _CharT2*,
size_t __len, _CharT2 __c)
const 2157 if (__c >= _CharT2(
'0') && __c < _CharT2(_CharT2(
'0') + __len))
2158 __ret = __c - _CharT2(
'0');
2162 if (__c >= _CharT2(
'0') && __c <= _CharT2(
'9'))
2163 __ret = __c - _CharT2(
'0');
2164 else if (__c >= _CharT2(
'a') && __c <= _CharT2(
'f'))
2165 __ret = 10 + (__c - _CharT2(
'a'));
2166 else if (__c >= _CharT2(
'A') && __c <= _CharT2(
'F'))
2167 __ret = 10 + (__c - _CharT2(
'A'));
2172 template<
typename _CharT2>
2173 typename __gnu_cxx::__enable_if<!__is_char<_CharT2>::__value,
2175 _M_find(
const _CharT2* __zero,
size_t __len, _CharT2 __c)
const 2181 __ret = __q - __zero;
2204 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
bool&)
const;
2208 ios_base::iostate& __err,
long& __v)
const 2209 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2213 ios_base::iostate& __err,
unsigned short& __v)
const 2214 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2218 ios_base::iostate& __err,
unsigned int& __v)
const 2219 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2223 ios_base::iostate& __err,
unsigned long& __v)
const 2224 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2226 #ifdef _GLIBCXX_USE_LONG_LONG 2229 ios_base::iostate& __err,
long long& __v)
const 2230 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2234 ios_base::iostate& __err,
unsigned long long& __v)
const 2235 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2239 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
float&)
const;
2242 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2246 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ 2248 __do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2252 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2253 long double&)
const;
2257 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
void*&)
const;
2260 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ 2262 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2263 long double&)
const;
2268 template<
typename _CharT,
typename _InIter>
2284 template<
typename _CharT,
typename _OutIter>
2325 {
return this->do_put(__s, __io, __fill, __v); }
2367 {
return this->do_put(__s, __io, __fill, __v); }
2371 unsigned long __v)
const 2372 {
return this->do_put(__s, __io, __fill, __v); }
2374 #ifdef _GLIBCXX_USE_LONG_LONG 2376 put(iter_type __s,
ios_base& __io, char_type __fill,
long long __v)
const 2377 {
return this->do_put(__s, __io, __fill, __v); }
2381 unsigned long long __v)
const 2382 {
return this->do_put(__s, __io, __fill, __v); }
2429 put(iter_type __s,
ios_base& __io, char_type __fill,
double __v)
const 2430 {
return this->do_put(__s, __io, __fill, __v); }
2434 long double __v)
const 2435 {
return this->do_put(__s, __io, __fill, __v); }
2455 const void* __v)
const 2456 {
return this->do_put(__s, __io, __fill, __v); }
2459 template<
typename _ValueT>
2461 _M_insert_float(iter_type,
ios_base& __io, char_type __fill,
2462 char __mod, _ValueT __v)
const;
2465 _M_group_float(
const char* __grouping,
size_t __grouping_size,
2466 char_type __sep,
const char_type* __p, char_type* __new,
2467 char_type* __cs,
int& __len)
const;
2469 template<
typename _ValueT>
2471 _M_insert_int(iter_type,
ios_base& __io, char_type __fill,
2475 _M_group_int(
const char* __grouping,
size_t __grouping_size,
2476 char_type __sep,
ios_base& __io, char_type* __new,
2477 char_type* __cs,
int& __len)
const;
2481 char_type* __new,
const char_type* __cs,
int& __len)
const;
2502 do_put(iter_type __s,
ios_base& __io, char_type __fill,
bool __v)
const;
2506 {
return _M_insert_int(__s, __io, __fill, __v); }
2510 unsigned long __v)
const 2511 {
return _M_insert_int(__s, __io, __fill, __v); }
2513 #ifdef _GLIBCXX_USE_LONG_LONG 2516 long long __v)
const 2517 {
return _M_insert_int(__s, __io, __fill, __v); }
2521 unsigned long long __v)
const 2522 {
return _M_insert_int(__s, __io, __fill, __v); }
2526 do_put(iter_type,
ios_base&, char_type,
double)
const;
2529 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ 2531 __do_put(iter_type,
ios_base&, char_type,
double)
const;
2534 do_put(iter_type,
ios_base&, char_type,
long double)
const;
2538 do_put(iter_type,
ios_base&, char_type,
const void*)
const;
2541 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ 2543 do_put(iter_type,
ios_base&, char_type,
long double)
const;
2548 template <
typename _CharT,
typename _OutIter>
2551 _GLIBCXX_END_NAMESPACE_LDBL
2559 template<
typename _CharT>
2562 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::space, __c); }
2565 template<
typename _CharT>
2568 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::print, __c); }
2571 template<
typename _CharT>
2574 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::cntrl, __c); }
2577 template<
typename _CharT>
2580 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::upper, __c); }
2583 template<
typename _CharT>
2586 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::lower, __c); }
2589 template<
typename _CharT>
2592 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alpha, __c); }
2595 template<
typename _CharT>
2598 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::digit, __c); }
2601 template<
typename _CharT>
2604 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::punct, __c); }
2607 template<
typename _CharT>
2610 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::xdigit, __c); }
2613 template<
typename _CharT>
2616 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alnum, __c); }
2619 template<
typename _CharT>
2622 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::graph, __c); }
2624 #if __cplusplus >= 201103L 2626 template<
typename _CharT>
2629 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::blank, __c); }
2633 template<
typename _CharT>
2636 {
return use_facet<ctype<_CharT> >(__loc).
toupper(__c); }
2639 template<
typename _CharT>
2642 {
return use_facet<ctype<_CharT> >(__loc).
tolower(__c); }
2644 _GLIBCXX_END_NAMESPACE_VERSION
static locale::id id
Numpunct facet id.
char_type toupper(char_type __c) const
Convert to uppercase.
class numpunct_byname [22.2.3.2].
static locale::id id
The facet id for ctype<char>
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, unsigned long long __v) const
Numeric formatting.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, unsigned long __v) const
Numeric formatting.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, unsigned long long __v) const
Numeric formatting.
class ctype_byname [22.2.1.2].
_CharT tolower(_CharT __c, const locale &__loc)
Convenience interface to ctype.tolower(__c).
Facet ID class.The ID class provides facets with an index used to identify them. Every facet class mu...
num_get(size_t __refs=0)
Constructor performs initialization.
const char_type * toupper(char_type *__lo, const char_type *__hi) const
Convert array to uppercase.
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, long long &__v) const
Numeric parsing.
numpunct(size_t __refs=0)
Numpunct constructor.
char_type thousands_sep() const
Return thousands separator character.
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, long __v) const
Numeric formatting.
Primary class template num_put.This facet encapsulates the code to convert a number to a string...
const char * widen(const char *__lo, const char *__hi, char_type *__to) const
Widen char array.
Primary class template numpunct.This facet stores several pieces of information related to printing a...
_OutIter iter_type
Public typedefs.
_CharT char_type
Public typedefs.
const char_type * narrow(const char_type *__lo, const char_type *__hi, char __dfault, char *__to) const
Narrow char array.
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.
char narrow(char_type __c, char __dfault) const
Narrow char_type to char.
char char_type
Typedef for the template parameter char.
Localization functionality base class.The facet class is the base class for a localization feature...
virtual char_type do_thousands_sep() const
Return thousands separator character.
Basis for explicit traits specializations.
ISO C++ entities toplevel namespace is std.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, long __v) const
Numeric formatting.
string_type falsename() const
Return string representation of bool false.
static locale::id id
The facet id for ctype<char_type>
char_type toupper(char_type __c) const
Convert to uppercase.
numpunct(__c_locale __cloc, size_t __refs=0)
Internal constructor. Not for general use.
bool isspace(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::space, __c).
virtual string do_grouping() const
Return grouping specification.
bool isupper(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::upper, __c).
bool islower(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::lower, __c).
basic_string< _CharT > string_type
Public typedefs.
const char_type * is(const char_type *__lo, const char_type *__hi, mask *__vec) const
Return a mask array.
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.
bool isalpha(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::alpha, __c).
static locale::id id
Numpunct facet id.
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.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, bool __v) const
Numeric formatting.
_CharT toupper(_CharT __c, const locale &__loc)
Convenience interface to ctype.toupper(__c).
iter_type put(iter_type __s, ios_base &__io, char_type __fill, long double __v) const
Numeric formatting.
bool isalnum(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::alnum, __c).
const char * widen(const char *__lo, const char *__hi, char_type *__to) const
Widen array to char_type.
virtual char_type do_widen(char __c) const
Widen char.
virtual char_type do_decimal_point() const
Return decimal point character.
bool isxdigit(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::xdigit, __c).
const char_type * narrow(const char_type *__lo, const char_type *__hi, char __dfault, char *__to) const
Narrow array to char array.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, long long __v) const
Numeric formatting.
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 iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, long &__v) const
Numeric parsing.
virtual string_type do_falsename() const
Return string representation of bool false.
Primary class template ctype facet.This template class defines classification and conversion function...
bool is(mask __m, char_type __c) const
Test char_type classification.
bool isblank(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::blank, __c).
const char_type * scan_not(mask __m, const char_type *__lo, const char_type *__hi) const
Find char_type not matching a mask.
numpunct(__cache_type *__cache, size_t __refs=0)
Internal constructor. Not for general use.
bool isgraph(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::graph, __c).
virtual ~num_get()
Destructor.
static locale::id id
Numpunct facet id.
bool iscntrl(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::cntrl, __c).
const char_type * tolower(char_type *__lo, const char_type *__hi) const
Convert array to lowercase.
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, long long __v) const
Numeric formatting.
_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() ...
wchar_t char_type
Typedef for the template parameter wchar_t.
char_type widen(char __c) const
Widen char to char_type.
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
string grouping() const
Return grouping specification.
The base of the I/O class hierarchy.This class defines everything that can be defined about I/O that ...
static locale::id id
The facet id for ctype<wchar_t>
Primary class template num_get.This facet encapsulates the code to parse and return a number from a s...
char narrow(char_type __c, char __dfault) const
Narrow char.
bool isdigit(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::digit, __c).
string_type truename() const
Return string representation of bool true.
virtual char do_narrow(char_type __c, char __dfault __attribute__((__unused__))) const
Narrow char.
char_type tolower(char_type __c) const
Convert to lowercase.
_InIter iter_type
Public typedefs.
Container class for localization functionality.The locale class is first a class wrapper for C librar...
iter_type put(iter_type __s, ios_base &__io, char_type __fill, double __v) const
Numeric formatting.
Common base for ctype facet.
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, unsigned long __v) const
Numeric formatting.
char_type tolower(char_type __c) const
Convert to lowercase.
virtual ~numpunct()
Destructor.
virtual ~num_put()
Destructor.
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, unsigned long &__v) const
Numeric parsing.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, const void *__v) const
Numeric formatting.
_CharT char_type
Public typedefs.
const char_type * tolower(char_type *__lo, const char_type *__hi) const
Convert array to lowercase.
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, unsigned short &__v) const
Numeric parsing.
char_type decimal_point() const
Return decimal point character.
num_put(size_t __refs=0)
Constructor performs initialization.
virtual const char * do_widen(const char *__lo, const char *__hi, char_type *__to) const
Widen char array.
virtual string_type do_truename() const
Return string representation of bool true.
_CharT char_type
Typedef for the template parameter.
_Ios_Iostate iostate
This is a bitmask type.
const char_type * toupper(char_type *__lo, const char_type *__hi) const
Convert array to uppercase.
char_type widen(char __c) const
Widen char.
bool isprint(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::print, __c).