This class implements output functionality of basic_streambuf using client‐supplied memory.

Synopsis

Declared in <bdlsb_fixedmemoutput.h>

class FixedMemOutput;

Description

This class, like bdlsb::FixedMemOutStreamBuf, implements the output functionality of the basic_streambuf interface, using client‐supplied char * memory. It has an identical interface to bdlsb::FixedMemOutStreamBuf but does not inherit from bsl::streambuf. Thus, it is suitable for use as template parameter to bslx::GenericOutStream (but not to bslx::StreambufOutStream). Note that this class is not designed to be derived from.

Type Aliases

Name

Description

char_type

This typedef is an alias to char.

int_type

This typedef is an alias to traits_type::int_type.

off_type

This typedef is an alias to traits_type::off_type.

pos_type

This typedef is an alias to traits_type::pos_type.

traits_type

This typedef is an alias to bsl::char_traits<char>.

Member Functions

Name

Description

FixedMemOutput [constructor]

Create an empty stream buffer that uses the specified character buffer.

capacity

Return the size in bytes of the buffer held by this stream buffer.

data

data overloads

getloc

Return the current default locale. Operation has no effect, because locales are not supported by this component. Return default constructed bsl::locale object.

length

Return the number of characters from the beginning of the buffer to the current write position.

pubimbue

Associate the specified locale loc with this stream buffer.

pubseekoff

Set the position indicator relative to the specified fixedPosition.

pubseekpos

Set the position indicator to the specified position.

pubsetbuf

Reset the internal buffer of this stream to the specified buffer.

pubsync

Synchronize this stream buffer with its associated character sequence.

sputc

Write the specified character c to this buffer. Return c, or traits_type::eof() if the end of the write buffer is reached.

sputn

Write the specified length characters from s to this buffer.

Created with MrDocs