#include <bdlbb_blobstreambuf.h>
This class implements the input functionality of the basic_streambuf protocol, using a client-supplied bdlbb::Blob.
See bdlbb_blobstreambuf
◆ InBlobStreamBuf()
| bdlbb::InBlobStreamBuf::InBlobStreamBuf |
( |
const bdlbb::Blob * |
blob | ) |
|
|
explicit |
Create a BlobStreamBuf using the specified blob.
- Precondition
- The behavior is undefined unless
blob remains valid and externally unmodified for the lifetime of this streambuf.
◆ ~InBlobStreamBuf()
| bdlbb::InBlobStreamBuf::~InBlobStreamBuf |
( |
| ) |
|
Destroy this stream buffer.
◆ currentBufferIndex()
| int bdlbb::InBlobStreamBuf::currentBufferIndex |
( |
| ) |
const |
|
inline |
Return the index of the current buffer.
- Precondition
- The behavior is undefined unless the "streamed" blob has at least one buffer.
◆ data()
| const bdlbb::Blob * bdlbb::InBlobStreamBuf::data |
( |
| ) |
const |
|
inline |
Return the address of the blob held by this stream buffer.
◆ overflow()
| int_type bdlbb::InBlobStreamBuf::overflow |
( |
int_type |
c = bsl::streambuf::traits_type::eof() | ) |
|
|
protected |
Return traits_type::eof() unconditionally.
◆ pbackfail()
| int_type bdlbb::InBlobStreamBuf::pbackfail |
( |
int_type |
c = bsl::streambuf::traits_type::eof() | ) |
|
|
protected |
Adjust the underlying blob and put the optionally specified character c at the newly valid gptr(). Return c (or ~traits_type::eof if c == traits_type::eof) on success, and traits_type::eof() otherwise.
◆ previousBuffersLength()
| int bdlbb::InBlobStreamBuf::previousBuffersLength |
( |
| ) |
const |
|
inline |
Return the number of bytes contained in the buffers located before the current one.
- Precondition
- The behavior is undefined unless the "streamed" blob has at least one buffer.
◆ reset()
| void bdlbb::InBlobStreamBuf::reset |
( |
const bdlbb::Blob * |
blob = 0 | ) |
|
|
inline |
Reset the get areas. Optionally set the underlying bdlbb::Blob value to the optionally specified blob if blob is not 0.
- Precondition
- The behavior is undefined unless
blob remains valid and externally unmodified for the lifetime of this streambuf.
◆ seekoff()
| pos_type bdlbb::InBlobStreamBuf::seekoff |
( |
off_type |
offset, |
|
|
bsl::ios_base::seekdir |
fixedPosition, |
|
|
bsl::ios_base::openmode |
which = bsl::ios_base::in|bsl::ios_base::out |
|
) |
| |
|
protected |
Set the location from which the next I/O operation indicated by the optionally specified which mode will occur to the specified offset position from the location indicated by the specified fixedPosition. Return the new offset on success, and off_type(-1) otherwise. offset may be negative.
- Note
- Note that this method will fail if
bsl::ios_base::out is set.
◆ seekpos()
| pos_type bdlbb::InBlobStreamBuf::seekpos |
( |
pos_type |
position, |
|
|
bsl::ios_base::openmode |
which = bsl::ios_base::in|bsl::ios_base::out |
|
) |
| |
|
protected |
Set the location from which the next I/O operation indicated by the optionally specified which mode will occur to the specified position. Return position on success, and off_type(-1) otherwise.
- Note
- Note that this method will fail if
bsl::ios_base::out is set.
◆ showmanyc()
| bsl::streamsize bdlbb::InBlobStreamBuf::showmanyc |
( |
| ) |
|
|
protected |
Return the number of characters currently available for reading from this stream buffer, or 0 if there are none.
◆ sync()
| int bdlbb::InBlobStreamBuf::sync |
( |
| ) |
|
|
protected |
Return 0 unconditionally.
◆ underflow()
| int_type bdlbb::InBlobStreamBuf::underflow |
( |
| ) |
|
|
protected |
Adjust the underlying blob so that the next read position is valid. Return the character at gptr() on success and traits_type::eof() otherwise.
◆ xsgetn()
| bsl::streamsize bdlbb::InBlobStreamBuf::xsgetn |
( |
char_type * |
destination, |
|
|
bsl::streamsize |
numChars |
|
) |
| |
|
protected |
Read the specified numChars to the specified destination. Return the number of characters successfully read.
- Precondition
- The behavior is undefined unless 0 <=
numChars.
◆ xsputn()
| bsl::streamsize bdlbb::InBlobStreamBuf::xsputn |
( |
const char_type * |
source, |
|
|
bsl::streamsize |
numChars |
|
) |
| |
|
protected |
Return 0 unconditionally.
The documentation for this class was generated from the following file: