std::money_get< _CharT, _InIter >(3cxx) | std::money_get< _CharT, _InIter >(3cxx) |
NAME¶
std::money_get< _CharT, _InIter > -SYNOPSIS¶
Inherits std::locale::facet.Public Types¶
typedef _CharT char_type
Public Member Functions¶
money_get (size_t __refs=0)
Static Public Attributes¶
static locale::id id
Protected Member Functions¶
virtual ~money_get ()
Static Protected Member Functions¶
static __c_locale _S_clone_c_locale (__c_locale &__cloc) throw ()
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.Member Typedef Documentation¶
template<typename _CharT , typename _InIter > typedef _CharT std::money_get< _CharT, _InIter >::char_type¶
Public typedefs. Definition at line 1376 of file locale_facets_nonio.h.template<typename _CharT , typename _InIter > typedef _InIter std::money_get< _CharT, _InIter >::iter_type¶
Public typedefs. Definition at line 1377 of file locale_facets_nonio.h.template<typename _CharT , typename _InIter > typedef basic_string<_CharT> std::money_get< _CharT, _InIter >:: string_type¶
Public typedefs. Definition at line 1378 of file locale_facets_nonio.h.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 > virtual std::money_get< _CharT, _InIter >::~ money_get () [inline], [protected], [virtual]¶
Destructor. Definition at line 1460 of file locale_facets_nonio.h.Member Function Documentation¶
template<typename _CharT , typename _InIter > _InIter std::money_get< _CharT, _InIter >::do_get ( iter_type__s, iter_type__end, bool__intl, ios_base &__io, ios_base::iostate &__err, long double &__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. See Also:get() for details.
template<typename _CharT , typename _InIter > _InIter std::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. See Also:get() for details.
template<typename _CharT , typename _InIter > iter_type std::money_get< _CharT, _InIter >::get (iter_type__s, iter_type__end, bool__intl, ios_base &__io, ios_base::iostate &__err, long double &__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.
template<typename _CharT , typename _InIter > iter_type std::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.
Member Data Documentation¶
template<typename _CharT , typename _InIter > locale::id std::money_get< _CharT, _InIter >::id [static]¶
Numpunct facet id. Definition at line 1382 of file locale_facets_nonio.h.Author¶
Generated automatically by Doxygen for libstdc++ from the source code.Tue Nov 27 2012 | libstdc++ |