From dfaa859d9957028c24a27fe33f6760a0096d5cb1 Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Tue, 10 Sep 2019 19:32:25 +0300 Subject: [core] Expose mbgl::style::Light::setProperty Works the same way as mbgl::style::set{Paint,Layout}Property functions. --- include/mbgl/style/light.hpp | 4 ++++ include/mbgl/style/light.hpp.ejs | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'include/mbgl') diff --git a/include/mbgl/style/light.hpp b/include/mbgl/style/light.hpp index 0b65df9f1b..21a05cf4c8 100644 --- a/include/mbgl/style/light.hpp +++ b/include/mbgl/style/light.hpp @@ -2,6 +2,7 @@ #pragma once +#include #include #include #include @@ -17,6 +18,9 @@ public: Light(); ~Light(); + // Dynamic properties + optional setProperty(const std::string& name, const conversion::Convertible& value); + static LightAnchorType getDefaultAnchor(); PropertyValue getAnchor() const; void setAnchor(PropertyValue); diff --git a/include/mbgl/style/light.hpp.ejs b/include/mbgl/style/light.hpp.ejs index adc5b651e3..c3001d982b 100644 --- a/include/mbgl/style/light.hpp.ejs +++ b/include/mbgl/style/light.hpp.ejs @@ -5,6 +5,7 @@ #pragma once +#include #include #include #include @@ -20,6 +21,9 @@ public: Light(); ~Light(); + // Dynamic properties + optional setProperty(const std::string& name, const conversion::Convertible& value); + <% for (const property of properties) { -%> static <%- evaluatedType(property) %> getDefault<%- camelize(property.name) %>(); <%- propertyValueType(property) %> get<%- camelize(property.name) %>() const; -- cgit v1.2.1