[#BloombergLP-bdlsb-FixedMemInStreamBuf] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlsb.adoc[bdlsb]::FixedMemInStreamBuf :relfileprefix: ../../ :mrdocs: This class implements the input functionality of the `basic_streambuf` protocol, using client‐supplied `char *` memory. == Synopsis Declared in `<bdlsb_fixedmeminstreambuf.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class FixedMemInStreamBuf : public std::streambuf ---- == Base Classes [cols="1,4"] |=== | Name| Description | `std::streambuf` | |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlsb/FixedMemInStreamBuf/2constructor.adoc[`FixedMemInStreamBuf`] [.small]#[constructor]# | Create a `FixedMemInStreamBuf` that provides access to the character sequence in the specified `buffer` of the specified `length`. The behavior is undefined unless `buffer != 0 && length > 0` or `length == 0`. | xref:BloombergLP/bdlsb/FixedMemInStreamBuf/2destructor.adoc[`~FixedMemInStreamBuf`] [.small]#[destructor]# [.small]#[virtual]# | Destroy this stream buffer. | xref:BloombergLP/bdlsb/FixedMemInStreamBuf/data.adoc[`data`] | Return the address of the non‐modifiable character buffer held by this stream buffer. | xref:BloombergLP/bdlsb/FixedMemInStreamBuf/length.adoc[`length`] | Return the number of characters from the current input position to the end of the stream buffer. The function returns the same value as `seekoff(0, bsl::ios_base::beg)`. The length is modified by a call to `seekpos`, `seekoff` or by reading characters from the buffer. | xref:BloombergLP/bdlsb/FixedMemInStreamBuf/pubsetbuf-03.adoc[`pubsetbuf`] | Reinitialize this stream buffer to use the specified character `buffer` having the specified `length`. Return the address of this modifiable stream buffer. The behavior is undefined unless `buffer != 0 && length > 0` or `length == 0`. Upon reinitialization for use of the new buffer, neither the content nor the next input position indicator is preserved. Note that `buffer` is held but not owned. | xref:BloombergLP/bdlsb/FixedMemInStreamBuf/pubsetbuf-07.adoc[`pubsetbuf`] | Reinitialize this stream buffer to use the specified read‐only character `buffer` having the specified `length`. |=== == Protected Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlsb/FixedMemInStreamBuf/seekoff.adoc[`seekoff`] [.small]#[virtual]# | Set the position indicator to the relative specified `offset` from the base position indicated by the specified `way` and return the resulting absolute position on success or pos_type(‐1) on failure. Optionally specify `which` area of the stream buffer. The seek operation will fail if `which` does not include the flag `bsl::ios_base::in` or if the resulting absolute position is less than zero or greater than the value returned by `length`. | xref:BloombergLP/bdlsb/FixedMemInStreamBuf/seekpos.adoc[`seekpos`] [.small]#[virtual]# | Set the position indicator to the specified `position` and return the resulting absolute position on success or pos_type(‐1) on failure. Optionally specify `which` area of the stream buffer. The `seekpos` operation will fail if `which` does not include the flag `bsl::ios_base::in` or if position is less then zero or greater than the value returned by `length`. | xref:BloombergLP/bdlsb/FixedMemInStreamBuf/setbuf-09.adoc[`setbuf`] [.small]#[virtual]# | Reinitialize this stream buffer to use the specified character `buffer` having the specified `length`. Return the pointer providing modifiable access to this stream buffer. | xref:BloombergLP/bdlsb/FixedMemInStreamBuf/setbuf-00.adoc[`setbuf`] | Reinitialize this stream buffer to use the specified character `buffer` having the specified `length`. Return the pointer providing modifiable access to this stream buffer. The behavior is undefined unless `buffer != 0 && length > 0` or `length == 0`. Upon re‐initialization for use of the new buffer, neither the content nor the next input position indicator are preserved. Note that `buffer` is held but not owned. | xref:BloombergLP/bdlsb/FixedMemInStreamBuf/showmanyc.adoc[`showmanyc`] [.small]#[virtual]# | Return the number of characters currently available for reading from this stream buffer, or ‐1 if there are none. | xref:BloombergLP/bdlsb/FixedMemInStreamBuf/xsgetn.adoc[`xsgetn`] [.small]#[virtual]# | Read the specified `length` number of characters into the specified `destination`. Return the number of characters successfully read. The behavior is undefined unless `0 <= length`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#