Standard C++ Library Reference ISO/IEC (VERSION3)
Typically, if which & ios_base::in is nonzero, the input stream is affected, and if
which & ios_base::out is nonzero, the output stream is affected. Actual use of this
parameter varies among derived stream buffers, however.
If the function succeeds in altering the stream position(s), it returns the resultant stream position
(or one of them). Otherwise, it returns an invalid stream position. The default behavior is to
return an invalid stream position.
basic_streambuf::seekpos
virtual pos_type seekpos(pos_type sp,
ios_base::openmode which =
ios_base::in | ios_base::out);
The protected virtual member function endeavors to alter the current positions for the controlled
streams. The new position is sp.
Typically, if which & ios_base::in is nonzero, the input stream is affected, and if
which & ios_base::out is nonzero, the output stream is affected. Actual use of this
parameter varies among derived stream buffers, however.
If the function succeeds in altering the stream position(s), it returns the resultant stream position
(or one of them). Otherwise, it returns an invalid stream position. The default behavior is to
return an invalid stream position.
basic_streambuf::setbuf
virtual basic_streambuf *setbuf(char_type *buffer,
streamsize count);
The protected virtual member function performs an operation particular to each derived stream
buffer. (See, for example, basic_filebuf.) The default behavior is to return this.
basic_streambuf::setg
void setg(char_type *gbeg, char_type *gnext,
char_type *gend);
The member function stores gbeg in the beginning pointer, gnext in the next pointer, and
gend in the end pointer for the input buffer.
basic_streambuf::setp
void setp(char_type *pbeg, char_type *pend);
The member function stores pbeg in the beginning pointer, pbeg in the next pointer, and
pend in the end pointer for the output buffer.