View Javadoc

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 SETDEBUG.
15   		 *
16   		 * 
17  		Sets the debug information for current bot - displayable on HUD.
18  	
19           */
20   	public class SetBotDebug 
21  		extends CommandMessage
22  	        {
23  	        	
24  		        
25      	/** Example how the message looks like - used during parser tests. */
26      	public static final String PROTOTYPE =
27      		" {Clear False}  {BehName text}  {StateName text}  {FocName text} ";
28      
29  		/**
30  		 * Creates new instance of command SetBotDebug.
31  		 * 
32  		Sets the debug information for current bot - displayable on HUD.
33  	
34  		 * Corresponding GameBots message for this command is
35  		 * SETDEBUG.
36  		 *
37  		 * 
38  		 *    @param Clear 
39              If true then erases previously sent debug info.
40          
41  		 *    @param BehName 
42              Name of currently active behavior.
43          
44  		 *    @param StateName 
45              Name of currently active behavior state.
46          
47  		 *    @param FocName 
48              Name of current bot behavior focus - other character.
49          
50  		 */
51  		public SetBotDebug(
52  			Boolean Clear,  String BehName,  String StateName,  String FocName
53  		) {
54  			
55  				this.Clear = Clear;
56              
57  				this.BehName = BehName;
58              
59  				this.StateName = StateName;
60              
61  				this.FocName = FocName;
62              
63  		}
64  
65  		
66  			/**
67  			 * Creates new instance of command SetBotDebug.
68  			 * 
69  		Sets the debug information for current bot - displayable on HUD.
70  	
71  			 * Corresponding GameBots message for this command is
72  			 * SETDEBUG.
73  			 * <p></p>
74  			 * WARNING: this is empty-command constructor, you have to use setters to fill it up with data that should be sent to GameBots2004!
75  		     */
76  		    public SetBotDebug() {
77  		    }
78  			
79  		
80  		/**
81  		 * Cloning constructor.
82  		 *
83  		 * @param original
84  		 */
85  		public SetBotDebug(SetBotDebug original) {
86  		   
87  		        this.Clear = original.Clear;
88  		   
89  		        this.BehName = original.BehName;
90  		   
91  		        this.StateName = original.StateName;
92  		   
93  		        this.FocName = original.FocName;
94  		   
95  		}
96      
97  	        /**
98  	        
99              If true then erases previously sent debug info.
100          
101 	        */
102 	        protected
103 	         Boolean Clear =
104 	       	
105 	        		null
106 	        	;
107 	
108 	        
109 	        
110  		/**
111          * 
112             If true then erases previously sent debug info.
113          
114          */
115         public Boolean isClear()
116  	
117 	        {
118 	            return
119 	        	 Clear;
120 	        }
121 	        
122 	        
123 	        
124  		
125  		/**
126          * 
127             If true then erases previously sent debug info.
128          
129          */
130         public SetBotDebug 
131         setClear(Boolean Clear)
132  	
133 			{
134 				this.Clear = Clear;
135 				return this;
136 			}
137 		
138 	        /**
139 	        
140             Name of currently active behavior.
141          
142 	        */
143 	        protected
144 	         String BehName =
145 	       	
146 	        		null
147 	        	;
148 	
149 	        
150 	        
151  		/**
152          * 
153             Name of currently active behavior.
154          
155          */
156         public String getBehName()
157  	
158 	        {
159 	            return
160 	        	 BehName;
161 	        }
162 	        
163 	        
164 	        
165  		
166  		/**
167          * 
168             Name of currently active behavior.
169          
170          */
171         public SetBotDebug 
172         setBehName(String BehName)
173  	
174 			{
175 				this.BehName = BehName;
176 				return this;
177 			}
178 		
179 	        /**
180 	        
181             Name of currently active behavior state.
182          
183 	        */
184 	        protected
185 	         String StateName =
186 	       	
187 	        		null
188 	        	;
189 	
190 	        
191 	        
192  		/**
193          * 
194             Name of currently active behavior state.
195          
196          */
197         public String getStateName()
198  	
199 	        {
200 	            return
201 	        	 StateName;
202 	        }
203 	        
204 	        
205 	        
206  		
207  		/**
208          * 
209             Name of currently active behavior state.
210          
211          */
212         public SetBotDebug 
213         setStateName(String StateName)
214  	
215 			{
216 				this.StateName = StateName;
217 				return this;
218 			}
219 		
220 	        /**
221 	        
222             Name of current bot behavior focus - other character.
223          
224 	        */
225 	        protected
226 	         String FocName =
227 	       	
228 	        		null
229 	        	;
230 	
231 	        
232 	        
233  		/**
234          * 
235             Name of current bot behavior focus - other character.
236          
237          */
238         public String getFocName()
239  	
240 	        {
241 	            return
242 	        	 FocName;
243 	        }
244 	        
245 	        
246 	        
247  		
248  		/**
249          * 
250             Name of current bot behavior focus - other character.
251          
252          */
253         public SetBotDebug 
254         setFocName(String FocName)
255  	
256 			{
257 				this.FocName = FocName;
258 				return this;
259 			}
260 		
261  	    public String toString() {
262             return toMessage();
263         }
264  	
265  		public String toHtmlString() {
266 			return super.toString() + "[<br/>" +
267             	
268             	"<b>Clear</b> = " +
269             	String.valueOf(isClear()
270  	) +
271             	" <br/> " +
272             	
273             	"<b>BehName</b> = " +
274             	String.valueOf(getBehName()
275  	) +
276             	" <br/> " +
277             	
278             	"<b>StateName</b> = " +
279             	String.valueOf(getStateName()
280  	) +
281             	" <br/> " +
282             	
283             	"<b>FocName</b> = " +
284             	String.valueOf(getFocName()
285  	) +
286             	" <br/> " +
287             	 
288             	"<br/>]"
289             ;
290 		}
291  	
292 		public String toMessage() {
293      		StringBuffer buf = new StringBuffer();
294      		buf.append("SETDEBUG");
295      		
296 						if (Clear != null) {
297 							buf.append(" {Clear " + Clear + "}");
298 						}
299 					
300 						if (BehName != null) {
301 							buf.append(" {BehName " + BehName + "}");
302 						}
303 					
304 						if (StateName != null) {
305 							buf.append(" {StateName " + StateName + "}");
306 						}
307 					
308 						if (FocName != null) {
309 							buf.append(" {FocName " + FocName + "}");
310 						}
311 					
312    			return buf.toString();
313    		}
314  	
315  		// --- Extra Java from XML BEGIN (extra/code/java)
316         	
317 		// --- Extra Java from XML END (extra/code/java)
318  	
319 	        }
320