std::strstreambuf

来自cppreference.com
< cpp | io

 
 
输入/输出库
I / O操纵
C-风格的I / O
缓冲区
Original:
Buffers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_streambuf
basic_filebuf
basic_stringbuf
strstreambuf(过时了)
Original:
Streams
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
抽象
Original:
Abstractions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base
basic_ios
basic_istream
basic_ostream
basic_iostream
文件I / O
Original:
File I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ifstream
basic_ofstream
basic_fstream
字符串I / O
Original:
String I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_istringstream
basic_ostringstream
basic_stringstream
阵列的I / O
Original:
Array I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
istrstream(过时了)
ostrstream(过时了)
strstream(过时了)
类型
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
streamoff
streamsize
fpos
Error类的接口
Original:
Error category interface
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
iostream_category(C++11)
io_errc(C++11)
 
std::strstreambuf
公共成员函数
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.
strstreambuf::strstreambuf
strstreambuf::~strstreambuf
strstreambuf::freeze
strstreambuf::str
strstreambuf::pcount
受保护的成员函数
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.
strstreambuf::underflow
strstreambuf::pbackfail
strstreambuf::overflow
strstreambuf::setbuf
strstreambuf::seekoff
strstreambuf::seekpos
 
Defined in header <strstream>
class strstreambuf : public std::basic_streambuf<char>
(过时了)
std::strstreambuf是一个std::basic_streambuf,其相应的字符序列是一个字符数组,这可能是常数(如:字符串文本),modifyable,但不是动态的(如堆栈分配的数组),或动态,在这种情况下,std::strstreambuf可能被允许重新分配将数组作为必要的,以适应输出(例如,通过调用delete[]new[]或用户提供的功能).
Original:
std::strstreambuf is a std::basic_streambuf whose associated character sequence is a character array, which may be constant (e.g. a string literal), modifyable but not dynamic (e.g. a stack-allocated array), or dynamic, in which case the std::strstreambuf may be allowed to reallocate the array as necessary to accomodate output (e.g. by calling delete[] and new[] or user-provided functions).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::strstreambuf一个典型的实现包含了四个私有数据成员
Original:
Typical implementation of a std::strstreambuf holds four private data members:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
1)
缓冲器的状态,一个位掩码,它可以表示任意组合的四个值“分配”(析构函数将释放),(输出)“常数”,“动态”(输出可能会重新分配),或“冻结”(输出,释放重新分配是不允许的)
Original:
buffer state, a bitmask type which can represent any combination of the four values "allocated" (destructor will deallocate), "constant" (output not allowed), "dynamic" (output may reallocate), or "frozen" (output, deallocation, reallocation are not allowed)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
分配的缓冲区大小
Original:
allocated buffer size
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
3)
指针指向用户提供的配置功能
Original:
pointer to user-provided allocation function
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
4)
指针指向用户提供的释放函数.
Original:
pointer to user-provided deallocation function.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目录

[编辑] 注释

str()任何调用,调用freeze(false)后,必须允许strstreambuf析构函数释放缓冲区时.
Original:
After any call to str(), a call to freeze(false) is required to allow the strstreambuf destructor to deallocate the buffer when necessary.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[编辑] 成员函数

公共成员函数
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.

构建了一个strstreambuf的对象
Original:
constructs a strstreambuf object
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>
解构一个strstreambuf的对象,可以选择重新分配的字符数组
Original:
destructs a strstreambuf object, optionally deallocating the character array
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(虚拟公有成员函数)
设置/清除缓冲区的冷冻状态
Original:
sets/clears the frozen state of the buffer
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成员函数)
马克冻结的缓冲,并传回在输入序列中的开始指针
Original:
marks the buffer frozen and returns the beginning pointer 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:
returns the next pointer minus the beginning pointer in the output sequence: the number of characters written
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:
reads a character from the input sequence without advancing 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.

(虚拟保护成员函数)
[虚拟的] </ SPAN></div></div>
放回到输入序列中的一个字符
Original:
puts back a character into 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.

(虚拟保护成员函数)
[虚拟的] </ SPAN></div></div>
添加一个字符的输出序列,可以重新分配或初始分配的缓冲区,如果动态的,而不是冻结
Original:
appends a character to the output sequence, may reallocate or initially allocate the buffer if dynamic and not frozen
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:
attempts to replace the controlled character sequence with an array
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 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.

(虚拟保护成员函数)
[虚拟的] </ 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.

(虚拟保护成员函数)

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[edit]
traits_type Traits[edit]
int_type Traits::int_type[edit]
pos_type Traits::pos_type[edit]
off_type Traits::off_type[edit]

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 [edit]
语言环境
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 [edit]
获得相关的区域设置的副本
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 [edit]
定位
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 [edit]
调用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 [edit]
调用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 [edit]
调用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 [edit]
获取区域
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 [edit]
,然后输入序列读取一个字符,再没有前进
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 [edit]
读取一个字符的输入序列和垫款序列
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 [edit]
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.

(公共成员函数) [edit]
读取从输入序列中的一个字符,而不推进序列
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 [edit]
调用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 [edit]
在区域
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 [edit]
调用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 [edit]
补篮
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 [edit]
输入序列中的背面由一个移动的下一个指针
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 [edit]

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.

(受保护的成员函数) [edit]
(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.

(受保护的成员函数) [edit]
(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.

(受保护的成员函数) [edit]
语言环境
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 [edit]
定位
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 [edit]
[虚拟的] </ 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 [edit]
[虚拟的] </ 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 [edit]
[虚拟的] </ 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 [edit]
获取区域
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 [edit]
[虚拟的] </ 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 [edit]
[虚拟的] </ 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 [edit]
[虚拟的] </ 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 [edit]
返回一个指针,开始的时候,当前的字符和结束的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.

(受保护的成员函数) [edit]
在输入序列中的下一个指针前进
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.

(受保护的成员函数) [edit]
重新定位的开始,接着,和结束指针的输入序列中
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.

(受保护的成员函数) [edit]
在区域
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 [edit]
[虚拟的] </ 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 [edit]
开始的时候,当前的字符和结束的认沽返回一个指针
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.

(受保护的成员函数) [edit]
进步的输出序列中的下一个指针
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.

(受保护的成员函数) [edit]
重新定位的开始,接着,和结束指针的输出序列
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.

(受保护的成员函数) [edit]
补篮
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 [edit]

</div>

来自“http://zh.cppreference.com/mwiki/index.php?title=cpp/io/strstreambuf&oldid=27188