Namespaces
Variants
Views
Actions

std::basic_streambuf::overflow

From cppreference.com
< cpp‎ | io‎ | basic streambuf
Revision as of 22:59, 31 May 2013 by P12bot (Talk | contribs)

 
 
 
 
int_type overflow( int_type ch = traits::eof() );

Ensures that there is space at the put area for at least one character by saving some initial subsequence of characters starting at Template:rlpf to the output sequence and updating the pointers to the output area (if needed). If ch is not traits::eof() (i.e. traits::eq_int_type(c, traits::eof()) != true), it is either put to the output area or directly saved to the output sequence.

The function may update pptr, epptr and pback pointers to define the location to write more data. On failure, the function ensures that either pptr() == nullptr or pptr() == epptr.

The base class version of the function does nothing. The derived classes may override this function to allow updates to the put area in the case of exhaustion.

Contents

Parameters

(none)

Return value

Returns unspecified value not equal to traits::eof() on success, traits::eof() on failure.

The base class version of the function returns traits::eof().

Note

The Template:rlpf and Template:rlpf call this function in case of an overflow (pptr() == nullptr or pptr() >= epptr()).

Example

See also

[virtual]
reads characters from the associated input sequence to the get area and advances the next pointer
(virtual protected member function) [edit]
[virtual]
reads characters from the associated input sequence to the get area
(virtual protected member function) [edit]
[virtual]
writes characters to the associated file from the put area
(virtual protected member function of std::basic_filebuf) [edit]
[virtual]
appends a character to the output sequence
(virtual protected member function of std::basic_stringbuf) [edit]
[virtual]
appends a character to the output sequence, may reallocate or initially allocate the buffer if dynamic and not frozen
(virtual protected member function of std::strstreambuf) [edit]