![]() |
Qt 6.x
The Qt SDK
|
#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) |
constexpr quint64 | qbswap_helper (quint64 source) |
constexpr quint32 | qbswap_helper (quint32 source) |
constexpr quint16 | qbswap_helper (quint16 source) |
constexpr quint8 | qbswap_helper (quint8 source) |
template<typename T , typename = std::enable_if_t<std::is_integral_v<T>>> | |
constexpr T | qbswap (T source) |
template<typename Float > | |
Float | qbswapFloatHelper (Float source) |
qfloat16 | qbswap (qfloat16 source) |
float | qbswap (float source) |
double | qbswap (double source) |
template<typename T > | |
void | qbswap (const T src, void *dest) |
template<int Size> | |
void * | qbswap (const void *source, qsizetype count, void *dest) noexcept |
template<> | |
void * | qbswap< 1 > (const void *source, qsizetype count, void *dest) noexcept |
template<> | |
Q_CORE_EXPORT void * | qbswap< 2 > (const void *source, qsizetype count, void *dest) noexcept |
template<> | |
Q_CORE_EXPORT void * | qbswap< 4 > (const void *source, qsizetype count, void *dest) noexcept |
template<> | |
Q_CORE_EXPORT void * | qbswap< 8 > (const void *source, qsizetype count, void *dest) noexcept |
template<typename T > | |
constexpr T | qToBigEndian (T source) |
template<typename T > | |
constexpr T | qFromBigEndian (T source) |
template<typename T > | |
constexpr T | qToLittleEndian (T source) |
template<typename T > | |
constexpr T | qFromLittleEndian (T source) |
template<typename T > | |
void | qToBigEndian (T src, void *dest) |
template<typename T > | |
void | qToLittleEndian (T src, void *dest) |
template<typename T > | |
void | qToBigEndian (const void *source, qsizetype count, void *dest) |
template<typename T > | |
void | qToLittleEndian (const void *source, qsizetype count, void *dest) |
template<typename T > | |
void | qFromBigEndian (const void *source, qsizetype count, void *dest) |
template<typename T > | |
void | qFromLittleEndian (const void *source, qsizetype count, void *dest) |
template<typename T > | |
T | qFromLittleEndian (const void *src) |
template<> | |
quint8 | qFromLittleEndian< quint8 > (const void *src) |
template<> | |
qint8 | qFromLittleEndian< qint8 > (const void *src) |
template<class T > | |
T | qFromBigEndian (const void *src) |
template<> | |
quint8 | qFromBigEndian< quint8 > (const void *src) |
template<> | |
qint8 | qFromBigEndian< qint8 > (const void *src) |
template< typename T > QBEInteger::QBEInteger |
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 |
template< typename T > QLEInteger::QLEInteger |
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 |
|
inline |
Definition at line 145 of file qendian.h.
References qbswapFloatHelper().
|
inline |
Definition at line 140 of file qendian.h.
References qbswapFloatHelper().
Definition at line 135 of file qendian.h.
References qbswapFloatHelper().
|
inlineconstexpr |
Definition at line 103 of file qendian.h.
References qbswap_helper().
Referenced by bswapLoop(), QFontEngineFT::loadGlyph(), QDataStream::operator<<(), QDataStream::operator<<(), QDataStream::operator<<(), QDataStream::operator<<(), QDataStream::operator<<(), QDataStream::operator>>(), QDataStream::operator>>(), QDataStream::operator>>(), QDataStream::operator>>(), QDataStream::operator>>(), qbswap(), qbswapFloatHelper(), qFromLittleEndian(), qt_xcb_imageFormatForVisual(), and qToLittleEndian().
|
noexcept |
Definition at line 860 of file qendian.cpp.
|
noexcept |
Definition at line 869 of file qendian.cpp.
|
noexcept |
Definition at line 878 of file qendian.cpp.
Definition at line 62 of file qendian.h.
References Q_UINT64_C.
Referenced by qbswap().
|
inline |
Definition at line 238 of file qendian.h.
References qFromBigEndian().
|
inlineconstexpr |
Definition at line 174 of file qendian.h.
Referenced by QResponseApdu::QResponseApdu(), LeCmacCalculator::calculateMac(), QHostAddressPrivate::classify(), QBigEndianStorageType< T >::fromSpecial(), QMimeBinaryProvider::CacheFile::getUint16(), QMimeBinaryProvider::CacheFile::getUint32(), nameToOSType(), QTlsPrivate::X509CertificateGeneric::parse(), qFromBigEndian(), qt_memfill24(), and QTlsPrivate::X509CertificateOpenSSL::subjectAlternativeNames().
|
inline |
|
inline |
|
inline |
Definition at line 224 of file qendian.h.
References qFromLittleEndian().
|
inlineconstexpr |
Definition at line 178 of file qendian.h.
References qbswap().
Referenced by QLittleEndianStorageType< T >::fromSpecial(), qFromLittleEndian(), and qStringFromUcs2Le().
|
inline |
|
inline |
Q_ALWAYS_INLINE T qFromUnaligned | ( | const void * | src | ) |
|
inlineconstexpr |
Definition at line 172 of file qendian.h.
Referenced by _q_toHex(), Http2::FrameWriter::append(), bindFont(), DarwinBluetooth::cb_uuid(), QUtf16::convertFromUnicode(), QUtf32::convertFromUnicode(), QPasswordDigestor::deriveKeyPbkdf2(), QStringConverter::encodingForData(), QHostAddress::isInSubnet(), QV4::DataViewPrototype::method_setFloat(), nameFromOSType(), QTtfStream::operator<<(), QTtfStream::operator<<(), QTtfStream::operator<<(), QTtfStream::operator<<(), QTtfStream::operator<<(), QHostAddress::operator==(), QByteArray::qCompress(), QNetmask::setAddress(), QHostAddressPrivate::setAddress(), Http2::FrameWriter::start(), QUuid::toBytes(), and QBigEndianStorageType< T >::toSpecial().
|
inlineconstexpr |
Definition at line 176 of file qendian.h.
References qbswap().
Referenced by connectionUpdateData(), QUtf16::convertFromUnicode(), QUtf32::convertFromUnicode(), QStringConverter::encodingForData(), QV4::DataViewPrototype::method_setFloat(), QWinRTLowEnergyServiceHandler::obtainCharList(), QUuid::operator<<(), putBtData(), qStringAsUcs2Le(), QPacketProtocol::send(), HciManager::sendConnectionParameterUpdateRequest(), HciManager::sendConnectionUpdateCommand(), and QLittleEndianStorageType< T >::toSpecial().
Stores t to address ptr, which may be misaligned.
Use of this function avoids the undefined behavior that the C++ standard otherwise attributes to unaligned stores.
Definition at line 34 of file qendian.h.
Referenced by QNfcTagType4NdefFsm::getCommand(), and qt_to_latin1_internal().