OpenShot Audio Library | OpenShotAudio: juce_Uuid.h Source File

OpenShot Audio Library | OpenShotAudio 0.3.0

Loading...
Searching...
No Matches
juce_Uuid.h
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2017 - ROLI Ltd.
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 The code included in this file is provided under the terms of the ISC license
11 http://www.isc.org/downloads/software-support-policy/isc-license. Permission
12 To use, copy, modify, and/or distribute this software for any purpose with or
13 without fee is hereby granted provided that the above copyright notice and
14 this permission notice appear in all copies.
15
16 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
17 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
18 DISCLAIMED.
19
20 ==============================================================================
21*/
22
23namespace juce
24{
25
26//==============================================================================
38 class JUCE_API Uuid
39{
40public:
41 //==============================================================================
43 Uuid();
44
46 ~Uuid() noexcept;
47
49 Uuid (const Uuid&) noexcept;
50
52 Uuid& operator= (const Uuid&) noexcept;
53
54 //==============================================================================
56 bool isNull() const noexcept;
57
59 static Uuid null() noexcept;
60
61 bool operator== (const Uuid&) const noexcept;
62 bool operator!= (const Uuid&) const noexcept;
63 bool operator< (const Uuid&) const noexcept;
64 bool operator> (const Uuid&) const noexcept;
65 bool operator<= (const Uuid&) const noexcept;
66 bool operator>= (const Uuid&) const noexcept;
67
68 //==============================================================================
76 String toString() const;
77
81 String toDashedString() const;
82
86 Uuid (const String& uuidString);
87
91 Uuid& operator= (const String& uuidString);
92
93
94 //==============================================================================
96 uint32 getTimeLow() const noexcept;
98 uint16 getTimeMid() const noexcept;
100 uint16 getTimeHighAndVersion() const noexcept;
102 uint8 getClockSeqAndReserved() const noexcept;
104 uint8 getClockSeqLow() const noexcept;
106 uint64 getNode() const noexcept;
107
109 uint64 hash() const noexcept;
110
111 //==============================================================================
117 const uint8* getRawData() const noexcept { return uuid; }
118
122 Uuid (const uint8* rawData) noexcept;
123
125 Uuid& operator= (const uint8* rawData) noexcept;
126
127
128private:
129 //==============================================================================
130 uint8 uuid[16];
131 String getHexRegion (int, int) const;
132 int compare (Uuid) const noexcept;
133
134 JUCE_LEAK_DETECTOR (Uuid)
135};
136
137} // namespace juce
138
139#if ! DOXYGEN
140namespace std
141{
142 template <> struct hash<juce::Uuid>
143 {
144 size_t operator() (const juce::Uuid& u) const noexcept { return (size_t) u.hash(); }
145 };
146}
147#endif
juce::String
Definition: juce_String.h:39
juce::Uuid
Definition: juce_Uuid.h:39
juce::Uuid::getRawData
const uint8 * getRawData() const noexcept
Definition: juce_Uuid.h:117