std::basic_filebuf<CharT,Traits>:: basic_filebuf
From cppreference.net
<
cpp
|
io
|
basic filebuf
|
basic_filebuf
(
)
;
|
(1) | |
|
basic_filebuf
(
const
std::
basic_filebuf
&
rhs
)
=
delete
;
|
(2) | (C++11以降) |
|
basic_filebuf
(
std::
basic_filebuf
&&
rhs
)
;
|
(3) | (C++11以降) |
std::basic_filebuf
オブジェクトを新しく構築します。
1)
ファイルに関連付けられていない
std::basic_filebuf
オブジェクトを構築し、基底クラスを
std::basic_streambuf
のデフォルトコンストラクタを呼び出すことで初期化します。作成された
basic_filebuf
はファイルに関連付けられておらず、
is_open()
は
false
を返します。
3)
別の
std::basic_filebuf
オブジェクト
rhs
からすべての内容(バッファ、関連付けられたファイル、ロケール、オープンモード、is_open変数、およびその他のすべての状態を含む)を移動することで、
std::basic_filebuf
オブジェクトをムーブ構築します。ムーブ後、
rhs
はファイルに関連付けられておらず、
rhs.
is_open
(
)
==
false
となります。
rhs
の基底クラス
std::basic_streambuf
および
*
this
の基底クラスのメンバポインタは、(nullでない限り)異なるバッファを指すことが保証されています。
目次 |
パラメータ
| rhs | - |
別の
basic_filebuf
|
注記
通常は std::basic_fstream のコンストラクタによって呼び出されます。
例
|
このセクションは不完全です
理由: 例がありません |
関連項目
|
(C++11)
|
basic_filebuf
オブジェクトを代入する
(public member function) |
|
[virtual]
|
basic_filebuf
オブジェクトを破棄し、ファイルが開いている場合は閉じる
(virtual public member function) |