48 lines
1.2 KiB
Plaintext
48 lines
1.2 KiB
Plaintext
#pragma once
|
|
|
|
// This file is generated. Edit make_property_setters.hpp.ejs, then run `make style-code`.
|
|
|
|
#include <mbgl/style/conversion/property_setter.hpp>
|
|
|
|
<% for (const layer of locals.layers) { -%>
|
|
#include <mbgl/style/layers/<%- layer.type %>_layer.hpp>
|
|
<% } -%>
|
|
|
|
#include <unordered_map>
|
|
|
|
namespace mbgl {
|
|
namespace style {
|
|
namespace conversion {
|
|
|
|
template <class V>
|
|
auto makeLayoutPropertySetters() {
|
|
std::unordered_map<std::string, LayoutPropertySetter<V>> result;
|
|
|
|
result["visibility"] = &setVisibility<V>;
|
|
|
|
<% for (const layer of locals.layers) { -%>
|
|
<% for (const property of layer.layoutProperties) { -%>
|
|
result["<%- property.name %>"] = makePropertySetter<V>(&<%- camelize(layer.type) %>Layer::set<%- camelize(property.name) %>);
|
|
<% } -%>
|
|
|
|
<% } -%>
|
|
return result;
|
|
}
|
|
|
|
template <class V>
|
|
auto makePaintPropertySetters() {
|
|
std::unordered_map<std::string, PaintPropertySetter<V>> result;
|
|
|
|
<% for (const layer of locals.layers) { -%>
|
|
<% for (const property of layer.paintProperties) { -%>
|
|
result["<%- property.name %>"] = makePropertySetter<V>(&<%- camelize(layer.type) %>Layer::set<%- camelize(property.name) %>);
|
|
<% } -%>
|
|
|
|
<% } -%>
|
|
return result;
|
|
}
|
|
|
|
} // namespace conversion
|
|
} // namespace style
|
|
} // namespace mbgl
|