8#ifndef INCLUDED_BDLSB_OVERFLOWMEMOUTPUT
9#define INCLUDED_BDLSB_OVERFLOWMEMOUTPUT
157#include <bdlscm_version.h>
164#include <bsl_cstddef.h>
166#include <bsl_iosfwd.h>
193 bsl::size_t d_dataLength;
197 char *d_initialBuffer_p;
200 bsl::size_t d_initialBufferSize;
203 bool d_inOverflowBufferFlag;
206 char *d_overflowBuffer_p;
208 bsl::size_t d_overflowBufferSize;
227 void grow(bsl::size_t numBytes,
bool copyOrigin =
true);
266 bsl::ios_base::seekdir way,
267 bsl::ios_base::openmode which = bsl::ios_base::out);
275 bsl::ios_base::openmode which = bsl::ios_base::out);
300 bsl::streamsize
sputn(
const char *source, bsl::streamsize length);
345 d_allocator_p->
deallocate(d_overflowBuffer_p);
378 return d_inOverflowBufferFlag ? d_initialBufferSize : d_dataLength;
384 return d_inOverflowBufferFlag ? d_dataLength - d_initialBufferSize : 0;
390 return d_initialBuffer_p;
396 return d_initialBufferSize;
402 return d_overflowBuffer_p;
408 return d_overflowBufferSize;
Definition bdlsb_overflowmemoutput.h:186
bsl::streamsize sputn(const char *source, bsl::streamsize length)
OverflowMemOutput * pubsetbuf(char *buffer, bsl::streamsize length)
Definition bdlsb_overflowmemoutput.h:357
const char * overflowBuffer() const
Definition bdlsb_overflowmemoutput.h:400
bsl::size_t initialBufferSize() const
Return the size of the initial buffer held by this stream buffer.
Definition bdlsb_overflowmemoutput.h:394
bsl::size_t dataLength() const
Return the number of bytes that have been written to this object.
Definition bdlsb_overflowmemoutput.h:370
traits_type::pos_type pos_type
Definition bdlsb_overflowmemoutput.h:238
bsl::size_t dataLengthInInitialBuffer() const
Definition bdlsb_overflowmemoutput.h:376
const char * initialBuffer() const
Definition bdlsb_overflowmemoutput.h:388
pos_type pubseekpos(pos_type position, bsl::ios_base::openmode which=bsl::ios_base::out)
Definition bdlsb_overflowmemoutput.h:351
BSLMF_NESTED_TRAIT_DECLARATION(OverflowMemOutput, bslma::UsesBslmaAllocator)
OverflowMemOutput(char *buffer, bsl::size_t length, bslma::Allocator *basicAllocator=0)
bsl::size_t overflowBufferSize() const
Definition bdlsb_overflowmemoutput.h:406
int pubsync()
Definition bdlsb_overflowmemoutput.h:363
traits_type::off_type off_type
Definition bdlsb_overflowmemoutput.h:239
~OverflowMemOutput()
Destroy this stream buffer.
Definition bdlsb_overflowmemoutput.h:343
pos_type pubseekoff(off_type offset, bsl::ios_base::seekdir way, bsl::ios_base::openmode which=bsl::ios_base::out)
bsl::char_traits< char > traits_type
Definition bdlsb_overflowmemoutput.h:236
bsl::size_t dataLengthInOverflowBuffer() const
Definition bdlsb_overflowmemoutput.h:382
traits_type::int_type int_type
Definition bdlsb_overflowmemoutput.h:237
char char_type
Definition bdlsb_overflowmemoutput.h:235
Definition bslma_allocator.h:457
virtual void deallocate(void *address)=0
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bdlsb_fixedmeminput.h:145
Definition bslma_usesbslmaallocator.h:343