「cpp/io/basic ios/init」の版間の差分
提供: cppreference.com
細 (Fix some translations) |
|||
1行: | 1行: | ||
− | |||
{{cpp/io/basic_ios/title | init}} | {{cpp/io/basic_ios/title | init}} | ||
{{cpp/io/basic_ios/navbar}} | {{cpp/io/basic_ios/navbar}} | ||
7行: | 6行: | ||
}} | }} | ||
− | + | {{tt|sb}} | |
− | + | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
− | ! | + | ! |
− | ! | + | ! |
|- | |- | ||
− | | {{ | + | | {{|rdbuf}} || {{tt|sb}} |
|- | |- | ||
− | | {{ | + | | {{|tie}} || |
|- | |- | ||
− | | {{ | + | | {{|rdstate}} || {{tt|}} {{tt|}}{{tt|badbit}} |
|- | |- | ||
− | | {{ | + | | {{|exceptions}} || {{tt|goodbit}} |
|- | |- | ||
| {{ltf|cpp/io/ios_base/flags}} || {{c|skipws {{!}} dec}} | | {{ltf|cpp/io/ios_base/flags}} || {{c|skipws {{!}} dec}} | ||
30行: | 29行: | ||
| {{ltf|cpp/io/ios_base/precision}} || {{c|6}} | | {{ltf|cpp/io/ios_base/precision}} || {{c|6}} | ||
|- | |- | ||
− | | {{ | + | | {{|fill}} || {{c|widen(' ')}} |
|- | |- | ||
− | | {{ltf|cpp/io/ios_base/getloc}} || | + | | {{ltf|cpp/io/ios_base/getloc}} || {{c|std::locale()}} |
|} | |} | ||
− | + | protected {{lc|std::basic_istream}} {{lc|std::basic_ostream}} () {{tt|basic_ios}} | |
− | === | + | ====== |
{{par begin}} | {{par begin}} | ||
− | {{par | sb | | + | {{par | sb | }} |
{{par end}} | {{par end}} | ||
− | === | + | ====== |
{{dsc begin}} | {{dsc begin}} | ||
{{dsc inc | cpp/io/basic_ios/dsc constructor}} | {{dsc inc | cpp/io/basic_ios/dsc constructor}} | ||
{{dsc end}} | {{dsc end}} | ||
− | + | deenesfritptruzh | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + |
2018年6月2日 (土) 19:29時点における最新版
protected: void init( std::basic_streambuf<CharT,Traits>* sb ); |
||
紐付けられるストリームバッファを sb
に設定し、内部状態を初期化します。
事後条件は以下の通りです。
要素 | 値 |
---|---|
rdbuf() | sb
|
tie() | ヌルポインタ |
rdstate() | sb がヌルポインタでなければ goodbit 、そうでなければ badbit
|
exceptions() | goodbit
|
flags() | skipws | dec |
width() | 0 |
precision() | 6 |
fill() | widen(' ') |
getloc() | std::locale() によって返される値のコピー |
このメンバ関数は protected です。 紐付けるストリームバッファが判明したときに派生ストリームクラスのコンストラクタ std::basic_istream および std::basic_ostream から呼ばれます。 この関数が呼ばれるまで、すべてのメンバ関数 (デストラクタを含む) の呼び出しは未定義動作です。 basic_ios
は仮想基底クラスであり、そのためそのコンストラクタはこれらの直接の派生クラスのコンストラクタからは呼ばれないことに注意してください。 それが2ステージの初期化を必要とする理由です。
[編集] 引数
sb | - | 紐付けるストリームバッファ |
[編集] 関連項目
オブジェクトを構築します (パブリックメンバ関数) |