Rogue Wave banner
Previous fileTop of documentContentsIndexNext file

numpunct, numpunct_byname


numpunctinherits fromlocale::facet

Summary

A numeric punctuation facet.

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

Synopsis

#include <locale>
template <class charT>  class numpunct;
template <class charT>  class numpunct_byname;

Description

The numpunct<charT> facet specifies numeric punctuation. numpunct is used with the "C" locale, while the numpunct_byname facet is used with named locales.

Both num_put and num_get make use of this facet.

Interface

Types

char_type
string_type

Constructors

explicit numpunct(size_t refs = 0) 
explicit numpunct_byname(const char* name, 
         size_t refs = 0); 

Destructors

~numpunct();  // virtual and protected
~numpunct_byname();  // virtual and protected

Facet ID

static locale::id id;

Public Member Functions

The public members of the numpunct 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 grouping function simply calls its protected cousin do_grouping.

char_type    decimal_point()   const; 
string_type  falsename()       const; 
string       grouping()        const; 
char_type    thousands_sep()   const; 
string_type  truename()        const; 

Protected Member Functions

virtual char_type    
do_decimal_point() const; 
virtual string_type  
do_falsename()     const;  // for bool
virtual string_type  
do_truename()      const;  // for bool
virtual string       
do_grouping()      const; 
virtual char_type    
do_thousands_sep() const; 

Example

See Also

locale, facets, num_put, num_get, 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