summaryrefslogtreecommitdiff
path: root/scripts/generate-style-code.js
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-04-27 15:57:48 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-06-02 14:51:39 -0700
commit67ee51360c1bf72d54544cecb8d8fd638ad4df14 (patch)
treebb6275dc6e667e2b14d97e9fd640bcc9240a6a6a /scripts/generate-style-code.js
parentcadc617c762d453cca2c9bac41f9c1db984c5fac (diff)
downloadqtlocation-mapboxgl-67ee51360c1bf72d54544cecb8d8fd638ad4df14.tar.gz
[core] Add Filter accessors
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