summaryrefslogtreecommitdiff
path: root/include/mbgl/style/layers/fill_layer.hpp
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2018-11-15 15:47:25 +0200
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2018-11-15 17:48:36 +0200
commitff09c94d0825f5dbe7dddce52b64e74d61978976 (patch)
tree86833d95d8bf7abbcb8e6965aaba65d666ffff52 /include/mbgl/style/layers/fill_layer.hpp
parent73dcfe2d0d3475ad9584969c7908ba681a3f5bfa (diff)
downloadqtlocation-mapboxgl-ff09c94d0825f5dbe7dddce52b64e74d61978976.tar.gz
[core][android] Introduce mbgl::style::LayerTypeInfoupstream/mikhail_LayerTypeInfo
The `LayerTypeInfo` contains static meta data about certain layer type. Each layer module should have a single immutable `LayerTypeInfo` instance for the represented layer type. Both `LayerImpl` and `LayerFactory` from the module always refer to the same `LayerTypeInfo` instance, so address of this instance can be used as a layer module Id during the process life time.
Diffstat (limited to 'include/mbgl/style/layers/fill_layer.hpp')
-rw-r--r--include/mbgl/style/layers/fill_layer.hpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/include/mbgl/style/layers/fill_layer.hpp b/include/mbgl/style/layers/fill_layer.hpp
index aeb0ba988a..52bbd054ae 100644
--- a/include/mbgl/style/layers/fill_layer.hpp
+++ b/include/mbgl/style/layers/fill_layer.hpp
@@ -83,15 +83,11 @@ protected:
class FillLayerFactory : public LayerFactory {
public:
FillLayerFactory();
- // LayerFactory overrides.
~FillLayerFactory() override;
- bool supportsType(const std::string& type) const noexcept final;
- std::unique_ptr<style::Layer> createLayer(const std::string& id, const conversion::Convertible& value) final;
-
- static FillLayerFactory* get() noexcept;
-private:
- static FillLayerFactory* instance;
+ // LayerFactory overrides.
+ const LayerTypeInfo* getTypeInfo() const noexcept final;
+ std::unique_ptr<style::Layer> createLayer(const std::string& id, const conversion::Convertible& value) final;
};
} // namespace style