chore: import upstream snapshot with attribution
This commit is contained in:
Generated
+6
@@ -0,0 +1,6 @@
|
||||
# DO NOT EDIT! This file is generated by crates/build/re_types_builder/src/lib.rs
|
||||
|
||||
.gitattributes linguist-generated=true
|
||||
archetypes.hpp linguist-generated=true
|
||||
components.hpp linguist-generated=true
|
||||
datatypes.hpp linguist-generated=true
|
||||
Generated
+8
@@ -0,0 +1,8 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "archetypes/affix_fuzzer1.hpp"
|
||||
#include "archetypes/affix_fuzzer2.hpp"
|
||||
#include "archetypes/affix_fuzzer3.hpp"
|
||||
#include "archetypes/affix_fuzzer4.hpp"
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
# DO NOT EDIT! This file is generated by crates/build/re_types_builder/src/lib.rs
|
||||
|
||||
.gitattributes linguist-generated=true
|
||||
affix_fuzzer1.cpp linguist-generated=true
|
||||
affix_fuzzer1.hpp linguist-generated=true
|
||||
affix_fuzzer2.cpp linguist-generated=true
|
||||
affix_fuzzer2.hpp linguist-generated=true
|
||||
affix_fuzzer3.cpp linguist-generated=true
|
||||
affix_fuzzer3.hpp linguist-generated=true
|
||||
affix_fuzzer4.cpp linguist-generated=true
|
||||
affix_fuzzer4.hpp linguist-generated=true
|
||||
+301
@@ -0,0 +1,301 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/archetypes/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer1.hpp"
|
||||
|
||||
#include <rerun/collection_adapter_builtins.hpp>
|
||||
|
||||
namespace rerun::archetypes {
|
||||
AffixFuzzer1 AffixFuzzer1::clear_fields() {
|
||||
auto archetype = AffixFuzzer1();
|
||||
archetype.fuzz1001 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer1>(Descriptor_fuzz1001)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1002 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer2>(Descriptor_fuzz1002)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1003 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer3>(Descriptor_fuzz1003)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1004 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer4>(Descriptor_fuzz1004)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1005 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer5>(Descriptor_fuzz1005)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1006 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer6>(Descriptor_fuzz1006)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1007 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer7>(Descriptor_fuzz1007)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1008 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer8>(Descriptor_fuzz1008)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1009 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer9>(Descriptor_fuzz1009)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1010 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer10>(Descriptor_fuzz1010)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1011 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer11>(Descriptor_fuzz1011)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1012 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer12>(Descriptor_fuzz1012)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1013 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer13>(Descriptor_fuzz1013)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1014 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer14>(Descriptor_fuzz1014)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1015 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer15>(Descriptor_fuzz1015)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1016 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer16>(Descriptor_fuzz1016)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1017 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer17>(Descriptor_fuzz1017)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1018 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer18>(Descriptor_fuzz1018)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1019 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer19>(Descriptor_fuzz1019)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1020 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer20>(Descriptor_fuzz1020)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1021 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer21>(Descriptor_fuzz1021)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1022 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer22>(Descriptor_fuzz1022)
|
||||
.value_or_throw();
|
||||
return archetype;
|
||||
}
|
||||
|
||||
Collection<ComponentColumn> AffixFuzzer1::columns(const Collection<uint32_t>& lengths_) {
|
||||
std::vector<ComponentColumn> columns;
|
||||
columns.reserve(22);
|
||||
if (fuzz1001.has_value()) {
|
||||
columns.push_back(fuzz1001.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1002.has_value()) {
|
||||
columns.push_back(fuzz1002.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1003.has_value()) {
|
||||
columns.push_back(fuzz1003.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1004.has_value()) {
|
||||
columns.push_back(fuzz1004.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1005.has_value()) {
|
||||
columns.push_back(fuzz1005.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1006.has_value()) {
|
||||
columns.push_back(fuzz1006.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1007.has_value()) {
|
||||
columns.push_back(fuzz1007.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1008.has_value()) {
|
||||
columns.push_back(fuzz1008.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1009.has_value()) {
|
||||
columns.push_back(fuzz1009.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1010.has_value()) {
|
||||
columns.push_back(fuzz1010.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1011.has_value()) {
|
||||
columns.push_back(fuzz1011.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1012.has_value()) {
|
||||
columns.push_back(fuzz1012.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1013.has_value()) {
|
||||
columns.push_back(fuzz1013.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1014.has_value()) {
|
||||
columns.push_back(fuzz1014.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1015.has_value()) {
|
||||
columns.push_back(fuzz1015.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1016.has_value()) {
|
||||
columns.push_back(fuzz1016.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1017.has_value()) {
|
||||
columns.push_back(fuzz1017.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1018.has_value()) {
|
||||
columns.push_back(fuzz1018.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1019.has_value()) {
|
||||
columns.push_back(fuzz1019.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1020.has_value()) {
|
||||
columns.push_back(fuzz1020.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1021.has_value()) {
|
||||
columns.push_back(fuzz1021.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1022.has_value()) {
|
||||
columns.push_back(fuzz1022.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
return columns;
|
||||
}
|
||||
|
||||
Collection<ComponentColumn> AffixFuzzer1::columns() {
|
||||
if (fuzz1001.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1001.value().length(), 1));
|
||||
}
|
||||
if (fuzz1002.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1002.value().length(), 1));
|
||||
}
|
||||
if (fuzz1003.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1003.value().length(), 1));
|
||||
}
|
||||
if (fuzz1004.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1004.value().length(), 1));
|
||||
}
|
||||
if (fuzz1005.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1005.value().length(), 1));
|
||||
}
|
||||
if (fuzz1006.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1006.value().length(), 1));
|
||||
}
|
||||
if (fuzz1007.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1007.value().length(), 1));
|
||||
}
|
||||
if (fuzz1008.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1008.value().length(), 1));
|
||||
}
|
||||
if (fuzz1009.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1009.value().length(), 1));
|
||||
}
|
||||
if (fuzz1010.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1010.value().length(), 1));
|
||||
}
|
||||
if (fuzz1011.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1011.value().length(), 1));
|
||||
}
|
||||
if (fuzz1012.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1012.value().length(), 1));
|
||||
}
|
||||
if (fuzz1013.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1013.value().length(), 1));
|
||||
}
|
||||
if (fuzz1014.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1014.value().length(), 1));
|
||||
}
|
||||
if (fuzz1015.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1015.value().length(), 1));
|
||||
}
|
||||
if (fuzz1016.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1016.value().length(), 1));
|
||||
}
|
||||
if (fuzz1017.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1017.value().length(), 1));
|
||||
}
|
||||
if (fuzz1018.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1018.value().length(), 1));
|
||||
}
|
||||
if (fuzz1019.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1019.value().length(), 1));
|
||||
}
|
||||
if (fuzz1020.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1020.value().length(), 1));
|
||||
}
|
||||
if (fuzz1021.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1021.value().length(), 1));
|
||||
}
|
||||
if (fuzz1022.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1022.value().length(), 1));
|
||||
}
|
||||
return Collection<ComponentColumn>();
|
||||
}
|
||||
} // namespace rerun::archetypes
|
||||
|
||||
namespace rerun {
|
||||
|
||||
Result<Collection<ComponentBatch>> AsComponents<archetypes::AffixFuzzer1>::as_batches(
|
||||
const archetypes::AffixFuzzer1& archetype
|
||||
) {
|
||||
using namespace archetypes;
|
||||
std::vector<ComponentBatch> cells;
|
||||
cells.reserve(22);
|
||||
|
||||
if (archetype.fuzz1001.has_value()) {
|
||||
cells.push_back(archetype.fuzz1001.value());
|
||||
}
|
||||
if (archetype.fuzz1002.has_value()) {
|
||||
cells.push_back(archetype.fuzz1002.value());
|
||||
}
|
||||
if (archetype.fuzz1003.has_value()) {
|
||||
cells.push_back(archetype.fuzz1003.value());
|
||||
}
|
||||
if (archetype.fuzz1004.has_value()) {
|
||||
cells.push_back(archetype.fuzz1004.value());
|
||||
}
|
||||
if (archetype.fuzz1005.has_value()) {
|
||||
cells.push_back(archetype.fuzz1005.value());
|
||||
}
|
||||
if (archetype.fuzz1006.has_value()) {
|
||||
cells.push_back(archetype.fuzz1006.value());
|
||||
}
|
||||
if (archetype.fuzz1007.has_value()) {
|
||||
cells.push_back(archetype.fuzz1007.value());
|
||||
}
|
||||
if (archetype.fuzz1008.has_value()) {
|
||||
cells.push_back(archetype.fuzz1008.value());
|
||||
}
|
||||
if (archetype.fuzz1009.has_value()) {
|
||||
cells.push_back(archetype.fuzz1009.value());
|
||||
}
|
||||
if (archetype.fuzz1010.has_value()) {
|
||||
cells.push_back(archetype.fuzz1010.value());
|
||||
}
|
||||
if (archetype.fuzz1011.has_value()) {
|
||||
cells.push_back(archetype.fuzz1011.value());
|
||||
}
|
||||
if (archetype.fuzz1012.has_value()) {
|
||||
cells.push_back(archetype.fuzz1012.value());
|
||||
}
|
||||
if (archetype.fuzz1013.has_value()) {
|
||||
cells.push_back(archetype.fuzz1013.value());
|
||||
}
|
||||
if (archetype.fuzz1014.has_value()) {
|
||||
cells.push_back(archetype.fuzz1014.value());
|
||||
}
|
||||
if (archetype.fuzz1015.has_value()) {
|
||||
cells.push_back(archetype.fuzz1015.value());
|
||||
}
|
||||
if (archetype.fuzz1016.has_value()) {
|
||||
cells.push_back(archetype.fuzz1016.value());
|
||||
}
|
||||
if (archetype.fuzz1017.has_value()) {
|
||||
cells.push_back(archetype.fuzz1017.value());
|
||||
}
|
||||
if (archetype.fuzz1018.has_value()) {
|
||||
cells.push_back(archetype.fuzz1018.value());
|
||||
}
|
||||
if (archetype.fuzz1019.has_value()) {
|
||||
cells.push_back(archetype.fuzz1019.value());
|
||||
}
|
||||
if (archetype.fuzz1020.has_value()) {
|
||||
cells.push_back(archetype.fuzz1020.value());
|
||||
}
|
||||
if (archetype.fuzz1021.has_value()) {
|
||||
cells.push_back(archetype.fuzz1021.value());
|
||||
}
|
||||
if (archetype.fuzz1022.has_value()) {
|
||||
cells.push_back(archetype.fuzz1022.value());
|
||||
}
|
||||
|
||||
return rerun::take_ownership(std::move(cells));
|
||||
}
|
||||
} // namespace rerun
|
||||
+691
@@ -0,0 +1,691 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/archetypes/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../components/affix_fuzzer1.hpp"
|
||||
#include "../components/affix_fuzzer10.hpp"
|
||||
#include "../components/affix_fuzzer11.hpp"
|
||||
#include "../components/affix_fuzzer12.hpp"
|
||||
#include "../components/affix_fuzzer13.hpp"
|
||||
#include "../components/affix_fuzzer14.hpp"
|
||||
#include "../components/affix_fuzzer15.hpp"
|
||||
#include "../components/affix_fuzzer16.hpp"
|
||||
#include "../components/affix_fuzzer17.hpp"
|
||||
#include "../components/affix_fuzzer18.hpp"
|
||||
#include "../components/affix_fuzzer19.hpp"
|
||||
#include "../components/affix_fuzzer2.hpp"
|
||||
#include "../components/affix_fuzzer20.hpp"
|
||||
#include "../components/affix_fuzzer21.hpp"
|
||||
#include "../components/affix_fuzzer22.hpp"
|
||||
#include "../components/affix_fuzzer3.hpp"
|
||||
#include "../components/affix_fuzzer4.hpp"
|
||||
#include "../components/affix_fuzzer5.hpp"
|
||||
#include "../components/affix_fuzzer6.hpp"
|
||||
#include "../components/affix_fuzzer7.hpp"
|
||||
#include "../components/affix_fuzzer8.hpp"
|
||||
#include "../components/affix_fuzzer9.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
#include <rerun/collection.hpp>
|
||||
#include <rerun/component_batch.hpp>
|
||||
#include <rerun/component_column.hpp>
|
||||
#include <rerun/result.hpp>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace rerun::archetypes {
|
||||
struct AffixFuzzer1 {
|
||||
std::optional<ComponentBatch> fuzz1001;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1002;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1003;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1004;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1005;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1006;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1007;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1008;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1009;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1010;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1011;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1012;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1013;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1014;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1015;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1016;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1017;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1018;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1019;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1020;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1021;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1022;
|
||||
|
||||
public:
|
||||
/// The name of the archetype as used in `ComponentDescriptor`s.
|
||||
static constexpr const char ArchetypeName[] = "rerun.testing.archetypes.AffixFuzzer1";
|
||||
|
||||
/// `ComponentDescriptor` for the `fuzz1001` field.
|
||||
static constexpr auto Descriptor_fuzz1001 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer1:fuzz1001",
|
||||
Loggable<rerun::components::AffixFuzzer1>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1002` field.
|
||||
static constexpr auto Descriptor_fuzz1002 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer1:fuzz1002",
|
||||
Loggable<rerun::components::AffixFuzzer2>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1003` field.
|
||||
static constexpr auto Descriptor_fuzz1003 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer1:fuzz1003",
|
||||
Loggable<rerun::components::AffixFuzzer3>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1004` field.
|
||||
static constexpr auto Descriptor_fuzz1004 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer1:fuzz1004",
|
||||
Loggable<rerun::components::AffixFuzzer4>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1005` field.
|
||||
static constexpr auto Descriptor_fuzz1005 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer1:fuzz1005",
|
||||
Loggable<rerun::components::AffixFuzzer5>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1006` field.
|
||||
static constexpr auto Descriptor_fuzz1006 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer1:fuzz1006",
|
||||
Loggable<rerun::components::AffixFuzzer6>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1007` field.
|
||||
static constexpr auto Descriptor_fuzz1007 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer1:fuzz1007",
|
||||
Loggable<rerun::components::AffixFuzzer7>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1008` field.
|
||||
static constexpr auto Descriptor_fuzz1008 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer1:fuzz1008",
|
||||
Loggable<rerun::components::AffixFuzzer8>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1009` field.
|
||||
static constexpr auto Descriptor_fuzz1009 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer1:fuzz1009",
|
||||
Loggable<rerun::components::AffixFuzzer9>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1010` field.
|
||||
static constexpr auto Descriptor_fuzz1010 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer1:fuzz1010",
|
||||
Loggable<rerun::components::AffixFuzzer10>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1011` field.
|
||||
static constexpr auto Descriptor_fuzz1011 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer1:fuzz1011",
|
||||
Loggable<rerun::components::AffixFuzzer11>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1012` field.
|
||||
static constexpr auto Descriptor_fuzz1012 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer1:fuzz1012",
|
||||
Loggable<rerun::components::AffixFuzzer12>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1013` field.
|
||||
static constexpr auto Descriptor_fuzz1013 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer1:fuzz1013",
|
||||
Loggable<rerun::components::AffixFuzzer13>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1014` field.
|
||||
static constexpr auto Descriptor_fuzz1014 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer1:fuzz1014",
|
||||
Loggable<rerun::components::AffixFuzzer14>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1015` field.
|
||||
static constexpr auto Descriptor_fuzz1015 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer1:fuzz1015",
|
||||
Loggable<rerun::components::AffixFuzzer15>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1016` field.
|
||||
static constexpr auto Descriptor_fuzz1016 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer1:fuzz1016",
|
||||
Loggable<rerun::components::AffixFuzzer16>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1017` field.
|
||||
static constexpr auto Descriptor_fuzz1017 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer1:fuzz1017",
|
||||
Loggable<rerun::components::AffixFuzzer17>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1018` field.
|
||||
static constexpr auto Descriptor_fuzz1018 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer1:fuzz1018",
|
||||
Loggable<rerun::components::AffixFuzzer18>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1019` field.
|
||||
static constexpr auto Descriptor_fuzz1019 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer1:fuzz1019",
|
||||
Loggable<rerun::components::AffixFuzzer19>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1020` field.
|
||||
static constexpr auto Descriptor_fuzz1020 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer1:fuzz1020",
|
||||
Loggable<rerun::components::AffixFuzzer20>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1021` field.
|
||||
static constexpr auto Descriptor_fuzz1021 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer1:fuzz1021",
|
||||
Loggable<rerun::components::AffixFuzzer21>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1022` field.
|
||||
static constexpr auto Descriptor_fuzz1022 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer1:fuzz1022",
|
||||
Loggable<rerun::components::AffixFuzzer22>::ComponentType
|
||||
);
|
||||
|
||||
public:
|
||||
AffixFuzzer1() = default;
|
||||
AffixFuzzer1(AffixFuzzer1&& other) = default;
|
||||
AffixFuzzer1(const AffixFuzzer1& other) = default;
|
||||
AffixFuzzer1& operator=(const AffixFuzzer1& other) = default;
|
||||
AffixFuzzer1& operator=(AffixFuzzer1&& other) = default;
|
||||
|
||||
explicit AffixFuzzer1(
|
||||
rerun::components::AffixFuzzer1 _fuzz1001, rerun::components::AffixFuzzer2 _fuzz1002,
|
||||
rerun::components::AffixFuzzer3 _fuzz1003, rerun::components::AffixFuzzer4 _fuzz1004,
|
||||
rerun::components::AffixFuzzer5 _fuzz1005, rerun::components::AffixFuzzer6 _fuzz1006,
|
||||
rerun::components::AffixFuzzer7 _fuzz1007, rerun::components::AffixFuzzer8 _fuzz1008,
|
||||
rerun::components::AffixFuzzer9 _fuzz1009, rerun::components::AffixFuzzer10 _fuzz1010,
|
||||
rerun::components::AffixFuzzer11 _fuzz1011, rerun::components::AffixFuzzer12 _fuzz1012,
|
||||
rerun::components::AffixFuzzer13 _fuzz1013, rerun::components::AffixFuzzer14 _fuzz1014,
|
||||
rerun::components::AffixFuzzer15 _fuzz1015, rerun::components::AffixFuzzer16 _fuzz1016,
|
||||
rerun::components::AffixFuzzer17 _fuzz1017, rerun::components::AffixFuzzer18 _fuzz1018,
|
||||
rerun::components::AffixFuzzer19 _fuzz1019, rerun::components::AffixFuzzer20 _fuzz1020,
|
||||
rerun::components::AffixFuzzer21 _fuzz1021, rerun::components::AffixFuzzer22 _fuzz1022
|
||||
)
|
||||
: fuzz1001(ComponentBatch::from_loggable(std::move(_fuzz1001), Descriptor_fuzz1001)
|
||||
.value_or_throw()),
|
||||
fuzz1002(ComponentBatch::from_loggable(std::move(_fuzz1002), Descriptor_fuzz1002)
|
||||
.value_or_throw()),
|
||||
fuzz1003(ComponentBatch::from_loggable(std::move(_fuzz1003), Descriptor_fuzz1003)
|
||||
.value_or_throw()),
|
||||
fuzz1004(ComponentBatch::from_loggable(std::move(_fuzz1004), Descriptor_fuzz1004)
|
||||
.value_or_throw()),
|
||||
fuzz1005(ComponentBatch::from_loggable(std::move(_fuzz1005), Descriptor_fuzz1005)
|
||||
.value_or_throw()),
|
||||
fuzz1006(ComponentBatch::from_loggable(std::move(_fuzz1006), Descriptor_fuzz1006)
|
||||
.value_or_throw()),
|
||||
fuzz1007(ComponentBatch::from_loggable(std::move(_fuzz1007), Descriptor_fuzz1007)
|
||||
.value_or_throw()),
|
||||
fuzz1008(ComponentBatch::from_loggable(std::move(_fuzz1008), Descriptor_fuzz1008)
|
||||
.value_or_throw()),
|
||||
fuzz1009(ComponentBatch::from_loggable(std::move(_fuzz1009), Descriptor_fuzz1009)
|
||||
.value_or_throw()),
|
||||
fuzz1010(ComponentBatch::from_loggable(std::move(_fuzz1010), Descriptor_fuzz1010)
|
||||
.value_or_throw()),
|
||||
fuzz1011(ComponentBatch::from_loggable(std::move(_fuzz1011), Descriptor_fuzz1011)
|
||||
.value_or_throw()),
|
||||
fuzz1012(ComponentBatch::from_loggable(std::move(_fuzz1012), Descriptor_fuzz1012)
|
||||
.value_or_throw()),
|
||||
fuzz1013(ComponentBatch::from_loggable(std::move(_fuzz1013), Descriptor_fuzz1013)
|
||||
.value_or_throw()),
|
||||
fuzz1014(ComponentBatch::from_loggable(std::move(_fuzz1014), Descriptor_fuzz1014)
|
||||
.value_or_throw()),
|
||||
fuzz1015(ComponentBatch::from_loggable(std::move(_fuzz1015), Descriptor_fuzz1015)
|
||||
.value_or_throw()),
|
||||
fuzz1016(ComponentBatch::from_loggable(std::move(_fuzz1016), Descriptor_fuzz1016)
|
||||
.value_or_throw()),
|
||||
fuzz1017(ComponentBatch::from_loggable(std::move(_fuzz1017), Descriptor_fuzz1017)
|
||||
.value_or_throw()),
|
||||
fuzz1018(ComponentBatch::from_loggable(std::move(_fuzz1018), Descriptor_fuzz1018)
|
||||
.value_or_throw()),
|
||||
fuzz1019(ComponentBatch::from_loggable(std::move(_fuzz1019), Descriptor_fuzz1019)
|
||||
.value_or_throw()),
|
||||
fuzz1020(ComponentBatch::from_loggable(std::move(_fuzz1020), Descriptor_fuzz1020)
|
||||
.value_or_throw()),
|
||||
fuzz1021(ComponentBatch::from_loggable(std::move(_fuzz1021), Descriptor_fuzz1021)
|
||||
.value_or_throw()),
|
||||
fuzz1022(ComponentBatch::from_loggable(std::move(_fuzz1022), Descriptor_fuzz1022)
|
||||
.value_or_throw()) {}
|
||||
|
||||
/// Update only some specific fields of a `AffixFuzzer1`.
|
||||
static AffixFuzzer1 update_fields() {
|
||||
return AffixFuzzer1();
|
||||
}
|
||||
|
||||
/// Clear all the fields of a `AffixFuzzer1`.
|
||||
static AffixFuzzer1 clear_fields();
|
||||
|
||||
AffixFuzzer1 with_fuzz1001(const rerun::components::AffixFuzzer1& _fuzz1001) && {
|
||||
fuzz1001 =
|
||||
ComponentBatch::from_loggable(_fuzz1001, Descriptor_fuzz1001).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz1001` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz1001` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer1 with_many_fuzz1001(const Collection<rerun::components::AffixFuzzer1>& _fuzz1001
|
||||
) && {
|
||||
fuzz1001 =
|
||||
ComponentBatch::from_loggable(_fuzz1001, Descriptor_fuzz1001).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer1 with_fuzz1002(const rerun::components::AffixFuzzer2& _fuzz1002) && {
|
||||
fuzz1002 =
|
||||
ComponentBatch::from_loggable(_fuzz1002, Descriptor_fuzz1002).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz1002` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz1002` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer1 with_many_fuzz1002(const Collection<rerun::components::AffixFuzzer2>& _fuzz1002
|
||||
) && {
|
||||
fuzz1002 =
|
||||
ComponentBatch::from_loggable(_fuzz1002, Descriptor_fuzz1002).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer1 with_fuzz1003(const rerun::components::AffixFuzzer3& _fuzz1003) && {
|
||||
fuzz1003 =
|
||||
ComponentBatch::from_loggable(_fuzz1003, Descriptor_fuzz1003).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz1003` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz1003` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer1 with_many_fuzz1003(const Collection<rerun::components::AffixFuzzer3>& _fuzz1003
|
||||
) && {
|
||||
fuzz1003 =
|
||||
ComponentBatch::from_loggable(_fuzz1003, Descriptor_fuzz1003).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer1 with_fuzz1004(const rerun::components::AffixFuzzer4& _fuzz1004) && {
|
||||
fuzz1004 =
|
||||
ComponentBatch::from_loggable(_fuzz1004, Descriptor_fuzz1004).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz1004` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz1004` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer1 with_many_fuzz1004(const Collection<rerun::components::AffixFuzzer4>& _fuzz1004
|
||||
) && {
|
||||
fuzz1004 =
|
||||
ComponentBatch::from_loggable(_fuzz1004, Descriptor_fuzz1004).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer1 with_fuzz1005(const rerun::components::AffixFuzzer5& _fuzz1005) && {
|
||||
fuzz1005 =
|
||||
ComponentBatch::from_loggable(_fuzz1005, Descriptor_fuzz1005).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz1005` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz1005` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer1 with_many_fuzz1005(const Collection<rerun::components::AffixFuzzer5>& _fuzz1005
|
||||
) && {
|
||||
fuzz1005 =
|
||||
ComponentBatch::from_loggable(_fuzz1005, Descriptor_fuzz1005).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer1 with_fuzz1006(const rerun::components::AffixFuzzer6& _fuzz1006) && {
|
||||
fuzz1006 =
|
||||
ComponentBatch::from_loggable(_fuzz1006, Descriptor_fuzz1006).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz1006` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz1006` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer1 with_many_fuzz1006(const Collection<rerun::components::AffixFuzzer6>& _fuzz1006
|
||||
) && {
|
||||
fuzz1006 =
|
||||
ComponentBatch::from_loggable(_fuzz1006, Descriptor_fuzz1006).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer1 with_fuzz1007(const rerun::components::AffixFuzzer7& _fuzz1007) && {
|
||||
fuzz1007 =
|
||||
ComponentBatch::from_loggable(_fuzz1007, Descriptor_fuzz1007).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz1007` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz1007` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer1 with_many_fuzz1007(const Collection<rerun::components::AffixFuzzer7>& _fuzz1007
|
||||
) && {
|
||||
fuzz1007 =
|
||||
ComponentBatch::from_loggable(_fuzz1007, Descriptor_fuzz1007).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer1 with_fuzz1008(const rerun::components::AffixFuzzer8& _fuzz1008) && {
|
||||
fuzz1008 =
|
||||
ComponentBatch::from_loggable(_fuzz1008, Descriptor_fuzz1008).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz1008` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz1008` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer1 with_many_fuzz1008(const Collection<rerun::components::AffixFuzzer8>& _fuzz1008
|
||||
) && {
|
||||
fuzz1008 =
|
||||
ComponentBatch::from_loggable(_fuzz1008, Descriptor_fuzz1008).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer1 with_fuzz1009(const rerun::components::AffixFuzzer9& _fuzz1009) && {
|
||||
fuzz1009 =
|
||||
ComponentBatch::from_loggable(_fuzz1009, Descriptor_fuzz1009).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz1009` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz1009` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer1 with_many_fuzz1009(const Collection<rerun::components::AffixFuzzer9>& _fuzz1009
|
||||
) && {
|
||||
fuzz1009 =
|
||||
ComponentBatch::from_loggable(_fuzz1009, Descriptor_fuzz1009).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer1 with_fuzz1010(const rerun::components::AffixFuzzer10& _fuzz1010) && {
|
||||
fuzz1010 =
|
||||
ComponentBatch::from_loggable(_fuzz1010, Descriptor_fuzz1010).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz1010` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz1010` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer1 with_many_fuzz1010(
|
||||
const Collection<rerun::components::AffixFuzzer10>& _fuzz1010
|
||||
) && {
|
||||
fuzz1010 =
|
||||
ComponentBatch::from_loggable(_fuzz1010, Descriptor_fuzz1010).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer1 with_fuzz1011(const rerun::components::AffixFuzzer11& _fuzz1011) && {
|
||||
fuzz1011 =
|
||||
ComponentBatch::from_loggable(_fuzz1011, Descriptor_fuzz1011).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz1011` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz1011` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer1 with_many_fuzz1011(
|
||||
const Collection<rerun::components::AffixFuzzer11>& _fuzz1011
|
||||
) && {
|
||||
fuzz1011 =
|
||||
ComponentBatch::from_loggable(_fuzz1011, Descriptor_fuzz1011).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer1 with_fuzz1012(const rerun::components::AffixFuzzer12& _fuzz1012) && {
|
||||
fuzz1012 =
|
||||
ComponentBatch::from_loggable(_fuzz1012, Descriptor_fuzz1012).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz1012` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz1012` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer1 with_many_fuzz1012(
|
||||
const Collection<rerun::components::AffixFuzzer12>& _fuzz1012
|
||||
) && {
|
||||
fuzz1012 =
|
||||
ComponentBatch::from_loggable(_fuzz1012, Descriptor_fuzz1012).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer1 with_fuzz1013(const rerun::components::AffixFuzzer13& _fuzz1013) && {
|
||||
fuzz1013 =
|
||||
ComponentBatch::from_loggable(_fuzz1013, Descriptor_fuzz1013).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz1013` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz1013` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer1 with_many_fuzz1013(
|
||||
const Collection<rerun::components::AffixFuzzer13>& _fuzz1013
|
||||
) && {
|
||||
fuzz1013 =
|
||||
ComponentBatch::from_loggable(_fuzz1013, Descriptor_fuzz1013).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer1 with_fuzz1014(const rerun::components::AffixFuzzer14& _fuzz1014) && {
|
||||
fuzz1014 =
|
||||
ComponentBatch::from_loggable(_fuzz1014, Descriptor_fuzz1014).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz1014` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz1014` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer1 with_many_fuzz1014(
|
||||
const Collection<rerun::components::AffixFuzzer14>& _fuzz1014
|
||||
) && {
|
||||
fuzz1014 =
|
||||
ComponentBatch::from_loggable(_fuzz1014, Descriptor_fuzz1014).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer1 with_fuzz1015(const rerun::components::AffixFuzzer15& _fuzz1015) && {
|
||||
fuzz1015 =
|
||||
ComponentBatch::from_loggable(_fuzz1015, Descriptor_fuzz1015).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz1015` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz1015` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer1 with_many_fuzz1015(
|
||||
const Collection<rerun::components::AffixFuzzer15>& _fuzz1015
|
||||
) && {
|
||||
fuzz1015 =
|
||||
ComponentBatch::from_loggable(_fuzz1015, Descriptor_fuzz1015).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer1 with_fuzz1016(const rerun::components::AffixFuzzer16& _fuzz1016) && {
|
||||
fuzz1016 =
|
||||
ComponentBatch::from_loggable(_fuzz1016, Descriptor_fuzz1016).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz1016` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz1016` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer1 with_many_fuzz1016(
|
||||
const Collection<rerun::components::AffixFuzzer16>& _fuzz1016
|
||||
) && {
|
||||
fuzz1016 =
|
||||
ComponentBatch::from_loggable(_fuzz1016, Descriptor_fuzz1016).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer1 with_fuzz1017(const rerun::components::AffixFuzzer17& _fuzz1017) && {
|
||||
fuzz1017 =
|
||||
ComponentBatch::from_loggable(_fuzz1017, Descriptor_fuzz1017).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz1017` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz1017` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer1 with_many_fuzz1017(
|
||||
const Collection<rerun::components::AffixFuzzer17>& _fuzz1017
|
||||
) && {
|
||||
fuzz1017 =
|
||||
ComponentBatch::from_loggable(_fuzz1017, Descriptor_fuzz1017).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer1 with_fuzz1018(const rerun::components::AffixFuzzer18& _fuzz1018) && {
|
||||
fuzz1018 =
|
||||
ComponentBatch::from_loggable(_fuzz1018, Descriptor_fuzz1018).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz1018` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz1018` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer1 with_many_fuzz1018(
|
||||
const Collection<rerun::components::AffixFuzzer18>& _fuzz1018
|
||||
) && {
|
||||
fuzz1018 =
|
||||
ComponentBatch::from_loggable(_fuzz1018, Descriptor_fuzz1018).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer1 with_fuzz1019(const rerun::components::AffixFuzzer19& _fuzz1019) && {
|
||||
fuzz1019 =
|
||||
ComponentBatch::from_loggable(_fuzz1019, Descriptor_fuzz1019).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz1019` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz1019` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer1 with_many_fuzz1019(
|
||||
const Collection<rerun::components::AffixFuzzer19>& _fuzz1019
|
||||
) && {
|
||||
fuzz1019 =
|
||||
ComponentBatch::from_loggable(_fuzz1019, Descriptor_fuzz1019).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer1 with_fuzz1020(const rerun::components::AffixFuzzer20& _fuzz1020) && {
|
||||
fuzz1020 =
|
||||
ComponentBatch::from_loggable(_fuzz1020, Descriptor_fuzz1020).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz1020` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz1020` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer1 with_many_fuzz1020(
|
||||
const Collection<rerun::components::AffixFuzzer20>& _fuzz1020
|
||||
) && {
|
||||
fuzz1020 =
|
||||
ComponentBatch::from_loggable(_fuzz1020, Descriptor_fuzz1020).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer1 with_fuzz1021(const rerun::components::AffixFuzzer21& _fuzz1021) && {
|
||||
fuzz1021 =
|
||||
ComponentBatch::from_loggable(_fuzz1021, Descriptor_fuzz1021).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz1021` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz1021` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer1 with_many_fuzz1021(
|
||||
const Collection<rerun::components::AffixFuzzer21>& _fuzz1021
|
||||
) && {
|
||||
fuzz1021 =
|
||||
ComponentBatch::from_loggable(_fuzz1021, Descriptor_fuzz1021).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer1 with_fuzz1022(const rerun::components::AffixFuzzer22& _fuzz1022) && {
|
||||
fuzz1022 =
|
||||
ComponentBatch::from_loggable(_fuzz1022, Descriptor_fuzz1022).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz1022` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz1022` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer1 with_many_fuzz1022(
|
||||
const Collection<rerun::components::AffixFuzzer22>& _fuzz1022
|
||||
) && {
|
||||
fuzz1022 =
|
||||
ComponentBatch::from_loggable(_fuzz1022, Descriptor_fuzz1022).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// Partitions the component data into multiple sub-batches.
|
||||
///
|
||||
/// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s
|
||||
/// instead, via `ComponentBatch::partitioned`.
|
||||
///
|
||||
/// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun.
|
||||
///
|
||||
/// The specified `lengths` must sum to the total length of the component batch.
|
||||
Collection<ComponentColumn> columns(const Collection<uint32_t>& lengths_);
|
||||
|
||||
/// Partitions the component data into unit-length sub-batches.
|
||||
///
|
||||
/// This is semantically similar to calling `columns` with `std::vector<uint32_t>(n, 1)`,
|
||||
/// where `n` is automatically guessed.
|
||||
Collection<ComponentColumn> columns();
|
||||
};
|
||||
|
||||
} // namespace rerun::archetypes
|
||||
|
||||
namespace rerun {
|
||||
/// \private
|
||||
template <typename T>
|
||||
struct AsComponents;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct AsComponents<archetypes::AffixFuzzer1> {
|
||||
/// Serialize all set component batches.
|
||||
static Result<Collection<ComponentBatch>> as_batches(
|
||||
const archetypes::AffixFuzzer1& archetype
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
+265
@@ -0,0 +1,265 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/archetypes/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer2.hpp"
|
||||
|
||||
#include <rerun/collection_adapter_builtins.hpp>
|
||||
|
||||
namespace rerun::archetypes {
|
||||
AffixFuzzer2 AffixFuzzer2::clear_fields() {
|
||||
auto archetype = AffixFuzzer2();
|
||||
archetype.fuzz1101 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer1>(Descriptor_fuzz1101)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1102 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer2>(Descriptor_fuzz1102)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1103 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer3>(Descriptor_fuzz1103)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1104 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer4>(Descriptor_fuzz1104)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1105 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer5>(Descriptor_fuzz1105)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1106 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer6>(Descriptor_fuzz1106)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1107 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer7>(Descriptor_fuzz1107)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1108 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer8>(Descriptor_fuzz1108)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1109 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer9>(Descriptor_fuzz1109)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1110 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer10>(Descriptor_fuzz1110)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1111 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer11>(Descriptor_fuzz1111)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1112 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer12>(Descriptor_fuzz1112)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1113 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer13>(Descriptor_fuzz1113)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1114 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer14>(Descriptor_fuzz1114)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1115 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer15>(Descriptor_fuzz1115)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1116 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer16>(Descriptor_fuzz1116)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1117 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer17>(Descriptor_fuzz1117)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1118 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer18>(Descriptor_fuzz1118)
|
||||
.value_or_throw();
|
||||
archetype.fuzz1122 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer22>(Descriptor_fuzz1122)
|
||||
.value_or_throw();
|
||||
return archetype;
|
||||
}
|
||||
|
||||
Collection<ComponentColumn> AffixFuzzer2::columns(const Collection<uint32_t>& lengths_) {
|
||||
std::vector<ComponentColumn> columns;
|
||||
columns.reserve(19);
|
||||
if (fuzz1101.has_value()) {
|
||||
columns.push_back(fuzz1101.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1102.has_value()) {
|
||||
columns.push_back(fuzz1102.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1103.has_value()) {
|
||||
columns.push_back(fuzz1103.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1104.has_value()) {
|
||||
columns.push_back(fuzz1104.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1105.has_value()) {
|
||||
columns.push_back(fuzz1105.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1106.has_value()) {
|
||||
columns.push_back(fuzz1106.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1107.has_value()) {
|
||||
columns.push_back(fuzz1107.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1108.has_value()) {
|
||||
columns.push_back(fuzz1108.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1109.has_value()) {
|
||||
columns.push_back(fuzz1109.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1110.has_value()) {
|
||||
columns.push_back(fuzz1110.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1111.has_value()) {
|
||||
columns.push_back(fuzz1111.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1112.has_value()) {
|
||||
columns.push_back(fuzz1112.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1113.has_value()) {
|
||||
columns.push_back(fuzz1113.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1114.has_value()) {
|
||||
columns.push_back(fuzz1114.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1115.has_value()) {
|
||||
columns.push_back(fuzz1115.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1116.has_value()) {
|
||||
columns.push_back(fuzz1116.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1117.has_value()) {
|
||||
columns.push_back(fuzz1117.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1118.has_value()) {
|
||||
columns.push_back(fuzz1118.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz1122.has_value()) {
|
||||
columns.push_back(fuzz1122.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
return columns;
|
||||
}
|
||||
|
||||
Collection<ComponentColumn> AffixFuzzer2::columns() {
|
||||
if (fuzz1101.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1101.value().length(), 1));
|
||||
}
|
||||
if (fuzz1102.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1102.value().length(), 1));
|
||||
}
|
||||
if (fuzz1103.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1103.value().length(), 1));
|
||||
}
|
||||
if (fuzz1104.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1104.value().length(), 1));
|
||||
}
|
||||
if (fuzz1105.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1105.value().length(), 1));
|
||||
}
|
||||
if (fuzz1106.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1106.value().length(), 1));
|
||||
}
|
||||
if (fuzz1107.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1107.value().length(), 1));
|
||||
}
|
||||
if (fuzz1108.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1108.value().length(), 1));
|
||||
}
|
||||
if (fuzz1109.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1109.value().length(), 1));
|
||||
}
|
||||
if (fuzz1110.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1110.value().length(), 1));
|
||||
}
|
||||
if (fuzz1111.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1111.value().length(), 1));
|
||||
}
|
||||
if (fuzz1112.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1112.value().length(), 1));
|
||||
}
|
||||
if (fuzz1113.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1113.value().length(), 1));
|
||||
}
|
||||
if (fuzz1114.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1114.value().length(), 1));
|
||||
}
|
||||
if (fuzz1115.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1115.value().length(), 1));
|
||||
}
|
||||
if (fuzz1116.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1116.value().length(), 1));
|
||||
}
|
||||
if (fuzz1117.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1117.value().length(), 1));
|
||||
}
|
||||
if (fuzz1118.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1118.value().length(), 1));
|
||||
}
|
||||
if (fuzz1122.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz1122.value().length(), 1));
|
||||
}
|
||||
return Collection<ComponentColumn>();
|
||||
}
|
||||
} // namespace rerun::archetypes
|
||||
|
||||
namespace rerun {
|
||||
|
||||
Result<Collection<ComponentBatch>> AsComponents<archetypes::AffixFuzzer2>::as_batches(
|
||||
const archetypes::AffixFuzzer2& archetype
|
||||
) {
|
||||
using namespace archetypes;
|
||||
std::vector<ComponentBatch> cells;
|
||||
cells.reserve(19);
|
||||
|
||||
if (archetype.fuzz1101.has_value()) {
|
||||
cells.push_back(archetype.fuzz1101.value());
|
||||
}
|
||||
if (archetype.fuzz1102.has_value()) {
|
||||
cells.push_back(archetype.fuzz1102.value());
|
||||
}
|
||||
if (archetype.fuzz1103.has_value()) {
|
||||
cells.push_back(archetype.fuzz1103.value());
|
||||
}
|
||||
if (archetype.fuzz1104.has_value()) {
|
||||
cells.push_back(archetype.fuzz1104.value());
|
||||
}
|
||||
if (archetype.fuzz1105.has_value()) {
|
||||
cells.push_back(archetype.fuzz1105.value());
|
||||
}
|
||||
if (archetype.fuzz1106.has_value()) {
|
||||
cells.push_back(archetype.fuzz1106.value());
|
||||
}
|
||||
if (archetype.fuzz1107.has_value()) {
|
||||
cells.push_back(archetype.fuzz1107.value());
|
||||
}
|
||||
if (archetype.fuzz1108.has_value()) {
|
||||
cells.push_back(archetype.fuzz1108.value());
|
||||
}
|
||||
if (archetype.fuzz1109.has_value()) {
|
||||
cells.push_back(archetype.fuzz1109.value());
|
||||
}
|
||||
if (archetype.fuzz1110.has_value()) {
|
||||
cells.push_back(archetype.fuzz1110.value());
|
||||
}
|
||||
if (archetype.fuzz1111.has_value()) {
|
||||
cells.push_back(archetype.fuzz1111.value());
|
||||
}
|
||||
if (archetype.fuzz1112.has_value()) {
|
||||
cells.push_back(archetype.fuzz1112.value());
|
||||
}
|
||||
if (archetype.fuzz1113.has_value()) {
|
||||
cells.push_back(archetype.fuzz1113.value());
|
||||
}
|
||||
if (archetype.fuzz1114.has_value()) {
|
||||
cells.push_back(archetype.fuzz1114.value());
|
||||
}
|
||||
if (archetype.fuzz1115.has_value()) {
|
||||
cells.push_back(archetype.fuzz1115.value());
|
||||
}
|
||||
if (archetype.fuzz1116.has_value()) {
|
||||
cells.push_back(archetype.fuzz1116.value());
|
||||
}
|
||||
if (archetype.fuzz1117.has_value()) {
|
||||
cells.push_back(archetype.fuzz1117.value());
|
||||
}
|
||||
if (archetype.fuzz1118.has_value()) {
|
||||
cells.push_back(archetype.fuzz1118.value());
|
||||
}
|
||||
if (archetype.fuzz1122.has_value()) {
|
||||
cells.push_back(archetype.fuzz1122.value());
|
||||
}
|
||||
|
||||
return rerun::take_ownership(std::move(cells));
|
||||
}
|
||||
} // namespace rerun
|
||||
+415
@@ -0,0 +1,415 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/archetypes/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../components/affix_fuzzer1.hpp"
|
||||
#include "../components/affix_fuzzer10.hpp"
|
||||
#include "../components/affix_fuzzer11.hpp"
|
||||
#include "../components/affix_fuzzer12.hpp"
|
||||
#include "../components/affix_fuzzer13.hpp"
|
||||
#include "../components/affix_fuzzer14.hpp"
|
||||
#include "../components/affix_fuzzer15.hpp"
|
||||
#include "../components/affix_fuzzer16.hpp"
|
||||
#include "../components/affix_fuzzer17.hpp"
|
||||
#include "../components/affix_fuzzer18.hpp"
|
||||
#include "../components/affix_fuzzer2.hpp"
|
||||
#include "../components/affix_fuzzer22.hpp"
|
||||
#include "../components/affix_fuzzer3.hpp"
|
||||
#include "../components/affix_fuzzer4.hpp"
|
||||
#include "../components/affix_fuzzer5.hpp"
|
||||
#include "../components/affix_fuzzer6.hpp"
|
||||
#include "../components/affix_fuzzer7.hpp"
|
||||
#include "../components/affix_fuzzer8.hpp"
|
||||
#include "../components/affix_fuzzer9.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
#include <rerun/collection.hpp>
|
||||
#include <rerun/component_batch.hpp>
|
||||
#include <rerun/component_column.hpp>
|
||||
#include <rerun/result.hpp>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace rerun::archetypes {
|
||||
struct AffixFuzzer2 {
|
||||
std::optional<ComponentBatch> fuzz1101;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1102;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1103;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1104;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1105;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1106;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1107;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1108;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1109;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1110;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1111;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1112;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1113;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1114;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1115;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1116;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1117;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1118;
|
||||
|
||||
std::optional<ComponentBatch> fuzz1122;
|
||||
|
||||
public:
|
||||
/// The name of the archetype as used in `ComponentDescriptor`s.
|
||||
static constexpr const char ArchetypeName[] = "rerun.testing.archetypes.AffixFuzzer2";
|
||||
|
||||
/// `ComponentDescriptor` for the `fuzz1101` field.
|
||||
static constexpr auto Descriptor_fuzz1101 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer2:fuzz1101",
|
||||
Loggable<rerun::components::AffixFuzzer1>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1102` field.
|
||||
static constexpr auto Descriptor_fuzz1102 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer2:fuzz1102",
|
||||
Loggable<rerun::components::AffixFuzzer2>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1103` field.
|
||||
static constexpr auto Descriptor_fuzz1103 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer2:fuzz1103",
|
||||
Loggable<rerun::components::AffixFuzzer3>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1104` field.
|
||||
static constexpr auto Descriptor_fuzz1104 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer2:fuzz1104",
|
||||
Loggable<rerun::components::AffixFuzzer4>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1105` field.
|
||||
static constexpr auto Descriptor_fuzz1105 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer2:fuzz1105",
|
||||
Loggable<rerun::components::AffixFuzzer5>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1106` field.
|
||||
static constexpr auto Descriptor_fuzz1106 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer2:fuzz1106",
|
||||
Loggable<rerun::components::AffixFuzzer6>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1107` field.
|
||||
static constexpr auto Descriptor_fuzz1107 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer2:fuzz1107",
|
||||
Loggable<rerun::components::AffixFuzzer7>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1108` field.
|
||||
static constexpr auto Descriptor_fuzz1108 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer2:fuzz1108",
|
||||
Loggable<rerun::components::AffixFuzzer8>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1109` field.
|
||||
static constexpr auto Descriptor_fuzz1109 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer2:fuzz1109",
|
||||
Loggable<rerun::components::AffixFuzzer9>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1110` field.
|
||||
static constexpr auto Descriptor_fuzz1110 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer2:fuzz1110",
|
||||
Loggable<rerun::components::AffixFuzzer10>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1111` field.
|
||||
static constexpr auto Descriptor_fuzz1111 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer2:fuzz1111",
|
||||
Loggable<rerun::components::AffixFuzzer11>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1112` field.
|
||||
static constexpr auto Descriptor_fuzz1112 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer2:fuzz1112",
|
||||
Loggable<rerun::components::AffixFuzzer12>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1113` field.
|
||||
static constexpr auto Descriptor_fuzz1113 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer2:fuzz1113",
|
||||
Loggable<rerun::components::AffixFuzzer13>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1114` field.
|
||||
static constexpr auto Descriptor_fuzz1114 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer2:fuzz1114",
|
||||
Loggable<rerun::components::AffixFuzzer14>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1115` field.
|
||||
static constexpr auto Descriptor_fuzz1115 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer2:fuzz1115",
|
||||
Loggable<rerun::components::AffixFuzzer15>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1116` field.
|
||||
static constexpr auto Descriptor_fuzz1116 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer2:fuzz1116",
|
||||
Loggable<rerun::components::AffixFuzzer16>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1117` field.
|
||||
static constexpr auto Descriptor_fuzz1117 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer2:fuzz1117",
|
||||
Loggable<rerun::components::AffixFuzzer17>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1118` field.
|
||||
static constexpr auto Descriptor_fuzz1118 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer2:fuzz1118",
|
||||
Loggable<rerun::components::AffixFuzzer18>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz1122` field.
|
||||
static constexpr auto Descriptor_fuzz1122 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer2:fuzz1122",
|
||||
Loggable<rerun::components::AffixFuzzer22>::ComponentType
|
||||
);
|
||||
|
||||
public:
|
||||
AffixFuzzer2() = default;
|
||||
AffixFuzzer2(AffixFuzzer2&& other) = default;
|
||||
AffixFuzzer2(const AffixFuzzer2& other) = default;
|
||||
AffixFuzzer2& operator=(const AffixFuzzer2& other) = default;
|
||||
AffixFuzzer2& operator=(AffixFuzzer2&& other) = default;
|
||||
|
||||
explicit AffixFuzzer2(
|
||||
Collection<rerun::components::AffixFuzzer1> _fuzz1101,
|
||||
Collection<rerun::components::AffixFuzzer2> _fuzz1102,
|
||||
Collection<rerun::components::AffixFuzzer3> _fuzz1103,
|
||||
Collection<rerun::components::AffixFuzzer4> _fuzz1104,
|
||||
Collection<rerun::components::AffixFuzzer5> _fuzz1105,
|
||||
Collection<rerun::components::AffixFuzzer6> _fuzz1106,
|
||||
Collection<rerun::components::AffixFuzzer7> _fuzz1107,
|
||||
Collection<rerun::components::AffixFuzzer8> _fuzz1108,
|
||||
Collection<rerun::components::AffixFuzzer9> _fuzz1109,
|
||||
Collection<rerun::components::AffixFuzzer10> _fuzz1110,
|
||||
Collection<rerun::components::AffixFuzzer11> _fuzz1111,
|
||||
Collection<rerun::components::AffixFuzzer12> _fuzz1112,
|
||||
Collection<rerun::components::AffixFuzzer13> _fuzz1113,
|
||||
Collection<rerun::components::AffixFuzzer14> _fuzz1114,
|
||||
Collection<rerun::components::AffixFuzzer15> _fuzz1115,
|
||||
Collection<rerun::components::AffixFuzzer16> _fuzz1116,
|
||||
Collection<rerun::components::AffixFuzzer17> _fuzz1117,
|
||||
Collection<rerun::components::AffixFuzzer18> _fuzz1118,
|
||||
Collection<rerun::components::AffixFuzzer22> _fuzz1122
|
||||
)
|
||||
: fuzz1101(ComponentBatch::from_loggable(std::move(_fuzz1101), Descriptor_fuzz1101)
|
||||
.value_or_throw()),
|
||||
fuzz1102(ComponentBatch::from_loggable(std::move(_fuzz1102), Descriptor_fuzz1102)
|
||||
.value_or_throw()),
|
||||
fuzz1103(ComponentBatch::from_loggable(std::move(_fuzz1103), Descriptor_fuzz1103)
|
||||
.value_or_throw()),
|
||||
fuzz1104(ComponentBatch::from_loggable(std::move(_fuzz1104), Descriptor_fuzz1104)
|
||||
.value_or_throw()),
|
||||
fuzz1105(ComponentBatch::from_loggable(std::move(_fuzz1105), Descriptor_fuzz1105)
|
||||
.value_or_throw()),
|
||||
fuzz1106(ComponentBatch::from_loggable(std::move(_fuzz1106), Descriptor_fuzz1106)
|
||||
.value_or_throw()),
|
||||
fuzz1107(ComponentBatch::from_loggable(std::move(_fuzz1107), Descriptor_fuzz1107)
|
||||
.value_or_throw()),
|
||||
fuzz1108(ComponentBatch::from_loggable(std::move(_fuzz1108), Descriptor_fuzz1108)
|
||||
.value_or_throw()),
|
||||
fuzz1109(ComponentBatch::from_loggable(std::move(_fuzz1109), Descriptor_fuzz1109)
|
||||
.value_or_throw()),
|
||||
fuzz1110(ComponentBatch::from_loggable(std::move(_fuzz1110), Descriptor_fuzz1110)
|
||||
.value_or_throw()),
|
||||
fuzz1111(ComponentBatch::from_loggable(std::move(_fuzz1111), Descriptor_fuzz1111)
|
||||
.value_or_throw()),
|
||||
fuzz1112(ComponentBatch::from_loggable(std::move(_fuzz1112), Descriptor_fuzz1112)
|
||||
.value_or_throw()),
|
||||
fuzz1113(ComponentBatch::from_loggable(std::move(_fuzz1113), Descriptor_fuzz1113)
|
||||
.value_or_throw()),
|
||||
fuzz1114(ComponentBatch::from_loggable(std::move(_fuzz1114), Descriptor_fuzz1114)
|
||||
.value_or_throw()),
|
||||
fuzz1115(ComponentBatch::from_loggable(std::move(_fuzz1115), Descriptor_fuzz1115)
|
||||
.value_or_throw()),
|
||||
fuzz1116(ComponentBatch::from_loggable(std::move(_fuzz1116), Descriptor_fuzz1116)
|
||||
.value_or_throw()),
|
||||
fuzz1117(ComponentBatch::from_loggable(std::move(_fuzz1117), Descriptor_fuzz1117)
|
||||
.value_or_throw()),
|
||||
fuzz1118(ComponentBatch::from_loggable(std::move(_fuzz1118), Descriptor_fuzz1118)
|
||||
.value_or_throw()),
|
||||
fuzz1122(ComponentBatch::from_loggable(std::move(_fuzz1122), Descriptor_fuzz1122)
|
||||
.value_or_throw()) {}
|
||||
|
||||
/// Update only some specific fields of a `AffixFuzzer2`.
|
||||
static AffixFuzzer2 update_fields() {
|
||||
return AffixFuzzer2();
|
||||
}
|
||||
|
||||
/// Clear all the fields of a `AffixFuzzer2`.
|
||||
static AffixFuzzer2 clear_fields();
|
||||
|
||||
AffixFuzzer2 with_fuzz1101(const Collection<rerun::components::AffixFuzzer1>& _fuzz1101
|
||||
) && {
|
||||
fuzz1101 =
|
||||
ComponentBatch::from_loggable(_fuzz1101, Descriptor_fuzz1101).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer2 with_fuzz1102(const Collection<rerun::components::AffixFuzzer2>& _fuzz1102
|
||||
) && {
|
||||
fuzz1102 =
|
||||
ComponentBatch::from_loggable(_fuzz1102, Descriptor_fuzz1102).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer2 with_fuzz1103(const Collection<rerun::components::AffixFuzzer3>& _fuzz1103
|
||||
) && {
|
||||
fuzz1103 =
|
||||
ComponentBatch::from_loggable(_fuzz1103, Descriptor_fuzz1103).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer2 with_fuzz1104(const Collection<rerun::components::AffixFuzzer4>& _fuzz1104
|
||||
) && {
|
||||
fuzz1104 =
|
||||
ComponentBatch::from_loggable(_fuzz1104, Descriptor_fuzz1104).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer2 with_fuzz1105(const Collection<rerun::components::AffixFuzzer5>& _fuzz1105
|
||||
) && {
|
||||
fuzz1105 =
|
||||
ComponentBatch::from_loggable(_fuzz1105, Descriptor_fuzz1105).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer2 with_fuzz1106(const Collection<rerun::components::AffixFuzzer6>& _fuzz1106
|
||||
) && {
|
||||
fuzz1106 =
|
||||
ComponentBatch::from_loggable(_fuzz1106, Descriptor_fuzz1106).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer2 with_fuzz1107(const Collection<rerun::components::AffixFuzzer7>& _fuzz1107
|
||||
) && {
|
||||
fuzz1107 =
|
||||
ComponentBatch::from_loggable(_fuzz1107, Descriptor_fuzz1107).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer2 with_fuzz1108(const Collection<rerun::components::AffixFuzzer8>& _fuzz1108
|
||||
) && {
|
||||
fuzz1108 =
|
||||
ComponentBatch::from_loggable(_fuzz1108, Descriptor_fuzz1108).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer2 with_fuzz1109(const Collection<rerun::components::AffixFuzzer9>& _fuzz1109
|
||||
) && {
|
||||
fuzz1109 =
|
||||
ComponentBatch::from_loggable(_fuzz1109, Descriptor_fuzz1109).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer2 with_fuzz1110(const Collection<rerun::components::AffixFuzzer10>& _fuzz1110
|
||||
) && {
|
||||
fuzz1110 =
|
||||
ComponentBatch::from_loggable(_fuzz1110, Descriptor_fuzz1110).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer2 with_fuzz1111(const Collection<rerun::components::AffixFuzzer11>& _fuzz1111
|
||||
) && {
|
||||
fuzz1111 =
|
||||
ComponentBatch::from_loggable(_fuzz1111, Descriptor_fuzz1111).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer2 with_fuzz1112(const Collection<rerun::components::AffixFuzzer12>& _fuzz1112
|
||||
) && {
|
||||
fuzz1112 =
|
||||
ComponentBatch::from_loggable(_fuzz1112, Descriptor_fuzz1112).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer2 with_fuzz1113(const Collection<rerun::components::AffixFuzzer13>& _fuzz1113
|
||||
) && {
|
||||
fuzz1113 =
|
||||
ComponentBatch::from_loggable(_fuzz1113, Descriptor_fuzz1113).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer2 with_fuzz1114(const Collection<rerun::components::AffixFuzzer14>& _fuzz1114
|
||||
) && {
|
||||
fuzz1114 =
|
||||
ComponentBatch::from_loggable(_fuzz1114, Descriptor_fuzz1114).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer2 with_fuzz1115(const Collection<rerun::components::AffixFuzzer15>& _fuzz1115
|
||||
) && {
|
||||
fuzz1115 =
|
||||
ComponentBatch::from_loggable(_fuzz1115, Descriptor_fuzz1115).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer2 with_fuzz1116(const Collection<rerun::components::AffixFuzzer16>& _fuzz1116
|
||||
) && {
|
||||
fuzz1116 =
|
||||
ComponentBatch::from_loggable(_fuzz1116, Descriptor_fuzz1116).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer2 with_fuzz1117(const Collection<rerun::components::AffixFuzzer17>& _fuzz1117
|
||||
) && {
|
||||
fuzz1117 =
|
||||
ComponentBatch::from_loggable(_fuzz1117, Descriptor_fuzz1117).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer2 with_fuzz1118(const Collection<rerun::components::AffixFuzzer18>& _fuzz1118
|
||||
) && {
|
||||
fuzz1118 =
|
||||
ComponentBatch::from_loggable(_fuzz1118, Descriptor_fuzz1118).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer2 with_fuzz1122(const Collection<rerun::components::AffixFuzzer22>& _fuzz1122
|
||||
) && {
|
||||
fuzz1122 =
|
||||
ComponentBatch::from_loggable(_fuzz1122, Descriptor_fuzz1122).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// Partitions the component data into multiple sub-batches.
|
||||
///
|
||||
/// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s
|
||||
/// instead, via `ComponentBatch::partitioned`.
|
||||
///
|
||||
/// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun.
|
||||
///
|
||||
/// The specified `lengths` must sum to the total length of the component batch.
|
||||
Collection<ComponentColumn> columns(const Collection<uint32_t>& lengths_);
|
||||
|
||||
/// Partitions the component data into unit-length sub-batches.
|
||||
///
|
||||
/// This is semantically similar to calling `columns` with `std::vector<uint32_t>(n, 1)`,
|
||||
/// where `n` is automatically guessed.
|
||||
Collection<ComponentColumn> columns();
|
||||
};
|
||||
|
||||
} // namespace rerun::archetypes
|
||||
|
||||
namespace rerun {
|
||||
/// \private
|
||||
template <typename T>
|
||||
struct AsComponents;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct AsComponents<archetypes::AffixFuzzer2> {
|
||||
/// Serialize all set component batches.
|
||||
static Result<Collection<ComponentBatch>> as_batches(
|
||||
const archetypes::AffixFuzzer2& archetype
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
+253
@@ -0,0 +1,253 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/archetypes/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer3.hpp"
|
||||
|
||||
#include <rerun/collection_adapter_builtins.hpp>
|
||||
|
||||
namespace rerun::archetypes {
|
||||
AffixFuzzer3 AffixFuzzer3::clear_fields() {
|
||||
auto archetype = AffixFuzzer3();
|
||||
archetype.fuzz2001 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer1>(Descriptor_fuzz2001)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2002 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer2>(Descriptor_fuzz2002)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2003 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer3>(Descriptor_fuzz2003)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2004 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer4>(Descriptor_fuzz2004)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2005 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer5>(Descriptor_fuzz2005)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2006 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer6>(Descriptor_fuzz2006)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2007 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer7>(Descriptor_fuzz2007)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2008 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer8>(Descriptor_fuzz2008)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2009 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer9>(Descriptor_fuzz2009)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2010 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer10>(Descriptor_fuzz2010)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2011 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer11>(Descriptor_fuzz2011)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2012 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer12>(Descriptor_fuzz2012)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2013 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer13>(Descriptor_fuzz2013)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2014 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer14>(Descriptor_fuzz2014)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2015 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer15>(Descriptor_fuzz2015)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2016 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer16>(Descriptor_fuzz2016)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2017 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer17>(Descriptor_fuzz2017)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2018 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer18>(Descriptor_fuzz2018)
|
||||
.value_or_throw();
|
||||
return archetype;
|
||||
}
|
||||
|
||||
Collection<ComponentColumn> AffixFuzzer3::columns(const Collection<uint32_t>& lengths_) {
|
||||
std::vector<ComponentColumn> columns;
|
||||
columns.reserve(18);
|
||||
if (fuzz2001.has_value()) {
|
||||
columns.push_back(fuzz2001.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2002.has_value()) {
|
||||
columns.push_back(fuzz2002.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2003.has_value()) {
|
||||
columns.push_back(fuzz2003.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2004.has_value()) {
|
||||
columns.push_back(fuzz2004.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2005.has_value()) {
|
||||
columns.push_back(fuzz2005.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2006.has_value()) {
|
||||
columns.push_back(fuzz2006.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2007.has_value()) {
|
||||
columns.push_back(fuzz2007.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2008.has_value()) {
|
||||
columns.push_back(fuzz2008.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2009.has_value()) {
|
||||
columns.push_back(fuzz2009.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2010.has_value()) {
|
||||
columns.push_back(fuzz2010.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2011.has_value()) {
|
||||
columns.push_back(fuzz2011.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2012.has_value()) {
|
||||
columns.push_back(fuzz2012.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2013.has_value()) {
|
||||
columns.push_back(fuzz2013.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2014.has_value()) {
|
||||
columns.push_back(fuzz2014.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2015.has_value()) {
|
||||
columns.push_back(fuzz2015.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2016.has_value()) {
|
||||
columns.push_back(fuzz2016.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2017.has_value()) {
|
||||
columns.push_back(fuzz2017.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2018.has_value()) {
|
||||
columns.push_back(fuzz2018.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
return columns;
|
||||
}
|
||||
|
||||
Collection<ComponentColumn> AffixFuzzer3::columns() {
|
||||
if (fuzz2001.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2001.value().length(), 1));
|
||||
}
|
||||
if (fuzz2002.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2002.value().length(), 1));
|
||||
}
|
||||
if (fuzz2003.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2003.value().length(), 1));
|
||||
}
|
||||
if (fuzz2004.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2004.value().length(), 1));
|
||||
}
|
||||
if (fuzz2005.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2005.value().length(), 1));
|
||||
}
|
||||
if (fuzz2006.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2006.value().length(), 1));
|
||||
}
|
||||
if (fuzz2007.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2007.value().length(), 1));
|
||||
}
|
||||
if (fuzz2008.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2008.value().length(), 1));
|
||||
}
|
||||
if (fuzz2009.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2009.value().length(), 1));
|
||||
}
|
||||
if (fuzz2010.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2010.value().length(), 1));
|
||||
}
|
||||
if (fuzz2011.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2011.value().length(), 1));
|
||||
}
|
||||
if (fuzz2012.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2012.value().length(), 1));
|
||||
}
|
||||
if (fuzz2013.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2013.value().length(), 1));
|
||||
}
|
||||
if (fuzz2014.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2014.value().length(), 1));
|
||||
}
|
||||
if (fuzz2015.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2015.value().length(), 1));
|
||||
}
|
||||
if (fuzz2016.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2016.value().length(), 1));
|
||||
}
|
||||
if (fuzz2017.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2017.value().length(), 1));
|
||||
}
|
||||
if (fuzz2018.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2018.value().length(), 1));
|
||||
}
|
||||
return Collection<ComponentColumn>();
|
||||
}
|
||||
} // namespace rerun::archetypes
|
||||
|
||||
namespace rerun {
|
||||
|
||||
Result<Collection<ComponentBatch>> AsComponents<archetypes::AffixFuzzer3>::as_batches(
|
||||
const archetypes::AffixFuzzer3& archetype
|
||||
) {
|
||||
using namespace archetypes;
|
||||
std::vector<ComponentBatch> cells;
|
||||
cells.reserve(18);
|
||||
|
||||
if (archetype.fuzz2001.has_value()) {
|
||||
cells.push_back(archetype.fuzz2001.value());
|
||||
}
|
||||
if (archetype.fuzz2002.has_value()) {
|
||||
cells.push_back(archetype.fuzz2002.value());
|
||||
}
|
||||
if (archetype.fuzz2003.has_value()) {
|
||||
cells.push_back(archetype.fuzz2003.value());
|
||||
}
|
||||
if (archetype.fuzz2004.has_value()) {
|
||||
cells.push_back(archetype.fuzz2004.value());
|
||||
}
|
||||
if (archetype.fuzz2005.has_value()) {
|
||||
cells.push_back(archetype.fuzz2005.value());
|
||||
}
|
||||
if (archetype.fuzz2006.has_value()) {
|
||||
cells.push_back(archetype.fuzz2006.value());
|
||||
}
|
||||
if (archetype.fuzz2007.has_value()) {
|
||||
cells.push_back(archetype.fuzz2007.value());
|
||||
}
|
||||
if (archetype.fuzz2008.has_value()) {
|
||||
cells.push_back(archetype.fuzz2008.value());
|
||||
}
|
||||
if (archetype.fuzz2009.has_value()) {
|
||||
cells.push_back(archetype.fuzz2009.value());
|
||||
}
|
||||
if (archetype.fuzz2010.has_value()) {
|
||||
cells.push_back(archetype.fuzz2010.value());
|
||||
}
|
||||
if (archetype.fuzz2011.has_value()) {
|
||||
cells.push_back(archetype.fuzz2011.value());
|
||||
}
|
||||
if (archetype.fuzz2012.has_value()) {
|
||||
cells.push_back(archetype.fuzz2012.value());
|
||||
}
|
||||
if (archetype.fuzz2013.has_value()) {
|
||||
cells.push_back(archetype.fuzz2013.value());
|
||||
}
|
||||
if (archetype.fuzz2014.has_value()) {
|
||||
cells.push_back(archetype.fuzz2014.value());
|
||||
}
|
||||
if (archetype.fuzz2015.has_value()) {
|
||||
cells.push_back(archetype.fuzz2015.value());
|
||||
}
|
||||
if (archetype.fuzz2016.has_value()) {
|
||||
cells.push_back(archetype.fuzz2016.value());
|
||||
}
|
||||
if (archetype.fuzz2017.has_value()) {
|
||||
cells.push_back(archetype.fuzz2017.value());
|
||||
}
|
||||
if (archetype.fuzz2018.has_value()) {
|
||||
cells.push_back(archetype.fuzz2018.value());
|
||||
}
|
||||
|
||||
return rerun::take_ownership(std::move(cells));
|
||||
}
|
||||
} // namespace rerun
|
||||
+529
@@ -0,0 +1,529 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/archetypes/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../components/affix_fuzzer1.hpp"
|
||||
#include "../components/affix_fuzzer10.hpp"
|
||||
#include "../components/affix_fuzzer11.hpp"
|
||||
#include "../components/affix_fuzzer12.hpp"
|
||||
#include "../components/affix_fuzzer13.hpp"
|
||||
#include "../components/affix_fuzzer14.hpp"
|
||||
#include "../components/affix_fuzzer15.hpp"
|
||||
#include "../components/affix_fuzzer16.hpp"
|
||||
#include "../components/affix_fuzzer17.hpp"
|
||||
#include "../components/affix_fuzzer18.hpp"
|
||||
#include "../components/affix_fuzzer2.hpp"
|
||||
#include "../components/affix_fuzzer3.hpp"
|
||||
#include "../components/affix_fuzzer4.hpp"
|
||||
#include "../components/affix_fuzzer5.hpp"
|
||||
#include "../components/affix_fuzzer6.hpp"
|
||||
#include "../components/affix_fuzzer7.hpp"
|
||||
#include "../components/affix_fuzzer8.hpp"
|
||||
#include "../components/affix_fuzzer9.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
#include <rerun/collection.hpp>
|
||||
#include <rerun/component_batch.hpp>
|
||||
#include <rerun/component_column.hpp>
|
||||
#include <rerun/result.hpp>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace rerun::archetypes {
|
||||
struct AffixFuzzer3 {
|
||||
std::optional<ComponentBatch> fuzz2001;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2002;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2003;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2004;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2005;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2006;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2007;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2008;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2009;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2010;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2011;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2012;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2013;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2014;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2015;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2016;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2017;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2018;
|
||||
|
||||
public:
|
||||
/// The name of the archetype as used in `ComponentDescriptor`s.
|
||||
static constexpr const char ArchetypeName[] = "rerun.testing.archetypes.AffixFuzzer3";
|
||||
|
||||
/// `ComponentDescriptor` for the `fuzz2001` field.
|
||||
static constexpr auto Descriptor_fuzz2001 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer3:fuzz2001",
|
||||
Loggable<rerun::components::AffixFuzzer1>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2002` field.
|
||||
static constexpr auto Descriptor_fuzz2002 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer3:fuzz2002",
|
||||
Loggable<rerun::components::AffixFuzzer2>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2003` field.
|
||||
static constexpr auto Descriptor_fuzz2003 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer3:fuzz2003",
|
||||
Loggable<rerun::components::AffixFuzzer3>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2004` field.
|
||||
static constexpr auto Descriptor_fuzz2004 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer3:fuzz2004",
|
||||
Loggable<rerun::components::AffixFuzzer4>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2005` field.
|
||||
static constexpr auto Descriptor_fuzz2005 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer3:fuzz2005",
|
||||
Loggable<rerun::components::AffixFuzzer5>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2006` field.
|
||||
static constexpr auto Descriptor_fuzz2006 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer3:fuzz2006",
|
||||
Loggable<rerun::components::AffixFuzzer6>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2007` field.
|
||||
static constexpr auto Descriptor_fuzz2007 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer3:fuzz2007",
|
||||
Loggable<rerun::components::AffixFuzzer7>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2008` field.
|
||||
static constexpr auto Descriptor_fuzz2008 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer3:fuzz2008",
|
||||
Loggable<rerun::components::AffixFuzzer8>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2009` field.
|
||||
static constexpr auto Descriptor_fuzz2009 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer3:fuzz2009",
|
||||
Loggable<rerun::components::AffixFuzzer9>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2010` field.
|
||||
static constexpr auto Descriptor_fuzz2010 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer3:fuzz2010",
|
||||
Loggable<rerun::components::AffixFuzzer10>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2011` field.
|
||||
static constexpr auto Descriptor_fuzz2011 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer3:fuzz2011",
|
||||
Loggable<rerun::components::AffixFuzzer11>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2012` field.
|
||||
static constexpr auto Descriptor_fuzz2012 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer3:fuzz2012",
|
||||
Loggable<rerun::components::AffixFuzzer12>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2013` field.
|
||||
static constexpr auto Descriptor_fuzz2013 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer3:fuzz2013",
|
||||
Loggable<rerun::components::AffixFuzzer13>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2014` field.
|
||||
static constexpr auto Descriptor_fuzz2014 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer3:fuzz2014",
|
||||
Loggable<rerun::components::AffixFuzzer14>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2015` field.
|
||||
static constexpr auto Descriptor_fuzz2015 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer3:fuzz2015",
|
||||
Loggable<rerun::components::AffixFuzzer15>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2016` field.
|
||||
static constexpr auto Descriptor_fuzz2016 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer3:fuzz2016",
|
||||
Loggable<rerun::components::AffixFuzzer16>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2017` field.
|
||||
static constexpr auto Descriptor_fuzz2017 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer3:fuzz2017",
|
||||
Loggable<rerun::components::AffixFuzzer17>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2018` field.
|
||||
static constexpr auto Descriptor_fuzz2018 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer3:fuzz2018",
|
||||
Loggable<rerun::components::AffixFuzzer18>::ComponentType
|
||||
);
|
||||
|
||||
public:
|
||||
AffixFuzzer3() = default;
|
||||
AffixFuzzer3(AffixFuzzer3&& other) = default;
|
||||
AffixFuzzer3(const AffixFuzzer3& other) = default;
|
||||
AffixFuzzer3& operator=(const AffixFuzzer3& other) = default;
|
||||
AffixFuzzer3& operator=(AffixFuzzer3&& other) = default;
|
||||
|
||||
/// Update only some specific fields of a `AffixFuzzer3`.
|
||||
static AffixFuzzer3 update_fields() {
|
||||
return AffixFuzzer3();
|
||||
}
|
||||
|
||||
/// Clear all the fields of a `AffixFuzzer3`.
|
||||
static AffixFuzzer3 clear_fields();
|
||||
|
||||
AffixFuzzer3 with_fuzz2001(const rerun::components::AffixFuzzer1& _fuzz2001) && {
|
||||
fuzz2001 =
|
||||
ComponentBatch::from_loggable(_fuzz2001, Descriptor_fuzz2001).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz2001` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz2001` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer3 with_many_fuzz2001(const Collection<rerun::components::AffixFuzzer1>& _fuzz2001
|
||||
) && {
|
||||
fuzz2001 =
|
||||
ComponentBatch::from_loggable(_fuzz2001, Descriptor_fuzz2001).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer3 with_fuzz2002(const rerun::components::AffixFuzzer2& _fuzz2002) && {
|
||||
fuzz2002 =
|
||||
ComponentBatch::from_loggable(_fuzz2002, Descriptor_fuzz2002).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz2002` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz2002` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer3 with_many_fuzz2002(const Collection<rerun::components::AffixFuzzer2>& _fuzz2002
|
||||
) && {
|
||||
fuzz2002 =
|
||||
ComponentBatch::from_loggable(_fuzz2002, Descriptor_fuzz2002).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer3 with_fuzz2003(const rerun::components::AffixFuzzer3& _fuzz2003) && {
|
||||
fuzz2003 =
|
||||
ComponentBatch::from_loggable(_fuzz2003, Descriptor_fuzz2003).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz2003` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz2003` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer3 with_many_fuzz2003(const Collection<rerun::components::AffixFuzzer3>& _fuzz2003
|
||||
) && {
|
||||
fuzz2003 =
|
||||
ComponentBatch::from_loggable(_fuzz2003, Descriptor_fuzz2003).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer3 with_fuzz2004(const rerun::components::AffixFuzzer4& _fuzz2004) && {
|
||||
fuzz2004 =
|
||||
ComponentBatch::from_loggable(_fuzz2004, Descriptor_fuzz2004).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz2004` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz2004` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer3 with_many_fuzz2004(const Collection<rerun::components::AffixFuzzer4>& _fuzz2004
|
||||
) && {
|
||||
fuzz2004 =
|
||||
ComponentBatch::from_loggable(_fuzz2004, Descriptor_fuzz2004).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer3 with_fuzz2005(const rerun::components::AffixFuzzer5& _fuzz2005) && {
|
||||
fuzz2005 =
|
||||
ComponentBatch::from_loggable(_fuzz2005, Descriptor_fuzz2005).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz2005` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz2005` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer3 with_many_fuzz2005(const Collection<rerun::components::AffixFuzzer5>& _fuzz2005
|
||||
) && {
|
||||
fuzz2005 =
|
||||
ComponentBatch::from_loggable(_fuzz2005, Descriptor_fuzz2005).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer3 with_fuzz2006(const rerun::components::AffixFuzzer6& _fuzz2006) && {
|
||||
fuzz2006 =
|
||||
ComponentBatch::from_loggable(_fuzz2006, Descriptor_fuzz2006).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz2006` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz2006` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer3 with_many_fuzz2006(const Collection<rerun::components::AffixFuzzer6>& _fuzz2006
|
||||
) && {
|
||||
fuzz2006 =
|
||||
ComponentBatch::from_loggable(_fuzz2006, Descriptor_fuzz2006).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer3 with_fuzz2007(const rerun::components::AffixFuzzer7& _fuzz2007) && {
|
||||
fuzz2007 =
|
||||
ComponentBatch::from_loggable(_fuzz2007, Descriptor_fuzz2007).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz2007` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz2007` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer3 with_many_fuzz2007(const Collection<rerun::components::AffixFuzzer7>& _fuzz2007
|
||||
) && {
|
||||
fuzz2007 =
|
||||
ComponentBatch::from_loggable(_fuzz2007, Descriptor_fuzz2007).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer3 with_fuzz2008(const rerun::components::AffixFuzzer8& _fuzz2008) && {
|
||||
fuzz2008 =
|
||||
ComponentBatch::from_loggable(_fuzz2008, Descriptor_fuzz2008).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz2008` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz2008` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer3 with_many_fuzz2008(const Collection<rerun::components::AffixFuzzer8>& _fuzz2008
|
||||
) && {
|
||||
fuzz2008 =
|
||||
ComponentBatch::from_loggable(_fuzz2008, Descriptor_fuzz2008).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer3 with_fuzz2009(const rerun::components::AffixFuzzer9& _fuzz2009) && {
|
||||
fuzz2009 =
|
||||
ComponentBatch::from_loggable(_fuzz2009, Descriptor_fuzz2009).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz2009` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz2009` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer3 with_many_fuzz2009(const Collection<rerun::components::AffixFuzzer9>& _fuzz2009
|
||||
) && {
|
||||
fuzz2009 =
|
||||
ComponentBatch::from_loggable(_fuzz2009, Descriptor_fuzz2009).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer3 with_fuzz2010(const rerun::components::AffixFuzzer10& _fuzz2010) && {
|
||||
fuzz2010 =
|
||||
ComponentBatch::from_loggable(_fuzz2010, Descriptor_fuzz2010).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz2010` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz2010` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer3 with_many_fuzz2010(
|
||||
const Collection<rerun::components::AffixFuzzer10>& _fuzz2010
|
||||
) && {
|
||||
fuzz2010 =
|
||||
ComponentBatch::from_loggable(_fuzz2010, Descriptor_fuzz2010).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer3 with_fuzz2011(const rerun::components::AffixFuzzer11& _fuzz2011) && {
|
||||
fuzz2011 =
|
||||
ComponentBatch::from_loggable(_fuzz2011, Descriptor_fuzz2011).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz2011` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz2011` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer3 with_many_fuzz2011(
|
||||
const Collection<rerun::components::AffixFuzzer11>& _fuzz2011
|
||||
) && {
|
||||
fuzz2011 =
|
||||
ComponentBatch::from_loggable(_fuzz2011, Descriptor_fuzz2011).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer3 with_fuzz2012(const rerun::components::AffixFuzzer12& _fuzz2012) && {
|
||||
fuzz2012 =
|
||||
ComponentBatch::from_loggable(_fuzz2012, Descriptor_fuzz2012).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz2012` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz2012` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer3 with_many_fuzz2012(
|
||||
const Collection<rerun::components::AffixFuzzer12>& _fuzz2012
|
||||
) && {
|
||||
fuzz2012 =
|
||||
ComponentBatch::from_loggable(_fuzz2012, Descriptor_fuzz2012).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer3 with_fuzz2013(const rerun::components::AffixFuzzer13& _fuzz2013) && {
|
||||
fuzz2013 =
|
||||
ComponentBatch::from_loggable(_fuzz2013, Descriptor_fuzz2013).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz2013` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz2013` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer3 with_many_fuzz2013(
|
||||
const Collection<rerun::components::AffixFuzzer13>& _fuzz2013
|
||||
) && {
|
||||
fuzz2013 =
|
||||
ComponentBatch::from_loggable(_fuzz2013, Descriptor_fuzz2013).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer3 with_fuzz2014(const rerun::components::AffixFuzzer14& _fuzz2014) && {
|
||||
fuzz2014 =
|
||||
ComponentBatch::from_loggable(_fuzz2014, Descriptor_fuzz2014).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz2014` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz2014` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer3 with_many_fuzz2014(
|
||||
const Collection<rerun::components::AffixFuzzer14>& _fuzz2014
|
||||
) && {
|
||||
fuzz2014 =
|
||||
ComponentBatch::from_loggable(_fuzz2014, Descriptor_fuzz2014).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer3 with_fuzz2015(const rerun::components::AffixFuzzer15& _fuzz2015) && {
|
||||
fuzz2015 =
|
||||
ComponentBatch::from_loggable(_fuzz2015, Descriptor_fuzz2015).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz2015` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz2015` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer3 with_many_fuzz2015(
|
||||
const Collection<rerun::components::AffixFuzzer15>& _fuzz2015
|
||||
) && {
|
||||
fuzz2015 =
|
||||
ComponentBatch::from_loggable(_fuzz2015, Descriptor_fuzz2015).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer3 with_fuzz2016(const rerun::components::AffixFuzzer16& _fuzz2016) && {
|
||||
fuzz2016 =
|
||||
ComponentBatch::from_loggable(_fuzz2016, Descriptor_fuzz2016).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz2016` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz2016` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer3 with_many_fuzz2016(
|
||||
const Collection<rerun::components::AffixFuzzer16>& _fuzz2016
|
||||
) && {
|
||||
fuzz2016 =
|
||||
ComponentBatch::from_loggable(_fuzz2016, Descriptor_fuzz2016).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer3 with_fuzz2017(const rerun::components::AffixFuzzer17& _fuzz2017) && {
|
||||
fuzz2017 =
|
||||
ComponentBatch::from_loggable(_fuzz2017, Descriptor_fuzz2017).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz2017` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz2017` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer3 with_many_fuzz2017(
|
||||
const Collection<rerun::components::AffixFuzzer17>& _fuzz2017
|
||||
) && {
|
||||
fuzz2017 =
|
||||
ComponentBatch::from_loggable(_fuzz2017, Descriptor_fuzz2017).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer3 with_fuzz2018(const rerun::components::AffixFuzzer18& _fuzz2018) && {
|
||||
fuzz2018 =
|
||||
ComponentBatch::from_loggable(_fuzz2018, Descriptor_fuzz2018).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// This method makes it possible to pack multiple `fuzz2018` in a single component batch.
|
||||
///
|
||||
/// This only makes sense when used in conjunction with `columns`. `with_fuzz2018` should
|
||||
/// be used when logging a single row's worth of data.
|
||||
AffixFuzzer3 with_many_fuzz2018(
|
||||
const Collection<rerun::components::AffixFuzzer18>& _fuzz2018
|
||||
) && {
|
||||
fuzz2018 =
|
||||
ComponentBatch::from_loggable(_fuzz2018, Descriptor_fuzz2018).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// Partitions the component data into multiple sub-batches.
|
||||
///
|
||||
/// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s
|
||||
/// instead, via `ComponentBatch::partitioned`.
|
||||
///
|
||||
/// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun.
|
||||
///
|
||||
/// The specified `lengths` must sum to the total length of the component batch.
|
||||
Collection<ComponentColumn> columns(const Collection<uint32_t>& lengths_);
|
||||
|
||||
/// Partitions the component data into unit-length sub-batches.
|
||||
///
|
||||
/// This is semantically similar to calling `columns` with `std::vector<uint32_t>(n, 1)`,
|
||||
/// where `n` is automatically guessed.
|
||||
Collection<ComponentColumn> columns();
|
||||
};
|
||||
|
||||
} // namespace rerun::archetypes
|
||||
|
||||
namespace rerun {
|
||||
/// \private
|
||||
template <typename T>
|
||||
struct AsComponents;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct AsComponents<archetypes::AffixFuzzer3> {
|
||||
/// Serialize all set component batches.
|
||||
static Result<Collection<ComponentBatch>> as_batches(
|
||||
const archetypes::AffixFuzzer3& archetype
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
+253
@@ -0,0 +1,253 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/archetypes/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer4.hpp"
|
||||
|
||||
#include <rerun/collection_adapter_builtins.hpp>
|
||||
|
||||
namespace rerun::archetypes {
|
||||
AffixFuzzer4 AffixFuzzer4::clear_fields() {
|
||||
auto archetype = AffixFuzzer4();
|
||||
archetype.fuzz2101 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer1>(Descriptor_fuzz2101)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2102 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer2>(Descriptor_fuzz2102)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2103 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer3>(Descriptor_fuzz2103)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2104 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer4>(Descriptor_fuzz2104)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2105 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer5>(Descriptor_fuzz2105)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2106 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer6>(Descriptor_fuzz2106)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2107 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer7>(Descriptor_fuzz2107)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2108 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer8>(Descriptor_fuzz2108)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2109 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer9>(Descriptor_fuzz2109)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2110 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer10>(Descriptor_fuzz2110)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2111 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer11>(Descriptor_fuzz2111)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2112 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer12>(Descriptor_fuzz2112)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2113 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer13>(Descriptor_fuzz2113)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2114 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer14>(Descriptor_fuzz2114)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2115 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer15>(Descriptor_fuzz2115)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2116 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer16>(Descriptor_fuzz2116)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2117 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer17>(Descriptor_fuzz2117)
|
||||
.value_or_throw();
|
||||
archetype.fuzz2118 =
|
||||
ComponentBatch::empty<rerun::components::AffixFuzzer18>(Descriptor_fuzz2118)
|
||||
.value_or_throw();
|
||||
return archetype;
|
||||
}
|
||||
|
||||
Collection<ComponentColumn> AffixFuzzer4::columns(const Collection<uint32_t>& lengths_) {
|
||||
std::vector<ComponentColumn> columns;
|
||||
columns.reserve(18);
|
||||
if (fuzz2101.has_value()) {
|
||||
columns.push_back(fuzz2101.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2102.has_value()) {
|
||||
columns.push_back(fuzz2102.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2103.has_value()) {
|
||||
columns.push_back(fuzz2103.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2104.has_value()) {
|
||||
columns.push_back(fuzz2104.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2105.has_value()) {
|
||||
columns.push_back(fuzz2105.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2106.has_value()) {
|
||||
columns.push_back(fuzz2106.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2107.has_value()) {
|
||||
columns.push_back(fuzz2107.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2108.has_value()) {
|
||||
columns.push_back(fuzz2108.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2109.has_value()) {
|
||||
columns.push_back(fuzz2109.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2110.has_value()) {
|
||||
columns.push_back(fuzz2110.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2111.has_value()) {
|
||||
columns.push_back(fuzz2111.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2112.has_value()) {
|
||||
columns.push_back(fuzz2112.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2113.has_value()) {
|
||||
columns.push_back(fuzz2113.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2114.has_value()) {
|
||||
columns.push_back(fuzz2114.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2115.has_value()) {
|
||||
columns.push_back(fuzz2115.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2116.has_value()) {
|
||||
columns.push_back(fuzz2116.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2117.has_value()) {
|
||||
columns.push_back(fuzz2117.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
if (fuzz2118.has_value()) {
|
||||
columns.push_back(fuzz2118.value().partitioned(lengths_).value_or_throw());
|
||||
}
|
||||
return columns;
|
||||
}
|
||||
|
||||
Collection<ComponentColumn> AffixFuzzer4::columns() {
|
||||
if (fuzz2101.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2101.value().length(), 1));
|
||||
}
|
||||
if (fuzz2102.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2102.value().length(), 1));
|
||||
}
|
||||
if (fuzz2103.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2103.value().length(), 1));
|
||||
}
|
||||
if (fuzz2104.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2104.value().length(), 1));
|
||||
}
|
||||
if (fuzz2105.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2105.value().length(), 1));
|
||||
}
|
||||
if (fuzz2106.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2106.value().length(), 1));
|
||||
}
|
||||
if (fuzz2107.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2107.value().length(), 1));
|
||||
}
|
||||
if (fuzz2108.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2108.value().length(), 1));
|
||||
}
|
||||
if (fuzz2109.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2109.value().length(), 1));
|
||||
}
|
||||
if (fuzz2110.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2110.value().length(), 1));
|
||||
}
|
||||
if (fuzz2111.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2111.value().length(), 1));
|
||||
}
|
||||
if (fuzz2112.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2112.value().length(), 1));
|
||||
}
|
||||
if (fuzz2113.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2113.value().length(), 1));
|
||||
}
|
||||
if (fuzz2114.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2114.value().length(), 1));
|
||||
}
|
||||
if (fuzz2115.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2115.value().length(), 1));
|
||||
}
|
||||
if (fuzz2116.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2116.value().length(), 1));
|
||||
}
|
||||
if (fuzz2117.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2117.value().length(), 1));
|
||||
}
|
||||
if (fuzz2118.has_value()) {
|
||||
return columns(std::vector<uint32_t>(fuzz2118.value().length(), 1));
|
||||
}
|
||||
return Collection<ComponentColumn>();
|
||||
}
|
||||
} // namespace rerun::archetypes
|
||||
|
||||
namespace rerun {
|
||||
|
||||
Result<Collection<ComponentBatch>> AsComponents<archetypes::AffixFuzzer4>::as_batches(
|
||||
const archetypes::AffixFuzzer4& archetype
|
||||
) {
|
||||
using namespace archetypes;
|
||||
std::vector<ComponentBatch> cells;
|
||||
cells.reserve(18);
|
||||
|
||||
if (archetype.fuzz2101.has_value()) {
|
||||
cells.push_back(archetype.fuzz2101.value());
|
||||
}
|
||||
if (archetype.fuzz2102.has_value()) {
|
||||
cells.push_back(archetype.fuzz2102.value());
|
||||
}
|
||||
if (archetype.fuzz2103.has_value()) {
|
||||
cells.push_back(archetype.fuzz2103.value());
|
||||
}
|
||||
if (archetype.fuzz2104.has_value()) {
|
||||
cells.push_back(archetype.fuzz2104.value());
|
||||
}
|
||||
if (archetype.fuzz2105.has_value()) {
|
||||
cells.push_back(archetype.fuzz2105.value());
|
||||
}
|
||||
if (archetype.fuzz2106.has_value()) {
|
||||
cells.push_back(archetype.fuzz2106.value());
|
||||
}
|
||||
if (archetype.fuzz2107.has_value()) {
|
||||
cells.push_back(archetype.fuzz2107.value());
|
||||
}
|
||||
if (archetype.fuzz2108.has_value()) {
|
||||
cells.push_back(archetype.fuzz2108.value());
|
||||
}
|
||||
if (archetype.fuzz2109.has_value()) {
|
||||
cells.push_back(archetype.fuzz2109.value());
|
||||
}
|
||||
if (archetype.fuzz2110.has_value()) {
|
||||
cells.push_back(archetype.fuzz2110.value());
|
||||
}
|
||||
if (archetype.fuzz2111.has_value()) {
|
||||
cells.push_back(archetype.fuzz2111.value());
|
||||
}
|
||||
if (archetype.fuzz2112.has_value()) {
|
||||
cells.push_back(archetype.fuzz2112.value());
|
||||
}
|
||||
if (archetype.fuzz2113.has_value()) {
|
||||
cells.push_back(archetype.fuzz2113.value());
|
||||
}
|
||||
if (archetype.fuzz2114.has_value()) {
|
||||
cells.push_back(archetype.fuzz2114.value());
|
||||
}
|
||||
if (archetype.fuzz2115.has_value()) {
|
||||
cells.push_back(archetype.fuzz2115.value());
|
||||
}
|
||||
if (archetype.fuzz2116.has_value()) {
|
||||
cells.push_back(archetype.fuzz2116.value());
|
||||
}
|
||||
if (archetype.fuzz2117.has_value()) {
|
||||
cells.push_back(archetype.fuzz2117.value());
|
||||
}
|
||||
if (archetype.fuzz2118.has_value()) {
|
||||
cells.push_back(archetype.fuzz2118.value());
|
||||
}
|
||||
|
||||
return rerun::take_ownership(std::move(cells));
|
||||
}
|
||||
} // namespace rerun
|
||||
+340
@@ -0,0 +1,340 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/archetypes/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../components/affix_fuzzer1.hpp"
|
||||
#include "../components/affix_fuzzer10.hpp"
|
||||
#include "../components/affix_fuzzer11.hpp"
|
||||
#include "../components/affix_fuzzer12.hpp"
|
||||
#include "../components/affix_fuzzer13.hpp"
|
||||
#include "../components/affix_fuzzer14.hpp"
|
||||
#include "../components/affix_fuzzer15.hpp"
|
||||
#include "../components/affix_fuzzer16.hpp"
|
||||
#include "../components/affix_fuzzer17.hpp"
|
||||
#include "../components/affix_fuzzer18.hpp"
|
||||
#include "../components/affix_fuzzer2.hpp"
|
||||
#include "../components/affix_fuzzer3.hpp"
|
||||
#include "../components/affix_fuzzer4.hpp"
|
||||
#include "../components/affix_fuzzer5.hpp"
|
||||
#include "../components/affix_fuzzer6.hpp"
|
||||
#include "../components/affix_fuzzer7.hpp"
|
||||
#include "../components/affix_fuzzer8.hpp"
|
||||
#include "../components/affix_fuzzer9.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
#include <rerun/collection.hpp>
|
||||
#include <rerun/component_batch.hpp>
|
||||
#include <rerun/component_column.hpp>
|
||||
#include <rerun/result.hpp>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace rerun::archetypes {
|
||||
struct AffixFuzzer4 {
|
||||
std::optional<ComponentBatch> fuzz2101;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2102;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2103;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2104;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2105;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2106;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2107;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2108;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2109;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2110;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2111;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2112;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2113;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2114;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2115;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2116;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2117;
|
||||
|
||||
std::optional<ComponentBatch> fuzz2118;
|
||||
|
||||
public:
|
||||
/// The name of the archetype as used in `ComponentDescriptor`s.
|
||||
static constexpr const char ArchetypeName[] = "rerun.testing.archetypes.AffixFuzzer4";
|
||||
|
||||
/// `ComponentDescriptor` for the `fuzz2101` field.
|
||||
static constexpr auto Descriptor_fuzz2101 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer4:fuzz2101",
|
||||
Loggable<rerun::components::AffixFuzzer1>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2102` field.
|
||||
static constexpr auto Descriptor_fuzz2102 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer4:fuzz2102",
|
||||
Loggable<rerun::components::AffixFuzzer2>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2103` field.
|
||||
static constexpr auto Descriptor_fuzz2103 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer4:fuzz2103",
|
||||
Loggable<rerun::components::AffixFuzzer3>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2104` field.
|
||||
static constexpr auto Descriptor_fuzz2104 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer4:fuzz2104",
|
||||
Loggable<rerun::components::AffixFuzzer4>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2105` field.
|
||||
static constexpr auto Descriptor_fuzz2105 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer4:fuzz2105",
|
||||
Loggable<rerun::components::AffixFuzzer5>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2106` field.
|
||||
static constexpr auto Descriptor_fuzz2106 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer4:fuzz2106",
|
||||
Loggable<rerun::components::AffixFuzzer6>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2107` field.
|
||||
static constexpr auto Descriptor_fuzz2107 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer4:fuzz2107",
|
||||
Loggable<rerun::components::AffixFuzzer7>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2108` field.
|
||||
static constexpr auto Descriptor_fuzz2108 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer4:fuzz2108",
|
||||
Loggable<rerun::components::AffixFuzzer8>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2109` field.
|
||||
static constexpr auto Descriptor_fuzz2109 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer4:fuzz2109",
|
||||
Loggable<rerun::components::AffixFuzzer9>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2110` field.
|
||||
static constexpr auto Descriptor_fuzz2110 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer4:fuzz2110",
|
||||
Loggable<rerun::components::AffixFuzzer10>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2111` field.
|
||||
static constexpr auto Descriptor_fuzz2111 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer4:fuzz2111",
|
||||
Loggable<rerun::components::AffixFuzzer11>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2112` field.
|
||||
static constexpr auto Descriptor_fuzz2112 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer4:fuzz2112",
|
||||
Loggable<rerun::components::AffixFuzzer12>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2113` field.
|
||||
static constexpr auto Descriptor_fuzz2113 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer4:fuzz2113",
|
||||
Loggable<rerun::components::AffixFuzzer13>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2114` field.
|
||||
static constexpr auto Descriptor_fuzz2114 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer4:fuzz2114",
|
||||
Loggable<rerun::components::AffixFuzzer14>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2115` field.
|
||||
static constexpr auto Descriptor_fuzz2115 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer4:fuzz2115",
|
||||
Loggable<rerun::components::AffixFuzzer15>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2116` field.
|
||||
static constexpr auto Descriptor_fuzz2116 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer4:fuzz2116",
|
||||
Loggable<rerun::components::AffixFuzzer16>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2117` field.
|
||||
static constexpr auto Descriptor_fuzz2117 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer4:fuzz2117",
|
||||
Loggable<rerun::components::AffixFuzzer17>::ComponentType
|
||||
);
|
||||
/// `ComponentDescriptor` for the `fuzz2118` field.
|
||||
static constexpr auto Descriptor_fuzz2118 = ComponentDescriptor(
|
||||
ArchetypeName, "AffixFuzzer4:fuzz2118",
|
||||
Loggable<rerun::components::AffixFuzzer18>::ComponentType
|
||||
);
|
||||
|
||||
public:
|
||||
AffixFuzzer4() = default;
|
||||
AffixFuzzer4(AffixFuzzer4&& other) = default;
|
||||
AffixFuzzer4(const AffixFuzzer4& other) = default;
|
||||
AffixFuzzer4& operator=(const AffixFuzzer4& other) = default;
|
||||
AffixFuzzer4& operator=(AffixFuzzer4&& other) = default;
|
||||
|
||||
/// Update only some specific fields of a `AffixFuzzer4`.
|
||||
static AffixFuzzer4 update_fields() {
|
||||
return AffixFuzzer4();
|
||||
}
|
||||
|
||||
/// Clear all the fields of a `AffixFuzzer4`.
|
||||
static AffixFuzzer4 clear_fields();
|
||||
|
||||
AffixFuzzer4 with_fuzz2101(const Collection<rerun::components::AffixFuzzer1>& _fuzz2101
|
||||
) && {
|
||||
fuzz2101 =
|
||||
ComponentBatch::from_loggable(_fuzz2101, Descriptor_fuzz2101).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer4 with_fuzz2102(const Collection<rerun::components::AffixFuzzer2>& _fuzz2102
|
||||
) && {
|
||||
fuzz2102 =
|
||||
ComponentBatch::from_loggable(_fuzz2102, Descriptor_fuzz2102).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer4 with_fuzz2103(const Collection<rerun::components::AffixFuzzer3>& _fuzz2103
|
||||
) && {
|
||||
fuzz2103 =
|
||||
ComponentBatch::from_loggable(_fuzz2103, Descriptor_fuzz2103).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer4 with_fuzz2104(const Collection<rerun::components::AffixFuzzer4>& _fuzz2104
|
||||
) && {
|
||||
fuzz2104 =
|
||||
ComponentBatch::from_loggable(_fuzz2104, Descriptor_fuzz2104).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer4 with_fuzz2105(const Collection<rerun::components::AffixFuzzer5>& _fuzz2105
|
||||
) && {
|
||||
fuzz2105 =
|
||||
ComponentBatch::from_loggable(_fuzz2105, Descriptor_fuzz2105).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer4 with_fuzz2106(const Collection<rerun::components::AffixFuzzer6>& _fuzz2106
|
||||
) && {
|
||||
fuzz2106 =
|
||||
ComponentBatch::from_loggable(_fuzz2106, Descriptor_fuzz2106).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer4 with_fuzz2107(const Collection<rerun::components::AffixFuzzer7>& _fuzz2107
|
||||
) && {
|
||||
fuzz2107 =
|
||||
ComponentBatch::from_loggable(_fuzz2107, Descriptor_fuzz2107).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer4 with_fuzz2108(const Collection<rerun::components::AffixFuzzer8>& _fuzz2108
|
||||
) && {
|
||||
fuzz2108 =
|
||||
ComponentBatch::from_loggable(_fuzz2108, Descriptor_fuzz2108).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer4 with_fuzz2109(const Collection<rerun::components::AffixFuzzer9>& _fuzz2109
|
||||
) && {
|
||||
fuzz2109 =
|
||||
ComponentBatch::from_loggable(_fuzz2109, Descriptor_fuzz2109).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer4 with_fuzz2110(const Collection<rerun::components::AffixFuzzer10>& _fuzz2110
|
||||
) && {
|
||||
fuzz2110 =
|
||||
ComponentBatch::from_loggable(_fuzz2110, Descriptor_fuzz2110).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer4 with_fuzz2111(const Collection<rerun::components::AffixFuzzer11>& _fuzz2111
|
||||
) && {
|
||||
fuzz2111 =
|
||||
ComponentBatch::from_loggable(_fuzz2111, Descriptor_fuzz2111).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer4 with_fuzz2112(const Collection<rerun::components::AffixFuzzer12>& _fuzz2112
|
||||
) && {
|
||||
fuzz2112 =
|
||||
ComponentBatch::from_loggable(_fuzz2112, Descriptor_fuzz2112).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer4 with_fuzz2113(const Collection<rerun::components::AffixFuzzer13>& _fuzz2113
|
||||
) && {
|
||||
fuzz2113 =
|
||||
ComponentBatch::from_loggable(_fuzz2113, Descriptor_fuzz2113).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer4 with_fuzz2114(const Collection<rerun::components::AffixFuzzer14>& _fuzz2114
|
||||
) && {
|
||||
fuzz2114 =
|
||||
ComponentBatch::from_loggable(_fuzz2114, Descriptor_fuzz2114).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer4 with_fuzz2115(const Collection<rerun::components::AffixFuzzer15>& _fuzz2115
|
||||
) && {
|
||||
fuzz2115 =
|
||||
ComponentBatch::from_loggable(_fuzz2115, Descriptor_fuzz2115).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer4 with_fuzz2116(const Collection<rerun::components::AffixFuzzer16>& _fuzz2116
|
||||
) && {
|
||||
fuzz2116 =
|
||||
ComponentBatch::from_loggable(_fuzz2116, Descriptor_fuzz2116).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer4 with_fuzz2117(const Collection<rerun::components::AffixFuzzer17>& _fuzz2117
|
||||
) && {
|
||||
fuzz2117 =
|
||||
ComponentBatch::from_loggable(_fuzz2117, Descriptor_fuzz2117).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
AffixFuzzer4 with_fuzz2118(const Collection<rerun::components::AffixFuzzer18>& _fuzz2118
|
||||
) && {
|
||||
fuzz2118 =
|
||||
ComponentBatch::from_loggable(_fuzz2118, Descriptor_fuzz2118).value_or_throw();
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
/// Partitions the component data into multiple sub-batches.
|
||||
///
|
||||
/// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s
|
||||
/// instead, via `ComponentBatch::partitioned`.
|
||||
///
|
||||
/// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun.
|
||||
///
|
||||
/// The specified `lengths` must sum to the total length of the component batch.
|
||||
Collection<ComponentColumn> columns(const Collection<uint32_t>& lengths_);
|
||||
|
||||
/// Partitions the component data into unit-length sub-batches.
|
||||
///
|
||||
/// This is semantically similar to calling `columns` with `std::vector<uint32_t>(n, 1)`,
|
||||
/// where `n` is automatically guessed.
|
||||
Collection<ComponentColumn> columns();
|
||||
};
|
||||
|
||||
} // namespace rerun::archetypes
|
||||
|
||||
namespace rerun {
|
||||
/// \private
|
||||
template <typename T>
|
||||
struct AsComponents;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct AsComponents<archetypes::AffixFuzzer4> {
|
||||
/// Serialize all set component batches.
|
||||
static Result<Collection<ComponentBatch>> as_batches(
|
||||
const archetypes::AffixFuzzer4& archetype
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
Generated
+27
@@ -0,0 +1,27 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "components/affix_fuzzer1.hpp"
|
||||
#include "components/affix_fuzzer10.hpp"
|
||||
#include "components/affix_fuzzer11.hpp"
|
||||
#include "components/affix_fuzzer12.hpp"
|
||||
#include "components/affix_fuzzer13.hpp"
|
||||
#include "components/affix_fuzzer14.hpp"
|
||||
#include "components/affix_fuzzer15.hpp"
|
||||
#include "components/affix_fuzzer16.hpp"
|
||||
#include "components/affix_fuzzer17.hpp"
|
||||
#include "components/affix_fuzzer18.hpp"
|
||||
#include "components/affix_fuzzer19.hpp"
|
||||
#include "components/affix_fuzzer2.hpp"
|
||||
#include "components/affix_fuzzer20.hpp"
|
||||
#include "components/affix_fuzzer21.hpp"
|
||||
#include "components/affix_fuzzer22.hpp"
|
||||
#include "components/affix_fuzzer23.hpp"
|
||||
#include "components/affix_fuzzer3.hpp"
|
||||
#include "components/affix_fuzzer4.hpp"
|
||||
#include "components/affix_fuzzer5.hpp"
|
||||
#include "components/affix_fuzzer6.hpp"
|
||||
#include "components/affix_fuzzer7.hpp"
|
||||
#include "components/affix_fuzzer8.hpp"
|
||||
#include "components/affix_fuzzer9.hpp"
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
# DO NOT EDIT! This file is generated by crates/build/re_types_builder/src/lib.rs
|
||||
|
||||
.gitattributes linguist-generated=true
|
||||
affix_fuzzer1.hpp linguist-generated=true
|
||||
affix_fuzzer10.cpp linguist-generated=true
|
||||
affix_fuzzer10.hpp linguist-generated=true
|
||||
affix_fuzzer11.cpp linguist-generated=true
|
||||
affix_fuzzer11.hpp linguist-generated=true
|
||||
affix_fuzzer12.cpp linguist-generated=true
|
||||
affix_fuzzer12.hpp linguist-generated=true
|
||||
affix_fuzzer13.cpp linguist-generated=true
|
||||
affix_fuzzer13.hpp linguist-generated=true
|
||||
affix_fuzzer14.hpp linguist-generated=true
|
||||
affix_fuzzer15.cpp linguist-generated=true
|
||||
affix_fuzzer15.hpp linguist-generated=true
|
||||
affix_fuzzer16.cpp linguist-generated=true
|
||||
affix_fuzzer16.hpp linguist-generated=true
|
||||
affix_fuzzer17.cpp linguist-generated=true
|
||||
affix_fuzzer17.hpp linguist-generated=true
|
||||
affix_fuzzer18.cpp linguist-generated=true
|
||||
affix_fuzzer18.hpp linguist-generated=true
|
||||
affix_fuzzer19.hpp linguist-generated=true
|
||||
affix_fuzzer2.hpp linguist-generated=true
|
||||
affix_fuzzer20.hpp linguist-generated=true
|
||||
affix_fuzzer21.hpp linguist-generated=true
|
||||
affix_fuzzer22.cpp linguist-generated=true
|
||||
affix_fuzzer22.hpp linguist-generated=true
|
||||
affix_fuzzer23.cpp linguist-generated=true
|
||||
affix_fuzzer23.hpp linguist-generated=true
|
||||
affix_fuzzer3.hpp linguist-generated=true
|
||||
affix_fuzzer4.cpp linguist-generated=true
|
||||
affix_fuzzer4.hpp linguist-generated=true
|
||||
affix_fuzzer5.cpp linguist-generated=true
|
||||
affix_fuzzer5.hpp linguist-generated=true
|
||||
affix_fuzzer6.cpp linguist-generated=true
|
||||
affix_fuzzer6.hpp linguist-generated=true
|
||||
affix_fuzzer7.cpp linguist-generated=true
|
||||
affix_fuzzer7.hpp linguist-generated=true
|
||||
affix_fuzzer8.cpp linguist-generated=true
|
||||
affix_fuzzer8.hpp linguist-generated=true
|
||||
affix_fuzzer9.cpp linguist-generated=true
|
||||
affix_fuzzer9.hpp linguist-generated=true
|
||||
@@ -0,0 +1,67 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../datatypes/affix_fuzzer1.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <rerun/result.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace rerun::components {
|
||||
struct AffixFuzzer1 {
|
||||
rerun::datatypes::AffixFuzzer1 single_required;
|
||||
|
||||
public:
|
||||
AffixFuzzer1() = default;
|
||||
|
||||
AffixFuzzer1(rerun::datatypes::AffixFuzzer1 single_required_)
|
||||
: single_required(std::move(single_required_)) {}
|
||||
|
||||
AffixFuzzer1& operator=(rerun::datatypes::AffixFuzzer1 single_required_) {
|
||||
single_required = std::move(single_required_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// Cast to the underlying AffixFuzzer1 datatype
|
||||
operator rerun::datatypes::AffixFuzzer1() const {
|
||||
return single_required;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::components
|
||||
|
||||
namespace rerun {
|
||||
static_assert(sizeof(rerun::datatypes::AffixFuzzer1) == sizeof(components::AffixFuzzer1));
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<components::AffixFuzzer1> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.components.AffixFuzzer1";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype() {
|
||||
return Loggable<rerun::datatypes::AffixFuzzer1>::arrow_datatype();
|
||||
}
|
||||
|
||||
/// Serializes an array of `rerun::components::AffixFuzzer1` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const components::AffixFuzzer1* instances, size_t num_instances
|
||||
) {
|
||||
if (num_instances == 0) {
|
||||
return Loggable<rerun::datatypes::AffixFuzzer1>::to_arrow(nullptr, 0);
|
||||
} else if (instances == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Passed array instances is null when num_elements> 0."
|
||||
);
|
||||
} else {
|
||||
return Loggable<rerun::datatypes::AffixFuzzer1>::to_arrow(
|
||||
&instances->single_required,
|
||||
num_instances
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,63 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer10.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::components {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<components::AffixFuzzer10>::arrow_datatype() {
|
||||
static const auto datatype = arrow::utf8();
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<components::AffixFuzzer10>::to_arrow(
|
||||
const components::AffixFuzzer10* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<components::AffixFuzzer10>::fill_arrow_array_builder(
|
||||
static_cast<arrow::StringBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<components::AffixFuzzer10>::fill_arrow_array_builder(
|
||||
arrow::StringBuilder* builder, const components::AffixFuzzer10* elements,
|
||||
size_t num_elements
|
||||
) {
|
||||
if (builder == nullptr) {
|
||||
return rerun::Error(ErrorCode::UnexpectedNullArgument, "Passed array builder is null.");
|
||||
}
|
||||
if (elements == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Cannot serialize null pointer to arrow array."
|
||||
);
|
||||
}
|
||||
|
||||
ARROW_RETURN_NOT_OK(builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
const auto& element = elements[elem_idx];
|
||||
if (element.single_string_optional.has_value()) {
|
||||
ARROW_RETURN_NOT_OK(builder->Append(element.single_string_optional.value()));
|
||||
} else {
|
||||
ARROW_RETURN_NOT_OK(builder->AppendNull());
|
||||
}
|
||||
}
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,59 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <rerun/result.hpp>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
namespace arrow {
|
||||
class Array;
|
||||
class DataType;
|
||||
class StringBuilder;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::components {
|
||||
struct AffixFuzzer10 {
|
||||
std::optional<std::string> single_string_optional;
|
||||
|
||||
public:
|
||||
AffixFuzzer10() = default;
|
||||
|
||||
AffixFuzzer10(std::optional<std::string> single_string_optional_)
|
||||
: single_string_optional(std::move(single_string_optional_)) {}
|
||||
|
||||
AffixFuzzer10& operator=(std::optional<std::string> single_string_optional_) {
|
||||
single_string_optional = std::move(single_string_optional_);
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::components
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<components::AffixFuzzer10> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.components.AffixFuzzer10";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::components::AffixFuzzer10` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const components::AffixFuzzer10* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::StringBuilder* builder, const components::AffixFuzzer10* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,70 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer11.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::components {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<components::AffixFuzzer11>::arrow_datatype() {
|
||||
static const auto datatype = arrow::list(arrow::field("item", arrow::float32(), false));
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<components::AffixFuzzer11>::to_arrow(
|
||||
const components::AffixFuzzer11* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<components::AffixFuzzer11>::fill_arrow_array_builder(
|
||||
static_cast<arrow::ListBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<components::AffixFuzzer11>::fill_arrow_array_builder(
|
||||
arrow::ListBuilder* builder, const components::AffixFuzzer11* elements, size_t num_elements
|
||||
) {
|
||||
if (builder == nullptr) {
|
||||
return rerun::Error(ErrorCode::UnexpectedNullArgument, "Passed array builder is null.");
|
||||
}
|
||||
if (elements == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Cannot serialize null pointer to arrow array."
|
||||
);
|
||||
}
|
||||
|
||||
auto value_builder = static_cast<arrow::FloatBuilder*>(builder->value_builder());
|
||||
ARROW_RETURN_NOT_OK(builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
ARROW_RETURN_NOT_OK(value_builder->Reserve(static_cast<int64_t>(num_elements * 1)));
|
||||
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
const auto& element = elements[elem_idx];
|
||||
if (element.many_floats_optional.has_value()) {
|
||||
ARROW_RETURN_NOT_OK(builder->Append());
|
||||
ARROW_RETURN_NOT_OK(value_builder->AppendValues(
|
||||
element.many_floats_optional.value().data(),
|
||||
static_cast<int64_t>(element.many_floats_optional.value().size()),
|
||||
nullptr
|
||||
));
|
||||
} else {
|
||||
ARROW_RETURN_NOT_OK(builder->AppendNull());
|
||||
}
|
||||
}
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,59 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <rerun/collection.hpp>
|
||||
#include <rerun/result.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace arrow {
|
||||
class Array;
|
||||
class DataType;
|
||||
class ListBuilder;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::components {
|
||||
struct AffixFuzzer11 {
|
||||
std::optional<rerun::Collection<float>> many_floats_optional;
|
||||
|
||||
public:
|
||||
AffixFuzzer11() = default;
|
||||
|
||||
AffixFuzzer11(std::optional<rerun::Collection<float>> many_floats_optional_)
|
||||
: many_floats_optional(std::move(many_floats_optional_)) {}
|
||||
|
||||
AffixFuzzer11& operator=(std::optional<rerun::Collection<float>> many_floats_optional_) {
|
||||
many_floats_optional = std::move(many_floats_optional_);
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::components
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<components::AffixFuzzer11> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.components.AffixFuzzer11";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::components::AffixFuzzer11` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const components::AffixFuzzer11* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::ListBuilder* builder, const components::AffixFuzzer11* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,65 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer12.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::components {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<components::AffixFuzzer12>::arrow_datatype() {
|
||||
static const auto datatype = arrow::list(arrow::field("item", arrow::utf8(), false));
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<components::AffixFuzzer12>::to_arrow(
|
||||
const components::AffixFuzzer12* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<components::AffixFuzzer12>::fill_arrow_array_builder(
|
||||
static_cast<arrow::ListBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<components::AffixFuzzer12>::fill_arrow_array_builder(
|
||||
arrow::ListBuilder* builder, const components::AffixFuzzer12* elements, size_t num_elements
|
||||
) {
|
||||
if (builder == nullptr) {
|
||||
return rerun::Error(ErrorCode::UnexpectedNullArgument, "Passed array builder is null.");
|
||||
}
|
||||
if (elements == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Cannot serialize null pointer to arrow array."
|
||||
);
|
||||
}
|
||||
|
||||
auto value_builder = static_cast<arrow::StringBuilder*>(builder->value_builder());
|
||||
ARROW_RETURN_NOT_OK(builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
ARROW_RETURN_NOT_OK(value_builder->Reserve(static_cast<int64_t>(num_elements * 2)));
|
||||
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
const auto& element = elements[elem_idx];
|
||||
ARROW_RETURN_NOT_OK(builder->Append());
|
||||
for (size_t item_idx = 0; item_idx < element.many_strings_required.size();
|
||||
item_idx += 1) {
|
||||
ARROW_RETURN_NOT_OK(value_builder->Append(element.many_strings_required[item_idx]));
|
||||
}
|
||||
}
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,59 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <rerun/collection.hpp>
|
||||
#include <rerun/result.hpp>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
namespace arrow {
|
||||
class Array;
|
||||
class DataType;
|
||||
class ListBuilder;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::components {
|
||||
struct AffixFuzzer12 {
|
||||
rerun::Collection<std::string> many_strings_required;
|
||||
|
||||
public:
|
||||
AffixFuzzer12() = default;
|
||||
|
||||
AffixFuzzer12(rerun::Collection<std::string> many_strings_required_)
|
||||
: many_strings_required(std::move(many_strings_required_)) {}
|
||||
|
||||
AffixFuzzer12& operator=(rerun::Collection<std::string> many_strings_required_) {
|
||||
many_strings_required = std::move(many_strings_required_);
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::components
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<components::AffixFuzzer12> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.components.AffixFuzzer12";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::components::AffixFuzzer12` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const components::AffixFuzzer12* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::ListBuilder* builder, const components::AffixFuzzer12* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,70 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer13.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::components {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<components::AffixFuzzer13>::arrow_datatype() {
|
||||
static const auto datatype = arrow::list(arrow::field("item", arrow::utf8(), false));
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<components::AffixFuzzer13>::to_arrow(
|
||||
const components::AffixFuzzer13* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<components::AffixFuzzer13>::fill_arrow_array_builder(
|
||||
static_cast<arrow::ListBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<components::AffixFuzzer13>::fill_arrow_array_builder(
|
||||
arrow::ListBuilder* builder, const components::AffixFuzzer13* elements, size_t num_elements
|
||||
) {
|
||||
if (builder == nullptr) {
|
||||
return rerun::Error(ErrorCode::UnexpectedNullArgument, "Passed array builder is null.");
|
||||
}
|
||||
if (elements == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Cannot serialize null pointer to arrow array."
|
||||
);
|
||||
}
|
||||
|
||||
auto value_builder = static_cast<arrow::StringBuilder*>(builder->value_builder());
|
||||
ARROW_RETURN_NOT_OK(builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
ARROW_RETURN_NOT_OK(value_builder->Reserve(static_cast<int64_t>(num_elements * 1)));
|
||||
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
const auto& element = elements[elem_idx];
|
||||
if (element.many_strings_optional.has_value()) {
|
||||
ARROW_RETURN_NOT_OK(builder->Append());
|
||||
for (size_t item_idx = 0; item_idx < element.many_strings_optional.value().size();
|
||||
item_idx += 1) {
|
||||
ARROW_RETURN_NOT_OK(value_builder->Append(element.many_strings_optional.value(
|
||||
)[item_idx]));
|
||||
}
|
||||
} else {
|
||||
ARROW_RETURN_NOT_OK(builder->AppendNull());
|
||||
}
|
||||
}
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,62 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <rerun/collection.hpp>
|
||||
#include <rerun/result.hpp>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
namespace arrow {
|
||||
class Array;
|
||||
class DataType;
|
||||
class ListBuilder;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::components {
|
||||
struct AffixFuzzer13 {
|
||||
std::optional<rerun::Collection<std::string>> many_strings_optional;
|
||||
|
||||
public:
|
||||
AffixFuzzer13() = default;
|
||||
|
||||
AffixFuzzer13(std::optional<rerun::Collection<std::string>> many_strings_optional_)
|
||||
: many_strings_optional(std::move(many_strings_optional_)) {}
|
||||
|
||||
AffixFuzzer13& operator=(
|
||||
std::optional<rerun::Collection<std::string>> many_strings_optional_
|
||||
) {
|
||||
many_strings_optional = std::move(many_strings_optional_);
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::components
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<components::AffixFuzzer13> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.components.AffixFuzzer13";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::components::AffixFuzzer13` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const components::AffixFuzzer13* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::ListBuilder* builder, const components::AffixFuzzer13* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,67 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../datatypes/affix_fuzzer3.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <rerun/result.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace rerun::components {
|
||||
struct AffixFuzzer14 {
|
||||
rerun::datatypes::AffixFuzzer3 single_required_union;
|
||||
|
||||
public:
|
||||
AffixFuzzer14() = default;
|
||||
|
||||
AffixFuzzer14(rerun::datatypes::AffixFuzzer3 single_required_union_)
|
||||
: single_required_union(std::move(single_required_union_)) {}
|
||||
|
||||
AffixFuzzer14& operator=(rerun::datatypes::AffixFuzzer3 single_required_union_) {
|
||||
single_required_union = std::move(single_required_union_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// Cast to the underlying AffixFuzzer3 datatype
|
||||
operator rerun::datatypes::AffixFuzzer3() const {
|
||||
return single_required_union;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::components
|
||||
|
||||
namespace rerun {
|
||||
static_assert(sizeof(rerun::datatypes::AffixFuzzer3) == sizeof(components::AffixFuzzer14));
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<components::AffixFuzzer14> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.components.AffixFuzzer14";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype() {
|
||||
return Loggable<rerun::datatypes::AffixFuzzer3>::arrow_datatype();
|
||||
}
|
||||
|
||||
/// Serializes an array of `rerun::components::AffixFuzzer14` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const components::AffixFuzzer14* instances, size_t num_instances
|
||||
) {
|
||||
if (num_instances == 0) {
|
||||
return Loggable<rerun::datatypes::AffixFuzzer3>::to_arrow(nullptr, 0);
|
||||
} else if (instances == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Passed array instances is null when num_elements> 0."
|
||||
);
|
||||
} else {
|
||||
return Loggable<rerun::datatypes::AffixFuzzer3>::to_arrow(
|
||||
&instances->single_required_union,
|
||||
num_instances
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,55 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer15.hpp"
|
||||
|
||||
#include "../datatypes/affix_fuzzer3.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::components {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<components::AffixFuzzer15>::arrow_datatype() {
|
||||
static const auto datatype = Loggable<rerun::datatypes::AffixFuzzer3>::arrow_datatype();
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<components::AffixFuzzer15>::to_arrow(
|
||||
const components::AffixFuzzer15* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<components::AffixFuzzer15>::fill_arrow_array_builder(
|
||||
static_cast<arrow::DenseUnionBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<components::AffixFuzzer15>::fill_arrow_array_builder(
|
||||
arrow::DenseUnionBuilder* builder, const components::AffixFuzzer15* elements,
|
||||
size_t num_elements
|
||||
) {
|
||||
(void)builder;
|
||||
(void)elements;
|
||||
(void)num_elements;
|
||||
if (true) {
|
||||
return rerun::Error(
|
||||
ErrorCode::NotImplemented,
|
||||
"TODO(andreas) Handle nullable extensions"
|
||||
);
|
||||
}
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,67 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../datatypes/affix_fuzzer3.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <rerun/result.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace arrow {
|
||||
class Array;
|
||||
class DataType;
|
||||
class DenseUnionBuilder;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::components {
|
||||
struct AffixFuzzer15 {
|
||||
std::optional<rerun::datatypes::AffixFuzzer3> single_optional_union;
|
||||
|
||||
public:
|
||||
AffixFuzzer15() = default;
|
||||
|
||||
AffixFuzzer15(std::optional<rerun::datatypes::AffixFuzzer3> single_optional_union_)
|
||||
: single_optional_union(std::move(single_optional_union_)) {}
|
||||
|
||||
AffixFuzzer15& operator=(
|
||||
std::optional<rerun::datatypes::AffixFuzzer3> single_optional_union_
|
||||
) {
|
||||
single_optional_union = std::move(single_optional_union_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// Cast to the underlying AffixFuzzer3 datatype
|
||||
operator std::optional<rerun::datatypes::AffixFuzzer3>() const {
|
||||
return single_optional_union;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::components
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<components::AffixFuzzer15> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.components.AffixFuzzer15";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::components::AffixFuzzer15` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const components::AffixFuzzer15* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::DenseUnionBuilder* builder, const components::AffixFuzzer15* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,72 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer16.hpp"
|
||||
|
||||
#include "../datatypes/affix_fuzzer3.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::components {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<components::AffixFuzzer16>::arrow_datatype() {
|
||||
static const auto datatype = arrow::list(
|
||||
arrow::field("item", Loggable<rerun::datatypes::AffixFuzzer3>::arrow_datatype(), true)
|
||||
);
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<components::AffixFuzzer16>::to_arrow(
|
||||
const components::AffixFuzzer16* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<components::AffixFuzzer16>::fill_arrow_array_builder(
|
||||
static_cast<arrow::ListBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<components::AffixFuzzer16>::fill_arrow_array_builder(
|
||||
arrow::ListBuilder* builder, const components::AffixFuzzer16* elements, size_t num_elements
|
||||
) {
|
||||
if (builder == nullptr) {
|
||||
return rerun::Error(ErrorCode::UnexpectedNullArgument, "Passed array builder is null.");
|
||||
}
|
||||
if (elements == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Cannot serialize null pointer to arrow array."
|
||||
);
|
||||
}
|
||||
|
||||
auto value_builder = static_cast<arrow::DenseUnionBuilder*>(builder->value_builder());
|
||||
ARROW_RETURN_NOT_OK(builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
ARROW_RETURN_NOT_OK(value_builder->Reserve(static_cast<int64_t>(num_elements * 2)));
|
||||
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
const auto& element = elements[elem_idx];
|
||||
ARROW_RETURN_NOT_OK(builder->Append());
|
||||
if (element.many_required_unions.data()) {
|
||||
RR_RETURN_NOT_OK(Loggable<rerun::datatypes::AffixFuzzer3>::fill_arrow_array_builder(
|
||||
value_builder,
|
||||
element.many_required_unions.data(),
|
||||
element.many_required_unions.size()
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,62 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../datatypes/affix_fuzzer3.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <rerun/collection.hpp>
|
||||
#include <rerun/result.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace arrow {
|
||||
class Array;
|
||||
class DataType;
|
||||
class ListBuilder;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::components {
|
||||
struct AffixFuzzer16 {
|
||||
rerun::Collection<rerun::datatypes::AffixFuzzer3> many_required_unions;
|
||||
|
||||
public:
|
||||
AffixFuzzer16() = default;
|
||||
|
||||
AffixFuzzer16(rerun::Collection<rerun::datatypes::AffixFuzzer3> many_required_unions_)
|
||||
: many_required_unions(std::move(many_required_unions_)) {}
|
||||
|
||||
AffixFuzzer16& operator=(
|
||||
rerun::Collection<rerun::datatypes::AffixFuzzer3> many_required_unions_
|
||||
) {
|
||||
many_required_unions = std::move(many_required_unions_);
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::components
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<components::AffixFuzzer16> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.components.AffixFuzzer16";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::components::AffixFuzzer16` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const components::AffixFuzzer16* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::ListBuilder* builder, const components::AffixFuzzer16* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,78 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer17.hpp"
|
||||
|
||||
#include "../datatypes/affix_fuzzer3.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::components {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<components::AffixFuzzer17>::arrow_datatype() {
|
||||
static const auto datatype = arrow::list(
|
||||
arrow::field("item", Loggable<rerun::datatypes::AffixFuzzer3>::arrow_datatype(), true)
|
||||
);
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<components::AffixFuzzer17>::to_arrow(
|
||||
const components::AffixFuzzer17* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<components::AffixFuzzer17>::fill_arrow_array_builder(
|
||||
static_cast<arrow::ListBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<components::AffixFuzzer17>::fill_arrow_array_builder(
|
||||
arrow::ListBuilder* builder, const components::AffixFuzzer17* elements, size_t num_elements
|
||||
) {
|
||||
if (builder == nullptr) {
|
||||
return rerun::Error(ErrorCode::UnexpectedNullArgument, "Passed array builder is null.");
|
||||
}
|
||||
if (elements == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Cannot serialize null pointer to arrow array."
|
||||
);
|
||||
}
|
||||
|
||||
auto value_builder = static_cast<arrow::DenseUnionBuilder*>(builder->value_builder());
|
||||
ARROW_RETURN_NOT_OK(builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
ARROW_RETURN_NOT_OK(value_builder->Reserve(static_cast<int64_t>(num_elements * 1)));
|
||||
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
const auto& element = elements[elem_idx];
|
||||
if (element.many_optional_unions.has_value()) {
|
||||
ARROW_RETURN_NOT_OK(builder->Append());
|
||||
if (element.many_optional_unions.value().data()) {
|
||||
RR_RETURN_NOT_OK(
|
||||
Loggable<rerun::datatypes::AffixFuzzer3>::fill_arrow_array_builder(
|
||||
value_builder,
|
||||
element.many_optional_unions.value().data(),
|
||||
element.many_optional_unions.value().size()
|
||||
)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
ARROW_RETURN_NOT_OK(builder->AppendNull());
|
||||
}
|
||||
}
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,65 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../datatypes/affix_fuzzer3.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <rerun/collection.hpp>
|
||||
#include <rerun/result.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace arrow {
|
||||
class Array;
|
||||
class DataType;
|
||||
class ListBuilder;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::components {
|
||||
struct AffixFuzzer17 {
|
||||
std::optional<rerun::Collection<rerun::datatypes::AffixFuzzer3>> many_optional_unions;
|
||||
|
||||
public:
|
||||
AffixFuzzer17() = default;
|
||||
|
||||
AffixFuzzer17(
|
||||
std::optional<rerun::Collection<rerun::datatypes::AffixFuzzer3>> many_optional_unions_
|
||||
)
|
||||
: many_optional_unions(std::move(many_optional_unions_)) {}
|
||||
|
||||
AffixFuzzer17& operator=(
|
||||
std::optional<rerun::Collection<rerun::datatypes::AffixFuzzer3>> many_optional_unions_
|
||||
) {
|
||||
many_optional_unions = std::move(many_optional_unions_);
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::components
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<components::AffixFuzzer17> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.components.AffixFuzzer17";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::components::AffixFuzzer17` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const components::AffixFuzzer17* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::ListBuilder* builder, const components::AffixFuzzer17* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,78 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer18.hpp"
|
||||
|
||||
#include "../datatypes/affix_fuzzer4.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::components {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<components::AffixFuzzer18>::arrow_datatype() {
|
||||
static const auto datatype = arrow::list(
|
||||
arrow::field("item", Loggable<rerun::datatypes::AffixFuzzer4>::arrow_datatype(), true)
|
||||
);
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<components::AffixFuzzer18>::to_arrow(
|
||||
const components::AffixFuzzer18* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<components::AffixFuzzer18>::fill_arrow_array_builder(
|
||||
static_cast<arrow::ListBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<components::AffixFuzzer18>::fill_arrow_array_builder(
|
||||
arrow::ListBuilder* builder, const components::AffixFuzzer18* elements, size_t num_elements
|
||||
) {
|
||||
if (builder == nullptr) {
|
||||
return rerun::Error(ErrorCode::UnexpectedNullArgument, "Passed array builder is null.");
|
||||
}
|
||||
if (elements == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Cannot serialize null pointer to arrow array."
|
||||
);
|
||||
}
|
||||
|
||||
auto value_builder = static_cast<arrow::DenseUnionBuilder*>(builder->value_builder());
|
||||
ARROW_RETURN_NOT_OK(builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
ARROW_RETURN_NOT_OK(value_builder->Reserve(static_cast<int64_t>(num_elements * 1)));
|
||||
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
const auto& element = elements[elem_idx];
|
||||
if (element.many_optional_unions.has_value()) {
|
||||
ARROW_RETURN_NOT_OK(builder->Append());
|
||||
if (element.many_optional_unions.value().data()) {
|
||||
RR_RETURN_NOT_OK(
|
||||
Loggable<rerun::datatypes::AffixFuzzer4>::fill_arrow_array_builder(
|
||||
value_builder,
|
||||
element.many_optional_unions.value().data(),
|
||||
element.many_optional_unions.value().size()
|
||||
)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
ARROW_RETURN_NOT_OK(builder->AppendNull());
|
||||
}
|
||||
}
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,65 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../datatypes/affix_fuzzer4.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <rerun/collection.hpp>
|
||||
#include <rerun/result.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace arrow {
|
||||
class Array;
|
||||
class DataType;
|
||||
class ListBuilder;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::components {
|
||||
struct AffixFuzzer18 {
|
||||
std::optional<rerun::Collection<rerun::datatypes::AffixFuzzer4>> many_optional_unions;
|
||||
|
||||
public:
|
||||
AffixFuzzer18() = default;
|
||||
|
||||
AffixFuzzer18(
|
||||
std::optional<rerun::Collection<rerun::datatypes::AffixFuzzer4>> many_optional_unions_
|
||||
)
|
||||
: many_optional_unions(std::move(many_optional_unions_)) {}
|
||||
|
||||
AffixFuzzer18& operator=(
|
||||
std::optional<rerun::Collection<rerun::datatypes::AffixFuzzer4>> many_optional_unions_
|
||||
) {
|
||||
many_optional_unions = std::move(many_optional_unions_);
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::components
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<components::AffixFuzzer18> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.components.AffixFuzzer18";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::components::AffixFuzzer18` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const components::AffixFuzzer18* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::ListBuilder* builder, const components::AffixFuzzer18* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,79 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../datatypes/affix_fuzzer4.hpp"
|
||||
#include "../datatypes/affix_fuzzer5.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <rerun/result.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace rerun::components {
|
||||
struct AffixFuzzer19 {
|
||||
rerun::datatypes::AffixFuzzer5 just_a_table_nothing_shady;
|
||||
|
||||
public:
|
||||
AffixFuzzer19() = default;
|
||||
|
||||
AffixFuzzer19(rerun::datatypes::AffixFuzzer5 just_a_table_nothing_shady_)
|
||||
: just_a_table_nothing_shady(std::move(just_a_table_nothing_shady_)) {}
|
||||
|
||||
AffixFuzzer19& operator=(rerun::datatypes::AffixFuzzer5 just_a_table_nothing_shady_) {
|
||||
just_a_table_nothing_shady = std::move(just_a_table_nothing_shady_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
AffixFuzzer19(std::optional<rerun::datatypes::AffixFuzzer4> single_optional_union_)
|
||||
: just_a_table_nothing_shady(std::move(single_optional_union_)) {}
|
||||
|
||||
AffixFuzzer19& operator=(
|
||||
std::optional<rerun::datatypes::AffixFuzzer4> single_optional_union_
|
||||
) {
|
||||
just_a_table_nothing_shady = std::move(single_optional_union_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// Cast to the underlying AffixFuzzer5 datatype
|
||||
operator rerun::datatypes::AffixFuzzer5() const {
|
||||
return just_a_table_nothing_shady;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::components
|
||||
|
||||
namespace rerun {
|
||||
static_assert(sizeof(rerun::datatypes::AffixFuzzer5) == sizeof(components::AffixFuzzer19));
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<components::AffixFuzzer19> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.components.AffixFuzzer19";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype() {
|
||||
return Loggable<rerun::datatypes::AffixFuzzer5>::arrow_datatype();
|
||||
}
|
||||
|
||||
/// Serializes an array of `rerun::components::AffixFuzzer19` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const components::AffixFuzzer19* instances, size_t num_instances
|
||||
) {
|
||||
if (num_instances == 0) {
|
||||
return Loggable<rerun::datatypes::AffixFuzzer5>::to_arrow(nullptr, 0);
|
||||
} else if (instances == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Passed array instances is null when num_elements> 0."
|
||||
);
|
||||
} else {
|
||||
return Loggable<rerun::datatypes::AffixFuzzer5>::to_arrow(
|
||||
&instances->just_a_table_nothing_shady,
|
||||
num_instances
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,67 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../datatypes/affix_fuzzer1.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <rerun/result.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace rerun::components {
|
||||
struct AffixFuzzer2 {
|
||||
rerun::datatypes::AffixFuzzer1 single_required;
|
||||
|
||||
public:
|
||||
AffixFuzzer2() = default;
|
||||
|
||||
AffixFuzzer2(rerun::datatypes::AffixFuzzer1 single_required_)
|
||||
: single_required(std::move(single_required_)) {}
|
||||
|
||||
AffixFuzzer2& operator=(rerun::datatypes::AffixFuzzer1 single_required_) {
|
||||
single_required = std::move(single_required_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// Cast to the underlying AffixFuzzer1 datatype
|
||||
operator rerun::datatypes::AffixFuzzer1() const {
|
||||
return single_required;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::components
|
||||
|
||||
namespace rerun {
|
||||
static_assert(sizeof(rerun::datatypes::AffixFuzzer1) == sizeof(components::AffixFuzzer2));
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<components::AffixFuzzer2> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.components.AffixFuzzer2";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype() {
|
||||
return Loggable<rerun::datatypes::AffixFuzzer1>::arrow_datatype();
|
||||
}
|
||||
|
||||
/// Serializes an array of `rerun::components::AffixFuzzer2` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const components::AffixFuzzer2* instances, size_t num_instances
|
||||
) {
|
||||
if (num_instances == 0) {
|
||||
return Loggable<rerun::datatypes::AffixFuzzer1>::to_arrow(nullptr, 0);
|
||||
} else if (instances == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Passed array instances is null when num_elements> 0."
|
||||
);
|
||||
} else {
|
||||
return Loggable<rerun::datatypes::AffixFuzzer1>::to_arrow(
|
||||
&instances->single_required,
|
||||
num_instances
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,67 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../datatypes/affix_fuzzer20.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <rerun/result.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace rerun::components {
|
||||
struct AffixFuzzer20 {
|
||||
rerun::datatypes::AffixFuzzer20 nested_transparent;
|
||||
|
||||
public:
|
||||
AffixFuzzer20() = default;
|
||||
|
||||
AffixFuzzer20(rerun::datatypes::AffixFuzzer20 nested_transparent_)
|
||||
: nested_transparent(std::move(nested_transparent_)) {}
|
||||
|
||||
AffixFuzzer20& operator=(rerun::datatypes::AffixFuzzer20 nested_transparent_) {
|
||||
nested_transparent = std::move(nested_transparent_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// Cast to the underlying AffixFuzzer20 datatype
|
||||
operator rerun::datatypes::AffixFuzzer20() const {
|
||||
return nested_transparent;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::components
|
||||
|
||||
namespace rerun {
|
||||
static_assert(sizeof(rerun::datatypes::AffixFuzzer20) == sizeof(components::AffixFuzzer20));
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<components::AffixFuzzer20> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.components.AffixFuzzer20";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype() {
|
||||
return Loggable<rerun::datatypes::AffixFuzzer20>::arrow_datatype();
|
||||
}
|
||||
|
||||
/// Serializes an array of `rerun::components::AffixFuzzer20` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const components::AffixFuzzer20* instances, size_t num_instances
|
||||
) {
|
||||
if (num_instances == 0) {
|
||||
return Loggable<rerun::datatypes::AffixFuzzer20>::to_arrow(nullptr, 0);
|
||||
} else if (instances == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Passed array instances is null when num_elements> 0."
|
||||
);
|
||||
} else {
|
||||
return Loggable<rerun::datatypes::AffixFuzzer20>::to_arrow(
|
||||
&instances->nested_transparent,
|
||||
num_instances
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,67 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../datatypes/affix_fuzzer21.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <rerun/result.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace rerun::components {
|
||||
struct AffixFuzzer21 {
|
||||
rerun::datatypes::AffixFuzzer21 nested_halves;
|
||||
|
||||
public:
|
||||
AffixFuzzer21() = default;
|
||||
|
||||
AffixFuzzer21(rerun::datatypes::AffixFuzzer21 nested_halves_)
|
||||
: nested_halves(std::move(nested_halves_)) {}
|
||||
|
||||
AffixFuzzer21& operator=(rerun::datatypes::AffixFuzzer21 nested_halves_) {
|
||||
nested_halves = std::move(nested_halves_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// Cast to the underlying AffixFuzzer21 datatype
|
||||
operator rerun::datatypes::AffixFuzzer21() const {
|
||||
return nested_halves;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::components
|
||||
|
||||
namespace rerun {
|
||||
static_assert(sizeof(rerun::datatypes::AffixFuzzer21) == sizeof(components::AffixFuzzer21));
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<components::AffixFuzzer21> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.components.AffixFuzzer21";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype() {
|
||||
return Loggable<rerun::datatypes::AffixFuzzer21>::arrow_datatype();
|
||||
}
|
||||
|
||||
/// Serializes an array of `rerun::components::AffixFuzzer21` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const components::AffixFuzzer21* instances, size_t num_instances
|
||||
) {
|
||||
if (num_instances == 0) {
|
||||
return Loggable<rerun::datatypes::AffixFuzzer21>::to_arrow(nullptr, 0);
|
||||
} else if (instances == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Passed array instances is null when num_elements> 0."
|
||||
);
|
||||
} else {
|
||||
return Loggable<rerun::datatypes::AffixFuzzer21>::to_arrow(
|
||||
&instances->nested_halves,
|
||||
num_instances
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,55 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer22.hpp"
|
||||
|
||||
#include "../datatypes/affix_fuzzer22.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::components {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<components::AffixFuzzer22>::arrow_datatype() {
|
||||
static const auto datatype = Loggable<rerun::datatypes::AffixFuzzer22>::arrow_datatype();
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<components::AffixFuzzer22>::to_arrow(
|
||||
const components::AffixFuzzer22* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<components::AffixFuzzer22>::fill_arrow_array_builder(
|
||||
static_cast<arrow::StructBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<components::AffixFuzzer22>::fill_arrow_array_builder(
|
||||
arrow::StructBuilder* builder, const components::AffixFuzzer22* elements,
|
||||
size_t num_elements
|
||||
) {
|
||||
(void)builder;
|
||||
(void)elements;
|
||||
(void)num_elements;
|
||||
if (true) {
|
||||
return rerun::Error(
|
||||
ErrorCode::NotImplemented,
|
||||
"TODO(andreas) Handle nullable extensions"
|
||||
);
|
||||
}
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,75 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../datatypes/affix_fuzzer22.hpp"
|
||||
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <rerun/result.hpp>
|
||||
|
||||
namespace arrow {
|
||||
class Array;
|
||||
class DataType;
|
||||
class StructBuilder;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::components {
|
||||
struct AffixFuzzer22 {
|
||||
std::optional<rerun::datatypes::AffixFuzzer22> nullable_nested_array;
|
||||
|
||||
public:
|
||||
AffixFuzzer22() = default;
|
||||
|
||||
AffixFuzzer22(std::optional<rerun::datatypes::AffixFuzzer22> nullable_nested_array_)
|
||||
: nullable_nested_array(nullable_nested_array_) {}
|
||||
|
||||
AffixFuzzer22& operator=(
|
||||
std::optional<rerun::datatypes::AffixFuzzer22> nullable_nested_array_
|
||||
) {
|
||||
nullable_nested_array = nullable_nested_array_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
AffixFuzzer22(std::array<uint8_t, 4> fixed_sized_native_)
|
||||
: nullable_nested_array(fixed_sized_native_) {}
|
||||
|
||||
AffixFuzzer22& operator=(std::array<uint8_t, 4> fixed_sized_native_) {
|
||||
nullable_nested_array = fixed_sized_native_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// Cast to the underlying AffixFuzzer22 datatype
|
||||
operator std::optional<rerun::datatypes::AffixFuzzer22>() const {
|
||||
return nullable_nested_array;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::components
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<components::AffixFuzzer22> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.components.AffixFuzzer22";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::components::AffixFuzzer22` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const components::AffixFuzzer22* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::StructBuilder* builder, const components::AffixFuzzer22* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,55 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer23.hpp"
|
||||
|
||||
#include "../datatypes/multi_enum.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::components {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<components::AffixFuzzer23>::arrow_datatype() {
|
||||
static const auto datatype = Loggable<rerun::datatypes::MultiEnum>::arrow_datatype();
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<components::AffixFuzzer23>::to_arrow(
|
||||
const components::AffixFuzzer23* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<components::AffixFuzzer23>::fill_arrow_array_builder(
|
||||
static_cast<arrow::StructBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<components::AffixFuzzer23>::fill_arrow_array_builder(
|
||||
arrow::StructBuilder* builder, const components::AffixFuzzer23* elements,
|
||||
size_t num_elements
|
||||
) {
|
||||
(void)builder;
|
||||
(void)elements;
|
||||
(void)num_elements;
|
||||
if (true) {
|
||||
return rerun::Error(
|
||||
ErrorCode::NotImplemented,
|
||||
"TODO(andreas) Handle nullable extensions"
|
||||
);
|
||||
}
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,64 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../datatypes/multi_enum.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <rerun/result.hpp>
|
||||
|
||||
namespace arrow {
|
||||
class Array;
|
||||
class DataType;
|
||||
class StructBuilder;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::components {
|
||||
struct AffixFuzzer23 {
|
||||
std::optional<rerun::datatypes::MultiEnum> multi_enum;
|
||||
|
||||
public:
|
||||
AffixFuzzer23() = default;
|
||||
|
||||
AffixFuzzer23(std::optional<rerun::datatypes::MultiEnum> multi_enum_)
|
||||
: multi_enum(multi_enum_) {}
|
||||
|
||||
AffixFuzzer23& operator=(std::optional<rerun::datatypes::MultiEnum> multi_enum_) {
|
||||
multi_enum = multi_enum_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// Cast to the underlying MultiEnum datatype
|
||||
operator std::optional<rerun::datatypes::MultiEnum>() const {
|
||||
return multi_enum;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::components
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<components::AffixFuzzer23> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.components.AffixFuzzer23";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::components::AffixFuzzer23` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const components::AffixFuzzer23* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::StructBuilder* builder, const components::AffixFuzzer23* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,67 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../datatypes/affix_fuzzer1.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <rerun/result.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace rerun::components {
|
||||
struct AffixFuzzer3 {
|
||||
rerun::datatypes::AffixFuzzer1 single_required;
|
||||
|
||||
public:
|
||||
AffixFuzzer3() = default;
|
||||
|
||||
AffixFuzzer3(rerun::datatypes::AffixFuzzer1 single_required_)
|
||||
: single_required(std::move(single_required_)) {}
|
||||
|
||||
AffixFuzzer3& operator=(rerun::datatypes::AffixFuzzer1 single_required_) {
|
||||
single_required = std::move(single_required_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// Cast to the underlying AffixFuzzer1 datatype
|
||||
operator rerun::datatypes::AffixFuzzer1() const {
|
||||
return single_required;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::components
|
||||
|
||||
namespace rerun {
|
||||
static_assert(sizeof(rerun::datatypes::AffixFuzzer1) == sizeof(components::AffixFuzzer3));
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<components::AffixFuzzer3> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.components.AffixFuzzer3";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype() {
|
||||
return Loggable<rerun::datatypes::AffixFuzzer1>::arrow_datatype();
|
||||
}
|
||||
|
||||
/// Serializes an array of `rerun::components::AffixFuzzer3` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const components::AffixFuzzer3* instances, size_t num_instances
|
||||
) {
|
||||
if (num_instances == 0) {
|
||||
return Loggable<rerun::datatypes::AffixFuzzer1>::to_arrow(nullptr, 0);
|
||||
} else if (instances == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Passed array instances is null when num_elements> 0."
|
||||
);
|
||||
} else {
|
||||
return Loggable<rerun::datatypes::AffixFuzzer1>::to_arrow(
|
||||
&instances->single_required,
|
||||
num_instances
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,54 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer4.hpp"
|
||||
|
||||
#include "../datatypes/affix_fuzzer1.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::components {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<components::AffixFuzzer4>::arrow_datatype() {
|
||||
static const auto datatype = Loggable<rerun::datatypes::AffixFuzzer1>::arrow_datatype();
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<components::AffixFuzzer4>::to_arrow(
|
||||
const components::AffixFuzzer4* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<components::AffixFuzzer4>::fill_arrow_array_builder(
|
||||
static_cast<arrow::StructBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<components::AffixFuzzer4>::fill_arrow_array_builder(
|
||||
arrow::StructBuilder* builder, const components::AffixFuzzer4* elements, size_t num_elements
|
||||
) {
|
||||
(void)builder;
|
||||
(void)elements;
|
||||
(void)num_elements;
|
||||
if (true) {
|
||||
return rerun::Error(
|
||||
ErrorCode::NotImplemented,
|
||||
"TODO(andreas) Handle nullable extensions"
|
||||
);
|
||||
}
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,65 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../datatypes/affix_fuzzer1.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <rerun/result.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace arrow {
|
||||
class Array;
|
||||
class DataType;
|
||||
class StructBuilder;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::components {
|
||||
struct AffixFuzzer4 {
|
||||
std::optional<rerun::datatypes::AffixFuzzer1> single_optional;
|
||||
|
||||
public:
|
||||
AffixFuzzer4() = default;
|
||||
|
||||
AffixFuzzer4(std::optional<rerun::datatypes::AffixFuzzer1> single_optional_)
|
||||
: single_optional(std::move(single_optional_)) {}
|
||||
|
||||
AffixFuzzer4& operator=(std::optional<rerun::datatypes::AffixFuzzer1> single_optional_) {
|
||||
single_optional = std::move(single_optional_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// Cast to the underlying AffixFuzzer1 datatype
|
||||
operator std::optional<rerun::datatypes::AffixFuzzer1>() const {
|
||||
return single_optional;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::components
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<components::AffixFuzzer4> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.components.AffixFuzzer4";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::components::AffixFuzzer4` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const components::AffixFuzzer4* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::StructBuilder* builder, const components::AffixFuzzer4* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,54 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer5.hpp"
|
||||
|
||||
#include "../datatypes/affix_fuzzer1.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::components {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<components::AffixFuzzer5>::arrow_datatype() {
|
||||
static const auto datatype = Loggable<rerun::datatypes::AffixFuzzer1>::arrow_datatype();
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<components::AffixFuzzer5>::to_arrow(
|
||||
const components::AffixFuzzer5* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<components::AffixFuzzer5>::fill_arrow_array_builder(
|
||||
static_cast<arrow::StructBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<components::AffixFuzzer5>::fill_arrow_array_builder(
|
||||
arrow::StructBuilder* builder, const components::AffixFuzzer5* elements, size_t num_elements
|
||||
) {
|
||||
(void)builder;
|
||||
(void)elements;
|
||||
(void)num_elements;
|
||||
if (true) {
|
||||
return rerun::Error(
|
||||
ErrorCode::NotImplemented,
|
||||
"TODO(andreas) Handle nullable extensions"
|
||||
);
|
||||
}
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,65 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../datatypes/affix_fuzzer1.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <rerun/result.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace arrow {
|
||||
class Array;
|
||||
class DataType;
|
||||
class StructBuilder;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::components {
|
||||
struct AffixFuzzer5 {
|
||||
std::optional<rerun::datatypes::AffixFuzzer1> single_optional;
|
||||
|
||||
public:
|
||||
AffixFuzzer5() = default;
|
||||
|
||||
AffixFuzzer5(std::optional<rerun::datatypes::AffixFuzzer1> single_optional_)
|
||||
: single_optional(std::move(single_optional_)) {}
|
||||
|
||||
AffixFuzzer5& operator=(std::optional<rerun::datatypes::AffixFuzzer1> single_optional_) {
|
||||
single_optional = std::move(single_optional_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// Cast to the underlying AffixFuzzer1 datatype
|
||||
operator std::optional<rerun::datatypes::AffixFuzzer1>() const {
|
||||
return single_optional;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::components
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<components::AffixFuzzer5> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.components.AffixFuzzer5";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::components::AffixFuzzer5` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const components::AffixFuzzer5* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::StructBuilder* builder, const components::AffixFuzzer5* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,54 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer6.hpp"
|
||||
|
||||
#include "../datatypes/affix_fuzzer1.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::components {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<components::AffixFuzzer6>::arrow_datatype() {
|
||||
static const auto datatype = Loggable<rerun::datatypes::AffixFuzzer1>::arrow_datatype();
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<components::AffixFuzzer6>::to_arrow(
|
||||
const components::AffixFuzzer6* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<components::AffixFuzzer6>::fill_arrow_array_builder(
|
||||
static_cast<arrow::StructBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<components::AffixFuzzer6>::fill_arrow_array_builder(
|
||||
arrow::StructBuilder* builder, const components::AffixFuzzer6* elements, size_t num_elements
|
||||
) {
|
||||
(void)builder;
|
||||
(void)elements;
|
||||
(void)num_elements;
|
||||
if (true) {
|
||||
return rerun::Error(
|
||||
ErrorCode::NotImplemented,
|
||||
"TODO(andreas) Handle nullable extensions"
|
||||
);
|
||||
}
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,65 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../datatypes/affix_fuzzer1.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <rerun/result.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace arrow {
|
||||
class Array;
|
||||
class DataType;
|
||||
class StructBuilder;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::components {
|
||||
struct AffixFuzzer6 {
|
||||
std::optional<rerun::datatypes::AffixFuzzer1> single_optional;
|
||||
|
||||
public:
|
||||
AffixFuzzer6() = default;
|
||||
|
||||
AffixFuzzer6(std::optional<rerun::datatypes::AffixFuzzer1> single_optional_)
|
||||
: single_optional(std::move(single_optional_)) {}
|
||||
|
||||
AffixFuzzer6& operator=(std::optional<rerun::datatypes::AffixFuzzer1> single_optional_) {
|
||||
single_optional = std::move(single_optional_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// Cast to the underlying AffixFuzzer1 datatype
|
||||
operator std::optional<rerun::datatypes::AffixFuzzer1>() const {
|
||||
return single_optional;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::components
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<components::AffixFuzzer6> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.components.AffixFuzzer6";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::components::AffixFuzzer6` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const components::AffixFuzzer6* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::StructBuilder* builder, const components::AffixFuzzer6* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,78 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer7.hpp"
|
||||
|
||||
#include "../datatypes/affix_fuzzer1.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::components {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<components::AffixFuzzer7>::arrow_datatype() {
|
||||
static const auto datatype = arrow::list(
|
||||
arrow::field("item", Loggable<rerun::datatypes::AffixFuzzer1>::arrow_datatype(), false)
|
||||
);
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<components::AffixFuzzer7>::to_arrow(
|
||||
const components::AffixFuzzer7* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<components::AffixFuzzer7>::fill_arrow_array_builder(
|
||||
static_cast<arrow::ListBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<components::AffixFuzzer7>::fill_arrow_array_builder(
|
||||
arrow::ListBuilder* builder, const components::AffixFuzzer7* elements, size_t num_elements
|
||||
) {
|
||||
if (builder == nullptr) {
|
||||
return rerun::Error(ErrorCode::UnexpectedNullArgument, "Passed array builder is null.");
|
||||
}
|
||||
if (elements == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Cannot serialize null pointer to arrow array."
|
||||
);
|
||||
}
|
||||
|
||||
auto value_builder = static_cast<arrow::StructBuilder*>(builder->value_builder());
|
||||
ARROW_RETURN_NOT_OK(builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
ARROW_RETURN_NOT_OK(value_builder->Reserve(static_cast<int64_t>(num_elements * 1)));
|
||||
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
const auto& element = elements[elem_idx];
|
||||
if (element.many_optional.has_value()) {
|
||||
ARROW_RETURN_NOT_OK(builder->Append());
|
||||
if (element.many_optional.value().data()) {
|
||||
RR_RETURN_NOT_OK(
|
||||
Loggable<rerun::datatypes::AffixFuzzer1>::fill_arrow_array_builder(
|
||||
value_builder,
|
||||
element.many_optional.value().data(),
|
||||
element.many_optional.value().size()
|
||||
)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
ARROW_RETURN_NOT_OK(builder->AppendNull());
|
||||
}
|
||||
}
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,64 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../datatypes/affix_fuzzer1.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <rerun/collection.hpp>
|
||||
#include <rerun/result.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace arrow {
|
||||
class Array;
|
||||
class DataType;
|
||||
class ListBuilder;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::components {
|
||||
struct AffixFuzzer7 {
|
||||
std::optional<rerun::Collection<rerun::datatypes::AffixFuzzer1>> many_optional;
|
||||
|
||||
public:
|
||||
AffixFuzzer7() = default;
|
||||
|
||||
AffixFuzzer7(std::optional<rerun::Collection<rerun::datatypes::AffixFuzzer1>> many_optional_
|
||||
)
|
||||
: many_optional(std::move(many_optional_)) {}
|
||||
|
||||
AffixFuzzer7& operator=(
|
||||
std::optional<rerun::Collection<rerun::datatypes::AffixFuzzer1>> many_optional_
|
||||
) {
|
||||
many_optional = std::move(many_optional_);
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::components
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<components::AffixFuzzer7> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.components.AffixFuzzer7";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::components::AffixFuzzer7` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const components::AffixFuzzer7* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::ListBuilder* builder, const components::AffixFuzzer7* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,62 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer8.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::components {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<components::AffixFuzzer8>::arrow_datatype() {
|
||||
static const auto datatype = arrow::float32();
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<components::AffixFuzzer8>::to_arrow(
|
||||
const components::AffixFuzzer8* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<components::AffixFuzzer8>::fill_arrow_array_builder(
|
||||
static_cast<arrow::FloatBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<components::AffixFuzzer8>::fill_arrow_array_builder(
|
||||
arrow::FloatBuilder* builder, const components::AffixFuzzer8* elements, size_t num_elements
|
||||
) {
|
||||
if (builder == nullptr) {
|
||||
return rerun::Error(ErrorCode::UnexpectedNullArgument, "Passed array builder is null.");
|
||||
}
|
||||
if (elements == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Cannot serialize null pointer to arrow array."
|
||||
);
|
||||
}
|
||||
|
||||
ARROW_RETURN_NOT_OK(builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
const auto& element = elements[elem_idx];
|
||||
if (element.single_float_optional.has_value()) {
|
||||
ARROW_RETURN_NOT_OK(builder->Append(element.single_float_optional.value()));
|
||||
} else {
|
||||
ARROW_RETURN_NOT_OK(builder->AppendNull());
|
||||
}
|
||||
}
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,62 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <rerun/result.hpp>
|
||||
|
||||
namespace arrow {
|
||||
/// \private
|
||||
template <typename T>
|
||||
class NumericBuilder;
|
||||
|
||||
class Array;
|
||||
class DataType;
|
||||
class FloatType;
|
||||
using FloatBuilder = NumericBuilder<FloatType>;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::components {
|
||||
struct AffixFuzzer8 {
|
||||
std::optional<float> single_float_optional;
|
||||
|
||||
public:
|
||||
AffixFuzzer8() = default;
|
||||
|
||||
AffixFuzzer8(std::optional<float> single_float_optional_)
|
||||
: single_float_optional(single_float_optional_) {}
|
||||
|
||||
AffixFuzzer8& operator=(std::optional<float> single_float_optional_) {
|
||||
single_float_optional = single_float_optional_;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::components
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<components::AffixFuzzer8> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.components.AffixFuzzer8";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::components::AffixFuzzer8` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const components::AffixFuzzer8* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::FloatBuilder* builder, const components::AffixFuzzer8* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,57 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer9.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::components {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<components::AffixFuzzer9>::arrow_datatype() {
|
||||
static const auto datatype = arrow::utf8();
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<components::AffixFuzzer9>::to_arrow(
|
||||
const components::AffixFuzzer9* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<components::AffixFuzzer9>::fill_arrow_array_builder(
|
||||
static_cast<arrow::StringBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<components::AffixFuzzer9>::fill_arrow_array_builder(
|
||||
arrow::StringBuilder* builder, const components::AffixFuzzer9* elements, size_t num_elements
|
||||
) {
|
||||
if (builder == nullptr) {
|
||||
return rerun::Error(ErrorCode::UnexpectedNullArgument, "Passed array builder is null.");
|
||||
}
|
||||
if (elements == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Cannot serialize null pointer to arrow array."
|
||||
);
|
||||
}
|
||||
|
||||
ARROW_RETURN_NOT_OK(builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
ARROW_RETURN_NOT_OK(builder->Append(elements[elem_idx].single_string_required));
|
||||
}
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,58 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <rerun/result.hpp>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
namespace arrow {
|
||||
class Array;
|
||||
class DataType;
|
||||
class StringBuilder;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::components {
|
||||
struct AffixFuzzer9 {
|
||||
std::string single_string_required;
|
||||
|
||||
public:
|
||||
AffixFuzzer9() = default;
|
||||
|
||||
AffixFuzzer9(std::string single_string_required_)
|
||||
: single_string_required(std::move(single_string_required_)) {}
|
||||
|
||||
AffixFuzzer9& operator=(std::string single_string_required_) {
|
||||
single_string_required = std::move(single_string_required_);
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::components
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<components::AffixFuzzer9> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.components.AffixFuzzer9";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::components::AffixFuzzer9` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const components::AffixFuzzer9* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::StringBuilder* builder, const components::AffixFuzzer9* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
Generated
+18
@@ -0,0 +1,18 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "datatypes/affix_fuzzer1.hpp"
|
||||
#include "datatypes/affix_fuzzer2.hpp"
|
||||
#include "datatypes/affix_fuzzer20.hpp"
|
||||
#include "datatypes/affix_fuzzer21.hpp"
|
||||
#include "datatypes/affix_fuzzer22.hpp"
|
||||
#include "datatypes/affix_fuzzer3.hpp"
|
||||
#include "datatypes/affix_fuzzer4.hpp"
|
||||
#include "datatypes/affix_fuzzer5.hpp"
|
||||
#include "datatypes/enum_test.hpp"
|
||||
#include "datatypes/flattened_scalar.hpp"
|
||||
#include "datatypes/multi_enum.hpp"
|
||||
#include "datatypes/primitive_component.hpp"
|
||||
#include "datatypes/string_component.hpp"
|
||||
#include "datatypes/valued_enum.hpp"
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
# DO NOT EDIT! This file is generated by crates/build/re_types_builder/src/lib.rs
|
||||
|
||||
.gitattributes linguist-generated=true
|
||||
affix_fuzzer1.cpp linguist-generated=true
|
||||
affix_fuzzer1.hpp linguist-generated=true
|
||||
affix_fuzzer2.cpp linguist-generated=true
|
||||
affix_fuzzer2.hpp linguist-generated=true
|
||||
affix_fuzzer20.cpp linguist-generated=true
|
||||
affix_fuzzer20.hpp linguist-generated=true
|
||||
affix_fuzzer21.cpp linguist-generated=true
|
||||
affix_fuzzer21.hpp linguist-generated=true
|
||||
affix_fuzzer22.cpp linguist-generated=true
|
||||
affix_fuzzer22.hpp linguist-generated=true
|
||||
affix_fuzzer3.cpp linguist-generated=true
|
||||
affix_fuzzer3.hpp linguist-generated=true
|
||||
affix_fuzzer4.cpp linguist-generated=true
|
||||
affix_fuzzer4.hpp linguist-generated=true
|
||||
affix_fuzzer5.cpp linguist-generated=true
|
||||
affix_fuzzer5.hpp linguist-generated=true
|
||||
enum_test.cpp linguist-generated=true
|
||||
enum_test.hpp linguist-generated=true
|
||||
flattened_scalar.cpp linguist-generated=true
|
||||
flattened_scalar.hpp linguist-generated=true
|
||||
multi_enum.cpp linguist-generated=true
|
||||
multi_enum.hpp linguist-generated=true
|
||||
primitive_component.cpp linguist-generated=true
|
||||
primitive_component.hpp linguist-generated=true
|
||||
string_component.cpp linguist-generated=true
|
||||
string_component.hpp linguist-generated=true
|
||||
valued_enum.cpp linguist-generated=true
|
||||
valued_enum.hpp linguist-generated=true
|
||||
+207
@@ -0,0 +1,207 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/datatypes/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer1.hpp"
|
||||
|
||||
#include "flattened_scalar.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::datatypes {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<datatypes::AffixFuzzer1>::arrow_datatype() {
|
||||
static const auto datatype = arrow::struct_({
|
||||
arrow::field("single_float_optional", arrow::float32(), true),
|
||||
arrow::field("single_string_required", arrow::utf8(), false),
|
||||
arrow::field("single_string_optional", arrow::utf8(), true),
|
||||
arrow::field(
|
||||
"many_floats_optional",
|
||||
arrow::list(arrow::field("item", arrow::float32(), false)),
|
||||
true
|
||||
),
|
||||
arrow::field(
|
||||
"many_strings_required",
|
||||
arrow::list(arrow::field("item", arrow::utf8(), false)),
|
||||
false
|
||||
),
|
||||
arrow::field(
|
||||
"many_strings_optional",
|
||||
arrow::list(arrow::field("item", arrow::utf8(), false)),
|
||||
true
|
||||
),
|
||||
arrow::field("flattened_scalar", arrow::float32(), false),
|
||||
arrow::field(
|
||||
"almost_flattened_scalar",
|
||||
Loggable<rerun::datatypes::FlattenedScalar>::arrow_datatype(),
|
||||
false
|
||||
),
|
||||
arrow::field("from_parent", arrow::boolean(), true),
|
||||
});
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<datatypes::AffixFuzzer1>::to_arrow(
|
||||
const datatypes::AffixFuzzer1* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<datatypes::AffixFuzzer1>::fill_arrow_array_builder(
|
||||
static_cast<arrow::StructBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<datatypes::AffixFuzzer1>::fill_arrow_array_builder(
|
||||
arrow::StructBuilder* builder, const datatypes::AffixFuzzer1* elements, size_t num_elements
|
||||
) {
|
||||
if (builder == nullptr) {
|
||||
return rerun::Error(ErrorCode::UnexpectedNullArgument, "Passed array builder is null.");
|
||||
}
|
||||
if (elements == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Cannot serialize null pointer to arrow array."
|
||||
);
|
||||
}
|
||||
|
||||
{
|
||||
auto field_builder = static_cast<arrow::FloatBuilder*>(builder->field_builder(0));
|
||||
ARROW_RETURN_NOT_OK(field_builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
const auto& element = elements[elem_idx];
|
||||
if (element.single_float_optional.has_value()) {
|
||||
ARROW_RETURN_NOT_OK(field_builder->Append(element.single_float_optional.value())
|
||||
);
|
||||
} else {
|
||||
ARROW_RETURN_NOT_OK(field_builder->AppendNull());
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
auto field_builder = static_cast<arrow::StringBuilder*>(builder->field_builder(1));
|
||||
ARROW_RETURN_NOT_OK(field_builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
ARROW_RETURN_NOT_OK(field_builder->Append(elements[elem_idx].single_string_required)
|
||||
);
|
||||
}
|
||||
}
|
||||
{
|
||||
auto field_builder = static_cast<arrow::StringBuilder*>(builder->field_builder(2));
|
||||
ARROW_RETURN_NOT_OK(field_builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
const auto& element = elements[elem_idx];
|
||||
if (element.single_string_optional.has_value()) {
|
||||
ARROW_RETURN_NOT_OK(field_builder->Append(element.single_string_optional.value()
|
||||
));
|
||||
} else {
|
||||
ARROW_RETURN_NOT_OK(field_builder->AppendNull());
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
auto field_builder = static_cast<arrow::ListBuilder*>(builder->field_builder(3));
|
||||
auto value_builder = static_cast<arrow::FloatBuilder*>(field_builder->value_builder());
|
||||
ARROW_RETURN_NOT_OK(field_builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
ARROW_RETURN_NOT_OK(value_builder->Reserve(static_cast<int64_t>(num_elements * 1)));
|
||||
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
const auto& element = elements[elem_idx];
|
||||
if (element.many_floats_optional.has_value()) {
|
||||
ARROW_RETURN_NOT_OK(field_builder->Append());
|
||||
ARROW_RETURN_NOT_OK(value_builder->AppendValues(
|
||||
element.many_floats_optional.value().data(),
|
||||
static_cast<int64_t>(element.many_floats_optional.value().size()),
|
||||
nullptr
|
||||
));
|
||||
} else {
|
||||
ARROW_RETURN_NOT_OK(field_builder->AppendNull());
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
auto field_builder = static_cast<arrow::ListBuilder*>(builder->field_builder(4));
|
||||
auto value_builder = static_cast<arrow::StringBuilder*>(field_builder->value_builder());
|
||||
ARROW_RETURN_NOT_OK(field_builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
ARROW_RETURN_NOT_OK(value_builder->Reserve(static_cast<int64_t>(num_elements * 2)));
|
||||
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
const auto& element = elements[elem_idx];
|
||||
ARROW_RETURN_NOT_OK(field_builder->Append());
|
||||
for (size_t item_idx = 0; item_idx < element.many_strings_required.size();
|
||||
item_idx += 1) {
|
||||
ARROW_RETURN_NOT_OK(
|
||||
value_builder->Append(element.many_strings_required[item_idx])
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
auto field_builder = static_cast<arrow::ListBuilder*>(builder->field_builder(5));
|
||||
auto value_builder = static_cast<arrow::StringBuilder*>(field_builder->value_builder());
|
||||
ARROW_RETURN_NOT_OK(field_builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
ARROW_RETURN_NOT_OK(value_builder->Reserve(static_cast<int64_t>(num_elements * 1)));
|
||||
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
const auto& element = elements[elem_idx];
|
||||
if (element.many_strings_optional.has_value()) {
|
||||
ARROW_RETURN_NOT_OK(field_builder->Append());
|
||||
for (size_t item_idx = 0;
|
||||
item_idx < element.many_strings_optional.value().size();
|
||||
item_idx += 1) {
|
||||
ARROW_RETURN_NOT_OK(
|
||||
value_builder->Append(element.many_strings_optional.value()[item_idx])
|
||||
);
|
||||
}
|
||||
} else {
|
||||
ARROW_RETURN_NOT_OK(field_builder->AppendNull());
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
auto field_builder = static_cast<arrow::FloatBuilder*>(builder->field_builder(6));
|
||||
ARROW_RETURN_NOT_OK(field_builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
ARROW_RETURN_NOT_OK(field_builder->Append(elements[elem_idx].flattened_scalar));
|
||||
}
|
||||
}
|
||||
{
|
||||
auto field_builder = static_cast<arrow::StructBuilder*>(builder->field_builder(7));
|
||||
ARROW_RETURN_NOT_OK(field_builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
RR_RETURN_NOT_OK(
|
||||
Loggable<rerun::datatypes::FlattenedScalar>::fill_arrow_array_builder(
|
||||
field_builder,
|
||||
&elements[elem_idx].almost_flattened_scalar,
|
||||
1
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
{
|
||||
auto field_builder = static_cast<arrow::BooleanBuilder*>(builder->field_builder(8));
|
||||
ARROW_RETURN_NOT_OK(field_builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
const auto& element = elements[elem_idx];
|
||||
if (element.from_parent.has_value()) {
|
||||
ARROW_RETURN_NOT_OK(field_builder->Append(element.from_parent.value()));
|
||||
} else {
|
||||
ARROW_RETURN_NOT_OK(field_builder->AppendNull());
|
||||
}
|
||||
}
|
||||
}
|
||||
ARROW_RETURN_NOT_OK(builder->AppendValues(static_cast<int64_t>(num_elements), nullptr));
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,69 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/datatypes/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "flattened_scalar.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <rerun/collection.hpp>
|
||||
#include <rerun/result.hpp>
|
||||
#include <string>
|
||||
|
||||
namespace arrow {
|
||||
class Array;
|
||||
class DataType;
|
||||
class StructBuilder;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::datatypes {
|
||||
struct AffixFuzzer1 {
|
||||
std::optional<float> single_float_optional;
|
||||
|
||||
std::string single_string_required;
|
||||
|
||||
std::optional<std::string> single_string_optional;
|
||||
|
||||
std::optional<rerun::Collection<float>> many_floats_optional;
|
||||
|
||||
rerun::Collection<std::string> many_strings_required;
|
||||
|
||||
std::optional<rerun::Collection<std::string>> many_strings_optional;
|
||||
|
||||
float flattened_scalar;
|
||||
|
||||
rerun::datatypes::FlattenedScalar almost_flattened_scalar;
|
||||
|
||||
std::optional<bool> from_parent;
|
||||
|
||||
public:
|
||||
AffixFuzzer1() = default;
|
||||
};
|
||||
} // namespace rerun::datatypes
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<datatypes::AffixFuzzer1> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.datatypes.AffixFuzzer1";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::datatypes::AffixFuzzer1` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const datatypes::AffixFuzzer1* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::StructBuilder* builder, const datatypes::AffixFuzzer1* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,62 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/datatypes/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer2.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::datatypes {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<datatypes::AffixFuzzer2>::arrow_datatype() {
|
||||
static const auto datatype = arrow::float32();
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<datatypes::AffixFuzzer2>::to_arrow(
|
||||
const datatypes::AffixFuzzer2* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<datatypes::AffixFuzzer2>::fill_arrow_array_builder(
|
||||
static_cast<arrow::FloatBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<datatypes::AffixFuzzer2>::fill_arrow_array_builder(
|
||||
arrow::FloatBuilder* builder, const datatypes::AffixFuzzer2* elements, size_t num_elements
|
||||
) {
|
||||
if (builder == nullptr) {
|
||||
return rerun::Error(ErrorCode::UnexpectedNullArgument, "Passed array builder is null.");
|
||||
}
|
||||
if (elements == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Cannot serialize null pointer to arrow array."
|
||||
);
|
||||
}
|
||||
|
||||
ARROW_RETURN_NOT_OK(builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
const auto& element = elements[elem_idx];
|
||||
if (element.single_float_optional.has_value()) {
|
||||
ARROW_RETURN_NOT_OK(builder->Append(element.single_float_optional.value()));
|
||||
} else {
|
||||
ARROW_RETURN_NOT_OK(builder->AppendNull());
|
||||
}
|
||||
}
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,62 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/datatypes/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <rerun/result.hpp>
|
||||
|
||||
namespace arrow {
|
||||
/// \private
|
||||
template <typename T>
|
||||
class NumericBuilder;
|
||||
|
||||
class Array;
|
||||
class DataType;
|
||||
class FloatType;
|
||||
using FloatBuilder = NumericBuilder<FloatType>;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::datatypes {
|
||||
struct AffixFuzzer2 {
|
||||
std::optional<float> single_float_optional;
|
||||
|
||||
public:
|
||||
AffixFuzzer2() = default;
|
||||
|
||||
AffixFuzzer2(std::optional<float> single_float_optional_)
|
||||
: single_float_optional(single_float_optional_) {}
|
||||
|
||||
AffixFuzzer2& operator=(std::optional<float> single_float_optional_) {
|
||||
single_float_optional = single_float_optional_;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::datatypes
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<datatypes::AffixFuzzer2> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.datatypes.AffixFuzzer2";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::datatypes::AffixFuzzer2` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const datatypes::AffixFuzzer2* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::FloatBuilder* builder, const datatypes::AffixFuzzer2* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,90 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/datatypes/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer20.hpp"
|
||||
|
||||
#include "primitive_component.hpp"
|
||||
#include "string_component.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::datatypes {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<datatypes::AffixFuzzer20>::arrow_datatype() {
|
||||
static const auto datatype = arrow::struct_({
|
||||
arrow::field(
|
||||
"p",
|
||||
Loggable<rerun::datatypes::PrimitiveComponent>::arrow_datatype(),
|
||||
false
|
||||
),
|
||||
arrow::field("s", Loggable<rerun::datatypes::StringComponent>::arrow_datatype(), false),
|
||||
});
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<datatypes::AffixFuzzer20>::to_arrow(
|
||||
const datatypes::AffixFuzzer20* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<datatypes::AffixFuzzer20>::fill_arrow_array_builder(
|
||||
static_cast<arrow::StructBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<datatypes::AffixFuzzer20>::fill_arrow_array_builder(
|
||||
arrow::StructBuilder* builder, const datatypes::AffixFuzzer20* elements, size_t num_elements
|
||||
) {
|
||||
if (builder == nullptr) {
|
||||
return rerun::Error(ErrorCode::UnexpectedNullArgument, "Passed array builder is null.");
|
||||
}
|
||||
if (elements == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Cannot serialize null pointer to arrow array."
|
||||
);
|
||||
}
|
||||
|
||||
{
|
||||
auto field_builder = static_cast<arrow::UInt32Builder*>(builder->field_builder(0));
|
||||
ARROW_RETURN_NOT_OK(field_builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
RR_RETURN_NOT_OK(
|
||||
Loggable<rerun::datatypes::PrimitiveComponent>::fill_arrow_array_builder(
|
||||
field_builder,
|
||||
&elements[elem_idx].p,
|
||||
1
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
{
|
||||
auto field_builder = static_cast<arrow::StringBuilder*>(builder->field_builder(1));
|
||||
ARROW_RETURN_NOT_OK(field_builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
RR_RETURN_NOT_OK(
|
||||
Loggable<rerun::datatypes::StringComponent>::fill_arrow_array_builder(
|
||||
field_builder,
|
||||
&elements[elem_idx].s,
|
||||
1
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
ARROW_RETURN_NOT_OK(builder->AppendValues(static_cast<int64_t>(num_elements), nullptr));
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,53 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/datatypes/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "primitive_component.hpp"
|
||||
#include "string_component.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <rerun/result.hpp>
|
||||
|
||||
namespace arrow {
|
||||
class Array;
|
||||
class DataType;
|
||||
class StructBuilder;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::datatypes {
|
||||
struct AffixFuzzer20 {
|
||||
rerun::datatypes::PrimitiveComponent p;
|
||||
|
||||
rerun::datatypes::StringComponent s;
|
||||
|
||||
public:
|
||||
AffixFuzzer20() = default;
|
||||
};
|
||||
} // namespace rerun::datatypes
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<datatypes::AffixFuzzer20> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.datatypes.AffixFuzzer20";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::datatypes::AffixFuzzer20` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const datatypes::AffixFuzzer20* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::StructBuilder* builder, const datatypes::AffixFuzzer20* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,87 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/datatypes/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer21.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::datatypes {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<datatypes::AffixFuzzer21>::arrow_datatype() {
|
||||
static const auto datatype = arrow::struct_({
|
||||
arrow::field("single_half", arrow::float16(), false),
|
||||
arrow::field(
|
||||
"many_halves",
|
||||
arrow::list(arrow::field("item", arrow::float16(), false)),
|
||||
false
|
||||
),
|
||||
});
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<datatypes::AffixFuzzer21>::to_arrow(
|
||||
const datatypes::AffixFuzzer21* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<datatypes::AffixFuzzer21>::fill_arrow_array_builder(
|
||||
static_cast<arrow::StructBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<datatypes::AffixFuzzer21>::fill_arrow_array_builder(
|
||||
arrow::StructBuilder* builder, const datatypes::AffixFuzzer21* elements, size_t num_elements
|
||||
) {
|
||||
if (builder == nullptr) {
|
||||
return rerun::Error(ErrorCode::UnexpectedNullArgument, "Passed array builder is null.");
|
||||
}
|
||||
if (elements == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Cannot serialize null pointer to arrow array."
|
||||
);
|
||||
}
|
||||
|
||||
{
|
||||
auto field_builder = static_cast<arrow::HalfFloatBuilder*>(builder->field_builder(0));
|
||||
ARROW_RETURN_NOT_OK(field_builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
ARROW_RETURN_NOT_OK(field_builder->Append(
|
||||
*reinterpret_cast<const uint16_t*>(&(elements[elem_idx].single_half))
|
||||
));
|
||||
}
|
||||
}
|
||||
{
|
||||
auto field_builder = static_cast<arrow::ListBuilder*>(builder->field_builder(1));
|
||||
auto value_builder =
|
||||
static_cast<arrow::HalfFloatBuilder*>(field_builder->value_builder());
|
||||
ARROW_RETURN_NOT_OK(field_builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
ARROW_RETURN_NOT_OK(value_builder->Reserve(static_cast<int64_t>(num_elements * 2)));
|
||||
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
const auto& element = elements[elem_idx];
|
||||
ARROW_RETURN_NOT_OK(field_builder->Append());
|
||||
ARROW_RETURN_NOT_OK(value_builder->AppendValues(
|
||||
reinterpret_cast<const uint16_t*>(element.many_halves.data()),
|
||||
static_cast<int64_t>(element.many_halves.size()),
|
||||
nullptr
|
||||
));
|
||||
}
|
||||
}
|
||||
ARROW_RETURN_NOT_OK(builder->AppendValues(static_cast<int64_t>(num_elements), nullptr));
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,52 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/datatypes/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <rerun/collection.hpp>
|
||||
#include <rerun/half.hpp>
|
||||
#include <rerun/result.hpp>
|
||||
|
||||
namespace arrow {
|
||||
class Array;
|
||||
class DataType;
|
||||
class StructBuilder;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::datatypes {
|
||||
struct AffixFuzzer21 {
|
||||
rerun::half single_half;
|
||||
|
||||
rerun::Collection<rerun::half> many_halves;
|
||||
|
||||
public:
|
||||
AffixFuzzer21() = default;
|
||||
};
|
||||
} // namespace rerun::datatypes
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<datatypes::AffixFuzzer21> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.datatypes.AffixFuzzer21";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::datatypes::AffixFuzzer21` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const datatypes::AffixFuzzer21* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::StructBuilder* builder, const datatypes::AffixFuzzer21* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,73 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/datatypes/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer22.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::datatypes {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<datatypes::AffixFuzzer22>::arrow_datatype() {
|
||||
static const auto datatype = arrow::struct_({
|
||||
arrow::field(
|
||||
"fixed_sized_native",
|
||||
arrow::fixed_size_list(arrow::field("item", arrow::uint8(), false), 4),
|
||||
false
|
||||
),
|
||||
});
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<datatypes::AffixFuzzer22>::to_arrow(
|
||||
const datatypes::AffixFuzzer22* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<datatypes::AffixFuzzer22>::fill_arrow_array_builder(
|
||||
static_cast<arrow::StructBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<datatypes::AffixFuzzer22>::fill_arrow_array_builder(
|
||||
arrow::StructBuilder* builder, const datatypes::AffixFuzzer22* elements, size_t num_elements
|
||||
) {
|
||||
if (builder == nullptr) {
|
||||
return rerun::Error(ErrorCode::UnexpectedNullArgument, "Passed array builder is null.");
|
||||
}
|
||||
if (elements == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Cannot serialize null pointer to arrow array."
|
||||
);
|
||||
}
|
||||
|
||||
{
|
||||
auto field_builder =
|
||||
static_cast<arrow::FixedSizeListBuilder*>(builder->field_builder(0));
|
||||
auto value_builder = static_cast<arrow::UInt8Builder*>(field_builder->value_builder());
|
||||
|
||||
ARROW_RETURN_NOT_OK(field_builder->AppendValues(static_cast<int64_t>(num_elements)));
|
||||
static_assert(sizeof(elements[0].fixed_sized_native) == sizeof(elements[0]));
|
||||
ARROW_RETURN_NOT_OK(value_builder->AppendValues(
|
||||
elements[0].fixed_sized_native.data(),
|
||||
static_cast<int64_t>(num_elements * 4),
|
||||
nullptr
|
||||
));
|
||||
}
|
||||
ARROW_RETURN_NOT_OK(builder->AppendValues(static_cast<int64_t>(num_elements), nullptr));
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,57 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/datatypes/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <rerun/result.hpp>
|
||||
|
||||
namespace arrow {
|
||||
class Array;
|
||||
class DataType;
|
||||
class StructBuilder;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::datatypes {
|
||||
struct AffixFuzzer22 {
|
||||
std::array<uint8_t, 4> fixed_sized_native;
|
||||
|
||||
public:
|
||||
AffixFuzzer22() = default;
|
||||
|
||||
AffixFuzzer22(std::array<uint8_t, 4> fixed_sized_native_)
|
||||
: fixed_sized_native(fixed_sized_native_) {}
|
||||
|
||||
AffixFuzzer22& operator=(std::array<uint8_t, 4> fixed_sized_native_) {
|
||||
fixed_sized_native = fixed_sized_native_;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::datatypes
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<datatypes::AffixFuzzer22> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.datatypes.AffixFuzzer22";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::datatypes::AffixFuzzer22` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const datatypes::AffixFuzzer22* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::StructBuilder* builder, const datatypes::AffixFuzzer22* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/datatypes/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer3.hpp"
|
||||
|
||||
#include "affix_fuzzer1.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::datatypes {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<datatypes::AffixFuzzer3>::arrow_datatype() {
|
||||
static const auto datatype = arrow::dense_union({
|
||||
arrow::field("_null_markers", arrow::null(), true, nullptr),
|
||||
arrow::field("degrees", arrow::float32(), false),
|
||||
arrow::field(
|
||||
"craziness",
|
||||
arrow::list(arrow::field(
|
||||
"item",
|
||||
Loggable<rerun::datatypes::AffixFuzzer1>::arrow_datatype(),
|
||||
false
|
||||
)),
|
||||
false
|
||||
),
|
||||
arrow::field(
|
||||
"fixed_size_shenanigans",
|
||||
arrow::fixed_size_list(arrow::field("item", arrow::float32(), false), 3),
|
||||
false
|
||||
),
|
||||
arrow::field("empty_variant", arrow::null(), true),
|
||||
});
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<datatypes::AffixFuzzer3>::to_arrow(
|
||||
const datatypes::AffixFuzzer3* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<datatypes::AffixFuzzer3>::fill_arrow_array_builder(
|
||||
static_cast<arrow::DenseUnionBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<datatypes::AffixFuzzer3>::fill_arrow_array_builder(
|
||||
arrow::DenseUnionBuilder* builder, const datatypes::AffixFuzzer3* elements,
|
||||
size_t num_elements
|
||||
) {
|
||||
if (builder == nullptr) {
|
||||
return rerun::Error(ErrorCode::UnexpectedNullArgument, "Passed array builder is null.");
|
||||
}
|
||||
if (elements == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Cannot serialize null pointer to arrow array."
|
||||
);
|
||||
}
|
||||
|
||||
ARROW_RETURN_NOT_OK(builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
const auto& union_instance = elements[elem_idx];
|
||||
ARROW_RETURN_NOT_OK(builder->Append(static_cast<int8_t>(union_instance.get_union_tag()))
|
||||
);
|
||||
|
||||
auto variant_index = static_cast<int>(union_instance.get_union_tag());
|
||||
auto variant_builder_untyped = builder->child_builder(variant_index).get();
|
||||
|
||||
using TagType = datatypes::detail::AffixFuzzer3Tag;
|
||||
switch (union_instance.get_union_tag()) {
|
||||
case TagType::None: {
|
||||
ARROW_RETURN_NOT_OK(variant_builder_untyped->AppendNull());
|
||||
} break;
|
||||
case TagType::degrees: {
|
||||
auto variant_builder =
|
||||
static_cast<arrow::FloatBuilder*>(variant_builder_untyped);
|
||||
ARROW_RETURN_NOT_OK(
|
||||
variant_builder->Append(union_instance.get_union_data().degrees)
|
||||
);
|
||||
} break;
|
||||
case TagType::craziness: {
|
||||
auto variant_builder =
|
||||
static_cast<arrow::ListBuilder*>(variant_builder_untyped);
|
||||
(void)variant_builder;
|
||||
return rerun::Error(
|
||||
ErrorCode::NotImplemented,
|
||||
"Failed to serialize AffixFuzzer3::craziness: objects (Object { fqname: \"rerun.testing.datatypes.AffixFuzzer1\" }) in unions not yet implemented"
|
||||
);
|
||||
} break;
|
||||
case TagType::fixed_size_shenanigans: {
|
||||
auto variant_builder =
|
||||
static_cast<arrow::FixedSizeListBuilder*>(variant_builder_untyped);
|
||||
(void)variant_builder;
|
||||
return rerun::Error(
|
||||
ErrorCode::NotImplemented,
|
||||
"Failed to serialize AffixFuzzer3::fixed_size_shenanigans: FixedSizeListBuilder in unions not yet implemented"
|
||||
);
|
||||
} break;
|
||||
case TagType::empty_variant: {
|
||||
auto variant_builder =
|
||||
static_cast<arrow::NullBuilder*>(variant_builder_untyped);
|
||||
ARROW_RETURN_NOT_OK(variant_builder->AppendNull());
|
||||
} break;
|
||||
default:
|
||||
assert(false && "unreachable");
|
||||
}
|
||||
}
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
+240
@@ -0,0 +1,240 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/datatypes/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "affix_fuzzer1.hpp"
|
||||
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <new>
|
||||
#include <rerun/collection.hpp>
|
||||
#include <rerun/result.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace arrow {
|
||||
class Array;
|
||||
class DataType;
|
||||
class DenseUnionBuilder;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::datatypes {
|
||||
namespace detail {
|
||||
/// \private
|
||||
enum class AffixFuzzer3Tag : uint8_t {
|
||||
/// Having a special empty state makes it possible to implement move-semantics. We need to be able to leave the object in a state which we can run the destructor on.
|
||||
None = 0,
|
||||
degrees,
|
||||
craziness,
|
||||
fixed_size_shenanigans,
|
||||
empty_variant,
|
||||
};
|
||||
|
||||
/// \private
|
||||
union AffixFuzzer3Data {
|
||||
float degrees;
|
||||
|
||||
rerun::Collection<rerun::datatypes::AffixFuzzer1> craziness;
|
||||
|
||||
std::array<float, 3> fixed_size_shenanigans;
|
||||
|
||||
AffixFuzzer3Data() {
|
||||
std::memset(reinterpret_cast<void*>(this), 0, sizeof(AffixFuzzer3Data));
|
||||
}
|
||||
|
||||
~AffixFuzzer3Data() {}
|
||||
|
||||
void swap(AffixFuzzer3Data& other) noexcept {
|
||||
// This bitwise swap would fail for self-referential types, but we don't have any of those.
|
||||
char temp[sizeof(AffixFuzzer3Data)];
|
||||
void* otherbytes = reinterpret_cast<void*>(&other);
|
||||
void* thisbytes = reinterpret_cast<void*>(this);
|
||||
std::memcpy(temp, thisbytes, sizeof(AffixFuzzer3Data));
|
||||
std::memcpy(thisbytes, otherbytes, sizeof(AffixFuzzer3Data));
|
||||
std::memcpy(otherbytes, temp, sizeof(AffixFuzzer3Data));
|
||||
}
|
||||
};
|
||||
} // namespace detail
|
||||
|
||||
struct AffixFuzzer3 {
|
||||
AffixFuzzer3() : _tag(detail::AffixFuzzer3Tag::None) {}
|
||||
|
||||
/// Copy constructor
|
||||
AffixFuzzer3(const AffixFuzzer3& other) : _tag(other._tag) {
|
||||
switch (other._tag) {
|
||||
case detail::AffixFuzzer3Tag::craziness: {
|
||||
using TypeAlias = rerun::Collection<rerun::datatypes::AffixFuzzer1>;
|
||||
new (&_data.craziness) TypeAlias(other._data.craziness);
|
||||
} break;
|
||||
case detail::AffixFuzzer3Tag::degrees:
|
||||
case detail::AffixFuzzer3Tag::fixed_size_shenanigans:
|
||||
case detail::AffixFuzzer3Tag::empty_variant: {
|
||||
const void* otherbytes = reinterpret_cast<const void*>(&other._data);
|
||||
void* thisbytes = reinterpret_cast<void*>(&this->_data);
|
||||
std::memcpy(thisbytes, otherbytes, sizeof(detail::AffixFuzzer3Data));
|
||||
} break;
|
||||
case detail::AffixFuzzer3Tag::None: {
|
||||
} break;
|
||||
default:
|
||||
assert(false && "unreachable");
|
||||
}
|
||||
}
|
||||
|
||||
AffixFuzzer3& operator=(const AffixFuzzer3& other) noexcept {
|
||||
AffixFuzzer3 tmp(other);
|
||||
this->swap(tmp);
|
||||
return *this;
|
||||
}
|
||||
|
||||
AffixFuzzer3(AffixFuzzer3&& other) noexcept : AffixFuzzer3() {
|
||||
this->swap(other);
|
||||
}
|
||||
|
||||
AffixFuzzer3& operator=(AffixFuzzer3&& other) noexcept {
|
||||
this->swap(other);
|
||||
return *this;
|
||||
}
|
||||
|
||||
~AffixFuzzer3() {
|
||||
switch (this->_tag) {
|
||||
case detail::AffixFuzzer3Tag::None: {
|
||||
// Nothing to destroy
|
||||
} break;
|
||||
case detail::AffixFuzzer3Tag::degrees: {
|
||||
// has a trivial destructor
|
||||
} break;
|
||||
case detail::AffixFuzzer3Tag::craziness: {
|
||||
using TypeAlias = rerun::Collection<rerun::datatypes::AffixFuzzer1>;
|
||||
_data.craziness.~TypeAlias();
|
||||
} break;
|
||||
case detail::AffixFuzzer3Tag::fixed_size_shenanigans: {
|
||||
// has a trivial destructor
|
||||
} break;
|
||||
case detail::AffixFuzzer3Tag::empty_variant: {
|
||||
// has a trivial destructor
|
||||
} break;
|
||||
default:
|
||||
assert(false && "unreachable");
|
||||
}
|
||||
}
|
||||
|
||||
void swap(AffixFuzzer3& other) noexcept {
|
||||
std::swap(this->_tag, other._tag);
|
||||
this->_data.swap(other._data);
|
||||
}
|
||||
|
||||
AffixFuzzer3(float degrees) : AffixFuzzer3() {
|
||||
*this = AffixFuzzer3::degrees(std::move(degrees));
|
||||
}
|
||||
|
||||
AffixFuzzer3(rerun::Collection<rerun::datatypes::AffixFuzzer1> craziness) : AffixFuzzer3() {
|
||||
*this = AffixFuzzer3::craziness(std::move(craziness));
|
||||
}
|
||||
|
||||
AffixFuzzer3(std::array<float, 3> fixed_size_shenanigans) : AffixFuzzer3() {
|
||||
*this = AffixFuzzer3::fixed_size_shenanigans(std::move(fixed_size_shenanigans));
|
||||
}
|
||||
|
||||
static AffixFuzzer3 degrees(float degrees) {
|
||||
AffixFuzzer3 self;
|
||||
self._tag = detail::AffixFuzzer3Tag::degrees;
|
||||
new (&self._data.degrees) float(std::move(degrees));
|
||||
return self;
|
||||
}
|
||||
|
||||
static AffixFuzzer3 craziness(rerun::Collection<rerun::datatypes::AffixFuzzer1> craziness) {
|
||||
AffixFuzzer3 self;
|
||||
self._tag = detail::AffixFuzzer3Tag::craziness;
|
||||
new (&self._data.craziness)
|
||||
rerun::Collection<rerun::datatypes::AffixFuzzer1>(std::move(craziness));
|
||||
return self;
|
||||
}
|
||||
|
||||
static AffixFuzzer3 fixed_size_shenanigans(std::array<float, 3> fixed_size_shenanigans) {
|
||||
AffixFuzzer3 self;
|
||||
self._tag = detail::AffixFuzzer3Tag::fixed_size_shenanigans;
|
||||
new (&self._data.fixed_size_shenanigans)
|
||||
std::array<float, 3>(std::move(fixed_size_shenanigans));
|
||||
return self;
|
||||
}
|
||||
|
||||
static AffixFuzzer3 empty_variant() {
|
||||
AffixFuzzer3 self;
|
||||
self._tag = detail::AffixFuzzer3Tag::empty_variant;
|
||||
return self;
|
||||
}
|
||||
|
||||
/// Return a pointer to degrees if the union is in that state, otherwise `nullptr`.
|
||||
const float* get_degrees() const {
|
||||
if (_tag == detail::AffixFuzzer3Tag::degrees) {
|
||||
return &_data.degrees;
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
/// Return a pointer to craziness if the union is in that state, otherwise `nullptr`.
|
||||
const rerun::Collection<rerun::datatypes::AffixFuzzer1>* get_craziness() const {
|
||||
if (_tag == detail::AffixFuzzer3Tag::craziness) {
|
||||
return &_data.craziness;
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
/// Return a pointer to fixed_size_shenanigans if the union is in that state, otherwise `nullptr`.
|
||||
const std::array<float, 3>* get_fixed_size_shenanigans() const {
|
||||
if (_tag == detail::AffixFuzzer3Tag::fixed_size_shenanigans) {
|
||||
return &_data.fixed_size_shenanigans;
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns true if the union is in the empty_variant state.
|
||||
bool is_empty_variant() const {
|
||||
return _tag == detail::AffixFuzzer3Tag::empty_variant;
|
||||
}
|
||||
|
||||
/// \private
|
||||
const detail::AffixFuzzer3Data& get_union_data() const {
|
||||
return _data;
|
||||
}
|
||||
|
||||
/// \private
|
||||
detail::AffixFuzzer3Tag get_union_tag() const {
|
||||
return _tag;
|
||||
}
|
||||
|
||||
private:
|
||||
detail::AffixFuzzer3Tag _tag;
|
||||
detail::AffixFuzzer3Data _data;
|
||||
};
|
||||
} // namespace rerun::datatypes
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<datatypes::AffixFuzzer3> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.datatypes.AffixFuzzer3";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::datatypes::AffixFuzzer3` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const datatypes::AffixFuzzer3* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::DenseUnionBuilder* builder, const datatypes::AffixFuzzer3* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/datatypes/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer4.hpp"
|
||||
|
||||
#include "affix_fuzzer3.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::datatypes {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<datatypes::AffixFuzzer4>::arrow_datatype() {
|
||||
static const auto datatype = arrow::dense_union({
|
||||
arrow::field("_null_markers", arrow::null(), true, nullptr),
|
||||
arrow::field(
|
||||
"single_required",
|
||||
Loggable<rerun::datatypes::AffixFuzzer3>::arrow_datatype(),
|
||||
true
|
||||
),
|
||||
arrow::field(
|
||||
"many_required",
|
||||
arrow::list(arrow::field(
|
||||
"item",
|
||||
Loggable<rerun::datatypes::AffixFuzzer3>::arrow_datatype(),
|
||||
true
|
||||
)),
|
||||
false
|
||||
),
|
||||
});
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<datatypes::AffixFuzzer4>::to_arrow(
|
||||
const datatypes::AffixFuzzer4* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<datatypes::AffixFuzzer4>::fill_arrow_array_builder(
|
||||
static_cast<arrow::DenseUnionBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<datatypes::AffixFuzzer4>::fill_arrow_array_builder(
|
||||
arrow::DenseUnionBuilder* builder, const datatypes::AffixFuzzer4* elements,
|
||||
size_t num_elements
|
||||
) {
|
||||
if (builder == nullptr) {
|
||||
return rerun::Error(ErrorCode::UnexpectedNullArgument, "Passed array builder is null.");
|
||||
}
|
||||
if (elements == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Cannot serialize null pointer to arrow array."
|
||||
);
|
||||
}
|
||||
|
||||
ARROW_RETURN_NOT_OK(builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
const auto& union_instance = elements[elem_idx];
|
||||
ARROW_RETURN_NOT_OK(builder->Append(static_cast<int8_t>(union_instance.get_union_tag()))
|
||||
);
|
||||
|
||||
auto variant_index = static_cast<int>(union_instance.get_union_tag());
|
||||
auto variant_builder_untyped = builder->child_builder(variant_index).get();
|
||||
|
||||
using TagType = datatypes::detail::AffixFuzzer4Tag;
|
||||
switch (union_instance.get_union_tag()) {
|
||||
case TagType::None: {
|
||||
ARROW_RETURN_NOT_OK(variant_builder_untyped->AppendNull());
|
||||
} break;
|
||||
case TagType::single_required: {
|
||||
auto variant_builder =
|
||||
static_cast<arrow::DenseUnionBuilder*>(variant_builder_untyped);
|
||||
RR_RETURN_NOT_OK(
|
||||
Loggable<rerun::datatypes::AffixFuzzer3>::fill_arrow_array_builder(
|
||||
variant_builder,
|
||||
&union_instance.get_union_data().single_required,
|
||||
1
|
||||
)
|
||||
);
|
||||
} break;
|
||||
case TagType::many_required: {
|
||||
auto variant_builder =
|
||||
static_cast<arrow::ListBuilder*>(variant_builder_untyped);
|
||||
(void)variant_builder;
|
||||
return rerun::Error(
|
||||
ErrorCode::NotImplemented,
|
||||
"Failed to serialize AffixFuzzer4::many_required: objects (Object { fqname: \"rerun.testing.datatypes.AffixFuzzer3\" }) in unions not yet implemented"
|
||||
);
|
||||
} break;
|
||||
default:
|
||||
assert(false && "unreachable");
|
||||
}
|
||||
}
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
+199
@@ -0,0 +1,199 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/datatypes/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "affix_fuzzer3.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <new>
|
||||
#include <rerun/collection.hpp>
|
||||
#include <rerun/result.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace arrow {
|
||||
class Array;
|
||||
class DataType;
|
||||
class DenseUnionBuilder;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::datatypes {
|
||||
namespace detail {
|
||||
/// \private
|
||||
enum class AffixFuzzer4Tag : uint8_t {
|
||||
/// Having a special empty state makes it possible to implement move-semantics. We need to be able to leave the object in a state which we can run the destructor on.
|
||||
None = 0,
|
||||
single_required,
|
||||
many_required,
|
||||
};
|
||||
|
||||
/// \private
|
||||
union AffixFuzzer4Data {
|
||||
rerun::datatypes::AffixFuzzer3 single_required;
|
||||
|
||||
rerun::Collection<rerun::datatypes::AffixFuzzer3> many_required;
|
||||
|
||||
AffixFuzzer4Data() {
|
||||
std::memset(reinterpret_cast<void*>(this), 0, sizeof(AffixFuzzer4Data));
|
||||
}
|
||||
|
||||
~AffixFuzzer4Data() {}
|
||||
|
||||
void swap(AffixFuzzer4Data& other) noexcept {
|
||||
// This bitwise swap would fail for self-referential types, but we don't have any of those.
|
||||
char temp[sizeof(AffixFuzzer4Data)];
|
||||
void* otherbytes = reinterpret_cast<void*>(&other);
|
||||
void* thisbytes = reinterpret_cast<void*>(this);
|
||||
std::memcpy(temp, thisbytes, sizeof(AffixFuzzer4Data));
|
||||
std::memcpy(thisbytes, otherbytes, sizeof(AffixFuzzer4Data));
|
||||
std::memcpy(otherbytes, temp, sizeof(AffixFuzzer4Data));
|
||||
}
|
||||
};
|
||||
} // namespace detail
|
||||
|
||||
struct AffixFuzzer4 {
|
||||
AffixFuzzer4() : _tag(detail::AffixFuzzer4Tag::None) {}
|
||||
|
||||
/// Copy constructor
|
||||
AffixFuzzer4(const AffixFuzzer4& other) : _tag(other._tag) {
|
||||
switch (other._tag) {
|
||||
case detail::AffixFuzzer4Tag::single_required: {
|
||||
using TypeAlias = rerun::datatypes::AffixFuzzer3;
|
||||
new (&_data.single_required) TypeAlias(other._data.single_required);
|
||||
} break;
|
||||
case detail::AffixFuzzer4Tag::many_required: {
|
||||
using TypeAlias = rerun::Collection<rerun::datatypes::AffixFuzzer3>;
|
||||
new (&_data.many_required) TypeAlias(other._data.many_required);
|
||||
} break;
|
||||
case detail::AffixFuzzer4Tag::None: {
|
||||
} break;
|
||||
default:
|
||||
assert(false && "unreachable");
|
||||
}
|
||||
}
|
||||
|
||||
AffixFuzzer4& operator=(const AffixFuzzer4& other) noexcept {
|
||||
AffixFuzzer4 tmp(other);
|
||||
this->swap(tmp);
|
||||
return *this;
|
||||
}
|
||||
|
||||
AffixFuzzer4(AffixFuzzer4&& other) noexcept : AffixFuzzer4() {
|
||||
this->swap(other);
|
||||
}
|
||||
|
||||
AffixFuzzer4& operator=(AffixFuzzer4&& other) noexcept {
|
||||
this->swap(other);
|
||||
return *this;
|
||||
}
|
||||
|
||||
~AffixFuzzer4() {
|
||||
switch (this->_tag) {
|
||||
case detail::AffixFuzzer4Tag::None: {
|
||||
// Nothing to destroy
|
||||
} break;
|
||||
case detail::AffixFuzzer4Tag::single_required: {
|
||||
using TypeAlias = rerun::datatypes::AffixFuzzer3;
|
||||
_data.single_required.~TypeAlias();
|
||||
} break;
|
||||
case detail::AffixFuzzer4Tag::many_required: {
|
||||
using TypeAlias = rerun::Collection<rerun::datatypes::AffixFuzzer3>;
|
||||
_data.many_required.~TypeAlias();
|
||||
} break;
|
||||
default:
|
||||
assert(false && "unreachable");
|
||||
}
|
||||
}
|
||||
|
||||
void swap(AffixFuzzer4& other) noexcept {
|
||||
std::swap(this->_tag, other._tag);
|
||||
this->_data.swap(other._data);
|
||||
}
|
||||
|
||||
AffixFuzzer4(rerun::datatypes::AffixFuzzer3 single_required) : AffixFuzzer4() {
|
||||
*this = AffixFuzzer4::single_required(std::move(single_required));
|
||||
}
|
||||
|
||||
AffixFuzzer4(rerun::Collection<rerun::datatypes::AffixFuzzer3> many_required)
|
||||
: AffixFuzzer4() {
|
||||
*this = AffixFuzzer4::many_required(std::move(many_required));
|
||||
}
|
||||
|
||||
static AffixFuzzer4 single_required(rerun::datatypes::AffixFuzzer3 single_required) {
|
||||
AffixFuzzer4 self;
|
||||
self._tag = detail::AffixFuzzer4Tag::single_required;
|
||||
new (&self._data.single_required)
|
||||
rerun::datatypes::AffixFuzzer3(std::move(single_required));
|
||||
return self;
|
||||
}
|
||||
|
||||
static AffixFuzzer4 many_required(
|
||||
rerun::Collection<rerun::datatypes::AffixFuzzer3> many_required
|
||||
) {
|
||||
AffixFuzzer4 self;
|
||||
self._tag = detail::AffixFuzzer4Tag::many_required;
|
||||
new (&self._data.many_required)
|
||||
rerun::Collection<rerun::datatypes::AffixFuzzer3>(std::move(many_required));
|
||||
return self;
|
||||
}
|
||||
|
||||
/// Return a pointer to single_required if the union is in that state, otherwise `nullptr`.
|
||||
const rerun::datatypes::AffixFuzzer3* get_single_required() const {
|
||||
if (_tag == detail::AffixFuzzer4Tag::single_required) {
|
||||
return &_data.single_required;
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
/// Return a pointer to many_required if the union is in that state, otherwise `nullptr`.
|
||||
const rerun::Collection<rerun::datatypes::AffixFuzzer3>* get_many_required() const {
|
||||
if (_tag == detail::AffixFuzzer4Tag::many_required) {
|
||||
return &_data.many_required;
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
/// \private
|
||||
const detail::AffixFuzzer4Data& get_union_data() const {
|
||||
return _data;
|
||||
}
|
||||
|
||||
/// \private
|
||||
detail::AffixFuzzer4Tag get_union_tag() const {
|
||||
return _tag;
|
||||
}
|
||||
|
||||
private:
|
||||
detail::AffixFuzzer4Tag _tag;
|
||||
detail::AffixFuzzer4Data _data;
|
||||
};
|
||||
} // namespace rerun::datatypes
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<datatypes::AffixFuzzer4> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.datatypes.AffixFuzzer4";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::datatypes::AffixFuzzer4` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const datatypes::AffixFuzzer4* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::DenseUnionBuilder* builder, const datatypes::AffixFuzzer4* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,80 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/datatypes/fuzzy.fbs".
|
||||
|
||||
#include "affix_fuzzer5.hpp"
|
||||
|
||||
#include "affix_fuzzer4.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::datatypes {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<datatypes::AffixFuzzer5>::arrow_datatype() {
|
||||
static const auto datatype = arrow::struct_({
|
||||
arrow::field(
|
||||
"single_optional_union",
|
||||
Loggable<rerun::datatypes::AffixFuzzer4>::arrow_datatype(),
|
||||
true
|
||||
),
|
||||
});
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<datatypes::AffixFuzzer5>::to_arrow(
|
||||
const datatypes::AffixFuzzer5* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<datatypes::AffixFuzzer5>::fill_arrow_array_builder(
|
||||
static_cast<arrow::StructBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<datatypes::AffixFuzzer5>::fill_arrow_array_builder(
|
||||
arrow::StructBuilder* builder, const datatypes::AffixFuzzer5* elements, size_t num_elements
|
||||
) {
|
||||
if (builder == nullptr) {
|
||||
return rerun::Error(ErrorCode::UnexpectedNullArgument, "Passed array builder is null.");
|
||||
}
|
||||
if (elements == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Cannot serialize null pointer to arrow array."
|
||||
);
|
||||
}
|
||||
|
||||
{
|
||||
auto field_builder = static_cast<arrow::DenseUnionBuilder*>(builder->field_builder(0));
|
||||
ARROW_RETURN_NOT_OK(field_builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
const auto& element = elements[elem_idx];
|
||||
if (element.single_optional_union.has_value()) {
|
||||
RR_RETURN_NOT_OK(
|
||||
Loggable<rerun::datatypes::AffixFuzzer4>::fill_arrow_array_builder(
|
||||
field_builder,
|
||||
&element.single_optional_union.value(),
|
||||
1
|
||||
)
|
||||
);
|
||||
} else {
|
||||
ARROW_RETURN_NOT_OK(field_builder->AppendNull());
|
||||
}
|
||||
}
|
||||
}
|
||||
ARROW_RETURN_NOT_OK(builder->AppendValues(static_cast<int64_t>(num_elements), nullptr));
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,61 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/datatypes/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "affix_fuzzer4.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <rerun/result.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace arrow {
|
||||
class Array;
|
||||
class DataType;
|
||||
class StructBuilder;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::datatypes {
|
||||
struct AffixFuzzer5 {
|
||||
std::optional<rerun::datatypes::AffixFuzzer4> single_optional_union;
|
||||
|
||||
public:
|
||||
AffixFuzzer5() = default;
|
||||
|
||||
AffixFuzzer5(std::optional<rerun::datatypes::AffixFuzzer4> single_optional_union_)
|
||||
: single_optional_union(std::move(single_optional_union_)) {}
|
||||
|
||||
AffixFuzzer5& operator=(std::optional<rerun::datatypes::AffixFuzzer4> single_optional_union_
|
||||
) {
|
||||
single_optional_union = std::move(single_optional_union_);
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::datatypes
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<datatypes::AffixFuzzer5> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.datatypes.AffixFuzzer5";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::datatypes::AffixFuzzer5` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const datatypes::AffixFuzzer5* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::StructBuilder* builder, const datatypes::AffixFuzzer5* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/enum_test.fbs".
|
||||
|
||||
#include "enum_test.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<datatypes::EnumTest>::arrow_datatype() {
|
||||
static const auto datatype = arrow::uint8();
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<datatypes::EnumTest>::to_arrow(
|
||||
const datatypes::EnumTest* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<datatypes::EnumTest>::fill_arrow_array_builder(
|
||||
static_cast<arrow::UInt8Builder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<datatypes::EnumTest>::fill_arrow_array_builder(
|
||||
arrow::UInt8Builder* builder, const datatypes::EnumTest* elements, size_t num_elements
|
||||
) {
|
||||
if (builder == nullptr) {
|
||||
return rerun::Error(ErrorCode::UnexpectedNullArgument, "Passed array builder is null.");
|
||||
}
|
||||
if (elements == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Cannot serialize null pointer to arrow array."
|
||||
);
|
||||
}
|
||||
|
||||
ARROW_RETURN_NOT_OK(builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
const auto variant = elements[elem_idx];
|
||||
ARROW_RETURN_NOT_OK(builder->Append(static_cast<uint8_t>(variant)));
|
||||
}
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/enum_test.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <rerun/result.hpp>
|
||||
|
||||
namespace arrow {
|
||||
/// \private
|
||||
template <typename T>
|
||||
class NumericBuilder;
|
||||
|
||||
class Array;
|
||||
class DataType;
|
||||
class UInt8Type;
|
||||
using UInt8Builder = NumericBuilder<UInt8Type>;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::datatypes {
|
||||
/// **Datatype**: A test of the enum type.
|
||||
enum class EnumTest : uint8_t {
|
||||
|
||||
/// Great film.
|
||||
Up = 1,
|
||||
|
||||
/// Feeling blue.
|
||||
Down = 2,
|
||||
|
||||
/// Correct.
|
||||
Right = 3,
|
||||
|
||||
/// It's what's remaining.
|
||||
Left = 4,
|
||||
|
||||
/// It's the only way to go.
|
||||
Forward = 5,
|
||||
|
||||
/// Baby's got it.
|
||||
Back = 6,
|
||||
};
|
||||
} // namespace rerun::datatypes
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<datatypes::EnumTest> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.datatypes.EnumTest";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::datatypes::EnumTest` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const datatypes::EnumTest* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::UInt8Builder* builder, const datatypes::EnumTest* elements, size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,64 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/datatypes/fuzzy.fbs".
|
||||
|
||||
#include "flattened_scalar.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::datatypes {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<datatypes::FlattenedScalar>::arrow_datatype() {
|
||||
static const auto datatype = arrow::struct_({
|
||||
arrow::field("value", arrow::float32(), false),
|
||||
});
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<datatypes::FlattenedScalar>::to_arrow(
|
||||
const datatypes::FlattenedScalar* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<datatypes::FlattenedScalar>::fill_arrow_array_builder(
|
||||
static_cast<arrow::StructBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<datatypes::FlattenedScalar>::fill_arrow_array_builder(
|
||||
arrow::StructBuilder* builder, const datatypes::FlattenedScalar* elements,
|
||||
size_t num_elements
|
||||
) {
|
||||
if (builder == nullptr) {
|
||||
return rerun::Error(ErrorCode::UnexpectedNullArgument, "Passed array builder is null.");
|
||||
}
|
||||
if (elements == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Cannot serialize null pointer to arrow array."
|
||||
);
|
||||
}
|
||||
|
||||
{
|
||||
auto field_builder = static_cast<arrow::FloatBuilder*>(builder->field_builder(0));
|
||||
ARROW_RETURN_NOT_OK(field_builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
ARROW_RETURN_NOT_OK(field_builder->Append(elements[elem_idx].value));
|
||||
}
|
||||
}
|
||||
ARROW_RETURN_NOT_OK(builder->AppendValues(static_cast<int64_t>(num_elements), nullptr));
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,55 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/datatypes/fuzzy.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <rerun/result.hpp>
|
||||
|
||||
namespace arrow {
|
||||
class Array;
|
||||
class DataType;
|
||||
class StructBuilder;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::datatypes {
|
||||
struct FlattenedScalar {
|
||||
float value;
|
||||
|
||||
public:
|
||||
FlattenedScalar() = default;
|
||||
|
||||
FlattenedScalar(float value_) : value(value_) {}
|
||||
|
||||
FlattenedScalar& operator=(float value_) {
|
||||
value = value_;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::datatypes
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<datatypes::FlattenedScalar> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.datatypes.FlattenedScalar";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::datatypes::FlattenedScalar` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const datatypes::FlattenedScalar* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::StructBuilder* builder, const datatypes::FlattenedScalar* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/enum_test.fbs".
|
||||
|
||||
#include "multi_enum.hpp"
|
||||
|
||||
#include "enum_test.hpp"
|
||||
#include "valued_enum.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::datatypes {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<datatypes::MultiEnum>::arrow_datatype() {
|
||||
static const auto datatype = arrow::struct_({
|
||||
arrow::field("value1", Loggable<rerun::datatypes::EnumTest>::arrow_datatype(), false),
|
||||
arrow::field("value2", Loggable<rerun::datatypes::ValuedEnum>::arrow_datatype(), true),
|
||||
});
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<datatypes::MultiEnum>::to_arrow(
|
||||
const datatypes::MultiEnum* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<datatypes::MultiEnum>::fill_arrow_array_builder(
|
||||
static_cast<arrow::StructBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<datatypes::MultiEnum>::fill_arrow_array_builder(
|
||||
arrow::StructBuilder* builder, const datatypes::MultiEnum* elements, size_t num_elements
|
||||
) {
|
||||
if (builder == nullptr) {
|
||||
return rerun::Error(ErrorCode::UnexpectedNullArgument, "Passed array builder is null.");
|
||||
}
|
||||
if (elements == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Cannot serialize null pointer to arrow array."
|
||||
);
|
||||
}
|
||||
|
||||
{
|
||||
auto field_builder = static_cast<arrow::UInt8Builder*>(builder->field_builder(0));
|
||||
ARROW_RETURN_NOT_OK(field_builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
RR_RETURN_NOT_OK(Loggable<rerun::datatypes::EnumTest>::fill_arrow_array_builder(
|
||||
field_builder,
|
||||
&elements[elem_idx].value1,
|
||||
1
|
||||
));
|
||||
}
|
||||
}
|
||||
{
|
||||
auto field_builder = static_cast<arrow::UInt8Builder*>(builder->field_builder(1));
|
||||
ARROW_RETURN_NOT_OK(field_builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
const auto& element = elements[elem_idx];
|
||||
if (element.value2.has_value()) {
|
||||
RR_RETURN_NOT_OK(
|
||||
Loggable<rerun::datatypes::ValuedEnum>::fill_arrow_array_builder(
|
||||
field_builder,
|
||||
&element.value2.value(),
|
||||
1
|
||||
)
|
||||
);
|
||||
} else {
|
||||
ARROW_RETURN_NOT_OK(field_builder->AppendNull());
|
||||
}
|
||||
}
|
||||
}
|
||||
ARROW_RETURN_NOT_OK(builder->AppendValues(static_cast<int64_t>(num_elements), nullptr));
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/enum_test.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "enum_test.hpp"
|
||||
#include "valued_enum.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <rerun/result.hpp>
|
||||
|
||||
namespace arrow {
|
||||
class Array;
|
||||
class DataType;
|
||||
class StructBuilder;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::datatypes {
|
||||
struct MultiEnum {
|
||||
/// The first value.
|
||||
rerun::datatypes::EnumTest value1;
|
||||
|
||||
/// The second value.
|
||||
std::optional<rerun::datatypes::ValuedEnum> value2;
|
||||
|
||||
public:
|
||||
MultiEnum() = default;
|
||||
};
|
||||
} // namespace rerun::datatypes
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<datatypes::MultiEnum> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.datatypes.MultiEnum";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::datatypes::MultiEnum` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const datatypes::MultiEnum* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::StructBuilder* builder, const datatypes::MultiEnum* elements, size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,59 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy_deps.fbs".
|
||||
|
||||
#include "primitive_component.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::datatypes {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<datatypes::PrimitiveComponent>::arrow_datatype(
|
||||
) {
|
||||
static const auto datatype = arrow::uint32();
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<datatypes::PrimitiveComponent>::to_arrow(
|
||||
const datatypes::PrimitiveComponent* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<datatypes::PrimitiveComponent>::fill_arrow_array_builder(
|
||||
static_cast<arrow::UInt32Builder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<datatypes::PrimitiveComponent>::fill_arrow_array_builder(
|
||||
arrow::UInt32Builder* builder, const datatypes::PrimitiveComponent* elements,
|
||||
size_t num_elements
|
||||
) {
|
||||
if (builder == nullptr) {
|
||||
return rerun::Error(ErrorCode::UnexpectedNullArgument, "Passed array builder is null.");
|
||||
}
|
||||
if (elements == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Cannot serialize null pointer to arrow array."
|
||||
);
|
||||
}
|
||||
|
||||
static_assert(sizeof(*elements) == sizeof(elements->value));
|
||||
ARROW_RETURN_NOT_OK(
|
||||
builder->AppendValues(&elements->value, static_cast<int64_t>(num_elements))
|
||||
);
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,61 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy_deps.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <rerun/result.hpp>
|
||||
|
||||
namespace arrow {
|
||||
/// \private
|
||||
template <typename T>
|
||||
class NumericBuilder;
|
||||
|
||||
class Array;
|
||||
class DataType;
|
||||
class UInt32Type;
|
||||
using UInt32Builder = NumericBuilder<UInt32Type>;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::datatypes {
|
||||
struct PrimitiveComponent {
|
||||
uint32_t value;
|
||||
|
||||
public:
|
||||
PrimitiveComponent() = default;
|
||||
|
||||
PrimitiveComponent(uint32_t value_) : value(value_) {}
|
||||
|
||||
PrimitiveComponent& operator=(uint32_t value_) {
|
||||
value = value_;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::datatypes
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<datatypes::PrimitiveComponent> {
|
||||
static constexpr std::string_view ComponentType =
|
||||
"rerun.testing.datatypes.PrimitiveComponent";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::datatypes::PrimitiveComponent` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const datatypes::PrimitiveComponent* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::UInt32Builder* builder, const datatypes::PrimitiveComponent* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,58 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy_deps.fbs".
|
||||
|
||||
#include "string_component.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun::datatypes {}
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<datatypes::StringComponent>::arrow_datatype() {
|
||||
static const auto datatype = arrow::utf8();
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<datatypes::StringComponent>::to_arrow(
|
||||
const datatypes::StringComponent* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<datatypes::StringComponent>::fill_arrow_array_builder(
|
||||
static_cast<arrow::StringBuilder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<datatypes::StringComponent>::fill_arrow_array_builder(
|
||||
arrow::StringBuilder* builder, const datatypes::StringComponent* elements,
|
||||
size_t num_elements
|
||||
) {
|
||||
if (builder == nullptr) {
|
||||
return rerun::Error(ErrorCode::UnexpectedNullArgument, "Passed array builder is null.");
|
||||
}
|
||||
if (elements == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Cannot serialize null pointer to arrow array."
|
||||
);
|
||||
}
|
||||
|
||||
ARROW_RETURN_NOT_OK(builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
ARROW_RETURN_NOT_OK(builder->Append(elements[elem_idx].value));
|
||||
}
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
@@ -0,0 +1,57 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/fuzzy_deps.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <rerun/result.hpp>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
namespace arrow {
|
||||
class Array;
|
||||
class DataType;
|
||||
class StringBuilder;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::datatypes {
|
||||
struct StringComponent {
|
||||
std::string value;
|
||||
|
||||
public:
|
||||
StringComponent() = default;
|
||||
|
||||
StringComponent(std::string value_) : value(std::move(value_)) {}
|
||||
|
||||
StringComponent& operator=(std::string value_) {
|
||||
value = std::move(value_);
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
} // namespace rerun::datatypes
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<datatypes::StringComponent> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.datatypes.StringComponent";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::datatypes::StringComponent` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const datatypes::StringComponent* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::StringBuilder* builder, const datatypes::StringComponent* elements,
|
||||
size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/enum_test.fbs".
|
||||
|
||||
#include "valued_enum.hpp"
|
||||
|
||||
#include <arrow/builder.h>
|
||||
#include <arrow/type_fwd.h>
|
||||
|
||||
namespace rerun {
|
||||
const std::shared_ptr<arrow::DataType>& Loggable<datatypes::ValuedEnum>::arrow_datatype() {
|
||||
static const auto datatype = arrow::uint8();
|
||||
return datatype;
|
||||
}
|
||||
|
||||
Result<std::shared_ptr<arrow::Array>> Loggable<datatypes::ValuedEnum>::to_arrow(
|
||||
const datatypes::ValuedEnum* instances, size_t num_instances
|
||||
) {
|
||||
// TODO(andreas): Allow configuring the memory pool.
|
||||
arrow::MemoryPool* pool = arrow::default_memory_pool();
|
||||
auto datatype = arrow_datatype();
|
||||
|
||||
ARROW_ASSIGN_OR_RAISE(auto builder, arrow::MakeBuilder(datatype, pool))
|
||||
if (instances && num_instances > 0) {
|
||||
RR_RETURN_NOT_OK(Loggable<datatypes::ValuedEnum>::fill_arrow_array_builder(
|
||||
static_cast<arrow::UInt8Builder*>(builder.get()),
|
||||
instances,
|
||||
num_instances
|
||||
));
|
||||
}
|
||||
std::shared_ptr<arrow::Array> array;
|
||||
ARROW_RETURN_NOT_OK(builder->Finish(&array));
|
||||
return array;
|
||||
}
|
||||
|
||||
rerun::Error Loggable<datatypes::ValuedEnum>::fill_arrow_array_builder(
|
||||
arrow::UInt8Builder* builder, const datatypes::ValuedEnum* elements, size_t num_elements
|
||||
) {
|
||||
if (builder == nullptr) {
|
||||
return rerun::Error(ErrorCode::UnexpectedNullArgument, "Passed array builder is null.");
|
||||
}
|
||||
if (elements == nullptr) {
|
||||
return rerun::Error(
|
||||
ErrorCode::UnexpectedNullArgument,
|
||||
"Cannot serialize null pointer to arrow array."
|
||||
);
|
||||
}
|
||||
|
||||
ARROW_RETURN_NOT_OK(builder->Reserve(static_cast<int64_t>(num_elements)));
|
||||
for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) {
|
||||
const auto variant = elements[elem_idx];
|
||||
ARROW_RETURN_NOT_OK(builder->Append(static_cast<uint8_t>(variant)));
|
||||
}
|
||||
|
||||
return Error::ok();
|
||||
}
|
||||
} // namespace rerun
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
|
||||
// Based on "crates/store/re_sdk_types/definitions/rerun/testing/components/enum_test.fbs".
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <rerun/result.hpp>
|
||||
|
||||
namespace arrow {
|
||||
/// \private
|
||||
template <typename T>
|
||||
class NumericBuilder;
|
||||
|
||||
class Array;
|
||||
class DataType;
|
||||
class UInt8Type;
|
||||
using UInt8Builder = NumericBuilder<UInt8Type>;
|
||||
} // namespace arrow
|
||||
|
||||
namespace rerun::datatypes {
|
||||
/// **Datatype**: A test of an enumerate with specified values.
|
||||
enum class ValuedEnum : uint8_t {
|
||||
|
||||
/// One.
|
||||
One = 1,
|
||||
|
||||
/// Two.
|
||||
Two = 2,
|
||||
|
||||
/// Three.
|
||||
Three = 3,
|
||||
|
||||
/// The answer to life, the universe, and everything.
|
||||
TheAnswer = 42,
|
||||
};
|
||||
} // namespace rerun::datatypes
|
||||
|
||||
namespace rerun {
|
||||
template <typename T>
|
||||
struct Loggable;
|
||||
|
||||
/// \private
|
||||
template <>
|
||||
struct Loggable<datatypes::ValuedEnum> {
|
||||
static constexpr std::string_view ComponentType = "rerun.testing.datatypes.ValuedEnum";
|
||||
|
||||
/// Returns the arrow data type this type corresponds to.
|
||||
static const std::shared_ptr<arrow::DataType>& arrow_datatype();
|
||||
|
||||
/// Serializes an array of `rerun::datatypes::ValuedEnum` into an arrow array.
|
||||
static Result<std::shared_ptr<arrow::Array>> to_arrow(
|
||||
const datatypes::ValuedEnum* instances, size_t num_instances
|
||||
);
|
||||
|
||||
/// Fills an arrow array builder with an array of this type.
|
||||
static rerun::Error fill_arrow_array_builder(
|
||||
arrow::UInt8Builder* builder, const datatypes::ValuedEnum* elements, size_t num_elements
|
||||
);
|
||||
};
|
||||
} // namespace rerun
|
||||
Reference in New Issue
Block a user