summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLStyleLayerManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin/src/MGLStyleLayerManager.h')
-rw-r--r--platform/darwin/src/MGLStyleLayerManager.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLStyleLayerManager.h b/platform/darwin/src/MGLStyleLayerManager.h
new file mode 100644
index 0000000000..0f7fab00ed
--- /dev/null
+++ b/platform/darwin/src/MGLStyleLayerManager.h
@@ -0,0 +1,30 @@
+#pragma once
+
+#import "MGLStyleLayer_Private.h"
+
+#include <mbgl/style/layer.hpp>
+
+#include <map>
+#include <string>
+#include <vector>
+
+namespace mbgl {
+
+class LayerManagerDarwin : public style::LayerManager {
+public:
+ static LayerManagerDarwin* get() noexcept;
+ ~LayerManagerDarwin();
+
+ MGLStyleLayer* createPeer(style::Layer*);
+
+private:
+ LayerManagerDarwin();
+ void addLayerType(std::unique_ptr<LayerPeerFactory>);
+ // LayerManager overrides.
+ std::unique_ptr<style::Layer> createLayer(const std::string& type, const std::string& id, const style::conversion::Convertible& value, style::conversion::Error& error) noexcept final;
+
+ std::vector<std::unique_ptr<LayerPeerFactory>> factories;
+ std::map<std::string, style::LayerFactory*> typeToFactory;
+};
+
+} // namespace mbgl