summaryrefslogtreecommitdiff
path: root/src/mbgl/style/layers/custom_layer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style/layers/custom_layer.cpp')
-rw-r--r--src/mbgl/style/layers/custom_layer.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/mbgl/style/layers/custom_layer.cpp b/src/mbgl/style/layers/custom_layer.cpp
index 90b97104a0..060e455217 100644
--- a/src/mbgl/style/layers/custom_layer.cpp
+++ b/src/mbgl/style/layers/custom_layer.cpp
@@ -39,5 +39,29 @@ Mutable<Layer::Impl> CustomLayer::mutableBaseImpl() const {
return staticMutableCast<Layer::Impl>(mutableImpl());
}
+CustomLayerFactory* CustomLayerFactory::instance = nullptr;
+
+CustomLayerFactory::CustomLayerFactory() {
+ assert(!instance);
+ instance = this;
+}
+
+CustomLayerFactory::~CustomLayerFactory() = default;
+
+// static
+CustomLayerFactory* CustomLayerFactory::get() {
+ assert(instance);
+ return instance;
+}
+
+bool CustomLayerFactory::supportsType(const std::string&) const {
+ return false;
+}
+
+std::unique_ptr<style::Layer> CustomLayerFactory::createLayer(const std::string&, const conversion::Convertible&) {
+ assert(false);
+ return nullptr;
+}
+
} // namespace style
} // namespace mbgl