Files
2026-07-13 13:05:14 +08:00

68 lines
2.3 KiB
C++
Generated

// 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