diff options
Diffstat (limited to 'searchsummary/src/tests/extractkeywords/simplequerystack.cpp')
-rw-r--r-- | searchsummary/src/tests/extractkeywords/simplequerystack.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/searchsummary/src/tests/extractkeywords/simplequerystack.cpp b/searchsummary/src/tests/extractkeywords/simplequerystack.cpp new file mode 100644 index 00000000000..8c85417c79a --- /dev/null +++ b/searchsummary/src/tests/extractkeywords/simplequerystack.cpp @@ -0,0 +1,36 @@ +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +#include "simplequerystack.h" +#include <vespa/vespalib/util/compress.h> + +#include <vespa/log/log.h> +LOG_SETUP(".search.simplequerystack"); + +namespace search { + +SimpleQueryStack::SimpleQueryStack() + : _stack(nullptr) +{ +} + +SimpleQueryStack::~SimpleQueryStack() +{ + delete _stack; +} + +void +SimpleQueryStack::Push(SimpleQueryStackItem *item) +{ + item->_next = _stack; + _stack = item; +} + +void +SimpleQueryStack::AppendBuffer(RawBuf *buf) const +{ + for (SimpleQueryStackItem *item = _stack; item != nullptr; item = item->_next) { + item->AppendBuffer(buf); + } +} + +} // namespace search |