summaryrefslogtreecommitdiff
path: root/include/mbgl/layer/custom_layer.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/layer/custom_layer.hpp')
-rw-r--r--include/mbgl/layer/custom_layer.hpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/mbgl/layer/custom_layer.hpp b/include/mbgl/layer/custom_layer.hpp
new file mode 100644
index 0000000000..81e91ddf50
--- /dev/null
+++ b/include/mbgl/layer/custom_layer.hpp
@@ -0,0 +1,30 @@
+#pragma once
+
+#include <mbgl/style/layer.hpp>
+
+namespace mbgl {
+
+class CustomLayer : public Layer {
+public:
+ CustomLayer(const std::string& id,
+ CustomLayerInitializeFunction,
+ CustomLayerRenderFunction,
+ CustomLayerDeinitializeFunction,
+ void* context);
+ ~CustomLayer() final;
+
+ // Private implementation
+
+ class Impl;
+ Impl* impl;
+
+ CustomLayer(const Impl&);
+ CustomLayer(const CustomLayer&) = delete;
+};
+
+template <>
+inline bool Layer::is<CustomLayer>() const {
+ return type == Type::Custom;
+}
+
+} // namespace mbgl