8#ifndef INCLUDED_BDLSB_FIXEDMEMOUTPUT
9#define INCLUDED_BDLSB_FIXEDMEMOUTPUT
106#include <bdlscm_version.h>
113#include <bsl_algorithm.h>
114#include <bsl_cstdlib.h>
115#include <bsl_cstring.h>
117#include <bsl_iosfwd.h>
118#include <bsl_locale.h>
119#include <bsl_streambuf.h>
153 bsl::streamsize d_capacity;
183 bsl::locale
pubimbue(
const bsl::locale& loc);
201 bsl::ios_base::seekdir fixedPosition,
202 bsl::ios_base::openmode which =
203 bsl::ios_base::in | bsl::ios_base::out);
212 bsl::ios_base::openmode which =
213 bsl::ios_base::in | bsl::ios_base::out);
231 bsl::streamsize
sputn(
const char *s, bsl::streamsize
length);
240 const char *
data()
const;
244 bsl::streamsize
length()
const;
251 bsl::locale
getloc()
const;
265FixedMemOutput::FixedMemOutput(
char *buffer,
266 bsl::streamsize length)
285 return bsl::locale();
290 bsl::streamsize length)
312 if (d_pos >= d_capacity) {
313 return traits_type::eof();
315 d_buffer_p[
static_cast<IntPtr
>(d_pos)] = c;
317 return traits_type::to_int_type(c);
322 bsl::streamsize length)
326 length = bsl::min<bsl::streamsize>(
328 d_capacity -
static_cast<bsl::streamsize
>(d_pos));
330 bsl::memcpy(d_buffer_p +
static_cast<IntPtr
>(d_pos), s,
length);
356 return bsl::locale();
362 return bsl::streamsize(d_pos);
Definition bdlsb_fixedmemoutput.h:137
int_type sputc(char c)
Definition bdlsb_fixedmemoutput.h:310
bsl::locale pubimbue(const bsl::locale &loc)
Definition bdlsb_fixedmemoutput.h:283
bsl::locale getloc() const
Definition bdlsb_fixedmemoutput.h:354
bsl::streamsize capacity() const
Return the size in bytes of the buffer held by this stream buffer.
Definition bdlsb_fixedmemoutput.h:342
bsl::streamsize sputn(const char *s, bsl::streamsize length)
Definition bdlsb_fixedmemoutput.h:321
char char_type
Definition bdlsb_fixedmemoutput.h:141
bsl::char_traits< char > traits_type
Definition bdlsb_fixedmemoutput.h:145
FixedMemOutput * pubsetbuf(char *buffer, bsl::streamsize length)
Definition bdlsb_fixedmemoutput.h:289
bsl::char_traits< char >::int_type int_type
Definition bdlsb_fixedmemoutput.h:142
pos_type pubseekoff(off_type offset, bsl::ios_base::seekdir fixedPosition, bsl::ios_base::openmode which=bsl::ios_base::in|bsl::ios_base::out)
~FixedMemOutput()=default
Destroy this object.
bsl::char_traits< char >::off_type off_type
Definition bdlsb_fixedmemoutput.h:144
bsl::streamsize length() const
Definition bdlsb_fixedmemoutput.h:360
char * data()
Definition bdlsb_fixedmemoutput.h:277
pos_type pubseekpos(pos_type position, bsl::ios_base::openmode which=bsl::ios_base::in|bsl::ios_base::out)
bsl::char_traits< char >::pos_type pos_type
Definition bdlsb_fixedmemoutput.h:143
int pubsync()
Definition bdlsb_fixedmemoutput.h:303
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1804
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bdlsb_fixedmeminput.h:145
std::ptrdiff_t IntPtr
Definition bsls_types.h:130