BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdldfp::DecimalNumGet< CHARTYPE, INPUTITERATOR > Class Template Reference

#include <bdldfp_decimal.h>

Inheritance diagram for bdldfp::DecimalNumGet< CHARTYPE, INPUTITERATOR >:

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
 

Detailed Description

template<class CHARTYPE, class INPUTITERATOR = bsl::istreambuf_iterator<CHARTYPE>>
class bdldfp::DecimalNumGet< CHARTYPE, INPUTITERATOR >

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

Member Typedef Documentation

◆ char_type

template<class CHARTYPE , class INPUTITERATOR = bsl::istreambuf_iterator<CHARTYPE>>
typedef CHARTYPE bdldfp::DecimalNumGet< CHARTYPE, INPUTITERATOR >::char_type

◆ iter_type

template<class CHARTYPE , class INPUTITERATOR = bsl::istreambuf_iterator<CHARTYPE>>
typedef INPUTITERATOR bdldfp::DecimalNumGet< CHARTYPE, INPUTITERATOR >::iter_type

Constructor & Destructor Documentation

◆ DecimalNumGet()

template<class CHARTYPE , class INPUTITERATOR = bsl::istreambuf_iterator<CHARTYPE>>
bdldfp::DecimalNumGet< CHARTYPE, INPUTITERATOR >::DecimalNumGet ( bsl::size_t  refs = 0)
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.

◆ ~DecimalNumGet()

template<class CHARTYPE , class INPUTITERATOR = bsl::istreambuf_iterator<CHARTYPE>>
bdldfp::DecimalNumGet< CHARTYPE, INPUTITERATOR >::~DecimalNumGet ( )
protected

Member Function Documentation

◆ do_get() [1/3]

template<class CHARTYPE , class INPUTITERATOR = bsl::istreambuf_iterator<CHARTYPE>>
virtual iter_type bdldfp::DecimalNumGet< CHARTYPE, INPUTITERATOR >::do_get ( iter_type  begin,
iter_type  end,
bsl::ios_base &  str,
bsl::ios_base::iostate &  err,
Decimal128 value 
) const
protectedvirtual

◆ do_get() [2/3]

template<class CHARTYPE , class INPUTITERATOR = bsl::istreambuf_iterator<CHARTYPE>>
virtual iter_type bdldfp::DecimalNumGet< CHARTYPE, INPUTITERATOR >::do_get ( iter_type  begin,
iter_type  end,
bsl::ios_base &  str,
bsl::ios_base::iostate &  err,
Decimal32 value 
) const
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).

◆ do_get() [3/3]

template<class CHARTYPE , class INPUTITERATOR = bsl::istreambuf_iterator<CHARTYPE>>
virtual iter_type bdldfp::DecimalNumGet< CHARTYPE, INPUTITERATOR >::do_get ( iter_type  begin,
iter_type  end,
bsl::ios_base &  str,
bsl::ios_base::iostate &  err,
Decimal64 value 
) const
protectedvirtual

◆ get() [1/3]

template<class CHARTYPE , class INPUTITERATOR = bsl::istreambuf_iterator<CHARTYPE>>
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

◆ get() [2/3]

template<class CHARTYPE , class INPUTITERATOR = bsl::istreambuf_iterator<CHARTYPE>>
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).

◆ get() [3/3]

template<class CHARTYPE , class INPUTITERATOR = bsl::istreambuf_iterator<CHARTYPE>>
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

◆ object()

template<class CHARTYPE , class INPUTITERATOR = bsl::istreambuf_iterator<CHARTYPE>>
static const DecimalNumGet< CHARTYPE, INPUTITERATOR > & bdldfp::DecimalNumGet< CHARTYPE, INPUTITERATOR >::object ( )
static

Member Data Documentation

◆ id

template<class CHARTYPE , class INPUTITERATOR = bsl::istreambuf_iterator<CHARTYPE>>
bsl::locale::id bdldfp::DecimalNumGet< CHARTYPE, INPUTITERATOR >::id
static

The documentation for this class was generated from the following file: