From c2a5894f2dbe9982830066ab9347b059e6e7d845 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Tue, 25 Apr 2017 18:20:26 -0700 Subject: [core] Immutable Impls --- include/mbgl/style/layers/fill_layer.hpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'include/mbgl/style/layers/fill_layer.hpp') diff --git a/include/mbgl/style/layers/fill_layer.hpp b/include/mbgl/style/layers/fill_layer.hpp index 8371ff7a8f..3d08e75a1c 100644 --- a/include/mbgl/style/layers/fill_layer.hpp +++ b/include/mbgl/style/layers/fill_layer.hpp @@ -27,6 +27,13 @@ public: void setFilter(const Filter&); const Filter& getFilter() const; + // Visibility + void setVisibility(VisibilityType) final; + + // Zoom range + void setMinZoom(float) final; + void setMaxZoom(float) final; + // Paint properties static PropertyValue getDefaultFillAntialias(); @@ -74,15 +81,16 @@ public: // Private implementation class Impl; - Impl* const impl; + const Impl& impl() const; - FillLayer(const Impl&); - FillLayer(const FillLayer&) = delete; + Mutable mutableImpl() const; + FillLayer(Immutable); + std::unique_ptr cloneRef(const std::string& id) const final; }; template <> inline bool Layer::is() const { - return type == LayerType::Fill; + return getType() == LayerType::Fill; } } // namespace style -- cgit v1.2.1