名前空間
変種
操作

std::moneypunct

From cppreference.com
< cpp‎ | locale
 
 
 
 
 
ヘッダー <locale> で定義
template< class CharT, bool International = false >
class moneypunct;

std::moneypunct ファセットは、通貨値の書式設定に関する設定をカプセル化します。ストリーム I/O マニピュレータである std::get_money および std::put_money は、通貨値の入力を解析し、通貨値の出力をフォーマットするために、std::money_get および std::money_put を介して std::moneypunct を使用します。

cpp/locale/money basecpp/locale/locale/facetstd-moneypunct-inheritance.svg

継承図

目次

[編集] 特殊化

標準ライブラリは、以下の特殊化を提供することが保証されています(これらは あらゆるロケールオブジェクトによって実装される必要があります)。

ヘッダー <locale> で定義
std::moneypunct<char> "C" ロケールの設定の相当するものを提供します。
std::moneypunct<wchar_t> "C" ロケールの設定のワイド文字相当のものを提供します。
std::moneypunct<char, true> 国際通貨記号を使用した "C" ロケールの設定の相当するものを提供します。
std::moneypunct<wchar_t, true> 国際通貨記号を使用した "C" ロケールの設定のワイド文字相当のものを提供します。

[編集] ネストされた型

定義
char_type CharT
string_type std::basic_string<CharT>

[編集] データメンバ

メンバ 説明
std::locale::id id [static] ファセットの識別子
const bool intl [static] 国際的

[編集] メンバ関数

新しい moneypunct ファセットを構築します。
(public member function) [編集]
do_decimal_point を呼び出します。
(public member function) [編集]
do_thousands_sep を呼び出します。
(public member function) [編集]
do_grouping を呼び出します。
(public member function) [編集]
do_curr_symbol を呼び出します。
(public member function) [編集]
do_positive_sign または do_negative_sign を呼び出します。
(public member function) [編集]
do_frac_digits を呼び出します。
(public member function) [編集]
do_pos_format/do_neg_format を呼び出します。
(public member function) [編集]

[編集] 保護されたメンバ関数

moneypunct ファセットを破棄します。
(protected member function) [編集]
小数点として使用する文字を提供します
(仮想保護メンバ関数) [編集]
千単位の区切り文字として使用する文字を提供します
(仮想保護メンバ関数) [編集]
[virtual]
各桁区切り記号のペア間の桁数を提供します。
(virtual protected member function) [編集]
通貨識別子として使用する文字列を提供します。
(virtual protected member function) [編集]
正または負の値を示す文字列を提供します。
(virtual protected member function) [編集]
小数点以下の桁数を提供します。
(virtual protected member function) [編集]
通貨値の書式設定パターンを提供します。
(virtual protected member function) [編集]

std::money_base から継承

ネストされた型

定義
enum part { none, space, symbol, sign, value }; スコープなし列挙型
struct pattern { char field[4]; }; 通貨書式設定の型
列挙定数 説明
なし 空白文字は許可されますが、最後の位置を除き、必須ではありません。最後の位置では空白文字は許可されません。
スペース 1 つ以上の空白文字が必要です。
記号 std::moneypunct::curr_symbol によって返される文字シーケンスが必要です。
符号 std::moneypunct::positive_sign または std::moneypunct::negative_sign によって返される最初の文字が必要です。
value 絶対数値の通貨値が必要です。

[編集] 関連項目

通貨書式パターンを定義する
(クラス) [編集]
名前付きロケール用のシステム供給の std::moneypunct を表します。
(クラステンプレート) [編集]
入力文字列シーケンスから通貨値を解析・構築する
(クラステンプレート) [編集]
通貨値を文字列シーケンスとして出力するために書式設定する
(クラステンプレート) [編集]
English 日本語 中文(简体) 中文(繁體)