blob: 0ebb1fbfd6dec58310ca843af93507af1cd6526c (
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
31
32
33
34
35
36
37
|
#include <mbgl/style/image_impl.hpp>
#include <mbgl/style/source_impl.hpp>
#include <mbgl/style/layer_impl.hpp>
#include <mbgl/util/immutable.hpp>
#include <mbgl/util/variant.hpp>
#include <unordered_map>
namespace mbgl {
template <class T>
class StyleDifference {
public:
std::unordered_map<std::string, T> added;
std::unordered_map<std::string, T> removed;
std::unordered_map<std::string, T> changed;
};
using ImmutableImage = Immutable<style::Image::Impl>;
using ImageDifference = StyleDifference<ImmutableImage>;
ImageDifference diffImages(const std::vector<ImmutableImage>&,
const std::vector<ImmutableImage>&);
using ImmutableSource = Immutable<style::Source::Impl>;
using SourceDifference = StyleDifference<ImmutableSource>;
SourceDifference diffSources(const std::vector<ImmutableSource>&,
const std::vector<ImmutableSource>&);
using ImmutableLayer = Immutable<style::Layer::Impl>;
using LayerDifference = StyleDifference<ImmutableLayer>;
LayerDifference diffLayers(const std::vector<ImmutableLayer>&,
const std::vector<ImmutableLayer>&);
} // namespace mbgl
|