blob: b796621d1af5925921c8b8b4d74edebfba1eeb28 (
plain)
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
|
#pragma once
#include <mbgl/style/function/categorical_stops.hpp>
namespace mbgl {
namespace style {
template <class T>
class CompositeCategoricalStops {
public:
using Stops = std::map<float, std::map<CategoricalValue, T>>;
Stops stops;
CompositeCategoricalStops() = default;
CompositeCategoricalStops(Stops stops_)
: stops(std::move(stops_)) {
}
CategoricalStops<T> innerStops(const std::map<CategoricalValue, T>& stops_) const {
return CategoricalStops<T>(stops_);
}
friend bool operator==(const CompositeCategoricalStops& lhs,
const CompositeCategoricalStops& rhs) {
return lhs.stops == rhs.stops;
}
};
} // namespace style
} // namespace mbgl
|