diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2018-11-15 15:47:25 +0200 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2018-11-15 17:48:36 +0200 |
commit | ff09c94d0825f5dbe7dddce52b64e74d61978976 (patch) | |
tree | 86833d95d8bf7abbcb8e6965aaba65d666ffff52 /platform/android/src/style/layers/layer_manager.hpp | |
parent | 73dcfe2d0d3475ad9584969c7908ba681a3f5bfa (diff) | |
download | qtlocation-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 'platform/android/src/style/layers/layer_manager.hpp')
-rw-r--r-- | platform/android/src/style/layers/layer_manager.hpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/platform/android/src/style/layers/layer_manager.hpp b/platform/android/src/style/layers/layer_manager.hpp index cec9d39d8c..396521cc4a 100644 --- a/platform/android/src/style/layers/layer_manager.hpp +++ b/platform/android/src/style/layers/layer_manager.hpp @@ -28,11 +28,13 @@ public: private: LayerManagerAndroid(); + void addLayerType(std::unique_ptr<JavaLayerPeerFactory>); JavaLayerPeerFactory* getPeerFactory(mbgl::style::Layer*); // mbgl:style::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<JavaLayerPeerFactory>> factories; + std::map<std::string, style::LayerFactory*> typeToFactory; }; } |