8#ifndef INCLUDED_BDLBB_BLOBSTREAMBUF
9#define INCLUDED_BDLBB_BLOBSTREAMBUF
65#include <bdlscm_version.h>
74#include <bsl_streambuf.h>
75#include <bsl_cstddef.h>
78namespace bdlbb {
class Blob; }
92 typedef bsl::ios_base ios_base;
97 int d_previousBuffersLength;
109 void setGetPosition(bsl::size_t position);
114 int checkInvariant()
const;
120 int_type
overflow(int_type c = bsl::streambuf::traits_type::eof())
139 bsl::ios_base::seekdir fixedPosition,
140 bsl::ios_base::openmode which =
bsl::ios_base::in |
bsl::ios_base::out)
151 bsl::ios_base::openmode which =
bsl::ios_base::in |
bsl::ios_base::out)
226 typedef bsl::ios_base ios_base;
230 int d_putBufferIndex;
231 int d_previousBuffersLength;
242 void setPutPosition(bsl::size_t position);
247 int checkInvariant()
const;
254 int_type
overflow(int_type c = bsl::streambuf::traits_type::eof())
270 bsl::ios_base::seekdir fixedPosition,
271 bsl::ios_base::openmode which =
bsl::ios_base::in |
bsl::ios_base::out)
282 bsl::ios_base::openmode which =
bsl::ios_base::in |
bsl::ios_base::out)
364 d_getBufferIndex = 0;
365 d_previousBuffersLength = 0;
367 if (0 == d_blob_p->
length()) {
378 BSLS_ASSERT(d_getBufferIndex < d_blob_p->numBuffers());
379 return d_getBufferIndex;
391 return d_previousBuffersLength;
410 d_putBufferIndex = 0;
411 d_previousBuffersLength = 0;
417 setPutPosition(d_blob_p->
length());
424 BSLS_ASSERT(d_putBufferIndex < d_blob_p->numBuffers());
425 return d_putBufferIndex;
437 return d_previousBuffersLength;
Definition bdlbb_blob.h:645
int length() const
Return the length of this blob.
Definition bdlbb_blob.h:1253
int totalSize() const
Definition bdlbb_blob.h:1271
Definition bdlbb_blobstreambuf.h:89
void reset(const bdlbb::Blob *blob=0)
Definition bdlbb_blobstreambuf.h:360
bsl::streamsize xsgetn(char_type *destination, bsl::streamsize numChars) BSLS_KEYWORD_OVERRIDE
int_type pbackfail(int_type c=bsl::streambuf::traits_type::eof()) BSLS_KEYWORD_OVERRIDE
const bdlbb::Blob * data() const
Return the address of the blob held by this stream buffer.
Definition bdlbb_blobstreambuf.h:383
int_type overflow(int_type c=bsl::streambuf::traits_type::eof()) BSLS_KEYWORD_OVERRIDE
Return traits_type::eof() unconditionally.
int sync() BSLS_KEYWORD_OVERRIDE
Return 0 unconditionally.
bsl::streamsize showmanyc() BSLS_KEYWORD_OVERRIDE
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
int_type underflow() BSLS_KEYWORD_OVERRIDE
int currentBufferIndex() const
Definition bdlbb_blobstreambuf.h:376
int previousBuffersLength() const
Definition bdlbb_blobstreambuf.h:389
bsl::streamsize xsputn(const char_type *source, bsl::streamsize numChars) BSLS_KEYWORD_OVERRIDE
Return 0 unconditionally.
Definition bdlbb_blobstreambuf.h:223
int currentBufferIndex() const
Definition bdlbb_blobstreambuf.h:422
int previousBuffersLength() const
Definition bdlbb_blobstreambuf.h:435
int_type overflow(int_type c=bsl::streambuf::traits_type::eof()) BSLS_KEYWORD_OVERRIDE
void reset(bdlbb::Blob *blob=0)
Definition bdlbb_blobstreambuf.h:406
bdlbb::Blob * data()
Return the address of the blob held by this stream buffer.
Definition bdlbb_blobstreambuf.h:400
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1976
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
#define BSLS_KEYWORD_OVERRIDE
Definition bsls_keyword.h:695
Definition bdlbb_blob.h:437
Definition bdlat_valuetypefunctions.h:939