[streambuf.members] (original) (raw)
31 Input/output library [input.output]
31.6 Stream buffers [stream.buffers]
31.6.3 Class template basic_streambuf [streambuf]
31.6.3.3 Public member functions [streambuf.members]
31.6.3.3.1 Locales [streambuf.locales]
locale pubimbue(const locale& loc);
Effects: Callsimbue(loc).
Postconditions: loc == getloc().
Returns: Previous value ofgetloc().
Returns: Ifpubimbue()has ever been called, then the last value of loc supplied, otherwise the current global locale,locale(), in effect at the time of construction.
If called afterpubimbue()has been called but beforepubimbuehas returned (i.e., from within the call ofimbue()) then it returns the previous value.
31.6.3.3.2 Buffer management and positioning [streambuf.buffer]
basic_streambuf* pubsetbuf(char_type* s, streamsize n);
pos_type pubseekoff(off_type off, ios_base::seekdir way, ios_base::openmode which= ios_base::in | ios_base::out);
Returns: seekoff(off, way, which).
pos_type pubseekpos(pos_type sp, ios_base::openmode which= ios_base::in | ios_base::out);
Returns: seekpos(sp, which).
31.6.3.3.3 Get area [streambuf.pub.get]
Returns: If a read position is available, returnsegptr() - gptr().
Returns: If that function returnstraits::eof(), returnstraits::eof().
Otherwise, returnssgetc().
Effects: If the input sequence read position is not available, returnsuflow().
Otherwise, returnstraits::to_int_type(*gptr())and increments the next pointer for the input sequence.
Returns: If the input sequence read position is not available, returnsunderflow().
Otherwise, returnstraits::to_int_type(*gptr()).
streamsize sgetn(char_type* s, streamsize n);
31.6.3.3.4 Putback [streambuf.pub.pback]
int_type sputbackc(char_type c);
Effects: If the input sequence putback position is not available, or iftraits::eq(c, gptr()[-1])is false, returnspbackfail(traits::to_int_type(c)).
Otherwise, decrements the next pointer for the input sequence and returnstraits::to_int_type(*gptr()).
Effects: If the input sequence putback position is not available, returnspbackfail().
Otherwise, decrements the next pointer for the input sequence and returnstraits::to_int_type(*gptr()).
31.6.3.3.5 Put area [streambuf.pub.put]
int_type sputc(char_type c);
Effects: If the output sequence write position is not available, returnsoverflow(traits::to_int_type(c)).
Otherwise, stores c at the next pointer for the output sequence, increments the pointer, and returnstraits::to_int_type(c).
streamsize sputn(const char_type* s, streamsize n);