Rogue Wave banner
Previous fileTop of documentContentsIndexNext file

num_put


num_putinherits fromlocale::facet

Summary

A numeric formatting facet for output.

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Synopsis

#include <locale>
template <class charT, class OutputIterator> class num_put;

Description

The num_put<charT,OutputIterator> facet allows for formatted output of numbers. basic_ostream and all other output-oriented streams use this facet to implement formatted numeric output.

Interface

Types

char_type
iter_type

Constructors

explicit num_put(size_t refs = 0) 

Destructors

~num_put();  // virtual and protected

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 xxx has a corresponding virtual protected member do_xxx. All work is delegated to these protected members. For instance, the long version of the public put function simply calls its protected cousin 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; 

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; 

Example

See Also

locale, facets, numget, numpunct, ctype



Previous fileTop of documentContentsIndexNext file
©Copyright 1998, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.
OEM Release, June 1998