LeviLamina
Loading...
Searching...
No Matches
ActorUniqueID.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated forward declare list
6// clang-format off
7namespace mce { class UUID; }
8// clang-format on
9
11public:
12 [[nodiscard]] constexpr bool operator==(ActorUniqueID const& other) const noexcept { return rawID == other.rawID; }
13
14 [[nodiscard]] constexpr std::strong_ordering operator<=>(ActorUniqueID const& other) const noexcept {
15 return rawID <=> other.rawID;
16 }
17
18public:
19 // member variables
20 // NOLINTBEGIN
21 int64 rawID;
22 // NOLINTEND
23
24public:
25 // static functions
26 // NOLINTBEGIN
27 MCAPI static ::ActorUniqueID fromUUID(::mce::UUID const& uuid);
28 // NOLINTEND
29
30public:
31 // static variables
32 // NOLINTBEGIN
33 MCAPI static ::ActorUniqueID const& INVALID_ID();
34 // NOLINTEND
35};
36
37namespace std {
38template <>
39struct hash<ActorUniqueID> {
40 size_t operator()(ActorUniqueID const& id) const noexcept {
41 static std::hash<int64> hasher;
42 size_t seed = 0;
43 seed ^= hasher(id.rawID >> 32) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
44 seed ^= hasher(id.rawID & 0xffffff) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
45 return seed;
46 }
47};
48} // namespace std
Definition UUID.h:7
STL namespace.
Definition ActorUniqueID.h:10