BloombergLP::bslx::ByteInStream

Provide a BDEX input stream that unexternalizes values from a byte buffer.

Synopsis

Declared in <bslx_byteinstream.h>

class ByteInStream;

Description

This class provides input methods to unexternalize values, and C-style arrays of values, of the fundamental integral and floating-point types, as well as bsl::string values, using a byte format documented in the bslx_byteoutstream component. In particular, each get method of this class is guaranteed to read stream data written by the corresponding put method of bslx::ByteOutStream. Note that attempting to read beyond the end of a stream will automatically invalidate the stream. See the bslx package-level documentation for the definition of the BDEX InStream protocol.

Member Functions

NameDescription
ByteInStream [constructor]Constructors
~ByteInStream [destructor]Destroy this object.
cursor Return the index of the next byte to be extracted from this stream.
data Return the address of this stream's external memory buffer.
getArrayFloat32 Extract an array of four-byte IEEE floats from this stream.
getArrayFloat64 Extract an array of eight-byte IEEE doubles from this stream.
getArrayInt16 Extract an array of two-byte signed integers from this stream.
getArrayInt24 Extract an array of three-byte signed integers from this stream.
getArrayInt32 Extract an array of four-byte signed integers from this stream.
getArrayInt40 Extract an array of five-byte signed integers from this stream.
getArrayInt48 Extract an array of six-byte signed integers from this stream.
getArrayInt56 Extract an array of seven-byte signed integers from this stream.
getArrayInt64 Extract an array of eight-byte signed integers from this stream.
getArrayInt8 getArrayInt8 overloads
getArrayUint16 Extract an array of two-byte unsigned integers from this stream.
getArrayUint24 Extract an array of three-byte unsigned integers from this stream.
getArrayUint32 Extract an array of four-byte unsigned integers from this stream.
getArrayUint40 Extract an array of five-byte unsigned integers from this stream.
getArrayUint48 Extract an array of six-byte unsigned integers from this stream.
getArrayUint56 Extract an array of seven-byte unsigned integers from this stream.
getArrayUint64 Extract an array of eight-byte unsigned integers from this stream.
getArrayUint8 getArrayUint8 overloads
getFloat32 Assign the next four-byte IEEE float to variable.
getFloat64 Assign the next eight-byte IEEE double to variable.
getInt16 Assign the next two-byte signed integer to variable.
getInt24 Assign the next three-byte signed integer to variable.
getInt32 Assign the next four-byte signed integer to variable.
getInt40 Assign the next five-byte signed integer to variable.
getInt48 Assign the next six-byte signed integer to variable.
getInt56 Assign the next seven-byte signed integer to variable.
getInt64 Assign the next eight-byte signed integer to variable.
getInt8 getInt8 overloads
getLength Extract a compact length value into the specified length.
getString Extract a length-prefixed string into the specified variable.
getUint16 Assign the next two-byte unsigned integer to variable.
getUint24 Assign the next three-byte unsigned integer to variable.
getUint32 Assign the next four-byte unsigned integer to variable.
getUint40 Assign the next five-byte unsigned integer to variable.
getUint48 Assign the next six-byte unsigned integer to variable.
getUint56 Assign the next seven-byte unsigned integer to variable.
getUint64 Assign the next eight-byte unsigned integer to variable.
getUint8 getUint8 overloads
getVersion Extract a one-byte version into the specified version.
invalidate Put this input stream in an invalid state.
isEmpty Return true if this stream is empty, and false otherwise.
isValid Return true if this stream is valid, and false otherwise.
length Return the total number of bytes stored in the external memory buffer.
reset reset overloads
operator void const* Return a non-zero value if this stream is valid, and 0 otherwise. An invalid stream is a stream for which an input operation was detected to have failed.

Friends

NameDescription
BloombergLP::bslx::operator<<Write the specified object to the specified output stream in some reasonable (multi-line) format, and return a reference to stream.

Non-Member Functions

NameDescription
operator>>Read a BDEX-compliant value from the specified input stream.