blob: ba9749e3e82367b4329793fb84c70abf6a34578c (
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
// SDLSetGlobalProperties.m
//
#import "SDLSetGlobalProperties.h"
#import "SDLImage.h"
#import "SDLKeyboardProperties.h"
#import "SDLNames.h"
#import "SDLTTSChunk.h"
#import "SDLVRHelpItem.h"
@implementation SDLSetGlobalProperties
- (instancetype)init {
if (self = [super initWithName:NAMES_SetGlobalProperties]) {
}
return self;
}
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict {
if (self = [super initWithDictionary:dict]) {
}
return self;
}
- (void)setHelpPrompt:(NSMutableArray *)helpPrompt {
if (helpPrompt != nil) {
[parameters setObject:helpPrompt forKey:NAMES_helpPrompt];
} else {
[parameters removeObjectForKey:NAMES_helpPrompt];
}
}
- (NSMutableArray *)helpPrompt {
NSMutableArray *array = [parameters objectForKey:NAMES_helpPrompt];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLTTSChunk.class]) {
return array;
} else {
NSMutableArray *newList = [NSMutableArray arrayWithCapacity:[array count]];
for (NSDictionary *dict in array) {
[newList addObject:[[SDLTTSChunk alloc] initWithDictionary:(NSMutableDictionary *)dict]];
}
return newList;
}
}
- (void)setTimeoutPrompt:(NSMutableArray *)timeoutPrompt {
if (timeoutPrompt != nil) {
[parameters setObject:timeoutPrompt forKey:NAMES_timeoutPrompt];
} else {
[parameters removeObjectForKey:NAMES_timeoutPrompt];
}
}
- (NSMutableArray *)timeoutPrompt {
NSMutableArray *array = [parameters objectForKey:NAMES_timeoutPrompt];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLTTSChunk.class]) {
return array;
} else {
NSMutableArray *newList = [NSMutableArray arrayWithCapacity:[array count]];
for (NSDictionary *dict in array) {
[newList addObject:[[SDLTTSChunk alloc] initWithDictionary:(NSMutableDictionary *)dict]];
}
return newList;
}
}
- (void)setVrHelpTitle:(NSString *)vrHelpTitle {
if (vrHelpTitle != nil) {
[parameters setObject:vrHelpTitle forKey:NAMES_vrHelpTitle];
} else {
[parameters removeObjectForKey:NAMES_vrHelpTitle];
}
}
- (NSString *)vrHelpTitle {
return [parameters objectForKey:NAMES_vrHelpTitle];
}
- (void)setVrHelp:(NSMutableArray *)vrHelp {
if (vrHelp != nil) {
[parameters setObject:vrHelp forKey:NAMES_vrHelp];
} else {
[parameters removeObjectForKey:NAMES_vrHelp];
}
}
- (NSMutableArray *)vrHelp {
NSMutableArray *array = [parameters objectForKey:NAMES_vrHelp];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLVRHelpItem.class]) {
return array;
} else {
NSMutableArray *newList = [NSMutableArray arrayWithCapacity:[array count]];
for (NSDictionary *dict in array) {
[newList addObject:[[SDLVRHelpItem alloc] initWithDictionary:(NSMutableDictionary *)dict]];
}
return newList;
}
}
- (void)setMenuTitle:(NSString *)menuTitle {
if (menuTitle != nil) {
[parameters setObject:menuTitle forKey:NAMES_menuTitle];
} else {
[parameters removeObjectForKey:NAMES_menuTitle];
}
}
- (NSString *)menuTitle {
return [parameters objectForKey:NAMES_menuTitle];
}
- (void)setMenuIcon:(SDLImage *)menuIcon {
if (menuIcon != nil) {
[parameters setObject:menuIcon forKey:NAMES_menuIcon];
} else {
[parameters removeObjectForKey:NAMES_menuIcon];
}
}
- (SDLImage *)menuIcon {
NSObject *obj = [parameters objectForKey:NAMES_menuIcon];
if (obj == nil || [obj isKindOfClass:SDLImage.class]) {
return (SDLImage *)obj;
} else {
return [[SDLImage alloc] initWithDictionary:(NSMutableDictionary *)obj];
}
}
- (void)setKeyboardProperties:(SDLKeyboardProperties *)keyboardProperties {
if (keyboardProperties != nil) {
[parameters setObject:keyboardProperties forKey:NAMES_keyboardProperties];
} else {
[parameters removeObjectForKey:NAMES_keyboardProperties];
}
}
- (SDLKeyboardProperties *)keyboardProperties {
NSObject *obj = [parameters objectForKey:NAMES_keyboardProperties];
if (obj == nil || [obj isKindOfClass:SDLKeyboardProperties.class]) {
return (SDLKeyboardProperties *)obj;
} else {
return [[SDLKeyboardProperties alloc] initWithDictionary:(NSMutableDictionary *)obj];
}
}
@end
|