Namespaces
Variants
Actions

std::moneypunct_byname

From cppreference.com
< cpp‎ | locale
 
 
 
 
Defined in header <locale>
template< class CharT, bool Intl = false >
class moneypunct_byname : public std::moneypunct<CharT, Intl>;

std::moneypunct_byname is a std::moneypunct facet which encapsulates monetary formatting preferences of a locale specified at its construction.

Contents

[edit] Specializations

The standard library is guaranteed to provide every specialization that satisfies the following type requirements:

  • CharT is one of char and wchar_t, and
  • Intl is a possible specialization on a bool parameter.

[edit] Nested types

Type Definition
pattern std::money_base::pattern
string_type std::basic_string<CharT>

[edit] Member functions

(constructor)
constructs a new moneypunct_byname facet
(public member function) [edit]
(destructor)
destroys a moneypunct_byname facet
(protected member function) [edit]

std::moneypunct_byname::moneypunct_byname

explicit moneypunct_byname( const char* name, std::size_t refs = 0 );
explicit moneypunct_byname( const std::string& name, std::size_t refs = 0 );
(since C++11)

Constructs a new std::moneypunct_byname facet for a locale with name.

refs is used for resource management: if refs == 0, the implementation destroys the facet, when the last std::locale object holding it is destroyed. Otherwise, the object is not destroyed.

Parameters

name - the name of the locale
refs - the number of references that link to the facet

std::moneypunct_byname::~moneypunct_byname

protected:
~moneypunct_byname();

Destroys the facet.

Inherited from std::moneypunct

Nested types

Type Definition
char_type CharT
string_type std::basic_string<CharT>

Data members

Member Description
std::locale::id id [static] the identifier of the facet
const bool intl [static] International

Member functions

invokes do_decimal_point
(public member function of std::moneypunct<CharT,International>) [edit]
invokes do_thousands_sep
(public member function of std::moneypunct<CharT,International>) [edit]
invokes do_grouping
(public member function of std::moneypunct<CharT,International>) [edit]
invokes do_curr_symbol
(public member function of std::moneypunct<CharT,International>) [edit]
invokes do_positive_sign or do_negative_sign
(public member function of std::moneypunct<CharT,International>) [edit]
invokes do_frac_digits
(public member function of std::moneypunct<CharT,International>) [edit]
invokes do_pos_format/do_neg_format
(public member function of std::moneypunct<CharT,International>) [edit]

Protected member functions

provides the character to use as decimal point
(virtual protected member function of std::moneypunct<CharT,International>) [edit]
provides the character to use as thousands separator
(virtual protected member function of std::moneypunct<CharT,International>) [edit]
[virtual]
provides the numbers of digits between each pair of thousands separators
(virtual protected member function of std::moneypunct<CharT,International>)