-
Notifications
You must be signed in to change notification settings - Fork 70
/
Copy pathUUID.h
42 lines (34 loc) · 1.04 KB
/
UUID.h
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
#pragma once
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/crt/StlAllocator.h>
#include <aws/crt/Types.h>
#include <aws/common/uuid.h>
namespace Aws
{
namespace Crt
{
/**
* Utility class for creating UUIDs and serializing them to a string
*/
class AWS_CRT_CPP_API UUID final
{
public:
UUID() noexcept;
UUID(const String &str) noexcept;
UUID &operator=(const String &str) noexcept;
bool operator==(const UUID &other) const noexcept;
bool operator!=(const UUID &other) const noexcept;
operator String() const;
operator ByteBuf() const noexcept;
inline operator bool() const noexcept { return m_good; }
int GetLastError() const noexcept;
String ToString() const;
private:
aws_uuid m_uuid;
bool m_good;
};
} // namespace Crt
} // namespace Aws