Previous fileTop of DocumentContentsIndex pageNext file
Apache C++ Standard Library Reference Guide

num_get

Library:  Localization


num_get locale::facet

Local Index

Members

Summary

A numeric parsing facet

Synopsis

#include <locale>

namespace std {
  template <class charT, class InputIterator> class num_get;
}

Specializations

The primary template can be implicitly or explicitly specialized on any character type that satisfies the requirements on the type of the character used by iostream class templates, and on any iterator type that satisfies the requirements of Input Iterator.

Description

The num_get facet includes facilities for the parsing of sequences of characters and interpreting them as numeric values. basic_istream and all other input-oriented streams use this facet to implement formatted numeric input.

Interface

Member Types

char_type
iter_type

Constructors

explicit num_get(size_t refs = 0) 

Facet ID

static locale::id id;

Public Member Functions

The public members of the num_get facet include an interface to protected members. Each public member get() calls the corresponding protected virtual member function do_get().

iter_type 
get(iter_type in, iter_type end, ios_base& io,
    ios_base::iostate& err, bool& v) const; 
iter_type 
get(iter_type in, iter_type end, ios_base& io,
    ios_base::iostate& err, long& v) const; 
iter_type 
get(iter_type in, iter_type end, ios_base& io,
    ios_base::iostate& err, unsigned short& v) const; 
iter_type 
get(iter_type in, iter_type end, ios_base& io,
    ios_base::iostate& err, unsigned int& v) const;
iter_type 
get(iter_type in, iter_type end, ios_base& io,
    ios_base::iostate& err, unsigned long& v) const; 
iter_type 
get(iter_type in, iter_type end, ios_base& io,
    ios_base::iostate& err, float& v) const; 
iter_type 
get(iter_type in, iter_type end, ios_base& io,
    ios_base::iostate& err, double& v) const; 
iter_type 
get(iter_type in, iter_type end, ios_base& io,
    ios_base::iostate& err, long double& v) const; 
iter_type 
get(iter_type in, iter_type end, ios_base& io,
    ios_base::iostate& err, void*& v) const; 

Protected Member Functions

virtual iter_type 
do_get(iter_type in, iter_type end, ios_base& io,
       ios_base::iostate& err, long& v) const; 
virtual iter_type 
do_get(iter_type in, iter_type end, ios_base& io,
       ios_base::iostate& err, 
       unsigned short& v) const; 
virtual iter_type 
do_get(iter_type in, iter_type end, ios_base& io,
       ios_base::iostate& err, 
       unsigned int& v) const; 
virtual iter_type 
do_get(iter_type in, iter_type end, ios_base& io,
       ios_base::iostate& err, 
       unsigned long& v) const; 
virtual iter_type 
do_get(iter_type in, iter_type end, ios_base& io,
       ios_base::iostate& err, float& v) const; 
virtual iter_type 
do_get(iter_type in, iter_type end, ios_base& io,
       ios_base::iostate& err, double& v) const; 
virtual iter_type 
do_get(iter_type in, iter_type end, ios_base& io,
       ios_base::iostate& err, long double& v) const; 
virtual iter_type
do_get(iter_type in, iter_type end, ios_base& io,
       ios_base::iostate& err, void*& v) const;
virtual iter_type 
do_get(iter_type in, iter_type end, ios_base& io, 
       ios_base::iostate& err, bool& v) const;

Example

See Also

ctype, locale, Facets, numpunct, num_put

Standards Conformance

ISO/IEC 14882:1998 -- International Standard for Information Systems -- Programming Language C++, Section 22.2.2.1



Previous fileTop of DocumentContentsIndex pageNext file