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 CHANGEMAP.
15   		 *
16   		 * 
17  		Will change map to MapName - map must exist on server (won't be
18  		tested), will send MAPCHANGE message. When map change occurs all
19  		connections to the server will be shutted down.
20  	
21           */
22   	public class ChangeMap 
23  		extends CommandMessage
24  	        {
25  	        	
26  		        
27      	/** Example how the message looks like - used during parser tests. */
28      	public static final String PROTOTYPE =
29      		" {MapName text} ";
30      
31  		/**
32  		 * Creates new instance of command ChangeMap.
33  		 * 
34  		Will change map to MapName - map must exist on server (won't be
35  		tested), will send MAPCHANGE message. When map change occurs all
36  		connections to the server will be shutted down.
37  	
38  		 * Corresponding GameBots message for this command is
39  		 * CHANGEMAP.
40  		 *
41  		 * 
42  		 *    @param MapName Name of the new map.
43  		 */
44  		public ChangeMap(
45  			String MapName
46  		) {
47  			
48  				this.MapName = MapName;
49              
50  		}
51  
52  		
53  			/**
54  			 * Creates new instance of command ChangeMap.
55  			 * 
56  		Will change map to MapName - map must exist on server (won't be
57  		tested), will send MAPCHANGE message. When map change occurs all
58  		connections to the server will be shutted down.
59  	
60  			 * Corresponding GameBots message for this command is
61  			 * CHANGEMAP.
62  			 * <p></p>
63  			 * WARNING: this is empty-command constructor, you have to use setters to fill it up with data that should be sent to GameBots2004!
64  		     */
65  		    public ChangeMap() {
66  		    }
67  			
68  		
69  		/**
70  		 * Cloning constructor.
71  		 *
72  		 * @param original
73  		 */
74  		public ChangeMap(ChangeMap original) {
75  		   
76  		        this.MapName = original.MapName;
77  		   
78  		}
79      
80  	        /**
81  	        Name of the new map. 
82  	        */
83  	        protected
84  	         String MapName =
85  	       	
86  	        		null
87  	        	;
88  	
89  	        
90  	        
91   		/**
92           * Name of the new map. 
93           */
94          public String getMapName()
95   	
96  	        {
97  	            return
98  	        	 MapName;
99  	        }
100 	        
101 	        
102 	        
103  		
104  		/**
105          * Name of the new map. 
106          */
107         public ChangeMap 
108         setMapName(String MapName)
109  	
110 			{
111 				this.MapName = MapName;
112 				return this;
113 			}
114 		
115  	    public String toString() {
116             return toMessage();
117         }
118  	
119  		public String toHtmlString() {
120 			return super.toString() + "[<br/>" +
121             	
122             	"<b>MapName</b> = " +
123             	String.valueOf(getMapName()
124  	) +
125             	" <br/> " +
126             	 
127             	"<br/>]"
128             ;
129 		}
130  	
131 		public String toMessage() {
132      		StringBuffer buf = new StringBuffer();
133      		buf.append("CHANGEMAP");
134      		
135 						if (MapName != null) {
136 							buf.append(" {MapName " + MapName + "}");
137 						}
138 					
139    			return buf.toString();
140    		}
141  	
142  		// --- Extra Java from XML BEGIN (extra/code/java)
143         	
144 		// --- Extra Java from XML END (extra/code/java)
145  	
146 	        }
147