blob: e6ee07512f24aabd97cf5c863ee673bdb3b11c01 (
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
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/vespalib/stllike/string.h>
#include <vector>
namespace slobrok {
struct ServiceMapping {
vespalib::string name;
vespalib::string spec;
ServiceMapping(const vespalib::string & name_, const vespalib::string & spec_) noexcept : name(name_), spec(spec_) { }
ServiceMapping(const ServiceMapping& rhs) noexcept;
~ServiceMapping();
ServiceMapping& operator=(const ServiceMapping& rhs);
bool operator== (const ServiceMapping &other) const noexcept {
return name == other.name && spec == other.spec;
}
bool operator< (const ServiceMapping &other) const noexcept {
if (name < other.name) return true;
if (other.name < name) return false;
return spec < other.spec;
}
};
using ServiceMappingList = std::vector<ServiceMapping>;
}
|