.TH "std::money_get< _CharT, _InIter >" 3cxx "Sun Feb 7 2021" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::money_get< _CharT, _InIter > \- Primary class template money_get\&. .SH SYNOPSIS .br .PP .PP Inherits \fBstd::locale::facet\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "typedef _CharT \fBchar_type\fP" .br .RI "Public typedefs\&. " .ti -1c .RI "typedef _InIter \fBiter_type\fP" .br .ti -1c .RI "typedef \fBbasic_string\fP< _CharT > \fBstring_type\fP" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBmoney_get\fP (size_t __refs=0)" .br .RI "Constructor performs initialization\&. " .ti -1c .RI "template _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11 _InIter \fB_M_extract\fP (iter_type __beg, iter_type __end, \fBios_base\fP &__io, \fBios_base::iostate\fP &__err, \fBstring\fP &__units) const" .br .ti -1c .RI "iter_type \fBget\fP (iter_type __s, iter_type __end, bool __intl, \fBios_base\fP &__io, \fBios_base::iostate\fP &__err, long double &__units) const" .br .RI "Read and parse a monetary value\&. " .ti -1c .RI "iter_type \fBget\fP (iter_type __s, iter_type __end, bool __intl, \fBios_base\fP &__io, \fBios_base::iostate\fP &__err, \fBstring_type\fP &__digits) const" .br .RI "Read and parse a monetary value\&. " .in -1c .SS "Static Public Attributes" .in +1c .ti -1c .RI "static \fBlocale::id\fP \fBid\fP" .br .RI "Numpunct facet id\&. " .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual \fB~money_get\fP ()" .br .RI "Destructor\&. " .ti -1c .RI "template iter_type \fB_M_extract\fP (iter_type __s, iter_type __end, \fBios_base\fP &__io, \fBios_base::iostate\fP &__err, \fBstring\fP &__digits) const" .br .ti -1c .RI "virtual iter_type \fBdo_get\fP (iter_type __s, iter_type __end, bool __intl, \fBios_base\fP &__io, \fBios_base::iostate\fP &__err, long double &__units) const" .br .RI "Read and parse a monetary value\&. " .ti -1c .RI "virtual iter_type \fBdo_get\fP (iter_type __s, iter_type __end, bool __intl, \fBios_base\fP &__io, \fBios_base::iostate\fP &__err, \fBstring_type\fP &__digits) const" .br .RI "Read and parse a monetary value\&. " .in -1c .SS "Static Protected Member Functions" .in +1c .ti -1c .RI "static __c_locale \fB_S_clone_c_locale\fP (__c_locale &__cloc) throw ()" .br .ti -1c .RI "static void \fB_S_create_c_locale\fP (__c_locale &__cloc, const char *__s, __c_locale __old=0)" .br .ti -1c .RI "static void \fB_S_destroy_c_locale\fP (__c_locale &__cloc)" .br .ti -1c .RI "static __c_locale \fB_S_get_c_locale\fP ()" .br .ti -1c .RI "static const char * \fB_S_get_c_name\fP () throw ()" .br .ti -1c .RI "static __c_locale \fB_S_lc_ctype_c_locale\fP (__c_locale __cloc, const char *__s)" .br .in -1c .SH "Detailed Description" .PP .SS "template .br class std::money_get< _CharT, _InIter >" Primary class template money_get\&. This facet encapsulates the code to parse and return a monetary amount from a string\&. .PP The money_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 money_get facet\&. .PP Definition at line 1468 of file locale_facets_nonio\&.h\&. .SH "Member Typedef Documentation" .PP .SS "template typedef _CharT \fBstd::money_get\fP< _CharT, _InIter >::\fBchar_type\fP" .PP Public typedefs\&. .PP Definition at line 1474 of file locale_facets_nonio\&.h\&. .SH "Constructor & Destructor Documentation" .PP .SS "template \fBstd::money_get\fP< _CharT, _InIter >::\fBmoney_get\fP (size_t __refs = \fC0\fP)\fC [inline]\fP, \fC [explicit]\fP" .PP Constructor performs initialization\&. This is the constructor provided by the standard\&. .PP \fBParameters\fP .RS 4 \fI__refs\fP Passed to the base facet class\&. .RE .PP .PP Definition at line 1490 of file locale_facets_nonio\&.h\&. .SS "template virtual \fBstd::money_get\fP< _CharT, _InIter >::~\fBmoney_get\fP ()\fC [inline]\fP, \fC [protected]\fP, \fC [virtual]\fP" .PP Destructor\&. .PP Definition at line 1558 of file locale_facets_nonio\&.h\&. .SH "Member Function Documentation" .PP .SS "template _InIter \fBstd::money_get\fP< _CharT, _InIter >::do_get (iter_type __s, iter_type __end, bool __intl, \fBios_base\fP & __io, \fBios_base::iostate\fP & __err, long double & __units) const\fC [protected]\fP, \fC [virtual]\fP" .PP Read and parse a monetary value\&. This function reads and parses characters representing a monetary value\&. This function is a hook for derived classes to change the value returned\&. .PP \fBSee also\fP .RS 4 get() for details\&. .RE .PP .PP Definition at line 370 of file locale_facets_nonio\&.tcc\&. .PP Referenced by std::money_get< _CharT, _InIter >::get()\&. .SS "template _InIter \fBstd::money_get\fP< _CharT, _InIter >::do_get (iter_type __s, iter_type __end, bool __intl, \fBios_base\fP & __io, \fBios_base::iostate\fP & __err, \fBstring_type\fP & __digits) const\fC [protected]\fP, \fC [virtual]\fP" .PP Read and parse a monetary value\&. This function reads and parses characters representing a monetary value\&. This function is a hook for derived classes to change the value returned\&. .PP \fBSee also\fP .RS 4 get() for details\&. .RE .PP .PP Definition at line 383 of file locale_facets_nonio\&.tcc\&. .PP References std::ios_base::_M_getloc(), std::basic_string< _CharT, _Traits, _Alloc >::resize(), and std::__ctype_abstract_base< _CharT >::widen()\&. .SS "template iter_type \fBstd::money_get\fP< _CharT, _InIter >::get (iter_type __s, iter_type __end, bool __intl, \fBios_base\fP & __io, \fBios_base::iostate\fP & __err, long double & __units) const\fC [inline]\fP" .PP Read and parse a monetary value\&. This function reads characters from \fI__s\fP, interprets them as a monetary value according to moneypunct and ctype facets retrieved from io\&.getloc(), and returns the result in \fIunits\fP as an integral value moneypunct::frac_digits() * the actual amount\&. For example, the string $10\&.01 in a US locale would store 1001 in \fIunits\fP\&. .PP Any characters not part of a valid money amount are not consumed\&. .PP If a money value cannot be parsed from the input stream, sets err=(err|io\&.failbit)\&. If the stream is consumed before finishing parsing, sets err=(err|io\&.failbit|io\&.eofbit)\&. \fIunits\fP is unchanged if parsing fails\&. .PP This function works by returning the result of do_get()\&. .PP \fBParameters\fP .RS 4 \fI__s\fP Start of characters to parse\&. .br \fI__end\fP End of characters to parse\&. .br \fI__intl\fP Parameter to use_facet >\&. .br \fI__io\fP Source of facets and io state\&. .br \fI__err\fP Error field to set if parsing fails\&. .br \fI__units\fP Place to store result of parsing\&. .RE .PP \fBReturns\fP .RS 4 Iterator referencing first character beyond valid money amount\&. .RE .PP .PP Definition at line 1520 of file locale_facets_nonio\&.h\&. .PP References std::money_get< _CharT, _InIter >::do_get()\&. .SS "template iter_type \fBstd::money_get\fP< _CharT, _InIter >::get (iter_type __s, iter_type __end, bool __intl, \fBios_base\fP & __io, \fBios_base::iostate\fP & __err, \fBstring_type\fP & __digits) const\fC [inline]\fP" .PP Read and parse a monetary value\&. This function reads characters from \fI__s\fP, interprets them as a monetary value according to moneypunct and ctype facets retrieved from io\&.getloc(), and returns the result in \fIdigits\fP\&. For example, the string $10\&.01 in a US locale would store \fC1001\fP in \fIdigits\fP\&. .PP Any characters not part of a valid money amount are not consumed\&. .PP If a money value cannot be parsed from the input stream, sets err=(err|io\&.failbit)\&. If the stream is consumed before finishing parsing, sets err=(err|io\&.failbit|io\&.eofbit)\&. .PP This function works by returning the result of do_get()\&. .PP \fBParameters\fP .RS 4 \fI__s\fP Start of characters to parse\&. .br \fI__end\fP End of characters to parse\&. .br \fI__intl\fP Parameter to use_facet >\&. .br \fI__io\fP Source of facets and io state\&. .br \fI__err\fP Error field to set if parsing fails\&. .br \fI__digits\fP Place to store result of parsing\&. .RE .PP \fBReturns\fP .RS 4 Iterator referencing first character beyond valid money amount\&. .RE .PP .PP Definition at line 1551 of file locale_facets_nonio\&.h\&. .PP References std::money_get< _CharT, _InIter >::do_get()\&. .SH "Member Data Documentation" .PP .SS "template \fBlocale::id\fP \fBstd::money_get\fP< _CharT, _InIter >::id\fC [static]\fP" .PP Numpunct facet id\&. .PP Definition at line 1480 of file locale_facets_nonio\&.h\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.