blob: 8c85417c79a4236510d88dc8e552199f346d2cab (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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
|