uuid
| Type | Class |
| Namespace | conjure::core |
| Include File Path | engine/include/conjure/core/uuid.h |
| Source File Path | engine/src/core/foundation/uuid.cpp |
| API ↗ | Data types |
Syntax
Constructors
| Access | Signature | Description |
|---|---|---|
| public | constexpr uuid() noexcept = default; | |
| public | constexpr uuid(
u64 high,
u64 low) noexcept; | Builds an identifier from its two 64-bit halves (most significant first). |
Variables
| Access | Name | Type | Default | Description |
|---|---|---|---|---|
| private | mHigh | u64 | 0 | |
| private | mLow | u64 | 0 |
Functions
Public
generate
generate[[nodiscard]] static uuid generate();Generates a random version-4 identifier. Thread-safe. The per-thread generator is seeded from std::random_device on first use; a host without an entropy source terminates there, which is acceptable for every supported desktop platform.
is_null
is_null[[nodiscard]] constexpr bool is_null() const noexcept;True for the all-zero identifier.
parse
parse[[nodiscard]] static std::optional<uuid> parse(
std::string_view text) noexcept;Parses "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" (case-insensitive, braces optional). Returns nullopt for anything else.
to_string
to_string[[nodiscard]] std::string to_string() const;Lower-case canonical form "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".
Operator Overloads
Public
operator<=>
operator<=>[[nodiscard]] constexpr auto operator<=>(
const uuid &) const noexcept = default;