std::moneypunct_byname(3)

NAME
std::moneypunct_byname -

SYNOPSIS

Inherits moneypunct< _CharT, _Intl >.

Detailed Description

  template<typename _CharT, bool _Intl> class std::moneypunct_byname< _CharT, _Intl >

Definition at line 3927 of file locale_facets.h.

  Public Types
enum { _S_minus, _S_zero, _S_end }
typedef __moneypunct_cache< _CharT, _Intl > __cache_type
_S_end
_S_minus
_S_zero
typedef _CharT char_type
none
enum part { none, space, symbol, sign, value }
sign
space
typedef basic_string< _CharT > string_type
symbol
value

  Public Member Functions
template<> void _M_initialize_moneypunct (__c_locale, const char *)
template<> void _M_initialize_moneypunct (__c_locale, const char *)
template<> void _M_initialize_moneypunct (__c_locale, const char *)
template<> void _M_initialize_moneypunct (__c_locale, const char *)
string_type curr_symbol () const
char_type decimal_point () const
int frac_digits () const
string grouping () const
moneypunct_byname (const char *__s, size_t __refs=0)
string_type negative_sign () const
string_type positive_sign () const
char_type thousands_sep () const

pattern neg_format () const
pattern pos_format () const

  Static Public Member Functions
static pattern _S_construct_pattern (char __precedes, char __space, char __posn)

  Static Public Attributes
static const char * _S_atoms
static const pattern _S_default_pattern
static locale::id id
static const bool intl

  Protected Member Functions
void _M_initialize_moneypunct (__c_locale __cloc=NULL, const char *__name=NULL)
virtual string_type do_curr_symbol () const
virtual char_type do_decimal_point () const
virtual int do_frac_digits () const
virtual string do_grouping () const
virtual pattern do_neg_format () const
virtual string_type do_negative_sign () const
virtual pattern do_pos_format () const
virtual string_type do_positive_sign () const
virtual char_type do_thousands_sep () const
virtual ~moneypunct_byname ()

  Static Protected Member Functions
static __c_locale _S_clone_c_locale (__c_locale &__cloc)
static void _S_create_c_locale (__c_locale &__cloc, const char *__s, __c_locale __old=0)
static void _S_destroy_c_locale (__c_locale &__cloc)
static __c_locale _S_get_c_locale ()
static const char * _S_get_c_name ()

  Friends
class locale::_Impl

Member Typedef Documentation

  typedef _CharT char_type

Public typedefs.

Reimplemented from moneypunct.

Definition at line 3930 of file locale_facets.h.

  typedef basic_string<_CharT> string_type

Public typedefs.

Reimplemented from moneypunct.

Definition at line 3931 of file locale_facets.h.

Member Function Documentation

  string_type curr_symbol () const [inline, inherited]

Return currency symbol string.

This function returns a string_type to use as a currency symbol. It does so by returning returning moneypunct<char_type>::do_curr_symbol().

Returns:
    string_type representing a currency symbol.

Definition at line 3665 of file locale_facets.h.

References moneypunct::do_curr_symbol().

Referenced by __moneypunct_cache::_M_cache().

  char_type decimal_point () const [inline, inherited]

Return decimal point character.

This function returns a char_type to use as a decimal point. It does so by returning returning moneypunct<char_type>::do_decimal_point().

Returns:
    char_type representing a decimal point.

Definition at line 3610 of file locale_facets.h.

References moneypunct::do_decimal_point().

Referenced by __moneypunct_cache::_M_cache().

  virtual string_type do_curr_symbol () const [inline, protected, virtual, inherited]

Return currency symbol string.

This function returns a string_type to use as a currency symbol. This function is a hook for derived classes to change the value returned.

See also:
    curr_symbol() for details.

Returns:
    string_type representing a currency symbol.

Definition at line 3810 of file locale_facets.h.

References __moneypunct_cache::_M_curr_symbol.

Referenced by moneypunct::curr_symbol().

  virtual char_type do_decimal_point () const [inline, protected, virtual, inherited]

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.

Returns:
    char_type representing a decimal point.

Definition at line 3772 of file locale_facets.h.

References __moneypunct_cache::_M_decimal_point.

Referenced by moneypunct::decimal_point().

  virtual int do_frac_digits () const [inline, protected, virtual, inherited]

Return number of digits in fraction.

This function returns the exact number of digits that make up the fractional part of a money amount. This function is a hook for derived classes to change the value returned.

See also:
    frac_digits() for details.

Returns:
    Number of digits in amount fraction.

Definition at line 3850 of file locale_facets.h.

References __moneypunct_cache::_M_frac_digits.

Referenced by moneypunct::frac_digits().

  virtual string do_grouping () const [inline, protected, virtual, inherited]

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.

See also:
    grouping() for details.

Returns:
    String representing grouping specification.

Definition at line 3797 of file locale_facets.h.

References __moneypunct_cache::_M_grouping.

Referenced by moneypunct::grouping().

  virtual pattern do_neg_format () const [inline, protected, virtual, inherited]

Return pattern for money values.

This function returns a pattern describing the formatting of a negative valued money amount. This function is a hook for derived classes to change the value returned.

See also:
    neg_format() for details.

Returns:
    Pattern for money values.

Definition at line 3878 of file locale_facets.h.

References __moneypunct_cache::_M_neg_format.

Referenced by moneypunct::neg_format().

  virtual string_type do_negative_sign () const [inline, protected, virtual, inherited]

Return negative sign string.

This function returns a string_type to use as a sign for negative amounts. This function is a hook for derived classes to change the value returned.

See also:
    negative_sign() for details.

Returns:
    string_type representing a negative sign.

Definition at line 3836 of file locale_facets.h.

References __moneypunct_cache::_M_negative_sign.

Referenced by moneypunct::negative_sign().

  virtual pattern do_pos_format () const [inline, protected, virtual, inherited]

Return pattern for money values.

This function returns a pattern describing the formatting of a positive valued money amount. This function is a hook for derived classes to change the value returned.

See also:
    pos_format() for details.

Returns:
    Pattern for money values.

Definition at line 3864 of file locale_facets.h.

References __moneypunct_cache::_M_pos_format.

Referenced by moneypunct::pos_format().

  virtual string_type do_positive_sign () const [inline, protected, virtual, inherited]

Return positive sign string.

This function returns a string_type to use as a sign for positive amounts. This function is a hook for derived classes to change the value returned.

See also:
    positive_sign() for details.

Returns:
    string_type representing a positive sign.

Definition at line 3823 of file locale_facets.h.

References __moneypunct_cache::_M_positive_sign.

Referenced by moneypunct::positive_sign().

  virtual char_type do_thousands_sep () const [inline, protected, virtual, inherited]

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.

Returns:
    char_type representing a thousands separator.

Definition at line 3784 of file locale_facets.h.

References __moneypunct_cache::_M_thousands_sep.

Referenced by moneypunct::thousands_sep().

  int frac_digits () const [inline, inherited]

Return number of digits in fraction.

This function returns the exact number of digits that make up the fractional part of a money amount. It does so by returning returning moneypunct<char_type>::do_frac_digits().

The fractional part of a money amount is optional. But if it is present, there must be frac_digits() digits.

Returns:
    Number of digits in amount fraction.

Definition at line 3715 of file locale_facets.h.

References moneypunct::do_frac_digits().

Referenced by __moneypunct_cache::_M_cache().

  string grouping () const [inline, inherited]

Return grouping specification.

This function returns a string representing groupings for the integer part of an amount. Groupings indicate where thousands separators should be inserted.

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.

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.

The string is returned by calling moneypunct<char_type>::do_grouping().

Returns:
    string representing grouping specification.

Definition at line 3652 of file locale_facets.h.

References moneypunct::do_grouping().

Referenced by __moneypunct_cache::_M_cache().

  string_type negative_sign () const [inline, inherited]

Return negative sign string.

This function returns a string_type to use as a sign for negative amounts. It does so by returning returning moneypunct<char_type>::do_negative_sign().

If the return value contains more than one character, the first character appears in the position indicated by neg_format() and the remainder appear at the end of the formatted string.

Returns:
    string_type representing a negative sign.

Definition at line 3699 of file locale_facets.h.

References moneypunct::do_negative_sign().

Referenced by __moneypunct_cache::_M_cache().

  pattern pos_format () const [inline, inherited]

Return pattern for money values.

This function returns a pattern describing the formatting of a positive or negative valued money amount. It does so by returning returning moneypunct<char_type>::do_pos_format() or moneypunct<char_type>::do_neg_format().

The pattern has 4 fields describing the ordering of symbol, sign, value, and none or space. There must be one of each in the pattern. The none and space enums may not appear in the first field and space may not appear in the final field.

The parts of a money string must appear in the order indicated by the fields of the pattern. The symbol field indicates that the value of curr_symbol() may be present. The sign field indicates that the value of positive_sign() or negative_sign() must be present. The value field indicates that the absolute value of the money amount is present. none indicates 0 or more whitespace characters, except at the end, where it permits no whitespace. space indicates that 1 or more whitespace characters must be present.

For example, for the US locale and pos_format() pattern {symbol,sign,value,none}, curr_symbol() == '$' positive_sign() == '+', and value 10.01, and options set to force the symbol, the corresponding string is '$+10.01'.

Returns:
    Pattern for money values.

Definition at line 3750 of file locale_facets.h.

References moneypunct::do_pos_format().

Referenced by __moneypunct_cache::_M_cache().

  string_type positive_sign () const [inline, inherited]

Return positive sign string.

This function returns a string_type to use as a sign for positive amounts. It does so by returning returning moneypunct<char_type>::do_positive_sign().

If the return value contains more than one character, the first character appears in the position indicated by pos_format() and the remainder appear at the end of the formatted string.

Returns:
    string_type representing a positive sign.

Definition at line 3682 of file locale_facets.h.

References moneypunct::do_positive_sign().

Referenced by __moneypunct_cache::_M_cache().

  char_type thousands_sep () const [inline, inherited]

Return thousands separator character.

This function returns a char_type to use as a thousands separator. It does so by returning returning moneypunct<char_type>::do_thousands_sep().

Returns:
    char_type representing a thousands separator.

Definition at line 3623 of file locale_facets.h.

References moneypunct::do_thousands_sep().

Referenced by __moneypunct_cache::_M_cache().

Member Data Documentation

  locale::id id [static, inherited]

Numpunct facet id.

Definition at line 3559 of file locale_facets.h.

  const bool intl [static]

existence.

Reimplemented from moneypunct.

Definition at line 3933 of file locale_facets.h.

Author

Generated automatically by Doxygen for libstdc++ from the source code.