template<class E, class InIt = istreambuf_iterator<E> >
class num_get : public locale::facet {
public:
typedef E char_type;
typedef InIt iter_type;
explicit num_get(size_t refs = 0);
iter_type get(iter_type first, iter_type last, ios_base& x,
ios_base::iostate& st, long& val) const;
iter_type get(iter_type first, iter_type last, ios_base& x,
ios_base::iostate& st, unsigned long& val) const;
iter_type get(iter_type first, iter_type last, ios_base& x,
ios_base::iostate& st, double& val) const;
iter_type get(iter_type first, iter_type last, ios_base& x,
ios_base::iostate& st, long double& val) const;
iter_type get(iter_type first, iter_type last, ios_base& x,
ios_base::iostate& st, void *& val) const;
iter_type get(iter_type first, iter_type last, ios_base& x,
ios_base::iostate& st, bool& val) const;
static locale::id id;
protected:
~num_get();
virtual iter_type do_get(iter_type first, iter_type last,
ios_base& x, ios_base::iostate& st, long& val) const;
virtual iter_type do_get(iter_type first, iter_type last,
ios_base& x, ios_base::iostate& st, unsigned long& val) const;
virtual iter_type do_get(iter_type first, iter_type last,
ios_base& x, ios_base::iostate& st, double& val) const;
virtual iter_type do_get(iter_type first, iter_type last,
ios_base& x, ios_base::iostate& st, long double& val) const;
virtual iter_type do_get(iter_type first, iter_type last,
ios_base& x, ios_base::iostate& st, void *& val) const;
virtual iter_type do_get(iter_type first, iter_type last,
ios_base& x, ios_base::iostate& st, bool& val) const;
};
The template class describes an object that can serve as a locale facet, to control conversions of sequences of type E
to
numeric values.
As with any locale facet, the static object id
has an initial stored value of zero. The first attempt to access its stored
value stores a unique positive value in id
.