Reference
C Library
IOstream Library
Strings library
STL Containers
STL Algorithms
Miscellaneous
Miscellaneous
complex
exception
functional
iterator
limits
locale
memory
new
numeric
stdexcept
typeinfo
utility
valarray
locale
has_facet
isalnum
isalpha
iscntrl
isdigit
isgraph
islower
isprint
ispunct
isspace
isupper
isxdigit
locale
tolower
toupper
use_facet
standard facets:
codecvt
codecvt_base
codecvt_byname
collate
collate_byname
ctype
ctype_base
ctype_byname
messages
messages_base
messages_byname
moneypunct
moneypunct_byname
money_base
money_get
money_put
numpunct
numpunct_byname
num_get
num_put
time_base
time_get
time_get_byname
time_put
time_put_byname
moneypunct
moneypunct::moneypunct
public member constant:
moneypunct::intl
public member functions:
moneypunct::curr_symbol
moneypunct::decimal_point
moneypunct::frac_digits
moneypunct::grouping
moneypunct::negative_sign
moneypunct::neg_format
moneypunct::positive_sign
moneypunct::pos_format
moneypunct::thousands_sep
public member types:
moneypunct::char_type
moneypunct::part
moneypunct::pattern
moneypunct::string_type
protected members:
moneypunct::do_curr_symbol
moneypunct::do_decimal_point
moneypunct::do_frac_digits
moneypunct::do_grouping
moneypunct::do_negative_sign
moneypunct::do_neg_format
moneypunct::do_positive_sign
moneypunct::do_pos_format
moneypunct::do_thousands_sep
moneypunct::~moneypunct


moneypunct::pattern

public member type
struct pattern;

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:

valueexpands tonotes
noneNothingCannot be the first specifier.
spaceWhite space (at least one, may expand to more)Cannot be the first or last specifier.
symbolCurrency symbol, as returned by moneypunct::curr_symbol
signSign (either moneypunct::positive_sign or moneypunct::negative_sign)
If longer than one character, at least the first character is printed in that position
valueAbsolute 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