std::money_get< _CharT, _InIter > - Primary class template money_get.
Contents
Constructor & Destructor Documentation
template<typename_CharT,typename_InIter>std::money_get<_CharT,_InIter>::money_get(size_t__refs=0)[inline],[explicit]
Constructor performs initialization. This is the constructor provided by the standard.
Parameters__refs Passed to the base facet class.
template<typename_CharT,typename_InIter>virtualstd::money_get<_CharT,_InIter>::~money_get()[inline],[protected],[virtual]
Destructor.
Detailed Description
template<typename_CharT,typename_InIter>
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.
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.
Member Data Documentation
template<typename_CharT,typename_InIter>locale::idstd::money_get<_CharT,_InIter>::id[static]
Numpunct facet id.
Member Function Documentation
template<typename_CharT,typename_InIter>_InIterstd::money_get<_CharT,_InIter>::do_get(iter_type__s,iter_type__end,bool__intl,ios_base&__io,ios_base::iostate&__err,longdouble&__units)const[protected],[virtual]
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.
Seealso
get() for details.
Referenced by std::money_get<_CharT,_InIter>::get(), and std::money_get<_CharT,_InIter>::get().
template<typename_CharT,typename_InIter>_InIterstd::money_get<_CharT,_InIter>::do_get(iter_type__s,iter_type__end,bool__intl,ios_base&__io,ios_base::iostate&__err,string_type&__digits)const[protected],[virtual]
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.
Seealso
get() for details.
References std::basic_string<_CharT,_Traits,_Alloc>::resize().
template<typename_CharT,typename_InIter>iter_typestd::money_get<_CharT,_InIter>::get(iter_type__s,iter_type__end,bool__intl,ios_base&__io,ios_base::iostate&__err,longdouble&__units)const[inline]
Read and parse a monetary value. This function reads characters from __s, interprets them as a monetary
value according to moneypunct and ctype facets retrieved from io.getloc(), and returns the result in
units as an integral value moneypunct::frac_digits() * the actual amount. For example, the string $10.01
in a US locale would store 1001 in units.
Any characters not part of a valid money amount are not consumed.
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). units is unchanged if parsing
fails.
This function works by returning the result of do_get().
Parameters__s Start of characters to parse.
__end End of characters to parse.
__intl Parameter to use_facet<moneypunct<CharT,intl> >.
__io Source of facets and io state.
__err Error field to set if parsing fails.
__units Place to store result of parsing.
Returns
Iterator referencing first character beyond valid money amount.
References std::money_get<_CharT,_InIter>::do_get().
template<typename_CharT,typename_InIter>iter_typestd::money_get<_CharT,_InIter>::get(iter_type__s,iter_type__end,bool__intl,ios_base&__io,ios_base::iostate&__err,string_type&__digits)const[inline]
Read and parse a monetary value. This function reads characters from __s, interprets them as a monetary
value according to moneypunct and ctype facets retrieved from io.getloc(), and returns the result in
digits. For example, the string $10.01 in a US locale would store 1001 in digits.
Any characters not part of a valid money amount are not consumed.
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).
This function works by returning the result of do_get().
Parameters__s Start of characters to parse.
__end End of characters to parse.
__intl Parameter to use_facet<moneypunct<CharT,intl> >.
__io Source of facets and io state.
__err Error field to set if parsing fails.
__digits Place to store result of parsing.
Returns
Iterator referencing first character beyond valid money amount.
References std::money_get<_CharT,_InIter>::do_get().
Member Typedef Documentation
template<typename_CharT,typename_InIter>typedef_CharTstd::money_get<_CharT,_InIter>::char_type
Public typedefs.
template<typename_CharT,typename_InIter>typedef_InIterstd::money_get<_CharT,_InIter>::iter_type
Public typedefs.
template<typename_CharT,typename_InIter>typedefbasic_string<_CharT>std::money_get<_CharT,_InIter>::string_type
Public typedefs.
Name
std::money_get< _CharT, _InIter > - Primary class template money_get.
Synopsis
#include <locale>
Inherits std::locale::facet.
PublicTypestypedef _CharT char_type
Public typedefs.
typedef_InIteriter_type
Public typedefs.
typedefbasic_string< _CharT > string_type
Public typedefs.
PublicMemberFunctionsmoney_get (size_t __refs=0)
Constructor performs initialization.
template<bool _Intl> _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11 _InIter_M_extract (iter_type__beg,
iter_type __end, ios_base &__io, ios_base::iostate &__err, string &__units) const
iter_typeget (iter_type__s, iter_type __end, bool __intl, ios_base &__io, ios_base::iostate &__err,
long double &__units) const
Read and parse a monetary value.
iter_typeget (iter_type__s, iter_type __end, bool __intl, ios_base &__io, ios_base::iostate &__err,
string_type &__digits) const
Read and parse a monetary value.
StaticPublicAttributesstaticlocale::idid
Numpunct facet id.
ProtectedMemberFunctionsvirtual~money_get ()
Destructor.
template<bool _Intl> iter_type_M_extract (iter_type__s, iter_type __end, ios_base &__io,
ios_base::iostate &__err, string &__digits) const
virtualiter_typedo_get (iter_type__s, iter_type __end, bool __intl, ios_base &__io, ios_base::iostate
&__err, long double &__units) const
Read and parse a monetary value.
virtualiter_typedo_get (iter_type__s, iter_type __end, bool __intl, ios_base &__io, ios_base::iostate
&__err, string_type &__digits) const
Read and parse a monetary value.
StaticProtectedMemberFunctionsstatic __c_locale _S_clone_c_locale (__c_locale &__cloc) throw ()
staticvoid_S_create_c_locale (__c_locale &__cloc, const char *__s, __c_locale __old=0)
staticvoid_S_destroy_c_locale (__c_locale &__cloc)
static __c_locale _S_get_c_locale ()
static const char * _S_get_c_name () throw ()
static __c_locale _S_lc_ctype_c_locale (__c_locale __cloc, const char *__s)
