[#BloombergLP-bdlsb-FixedMemOutStreamBuf] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlsb.adoc[bdlsb]::FixedMemOutStreamBuf :relfileprefix: ../../ :mrdocs: This class implements the output functionality of the `basic_streambuf` protocol for client‐supplied memory. == Synopsis Declared in `<bdlsb_fixedmemoutstreambuf.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class FixedMemOutStreamBuf : public std::streambuf ---- == Base Classes [cols="1,4"] |=== | Name| Description | `std::streambuf` | |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlsb/FixedMemOutStreamBuf/2constructor.adoc[`FixedMemOutStreamBuf`] [.small]#[constructor]# | Create an empty stream buffer that uses the specified character `buffer` of the specified `length`. The behavior is undefined unless `length == 0` or `length > 0 && buffer != 0`. Note that `buffer` is held but not owned. | xref:BloombergLP/bdlsb/FixedMemOutStreamBuf/2destructor.adoc[`~FixedMemOutStreamBuf`] [.small]#[destructor]# [.small]#[virtual]# | Destroy this stream buffer. | xref:BloombergLP/bdlsb/FixedMemOutStreamBuf/capacity.adoc[`capacity`] | Return the number of characters in the buffer held by this stream buffer. See `length`, below, for the span of bytes actually written. | xref:BloombergLP/bdlsb/FixedMemOutStreamBuf/data-05.adoc[`data`] | Return a pointer providing modifiable access to the character buffer held by this stream buffer (supplied at construction). | xref:BloombergLP/bdlsb/FixedMemOutStreamBuf/data-06.adoc[`data`] | Return a pointer providing non‐modifiable access to the character buffer held by this stream buffer (supplied at construction). | xref:BloombergLP/bdlsb/FixedMemOutStreamBuf/length.adoc[`length`] | Return the number of characters from the beginning of the buffer to the current write position. This function returns the same value as `seekoff(0, bsl::ios_base::end)`. The length is modified by a call to `seekpos` or `seekoff` and reset to zero by a call to `pubsetbuf`. |=== == Protected Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlsb/FixedMemOutStreamBuf/seekoff.adoc[`seekoff`] [.small]#[virtual]# | Set the position indicator to the relative specified `offset` from the base position indicated by the specified `fixedPosition` and return the resulting absolute position on success or pos_type(‐1) on failure. Optionally specify `which` area of the stream buffer. The seek operation will fail if `which` does not include the flag `bsl::ios_base::out` or if the resulting absolute position is less than zero or greater than the value returned by `length`. | xref:BloombergLP/bdlsb/FixedMemOutStreamBuf/seekpos.adoc[`seekpos`] [.small]#[virtual]# | Set the position indicator to the specified `position` and return the resulting absolute position on success or pos_type(‐1) on failure. Optionally specify `which` area of the stream buffer. The `seekpos` operation will fail if `which` does not include the flag `bsl::ios_base::out` or if position is less then zero or greater than the value returned by `length`. | xref:BloombergLP/bdlsb/FixedMemOutStreamBuf/setbuf.adoc[`setbuf`] [.small]#[virtual]# | |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#