#include <bdlbb_blobstreambuf.h>
This class implements the output functionality of the basic_streambuf protocol, using a client-supplied bdlbb::Blob
.
See bdlbb_blobstreambuf
◆ OutBlobStreamBuf()
bdlbb::OutBlobStreamBuf::OutBlobStreamBuf |
( |
bdlbb::Blob * |
blob | ) |
|
|
explicit |
Create a OutBlobStreamBuf
using the specified blob
, and set the location at which the next write operation will occur to blob->length()
. The behavior is undefined unless blob
remains valid and externally unmodified for the lifetime of this streambuf
.
◆ ~OutBlobStreamBuf()
bdlbb::OutBlobStreamBuf::~OutBlobStreamBuf |
( |
| ) |
|
◆ currentBufferIndex()
int bdlbb::OutBlobStreamBuf::currentBufferIndex |
( |
| ) |
const |
|
inline |
Return the index of the current buffer. The behavior is undefined unless the "streamed" blob has at least one buffer.
◆ data() [1/2]
◆ data() [2/2]
const bdlbb::Blob * bdlbb::OutBlobStreamBuf::data |
( |
| ) |
const |
|
inline |
◆ overflow()
int_type bdlbb::OutBlobStreamBuf::overflow |
( |
int_type |
c = bsl::streambuf::traits_type::eof() | ) |
|
|
protected |
Append the optionally specified character c
to this streambuf, and return c
. By default, traits_type::eof()
is appended.
◆ pbackfail()
int_type bdlbb::OutBlobStreamBuf::pbackfail |
( |
int_type |
c = bsl::streambuf::traits_type::eof() | ) |
|
|
protected |
◆ previousBuffersLength()
int bdlbb::OutBlobStreamBuf::previousBuffersLength |
( |
| ) |
const |
|
inline |
Return the number of bytes contained in the buffers located before the current one. The behavior is undefined unless the "streamed" blob has at least one buffer.
◆ reset()
void bdlbb::OutBlobStreamBuf::reset |
( |
bdlbb::Blob * |
blob = 0 | ) |
|
|
inline |
Reset the put position of this buffer to the first location, available for writing in the underlying bdlbb::Blob
. Optionally specify a blob
used to change current underlying bdlbb::Blob
value for. The behavior is undefined unless blob
remains valid and externally unmodified for the lifetime of this streambuf
.
◆ seekoff()
pos_type bdlbb::OutBlobStreamBuf::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 that this method will fail if bsl::ios_base::in
is set.
◆ seekpos()
pos_type bdlbb::OutBlobStreamBuf::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 that this method will fail if bsl::ios_base::in
is set.
◆ showmanyc()
bsl::streamsize bdlbb::OutBlobStreamBuf::showmanyc |
( |
| ) |
|
|
protected |
◆ sync()
int bdlbb::OutBlobStreamBuf::sync |
( |
| ) |
|
|
protected |
Synchronize the put position in the blob of this stream buffer. Return 0 unconditionally.
◆ underflow()
int_type bdlbb::OutBlobStreamBuf::underflow |
( |
| ) |
|
|
protected |
◆ xsgetn()
bsl::streamsize bdlbb::OutBlobStreamBuf::xsgetn |
( |
char_type * |
destination, |
|
|
bsl::streamsize |
numChars |
|
) |
| |
|
protected |
◆ xsputn()
bsl::streamsize bdlbb::OutBlobStreamBuf::xsputn |
( |
const char_type * |
source, |
|
|
bsl::streamsize |
numChars |
|
) |
| |
|
protected |
Copy the specified numChars
from the specified source
to the blob held by this streambuf, starting at the current put area location. The behavior is undefined unless 0 <= numChars
.
The documentation for this class was generated from the following file: