mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-12 01:10:42 +00:00
41 lines
848 B
C++
41 lines
848 B
C++
/*
|
|
* Copyright (c) 2020, Liav A. <liavalb@hotmail.co.il>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Array.h>
|
|
#include <AK/ByteBuffer.h>
|
|
#include <AK/StringView.h>
|
|
#include <AK/Types.h>
|
|
|
|
namespace AK {
|
|
|
|
class UUID {
|
|
public:
|
|
UUID() = default;
|
|
UUID(Array<u8, 16> uuid_buffer);
|
|
UUID(StringView);
|
|
~UUID() = default;
|
|
|
|
bool operator==(const UUID&) const;
|
|
bool operator!=(const UUID& other) const { return !(*this == other); }
|
|
bool operator<=(const UUID&) const = delete;
|
|
bool operator>=(const UUID&) const = delete;
|
|
bool operator<(const UUID&) const = delete;
|
|
bool operator>(const UUID&) const = delete;
|
|
|
|
String to_string() const;
|
|
bool is_zero() const;
|
|
|
|
private:
|
|
void convert_string_view_to_uuid(StringView);
|
|
|
|
Array<u8, 16> m_uuid_buffer {};
|
|
};
|
|
|
|
}
|
|
|
|
using AK::UUID;
|