// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "multi_value_mapping_read_view.h" #include "enumstore.h" #include #include namespace search::attribute { /** * Read view for the data stored in a multi-value attribute that handles * addition and removal of weight. * @tparam MultiValueType The multi-value type of the data to access. * @tparam RawMultiValueType The multi-value type of the raw data to access. */ template class CopyMultiValueReadView : public IMultiValueReadView { static_assert(std::is_same_v, multivalue::ValueType_t>); using ValueType = multivalue::ValueType_t; MultiValueMappingReadView _mv_mapping_read_view; mutable std::vector _copy; public: CopyMultiValueReadView(MultiValueMappingReadView mv_mapping_read_view); ~CopyMultiValueReadView() override; vespalib::ConstArrayRef get_values(uint32_t docid) const override; }; }