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

This class implements overflowable output stream&hyphen;buffer functionality&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class OverflowMemOutput;
----

== Description

This class, like `bdlsb&colon;&colon;OverflowMemOutStreamBuf`, implements the output functionality of the `bsl&colon;&colon;basic&lowbar;streambuf` interface, using a client&hyphen;supplied buffer and allocator&hyphen;supplied overflow buffer if additional memory is needed&period; It has an interface similar to `bdlsb&colon;&colon;OverflowMemOutStreamBuf` but does *not* inherit from `bsl&colon;&colon;streambuf`&period; Thus, it is suitable for use as template parameter to `bslx&colon;&colon;GenericByteOutStream` (but not to `bslx&colon;&colon;ByteOutStream` or `bslx&colon;&colon;ByteOutStreamFormatter`)&period; Note that this class is not designed to be derived from&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlsb/OverflowMemOutput/char_type.adoc[`char&lowbar;type`] 
| This `typedef` is an alias to `char`&period;
| xref:BloombergLP/bdlsb/OverflowMemOutput/int_type.adoc[`int&lowbar;type`] 
| This `typedef` is an alias to `traits&lowbar;type&colon;&colon;int&lowbar;type`&period;
| xref:BloombergLP/bdlsb/OverflowMemOutput/off_type.adoc[`off&lowbar;type`] 
| This `typedef` is an alias to `traits&lowbar;type&colon;&colon;off&lowbar;type`&period;
| xref:BloombergLP/bdlsb/OverflowMemOutput/pos_type.adoc[`pos&lowbar;type`] 
| This `typedef` is an alias to `traits&lowbar;type&colon;&colon;pos&lowbar;type`&period;
| xref:BloombergLP/bdlsb/OverflowMemOutput/traits_type.adoc[`traits&lowbar;type`] 
| This `typedef` is an alias to `bsl&colon;&colon;char&lowbar;traits&lt;char&gt;`&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlsb/OverflowMemOutput/2constructor.adoc[`OverflowMemOutput`]         [.small]#[constructor]#
| Create an `OverflowMemOutput` using the specified initial output buffer&period;
| xref:BloombergLP/bdlsb/OverflowMemOutput/2destructor.adoc[`&#126;OverflowMemOutput`] [.small]#[destructor]#
| Destroy this stream buffer&period;
| xref:BloombergLP/bdlsb/OverflowMemOutput/dataLength.adoc[`dataLength`] 
| Return the number of bytes that have been written to this object&period;
| xref:BloombergLP/bdlsb/OverflowMemOutput/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/OverflowMemOutput/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/OverflowMemOutput/initialBuffer.adoc[`initialBuffer`] 
| Return a pointer providing non&hyphen;modifiable access to the character buffer held by this stream buffer (specified at construction)&period;
| xref:BloombergLP/bdlsb/OverflowMemOutput/initialBufferSize.adoc[`initialBufferSize`] 
| Return the size of the initial buffer held by this stream buffer&period;
| xref:BloombergLP/bdlsb/OverflowMemOutput/overflowBuffer.adoc[`overflowBuffer`] 
| Return a pointer providing non&hyphen;modifiable access to the overflow buffer if there is one, or 0 otherwise&period;
| xref:BloombergLP/bdlsb/OverflowMemOutput/overflowBufferSize.adoc[`overflowBufferSize`] 
| Return the size of the overflow buffer, or 0 if there is no overflow buffer&period;
| xref:BloombergLP/bdlsb/OverflowMemOutput/pubseekoff.adoc[`pubseekoff`] 
| Set the position indicator relative to the specified base position&period;
| xref:BloombergLP/bdlsb/OverflowMemOutput/pubseekpos.adoc[`pubseekpos`] 
| Set the position indicator to the specified absolute position&period;
| xref:BloombergLP/bdlsb/OverflowMemOutput/pubsetbuf.adoc[`pubsetbuf`] 
| Reinitialize this stream buffer to use the specified character buffer&period;
| xref:BloombergLP/bdlsb/OverflowMemOutput/pubsync.adoc[`pubsync`] 
| Synchronize this stream buffer with associated character sequence&period; Operation has no effect&period; Return `0` unconditionally&period;
| xref:BloombergLP/bdlsb/OverflowMemOutput/sputc.adoc[`sputc`] 
| Write the specified character at the current write position&period;
| xref:BloombergLP/bdlsb/OverflowMemOutput/sputn.adoc[`sputn`] 
| Write characters from the specified source to this buffer&period;
| xref:BloombergLP/bdlsb/OverflowMemOutput/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;OverflowMemOutput, UsesBslmaAllocator&gt;`] 
| Declare that this type uses a `bslma` allocator&period;
|===



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