// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "loadedvalue.h" #include #include namespace search::attribute { /** * Temporary representation of enumerated attribute loaded from non-enumerated * save file (i.e. old save format). For numeric data types. */ template struct LoadedNumericValue : public LoadedValue { LoadedNumericValue() : LoadedValue() { } class ValueCompare { public: bool operator()(const LoadedNumericValue &x, const LoadedNumericValue &y) const { return x < y; } }; class ValueRadix { public: uint64_t operator()(const LoadedValue &v) const { return vespalib::convertForSort::convert(v.getValue()); } }; }; template void sortLoadedByValue(SequentialReadModifyWriteVector> & loaded); template void sortLoadedByDocId(SequentialReadModifyWriteVector> & loaded); }