.TH "std::money_get< _CharT, _InIter >" 3cxx "Tue Jul 2 2019" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::money_get< _CharT, _InIter > \- Primary class template money_get\&. .PP This facet encapsulates the code to parse and return a monetary amount from a string\&. .SH SYNOPSIS .br .PP .PP Inherits \fBstd::locale::facet\fP\&. .SS "Public Types" .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "typedef _CharT \fBchar_type\fP" .br .RI "Public typedefs\&. " .ti -1c .RI "typedef _InIter \fBiter_type\fP" .br .RI "Public typedefs\&. " .ti -1c .RI "typedef \fBbasic_string\fP< _CharT > \fBstring_type\fP" .br .RI "Public typedefs\&. " .in -1c .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 (\fBiter_type\fP __beg, \fBiter_type\fP __end, \fBios_base\fP &__io, \fBios_base::iostate\fP &__err, \fBstring\fP &__units) const" .br .ti -1c .RI "\fBiter_type\fP \fBget\fP (\fBiter_type\fP __s, \fBiter_type\fP __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 "\fBiter_type\fP \fBget\fP (\fBiter_type\fP __s, \fBiter_type\fP __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 \fBiter_type\fP \fB_M_extract\fP (\fBiter_type\fP __s, \fBiter_type\fP __end, \fBios_base\fP &__io, \fBios_base::iostate\fP &__err, \fBstring\fP &__digits) const" .br .ti -1c .RI "virtual \fBiter_type\fP \fBdo_get\fP (\fBiter_type\fP __s, \fBiter_type\fP __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 \fBiter_type\fP \fBdo_get\fP (\fBiter_type\fP __s, \fBiter_type\fP __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\&. .PP This facet encapsulates the code to parse and return a monetary amount from a string\&. 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\&. .SS "template typedef _InIter \fBstd::money_get\fP< _CharT, _InIter >::\fBiter_type\fP" .PP Public typedefs\&. .PP Definition at line 1475 of file locale_facets_nonio\&.h\&. .SS "template typedef \fBbasic_string\fP<_CharT> \fBstd::money_get\fP< _CharT, _InIter >::\fBstring_type\fP" .PP Public typedefs\&. .PP Definition at line 1476 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 (\fBiter_type\fP __s, \fBiter_type\fP __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 371 of file locale_facets_nonio\&.tcc\&. .PP References std::basic_string< _CharT, _Traits, _Alloc >::c_str()\&. .SS "template _InIter \fBstd::money_get\fP< _CharT, _InIter >::do_get (\fBiter_type\fP __s, \fBiter_type\fP __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 384 of file locale_facets_nonio\&.tcc\&. .PP References std::ios_base::_M_getloc(), std::ios_base::adjustfield, std::basic_string< _CharT, _Traits, _Alloc >::append(), std::basic_string< _CharT, _Traits, _Alloc >::assign(), std::basic_string< _CharT, _Traits, _Alloc >::data(), std::money_put< _CharT, _OutIter >::do_put(), std::basic_string< _CharT, _Traits, _Alloc >::erase(), std::ios_base::flags(), std::basic_string< _CharT, _Traits, _Alloc >::insert(), std::ios_base::internal, std::ios_base::left, std::basic_string< _CharT, _Traits, _Alloc >::reserve(), std::basic_string< _CharT, _Traits, _Alloc >::resize(), std::__ctype_abstract_base< _CharT >::scan_not(), std::ios_base::showbase, std::basic_string< _CharT, _Traits, _Alloc >::size(), std::__ctype_abstract_base< _CharT >::widen(), and std::ios_base::width()\&. .SS "template \fBiter_type\fP \fBstd::money_get\fP< _CharT, _InIter >::get (\fBiter_type\fP __s, \fBiter_type\fP __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\&. .SS "template \fBiter_type\fP \fBstd::money_get\fP< _CharT, _InIter >::get (\fBiter_type\fP __s, \fBiter_type\fP __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\&. .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\&.