aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib/src/vespa/vespalib/metrics/point.cpp
blob: f1c0c545e213cd384a7bacec559d6e83bb103e28 (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "point.h"
#include "name_repo.h"

namespace vespalib {
namespace metrics {

Point Point::empty(0);

Point
Point::from_map(const PointMap& map)
{
    return NameRepo::instance.pointFrom(map);
}

Point
Point::from_map(PointMap&& map)
{
    return NameRepo::instance.pointFrom(std::move(map));
}

const PointMap&
Point::as_map() const
{
    return NameRepo::instance.pointMap(*this);
}

} // namespace vespalib::metrics
} // namespace vespalib