// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "multivalueattributesaver.h" #include "multi_value_mapping.h" #include namespace search { /* * Class for saving a multivalue attribute. * * Template argument MultiValueT is either ValueType or * multivalue::WeightedValue */ template class MultiValueNumericAttributeSaver : public MultiValueAttributeSaver { using Parent = MultiValueAttributeSaver; using MultiValueType = MultiValueT; using ValueType = multivalue::ValueType_t; using GenerationHandler = vespalib::GenerationHandler; using Parent::_frozenIndices; using MultiValueMapping = attribute::MultiValueMapping; const MultiValueMapping &_mvMapping; public: bool onSave(IAttributeSaveTarget &saveTarget) override; MultiValueNumericAttributeSaver(GenerationHandler::Guard &&guard, const attribute::AttributeHeader &header, const MultiValueMapping &mvMapping); ~MultiValueNumericAttributeSaver() override; }; } // namespace search