UUIDv4 (random 128-bits) RFC-4122.
More...
#include "uuid.hpp"
|
| UUID () |
| Default constructor.
|
|
| UUID (const UUID &other) |
|
| UUID (__m128i uuid) |
| Constructs an UUID from a 128-bits unsigned int.
|
|
| UUID (uint64_t x, uint64_t y) |
| Constructs an UUID from two 64-bit integers.
|
|
| UUID (const uint8_t *bytes) |
| Constructs an UUID from a byte array.
|
|
| UUID (const std::string &bytes) |
| Constructs an UUID from a byte string.
|
|
void | fromStr (const char *raw) |
|
UUID & | operator= (const UUID &other) |
| Assignment operator.
|
|
std::string | bytes () const |
| Serializes the UUID to a byte string (16 bytes).
|
|
void | bytes (std::string &out) const |
|
void | bytes (char *bytes) const |
|
std::string | str () const |
| Converts the UUID to its string representation.
|
|
void | str (std::string &s) const |
|
void | str (char *res) const |
|
size_t | hash () const |
|
UUIDv4 (random 128-bits) RFC-4122.
Definition at line 105 of file uuid.hpp.
◆ UUID() [1/6]
mal_toolkit::uuid::UUID::UUID |
( |
| ) |
|
|
inline |
Default constructor.
Definition at line 111 of file uuid.hpp.
◆ UUID() [2/6]
mal_toolkit::uuid::UUID::UUID |
( |
const UUID & | other | ) |
|
|
inline |
◆ UUID() [3/6]
mal_toolkit::uuid::UUID::UUID |
( |
__m128i | uuid | ) |
|
|
inline |
Constructs an UUID from a 128-bits unsigned int.
Definition at line 122 of file uuid.hpp.
◆ UUID() [4/6]
mal_toolkit::uuid::UUID::UUID |
( |
uint64_t | x, |
|
|
uint64_t | y ) |
|
inline |
Constructs an UUID from two 64-bit integers.
Definition at line 127 of file uuid.hpp.
◆ UUID() [5/6]
mal_toolkit::uuid::UUID::UUID |
( |
const uint8_t * | bytes | ) |
|
|
inline |
Constructs an UUID from a byte array.
Definition at line 136 of file uuid.hpp.
◆ UUID() [6/6]
mal_toolkit::uuid::UUID::UUID |
( |
const std::string & | bytes | ) |
|
|
inlineexplicit |
Constructs an UUID from a byte string.
Definition at line 145 of file uuid.hpp.
◆ bytes() [1/3]
std::string mal_toolkit::uuid::UUID::bytes |
( |
| ) |
const |
|
inline |
Serializes the UUID to a byte string (16 bytes).
Definition at line 206 of file uuid.hpp.
◆ bytes() [2/3]
void mal_toolkit::uuid::UUID::bytes |
( |
char * | bytes | ) |
const |
|
inline |
◆ bytes() [3/3]
void mal_toolkit::uuid::UUID::bytes |
( |
std::string & | out | ) |
const |
|
inline |
◆ fromStr()
void mal_toolkit::uuid::UUID::fromStr |
( |
const char * | raw | ) |
|
|
inline |
◆ fromStrFactory() [1/2]
static UUID mal_toolkit::uuid::UUID::fromStrFactory |
( |
const char * | raw | ) |
|
|
inlinestatic |
◆ fromStrFactory() [2/2]
static UUID mal_toolkit::uuid::UUID::fromStrFactory |
( |
const std::string & | s | ) |
|
|
inlinestatic |
Static factory to parse an UUID from its string representation.
Definition at line 154 of file uuid.hpp.
◆ hash()
size_t mal_toolkit::uuid::UUID::hash |
( |
| ) |
const |
|
inline |
◆ operator=()
UUID & mal_toolkit::uuid::UUID::operator= |
( |
const UUID & | other | ) |
|
|
inline |
Assignment operator.
Definition at line 163 of file uuid.hpp.
◆ str() [1/3]
std::string mal_toolkit::uuid::UUID::str |
( |
| ) |
const |
|
inline |
Converts the UUID to its string representation.
Definition at line 228 of file uuid.hpp.
◆ str() [2/3]
void mal_toolkit::uuid::UUID::str |
( |
char * | res | ) |
const |
|
inline |
◆ str() [3/3]
void mal_toolkit::uuid::UUID::str |
( |
std::string & | s | ) |
const |
|
inline |
◆ operator!=
◆ operator<
Less than comparison operator.
Definition at line 189 of file uuid.hpp.
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & | stream, |
|
|
const UUID & | uuid ) |
|
friend |
◆ operator<=
◆ operator==
Equality comparison operator.
Definition at line 177 of file uuid.hpp.
◆ operator>
◆ operator>=
◆ operator>>
std::istream & operator>> |
( |
std::istream & | stream, |
|
|
UUID & | uuid ) |
|
friend |
◆ data
uint8_t mal_toolkit::uuid::UUID::data[16] |
|
private |
The documentation for this class was generated from the following file:
- third_party/mal-toolkit/mal-toolkit/mal-toolkit/uuid.hpp