std::basic_filebuf::basic_filebuf
来自cppreference.com
< cpp | io | basic filebuf
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
basic_filebuf(); |
(1) | |
basic_filebuf( const std::basic_filebuf& rhs ) = delete; |
(2) | |
basic_filebuf( std::basic_filebuf&& rhs ); |
(3) | (C++11 起) |
构造一个
2) std::basic_filebuf
对象,std::basic_streambuf调用默认的构造函数初始化基类。创建basic_filebuf
与文件相关联,is_open()
回报false.原文:
Constructs a
std::basic_filebuf
object, initializing the base class by calling the default constructor of std::basic_streambuf. The created basic_filebuf
is not associated with a file, and is_open()
returns false.拷贝构造函数被删除;
3) std::basic_filebuf
是不CopyConstructible
原文:
The copy constructor is deleted;
std::basic_filebuf
is not CopyConstructible
移动构建了一个移动的所有内容,从另一个
std::basic_filebuf
对象std::basic_filebuf
,包括缓冲区,关联的文件,语言环境,使openMode,在IS_OPEN的变量,和所有其他国家的rhs
对象。移动后,rhs
是不相关的文件和rhs.is_open()==false。的std::basic_streambuf的rhs
的基类,基类*this
保证的成员指针指向不同的缓冲区(除非空).原文:
Move-constructs a
std::basic_filebuf
object by moving all contents from another std::basic_filebuf
object rhs
, including the buffers, the associated file, the locale, the openmode, the is_open variable, and all other state. After move, rhs
is not associated with a file and rhs.is_open()==false. The member pointers of the base class std::basic_streambuf of rhs
and of the base class of *this
are guaranteed to point to different buffers (unless null).目录 |
[编辑] 参数
rhs | - | 另一个
basic_filebuf |
[编辑] 注释
std::basic_fstream的构造函数通常被称为.
原文:
Typically called by the constructor of std::basic_fstream.
[编辑] 示例
本章尚未完成 原因:暂无示例 |
[编辑] 另请参阅
(C++11) |
分配一个basic_filebuf的对象 (公共成员函数) |
[虚]</div></div>
|
解构一个basic_filebuf对象,如果它是开放的,并关闭该文件 原文: destructs a basic_filebuf object and closes the file if it is open (公有虚成员函数) |