名前空間
変種
操作

std::moneypunct_byname

提供: cppreference.com
< cpp‎ | locale

 
 
ローカライゼーションライブラリ
ロケールおよびファセット
Original:
Locales and facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
locale
文字分類
Original:
Character classification
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
変換
Original:
Conversions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ファセットカテゴリの基底クラスです
Original:
Facet category base classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ファセットカテゴリ
Original:
Facet categories
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ロケール固有のファセット
Original:
Locale-specific facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
コー​​ド変換ファセット
Original:
Code conversion facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
codecvt_utf8(C++11)
codecvt_utf16(C++11)
Cロケール
Original:
C locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
Defined in header <locale>
template< class charT, bool Intl = false >
class moneypunct_byname : public std::moneypunct<charT, Intl>;
std::moneypunct_bynameその建設時に指定されたロケールの通貨書式設定をカプセル化std::moneypunctファセットです.
Original:
std::moneypunct_byname is a std::moneypunct facet which encapsulates monetary formatting preferences of a locale specified at its construction.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2つの専門分野は、標準ライブラリで提供されています
Original:
Two specializations are provided by the standard library
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Defined in header <locale>
std::moneypunct_byname<char, Intl>
狭い文字I / Oのためのロケール固有std::moneypunctファセット
Original:
locale-specific std::moneypunct facet for narrow character I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::moneypunct_byname<wchar_t, Intl>
ワイド文字I / Oのためのロケール固有std::moneypunctファセット
Original:
locale-specific std::moneypunct facet for wide character I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目次

[編集] メンバータイプ

メンバー·タイプ
Original:
Member type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Definition
pattern std::money_base::pattern
string_type std::basic_string<charT>

[編集] メンバ関数

新しいmoneypunct_bynameファセットを構築します
Original:
constructs a new moneypunct_byname facet
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数)
moneypunct_bynameファセットを破棄します
Original:
destructs a moneypunct_byname facet
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(メンバー関数を保護しました)

[編集]

この例では、ロケールの残りの部分を変更せずに別の言語の通貨フォーマットルールを適用する方法をdemonistrates .
Original:
This example demonistrates how to apply monetary formatting rules of another language without changing the rest of the locale.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

#include <iostream>
#include <iomanip>
#include <locale>
int main()
{
    long double mon = 1234567;
    std::locale::global(std::locale("en_US.utf8"));
    std::wcout.imbue(std::locale());
    std::wcout << L"american locale : " << std::showbase
               << std::put_money(mon) << '\n';
    std::wcout.imbue(std::locale(std::wcout.getloc(),
                                 new std::moneypunct_byname<wchar_t>("ru_RU.utf8")));
    std::wcout << L"american locale with russian moneypunct: "
               << std::put_money(mon) << '\n';
}

Output:

american locale : $12,345.67
american locale with russian moneypunct: 12 345.67 руб

[編集] も参照してください

std::money_getstd::money_putによって使用される通貨形式のパラメータを定義します
Original:
defines monetary formatting parameters used by std::money_get and std::money_put
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(クラステンプレート) [edit]