-
Notifications
You must be signed in to change notification settings - Fork 0
/
EShTargetLanguageVersion.java
58 lines (52 loc) · 1.56 KB
/
EShTargetLanguageVersion.java
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
package com.destranix.glslang;
public enum EShTargetLanguageVersion {
EShTargetSpv_1_0(Main.E_SH_TARGET_SPV_1_0),
EShTargetSpv_1_1(Main.E_SH_TARGET_SPV_1_1),
EShTargetSpv_1_2(Main.E_SH_TARGET_SPV_1_2),
EShTargetSpv_1_3(Main.E_SH_TARGET_SPV_1_3),
EShTargetSpv_1_4(Main.E_SH_TARGET_SPV_1_4),
EShTargetSpv_1_5(Main.E_SH_TARGET_SPV_1_5);
private final int value;
private EShTargetLanguageVersion(int value) {
this.value = value;
}
public int getConstant() {
return this.value;
}
public static EShTargetLanguageVersion valueByStr(String str) {
switch (str) {
case "EShTargetSpv_1_0":
return EShTargetSpv_1_0;
case "EShTargetSpv_1_1":
return EShTargetSpv_1_1;
case "EShTargetSpv_1_2":
return EShTargetSpv_1_2;
case "EShTargetSpv_1_3":
return EShTargetSpv_1_3;
case "EShTargetSpv_1_4":
return EShTargetSpv_1_4;
case "EShTargetSpv_1_5":
return EShTargetSpv_1_5;
default:
throw new IllegalArgumentException("Cannot translate string into enum value!");
}
}
public static EShTargetLanguageVersion valueByConstant(int constant) {
switch (constant) {
case Main.E_SH_TARGET_SPV_1_0:
return EShTargetSpv_1_0;
case Main.E_SH_TARGET_SPV_1_1:
return EShTargetSpv_1_1;
case Main.E_SH_TARGET_SPV_1_2:
return EShTargetSpv_1_2;
case Main.E_SH_TARGET_SPV_1_3:
return EShTargetSpv_1_3;
case Main.E_SH_TARGET_SPV_1_4:
return EShTargetSpv_1_4;
case Main.E_SH_TARGET_SPV_1_5:
return EShTargetSpv_1_5;
default:
throw new IllegalArgumentException("Cannot translate constant into enum value!");
}
}
}