blob: 574d4f55272643e13d4f5c1deafb3c65e7ca64fb (
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
// SDLStartTime.m
//
#import "SDLStartTime.h"
#import "SDLNames.h"
@implementation SDLStartTime
- (instancetype)init {
if (self = [super init]) {
}
return self;
}
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict {
if (self = [super initWithDictionary:dict]) {
}
return self;
}
- (instancetype)initWithHours:(UInt8)hours minutes:(UInt8)minutes seconds:(UInt8)seconds {
self = [self init];
if (!self) {
return nil;
}
self.hours = @(hours);
self.minutes = @(minutes);
self.seconds = @(seconds);
return self;
}
- (void)setHours:(NSNumber *)hours {
if (hours != nil) {
[store setObject:hours forKey:NAMES_hours];
} else {
[store removeObjectForKey:NAMES_hours];
}
}
- (NSNumber *)hours {
return [store objectForKey:NAMES_hours];
}
- (void)setMinutes:(NSNumber *)minutes {
if (minutes != nil) {
[store setObject:minutes forKey:NAMES_minutes];
} else {
[store removeObjectForKey:NAMES_minutes];
}
}
- (NSNumber *)minutes {
return [store objectForKey:NAMES_minutes];
}
- (void)setSeconds:(NSNumber *)seconds {
if (seconds != nil) {
[store setObject:seconds forKey:NAMES_seconds];
} else {
[store removeObjectForKey:NAMES_seconds];
}
}
- (NSNumber *)seconds {
return [store objectForKey:NAMES_seconds];
}
@end
|