std::basic_streambuf::overflow
来自cppreference.com
< cpp | io | basic streambuf
![]() |
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
int_type overflow( int_type ch = traits::eof() ); |
||
确保有在放节省一些初始后继
pbase()
输出序列开始的字符中的至少一个字符的输出区域(如果需要的话)和更新的指针区域的空间。如果ch
不是traits::eof()(即traits::eq_int_type(c, traits::eof()) != true),它要么是把输出区域或直接保存到输出序列.原文:
Ensures that there space at the put area for at least one character by saving some initial subsequence of characters starting at
pbase()
to the output sequence and updating the pointers to the output area (if needed). If ch
is not traits::eof() (i.e. traits::eq_int_type(c, traits::eof()) != true), it is either put to the output area or directly saved to the output sequence.的功能更新
pptr
,epptr
pback
指针定义的位置写入更多的数据。发生故障时,该功能可确保无论是pptr() == nullptr或pptr() == epptr.基类版本的函数什么也不做。派生类可以重载这个函数来取回区耗尽的情况下,允许更新.
目录 |
[编辑] 参数
[编辑] 返回值
返回未指定的值不等于成功traits::eof(),traits::eof()失败.
基类版本的函数返回traits::eof().
[编辑] 请注意
[编辑] 示例
本节未完成 原因:暂无示例 |
[编辑] 另请参阅
[虚] |
相关的输入序列读取字符的get区和进步的下一个指针 (虚受保护成员函数) |
[虚] |
相关的输入序列读取字符的get区 (虚受保护成员函数) |
[虚] |
认沽区相关的文件中写入字符 ( std::basic_filebuf 的虚受保护成员函数)
|
[虚] |
( std::basic_stringbuf 的虚受保护成员函数)
|
[虚] |
添加一个字符的输出序列,可以重新分配或初始分配的缓冲区,如果动态的,而不是冻结 ( std::strstreambuf 的虚受保护成员函数)
|