Files
MapLibreParticleLab/platform/darwin/src/MGLStyleLayer.mm.ejs
Minh Nguyễn 5539a90c48 [ios, macos] Renamed Objective-C++ headers to .h
Also removed a redundant reference to MGLStyle_Private.h in ios.xcodeproj.

Fixes #5952.
2016-08-16 16:46:04 -07:00

66 lines
1.9 KiB
Plaintext

<%
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 "MGLBaseStyleLayer_Private.h"
#import "MGLStyleLayer_Private.h"
#import "MGLStyleAttributeValue.h"
#import "MGL<%- camelize(type) %>StyleLayer.h"
#include <mbgl/style/layers/<%- type %>_layer.hpp>
@interface MGL<%- camelize(type) %>StyleLayer ()
@property (nonatomic) mbgl::style::<%- camelize(type) %>Layer *layer;
@property (nonatomic, readwrite) NSString *layerIdentifier;
@property (nonatomic, readwrite) NSString *sourceIdentifier;
@end
@implementation MGL<%- camelize(type) %>StyleLayer
@synthesize mapView;
- (instancetype)initWithLayerIdentifier:(NSString *)layerIdentifier sourceIdentifier:(NSString *)sourceIdentifier {
if (self = [super init]) {
_layerIdentifier = layerIdentifier;
_sourceIdentifier = sourceIdentifier;
<%- initLayer(type) %>
}
return self;
}
<% if (layoutProperties.length) { -%>
#pragma mark - Accessing the Layout Attributes
<% for (const property of layoutProperties) { -%>
- (void)set<%- camelize(property.name) %>:(<%- propertyType(property, true, type) %>)<%- objCName(property) %> {
<%- setterImplementation(property, type) %>
}
- (<%- propertyType(property, false, type) %>)<%- objCName(property) %> {
<%- getterImplementation(property, type) %>
}
<% } -%>
<% } -%>
<% if (paintProperties.length) { -%>
#pragma mark - Accessing the Paint Attributes
<% for (const property of paintProperties) { -%>
- (void)set<%- camelize(property.name) %>:(<%- propertyType(property, true, type) %>)<%- objCName(property) %> {
<%- setterImplementation(property, type) %>
}
- (<%- propertyType(property, false, type) %>)<%- objCName(property) %> {
<%- getterImplementation(property, type) %>
}
<% } -%>
<% } -%>
@end