// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "componentguard.h" #include #include namespace search { class AttributeVector; /** * This class makes sure that you will have a consistent view per document in the attribute vector * while the guard is held. **/ class AttributeGuard : public ComponentGuard { public: using UP = std::unique_ptr; using SP = std::shared_ptr; using AttributeVectorSP = std::shared_ptr; AttributeGuard(); AttributeGuard(const AttributeVectorSP & attribute); }; }