[core] Add Filter accessors
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user