![]() |
Qt 6.x
The Qt SDK
|
#include "quuid.h"
#include "qcryptographichash.h"
#include "qdatastream.h"
#include "qdebug.h"
#include "qendian.h"
#include "qrandom.h"
#include "private/qtools_p.h"
Go to the source code of this file.
Macros | |
#define | ISLESS(f1, f2) if (f1!=f2) return (f1<f2); |
Enumerations | |
enum | { MaxStringUuidLength = 38 } |
Functions | |
template<class Integral > | |
void | _q_toHex (char *&dst, Integral value) |
template<class Integral > | |
bool | _q_fromHex (const char *&src, Integral &value) |
static char * | _q_uuidToHex (const QUuid &uuid, char *dst, QUuid::StringFormat mode=QUuid::WithBraces) |
static Q_NEVER_INLINE QUuid | _q_uuidFromHex (const char *src) |
static QUuid | createFromName (const QUuid &ns, const QByteArray &baseData, QCryptographicHash::Algorithm algorithm, int version) |
static QUuid | uuidFromString (QStringView text) noexcept |
static QUuid | uuidFromString (QLatin1StringView text) noexcept |
static Q_ALWAYS_INLINE QUuid | uuidFromString (QUtf8StringView text) noexcept |
Variables | |
QT_BEGIN_NAMESPACE | |
bool _q_fromHex | ( | const char *& | src, |
Integral & | value | ||
) |
Definition at line 37 of file quuid.cpp.
References ch, QtMiscUtils::fromHex(), and i.
Referenced by _q_uuidFromHex().
void _q_toHex | ( | char *& | dst, |
Integral | value | ||
) |
Definition at line 24 of file quuid.cpp.
References i, qToBigEndian(), and QtMiscUtils::toHexLower().
Referenced by _q_uuidToHex().
|
static |
Parses the string representation of a UUID (with optional surrounding "{}") by reading at most MaxStringUuidLength (38) characters from src, which may be \nullptr. Stops at the first invalid character (which includes a premature NUL).
Returns the successfully parsed QUuid, or a null QUuid in case of failure.
Definition at line 88 of file quuid.cpp.
References _q_fromHex(), d1, d2, and Q_LIKELY.
Referenced by uuidFromString(), and uuidFromString().
|
static |
Definition at line 53 of file quuid.cpp.
References _q_toHex(), QUuid::data1, QUuid::data2, QUuid::data3, QUuid::data4, i, QUuid::Id128, and QUuid::WithoutBraces.
Referenced by QUuid::toByteArray(), and QUuid::toString().
|
static |
Definition at line 119 of file quuid.cpp.
References QUuid::fromRfc4122(), hash, Q_ASSERT, QByteArrayView::size(), and QByteArrayView::truncate().
Referenced by QUuid::createUuidV3(), and QUuid::createUuidV5().
|
staticnoexcept |
Definition at line 457 of file quuid.cpp.
References _q_uuidFromHex(), QString::data(), QString::front(), MaxStringUuidLength, Q_UNLIKELY, QString::size(), and text.
|
staticnoexcept |
Definition at line 441 of file quuid.cpp.
References _q_uuidFromHex(), ch, MaxStringUuidLength, QString::size(), text, and QString::truncate().
Referenced by QUuid::fromString(), and uuidFromString().
|
staticnoexcept |
Definition at line 470 of file quuid.cpp.
References QString::data(), QString::size(), text, and uuidFromString().