|
Squid Web Cache master
|
#include <RandomUuid.h>
Public Types | |
| using | Serialized = std::array< uint8_t, 128/8 > |
| UUID representation independent of machine byte-order architecture. | |
Public Member Functions | |
| RandomUuid () | |
| creates a new unique ID (i.e. not a "nil UUID" in RFC 4122 terminology) | |
| RandomUuid (const Serialized &) | |
| imports a UUID value that was exported using the serialize() API | |
| RandomUuid (RandomUuid &&)=default | |
| RandomUuid & | operator= (RandomUuid &&)=default |
| RandomUuid & | operator= (const RandomUuid &)=delete |
| Serialized | serialize () const |
| exports UUID value; suitable for long-term storage | |
| bool | operator== (const RandomUuid &) const |
| bool | operator!= (const RandomUuid &other) const |
| RandomUuid | clone () const |
| creates a UUID object with the same value as this UUID | |
| void | print (std::ostream &os) const |
| writes a human-readable representation | |
Private Member Functions | |
| RandomUuid (const RandomUuid &)=default | |
| char * | raw () |
| read/write access to storage bytes | |
| const char * | raw () const |
| read-only access to storage bytes | |
| bool | sane () const |
| whether this (being constructed) object follows UUID version 4 variant 1 format | |
Private Attributes | |
| uint32_t | timeLow |
| uint16_t | timeMid |
| uint16_t | timeHiAndVersion |
| uint8_t | clockSeqHiAndReserved |
| uint8_t | clockSeqLow |
| uint8_t | node [6] |
128-bit Universally Unique IDentifier (UUID), version 4 (variant 1) as defined by RFC 4122. These UUIDs are generated from pseudo-random numbers.
Definition at line 17 of file RandomUuid.h.
| using RandomUuid::Serialized = std::array<uint8_t, 128/8> |
Definition at line 21 of file RandomUuid.h.
| RandomUuid::RandomUuid | ( | ) |
Definition at line 27 of file RandomUuid.cc.
References assert, clockSeqHiAndReserved, EBIT_CLR, EBIT_SET, RandomSeed64(), raw(), sane(), and timeHiAndVersion.
|
explicit |
Definition at line 55 of file RandomUuid.cc.
References Here, raw(), sane(), timeHiAndVersion, timeLow, and timeMid.
|
default |
|
privatedefault |
|
inline |
Definition at line 43 of file RandomUuid.h.
Referenced by serialize().
|
inline |
Definition at line 40 of file RandomUuid.h.
|
delete |
|
default |
| bool RandomUuid::operator== | ( | const RandomUuid & | other | ) | const |
Definition at line 106 of file RandomUuid.cc.
References raw().
| void RandomUuid::print | ( | std::ostream & | os | ) | const |
Definition at line 92 of file RandomUuid.cc.
References asHex(), clockSeqHiAndReserved, clockSeqLow, node, timeHiAndVersion, timeLow, and timeMid.
Referenced by operator<<().
|
inlineprivate |
Definition at line 52 of file RandomUuid.h.
Referenced by RandomUuid(), RandomUuid(), and operator==().
|
inlineprivate |
Definition at line 55 of file RandomUuid.h.
|
private |
Definition at line 68 of file RandomUuid.cc.
References clockSeqHiAndReserved, EBIT_TEST, and timeHiAndVersion.
Referenced by RandomUuid(), RandomUuid(), and serialize().
| RandomUuid::Serialized RandomUuid::serialize | ( | ) | const |
Definition at line 79 of file RandomUuid.cc.
References assert, clone(), sane(), timeHiAndVersion, timeLow, and timeMid.
Referenced by TestRandomUuid::testSerialization().
|
private |
Definition at line 68 of file RandomUuid.h.
Referenced by RandomUuid(), print(), and sane().
|
private |
Definition at line 69 of file RandomUuid.h.
Referenced by print().
|
private |
Definition at line 70 of file RandomUuid.h.
Referenced by print().
|
private |
Definition at line 67 of file RandomUuid.h.
Referenced by RandomUuid(), RandomUuid(), print(), sane(), and serialize().
|
private |
Definition at line 65 of file RandomUuid.h.
Referenced by RandomUuid(), print(), and serialize().
|
private |
Definition at line 66 of file RandomUuid.h.
Referenced by RandomUuid(), print(), and serialize().