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.
Synopsis
Declared in <bdlsb_fixedmeminput.h>
class FixedMemInput;
Type Aliases
Member Functions
Name |
Description |
|
Create a |
Return the size for the buffer held by this buffer, in bytes, supplied at construction. |
|
Return the address of the non‐modifiable character buffer held by this stream buffer. |
|
Return the number of characters available from the current read position in this stream buffer. |
|
Return the number of characters that can be successfully read from this stream buffer before reading |
|
Set the position indicator to the relative specified |
|
Set the position indicator to the specified |
|
Reinitialize this stream buffer to use the specified character |
|
Return the character at the current read position from this buffer, or |
|
Return the character at the current read position from this buffer, or |
|
Read the specified |
|
Advance the current read position and return the character at the resulting position from this buffer, or |
|
Move the current read position back one character if the current read position is not at the beginning of the buffer and the previous position contains the specified character |
|
Move the current read position back one character if the current read position is not at the beginning of the buffer, and return the character at the resulting current read position from this buffer. Return |
Created with MrDocs