// 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 * mapping from enumerated value to value. * @tparam MultiValueType The multi-value type of the data to access. * @tparam RawMultiValueType The multi-value type of the raw data to access. * @tparam EnumEntryType The enum store entry type. */ template > class EnumeratedMultiValueReadView : public IMultiValueReadView { using AtomicEntryRef = vespalib::datastore::AtomicEntryRef; MultiValueMappingReadView _mv_mapping_read_view; const EnumStoreT& _enum_store; mutable std::vector _copy; public: EnumeratedMultiValueReadView(MultiValueMappingReadView mv_mapping_read_view, const EnumStoreT& enum_store); ~EnumeratedMultiValueReadView() override; vespalib::ConstArrayRef get_values(uint32_t docid) const override; }; }