Partilhar via


basic_streambuf Members

Reference

Constructors

basic_streambuf

Constructs an object of type basic_streambuf.

Typedefs

char_type

Associates a type name with the Elem template parameter.

int_type

Associates a type name within basic_streambuf scope with the Elem template parameter.

off_type

Associates a type name within basic_streambuf scope with the Elem template parameter.

pos_type

Associates a type name within basic_streambuf scope with the Elem template parameter.

traits_type

Associates a type name with the Tr template parameter.

Member Functions

eback

A protected function that returns a pointer to the beginning of the input buffer.

egptr

A protected function that returns a pointer just past the end of the input buffer.

epptr

A protected function that returns a pointer just past the end of the output buffer.

gbump

A protected function that adds _Count to the next pointer for the input buffer.

getloc

Gets the basic_streambuf object's locale.

gptr

A protected function that returns a pointer to the next element of the input buffer.

imbue

A protected, virtual function called by pubimbue.

in_avail

Returns the number of elements that are ready to be read from the buffer.

overflow

A protected virtual function that can be called when a new character is inserted into a full buffer.

pbackfail

A protected virtual member function that tries to put back an element into the input stream, then make it the current element (pointed to by the next pointer).

pbase

A protected function that returns a pointer to the beginning of the output buffer.

pbump

A protected function that adds count to the next pointer for the output buffer.

pptr

A protected function that returns a pointer to the next element of the output buffer.

pubimbue

Sets the basic_streambuf object's locale.

pubseekoff

Calls seekoff, a protected virtual function that is overridden in a derived class.

pubseekpos

Calls seekpos, a protected virtual function that is overridden in a derived class and resets the current pointer position.

pubsetbuf

Calls setbuf, a protected virtual function that is overridden in a derived class.

pubsync

Calls sync, a protected virtual function that is overridden in a derived class and updates the external stream associated with this buffer.

sbumpc

Reads and returns the current element, moving the stream pointer.

seekoff

The protected virtual member function tries to alter the current positions for the controlled streams.

seekpos

The protected virtual member function tries to alter the current positions for the controlled streams.

setbuf

The protected virtual member function performs an operation particular to each derived stream buffer.

setg

A protected function that stores _Gbeg in the beginning pointer, _Gnext in the next pointer, and _Gend in the end pointer for the input buffer.

setp

A protected function that stores _Pbeg in the beginning pointer and _Pend in the end pointer for the output buffer.

sgetc

Returns current element without changing position in the stream.

sgetn

Returns the number of elements read.

showmanyc

Protected virtual member function that returns a count of the number of characters that can be extracted from the input stream and ensure that the program will not be subject to an indefinite wait.

snextc

Reads the current element and returns the following element.

sputbackc

Puts a char_type in the stream.

sputc

Puts a character into the stream.

sputn

Puts a character string into the stream.

stossc

Move past the current element in the stream.

sungetc

Gets a character from the stream.

swap

Exchanges the values in this object for the values in the provided basic_streambuf object parameter.

sync

A protected virtual function that tries to synchronize the controlled streams with any associated external streams.

uflow

A protected virtual function that extracts the current element from the input stream.

underflow

A protected virtual function that extracts the current element from the input stream.

xsgetn

A protected virtual function that extracts elements from the input stream.

xsputn

A protected virtual function that inserts elements into the output stream.

Operators

operator=

Assigns the values of this object from another basic_streambuf object.

See Also

Reference

basic_streambuf Class

Thread Safety in the Standard C++ Library

iostream Programming

iostreams Conventions

Change History

Date

History

Reason

January 2011

Removed references to _Xsgetn_s ad _Sgetn_s, which have been removed from Visual C++.

Content bug fix.