summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2018-12-10 17:21:08 +0200
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2018-12-10 18:20:32 +0200
commitebd87a5442772e9e840cd5c00be56cccfddb5c68 (patch)
treeb65309b89e2d63f063369e97ccced610fd025a60 /include
parentcbcd0875e375b06cbd163af105e8f1e0226f2df0 (diff)
downloadqtlocation-mapboxgl-ebd87a5442772e9e840cd5c00be56cccfddb5c68.tar.gz
[core, android, darwin] Move layer factories to separate files
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/layermanager/background_layer_factory.hpp14
-rw-r--r--include/mbgl/layermanager/circle_layer_factory.hpp14
-rw-r--r--include/mbgl/layermanager/custom_layer_factory.hpp17
-rw-r--r--include/mbgl/layermanager/fill_extrusion_layer_factory.hpp14
-rw-r--r--include/mbgl/layermanager/fill_layer_factory.hpp14
-rw-r--r--include/mbgl/layermanager/heatmap_layer_factory.hpp14
-rw-r--r--include/mbgl/layermanager/hillshade_layer_factory.hpp14
-rw-r--r--include/mbgl/layermanager/line_layer_factory.hpp14
-rw-r--r--include/mbgl/layermanager/raster_layer_factory.hpp14
-rw-r--r--include/mbgl/layermanager/symbol_layer_factory.hpp14
-rw-r--r--include/mbgl/style/layers/background_layer.hpp9
-rw-r--r--include/mbgl/style/layers/circle_layer.hpp9
-rw-r--r--include/mbgl/style/layers/custom_layer.hpp9
-rw-r--r--include/mbgl/style/layers/fill_extrusion_layer.hpp9
-rw-r--r--include/mbgl/style/layers/fill_layer.hpp9
-rw-r--r--include/mbgl/style/layers/heatmap_layer.hpp9
-rw-r--r--include/mbgl/style/layers/hillshade_layer.hpp9
-rw-r--r--include/mbgl/style/layers/layer.hpp.ejs9
-rw-r--r--include/mbgl/style/layers/line_layer.hpp9
-rw-r--r--include/mbgl/style/layers/raster_layer.hpp9
-rw-r--r--include/mbgl/style/layers/symbol_layer.hpp9
21 files changed, 143 insertions, 99 deletions
diff --git a/include/mbgl/layermanager/background_layer_factory.hpp b/include/mbgl/layermanager/background_layer_factory.hpp
new file mode 100644
index 0000000000..f2fa2f7a56
--- /dev/null
+++ b/include/mbgl/layermanager/background_layer_factory.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <mbgl/layermanager/layer_factory.hpp>
+
+namespace mbgl {
+
+class BackgroundLayerFactory : public LayerFactory {
+protected:
+ const style::LayerTypeInfo* getTypeInfo() const noexcept final;
+ std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
+ std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+};
+
+} // namespace mbgl
diff --git a/include/mbgl/layermanager/circle_layer_factory.hpp b/include/mbgl/layermanager/circle_layer_factory.hpp
new file mode 100644
index 0000000000..b632d892f4
--- /dev/null
+++ b/include/mbgl/layermanager/circle_layer_factory.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <mbgl/layermanager/layer_factory.hpp>
+
+namespace mbgl {
+
+class CircleLayerFactory : public LayerFactory {
+protected:
+ const style::LayerTypeInfo* getTypeInfo() const noexcept final;
+ std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
+ std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+};
+
+} // namespace mbgl
diff --git a/include/mbgl/layermanager/custom_layer_factory.hpp b/include/mbgl/layermanager/custom_layer_factory.hpp
new file mode 100644
index 0000000000..963a3dc2fd
--- /dev/null
+++ b/include/mbgl/layermanager/custom_layer_factory.hpp
@@ -0,0 +1,17 @@
+#pragma once
+
+#include <mbgl/layermanager/layer_factory.hpp>
+#include <mbgl/style/layer.hpp>
+
+#include <array>
+
+namespace mbgl {
+
+class CustomLayerFactory : public LayerFactory {
+protected:
+ const style::LayerTypeInfo* getTypeInfo() const noexcept final;
+ std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
+ std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+};
+
+} // namespace mbgl
diff --git a/include/mbgl/layermanager/fill_extrusion_layer_factory.hpp b/include/mbgl/layermanager/fill_extrusion_layer_factory.hpp
new file mode 100644
index 0000000000..c524f61950
--- /dev/null
+++ b/include/mbgl/layermanager/fill_extrusion_layer_factory.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <mbgl/layermanager/layer_factory.hpp>
+
+namespace mbgl {
+
+class FillExtrusionLayerFactory : public LayerFactory {
+protected:
+ const style::LayerTypeInfo* getTypeInfo() const noexcept final;
+ std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
+ std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+};
+
+} // namespace mbgl
diff --git a/include/mbgl/layermanager/fill_layer_factory.hpp b/include/mbgl/layermanager/fill_layer_factory.hpp
new file mode 100644
index 0000000000..eec7d0e7a0
--- /dev/null
+++ b/include/mbgl/layermanager/fill_layer_factory.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <mbgl/layermanager/layer_factory.hpp>
+
+namespace mbgl {
+
+class FillLayerFactory : public LayerFactory {
+protected:
+ const style::LayerTypeInfo* getTypeInfo() const noexcept final;
+ std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
+ std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+};
+
+} // namespace mbgl
diff --git a/include/mbgl/layermanager/heatmap_layer_factory.hpp b/include/mbgl/layermanager/heatmap_layer_factory.hpp
new file mode 100644
index 0000000000..b375dc9eb0
--- /dev/null
+++ b/include/mbgl/layermanager/heatmap_layer_factory.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <mbgl/layermanager/layer_factory.hpp>
+
+namespace mbgl {
+
+class HeatmapLayerFactory : public LayerFactory {
+protected:
+ const style::LayerTypeInfo* getTypeInfo() const noexcept final;
+ std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
+ std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+};
+
+} // namespace mbgl
diff --git a/include/mbgl/layermanager/hillshade_layer_factory.hpp b/include/mbgl/layermanager/hillshade_layer_factory.hpp
new file mode 100644
index 0000000000..25b4f6c2c4
--- /dev/null
+++ b/include/mbgl/layermanager/hillshade_layer_factory.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <mbgl/layermanager/layer_factory.hpp>
+
+namespace mbgl {
+
+class HillshadeLayerFactory : public LayerFactory {
+protected:
+ const style::LayerTypeInfo* getTypeInfo() const noexcept final;
+ std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
+ std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+};
+
+} // namespace mbgl
diff --git a/include/mbgl/layermanager/line_layer_factory.hpp b/include/mbgl/layermanager/line_layer_factory.hpp
new file mode 100644
index 0000000000..8aa7e5105b
--- /dev/null
+++ b/include/mbgl/layermanager/line_layer_factory.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <mbgl/layermanager/layer_factory.hpp>
+
+namespace mbgl {
+
+class LineLayerFactory : public LayerFactory {
+protected:
+ const style::LayerTypeInfo* getTypeInfo() const noexcept final;
+ std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
+ std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+};
+
+} // namespace mbgl
diff --git a/include/mbgl/layermanager/raster_layer_factory.hpp b/include/mbgl/layermanager/raster_layer_factory.hpp
new file mode 100644
index 0000000000..d82137ee81
--- /dev/null
+++ b/include/mbgl/layermanager/raster_layer_factory.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <mbgl/layermanager/layer_factory.hpp>
+
+namespace mbgl {
+
+class RasterLayerFactory : public LayerFactory {
+protected:
+ const style::LayerTypeInfo* getTypeInfo() const noexcept final;
+ std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
+ std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+};
+
+} // namespace mbgl
diff --git a/include/mbgl/layermanager/symbol_layer_factory.hpp b/include/mbgl/layermanager/symbol_layer_factory.hpp
new file mode 100644
index 0000000000..c10b100af6
--- /dev/null
+++ b/include/mbgl/layermanager/symbol_layer_factory.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <mbgl/layermanager/layer_factory.hpp>
+
+namespace mbgl {
+
+class SymbolLayerFactory : public LayerFactory {
+protected:
+ const style::LayerTypeInfo* getTypeInfo() const noexcept final;
+ std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
+ std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+};
+
+} // namespace mbgl
diff --git a/include/mbgl/style/layers/background_layer.hpp b/include/mbgl/style/layers/background_layer.hpp
index e501954620..f0efa7acba 100644
--- a/include/mbgl/style/layers/background_layer.hpp
+++ b/include/mbgl/style/layers/background_layer.hpp
@@ -2,7 +2,6 @@
#pragma once
-#include <mbgl/layermanager/layer_factory.hpp>
#include <mbgl/style/layer.hpp>
#include <mbgl/style/filter.hpp>
#include <mbgl/style/property_value.hpp>
@@ -57,12 +56,4 @@ protected:
};
} // namespace style
-
-class BackgroundLayerFactory : public LayerFactory {
-protected:
- const style::LayerTypeInfo* getTypeInfo() const noexcept final;
- std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
- std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
-};
-
} // namespace mbgl
diff --git a/include/mbgl/style/layers/circle_layer.hpp b/include/mbgl/style/layers/circle_layer.hpp
index 6d8969e834..08ec686ff2 100644
--- a/include/mbgl/style/layers/circle_layer.hpp
+++ b/include/mbgl/style/layers/circle_layer.hpp
@@ -2,7 +2,6 @@
#pragma once
-#include <mbgl/layermanager/layer_factory.hpp>
#include <mbgl/style/layer.hpp>
#include <mbgl/style/filter.hpp>
#include <mbgl/style/property_value.hpp>
@@ -105,12 +104,4 @@ protected:
};
} // namespace style
-
-class CircleLayerFactory : public LayerFactory {
-protected:
- const style::LayerTypeInfo* getTypeInfo() const noexcept final;
- std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
- std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
-};
-
} // namespace mbgl
diff --git a/include/mbgl/style/layers/custom_layer.hpp b/include/mbgl/style/layers/custom_layer.hpp
index 27c16fbbc5..4ae59dfae3 100644
--- a/include/mbgl/style/layers/custom_layer.hpp
+++ b/include/mbgl/style/layers/custom_layer.hpp
@@ -1,6 +1,5 @@
#pragma once
-#include <mbgl/layermanager/layer_factory.hpp>
#include <mbgl/style/layer.hpp>
#include <array>
@@ -87,12 +86,4 @@ public:
};
} // namespace style
-
-class CustomLayerFactory : public LayerFactory {
- // LayerFactory overrides.
- const style::LayerTypeInfo* getTypeInfo() const noexcept final;
- std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
- std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
-};
-
} // namespace mbgl
diff --git a/include/mbgl/style/layers/fill_extrusion_layer.hpp b/include/mbgl/style/layers/fill_extrusion_layer.hpp
index fd0888c1eb..c4b7ecfcdb 100644
--- a/include/mbgl/style/layers/fill_extrusion_layer.hpp
+++ b/include/mbgl/style/layers/fill_extrusion_layer.hpp
@@ -2,7 +2,6 @@
#pragma once
-#include <mbgl/layermanager/layer_factory.hpp>
#include <mbgl/style/layer.hpp>
#include <mbgl/style/filter.hpp>
#include <mbgl/style/property_value.hpp>
@@ -87,12 +86,4 @@ protected:
};
} // namespace style
-
-class FillExtrusionLayerFactory : public LayerFactory {
-protected:
- const style::LayerTypeInfo* getTypeInfo() const noexcept final;
- std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
- std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
-};
-
} // namespace mbgl
diff --git a/include/mbgl/style/layers/fill_layer.hpp b/include/mbgl/style/layers/fill_layer.hpp
index 6c235b6ab7..6a402f28f7 100644
--- a/include/mbgl/style/layers/fill_layer.hpp
+++ b/include/mbgl/style/layers/fill_layer.hpp
@@ -2,7 +2,6 @@
#pragma once
-#include <mbgl/layermanager/layer_factory.hpp>
#include <mbgl/style/layer.hpp>
#include <mbgl/style/filter.hpp>
#include <mbgl/style/property_value.hpp>
@@ -81,12 +80,4 @@ protected:
};
} // namespace style
-
-class FillLayerFactory : public LayerFactory {
-protected:
- const style::LayerTypeInfo* getTypeInfo() const noexcept final;
- std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
- std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
-};
-
} // namespace mbgl
diff --git a/include/mbgl/style/layers/heatmap_layer.hpp b/include/mbgl/style/layers/heatmap_layer.hpp
index 6ff377cf8f..4c3ae0daf8 100644
--- a/include/mbgl/style/layers/heatmap_layer.hpp
+++ b/include/mbgl/style/layers/heatmap_layer.hpp
@@ -2,7 +2,6 @@
#pragma once
-#include <mbgl/layermanager/layer_factory.hpp>
#include <mbgl/style/color_ramp_property_value.hpp>
#include <mbgl/style/layer.hpp>
#include <mbgl/style/filter.hpp>
@@ -70,12 +69,4 @@ protected:
};
} // namespace style
-
-class HeatmapLayerFactory : public LayerFactory {
-protected:
- const style::LayerTypeInfo* getTypeInfo() const noexcept final;
- std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
- std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
-};
-
} // namespace mbgl
diff --git a/include/mbgl/style/layers/hillshade_layer.hpp b/include/mbgl/style/layers/hillshade_layer.hpp
index 0c1843af75..760e70aa75 100644
--- a/include/mbgl/style/layers/hillshade_layer.hpp
+++ b/include/mbgl/style/layers/hillshade_layer.hpp
@@ -2,7 +2,6 @@
#pragma once
-#include <mbgl/layermanager/layer_factory.hpp>
#include <mbgl/style/layer.hpp>
#include <mbgl/style/filter.hpp>
#include <mbgl/style/property_value.hpp>
@@ -75,12 +74,4 @@ protected:
};
} // namespace style
-
-class HillshadeLayerFactory : public LayerFactory {
-protected:
- const style::LayerTypeInfo* getTypeInfo() const noexcept final;
- std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
- std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
-};
-
} // namespace mbgl
diff --git a/include/mbgl/style/layers/layer.hpp.ejs b/include/mbgl/style/layers/layer.hpp.ejs
index e4c9d69dbf..a7a8ff35c5 100644
--- a/include/mbgl/style/layers/layer.hpp.ejs
+++ b/include/mbgl/style/layers/layer.hpp.ejs
@@ -7,7 +7,6 @@
#pragma once
-#include <mbgl/layermanager/layer_factory.hpp>
<% if (type === 'heatmap' || type === 'line') { -%>
#include <mbgl/style/color_ramp_property_value.hpp>
<% } -%>
@@ -73,12 +72,4 @@ protected:
};
} // namespace style
-
-class <%- camelize(type) %>LayerFactory : public LayerFactory {
-protected:
- const style::LayerTypeInfo* getTypeInfo() const noexcept final;
- std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
- std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
-};
-
} // namespace mbgl
diff --git a/include/mbgl/style/layers/line_layer.hpp b/include/mbgl/style/layers/line_layer.hpp
index 083bac6b9c..5993ac8730 100644
--- a/include/mbgl/style/layers/line_layer.hpp
+++ b/include/mbgl/style/layers/line_layer.hpp
@@ -2,7 +2,6 @@
#pragma once
-#include <mbgl/layermanager/layer_factory.hpp>
#include <mbgl/style/color_ramp_property_value.hpp>
#include <mbgl/style/layer.hpp>
#include <mbgl/style/filter.hpp>
@@ -126,12 +125,4 @@ protected:
};
} // namespace style
-
-class LineLayerFactory : public LayerFactory {
-protected:
- const style::LayerTypeInfo* getTypeInfo() const noexcept final;
- std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
- std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
-};
-
} // namespace mbgl
diff --git a/include/mbgl/style/layers/raster_layer.hpp b/include/mbgl/style/layers/raster_layer.hpp
index ef84ee569a..f4736c9dcd 100644
--- a/include/mbgl/style/layers/raster_layer.hpp
+++ b/include/mbgl/style/layers/raster_layer.hpp
@@ -2,7 +2,6 @@
#pragma once
-#include <mbgl/layermanager/layer_factory.hpp>
#include <mbgl/style/layer.hpp>
#include <mbgl/style/filter.hpp>
#include <mbgl/style/property_value.hpp>
@@ -87,12 +86,4 @@ protected:
};
} // namespace style
-
-class RasterLayerFactory : public LayerFactory {
-protected:
- const style::LayerTypeInfo* getTypeInfo() const noexcept final;
- std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
- std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
-};
-
} // namespace mbgl
diff --git a/include/mbgl/style/layers/symbol_layer.hpp b/include/mbgl/style/layers/symbol_layer.hpp
index 3d23120559..764f1585f6 100644
--- a/include/mbgl/style/layers/symbol_layer.hpp
+++ b/include/mbgl/style/layers/symbol_layer.hpp
@@ -2,7 +2,6 @@
#pragma once
-#include <mbgl/layermanager/layer_factory.hpp>
#include <mbgl/style/layer.hpp>
#include <mbgl/style/filter.hpp>
#include <mbgl/style/property_value.hpp>
@@ -275,12 +274,4 @@ protected:
};
} // namespace style
-
-class SymbolLayerFactory : public LayerFactory {
-protected:
- const style::LayerTypeInfo* getTypeInfo() const noexcept final;
- std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
- std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
-};
-
} // namespace mbgl