[#BloombergLP-bdlsb-FixedMemInput] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlsb.adoc[bdlsb]::FixedMemInput :relfileprefix: ../../ :mrdocs: Provide a basic input stream buffer using client‐supplied memory. == Synopsis Declared in `<bdlsb_fixedmeminput.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class FixedMemInput; ---- == Description This class, like `bdlsb::FixedMemInStreamBuf`, implements the input functionality of the `basic_streambuf` interface, using client‐supplied `char *` memory. It has an interface identical to `bdlsb::FixedMemInStreamBuf` but does _not_ inherit from `bsl::streambuf`. This implementation is advantageous for performance reasons, as the overhead of the initialization and virtual function calls of a `bsl::streambuf` can be undesirable. It is especially designed for streaming a very small amount of information from a fixed‐length buffer using a `bslx_genericinstream` when the number of characters read from the input is guaranteed not to exceed the length of the buffer. Note that this class is not designed to be derived from. == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlsb/FixedMemInput/char_type.adoc[`char_type`] | This `typedef` is an alias to `char`. | xref:BloombergLP/bdlsb/FixedMemInput/int_type.adoc[`int_type`] | This `typedef` is an alias to `traits_type::int_type`. | xref:BloombergLP/bdlsb/FixedMemInput/off_type.adoc[`off_type`] | This `typedef` is an alias to `traits_type::off_type`. | xref:BloombergLP/bdlsb/FixedMemInput/pos_type.adoc[`pos_type`] | This `typedef` is an alias to `traits_type::pos_type`. | xref:BloombergLP/bdlsb/FixedMemInput/traits_type.adoc[`traits_type`] | This `typedef` is an alias to `bsl::char_traits<char>`. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlsb/FixedMemInput/2constructor.adoc[`FixedMemInput`] [.small]#[constructor]# | Create a `FixedMemInput` using the specified buffer and length. | xref:BloombergLP/bdlsb/FixedMemInput/capacity.adoc[`capacity`] | Return the size for the buffer held by this buffer, in bytes, supplied at construction. | xref:BloombergLP/bdlsb/FixedMemInput/data.adoc[`data`] | Return the address of the non‐modifiable character buffer held by this stream buffer. | xref:BloombergLP/bdlsb/FixedMemInput/in_avail.adoc[`in_avail`] | Return the number of characters available from the current read position in this stream buffer. | xref:BloombergLP/bdlsb/FixedMemInput/length.adoc[`length`] | Return the number of characters remaining to be read. | xref:BloombergLP/bdlsb/FixedMemInput/pubseekoff.adoc[`pubseekoff`] | Set the position indicator to a relative offset in this buffer. | xref:BloombergLP/bdlsb/FixedMemInput/pubseekpos.adoc[`pubseekpos`] | Set the position indicator to the specified absolute position. | xref:BloombergLP/bdlsb/FixedMemInput/pubsetbuf.adoc[`pubsetbuf`] | Reinitialize this stream buffer to use the specified character buffer. | xref:BloombergLP/bdlsb/FixedMemInput/sbumpc.adoc[`sbumpc`] | Return the character at the current read position and advance. | xref:BloombergLP/bdlsb/FixedMemInput/sgetc.adoc[`sgetc`] | Return the character at the current read position from this buffer, or `traits_type::eof()` if the end of the buffer is reached. | xref:BloombergLP/bdlsb/FixedMemInput/sgetn.adoc[`sgetn`] | Read characters from this buffer into the specified destination. | xref:BloombergLP/bdlsb/FixedMemInput/snextc.adoc[`snextc`] | Advance the read position and return the next character. | xref:BloombergLP/bdlsb/FixedMemInput/sputbackc.adoc[`sputbackc`] | Put back the specified character if it matches the previous character. | xref:BloombergLP/bdlsb/FixedMemInput/sungetc.adoc[`sungetc`] | Move the read position back one character and return that character. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#