1
2 /**
3 IMPORTANT !!!
4
5 DO NOT EDIT THIS FILE. IT IS GENERATED FROM approriate xml file in xmlresources/gbcommands 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.gbcommands;
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 Get a path to a specified location or a navigation point. An ordered list of path
35 nodes will be returned to you by IPTH messages.
36
37 Corresponding GameBots command is
38 GETPATH.
39
40 */
41
42 public class
43 GetPath extends
44 CommandMessage
45
46 {
47
48 /**
49 Creates new instance of command GetPath.
50
51 Get a path to a specified location or a navigation point. An ordered list of path
52 nodes will be returned to you by IPTH messages.
53 Corresponding GameBots message for this command is
54 GETPATH.
55 @param Id
56 Message Id made up by you and echoed in response so you can
57 match up response with query.
58
59 @param Target UnrealId of navigation point you want to find path to. Will be parsed BEFORE Location attribute. If supported, Location attribute won't be parsed. If the point does not exists, blank path will be returned.
60 @param Location Location you want to go to.
61 */
62 public GetPath(
63 String Id, UnrealId Target, Location Location) {
64
65 this.Id = Id;
66
67 this.Target = Target;
68
69 this.Location = Location;
70
71 }
72
73
74 /**
75 Creates new instance of command GetPath.
76
77 Get a path to a specified location or a navigation point. An ordered list of path
78 nodes will be returned to you by IPTH messages.
79 Corresponding GameBots message for this command is
80 GETPATH.
81 <p></p>WARNING: this is empty-command constructor, you have to use setters to fill it up!
82 */
83 public GetPath() {
84 }
85
86
87 /////// Properties BEGIN
88
89 /**
90
91 Message Id made up by you and echoed in response so you can
92 match up response with query.
93 */
94 protected
95 String Id =
96 null;
97
98
99 /**
100
101 Message Id made up by you and echoed in response so you can
102 match up response with query.
103 */
104 public
105 String getId() {
106 return
107 Id;
108 }
109
110
111
112 /**
113
114 Message Id made up by you and echoed in response so you can
115 match up response with query.
116 */
117 public GetPath setId(String Id) {
118 this.Id = Id;
119 return this;
120 }
121
122 /**
123 UnrealId of navigation point you want to find path to. Will be parsed BEFORE Location attribute. If supported, Location attribute won't be parsed. If the point does not exists, blank path will be returned. */
124 protected
125 UnrealId Target =
126 null;
127
128
129 /**
130 UnrealId of navigation point you want to find path to. Will be parsed BEFORE Location attribute. If supported, Location attribute won't be parsed. If the point does not exists, blank path will be returned. */
131 public
132 UnrealId getTarget() {
133 return
134 Target;
135 }
136
137
138
139 /**
140 UnrealId of navigation point you want to find path to. Will be parsed BEFORE Location attribute. If supported, Location attribute won't be parsed. If the point does not exists, blank path will be returned. */
141 public GetPath setTarget(UnrealId Target) {
142 this.Target = Target;
143 return this;
144 }
145
146 /**
147 Location you want to go to. */
148 protected
149 Location Location =
150 null;
151
152
153 /**
154 Location you want to go to. */
155 public
156 Location getLocation() {
157 return
158 Location;
159 }
160
161
162
163 /**
164 Location you want to go to. */
165 public GetPath setLocation(Location Location) {
166 this.Location = Location;
167 return this;
168 }
169
170 /////// Properties END
171
172 /////// Extra Java code BEGIN
173
174 /////// Additional code from xslt BEGIN
175
176
177
178 /////// Additional code from xslt END
179
180 /////// Extra Java from XML BEGIN
181
182 /////// Extra Java from XML END
183
184 /////// Extra Java code END
185
186
187
188 /**
189 * Cloning constructor.
190 */
191 public GetPath(GetPath original) {
192
193 this.Id=original.Id;
194
195 this.Target=original.Target;
196
197 this.Location=original.Location;
198
199 }
200
201
202
203
204 public String toString() {
205 return
206
207 toMessage();
208
209 }
210
211 public String toHtmlString() {
212 return super.toString() +
213
214 "<b>Id</b> : " +
215 String.valueOf(Id) +
216 " <br/> " +
217
218 "<b>Target</b> : " +
219 String.valueOf(Target) +
220 " <br/> " +
221
222 "<b>Location</b> : " +
223 String.valueOf(Location) +
224 " <br/> " +
225 "";
226 }
227
228
229
230 public String toMessage() {
231 StringBuffer buf = new StringBuffer();
232 buf.append("GETPATH");
233
234 if (Id != null) {
235 buf.append(" {Id " + Id + "}");
236 }
237
238 if (Target != null) {
239 buf.append(" {Target " + Target.getStringId() + "}");
240 }
241
242 if (Location != null) {
243 buf.append(" {Location " +
244 Location.getX() + "," +
245 Location.getY() + "," +
246 Location.getZ() + "}");
247 }
248
249 return buf.toString();
250 }
251
252 }
253
254