BDE 4.14.0 Production release
|
#include <bdldfp_decimal.h>
Public Types | |
typedef CHARTYPE | char_type |
typedef INPUTITERATOR | iter_type |
Public Member Functions | |
DecimalNumGet (bsl::size_t refs=0) | |
iter_type | get (iter_type begin, iter_type end, bsl::ios_base &str, bsl::ios_base::iostate &err, Decimal32 &value) const |
iter_type | get (iter_type begin, iter_type end, bsl::ios_base &str, bsl::ios_base::iostate &err, Decimal64 &value) const |
iter_type | get (iter_type begin, iter_type end, bsl::ios_base &str, bsl::ios_base::iostate &err, Decimal128 &value) const |
Static Public Member Functions | |
static const DecimalNumGet< CHARTYPE, INPUTITERATOR > & | object () |
Static Public Attributes | |
static bsl::locale::id | id |
Protected Member Functions | |
~DecimalNumGet () BSLS_KEYWORD_OVERRIDE | |
Destroy this object. Note that the destructor is virtual. | |
virtual iter_type | do_get (iter_type begin, iter_type end, bsl::ios_base &str, bsl::ios_base::iostate &err, Decimal32 &value) const |
virtual iter_type | do_get (iter_type begin, iter_type end, bsl::ios_base &str, bsl::ios_base::iostate &err, Decimal64 &value) const |
virtual iter_type | do_get (iter_type begin, iter_type end, bsl::ios_base &str, bsl::ios_base::iostate &err, Decimal128 &value) const |
A facet type (mechanism) used in reading decimal floating-point types. Note that this type does not follow BDE conventions because its content is dictated by the C++ standard and native standard library implementations. See ISO/IEC TR 24733 3.10.2 for details.
See bdldfp_decimal
typedef CHARTYPE bdldfp::DecimalNumGet< CHARTYPE, INPUTITERATOR >::char_type |
typedef INPUTITERATOR bdldfp::DecimalNumGet< CHARTYPE, INPUTITERATOR >::iter_type |
|
explicit |
Constructs a DecimalNumGet
object. Optionally specify starting reference count refs
, which will default to 0. If refs
is non-zero, the DecimalNumGet
object will not be deleted when the last locale referencing it goes out of scope.
|
protected |
|
protectedvirtual |
|
protectedvirtual |
Interpret characters from the half-open iterator range denoted by the specified begin
and end
, generate a decimal floating-point number and store it into the specified value
. During conversion the formatting flags of the specified str
(str.flags()
) are obeyed; character classifications are determined by the bsl::ctype
while punctuation characters are determined by the bsl::numpunct
facet imbued to the str
stream-base. Use the specified err
to report back failure or EOF streams states. For further, more detailed information please consult the section [lib.facet.num.get.virtuals] of the C++ Standard. Note that for the conversions to the Decimal32
, 64 and 128 types the conversion specifiers are Hg, Dg and DDg, respectively. Also note that these (possibly overridden) do_get
virtual function are used by every formatted C++ stream input operator call (in >> aDecNumber
).
|
protectedvirtual |
iter_type bdldfp::DecimalNumGet< CHARTYPE, INPUTITERATOR >::get | ( | iter_type | begin, |
iter_type | end, | ||
bsl::ios_base & | str, | ||
bsl::ios_base::iostate & | err, | ||
Decimal128 & | value | ||
) | const |
iter_type bdldfp::DecimalNumGet< CHARTYPE, INPUTITERATOR >::get | ( | iter_type | begin, |
iter_type | end, | ||
bsl::ios_base & | str, | ||
bsl::ios_base::iostate & | err, | ||
Decimal32 & | value | ||
) | const |
Forward to, and return using the specified begin
, end
, str
, err
, and value
, the results of this->do_get(begin, end, str, err, value)
.
iter_type bdldfp::DecimalNumGet< CHARTYPE, INPUTITERATOR >::get | ( | iter_type | begin, |
iter_type | end, | ||
bsl::ios_base & | str, | ||
bsl::ios_base::iostate & | err, | ||
Decimal64 & | value | ||
) | const |
|
static |
|
static |