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

(4af8a20e8e0384d3de4af6c2b47a0783ba28bbc3)

#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 22 of file quuid.cpp.

◆ anonymous enum [2/2]

anonymous enum
Enumerator
MaxStringUuidLength 
MaxStringUuidLength 

Definition at line 22 of file quuid.cpp.

Function Documentation

◆ _q_fromHex()

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

Definition at line 41 of file quuid.cpp.

◆ _q_toHex()

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

Definition at line 25 of file quuid.cpp.

◆ _q_uuidFromHex()

static 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 92 of file quuid.cpp.

◆ _q_uuidToHex()

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

Definition at line 57 of file quuid.cpp.

◆ createFromName()

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

Definition at line 123 of file quuid.cpp.

◆ qHash()

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

Definition at line 995 of file quuid.cpp.

◆ uuidFromString() [1/3]

static QUuid uuidFromString ( QLatin1StringView text)
staticnoexcept

Definition at line 514 of file quuid.cpp.

References MaxStringUuidLength.

◆ uuidFromString() [2/3]

static QUuid uuidFromString ( QStringView text)
staticnoexcept

Definition at line 498 of file quuid.cpp.

References MaxStringUuidLength.

◆ uuidFromString() [3/3]

static Q_ALWAYS_INLINE QUuid uuidFromString ( QUtf8StringView text)
staticnoexcept

Definition at line 527 of file quuid.cpp.

Variable Documentation

◆ QT_BEGIN_NAMESPACE

QT_BEGIN_NAMESPACE
related

Definition at line 18 of file quuid.cpp.