std::basic_ostream::sentry
提供:cppreference.com
< cpp | io | basic ostream
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Defined in header <ostream>
|
||
| template< class CharT, class Traits = std::char_traits<CharT> > class std::basic_istream<charT,traits>::sentry |
||
クラス
basic_ostream::sentryのオブジェクトが出力(フォーマット済みと未フォーマットの両方)を実行std::basic_ostreamの各メンバ関数の先頭でローカルスコープで構成されている。ストリームがすでに失敗した状態にあるかどうかをチェックし、フラッシュするのtie() 'd出力ストリーム、および必要に応じて他の実装で定義されたタスクを実行します。そのコンストラクタは出力ストリームを準備します。実装定義クリーンアップだけでなく、出力ストリーム、必要に応じてのフラッシュは、それは例外が出力中にスローされる場合に発生することが保証されているように、デストラクタで行われ.Original:
An object of class
basic_ostream::sentry is constructed in local scope at the beginning of each member function of std::basic_ostream that performs output (both formatted and unformatted). Its constructor prepares the output stream: checks if the stream is already in a failed state, flushes the tie()'d output streams, and performs other implementation-defined tasks if necessary. Implementation-defined cleanup, as well as flushing of the output stream if necessary, is performed in the destructor, so that it is guaranteed to happen if exceptions are thrown during output.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[編集] メンバ関数
| 準備作業はここで行われている歩哨object. Allを構築します Original: constructs the sentry object. All the preparation tasks are done here The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
| 必要に応じて、書式付き出力した後、または例外の後にストリームオブジェクトを終了します Original: finalizes the stream object after formatted output or after exception, if necessary The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
| operator= |
代入演算子が削除されます Original: the assignment operator is deleted The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) |
| ストリームオブジェクトの準備するかどうかをチェックするには、成功しました Original: checks if the preparation of the stream object was successful The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
[編集] 例
| This section is incomplete Reason: no example |
[編集] も参照してください
| 挿入してデータをフォーマットします Original: inserts formatted data The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |