[#BloombergLP-bdlsb-FixedMemOutStreamBuf]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlsb.adoc[bdlsb]::FixedMemOutStreamBuf
:relfileprefix: ../../
:mrdocs:

This class implements the output functionality of the `basic&lowbar;streambuf` protocol for client&hyphen;supplied memory&period;

== Synopsis

Declared in `&lt;bdlsb&lowbar;fixedmemoutstreambuf&period;h&gt;`

[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`&period; The behavior is undefined unless `length &equals;&equals; 0` or `length &gt; 0 &amp;&amp; buffer !&equals; 0`&period; Note that `buffer` is held but not owned&period;
| xref:BloombergLP/bdlsb/FixedMemOutStreamBuf/2destructor.adoc[`&#126;FixedMemOutStreamBuf`] [.small]#[destructor]# [.small]#[virtual]#
| Destroy this stream buffer&period;
| xref:BloombergLP/bdlsb/FixedMemOutStreamBuf/capacity.adoc[`capacity`] 
| Return the number of characters in the buffer held by this stream buffer&period; See `length`, below, for the span of bytes actually written&period;
| 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)&period;
| xref:BloombergLP/bdlsb/FixedMemOutStreamBuf/data-06.adoc[`data`] 
| Return a pointer providing non&hyphen;modifiable access to the character buffer held by this stream buffer (supplied at construction)&period;
| xref:BloombergLP/bdlsb/FixedMemOutStreamBuf/length.adoc[`length`] 
| Return the number of characters from the beginning of the buffer to the current write position&period; This function returns the same value as `seekoff(0, bsl&colon;&colon;ios&lowbar;base&colon;&colon;end)`&period; The length is modified by a call to `seekpos` or `seekoff` and reset to zero by a call to `pubsetbuf`&period;
|===


== 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&lowbar;type(&hyphen;1) on failure&period; Optionally specify `which` area of the stream buffer&period; The seek operation will fail if `which` does not include the flag `bsl&colon;&colon;ios&lowbar;base&colon;&colon;out` or if the resulting absolute position is less than zero or greater than the value returned by `length`&period;
| 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&lowbar;type(&hyphen;1) on failure&period; Optionally specify `which` area of the stream buffer&period; The `seekpos` operation will fail if `which` does not include the flag `bsl&colon;&colon;ios&lowbar;base&colon;&colon;out` or if position is less then zero or greater than the value returned by `length`&period;
| xref:BloombergLP/bdlsb/FixedMemOutStreamBuf/setbuf.adoc[`setbuf`]  [.small]#[virtual]#
| 
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
