[#BloombergLP-bdlde-Utf8CheckingInStreamBufWrapper] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlde.adoc[bdlde]::Utf8CheckingInStreamBufWrapper :relfileprefix: ../../ :mrdocs: Streambuf wrapper that forwards input and validates UTF‐8. == Synopsis Declared in `<bdlde_utf8checkinginstreambufwrapper.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- 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 [cols="1,4"] |=== | Name| Description | `std::streambuf` | |=== == Enums [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlde/Utf8CheckingInStreamBufWrapper/_04enum.adoc[`Unnamed enum`] | Error status values for seek failures. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlde/Utf8CheckingInStreamBufWrapper/2constructor-059.adoc[`Utf8CheckingInStreamBufWrapper`] [.small]#[constructor]# | Create a UTF‐8 checking streambuf wrapper with no associated streambuf. | xref:BloombergLP/bdlde/Utf8CheckingInStreamBufWrapper/2constructor-0d.adoc[`Utf8CheckingInStreamBufWrapper`] [.small]#[constructor]# | Create an empty UTF‐8 checking streambuf wrapper using the specified `basicAllocator` to supply memory. | xref:BloombergLP/bdlde/Utf8CheckingInStreamBufWrapper/2constructor-05f.adoc[`Utf8CheckingInStreamBufWrapper`] [.small]#[constructor]# | Create a UTF‐8 checking streambuf wrapper associated with `streamBuf`. | xref:BloombergLP/bdlde/Utf8CheckingInStreamBufWrapper/2destructor.adoc[`~Utf8CheckingInStreamBufWrapper`] [.small]#[destructor]# [.small]#[virtual]# | Destroy this object. | xref:BloombergLP/bdlde/Utf8CheckingInStreamBufWrapper/errorStatus.adoc[`errorStatus`] | Return the current error status of this object. | xref:BloombergLP/bdlde/Utf8CheckingInStreamBufWrapper/isValid.adoc[`isValid`] | Return `true` if this wrapper currently holds a `streambuf` and is not in a failed seek state. | xref:BloombergLP/bdlde/Utf8CheckingInStreamBufWrapper/reset.adoc[`reset`] | Associate this object with the specified `streamBuf`, releasing any previously held `streambuf`. | xref:BloombergLP/bdlde/Utf8CheckingInStreamBufWrapper/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<Utf8CheckingInStreamBufWrapper, UsesBslmaAllocator>`] | `Utf8CheckingInStreamBufWrapper` uses a `bslma` allocator. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlde/Utf8CheckingInStreamBufWrapper/toAscii.adoc[`toAscii`] | Return a human‐readable description of the specified error status. |=== == Protected Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlde/Utf8CheckingInStreamBufWrapper/imbue.adoc[`imbue`] [.small]#[virtual]# | Propagate the specified locale to the held streambuf, if any. | xref:BloombergLP/bdlde/Utf8CheckingInStreamBufWrapper/overflow.adoc[`overflow`] [.small]#[virtual]# | Unconditionally return `traits_type::eof()`. | xref:BloombergLP/bdlde/Utf8CheckingInStreamBufWrapper/pbackfail.adoc[`pbackfail`] [.small]#[virtual]# | Put back one byte of input, optionally substituting a character. | xref:BloombergLP/bdlde/Utf8CheckingInStreamBufWrapper/seekoff.adoc[`seekoff`] [.small]#[virtual]# | Move the position associated with this object according to the specified `offset` and `whence`: | xref:BloombergLP/bdlde/Utf8CheckingInStreamBufWrapper/seekpos.adoc[`seekpos`] [.small]#[virtual]# | Set the position of this object to the specified absolute offset. | xref:BloombergLP/bdlde/Utf8CheckingInStreamBufWrapper/showmanyc.adoc[`showmanyc`] [.small]#[virtual]# | Return how many bytes can be read before underflow may return eof. | xref:BloombergLP/bdlde/Utf8CheckingInStreamBufWrapper/underflow.adoc[`underflow`] [.small]#[virtual]# | Replenish the input buffer and return the next input byte. | xref:BloombergLP/bdlde/Utf8CheckingInStreamBufWrapper/xsgetn.adoc[`xsgetn`] [.small]#[virtual]# | Read up to the specified number of characters into the buffer. | xref:BloombergLP/bdlde/Utf8CheckingInStreamBufWrapper/xsputn.adoc[`xsputn`] [.small]#[virtual]# | Attempt to write characters; always fails in this input‐only wrapper. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#