aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/query/tree/range.h
blob: 0df4d00865fa6431c95c66a208a5595212d0d324 (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/vespalib/stllike/string.h>
namespace vespalib { class asciistream; }

namespace search::query {

class Range {
    vespalib::string _range;

public:
    Range() : _range() {}
    Range(int64_t f, int64_t t);
    Range(const vespalib::string &range) : _range(range) {}

    const vespalib::string & getRangeString() const { return _range; }
};

inline bool operator==(const Range &r1, const Range &r2) {
    return r1.getRangeString() == r2.getRangeString();
}

vespalib::asciistream &operator<<(vespalib::asciistream &out, const Range &range);

}