aboutsummaryrefslogtreecommitdiffstats
path: root/searchsummary/src/vespa/juniper/keyocc.cpp
blob: 7214bc72fe949be57900ed5c0ebfe617a8461503 (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 Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "keyocc.h"

key_occ::key_occ(const char* term_, off_t spos, off_t stoken, int len) :
    MatchElement(spos, stoken),
    tokenlen(len),
    _term(term_)
{ }


void key_occ::set_valid()
{
    _valid = true;
}

void key_occ::add_to_keylist(keylist& kl)
{
    key_occ* k = this;
    kl.insert(k);
}


void key_occ::dump(std::string& s)
{
    s.append(term());
}