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

streambuf::streambuf Constructor

Overloaded. Constructor.

streambuf::~streambuf Destructor

Destructor

Public Methods

Name

Description

streambuf::acquire Method

Gets a pointer to the next already allocated contiguous block of data. (Overrides basic_streambuf::acquire.)

streambuf::alloc Method

Allocates a contiguous memory block and returns it. (Overrides basic_streambuf::alloc.)

streambuf::buffer_size Method

Gets the stream buffer size, if one has been set. (Overrides basic_streambuf::buffer_size.)

streambuf::bumpc Method

Reads a single character from the stream and advances the read position. (Overrides basic_streambuf::bumpc.)

streambuf::can_read Method

can_read is used to determine whether a stream buffer will support read operations (get). (Overrides basic_streambuf::can_read.)

streambuf::can_seek Method

streambuf::can_write Method

can_write is used to determine whether a stream buffer will support write operations (put). (Overrides basic_streambuf::can_write.)

streambuf::close Method

Overloaded. Closes the stream buffer, preventing further read or write operations. (Overrides basic_streambuf::close.)

streambuf::commit Method

Submits a block already allocated by the stream buffer. (Overrides basic_streambuf::commit.)

streambuf::create_istream Method

Constructs an input stream head for this stream buffer.

streambuf::create_ostream Method

Constructs an output stream for this stream buffer.

streambuf::exception Method

streambuf::get_base Method

streambuf::getc Method

Reads a single character from the stream without advancing the read position. (Overrides basic_streambuf::getc.)

streambuf::getn Method

Reads up to a given number of characters from the stream. (Overrides basic_streambuf::getn.)

streambuf::getpos Method

Gets the current read or write position in the stream.

streambuf::in_avail Method

streambuf::is_eof Method

is_eof is used to determine whether a read head has reached the buffer. (Overrides basic_streambuf::is_eof.)

streambuf::is_open Method

Checks if the stream buffer is open. (Overrides basic_streambuf::is_open.)

streambuf::nextc Method

Advances the read position, then returns the next character without advancing again. (Overrides basic_streambuf::nextc.)

streambuf::putc Method

Writes a single character to the stream. (Overrides basic_streambuf::putc.)

streambuf::putn Method

Writes a number of characters to the stream. (Overrides basic_streambuf::putn.)

streambuf::release Method

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.)

streambuf::sbumpc Method

Reads a single character from the stream and advances the read position.

streambuf::scopy Method

Copies up to a given number of characters from the stream, synchronously. (Overrides basic_streambuf::scopy.)

streambuf::seekoff Method

Seeks to a position given by a relative offset.

streambuf::seekpos Method

Seeks to the given position.

streambuf::set_buffer_size Method

Sets the stream buffer implementation to buffer or not buffer. (Overrides basic_streambuf::set_buffer_size.)

streambuf::sgetc Method

Reads a single character from the stream without advancing the read position.

streambuf::sync Method

For output streams, flush any internally buffered data to the underlying medium. (Overrides basic_streambuf::sync.)

streambuf::ungetc Method

Retreats the read position, then returns the current character without advancing. (Overrides basic_streambuf::ungetc.)

Public Operators

Name

Description

streambuf::operator bool Operator

Checks if the stream buffer has been initialized or not.

streambuf::operator= Operator

Overloaded. Assignment operator.

Remarks

The rationale for refcounting is discussed in the accompanying design documentation.

Requirements

Header: astreambuf.h

Namespace: concurrency::streams

See Also

Reference

concurrency::streams Namespace