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

Output `streambuf` using a client buffer and an overflow allocator&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class OverflowMemOutStreamBuf
    : public std::streambuf
----

== Description

This class implements the output functionality of the `bsl&colon;&colon;basic&lowbar;streambuf` protocol, using client&hyphen;supplied memory and client&hyphen;supplied allocator if additional memory is needed&period;

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `std::streambuf`
| 
|===

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlsb/OverflowMemOutStreamBuf/2constructor.adoc[`OverflowMemOutStreamBuf`]         [.small]#[constructor]#
| Create an empty stream buffer with the specified initial output buffer&period;
| xref:BloombergLP/bdlsb/OverflowMemOutStreamBuf/2destructor.adoc[`&#126;OverflowMemOutStreamBuf`] [.small]#[destructor]# [.small]#[virtual]#
| Destroy this stream buffer&period;
| xref:BloombergLP/bdlsb/OverflowMemOutStreamBuf/dataLength.adoc[`dataLength`] 
| Return the number of bytes written to this stream&period;
| xref:BloombergLP/bdlsb/OverflowMemOutStreamBuf/dataLengthInInitialBuffer.adoc[`dataLengthInInitialBuffer`] 
| Return the length of data in the initial buffer, i&period;e&period;, `dataLength()` if there is no overflow buffer, or `initialBufferSize()` if there is one&period;
| xref:BloombergLP/bdlsb/OverflowMemOutStreamBuf/dataLengthInOverflowBuffer.adoc[`dataLengthInOverflowBuffer`] 
| Return the length of the data in the overflow buffer, i&period;e&period;, 0 if there is no overflow buffer, or `dataLength() &hyphen; initialBufferSize()` if there is one&period;
| xref:BloombergLP/bdlsb/OverflowMemOutStreamBuf/initialBuffer.adoc[`initialBuffer`] 
| Return a pointer to the non&hyphen;modifiable buffer supplied at construction&period;
| xref:BloombergLP/bdlsb/OverflowMemOutStreamBuf/initialBufferSize.adoc[`initialBufferSize`] 
| Return the size of the buffer supplied at construction&period;
| xref:BloombergLP/bdlsb/OverflowMemOutStreamBuf/overflowBuffer.adoc[`overflowBuffer`] 
| Return a pointer to the non&hyphen;modifiable overflow buffer if there is one, or 0 otherwise&period;
| xref:BloombergLP/bdlsb/OverflowMemOutStreamBuf/overflowBufferSize.adoc[`overflowBufferSize`] 
| Return the size of the overflow buffer, or 0 if there is no overflow buffer&period;
| xref:BloombergLP/bdlsb/OverflowMemOutStreamBuf/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;OverflowMemOutStreamBuf, UsesBslmaAllocator&gt;`] 
| Declare that this type uses a `bslma` allocator&period;
|===


== Protected Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlsb/OverflowMemOutStreamBuf/overflow.adoc[`overflow`]  [.small]#[virtual]#
| Put `c` at the next put position, growing the buffer if needed&period;
| xref:BloombergLP/bdlsb/OverflowMemOutStreamBuf/seekoff.adoc[`seekoff`]  [.small]#[virtual]#
| Set the put position relative to the specified base and return it&period;
| xref:BloombergLP/bdlsb/OverflowMemOutStreamBuf/seekpos.adoc[`seekpos`]  [.small]#[virtual]#
| Set the put position to the specified absolute position and return it&period;
| xref:BloombergLP/bdlsb/OverflowMemOutStreamBuf/sync.adoc[`sync`]  [.small]#[virtual]#
| Update the cached data length from the current put position&period;
| xref:BloombergLP/bdlsb/OverflowMemOutStreamBuf/xsputn.adoc[`xsputn`]  [.small]#[virtual]#
| Write characters from a buffer into this stream buffer&period;
|===



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