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
58 # define _GLIBCXX_NUM_FACETS 14
64 template<
typename _Tp>
67 const __c_locale&) throw();
72 __convert_to_v(const
char*,
float&, ios_base::iostate&,
73 const __c_locale&) throw();
77 __convert_to_v(const
char*,
double&, ios_base::iostate&,
78 const __c_locale&) throw();
82 __convert_to_v(const
char*,
long double&, ios_base::iostate&,
83 const __c_locale&) throw();
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)
142 template<
typename _CharT>
162 is(mask __m, char_type __c)
const
163 {
return this->
do_is(__m, __c); }
179 is(
const char_type *__lo,
const char_type *__hi, mask *__vec)
const
180 {
return this->
do_is(__lo, __hi, __vec); }
195 scan_is(mask __m,
const char_type* __lo,
const char_type* __hi)
const
211 scan_not(mask __m,
const char_type* __lo,
const char_type* __hi)
const
240 toupper(char_type *__lo,
const char_type* __hi)
const
269 tolower(char_type* __lo,
const char_type* __hi)
const
305 widen(
const char* __lo,
const char* __hi, char_type* __to)
const
306 {
return this->
do_widen(__lo, __hi, __to); }
324 narrow(char_type __c,
char __dfault)
const
325 {
return this->
do_narrow(__c, __dfault); }
346 narrow(
const char_type* __lo,
const char_type* __hi,
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*
410 const char_type* __hi)
const = 0;
427 virtual const char_type*
429 const char_type* __hi)
const = 0;
462 virtual const char_type*
463 do_toupper(char_type* __lo,
const char_type* __hi)
const = 0;
495 virtual const char_type*
496 do_tolower(char_type* __lo,
const char_type* __hi)
const = 0;
536 do_widen(
const char* __lo,
const char* __hi, char_type* __to)
const = 0;
557 do_narrow(char_type __c,
char __dfault)
const = 0;
581 virtual const char_type*
582 do_narrow(
const char_type* __lo,
const char_type* __hi,
583 char __dfault,
char* __to)
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*
633 const char_type* __hi)
const;
638 virtual const char_type*
639 do_toupper(char_type* __lo,
const char_type* __hi)
const;
644 virtual const char_type*
645 do_tolower(char_type* __lo,
const char_type* __hi)
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* __to)
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;
812 toupper(char_type *__lo,
const char_type* __hi)
const
845 tolower(char_type* __lo,
const char_type* __hi)
const
868 return _M_widen[
static_cast<unsigned char>(__c)];
869 this->_M_widen_init();
892 widen(
const char* __lo,
const char* __hi, char_type* __to)
const
894 if (_M_widen_ok == 1)
896 __builtin_memcpy(__to, __lo, __hi - __lo);
901 return this->
do_widen(__lo, __hi, __to);
923 narrow(char_type __c,
char __dfault)
const
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;
956 narrow(
const char_type* __lo,
const char_type* __hi,
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();
1021 virtual const char_type*
1022 do_toupper(char_type* __lo, const char_type* __hi) const;
1054 virtual const char_type*
1055 do_tolower(char_type* __lo, const char_type* __hi) const;
1098 do_widen(
const char* __lo,
const char* __hi, char_type* __to)
const
1100 __builtin_memcpy(__to, __lo, __hi - __lo);
1149 virtual const char_type*
1151 char __dfault,
char* __to)
const
1153 __builtin_memcpy(__to, __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 throw();
1243 do_is(mask __m, char_type __c)
const;
1261 virtual const char_type*
1262 do_is(
const char_type* __lo,
const char_type* __hi, mask* __vec)
const;
1279 virtual const char_type*
1280 do_scan_is(mask __m,
const char_type* __lo,
const char_type* __hi)
const;
1297 virtual const char_type*
1299 const char_type* __hi)
const;
1331 virtual const char_type*
1332 do_toupper(char_type* __lo,
const char_type* __hi)
const;
1364 virtual const char_type*
1365 do_tolower(char_type* __lo,
const char_type* __hi)
const;
1407 do_widen(
const char* __lo,
const char* __hi, char_type* __to)
const;
1430 do_narrow(char_type __c,
char __dfault)
const;
1455 virtual const char_type*
1456 do_narrow(
const char_type* __lo,
const char_type* __hi,
1457 char __dfault,
char* __to)
const;
1461 _M_initialize_ctype() throw();
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_VERSION
1513 namespace std _GLIBCXX_VISIBILITY(default)
1515 _GLIBCXX_BEGIN_NAMESPACE_VERSION
1530 _S_odigits_end = _S_odigits + 16,
1531 _S_oudigits = _S_odigits_end,
1532 _S_oudigits_end = _S_oudigits + 16,
1533 _S_oe = _S_odigits + 14,
1534 _S_oE = _S_oudigits + 14,
1535 _S_oend = _S_oudigits_end
1543 static const char* _S_atoms_out;
1547 static const char* _S_atoms_in;
1556 _S_ie = _S_izero + 14,
1557 _S_iE = _S_izero + 20,
1564 _S_format_float(
const ios_base& __io,
char* __fptr,
char __mod)
throw();
1567 template<
typename _CharT>
1568 struct __numpunct_cache :
public locale::facet
1570 const char* _M_grouping;
1571 size_t _M_grouping_size;
1572 bool _M_use_grouping;
1573 const _CharT* _M_truename;
1574 size_t _M_truename_size;
1575 const _CharT* _M_falsename;
1576 size_t _M_falsename_size;
1577 _CharT _M_decimal_point;
1578 _CharT _M_thousands_sep;
1584 _CharT _M_atoms_out[__num_base::_S_oend];
1590 _CharT _M_atoms_in[__num_base::_S_iend];
1594 __numpunct_cache(
size_t __refs = 0)
1595 :
facet(__refs), _M_grouping(0), _M_grouping_size(0),
1596 _M_use_grouping(false),
1597 _M_truename(0), _M_truename_size(0), _M_falsename(0),
1598 _M_falsename_size(0), _M_decimal_point(_CharT()),
1599 _M_thousands_sep(_CharT()), _M_allocated(false)
1602 ~__numpunct_cache();
1605 _M_cache(
const locale& __loc);
1609 operator=(
const __numpunct_cache&);
1612 __numpunct_cache(
const __numpunct_cache&);
1615 template<
typename _CharT>
1616 __numpunct_cache<_CharT>::~__numpunct_cache()
1620 delete [] _M_grouping;
1621 delete [] _M_truename;
1622 delete [] _M_falsename;
1640 template<
typename _CharT>
1650 typedef __numpunct_cache<_CharT> __cache_type;
1653 __cache_type* _M_data;
1666 :
facet(__refs), _M_data(0)
1667 { _M_initialize_numpunct(); }
1680 :
facet(__refs), _M_data(__cache)
1681 { _M_initialize_numpunct(); }
1694 :
facet(__refs), _M_data(0)
1695 { _M_initialize_numpunct(__cloc); }
1795 {
return _M_data->_M_decimal_point; }
1807 {
return _M_data->_M_thousands_sep; }
1820 {
return _M_data->_M_grouping; }
1833 {
return _M_data->_M_truename; }
1846 {
return _M_data->_M_falsename; }
1850 _M_initialize_numpunct(__c_locale __cloc = 0);
1853 template<
typename _CharT>
1854 locale::id numpunct<_CharT>::id;
1861 numpunct<char>::_M_initialize_numpunct(__c_locale __cloc);
1863 #ifdef _GLIBCXX_USE_WCHAR_T
1869 numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc);
1873 template<
typename _CharT>
1877 typedef _CharT char_type;
1884 if (__builtin_strcmp(__s,
"C") != 0
1885 && __builtin_strcmp(__s,
"POSIX") != 0)
1888 this->_S_create_c_locale(__tmp, __s);
1889 this->_M_initialize_numpunct(__tmp);
1890 this->_S_destroy_c_locale(__tmp);
1899 _GLIBCXX_BEGIN_NAMESPACE_LDBL
1914 template<
typename _CharT,
typename _InIter>
1963 ios_base::iostate& __err,
bool& __v)
const
1964 {
return this->
do_get(__in, __end, __io, __err, __v); }
2000 ios_base::iostate& __err,
long& __v)
const
2001 {
return this->
do_get(__in, __end, __io, __err, __v); }
2005 ios_base::iostate& __err,
unsigned short& __v)
const
2006 {
return this->
do_get(__in, __end, __io, __err, __v); }
2010 ios_base::iostate& __err,
unsigned int& __v)
const
2011 {
return this->
do_get(__in, __end, __io, __err, __v); }
2015 ios_base::iostate& __err,
unsigned long& __v)
const
2016 {
return this->
do_get(__in, __end, __io, __err, __v); }
2018 #ifdef _GLIBCXX_USE_LONG_LONG
2021 ios_base::iostate& __err,
long long& __v)
const
2022 {
return this->
do_get(__in, __end, __io, __err, __v); }
2026 ios_base::iostate& __err,
unsigned long long& __v)
const
2027 {
return this->
do_get(__in, __end, __io, __err, __v); }
2060 ios_base::iostate& __err,
float& __v)
const
2061 {
return this->
do_get(__in, __end, __io, __err, __v); }
2065 ios_base::iostate& __err,
double& __v)
const
2066 {
return this->
do_get(__in, __end, __io, __err, __v); }
2070 ios_base::iostate& __err,
long double& __v)
const
2071 {
return this->
do_get(__in, __end, __io, __err, __v); }
2103 ios_base::iostate& __err,
void*& __v)
const
2104 {
return this->
do_get(__in, __end, __io, __err, __v); }
2111 _M_extract_float(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2114 template<
typename _ValueT>
2116 _M_extract_int(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2119 template<
typename _CharT2>
2120 typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
int>::__type
2121 _M_find(
const _CharT2*,
size_t __len, _CharT2 __c)
const
2126 if (__c >= _CharT2(
'0') && __c < _CharT2(_CharT2(
'0') + __len))
2127 __ret = __c - _CharT2(
'0');
2131 if (__c >= _CharT2(
'0') && __c <= _CharT2(
'9'))
2132 __ret = __c - _CharT2(
'0');
2133 else if (__c >= _CharT2(
'a') && __c <= _CharT2(
'f'))
2134 __ret = 10 + (__c - _CharT2(
'a'));
2135 else if (__c >= _CharT2(
'A') && __c <= _CharT2(
'F'))
2136 __ret = 10 + (__c - _CharT2(
'A'));
2141 template<
typename _CharT2>
2142 typename __gnu_cxx::__enable_if<!__is_char<_CharT2>::__value,
2144 _M_find(
const _CharT2* __zero,
size_t __len, _CharT2 __c)
const
2147 const char_type* __q = char_traits<_CharT2>::find(__zero, __len, __c);
2150 __ret = __q - __zero;
2177 ios_base::iostate& __err,
long& __v)
const
2178 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2182 ios_base::iostate& __err,
unsigned short& __v)
const
2183 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2187 ios_base::iostate& __err,
unsigned int& __v)
const
2188 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2192 ios_base::iostate& __err,
unsigned long& __v)
const
2193 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2195 #ifdef _GLIBCXX_USE_LONG_LONG
2198 ios_base::iostate& __err,
long long& __v)
const
2199 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2203 ios_base::iostate& __err,
unsigned long long& __v)
const
2204 {
return _M_extract_int(__beg, __end, __io, __err, __v); }
2208 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
float&)
const;
2215 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
2217 __do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
2222 long double&)
const;
2226 do_get(iter_type, iter_type,
ios_base&, ios_base::iostate&,
void*&)
const;
2229 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
2232 long double&)
const;
2237 template<
typename _CharT,
typename _InIter>
2238 locale::id num_get<_CharT, _InIter>::id;
2253 template<
typename _CharT,
typename _OutIter>
2294 {
return this->
do_put(__s, __io, __fill, __v); }
2336 {
return this->
do_put(__s, __io, __fill, __v); }
2340 unsigned long __v)
const
2341 {
return this->
do_put(__s, __io, __fill, __v); }
2343 #ifdef _GLIBCXX_USE_LONG_LONG
2345 put(iter_type __s,
ios_base& __io, char_type __fill,
long long __v)
const
2346 {
return this->
do_put(__s, __io, __fill, __v); }
2350 unsigned long long __v)
const
2351 {
return this->
do_put(__s, __io, __fill, __v); }
2398 put(iter_type __s,
ios_base& __io, char_type __fill,
double __v)
const
2399 {
return this->
do_put(__s, __io, __fill, __v); }
2403 long double __v)
const
2404 {
return this->
do_put(__s, __io, __fill, __v); }
2424 const void* __v)
const
2425 {
return this->
do_put(__s, __io, __fill, __v); }
2428 template<
typename _ValueT>
2430 _M_insert_float(iter_type,
ios_base& __io, char_type __fill,
2431 char __mod, _ValueT __v)
const;
2434 _M_group_float(
const char* __grouping,
size_t __grouping_size,
2435 char_type __sep,
const char_type* __p, char_type* __new,
2436 char_type* __cs,
int& __len)
const;
2438 template<
typename _ValueT>
2440 _M_insert_int(iter_type,
ios_base& __io, char_type __fill,
2444 _M_group_int(
const char* __grouping,
size_t __grouping_size,
2445 char_type __sep,
ios_base& __io, char_type* __new,
2446 char_type* __cs,
int& __len)
const;
2450 char_type* __new,
const char_type* __cs,
int& __len)
const;
2471 do_put(iter_type __s,
ios_base& __io, char_type __fill,
bool __v)
const;
2475 {
return _M_insert_int(__s, __io, __fill, __v); }
2479 unsigned long __v)
const
2480 {
return _M_insert_int(__s, __io, __fill, __v); }
2482 #ifdef _GLIBCXX_USE_LONG_LONG
2485 long long __v)
const
2486 {
return _M_insert_int(__s, __io, __fill, __v); }
2490 unsigned long long __v)
const
2491 {
return _M_insert_int(__s, __io, __fill, __v); }
2498 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
2500 __do_put(iter_type,
ios_base&, char_type,
double)
const;
2510 #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
2517 template <
typename _CharT,
typename _OutIter>
2518 locale::id num_put<_CharT, _OutIter>::id;
2520 _GLIBCXX_END_NAMESPACE_LDBL
2528 template<
typename _CharT>
2531 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::space, __c); }
2534 template<
typename _CharT>
2537 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::print, __c); }
2540 template<
typename _CharT>
2543 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::cntrl, __c); }
2546 template<
typename _CharT>
2549 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::upper, __c); }
2552 template<
typename _CharT>
2555 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::lower, __c); }
2558 template<
typename _CharT>
2561 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alpha, __c); }
2564 template<
typename _CharT>
2567 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::digit, __c); }
2570 template<
typename _CharT>
2573 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::punct, __c); }
2576 template<
typename _CharT>
2579 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::xdigit, __c); }
2582 template<
typename _CharT>
2585 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alnum, __c); }
2588 template<
typename _CharT>
2591 {
return use_facet<ctype<_CharT> >(__loc).is(ctype_base::graph, __c); }
2594 template<
typename _CharT>
2597 {
return use_facet<ctype<_CharT> >(__loc).
toupper(__c); }
2600 template<
typename _CharT>
2603 {
return use_facet<ctype<_CharT> >(__loc).
tolower(__c); }
2605 _GLIBCXX_END_NAMESPACE_VERSION
2608 # include <bits/locale_facets.tcc>
Container class for localization functionality.The locale class is first a class wrapper for C librar...
virtual char do_narrow(char_type __c, char __dfault) const
Narrow char.
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, unsigned int &__v) const
Numeric parsing.
Primary class template ctype facet.This template class defines classification and conversion function...
virtual bool do_is(mask __m, char_type __c) const
Test char_type classification.
_CharT char_type
Typedef for the template parameter.
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, unsigned long &__v) const
Numeric parsing.
virtual char do_narrow(char_type, char __dfault) const
Narrow char_type to char.
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
Find char_type matching mask.
Primary class template num_get.This facet encapsulates the code to parse and return a number from a s...
const char_type * toupper(char_type *__lo, const char_type *__hi) const
Convert array to uppercase.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, unsigned long __v) const
Numeric formatting.
string grouping() const
Return grouping specification.
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.
virtual ~num_put()
Destructor.
Common base for ctype facet.
char_type widen(char __c) const
Widen char.
class numpunct_byname [22.2.3.2].
virtual string_type do_truename() const
Return string representation of bool true.
bool isdigit(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::digit, __c).
virtual string_type do_falsename() const
Return string representation of bool false.
const char_type * tolower(char_type *__lo, const char_type *__hi) const
Convert array to lowercase.
virtual char_type do_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, unsigned short &__v) const
Numeric parsing.
const char_type * scan_is(mask __m, const char_type *__lo, const char_type *__hi) const
Find char_type matching a mask.
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.
virtual char do_narrow(char_type __c, char __dfault) const =0
Narrow char_type to char.
_CharT char_type
Public typedefs.
virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base &__io, ios_base::iostate &__err, long long &__v) const
Numeric parsing.
num_get(size_t __refs=0)
Constructor performs initialization.
wchar_t char_type
Typedef for the template parameter wchar_t.
const char_type * scan_not(mask __m, const char_type *__lo, const char_type *__hi) const
Find char_type not matching a mask.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, long double __v) const
Numeric formatting.
_CharT tolower(_CharT __c, const locale &__loc)
Convenience interface to ctype.tolower(__c).
bool isspace(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::space, __c).
char_type widen(char __c) const
Widen char to char_type.
virtual ~num_get()
Destructor.
Primary class template numpunct.This facet stores several pieces of information related to printing a...
_CharT char_type
Public typedefs.
bool isgraph(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::graph, __c).
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, long long __v) const
Numeric formatting.
_OutIter iter_type
Public typedefs.
virtual char_type do_tolower(char_type __c) const =0
Convert to lowercase.
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
virtual const char_type * do_scan_is(mask __m, const char_type *__lo, const char_type *__hi) const =0
Find char_type matching mask.
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.
const char * widen(const char *__lo, const char *__hi, char_type *__to) const
Widen char array.
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, long __v) const
Numeric formatting.
ISO C++ entities toplevel namespace is std.
num_put(size_t __refs=0)
Constructor performs initialization.
char_type tolower(char_type __c) const
Convert to lowercase.
char char_type
Typedef for the template parameter char.
char_type toupper(char_type __c) const
Convert to uppercase.
virtual string do_grouping() const
Return grouping specification.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, long __v) const
Numeric formatting.
numpunct(__cache_type *__cache, size_t __refs=0)
Internal constructor. Not for general use.
virtual char_type do_decimal_point() const
Return decimal point character.
virtual char_type do_toupper(char_type __c) const
Convert to uppercase.
virtual iter_type do_get(iter_type, iter_type, ios_base &, ios_base::iostate &, bool &) const
Numeric parsing.
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, bool __v) const
Numeric formatting.
bool isupper(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::upper, __c).
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.
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.
static locale::id id
The facet id for ctype
iter_type put(iter_type __s, ios_base &__io, char_type __fill, long long __v) const
Numeric formatting.
bool ispunct(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::punct, __c).
_Ios_Iostate iostate
This is a bitmask type.
_InIter iter_type
Public typedefs.
numpunct(size_t __refs=0)
Numpunct constructor.
const char_type * narrow(const char_type *__lo, const char_type *__hi, char __dfault, char *__to) const
Narrow char array.
char_type toupper(char_type __c) const
Convert to uppercase.
const mask * table() const
Returns a pointer to the mask table provided to the constructor, or the default from classic_table() ...
char_type thousands_sep() const
Return thousands separator character.
string_type truename() const
Return string representation of bool true.
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, unsigned long long __v) const
Numeric formatting.
class ctype_byname [22.2.1.2].
static locale::id id
The facet id for ctype
basic_string< _CharT > string_type
Public typedefs.
virtual char_type do_thousands_sep() const
Return thousands separator character.
virtual ~numpunct()
Destructor.
Primary class template num_put.This facet encapsulates the code to convert a number to a string...
char narrow(char_type __c, char __dfault) const
Narrow char.
virtual const char * do_widen(const char *__lo, const char *__hi, char_type *__to) const
Widen char array.
The base of the I/O class hierarchy.This class defines everything that can be defined about I/O that ...
const char_type * narrow(const char_type *__lo, const char_type *__hi, char __dfault, char *__to) const
Narrow array to char array.
virtual char_type do_widen(char __c) const =0
Widen char.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, double __v) const
Numeric formatting.
bool is(mask __m, char_type __c) const
Test char_type classification.
bool isalnum(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::alnum, __c).
iter_type put(iter_type __s, ios_base &__io, char_type __fill, unsigned long long __v) const
Numeric formatting.
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.
bool isxdigit(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::xdigit, __c).
Localization functionality base class.The facet class is the base class for a localization feature...
static locale::id id
Numpunct facet id.
_CharT toupper(_CharT __c, const locale &__loc)
Convenience interface to ctype.toupper(__c).
static locale::id id
The facet id for ctype
facet(size_t __refs=0)
Facet constructor.
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 char_type do_toupper(char_type __c) const =0
Convert to uppercase.
virtual char_type do_widen(char __c) const
Widen char.
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, const void *__v) const
Numeric formatting.
bool isalpha(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::alpha, __c).
_CharT char_type
Public typedefs.
virtual iter_type do_put(iter_type __s, ios_base &__io, char_type __fill, unsigned long __v) const
Numeric formatting.
bool islower(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::lower, __c).
string_type falsename() const
Return string representation of bool false.
bool isprint(_CharT __c, const locale &__loc)
Convenience interface to ctype.is(ctype_base::print, __c).
char_type decimal_point() const
Return decimal point character.
iter_type put(iter_type __s, ios_base &__io, char_type __fill, bool __v) const
Numeric formatting.
virtual const char_type * do_scan_not(mask __m, const char_type *__lo, const char_type *__hi) const
Find char_type not matching mask.
const char_type * is(const char_type *__lo, const char_type *__hi, mask *__vec) const
Return a mask array.
static locale::id id
Numpunct facet id.