summaryrefslogtreecommitdiff
path: root/src/mbgl/style/light_properties.hpp.ejs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style/light_properties.hpp.ejs')
-rw-r--r--src/mbgl/style/light_properties.hpp.ejs54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/mbgl/style/light_properties.hpp.ejs b/src/mbgl/style/light_properties.hpp.ejs
new file mode 100644
index 0000000000..2e5ea37a0f
--- /dev/null
+++ b/src/mbgl/style/light_properties.hpp.ejs
@@ -0,0 +1,54 @@
+<%
+ const properties = locals.properties;
+-%>
+// This file is generated. Edit scripts/generate-style-code.js, then run `make style-code`.
+
+#pragma once
+
+#include <mbgl/style/light_property.hpp>
+#include <mbgl/style/types.hpp>
+#include <mbgl/style/position.hpp>
+#include <mbgl/style/properties.hpp>
+#include <mbgl/util/color.hpp>
+
+namespace mbgl {
+namespace style {
+
+<% for (const property of properties) { -%>
+struct Light<%- camelize(property.name) %> : LightProperty<<%- evaluatedType(property) %>> {
+ static <%- evaluatedType(property) %> defaultValue() { return <%- defaultValue(property) %>; }
+};
+
+<% } -%>
+class LightProperties {
+public:
+ class Evaluated {
+ public:
+<% for (const property of properties) { -%>
+ <%- evaluatedType(property) %> <%- camelizeWithLeadingLowercase(property.name) %>;
+<% } -%>
+ };
+
+ class Unevaluated {
+ public:
+<% for (const property of properties) { -%>
+ style::Transitioning<<%- propertyValueType(property) %>> <%- camelizeWithLeadingLowercase(property.name) %>;
+<% } -%>
+
+ bool hasTransition() const;
+ Evaluated evaluate(const PropertyEvaluationParameters&) const;
+ };
+
+ class Transitionable {
+ public:
+<% for (const property of properties) { -%>
+ style::Transitionable<<%- propertyValueType(property) %>> <%- camelizeWithLeadingLowercase(property.name) %>;
+<% } -%>
+
+ Unevaluated transitioned(const TransitionParameters&, Unevaluated&& prior) const;
+ Unevaluated untransitioned() const;
+ };
+};
+
+} // namespace style
+} // namespace mbgl