std::basic_filebuf::basic_filebuf

来自cppreference.com
< cpp‎ | io‎ | basic filebuf

basic_filebuf();
(1)
basic_filebuf( const std::basic_filebuf& rhs ) = delete;
(2)
basic_filebuf( std::basic_filebuf&& rhs );
(3) (C++11 起)
1)
构造一个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.
文本通过谷歌翻译机器翻译。
你可以帮忙校正和验证翻译。点击此处查看指示。
2)
拷贝构造函数被删除;std::basic_filebuf是不CopyConstructible
原文:
The copy constructor is deleted; std::basic_filebuf is not CopyConstructible
文本通过谷歌翻译机器翻译。
你可以帮忙校正和验证翻译。点击此处查看指示。
3)
移动构建了一个移动的所有内容,从另一个std::basic_filebuf对象std::basic_filebuf,包括缓冲区,关联的文件,语言环境,使openMode,在IS_OPEN的变量,和所有其他国家的rhs对象。移动后,rhs是不相关的文件和rhs.is_open()==false。的std::basic_streambufrhs的基类,基类*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
原文:
another basic_filebuf
文本通过谷歌翻译机器翻译。
你可以帮忙校正和验证翻译。点击此处查看指示。

[编辑] 注释

std::basic_fstream的构造函数通常被称为.
原文:
Typically called by the constructor of std::basic_fstream.
文本通过谷歌翻译机器翻译。
你可以帮忙校正和验证翻译。点击此处查看指示。

[编辑] 示例

[编辑] 另请参阅

(C++11)
赋值 basic_filebuf 对象
(公开成员函数) [编辑]
析构 basic_filebuf 对象并且若打开则关闭文件
(虚公开成员函数) [编辑]