Quick Links:

bal | bbl | bdl | bsl

Public Member Functions | Protected Member Functions

bdlbb::OutBlobStreamBuf Class Reference

#include <bdlbb_blobstreambuf.h>

List of all members.

Public Member Functions

 OutBlobStreamBuf (bdlbb::Blob *blob)
 ~OutBlobStreamBuf ()
bdlbb::Blobdata ()
void reset (bdlbb::Blob *blob=0)
int currentBufferIndex () const
const bdlbb::Blobdata () const
int previousBuffersLength () const

Protected Member Functions

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

Detailed Description

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

See Component bdlbb_blobstreambuf


Constructor & Destructor Documentation

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.

bdlbb::OutBlobStreamBuf::~OutBlobStreamBuf (  ) 

Destroy this stream buffer.


Member Function Documentation

virtual int_type bdlbb::OutBlobStreamBuf::overflow ( int_type  c = bsl::streambuf::traits_type::eof()  )  [protected, virtual]

Append the optionally specified character c to this streambuf, and return c. By default, traits_type::eof() is appended.

virtual int_type bdlbb::OutBlobStreamBuf::pbackfail ( int_type  c = bsl::streambuf::traits_type::eof()  )  [protected, virtual]

Return traits_type::eof() unconditionally.

virtual 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, 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.

virtual pos_type bdlbb::OutBlobStreamBuf::seekpos ( pos_type  position,
bsl::ios_base::openmode  which = bsl::ios_base::in|bsl::ios_base::out 
) [protected, 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.

virtual bsl::streamsize bdlbb::OutBlobStreamBuf::showmanyc (  )  [protected, virtual]

Return 0 unconditionally.

virtual int bdlbb::OutBlobStreamBuf::sync (  )  [protected, virtual]

Synchronize the put position in the blob of this stream buffer. Return 0 unconditionally.

virtual int_type bdlbb::OutBlobStreamBuf::underflow (  )  [protected, virtual]

Return traits_type::eof() unconditionally.

virtual bsl::streamsize bdlbb::OutBlobStreamBuf::xsgetn ( char_type *  destination,
bsl::streamsize  numChars 
) [protected, virtual]

Return 0 unconditionally.

virtual bsl::streamsize bdlbb::OutBlobStreamBuf::xsputn ( const char_type *  source,
bsl::streamsize  numChars 
) [protected, 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.

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

Return the address of the blob held by this stream buffer.

void bdlbb::OutBlobStreamBuf::reset ( bdlbb::Blob blob = 0  ) 

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.

int bdlbb::OutBlobStreamBuf::currentBufferIndex (  )  const

Return the index of the current buffer. The behavior is undefined unless the "streamed" blob has at least one buffer.

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

Return the address of the blob held by this stream buffer.

int bdlbb::OutBlobStreamBuf::previousBuffersLength (  )  const

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.


The documentation for this class was generated from the following file: