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

egptr(), a pointer just past the end of the buffer
Similarly, an output buffer is characterized by:
pbase(), a pointer to the beginning of the buffer
pptr(), a pointer to the next element to write
epptr(), a pointer just past the end of the buffer
For any buffer, the protocol is:
If the next pointer is null, no buffer exists. Otherwise, all three pointers point into the
same sequence. (They can be safely compared for order.)
For an output buffer, if the next pointer compares less than the end pointer, you can store
an element at the write position designated by the next pointer.
For an input buffer, if the next pointer compares less than the end pointer, you can read
an element at the read position designated by the next pointer.
For an input buffer, if the beginning pointer compares less than the next pointer, you can
put back an element at the putback position designated by the decremented next pointer.
Any protected virtual member functions you write for a class derived from
basic_streambuf<Elem, Tr> must cooperate in maintaining this protocol.
An object of class basic_streambuf<Elem, Tr> stores the six pointers described above.
It also stores a locale object in an object of type locale for potential use by a derived stream
buffer.
basic_streambuf::basic_streambuf
basic_streambuf();
The protected constructor stores a null pointer in all the pointers controlling the input buffer and
the output buffer. It also stores locale::classic() in the locale object.
basic_streambuf::char_type
typedef Elem char_type;
The type is a synonym for the template parameter Elem.
basic_streambuf::eback
char_type *eback() const;
The member function returns a pointer to the beginning of the input buffer.