blob: 983325dee6e78557ca2b71a5fcf076778ed3f072 (
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
73
74
75
76
77
78
79
80
81
82
|
// SDLAddSubMenu.m
#import "SDLAddSubMenu.h"
#import "SDLNames.h"
@implementation SDLAddSubMenu
- (instancetype)init {
if (self = [super initWithName:NAMES_AddSubMenu]) {
}
return self;
}
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict {
if (self = [super initWithDictionary:dict]) {
}
return self;
}
- (instancetype)initWithId:(UInt8)menuId menuName:(NSString *)menuName position:(UInt8)position {
self = [self initWithId:menuId menuName:menuName];
if (!self) {
return nil;
}
self.position = @(position);
return self;
}
- (instancetype)initWithId:(UInt8)menuId menuName:(NSString *)menuName {
self = [self init];
if (!self) {
return nil;
}
self.menuID = @(menuId);
self.menuName = menuName;
return self;
}
- (void)setMenuID:(NSNumber *)menuID {
if (menuID != nil) {
[parameters setObject:menuID forKey:NAMES_menuID];
} else {
[parameters removeObjectForKey:NAMES_menuID];
}
}
- (NSNumber *)menuID {
return [parameters objectForKey:NAMES_menuID];
}
- (void)setPosition:(NSNumber *)position {
if (position != nil) {
[parameters setObject:position forKey:NAMES_position];
} else {
[parameters removeObjectForKey:NAMES_position];
}
}
- (NSNumber *)position {
return [parameters objectForKey:NAMES_position];
}
- (void)setMenuName:(NSString *)menuName {
if (menuName != nil) {
[parameters setObject:menuName forKey:NAMES_menuName];
} else {
[parameters removeObjectForKey:NAMES_menuName];
}
}
- (NSString *)menuName {
return [parameters objectForKey:NAMES_menuName];
}
@end
|