aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/queryeval/fake_requestcontext.cpp
blob: ae5a7583c8c66933efa600fdd42c3e8c47014455 (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "fake_requestcontext.h"
#include <vespa/vespalib/util/testclock.h>


namespace search::queryeval {

FakeRequestContext::FakeRequestContext()
    : FakeRequestContext(nullptr)
{
}

FakeRequestContext::FakeRequestContext(attribute::IAttributeContext * context, vespalib::steady_time softDoom, vespalib::steady_time hardDoom)
    : _clock(std::make_unique<vespalib::TestClock>()),
      _doom(_clock->clock(), softDoom, hardDoom, false),
      _attributeContext(context),
      _query_tensor_name(),
      _query_tensor(),
      _attribute_blueprint_params()
{
}

FakeRequestContext::~FakeRequestContext() = default;

const search::attribute::AttributeBlueprintParams&
FakeRequestContext::get_attribute_blueprint_params() const
{
    return _attribute_blueprint_params;
}

}