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
。基类
std::basic_streambuf
的成员指针在
rhs
和
*
this
的基类中保证指向不同的缓冲区(除非为空)。
目录 |
参数
| rhs | - |
另一个
basic_filebuf
|
注释
通常由 std::basic_fstream 的构造函数调用。
示例
|
本节内容不完整
原因:缺少示例 |
参见
|
(C++11)
|
赋值
basic_filebuf
对象
(公开成员函数) |
|
[virtual]
|
销毁
basic_filebuf
对象并在文件打开时关闭文件
(虚函数公开成员函数) |