blob: 35a1f1b62621b4a6966807aaeea6ab4657ea698e (
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
|
// SDLButtonPressMode.m
//
// Copyright (c) 2014 Ford Motor Company. All rights reserved.
#import "SDLButtonPressMode.h"
SDLButtonPressMode* SDLButtonPressMode_LONG = nil;
SDLButtonPressMode* SDLButtonPressMode_SHORT = nil;
NSMutableArray* SDLButtonPressMode_values = nil;
@implementation SDLButtonPressMode
+(SDLButtonPressMode*) valueOf:(NSString*) value {
for (SDLButtonPressMode* item in SDLButtonPressMode.values) {
if ([item.value isEqualToString:value]) {
return item;
}
}
return nil;
}
+(NSMutableArray*) values {
if (SDLButtonPressMode_values == nil) {
SDLButtonPressMode_values = [[NSMutableArray alloc] initWithObjects:
SDLButtonPressMode.LONG,
SDLButtonPressMode.SHORT,
nil];
}
return SDLButtonPressMode_values;
}
+(SDLButtonPressMode*) LONG {
if (SDLButtonPressMode_LONG == nil) {
SDLButtonPressMode_LONG = [[SDLButtonPressMode alloc] initWithValue:@"LONG"];
}
return SDLButtonPressMode_LONG;
}
+(SDLButtonPressMode*) SHORT {
if (SDLButtonPressMode_SHORT == nil) {
SDLButtonPressMode_SHORT = [[SDLButtonPressMode alloc] initWithValue:@"SHORT"];
}
return SDLButtonPressMode_SHORT;
}
@end
|