// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include #include #include namespace proton { /* * Utility class to access a config vector based on name instead of index. * The vector must remain valid during the lifetime of the config hash. */ template class ConfigHash { vespalib::hash_map _hash; public: ConfigHash(const std::vector &config); ~ConfigHash(); const Elem *lookup(const vespalib::string &name) const; }; } // namespace proton