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 PAUSE.
15   		 *
16   		 * 
17  		Will pause/unpause the game. The game can be paused just if
18  		bAllowPause = true in GameBots2004.ini (different settings for bots
19  		and server possible).
20  	
21           */
22   	public class Pause 
23  		extends CommandMessage
24  	        {
25  	        	
26  		        
27      	/** Example how the message looks like - used during parser tests. */
28      	public static final String PROTOTYPE =
29      		" {PauseBots False}  {PauseAll False} ";
30      
31  		/**
32  		 * Creates new instance of command Pause.
33  		 * 
34  		Will pause/unpause the game. The game can be paused just if
35  		bAllowPause = true in GameBots2004.ini (different settings for bots
36  		and server possible).
37  	
38  		 * Corresponding GameBots message for this command is
39  		 * PAUSE.
40  		 *
41  		 * 
42  		 *    @param PauseBots 
43  			Iif true only bots will be paused – players and spectators
44  			will move freely.
45  		
46  		 *    @param PauseAll 
47  			Everyone in the game will be paused if set to true. To
48  			unpause send PAUSE command with PauseAll set to false.
49  		
50  		 */
51  		public Pause(
52  			Boolean PauseBots,  Boolean PauseAll
53  		) {
54  			
55  				this.PauseBots = PauseBots;
56              
57  				this.PauseAll = PauseAll;
58              
59  		}
60  
61  		
62  			/**
63  			 * Creates new instance of command Pause.
64  			 * 
65  		Will pause/unpause the game. The game can be paused just if
66  		bAllowPause = true in GameBots2004.ini (different settings for bots
67  		and server possible).
68  	
69  			 * Corresponding GameBots message for this command is
70  			 * PAUSE.
71  			 * <p></p>
72  			 * WARNING: this is empty-command constructor, you have to use setters to fill it up with data that should be sent to GameBots2004!
73  		     */
74  		    public Pause() {
75  		    }
76  			
77  		
78  		/**
79  		 * Cloning constructor.
80  		 *
81  		 * @param original
82  		 */
83  		public Pause(Pause original) {
84  		   
85  		        this.PauseBots = original.PauseBots;
86  		   
87  		        this.PauseAll = original.PauseAll;
88  		   
89  		}
90      
91  	        /**
92  	        
93  			Iif true only bots will be paused – players and spectators
94  			will move freely.
95  		 
96  	        */
97  	        protected
98  	         Boolean PauseBots =
99  	       	
100 	        		null
101 	        	;
102 	
103 	        
104 	        
105  		/**
106          * 
107 			Iif true only bots will be paused – players and spectators
108 			will move freely.
109 		 
110          */
111         public Boolean isPauseBots()
112  	
113 	        {
114 	            return
115 	        	 PauseBots;
116 	        }
117 	        
118 	        
119 	        
120  		
121  		/**
122          * 
123 			Iif true only bots will be paused – players and spectators
124 			will move freely.
125 		 
126          */
127         public Pause 
128         setPauseBots(Boolean PauseBots)
129  	
130 			{
131 				this.PauseBots = PauseBots;
132 				return this;
133 			}
134 		
135 	        /**
136 	        
137 			Everyone in the game will be paused if set to true. To
138 			unpause send PAUSE command with PauseAll set to false.
139 		 
140 	        */
141 	        protected
142 	         Boolean PauseAll =
143 	       	
144 	        		null
145 	        	;
146 	
147 	        
148 	        
149  		/**
150          * 
151 			Everyone in the game will be paused if set to true. To
152 			unpause send PAUSE command with PauseAll set to false.
153 		 
154          */
155         public Boolean isPauseAll()
156  	
157 	        {
158 	            return
159 	        	 PauseAll;
160 	        }
161 	        
162 	        
163 	        
164  		
165  		/**
166          * 
167 			Everyone in the game will be paused if set to true. To
168 			unpause send PAUSE command with PauseAll set to false.
169 		 
170          */
171         public Pause 
172         setPauseAll(Boolean PauseAll)
173  	
174 			{
175 				this.PauseAll = PauseAll;
176 				return this;
177 			}
178 		
179  	    public String toString() {
180             return toMessage();
181         }
182  	
183  		public String toHtmlString() {
184 			return super.toString() + "[<br/>" +
185             	
186             	"<b>PauseBots</b> = " +
187             	String.valueOf(isPauseBots()
188  	) +
189             	" <br/> " +
190             	
191             	"<b>PauseAll</b> = " +
192             	String.valueOf(isPauseAll()
193  	) +
194             	" <br/> " +
195             	 
196             	"<br/>]"
197             ;
198 		}
199  	
200 		public String toMessage() {
201      		StringBuffer buf = new StringBuffer();
202      		buf.append("PAUSE");
203      		
204 						if (PauseBots != null) {
205 							buf.append(" {PauseBots " + PauseBots + "}");
206 						}
207 					
208 						if (PauseAll != null) {
209 							buf.append(" {PauseAll " + PauseAll + "}");
210 						}
211 					
212    			return buf.toString();
213    		}
214  	
215  		// --- Extra Java from XML BEGIN (extra/code/java)
216         	
217 		// --- Extra Java from XML END (extra/code/java)
218  	
219 	        }
220