diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-04-27 15:57:48 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-06-02 14:51:39 -0700 |
commit | 67ee51360c1bf72d54544cecb8d8fd638ad4df14 (patch) | |
tree | bb6275dc6e667e2b14d97e9fd640bcc9240a6a6a | |
parent | cadc617c762d453cca2c9bac41f9c1db984c5fac (diff) | |
download | qtlocation-mapboxgl-67ee51360c1bf72d54544cecb8d8fd638ad4df14.tar.gz |
[core] Add Filter accessors
-rw-r--r-- | include/mbgl/layer/background_layer.hpp | 1 | ||||
-rw-r--r-- | include/mbgl/layer/circle_layer.hpp | 4 | ||||
-rw-r--r-- | include/mbgl/layer/fill_layer.hpp | 4 | ||||
-rw-r--r-- | include/mbgl/layer/line_layer.hpp | 4 | ||||
-rw-r--r-- | include/mbgl/layer/raster_layer.hpp | 1 | ||||
-rw-r--r-- | include/mbgl/layer/symbol_layer.hpp | 4 | ||||
-rw-r--r-- | include/mbgl/style/filter.hpp (renamed from src/mbgl/style/filter.hpp) | 0 | ||||
-rw-r--r-- | include/mbgl/util/variant.hpp (renamed from src/mbgl/util/variant.hpp) | 0 | ||||
-rw-r--r-- | scripts/generate-style-code.js | 14 | ||||
-rw-r--r-- | src/mbgl/layer/circle_layer.cpp | 10 | ||||
-rw-r--r-- | src/mbgl/layer/fill_layer.cpp | 10 | ||||
-rw-r--r-- | src/mbgl/layer/line_layer.cpp | 10 | ||||
-rw-r--r-- | src/mbgl/layer/symbol_layer.cpp | 10 |
13 files changed, 72 insertions, 0 deletions
diff --git a/include/mbgl/layer/background_layer.hpp b/include/mbgl/layer/background_layer.hpp index 211597f6ea..bba16d3839 100644 --- a/include/mbgl/layer/background_layer.hpp +++ b/include/mbgl/layer/background_layer.hpp @@ -3,6 +3,7 @@ #pragma once #include <mbgl/style/layer.hpp> +#include <mbgl/style/filter.hpp> #include <mbgl/style/property_value.hpp> namespace mbgl { diff --git a/include/mbgl/layer/circle_layer.hpp b/include/mbgl/layer/circle_layer.hpp index 28e5c2fa7a..81f84d36a8 100644 --- a/include/mbgl/layer/circle_layer.hpp +++ b/include/mbgl/layer/circle_layer.hpp @@ -3,6 +3,7 @@ #pragma once #include <mbgl/style/layer.hpp> +#include <mbgl/style/filter.hpp> #include <mbgl/style/property_value.hpp> namespace mbgl { @@ -18,6 +19,9 @@ public: const std::string& getSourceID() const; const std::string& getSourceLayer() const; + void setFilter(const Filter&); + const Filter& getFilter() const; + // Paint properties PropertyValue<float> getCircleRadius() const; diff --git a/include/mbgl/layer/fill_layer.hpp b/include/mbgl/layer/fill_layer.hpp index 76c043957d..10cf4f3bbd 100644 --- a/include/mbgl/layer/fill_layer.hpp +++ b/include/mbgl/layer/fill_layer.hpp @@ -3,6 +3,7 @@ #pragma once #include <mbgl/style/layer.hpp> +#include <mbgl/style/filter.hpp> #include <mbgl/style/property_value.hpp> namespace mbgl { @@ -18,6 +19,9 @@ public: const std::string& getSourceID() const; const std::string& getSourceLayer() const; + void setFilter(const Filter&); + const Filter& getFilter() const; + // Paint properties PropertyValue<bool> getFillAntialias() const; diff --git a/include/mbgl/layer/line_layer.hpp b/include/mbgl/layer/line_layer.hpp index b438799116..aeec363281 100644 --- a/include/mbgl/layer/line_layer.hpp +++ b/include/mbgl/layer/line_layer.hpp @@ -3,6 +3,7 @@ #pragma once #include <mbgl/style/layer.hpp> +#include <mbgl/style/filter.hpp> #include <mbgl/style/property_value.hpp> #include <vector> @@ -20,6 +21,9 @@ public: const std::string& getSourceID() const; const std::string& getSourceLayer() const; + void setFilter(const Filter&); + const Filter& getFilter() const; + // Layout properties PropertyValue<LineCapType> getLineCap() const; diff --git a/include/mbgl/layer/raster_layer.hpp b/include/mbgl/layer/raster_layer.hpp index 5d747737c0..7dc2532a2f 100644 --- a/include/mbgl/layer/raster_layer.hpp +++ b/include/mbgl/layer/raster_layer.hpp @@ -3,6 +3,7 @@ #pragma once #include <mbgl/style/layer.hpp> +#include <mbgl/style/filter.hpp> #include <mbgl/style/property_value.hpp> namespace mbgl { diff --git a/include/mbgl/layer/symbol_layer.hpp b/include/mbgl/layer/symbol_layer.hpp index 2339515201..006506b3d8 100644 --- a/include/mbgl/layer/symbol_layer.hpp +++ b/include/mbgl/layer/symbol_layer.hpp @@ -3,6 +3,7 @@ #pragma once #include <mbgl/style/layer.hpp> +#include <mbgl/style/filter.hpp> #include <mbgl/style/property_value.hpp> #include <vector> @@ -20,6 +21,9 @@ public: const std::string& getSourceID() const; const std::string& getSourceLayer() const; + void setFilter(const Filter&); + const Filter& getFilter() const; + // Layout properties PropertyValue<SymbolPlacementType> getSymbolPlacement() const; diff --git a/src/mbgl/style/filter.hpp b/include/mbgl/style/filter.hpp index 6ad6969fbf..6ad6969fbf 100644 --- a/src/mbgl/style/filter.hpp +++ b/include/mbgl/style/filter.hpp diff --git a/src/mbgl/util/variant.hpp b/include/mbgl/util/variant.hpp index 68a1208a17..68a1208a17 100644 --- a/src/mbgl/util/variant.hpp +++ b/include/mbgl/util/variant.hpp diff --git a/scripts/generate-style-code.js b/scripts/generate-style-code.js index b26e0520f6..02f904983b 100644 --- a/scripts/generate-style-code.js +++ b/scripts/generate-style-code.js @@ -77,6 +77,7 @@ const layerHpp = ejs.compile(`<% #pragma once #include <mbgl/style/layer.hpp> +#include <mbgl/style/filter.hpp> #include <mbgl/style/property_value.hpp> <% if (type === 'line' || type === 'symbol') { -%> @@ -103,6 +104,9 @@ public: const std::string& getSourceID() const; const std::string& getSourceLayer() const; + void setFilter(const Filter&); + const Filter& getFilter() const; + <% } -%> <% if (layoutProperties.length) { -%> // Layout properties @@ -191,6 +195,16 @@ const std::string& <%- camelize(type) %>Layer::getSourceID() const { const std::string& <%- camelize(type) %>Layer::getSourceLayer() const { return impl->sourceLayer; } + +// Filter + +void <%- camelize(type) %>Layer::setFilter(const Filter& filter) { + impl->filter = filter; +} + +const Filter& <%- camelize(type) %>Layer::getFilter() const { + return impl->filter; +} <% } -%> // Layout properties diff --git a/src/mbgl/layer/circle_layer.cpp b/src/mbgl/layer/circle_layer.cpp index b1ca06dff7..efc0e9488d 100644 --- a/src/mbgl/layer/circle_layer.cpp +++ b/src/mbgl/layer/circle_layer.cpp @@ -37,6 +37,16 @@ const std::string& CircleLayer::getSourceLayer() const { return impl->sourceLayer; } +// Filter + +void CircleLayer::setFilter(const Filter& filter) { + impl->filter = filter; +} + +const Filter& CircleLayer::getFilter() const { + return impl->filter; +} + // Layout properties diff --git a/src/mbgl/layer/fill_layer.cpp b/src/mbgl/layer/fill_layer.cpp index f7a9418c0e..77efaa61aa 100644 --- a/src/mbgl/layer/fill_layer.cpp +++ b/src/mbgl/layer/fill_layer.cpp @@ -37,6 +37,16 @@ const std::string& FillLayer::getSourceLayer() const { return impl->sourceLayer; } +// Filter + +void FillLayer::setFilter(const Filter& filter) { + impl->filter = filter; +} + +const Filter& FillLayer::getFilter() const { + return impl->filter; +} + // Layout properties diff --git a/src/mbgl/layer/line_layer.cpp b/src/mbgl/layer/line_layer.cpp index c77a5c3e83..e1a7d813af 100644 --- a/src/mbgl/layer/line_layer.cpp +++ b/src/mbgl/layer/line_layer.cpp @@ -37,6 +37,16 @@ const std::string& LineLayer::getSourceLayer() const { return impl->sourceLayer; } +// Filter + +void LineLayer::setFilter(const Filter& filter) { + impl->filter = filter; +} + +const Filter& LineLayer::getFilter() const { + return impl->filter; +} + // Layout properties PropertyValue<LineCapType> LineLayer::getLineCap() const { diff --git a/src/mbgl/layer/symbol_layer.cpp b/src/mbgl/layer/symbol_layer.cpp index 6152d7104a..66d018b581 100644 --- a/src/mbgl/layer/symbol_layer.cpp +++ b/src/mbgl/layer/symbol_layer.cpp @@ -37,6 +37,16 @@ const std::string& SymbolLayer::getSourceLayer() const { return impl->sourceLayer; } +// Filter + +void SymbolLayer::setFilter(const Filter& filter) { + impl->filter = filter; +} + +const Filter& SymbolLayer::getFilter() const { + return impl->filter; +} + // Layout properties PropertyValue<SymbolPlacementType> SymbolLayer::getSymbolPlacement() const { |