Standard C++ Library Reference ISO/IEC (VERSION3)

basic_filebuf::setbuf
virtual basic_streambuf<Elem, Tr>
*setbuf(Elem *buffer, streamsize count);
The protected member function returns zero if the file pointer fp is a null pointer. Otherwise, it
calls setvbuf(fp, (char *)buffer, _IOFBF, count * sizeof (Elem)) to
offer the array of count elements beginning at buffer as a buffer for the stream. If that
function returns a nonzero value, the function returns a null pointer. Otherwise, it returns this
to signal success.
basic_filebuf::sync
int sync();
The protected member function returns zero if the file pointer fp is a null pointer. Otherwise, it
returns zero only if calls to both overflow() and fflush(fp) succeed in flushing any
pending output to the stream.
basic_filebuf::traits_type
typedef Tr traits_type;
The type is a synonym for the template parameter Tr.
basic_filebuf::underflow
virtual int_type underflow();
The protected virtual member function endeavors to extract the current element ch from the
input stream, and return the element as traits_type::to_int_type(ch). It can do so
in various ways:
If a read position is available, it takes ch as the element stored in the read position and
advances the next pointer for the input buffer.
It can read one or more elements of type char, as if by successive calls of the form
fgetc(fp), and convert them to an element ch of type Elem by using the file
conversion facet fac to call fac.in as needed. If any read or conversion fails, the
function does not succeed.
If the function cannot succeed, it returns traits_type::eof(). Otherwise, it returns ch,
converted as described above.