#include "quuid.h"
#include "qdatastream.h"
#include "qendian.h"
#include "qdatetime.h"
#include "qfile.h"
#include "qthreadstorage.h"
#include <stdlib.h>
Go to the source code of this file.
|
template<class Char , class Integral > |
bool | _q_fromHex (const Char *&src, Integral &value) |
|
template<class Char , class Integral > |
void | _q_toHex (Char *&dst, Integral value) |
|
template<class Char > |
bool | _q_uuidFromHex (const Char *&src, uint &d1, ushort &d2, ushort &d3, uchar(&d4)[8]) |
|
template<class Char > |
void | _q_uuidToHex (Char *&dst, const uint &d1, const ushort &d2, const ushort &d3, const uchar(&d4)[8]) |
|
| Q_GLOBAL_STATIC (QThreadStorage< QFile *>, devUrandomStorage) |
|
◆ ISLESS
#define ISLESS |
( |
|
f1, |
|
|
|
f2 |
|
) |
| if (f1!=f2) return (f1<f2); |
◆ ISMORE
#define ISMORE |
( |
|
f1, |
|
|
|
f2 |
|
) |
| if (f1!=f2) return (f1>f2); |
◆ _q_fromHex()
template<class Char , class Integral >
bool _q_fromHex |
( |
const Char *& |
src, |
|
|
Integral & |
value |
|
) |
| |
Definition at line 68 of file quuid.cpp.
Referenced by _q_uuidFromHex().
72 for (
uint i = 0; i <
sizeof(Integral) * 2; ++i) {
75 if (ch >=
'0' && ch <=
'9')
77 else if (ch >=
'a' && ch <=
'f')
79 else if (ch >=
'A' && ch <=
'F')
84 value = value * 16 + tmp;
◆ _q_toHex()
template<class Char , class Integral >
void _q_toHex |
( |
Char *& |
dst, |
|
|
Integral |
value |
|
) |
| |
Definition at line 51 of file quuid.cpp.
Referenced by _q_uuidToHex().
53 static const char digits[] =
"0123456789abcdef";
57 const char* p =
reinterpret_cast<const char*
>(&value);
59 for (
uint i = 0; i <
sizeof(Integral); ++i, dst += 2) {
60 uint j = (p[i] >> 4) & 0xf;
61 dst[0] =
Char(digits[j]);
63 dst[1] =
Char(digits[j]);
◆ _q_uuidFromHex()
Definition at line 109 of file quuid.cpp.
Referenced by QUuid::QUuid().
111 if (*src ==
Char(
'{'))
114 || *src++ !=
Char(
'-')
116 || *src++ !=
Char(
'-')
118 || *src++ !=
Char(
'-')
121 || *src++ !=
Char(
'-')
bool _q_fromHex(const Char *&src, Integral &value)
◆ _q_uuidToHex()
◆ Q_GLOBAL_STATIC()