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  		Info batch message. A series of pathnodes in response to a
35  		GETPATH command from the client. Starts with SPTH, ends with
36  		EPTH. Represents some path in the map (sequence of traversable
37  		navigation points).
38  	
39                            Corresponding GameBots message is
40                            IPTH.
41                        
42               */
43              
44              public class
45              PathList extends
46          InfoMessage
47  	            	implements IWorldEvent, IWorldChangeEvent
48  
49              {
50              
51              /**
52                Creates new instance of command PathList.
53                
54  		Info batch message. A series of pathnodes in response to a
55  		GETPATH command from the client. Starts with SPTH, ends with
56  		EPTH. Represents some path in the map (sequence of traversable
57  		navigation points).
58  	Corresponding GameBots message for this command is
59                .
60                    @param RouteId 
61  			Unique Id of one navigation point in the path (well it
62  			should be navigation point - safer is to use location).
63  		
64                    @param Location 
65  			Location of one navigation point in the path.
66  		
67                */
68               public PathList(
69                  UnrealId RouteId,  Location Location) {
70                      
71                      this.RouteId = RouteId;
72                  
73                      this.Location = Location;
74                  
75                  }
76  
77              
78      	/** Example how the message looks like - used during parser tests. */
79      	public static final String PROTOTYPE =
80      		"IPTH {RouteId unreal_id} {Location 0,0,0}";
81      
82  
83              /////// Properties BEGIN
84              
85          /**
86          
87  			Unique Id of one navigation point in the path (well it
88  			should be navigation point - safer is to use location).
89  		 */
90          protected
91           UnrealId RouteId =
92          	null;
93  
94          
95          /**
96          
97  			Unique Id of one navigation point in the path (well it
98  			should be navigation point - safer is to use location).
99  		 */
100         public
101         UnrealId getRouteId() {
102             return
103          RouteId;
104         }
105         
106 
107         
108         /**
109         
110 			Location of one navigation point in the path.
111 		 */
112         protected
113          Location Location =
114         	null;
115 
116         
117         /**
118         
119 			Location of one navigation point in the path.
120 		 */
121         public
122         Location getLocation() {
123             return
124          Location;
125         }
126         
127 
128         
129             /////// Properties END
130 
131             /////// Extra Java code BEGIN
132 
133             	/////// Additional code from xslt BEGIN
134             		
135        					public long getSimTime() {
136        						// NOT IMPLEMENTED FOR UDK
137        						return 0;
138        					}
139             		
140 
141 
142             	/////// Additional code from xslt END
143 
144 	            /////// Extra Java from XML BEGIN
145             		
146             	/////// Extra Java from XML END
147 
148             /////// Extra Java code END
149 
150             
151 
152             /**
153               * Cloning constructor.
154               */
155              public PathList(PathList original) {
156                 
157                      this.RouteId=original.RouteId;
158                 
159                      this.Location=original.Location;
160                 
161              }
162 
163              
164                  /**
165                   * Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package).
166                   */
167 	             public PathList() {
168 	             }
169              
170 
171                  
172             public String toString() {
173                 return
174                 
175                 		super.toString() + " | " +
176                 		
177 				               "RouteId = " +
178 				               String.valueOf(RouteId) + " | " +
179 				            
180 				               "Location = " +
181 				               String.valueOf(Location) + " | " +
182 				             "";
183                 	
184              }
185 
186              public String toHtmlString() {
187                 return super.toString() +
188             
189             "<b>RouteId</b> : " +
190             String.valueOf(RouteId) +
191             " <br/> " +
192             
193             "<b>Location</b> : " +
194             String.valueOf(Location) +
195             " <br/> " +
196              "";
197              }
198 
199              
200              
201              }
202 
203