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

#pragma once

#include <string>
#include <vespa/searchlib/common/geo_location_spec.h>
#include "point.h"
#include "rectangle.h"

namespace vespalib { class asciistream; }
namespace search::query {

class Location : public search::common::GeoLocation {
    using Parent = search::common::GeoLocation;
public:
    Location() {}
    Location(const Parent &spec) : Parent(spec) {}
    ~Location() {}
    Location(const Point &p, uint32_t dist, uint32_t x_asp);
    Location(const Rectangle &rect);
    Location(const Rectangle &rect, const Point &p, uint32_t dist, uint32_t x_asp);

    bool operator==(const Location &other) const;
    std::string getOldFormatString() const;
    std::string getJsonFormatString() const;
};

vespalib::asciistream &operator<<(vespalib::asciistream &out, const Location &loc);

}