名前空間
変種
操作

std::money_put

提供: 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.
 
std::money_put
メンバ関数
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
money_put::money_put
money_put::~money_put
money_put::put
money_put::do_put
 
Defined in header <locale>
template<

    class CharT,
    class OutputIt = std::ostreambuf_iterator<CharT>

> class money_put;
クラスstd::money_putは文字列として金銭的な値をフォーマットするための規則をカプセル化します。標準I / Oマニピュレータstd::put_moneyは、I / Oストリームのロケールのstd::money_putファセットを使用しています.
Original:
Class std::money_put encapsulates the rules for formatting monetary values as strings. The standard I/O manipulator std::put_money uses the std::money_put facet of the I/O stream's locale.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
cpp/locale/locale/facetstd-money put-inheritance.svg
画像の詳細

Inheritance diagram

目次

[編集] 型の要件

-
InputIt must meet the requirements of InputIterator.

[編集] スペシャ

2つの専門分野と2部分的な特殊化は、標準ライブラリによって提供されており、C + +プログラムで作成されたすべてのロケール·オブジェクトによって実装されます
Original:
Two specializations and two partial specializations are provided by the standard library and are implemented by all locale objects created in a C++ program:
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::money_put<char>
金銭的な価値観の狭い文字列表現を作成します
Original:
creates narrow string representations of monetary values
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::money_put<wchar_t>
金額値のワイド文字列表現を作成します
Original:
creates wide string representations of monetary values
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::money_put<char, OutputIt>
カスタム出力イテレータを使用して、貨幣の値の狭い文字列表現を作成します
Original:
creates narrow string representations of monetary values using custom output iterator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::money_put<wchar_t, OutputIt>
カスタム出力イテレータを使用して、貨幣の値のワイド文字列表現を作成します
Original:
creates wide string representations of monetary values using custom output iterator
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
char_type CharT
string_type std::basic_string<CharT>
iter_type OutputIt

[編集] メンバ関数

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

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

(メンバー関数を保護しました)
do_putを呼び出します
Original:
invokes do_put
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数)

[編集] メンバ関数を保護しました

[仮想]
フォーマット金銭的価値とされた出力ストリームに書き込みます
Original:
formats a monetary value and writes to output stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(仮想protectedメンバ関数)

[編集] メンバーオブジェクト

static std::locale::id id
idはロケールの
Original:
id 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 <locale>
#include <iomanip>
#include <iterator>
int main()
{
    // using the IO manipulator
    std::cout.imbue(std::locale("en_US.UTF-8"));
    std::cout << "american locale: "
               << std::showbase << std::put_money(12345678.9)<< '\n';
 
    // using the facet directly
    std::cout.imbue(std::locale("de_DE"));
    std::cout << "german locale: " ;
    std::ostreambuf_iterator<char> out(std::cout);
    auto& f = std::use_facet<std::money_put<char>>(std::cout.getloc());
    f.put(out, false, std::cout, std::cout.fill(), 12345678.9 );
    std::cout << '\n';
}

Output:

american locale: $123,456.79
german locale: 123.456,79 EUR

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

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]
入力文字シーケンスからの金銭的価値を解析し、構築します
Original:
parses and constructs a monetary value from an input character sequence
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(クラステンプレート) [edit]
(C++11)
フォーマットと金銭的な値を出力します
Original:
formats and outputs a monetary value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(関数テンプレート)