blob: ea79ca8cc21ea43f8863b2aa89fbffe9abddcab5 (
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
|
<%
const properties = locals.properties;
-%>
// This file is generated. Edit scripts/generate-style-code.js, then run `make style-code`.
#include <mbgl/style/light_properties.hpp>
namespace mbgl {
namespace style {
LightProperties::Unevaluated LightProperties::Transitionable::transitioned(const TransitionParameters& parameters, Unevaluated&& prior) const {
return Unevaluated {
<% for (const property of properties) { -%>
<%- camelizeWithLeadingLowercase(property.name) %>.transition(parameters, std::move(prior.<%- camelizeWithLeadingLowercase(property.name) %>)),
<% } -%>
};
}
LightProperties::Unevaluated LightProperties::Transitionable::untransitioned() const {
return Unevaluated {
<% for (const property of properties) { -%>
Transitioning<<%- propertyValueType(property) %>>(<%- camelizeWithLeadingLowercase(property.name) %>.value),
<% } -%>
};
}
bool LightProperties::Unevaluated::hasTransition() const {
return false
<% for (const property of properties) { -%>
|| <%- camelizeWithLeadingLowercase(property.name) %>.hasTransition()
<% } -%>
;
}
LightProperties::Evaluated LightProperties::Unevaluated::evaluate(const PropertyEvaluationParameters& parameters) const {
return Evaluated {
<% for (const property of properties) { -%>
<%- camelizeWithLeadingLowercase(property.name) %>.evaluate(typename Light<%- camelize(property.name) %>::EvaluatorType(parameters, Light<%- camelize(property.name) %>::defaultValue()), parameters.now),
<% } -%>
};
}
} // namespace style
} // namespace mbgl
|