blob: ef646f794ff71ac33e9c6c2906bb08578f113ef5 (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
// SDLImage.m
//
#import "SDLImage.h"
#import "SDLImageType.h"
#import "SDLNames.h"
@implementation SDLImage
- (instancetype)init {
if (self = [super init]) {
}
return self;
}
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict {
if (self = [super initWithDictionary:dict]) {
}
return self;
}
- (void)setValue:(NSString *)value {
if (value != nil) {
[store setObject:value forKey:NAMES_value];
} else {
[store removeObjectForKey:NAMES_value];
}
}
- (NSString *)value {
return [store objectForKey:NAMES_value];
}
- (void)setImageType:(SDLImageType *)imageType {
if (imageType != nil) {
[store setObject:imageType forKey:NAMES_imageType];
} else {
[store removeObjectForKey:NAMES_imageType];
}
}
- (SDLImageType *)imageType {
NSObject *obj = [store objectForKey:NAMES_imageType];
if (obj == nil || [obj isKindOfClass:SDLImageType.class]) {
return (SDLImageType *)obj;
} else {
return [SDLImageType valueOf:(NSString *)obj];
}
}
@end
|