View Javadoc

1   
2               /**
3               IMPORTANT !!!
4   
5               DO NOT EDIT THIS FILE. IT IS GENERATED FROM approriate xml file in xmlresources/gbinfomessages BY
6               THE JavaClassesGenerator.xslt. MODIFY THESE FILES INSTEAD OF THIS ONE.
7   
8               IMPORTANT END !!!
9               */
10              package
11              cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages;
12  	    		import java.util.*;
13      import javax.vecmath.*;
14      import cz.cuni.amis.pogamut.base.communication.messages.*;
15      import cz.cuni.amis.pogamut.base.communication.worldview.*;
16      import cz.cuni.amis.pogamut.base.communication.worldview.event.*;
17      import cz.cuni.amis.pogamut.base.communication.worldview.object.*;
18      import cz.cuni.amis.pogamut.base.communication.translator.event.*;
19      import cz.cuni.amis.pogamut.base3d.worldview.object.*;
20      import cz.cuni.amis.pogamut.base3d.worldview.object.event.*;
21      import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;
22      import cz.cuni.amis.pogamut.udk.communication.messages.*;
23      import cz.cuni.amis.pogamut.udk.communication.worldview.objects.*;
24      import cz.cuni.amis.pogamut.udk.communication.translator.itemdescriptor.*;
25      import cz.cuni.amis.pogamut.udk.communication.messages.ItemType.Category;
26      import cz.cuni.amis.utils.exception.*;
27      import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult.Result;
28      import cz.cuni.amis.utils.SafeEquals;
29      import cz.cuni.amis.pogamut.multi.communication.worldview.object.*;
30      
31              
32              /**
33                
34  		Asynchronous message. Sent as a response to ENTER command. Sent if
35  		the ENTER command was unsuccessfull because the vehicle is locked for
36  		our bot.
37  	
38                            Corresponding GameBots message is
39                            LOCKED.
40                        
41               */
42              
43              public class
44              LockedVehicle
45                      extends GBEvent
46                  
47  	            	implements IWorldEvent, IWorldChangeEvent
48  
49              {
50              
51              /**
52                Creates new instance of command LockedVehicle.
53                
54  		Asynchronous message. Sent as a response to ENTER command. Sent if
55  		the ENTER command was unsuccessfull because the vehicle is locked for
56  		our bot.
57  	Corresponding GameBots message for this command is
58                .
59                    @param Id Id of the vehicle, which we cannot enter, because it is locked. 
60                    @param Type Type of the vehicle we wanted to enter. What kind of turret or car. 
61                    @param Location Location of the vehicle.
62                */
63               public LockedVehicle(
64                  UnrealId Id,  String Type,  Location Location) {
65                      
66                      this.Id = Id;
67                  
68                      this.Type = Type;
69                  
70                      this.Location = Location;
71                  
72                  }
73  
74              
75      	/** Example how the message looks like - used during parser tests. */
76      	public static final String PROTOTYPE =
77      		"LOCKED {Id unreal_id} {Type text} {Location 0,0,0}";
78      
79  
80              /////// Properties BEGIN
81              
82          /**
83          Id of the vehicle, which we cannot enter, because it is locked.  */
84          protected
85           UnrealId Id =
86          	null;
87  
88          
89          /**
90          Id of the vehicle, which we cannot enter, because it is locked.  */
91          public
92          UnrealId getId() {
93              return
94           Id;
95          }
96          
97  
98          
99          /**
100         Type of the vehicle we wanted to enter. What kind of turret or car.  */
101         protected
102          String Type =
103         	null;
104 
105         
106         /**
107         Type of the vehicle we wanted to enter. What kind of turret or car.  */
108         public
109         String getType() {
110             return
111          Type;
112         }
113         
114 
115         
116         /**
117         Location of the vehicle. */
118         protected
119          Location Location =
120         	null;
121 
122         
123         /**
124         Location of the vehicle. */
125         public
126         Location getLocation() {
127             return
128          Location;
129         }
130         
131 
132         
133             /////// Properties END
134 
135             /////// Extra Java code BEGIN
136 
137             	/////// Additional code from xslt BEGIN
138             		
139        					public long getSimTime() {
140        						// NOT IMPLEMENTED FOR UDK
141        						return 0;
142        					}
143             		
144 
145 
146             	/////// Additional code from xslt END
147 
148 	            /////// Extra Java from XML BEGIN
149             		
150             	/////// Extra Java from XML END
151 
152             /////// Extra Java code END
153 
154             
155 
156             /**
157               * Cloning constructor.
158               */
159              public LockedVehicle(LockedVehicle original) {
160                 
161                      this.Id=original.Id;
162                 
163                      this.Type=original.Type;
164                 
165                      this.Location=original.Location;
166                 
167              }
168 
169              
170                  /**
171                   * Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package).
172                   */
173 	             public LockedVehicle() {
174 	             }
175              
176 
177                  
178             public String toString() {
179                 return
180                 
181                 		super.toString() + " | " +
182                 		
183 				               "Id = " +
184 				               String.valueOf(Id) + " | " +
185 				            
186 				               "Type = " +
187 				               String.valueOf(Type) + " | " +
188 				            
189 				               "Location = " +
190 				               String.valueOf(Location) + " | " +
191 				             "";
192                 	
193              }
194 
195              public String toHtmlString() {
196                 return super.toString() +
197             
198             "<b>Id</b> : " +
199             String.valueOf(Id) +
200             " <br/> " +
201             
202             "<b>Type</b> : " +
203             String.valueOf(Type) +
204             " <br/> " +
205             
206             "<b>Location</b> : " +
207             String.valueOf(Location) +
208             " <br/> " +
209              "";
210              }
211 
212              
213              
214              }
215 
216