summaryrefslogtreecommitdiff
path: root/src/mbgl/style/light.cpp.ejs
diff options
context:
space:
mode:
authorIvo van Dongen <info@ivovandongen.nl>2017-05-04 17:26:42 +0300
committerIvo van Dongen <ivovandongen@users.noreply.github.com>2017-05-08 19:39:55 +0300
commitfeae5e22ee4910a1508f2120c8131b2f8531bae8 (patch)
treeb5ca0ba87b42bcc732070485b5ccea2c3f832840 /src/mbgl/style/light.cpp.ejs
parent20810f988a735e0d43f9abff9260ea0784cd218c (diff)
downloadqtlocation-mapboxgl-feae5e22ee4910a1508f2120c8131b2f8531bae8.tar.gz
[core] generated accessor methods on light
Diffstat (limited to 'src/mbgl/style/light.cpp.ejs')
-rw-r--r--src/mbgl/style/light.cpp.ejs42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/mbgl/style/light.cpp.ejs b/src/mbgl/style/light.cpp.ejs
new file mode 100644
index 0000000000..7d2e0ecc1e
--- /dev/null
+++ b/src/mbgl/style/light.cpp.ejs
@@ -0,0 +1,42 @@
+<%
+ const properties = locals.properties;
+-%>
+// This file is generated. Do not edit.
+
+#include <mbgl/style/light.hpp>
+#include <mbgl/style/light_impl.hpp>
+#include <mbgl/style/light_properties.hpp>
+
+namespace mbgl {
+namespace style {
+
+<% for (const property of properties) { -%>
+<%- evaluatedType(property) %> Light::getDefault<%- camelize(property.name) %>() {
+ return Light<%- camelize(property.name) %>::defaultValue();
+}
+
+<%- propertyValueType(property) %> Light::get<%- camelize(property.name) %>() const {
+ return properties.get<Light<%- camelize(property.name) %>>().value;
+}
+
+void Light::set<%- camelize(property.name) %>(<%- propertyValueType(property) %> property) {
+ properties.get<Light<%- camelize(property.name) %>>().value = property;
+ if (observer) {
+ observer->onLightChanged(*this);
+ }
+}
+
+void Light::set<%- camelize(property.name) %>Transition(const TransitionOptions& transition) {
+ properties.get<Light<%- camelize(property.name) %>>().transition = transition;
+ if (observer) {
+ observer->onLightChanged(*this);
+ }
+}
+
+TransitionOptions Light::get<%- camelize(property.name) %>Transition() const {
+ return properties.get<Light<%- camelize(property.name) %>>().transition;
+}
+
+<% } -%>
+} // namespace style
+} // namespace mbgl