Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
quuid.cpp File Reference

(e94a951862b7860c15e219dce48e60c9dc1dc3d2)

#include "quuid.h"
#include "quuid_p.h"
#include "qcryptographichash.h"
#include "qdatastream.h"
#include "qdebug.h"
#include "qendian.h"
#include "qrandom.h"
#include "private/qtools_p.h"
Include dependency graph for quuid.cpp:

Go to the source code of this file.

Enumerations

enum  { MaxStringUuidLength = 38 , MaxStringUuidLength = 38 }
enum  { MaxStringUuidLength = 38 , 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 (QUuid ns, QByteArrayView baseData, QCryptographicHash::Algorithm algorithm, int version) noexcept
static QUuid uuidFromString (QStringView text) noexcept
static QUuid uuidFromString (QLatin1StringView text) noexcept
static Q_ALWAYS_INLINE QUuid uuidFromString (QUtf8StringView text) noexcept
size_t qHash (const QUuid &uuid, size_t seed) noexcept

Variables

 QT_BEGIN_NAMESPACE

Enumeration Type Documentation

◆ anonymous enum [1/2]

anonymous enum
Enumerator
MaxStringUuidLength 
MaxStringUuidLength 

Definition at line 23 of file quuid.cpp.

◆ anonymous enum [2/2]

anonymous enum
Enumerator
MaxStringUuidLength 
MaxStringUuidLength 

Definition at line 23 of file quuid.cpp.

Function Documentation

◆ _q_fromHex()

template<class Integral>
bool _q_fromHex ( const char *& src,
Integral & value )

Definition at line 42 of file quuid.cpp.

◆ _q_toHex()

template<class Integral>
void _q_toHex ( char *& dst,
Integral value )

Definition at line 26 of file quuid.cpp.

◆ _q_uuidFromHex()

Q_NEVER_INLINE QUuid _q_uuidFromHex ( const char * src)
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 93 of file quuid.cpp.

◆ _q_uuidToHex()

char * _q_uuidToHex ( const QUuid & uuid,
char * dst,
QUuid::StringFormat mode = QUuid::WithBraces )
static

Definition at line 58 of file quuid.cpp.

◆ createFromName()

QUuid createFromName ( QUuid ns,
QByteArrayView baseData,
QCryptographicHash::Algorithm algorithm,
int version )
staticnoexcept

Definition at line 124 of file quuid.cpp.

◆ qHash()

size_t qHash ( const QUuid & uuid,
size_t seed )
noexcept
Since
5.0 \qhashold{QUuid}

Definition at line 996 of file quuid.cpp.

◆ uuidFromString() [1/3]

QUuid uuidFromString ( QLatin1StringView text)
staticnoexcept

Definition at line 515 of file quuid.cpp.

References MaxStringUuidLength.

◆ uuidFromString() [2/3]

QUuid uuidFromString ( QStringView text)
staticnoexcept

Definition at line 499 of file quuid.cpp.

References MaxStringUuidLength.

◆ uuidFromString() [3/3]

Q_ALWAYS_INLINE QUuid uuidFromString ( QUtf8StringView text)
staticnoexcept

Definition at line 528 of file quuid.cpp.

Variable Documentation

◆ QT_BEGIN_NAMESPACE

QT_BEGIN_NAMESPACE
related

Definition at line 19 of file quuid.cpp.