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 "../component_descriptor.hpp"
7#include "../result.hpp"
8
9#include <array>
10#include <cstdint>
11#include <memory>
12
13namespace arrow {
14 class Array;
15 class DataType;
16 class FixedSizeListBuilder;
17} // namespace arrow
18
19namespace rerun::datatypes {
20 /// **Datatype**: A 16-byte UUID.
21 struct Uuid {
22 /// The raw bytes representing the UUID.
23 std::array<uint8_t, 16> bytes;
24
25 public:
26 Uuid() = default;
27
28 Uuid(std::array<uint8_t, 16> bytes_) : bytes(bytes_) {}
29
30 Uuid& operator=(std::array<uint8_t, 16> bytes_) {
31 bytes = bytes_;
32 return *this;
33 }
34 };
35} // namespace rerun::datatypes
36
37namespace rerun {
38 template <typename T>
39 struct Loggable;
40
41 /// \private
42 template <>
43 struct Loggable<datatypes::Uuid> {
44 static constexpr ComponentDescriptor Descriptor = "rerun.datatypes.Uuid";
45
46 /// Returns the arrow data type this type corresponds to.
47 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
48
49 /// Serializes an array of `rerun::datatypes::Uuid` into an arrow array.
50 static Result<std::shared_ptr<arrow::Array>> to_arrow(
51 const datatypes::Uuid* instances, size_t num_instances
52 );
53
54 /// Fills an arrow array builder with an array of this type.
55 static rerun::Error fill_arrow_array_builder(
56 arrow::FixedSizeListBuilder* builder, const datatypes::Uuid* elements,
57 size_t num_elements
58 );
59 };
60} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:95
All built-in datatypes. See Types in the Rerun manual.
Definition rerun.hpp:83
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
Datatype: A 16-byte UUID.
Definition uuid.hpp:21
std::array< uint8_t, 16 > bytes
The raw bytes representing the UUID.
Definition uuid.hpp:23