From f35ca0d9dfc8a6ba88273edbeda43e633ae0adce Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Tue, 7 Feb 2017 12:35:27 -0800 Subject: [core, ios, macos] Refactor composite stop types and conversions --- .../style/function/composite_interval_stops.hpp | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 include/mbgl/style/function/composite_interval_stops.hpp (limited to 'include/mbgl/style/function/composite_interval_stops.hpp') diff --git a/include/mbgl/style/function/composite_interval_stops.hpp b/include/mbgl/style/function/composite_interval_stops.hpp new file mode 100644 index 0000000000..3c495f2a7f --- /dev/null +++ b/include/mbgl/style/function/composite_interval_stops.hpp @@ -0,0 +1,32 @@ +#pragma once + +#include + +#include + +namespace mbgl { +namespace style { + +template +class CompositeIntervalStops { +public: + using Stops = std::map>; + Stops stops; + + CompositeIntervalStops() = default; + CompositeIntervalStops(Stops stops_) + : stops(std::move(stops_)) { + } + + IntervalStops innerStops(const std::map& stops_) const { + return IntervalStops(stops_); + } + + friend bool operator==(const CompositeIntervalStops& lhs, + const CompositeIntervalStops& rhs) { + return lhs.stops == rhs.stops; + } +}; + +} // namespace style +} // namespace mbgl -- cgit v1.2.1