summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLLight.mm.ejs
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin/src/MGLLight.mm.ejs')
-rw-r--r--platform/darwin/src/MGLLight.mm.ejs20
1 files changed, 20 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLLight.mm.ejs b/platform/darwin/src/MGLLight.mm.ejs
index 24ab1d8138..df79f4c842 100644
--- a/platform/darwin/src/MGLLight.mm.ejs
+++ b/platform/darwin/src/MGLLight.mm.ejs
@@ -11,6 +11,7 @@
#import "NSDate+MGLAdditions.h"
#import "MGLStyleValue_Private.h"
#import "NSValue+MGLAdditions.h"
+#import "MGLLoggingConfiguration_Private.h"
#import <mbgl/style/light.hpp>
#import <mbgl/style/types.hpp>
@@ -51,6 +52,7 @@ NS_INLINE mbgl::style::TransitionOptions MGLOptionsFromTransition(MGLTransition
- (instancetype)initWithMBGLLight:(const mbgl::style::Light *)mbglLight
{
if (self = [super init]) {
+ MGLLogInfo(@"Initializing %@.", NSStringFromClass([self class]));
<% if (properties.length) { -%>
<% for (const property of properties) { -%>
<% if (property.type == "enum") { -%>
@@ -111,4 +113,22 @@ NS_INLINE mbgl::style::TransitionOptions MGLOptionsFromTransition(MGLTransition
return mbglLight;
}
+<% if (properties.length) { -%>
+
+<% for (const property of properties) { -%>
+
+- (void)set<%- camelize(property.name) %>:(NSExpression *)<%- objCName(property) %> {
+ MGLLogDebug(@"Setting <%- objCName(property) %>: %@", <%- objCName(property) %>);
+ _<%- objCName(property) %> = <%- objCName(property) %>;
+}
+<% if (property["transition"]) { -%>
+
+- (void)set<%- camelize(property.name) %>Transition:(MGLTransition)transition {
+ MGLLogDebug(@"Setting <%- objCName(property) %>Transition: %@", MGLStringFromMGLTransition(transition));
+ _<%- objCName(property) %>Transition = transition;
+}
+<% } -%>
+<% } -%>
+<% } -%>
+
@end