#include <locale_facets.h>
Inheritance diagram for std::num_get< _CharT, _InIter >:
Public Types | |
typedef _CharT | char_type |
Public typedefs. | |
typedef _InIter | iter_type |
Public Member Functions | |
num_get (size_t __refs=0) | |
Constructor performs initialization. | |
iter_type | get (iter_type __in, iter_type __end, ios_base &__io, ios_base::iostate &__err, bool &__v) const |
Numeric parsing. | |
iter_type | get (iter_type __in, iter_type __end, ios_base &__io, ios_base::iostate &__err, void *&__v) const |
Numeric parsing. | |
iter_type | get (iter_type __in, iter_type __end, ios_base &__io, ios_base::iostate &__err, long &__v) const |
Numeric parsing. | |
iter_type | get (iter_type __in, iter_type __end, ios_base &__io, ios_base::iostate &__err, unsigned short &__v) const |
iter_type | get (iter_type __in, iter_type __end, ios_base &__io, ios_base::iostate &__err, unsigned int &__v) const |
iter_type | get (iter_type __in, iter_type __end, ios_base &__io, ios_base::iostate &__err, unsigned long &__v) const |
iter_type | get (iter_type __in, iter_type __end, ios_base &__io, ios_base::iostate &__err, float &__v) const |
Numeric parsing. | |
iter_type | get (iter_type __in, iter_type __end, ios_base &__io, ios_base::iostate &__err, double &__v) const |
iter_type | get (iter_type __in, iter_type __end, ios_base &__io, ios_base::iostate &__err, long double &__v) const |
Static Public Attributes | |
locale::id | id |
Numpunct facet id. | |
Protected Member Functions | |
virtual | ~num_get () |
Destructor. | |
iter_type | _M_extract_float (iter_type, iter_type, ios_base &, ios_base::iostate &, string &__xtrc) const |
template<typename _ValueT> iter_type | _M_extract_int (iter_type, iter_type, ios_base &, ios_base::iostate &, _ValueT &__v) const |
virtual iter_type | do_get (iter_type, iter_type, ios_base &, ios_base::iostate &, bool &) const |
Numeric parsing. | |
virtual iter_type | do_get (iter_type, iter_type, ios_base &, ios_base::iostate &, long &) const |
virtual iter_type | do_get (iter_type, iter_type, ios_base &, ios_base::iostate &__err, unsigned short &) const |
virtual iter_type | do_get (iter_type, iter_type, ios_base &, ios_base::iostate &__err, unsigned int &) const |
virtual iter_type | do_get (iter_type, iter_type, ios_base &, ios_base::iostate &__err, unsigned long &) const |
virtual iter_type | do_get (iter_type, iter_type, ios_base &, ios_base::iostate &__err, float &) const |
virtual iter_type | do_get (iter_type, iter_type, ios_base &, ios_base::iostate &__err, double &) const |
virtual iter_type | do_get (iter_type, iter_type, ios_base &, ios_base::iostate &__err, long double &) const |
virtual iter_type | do_get (iter_type, iter_type, ios_base &, ios_base::iostate &__err, void *&) const |
This facet encapsulates the code to parse and return a number from a string. It is used by the istream numeric extraction operators.
The num_get template uses protected virtual functions to provide the actual results. The public accessors forward the call to the virtual functions. These virtual functions are hooks for developers to implement the behavior they require from the num_get facet.
Definition at line 2402 of file locale_facets.h.
|
Public typedefs.
Definition at line 2408 of file locale_facets.h. |
|
Definition at line 2409 of file locale_facets.h. Referenced by std::num_get< _CharT, _InIter >::do_get(), and std::num_get< _CharT, _InIter >::num_get(). |
|
Constructor performs initialization. This is the constructor provided by the standard.
Definition at line 2423 of file locale_facets.h. References std::num_get< _CharT, _InIter >::iter_type. |
|
Destructor.
Definition at line 2592 of file locale_facets.h. |
|
Referenced by std::num_get< _CharT, _InIter >::do_get(). |
|
Referenced by std::num_get< _CharT, _InIter >::do_get(). |
|
Definition at line 775 of file locale_facets.tcc. References std::num_get< _CharT, _InIter >::_M_extract_int(), std::ios_base::flags(), std::ios_base::fmtflags, std::ios_base::iostate, and std::num_get< _CharT, _InIter >::iter_type. |
|
|
|
|
Definition at line 713 of file locale_facets.tcc. References std::num_get< _CharT, _InIter >::_M_extract_int(), std::ios_base::iostate, and std::num_get< _CharT, _InIter >::iter_type. |
|
Definition at line 706 of file locale_facets.tcc. References std::num_get< _CharT, _InIter >::_M_extract_int(), std::ios_base::iostate, and std::num_get< _CharT, _InIter >::iter_type. |
|
Definition at line 699 of file locale_facets.tcc. References std::num_get< _CharT, _InIter >::_M_extract_int(), std::ios_base::iostate, and std::num_get< _CharT, _InIter >::iter_type. |
|
Definition at line 692 of file locale_facets.tcc. References std::num_get< _CharT, _InIter >::_M_extract_int(), std::ios_base::iostate, and std::num_get< _CharT, _InIter >::iter_type. |
|
Numeric parsing. Parses the input stream into the variable v. This function is a hook for derived classes to change the value returned.
Definition at line 632 of file locale_facets.tcc. References std::num_get< _CharT, _InIter >::_M_extract_int(), std::ios_base::_M_getloc(), std::ios_base::flags(), std::ios_base::iostate, and std::num_get< _CharT, _InIter >::iter_type. Referenced by std::__numpunct_cache< _CharT >::~__numpunct_cache(). |
|
Numeric parsing. Parses the input stream into the pointer variable v. It does so by calling num_put::do_put(). The input characters are parsed like the scanf p specifier. Digit grouping is intrepreted according to numpunct::grouping() and numpunct::thousands_sep(). If the pattern of digit groups isn't consistent, sets err to ios_base::failbit. Note that the digit grouping effect for pointers is a bit ambiguous in the standard and shouldn't be relied on. See DR 344. If parsing the string yields a valid value for v, v is set. Otherwise, sets err to ios_base::failbit and leaves v unaltered. Sets err to ios_base::eofbit if the stream is emptied.
Definition at line 2586 of file locale_facets.h. |
|
Definition at line 2554 of file locale_facets.h. |
|
Definition at line 2549 of file locale_facets.h. |
|
Numeric parsing. Parses the input stream into the integral variable v. It does so by calling num_put::do_put(). The input characters are parsed like the scanf g specifier. The matching type length modifier is also used. The decimal point character used is numpunct::decimal_point(). Digit grouping is intrepreted according to numpunct::grouping() and numpunct::thousands_sep(). If the pattern of digit groups isn't consistent, sets err to ios_base::failbit. If parsing the string yields a valid value for v, v is set. Otherwise, sets err to ios_base::failbit and leaves v unaltered. Sets err to ios_base::eofbit if the stream is emptied.
Definition at line 2544 of file locale_facets.h. References std::collate< _CharT >::do_hash(). |
|
Definition at line 2500 of file locale_facets.h. |
|
Definition at line 2495 of file locale_facets.h. References std::__c_locale. |
|
Definition at line 2490 of file locale_facets.h. |
|
Numeric parsing. Parses the input stream into the integral variable v. It does so by calling num_put::do_put(). Parsing is affected by the flag settings in io. The basic parse is affected by the value of io.flags() & ios_base::basefield. If equal to ios_base::oct, parses like the scanf o specifier. Else if equal to ios_base::hex, parses like X specifier. Else if basefield equal to 0, parses like the i specifier. Otherwise, parses like d for signed and u for unsigned types. The matching type length modifier is also used. Digit grouping is intrepreted according to numpunct::grouping() and numpunct::thousands_sep(). If the pattern of digit groups isn't consistent, sets err to ios_base::failbit. If parsing the string yields a valid value for v, v is set. Otherwise, sets err to ios_base::failbit and leaves v unaltered. Sets err to ios_base::eofbit if the stream is emptied.
Definition at line 2485 of file locale_facets.h. |
|
Numeric parsing. Parses the input stream into the bool v. It does so by calling num_put::do_put(). If ios_base::boolalpha is set, attempts to read ctype<CharT>::truename() or ctype<CharT>::falsename(). Sets v to true or false if successful. Sets err to ios_base::failbit if reading the string fails. Sets err to ios_base::eofbit if the stream is emptied. If ios_base::boolalpha is not set, proceeds as with reading a long, except if the value is 1, sets v to true, if the value is 0, sets v to false, and otherwise set err to ios_base::failbit.
Definition at line 2449 of file locale_facets.h. References std::__c_locale, std::collate< _CharT >::_M_c_locale_collate, std::locale::facet::_S_get_c_locale(), std::collate< _CharT >::collate(), and std::locale::facet::facet(). |
|
Numpunct facet id.
Definition at line 2666 of file locale_facets.h. |