<QtEndian> - Endian Conversion Functions▲
-
Header: QtEndian
-
Group: <QtEndian> is part of funclists
Detailed Description▲
Type Documentation▲
[since 5.10] qint16_be▲
Typedef for QBEInteger<qint16>. This type is guaranteed to be stored in memory as a 16-bit big-endian signed integer on all platforms supported by Qt.
This typedef was introduced in Qt 5.10.
See Also▲
See also qint16
[since 5.10] qint16_le▲
Typedef for QLEInteger<qint16>. This type is guaranteed to be stored in memory as a 16-bit little-endian signed integer on all platforms supported by Qt.
This typedef was introduced in Qt 5.10.
See Also▲
See also qint16
[since 5.10] qint32_be▲
Typedef for QBEInteger<qint32>. This type is guaranteed to be stored in memory as a 32-bit big-endian signed integer on all platforms supported by Qt.
This typedef was introduced in Qt 5.10.
See Also▲
See also qint32
[since 5.10] qint32_le▲
Typedef for QLEInteger<qint32>. This type is guaranteed to be stored in memory as a 32-bit little-endian signed integer on all platforms supported by Qt.
This typedef was introduced in Qt 5.10.
See Also▲
See also qint32
[since 5.10] qint64_be▲
Typedef for QBEInteger<qint64>. This type is guaranteed to be stored in memory as a 64-bit big-endian signed integer on all platforms supported by Qt.
This typedef was introduced in Qt 5.10.
See Also▲
See also qint64
[since 5.10] qint64_le▲
Typedef for QLEInteger<qint64>. This type is guaranteed to be stored in memory as a 64-bit little-endian signed integer on all platforms supported by Qt.
This typedef was introduced in Qt 5.10.
See Also▲
See also qint64
[since 5.10] quint16_be▲
Typedef for QBEInteger<quint16>. This type is guaranteed to be stored in memory as a 16-bit big-endian unsigned integer on all platforms supported by Qt.
This typedef was introduced in Qt 5.10.
See Also▲
See also quint16
[since 5.10] quint16_le▲
Typedef for QLEInteger<quint16>. This type is guaranteed to be stored in memory as a 16-bit little-endian unsigned integer on all platforms supported by Qt.
This typedef was introduced in Qt 5.10.
See Also▲
See also quint16
[since 5.10] quint32_be▲
Typedef for QBEInteger<quint32>. This type is guaranteed to be stored in memory as a 32-bit big-endian unsigned integer on all platforms supported by Qt.
This typedef was introduced in Qt 5.10.
See Also▲
See also quint32
[since 5.10] quint32_le▲
Typedef for QLEInteger<quint32>. This type is guaranteed to be stored in memory as a 32-bit little-endian unsigned integer on all platforms supported by Qt.
This typedef was introduced in Qt 5.10.
See Also▲
See also quint32
[since 5.10] quint64_be▲
Typedef for QBEInteger<quint64>. This type is guaranteed to be stored in memory as a 64-bit big-endian unsigned integer on all platforms supported by Qt.
This typedef was introduced in Qt 5.10.
See Also▲
See also quint64
[since 5.10] quint64_le▲
Typedef for QLEInteger<quint64>. This type is guaranteed to be stored in memory as a 64-bit little-endian unsigned integer on all platforms supported by Qt.
This typedef was introduced in Qt 5.10.
See Also▲
See also quint64
Function Documentation▲
[since 4.3] T qFromBigEndian(const void *src)▲
Reads a big-endian number from memory location src and returns the number in the host byte order representation. On CPU architectures where the host byte order is little-endian (such as x86) this will swap the byte order; otherwise it will just read from src.
Template type T can either be a qint16, qint32 or qint64. Other types of integers, e.g., qlong, are not applicable.
Since Qt 5.7, the type of the src parameter is a void pointer.
There are no data alignment constraints for src.
This function was introduced in Qt 4.3.
See Also▲
See also qFromLittleEndian(), qToBigEndian(), qToLittleEndian()
[since 4.3] T qFromBigEndian(T src)▲
This is an overloaded function.
Converts src from big-endian byte order and returns the number in host byte order representation of that number. On CPU architectures where the host byte order is little-endian (such as x86) this will return src with the byte order swapped; otherwise it will return src unmodified.
This function was introduced in Qt 4.3.
[since 4.3] T qFromLittleEndian(const void *src)▲
Reads a little-endian number from memory location src and returns the number in the host byte order representation. On CPU architectures where the host byte order is big-endian (such as PowerPC) this will swap the byte order; otherwise it will just read from src.
Template type T can either be a qint16, qint32 or qint64. Other types of integers, e.g., qlong, are not applicable.
Since Qt 5.7, the type of the src parameter is a void pointer.
There are no data alignment constraints for src.
This function was introduced in Qt 4.3.
See Also▲
See also qFromBigEndian(), qToBigEndian(), qToLittleEndian()
[since 4.3] T qFromLittleEndian(T src)▲
This is an overloaded function.
Converts src from little-endian byte order and returns the number in host byte order representation of that number. On CPU architectures where the host byte order is big-endian (such as PowerPC) this will return src with the byte order swapped; otherwise it will return src unmodified.
This function was introduced in Qt 4.3.
[since 4.3] void qToBigEndian(T src, void *dest)▲
Writes the number src with template type T to the memory location at dest in big-endian byte order.
Note that template type T can only be an integer data type (signed or unsigned).
There are no data alignment constraints for dest.
Since Qt 5.7, the type of the dest parameter is a void pointer.
This function was introduced in Qt 4.3.
See Also▲
See also qFromBigEndian(), qFromLittleEndian(), qToLittleEndian()
[since 4.3] T qToBigEndian(T src)▲
This is an overloaded function.
Converts src from host byte order and returns the number in big-endian byte order representation of that number. On CPU architectures where the host byte order is little-endian (such as x86) this will return src with the byte order swapped; otherwise it will return src unmodified.
This function was introduced in Qt 4.3.
[since 4.3] void qToLittleEndian(T src, void *dest)▲
Writes the number src with template type T to the memory location at dest in little-endian byte order.
Note that template type T can only be an integer data type (signed or unsigned).
There are no data alignment constraints for dest.
Since Qt 5.7, the type of the dest parameter is a void pointer.
This function was introduced in Qt 4.3.
See Also▲
See also qFromBigEndian(), qFromLittleEndian(), qToBigEndian()
[since 4.3] T qToLittleEndian(T src)▲
This is an overloaded function.
Converts src from host byte order and returns the number in little-endian byte order representation of that number. On CPU architectures where the host byte order is big-endian (such as PowerPC) this will return src with the byte order swapped; otherwise it will return src unmodified.
This function was introduced in Qt 4.3.