aboutsummaryrefslogtreecommitdiffstats
path: root/searchsummary/src/vespa/juniper/expcache.h
blob: 5f16397d69aababe571c6f76f4311592000d9c36 (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include "simplemap.h"
#include <cstdint>

class MatchObject;

class ExpansionCache
{
public:
    explicit ExpansionCache(MatchObject* default_obj);

    virtual ~ExpansionCache();

    MatchObject* Lookup(uint32_t langid);
private:
    MatchObject* _default;
    simplemap<uint32_t, MatchObject*> _cache;

    ExpansionCache(ExpansionCache &);
    ExpansionCache &operator=(ExpansionCache &);
};