summaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/common/documentlocations.h
blob: d1a31a81bdc6bf2e3812ddaba5b3771b58d9a32b (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
30
31
32
33
34
35
36
37
38
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <memory>

namespace search { class AttributeGuard; }
namespace search::attribute { class IAttributeVector; }

namespace search::common {


/**
 * This class contains meta-information about document locations (positions)
 * for all documents in the index, and references to the attributes
 * containing the actual document locations.
 */
class DocumentLocations
{
private:
    const search::attribute::IAttributeVector *_vec;

public:
    DocumentLocations(DocumentLocations &&);
    DocumentLocations & operator = (DocumentLocations &&);
    DocumentLocations();
    virtual ~DocumentLocations();

    void setVec(const search::attribute::IAttributeVector &vec) {
        _vec = &vec;
    }

    const search::attribute::IAttributeVector *getVec() const {
        return _vec;
    }
};

}