![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <QtCore/qfloat16.h>#include <QtCore/qglobal.h>#include <limits>#include <stdlib.h>#include <string.h>Go to the source code of this file.
Classes | |
| class | QSpecialInteger< S > |
| class | QLittleEndianStorageType< T > |
| class | QBigEndianStorageType< T > |
| class | QTypeInfo< QLEInteger< T > > |
| class | QTypeInfo< QBEInteger< T > > |
Typedefs | |
| template<typename T> | |
| using | QLEInteger = QSpecialInteger<QLittleEndianStorageType<T>> |
| Constructs a QLEInteger with the given value. | |
| template<typename T> | |
| using | QBEInteger = QSpecialInteger<QBigEndianStorageType<T>> |
| Constructs a QBEInteger with the given value. | |
| typedef QLEInteger< qint16 > | qint16_le |
| typedef QLEInteger< qint32 > | qint32_le |
| typedef QLEInteger< qint64 > | qint64_le |
| typedef QLEInteger< quint16 > | quint16_le |
| typedef QLEInteger< quint32 > | quint32_le |
| typedef QLEInteger< quint64 > | quint64_le |
| typedef QBEInteger< qint16 > | qint16_be |
| typedef QBEInteger< qint32 > | qint32_be |
| typedef QBEInteger< qint64 > | qint64_be |
| typedef QBEInteger< quint16 > | quint16_be |
| typedef QBEInteger< quint32 > | quint32_be |
| typedef QBEInteger< quint64 > | quint64_be |
Functions | |
| template<typename T> | |
| QT_BEGIN_NAMESPACE Q_ALWAYS_INLINE void | qToUnaligned (const T src, void *dest) |
| template<typename T> | |
| Q_ALWAYS_INLINE T | qFromUnaligned (const void *src) |
| \inmodule QtCore \title Endian Conversion Functions | |
| constexpr quint64 | qbswap_helper (quint64 sourcesource) |
| constexpr quint32 | qbswap_helper (quint32 sourcesource) |
| constexpr quint16 | qbswap_helper (quint16 sourcesource) |
| constexpr quint8 | qbswap_helper (quint8 sourcesource) |
| template<typename T, typename = std::enable_if_t<std::is_integral_v<T>>> | |
| constexpr T | qbswap (T sourcesource) |
| template<typename Float> | |
| Float | qbswapFloatHelper (Float sourcesource) |
| qfloat16 | qbswap (qfloat16 sourcesource) |
| float | qbswap (float sourcesource) |
| double | qbswap (double sourcesource) |
| template<typename T> | |
| void | qbswap (const T srcsrc, void *dest) |
| template<int Size> | |
| void * | qbswap (const void *sourcesource, qsizetype countcount, void *dest) noexcept |
| template<> | |
| void * | qbswap< 1 > (const void *sourcesource, qsizetype countcount, void *dest) noexcept |
| template<> | |
| Q_CORE_EXPORT void * | qbswap< 2 > (const void *sourcesource, qsizetype countcount, void *dest) noexcept |
| template<> | |
| Q_CORE_EXPORT void * | qbswap< 4 > (const void *sourcesource, qsizetype countcount, void *dest) noexcept |
| template<> | |
| Q_CORE_EXPORT void * | qbswap< 8 > (const void *sourcesource, qsizetype countcount, void *dest) noexcept |
| template<typename T> | |
| constexpr T | qToBigEndian (T sourcesource) |
| template<typename T> | |
| constexpr T | qFromBigEndian (T sourcesource) |
| template<typename T> | |
| constexpr T | qToLittleEndian (T sourcesource) |
| template<typename T> | |
| constexpr T | qFromLittleEndian (T sourcesource) |
| template<typename T> | |
| void | qToBigEndian (T srcsrc, void *dest) |
| template<typename T> | |
| void | qToLittleEndian (T srcsrc, void *dest) |
| template<typename T> | |
| void | qToBigEndian (const void *sourcesource, qsizetype countcount, void *dest) |
| template<typename T> | |
| void | qToLittleEndian (const void *sourcesource, qsizetype countcount, void *dest) |
| template<typename T> | |
| void | qFromBigEndian (const void *sourcesource, qsizetype countcount, void *dest) |
| template<typename T> | |
| void | qFromLittleEndian (const void *sourcesource, qsizetype countcount, void *dest) |
| template<typename T> | |
| T | qFromLittleEndian (const void *srcsrc) |
| template<> | |
| quint8 | qFromLittleEndian< quint8 > (const void *srcsrc) |
| template<> | |
| qint8 | qFromLittleEndian< qint8 > (const void *srcsrc) |
| template<class T> | |
| T | qFromBigEndian (const void *srcsrc) |
| template<> | |
| quint8 | qFromBigEndian< quint8 > (const void *srcsrc) |
| template<> | |
| qint8 | qFromBigEndian< qint8 > (const void *srcsrc) |
| using QBEInteger = QSpecialInteger<QBigEndianStorageType<T>> |
Constructs a QBEInteger with the given value.
| typedef QBEInteger<qint16> qint16_be |
| typedef QLEInteger<qint16> qint16_le |
| typedef QBEInteger<qint32> qint32_be |
| typedef QLEInteger<qint32> qint32_le |
| typedef QBEInteger<qint64> qint64_be |
| typedef QLEInteger<qint64> qint64_le |
| using QLEInteger = QSpecialInteger<QLittleEndianStorageType<T>> |
Constructs a QLEInteger with the given value.
| typedef QBEInteger<quint16> quint16_be |
| typedef QLEInteger<quint16> quint16_le |
| typedef QBEInteger<quint32> quint32_be |
| typedef QLEInteger<quint32> quint32_le |
| typedef QBEInteger<quint64> quint64_be |
| typedef QLEInteger<quint64> quint64_le |
|
inlineconstexpr |
|
noexcept |
Definition at line 865 of file qendian.cpp.
|
noexcept |
Definition at line 874 of file qendian.cpp.
|
noexcept |
Definition at line 883 of file qendian.cpp.
| Float qbswapFloatHelper | ( | Float | source | ) |
|
inline |
|
inlineconstexpr |
|
inline |
|
inline |
|
inline |
|
inlineconstexpr |
|
inline |
|
inline |
| Q_ALWAYS_INLINE T qFromUnaligned | ( | const void * | ptr | ) |
\inmodule QtCore \title Endian Conversion Functions
The <QtEndian> header provides functions to convert between little and big endian representations of numbers.
Loads a {T} from address ptr, which may be misaligned.
Use of this function avoids the undefined behavior that the C++ standard otherwise attributes to unaligned loads.
|
inlineconstexpr |
|
inlineconstexpr |
| QT_BEGIN_NAMESPACE Q_ALWAYS_INLINE void qToUnaligned | ( | const T | t, |
| void * | ptr ) |