summaryrefslogtreecommitdiff
path: root/platform/darwin/src/NSValue+MGLStyleLayerAdditions.h.ejs
blob: d998e232ec4f161aa6250a78ecc7aac9ea9e927b (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
// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
<%
const enumPropertiesByLayerType = locals.enumPropertiesByLayerType;
-%>

#import <Foundation/Foundation.h>

<% for (let layerType of Object.getOwnPropertyNames(enumPropertiesByLayerType)) { -%>
#import "MGL<%- camelize(layerType) %>StyleLayer.h"
<% } -%>

NS_ASSUME_NONNULL_BEGIN

<% for (let layerType in enumPropertiesByLayerType) { -%>
<% if (enumPropertiesByLayerType.hasOwnProperty(layerType)) { -%>
/**
 Methods for wrapping an enumeration value for a style layer attribute in an
 `MGL<%- camelize(layerType) %>StyleLayer` object and unwrapping its raw value.
 */
@interface NSValue (MGL<%- camelize(layerType) %>StyleLayerAdditions)

#pragma mark Working with <%- camelize(layerType) %> Style Layer Attribute Values

<% for (let property of enumPropertiesByLayerType[layerType]) { -%>
/**
 Creates a new value object containing the given `MGL<%- camelize(property.name) %>` enumeration.

 @param <%- objCName(property) %> The value for the new object.
 @return A new value object that contains the enumeration value.
 */
+ (instancetype)valueWithMGL<%- camelize(property.name) %>:(MGL<%- camelize(property.name) %>)<%- objCName(property) %>;

/**
 The `MGL<%- camelize(property.name) %>` enumeration representation of the value.
 */
@property (readonly) MGL<%- camelize(property.name) %> MGL<%- camelize(property.name) %>Value;

<% } -%>
@end

<% } -%>
<% } -%>
NS_ASSUME_NONNULL_END