1
2
3
4
5
6
7
8
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
35
36
37
38
39
40
41
42 public class
43 ConfigurationObserver extends
44 CommandMessage
45
46 {
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86 public ConfigurationObserver(
87 double UpdateTime, double Update, boolean Game, boolean Self, boolean See, boolean Special, boolean All, boolean Async) {
88
89 this.UpdateTime = UpdateTime;
90
91 this.Update = Update;
92
93 this.Game = Game;
94
95 this.Self = Self;
96
97 this.See = See;
98
99 this.Special = Special;
100
101 this.All = All;
102
103 this.Async = Async;
104
105 }
106
107
108
109
110
111
112
113
114
115
116
117 public ConfigurationObserver() {
118 }
119
120
121
122
123
124
125
126
127 protected
128 double UpdateTime =
129 0;
130
131
132
133
134
135
136 public
137 double getUpdateTime() {
138 return
139 UpdateTime;
140 }
141
142
143
144
145
146
147
148 public ConfigurationObserver setUpdateTime(double UpdateTime) {
149 this.UpdateTime = UpdateTime;
150 return this;
151 }
152
153
154
155
156
157 protected
158 double Update =
159 0;
160
161
162
163
164
165
166 public
167 double getUpdate() {
168 return
169 Update;
170 }
171
172
173
174
175
176
177
178 public ConfigurationObserver setUpdate(double Update) {
179 this.Update = Update;
180 return this;
181 }
182
183
184
185
186
187
188 protected
189 boolean Game =
190 false;
191
192
193
194
195
196
197
198 public
199 boolean isGame() {
200 return
201 Game;
202 }
203
204
205
206
207
208
209
210
211 public ConfigurationObserver setGame(boolean Game) {
212 this.Game = Game;
213 return this;
214 }
215
216
217
218
219
220
221 protected
222 boolean Self =
223 false;
224
225
226
227
228
229
230
231 public
232 boolean isSelf() {
233 return
234 Self;
235 }
236
237
238
239
240
241
242
243
244 public ConfigurationObserver setSelf(boolean Self) {
245 this.Self = Self;
246 return this;
247 }
248
249
250
251
252
253
254 protected
255 boolean See =
256 false;
257
258
259
260
261
262
263
264 public
265 boolean isSee() {
266 return
267 See;
268 }
269
270
271
272
273
274
275
276
277 public ConfigurationObserver setSee(boolean See) {
278 this.See = See;
279 return this;
280 }
281
282
283
284
285
286
287 protected
288 boolean Special =
289 false;
290
291
292
293
294
295
296
297 public
298 boolean isSpecial() {
299 return
300 Special;
301 }
302
303
304
305
306
307
308
309
310 public ConfigurationObserver setSpecial(boolean Special) {
311 this.Special = Special;
312 return this;
313 }
314
315
316
317
318
319
320 protected
321 boolean All =
322 false;
323
324
325
326
327
328
329
330 public
331 boolean isAll() {
332 return
333 All;
334 }
335
336
337
338
339
340
341
342
343 public ConfigurationObserver setAll(boolean All) {
344 this.All = All;
345 return this;
346 }
347
348
349
350
351
352
353 protected
354 boolean Async =
355 false;
356
357
358
359
360
361
362
363 public
364 boolean isAsync() {
365 return
366 Async;
367 }
368
369
370
371
372
373
374
375
376 public ConfigurationObserver setAsync(boolean Async) {
377 this.Async = Async;
378 return this;
379 }
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402 public ConfigurationObserver(ConfigurationObserver original) {
403
404 this.UpdateTime=original.UpdateTime;
405
406 this.Update=original.Update;
407
408 this.Game=original.Game;
409
410 this.Self=original.Self;
411
412 this.See=original.See;
413
414 this.Special=original.Special;
415
416 this.All=original.All;
417
418 this.Async=original.Async;
419
420 }
421
422
423
424
425 public String toString() {
426 return
427
428 toMessage();
429
430 }
431
432 public String toHtmlString() {
433 return super.toString() +
434
435 "<b>UpdateTime</b> : " +
436 String.valueOf(UpdateTime) +
437 " <br/> " +
438
439 "<b>Update</b> : " +
440 String.valueOf(Update) +
441 " <br/> " +
442
443 "<b>Game</b> : " +
444 String.valueOf(Game) +
445 " <br/> " +
446
447 "<b>Self</b> : " +
448 String.valueOf(Self) +
449 " <br/> " +
450
451 "<b>See</b> : " +
452 String.valueOf(See) +
453 " <br/> " +
454
455 "<b>Special</b> : " +
456 String.valueOf(Special) +
457 " <br/> " +
458
459 "<b>All</b> : " +
460 String.valueOf(All) +
461 " <br/> " +
462
463 "<b>Async</b> : " +
464 String.valueOf(Async) +
465 " <br/> " +
466 "";
467 }
468
469
470
471 public String toMessage() {
472 StringBuffer buf = new StringBuffer();
473 buf.append("CONF");
474
475 buf.append(" {UpdateTime " + UpdateTime + "}");
476
477 buf.append(" {Update " + Update + "}");
478
479 buf.append(" {Game " + Game + "}");
480
481 buf.append(" {Self " + Self + "}");
482
483 buf.append(" {See " + See + "}");
484
485 buf.append(" {Special " + Special + "}");
486
487 buf.append(" {All " + All + "}");
488
489 buf.append(" {Async " + Async + "}");
490
491 return buf.toString();
492 }
493
494 }
495
496