[#BloombergLP-bslx-GenericOutStream] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslx.adoc[bslx]::GenericOutStream :relfileprefix: ../../ :mrdocs: Provide a BDEX output stream that externalizes values to a stream buffer. == Synopsis Declared in `<bslx_genericoutstream.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class STREAMBUF> class GenericOutStream; ---- == Description This class provides output methods to externalize values, and C‐style arrays of values, of the fundamental integral and floating‐point types, as well as `bsl::string` values. In particular, each `put` method of this class is guaranteed to write stream data that can be read by the corresponding `get` method of `bslx::GenericInStream`. See the `bslx` package‐level documentation for the definition of the BDEX `OutStream` protocol. == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslx/GenericOutStream/2constructor.adoc[`GenericOutStream`] [.small]#[constructor]# | Create an output byte stream that writes to the specified `streamBuf`. | xref:BloombergLP/bslx/GenericOutStream/2destructor.adoc[`~GenericOutStream`] [.small]#[destructor]# | Destroy this object. | xref:BloombergLP/bslx/GenericOutStream/bdexVersionSelector.adoc[`bdexVersionSelector`] | Return the `versionSelector` to be used with `operator<<` for BDEX streaming as per the `bslx` package‐level documentation. | xref:BloombergLP/bslx/GenericOutStream/flush.adoc[`flush`] | If this stream is valid, invoke the `pubsync` method on the underlying stream supplied at construction of this object; otherwise, this function has no effect. | xref:BloombergLP/bslx/GenericOutStream/invalidate.adoc[`invalidate`] | Put this output stream in an invalid state. This function has no effect if this stream is already invalid. | xref:BloombergLP/bslx/GenericOutStream/isValid.adoc[`isValid`] | Return `true` if this stream is valid, and `false` otherwise. | xref:BloombergLP/bslx/GenericOutStream/putArrayFloat32.adoc[`putArrayFloat32`] | Write an array of four‐byte IEEE single‐precision values to this stream. | xref:BloombergLP/bslx/GenericOutStream/putArrayFloat64.adoc[`putArrayFloat64`] | Write an array of eight‐byte IEEE double‐precision values to this stream. | xref:BloombergLP/bslx/GenericOutStream/putArrayInt16.adoc[`putArrayInt16`] | Write an array of two‐byte signed integers to this stream. | xref:BloombergLP/bslx/GenericOutStream/putArrayInt24.adoc[`putArrayInt24`] | Write an array of three‐byte signed integers to this stream. | xref:BloombergLP/bslx/GenericOutStream/putArrayInt32.adoc[`putArrayInt32`] | Write an array of four‐byte signed integers to this stream. | xref:BloombergLP/bslx/GenericOutStream/putArrayInt40.adoc[`putArrayInt40`] | Write an array of five‐byte signed integers to this stream. | xref:BloombergLP/bslx/GenericOutStream/putArrayInt48.adoc[`putArrayInt48`] | Write an array of six‐byte signed integers to this stream. | xref:BloombergLP/bslx/GenericOutStream/putArrayInt56.adoc[`putArrayInt56`] | Write an array of seven‐byte signed integers to this stream. | xref:BloombergLP/bslx/GenericOutStream/putArrayInt64.adoc[`putArrayInt64`] | Write an array of eight‐byte signed integers to this stream. | xref:BloombergLP/bslx/GenericOutStream/putArrayInt8-02.adoc[`putArrayInt8`] | `putArrayInt8` overloads | xref:BloombergLP/bslx/GenericOutStream/putArrayUint16.adoc[`putArrayUint16`] | Write an array of two‐byte unsigned integers to this stream. | xref:BloombergLP/bslx/GenericOutStream/putArrayUint24.adoc[`putArrayUint24`] | Write an array of three‐byte unsigned integers to this stream. | xref:BloombergLP/bslx/GenericOutStream/putArrayUint32.adoc[`putArrayUint32`] | Write an array of four‐byte unsigned integers to this stream. | xref:BloombergLP/bslx/GenericOutStream/putArrayUint40.adoc[`putArrayUint40`] | Write an array of five‐byte unsigned integers to this stream. | xref:BloombergLP/bslx/GenericOutStream/putArrayUint48.adoc[`putArrayUint48`] | Write an array of six‐byte unsigned integers to this stream. | xref:BloombergLP/bslx/GenericOutStream/putArrayUint56.adoc[`putArrayUint56`] | Write an array of seven‐byte unsigned integers to this stream. | xref:BloombergLP/bslx/GenericOutStream/putArrayUint64.adoc[`putArrayUint64`] | Write an array of eight‐byte unsigned integers to this stream. | xref:BloombergLP/bslx/GenericOutStream/putArrayUint8-0c.adoc[`putArrayUint8`] | `putArrayUint8` overloads | xref:BloombergLP/bslx/GenericOutStream/putFloat32.adoc[`putFloat32`] | Write a four‐byte IEEE single‐precision value to this stream. | xref:BloombergLP/bslx/GenericOutStream/putFloat64.adoc[`putFloat64`] | Write an eight‐byte IEEE double‐precision value to this stream. | xref:BloombergLP/bslx/GenericOutStream/putInt16.adoc[`putInt16`] | Write a two‐byte signed integer to this stream. | xref:BloombergLP/bslx/GenericOutStream/putInt24.adoc[`putInt24`] | Write a three‐byte signed integer to this stream. | xref:BloombergLP/bslx/GenericOutStream/putInt32.adoc[`putInt32`] | Write a four‐byte signed integer to this stream. | xref:BloombergLP/bslx/GenericOutStream/putInt40.adoc[`putInt40`] | Write a five‐byte signed integer to this stream. | xref:BloombergLP/bslx/GenericOutStream/putInt48.adoc[`putInt48`] | Write a six‐byte signed integer to this stream. | xref:BloombergLP/bslx/GenericOutStream/putInt56.adoc[`putInt56`] | Write a seven‐byte signed integer to this stream. | xref:BloombergLP/bslx/GenericOutStream/putInt64.adoc[`putInt64`] | Write an eight‐byte signed integer to this stream. | xref:BloombergLP/bslx/GenericOutStream/putInt8.adoc[`putInt8`] | Write a one‐byte signed integer to this stream. | xref:BloombergLP/bslx/GenericOutStream/putLength.adoc[`putLength`] | Write the specified `length` to this stream using BDEX length encoding. | xref:BloombergLP/bslx/GenericOutStream/putString.adoc[`putString`] | Write the length and characters of the specified `value` to this stream. | xref:BloombergLP/bslx/GenericOutStream/putUint16.adoc[`putUint16`] | Write a two‐byte unsigned integer to this stream. | xref:BloombergLP/bslx/GenericOutStream/putUint24.adoc[`putUint24`] | Write a three‐byte unsigned integer to this stream. | xref:BloombergLP/bslx/GenericOutStream/putUint32.adoc[`putUint32`] | Write the 32‐bit unsigned `value` to this stream. | xref:BloombergLP/bslx/GenericOutStream/putUint40.adoc[`putUint40`] | Write a five‐byte unsigned integer to this stream. | xref:BloombergLP/bslx/GenericOutStream/putUint48.adoc[`putUint48`] | Write a six‐byte unsigned integer to this stream. | xref:BloombergLP/bslx/GenericOutStream/putUint56.adoc[`putUint56`] | Write a seven‐byte unsigned integer to this stream. | xref:BloombergLP/bslx/GenericOutStream/putUint64.adoc[`putUint64`] | Write an eight‐byte unsigned integer to this stream. | xref:BloombergLP/bslx/GenericOutStream/putUint8.adoc[`putUint8`] | Write a one‐byte unsigned integer to this stream. | xref:BloombergLP/bslx/GenericOutStream/putVersion.adoc[`putVersion`] | Write the specified one‐byte `version` to this stream. | xref:BloombergLP/bslx/GenericOutStream/2conversion.adoc[`operator void const*`] | Return a non‐null pointer if this stream is valid, and null otherwise. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslx/operator_lshift-0e.adoc[`operator<<`] | Write the BDEX‐compliant `value` to the specified output `stream`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#