std::basic_streambuf::pubsync, std::basic_streambuf::sync
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
int pubsync(); |
(1) | |
protected: virtual int sync(); |
(2) | |
Synchronizes the controlled character sequence (the buffers) with the associated character sequence.
1)sync()
最派生类sync()
of the most derived class2) The base class version of this function has no effect. The derived classes may override this function to allow synchronizing the underlying device with the buffers.
For output streams, this typically results in writing the contents of the put area into the associated sequence, i.e. flushing of the output buffer. For input streams, this typically empties the get area and forces a re-read from the associated sequence to pick up recent changes. The default behavior (found, for example, in std::basic_stringbuf), is to do nothing.
目录 |
[编辑] 参数
[编辑] 返回值
1) The return value of sync()
.
2) Returns 0 on success, -1 otherwise. The base class version returns 0.
[编辑] 示例
本章尚未完成 原因:暂无示例 |
[编辑] 另请参阅
与底层存储设备同步 原文: synchronizes with the underlying storage device (公共成员函数of std::basic_istream )
| |
[虚]</div></div>
|
认沽区相关的文件中写入字符 原文: writes characters to the associated file from the put area (虚拟保护成员函数of std::basic_filebuf )
|