BloombergLP::bdlde::Utf8CheckingInStreamBufWrapper

Streambuf wrapper that forwards input and validates UTF-8.

Synopsis

Declared in <bdlde_utf8checkinginstreambufwrapper.h>

class Utf8CheckingInStreamBufWrapper
    : public std::streambuf

Description

This class inherits from bsl::streambuf, and holds and wraps another streambuf. It forwards input through the held streambuf, and checks for invalid UTF-8. The wrapping object does not support ouput, only input. If the held streambuf supports seeking, seeks are supported, though not forward seeks, and pubseekoff(0, bsl::ios_base::cur) is supported whether the wrapped streambuf supports seeking or not.

Base Classes

NameDescription
std::streambuf

Enums

NameDescription
Unnamed enum Error status values for seek failures.

Member Functions

NameDescription
Utf8CheckingInStreamBufWrapper [constructor]Create a UTF-8 checking streambuf wrapper with no associated streambuf.
Utf8CheckingInStreamBufWrapper [constructor]Create an empty UTF-8 checking streambuf wrapper using the specified basicAllocator to supply memory.
Utf8CheckingInStreamBufWrapper [constructor]Create a UTF-8 checking streambuf wrapper associated with streamBuf.
~Utf8CheckingInStreamBufWrapper [destructor] [virtual]Destroy this object.
errorStatus Return the current error status of this object.
isValid Return true if this wrapper currently holds a streambuf and is not in a failed seek state.
reset Associate this object with the specified streamBuf, releasing any previously held streambuf.
operator BloombergLP::bslmf::NestedTraitDeclaration<Utf8CheckingInStreamBufWrapper, UsesBslmaAllocator> Utf8CheckingInStreamBufWrapper uses a bslma allocator.

Static Member Functions

NameDescription
toAscii Return a human-readable description of the specified error status.

Protected Member Functions

NameDescription
imbue [virtual]Propagate the specified locale to the held streambuf, if any.
overflow [virtual]Unconditionally return traits_type::eof().
pbackfail [virtual]Put back one byte of input, optionally substituting a character.
seekoff [virtual]Move the position associated with this object according to the specified offset and whence:
seekpos [virtual]Set the position of this object to the specified absolute offset.
showmanyc [virtual]Return how many bytes can be read before underflow may return eof.
underflow [virtual]Replenish the input buffer and return the next input byte.
xsgetn [virtual]Read up to the specified number of characters into the buffer.
xsputn [virtual]Attempt to write characters; always fails in this input-only wrapper.