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 THAT FILE INSTEAD OF THIS ONE.
7
8 Use Ant task process-gb-messages after that to generate .java files again.
9
10 IMPORTANT END !!!
11 */
12 package cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands;import java.util.*;import javax.vecmath.*;import cz.cuni.amis.pogamut.base.communication.messages.*;import cz.cuni.amis.pogamut.base.communication.worldview.*;import cz.cuni.amis.pogamut.base.communication.worldview.event.*;import cz.cuni.amis.pogamut.base.communication.worldview.object.*;import cz.cuni.amis.pogamut.multi.communication.worldview.object.*;import cz.cuni.amis.pogamut.base.communication.translator.event.*;import cz.cuni.amis.pogamut.multi.communication.translator.event.*;import cz.cuni.amis.pogamut.base3d.worldview.object.*;import cz.cuni.amis.pogamut.base3d.worldview.object.event.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.*;import cz.cuni.amis.pogamut.ut2004.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.ItemType.Category;import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;import cz.cuni.amis.utils.exception.*;import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult.Result;import cz.cuni.amis.utils.SafeEquals;import cz.cuni.amis.pogamut.base.agent.*;import cz.cuni.amis.pogamut.multi.agent.*;import cz.cuni.amis.pogamut.multi.communication.worldview.property.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.property.*;import cz.cuni.amis.utils.token.*;import cz.cuni.amis.utils.*;
13 /**
14 * Representation of the GameBots2004 command STARTPLRS.
15 *
16 *
17 Will start to export IPLR messages regularly (like synchronous
18 batch). Can be used for continuous visualization of players
19 moving around the map. There are three categories (see below).
20 The default values for all category is true, that means that
21 without attributes all the categories will be exported.
22
23 */
24 public class StartPlayers
25 extends CommandMessage
26 {
27
28
29 /** Example how the message looks like - used during parser tests. */
30 public static final String PROTOTYPE =
31 " {Humans False} {GBBots False} {UnrealBots False} ";
32
33 /**
34 * Creates new instance of command StartPlayers.
35 *
36 Will start to export IPLR messages regularly (like synchronous
37 batch). Can be used for continuous visualization of players
38 moving around the map. There are three categories (see below).
39 The default values for all category is true, that means that
40 without attributes all the categories will be exported.
41
42 * Corresponding GameBots message for this command is
43 * STARTPLRS.
44 *
45 *
46 * @param Humans
47 All human players will be exported.
48
49 * @param GBBots
50 All GameBots bots will be exported.
51
52 * @param UnrealBots All UnrealBots will be exported.
53 */
54 public StartPlayers(
55 Boolean Humans, Boolean GBBots, Boolean UnrealBots
56 ) {
57
58 this.Humans = Humans;
59
60 this.GBBots = GBBots;
61
62 this.UnrealBots = UnrealBots;
63
64 }
65
66
67 /**
68 * Creates new instance of command StartPlayers.
69 *
70 Will start to export IPLR messages regularly (like synchronous
71 batch). Can be used for continuous visualization of players
72 moving around the map. There are three categories (see below).
73 The default values for all category is true, that means that
74 without attributes all the categories will be exported.
75
76 * Corresponding GameBots message for this command is
77 * STARTPLRS.
78 * <p></p>
79 * WARNING: this is empty-command constructor, you have to use setters to fill it up with data that should be sent to GameBots2004!
80 */
81 public StartPlayers() {
82 }
83
84
85 /**
86 * Cloning constructor.
87 *
88 * @param original
89 */
90 public StartPlayers(StartPlayers original) {
91
92 this.Humans = original.Humans;
93
94 this.GBBots = original.GBBots;
95
96 this.UnrealBots = original.UnrealBots;
97
98 }
99
100 /**
101
102 All human players will be exported.
103
104 */
105 protected
106 Boolean Humans =
107
108 null
109 ;
110
111
112
113 /**
114 *
115 All human players will be exported.
116
117 */
118 public Boolean isHumans()
119
120 {
121 return
122 Humans;
123 }
124
125
126
127
128 /**
129 *
130 All human players will be exported.
131
132 */
133 public StartPlayers
134 setHumans(Boolean Humans)
135
136 {
137 this.Humans = Humans;
138 return this;
139 }
140
141 /**
142
143 All GameBots bots will be exported.
144
145 */
146 protected
147 Boolean GBBots =
148
149 null
150 ;
151
152
153
154 /**
155 *
156 All GameBots bots will be exported.
157
158 */
159 public Boolean isGBBots()
160
161 {
162 return
163 GBBots;
164 }
165
166
167
168
169 /**
170 *
171 All GameBots bots will be exported.
172
173 */
174 public StartPlayers
175 setGBBots(Boolean GBBots)
176
177 {
178 this.GBBots = GBBots;
179 return this;
180 }
181
182 /**
183 All UnrealBots will be exported.
184 */
185 protected
186 Boolean UnrealBots =
187
188 null
189 ;
190
191
192
193 /**
194 * All UnrealBots will be exported.
195 */
196 public Boolean isUnrealBots()
197
198 {
199 return
200 UnrealBots;
201 }
202
203
204
205
206 /**
207 * All UnrealBots will be exported.
208 */
209 public StartPlayers
210 setUnrealBots(Boolean UnrealBots)
211
212 {
213 this.UnrealBots = UnrealBots;
214 return this;
215 }
216
217 public String toString() {
218 return toMessage();
219 }
220
221 public String toHtmlString() {
222 return super.toString() + "[<br/>" +
223
224 "<b>Humans</b> = " +
225 String.valueOf(isHumans()
226 ) +
227 " <br/> " +
228
229 "<b>GBBots</b> = " +
230 String.valueOf(isGBBots()
231 ) +
232 " <br/> " +
233
234 "<b>UnrealBots</b> = " +
235 String.valueOf(isUnrealBots()
236 ) +
237 " <br/> " +
238
239 "<br/>]"
240 ;
241 }
242
243 public String toMessage() {
244 StringBuffer buf = new StringBuffer();
245 buf.append("STARTPLRS");
246
247 if (Humans != null) {
248 buf.append(" {Humans " + Humans + "}");
249 }
250
251 if (GBBots != null) {
252 buf.append(" {GBBots " + GBBots + "}");
253 }
254
255 if (UnrealBots != null) {
256 buf.append(" {UnrealBots " + UnrealBots + "}");
257 }
258
259 return buf.toString();
260 }
261
262 // --- Extra Java from XML BEGIN (extra/code/java)
263
264 // --- Extra Java from XML END (extra/code/java)
265
266 }
267