<% const properties = locals.properties; -%> // This file is generated. Do not edit. #include #include #include namespace mbgl { namespace style { static LightObserver nullObserver; Light::Light() : impl(makeMutable()), observer(&nullObserver) { } Light::~Light() = default; void Light::setObserver(LightObserver* observer_) { observer = observer_ ? observer_ : &nullObserver; } Mutable Light::mutableImpl() const { return makeMutable(*impl); } <% 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 impl->properties.template get>().value; } void Light::set<%- camelize(property.name) %>(<%- propertyValueType(property) %> property) { auto impl_ = mutableImpl(); impl_->properties.template get>().value = property; impl = std::move(impl_); observer->onLightChanged(*this); } void Light::set<%- camelize(property.name) %>Transition(const TransitionOptions& options) { auto impl_ = mutableImpl(); impl_->properties.template get>().options = options; impl = std::move(impl_); observer->onLightChanged(*this); } TransitionOptions Light::get<%- camelize(property.name) %>Transition() const { return impl->properties.template get>().options; } <% } -%> } // namespace style } // namespace mbgl