.TH "std::numpunct< _CharT >" 3cxx "Wed Jul 14 2021" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::numpunct< _CharT > \- Primary class template numpunct\&. .SH SYNOPSIS .br .PP .PP Inherits \fBstd::locale::facet\fP\&. .PP Inherited by \fBstd::numpunct_byname< _CharT >\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "typedef __numpunct_cache< _CharT > \fB__cache_type\fP" .br .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "typedef _CharT \fBchar_type\fP" .br .RI "Public typedefs\&. " .ti -1c .RI "typedef \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 __cloc, size_t __refs=0)" .br .RI "Internal constructor\&. Not for general use\&. " .ti -1c .RI "\fBnumpunct\fP (__cache_type *__cache, size_t __refs=0)" .br .RI "Internal constructor\&. Not for general use\&. " .ti -1c .RI "\fBnumpunct\fP (size_t __refs=0)" .br .RI "Numpunct constructor\&. " .ti -1c .RI "\fBchar_type\fP \fBdecimal_point\fP () const" .br .RI "Return decimal point character\&. " .ti -1c .RI "\fBstring_type\fP \fBfalsename\fP () const" .br .RI "Return string representation of bool false\&. " .ti -1c .RI "\fBstring\fP \fBgrouping\fP () const" .br .RI "Return grouping specification\&. " .ti -1c .RI "\fBchar_type\fP \fBthousands_sep\fP () const" .br .RI "Return thousands separator character\&. " .ti -1c .RI "\fBstring_type\fP \fBtruename\fP () const" .br .RI "Return string representation of bool true\&. " .in -1c .SS "Static Public Attributes" .in +1c .ti -1c .RI "static \fBlocale::id\fP \fBid\fP" .br .RI "Numpunct facet id\&. " .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual \fB~numpunct\fP ()" .br .RI "Destructor\&. " .ti -1c .RI "void \fB_M_initialize_numpunct\fP (__c_locale __cloc)" .br .ti -1c .RI "void \fB_M_initialize_numpunct\fP (__c_locale __cloc)" .br .ti -1c .RI "void \fB_M_initialize_numpunct\fP (__c_locale __cloc=0)" .br .ti -1c .RI "virtual \fBchar_type\fP \fBdo_decimal_point\fP () const" .br .RI "Return decimal point character\&. " .ti -1c .RI "virtual \fBstring_type\fP \fBdo_falsename\fP () const" .br .RI "Return string representation of bool false\&. " .ti -1c .RI "virtual \fBstring\fP \fBdo_grouping\fP () const" .br .RI "Return grouping specification\&. " .ti -1c .RI "virtual \fBchar_type\fP \fBdo_thousands_sep\fP () const" .br .RI "Return thousands separator character\&. " .ti -1c .RI "virtual \fBstring_type\fP \fBdo_truename\fP () const" .br .RI "Return string representation of bool true\&. " .in -1c .SS "Static Protected Member Functions" .in +1c .ti -1c .RI "static __c_locale \fB_S_clone_c_locale\fP (__c_locale &__cloc) throw ()" .br .ti -1c .RI "static void \fB_S_create_c_locale\fP (__c_locale &__cloc, const char *__s, __c_locale __old=0)" .br .ti -1c .RI "static void \fB_S_destroy_c_locale\fP (__c_locale &__cloc)" .br .ti -1c .RI "static __c_locale \fB_S_get_c_locale\fP ()" .br .ti -1c .RI "static const char * \fB_S_get_c_name\fP () throw ()" .br .ti -1c .RI "static __c_locale \fB_S_lc_ctype_c_locale\fP (__c_locale __cloc, const char *__s)" .br .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "__cache_type * \fB_M_data\fP" .br .in -1c .SH "Detailed Description" .PP .SS "template .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\&. .PP Definition at line 1670 of file locale_facets\&.h\&. .SH "Member Typedef Documentation" .PP .SS "template typedef _CharT \fBstd::numpunct\fP< _CharT >::\fBchar_type\fP" .PP Public typedefs\&. .PP Definition at line 1676 of file locale_facets\&.h\&. .SS "template typedef \fBbasic_string\fP<_CharT> \fBstd::numpunct\fP< _CharT >::\fBstring_type\fP" .PP Public typedefs\&. .PP Definition at line 1677 of file locale_facets\&.h\&. .SH "Constructor & Destructor Documentation" .PP .SS "template \fBstd::numpunct\fP< _CharT >::\fBnumpunct\fP (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 .PP Definition at line 1694 of file locale_facets\&.h\&. .SS "template \fBstd::numpunct\fP< _CharT >::\fBnumpunct\fP (__cache_type * __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 .PP Definition at line 1708 of file locale_facets\&.h\&. .SS "template \fBstd::numpunct\fP< _CharT >::\fBnumpunct\fP (__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 .PP Definition at line 1722 of file locale_facets\&.h\&. .SS "template virtual \fBstd::numpunct\fP< _CharT >::~\fBnumpunct\fP ()\fC [protected]\fP, \fC [virtual]\fP" .PP Destructor\&. .SH "Member Function Documentation" .PP .SS "template \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 Definition at line 1736 of file locale_facets\&.h\&. .PP References std::numpunct< _CharT >::do_decimal_point()\&. .SS "template virtual \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 Definition at line 1823 of file locale_facets\&.h\&. .PP Referenced by std::numpunct< _CharT >::decimal_point()\&. .SS "template virtual \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 Definition at line 1874 of file locale_facets\&.h\&. .PP Referenced by std::numpunct< _CharT >::falsename()\&. .SS "template virtual \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 Definition at line 1848 of file locale_facets\&.h\&. .PP Referenced by std::numpunct< _CharT >::grouping()\&. .SS "template virtual \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 Definition at line 1835 of file locale_facets\&.h\&. .PP Referenced by std::numpunct< _CharT >::thousands_sep()\&. .SS "template virtual \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 Definition at line 1861 of file locale_facets\&.h\&. .PP Referenced by std::numpunct< _CharT >::truename()\&. .SS "template \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 Definition at line 1806 of file locale_facets\&.h\&. .PP References std::numpunct< _CharT >::do_falsename()\&. .SS "template \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 Definition at line 1780 of file locale_facets\&.h\&. .PP References std::numpunct< _CharT >::do_grouping()\&. .SS "template \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 Definition at line 1749 of file locale_facets\&.h\&. .PP References std::numpunct< _CharT >::do_thousands_sep()\&. .SS "template \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 Definition at line 1793 of file locale_facets\&.h\&. .PP References std::numpunct< _CharT >::do_truename()\&. .SH "Member Data Documentation" .PP .SS "template \fBlocale::id\fP \fBstd::numpunct\fP< _CharT >::id\fC [static]\fP" .PP Numpunct facet id\&. .PP Definition at line 1686 of file locale_facets\&.h\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.