|
Sen API
Sen Libraries
|
Universal Unique Identifier. More...
#include <uuid.h>
Public Member Functions | |
| constexpr | Uuid () noexcept=default |
| constexpr | Uuid (uint64_t hi, uint64_t lo) noexcept |
| Construct it from two consecutive 64-bit integers. Does not validate the data. | |
| Uuid (Span< const uint8_t > bytes) noexcept | |
| Construct it from an array of bytes. Does not validate the data. | |
| ~Uuid ()=default | |
| constexpr bool | isNil () const noexcept |
| True if all zeroes. | |
| constexpr UuidVariant | getVariant () const noexcept |
| The variant of the UUID according to the spec. | |
| constexpr UuidVersion | getVersion () const noexcept |
| The version of the UUID according to the spec. | |
| constexpr uint64_t | getHash () const noexcept |
| Computes a 64-bit hash of the UUID. | |
| constexpr uint32_t | getHash32 () const noexcept |
| Computes a 32-bit hash of the UUID. | |
| std::array< uint8_t, byteCount > | bytes () const noexcept |
| std::string | toString () const |
| Builds a string out of this UUID. | |
| bool | isValid (std::string_view s) noexcept |
| True if the UUID is well-formed. | |
| Uuid | fromString (std::string_view s) noexcept |
| Parses a string and generates a UUD. Returns a Nil UUID in case of error. | |
| void | copy (std::array< uint8_t, byteCount > &arr) const |
| Copy this std::array of bytes into the UUID. | |
| void | copy (StaticVector< uint8_t, byteCount > &vec) const |
| Copy this StaticVector of bytes into the UUID. | |
| void | swap (Uuid &other) noexcept |
| Swap the internal data. | |
Static Public Attributes | |
| static constexpr std::size_t | byteCount = 16 |
Friends | |
| constexpr bool | operator== (const Uuid &lhs, const Uuid &rhs) |
| constexpr bool | operator!= (const Uuid &lhs, const Uuid &rhs) |
| constexpr bool | operator< (const Uuid &lhs, const Uuid &rhs) |
Universal Unique Identifier.