8#ifndef INCLUDED_BDLSB_MEMOUTSTREAMBUF
9#define INCLUDED_BDLSB_MEMOUTSTREAMBUF
183#include <bdlscm_version.h>
193#include <bsl_cstddef.h>
194#include <bsl_cstdlib.h>
195#include <bsl_cstring.h>
197#include <bsl_streambuf.h>
233 void grow(bsl::size_t newLength);
243 int_type insertionChar = bsl::streambuf::traits_type::eof())
254 bsl::ios_base::seekdir way,
255 bsl::ios_base::openmode which =
bsl::ios_base::in
256 |
bsl::ios_base::out)
266 bsl::ios_base::openmode which =
bsl::ios_base::in
267 |
bsl::ios_base::out)
281 bslma::UsesBslmaAllocator);
299 bslma::Allocator *basicAllocator = 0);
328 const
char *
data() const;
346 static const bsl::size_t k_INITIAL_BUFFER_SIZE = 256;
349 static const bsl::size_t k_GEOMETRIC_GROWTH_FACTOR = 2;
365 bsl::size_t currentCapacity);
375: d_allocator_p(
bslma::Default::allocator(basicAllocator))
381MemOutStreamBuf::MemOutStreamBuf(bsl::size_t numElements,
383: d_allocator_p(
bslma::Default::allocator(basicAllocator))
409 return epptr() - pbase();
421 return pptr() - pbase();
#define BSLMF_NESTED_TRAIT_DECLARATION(t_TYPE, t_TRAIT)
Definition bslmf_nestedtraitdeclaration.h:231
Definition bdlsb_memoutstreambuf.h:212
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
bsl::streamsize xsputn(const char_type *source, bsl::streamsize numChars) BSLS_KEYWORD_OVERRIDE
int_type overflow(int_type insertionChar=bsl::streambuf::traits_type::eof()) BSLS_KEYWORD_OVERRIDE
bsl::size_t capacity() const
Definition bdlsb_memoutstreambuf.h:407
~MemOutStreamBuf() BSLS_KEYWORD_OVERRIDE
Destroy this stream buffer.
Definition bdlsb_memoutstreambuf.h:392
void reserveCapacity(bsl::size_t numCharacters)
bsl::size_t length() const
Return the number of valid characters in this stream buffer.
Definition bdlsb_memoutstreambuf.h:419
void reset()
Definition bdlsb_memoutstreambuf.h:399
pos_type seekpos(pos_type position, bsl::ios_base::openmode which=bsl::ios_base::in|bsl::ios_base::out) BSLS_KEYWORD_OVERRIDE
const char * data() const
Definition bdlsb_memoutstreambuf.h:413
Definition bslma_allocator.h:545
virtual void deallocate(void *address)=0
#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 bdlsb_fixedmeminput.h:145
Definition bdlat_valuetypefunctions.h:939
Definition baljsn_encoder_testtypes.h:76
Definition bdlsb_memoutstreambuf.h:342
static bsl::size_t computeNewCapacity(bsl::size_t newLength, bsl::size_t currentCapacity)
static const bsl::size_t k_MAX_GEOMETRIC_GROWTH_LENGTH
Definition bdlsb_memoutstreambuf.h:353
static const bsl::size_t k_INITIAL_BUFFER_SIZE
Definition bdlsb_memoutstreambuf.h:346