// DO NOT EDIT! This file was auto-generated by crates/re_types_builder/src/codegen/cpp/mod.rs
// Based on "crates/re_types/definitions/rerun/blueprint/components/column_share.fbs".

#pragma once

#include "../../result.hpp"

#include <cstdint>
#include <memory>

namespace arrow {
    /// \private
    template <typename T>
    class NumericBuilder;

    class Array;
    class DataType;
    class FloatType;
    using FloatBuilder = NumericBuilder<FloatType>;
} // namespace arrow

namespace rerun::blueprint::components {
    /// **Component**: The layout share of a column in the container.
    struct ColumnShare {
        /// The layout shares of a column in the container.
        float share;

      public:
        ColumnShare() = default;

        ColumnShare(float share_) : share(share_) {}

        ColumnShare& operator=(float share_) {
            share = share_;
            return *this;
        }
    };
} // namespace rerun::blueprint::components

namespace rerun {
    template <typename T>
    struct Loggable;

    /// \private
    template <>
    struct Loggable<blueprint::components::ColumnShare> {
        static constexpr const char Name[] = "rerun.blueprint.components.ColumnShare";

        /// Returns the arrow data type this type corresponds to.
        static const std::shared_ptr<arrow::DataType>& arrow_datatype();

        /// Serializes an array of `rerun::blueprint:: components::ColumnShare` into an arrow array.
        static Result<std::shared_ptr<arrow::Array>> to_arrow(
            const blueprint::components::ColumnShare* 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 blueprint::components::ColumnShare* elements,
            size_t num_elements
        );
    };
} // namespace rerun
