streambuf Class
Reference-counted stream buffer.
template<
typename _CharType
>
class streambuf : public details::basic_streambuf<_CharType>;
Parameters
_CharType
The data type of the basic element of the streambuf._CharType2
The data type of the basic element of the streambuf.
Members
Public Typedefs
Name |
Description |
---|---|
char_type |
|
int_type |
|
off_type |
|
pos_type |
|
traits |
Public Constructors
Name |
Description |
---|---|
Overloaded. Constructor. |
|
Destructor |
Public Methods
Name |
Description |
---|---|
Gets a pointer to the next already allocated contiguous block of data. (Overrides basic_streambuf::acquire.) |
|
Allocates a contiguous memory block and returns it. (Overrides basic_streambuf::alloc.) |
|
Gets the stream buffer size, if one has been set. (Overrides basic_streambuf::buffer_size.) |
|
Reads a single character from the stream and advances the read position. (Overrides basic_streambuf::bumpc.) |
|
can_read is used to determine whether a stream buffer will support read operations (get). (Overrides basic_streambuf::can_read.) |
|
can_write is used to determine whether a stream buffer will support write operations (put). (Overrides basic_streambuf::can_write.) |
|
Overloaded. Closes the stream buffer, preventing further read or write operations. (Overrides basic_streambuf::close.) |
|
Submits a block already allocated by the stream buffer. (Overrides basic_streambuf::commit.) |
|
Constructs an input stream head for this stream buffer. |
|
Constructs an output stream for this stream buffer. |
|
Reads a single character from the stream without advancing the read position. (Overrides basic_streambuf::getc.) |
|
Reads up to a given number of characters from the stream. (Overrides basic_streambuf::getn.) |
|
Gets the current read or write position in the stream. |
|
is_eof is used to determine whether a read head has reached the buffer. (Overrides basic_streambuf::is_eof.) |
|
Checks if the stream buffer is open. (Overrides basic_streambuf::is_open.) |
|
Advances the read position, then returns the next character without advancing again. (Overrides basic_streambuf::nextc.) |
|
Writes a single character to the stream. (Overrides basic_streambuf::putc.) |
|
Writes a number of characters to the stream. (Overrides basic_streambuf::putn.) |
|
Releases a block of data acquired using ::acquire method. This frees the stream buffer to de-allocate the memory, if it so desires. Move the read position ahead by the count. (Overrides basic_streambuf::release.) |
|
Reads a single character from the stream and advances the read position. |
|
Copies up to a given number of characters from the stream, synchronously. (Overrides basic_streambuf::scopy.) |
|
Seeks to a position given by a relative offset. |
|
Seeks to the given position. |
|
Sets the stream buffer implementation to buffer or not buffer. (Overrides basic_streambuf::set_buffer_size.) |
|
Reads a single character from the stream without advancing the read position. |
|
For output streams, flush any internally buffered data to the underlying medium. (Overrides basic_streambuf::sync.) |
|
Retreats the read position, then returns the current character without advancing. (Overrides basic_streambuf::ungetc.) |
Public Operators
Name |
Description |
---|---|
Checks if the stream buffer has been initialized or not. |
|
Overloaded. Assignment operator. |
Remarks
The rationale for refcounting is discussed in the accompanying design documentation.
Requirements
Header: astreambuf.h
Namespace: concurrency::streams