BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdlbb::OutBlobStreamBuf Class Reference

#include <bdlbb_blobstreambuf.h>

Inheritance diagram for bdlbb::OutBlobStreamBuf:

Public Member Functions

 OutBlobStreamBuf (bdlbb::Blob *blob)
 
 ~OutBlobStreamBuf () BSLS_KEYWORD_OVERRIDE
 Destroy this stream buffer.
 
bdlbb::Blobdata ()
 Return the address of the blob held by this stream buffer.
 
void reset (bdlbb::Blob *blob=0)
 
int currentBufferIndex () const
 
const bdlbb::Blobdata () const
 Return the address of the blob held by this stream buffer.
 
int previousBuffersLength () const
 

Protected Member Functions

int_type overflow (int_type c=bsl::streambuf::traits_type::eof()) BSLS_KEYWORD_OVERRIDE
 
int_type pbackfail (int_type c=bsl::streambuf::traits_type::eof()) BSLS_KEYWORD_OVERRIDE
 Return traits_type::eof() unconditionally.
 
pos_type seekoff (off_type offset, bsl::ios_base::seekdir fixedPosition, bsl::ios_base::openmode which=bsl::ios_base::in|bsl::ios_base::out) BSLS_KEYWORD_OVERRIDE
 
pos_type seekpos (pos_type position, bsl::ios_base::openmode which=bsl::ios_base::in|bsl::ios_base::out) BSLS_KEYWORD_OVERRIDE
 
bsl::streamsize showmanyc () BSLS_KEYWORD_OVERRIDE
 Return 0 unconditionally.
 
int sync () BSLS_KEYWORD_OVERRIDE
 
int_type underflow () BSLS_KEYWORD_OVERRIDE
 Return traits_type::eof() unconditionally.
 
bsl::streamsize xsgetn (char_type *destination, bsl::streamsize numChars) BSLS_KEYWORD_OVERRIDE
 Return 0 unconditionally.
 
bsl::streamsize xsputn (const char_type *source, bsl::streamsize numChars) BSLS_KEYWORD_OVERRIDE
 

Detailed Description

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

See bdlbb_blobstreambuf

Constructor & Destructor Documentation

◆ 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 ( )

Member Function Documentation

◆ 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]

bdlbb::Blob * bdlbb::OutBlobStreamBuf::data ( )
inline

◆ 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: