template <class E,
class T = char_traits<E>,
class A = allocator<E> >
class basic_stringbuf {
public:
basic_stringbuf(ios_base::openmode mode =
ios_base::in | ios_base::out);
basic_stringbuf(basic_string<E, T, A>& x,
ios_base::openmode mode = ios_base::in | ios_base::out);
basic_string<E, T, A> str() const;
void str(basic_string<E, T, A>& x);
protected:
virtual pos_type seekoff(off_type off, ios_base::seekdir way,
ios_base::openmode mode = ios_base::in | ios_base::out);
virtual pos_type seekpos(pos_type sp,
ios_base::openmode mode = ios_base::in | ios_base::out);
virtual int_type underflow();
virtual int_type pbackfail(int_type c = T::eof());
virtual int_type overflow(int_type c = T::eof());
};
The template class describes a stream buffer that controls the transmission of elements to and from a sequence of elements stored in an array object. The object is allocated, extended, and freed as necessary to accommodate changes in the sequence.
An object of class basic_stringbuf<E, T, A>
stores a copy of the ios_base::
openmode
argument from its
constructor as its stringbuf mode mode
:
mode & ios_base::
in
is nonzero, the input buffer is accessible.mode & ios_base::
out
is nonzero, the output buffer is accessible.