// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "isearchcontext.h" #include namespace proton::matching { class MatchContext { using IAttributeContext = search::attribute::IAttributeContext; std::unique_ptr _attrCtx; std::unique_ptr _searchCtx; public: using UP = std::unique_ptr; MatchContext() noexcept; MatchContext(IAttributeContext::UP attrCtx, std::unique_ptr searchCtx) noexcept; MatchContext(MatchContext &&) noexcept = default; ~MatchContext(); IAttributeContext &getAttributeContext() const { return *_attrCtx; } ISearchContext &getSearchContext() const { return *_searchCtx; } void releaseEnumGuards() { _attrCtx->releaseEnumGuards(); } }; }