This class implements the input functionality of the basic_streambuf protocol, using client-supplied char * memory.
Declared in <bdlsb_fixedmeminstreambuf.h>
class FixedMemInStreamBuf
: public std::streambuf
| Name | Description |
|---|---|
std::streambuf |
| Name | Description |
|---|---|
FixedMemInStreamBuf [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. |
~FixedMemInStreamBuf [destructor] [virtual] | Destroy this stream buffer. |
data | Return the address of the non-modifiable character buffer held by this stream buffer. |
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. |
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. |
pubsetbuf | Reinitialize this stream buffer to use the specified read-only character buffer having the specified length. |
| Name | Description |
|---|---|
seekoff [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. |
seekpos [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. |
setbuf [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. |
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. |
showmanyc [virtual] | Return the number of characters currently available for reading from this stream buffer, or -1 if there are none. |
xsgetn [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. |