Representative of a Globally Unique Identifier. More...
Declaration
class helios::util::Guid { ... }
Public Constructors Index
| Guid (helios::core::types::no_init_t) |
|
Unsafe Guid initializer for (local) var initialization. More...
|
|
Private Constructors Index
| Guid (uint64_t value) noexcept |
|
|
|
Public Operators Index
| constexpr bool | operator== (const Guid &guid) const =default |
|
Compares two Guid instances for equality. More...
|
|
| constexpr bool | operator!= (const Guid &guid) const =default |
|
Compares two Guid instances for inequality. More...
|
|
| constexpr bool | operator< (const Guid &guid) const noexcept |
|
Less-than comparison operator, enabling ordering of Guid instances. More...
|
|
| constexpr bool | operator> (const Guid &guid) const noexcept |
|
Greater-than comparison operator, enabling ordering of Guid instances. More...
|
|
Public Member Functions Index
| constexpr uint64_t | value () const noexcept |
|
Returns the raw 64-bit value of this Guid. More...
|
|
| std::size_t | hash () const noexcept |
|
Calculates a hash fot this GUID. More...
|
|
Private Member Attributes Index
Public Static Functions Index
Description
Representative of a Globally Unique Identifier.
Generating GUIDs with this class is considered thread-safe.
Definition at line 23 of file Guid.ixx.
Public Constructors
Guid()
Unsafe Guid initializer for (local) var initialization.
Definition at line 33 of file Guid.ixx.
Private Constructors
Guid()
| helios::util::Guid::Guid (uint64_t value) |
|
inline
explicit
noexcept
|
Definition at line 25 of file Guid.ixx.
25 explicit Guid(uint64_t value) noexcept : value_(value) {}
Public Operators
operator!=()
| bool helios::util::Guid::operator!= (const Guid & guid) |
|
constexpr
default
|
Compares two Guid instances for inequality.
- Parameters
-
| guid | The Guid to compare against. |
- Returns
`true` if the Guids have different underlying values, `false` otherwise.
Definition at line 51 of file Guid.ixx.
operator<()
| bool helios::util::Guid::operator< (const Guid & guid) |
|
inline
constexpr
noexcept
|
Less-than comparison operator, enabling ordering of Guid instances.
- Parameters
-
| guid | The Guid to compare against. |
- Returns
`true` if this Guid's value is less than the other, `false` otherwise.
Definition at line 60 of file Guid.ixx.
60 constexpr bool operator<(const Guid& guid) const noexcept {
61 return value_ < guid.value();
62 }
operator==()
| bool helios::util::Guid::operator== (const Guid & guid) |
|
constexpr
default
|
Compares two Guid instances for equality.
- Parameters
-
| guid | The Guid to compare against. |
- Returns
`true` if both Guids have the same underlying value, `false` otherwise.
Definition at line 42 of file Guid.ixx.
operator>()
| bool helios::util::Guid::operator> (const Guid & guid) |
|
inline
constexpr
noexcept
|
Greater-than comparison operator, enabling ordering of Guid instances.
- Parameters
-
| guid | The Guid to compare against. |
- Returns
`true` if this Guid's value is greater than the other, `false` otherwise.
Definition at line 71 of file Guid.ixx.
71 constexpr bool operator>(const Guid& guid) const noexcept {
72 return value_ > guid.value();
73 }
Public Member Functions
hash()
| std::size_t helios::util::Guid::hash () |
|
inline
nodiscard
noexcept
|
Calculates a hash fot this GUID.
The hash simply defaults to the value_ of this Guid.
- Returns
The hash value for this Guid.
Definition at line 105 of file Guid.ixx.
105 [[nodiscard]] std::size_t hash() const noexcept {
106 return std::hash<uint64_t>{}(value_);
107 }
value()
| uint64_t helios::util::Guid::value () |
|
inline
nodiscard
constexpr
noexcept
|
Private Member Attributes
value_
| uint64_t helios::util::Guid::value_ {} |
|
Public Static Functions
generate()
| Guid helios::util::Guid::generate () |
|
inline
noexcept
static
|
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.