aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib/src/vespa/vespalib/data/slime/named_symbol_inserter.h
blob: e5df93d078e290208ef0ceac8913b7966b2cd78a (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include "symbol_inserter.h"

namespace vespalib { struct Memory; }

namespace vespalib::slime {

class SymbolTable;

/**
 * Class used to insert the name of a field into a symbol table.
 **/
class NamedSymbolInserter final : public SymbolInserter
{
private:
    SymbolTable &_table;
    const Memory &_name;

public:
    NamedSymbolInserter(SymbolTable &table, const Memory &name) noexcept
        : _table(table), _name(name) {}
    Symbol insert() override;
};

} // namespace vespalib::slime