Standard C++ Library Reference ISO/IEC (VERSION3)
off_type;
basic_filebuf();
bool is_open() const;
basic_filebuf *open(const char *filename,
ios_base::openmode mode);
basic_filebuf *close();
protected:
virtual pos_type seekoff(off_type off,
ios_base::seekdir way,
ios_base::openmode which =
ios_base::in | ios_base::out);
virtual pos_type seekpos(pos_type pos,
ios_base::openmode which =
ios_base::in | ios_base::out);
virtual int_type underflow();
virtual int_type pbackfail(int_type meta =
traits_type::eof());
virtual int_type overflow(int_type meta =
traits_type::eof());
virtual int sync();
virtual basic_streambuf<Elem, Tr>
*setbuf(Elem *buffer, streamsize count);
};
The template class describes a stream buffer that controls the transmission of elements of type
Elem, whose character traits are determined by the class Tr, to and from a sequence of
elements stored in an external file.
An object of class basic_filebuf<Elem, Tr> stores a file pointer, which designates the
FILE object that controls the stream associated with an open file. It also stores pointers to two
file conversion facets for use by the protected member functions overflow and
underflow.
basic_filebuf::basic_filebuf
basic_filebuf();
The constructor stores a null pointer in all the pointers controlling the input buffer and the
output buffer. It also stores a null pointer in the filepointer.