blob: 18b07efea831e66429a56a74d6fd616a9ae14fdd (
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
36
37
38
39
40
41
42
43
44
45
46
|
<%
const type = locals.type;
const layoutProperties = locals.layoutProperties;
const paintProperties = locals.paintProperties;
-%>
// clang-format off
// This file is generated. Edit scripts/generate-style-code.js, then run `make style-code`.
#include <mbgl/style/layers/<%- type.replace('-', '_') %>_layer_properties.hpp>
#include <mbgl/style/layers/<%- type.replace('-', '_') %>_layer_impl.hpp>
namespace mbgl {
namespace style {
<%- camelize(type) %>LayerProperties::<%- camelize(type) %>LayerProperties(
Immutable<<%- camelize(type) %>Layer::Impl> impl_)
: LayerProperties(std::move(impl_)) {}
<%- camelize(type) %>LayerProperties::<%- camelize(type) %>LayerProperties(
Immutable<<%- camelize(type) %>Layer::Impl> impl_,
<% if (type === 'background' || type === 'fill' || type === 'line' || type === 'fill-extrusion') { -%>
CrossfadeParameters crossfade_,
<% } -%>
<%- camelize(type) %>PaintProperties::PossiblyEvaluated evaluated_)
: LayerProperties(std::move(impl_)),
<% if (type === 'background' || type === 'fill' || type === 'line' || type === 'fill-extrusion') { -%>
crossfade(crossfade_),
<% } -%>
evaluated(std::move(evaluated_)) {}
<%- camelize(type) %>LayerProperties::~<%- camelize(type) %>LayerProperties() = default;
unsigned long <%- camelize(type) %>LayerProperties::constantsMask() const {
return evaluated.constantsMask();
}
const <%- camelize(type) %>Layer::Impl& <%- camelize(type) %>LayerProperties::layerImpl() const {
return static_cast<const <%- camelize(type) %>Layer::Impl&>(*baseImpl);
}
} // namespace style
} // namespace mbgl
// clang-format on
|