ludus::foundation::identity::Uuid¶
Ludus Wiki · API overview · Browse API
Struct
A 128-bit UUID in canonical (RFC 9562 network) byte order.
Byte 0 is the first byte of the text form. The value is a plain byte array: never reinterpret it as native-endian integers or a platform GUID structure. Store exactly these 16 bytes in versioned binary formats. The all-zero nil value is an explicit absent-reference sentinel and is never a valid identity. Hash the bytes with FoundationHash when a table needs an accelerator; full-byte equality, not a hash, decides identity.
Declared in modules/foundation/identity/include/ludus/foundation/identity/uuid.hpp
#include <ludus/foundation/identity/uuid.hpp>
struct ludus::foundation::identity::Uuid final
Fields¶
Bytes¶
uint8 ludus::foundation::identity::Uuid::Bytes[UUID_BYTE_COUNT][UUID_BYTE_COUNT] = {}
Canonical bytes. A raw array keeps this value header free of container headers (FoundationIdentity depends only on FoundationBase).
Related types: uint8
Declared in modules/foundation/identity/include/ludus/foundation/identity/uuid.hpp
Methods¶
operator==¶
constexpr bool ludus::foundation::identity::Uuid::operator==(const Uuid &) const noexcept=default
Compare all 16 bytes exactly.
Related types: Uuid
Declared in modules/foundation/identity/include/ludus/foundation/identity/uuid.hpp
IsNil¶
LUDUS_INLINE constexpr bool ludus::foundation::identity::Uuid::IsNil() const noexcept
Report whether every byte is zero (the nil UUID).
Declared in modules/foundation/identity/include/ludus/foundation/identity/uuid.hpp
GetVersion¶
LUDUS_INLINE constexpr uint8 ludus::foundation::identity::Uuid::GetVersion() const noexcept
Return the RFC 9562 version field (the high four bits of the version byte). Meaningful only when HasStandardVariant() is true.
Related types: uint8
Declared in modules/foundation/identity/include/ludus/foundation/identity/uuid.hpp
HasStandardVariant¶
LUDUS_INLINE constexpr bool ludus::foundation::identity::Uuid::HasStandardVariant() const noexcept
Report whether the variant field (the high two bits of the variant byte) is the RFC 9562 variant
10. Declared in modules/foundation/identity/include/ludus/foundation/identity/uuid.hpp