blob: 1a87075b30aefe99348523f5521c10de9b2f7bef (
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
|
// SDLOnDriverDistraction.m
//
#import "SDLOnDriverDistraction.h"
#import "SDLDriverDistractionState.h"
#import "SDLNames.h"
@implementation SDLOnDriverDistraction
- (instancetype)init {
if (self = [super initWithName:NAMES_OnDriverDistraction]) {
}
return self;
}
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict {
if (self = [super initWithDictionary:dict]) {
}
return self;
}
- (void)setState:(SDLDriverDistractionState *)state {
if (state != nil) {
[parameters setObject:state forKey:NAMES_state];
} else {
[parameters removeObjectForKey:NAMES_state];
}
}
- (SDLDriverDistractionState *)state {
NSObject *obj = [parameters objectForKey:NAMES_state];
if (obj == nil || [obj isKindOfClass:SDLDriverDistractionState.class]) {
return (SDLDriverDistractionState *)obj;
} else {
return [SDLDriverDistractionState valueOf:(NSString *)obj];
}
}
@end
|