summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLStyleLayer.h.ejs
blob: 629edba6c6a80376d6b7ab0172e2523e216d59bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<%
  const type = locals.type;
  const layoutProperties = locals.layoutProperties;
  const paintProperties = locals.paintProperties;
-%>
// This file is generated. 
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.

#import "MGLTypes.h"
#import "MGLStyleAttributeValue.h"
#import "MGLBaseStyleLayer.h"

<% for (const property of layoutProperties) { -%>
<% if (property.type == "enum") { -%>
typedef NS_ENUM(NSUInteger, MGL<%- camelize(type) %>StyleLayer<%- camelize(property.name) %>) {
<% for (const value of property.values) { -%>
    MGL<%- camelize(type) %>StyleLayer<%- camelize(property.name) %><%- camelize(value) %>,
<% } -%>
};

<% } -%>
<% } -%>
<% for (const property of paintProperties) { -%>
<% if (property.type == "enum") { -%>
typedef NS_ENUM(NSUInteger, MGL<%- camelize(type) %>StyleLayer<%- camelize(property.name) %>) {
<% for (const value of property.values) { -%>
    MGL<%- camelize(type) %>StyleLayer<%- camelize(property.name) %><%- camelize(value) %>,
<% } -%>
};

<% } -%>
<% } -%>
@interface MGL<%- camelize(type) %>StyleLayer : MGLBaseStyleLayer <MGLStyleLayer>

<% if (layoutProperties.length) { -%>
#pragma mark - Accessing the Layout Attributes

<% for (const property of layoutProperties) { -%>
/**
 <%- property.doc %>
 */
@property (nonatomic) <%- propertyType(property, false, type) %> <%- camelizeWithLeadingLowercase(property.name) %>;

<% } -%>
<% } -%>
#pragma mark - Accessing the Paint Attributes

<% for (const property of paintProperties) { -%>
/**
 <%- property.doc %>
 */
@property (nonatomic) <%- propertyType(property, false, type) %> <%- camelizeWithLeadingLowercase(property.name) %>;

<% } -%>
@end