BloombergLP::bslx::TestInStream

This class provides a test input stream for BDEX unexternalization.

Synopsis

Declared in <bslx_testinstream.h>

class TestInStream;

Description

This class provides input methods to unexternalize values, and C-style arrays of values, of fundamental types from their byte representations. Each input method also verifies the input value type. By default, if invalid data is detected, error messages are displayed on stdout; this error reporting may be disabled via the setQuiet method. 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
TestInStream [constructor]Constructors
~TestInStream [destructor]Destroy this test input stream.
cursor Return the index of the next byte to be extracted from this stream.
data Return the address of this stream's contiguous external memory buffer.
getArrayFloat32 Consume an array of single-precision floats from this stream.
getArrayFloat64 Consume an array of double-precision floats from this stream.
getArrayInt16 Consume an array of two-byte signed integers from this stream.
getArrayInt24 Consume an array of three-byte signed integers from this stream.
getArrayInt32 Consume an array of four-byte signed integers from this stream.
getArrayInt40 Consume an array of five-byte signed integers from this stream.
getArrayInt48 Consume an array of six-byte signed integers from this stream.
getArrayInt56 Consume an array of seven-byte signed integers from this stream.
getArrayInt64 Consume an array of eight-byte signed integers from this stream.
getArrayInt8 Consume an array of one-byte signed integers from this stream.
getArrayUint16 Consume an array of two-byte unsigned integers from this stream.
getArrayUint24 Consume an array of three-byte unsigned integers from this stream.
getArrayUint32 Consume an array of four-byte unsigned integers from this stream.
getArrayUint40 Consume an array of five-byte unsigned integers from this stream.
getArrayUint48 Consume an array of six-byte unsigned integers from this stream.
getArrayUint56 Consume an array of seven-byte unsigned integers from this stream.
getArrayUint64 Consume an array of eight-byte unsigned integers from this stream.
getArrayUint8 Consume an array of one-byte unsigned integers from this stream.
getFloat32 Consume a single-precision floating-point value from this stream.
getFloat64 Consume a double-precision floating-point value from this stream.
getInt16 Consume a two-byte signed integer from this stream.
getInt24 Consume a three-byte signed integer from this stream.
getInt32 Consume a four-byte signed integer from this stream.
getInt40 Consume a five-byte signed integer from this stream.
getInt48 Consume a six-byte signed integer from this stream.
getInt56 Consume a seven-byte signed integer from this stream.
getInt64 Consume an eight-byte signed integer from this stream.
getInt8 Consume a one-byte signed integer from this stream.
getLength Consume a BDEX length value from this stream.
getString Consume a string value from this stream.
getUint16 Consume a two-byte unsigned integer from this stream.
getUint24 Consume a three-byte unsigned integer from this stream.
getUint32 Consume a four-byte unsigned integer from this stream.
getUint40 Consume a five-byte unsigned integer from this stream.
getUint48 Consume a six-byte unsigned integer from this stream.
getUint56 Consume a seven-byte unsigned integer from this stream.
getUint64 Consume an eight-byte unsigned integer from this stream.
getUint8 Consume a one-byte unsigned integer from this stream.
getVersion Consume a BDEX version value from this stream.
inputLimit Return the current number of input requests left before an exception is thrown. A negative value indicates that no exception is scheduled.
invalidate Put this input stream in an invalid state.
isEmpty Return true if this stream is empty, and false otherwise.
isQuiet Return true if this stream's quiet mode is ON, 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
seek Set the extraction cursor to the specified offset.
setInputLimit Set the number of remaining input operations before an exception.
setQuiet Set whether this stream suppresses error messages on standard output.
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 test input stream.