public member type
<locale>
Pattern type
This member type is inherited from
money_base.
It is a data structure containing a pattern describing the format of a monetary expression. The pattern contains four fields, which are represented by an array of four
char elements called
field:
|
struct pattern { char field[4]; };
|
It is designed to contain four format specifiers (fields) with values defined in the enum type
moneypunct::part.
Each field shall expand in the same order as it appears in the array into some part of a monetary expression. The possible values of each
field element is one of the following member enum labels:
value | expands to | notes |
none | Nothing | Cannot be the first specifier. |
space | White space (at least one, may expand to more) | Cannot be the first or last specifier. |
symbol | Currency symbol, as returned by moneypunct::curr_symbol | |
sign | Sign (either moneypunct::positive_sign or moneypunct::negative_sign)
If longer than one character, at least the first character is printed in that position | |
value | Absolute monetary value | |
Each specifier can only appear once in the pattern.
Notice that the type of the elements in the
field array is
char and not
moneypunct::part. This was done in the design of the library for efficiency purposes, but
field is designed to hold four
moneypunct::part values.
See also
- moneypunct::part
- Part of pattern (public member type)