summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLStyleValue.h
blob: 010a0d68cbc5d234089768803f5d20ca928a512f (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
#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>

@interface MGLStyleValue<T> : NSObject

+ (instancetype)valueWithRawValue:(T)rawValue;
+ (instancetype)valueWithBase:(CGFloat)base stops:(NSDictionary<NSNumber *, MGLStyleValue<T> *> *)stops;
+ (instancetype)valueWithStops:(NSDictionary<NSNumber *, MGLStyleValue<T> *> *)stops;

@end

@interface MGLStyleConstantValue<T> : MGLStyleValue

+ (instancetype)valueWithRawValue:(T)rawValue;

- (instancetype)init NS_UNAVAILABLE;

- (instancetype)initWithRawValue:(T)rawValue NS_DESIGNATED_INITIALIZER;

@property (nonatomic) T rawValue;

@end

@interface MGLStyleFunction<T> : MGLStyleValue

+ (instancetype)functionWithBase:(CGFloat)base stops:(NSDictionary<NSNumber *, MGLStyleValue<T> *> *)stops;

+ (instancetype)functionWithStops:(NSDictionary<NSNumber *, MGLStyleValue<T> *> *)stops;

- (instancetype)initWithBase:(CGFloat)base stops:(NSDictionary<NSNumber *, MGLStyleValue<T> *> *)stops NS_DESIGNATED_INITIALIZER;

@property (nonatomic) CGFloat base;
@property (nonatomic, copy) NSDictionary<NSNumber *, MGLStyleValue<T> *> *stops;

@end