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();
79 __convert_to_v(const
char*,
float&, ios_base::iostate&,
80 const __c_locale&) throw();
84 __convert_to_v(const
char*,
double&, ios_base::iostate&,
85 const __c_locale&) throw();
89 __convert_to_v(const
char*,
long double&, ios_base::iostate&,
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 218 scan_not(mask __m,
const char_type* __lo,
const char_type* __hi)
const 247 toupper(char_type *__lo,
const char_type* __hi)
const 276 tolower(char_type* __lo,
const char_type* __hi)
const 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*
417 const char_type* __hi)
const = 0;
434 virtual const char_type*
436 const char_type* __hi)
const = 0;
469 virtual const char_type*
470 do_toupper(char_type* __lo,
const char_type* __hi)
const = 0;
502 virtual const char_type*
503 do_tolower(char_type* __lo,
const char_type* __hi)
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*
640 const char_type* __hi)
const;
645 virtual const char_type*
646 do_toupper(char_type* __lo,
const char_type* __hi)
const;
651 virtual const char_type*
652 do_tolower(char_type* __lo,
const char_type* __hi)
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;
819 toupper(char_type *__lo,
const char_type* __hi)
const 852 tolower(char_type* __lo,
const char_type* __hi)
const 875 return _M_widen[
static_cast<unsigned char>(__c)];
876 this->_M_widen_init();
899 widen(
const char* __lo,
const char* __hi, char_type* __to)
const 901 if (_M_widen_ok == 1)
903 __builtin_memcpy(__to, __lo, __hi - __lo);
908 return this->
do_widen(__lo, __hi, __to);
930 narrow(char_type __c,
char __dfault)
const 932 if (_M_narrow[static_cast<unsigned char>(__c)])
933 return _M_narrow[
static_cast<unsigned char>(__c)];
934 const char __t =
do_narrow(__c, __dfault);
936 _M_narrow[
static_cast<unsigned char>(__c)] = __t;
963 narrow(
const char_type* __lo,
const char_type* __hi,
964 char __dfault,
char* __to)
const 966 if (__builtin_expect(_M_narrow_ok == 1,
true))
968 __builtin_memcpy(__to, __lo, __hi - __lo);
973 return this->
do_narrow(__lo, __hi, __dfault, __to);
986 classic_table()
throw();
1028 virtual const char_type*
1029 do_toupper(char_type* __lo,
const char_type* __hi)
const;
1061 virtual const char_type*
1062 do_tolower(char_type* __lo,
const char_type* __hi)
const;
1105 do_widen(
const char* __lo,
const char* __hi, char_type* __to)
const 1107 __builtin_memcpy(__to, __lo, __hi - __lo);
1156 virtual const char_type*
1158 char __dfault,
char* __to)
const 1160 __builtin_memcpy(__to, __lo, __hi - __lo);
1165 void _M_narrow_init()
const;
1166 void _M_widen_init()
const;
1169 #ifdef _GLIBCXX_USE_WCHAR_T 1188 typedef wctype_t __wmask_type;
1191 __c_locale _M_c_locale_ctype;
1195 char _M_narrow[128];
1196 wint_t _M_widen[1 +
static_cast<unsigned char>(-1)];
1200 __wmask_type _M_wmask[16];
1215 ctype(
size_t __refs = 0);
1226 ctype(__c_locale __cloc,
size_t __refs = 0);
1230 _M_convert_to_wmask(
const mask __m)
const throw();
1250 do_is(mask __m, char_type __c)
const;
1268 virtual const char_type*
1269 do_is(
const char_type* __lo,
const char_type* __hi, mask* __vec)
const;
1286 virtual const char_type*
1287 do_scan_is(mask __m,
const char_type* __lo,
const char_type* __hi)
const;
1304 virtual const char_type*
1306 const char_type* __hi)
const;
1338 virtual const char_type*
1339 do_toupper(char_type* __lo,
const char_type* __hi)
const;
1371 virtual const char_type*
1372 do_tolower(char_type* __lo,
const char_type* __hi)
const;
1414 do_widen(
const char* __lo,
const char* __hi, char_type* __to)
const;
1437 do_narrow(char_type __c,
char __dfault)
const;
1462 virtual const char_type*
1463 do_narrow(
const char_type* __lo,
const char_type* __hi,
1464 char __dfault,
char* __to)
const;
1468 _M_initialize_ctype() throw();
1470 #endif //_GLIBCXX_USE_WCHAR_T 1473 template<
typename _CharT>
1477 typedef typename ctype<_CharT>::mask mask;
1482 #if __cplusplus >= 201103L 1501 #if __cplusplus >= 201103L 1511 #ifdef _GLIBCXX_USE_WCHAR_T 1519 #if __cplusplus >= 201103L 1530 _GLIBCXX_END_NAMESPACE_VERSION
1536 namespace std _GLIBCXX_VISIBILITY(default)
1538 _GLIBCXX_BEGIN_NAMESPACE_VERSION
1553 _S_odigits_end = _S_odigits + 16,
1554 _S_oudigits = _S_odigits_end,
1555 _S_oudigits_end = _S_oudigits + 16,
1556 _S_oe = _S_odigits + 14,
1557 _S_oE = _S_oudigits + 14,
1558 _S_oend = _S_oudigits_end
1566 static const char* _S_atoms_out;
1570 static const char* _S_atoms_in;
1579 _S_ie = _S_izero + 14,
1580 _S_iE = _S_izero + 20,
1587 _S_format_float(
const ios_base& __io,
char* __fptr,
char __mod)
throw();
1590 template<
typename _CharT>
1593 const char* _M_grouping;
1594 size_t _M_grouping_size;
1595 bool _M_use_grouping;
1596 const _CharT* _M_truename;
1597 size_t _M_truename_size;
1598 const _CharT* _M_falsename;
1599 size_t _M_falsename_size;
1600 _CharT _M_decimal_point;
1601 _CharT _M_thousands_sep;
1607 _CharT _M_atoms_out[__num_base::_S_oend];
1613 _CharT _M_atoms_in[__num_base::_S_iend];
1617 __numpunct_cache(
size_t __refs = 0)
1618 :
facet(__refs), _M_grouping(0), _M_grouping_size(0),
1619 _M_use_grouping(
false),
1620 _M_truename(0), _M_truename_size(0), _M_falsename(0),
1621 _M_falsename_size(0), _M_decimal_point(_CharT()),
1622 _M_thousands_sep(_CharT()), _M_allocated(
false)
1625 ~__numpunct_cache();
1628 _M_cache(
const locale& __loc);
1632 operator=(
const __numpunct_cache&);
1635 __numpunct_cache(
const __numpunct_cache&);
1638 template<
typename _CharT>
1639 __numpunct_cache<_CharT>::~__numpunct_cache()
1643 delete [] _M_grouping;
1644 delete [] _M_truename;
1645 delete [] _M_falsename;
1649 _GLIBCXX_BEGIN_NAMESPACE_CXX11
1665 template<
typename _CharT>
1675 typedef __numpunct_cache<_CharT> __cache_type;
1678 __cache_type* _M_data;
1691 :
facet(__refs), _M_data(0)
1692 { _M_initialize_numpunct(); }
1705 :
facet(__refs), _M_data(__cache)
1706 { _M_initialize_numpunct(); }
1719 :
facet(__refs), _M_data(0)
1720 { _M_initialize_numpunct(__cloc); }
1733 {
return this->do_decimal_point(); }
1746 {
return this->do_thousands_sep(); }
1777 {
return this->do_grouping(); }
1790 {
return this->do_truename(); }
1803 {
return this->do_falsename(); }
1820 {
return _M_data->_M_decimal_point; }
1832 {
return _M_data->_M_thousands_sep; }
1845 {
return _M_data->_M_grouping; }
1858 {
return _M_data->_M_truename; }
1871 {
return _M_data->_M_falsename; }
1875 _M_initialize_numpunct(__c_locale __cloc = 0);
1878 template<
typename _CharT>
1888 #ifdef _GLIBCXX_USE_WCHAR_T 1898 template<
typename _CharT>
1909 if (__builtin_strcmp(__s,
"C") != 0
1910 && __builtin_strcmp(__s,
"POSIX") != 0)
1913 this->_S_create_c_locale(__tmp, __s);
1914 this->_M_initialize_numpunct(__tmp);
1915 this->_S_destroy_c_locale(__tmp);
1919 #if __cplusplus >= 201103L 1930 _GLIBCXX_END_NAMESPACE_CXX11
1932 _GLIBCXX_BEGIN_NAMESPACE_LDBL
1947 template<
typename _CharT,
typename _InIter>
1996 ios_base::iostate& __err,
bool& __v)
const 1997 {
return this->do_get(__in, __end, __io, __err, __v); }
2033 ios_base::iostate& __err,
long& __v)
const 2034 {
return this->do_get(__in, __end, __io, __err, __v); }
2038 ios_base::iostate& __err,
unsigned short& __v)
const 2039 {
return this->do_get(__in, __end, __io, __err, __v); }
2043 ios_base::iostate& __err,
unsigned int& __v)
const 2044 {
return this->do_get(__in, __end, __io, __err, __v); }
2048 ios_base::iostate& __err,
unsigned long& __v)
const 2049 {
return this->do_get(__in, __end, __io, __err, __v); }
2051 #ifdef _GLIBCXX_USE_LONG_LONG 2054 ios_base::iostate& __err,
long long& __v)
const 2055 {
return this->do_get(__in, __end, __io, __err, __v); }
2059 ios_base::iostate& __err,
unsigned long long& __v)
const 2060 {
return this->do_get(__in, __end, __io, __err, __v); }
2093 ios_base::iostate& __err,
float& __v)
const 2094 {
return this->do_get(__in, __end, __io, __err, __v); }
2098 ios_base::iostate& __err,
double& __v)
const 2099 {
return this->do_get(__in, __end, __io, __err, __v); }
2103 ios_base::iostate& __err,
long double& __v)
const 2104 {
return this->do_get(__in, __end, __io, __err, __v); }
2136 ios_base::iostate& __err,
void*& __v)
const 2137 {
return this->do_get(__in, __end, __io, __err, __v); }
2143 _GLIBCXX_DEFAULT_ABI_TAG
2145 _M_extract_float(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2148 template<
typename _ValueT>
2149 _GLIBCXX_DEFAULT_ABI_TAG
2151 _M_extract_int(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2154 template<
typename _CharT2>
2155 typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
int>::__type
2156 _M_find(
const _CharT2*,
size_t __len, _CharT2 __c)
const 2161 if (__c >= _CharT2(
'0') && __c < _CharT2(_CharT2(
'0') + __len))
2162 __ret = __c - _CharT2(
'0');
2166 if (__c >= _CharT2(
'0') && __c <= _CharT2(
'9'))
2167 __ret = __c - _CharT2(
'0');
2168 else if (__c >= _CharT2(
'a') && __c <= _CharT2(
'f'))
2169 __ret = 10 + (__c - _CharT2(
'a'));
2170 else if (__c >= _CharT2(
'A') && __c <= _CharT2(
'F'))
2171 __ret = 10 + (__c - _CharT2(
'A'));
2176 template<
typename _CharT2>
2177 typename __gnu_cxx::__enable_if<!__is_char<_CharT2>::__value,
2179 _M_find(
const _CharT2* __zero,
size_t __len, _CharT2 __c)
const 2185 __ret = __q - __zero;
2208 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
bool&)
const;
2212 ios_base::iostate& __err,
long& __v)
const 2213 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2217 ios_base::iostate& __err,
unsigned short& __v)
const 2218 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2222 ios_base::iostate& __err,
unsigned int& __v)
const 2223 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2227 ios_base::iostate& __err,
unsigned long& __v)
const 2228 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2230 #ifdef _GLIBCXX_USE_LONG_LONG 2233 ios_base::iostate& __err,
long long& __v)
const 2234 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2238 ios_base::iostate& __err,
unsigned long long& __v)
const 2239 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2243 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
float&)
const;
2246 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2250 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ 2252 __do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2256 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2257 long double&)
const;
2261 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
void*&)
const;
2264 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ 2266 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2267 long double&)
const;
2272 template<
typename _CharT,
typename _InIter>
2288 template<
typename _CharT,
typename _OutIter>
2329 {
return this->do_put(__s, __io, __fill, __v); }
2371 {
return this->do_put(__s, __io, __fill, __v); }
2375 unsigned long __v)
const 2376 {
return this->do_put(__s, __io, __fill, __v); }
2378 #ifdef _GLIBCXX_USE_LONG_LONG 2380 put(iter_type __s,
ios_base& __io, char_type __fill,
long long __v)
const 2381 {
return this->do_put(__s, __io, __fill, __v); }
2385 unsigned long long __v)
const 2386 {
return this->do_put(__s, __io, __fill, __v); }
2433 put(iter_type __s,
ios_base& __io, char_type __fill,
double __v)
const 2434 {
return this->do_put(__s, __io, __fill, __v); }
2438 long double __v)
const 2439 {
return this->do_put(__s, __io, __fill, __v); }
2459 const void* __v)
const 2460 {
return this->do_put(__s, __io, __fill, __v); }
2463 template<
typename _ValueT>
2465 _M_insert_float(iter_type,
ios_base& __io, char_type __fill,
2466 char __mod, _ValueT __v)
const;
2469 _M_group_float(
const char* __grouping,
size_t __grouping_size,
2470 char_type __sep,
const char_type* __p, char_type* __new,
2471 char_type* __cs,
int& __len)
const;
2473 template<
typename _ValueT>
2475 _M_insert_int(iter_type,
ios_base& __io, char_type __fill,
2479 _M_group_int(
const char* __grouping,
size_t __grouping_size,
2480 char_type __sep,
ios_base& __io, char_type* __new,
2481 char_type* __cs,
int& __len)
const;
2485 char_type* __new,
const char_type* __cs,
int& __len)
const;
2506 do_put(iter_type __s,
ios_base& __io, char_type __fill,
bool __v)
const;
2510 {
return _M_insert_int(__s, __io, __fill, __v); }
2514 unsigned long __v)
const 2515 {
return _M_insert_int(__s, __io, __fill, __v); }
2517 #ifdef _GLIBCXX_USE_LONG_LONG 2520 long long __v)
const 2521 {
return _M_insert_int(__s, __io, __fill, __v); }
2525 unsigned long long __v)
const 2526 {
return _M_insert_int(__s, __io, __fill, __v); }
2530 do_put(iter_type,
ios_base&, char_type,
double)
const;
2533 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ 2535 __do_put(iter_type,
ios_base&, char_type,
double)
const;
2538 do_put(iter_type,
ios_base&, char_type,
long double)
const;
2542 do_put(iter_type,
ios_base&, char_type,
const void*)
const;
2545 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ 2547 do_put(iter_type,
ios_base&, char_type,
long double)
const;
2552 template <
typename _CharT,
typename _OutIter>
2555 _GLIBCXX_END_NAMESPACE_LDBL
2563 template<
typename _CharT>
2566 {
return use_facet<ctype<_CharT> >(__loc).
is(ctype_base::space, __c); }
2569 template<
typename _CharT>
2572 {
return use_facet<ctype<_CharT> >(__loc).
is(ctype_base::print, __c); }
2575 template<
typename _CharT>
2578 {
return use_facet<ctype<_CharT> >(__loc).
is(ctype_base::cntrl, __c); }
2581 template<
typename _CharT>
2584 {
return use_facet<ctype<_CharT> >(__loc).
is(ctype_base::upper, __c); }
2587 template<
typename _CharT>
2590 {
return use_facet<ctype<_CharT> >(__loc).
is(ctype_base::lower, __c); }
2593 template<
typename _CharT>
2596 {
return use_facet<ctype<_CharT> >(__loc).
is(ctype_base::alpha, __c); }
2599 template<
typename _CharT>
2602 {
return use_facet<ctype<_CharT> >(__loc).
is(ctype_base::digit, __c); }
2605 template<
typename _CharT>
2608 {
return use_facet<ctype<_CharT> >(__loc).
is(ctype_base::punct, __c); }
2611 template<
typename _CharT>
2614 {
return use_facet<ctype<_CharT> >(__loc).
is(ctype_base::xdigit, __c); }
2617 template<
typename _CharT>
2620 {
return use_facet<ctype<_CharT> >(__loc).
is(ctype_base::alnum, __c); }
2623 template<
typename _CharT>
2626 {
return use_facet<ctype<_CharT> >(__loc).
is(ctype_base::graph, __c); }
2628 #if __cplusplus >= 201103L 2630 template<
typename _CharT>
2633 {
return use_facet<ctype<_CharT> >(__loc).
is(ctype_base::blank, __c); }
2637 template<
typename _CharT>
2640 {
return use_facet<ctype<_CharT> >(__loc).
toupper(__c); }
2643 template<
typename _CharT>
2646 {
return use_facet<ctype<_CharT> >(__loc).
tolower(__c); }
2648 _GLIBCXX_END_NAMESPACE_VERSION
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, long __v) const
Numeric formatting.
virtual string_type do_truename() const
Return string representation of bool true.
num_put(size_t __refs=0)
Constructor performs initialization.
virtual char_type do_toupper(char_type __c) const =0
Convert to uppercase.
numpunct(__cache_type *__cache, size_t __refs=0)
Internal constructor. Not for general use.
bool isblank(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::blank, __c).
virtual char do_narrow(char_type __c, char __dfault) const =0
Narrow char_type to char.
char_type widen(char __c) const
Widen char.
bool isgraph(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::graph, __c).
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.
virtual char_type do_tolower(char_type __c) const =0
Convert to lowercase.
Basis for explicit traits specializations.
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, long long __v) const
Numeric formatting.
const char_type * narrow(const char_type *__lo, const char_type *__hi, char __dfault, char *__to) const
Narrow array to char array.
numpunct(__c_locale __cloc, size_t __refs=0)
Internal constructor. Not for general use.
virtual string_type do_falsename() const
Return string representation of bool false.
string grouping() const
Return grouping specification.
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, double __v) const
Numeric formatting.
char narrow(char_type __c, char __dfault) const
Narrow char.
virtual string do_grouping() const
Return grouping specification.
const char_type * narrow(const char_type *__lo, const char_type *__hi, char __dfault, char *__to) const
Narrow char array.
bool isalpha(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::alpha, __c).
num_get(size_t __refs=0)
Constructor performs initialization.
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, unsigned int &__v) const
Numeric parsing.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, unsigned long long __v) const
Numeric formatting.
basic_string< _CharT > string_type
Public typedefs.
const char * widen(const char *__lo, const char *__hi, char_type *__to) const
Widen char array.
_CharT char_type
Public typedefs.
_Ios_Iostate iostate
This is a bitmask type.
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 isdigit(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::digit, __c).
const char_type * tolower(char_type *__lo, const char_type *__hi) const
Convert array to lowercase.
char_type tolower(char_type __c) const
Convert to lowercase.
Primary class template num_get.This facet encapsulates the code to parse and return a number from a s...
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
const char_type * tolower(char_type *__lo, const char_type *__hi) const
Convert array to lowercase.
virtual char_type do_decimal_point() const
Return decimal point character.
Common base for ctype facet.
bool is(mask __m, char_type __c) const
Test char_type classification.
class numpunct_byname [22.2.3.2].
char_type thousands_sep() const
Return thousands separator character.
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, long long &__v) const
Numeric parsing.
const char_type * is(const char_type *__lo, const char_type *__hi, mask *__vec) const
Return a mask array.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, unsigned long __v) const
Numeric formatting.
virtual bool do_is(mask __m, char_type __c) const =0
Test char_type classification.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, bool __v) const
Numeric formatting.
static locale::id id
Numpunct facet id.
char_type decimal_point() const
Return decimal point character.
class ctype_byname [22.2.1.2].
string_type truename() const
Return string representation of bool true.
bool isprint(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::print, __c).
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, unsigned long &__v) const
Numeric parsing.
string_type falsename() const
Return string representation of bool false.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, long long __v) const
Numeric formatting.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, long __v) const
Numeric formatting.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, const void *__v) const
Numeric formatting.
const char_type * toupper(char_type *__lo, const char_type *__hi) const
Convert array to uppercase.
static locale::id id
The facet id for ctype<wchar_t>
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<char>
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, unsigned long long __v) const
Numeric formatting.
Primary class template numpunct.This facet stores several pieces of information related to printing a...
virtual ~num_get()
Destructor.
bool isalnum(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::alnum, __c).
bool islower(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::lower, __c).
virtual char do_narrow(char_type __c, char __dfault) const
Narrow char.
const char * widen(const char *__lo, const char *__hi, char_type *__to) const
Widen array to char_type.
_CharT char_type
Public typedefs.
virtual ~numpunct()
Destructor.
char narrow(char_type __c, char __dfault) const
Narrow char_type to char.
_CharT char_type
Typedef for the template parameter.
virtual const char * do_widen(const char *__lo, const char *__hi, char_type *__to) const
Widen char array.
Localization functionality base class.The facet class is the base class for a localization feature...
const _CharT * c_str() const noexcept
Return const pointer to null-terminated contents.
const char_type * scan_not(mask __m, const char_type *__lo, const char_type *__hi) const
Find char_type not matching a mask.
char char_type
Typedef for the template parameter char.
char_type widen(char __c) const
Widen char to char_type.
_InIter iter_type
Public typedefs.
wchar_t char_type
Typedef for the template parameter wchar_t.
virtual const char_type * do_narrow(const char_type *__lo, const char_type *__hi, char __dfault, char *__to) const
Narrow char array to char array.
Primary class template ctype facet.This template class defines classification and conversion function...
bool isspace(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::space, __c).
virtual char_type do_widen(char __c) const =0
Widen char.
virtual const char_type * do_scan_not(mask __m, const char_type *__lo, const char_type *__hi) const =0
Find char_type not matching mask.
static locale::id id
Numpunct facet id.
virtual const char_type * do_scan_is(mask __m, const char_type *__lo, const char_type *__hi) const =0
Find char_type matching mask.
const char_type * toupper(char_type *__lo, const char_type *__hi) const
Convert array to uppercase.
_CharT char_type
Public typedefs.
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, long &__v) const
Numeric parsing.
_OutIter iter_type
Public typedefs.
static locale::id id
The facet id for ctype<char_type>
const char_type * scan_is(mask __m, const char_type *__lo, const char_type *__hi) const
Find char_type matching a mask.
bool ispunct(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::punct, __c).
static locale::id id
Numpunct facet id.
bool isxdigit(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::xdigit, __c).
char_type toupper(char_type __c) const
Convert to uppercase.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, long double __v) const
Numeric formatting.
virtual char_type do_thousands_sep() const
Return thousands separator character.
Facet ID class.The ID class provides facets with an index used to identify them. Every facet class mu...
char_type tolower(char_type __c) const
Convert to lowercase.
virtual ~num_put()
Destructor.
Container class for localization functionality.The locale class is first a class wrapper for C librar...
bool isupper(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::upper, __c).
ISO C++ entities toplevel namespace is std.
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, unsigned long __v) const
Numeric formatting.
Primary class template num_put.This facet encapsulates the code to convert a number to a string...
facet(size_t __refs=0)
Facet constructor.
virtual char_type do_widen(char __c) const
Widen char.
numpunct(size_t __refs=0)
Numpunct constructor.
const mask * table() const
Returns a pointer to the mask table provided to the constructor, or the default from classic_table() ...