aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib/src/vespa/vespalib/metrics/point.h
blob: a8f483c4404d4bc3bfa7e18a23e42c69390e7e4e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include "handle.h"
#include "point_map.h"

namespace vespalib::metrics {

/**
 * Opaque handle representing an unique N-dimensional point
 **/
class Point : public Handle<Point> {
public:
    static Point empty;
    explicit Point(size_t id) : Handle<Point>(id) {}

    static Point from_map(const PointMap& map);
    static Point from_map(PointMap&& map);
    const PointMap& as_map() const;
};

} // namespace vespalib::metrics