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

num_put

Library:  Localization


num_put locale::facet

Local Index

Members

Summary

A numeric formatting facet

Synopsis

#include <locale>

namespace std {
  template <class charT, class OutputIterator> class num_put;
}

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 Output Iterator.

Description

The num_put facet includes facilities for formatted output of numeric values. basic_ostream and all other output-oriented streams use this facet to implement formatted numeric output.

Interface

Member Types

char_type
iter_type

Constructors

explicit num_put(size_t refs = 0) 

Facet ID

static locale::id id;

Public Member Functions

The public members of the num_put facet include an interface to protected members. Each public member function put() calls the corresponding protected virtual protected member do_put().

iter_type 
put(iter_type s, ios_base& io, char_type fill, bool v)
    const; 
iter_type 
put(iter_type s, ios_base& io, char_type fill, long v)
    const; 
iter_type 
put(iter_type s, ios_base& io, char_type fill,
    unsigned long v) const; 
iter_type 
put(iter_type s, ios_base& io, char_type fill, double v)
    const; 
iter_type
put(iter_type s, ios_base& io, char_type fill, 
    long double v) const; 
iter_type 
put(iter_type s, ios_base& io, char_type fill, 
    const void* v) const;

Protected Member Functions

virtual iter_type 
do_put(iter_type s, ios_base& io, 
       char_type fill, bool v) const; 
virtual iter_type 
do_put(iter_type s, ios_base& io, 
       char_type fill, long v) const; 
virtual iter_type 
do_put(iter_type s, ios_base& io, 
       char_type fill,unsigned long) const; 
virtual iter_type 
do_put(iter_type s, ios_base& io, 
       char_type fill, double v) const; 
virtual iter_type 
do_put(iter_type s, ios_base& io, 
       char_type fill,long double v) const; 
virtual iter_type 
do_put(iter_type s, ios_base& io, 
       char_type fill,const void* v) const;

Example

See Also

locale, Facets, num_get, numpunct, ctype

Standards Conformance

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



Previous fileTop of DocumentContentsIndex pageNext file