moneypunct Class

The template class describes an object that can serve as a locale facet to describe the sequences of type CharType used to represent a monetary input field or a monetary output field. If the template parameter Intl is true, international conventions are observed.

template<class CharType, bool Intl> 
class moneypunct

Parameters

  • CharType
    The type used within a program to encode characters.

  • Intl
    A flag specifying whether international conventions are to be observed.

Remarks

As with any locale facet, the static object ID has an initial stored value of zero. The first attempt to access its stored value stores a unique positive value in id.

The const static object intl stores the value of the template parameter Intl.

Constructors

moneypunct

Constructor of objects of type moneypunct.

Typedefs

char_type

A type that is used to describe a character used by a locale.

string_type

A type that describes a string containing characters of type CharType.

Member Functions

curr_symbol

Returns a locale-specific sequence of elements to use as a currency symbol.

decimal_point

Returns a locale-specific sequence of elements to use as a decimal point symbol.

do_curr_symbol

A protected virtual member function that returns a locale-specific sequence of elements to use as a currency symbol.

do_decimal_point

A protected virtual member function that is called to return a locale-specific sequence of elements to use as a decimal point symbol.

do_frac_digits

The protected virtual member function returns a locale-specific count of the number of digits to display to the right of any decimal point.

do_grouping

The protected virtual member function returns a locale-specific rule for determining how digits are grouped to the left of any decimal point.

do_neg_format

A protected virtual member function that is called to return a locale-specific rule for formatting outputs with negative amounts.

do_negative_sign

A protected virtual member function that is called to return a locale-specific sequence of elements to use as a negative sign symbol.

do_pos_format

A protected virtual member function that is called to return a locale-specific rule for formatting outputs with positive amounts.

do_positive_sign

A protected virtual member function that is called to return a locale-specific sequence of elements to use as a positive sign symbol.

do_thousands_sep

A protected virtual member function that is called to return a locale-specific sequence of elements to use as a thousands separator symbol.

frac_digits

Returns a locale-specific count of the number of digits to display to the right of any decimal point.

grouping

Returns a locale-specific rule for determining how digits are grouped to the left of any decimal point.

neg_format

Returns a locale-specific rule for formatting outputs with negative amounts.

negative_sign

Returns a locale-specific sequence of elements to use as a negative sign symbol.

pos_format

Returns a locale-specific rule for formatting outputs with positive amounts.

positive_sign

Returns a locale-specific sequence of elements to use as a positive sign symbol.

thousands_sep

Returns a locale-specific sequence of elements to use as a thousands separator symbol.

Requirements

Header: <locale>

Namespace: std

See Also

Reference

Thread Safety in the Standard C++ Library

Other Resources

moneypunct Members

<locale> Members