summaryrefslogtreecommitdiff
path: root/platform/node/src/node_style_properties.hpp.ejs
diff options
context:
space:
mode:
Diffstat (limited to 'platform/node/src/node_style_properties.hpp.ejs')
-rw-r--r--platform/node/src/node_style_properties.hpp.ejs35
1 files changed, 35 insertions, 0 deletions
diff --git a/platform/node/src/node_style_properties.hpp.ejs b/platform/node/src/node_style_properties.hpp.ejs
new file mode 100644
index 0000000000..1937421fa5
--- /dev/null
+++ b/platform/node/src/node_style_properties.hpp.ejs
@@ -0,0 +1,35 @@
+#include "node_style.hpp"
+
+<% for (const layer of locals.layers) { -%>
+#include <mbgl/style/layers/<%- layer.type %>_layer.hpp>
+<% } -%>
+
+namespace node_mbgl {
+
+inline PropertySetters makeLayoutPropertySetters() {
+ using namespace mbgl::style;
+ PropertySetters result;
+
+<% for (const layer of locals.layers) { -%>
+<% for (const property of layer.layoutProperties) { -%>
+ result["<%- property.name %>"] = makePropertySetter(&<%- camelize(layer.type) %>Layer::set<%- camelize(property.name) %>);
+<% } -%>
+
+<% } -%>
+ return result;
+}
+
+inline PropertySetters makePaintPropertySetters() {
+ using namespace mbgl::style;
+ PropertySetters result;
+
+<% for (const layer of locals.layers) { -%>
+<% for (const property of layer.paintProperties) { -%>
+ result["<%- property.name %>"] = makePropertySetter(&<%- camelize(layer.type) %>Layer::set<%- camelize(property.name) %>);
+<% } -%>
+
+<% } -%>
+ return result;
+}
+
+}