summaryrefslogtreecommitdiff
path: root/src/mbgl/style/light_properties.cpp.ejs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style/light_properties.cpp.ejs')
-rw-r--r--src/mbgl/style/light_properties.cpp.ejs44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/mbgl/style/light_properties.cpp.ejs b/src/mbgl/style/light_properties.cpp.ejs
new file mode 100644
index 0000000000..ea79ca8cc2
--- /dev/null
+++ b/src/mbgl/style/light_properties.cpp.ejs
@@ -0,0 +1,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