std::basic_filebuf
来自cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Defined in header <fstream>
|
||
| template< class charT, |
||
std::basic_filebuf是std::basic_streambuf,其相关联的字符序列是一个文件。两者的输入序列和输出序列具有相同的文件相关联,和一个联合的文件中的位置被保持为两个操作.Original:
std::basic_filebuf is a std::basic_streambuf whose associated character sequence is a file. Both the input sequence and the output sequence are associated with the same file, and a joint file position is maintained for both operations.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
函数下溢()和溢出()/同步()执行实际的I / O之间的文件和get和put的缓冲。
CharT是不char时,大多数实现存储在文件中的多字节字符和一个std::codecvt方面使用,执行宽/多字节字符转换.Original:
The functions underflow() and overflow()/sync() perform the actual I/O between the file and the get and put areas of the buffer. When
CharT is not char, most implementations store multibyte characters in the file and a std::codecvt facet is used to perform wide/multibyte character conversion.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
常见的字符类型也定义两个专业
Original:
Two specializations for common character types are also defined:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
| Defined in header
<streambuf> | |
| 类型
Original: Type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
filebuf
|
basic_filebuf<char> |
wfilebuf
|
basic_filebuf<wchar_t> |
[编辑] 会员类型
| 会员类型
Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
char_type
|
CharT |
traits_type
|
Traits |
int_type
|
Traits::int_type |
pos_type
|
Traits::pos_type需要是std::fpos<Traits::state_type>
Original: Traits::pos_type which is required to be std::fpos<Traits::state_type> The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
off_type
|
Traits::off_type |
[编辑] 成员函数
Original: Public member functions The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 构建了一个basic_filebuf对象 Original: constructs a basic_filebuf object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数) | |
| (C++11) |
分配一个basic_filebuf的对象 Original: assigns a basic_filebuf object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数) |
| (C++11) |
交换两个basic_filebuf对象 Original: swaps two basic_filebuf objects The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数) |
| [虚拟的] </ SPAN></div></div>
|
解构一个basic_filebuf对象,如果它是开放的,并关闭该文件 Original: destructs a basic_filebuf object and closes the file if it is open The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟公有成员函数) |
| checks if the associated file is open (公共成员函数) | |
| 打开一个文件,并将其配置为相应的字符序列 Original: opens a file and configures it as the associated character sequence The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数) | |
| 冲放区的缓冲区和关闭相关的文件 Original: flushes the put area buffer and closes the associated file The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数) | |
Original: Protected member functions The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| [虚拟的] </ SPAN></div></div>
|
任选地提供可用于从文件中输入的字符数 Original: optionally provides the number of characters available for input from the file The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟保护成员函数) |
| [虚拟的] </ SPAN></div></div>
|
读取相关的文件 Original: reads from the associated file The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟保护成员函数) |
| [虚拟的] </ SPAN></div></div>
|
在get区读取相关文件和进步的下一个指针 Original: reads from the associated file and advances the next pointer in the get area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟保护成员函数) |
| [虚拟的] </ SPAN></div></div>
|
放回中的字符的GET区,不影响相关的文件 Original: puts back the character in the get area, not affecting the associated file The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟保护成员函数) |
| [虚拟的] </ SPAN></div></div>
|
认沽区相关的文件中写入字符 Original: writes characters to the associated file from the put area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟保护成员函数) |
| [虚拟的] </ SPAN></div></div>
|
为用户提供的缓冲或无缓冲将这个filebuf Original: provides user-supplied buffer or turns this filebuf unbuffered The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟保护成员函数) |
| [虚拟的] </ SPAN></div></div>
|
重新定位文件位置,用相对寻址 Original: repositions the file position, using relative addressing The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟保护成员函数) |
| [虚拟的] </ SPAN></div></div>
|
重新定位文件的位置,使用绝对寻址 Original: repositions the file position, using absolute addressing The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟保护成员函数) |
| [虚拟的] </ SPAN></div></div>
|
认沽区相关的文件中写入字符 Original: writes characters to the associated file from the put area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟保护成员函数) |
| [虚拟的] </ SPAN></div></div>
|
改变相关的语言环境 Original: changes the associated locale The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟保护成员函数) |
[编辑] 非成员函数
| 专业的std::swap算法 Original: specializes the std::swap algorithm The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) | |
Inherited from std::basic_streambuf
Member types
| 会员类型
Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
char_type
|
CharT |
traits_type
|
Traits |
int_type
|
Traits::int_type |
pos_type
|
Traits::pos_type |
off_type
|
Traits::off_type |
Member functions
| [虚拟的] </ SPAN></div></div>
|
解构的basic_streambuf的对象 Original: destructs the basic_streambuf object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟公有成员函数of std::basic_streambuf)
|
Original: Locales The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 调用imbue() Original: invokes imbue() The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::basic_streambuf)
| |
| 获得相关的区域设置的副本 Original: obtains a copy of the associated locale The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::basic_streambuf)
| |
Original: Positioning The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 调用setbuf() Original: invokes setbuf() The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::basic_streambuf)
| |
| 调用seekoff() Original: invokes seekoff() The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::basic_streambuf)
| |
| 调用seekpos() Original: invokes seekpos() The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::basic_streambuf)
| |
| 调用sync() Original: invokes sync() The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::basic_streambuf)
| |
Original: Get area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 立即可用的字符在get区域获得的数目 Original: obtains the number of characters immediately available in the get area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::basic_streambuf)
| |
| ,然后输入序列读取一个字符,再没有前进 Original: advances the input sequence, then reads one character without advancing again The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::basic_streambuf)
| |
| 读取一个字符的输入序列和垫款序列 Original: reads one character from the input sequence and advances the sequence The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::basic_streambuf)
| |
| stossc (过时了) |
输入序列,如果通过调用sbumpc()和丢弃的结果 Original: advances the input sequence as if by calling sbumpc() and discarding the result The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数) |
| 读取从输入序列中的一个字符,而不推进序列 Original: reads one character from the input sequence without advancing the sequence The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::basic_streambuf)
| |
| 调用xsgetn() Original: invokes xsgetn() The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::basic_streambuf)
| |
Original: Put area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 写入一个字符,把区域和进步的下一个指针 Original: writes one character to the put area and advances the next pointer The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::basic_streambuf)
| |
| 调用xsputn() Original: invokes xsputn() The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::basic_streambuf)
| |
Original: Putback The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 把输入序列中的一个字符 Original: puts one character back in the input sequence The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::basic_streambuf)
| |
| 输入序列中的背面由一个移动的下一个指针 Original: moves the next pointer in the input sequence back by one The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::basic_streambuf)
| |
Protected member functions
| 构建了一个basic_streambuf的对象 Original: constructs a basic_streambuf object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (受保护的成员函数) | |
| (C++11) |
替换一个basic_streambuf的对象 Original: replaces a basic_streambuf object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (受保护的成员函数) |
| (C++11) |
掉期2 basic_streambuf的对象 Original: swaps two basic_streambuf objects The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (受保护的成员函数) |
Original: Locales The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| [虚拟的] </ SPAN></div></div>
|
改变相关的语言环境 Original: changes the associated locale The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟保护成员函数of std::basic_streambuf)
|
Original: Positioning The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| [虚拟的] </ SPAN></div></div>
|
取代缓冲区与用户定义的数组,如果允许的话 Original: replaces the buffer with user-defined array, if permitted The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟保护成员函数of std::basic_streambuf)
|
| [虚拟的] </ SPAN></div></div>
|
重新定位在输入序列中的下一个指针,输出序列,或两者,使用相对寻址 Original: repositions the next pointer in the input sequence, output sequence, or both, using relative addressing The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟保护成员函数of std::basic_streambuf)
|
| [虚拟的] </ SPAN></div></div>
|
重新定位在输入序列中的下一个指针,输出序列,或两者都使用绝对寻址 Original: repositions the next pointer in the input sequence, output sequence, or both using absolute addressing The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟保护成员函数of std::basic_streambuf)
|
| [虚拟的] </ SPAN></div></div>
|
同步缓冲区关联的字符序列 Original: synchronizes the buffers with the associated character sequence The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟保护成员函数of std::basic_streambuf)
|
Original: Get area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| [虚拟的] </ SPAN></div></div>
|
获得供在相关联的输入序列中输入的字符数,如果已知的话 Original: obtains the number of characters available for input in the associated input sequence, if known The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟保护成员函数of std::basic_streambuf)
|
| [虚拟的] </ SPAN></div></div>
|
相关的输入序列读取字符的get区 Original: reads characters from the associated input sequence to the get area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟保护成员函数of std::basic_streambuf)
|
| [虚拟的] </ SPAN></div></div>
|
相关的输入序列读取字符的get区和进步的下一个指针 Original: reads characters from the associated input sequence to the get area and advances the next pointer The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟保护成员函数of std::basic_streambuf)
|
| [虚拟的] </ SPAN></div></div>
|
读取从输入序列中的多个字符 Original: reads multiple characters from the input sequence The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟保护成员函数of std::basic_streambuf)
|
| 返回一个指针,开始的时候,当前的字符和结束的get区 Original: returns a pointer to the beginning, current character and the end of the get area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (受保护的成员函数) | |
| 在输入序列中的下一个指针前进 Original: advances the next pointer in the input sequence The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (受保护的成员函数) | |
| 重新定位的开始,接着,和结束指针的输入序列中 Original: repositions the beginning, next, and end pointers of the input sequence The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (受保护的成员函数) | |
Original: Put area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| [虚拟的] </ SPAN></div></div>
|
writes multiple characters to the output sequence (虚拟保护成员函数of std::basic_streambuf)
|
| [虚拟的] </ SPAN></div></div>
|
相关的输出序列中写入字符认沽区域 Original: writes characters to the associated output sequence from the put area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟保护成员函数of std::basic_streambuf)
|
| 开始的时候,当前的字符和结束的认沽返回一个指针 Original: returns a pointer to the beginning, current character and the end of the put area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (受保护的成员函数) | |
| 进步的输出序列中的下一个指针 Original: advances the next pointer of the output sequence The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (受保护的成员函数) | |
| 重新定位的开始,接着,和结束指针的输出序列 Original: repositions the beginning, next, and end pointers of the output sequence The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (受保护的成员函数) | |
Original: Putback The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| [虚拟的] </ SPAN></div></div>
|
将一个字符返回到输入序列中,有可能修改的输入序列中 Original: puts a character back into the input sequence, possibly modifying the input sequence The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟保护成员函数of std::basic_streambuf)
|
</div>