aws-crt-cpp
UUID.h
Go to the documentation of this file.
1 #pragma once
2 /*
3  * Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License").
6  * You may not use this file except in compliance with the License.
7  * A copy of the License is located at
8  *
9  * http://aws.amazon.com/apache2.0
10  *
11  * or in the "license" file accompanying this file. This file is distributed
12  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13  * express or implied. See the License for the specific language governing
14  * permissions and limitations under the License.
15  */
16 #include <aws/crt/StlAllocator.h>
17 #include <aws/crt/Types.h>
18 
19 #include <aws/common/uuid.h>
20 
21 namespace Aws
22 {
23  namespace Crt
24  {
25  class UUID final
26  {
27  public:
28  UUID() noexcept;
29  UUID(const String &str) noexcept;
30 
31  UUID &operator=(const String &str) noexcept;
32 
33  bool operator==(const UUID &other) noexcept;
34  bool operator!=(const UUID &other) noexcept;
35  operator String() const;
36  operator ByteBuf() const noexcept;
37 
38  inline operator bool() const noexcept { return m_good; }
39 
40  int GetLastError() const noexcept;
41 
42  String ToString() const;
43 
44  private:
45  aws_uuid m_uuid;
46  bool m_good;
47  };
48  } // namespace Crt
49 } // namespace Aws
Types.h
Aws::Crt::UUID::operator=
UUID & operator=(const String &str) noexcept
Definition: UUID.cpp:38
Aws::Crt::UUID::operator!=
bool operator!=(const UUID &other) noexcept
Definition: UUID.cpp:46
Aws::Crt::ByteBuf
aws_byte_buf ByteBuf
Definition: Types.h:43
Aws::Crt::UUID::ToString
String ToString() const
Definition: UUID.cpp:48
Aws
Definition: Api.h:25
Aws::Crt::UUID::UUID
UUID() noexcept
Definition: UUID.cpp:21
Aws::Crt::UUID::operator==
bool operator==(const UUID &other) noexcept
Definition: UUID.cpp:44
Aws::Crt::UUID
Definition: UUID.h:26
StlAllocator.h
Aws::Crt::UUID::GetLastError
int GetLastError() const noexcept
Definition: UUID.cpp:62
Aws::Crt::String
std::basic_string< char, std::char_traits< char >, StlAllocator< char > > String
Definition: Types.h:58