summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLStyleValue.h
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2018-03-29 10:25:05 -0700
committerGitHub <noreply@github.com>2018-03-29 10:25:05 -0700
commit8c5eb6ca9cbb26778c7ad2ce58c2d673d6170300 (patch)
treea3c8ee8511eb2a91e9b91e381c58c5e0e1d7abe7 /platform/darwin/src/MGLStyleValue.h
parente5a3a7a4510bbbf2fc97363ab0084fb4bc3dd448 (diff)
downloadqtlocation-mapboxgl-8c5eb6ca9cbb26778c7ad2ce58c2d673d6170300.tar.gz
Install aftermarket expression functions (#11472)
* [ios, macos] Introduced more ergonomic expression concatenation syntax * [ios, macos] Fixed mgl_join: * [ios, macos] Simplified expression document headings * [ios, macos] Documented mgl_join: * [ios, macos] Convert length operator to length: for strings Only works for literal strings. * [ios, macos] Implemented type conversion using CAST() * [ios, macos] Aftermarket let expressions * [ios, macos] Refactored aftermarket expression functions Refactored the installation of aftermarket expression functions to use macros. It is no longer necessary to handwrite the type encoding of a function. Also added aftermarket functions for interpolating and stepping. * [ios, macos] Updated documentation, tests, demo apps * [ios, macos] Added generic expression function * [ios, macos] Add MGL_MATCH function placeholder. * [ios, macos] Add MGL_SWITCH expression operator. * [ios, macos] Add mgl_coalesce: as expression function. * [ios, macos] Update style documentation. * [ios, macos] Add conventional custom function support. * [ios, macos] Updated example code * [ios, macos] Add mgl_coalesce conventional custom function support. * [ios, macos] Add aftermarket function to 'has' operator. * [ios, macos] Add documentation for lookup and feature operators. * [ios, macos] Documented simple lookup * [ios, macos] Renamed, reversed has expression Renamed mgl_hasProperty:properties: to mgl_does:have: for better readability and consistency with the conventional mgl_has: function. Documented both forms of mgl_has:. * [ios, macos] Restored OEM conditionals where available This is the preferred syntax for simple conditionals on iOS 9 and above, because you can inline the predicate instead of wrapping it in a constant value expression, which means you can write a conditional in a single format string. * [ios, macos] Update style docs. Co-authored-by: Fabian Guerra <fabian.guerra@mapbox.com>
Diffstat (limited to 'platform/darwin/src/MGLStyleValue.h')
-rw-r--r--platform/darwin/src/MGLStyleValue.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/platform/darwin/src/MGLStyleValue.h b/platform/darwin/src/MGLStyleValue.h
index f6e9c51729..65f89c5909 100644
--- a/platform/darwin/src/MGLStyleValue.h
+++ b/platform/darwin/src/MGLStyleValue.h
@@ -8,13 +8,13 @@ NS_ASSUME_NONNULL_BEGIN
typedef NSString *MGLStyleFunctionOption NS_STRING_ENUM NS_UNAVAILABLE;
-extern MGL_EXPORT const MGLStyleFunctionOption MGLStyleFunctionOptionInterpolationBase __attribute__((unavailable("Use NSExpression instead, applying the mgl_interpolateWithCurveType:parameters:stops: function with a curve type of “exponential” and a non-nil parameter.")));
+extern MGL_EXPORT const MGLStyleFunctionOption MGLStyleFunctionOptionInterpolationBase __attribute__((unavailable("Use NSExpression instead, applying the mgl_interpolate:withCurveType:parameters:stops: function with a curve type of “exponential” and a non-nil parameter.")));
extern MGL_EXPORT const MGLStyleFunctionOption MGLStyleFunctionOptionDefaultValue __attribute__((unavailable("Use +[NSExpression expressionForConditional:trueExpression:falseExpression:] instead.")));
typedef NS_ENUM(NSUInteger, MGLInterpolationMode) {
- MGLInterpolationModeExponential __attribute__((unavailable("Use NSExpression instead, applying the mgl_interpolateWithCurveType:parameters:stops: function with a curve type of “exponential”."))) = 0,
- MGLInterpolationModeInterval __attribute__((unavailable("Use NSExpression instead, calling the mgl_stepWithMinimum:stops: function."))),
+ MGLInterpolationModeExponential __attribute__((unavailable("Use NSExpression instead, applying the mgl_interpolate:withCurveType:parameters:stops: function with a curve type of “exponential”."))) = 0,
+ MGLInterpolationModeInterval __attribute__((unavailable("Use NSExpression instead, calling the mgl_step:from:stops: function."))),
MGLInterpolationModeCategorical __attribute__((unavailable("Use NSExpression instead."))),
MGLInterpolationModeIdentity __attribute__((unavailable("Use +[NSExpression expressionForKeyPath:] instead.")))
} __attribute__((unavailable("Use NSExpression instead.")));
@@ -29,19 +29,19 @@ MGL_EXPORT __attribute__((unavailable("Use +[NSExpression expressionForConstantV
@compatibility_alias MGLStyleConstantValue MGLConstantStyleValue;
-MGL_EXPORT __attribute__((unavailable("Use NSExpression instead, calling the mgl_stepWithMinimum:stops: or mgl_interpolateWithCurveType:parameters:stops: function.")))
+MGL_EXPORT __attribute__((unavailable("Use NSExpression instead, calling the mgl_step:from:stops: or mgl_interpolate:withCurveType:parameters:stops: function.")))
@interface MGLStyleFunction<T> : MGLStyleValue<T>
@end
-MGL_EXPORT __attribute__((unavailable("Use NSExpression instead, applying the mgl_stepWithMinimum:stops: or mgl_interpolateWithCurveType:parameters:stops: function to the $zoomLevel variable.")))
+MGL_EXPORT __attribute__((unavailable("Use NSExpression instead, applying the mgl_step:from:stops: or mgl_interpolate:withCurveType:parameters:stops: function to the $zoomLevel variable.")))
@interface MGLCameraStyleFunction<T> : MGLStyleFunction<T>
@end
-MGL_EXPORT __attribute__((unavailable("Use NSExpression instead, applying the mgl_stepWithMinimum:stops: or mgl_interpolateWithCurveType:parameters:stops: function to a key path expression.")))
+MGL_EXPORT __attribute__((unavailable("Use NSExpression instead, applying the mgl_step:from:stops: or mgl_interpolate:withCurveType:parameters:stops: function to a key path expression.")))
@interface MGLSourceStyleFunction<T> : MGLStyleFunction<T>
@end
-MGL_EXPORT __attribute__((unavailable("Use a NSExpression instead with nested mgl_stepWithMinimum:stops: or mgl_interpolateWithCurveType:parameters:stops: function calls.")))
+MGL_EXPORT __attribute__((unavailable("Use a NSExpression instead with nested mgl_step:from:stops: or mgl_interpolate:withCurveType:parameters:stops: function calls.")))
@interface MGLCompositeStyleFunction<T> : MGLStyleFunction<T>
@end