summaryrefslogtreecommitdiff
path: root/include/mbgl/style/layers/layer.hpp.ejs
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2018-10-25 16:15:31 +0300
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2018-10-25 22:42:43 +0300
commit7a9461a8d439458b18656ecfb839923adc5f0e9b (patch)
tree5617367418dafc5b7b45c4ba7cca4b74f40200f3 /include/mbgl/style/layers/layer.hpp.ejs
parentfdd8b54900d963d01f9b643fa7edd9e988eb7785 (diff)
downloadqtlocation-mapboxgl-7a9461a8d439458b18656ecfb839923adc5f0e9b.tar.gz
Consolidate `style::Layer` properties API
The `style::Layer` class now exposes all the properties contained at `style::LayerImpl`. This allowed to drop `style::Layer::accept()` method usage, avoid the repeated generated code and thus save some binary size. This patch is a part of the layers modularization effort.
Diffstat (limited to 'include/mbgl/style/layers/layer.hpp.ejs')
-rw-r--r--include/mbgl/style/layers/layer.hpp.ejs22
1 files changed, 3 insertions, 19 deletions
diff --git a/include/mbgl/style/layers/layer.hpp.ejs b/include/mbgl/style/layers/layer.hpp.ejs
index 9d595d2035..f6dd08000a 100644
--- a/include/mbgl/style/layers/layer.hpp.ejs
+++ b/include/mbgl/style/layers/layer.hpp.ejs
@@ -35,25 +35,6 @@ public:
<% } -%>
~<%- camelize(type) %>Layer() final;
-<% if (type !== 'background') { -%>
- // Source
- const std::string& getSourceID() const;
-<% if (type !== 'raster' && type !== 'hillshade') { -%>
- const std::string& getSourceLayer() const;
- void setSourceLayer(const std::string& sourceLayer);
-
- void setFilter(const Filter&);
- const Filter& getFilter() const;
-<% } -%>
-
-<% } -%>
- // Visibility
- void setVisibility(VisibilityType) final;
-
- // Zoom range
- void setMinZoom(float) final;
- void setMaxZoom(float) final;
-
// Dynamic properties
optional<conversion::Error> setLayoutProperty(const std::string& name, const conversion::Convertible& value) final;
optional<conversion::Error> setPaintProperty(const std::string& name, const conversion::Convertible& value) final;
@@ -86,6 +67,9 @@ public:
Mutable<Impl> mutableImpl() const;
<%- camelize(type) %>Layer(Immutable<Impl>);
std::unique_ptr<Layer> cloneRef(const std::string& id) const final;
+
+protected:
+ Mutable<Layer::Impl> mutableBaseImpl() const final;
};
template <>