.TH "std::numpunct< _CharT >" 3cxx "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::numpunct< _CharT > \- Primary class template numpunct\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBstd::locale::facet\fP\&. .PP Inherited by \fBstd::numpunct_byname< _CharT >\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "\fBtypedef\fP __numpunct_cache< _CharT > \fB__cache_type\fP" .br .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "\fBtypedef\fP _CharT \fBchar_type\fP" .br .RI "Public typedefs\&. " .ti -1c .RI "\fBtypedef\fP \fBbasic_string\fP< _CharT > \fBstring_type\fP" .br .RI "Public typedefs\&. " .in -1c .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBnumpunct\fP (__c_locale \fB__cloc\fP, size_t \fB__refs\fP=0)" .br .RI "Internal constructor\&. Not for general use\&. " .ti -1c .RI "\fBnumpunct\fP (\fB__cache_type\fP *__cache, size_t \fB__refs\fP=0)" .br .RI "Internal constructor\&. Not for general use\&. " .ti -1c .RI "\fBnumpunct\fP (size_t \fB__refs\fP=0)" .br .RI "Numpunct constructor\&. " .ti -1c .RI "\fBchar_type\fP \fBdecimal_point\fP () \fBconst\fP" .br .RI "Return decimal point character\&. " .ti -1c .RI "\fBstring_type\fP \fBfalsename\fP () \fBconst\fP" .br .RI "Return string representation of bool false\&. " .ti -1c .RI "\fBstring\fP \fBgrouping\fP () \fBconst\fP" .br .RI "Return grouping specification\&. " .ti -1c .RI "\fBchar_type\fP \fBthousands_sep\fP () \fBconst\fP" .br .RI "Return thousands separator character\&. " .ti -1c .RI "\fBstring_type\fP \fBtruename\fP () \fBconst\fP" .br .RI "Return string representation of bool true\&. " .in -1c .SS "Static Public Attributes" .in +1c .ti -1c .RI "\fBstatic\fP \fBlocale::id\fP \fBid\fP" .br .RI "Numpunct facet id\&. " .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "\fBvirtual\fP \fB~numpunct\fP ()" .br .RI "Destructor\&. " .ti -1c .RI "\fBvoid\fP \fB_M_initialize_numpunct\fP (__c_locale \fB__cloc\fP)" .br .ti -1c .RI "\fBvoid\fP \fB_M_initialize_numpunct\fP (__c_locale \fB__cloc\fP)" .br .ti -1c .RI "\fBvoid\fP \fB_M_initialize_numpunct\fP (__c_locale \fB__cloc\fP=0)" .br .ti -1c .RI "\fBvirtual\fP \fBchar_type\fP \fBdo_decimal_point\fP () \fBconst\fP" .br .RI "Return decimal point character\&. " .ti -1c .RI "\fBvirtual\fP \fBstring_type\fP \fBdo_falsename\fP () \fBconst\fP" .br .RI "Return string representation of bool false\&. " .ti -1c .RI "\fBvirtual\fP \fBstring\fP \fBdo_grouping\fP () \fBconst\fP" .br .RI "Return grouping specification\&. " .ti -1c .RI "\fBvirtual\fP \fBchar_type\fP \fBdo_thousands_sep\fP () \fBconst\fP" .br .RI "Return thousands separator character\&. " .ti -1c .RI "\fBvirtual\fP \fBstring_type\fP \fBdo_truename\fP () \fBconst\fP" .br .RI "Return string representation of bool true\&. " .in -1c .SS "Static Protected Member Functions" .in +1c .ti -1c .RI "\fBstatic\fP __c_locale \fB_S_clone_c_locale\fP (__c_locale &\fB__cloc\fP) \fBthrow\fP ()" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fB_S_create_c_locale\fP (__c_locale &\fB__cloc\fP, \fBconst\fP char *\fB__s\fP, __c_locale \fB__old\fP=0)" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fB_S_destroy_c_locale\fP (__c_locale &\fB__cloc\fP)" .br .ti -1c .RI "\fBstatic\fP __c_locale \fB_S_get_c_locale\fP ()" .br .ti -1c .RI "\fBstatic\fP \fBconst\fP char * \fB_S_get_c_name\fP () \fBthrow\fP ()" .br .ti -1c .RI "\fBstatic\fP __c_locale \fB_S_lc_ctype_c_locale\fP (__c_locale \fB__cloc\fP, \fBconst\fP char *\fB__s\fP)" .br .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "\fB__cache_type\fP * \fB_M_data\fP" .br .in -1c .SH "Detailed Description" .PP .SS "template<\fBtypename\fP _CharT> .br class std::numpunct< _CharT >"Primary class template numpunct\&. This facet stores several pieces of information related to printing and scanning numbers, such as the decimal point character\&. It takes a template parameter specifying the char type\&. The numpunct facet is used by streams for many I/O operations involving numbers\&. .PP The numpunct template uses protected virtual functions to provide the actual results\&. The public accessors forward the call to the virtual functions\&. These virtual functions are hooks for developers to implement the behavior they require from a numpunct facet\&. .SH "Member Typedef Documentation" .PP .SS "template<\fBtypename\fP _CharT > \fBtypedef\fP _CharT \fBstd::numpunct\fP< _CharT >::char_type" .PP Public typedefs\&. .SS "template<\fBtypename\fP _CharT > \fBtypedef\fP \fBbasic_string\fP<_CharT> \fBstd::numpunct\fP< _CharT >::string_type" .PP Public typedefs\&. .SH "Constructor & Destructor Documentation" .PP .SS "template<\fBtypename\fP _CharT > \fBstd::numpunct\fP< _CharT >::numpunct (size_t __refs = \fC0\fP)\fC [inline]\fP, \fC [explicit]\fP" .PP Numpunct constructor\&. .PP \fBParameters\fP .RS 4 \fI__refs\fP Refcount to pass to the base class\&. .RE .PP .SS "template<\fBtypename\fP _CharT > \fBstd::numpunct\fP< _CharT >::numpunct (\fB__cache_type\fP * __cache, size_t __refs = \fC0\fP)\fC [inline]\fP, \fC [explicit]\fP" .PP Internal constructor\&. Not for general use\&. This is a constructor for use by the library itself to set up the predefined locale facets\&. .PP \fBParameters\fP .RS 4 \fI__cache\fP __numpunct_cache object\&. .br \fI__refs\fP Refcount to pass to the base class\&. .RE .PP .SS "template<\fBtypename\fP _CharT > \fBstd::numpunct\fP< _CharT >::numpunct (__c_locale __cloc, size_t __refs = \fC0\fP)\fC [inline]\fP, \fC [explicit]\fP" .PP Internal constructor\&. Not for general use\&. This is a constructor for use by the library itself to set up new locales\&. .PP \fBParameters\fP .RS 4 \fI__cloc\fP The C locale\&. .br \fI__refs\fP Refcount to pass to the base class\&. .RE .PP .SS "template<\fBtypename\fP _CharT > \fBvirtual\fP \fBstd::numpunct\fP< _CharT >::~\fBnumpunct\fP ()\fC [protected]\fP, \fC [virtual]\fP" .PP Destructor\&. .SH "Member Function Documentation" .PP .SS "template<\fBtypename\fP _CharT > \fBchar_type\fP \fBstd::numpunct\fP< _CharT >::decimal_point () const\fC [inline]\fP" .PP Return decimal point character\&. This function returns a char_type to use as a decimal point\&. It does so by returning returning numpunct::do_decimal_point()\&. .PP \fBReturns\fP .RS 4 \fIchar_type\fP representing a decimal point\&. .RE .PP .PP References \fBstd::numpunct< _CharT >::do_decimal_point()\fP\&. .SS "template<\fBtypename\fP _CharT > \fBvirtual\fP \fBchar_type\fP \fBstd::numpunct\fP< _CharT >::do_decimal_point () const\fC [inline]\fP, \fC [protected]\fP, \fC [virtual]\fP" .PP Return decimal point character\&. Returns a char_type to use as a decimal point\&. This function is a hook for derived classes to change the value returned\&. .PP \fBReturns\fP .RS 4 \fIchar_type\fP representing a decimal point\&. .RE .PP .PP Referenced by \fBstd::numpunct< _CharT >::decimal_point()\fP\&. .SS "template<\fBtypename\fP _CharT > \fBvirtual\fP \fBstring_type\fP \fBstd::numpunct\fP< _CharT >::do_falsename () const\fC [inline]\fP, \fC [protected]\fP, \fC [virtual]\fP" .PP Return string representation of bool false\&. Returns a string_type containing the text representation for false bool variables\&. This function is a hook for derived classes to change the value returned\&. .PP \fBReturns\fP .RS 4 string_type representing printed form of false\&. .RE .PP .PP Referenced by \fBstd::numpunct< _CharT >::falsename()\fP\&. .SS "template<\fBtypename\fP _CharT > \fBvirtual\fP \fBstring\fP \fBstd::numpunct\fP< _CharT >::do_grouping () const\fC [inline]\fP, \fC [protected]\fP, \fC [virtual]\fP" .PP Return grouping specification\&. Returns a string representing groupings for the integer part of a number\&. This function is a hook for derived classes to change the value returned\&. .PP \fBSee also\fP .RS 4 grouping() for details\&. .RE .PP \fBReturns\fP .RS 4 String representing grouping specification\&. .RE .PP .PP Referenced by \fBstd::numpunct< _CharT >::grouping()\fP\&. .SS "template<\fBtypename\fP _CharT > \fBvirtual\fP \fBchar_type\fP \fBstd::numpunct\fP< _CharT >::do_thousands_sep () const\fC [inline]\fP, \fC [protected]\fP, \fC [virtual]\fP" .PP Return thousands separator character\&. Returns a char_type to use as a thousands separator\&. This function is a hook for derived classes to change the value returned\&. .PP \fBReturns\fP .RS 4 \fIchar_type\fP representing a thousands separator\&. .RE .PP .PP Referenced by \fBstd::numpunct< _CharT >::thousands_sep()\fP\&. .SS "template<\fBtypename\fP _CharT > \fBvirtual\fP \fBstring_type\fP \fBstd::numpunct\fP< _CharT >::do_truename () const\fC [inline]\fP, \fC [protected]\fP, \fC [virtual]\fP" .PP Return string representation of bool true\&. Returns a string_type containing the text representation for true bool variables\&. This function is a hook for derived classes to change the value returned\&. .PP \fBReturns\fP .RS 4 string_type representing printed form of true\&. .RE .PP .PP Referenced by \fBstd::numpunct< _CharT >::truename()\fP\&. .SS "template<\fBtypename\fP _CharT > \fBstring_type\fP \fBstd::numpunct\fP< _CharT >::falsename () const\fC [inline]\fP" .PP Return string representation of bool false\&. This function returns a string_type containing the text representation for false bool variables\&. It does so by calling numpunct::do_falsename()\&. .PP \fBReturns\fP .RS 4 string_type representing printed form of false\&. .RE .PP .PP References \fBstd::numpunct< _CharT >::do_falsename()\fP\&. .SS "template<\fBtypename\fP _CharT > \fBstring\fP \fBstd::numpunct\fP< _CharT >::grouping () const\fC [inline]\fP" .PP Return grouping specification\&. This function returns a string representing groupings for the integer part of a number\&. Groupings indicate where thousands separators should be inserted in the integer part of a number\&. .PP Each char in the return string is interpret as an integer rather than a character\&. These numbers represent the number of digits in a group\&. The first char in the string represents the number of digits in the least significant group\&. If a char is negative, it indicates an unlimited number of digits for the group\&. If more chars from the string are required to group a number, the last char is used repeatedly\&. .PP For example, if the grouping() returns '\\003\\002' and is applied to the number 123456789, this corresponds to 12,34,56,789\&. Note that if the string was '32', this would put more than 50 digits into the least significant group if the character set is ASCII\&. .PP The string is returned by calling numpunct::do_grouping()\&. .PP \fBReturns\fP .RS 4 string representing grouping specification\&. .RE .PP .PP References \fBstd::numpunct< _CharT >::do_grouping()\fP\&. .SS "template<\fBtypename\fP _CharT > \fBchar_type\fP \fBstd::numpunct\fP< _CharT >::thousands_sep () const\fC [inline]\fP" .PP Return thousands separator character\&. This function returns a char_type to use as a thousands separator\&. It does so by returning returning numpunct::do_thousands_sep()\&. .PP \fBReturns\fP .RS 4 char_type representing a thousands separator\&. .RE .PP .PP References \fBstd::numpunct< _CharT >::do_thousands_sep()\fP\&. .SS "template<\fBtypename\fP _CharT > \fBstring_type\fP \fBstd::numpunct\fP< _CharT >::truename () const\fC [inline]\fP" .PP Return string representation of bool true\&. This function returns a string_type containing the text representation for true bool variables\&. It does so by calling numpunct::do_truename()\&. .PP \fBReturns\fP .RS 4 string_type representing printed form of true\&. .RE .PP .PP References \fBstd::numpunct< _CharT >::do_truename()\fP\&. .SH "Member Data Documentation" .PP .SS "template<\fBtypename\fP _CharT > \fBlocale::id\fP \fBstd::numpunct\fP< _CharT >::id\fC [static]\fP" .PP Numpunct facet id\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.