HephAudio
v3.0.6
A cross-platform C++ library for recording, playing, and processing audio on Windows, Android, Linux, iOS, and macOS.
Loading...
Searching...
No Matches
HephCommon
HeaderFiles
Guid.h
Go to the documentation of this file.
1
#pragma once
2
#include "
HephShared.h
"
3
#include <cinttypes>
4
7
namespace
Heph
8
{
13
struct
HEPH_API
Guid
14
{
16
uint32_t
data1
;
17
19
uint16_t
data2
;
20
22
uint16_t
data3
;
23
25
uint8_t data4[8];
26
28
constexpr
Guid
() : data1(0), data2(0), data3(0), data4{ 0, 0, 0, 0, 0, 0, 0, 0 } {}
29
30
constexpr
bool
operator==(
const
Guid
& rhs)
const
31
{
32
if
(this->data1 == rhs.
data1
&& this->data2 == rhs.
data2
&& this->data3 == rhs.
data3
)
33
{
34
for
(
size_t
i = 0; i < 8; i++)
35
{
36
if
(this->data4[i] != rhs.
data4
[i])
37
{
38
return
false
;
39
}
40
}
41
return
true
;
42
}
43
return
false
;
44
}
45
46
constexpr
bool
operator!=(
const
Guid& rhs)
const
47
{
48
return
!(this->operator==(rhs));
49
}
50
55
static
Guid
GenerateNew
();
56
};
57
}
HephShared.h
HEPH_API
#define HEPH_API
Definition
HephShared.h:132
Heph::Guid
struct for storing globally unique identifiers.
Definition
Guid.h:14
Heph::Guid::data1
uint32_t data1
Definition
Guid.h:16
Heph::Guid::data3
uint16_t data3
Definition
Guid.h:22
Heph::Guid::GenerateNew
static Guid GenerateNew()
Heph::Guid::Guid
constexpr Guid()
Definition
Guid.h:28
Heph::Guid::data4
uint8_t data4[8]
Definition
Guid.h:25
Heph::Guid::data2
uint16_t data2
Definition
Guid.h:19
Generated by
1.11.0