aboutsummaryrefslogtreecommitdiffstats
path: root/searchsummary/src/vespa/juniper/expcache.h
blob: 9a0d7602c94f61cf870e8b098db4ec65a1533022 (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 Vespa.ai. 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 &);
};