aboutsummaryrefslogtreecommitdiffstats
path: root/searchsummary/src/vespa/searchsummary/docsummary/res_config_entry.cpp
blob: 871385cf9b3235cf0661116af9b43f273fc1bdd5 (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "res_config_entry.h"
#include "docsum_field_writer.h"

namespace search::docsummary {

ResConfigEntry::ResConfigEntry(const vespalib::string& name_in) noexcept
    : _name(name_in),
      _writer(),
      _generated(false)
{
}

ResConfigEntry::~ResConfigEntry() = default;

ResConfigEntry::ResConfigEntry(ResConfigEntry&&) noexcept = default;

void
ResConfigEntry::set_writer(std::unique_ptr<DocsumFieldWriter> writer_in)
{
    _writer = std::move(writer_in);
    _generated = _writer ? _writer->isGenerated() : false;
}

}