diff options
Diffstat (limited to 'src/mbgl/renderer/style_diff.hpp')
-rw-r--r-- | src/mbgl/renderer/style_diff.hpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/mbgl/renderer/style_diff.hpp b/src/mbgl/renderer/style_diff.hpp new file mode 100644 index 0000000000..dc2ef95c6c --- /dev/null +++ b/src/mbgl/renderer/style_diff.hpp @@ -0,0 +1,30 @@ +#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 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 |