[core] Add Filter accessors

This commit is contained in:
John Firebaugh
2016-04-27 15:57:48 -07:00
parent cadc617c76
commit 67ee51360c
13 changed files with 72 additions and 0 deletions

View File

@@ -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