summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLSISData.m
blob: 8e3ad9aa6027cef970de94e1ccdb63337e74c028 (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
//  SDLSISData.m
//

#import "SDLSISData.h"

#import "SDLStationIDNumber.h"
#import "SDLGPSLocation.h"
#import "SDLNames.h"
#import "NSMutableDictionary+Store.h"


NS_ASSUME_NONNULL_BEGIN

@implementation SDLSISData

- (instancetype)initWithStationShortName:(nullable NSString *)stationShortName stationIDNumber:(nullable SDLStationIDNumber *)stationIDNumber stationLongName:(nullable NSString *)stationLongName stationLocation:(nullable SDLGPSLocation *)stationLocation stationMessage:(nullable NSString *)stationMessage {
    self = [self init];
    if(!self) {
        return nil;
    }
    self.stationShortName = stationShortName;
    self.stationIDNumber = stationIDNumber;
    self.stationLongName = stationLongName;
    self.stationLocation = stationLocation;
    self.stationMessage = stationMessage;

    return self;
}

- (void)setStationShortName:(nullable NSString *)stationShortName {
    [store sdl_setObject:stationShortName forName:SDLNameStationShortName];
}

- (nullable NSString *)stationShortName {
    return [store sdl_objectForName:SDLNameStationShortName];
}

- (void)setStationIDNumber:(nullable SDLStationIDNumber *)stationIDNumber {
    [store sdl_setObject:stationIDNumber forName:SDLNameStationIDNumber];
}

- (nullable SDLStationIDNumber *)stationIDNumber {
    return [store sdl_objectForName:SDLNameStationIDNumber ofClass:SDLStationIDNumber.class];
}

- (void)setStationLongName:(nullable NSString *)stationLongName {
    [store sdl_setObject:stationLongName forName:SDLNameStationLongName];
}

- (nullable NSString *)stationLongName {
    return [store sdl_objectForName:SDLNameStationLongName];
}

- (void)setStationLocation:(nullable SDLGPSLocation *)stationLocation {
    [store sdl_setObject:stationLocation forName:SDLNameStationLocation];
}

- (nullable SDLGPSLocation *)stationLocation {
    return [store sdl_objectForName:SDLNameStationLocation ofClass:SDLGPSLocation.class];
}

- (void)setStationMessage:(nullable NSString *)stationMessage {
    [store sdl_setObject:stationMessage forName:SDLNameStationMessage];
}

- (nullable NSString *)stationMessage {
    return [store sdl_objectForName:SDLNameStationMessage];
}

@end

NS_ASSUME_NONNULL_END