Forward declaration of basic_syncbuf.

Synopsis

Declared in <bslstl_syncbuf.h>

template<
    class CHAR_TYPE,
    class CHAR_TRAITS = char_traits<CHAR_TYPE>,
    class ALLOCATOR = allocator<CHAR_TYPE>>
class basic_syncbuf
    : public std::basic_streambuf<CHAR_TYPE, CHAR_TRAITS>
    , public BloombergLP::bslstl::SyncBufBase

Base Classes

Name

Description

std::basic_streambuf<CHAR_TYPE, CHAR_TRAITS>

The actual work of input and output (interface).

BloombergLP::bslstl::SyncBufBase

Allocator‐independent base of basic_syncbuf. Also this is used by the manipulators: emit_on_flush, noemit_on_flush, flush_emit (the ALLOCATOR template argument cannot be deduced from basic_ostream<CHAR_TYPE, CHAR_TRAITS>).

Type Aliases

Name

Description

__streambuf_type

@{ This is a non‐standard type.

allocator_type

Allocator type used by this stream buffer.

char_type

Character type manipulated by this stream buffer.

int_type

Integer type returned by stream operations.

off_type

Offset type used by the character traits.

pos_type

Position type used by the character traits.

streambuf_type

Stream buffer type wrapped by this synchronized buffer.

traits_type

Character traits type used by this stream buffer.

Member Functions

Name

Description

basic_syncbuf [constructor]

Constructors

~basic_syncbuf [destructor] [virtual]

Call emit. Any exceptions thrown by emit are ignored.

operator=

Call emit() then assign to this object the value of the specified original, and return a reference providing modifiable access to this object. The contents of original are move‐assigned to this object. original.get_wrapped() == nullptr after the call.

emit

Atomically transfer any characters buffered by this object to the wrapped stream buffer, so that it appears in the output stream as a contiguous sequence of characters. The wrapped stream buffer is flushed if and only if a call was made to sync since the most recent call to emit or construction. Return true if get_wrapped() != nullptr, and all of the characters in the associated output were successfully transferred, and the flush (if any) succeeded; return false otherwise.

get_allocator

Return the allocator used to supply memory.

get_wrapped

Return the wrapped buffer supplied at construction.

getloc

Locale access.

in_avail

Looking ahead into the stream.

pubimbue

Entry point for imbue().

pubseekoff

Alters the stream position.

pubseekpos

Alters the stream position.

pubsetbuf

Entry points for derived buffer functions.

pubsync

Calls virtual sync function.

sbumpc

Getting the next character.

set_emit_on_sync

Call the emit function by each sync call if the specified value is true.

sgetc

Getting the next character.

sgetn

Entry point for xsgetn.

snextc

Getting the next character.

sputbackc

Pushing characters back into the input stream.

sputc

Entry point for all single‐character output functions.

sputn

Entry point for all single‐character output functions.

sungetc

Moving backwards in the input stream.

swap

Efficiently exchange the value of this object with the value of the specified other object. The behavior is undefined unless either *this and other allocators compare equal or propagate_on_container_swap is true.

Protected Member Functions

Name

Description

operator=

__safe_gbump

__safe_pbump

eback

Access to the get area.

egptr

epptr

gbump

Moving the read position.

gptr

imbue [virtual]

Changes translations.

overflow

overflow overloads

pbackfail [virtual]

Tries to back up the input sequence.

pbase

Access to the put area.

pbump

Moving the write position.

pptr

seekoff [virtual]

Alters the stream positions.

seekpos [virtual]

Alters the stream positions.

setbuf [virtual]

Manipulates the buffer.

setg

Setting the three read area pointers.

setp

Setting the three write area pointers.

showmanyc [virtual]

Investigating the data available.

swap

sync

Request the wrapped streambuf flush on the next emit call, then call emit if the "emit‐on‐sync" flag is true. Return 0 on success and ‐1 if the emit call has failed.

uflow [virtual]

Fetches more data from the controlled sequence.

underflow [virtual]

Fetches more data from the controlled sequence.

xsgetn [virtual]

Multiple character extraction.

xsputn

xsputn overloads

Protected Data Members

Name

Description

_M_buf_locale

Current locale setting.

_M_in_beg

Start of get area.

_M_in_cur

Current read area.

_M_in_end

End of get area.

_M_out_beg

Start of put area.

_M_out_cur

Current put area.

_M_out_end

End of put area.

Non-Member Functions

Name

Description

swap

Swap the specified a with the specified b using a.swap(b) expression.

Created with MrDocs