Rerun C++ SDK
Loading...
Searching...
No Matches
uuid.hpp
1// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
2// Based on "crates/store/re_types/definitions/rerun/datatypes/uuid.fbs".
3
4#pragma once
5
6#include "../result.hpp"
7
8#include <array>
9#include <cstdint>
10#include <memory>
11
12namespace arrow {
13 class Array;
14 class DataType;
15 class FixedSizeListBuilder;
16} // namespace arrow
17
18namespace rerun::datatypes {
19 /// **Datatype**: A 16-byte UUID.
20 struct Uuid {
21 /// The raw bytes representing the UUID.
22 std::array<uint8_t, 16> bytes;
23
24 public:
25 Uuid() = default;
26
27 Uuid(std::array<uint8_t, 16> bytes_) : bytes(bytes_) {}
28
29 Uuid& operator=(std::array<uint8_t, 16> bytes_) {
30 bytes = bytes_;
31 return *this;
32 }
33 };
34} // namespace rerun::datatypes
35
36namespace rerun {
37 template <typename T>
38 struct Loggable;
39
40 /// \private
41 template <>
42 struct Loggable<datatypes::Uuid> {
43 static constexpr const char Name[] = "rerun.datatypes.Uuid";
44
45 /// Returns the arrow data type this type corresponds to.
46 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
47
48 /// Serializes an array of `rerun::datatypes::Uuid` into an arrow array.
49 static Result<std::shared_ptr<arrow::Array>> to_arrow(
50 const datatypes::Uuid* instances, size_t num_instances
51 );
52
53 /// Fills an arrow array builder with an array of this type.
54 static rerun::Error fill_arrow_array_builder(
55 arrow::FixedSizeListBuilder* builder, const datatypes::Uuid* elements,
56 size_t num_elements
57 );
58 };
59} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:91
All built-in datatypes. See Types in the Rerun manual.
Definition rerun.hpp:78
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:22
Datatype: A 16-byte UUID.
Definition uuid.hpp:20
std::array< uint8_t, 16 > bytes
The raw bytes representing the UUID.
Definition uuid.hpp:22