8#ifndef INCLUDED_BDLSB_OVERFLOWMEMOUTSTREAMBUF
9#define INCLUDED_BDLSB_OVERFLOWMEMOUTSTREAMBUF
209#include <bdlscm_version.h>
219#include <bsl_cstddef.h>
221#include <bsl_streambuf.h>
247 mutable bsl::size_t d_dataLength;
249 char *d_initialBuffer_p;
252 bsl::size_t d_initialBufferSize;
254 bool d_inOverflowBufferFlag;
257 char *d_overflowBuffer_p;
259 bsl::size_t d_overflowBufferSize;
279 void grow(bsl::size_t numBytes);
286 void privateSync()
const;
301 bsl::ios_base::seekdir way,
302 bsl::ios_base::openmode which = bsl::ios_base::in | bsl::ios_base::out)
312 bsl::ios_base::openmode which = bsl::ios_base::in | bsl::ios_base::out)
333 int_type
overflow(int_type c =
bsl::streambuf::traits_type::eof())
339 bslma::UsesBslmaAllocator);
352 bslma::Allocator *basicAllocator = 0);
401 bsl::ios_base::openmode which)
403 return seekoff(off_type(position), bsl::ios_base::beg, which);
417 d_allocator_p->
deallocate(d_overflowBuffer_p);
432 return d_inOverflowBufferFlag ? d_initialBufferSize : d_dataLength;
439 return d_inOverflowBufferFlag ? d_dataLength - d_initialBufferSize : 0;
445 return d_initialBuffer_p;
451 return d_initialBufferSize;
457 return d_overflowBuffer_p;
463 return d_overflowBufferSize;
#define BSLMF_NESTED_TRAIT_DECLARATION(t_TYPE, t_TRAIT)
Definition bslmf_nestedtraitdeclaration.h:231
Definition bdlsb_overflowmemoutstreambuf.h:235
~OverflowMemOutStreamBuf() BSLS_KEYWORD_OVERRIDE
Destroy this stream buffer.
Definition bdlsb_overflowmemoutstreambuf.h:415
bsl::size_t overflowBufferSize() const
Definition bdlsb_overflowmemoutstreambuf.h:461
bsl::streamsize xsputn(const char_type *source, bsl::streamsize numChars) BSLS_KEYWORD_OVERRIDE
int sync() BSLS_KEYWORD_OVERRIDE
Definition bdlsb_overflowmemoutstreambuf.h:407
pos_type seekpos(pos_type position, bsl::ios_base::openmode which=bsl::ios_base::in|bsl::ios_base::out) BSLS_KEYWORD_OVERRIDE
Definition bdlsb_overflowmemoutstreambuf.h:400
pos_type seekoff(off_type offset, bsl::ios_base::seekdir way, bsl::ios_base::openmode which=bsl::ios_base::in|bsl::ios_base::out) BSLS_KEYWORD_OVERRIDE
const char * overflowBuffer() const
Definition bdlsb_overflowmemoutstreambuf.h:455
bsl::size_t dataLength() const
Definition bdlsb_overflowmemoutstreambuf.h:422
bsl::size_t dataLengthInOverflowBuffer() const
Definition bdlsb_overflowmemoutstreambuf.h:436
int_type overflow(int_type c=bsl::streambuf::traits_type::eof()) BSLS_KEYWORD_OVERRIDE
const char * initialBuffer() const
Return a pointer to the non-modifiable buffer supplied at construction.
Definition bdlsb_overflowmemoutstreambuf.h:443
bsl::size_t initialBufferSize() const
Return the size of the buffer supplied at construction.
Definition bdlsb_overflowmemoutstreambuf.h:449
bsl::size_t dataLengthInInitialBuffer() const
Definition bdlsb_overflowmemoutstreambuf.h:429
Definition bslma_allocator.h:457
virtual void deallocate(void *address)=0
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
#define BSLS_KEYWORD_OVERRIDE
Definition bsls_keyword.h:653
Definition bdlsb_fixedmeminput.h:145
Definition bdlb_printmethods.h:283
Definition balxml_encoderoptions.h:68