diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-08-18 00:36:02 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-08-19 14:20:26 -0700 |
commit | 99fc6dfce810b5894b9039c5aabb4fbfd5af0751 (patch) | |
tree | 28f312b021590106e1678213ec0ab10bf06c462f /platform/darwin/src/MGLStyleLayer.h.ejs | |
parent | a4fcea412239f6936ab0dd0d21abda912e22bd47 (diff) | |
download | qtlocation-mapboxgl-99fc6dfce810b5894b9039c5aabb4fbfd5af0751.tar.gz |
[ios, macos] Audited generated source/layer headers
Properties representing optional attributes are qualified with null_resettable. The default value is documented.
Diffstat (limited to 'platform/darwin/src/MGLStyleLayer.h.ejs')
-rw-r--r-- | platform/darwin/src/MGLStyleLayer.h.ejs | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/platform/darwin/src/MGLStyleLayer.h.ejs b/platform/darwin/src/MGLStyleLayer.h.ejs index bf6721e41f..a11ad573d2 100644 --- a/platform/darwin/src/MGLStyleLayer.h.ejs +++ b/platform/darwin/src/MGLStyleLayer.h.ejs @@ -9,6 +9,8 @@ #import "MGLStyleAttributeValue.h" #import "MGLBaseStyleLayer.h" +NS_ASSUME_NONNULL_BEGIN + <% for (const property of layoutProperties) { -%> <% if (property.type == "enum") { -%> typedef NS_ENUM(NSUInteger, MGL<%- camelize(type) %>StyleLayer<%- camelize(property.name) %>) { @@ -36,9 +38,11 @@ typedef NS_ENUM(NSUInteger, MGL<%- camelize(type) %>StyleLayer<%- camelize(prope <% for (const property of layoutProperties) { -%> /** - <%- propertyDoc(property, type) %> + <%- propertyDoc(property, type) %><% if ('default' in property) { %> + + The default value of this property is `<%= property.default %>`.<% if (!property.required) { %> Set this property to `nil` to reset it to the default.<% } %><% } %> */ -@property (nonatomic) <%- propertyType(property, false, type) %> <%- camelizeWithLeadingLowercase(property.name) %>; +@property (nonatomic<% if (!property.required) { %>, null_resettable<% } %>) <%- propertyType(property, false, type) %> <%- camelizeWithLeadingLowercase(property.name) %>; <% } -%> <% } -%> @@ -46,9 +50,13 @@ typedef NS_ENUM(NSUInteger, MGL<%- camelize(type) %>StyleLayer<%- camelize(prope <% for (const property of paintProperties) { -%> /** - <%- propertyDoc(property, type) %> + <%- propertyDoc(property, type) %><% if ('default' in property) { %> + + The default value of this property is `<%= property.default %>`.<% if (!property.required) { %> Set this property to `nil` to reset it to the default.<% } %><% } %> */ -@property (nonatomic) <%- propertyType(property, false, type) %> <%- camelizeWithLeadingLowercase(property.name) %>; +@property (nonatomic<% if (!property.required) { %>, null_resettable<% } %>) <%- propertyType(property, false, type) %> <%- camelizeWithLeadingLowercase(property.name) %>; <% } -%> @end + +NS_ASSUME_NONNULL_END |