diff options
Diffstat (limited to 'platform/darwin/src/NSValue+MGLStyleLayerAdditions.mm.ejs')
-rw-r--r-- | platform/darwin/src/NSValue+MGLStyleLayerAdditions.mm.ejs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/platform/darwin/src/NSValue+MGLStyleLayerAdditions.mm.ejs b/platform/darwin/src/NSValue+MGLStyleLayerAdditions.mm.ejs new file mode 100644 index 0000000000..758fb66546 --- /dev/null +++ b/platform/darwin/src/NSValue+MGLStyleLayerAdditions.mm.ejs @@ -0,0 +1,28 @@ +// This file is generated. +// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`. +<% +const enumPropertiesByLayerType = locals.enumPropertiesByLayerType; +-%> + +#import "NSValue+MGLStyleLayerAdditions.h" + +<% for (let layerType in enumPropertiesByLayerType) { -%> +<% if (enumPropertiesByLayerType.hasOwnProperty(layerType)) { -%> +@implementation NSValue (MGL<%- camelize(layerType) %>StyleLayerAdditions) + +<% for (let property of enumPropertiesByLayerType[layerType]) { -%> ++ (NSValue *)valueWithMGL<%- camelize(property.name) %>:(MGL<%- camelize(property.name) %>)<%- objCName(property) %> { + return [NSValue value:&<%- objCName(property) %> withObjCType:@encode(MGL<%- camelize(property.name) %>)]; +} + +- (MGL<%- camelize(property.name) %>)MGL<%- camelize(property.name) %>Value { + MGL<%- camelize(property.name) %> <%- objCName(property) %>; + [self getValue:&<%- objCName(property) %>]; + return <%- objCName(property) %>; +} + +<% } -%> +<% } -%> +@end + +<% } -%> |