名前空間
変種
操作

std::time_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::time_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.
time_put::time_put
time_put::~time_put
time_put::put
time_put::do_put
 
Defined in header <locale>
template<

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

> class time_put;
クラステンプレートstd::time_putは、日付と時刻の書式設定ルールをカプセル化します。 I / Oのマニピュレータstd::put_timestd::time_putオブジェクトのテキスト表現を生成するために、I / Oストリームのロケールのstd::tmファセットを使用しています.
Original:
Class template std::time_put encapsulates date and time formatting rules. The I/O manipulator std::put_time uses the std::time_put facet of the I/O stream's locale to generate text representation of an std::tm object.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
cpp/locale/time basecpp/locale/locale/facetstd-time put-inheritance.svg
画像の詳細

Inheritance diagram

目次

[編集] 型の要件

-
OutputIt must meet the requirements of OutputIterator.

[編集] スペシャ

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::time_put<char>
日付と時刻の狭い文字列表現を作成します
Original:
creates narrow string representations of date and time
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::time_put<wchar_t>
日付と時刻のワイド文字列表現を作成します
Original:
creates wide string representations of date and time
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::time_put<char, OutputIt>
カスタム出力イテレータを使用して、日付と時刻の狭い文字列表現を作成します
Original:
creates narrow string representations of date and time 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::time_put<wchar_t, OutputIt>
カスタム出力イテレータを使用して、日付と時刻のワイド文字列表現を作成します
Original:
creates wide string representations of date and time 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
iter_type OutputIt

[編集] メンバ関数

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

(protectedメンバー関数) [edit]
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.

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

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

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.

(パブリックメンバオブジェクト)

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

[仮想]
フォーマットの日付/時刻と出力ストリームに書き込みます
Original:
formats date/time 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メンバ関数of std::time_get) [edit]

[編集]

#include <iostream>
#include <ctime>
#include <iomanip>
#include <codecvt>
 
int main()
{
    std::time_t t = std::time(NULL);
    std::wbuffer_convert<std::codecvt_utf8<wchar_t>> conv(std::cout.rdbuf());
    std::wostream out(&conv);
    out.imbue(std::locale("ja_JP"));
    // this I/O manipulator std::put_time uses std::time_put<wchar_t>
    out << std::put_time(std::localtime(&t), L"%A %c") << '\n';
}

Output:

水曜日 2011年11月09日 12時32分05秒

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

名前のロケール用のシステム提供std::time_putを表しています
Original:
represents the system-supplied std::time_put for the named locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(クラステンプレート) [edit]
struct std::tmに入力文字列から時刻/日付の値を解析します
Original:
parses time/date values from an input character sequence into struct std::tm
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 date/time value according to the specified format
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(関数テンプレート) [edit]