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

This class, like `bdlsb&colon;&colon;FixedMemOutStreamBuf`, implements the output functionality of the `basic&lowbar;streambuf` interface, using client&hyphen;supplied `char &ast;` memory&period; It has an identical interface to `bdlsb&colon;&colon;FixedMemOutStreamBuf` but does _not_ inherit from `bsl&colon;&colon;streambuf`&period; Thus, it is suitable for use as template parameter to `bslx&colon;&colon;GenericOutStream` (but not to `bslx&colon;&colon;StreambufOutStream`)&period; Note that this class is not designed to be derived from&period;

== Synopsis

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

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

== Type Aliases

[cols="1"]
|===
| Name
| xref:BloombergLP/bdlsb/FixedMemOutput/char_type.adoc[`char&lowbar;type`] 
| xref:BloombergLP/bdlsb/FixedMemOutput/int_type.adoc[`int&lowbar;type`] 
| xref:BloombergLP/bdlsb/FixedMemOutput/off_type.adoc[`off&lowbar;type`] 
| xref:BloombergLP/bdlsb/FixedMemOutput/pos_type.adoc[`pos&lowbar;type`] 
| xref:BloombergLP/bdlsb/FixedMemOutput/traits_type.adoc[`traits&lowbar;type`] 
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlsb/FixedMemOutput/2constructor.adoc[`FixedMemOutput`]         [.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/FixedMemOutput/capacity.adoc[`capacity`] 
| Return the size in bytes of the buffer held by this stream buffer&period;
| xref:BloombergLP/bdlsb/FixedMemOutput/data-04.adoc[`data`] 
| `data` overloads
| xref:BloombergLP/bdlsb/FixedMemOutput/getloc.adoc[`getloc`] 
| Return the current default locale&period; Operation has no effect, because locales are not supported by this component&period; Return default constructed bsl&colon;&colon;locale object&period;
| xref:BloombergLP/bdlsb/FixedMemOutput/length.adoc[`length`] 
| Return the number of characters from the beginning of the buffer to the current write position&period;
| xref:BloombergLP/bdlsb/FixedMemOutput/pubimbue.adoc[`pubimbue`] 
| Associate the specified locale `loc` to this stream buffer&period; Operation has no effect, because locales are not supported by this component&period; Return default constructed bsl&colon;&colon;locale object&period;
| xref:BloombergLP/bdlsb/FixedMemOutput/pubseekoff.adoc[`pubseekoff`] 
| 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/FixedMemOutput/pubseekpos.adoc[`pubseekpos`] 
| 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/FixedMemOutput/pubsetbuf.adoc[`pubsetbuf`] 
| Reset the internal buffer of this stream to the specified `buffer` of the specified `length`&period; Note that the next write operation will start at the beginning of `buffer`&period;
| xref:BloombergLP/bdlsb/FixedMemOutput/pubsync.adoc[`pubsync`] 
| Synchronizes the controlled character sequence (the buffers) with the associated character sequence&period; Operation has no effect, because the stream is always kept in sync (no buffered output)&period; Return 0&period;
| xref:BloombergLP/bdlsb/FixedMemOutput/sputc.adoc[`sputc`] 
| Write the specified character `c` to this buffer&period; Return `c`, or `traits&lowbar;type&colon;&colon;eof()` if the end of the write buffer is reached&period;
| xref:BloombergLP/bdlsb/FixedMemOutput/sputn.adoc[`sputn`] 
| Write the specified `length` characters at the specified address `s` to this buffer&period; Return the number of characters written, which is either `length` or the distance from the current write position to the end of the write buffer, whichever is smaller, and move the write cursor position by this amount&period;
|===



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