[ios, macos] Make NSPredicate+MGLAdditions public. (#11810)
This commit is contained in:
committed by
GitHub
parent
1c847b321b
commit
a365dd11da
@@ -2,7 +2,7 @@
|
||||
// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.
|
||||
|
||||
#import "MGLSource.h"
|
||||
#import "NSPredicate+MGLAdditions.h"
|
||||
#import "NSPredicate+MGLPrivateAdditions.h"
|
||||
#import "NSDate+MGLAdditions.h"
|
||||
#import "MGLStyleLayer_Private.h"
|
||||
#import "MGLStyleValue_Private.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.
|
||||
|
||||
#import "MGLSource.h"
|
||||
#import "NSPredicate+MGLAdditions.h"
|
||||
#import "NSPredicate+MGLPrivateAdditions.h"
|
||||
#import "NSDate+MGLAdditions.h"
|
||||
#import "MGLStyleLayer_Private.h"
|
||||
#import "MGLStyleValue_Private.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.
|
||||
|
||||
#import "MGLSource.h"
|
||||
#import "NSPredicate+MGLAdditions.h"
|
||||
#import "NSPredicate+MGLPrivateAdditions.h"
|
||||
#import "NSDate+MGLAdditions.h"
|
||||
#import "MGLStyleLayer_Private.h"
|
||||
#import "MGLStyleValue_Private.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.
|
||||
|
||||
#import "MGLSource.h"
|
||||
#import "NSPredicate+MGLAdditions.h"
|
||||
#import "NSPredicate+MGLPrivateAdditions.h"
|
||||
#import "NSDate+MGLAdditions.h"
|
||||
#import "MGLStyleLayer_Private.h"
|
||||
#import "MGLStyleValue_Private.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.
|
||||
|
||||
#import "MGLSource.h"
|
||||
#import "NSPredicate+MGLAdditions.h"
|
||||
#import "NSPredicate+MGLPrivateAdditions.h"
|
||||
#import "NSDate+MGLAdditions.h"
|
||||
#import "MGLStyleLayer_Private.h"
|
||||
#import "MGLStyleValue_Private.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.
|
||||
|
||||
#import "MGLSource.h"
|
||||
#import "NSPredicate+MGLAdditions.h"
|
||||
#import "NSPredicate+MGLPrivateAdditions.h"
|
||||
#import "NSDate+MGLAdditions.h"
|
||||
#import "MGLStyleLayer_Private.h"
|
||||
#import "MGLStyleValue_Private.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.
|
||||
|
||||
#import "MGLSource.h"
|
||||
#import "NSPredicate+MGLAdditions.h"
|
||||
#import "NSPredicate+MGLPrivateAdditions.h"
|
||||
#import "NSDate+MGLAdditions.h"
|
||||
#import "MGLStyleLayer_Private.h"
|
||||
#import "MGLStyleValue_Private.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.
|
||||
|
||||
#import "MGLSource.h"
|
||||
#import "NSPredicate+MGLAdditions.h"
|
||||
#import "NSPredicate+MGLPrivateAdditions.h"
|
||||
#import "NSDate+MGLAdditions.h"
|
||||
#import "MGLStyleLayer_Private.h"
|
||||
#import "MGLStyleValue_Private.h"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#import "MGLFeature_Private.h"
|
||||
#import "MGLShape_Private.h"
|
||||
|
||||
#import "NSPredicate+MGLAdditions.h"
|
||||
#import "NSPredicate+MGLPrivateAdditions.h"
|
||||
#import "NSURL+MGLAdditions.h"
|
||||
|
||||
#include <mbgl/map/map.hpp>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.
|
||||
|
||||
#import "MGLSource.h"
|
||||
#import "NSPredicate+MGLAdditions.h"
|
||||
#import "NSPredicate+MGLPrivateAdditions.h"
|
||||
#import "NSDate+MGLAdditions.h"
|
||||
#import "MGLStyleLayer_Private.h"
|
||||
#import "MGLStyleValue_Private.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.
|
||||
|
||||
#import "MGLSource.h"
|
||||
#import "NSPredicate+MGLAdditions.h"
|
||||
#import "NSPredicate+MGLPrivateAdditions.h"
|
||||
#import "NSDate+MGLAdditions.h"
|
||||
#import "MGLStyleLayer_Private.h"
|
||||
#import "MGLStyleValue_Private.h"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#import "MGLStyle_Private.h"
|
||||
#import "MGLMapView_Private.h"
|
||||
|
||||
#import "NSPredicate+MGLAdditions.h"
|
||||
#import "NSPredicate+MGLPrivateAdditions.h"
|
||||
#import "NSURL+MGLAdditions.h"
|
||||
|
||||
#include <mbgl/map/map.hpp>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#import "MGLStyleValue_Private.h"
|
||||
|
||||
#import "NSPredicate+MGLAdditions.h"
|
||||
#import "NSPredicate+MGLPrivateAdditions.h"
|
||||
#import "NSExpression+MGLPrivateAdditions.h"
|
||||
|
||||
#include <mbgl/style/conversion/property_value.hpp>
|
||||
|
||||
@@ -913,7 +913,7 @@ NSArray *MGLSubexpressionsWithJSONObjects(NSArray *objects) {
|
||||
|
||||
for (NSUInteger index = 0; index < argumentObjects.count; index++) {
|
||||
if (index % 2 == 0 && index != argumentObjects.count - 1) {
|
||||
NSPredicate *predicate = [NSPredicate mgl_predicateWithJSONObject:argumentObjects[index]];
|
||||
NSPredicate *predicate = [NSPredicate predicateWithMGLJSONObject:argumentObjects[index]];
|
||||
NSExpression *argument = [NSExpression expressionForConstantValue:predicate];
|
||||
[arguments addObject:argument];
|
||||
} else {
|
||||
|
||||
@@ -1,23 +1,44 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "NSExpression+MGLPrivateAdditions.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NSPredicate (MGLAdditions)
|
||||
|
||||
- (mbgl::style::Filter)mgl_filter;
|
||||
#pragma mark Converting JSON Expressions
|
||||
|
||||
+ (instancetype)mgl_predicateWithFilter:(mbgl::style::Filter)filter;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSPredicate (MGLExpressionAdditions)
|
||||
|
||||
+ (instancetype)mgl_predicateWithJSONObject:(id)object;
|
||||
/**
|
||||
Returns a predicate equivalent to the given Foundation object deserialized
|
||||
from JSON data.
|
||||
|
||||
The Foundation object is interpreted according to the
|
||||
[Mapbox Style Specification](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions).
|
||||
See the
|
||||
“[Predicates and Expressions](../predicates-and-expressions.html)”
|
||||
guide for a correspondence of operators and types between the style
|
||||
specification and the `NSPredicate` representation used by this SDK.
|
||||
|
||||
@param object A Foundation object deserialized from JSON data, for example
|
||||
using `NSJSONSerialization`.
|
||||
@return An initialized predicate equivalent to `object`, suitable for use
|
||||
with the `MGLVectorStyleLayer.predicate` property.
|
||||
*/
|
||||
+ (instancetype)predicateWithMGLJSONObject:(id)object NS_SWIFT_NAME(init(mglJSONObject:));
|
||||
|
||||
/**
|
||||
An equivalent Foundation object that can be serialized as JSON.
|
||||
|
||||
The Foundation object conforms to the
|
||||
[Mapbox Style Specification](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions).
|
||||
See the
|
||||
“[Predicates and Expressions](../predicates-and-expressions.html)”
|
||||
guide for a correspondence of operators and types between the style
|
||||
specification and the `NSPredicate` representation used by this SDK.
|
||||
|
||||
You can use `NSJSONSerialization` to serialize the Foundation object as data to
|
||||
write to a file.
|
||||
*/
|
||||
@property (nonatomic, readonly) id mgl_jsonExpressionObject;
|
||||
|
||||
- (id)mgl_if:(id)firstValue, ...;
|
||||
|
||||
- (id)mgl_match:(NSExpression *)firstCase, ...;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#import "NSPredicate+MGLAdditions.h"
|
||||
#import "NSPredicate+MGLPrivateAdditions.h"
|
||||
|
||||
#import "MGLValueEvaluator.h"
|
||||
#import "MGLStyleValue_Private.h"
|
||||
@@ -200,11 +200,11 @@ public:
|
||||
|
||||
NSPredicate *operator()(mbgl::style::ExpressionFilter filter) {
|
||||
id jsonObject = MGLJSONObjectFromMBGLExpression(*filter.expression);
|
||||
return [NSPredicate mgl_predicateWithJSONObject:jsonObject];
|
||||
return [NSPredicate predicateWithMGLJSONObject:jsonObject];
|
||||
}
|
||||
};
|
||||
|
||||
@implementation NSPredicate (MGLAdditions)
|
||||
@implementation NSPredicate (MGLPrivateAdditions)
|
||||
|
||||
- (mbgl::style::Filter)mgl_filter
|
||||
{
|
||||
@@ -230,18 +230,18 @@ public:
|
||||
|
||||
@end
|
||||
|
||||
@implementation NSPredicate (MGLExpressionAdditions)
|
||||
@implementation NSPredicate (MGLAdditions)
|
||||
|
||||
NSArray *MGLSubpredicatesWithJSONObjects(NSArray *objects) {
|
||||
NSMutableArray *subpredicates = [NSMutableArray arrayWithCapacity:objects.count];
|
||||
for (id object in objects) {
|
||||
NSPredicate *predicate = [NSPredicate mgl_predicateWithJSONObject:object];
|
||||
NSPredicate *predicate = [NSPredicate predicateWithMGLJSONObject:object];
|
||||
[subpredicates addObject:predicate];
|
||||
}
|
||||
return subpredicates;
|
||||
}
|
||||
|
||||
+ (instancetype)mgl_predicateWithJSONObject:(id)object {
|
||||
+ (instancetype)predicateWithMGLJSONObject:(id)object {
|
||||
if ([object isEqual:@YES]) {
|
||||
return [NSPredicate predicateWithValue:YES];
|
||||
}
|
||||
@@ -360,6 +360,10 @@ NSArray *MGLSubpredicatesWithJSONObjects(NSArray *objects) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation NSPredicate (MGLExpressionAdditions)
|
||||
|
||||
- (id)mgl_if:(id)firstValue, ... {
|
||||
|
||||
if ([self evaluateWithObject:nil]) {
|
||||
|
||||
25
platform/darwin/src/NSPredicate+MGLPrivateAdditions.h
Normal file
25
platform/darwin/src/NSPredicate+MGLPrivateAdditions.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "NSPredicate+MGLAdditions.h"
|
||||
|
||||
#include <mbgl/style/filter.hpp>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NSPredicate (MGLPrivateAdditions)
|
||||
|
||||
- (mbgl::style::Filter)mgl_filter;
|
||||
|
||||
+ (instancetype)mgl_predicateWithFilter:(mbgl::style::Filter)filter;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSPredicate (MGLExpressionAdditions)
|
||||
|
||||
- (id)mgl_if:(id)firstValue, ...;
|
||||
|
||||
- (id)mgl_match:(NSExpression *)firstCase, ...;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,7 +1,7 @@
|
||||
#import <XCTest/XCTest.h>
|
||||
#import <Mapbox/Mapbox.h>
|
||||
|
||||
#import "NSPredicate+MGLAdditions.h"
|
||||
#import "NSPredicate+MGLPrivateAdditions.h"
|
||||
#import "MGLValueEvaluator.h"
|
||||
|
||||
namespace mbgl {
|
||||
@@ -242,48 +242,48 @@ namespace mbgl {
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"x == YES"];
|
||||
NSArray *jsonExpression = @[@"==", @[@"get", @"x"], @YES];
|
||||
XCTAssertEqualObjects(predicate.mgl_jsonExpressionObject, jsonExpression);
|
||||
XCTAssertEqualObjects([NSPredicate mgl_predicateWithJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate mgl_predicateWithJSONObject:jsonExpression]
|
||||
XCTAssertEqualObjects([NSPredicate predicateWithMGLJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate predicateWithMGLJSONObject:jsonExpression]
|
||||
mustRoundTrip:NO];
|
||||
}
|
||||
{
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"CAST(x, 'NSNumber') < 5"];
|
||||
NSArray *jsonExpression = @[@"<", @[@"to-number", @[@"get", @"x"]], @5];
|
||||
XCTAssertEqualObjects(predicate.mgl_jsonExpressionObject, jsonExpression);
|
||||
XCTAssertEqualObjects([NSPredicate mgl_predicateWithJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate mgl_predicateWithJSONObject:jsonExpression]
|
||||
XCTAssertEqualObjects([NSPredicate predicateWithMGLJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate predicateWithMGLJSONObject:jsonExpression]
|
||||
mustRoundTrip:NO];
|
||||
}
|
||||
{
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"CAST(x, 'NSNumber') > 5"];
|
||||
NSArray *jsonExpression = @[@">", @[@"to-number", @[@"get", @"x"]], @5];
|
||||
XCTAssertEqualObjects(predicate.mgl_jsonExpressionObject, jsonExpression);
|
||||
XCTAssertEqualObjects([NSPredicate mgl_predicateWithJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate mgl_predicateWithJSONObject:jsonExpression]
|
||||
XCTAssertEqualObjects([NSPredicate predicateWithMGLJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate predicateWithMGLJSONObject:jsonExpression]
|
||||
mustRoundTrip:NO];
|
||||
}
|
||||
{
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"CAST(x, 'NSNumber') <= 5"];
|
||||
NSArray *jsonExpression = @[@"<=", @[@"to-number", @[@"get", @"x"]], @5];
|
||||
XCTAssertEqualObjects(predicate.mgl_jsonExpressionObject, jsonExpression);
|
||||
XCTAssertEqualObjects([NSPredicate mgl_predicateWithJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate mgl_predicateWithJSONObject:jsonExpression]
|
||||
XCTAssertEqualObjects([NSPredicate predicateWithMGLJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate predicateWithMGLJSONObject:jsonExpression]
|
||||
mustRoundTrip:NO];
|
||||
}
|
||||
{
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"CAST(x, 'NSNumber') >= 5"];
|
||||
NSArray *jsonExpression = @[@">=", @[@"to-number", @[@"get", @"x"]], @5];
|
||||
XCTAssertEqualObjects(predicate.mgl_jsonExpressionObject, jsonExpression);
|
||||
XCTAssertEqualObjects([NSPredicate mgl_predicateWithJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate mgl_predicateWithJSONObject:jsonExpression]
|
||||
XCTAssertEqualObjects([NSPredicate predicateWithMGLJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate predicateWithMGLJSONObject:jsonExpression]
|
||||
mustRoundTrip:NO];
|
||||
}
|
||||
{
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"CAST(x, 'NSString') > 'value'"];
|
||||
NSArray *jsonExpression = @[@">", @[@"to-string", @[@"get", @"x"]], @"value"];
|
||||
XCTAssertEqualObjects(predicate.mgl_jsonExpressionObject, jsonExpression);
|
||||
XCTAssertEqualObjects([NSPredicate mgl_predicateWithJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate mgl_predicateWithJSONObject:jsonExpression]
|
||||
XCTAssertEqualObjects([NSPredicate predicateWithMGLJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate predicateWithMGLJSONObject:jsonExpression]
|
||||
mustRoundTrip:NO];
|
||||
}
|
||||
{
|
||||
@@ -360,48 +360,48 @@ namespace mbgl {
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"CAST(a, 'NSString') < 'b'"];
|
||||
NSArray *jsonExpression = @[@"<", @[@"to-string", @[@"get", @"a"]], @"b"];
|
||||
XCTAssertEqualObjects(predicate.mgl_jsonExpressionObject, jsonExpression);
|
||||
XCTAssertEqualObjects([NSPredicate mgl_predicateWithJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate mgl_predicateWithJSONObject:jsonExpression]
|
||||
XCTAssertEqualObjects([NSPredicate predicateWithMGLJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate predicateWithMGLJSONObject:jsonExpression]
|
||||
mustRoundTrip:NO];
|
||||
}
|
||||
{
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"CAST(a, 'NSString') <= 'b'"];
|
||||
NSArray *jsonExpression = @[@"<=", @[@"to-string", @[@"get", @"a"]], @"b"];
|
||||
XCTAssertEqualObjects(predicate.mgl_jsonExpressionObject, jsonExpression);
|
||||
XCTAssertEqualObjects([NSPredicate mgl_predicateWithJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate mgl_predicateWithJSONObject:jsonExpression]
|
||||
XCTAssertEqualObjects([NSPredicate predicateWithMGLJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate predicateWithMGLJSONObject:jsonExpression]
|
||||
mustRoundTrip:NO];
|
||||
}
|
||||
{
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"CAST(a, 'NSString') > 'b'"];
|
||||
NSArray *jsonExpression = @[@">", @[@"to-string", @[@"get", @"a"]], @"b"];
|
||||
XCTAssertEqualObjects(predicate.mgl_jsonExpressionObject, jsonExpression);
|
||||
XCTAssertEqualObjects([NSPredicate mgl_predicateWithJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate mgl_predicateWithJSONObject:jsonExpression]
|
||||
XCTAssertEqualObjects([NSPredicate predicateWithMGLJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate predicateWithMGLJSONObject:jsonExpression]
|
||||
mustRoundTrip:NO];
|
||||
}
|
||||
{
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"CAST(a, 'NSString') >= 'b'"];
|
||||
NSArray *jsonExpression = @[@">=", @[@"to-string", @[@"get", @"a"]], @"b"];
|
||||
XCTAssertEqualObjects(predicate.mgl_jsonExpressionObject, jsonExpression);
|
||||
XCTAssertEqualObjects([NSPredicate mgl_predicateWithJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate mgl_predicateWithJSONObject:jsonExpression]
|
||||
XCTAssertEqualObjects([NSPredicate predicateWithMGLJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate predicateWithMGLJSONObject:jsonExpression]
|
||||
mustRoundTrip:NO];
|
||||
}
|
||||
{
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"CAST(a, 'NSString') BETWEEN {'b', 'z'}"];
|
||||
NSArray *jsonExpression =@[@"all", @[@"<=", @"b", @[@"to-string", @[@"get", @"a"]]], @[@"<=", @[@"to-string", @[@"get", @"a"]], @"z"]];
|
||||
XCTAssertEqualObjects(predicate.mgl_jsonExpressionObject, jsonExpression);
|
||||
XCTAssertEqualObjects([NSPredicate mgl_predicateWithJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate mgl_predicateWithJSONObject:jsonExpression]
|
||||
XCTAssertEqualObjects([NSPredicate predicateWithMGLJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate predicateWithMGLJSONObject:jsonExpression]
|
||||
mustRoundTrip:NO];
|
||||
}
|
||||
{
|
||||
NSExpression *limits = [NSExpression expressionForAggregate:@[[NSExpression expressionForConstantValue:@10], [NSExpression expressionForConstantValue:@100]]];
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"CAST(x, 'NSNumber') BETWEEN %@", limits];
|
||||
NSArray *jsonExpression = @[@"all", @[@">=", @[@"to-number", @[@"get", @"x"]], @10], @[@"<=", @[@"to-number", @[@"get", @"x"]], @100]];
|
||||
XCTAssertEqualObjects([NSPredicate mgl_predicateWithJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate mgl_predicateWithJSONObject:jsonExpression]
|
||||
XCTAssertEqualObjects([NSPredicate predicateWithMGLJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate predicateWithMGLJSONObject:jsonExpression]
|
||||
mustRoundTrip:NO];
|
||||
}
|
||||
{
|
||||
@@ -409,24 +409,24 @@ namespace mbgl {
|
||||
NSExpression *limits = [NSExpression expressionForAggregate:@[[NSExpression expressionForConstantValue:@10], [NSExpression expressionForConstantValue:@100]]];
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"CAST(x, 'NSNumber') BETWEEN %@", limits];
|
||||
XCTAssertEqualObjects(predicate.mgl_jsonExpressionObject, expected);
|
||||
XCTAssertEqualObjects([NSPredicate mgl_predicateWithJSONObject:expected], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate mgl_predicateWithJSONObject:expected]
|
||||
XCTAssertEqualObjects([NSPredicate predicateWithMGLJSONObject:expected], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate predicateWithMGLJSONObject:expected]
|
||||
mustRoundTrip:NO];
|
||||
}
|
||||
{
|
||||
NSArray *expected = @[@"all", @[@"<=", @10, @[@"to-number", @[@"get", @"x"]]], @[@">=", @100, @[@"to-number", @[@"get", @"x"]]]];
|
||||
NSExpression *limits = [NSExpression expressionForAggregate:@[[NSExpression expressionForConstantValue:@10], [NSExpression expressionForConstantValue:@100]]];
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"CAST(x, 'NSNumber') BETWEEN %@", limits];
|
||||
XCTAssertEqualObjects([NSPredicate mgl_predicateWithJSONObject:expected], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate mgl_predicateWithJSONObject:expected]
|
||||
XCTAssertEqualObjects([NSPredicate predicateWithMGLJSONObject:expected], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate predicateWithMGLJSONObject:expected]
|
||||
mustRoundTrip:NO];
|
||||
}
|
||||
{
|
||||
NSArray *expected = @[@"all", @[@">=", @[@"to-number", @[@"get", @"x"]], @10], @[@">=", @100, @[@"to-number", @[@"get", @"x"]]]];
|
||||
NSExpression *limits = [NSExpression expressionForAggregate:@[[NSExpression expressionForConstantValue:@10], [NSExpression expressionForConstantValue:@100]]];
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"CAST(x, 'NSNumber') BETWEEN %@", limits];
|
||||
XCTAssertEqualObjects([NSPredicate mgl_predicateWithJSONObject:expected], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate mgl_predicateWithJSONObject:expected]
|
||||
XCTAssertEqualObjects([NSPredicate predicateWithMGLJSONObject:expected], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate predicateWithMGLJSONObject:expected]
|
||||
mustRoundTrip:NO];
|
||||
}
|
||||
{
|
||||
@@ -434,7 +434,7 @@ namespace mbgl {
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"$featureIdentifier IN { 6, 5, 4, 3}"];
|
||||
XCTAssertEqualObjects(predicate.mgl_jsonExpressionObject, expected);
|
||||
NSPredicate *predicateAfter = [NSPredicate predicateWithFormat:@"MGL_MATCH(CAST($featureIdentifier, 'NSNumber'), 3, YES, 4, YES, 5, YES, 6, YES, NO) == YES"];
|
||||
auto forwardFilter = [NSPredicate mgl_predicateWithJSONObject:expected].mgl_filter;
|
||||
auto forwardFilter = [NSPredicate predicateWithMGLJSONObject:expected].mgl_filter;
|
||||
NSPredicate *forwardPredicateAfter = [NSPredicate mgl_predicateWithFilter:forwardFilter];
|
||||
XCTAssertEqualObjects(predicateAfter, forwardPredicateAfter);
|
||||
}
|
||||
@@ -443,7 +443,7 @@ namespace mbgl {
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"NOT x IN { 6, 5, 4, 3}"];
|
||||
XCTAssertEqualObjects(predicate.mgl_jsonExpressionObject, expected);
|
||||
NSPredicate *predicateAfter = [NSPredicate predicateWithFormat:@"NOT MGL_MATCH(CAST(x, 'NSNumber'), 3, YES, 4, YES, 5, YES, 6, YES, NO) == YES"];
|
||||
auto forwardFilter = [NSPredicate mgl_predicateWithJSONObject:expected].mgl_filter;
|
||||
auto forwardFilter = [NSPredicate predicateWithMGLJSONObject:expected].mgl_filter;
|
||||
NSPredicate *forwardPredicateAfter = [NSPredicate mgl_predicateWithFilter:forwardFilter];
|
||||
XCTAssertEqualObjects(predicateAfter, forwardPredicateAfter);
|
||||
}
|
||||
@@ -452,7 +452,7 @@ namespace mbgl {
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"a IN { 'b', 'c' }"];
|
||||
XCTAssertEqualObjects(predicate.mgl_jsonExpressionObject, expected);
|
||||
NSPredicate *predicateAfter = [NSPredicate predicateWithFormat:@"MGL_MATCH(CAST(a, 'NSString'), 'b', YES, 'c', YES, NO) == YES"];
|
||||
auto forwardFilter = [NSPredicate mgl_predicateWithJSONObject:expected].mgl_filter;
|
||||
auto forwardFilter = [NSPredicate predicateWithMGLJSONObject:expected].mgl_filter;
|
||||
NSPredicate *forwardPredicateAfter = [NSPredicate mgl_predicateWithFilter:forwardFilter];
|
||||
XCTAssertEqualObjects(predicateAfter, forwardPredicateAfter);
|
||||
}
|
||||
@@ -461,7 +461,7 @@ namespace mbgl {
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"%@ IN %@", [NSExpression expressionForVariable:@"geometryType"], @[@"LineString", @"Polygon"]];
|
||||
XCTAssertEqualObjects(predicate.mgl_jsonExpressionObject, expected);
|
||||
NSPredicate *predicateAfter = [NSPredicate predicateWithFormat:@"MGL_MATCH($geometryType, 'LineString', YES, 'Polygon', YES, NO) == YES"];
|
||||
auto forwardFilter = [NSPredicate mgl_predicateWithJSONObject:expected].mgl_filter;
|
||||
auto forwardFilter = [NSPredicate predicateWithMGLJSONObject:expected].mgl_filter;
|
||||
NSPredicate *forwardPredicateAfter = [NSPredicate mgl_predicateWithFilter:forwardFilter];
|
||||
XCTAssertEqualObjects(predicateAfter, forwardPredicateAfter);
|
||||
}
|
||||
@@ -470,7 +470,7 @@ namespace mbgl {
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"{ 6, 5, 4, 3} CONTAINS x"];
|
||||
XCTAssertEqualObjects(predicate.mgl_jsonExpressionObject, expected);
|
||||
NSPredicate *predicateAfter = [NSPredicate predicateWithFormat:@"MGL_MATCH(CAST(x, 'NSNumber'), 3, YES, 4, YES, 5, YES, 6, YES, NO) == YES"];
|
||||
auto forwardFilter = [NSPredicate mgl_predicateWithJSONObject:expected].mgl_filter;
|
||||
auto forwardFilter = [NSPredicate predicateWithMGLJSONObject:expected].mgl_filter;
|
||||
NSPredicate *forwardPredicateAfter = [NSPredicate mgl_predicateWithFilter:forwardFilter];
|
||||
XCTAssertEqualObjects(predicateAfter, forwardPredicateAfter);
|
||||
}
|
||||
@@ -479,7 +479,7 @@ namespace mbgl {
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"%@ CONTAINS %@", @[@"LineString", @"Polygon"], [NSExpression expressionForVariable:@"geometryType"]];
|
||||
XCTAssertEqualObjects(predicate.mgl_jsonExpressionObject, expected);
|
||||
NSPredicate *predicateAfter = [NSPredicate predicateWithFormat:@"MGL_MATCH($geometryType, 'LineString', YES, 'Polygon', YES, NO) == YES"];
|
||||
auto forwardFilter = [NSPredicate mgl_predicateWithJSONObject:expected].mgl_filter;
|
||||
auto forwardFilter = [NSPredicate predicateWithMGLJSONObject:expected].mgl_filter;
|
||||
NSPredicate *forwardPredicateAfter = [NSPredicate mgl_predicateWithFilter:forwardFilter];
|
||||
XCTAssertEqualObjects(predicateAfter, forwardPredicateAfter);
|
||||
}
|
||||
@@ -488,7 +488,7 @@ namespace mbgl {
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"{ 6, 5, 4, 3} CONTAINS $featureIdentifier"];
|
||||
XCTAssertEqualObjects(predicate.mgl_jsonExpressionObject, expected);
|
||||
NSPredicate *predicateAfter = [NSPredicate predicateWithFormat:@"MGL_MATCH(CAST($featureIdentifier, 'NSNumber'), 3, YES, 4, YES, 5, YES, 6, YES, NO) == YES"];
|
||||
auto forwardFilter = [NSPredicate mgl_predicateWithJSONObject:expected].mgl_filter;
|
||||
auto forwardFilter = [NSPredicate predicateWithMGLJSONObject:expected].mgl_filter;
|
||||
NSPredicate *forwardPredicateAfter = [NSPredicate mgl_predicateWithFilter:forwardFilter];
|
||||
XCTAssertEqualObjects(predicateAfter, forwardPredicateAfter);
|
||||
}
|
||||
@@ -499,32 +499,32 @@ namespace mbgl {
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"a == 'b' AND c == 'd'"];
|
||||
NSArray *jsonExpression = @[@"all", @[@"==", @[@"get", @"a"], @"b"], @[@"==", @[@"get", @"c"], @"d"]];
|
||||
XCTAssertEqualObjects(predicate.mgl_jsonExpressionObject, jsonExpression);
|
||||
XCTAssertEqualObjects([NSPredicate mgl_predicateWithJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate mgl_predicateWithJSONObject:jsonExpression]
|
||||
XCTAssertEqualObjects([NSPredicate predicateWithMGLJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate predicateWithMGLJSONObject:jsonExpression]
|
||||
mustRoundTrip:NO];
|
||||
}
|
||||
{
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"a == 'b' OR c == 'd'"];
|
||||
NSArray *jsonExpression = @[@"any", @[@"==", @[@"get", @"a"], @"b"], @[@"==", @[@"get", @"c"], @"d"]];
|
||||
XCTAssertEqualObjects(predicate.mgl_jsonExpressionObject, jsonExpression);
|
||||
XCTAssertEqualObjects([NSPredicate mgl_predicateWithJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate mgl_predicateWithJSONObject:jsonExpression]
|
||||
XCTAssertEqualObjects([NSPredicate predicateWithMGLJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate predicateWithMGLJSONObject:jsonExpression]
|
||||
mustRoundTrip:NO];
|
||||
}
|
||||
{
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"NOT(a == 'b' AND c == 'd')"];
|
||||
NSArray *jsonExpression = @[@"!", @[@"all", @[@"==", @[@"get", @"a"], @"b"], @[@"==", @[@"get", @"c"], @"d"]]];
|
||||
XCTAssertEqualObjects(predicate.mgl_jsonExpressionObject, jsonExpression);
|
||||
XCTAssertEqualObjects([NSPredicate mgl_predicateWithJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate mgl_predicateWithJSONObject:jsonExpression]
|
||||
XCTAssertEqualObjects([NSPredicate predicateWithMGLJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate predicateWithMGLJSONObject:jsonExpression]
|
||||
mustRoundTrip:NO];
|
||||
}
|
||||
{
|
||||
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"NOT(a == 'b' OR c == 'd')"];
|
||||
NSArray *jsonExpression = @[@"!", @[@"any", @[@"==", @[@"get", @"a"], @"b"], @[@"==", @[@"get", @"c"], @"d"]]];
|
||||
XCTAssertEqualObjects(predicate.mgl_jsonExpressionObject, jsonExpression);
|
||||
XCTAssertEqualObjects([NSPredicate mgl_predicateWithJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate mgl_predicateWithJSONObject:jsonExpression]
|
||||
XCTAssertEqualObjects([NSPredicate predicateWithMGLJSONObject:jsonExpression], predicate);
|
||||
[self testSymmetryWithPredicate:[NSPredicate predicateWithMGLJSONObject:jsonExpression]
|
||||
mustRoundTrip:NO];
|
||||
}
|
||||
{
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
1F7454971ECD450D00021D39 /* MGLLight_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F7454941ECD450D00021D39 /* MGLLight_Private.h */; };
|
||||
1F7454A91ED08AB400021D39 /* MGLLightTest.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1F7454A61ED08AB400021D39 /* MGLLightTest.mm */; };
|
||||
1F95931D1E6DE2E900D5B294 /* MGLNSDateAdditionsTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1F95931C1E6DE2E900D5B294 /* MGLNSDateAdditionsTests.mm */; };
|
||||
1FC4817D2098CBC0000D09B4 /* NSPredicate+MGLPrivateAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FC4817B2098CBC0000D09B4 /* NSPredicate+MGLPrivateAdditions.h */; };
|
||||
1FC4817F2098CD80000D09B4 /* NSPredicate+MGLPrivateAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FC4817B2098CBC0000D09B4 /* NSPredicate+MGLPrivateAdditions.h */; };
|
||||
30E578171DAA85520050F07E /* UIImage+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 30E578111DAA7D690050F07E /* UIImage+MGLAdditions.h */; };
|
||||
30E578181DAA85520050F07E /* UIImage+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 30E578111DAA7D690050F07E /* UIImage+MGLAdditions.h */; };
|
||||
30E578191DAA855E0050F07E /* UIImage+MGLAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 30E578121DAA7D690050F07E /* UIImage+MGLAdditions.mm */; };
|
||||
@@ -130,8 +132,8 @@
|
||||
357FE2E01E02D2B20068B753 /* NSCoder+MGLAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 357FE2DC1E02D2B20068B753 /* NSCoder+MGLAdditions.mm */; };
|
||||
3598544D1E1D38AA00B29F84 /* MGLDistanceFormatterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3598544C1E1D38AA00B29F84 /* MGLDistanceFormatterTests.m */; };
|
||||
359F57461D2FDDA6005217F1 /* MGLUserLocationAnnotationView_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 359F57451D2FDBD5005217F1 /* MGLUserLocationAnnotationView_Private.h */; };
|
||||
35B82BF81D6C5F8400B1B721 /* NSPredicate+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 35B82BF61D6C5F8400B1B721 /* NSPredicate+MGLAdditions.h */; };
|
||||
35B82BF91D6C5F8400B1B721 /* NSPredicate+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 35B82BF61D6C5F8400B1B721 /* NSPredicate+MGLAdditions.h */; };
|
||||
35B82BF81D6C5F8400B1B721 /* NSPredicate+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 35B82BF61D6C5F8400B1B721 /* NSPredicate+MGLAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
35B82BF91D6C5F8400B1B721 /* NSPredicate+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 35B82BF61D6C5F8400B1B721 /* NSPredicate+MGLAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
35B82BFA1D6C5F8400B1B721 /* NSPredicate+MGLAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35B82BF71D6C5F8400B1B721 /* NSPredicate+MGLAdditions.mm */; };
|
||||
35B82BFB1D6C5F8400B1B721 /* NSPredicate+MGLAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35B82BF71D6C5F8400B1B721 /* NSPredicate+MGLAdditions.mm */; };
|
||||
35B8E08C1D6C8B5100E768D2 /* MGLPredicateTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 35B8E08B1D6C8B5100E768D2 /* MGLPredicateTests.mm */; };
|
||||
@@ -753,6 +755,7 @@
|
||||
1F7454941ECD450D00021D39 /* MGLLight_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLLight_Private.h; sourceTree = "<group>"; };
|
||||
1F7454A61ED08AB400021D39 /* MGLLightTest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MGLLightTest.mm; path = ../../darwin/test/MGLLightTest.mm; sourceTree = "<group>"; };
|
||||
1F95931C1E6DE2E900D5B294 /* MGLNSDateAdditionsTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MGLNSDateAdditionsTests.mm; path = ../../darwin/test/MGLNSDateAdditionsTests.mm; sourceTree = "<group>"; };
|
||||
1FC4817B2098CBC0000D09B4 /* NSPredicate+MGLPrivateAdditions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSPredicate+MGLPrivateAdditions.h"; sourceTree = "<group>"; };
|
||||
20DABE861DF78148007AC5FF /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Foundation.strings"; sourceTree = "<group>"; };
|
||||
20DABE881DF78148007AC5FF /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = "<group>"; };
|
||||
20DABE8A1DF78149007AC5FF /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Root.strings"; sourceTree = "<group>"; };
|
||||
@@ -2111,6 +2114,7 @@
|
||||
3510FFEF1D6D9D8C00F413B2 /* NSExpression+MGLAdditions.mm */,
|
||||
35B82BF61D6C5F8400B1B721 /* NSPredicate+MGLAdditions.h */,
|
||||
35B82BF71D6C5F8400B1B721 /* NSPredicate+MGLAdditions.mm */,
|
||||
1FC4817B2098CBC0000D09B4 /* NSPredicate+MGLPrivateAdditions.h */,
|
||||
DA8848151CBAFA6200AB86E3 /* NSProcessInfo+MGLAdditions.h */,
|
||||
DA8848161CBAFA6200AB86E3 /* NSProcessInfo+MGLAdditions.m */,
|
||||
DA8848171CBAFA6200AB86E3 /* NSString+MGLAdditions.h */,
|
||||
@@ -2199,6 +2203,7 @@
|
||||
DA88483B1CBAFB8500AB86E3 /* MGLCalloutView.h in Headers */,
|
||||
35E0CFE61D3E501500188327 /* MGLStyle_Private.h in Headers */,
|
||||
3510FFF01D6D9D8C00F413B2 /* NSExpression+MGLAdditions.h in Headers */,
|
||||
1FC4817D2098CBC0000D09B4 /* NSPredicate+MGLPrivateAdditions.h in Headers */,
|
||||
353AFA141D65AB17005A69F4 /* NSDate+MGLAdditions.h in Headers */,
|
||||
DA8848531CBAFB9800AB86E3 /* MGLCompactCalloutView.h in Headers */,
|
||||
DA8847FB1CBAFA5100AB86E3 /* MGLShape.h in Headers */,
|
||||
@@ -2378,6 +2383,7 @@
|
||||
96E516F920005A3500A02306 /* MGLFaux3DUserLocationAnnotationView.h in Headers */,
|
||||
96E516F22000596D00A02306 /* NSException+MGLAdditions.h in Headers */,
|
||||
96E516EC2000560B00A02306 /* MGLUserLocationAnnotationView_Private.h in Headers */,
|
||||
1FC4817F2098CD80000D09B4 /* NSPredicate+MGLPrivateAdditions.h in Headers */,
|
||||
DABFB8671CBE99E500D62B32 /* MGLPolygon.h in Headers */,
|
||||
404C26E81D89C55D000AA13D /* MGLTileSource_Private.h in Headers */,
|
||||
1F7454931ECBB43F00021D39 /* MGLLight.h in Headers */,
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
#import "NSBundle+MGLAdditions.h"
|
||||
#import "NSDate+MGLAdditions.h"
|
||||
#import "NSException+MGLAdditions.h"
|
||||
#import "NSPredicate+MGLAdditions.h"
|
||||
#import "NSPredicate+MGLPrivateAdditions.h"
|
||||
#import "NSProcessInfo+MGLAdditions.h"
|
||||
#import "NSString+MGLAdditions.h"
|
||||
#import "NSURL+MGLAdditions.h"
|
||||
|
||||
@@ -66,3 +66,4 @@ FOUNDATION_EXPORT MGL_EXPORT const unsigned char MapboxVersionString[];
|
||||
#import "MGLAttributionInfo.h"
|
||||
#import "MGLMapSnapshotter.h"
|
||||
#import "NSExpression+MGLAdditions.h"
|
||||
#import "NSPredicate+MGLAdditions.h"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
### Style layers
|
||||
|
||||
* Deprecated `+[NSExpression featurePropertiesVariableExpression]` use `+[NSExpression featureAttributesVariableExpression]` instead. ([#11748](https://github.com/mapbox/mapbox-gl-native/pull/11748))
|
||||
* Added `-[NSPredicate(MGLAdditions) predicateWithMGLJSONObject:]` method and `NSPredicate.mgl_jsonExpressionObject` property. ([#11810](https://github.com/mapbox/mapbox-gl-native/pull/11810))
|
||||
* Added `FISRT`, `LAST`, and `SIZE` symbolic array subscripting support to expressions. ([#11770](https://github.com/mapbox/mapbox-gl-native/pull/11770))
|
||||
|
||||
### Other changes
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
1F7454AB1ED1DDBD00021D39 /* MGLLightTest.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1F7454AA1ED1DDBD00021D39 /* MGLLightTest.mm */; };
|
||||
1F95931B1E6DE2B600D5B294 /* MGLNSDateAdditionsTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1F95931A1E6DE2B600D5B294 /* MGLNSDateAdditionsTests.mm */; };
|
||||
1F9EF4061FBA1B0E0063FBB0 /* mapbox_helmet.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 1F9EF4051FBA1B0D0063FBB0 /* mapbox_helmet.pdf */; };
|
||||
1FC481852098F323000D09B4 /* NSPredicate+MGLPrivateAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FC481842098F323000D09B4 /* NSPredicate+MGLPrivateAdditions.h */; };
|
||||
30E5781B1DAA857E0050F07E /* NSImage+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 30E578141DAA7D920050F07E /* NSImage+MGLAdditions.h */; };
|
||||
3508EC641D749D39009B0EE4 /* NSExpression+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3508EC621D749D39009B0EE4 /* NSExpression+MGLAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
3508EC651D749D39009B0EE4 /* NSExpression+MGLAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3508EC631D749D39009B0EE4 /* NSExpression+MGLAdditions.mm */; };
|
||||
@@ -37,7 +38,7 @@
|
||||
3527428D1D4C24AB00A1ECE6 /* MGLCircleStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 3527428B1D4C24AB00A1ECE6 /* MGLCircleStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
3527428E1D4C24AB00A1ECE6 /* MGLCircleStyleLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3527428C1D4C24AB00A1ECE6 /* MGLCircleStyleLayer.mm */; };
|
||||
352742A11D4C25BD00A1ECE6 /* MGLStyleValue.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3527429E1D4C25BD00A1ECE6 /* MGLStyleValue.mm */; };
|
||||
3529039B1D6C63B80002C7DF /* NSPredicate+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 352903991D6C63B80002C7DF /* NSPredicate+MGLAdditions.h */; };
|
||||
3529039B1D6C63B80002C7DF /* NSPredicate+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 352903991D6C63B80002C7DF /* NSPredicate+MGLAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
3529039C1D6C63B80002C7DF /* NSPredicate+MGLAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3529039A1D6C63B80002C7DF /* NSPredicate+MGLAdditions.mm */; };
|
||||
3537CA741D3F93A600380318 /* MGLStyle_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 3537CA731D3F93A600380318 /* MGLStyle_Private.h */; };
|
||||
3538AA231D542685008EC33D /* MGLStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 3538AA211D542685008EC33D /* MGLStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
@@ -309,6 +310,7 @@
|
||||
1F7454AA1ED1DDBD00021D39 /* MGLLightTest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLLightTest.mm; sourceTree = "<group>"; };
|
||||
1F95931A1E6DE2B600D5B294 /* MGLNSDateAdditionsTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MGLNSDateAdditionsTests.mm; path = ../../darwin/test/MGLNSDateAdditionsTests.mm; sourceTree = "<group>"; };
|
||||
1F9EF4051FBA1B0D0063FBB0 /* mapbox_helmet.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = mapbox_helmet.pdf; sourceTree = "<group>"; };
|
||||
1FC481842098F323000D09B4 /* NSPredicate+MGLPrivateAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSPredicate+MGLPrivateAdditions.h"; sourceTree = "<group>"; };
|
||||
30E578141DAA7D920050F07E /* NSImage+MGLAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSImage+MGLAdditions.h"; path = "src/NSImage+MGLAdditions.h"; sourceTree = SOURCE_ROOT; };
|
||||
3508EC621D749D39009B0EE4 /* NSExpression+MGLAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSExpression+MGLAdditions.h"; sourceTree = "<group>"; };
|
||||
3508EC631D749D39009B0EE4 /* NSExpression+MGLAdditions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "NSExpression+MGLAdditions.mm"; sourceTree = "<group>"; };
|
||||
@@ -1034,6 +1036,7 @@
|
||||
3508EC631D749D39009B0EE4 /* NSExpression+MGLAdditions.mm */,
|
||||
352903991D6C63B80002C7DF /* NSPredicate+MGLAdditions.h */,
|
||||
3529039A1D6C63B80002C7DF /* NSPredicate+MGLAdditions.mm */,
|
||||
1FC481842098F323000D09B4 /* NSPredicate+MGLPrivateAdditions.h */,
|
||||
DAE6C3801CC31E2A00DB3429 /* NSProcessInfo+MGLAdditions.h */,
|
||||
DAE6C3811CC31E2A00DB3429 /* NSProcessInfo+MGLAdditions.m */,
|
||||
DAE6C3821CC31E2A00DB3429 /* NSString+MGLAdditions.h */,
|
||||
@@ -1218,6 +1221,7 @@
|
||||
DAE6C3631CC31E0400DB3429 /* MGLPointAnnotation.h in Headers */,
|
||||
DAC2ABC51CC6D343006D18C4 /* MGLAnnotationImage_Private.h in Headers */,
|
||||
DAE6C35F1CC31E0400DB3429 /* MGLOfflinePack.h in Headers */,
|
||||
1FC481852098F323000D09B4 /* NSPredicate+MGLPrivateAdditions.h in Headers */,
|
||||
DAE6C39C1CC31E2A00DB3429 /* NSString+MGLAdditions.h in Headers */,
|
||||
3529039B1D6C63B80002C7DF /* NSPredicate+MGLAdditions.h in Headers */,
|
||||
DA8F25971D51CAC70010E6B5 /* MGLVectorTileSource.h in Headers */,
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
#import "NSURL+MGLAdditions.h"
|
||||
#import "NSColor+MGLAdditions.h"
|
||||
#import "NSImage+MGLAdditions.h"
|
||||
#import "NSPredicate+MGLAdditions.h"
|
||||
#import "NSPredicate+MGLPrivateAdditions.h"
|
||||
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
#import <OpenGL/gl.h>
|
||||
|
||||
@@ -62,3 +62,4 @@ FOUNDATION_EXPORT MGL_EXPORT const unsigned char MapboxVersionString[];
|
||||
#import "MGLAttributionInfo.h"
|
||||
#import "MGLMapSnapshotter.h"
|
||||
#import "NSExpression+MGLAdditions.h"
|
||||
#import "NSPredicate+MGLAdditions.h"
|
||||
|
||||
Reference in New Issue
Block a user