Provide a basic input stream buffer using client‐supplied memory.
Synopsis
Declared in <bdlsb_fixedmeminput.h>
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
Name |
Description |
This |
|
This |
|
This |
|
This |
|
This |
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 remaining to be read. |
|
Set the position indicator to a relative offset in this buffer. |
|
Set the position indicator to the specified absolute position. |
|
Reinitialize this stream buffer to use the specified character buffer. |
|
Return the character at the current read position and advance. |
|
Return the character at the current read position from this buffer, or |
|
Read characters from this buffer into the specified destination. |
|
Advance the read position and return the next character. |
|
Put back the specified character if it matches the previous character. |
|
Move the read position back one character and return that character. |
Created with MrDocs