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;
108 void setGetPosition(bsl::size_t position);
113 int checkInvariant()
const;
119 int_type
overflow(int_type c = bsl::streambuf::traits_type::eof())
137 bsl::ios_base::seekdir fixedPosition,
138 bsl::ios_base::openmode which =
bsl::ios_base::in |
bsl::ios_base::out)
148 bsl::ios_base::openmode which =
bsl::ios_base::in |
bsl::ios_base::out)
218 typedef bsl::ios_base ios_base;
222 int d_putBufferIndex;
223 int d_previousBuffersLength;
233 void setPutPosition(bsl::size_t position);
238 int checkInvariant()
const;
245 int_type
overflow(int_type c = bsl::streambuf::traits_type::eof())
260 bsl::ios_base::seekdir fixedPosition,
261 bsl::ios_base::openmode which =
bsl::ios_base::in |
bsl::ios_base::out)
271 bsl::ios_base::openmode which =
bsl::ios_base::in |
bsl::ios_base::out)
348 d_getBufferIndex = 0;
349 d_previousBuffersLength = 0;
351 if (0 == d_blob_p->
length()) {
362 BSLS_ASSERT(d_getBufferIndex < d_blob_p->numBuffers());
363 return d_getBufferIndex;
375 return d_previousBuffersLength;
394 d_putBufferIndex = 0;
395 d_previousBuffersLength = 0;
401 setPutPosition(d_blob_p->
length());
408 BSLS_ASSERT(d_putBufferIndex < d_blob_p->numBuffers());
409 return d_putBufferIndex;
421 return d_previousBuffersLength;
Definition bdlbb_blob.h:642
int length() const
Return the length of this blob.
Definition bdlbb_blob.h:1220
int totalSize() const
Definition bdlbb_blob.h:1238
Definition bdlbb_blobstreambuf.h:89
void reset(const bdlbb::Blob *blob=0)
Definition bdlbb_blobstreambuf.h:344
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:367
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:360
int previousBuffersLength() const
Definition bdlbb_blobstreambuf.h:373
bsl::streamsize xsputn(const char_type *source, bsl::streamsize numChars) BSLS_KEYWORD_OVERRIDE
Return 0 unconditionally.
Definition bdlbb_blobstreambuf.h:215
int currentBufferIndex() const
Definition bdlbb_blobstreambuf.h:406
int previousBuffersLength() const
Definition bdlbb_blobstreambuf.h:419
int_type overflow(int_type c=bsl::streambuf::traits_type::eof()) BSLS_KEYWORD_OVERRIDE
void reset(bdlbb::Blob *blob=0)
Definition bdlbb_blobstreambuf.h:390
bdlbb::Blob * data()
Return the address of the blob held by this stream buffer.
Definition bdlbb_blobstreambuf.h:384
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1804
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
#define BSLS_KEYWORD_OVERRIDE
Definition bsls_keyword.h:653
Definition bdlbb_blob.h:442
Definition bdlb_printmethods.h:283