9#pragma qt_class(QtEndian)
12#include <QtCore/qfloat16.h>
13#include <QtCore/qglobal.h>
38 const size_t size =
sizeof(T);
39#if __has_builtin(__builtin_memcpy)
50 const size_t size =
sizeof(T);
51#if __has_builtin(__builtin_memcpy)
78 | ((
source & 0x000000ff) << 24)
79 | ((
source & 0x0000ff00) << 8)
80 | ((
source & 0x00ff0000) >> 8)
81 | ((
source & 0xff000000) >> 24);
88 | ((
source & 0xff00) >> 8) );
102template <
typename T,
typename = std::enable_if_t<std::is_
integral_v<T>>>
108#ifdef __SIZEOF_INT128__
126template<
typename Float>
130 auto temp = qFromUnaligned<typename QIntegerForSizeof<Float>::Unsigned>(&
source);
132 return qFromUnaligned<Float>(&temp);
156template <
typename T>
inline void qbswap(
const T
src,
void *dest)
170#if Q_BYTE_ORDER == Q_BIG_ENDIAN
181{ qToUnaligned<T>(
src, dest); }
183{ qbswap<T>(
src, dest); }
204{ qbswap<T>(
src, dest); }
206{ qToUnaligned<T>(
src, dest); }
230{
return static_cast<const quint8 *
>(
src)[0]; }
232{
return static_cast<const qint8 *
>(
src)[0]; }
244{
return static_cast<const quint8 *
>(
src)[0]; }
246{
return static_cast<const qint8 *
>(
src)[0]; }
251 typedef typename S::StorageType T;
258 operator T()
const {
return S::fromSpecial(
val); }
264 {
return (*
this = S::fromSpecial(
val) +
i); }
266 {
return (*
this = S::fromSpecial(
val) -
i); }
268 {
return (*
this = S::fromSpecial(
val) *
i); }
270 {
return (*
this = S::fromSpecial(
val) >>
i); }
272 {
return (*
this = S::fromSpecial(
val) <<
i); }
274 {
return (*
this = S::fromSpecial(
val) /
i); }
276 {
return (*
this = S::fromSpecial(
val) %
i); }
278 {
return (*
this = S::fromSpecial(
val) |
i); }
280 {
return (*
this = S::fromSpecial(
val) &
i); }
282 {
return (*
this = S::fromSpecial(
val) ^
i); }
284 {
return (*
this = S::fromSpecial(
val) + 1); }
286 {
return (*
this = S::fromSpecial(
val) - 1); }
static constexpr T fromSpecial(T source)
static constexpr T toSpecial(T source)
static constexpr T fromSpecial(T source)
static constexpr T toSpecial(T source)
bool operator!=(QSpecialInteger< S > i) const
static constexpr QSpecialInteger max()
QSpecialInteger & operator>>=(T i)
constexpr QSpecialInteger(T i)
QSpecialInteger & operator<<=(T i)
QSpecialInteger & operator++()
bool operator==(QSpecialInteger< S > i) const
QSpecialInteger & operator=(T i)
QSpecialInteger & operator&=(T i)
QSpecialInteger & operator+=(T i)
QSpecialInteger & operator|=(T i)
QSpecialInteger & operator--()
QSpecialInteger & operator*=(T i)
QSpecialInteger & operator^=(T i)
QSpecialInteger()=default
QSpecialInteger & operator%=(T i)
QSpecialInteger & operator/=(T i)
static constexpr QSpecialInteger min()
QSpecialInteger & operator-=(T i)
\keyword 16-bit Floating Point Support\inmodule QtCore \inheaderfile QFloat16
Combined button and popup list for selecting options.
constexpr const T & min(const T &a, const T &b)
constexpr bool operator!=(const timespec &t1, const timespec &t2)
constexpr timespec & operator+=(timespec &t1, const timespec &t2)
QBEInteger< quint64 > quint64_be
quint8 qFromLittleEndian< quint8 >(const void *src)
QLEInteger< qint64 > qint64_le
QBEInteger< qint32 > qint32_be
QLEInteger< qint32 > qint32_le
Q_CORE_EXPORT void * qbswap< 4 >(const void *source, qsizetype count, void *dest) noexcept
void * qbswap< 1 >(const void *source, qsizetype count, void *dest) noexcept
QBEInteger< qint64 > qint64_be
QLEInteger< quint32 > quint32_le
QLEInteger< quint64 > quint64_le
constexpr quint64 qbswap_helper(quint64 source)
constexpr T qbswap(T source)
Q_CORE_EXPORT void * qbswap< 2 >(const void *source, qsizetype count, void *dest) noexcept
QBEInteger< quint32 > quint32_be
constexpr T qFromLittleEndian(T source)
constexpr T qToBigEndian(T source)
QLEInteger< quint16 > quint16_le
QLEInteger< qint16 > qint16_le
constexpr T qFromBigEndian(T source)
Q_CORE_EXPORT void * qbswap< 8 >(const void *source, qsizetype count, void *dest) noexcept
QT_BEGIN_NAMESPACE Q_ALWAYS_INLINE void qToUnaligned(const T src, void *dest)
qint8 qFromBigEndian< qint8 >(const void *src)
QBEInteger< qint16 > qint16_be
Q_ALWAYS_INLINE T qFromUnaligned(const void *src)
quint8 qFromBigEndian< quint8 >(const void *src)
QBEInteger< quint16 > quint16_be
constexpr T qToLittleEndian(T source)
qint8 qFromLittleEndian< qint8 >(const void *src)
Float qbswapFloatHelper(Float source)
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLenum GLsizei count
GLsizei GLsizei GLchar * source
bool operator==(const QRandomGenerator &rng1, const QRandomGenerator &rng2)
unsigned long long quint64
QT_BEGIN_NAMESPACE typedef signed char qint8
QUrl::FormattingOptions & operator|=(QUrl::FormattingOptions &i, QUrl::ComponentFormattingOptions f)