Init
This commit is contained in:
147
cppdraft/locale/moneypunct/virtuals.md
Normal file
147
cppdraft/locale/moneypunct/virtuals.md
Normal file
@@ -0,0 +1,147 @@
|
||||
[locale.moneypunct.virtuals]
|
||||
|
||||
# 28 Text processing library [[text]](./#text)
|
||||
|
||||
## 28.3 Localization library [[localization]](localization#locale.moneypunct.virtuals)
|
||||
|
||||
### 28.3.4 Standard locale categories [[locale.categories]](locale.categories#locale.moneypunct.virtuals)
|
||||
|
||||
#### 28.3.4.7 The monetary category [[category.monetary]](category.monetary#locale.moneypunct.virtuals)
|
||||
|
||||
#### 28.3.4.7.4 Class template moneypunct [[locale.moneypunct]](locale.moneypunct#virtuals)
|
||||
|
||||
#### 28.3.4.7.4.3 Virtual functions [locale.moneypunct.virtuals]
|
||||
|
||||
[ð](#lib:moneypunct,do_decimal_point)
|
||||
|
||||
`charT do_decimal_point() const;
|
||||
`
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L4590)
|
||||
|
||||
*Returns*: The radix separator to use
|
||||
in case do_frac_digits() is greater than zero[.](#1.sentence-1)[231](#footnote-231 "In common U.S. locales this is '.'.")
|
||||
|
||||
[ð](#lib:moneypunct,do_thousands_sep)
|
||||
|
||||
`charT do_thousands_sep() const;
|
||||
`
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L4605)
|
||||
|
||||
*Returns*: The digit group separator to use
|
||||
in case do_grouping() specifies a digit grouping pattern[.](#2.sentence-1)[232](#footnote-232 "In common U.S. locales this is ','.")
|
||||
|
||||
[ð](#lib:moneypunct,do_grouping)
|
||||
|
||||
`string do_grouping() const;
|
||||
`
|
||||
|
||||
[3](#3)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L4620)
|
||||
|
||||
*Returns*: A pattern defined identically as, but not necessarily equal to,
|
||||
the result of numpunct<charT>::do_grouping()[.](#3.sentence-1)[233](#footnote-233 "To specify grouping by 3s, the value is "\003" not "3".")
|
||||
|
||||
[ð](#lib:moneypunct,do_curr_symbol)
|
||||
|
||||
`string_type do_curr_symbol() const;
|
||||
`
|
||||
|
||||
[4](#4)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L4636)
|
||||
|
||||
*Returns*: A string to use as the currency identifier symbol[.](#4.sentence-1)
|
||||
|
||||
[*Note [1](#note-1)*:
|
||||
|
||||
For specializations where the second template parameter is true,
|
||||
this is typically four characters long:
|
||||
a three-letter code as specified by ISO 4217[[bib]](bibliography#bib:iso4217 "Bibliography") followed by a space[.](#4.sentence-2)
|
||||
|
||||
â *end note*]
|
||||
|
||||
[ð](#lib:moneypunct,do_positive_sign)
|
||||
|
||||
`string_type do_positive_sign() const;
|
||||
string_type do_negative_sign() const;
|
||||
`
|
||||
|
||||
[5](#5)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L4655)
|
||||
|
||||
*Returns*: do_positive_sign() returns the string to use to indicate a positive monetary value;[234](#footnote-234 "This is usually the empty string.")do_negative_sign() returns the string to use to indicate a negative value[.](#5.sentence-1)
|
||||
|
||||
[ð](#lib:moneypunct,do_frac_digits)
|
||||
|
||||
`int do_frac_digits() const;
|
||||
`
|
||||
|
||||
[6](#6)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L4672)
|
||||
|
||||
*Returns*: The number of digits after the decimal radix separator, if any[.](#6.sentence-1)[235](#footnote-235 "In common U.S. locales, this is 2.")
|
||||
|
||||
[ð](#lib:moneypunct,do_pos_format)
|
||||
|
||||
`pattern do_pos_format() const;
|
||||
pattern do_neg_format() const;
|
||||
`
|
||||
|
||||
[7](#7)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L4688)
|
||||
|
||||
*Returns*: The specializations required in Table [92](locale.category#tab:locale.spec "Table 92: Required specializations") ([[locale.category]](locale.category "28.3.3.1.2.1 Type locale::category")), namely
|
||||
|
||||
- [(7.1)](#7.1)
|
||||
|
||||
moneypunct<char>,
|
||||
|
||||
- [(7.2)](#7.2)
|
||||
|
||||
moneypunct<wchar_t>,
|
||||
|
||||
- [(7.3)](#7.3)
|
||||
|
||||
moneypunct<char, true>, and
|
||||
|
||||
- [(7.4)](#7.4)
|
||||
|
||||
moneypunct<wchar_t, true>,
|
||||
|
||||
return an object of type pattern initialized to { symbol, sign, none, value }[.](#7.sentence-1)[236](#footnote-236 "Note that the international symbol returned by do_curr_symbol() usually contains a space, itself; for example, "USD ".")
|
||||
|
||||
[231)](#footnote-231)[231)](#footnoteref-231)
|
||||
|
||||
In common U.S. locales this is '.'[.](#footnote-231.sentence-1)
|
||||
|
||||
[232)](#footnote-232)[232)](#footnoteref-232)
|
||||
|
||||
In common U.S. locales this is ','[.](#footnote-232.sentence-1)
|
||||
|
||||
[233)](#footnote-233)[233)](#footnoteref-233)
|
||||
|
||||
To specify grouping by 3s,
|
||||
the value is "\003" *not* "3"[.](#footnote-233.sentence-1)
|
||||
|
||||
[234)](#footnote-234)[234)](#footnoteref-234)
|
||||
|
||||
This is usually the empty string[.](#footnote-234.sentence-1)
|
||||
|
||||
[235)](#footnote-235)[235)](#footnoteref-235)
|
||||
|
||||
In common U.S. locales, this is 2[.](#footnote-235.sentence-1)
|
||||
|
||||
[236)](#footnote-236)[236)](#footnoteref-236)
|
||||
|
||||
Note that the international symbol returned by do_curr_symbol() usually contains a space, itself;
|
||||
for example, "USD "[.](#footnote-236.sentence-1)
|
||||
Reference in New Issue
Block a user