summaryrefslogtreecommitdiff
path: root/platform/node/src/node_style_properties.hpp.ejs
blob: 1937421fa50540b3dabf12094392558959556329 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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;
}

}