|
streambuf::overflowvirtual protected member function
int overflow ( int c = EOF ); Write character in the case of overflow For the purpose of the streambuf class, overflows happen when a new character is to be written at the put pointer pptr position, but this has reached the end pointer epptr, indicating that apparently no room is currently available at the internal output array.This function is expected either to modify the pbase, pptr and epptr pointers that define the internal output array in such a way that room is made available for more characters, or otherwise fail. It is also responsibility of the function to write the character passed as argument. The specific behavior depends on each derived class, but it normally attempts to write some of the characters to the controlled output sequence to make room for more characters in the internal output array. Its default behavior in streambuf is to do nothing and return EOF (or traits::eof() for other traits), although it is overloaded in This protected member function is automatically called by sputc and sputn member functions when overflows happen. Parameters
Return ValueA value different than EOF (or traits::eof() for other traits) signals success.If the function fails, either EOF (or traits::eof() for other traits) is returned or an exception is thrown. Basic template member declaration( basic_streambuf<charT,traits> )
See also.
|