1 package cz.cuni.amis.pogamut.usar2004.agent.module.datatypes;
2
3 import cz.cuni.amis.pogamut.usar2004.agent.module.response.*;
4
5
6
7
8
9
10
11
12 public enum ResponseType
13 {
14 CAMERA(ResponseCamera.class, "Camera"),
15 VIEWPORT(Viewport.class, "Viewports"),
16 SENSOR_EFFECTER(ResponseSensorEffecter.class, "");
17 private String kind;
18 private Class clazz;
19
20
21
22
23
24
25 ResponseType(Class clazz, String kind)
26 {
27 this.kind = kind;
28 this.clazz = clazz;
29 }
30
31
32
33
34
35
36
37
38
39 public static ResponseType getType(String type)
40 {
41 for(ResponseType resType : ResponseType.values())
42 {
43 if(resType.kind.equalsIgnoreCase(type))
44 {
45 return resType;
46 }
47 }
48 return SENSOR_EFFECTER;
49 }
50
51
52
53
54
55
56 public Class getModuleClass()
57 {
58 return this.clazz;
59 }
60 }