summaryrefslogtreecommitdiff
path: root/scripts/generate-style-code.js
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/generate-style-code.js')
-rw-r--r--scripts/generate-style-code.js14
1 files changed, 14 insertions, 0 deletions
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