This documentation is archived and is not being maintained.

strstreambuf Class

Describes a stream buffer that controls the transmission of elements to and from a sequence of elements stored in a char array object.

class strstreambuf : public streambuf


Depending on how the object is constructed, it can be allocated, extended, and freed as necessary to accommodate changes in the sequence.

An object of class strstreambuf stores several bits of mode information as its strstreambuf mode. These bits indicate whether the controlled sequence:

  • Has been allocated and needs to be freed eventually.
  • Is modifiable.
  • Is extendable by reallocating storage.
  • Has been frozen and hence needs to be unfrozen before the object is destroyed, or freed (if allocated) by an agency other than the object.

A controlled sequence that is frozen cannot be modified or extended, regardless of the state of these separate mode bits.

The object also stores pointers to two functions that control strstreambuf allocation. If these are null pointers, the object devises its own method of allocating and freeing storage for the controlled sequence.

See Also

strstreambuf Members | <strstream> Members | Thread Safety in the Standard C++ Library