blob: ff7c4e9b94538f590f175f24c429708a407162d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
/*
* ========================================================
*
* HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
*/
#pragma once
#include <NewKit/Defines.hpp>
#include <NewKit/Ref.hpp>
#include <NewKit/Stream.hpp>
/* GUID for C++ Components */
#define NULL_GUID "XRN:{........-....-M...-N...-............}"
// eXtensible Resource Information
namespace HCore::XRN {
union GUIDSequence {
alignas(8) UShort u8[16];
alignas(8) UShort u16[8];
alignas(8) UInt u32[4];
alignas(8) ULong u64[2];
struct {
alignas(8) UInt m_Ms1;
UShort m_Ms2;
UShort m_Ms3;
UChar m_Ms4[8];
};
};
class GUID final {
public:
explicit GUID() = default;
~GUID() = default;
public:
GUID &operator=(const GUID &) = default;
GUID(const GUID &) = default;
public:
GUIDSequence &operator->() noexcept { return m_UUID; }
GUIDSequence &Leak() noexcept { return m_UUID; }
private:
GUIDSequence m_UUID;
};
} // namespace HCore::XRN
|