Realm C++ SDK Versão C++ v2.2.0

uuid.hpp

1
2//
3// Autores 2024 Realm Inc.
4//
5// Licenciado sob a Licença Apache, Versão 2.0 (a "Licença");
6// você não pode usar este arquivo, exceto em conformidade com a Licença.
7// Você pode obter uma cópia da Licença em
8//
9// http://www.apache.org/license/LICENSE-2.0
10//
11// A menos que exigido pela lei aplicável ou acordado por escrito, o software
12// distribuído sob a Licença é distribuído "Como está",
13// sem garantias ou condições de qualquer tipo, Express ou implícitas.
14// Consulte a Licença para obter as permissões específicas de domínio do idioma e
15// limitações da Licença.
16//
18
19#ifndef CPPREALM_BRIDGE_UUID_HPP
20#define CPPREALM_BRIDGE_UUID_HPP
21
22#include <cprealm/internal/bridge/utils.hpp>
23#include <string_view>
24#include <array>
25
26namespace Realm {
27 struct uuid;
28 class UUID;
29}
30
31namespace realm::internal::bridge {
32 estrutura, estrutura uuid {
33 uuid();
34 uuid(const uuid& other) = default;
35 uuid& operator=(const uuid& other) = default;
36 uuid(uuid&& other) = default;
37 uuid& operator=(uuid&& other) = default;
38 ~uuid() = default;
39 uuid(const UUID&); //NOLINT(google-explicit-constructor);
40 explícito uuid(const std::string&);
41 uuid(const std::array<uint8_t, 16>&);
42 uuid(const struct ::Realm::uuid&); //NOLINT(google-explicit-constructor);
43 operador UUID() const; //NOLINT(google-explicit-constructor);
44 operador ::Realm::uuid() const; //NOLINT(google-explicit-constructor);
45 [[nodiscard]] std::string to_string() const;
46 [[nodiscard]] std::string to_base64() const;
47 [[nodiscard]] std::array<uint8_t, 16> to_bytes() const;
48 privado:
49 std::array<uint8_t, 16> m_uuid;
50 amigo operador bool ==(const uuid&, const uuid&);
51 amigo operador de bool !=(const uuid&, const uuid&);
52 amigo operador bool >(const uuid&, const uuid&);
53 amigo operador bool <(const uuid&, const uuid&);
54 amigo operador bool >=(const uuid&, const uuid&);
55 amigo operador bool <=(const uuid&, const uuid&);
56 };
57
58 operador bool ==(const uuid&, const uuid&);
59 operador de bool !=(const uuid&, const uuid&);
60 operador bool >(const uuid&, const uuid&);
61 operador bool <(const uuid&, const uuid&);
62 operador bool >=(const uuid&, const uuid&);
63 operador bool <=(const uuid&, const uuid&);
64}
65
66#endif //CPPrealm_BRIDGE_UUID_HPP
Definição: uuid.hpp:32