BloombergLP::bdlbb::OutBlobStreamBuf

This class implements the output functionality of the basic_streambuf protocol, using a client-supplied bdlbb::Blob.

Synopsis

Declared in <bdlbb_blobstreambuf.h>

class OutBlobStreamBuf
    : public std::streambuf

Base Classes

NameDescription
std::streambuf

Member Functions

NameDescription
OutBlobStreamBuf [constructor]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 [destructor] [virtual]Destroy this stream buffer.
currentBufferIndex Return the index of the current buffer. The behavior is undefined unless the "streamed" blob has at least one buffer.
data Return the address of the blob held by this stream buffer.
data Return the address of the blob held by this stream buffer.
previousBuffersLength 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 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.

Protected Member Functions

NameDescription
overflow [virtual]Append the optionally specified character c to this streambuf, and return c. By default, traits_type::eof() is appended.
pbackfail [virtual]Return traits_type::eof() unconditionally.
seekoff [virtual]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 [virtual]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 [virtual]Return 0 unconditionally.
sync [virtual]Synchronize the put position in the blob of this stream buffer. Return 0 unconditionally.
underflow [virtual]Return traits_type::eof() unconditionally.
xsgetn [virtual]Return 0 unconditionally.
xsputn [virtual]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.