BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslx::GenericInStream< STREAMBUF > Class Template Reference

#include <bslx_genericinstream.h>

Public Member Functions

 GenericInStream (STREAMBUF *streamBuf)
 
 ~GenericInStream ()
 Destroy this object.
 
GenericInStreamgetLength (int &length)
 
GenericInStreamgetVersion (int &version)
 
void invalidate ()
 
GenericInStreamgetInt64 (bsls::Types::Int64 &variable)
 
GenericInStreamgetUint64 (bsls::Types::Uint64 &variable)
 
GenericInStreamgetInt56 (bsls::Types::Int64 &variable)
 
GenericInStreamgetUint56 (bsls::Types::Uint64 &variable)
 
GenericInStreamgetInt48 (bsls::Types::Int64 &variable)
 
GenericInStreamgetUint48 (bsls::Types::Uint64 &variable)
 
GenericInStreamgetInt40 (bsls::Types::Int64 &variable)
 
GenericInStreamgetUint40 (bsls::Types::Uint64 &variable)
 
GenericInStreamgetInt32 (int &variable)
 
GenericInStreamgetUint32 (unsigned int &variable)
 
GenericInStreamgetInt24 (int &variable)
 
GenericInStreamgetUint24 (unsigned int &variable)
 
GenericInStreamgetInt16 (short &variable)
 
GenericInStreamgetUint16 (unsigned short &variable)
 
GenericInStreamgetInt8 (char &variable)
 
GenericInStreamgetInt8 (signed char &variable)
 
GenericInStreamgetUint8 (char &variable)
 
GenericInStreamgetUint8 (unsigned char &variable)
 
GenericInStreamgetFloat64 (double &variable)
 
GenericInStreamgetFloat32 (float &variable)
 
GenericInStreamgetString (bsl::string &variable)
 
GenericInStreamgetArrayInt64 (bsls::Types::Int64 *variables, int numVariables)
 
GenericInStreamgetArrayUint64 (bsls::Types::Uint64 *variables, int numVariables)
 
GenericInStreamgetArrayInt56 (bsls::Types::Int64 *variables, int numVariables)
 
GenericInStreamgetArrayUint56 (bsls::Types::Uint64 *variables, int numVariables)
 
GenericInStreamgetArrayInt48 (bsls::Types::Int64 *variables, int numVariables)
 
GenericInStreamgetArrayUint48 (bsls::Types::Uint64 *variables, int numVariables)
 
GenericInStreamgetArrayInt40 (bsls::Types::Int64 *variables, int numVariables)
 
GenericInStreamgetArrayUint40 (bsls::Types::Uint64 *variables, int numVariables)
 
GenericInStreamgetArrayInt32 (int *variables, int numVariables)
 
GenericInStreamgetArrayUint32 (unsigned int *variables, int numVariables)
 
GenericInStreamgetArrayInt24 (int *variables, int numVariables)
 
GenericInStreamgetArrayUint24 (unsigned int *variables, int numVariables)
 
GenericInStreamgetArrayInt16 (short *variables, int numVariables)
 
GenericInStreamgetArrayUint16 (unsigned short *variables, int numVariables)
 
GenericInStreamgetArrayInt8 (char *variables, int numVariables)
 
GenericInStreamgetArrayInt8 (signed char *variables, int numVariables)
 
GenericInStreamgetArrayUint8 (char *variables, int numVariables)
 
GenericInStreamgetArrayUint8 (unsigned char *variables, int numVariables)
 
GenericInStreamgetArrayFloat64 (double *variables, int numVariables)
 
GenericInStreamgetArrayFloat32 (float *variables, int numVariables)
 
 operator const void * () const
 
bool isValid () const
 

Detailed Description

template<class STREAMBUF>
class bslx::GenericInStream< STREAMBUF >

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::GenericOutStream. 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.

See bslx_genericinstream

Constructor & Destructor Documentation

◆ GenericInStream()

template<class STREAMBUF >
bslx::GenericInStream< STREAMBUF >::GenericInStream ( STREAMBUF *  streamBuf)
inline

Create an input byte stream that reads its input from the specified streamBuf.

◆ ~GenericInStream()

template<class STREAMBUF >
bslx::GenericInStream< STREAMBUF >::~GenericInStream ( )
inline

Member Function Documentation

◆ getArrayFloat32()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getArrayFloat32 ( float *  variables,
int  numVariables 
)

Assign to the specified variables the consecutive four-byte IEEE single-precision floating-point numbers (in host byte order) comprised of each of the specified numVariables four-byte sequences of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variables is undefined. The behavior is undefined unless 0 <= numVariables and variables has sufficient capacity.

◆ getArrayFloat64()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getArrayFloat64 ( double *  variables,
int  numVariables 
)

Assign to the specified variables the consecutive eight-byte IEEE double-precision floating-point numbers (in host byte order) comprised of each of the specified numVariables eight-byte sequences of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variables is undefined. The behavior is undefined unless 0 <= numVariables and variables has sufficient capacity.

◆ getArrayInt16()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getArrayInt16 ( short *  variables,
int  numVariables 
)

Assign to the specified variables the consecutive two-byte, two's complement integers (in host byte order) comprised of each of the specified numVariables two-byte sequences of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variables is undefined. The behavior is undefined unless 0 <= numVariables and variables has sufficient capacity. Note that each of the values will be sign-extended.

◆ getArrayInt24()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getArrayInt24 ( int *  variables,
int  numVariables 
)

Assign to the specified variables the consecutive three-byte, two's complement integers (in host byte order) comprised of each of the specified numVariables three-byte sequences of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variables is undefined. The behavior is undefined unless 0 <= numValues and variables has sufficient capacity. Note that each of the values will be sign-extended.

◆ getArrayInt32()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getArrayInt32 ( int *  variables,
int  numVariables 
)

Assign to the specified variables the consecutive four-byte, two's complement integers (in host byte order) comprised of each of the specified numVariables four-byte sequences of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variables is undefined. The behavior is undefined unless 0 <= numVariables and variables has sufficient capacity. Note that each of the values will be sign-extended.

◆ getArrayInt40()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getArrayInt40 ( bsls::Types::Int64 variables,
int  numVariables 
)

Assign to the specified variables the consecutive five-byte, two's complement integers (in host byte order) comprised of each of the specified numVariables five-byte sequences of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variables is undefined. The behavior is undefined unless 0 <= numVariables and variables has sufficient capacity. Note that each of the values will be sign-extended.

◆ getArrayInt48()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getArrayInt48 ( bsls::Types::Int64 variables,
int  numVariables 
)

Assign to the specified variables the consecutive six-byte, two's complement integers (in host byte order) comprised of each of the specified numVariables six-byte sequences of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variables is undefined. The behavior is undefined unless 0 <= numVariables and variables has sufficient capacity. Note that each of the values will be sign-extended.

◆ getArrayInt56()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getArrayInt56 ( bsls::Types::Int64 variables,
int  numVariables 
)

Assign to the specified variables the consecutive seven-byte, two's complement integers (in host byte order) comprised of each of the specified numVariables seven-byte sequences of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variables is undefined. The behavior is undefined unless 0 <= numVariables and variables has sufficient capacity. Note that each of the values will be sign-extended.

◆ getArrayInt64()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getArrayInt64 ( bsls::Types::Int64 variables,
int  numVariables 
)

Assign to the specified variables the consecutive eight-byte, two's complement integers (in host byte order) comprised of each of the specified numVariables eight-byte sequences of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variables is undefined. The behavior is undefined unless 0 <= numVariables and variables has sufficient capacity. Note that each of the values will be sign-extended.

◆ getArrayInt8() [1/2]

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getArrayInt8 ( char *  variables,
int  numVariables 
)

Assign to the specified variables the consecutive one-byte, two's complement integers comprised of each of the specified numVariables one-byte sequences of this stream at the current cursor location, update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variables is undefined. The behavior is undefined unless 0 <= numVariables and variables has sufficient capacity. Note that each of the values will be sign-extended.

◆ getArrayInt8() [2/2]

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getArrayInt8 ( signed char *  variables,
int  numVariables 
)
inline

◆ getArrayUint16()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getArrayUint16 ( unsigned short *  variables,
int  numVariables 
)

Assign to the specified variables the consecutive two-byte, two's complement unsigned integers (in host byte order) comprised of each of the specified numVariables two-byte sequences of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variables is undefined. The behavior is undefined unless 0 <= numVariables and variables has sufficient capacity. Note that each of the values will be zero-extended.

◆ getArrayUint24()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getArrayUint24 ( unsigned int *  variables,
int  numVariables 
)

Assign to the specified variables the consecutive three-byte, two's complement unsigned integers (in host byte order) comprised of each of the specified numVariables three-byte sequences of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variables is undefined. The behavior is undefined unless 0 <= numVariables and variables has sufficient capacity. Note that each of the values will be zero-extended.

◆ getArrayUint32()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getArrayUint32 ( unsigned int *  variables,
int  numVariables 
)

Assign to the specified variables the consecutive four-byte, two's complement unsigned integers (in host byte order) comprised of each of the specified numVariables four-byte sequences of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variables is undefined. The behavior is undefined unless 0 <= numVariables and variables has sufficient capacity. Note that each of the values will be zero-extended.

◆ getArrayUint40()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getArrayUint40 ( bsls::Types::Uint64 variables,
int  numVariables 
)

Assign to the specified variables the consecutive five-byte, two's complement unsigned integers (in host byte order) comprised of each of the specified numVariables five-byte sequences of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variables is undefined. The behavior is undefined unless 0 <= numVariables and variables has sufficient capacity. Note that each of the values will be zero-extended.

◆ getArrayUint48()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getArrayUint48 ( bsls::Types::Uint64 variables,
int  numVariables 
)

Assign to the specified variables the consecutive six-byte, two's complement unsigned integers (in host byte order) comprised of each of the specified numVariables six-byte sequences of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variables is undefined. The behavior is undefined unless 0 <= numVariables and variables has sufficient capacity. Note that each of the values will be zero-extended.

◆ getArrayUint56()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getArrayUint56 ( bsls::Types::Uint64 variables,
int  numVariables 
)

Assign to the specified variables the consecutive seven-byte, two's complement unsigned integers (in host byte order) comprised of each of the specified numVariables seven-byte sequences of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variables is undefined. The behavior is undefined unless 0 <= numVariables and variables has sufficient capacity. Note that each of the values will be zero-extended.

◆ getArrayUint64()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getArrayUint64 ( bsls::Types::Uint64 variables,
int  numVariables 
)

Assign to the specified variables the consecutive eight-byte, two's complement unsigned integers (in host byte order) comprised of each of the specified numVariables eight-byte sequences of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variables is undefined. The behavior is undefined unless 0 <= numVariables and variables has sufficient capacity. Note that each of the values will be zero-extended.

◆ getArrayUint8() [1/2]

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getArrayUint8 ( char *  variables,
int  numVariables 
)
inline

Assign to the specified variables the consecutive one-byte, two's complement unsigned integers comprised of each of the specified numVariables one-byte sequences of this stream at the current cursor location, update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variables is undefined. The behavior is undefined unless 0 <= numVariables and variables has sufficient capacity. Note that each of the values will be zero-extended.

◆ getArrayUint8() [2/2]

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getArrayUint8 ( unsigned char *  variables,
int  numVariables 
)
inline

◆ getFloat32()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getFloat32 ( float &  variable)
inline

Assign to the specified variable the four-byte IEEE single-precision floating-point number (in host byte order) comprised of the four bytes of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variable is undefined.

◆ getFloat64()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getFloat64 ( double &  variable)
inline

Assign to the specified variable the eight-byte IEEE double-precision floating-point number (in host byte order) comprised of the eight bytes of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variable is undefined.

◆ getInt16()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getInt16 ( short &  variable)
inline

Assign to the specified variable the two-byte, two's complement integer (in host byte order) comprised of the two bytes of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variable is undefined. Note that the value will be sign-extended.

◆ getInt24()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getInt24 ( int &  variable)
inline

Assign to the specified variable the three-byte, two's complement integer (in host byte order) comprised of the three bytes of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variable is undefined. Note that the value will be sign-extended.

◆ getInt32()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getInt32 ( int &  variable)
inline

Assign to the specified variable the four-byte, two's complement integer (in host byte order) comprised of the four bytes of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variable is undefined. Note that the value will be sign-extended.

◆ getInt40()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getInt40 ( bsls::Types::Int64 variable)
inline

Assign to the specified variable the five-byte, two's complement integer (in host byte order) comprised of the five bytes of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variable is undefined. Note that the value will be sign-extended.

◆ getInt48()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getInt48 ( bsls::Types::Int64 variable)
inline

Assign to the specified variable the six-byte, two's complement integer (in host byte order) comprised of the six bytes of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variable is undefined. Note that the value will be sign-extended.

◆ getInt56()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getInt56 ( bsls::Types::Int64 variable)
inline

Assign to the specified variable the seven-byte, two's complement integer (in host byte order) comprised of the seven bytes of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variable is undefined. Note that the value will be sign-extended.

◆ getInt64()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getInt64 ( bsls::Types::Int64 variable)
inline

Assign to the specified variable the eight-byte, two's complement integer (in host byte order) comprised of the eight bytes of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variable is undefined. Note that the value will be sign-extended.

◆ getInt8() [1/2]

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getInt8 ( char &  variable)
inline

Assign to the specified variable the one-byte, two's complement integer comprised of the one byte of this stream at the current cursor location, update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variable is undefined. Note that the value will be sign-extended.

◆ getInt8() [2/2]

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getInt8 ( signed char &  variable)
inline

◆ getLength()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getLength ( int &  length)
inline

If the most-significant bit of the one byte of this stream at the current cursor location is set, assign to the specified length the four-byte, two's complement integer (in host byte order) comprised of the four bytes of this stream at the current cursor location (in network byte order) with the most-significant bit unset; otherwise, assign to length the one-byte, two's complement integer comprised of the one byte of this stream at the current cursor location. Update the cursor location and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of length is undefined. Note that the value will be zero-extended.

◆ getString()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getString ( bsl::string variable)

Assign to the specified variable the string comprised of the length of the string (see getLength) and the string data (see getUint8), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variable is undefined.

◆ getUint16()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getUint16 ( unsigned short &  variable)
inline

Assign to the specified variable the two-byte, two's complement unsigned integer (in host byte order) comprised of the two bytes of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variable is undefined. Note that the value will be zero-extended.

◆ getUint24()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getUint24 ( unsigned int &  variable)
inline

Assign to the specified variable the three-byte, two's complement unsigned integer (in host byte order) comprised of the three bytes of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variable is undefined. Note that the value will be zero-extended.

◆ getUint32()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getUint32 ( unsigned int &  variable)
inline

Assign to the specified variable the four-byte, two's complement unsigned integer (in host byte order) comprised of the four bytes of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variable is undefined. Note that the value will be zero-extended.

◆ getUint40()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getUint40 ( bsls::Types::Uint64 variable)
inline

Assign to the specified variable the five-byte, two's complement unsigned integer (in host byte order) comprised of the five bytes of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variable is undefined. Note that the value will be zero-extended.

◆ getUint48()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getUint48 ( bsls::Types::Uint64 variable)
inline

Assign to the specified variable the six-byte, two's complement unsigned integer (in host byte order) comprised of the six bytes of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variable is undefined. Note that the value will be zero-extended.

◆ getUint56()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getUint56 ( bsls::Types::Uint64 variable)
inline

Assign to the specified variable the seven-byte, two's complement unsigned integer (in host byte order) comprised of the seven bytes of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variable is undefined. Note that the value will be zero-extended.

◆ getUint64()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getUint64 ( bsls::Types::Uint64 variable)
inline

Assign to the specified variable the eight-byte, two's complement unsigned integer (in host byte order) comprised of the eight bytes of this stream at the current cursor location (in network byte order), update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variable is undefined. Note that the value will be zero-extended.

◆ getUint8() [1/2]

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getUint8 ( char &  variable)
inline

Assign to the specified variable the one-byte, two's complement unsigned integer comprised of the one byte of this stream at the current cursor location, update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of variable is undefined. Note that the value will be zero-extended.

◆ getUint8() [2/2]

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getUint8 ( unsigned char &  variable)
inline

◆ getVersion()

template<class STREAMBUF >
GenericInStream< STREAMBUF > & bslx::GenericInStream< STREAMBUF >::getVersion ( int &  version)
inline

Assign to the specified version the one-byte, two's complement unsigned integer comprised of the one byte of this stream at the current cursor location, update the cursor location, and return a reference to this stream. If this stream is initially invalid, this operation has no effect. If this function otherwise fails to extract a valid value, this stream is marked invalid and the value of version is undefined. Note that the value will be zero-extended.

◆ invalidate()

template<class STREAMBUF >
void bslx::GenericInStream< STREAMBUF >::invalidate ( )
inline

Put this input stream in an invalid state. This function has no effect if this stream is already invalid. Note that this function should be called whenever a value extracted from this stream is determined to be invalid, inconsistent, or otherwise incorrect.

◆ isValid()

template<class STREAMBUF >
bool bslx::GenericInStream< STREAMBUF >::isValid ( ) const
inline

Return true if this stream is valid, and false otherwise. An invalid stream is a stream in which insufficient or invalid data was detected during an extraction operation. Note that an empty stream will be valid unless an extraction attempt or explicit invalidation causes it to be otherwise.

◆ operator const void *()

template<class STREAMBUF >
bslx::GenericInStream< STREAMBUF >::operator const void * ( ) const
inline

Return a non-zero value if this stream is valid, and 0 otherwise. An invalid stream is a stream in which insufficient or invalid data was detected during an extraction operation. Note that an empty stream will be valid unless an extraction attempt or explicit invalidation causes it to be otherwise.


The documentation for this class was generated from the following file: