LkEngine
0.1.2
Loading...
Searching...
No Matches
UUID.h
1
#pragma once
2
3
#include <stdint.h>
4
5
namespace
LkEngine
{
6
12
struct
LUUID
13
{
14
using
SizeType = uint64_t;
15
16
LUUID
();
17
LUUID
(
const
SizeType InUUID);
18
LUUID
(
const
LUUID
&) =
default
;
19
20
operator
uint64_t()
const
{
return
UUID; }
21
22
private
:
23
uint64_t UUID = 0;
24
};
25
26
static_assert
(std::disjunction_v<
27
std::is_same<LUUID::SizeType, uint64_t>,
28
std::is_same<LUUID::SizeType, uint32_t>
29
>,
"LUUID::SizeType is not valid"
);
30
}
31
32
namespace
std
33
{
34
template
<
typename
T>
35
struct
hash
;
36
37
template
<>
38
struct
hash
<::
LkEngine::LUUID
>
39
{
40
std::size_t operator()(const ::LkEngine::LUUID& uuid)
const
41
{
42
return
(uint64_t)uuid;
43
}
44
};
45
}
LkEngine
Definition
Asset.h:11
std
Definition
UUID.h:33
LkEngine::LUUID
Definition
UUID.h:13
std::hash
Definition
UUID.h:35
LkEngine
Source
LkEngine
Core
Hash
UUID.h
Generated by
1.12.0