O'Reilly logo

C++ In a Nutshell by Ray Lischner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

num_get class template — Facet for input of numbers

Synopsis

template <typename charT,
          typename InputIterator = istreambuf_iterator<charT> >
class num_get : public locale::facet
{
public:
  typedef charT char_type;
  typedef InputIterator iter_type;
  explicit num_get(size_t refs = 0);
  iter_type get(iter_type in, iter_type end, ios_base&, 
                ios_base::iostate& err, bool& v) const;
  iter_type get(iter_type in, iter_type end, ios_base&,
                ios_base::iostate& err, long& v) const;
  iter_type get(iter_type in, iter_type end, ios_base&,
                ios_base::iostate& err, unsigned short& v) const;
  iter_type get(iter_type in, iter_type end, ios_base&,
                ios_base::iostate& err, unsigned int& v) const;
  iter_type get(iter_type in, iter_type end, ios_base&,
                ios_base::iostate& err, unsigned long& v) const;
  iter_type get(iter_type in, iter_type end, ios_base&,
                ios_base::iostate& err, float& v) const;
  iter_type get(iter_type in, iter_type end, ios_base&,
                ios_base::iostate& err, double& v) const;
  iter_type get(iter_type in, iter_type end, ios_base&,
                ios_base::iostate& err, long double& v) const;
  iter_type get(iter_type in, iter_type end, ios_base&,
                ios_base::iostate& err, void*& v) const;
  static locale::id id;
protected:
  virtual ~num_get(  );
  virtual iter_type do_get(iter_type, iter_type, ios_base&,
                           ios_base::iostate& err, bool& v) const;
  virtual iter_type do_get(iter_type, iter_type, ios_base&,
                           ios_base::iostate& err, long& v) const;
  virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate& err, unsigned ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required