36 #ifndef _LOCALE_FACETS_H
37 #define _LOCALE_FACETS_H 1
39 #pragma GCC system_header
52 _GLIBCXX_BEGIN_NAMESPACE(std)
55 #ifdef _GLIBCXX_USE_WCHAR_T
56 # define _GLIBCXX_NUM_FACETS 28
58 # define _GLIBCXX_NUM_FACETS 14
64 template<
typename _Tv>
66 __convert_to_v(
const char* __in, _Tv& __out, ios_base::iostate& __err,
67 const __c_locale& __cloc);
72 __convert_to_v(
const char*,
float&, ios_base::iostate&,
77 __convert_to_v(
const char*,
double&, ios_base::iostate&,
82 __convert_to_v(
const char*,
long double&, ios_base::iostate&,
87 template<
typename _CharT,
typename _Traits>
91 _S_pad(ios_base& __io, _CharT __fill, _CharT* __news,
100 template<
typename _CharT>
102 __add_grouping(_CharT* __s, _CharT __sep,
103 const char* __gbeg,
size_t __gsize,
104 const _CharT* __first,
const _CharT* __last);
109 template<
typename _CharT>
111 ostreambuf_iterator<_CharT>
112 __write(ostreambuf_iterator<_CharT> __s,
const _CharT* __ws,
int __len)
114 __s._M_put(__ws, __len);
119 template<
typename _CharT,
typename _OutIter>
122 __write(_OutIter __s,
const _CharT* __ws,
int __len)
124 for (
int __j = 0; __j < __len; __j++, ++__s)
143 template<
typename _CharT>
163 {
return this->do_is(__m, __c); }
180 {
return this->do_is(__lo, __hi, __vec); }
196 {
return this->do_scan_is(__m, __lo, __hi); }
212 {
return this->do_scan_not(__m, __lo, __hi); }
226 {
return this->do_toupper(__c); }
241 {
return this->do_toupper(__lo, __hi); }
255 {
return this->do_tolower(__c); }
270 {
return this->do_tolower(__lo, __hi); }
287 {
return this->do_widen(__c); }
306 {
return this->do_widen(__lo, __hi, __to); }
325 {
return this->do_narrow(__c, __dfault); }
347 char __dfault,
char *__to)
const
348 {
return this->do_narrow(__lo, __hi, __dfault, __to); }
355 ~__ctype_abstract_base() { }
371 do_is(mask __m, char_type __c)
const = 0;
389 virtual const char_type*
390 do_is(
const char_type* __lo,
const char_type* __hi,
391 mask* __vec)
const = 0;
408 virtual const char_type*
409 do_scan_is(mask __m,
const char_type* __lo,
410 const char_type* __hi)
const = 0;
427 virtual const char_type*
428 do_scan_not(mask __m,
const char_type* __lo,
429 const char_type* __hi)
const = 0;
446 do_toupper(char_type)
const = 0;
462 virtual const char_type*
463 do_toupper(char_type* __lo,
const char_type* __hi)
const = 0;
479 do_tolower(char_type)
const = 0;
495 virtual const char_type*
496 do_tolower(char_type* __lo,
const char_type* __hi)
const = 0;
515 do_widen(
char)
const = 0;
536 do_widen(
const char* __lo,
const char* __hi,
537 char_type* __dest)
const = 0;
558 do_narrow(char_type,
char __dfault)
const = 0;
581 virtual const char_type*
582 do_narrow(
const char_type* __lo,
const char_type* __hi,
583 char __dfault,
char* __dest)
const = 0;
604 template<
typename _CharT>
610 typedef typename __ctype_abstract_base<_CharT>::mask mask;
623 do_is(mask __m, char_type __c)
const;
625 virtual const char_type*
626 do_is(
const char_type* __lo,
const char_type* __hi, mask* __vec)
const;
628 virtual const char_type*
629 do_scan_is(mask __m,
const char_type* __lo,
const char_type* __hi)
const;
631 virtual const char_type*
632 do_scan_not(mask __m,
const char_type* __lo,
633 const char_type* __hi)
const;
636 do_toupper(char_type __c)
const;
638 virtual const char_type*
639 do_toupper(char_type* __lo,
const char_type* __hi)
const;
642 do_tolower(char_type __c)
const;
644 virtual const char_type*
645 do_tolower(char_type* __lo,
const char_type* __hi)
const;
648 do_widen(
char __c)
const;
651 do_widen(
const char* __lo,
const char* __hi, char_type* __dest)
const;
654 do_narrow(char_type,
char __dfault)
const;
656 virtual const char_type*
657 do_narrow(
const char_type* __lo,
const char_type* __hi,
658 char __dfault,
char* __dest)
const;
661 template<
typename _CharT>
662 locale::id ctype<_CharT>::id;
683 __c_locale _M_c_locale_ctype;
685 __to_type _M_toupper;
686 __to_type _M_tolower;
687 const mask* _M_table;
688 mutable char _M_widen_ok;
689 mutable char _M_widen[1 +
static_cast<unsigned char>(-1)];
690 mutable char _M_narrow[1 +
static_cast<unsigned char>(-1)];
691 mutable char _M_narrow_ok;
698 static const size_t table_size = 1 +
static_cast<unsigned char>(-1);
711 ctype(
const mask* __table = 0,
bool __del =
false,
size_t __refs = 0);
724 ctype(__c_locale __cloc,
const mask* __table = 0,
bool __del =
false,
737 is(mask __m,
char __c)
const;
752 is(
const char* __lo,
const char* __hi, mask* __vec)
const;
766 scan_is(mask __m,
const char* __lo,
const char* __hi)
const;
780 scan_not(mask __m,
const char* __lo,
const char* __hi)
const;
796 {
return this->do_toupper(__c); }
813 {
return this->do_toupper(__lo, __hi); }
829 {
return this->do_tolower(__c); }
846 {
return this->do_tolower(__lo, __hi); }
868 return _M_widen[
static_cast<unsigned char>(__c)];
869 this->_M_widen_init();
870 return this->do_widen(__c);
894 if (_M_widen_ok == 1)
896 __builtin_memcpy(__to, __lo, __hi - __lo);
901 return this->do_widen(__lo, __hi, __to);
925 if (_M_narrow[static_cast<unsigned char>(__c)])
926 return _M_narrow[
static_cast<unsigned char>(__c)];
927 const char __t = do_narrow(__c, __dfault);
929 _M_narrow[
static_cast<unsigned char>(__c)] = __t;
957 char __dfault,
char *__to)
const
959 if (__builtin_expect(_M_narrow_ok == 1,
true))
961 __builtin_memcpy(__to, __lo, __hi - __lo);
966 return this->do_narrow(__lo, __hi, __dfault, __to);
979 classic_table() throw();
1005 do_toupper(char_type) const;
1021 virtual const char_type*
1022 do_toupper(char_type* __lo, const char_type* __hi) const;
1038 do_tolower(char_type) const;
1054 virtual const char_type*
1055 do_tolower(char_type* __lo, const char_type* __hi) const;
1075 do_widen(
char __c)
const
1100 __builtin_memcpy(__dest, __lo, __hi - __lo);
1149 virtual const char_type*
1151 char,
char* __dest)
const
1153 __builtin_memcpy(__dest, __lo, __hi - __lo);
1158 void _M_narrow_init()
const;
1159 void _M_widen_init()
const;
1162 #ifdef _GLIBCXX_USE_WCHAR_T
1181 typedef wctype_t __wmask_type;
1184 __c_locale _M_c_locale_ctype;
1188 char _M_narrow[128];
1189 wint_t _M_widen[1 +
static_cast<unsigned char>(-1)];
1193 __wmask_type _M_wmask[16];
1208 ctype(
size_t __refs = 0);
1219 ctype(__c_locale __cloc,
size_t __refs = 0);
1223 _M_convert_to_wmask(
const mask __m)
const;
1298 do_scan_not(mask __m,
const char_type* __lo,
1385 do_widen(
char)
const;
1407 do_widen(
const char* __lo,
const char* __hi,
char_type* __dest)
const;
1430 do_narrow(
char_type,
char __dfault)
const;
1457 char __dfault,
char* __dest)
const;
1461 _M_initialize_ctype();
1463 #endif //_GLIBCXX_USE_WCHAR_T
1466 template<
typename _CharT>
1470 typedef typename ctype<_CharT>::mask mask;
1493 #ifdef _GLIBCXX_USE_WCHAR_T
1507 _GLIBCXX_END_NAMESPACE
1512 _GLIBCXX_BEGIN_NAMESPACE(std)
1527 _S_odigits_end = _S_odigits + 16,
1528 _S_oudigits = _S_odigits_end,
1529 _S_oudigits_end = _S_oudigits + 16,
1530 _S_oe = _S_odigits + 14,
1531 _S_oE = _S_oudigits + 14,
1532 _S_oend = _S_oudigits_end
1540 static const char* _S_atoms_out;
1544 static const char* _S_atoms_in;
1553 _S_ie = _S_izero + 14,
1554 _S_iE = _S_izero + 20,
1561 _S_format_float(
const ios_base& __io,
char* __fptr,
char __mod);
1564 template<
typename _CharT>
1565 struct __numpunct_cache :
public locale::facet
1567 const char* _M_grouping;
1568 size_t _M_grouping_size;
1569 bool _M_use_grouping;
1570 const _CharT* _M_truename;
1571 size_t _M_truename_size;
1572 const _CharT* _M_falsename;
1573 size_t _M_falsename_size;
1574 _CharT _M_decimal_point;
1575 _CharT _M_thousands_sep;
1581 _CharT _M_atoms_out[__num_base::_S_oend];
1587 _CharT _M_atoms_in[__num_base::_S_iend];
1591 __numpunct_cache(
size_t __refs = 0) : facet(__refs),
1592 _M_grouping(NULL), _M_grouping_size(0), _M_use_grouping(false),
1593 _M_truename(NULL), _M_truename_size(0), _M_falsename(NULL),
1594 _M_falsename_size(0), _M_decimal_point(_CharT()),
1595 _M_thousands_sep(_CharT()), _M_allocated(false)
1598 ~__numpunct_cache();
1601 _M_cache(
const locale& __loc);
1605 operator=(
const __numpunct_cache&);
1608 __numpunct_cache(
const __numpunct_cache&);
1611 template<
typename _CharT>
1612 __numpunct_cache<_CharT>::~__numpunct_cache()
1616 delete [] _M_grouping;
1617 delete [] _M_truename;
1618 delete [] _M_falsename;
1635 template<
typename _CharT>
1645 typedef __numpunct_cache<_CharT> __cache_type;
1648 __cache_type* _M_data;
1660 numpunct(
size_t __refs = 0) : facet(__refs), _M_data(NULL)
1661 { _M_initialize_numpunct(); }
1674 : facet(__refs), _M_data(__cache)
1675 { _M_initialize_numpunct(); }
1688 : facet(__refs), _M_data(NULL)
1689 { _M_initialize_numpunct(__cloc); }
1702 {
return this->do_decimal_point(); }
1715 {
return this->do_thousands_sep(); }
1746 {
return this->do_grouping(); }
1759 {
return this->do_truename(); }
1772 {
return this->do_falsename(); }
1789 {
return _M_data->_M_decimal_point; }
1801 {
return _M_data->_M_thousands_sep; }
1814 {
return _M_data->_M_grouping; }
1827 {
return _M_data->_M_truename; }
1840 {
return _M_data->_M_falsename; }
1844 _M_initialize_numpunct(__c_locale __cloc = NULL);
1847 template<
typename _CharT>
1848 locale::id numpunct<_CharT>::id;
1851 numpunct<char>::~numpunct();
1855 numpunct<char>::_M_initialize_numpunct(__c_locale __cloc);
1857 #ifdef _GLIBCXX_USE_WCHAR_T
1859 numpunct<wchar_t>::~numpunct();
1863 numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc);
1867 template<
typename _CharT>
1878 if (__builtin_strcmp(__s,
"C") != 0
1879 && __builtin_strcmp(__s,
"POSIX") != 0)
1882 this->_S_create_c_locale(__tmp, __s);
1883 this->_M_initialize_numpunct(__tmp);
1884 this->_S_destroy_c_locale(__tmp);
1893 _GLIBCXX_BEGIN_LDBL_NAMESPACE
1907 template<
typename _CharT,
typename _InIter>
1956 ios_base::iostate& __err,
bool& __v)
const
1957 {
return this->do_get(__in, __end, __io, __err, __v); }
1992 ios_base::iostate& __err,
long& __v)
const
1993 {
return this->do_get(__in, __end, __io, __err, __v); }
1997 ios_base::iostate& __err,
unsigned short& __v)
const
1998 {
return this->do_get(__in, __end, __io, __err, __v); }
2002 ios_base::iostate& __err,
unsigned int& __v)
const
2003 {
return this->do_get(__in, __end, __io, __err, __v); }
2007 ios_base::iostate& __err,
unsigned long& __v)
const
2008 {
return this->do_get(__in, __end, __io, __err, __v); }
2010 #ifdef _GLIBCXX_USE_LONG_LONG
2013 ios_base::iostate& __err,
long long& __v)
const
2014 {
return this->do_get(__in, __end, __io, __err, __v); }
2018 ios_base::iostate& __err,
unsigned long long& __v)
const
2019 {
return this->do_get(__in, __end, __io, __err, __v); }
2051 ios_base::iostate& __err,
float& __v)
const
2052 {
return this->do_get(__in, __end, __io, __err, __v); }
2056 ios_base::iostate& __err,
double& __v)
const
2057 {
return this->do_get(__in, __end, __io, __err, __v); }
2061 ios_base::iostate& __err,
long double& __v)
const
2062 {
return this->do_get(__in, __end, __io, __err, __v); }
2093 ios_base::iostate& __err,
void*& __v)
const
2094 {
return this->do_get(__in, __end, __io, __err, __v); }
2101 _M_extract_float(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2104 template<
typename _ValueT>
2106 _M_extract_int(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2109 template<
typename _CharT2>
2110 typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
int>::__type
2111 _M_find(
const _CharT2*,
size_t __len, _CharT2 __c)
const
2116 if (__c >= _CharT2(
'0') && __c < _CharT2(_CharT2(
'0') + __len))
2117 __ret = __c - _CharT2(
'0');
2121 if (__c >= _CharT2(
'0') && __c <= _CharT2(
'9'))
2122 __ret = __c - _CharT2(
'0');
2123 else if (__c >= _CharT2(
'a') && __c <= _CharT2(
'f'))
2124 __ret = 10 + (__c - _CharT2(
'a'));
2125 else if (__c >= _CharT2(
'A') && __c <= _CharT2(
'F'))
2126 __ret = 10 + (__c - _CharT2(
'A'));
2131 template<
typename _CharT2>
2132 typename __gnu_cxx::__enable_if<!__is_char<_CharT2>::__value,
2134 _M_find(
const _CharT2* __zero,
size_t __len, _CharT2 __c)
const
2137 const char_type* __q = char_traits<_CharT2>::find(__zero, __len, __c);
2140 __ret = __q - __zero;
2163 do_get(iter_type, iter_type, ios_base&, ios_base::iostate&,
bool&)
const;
2167 ios_base::iostate& __err,
long& __v)
const
2168 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2172 ios_base::iostate& __err,
unsigned short& __v)
const
2173 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2177 ios_base::iostate& __err,
unsigned int& __v)
const
2178 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2182 ios_base::iostate& __err,
unsigned long& __v)
const
2183 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2185 #ifdef _GLIBCXX_USE_LONG_LONG
2188 ios_base::iostate& __err,
long long& __v)
const
2189 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2193 ios_base::iostate& __err,
unsigned long long& __v)
const
2194 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2198 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate& __err,
2202 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate& __err,
2206 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
2208 __do_get(iter_type, iter_type,
ios_base&, ios_base::iostate& __err,
2212 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate& __err,
2213 long double&)
const;
2217 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate& __err,
2221 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
2223 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate& __err,
2224 long double&)
const;
2229 template<
typename _CharT,
typename _InIter>
2230 locale::id num_get<_CharT, _InIter>::id;
2244 template<
typename _CharT,
typename _OutIter>
2285 {
return this->do_put(__s, __f, __fill, __v); }
2327 {
return this->do_put(__s, __f, __fill, __v); }
2331 unsigned long __v)
const
2332 {
return this->do_put(__s, __f, __fill, __v); }
2334 #ifdef _GLIBCXX_USE_LONG_LONG
2337 {
return this->do_put(__s, __f, __fill, __v); }
2341 unsigned long long __v)
const
2342 {
return this->do_put(__s, __f, __fill, __v); }
2390 {
return this->do_put(__s, __f, __fill, __v); }
2394 long double __v)
const
2395 {
return this->do_put(__s, __f, __fill, __v); }
2415 const void* __v)
const
2416 {
return this->do_put(__s, __f, __fill, __v); }
2419 template<
typename _ValueT>
2421 _M_insert_float(iter_type,
ios_base& __io, char_type __fill,
2422 char __mod, _ValueT __v)
const;
2425 _M_group_float(
const char* __grouping,
size_t __grouping_size,
2426 char_type __sep,
const char_type* __p, char_type* __new,
2427 char_type* __cs,
int& __len)
const;
2429 template<
typename _ValueT>
2431 _M_insert_int(iter_type,
ios_base& __io, char_type __fill,
2435 _M_group_int(
const char* __grouping,
size_t __grouping_size,
2436 char_type __sep,
ios_base& __io, char_type* __new,
2437 char_type* __cs,
int& __len)
const;
2441 char_type* __new,
const char_type* __cs,
int& __len)
const;
2462 do_put(iter_type,
ios_base&, char_type __fill,
bool __v)
const;
2466 {
return _M_insert_int(__s, __io, __fill, __v); }
2470 unsigned long __v)
const
2471 {
return _M_insert_int(__s, __io, __fill, __v); }
2473 #ifdef _GLIBCXX_USE_LONG_LONG
2476 long long __v)
const
2477 {
return _M_insert_int(__s, __io, __fill, __v); }
2481 unsigned long long __v)
const
2482 {
return _M_insert_int(__s, __io, __fill, __v); }
2486 do_put(iter_type,
ios_base&, char_type __fill,
double __v)
const;
2489 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
2491 __do_put(iter_type,
ios_base&, char_type __fill,
double __v)
const;
2494 do_put(iter_type,
ios_base&, char_type __fill,
long double __v)
const;
2498 do_put(iter_type,
ios_base&, char_type __fill,
const void* __v)
const;
2501 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
2503 do_put(iter_type,
ios_base&, char_type __fill,
long double __v)
const;
2508 template <
typename _CharT,
typename _OutIter>
2509 locale::id num_put<_CharT, _OutIter>::id;
2511 _GLIBCXX_END_LDBL_NAMESPACE
2519 template<
typename _CharT>
2522 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::space, __c); }
2525 template<
typename _CharT>
2528 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::print, __c); }
2531 template<
typename _CharT>
2534 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::cntrl, __c); }
2537 template<
typename _CharT>
2540 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::upper, __c); }
2543 template<
typename _CharT>
2546 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::lower, __c); }
2549 template<
typename _CharT>
2552 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alpha, __c); }
2555 template<
typename _CharT>
2558 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::digit, __c); }
2561 template<
typename _CharT>
2564 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::punct, __c); }
2567 template<
typename _CharT>
2570 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::xdigit, __c); }
2573 template<
typename _CharT>
2576 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alnum, __c); }
2579 template<
typename _CharT>
2582 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::graph, __c); }
2585 template<
typename _CharT>
2588 {
return use_facet<ctype<_CharT> >(__loc).
toupper(__c); }
2591 template<
typename _CharT>
2594 {
return use_facet<ctype<_CharT> >(__loc).
tolower(__c); }
2596 _GLIBCXX_END_NAMESPACE
2598 #ifndef _GLIBCXX_EXPORT_TEMPLATE
_CharT char_type
Public typedefs.
bool islower(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::lower, __c).
_OutIter iter_type
Public typedefs.
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
char_type tolower(char_type __c) const
Convert to lowercase.
iter_type put(iter_type __s, ios_base &__f, char_type __fill, long long __v) const
Numeric formatting.
const char_type * tolower(char_type *__lo, const char_type *__hi) const
Convert array to lowercase.
iter_type put(iter_type __s, ios_base &__f, char_type __fill, double __v) const
Numeric formatting.
string grouping() const
Return grouping specification.
const char * widen(const char *__lo, const char *__hi, char_type *__to) const
Widen char array.
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, unsigned int &__v) const
Numeric parsing.
basic_string< _CharT > string_type
Public typedefs.
char_type decimal_point() const
Return decimal point character.
virtual string do_grouping() const
Return grouping specification.
const char_type * toupper(char_type *__lo, const char_type *__hi) const
Convert array to uppercase.
virtual const char * do_widen(const char *__lo, const char *__hi, char_type *__dest) const
Widen char array.
const mask * table() const
Returns a pointer to the mask table provided to the constructor, or the default from classic_table() ...
_CharT char_type
Public typedefs.
iter_type put(iter_type __s, ios_base &__f, char_type __fill, unsigned long long __v) const
Numeric formatting.
const char_type * is(const char_type *__lo, const char_type *__hi, mask *__vec) const
Return a mask array.
bool ispunct(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::punct, __c).
class ctype_byname [22.2.1.2].
virtual string_type do_falsename() const
Return string representation of bool false.
string_type truename() const
Return string representation of bool true.
numpunct(__c_locale __cloc, size_t __refs=0)
Internal constructor. Not for general use.
char_type toupper(char_type __c) const
Convert to uppercase.
char narrow(char_type __c, char __dfault) const
Narrow char.
_CharT char_type
Public typedefs.
num_get(size_t __refs=0)
Constructor performs initialization.
const char_type * narrow(const char_type *__lo, const char_type *__hi, char __dfault, char *__to) const
Narrow array to char array.
string_type falsename() const
Return string representation of bool false.
static locale::id id
Numpunct facet id.
iter_type put(iter_type __s, ios_base &__f, char_type __fill, bool __v) const
Numeric formatting.
Localization functionality base class.
virtual string_type do_truename() const
Return string representation of bool true.
The base of the I/O class hierarchy.This class defines everything that can be defined about I/O that ...
bool isprint(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::print, __c).
_GLIBCXX_END_LDBL_NAMESPACE bool isspace(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::space, __c).
wchar_t char_type
Typedef for the template parameter wchar_t.
const char_type * tolower(char_type *__lo, const char_type *__hi) const
Convert array to lowercase.
num_put(size_t __refs=0)
Constructor performs initialization.
static locale::id id
The facet id for ctype<wchar_t>
bool isdigit(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::digit, __c).
bool iscntrl(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::cntrl, __c).
virtual char_type do_thousands_sep() const
Return thousands separator character.
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 __v) const
Numeric formatting.
const char * widen(const char *__lo, const char *__hi, char_type *__to) const
Widen array to char_type.
char narrow(char_type __c, char __dfault) const
Narrow char_type to char.
_CharT char_type
Typedef for the template parameter.
class numpunct_byname [22.2.3.2].
bool isgraph(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::graph, __c).
const char_type * scan_not(mask __m, const char_type *__lo, const char_type *__hi) const
Find char_type not matching a mask.
char_type widen(char __c) const
Widen char.
bool isxdigit(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::xdigit, __c).
virtual const char_type * do_narrow(const char_type *__lo, const char_type *__hi, char, char *__dest) const
Narrow char array to char array.
bool is(mask __m, char_type __c) const
Test char_type classification.
char_type widen(char __c) const
Widen char to char_type.
_CharT tolower(_CharT __c, const locale &__loc)
Convenience interface to ctype.tolower(__c).
static locale::id id
The facet id for ctype<char_type>
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 &__f, char_type __fill, unsigned long __v) const
Numeric formatting.
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.
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, unsigned long long __v) const
Numeric formatting.
virtual char_type do_decimal_point() const
Return decimal point character.
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, long __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 &__f, char_type __fill, long double __v) const
Numeric formatting.
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 &__v) const
Numeric parsing.
Container class for localization functionality.
iter_type put(iter_type __s, ios_base &__f, char_type __fill, long __v) const
Numeric formatting.
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, long long __v) const
Numeric formatting.
virtual char do_narrow(char_type __c, char) const
Narrow char.
virtual ~num_put()
Destructor.
bool isalpha(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::alpha, __c).
Facet for converting numbers to strings.
Common base for ctype facet.
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 tolower(char_type __c) const
Convert to lowercase.
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.
virtual ~num_get()
Destructor.
iter_type put(iter_type __s, ios_base &__f, char_type __fill, const void *__v) const
Numeric formatting.
numpunct(size_t __refs=0)
Numpunct constructor.
char_type toupper(char_type __c) const
Convert to uppercase.
bool isupper(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::upper, __c).
_InIter iter_type
Public typedefs.
char char_type
Typedef for the template parameter char.
const char_type * narrow(const char_type *__lo, const char_type *__hi, char __dfault, char *__to) const
Narrow char array.
static locale::id id
Numpunct facet id.
numpunct(__cache_type *__cache, size_t __refs=0)
Internal constructor. Not for general use.
char_type thousands_sep() const
Return thousands separator character.
bool isalnum(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::alnum, __c).
Facet for parsing number strings.
Managing sequences of characters and character-like objects.
const char_type * scan_is(mask __m, const char_type *__lo, const char_type *__hi) const
Find char_type matching a mask.