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

numpunct, numpunct_byname

Library:  Localization


numpunct_byname numpunct locale::facet

Local Index

Members

Summary

A numeric punctuation facet used by the num_get and num_get facets for formatting and parsing.

Synopsis

#include <locale>

namespace std {
  template <class charT>  class numpunct;
  template <class charT>  class numpunct_byname;
}

Specializations

Description

The numpunct facet specifies numeric punctuation associated with the C locale. The numpunct_byname facet is used with named locales.

Both the num_put and num_get facets make use of this facet.

Interface

Member Types

char_type
string_type

Constructors

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

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 function xxx() calls a corresponding virtual protected member do_xxx(). For instance, the public function grouping() 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;
virtual string_type  
do_truename() const;
virtual string 
do_grouping() const; 
virtual char_type    
do_thousands_sep() const; 

Example

See Also

locale, Facets, num_put, num_get, ctype

Standards Conformance

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



Previous fileTop of DocumentContentsIndex pageNext file