Public Types | |
typedef CharT | char_type |
Public typedefs. | |
typedef basic_string< CharT > | string_type |
Public typedefs. | |
typedef __moneypunct_cache< CharT, Intl > | cache_type |
enum | part |
enum | |
Public Member Functions | |
moneypunct_byname (const char *s, size_t __refs=0) | |
char_type | decimal_point () const |
Return decimal point character. | |
char_type | thousands_sep () const |
Return thousands separator character. | |
string | grouping () const |
Return grouping specification. | |
string_type | curr_symbol () const |
Return currency symbol string. | |
string_type | positive_sign () const |
Return positive sign string. | |
string_type | negative_sign () const |
Return negative sign string. | |
int | frac_digits () const |
Return number of digits in fraction. | |
pattern | pos_format () const |
Return pattern for money values. | |
pattern | neg_format () const |
Return pattern for money values. | |
Static Public Attributes | |
static const bool | intl |
existence. | |
static locale::id | id |
Numpunct facet id. | |
static const pattern | S_default_pattern |
static const char * | S_atoms |
Protected Member Functions | |
virtual | ~moneypunct_byname () |
virtual char_type | do_decimal_point () const |
Return decimal point character. | |
virtual char_type | do_thousands_sep () const |
Return thousands separator character. | |
virtual string | do_grouping () const |
Return grouping specification. | |
virtual string_type | do_curr_symbol () const |
Return currency symbol string. | |
virtual string_type | do_positive_sign () const |
Return positive sign string. | |
virtual string_type | do_negative_sign () const |
Return negative sign string. | |
virtual int | do_frac_digits () const |
Return number of digits in fraction. | |
virtual pattern | do_pos_format () const |
Return pattern for money values. | |
virtual pattern | do_neg_format () const |
Return pattern for money values. | |
Static Protected Member Functions | |
static c_locale | S_get_c_locale () |
static const char * | S_get_c_name () |
Friends | |
class | locale::Impl |
Definition at line 3920 of file locale_facets.h.
typedef CharT std::moneypunct_byname< CharT, Intl >::char_type |
Public typedefs.
Reimplemented from std::moneypunct< CharT, Intl >.
Definition at line 3923 of file locale_facets.h.
typedef basic_string<CharT> std::moneypunct_byname< CharT, Intl >::string_type |
Public typedefs.
Reimplemented from std::moneypunct< CharT, Intl >.
Definition at line 3924 of file locale_facets.h.
char_type std::moneypunct< CharT, Intl >::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().
Definition at line 3604 of file locale_facets.h.
References std::moneypunct< CharT, Intl >::do_decimal_point().
Referenced by std::__moneypunct_cache< CharT, Intl >::M_cache().
char_type std::moneypunct< CharT, Intl >::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().
Definition at line 3617 of file locale_facets.h.
References std::moneypunct< CharT, Intl >::do_thousands_sep().
Referenced by std::__moneypunct_cache< CharT, Intl >::M_cache().
string std::moneypunct< CharT, Intl >::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().
Definition at line 3646 of file locale_facets.h.
References std::moneypunct< CharT, Intl >::do_grouping().
Referenced by std::__moneypunct_cache< CharT, Intl >::M_cache().
string_type std::moneypunct< CharT, Intl >::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().
Definition at line 3659 of file locale_facets.h.
References std::moneypunct< CharT, Intl >::do_curr_symbol().
Referenced by std::__moneypunct_cache< CharT, Intl >::M_cache().
string_type std::moneypunct< CharT, Intl >::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.
Definition at line 3676 of file locale_facets.h.
References std::moneypunct< CharT, Intl >::do_positive_sign().
Referenced by std::__moneypunct_cache< CharT, Intl >::M_cache().
string_type std::moneypunct< CharT, Intl >::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.
Definition at line 3693 of file locale_facets.h.
References std::moneypunct< CharT, Intl >::do_negative_sign().
Referenced by std::__moneypunct_cache< CharT, Intl >::M_cache().
int std::moneypunct< CharT, Intl >::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.
Definition at line 3709 of file locale_facets.h.
References std::moneypunct< CharT, Intl >::do_frac_digits().
Referenced by std::__moneypunct_cache< CharT, Intl >::M_cache().
pattern std::moneypunct< CharT, Intl >::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".
Definition at line 3744 of file locale_facets.h.
References std::moneypunct< CharT, Intl >::do_pos_format().
Referenced by std::__moneypunct_cache< CharT, Intl >::M_cache().
pattern std::moneypunct< CharT, Intl >::neg_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".
Definition at line 3748 of file locale_facets.h.
References std::moneypunct< CharT, Intl >::do_neg_format().
Referenced by std::__moneypunct_cache< CharT, Intl >::M_cache().
virtual char_type std::moneypunct< CharT, Intl >::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.
Definition at line 3766 of file locale_facets.h.
Referenced by std::moneypunct< CharT, Intl >::decimal_point().
virtual char_type std::moneypunct< CharT, Intl >::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.
Definition at line 3778 of file locale_facets.h.
Referenced by std::moneypunct< CharT, Intl >::thousands_sep().
virtual string std::moneypunct< CharT, Intl >::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.
Definition at line 3791 of file locale_facets.h.
Referenced by std::moneypunct< CharT, Intl >::grouping().
virtual string_type std::moneypunct< CharT, Intl >::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.
Definition at line 3804 of file locale_facets.h.
Referenced by std::moneypunct< CharT, Intl >::curr_symbol().
virtual string_type std::moneypunct< CharT, Intl >::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.
Definition at line 3817 of file locale_facets.h.
Referenced by std::moneypunct< CharT, Intl >::positive_sign().
virtual string_type std::moneypunct< CharT, Intl >::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.
Definition at line 3830 of file locale_facets.h.
Referenced by std::moneypunct< CharT, Intl >::negative_sign().
virtual int std::moneypunct< CharT, Intl >::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.
Definition at line 3844 of file locale_facets.h.
Referenced by std::moneypunct< CharT, Intl >::frac_digits().
virtual pattern std::moneypunct< CharT, Intl >::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.
Definition at line 3858 of file locale_facets.h.
Referenced by std::moneypunct< CharT, Intl >::pos_format().
virtual pattern std::moneypunct< CharT, Intl >::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.
Definition at line 3872 of file locale_facets.h.
Referenced by std::moneypunct< CharT, Intl >::neg_format().
const bool std::moneypunct_byname< CharT, Intl >::intl [static] |
existence.
Reimplemented from std::moneypunct< CharT, Intl >.
Definition at line 3926 of file locale_facets.h.
locale::id std::moneypunct< CharT, Intl >::id [static, inherited] |