blob: e082aff59b0f9034f67fc4072ed14e71ae174c79 (
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
|
// SDLBitsPerSample.m
//
#import "SDLBitsPerSample.h"
SDLBitsPerSample *SDLBitsPerSample_8_BIT = nil;
SDLBitsPerSample *SDLBitsPerSample_16_BIT = nil;
NSArray *SDLBitsPerSample_values = nil;
@implementation SDLBitsPerSample
+ (SDLBitsPerSample *)valueOf:(NSString *)value {
for (SDLBitsPerSample *item in SDLBitsPerSample.values) {
if ([item.value isEqualToString:value]) {
return item;
}
}
return nil;
}
+ (NSArray *)values {
if (SDLBitsPerSample_values == nil) {
SDLBitsPerSample_values = @[
SDLBitsPerSample._8_BIT,
SDLBitsPerSample._16_BIT,
];
}
return SDLBitsPerSample_values;
}
+ (SDLBitsPerSample *)_8_BIT {
if (SDLBitsPerSample_8_BIT == nil) {
SDLBitsPerSample_8_BIT = [[SDLBitsPerSample alloc] initWithValue:@"8_BIT"];
}
return SDLBitsPerSample_8_BIT;
}
+ (SDLBitsPerSample *)_16_BIT {
if (SDLBitsPerSample_16_BIT == nil) {
SDLBitsPerSample_16_BIT = [[SDLBitsPerSample alloc] initWithValue:@"16_BIT"];
}
return SDLBitsPerSample_16_BIT;
}
@end
|